@dereekb/util 10.1.8 → 10.1.10
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/fetch/CHANGELOG.md +8 -0
- package/fetch/package.json +1 -1
- package/index.cjs.js +910 -703
- package/index.esm.js +947 -703
- package/package.json +1 -1
- package/src/lib/model/id.factory.d.ts +40 -0
- package/src/lib/model/index.d.ts +2 -1
- package/src/lib/string/char.d.ts +9 -0
- package/src/lib/string/dencoder.d.ts +79 -0
- package/src/lib/string/transform.d.ts +12 -1
- package/test/CHANGELOG.md +8 -0
- package/test/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -37,21 +37,21 @@ var functionUncurryThis = NATIVE_BIND$3 ? uncurryThisWithBind : function (fn) {
|
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
var uncurryThis$
|
|
40
|
+
var uncurryThis$t = functionUncurryThis;
|
|
41
41
|
|
|
42
|
-
var toString$
|
|
43
|
-
var stringSlice$
|
|
42
|
+
var toString$f = uncurryThis$t({}.toString);
|
|
43
|
+
var stringSlice$b = uncurryThis$t(''.slice);
|
|
44
44
|
|
|
45
45
|
var classofRaw$2 = function (it) {
|
|
46
|
-
return stringSlice$
|
|
46
|
+
return stringSlice$b(toString$f(it), 8, -1);
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
var uncurryThis$
|
|
49
|
+
var uncurryThis$s = functionUncurryThis;
|
|
50
50
|
var fails$n = fails$p;
|
|
51
51
|
var classof$8 = classofRaw$2;
|
|
52
52
|
|
|
53
53
|
var $Object$4 = Object;
|
|
54
|
-
var split = uncurryThis$
|
|
54
|
+
var split = uncurryThis$s(''.split);
|
|
55
55
|
|
|
56
56
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
57
57
|
var indexedObject = fails$n(function () {
|
|
@@ -74,17 +74,17 @@ var $TypeError$h = TypeError;
|
|
|
74
74
|
|
|
75
75
|
// `RequireObjectCoercible` abstract operation
|
|
76
76
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
77
|
-
var requireObjectCoercible$
|
|
77
|
+
var requireObjectCoercible$b = function (it) {
|
|
78
78
|
if (isNullOrUndefined$6(it)) throw new $TypeError$h("Can't call method on " + it);
|
|
79
79
|
return it;
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
// toObject with fallback for non-array-like ES3 strings
|
|
83
83
|
var IndexedObject$2 = indexedObject;
|
|
84
|
-
var requireObjectCoercible$
|
|
84
|
+
var requireObjectCoercible$a = requireObjectCoercible$b;
|
|
85
85
|
|
|
86
86
|
var toIndexedObject$5 = function (it) {
|
|
87
|
-
return IndexedObject$2(requireObjectCoercible$
|
|
87
|
+
return IndexedObject$2(requireObjectCoercible$a(it));
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
var check = function (it) {
|
|
@@ -138,20 +138,20 @@ var store$2 = sharedStore;
|
|
|
138
138
|
source: 'https://github.com/zloirock/core-js'
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
-
var requireObjectCoercible$
|
|
141
|
+
var requireObjectCoercible$9 = requireObjectCoercible$b;
|
|
142
142
|
|
|
143
143
|
var $Object$3 = Object;
|
|
144
144
|
|
|
145
145
|
// `ToObject` abstract operation
|
|
146
146
|
// https://tc39.es/ecma262/#sec-toobject
|
|
147
147
|
var toObject$7 = function (argument) {
|
|
148
|
-
return $Object$3(requireObjectCoercible$
|
|
148
|
+
return $Object$3(requireObjectCoercible$9(argument));
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
-
var uncurryThis$
|
|
151
|
+
var uncurryThis$r = functionUncurryThis;
|
|
152
152
|
var toObject$6 = toObject$7;
|
|
153
153
|
|
|
154
|
-
var hasOwnProperty = uncurryThis$
|
|
154
|
+
var hasOwnProperty = uncurryThis$r({}.hasOwnProperty);
|
|
155
155
|
|
|
156
156
|
// `HasOwnProperty` abstract operation
|
|
157
157
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
@@ -160,20 +160,20 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
|
160
160
|
return hasOwnProperty(toObject$6(it), key);
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
-
var uncurryThis$
|
|
163
|
+
var uncurryThis$q = functionUncurryThis;
|
|
164
164
|
|
|
165
165
|
var id = 0;
|
|
166
166
|
var postfix = Math.random();
|
|
167
|
-
var toString$
|
|
167
|
+
var toString$e = uncurryThis$q(1.0.toString);
|
|
168
168
|
|
|
169
169
|
var uid$2 = function (key) {
|
|
170
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$
|
|
170
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$e(++id + postfix, 36);
|
|
171
171
|
};
|
|
172
172
|
|
|
173
173
|
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
174
174
|
|
|
175
175
|
var global$l = global$o;
|
|
176
|
-
var userAgent$
|
|
176
|
+
var userAgent$6 = engineUserAgent;
|
|
177
177
|
|
|
178
178
|
var process$3 = global$l.process;
|
|
179
179
|
var Deno$1 = global$l.Deno;
|
|
@@ -190,10 +190,10 @@ if (v8) {
|
|
|
190
190
|
|
|
191
191
|
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
192
192
|
// so check `userAgent` even if `.v8` exists, but 0
|
|
193
|
-
if (!version && userAgent$
|
|
194
|
-
match = userAgent$
|
|
193
|
+
if (!version && userAgent$6) {
|
|
194
|
+
match = userAgent$6.match(/Edge\/(\d+)/);
|
|
195
195
|
if (!match || match[1] >= 74) {
|
|
196
|
-
match = userAgent$
|
|
196
|
+
match = userAgent$6.match(/Chrome\/(\d+)/);
|
|
197
197
|
if (match) version = +match[1];
|
|
198
198
|
}
|
|
199
199
|
}
|
|
@@ -341,9 +341,9 @@ var getBuiltIn$7 = function (namespace, method) {
|
|
|
341
341
|
return arguments.length < 2 ? aFunction(global$h[namespace]) : global$h[namespace] && global$h[namespace][method];
|
|
342
342
|
};
|
|
343
343
|
|
|
344
|
-
var uncurryThis$
|
|
344
|
+
var uncurryThis$p = functionUncurryThis;
|
|
345
345
|
|
|
346
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
346
|
+
var objectIsPrototypeOf = uncurryThis$p({}.isPrototypeOf);
|
|
347
347
|
|
|
348
348
|
var getBuiltIn$6 = getBuiltIn$7;
|
|
349
349
|
var isCallable$k = isCallable$n;
|
|
@@ -486,7 +486,7 @@ objectDefineProperty.f = DESCRIPTORS$b ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
486
486
|
return O;
|
|
487
487
|
};
|
|
488
488
|
|
|
489
|
-
var ceil = Math.ceil;
|
|
489
|
+
var ceil$1 = Math.ceil;
|
|
490
490
|
var floor$3 = Math.floor;
|
|
491
491
|
|
|
492
492
|
// `Math.trunc` method
|
|
@@ -494,7 +494,7 @@ var floor$3 = Math.floor;
|
|
|
494
494
|
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
495
495
|
var mathTrunc = Math.trunc || function trunc(x) {
|
|
496
496
|
var n = +x;
|
|
497
|
-
return (n > 0 ? floor$3 : ceil)(n);
|
|
497
|
+
return (n > 0 ? floor$3 : ceil$1)(n);
|
|
498
498
|
};
|
|
499
499
|
|
|
500
500
|
var trunc = mathTrunc;
|
|
@@ -526,17 +526,17 @@ var min$4 = Math.min;
|
|
|
526
526
|
|
|
527
527
|
// `ToLength` abstract operation
|
|
528
528
|
// https://tc39.es/ecma262/#sec-tolength
|
|
529
|
-
var toLength$
|
|
529
|
+
var toLength$7 = function (argument) {
|
|
530
530
|
var len = toIntegerOrInfinity$5(argument);
|
|
531
531
|
return len > 0 ? min$4(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
532
532
|
};
|
|
533
533
|
|
|
534
|
-
var toLength$
|
|
534
|
+
var toLength$6 = toLength$7;
|
|
535
535
|
|
|
536
536
|
// `LengthOfArrayLike` abstract operation
|
|
537
537
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
538
538
|
var lengthOfArrayLike$6 = function (obj) {
|
|
539
|
-
return toLength$
|
|
539
|
+
return toLength$6(obj.length);
|
|
540
540
|
};
|
|
541
541
|
|
|
542
542
|
var toIndexedObject$4 = toIndexedObject$5;
|
|
@@ -544,7 +544,7 @@ var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
|
544
544
|
var lengthOfArrayLike$5 = lengthOfArrayLike$6;
|
|
545
545
|
|
|
546
546
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
547
|
-
var createMethod$
|
|
547
|
+
var createMethod$4 = function (IS_INCLUDES) {
|
|
548
548
|
return function ($this, el, fromIndex) {
|
|
549
549
|
var O = toIndexedObject$4($this);
|
|
550
550
|
var length = lengthOfArrayLike$5(O);
|
|
@@ -566,21 +566,21 @@ var createMethod$3 = function (IS_INCLUDES) {
|
|
|
566
566
|
var arrayIncludes = {
|
|
567
567
|
// `Array.prototype.includes` method
|
|
568
568
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
569
|
-
includes: createMethod$
|
|
569
|
+
includes: createMethod$4(true),
|
|
570
570
|
// `Array.prototype.indexOf` method
|
|
571
571
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
572
|
-
indexOf: createMethod$
|
|
572
|
+
indexOf: createMethod$4(false)
|
|
573
573
|
};
|
|
574
574
|
|
|
575
575
|
var hiddenKeys$4 = {};
|
|
576
576
|
|
|
577
|
-
var uncurryThis$
|
|
577
|
+
var uncurryThis$o = functionUncurryThis;
|
|
578
578
|
var hasOwn$b = hasOwnProperty_1;
|
|
579
579
|
var toIndexedObject$3 = toIndexedObject$5;
|
|
580
580
|
var indexOf$1 = arrayIncludes.indexOf;
|
|
581
581
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
582
582
|
|
|
583
|
-
var push$3 = uncurryThis$
|
|
583
|
+
var push$3 = uncurryThis$o([].push);
|
|
584
584
|
|
|
585
585
|
var objectKeysInternal = function (object, names) {
|
|
586
586
|
var O = toIndexedObject$3(object);
|
|
@@ -916,11 +916,11 @@ var functionName = {
|
|
|
916
916
|
CONFIGURABLE: CONFIGURABLE
|
|
917
917
|
};
|
|
918
918
|
|
|
919
|
-
var uncurryThis$
|
|
919
|
+
var uncurryThis$n = functionUncurryThis;
|
|
920
920
|
var isCallable$g = isCallable$n;
|
|
921
921
|
var store = sharedStore;
|
|
922
922
|
|
|
923
|
-
var functionToString = uncurryThis$
|
|
923
|
+
var functionToString = uncurryThis$n(Function.toString);
|
|
924
924
|
|
|
925
925
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
926
926
|
if (!isCallable$g(store.inspectSource)) {
|
|
@@ -931,7 +931,7 @@ if (!isCallable$g(store.inspectSource)) {
|
|
|
931
931
|
|
|
932
932
|
var inspectSource$3 = store.inspectSource;
|
|
933
933
|
|
|
934
|
-
var uncurryThis$
|
|
934
|
+
var uncurryThis$m = functionUncurryThis;
|
|
935
935
|
var fails$i = fails$p;
|
|
936
936
|
var isCallable$f = isCallable$n;
|
|
937
937
|
var hasOwn$7 = hasOwnProperty_1;
|
|
@@ -945,9 +945,9 @@ var getInternalState$2 = InternalStateModule$2.get;
|
|
|
945
945
|
var $String$3 = String;
|
|
946
946
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
947
947
|
var defineProperty$5 = Object.defineProperty;
|
|
948
|
-
var stringSlice$
|
|
949
|
-
var replace$5 = uncurryThis$
|
|
950
|
-
var join = uncurryThis$
|
|
948
|
+
var stringSlice$a = uncurryThis$m(''.slice);
|
|
949
|
+
var replace$5 = uncurryThis$m(''.replace);
|
|
950
|
+
var join = uncurryThis$m([].join);
|
|
951
951
|
|
|
952
952
|
var CONFIGURABLE_LENGTH = DESCRIPTORS$6 && !fails$i(function () {
|
|
953
953
|
return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
@@ -956,7 +956,7 @@ var CONFIGURABLE_LENGTH = DESCRIPTORS$6 && !fails$i(function () {
|
|
|
956
956
|
var TEMPLATE = String(String).split('String');
|
|
957
957
|
|
|
958
958
|
var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
959
|
-
if (stringSlice$
|
|
959
|
+
if (stringSlice$a($String$3(name), 0, 7) === 'Symbol(') {
|
|
960
960
|
name = '[' + replace$5($String$3(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
961
961
|
}
|
|
962
962
|
if (options && options.getter) name = 'get ' + name;
|
|
@@ -1034,12 +1034,12 @@ var objectGetOwnPropertySymbols = {};
|
|
|
1034
1034
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
1035
1035
|
|
|
1036
1036
|
var getBuiltIn$4 = getBuiltIn$7;
|
|
1037
|
-
var uncurryThis$
|
|
1037
|
+
var uncurryThis$l = functionUncurryThis;
|
|
1038
1038
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
1039
1039
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
1040
1040
|
var anObject$c = anObject$g;
|
|
1041
1041
|
|
|
1042
|
-
var concat$2 = uncurryThis$
|
|
1042
|
+
var concat$2 = uncurryThis$l([].concat);
|
|
1043
1043
|
|
|
1044
1044
|
// all object keys, includes non-enumerable and symbols
|
|
1045
1045
|
var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
@@ -1249,13 +1249,13 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
|
|
|
1249
1249
|
return IteratorConstructor;
|
|
1250
1250
|
};
|
|
1251
1251
|
|
|
1252
|
-
var uncurryThis$
|
|
1252
|
+
var uncurryThis$k = functionUncurryThis;
|
|
1253
1253
|
var aCallable$8 = aCallable$a;
|
|
1254
1254
|
|
|
1255
1255
|
var functionUncurryThisAccessor = function (object, key, method) {
|
|
1256
1256
|
try {
|
|
1257
1257
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1258
|
-
return uncurryThis$
|
|
1258
|
+
return uncurryThis$k(aCallable$8(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
1259
1259
|
} catch (error) { /* empty */ }
|
|
1260
1260
|
};
|
|
1261
1261
|
|
|
@@ -1302,7 +1302,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1302
1302
|
};
|
|
1303
1303
|
}() : undefined);
|
|
1304
1304
|
|
|
1305
|
-
var $$
|
|
1305
|
+
var $$i = _export;
|
|
1306
1306
|
var call$f = functionCall;
|
|
1307
1307
|
var FunctionName = functionName;
|
|
1308
1308
|
var isCallable$a = isCallable$n;
|
|
@@ -1390,7 +1390,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1390
1390
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1391
1391
|
defineBuiltIn$5(IterablePrototype, KEY, methods[KEY]);
|
|
1392
1392
|
}
|
|
1393
|
-
} else $$
|
|
1393
|
+
} else $$i({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1394
1394
|
}
|
|
1395
1395
|
|
|
1396
1396
|
// define iterator
|
|
@@ -1558,7 +1558,7 @@ var lengthOfArrayLike$4 = lengthOfArrayLike$6;
|
|
|
1558
1558
|
var $TypeError$a = TypeError;
|
|
1559
1559
|
|
|
1560
1560
|
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
1561
|
-
var createMethod$
|
|
1561
|
+
var createMethod$3 = function (IS_RIGHT) {
|
|
1562
1562
|
return function (that, callbackfn, argumentsLength, memo) {
|
|
1563
1563
|
var O = toObject$4(that);
|
|
1564
1564
|
var self = IndexedObject$1(O);
|
|
@@ -1587,10 +1587,10 @@ var createMethod$2 = function (IS_RIGHT) {
|
|
|
1587
1587
|
var arrayReduce = {
|
|
1588
1588
|
// `Array.prototype.reduce` method
|
|
1589
1589
|
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
1590
|
-
left: createMethod$
|
|
1590
|
+
left: createMethod$3(false),
|
|
1591
1591
|
// `Array.prototype.reduceRight` method
|
|
1592
1592
|
// https://tc39.es/ecma262/#sec-array.prototype.reduceright
|
|
1593
|
-
right: createMethod$
|
|
1593
|
+
right: createMethod$3(true)
|
|
1594
1594
|
};
|
|
1595
1595
|
|
|
1596
1596
|
var fails$e = fails$p;
|
|
@@ -1608,7 +1608,7 @@ var classof$7 = classofRaw$2;
|
|
|
1608
1608
|
|
|
1609
1609
|
var engineIsNode = classof$7(global$c.process) === 'process';
|
|
1610
1610
|
|
|
1611
|
-
var $$
|
|
1611
|
+
var $$h = _export;
|
|
1612
1612
|
var $reduce = arrayReduce.left;
|
|
1613
1613
|
var arrayMethodIsStrict$1 = arrayMethodIsStrict$2;
|
|
1614
1614
|
var CHROME_VERSION = engineV8Version;
|
|
@@ -1621,7 +1621,7 @@ var FORCED$2 = CHROME_BUG || !arrayMethodIsStrict$1('reduce');
|
|
|
1621
1621
|
|
|
1622
1622
|
// `Array.prototype.reduce` method
|
|
1623
1623
|
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
1624
|
-
$$
|
|
1624
|
+
$$h({ target: 'Array', proto: true, forced: FORCED$2 }, {
|
|
1625
1625
|
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
1626
1626
|
var length = arguments.length;
|
|
1627
1627
|
return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
|
|
@@ -1891,7 +1891,7 @@ var classof$5 = classof$6;
|
|
|
1891
1891
|
|
|
1892
1892
|
var $String$1 = String;
|
|
1893
1893
|
|
|
1894
|
-
var toString$
|
|
1894
|
+
var toString$d = function (argument) {
|
|
1895
1895
|
if (classof$5(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
1896
1896
|
return $String$1(argument);
|
|
1897
1897
|
};
|
|
@@ -1905,14 +1905,14 @@ var defineBuiltInAccessor$2 = function (target, name, descriptor) {
|
|
|
1905
1905
|
return defineProperty$2.f(target, name, descriptor);
|
|
1906
1906
|
};
|
|
1907
1907
|
|
|
1908
|
-
var $$
|
|
1908
|
+
var $$g = _export;
|
|
1909
1909
|
var DESCRIPTORS$4 = descriptors;
|
|
1910
1910
|
var global$b = global$o;
|
|
1911
|
-
var uncurryThis$
|
|
1911
|
+
var uncurryThis$j = functionUncurryThis;
|
|
1912
1912
|
var hasOwn$3 = hasOwnProperty_1;
|
|
1913
1913
|
var isCallable$8 = isCallable$n;
|
|
1914
1914
|
var isPrototypeOf$4 = objectIsPrototypeOf;
|
|
1915
|
-
var toString$
|
|
1915
|
+
var toString$c = toString$d;
|
|
1916
1916
|
var defineBuiltInAccessor$1 = defineBuiltInAccessor$2;
|
|
1917
1917
|
var copyConstructorProperties = copyConstructorProperties$2;
|
|
1918
1918
|
|
|
@@ -1926,7 +1926,7 @@ if (DESCRIPTORS$4 && isCallable$8(NativeSymbol) && (!('description' in SymbolPro
|
|
|
1926
1926
|
var EmptyStringDescriptionStore = {};
|
|
1927
1927
|
// wrap Symbol constructor for correct work with undefined description
|
|
1928
1928
|
var SymbolWrapper = function Symbol() {
|
|
1929
|
-
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$
|
|
1929
|
+
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString$c(arguments[0]);
|
|
1930
1930
|
var result = isPrototypeOf$4(SymbolPrototype, this)
|
|
1931
1931
|
? new NativeSymbol(description)
|
|
1932
1932
|
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
@@ -1940,11 +1940,11 @@ if (DESCRIPTORS$4 && isCallable$8(NativeSymbol) && (!('description' in SymbolPro
|
|
|
1940
1940
|
SymbolPrototype.constructor = SymbolWrapper;
|
|
1941
1941
|
|
|
1942
1942
|
var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';
|
|
1943
|
-
var thisSymbolValue = uncurryThis$
|
|
1944
|
-
var symbolDescriptiveString = uncurryThis$
|
|
1943
|
+
var thisSymbolValue = uncurryThis$j(SymbolPrototype.valueOf);
|
|
1944
|
+
var symbolDescriptiveString = uncurryThis$j(SymbolPrototype.toString);
|
|
1945
1945
|
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
1946
|
-
var replace$4 = uncurryThis$
|
|
1947
|
-
var stringSlice$
|
|
1946
|
+
var replace$4 = uncurryThis$j(''.replace);
|
|
1947
|
+
var stringSlice$9 = uncurryThis$j(''.slice);
|
|
1948
1948
|
|
|
1949
1949
|
defineBuiltInAccessor$1(SymbolPrototype, 'description', {
|
|
1950
1950
|
configurable: true,
|
|
@@ -1952,12 +1952,12 @@ if (DESCRIPTORS$4 && isCallable$8(NativeSymbol) && (!('description' in SymbolPro
|
|
|
1952
1952
|
var symbol = thisSymbolValue(this);
|
|
1953
1953
|
if (hasOwn$3(EmptyStringDescriptionStore, symbol)) return '';
|
|
1954
1954
|
var string = symbolDescriptiveString(symbol);
|
|
1955
|
-
var desc = NATIVE_SYMBOL ? stringSlice$
|
|
1955
|
+
var desc = NATIVE_SYMBOL ? stringSlice$9(string, 7, -1) : replace$4(string, regexp, '$1');
|
|
1956
1956
|
return desc === '' ? undefined : desc;
|
|
1957
1957
|
}
|
|
1958
1958
|
});
|
|
1959
1959
|
|
|
1960
|
-
$$
|
|
1960
|
+
$$g({ global: true, constructor: true, forced: true }, {
|
|
1961
1961
|
Symbol: SymbolWrapper
|
|
1962
1962
|
});
|
|
1963
1963
|
}
|
|
@@ -2560,7 +2560,7 @@ function setsAreEquivalent(a, b) {
|
|
|
2560
2560
|
}
|
|
2561
2561
|
|
|
2562
2562
|
var DESCRIPTORS$3 = descriptors;
|
|
2563
|
-
var uncurryThis$
|
|
2563
|
+
var uncurryThis$i = functionUncurryThis;
|
|
2564
2564
|
var call$e = functionCall;
|
|
2565
2565
|
var fails$d = fails$p;
|
|
2566
2566
|
var objectKeys = objectKeys$2;
|
|
@@ -2573,7 +2573,7 @@ var IndexedObject = indexedObject;
|
|
|
2573
2573
|
var $assign = Object.assign;
|
|
2574
2574
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
2575
2575
|
var defineProperty$1 = Object.defineProperty;
|
|
2576
|
-
var concat$1 = uncurryThis$
|
|
2576
|
+
var concat$1 = uncurryThis$i([].concat);
|
|
2577
2577
|
|
|
2578
2578
|
// `Object.assign` method
|
|
2579
2579
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
@@ -2616,13 +2616,13 @@ var objectAssign = !$assign || fails$d(function () {
|
|
|
2616
2616
|
} return T;
|
|
2617
2617
|
} : $assign;
|
|
2618
2618
|
|
|
2619
|
-
var $$
|
|
2619
|
+
var $$f = _export;
|
|
2620
2620
|
var assign = objectAssign;
|
|
2621
2621
|
|
|
2622
2622
|
// `Object.assign` method
|
|
2623
2623
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
2624
2624
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
2625
|
-
$$
|
|
2625
|
+
$$f({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
2626
2626
|
assign: assign
|
|
2627
2627
|
});
|
|
2628
2628
|
|
|
@@ -3239,9 +3239,9 @@ var deletePropertyOrThrow$1 = function (O, P) {
|
|
|
3239
3239
|
if (!delete O[P]) throw new $TypeError$9('Cannot delete property ' + tryToString$3(P) + ' of ' + tryToString$3(O));
|
|
3240
3240
|
};
|
|
3241
3241
|
|
|
3242
|
-
var uncurryThis$
|
|
3242
|
+
var uncurryThis$h = functionUncurryThis;
|
|
3243
3243
|
|
|
3244
|
-
var arraySlice$2 = uncurryThis$
|
|
3244
|
+
var arraySlice$2 = uncurryThis$h([].slice);
|
|
3245
3245
|
|
|
3246
3246
|
var arraySlice$1 = arraySlice$2;
|
|
3247
3247
|
|
|
@@ -3285,9 +3285,9 @@ var sort = function (array, comparefn) {
|
|
|
3285
3285
|
|
|
3286
3286
|
var arraySort = sort;
|
|
3287
3287
|
|
|
3288
|
-
var userAgent$
|
|
3288
|
+
var userAgent$5 = engineUserAgent;
|
|
3289
3289
|
|
|
3290
|
-
var firefox = userAgent$
|
|
3290
|
+
var firefox = userAgent$5.match(/firefox\/(\d+)/i);
|
|
3291
3291
|
|
|
3292
3292
|
var engineFfVersion = !!firefox && +firefox[1];
|
|
3293
3293
|
|
|
@@ -3295,19 +3295,19 @@ var UA = engineUserAgent;
|
|
|
3295
3295
|
|
|
3296
3296
|
var engineIsIeOrEdge = /MSIE|Trident/.test(UA);
|
|
3297
3297
|
|
|
3298
|
-
var userAgent$
|
|
3298
|
+
var userAgent$4 = engineUserAgent;
|
|
3299
3299
|
|
|
3300
|
-
var webkit = userAgent$
|
|
3300
|
+
var webkit = userAgent$4.match(/AppleWebKit\/(\d+)\./);
|
|
3301
3301
|
|
|
3302
3302
|
var engineWebkitVersion = !!webkit && +webkit[1];
|
|
3303
3303
|
|
|
3304
|
-
var $$
|
|
3305
|
-
var uncurryThis$
|
|
3304
|
+
var $$e = _export;
|
|
3305
|
+
var uncurryThis$g = functionUncurryThis;
|
|
3306
3306
|
var aCallable$6 = aCallable$a;
|
|
3307
3307
|
var toObject$2 = toObject$7;
|
|
3308
3308
|
var lengthOfArrayLike$3 = lengthOfArrayLike$6;
|
|
3309
3309
|
var deletePropertyOrThrow = deletePropertyOrThrow$1;
|
|
3310
|
-
var toString$
|
|
3310
|
+
var toString$b = toString$d;
|
|
3311
3311
|
var fails$c = fails$p;
|
|
3312
3312
|
var internalSort = arraySort;
|
|
3313
3313
|
var arrayMethodIsStrict = arrayMethodIsStrict$2;
|
|
@@ -3317,8 +3317,8 @@ var V8 = engineV8Version;
|
|
|
3317
3317
|
var WEBKIT = engineWebkitVersion;
|
|
3318
3318
|
|
|
3319
3319
|
var test$1 = [];
|
|
3320
|
-
var nativeSort = uncurryThis$
|
|
3321
|
-
var push$2 = uncurryThis$
|
|
3320
|
+
var nativeSort = uncurryThis$g(test$1.sort);
|
|
3321
|
+
var push$2 = uncurryThis$g(test$1.push);
|
|
3322
3322
|
|
|
3323
3323
|
// IE8-
|
|
3324
3324
|
var FAILS_ON_UNDEFINED = fails$c(function () {
|
|
@@ -3373,13 +3373,13 @@ var getSortCompare = function (comparefn) {
|
|
|
3373
3373
|
if (y === undefined) return -1;
|
|
3374
3374
|
if (x === undefined) return 1;
|
|
3375
3375
|
if (comparefn !== undefined) return +comparefn(x, y) || 0;
|
|
3376
|
-
return toString$
|
|
3376
|
+
return toString$b(x) > toString$b(y) ? 1 : -1;
|
|
3377
3377
|
};
|
|
3378
3378
|
};
|
|
3379
3379
|
|
|
3380
3380
|
// `Array.prototype.sort` method
|
|
3381
3381
|
// https://tc39.es/ecma262/#sec-array.prototype.sort
|
|
3382
|
-
$$
|
|
3382
|
+
$$e({ target: 'Array', proto: true, forced: FORCED$1 }, {
|
|
3383
3383
|
sort: function sort(comparefn) {
|
|
3384
3384
|
if (comparefn !== undefined) aCallable$6(comparefn);
|
|
3385
3385
|
|
|
@@ -3441,7 +3441,7 @@ var regexpGetFlags = function (R) {
|
|
|
3441
3441
|
var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
|
|
3442
3442
|
var defineBuiltIn$4 = defineBuiltIn$8;
|
|
3443
3443
|
var anObject$9 = anObject$g;
|
|
3444
|
-
var $toString = toString$
|
|
3444
|
+
var $toString = toString$d;
|
|
3445
3445
|
var fails$b = fails$p;
|
|
3446
3446
|
var getRegExpFlags$1 = regexpGetFlags;
|
|
3447
3447
|
|
|
@@ -4369,8 +4369,8 @@ var regexpUnsupportedNcg = fails$8(function () {
|
|
|
4369
4369
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
4370
4370
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
4371
4371
|
var call$c = functionCall;
|
|
4372
|
-
var uncurryThis$
|
|
4373
|
-
var toString$
|
|
4372
|
+
var uncurryThis$f = functionUncurryThis;
|
|
4373
|
+
var toString$a = toString$d;
|
|
4374
4374
|
var regexpFlags = regexpFlags$1;
|
|
4375
4375
|
var stickyHelpers$2 = regexpStickyHelpers;
|
|
4376
4376
|
var shared = shared$4.exports;
|
|
@@ -4382,10 +4382,10 @@ var UNSUPPORTED_NCG$1 = regexpUnsupportedNcg;
|
|
|
4382
4382
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
4383
4383
|
var nativeExec = RegExp.prototype.exec;
|
|
4384
4384
|
var patchedExec = nativeExec;
|
|
4385
|
-
var charAt$4 = uncurryThis$
|
|
4386
|
-
var indexOf = uncurryThis$
|
|
4387
|
-
var replace$3 = uncurryThis$
|
|
4388
|
-
var stringSlice$
|
|
4385
|
+
var charAt$4 = uncurryThis$f(''.charAt);
|
|
4386
|
+
var indexOf = uncurryThis$f(''.indexOf);
|
|
4387
|
+
var replace$3 = uncurryThis$f(''.replace);
|
|
4388
|
+
var stringSlice$8 = uncurryThis$f(''.slice);
|
|
4389
4389
|
|
|
4390
4390
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
4391
4391
|
var re1 = /a/;
|
|
@@ -4406,7 +4406,7 @@ if (PATCH) {
|
|
|
4406
4406
|
patchedExec = function exec(string) {
|
|
4407
4407
|
var re = this;
|
|
4408
4408
|
var state = getInternalState(re);
|
|
4409
|
-
var str = toString$
|
|
4409
|
+
var str = toString$a(string);
|
|
4410
4410
|
var raw = state.raw;
|
|
4411
4411
|
var result, reCopy, lastIndex, match, i, object, group;
|
|
4412
4412
|
|
|
@@ -4430,7 +4430,7 @@ if (PATCH) {
|
|
|
4430
4430
|
flags += 'g';
|
|
4431
4431
|
}
|
|
4432
4432
|
|
|
4433
|
-
strCopy = stringSlice$
|
|
4433
|
+
strCopy = stringSlice$8(str, re.lastIndex);
|
|
4434
4434
|
// Support anchored sticky behavior.
|
|
4435
4435
|
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$4(str, re.lastIndex - 1) !== '\n')) {
|
|
4436
4436
|
source = '(?: ' + source + ')';
|
|
@@ -4451,8 +4451,8 @@ if (PATCH) {
|
|
|
4451
4451
|
|
|
4452
4452
|
if (sticky) {
|
|
4453
4453
|
if (match) {
|
|
4454
|
-
match.input = stringSlice$
|
|
4455
|
-
match[0] = stringSlice$
|
|
4454
|
+
match.input = stringSlice$8(match.input, charsAdded);
|
|
4455
|
+
match[0] = stringSlice$8(match[0], charsAdded);
|
|
4456
4456
|
match.index = re.lastIndex;
|
|
4457
4457
|
re.lastIndex += match[0].length;
|
|
4458
4458
|
} else re.lastIndex = 0;
|
|
@@ -4483,31 +4483,31 @@ if (PATCH) {
|
|
|
4483
4483
|
|
|
4484
4484
|
var regexpExec$2 = patchedExec;
|
|
4485
4485
|
|
|
4486
|
-
var $$
|
|
4486
|
+
var $$d = _export;
|
|
4487
4487
|
var exec$2 = regexpExec$2;
|
|
4488
4488
|
|
|
4489
4489
|
// `RegExp.prototype.exec` method
|
|
4490
4490
|
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
4491
|
-
$$
|
|
4491
|
+
$$d({ target: 'RegExp', proto: true, forced: /./.exec !== exec$2 }, {
|
|
4492
4492
|
exec: exec$2
|
|
4493
4493
|
});
|
|
4494
4494
|
|
|
4495
|
-
var uncurryThis$
|
|
4495
|
+
var uncurryThis$e = functionUncurryThis;
|
|
4496
4496
|
|
|
4497
4497
|
// `thisNumberValue` abstract operation
|
|
4498
4498
|
// https://tc39.es/ecma262/#sec-thisnumbervalue
|
|
4499
|
-
var thisNumberValue$1 = uncurryThis$
|
|
4499
|
+
var thisNumberValue$1 = uncurryThis$e(1.0.valueOf);
|
|
4500
4500
|
|
|
4501
4501
|
var toIntegerOrInfinity$4 = toIntegerOrInfinity$7;
|
|
4502
|
-
var toString$
|
|
4503
|
-
var requireObjectCoercible$
|
|
4502
|
+
var toString$9 = toString$d;
|
|
4503
|
+
var requireObjectCoercible$8 = requireObjectCoercible$b;
|
|
4504
4504
|
|
|
4505
4505
|
var $RangeError$1 = RangeError;
|
|
4506
4506
|
|
|
4507
4507
|
// `String.prototype.repeat` method implementation
|
|
4508
4508
|
// https://tc39.es/ecma262/#sec-string.prototype.repeat
|
|
4509
4509
|
var stringRepeat = function repeat(count) {
|
|
4510
|
-
var str = toString$
|
|
4510
|
+
var str = toString$9(requireObjectCoercible$8(this));
|
|
4511
4511
|
var result = '';
|
|
4512
4512
|
var n = toIntegerOrInfinity$4(count);
|
|
4513
4513
|
if (n < 0 || n === Infinity) throw new $RangeError$1('Wrong number of repetitions');
|
|
@@ -4515,19 +4515,19 @@ var stringRepeat = function repeat(count) {
|
|
|
4515
4515
|
return result;
|
|
4516
4516
|
};
|
|
4517
4517
|
|
|
4518
|
-
var $$
|
|
4519
|
-
var uncurryThis$
|
|
4518
|
+
var $$c = _export;
|
|
4519
|
+
var uncurryThis$d = functionUncurryThis;
|
|
4520
4520
|
var toIntegerOrInfinity$3 = toIntegerOrInfinity$7;
|
|
4521
4521
|
var thisNumberValue = thisNumberValue$1;
|
|
4522
|
-
var $repeat = stringRepeat;
|
|
4522
|
+
var $repeat$1 = stringRepeat;
|
|
4523
4523
|
var fails$7 = fails$p;
|
|
4524
4524
|
|
|
4525
4525
|
var $RangeError = RangeError;
|
|
4526
4526
|
var $String = String;
|
|
4527
4527
|
var floor$1 = Math.floor;
|
|
4528
|
-
var repeat = uncurryThis$
|
|
4529
|
-
var stringSlice$
|
|
4530
|
-
var nativeToFixed = uncurryThis$
|
|
4528
|
+
var repeat$1 = uncurryThis$d($repeat$1);
|
|
4529
|
+
var stringSlice$7 = uncurryThis$d(''.slice);
|
|
4530
|
+
var nativeToFixed = uncurryThis$d(1.0.toFixed);
|
|
4531
4531
|
|
|
4532
4532
|
var pow = function (x, n, acc) {
|
|
4533
4533
|
return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
|
|
@@ -4572,7 +4572,7 @@ var dataToString = function (data) {
|
|
|
4572
4572
|
while (--index >= 0) {
|
|
4573
4573
|
if (s !== '' || index === 0 || data[index] !== 0) {
|
|
4574
4574
|
var t = $String(data[index]);
|
|
4575
|
-
s = s === '' ? t : s + repeat('0', 7 - t.length) + t;
|
|
4575
|
+
s = s === '' ? t : s + repeat$1('0', 7 - t.length) + t;
|
|
4576
4576
|
}
|
|
4577
4577
|
} return s;
|
|
4578
4578
|
};
|
|
@@ -4589,7 +4589,7 @@ var FORCED = fails$7(function () {
|
|
|
4589
4589
|
|
|
4590
4590
|
// `Number.prototype.toFixed` method
|
|
4591
4591
|
// https://tc39.es/ecma262/#sec-number.prototype.tofixed
|
|
4592
|
-
$$
|
|
4592
|
+
$$c({ target: 'Number', proto: true, forced: FORCED }, {
|
|
4593
4593
|
toFixed: function toFixed(fractionDigits) {
|
|
4594
4594
|
var number = thisNumberValue(this);
|
|
4595
4595
|
var fractDigits = toIntegerOrInfinity$3(fractionDigits);
|
|
@@ -4632,14 +4632,14 @@ $$b({ target: 'Number', proto: true, forced: FORCED }, {
|
|
|
4632
4632
|
} else {
|
|
4633
4633
|
multiply(data, 0, z);
|
|
4634
4634
|
multiply(data, 1 << -e, 0);
|
|
4635
|
-
result = dataToString(data) + repeat('0', fractDigits);
|
|
4635
|
+
result = dataToString(data) + repeat$1('0', fractDigits);
|
|
4636
4636
|
}
|
|
4637
4637
|
}
|
|
4638
4638
|
if (fractDigits > 0) {
|
|
4639
4639
|
k = result.length;
|
|
4640
4640
|
result = sign + (k <= fractDigits
|
|
4641
|
-
? '0.' + repeat('0', fractDigits - k) + result
|
|
4642
|
-
: stringSlice$
|
|
4641
|
+
? '0.' + repeat$1('0', fractDigits - k) + result
|
|
4642
|
+
: stringSlice$7(result, 0, k - fractDigits) + '.' + stringSlice$7(result, k - fractDigits));
|
|
4643
4643
|
} else {
|
|
4644
4644
|
result = sign + result;
|
|
4645
4645
|
} return result;
|
|
@@ -5776,18 +5776,18 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
5776
5776
|
if (SHAM) createNonEnumerableProperty$1(RegExpPrototype$1[SYMBOL], 'sham', true);
|
|
5777
5777
|
};
|
|
5778
5778
|
|
|
5779
|
-
var uncurryThis$
|
|
5779
|
+
var uncurryThis$c = functionUncurryThis;
|
|
5780
5780
|
var toIntegerOrInfinity$2 = toIntegerOrInfinity$7;
|
|
5781
|
-
var toString$
|
|
5782
|
-
var requireObjectCoercible$
|
|
5781
|
+
var toString$8 = toString$d;
|
|
5782
|
+
var requireObjectCoercible$7 = requireObjectCoercible$b;
|
|
5783
5783
|
|
|
5784
|
-
var charAt$3 = uncurryThis$
|
|
5785
|
-
var charCodeAt = uncurryThis$
|
|
5786
|
-
var stringSlice$
|
|
5784
|
+
var charAt$3 = uncurryThis$c(''.charAt);
|
|
5785
|
+
var charCodeAt = uncurryThis$c(''.charCodeAt);
|
|
5786
|
+
var stringSlice$6 = uncurryThis$c(''.slice);
|
|
5787
5787
|
|
|
5788
|
-
var createMethod$
|
|
5788
|
+
var createMethod$2 = function (CONVERT_TO_STRING) {
|
|
5789
5789
|
return function ($this, pos) {
|
|
5790
|
-
var S = toString$
|
|
5790
|
+
var S = toString$8(requireObjectCoercible$7($this));
|
|
5791
5791
|
var position = toIntegerOrInfinity$2(pos);
|
|
5792
5792
|
var size = S.length;
|
|
5793
5793
|
var first, second;
|
|
@@ -5799,7 +5799,7 @@ var createMethod$1 = function (CONVERT_TO_STRING) {
|
|
|
5799
5799
|
? charAt$3(S, position)
|
|
5800
5800
|
: first
|
|
5801
5801
|
: CONVERT_TO_STRING
|
|
5802
|
-
? stringSlice$
|
|
5802
|
+
? stringSlice$6(S, position, position + 2)
|
|
5803
5803
|
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
5804
5804
|
};
|
|
5805
5805
|
};
|
|
@@ -5807,10 +5807,10 @@ var createMethod$1 = function (CONVERT_TO_STRING) {
|
|
|
5807
5807
|
var stringMultibyte = {
|
|
5808
5808
|
// `String.prototype.codePointAt` method
|
|
5809
5809
|
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
5810
|
-
codeAt: createMethod$
|
|
5810
|
+
codeAt: createMethod$2(false),
|
|
5811
5811
|
// `String.prototype.at` method
|
|
5812
5812
|
// https://github.com/mathiasbynens/String.prototype.at
|
|
5813
|
-
charAt: createMethod$
|
|
5813
|
+
charAt: createMethod$2(true)
|
|
5814
5814
|
};
|
|
5815
5815
|
|
|
5816
5816
|
var charAt$2 = stringMultibyte.charAt;
|
|
@@ -5846,9 +5846,9 @@ var call$9 = functionCall;
|
|
|
5846
5846
|
var fixRegExpWellKnownSymbolLogic$2 = fixRegexpWellKnownSymbolLogic;
|
|
5847
5847
|
var anObject$7 = anObject$g;
|
|
5848
5848
|
var isNullOrUndefined$4 = isNullOrUndefined$7;
|
|
5849
|
-
var toLength$
|
|
5850
|
-
var toString$
|
|
5851
|
-
var requireObjectCoercible$
|
|
5849
|
+
var toLength$5 = toLength$7;
|
|
5850
|
+
var toString$7 = toString$d;
|
|
5851
|
+
var requireObjectCoercible$6 = requireObjectCoercible$b;
|
|
5852
5852
|
var getMethod$4 = getMethod$6;
|
|
5853
5853
|
var advanceStringIndex$2 = advanceStringIndex$3;
|
|
5854
5854
|
var regExpExec$2 = regexpExecAbstract;
|
|
@@ -5859,15 +5859,15 @@ fixRegExpWellKnownSymbolLogic$2('match', function (MATCH, nativeMatch, maybeCall
|
|
|
5859
5859
|
// `String.prototype.match` method
|
|
5860
5860
|
// https://tc39.es/ecma262/#sec-string.prototype.match
|
|
5861
5861
|
function match(regexp) {
|
|
5862
|
-
var O = requireObjectCoercible$
|
|
5862
|
+
var O = requireObjectCoercible$6(this);
|
|
5863
5863
|
var matcher = isNullOrUndefined$4(regexp) ? undefined : getMethod$4(regexp, MATCH);
|
|
5864
|
-
return matcher ? call$9(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$
|
|
5864
|
+
return matcher ? call$9(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString$7(O));
|
|
5865
5865
|
},
|
|
5866
5866
|
// `RegExp.prototype[@@match]` method
|
|
5867
5867
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@match
|
|
5868
5868
|
function (string) {
|
|
5869
5869
|
var rx = anObject$7(this);
|
|
5870
|
-
var S = toString$
|
|
5870
|
+
var S = toString$7(string);
|
|
5871
5871
|
var res = maybeCallNative(nativeMatch, rx, S);
|
|
5872
5872
|
|
|
5873
5873
|
if (res.done) return res.value;
|
|
@@ -5880,9 +5880,9 @@ fixRegExpWellKnownSymbolLogic$2('match', function (MATCH, nativeMatch, maybeCall
|
|
|
5880
5880
|
var n = 0;
|
|
5881
5881
|
var result;
|
|
5882
5882
|
while ((result = regExpExec$2(rx, S)) !== null) {
|
|
5883
|
-
var matchStr = toString$
|
|
5883
|
+
var matchStr = toString$7(result[0]);
|
|
5884
5884
|
A[n] = matchStr;
|
|
5885
|
-
if (matchStr === '') rx.lastIndex = advanceStringIndex$2(S, toLength$
|
|
5885
|
+
if (matchStr === '') rx.lastIndex = advanceStringIndex$2(S, toLength$5(rx.lastIndex), fullUnicode);
|
|
5886
5886
|
n++;
|
|
5887
5887
|
}
|
|
5888
5888
|
return n === 0 ? null : A;
|
|
@@ -6154,19 +6154,19 @@ function findIndexOfFirstDuplicateValue(values) {
|
|
|
6154
6154
|
var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
6155
6155
|
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
6156
6156
|
|
|
6157
|
-
var uncurryThis$
|
|
6158
|
-
var requireObjectCoercible$
|
|
6159
|
-
var toString$
|
|
6157
|
+
var uncurryThis$b = functionUncurryThis;
|
|
6158
|
+
var requireObjectCoercible$5 = requireObjectCoercible$b;
|
|
6159
|
+
var toString$6 = toString$d;
|
|
6160
6160
|
var whitespaces$1 = whitespaces$2;
|
|
6161
6161
|
|
|
6162
|
-
var replace$2 = uncurryThis$
|
|
6162
|
+
var replace$2 = uncurryThis$b(''.replace);
|
|
6163
6163
|
var ltrim = RegExp('^[' + whitespaces$1 + ']+');
|
|
6164
6164
|
var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
|
|
6165
6165
|
|
|
6166
6166
|
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
6167
|
-
var createMethod = function (TYPE) {
|
|
6167
|
+
var createMethod$1 = function (TYPE) {
|
|
6168
6168
|
return function ($this) {
|
|
6169
|
-
var string = toString$
|
|
6169
|
+
var string = toString$6(requireObjectCoercible$5($this));
|
|
6170
6170
|
if (TYPE & 1) string = replace$2(string, ltrim, '');
|
|
6171
6171
|
if (TYPE & 2) string = replace$2(string, rtrim, '$1');
|
|
6172
6172
|
return string;
|
|
@@ -6176,13 +6176,13 @@ var createMethod = function (TYPE) {
|
|
|
6176
6176
|
var stringTrim = {
|
|
6177
6177
|
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
6178
6178
|
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
6179
|
-
start: createMethod(1),
|
|
6179
|
+
start: createMethod$1(1),
|
|
6180
6180
|
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
6181
6181
|
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
6182
|
-
end: createMethod(2),
|
|
6182
|
+
end: createMethod$1(2),
|
|
6183
6183
|
// `String.prototype.trim` method
|
|
6184
6184
|
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
6185
|
-
trim: createMethod(3)
|
|
6185
|
+
trim: createMethod$1(3)
|
|
6186
6186
|
};
|
|
6187
6187
|
|
|
6188
6188
|
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
@@ -6201,19 +6201,19 @@ var stringTrimForced = function (METHOD_NAME) {
|
|
|
6201
6201
|
});
|
|
6202
6202
|
};
|
|
6203
6203
|
|
|
6204
|
-
var $$
|
|
6204
|
+
var $$b = _export;
|
|
6205
6205
|
var $trim = stringTrim.trim;
|
|
6206
6206
|
var forcedStringTrimMethod = stringTrimForced;
|
|
6207
6207
|
|
|
6208
6208
|
// `String.prototype.trim` method
|
|
6209
6209
|
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
6210
|
-
$$
|
|
6210
|
+
$$b({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
|
|
6211
6211
|
trim: function trim() {
|
|
6212
6212
|
return $trim(this);
|
|
6213
6213
|
}
|
|
6214
6214
|
});
|
|
6215
6215
|
|
|
6216
|
-
var uncurryThis$
|
|
6216
|
+
var uncurryThis$a = functionUncurryThis;
|
|
6217
6217
|
var fails$4 = fails$p;
|
|
6218
6218
|
var isCallable$6 = isCallable$n;
|
|
6219
6219
|
var classof$3 = classof$6;
|
|
@@ -6223,7 +6223,7 @@ var inspectSource$1 = inspectSource$3;
|
|
|
6223
6223
|
var noop = function () { /* empty */ };
|
|
6224
6224
|
var construct = getBuiltIn$3('Reflect', 'construct');
|
|
6225
6225
|
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
6226
|
-
var exec$1 = uncurryThis$
|
|
6226
|
+
var exec$1 = uncurryThis$a(constructorRegExp.exec);
|
|
6227
6227
|
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
6228
6228
|
|
|
6229
6229
|
var isConstructorModern = function isConstructor(argument) {
|
|
@@ -6292,15 +6292,15 @@ var speciesConstructor$2 = function (O, defaultConstructor) {
|
|
|
6292
6292
|
};
|
|
6293
6293
|
|
|
6294
6294
|
var call$8 = functionCall;
|
|
6295
|
-
var uncurryThis$
|
|
6295
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
6296
6296
|
var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
|
|
6297
6297
|
var anObject$5 = anObject$g;
|
|
6298
6298
|
var isNullOrUndefined$2 = isNullOrUndefined$7;
|
|
6299
|
-
var requireObjectCoercible$
|
|
6299
|
+
var requireObjectCoercible$4 = requireObjectCoercible$b;
|
|
6300
6300
|
var speciesConstructor$1 = speciesConstructor$2;
|
|
6301
6301
|
var advanceStringIndex$1 = advanceStringIndex$3;
|
|
6302
|
-
var toLength$
|
|
6303
|
-
var toString$
|
|
6302
|
+
var toLength$4 = toLength$7;
|
|
6303
|
+
var toString$5 = toString$d;
|
|
6304
6304
|
var getMethod$3 = getMethod$6;
|
|
6305
6305
|
var regExpExec$1 = regexpExecAbstract;
|
|
6306
6306
|
var stickyHelpers$1 = regexpStickyHelpers;
|
|
@@ -6309,8 +6309,8 @@ var fails$3 = fails$p;
|
|
|
6309
6309
|
var UNSUPPORTED_Y$1 = stickyHelpers$1.UNSUPPORTED_Y;
|
|
6310
6310
|
var MAX_UINT32 = 0xFFFFFFFF;
|
|
6311
6311
|
var min$3 = Math.min;
|
|
6312
|
-
var push$1 = uncurryThis$
|
|
6313
|
-
var stringSlice$
|
|
6312
|
+
var push$1 = uncurryThis$9([].push);
|
|
6313
|
+
var stringSlice$5 = uncurryThis$9(''.slice);
|
|
6314
6314
|
|
|
6315
6315
|
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
6316
6316
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
@@ -6342,11 +6342,11 @@ fixRegExpWellKnownSymbolLogic$1('split', function (SPLIT, nativeSplit, maybeCall
|
|
|
6342
6342
|
// `String.prototype.split` method
|
|
6343
6343
|
// https://tc39.es/ecma262/#sec-string.prototype.split
|
|
6344
6344
|
function split(separator, limit) {
|
|
6345
|
-
var O = requireObjectCoercible$
|
|
6345
|
+
var O = requireObjectCoercible$4(this);
|
|
6346
6346
|
var splitter = isNullOrUndefined$2(separator) ? undefined : getMethod$3(separator, SPLIT);
|
|
6347
6347
|
return splitter
|
|
6348
6348
|
? call$8(splitter, separator, O, limit)
|
|
6349
|
-
: call$8(internalSplit, toString$
|
|
6349
|
+
: call$8(internalSplit, toString$5(O), separator, limit);
|
|
6350
6350
|
},
|
|
6351
6351
|
// `RegExp.prototype[@@split]` method
|
|
6352
6352
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
|
@@ -6355,7 +6355,7 @@ fixRegExpWellKnownSymbolLogic$1('split', function (SPLIT, nativeSplit, maybeCall
|
|
|
6355
6355
|
// the 'y' flag.
|
|
6356
6356
|
function (string, limit) {
|
|
6357
6357
|
var rx = anObject$5(this);
|
|
6358
|
-
var S = toString$
|
|
6358
|
+
var S = toString$5(string);
|
|
6359
6359
|
|
|
6360
6360
|
if (!BUGGY) {
|
|
6361
6361
|
var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
|
|
@@ -6379,15 +6379,15 @@ fixRegExpWellKnownSymbolLogic$1('split', function (SPLIT, nativeSplit, maybeCall
|
|
|
6379
6379
|
var A = [];
|
|
6380
6380
|
while (q < S.length) {
|
|
6381
6381
|
splitter.lastIndex = UNSUPPORTED_Y$1 ? 0 : q;
|
|
6382
|
-
var z = regExpExec$1(splitter, UNSUPPORTED_Y$1 ? stringSlice$
|
|
6382
|
+
var z = regExpExec$1(splitter, UNSUPPORTED_Y$1 ? stringSlice$5(S, q) : S);
|
|
6383
6383
|
var e;
|
|
6384
6384
|
if (
|
|
6385
6385
|
z === null ||
|
|
6386
|
-
(e = min$3(toLength$
|
|
6386
|
+
(e = min$3(toLength$4(splitter.lastIndex + (UNSUPPORTED_Y$1 ? q : 0)), S.length)) === p
|
|
6387
6387
|
) {
|
|
6388
6388
|
q = advanceStringIndex$1(S, q, unicodeMatching);
|
|
6389
6389
|
} else {
|
|
6390
|
-
push$1(A, stringSlice$
|
|
6390
|
+
push$1(A, stringSlice$5(S, p, q));
|
|
6391
6391
|
if (A.length === lim) return A;
|
|
6392
6392
|
for (var i = 1; i <= z.length - 1; i++) {
|
|
6393
6393
|
push$1(A, z[i]);
|
|
@@ -6396,7 +6396,7 @@ fixRegExpWellKnownSymbolLogic$1('split', function (SPLIT, nativeSplit, maybeCall
|
|
|
6396
6396
|
q = p = e;
|
|
6397
6397
|
}
|
|
6398
6398
|
}
|
|
6399
|
-
push$1(A, stringSlice$
|
|
6399
|
+
push$1(A, stringSlice$5(S, p));
|
|
6400
6400
|
return A;
|
|
6401
6401
|
}
|
|
6402
6402
|
];
|
|
@@ -6511,13 +6511,13 @@ function mapIterable(values, fn) {
|
|
|
6511
6511
|
}
|
|
6512
6512
|
|
|
6513
6513
|
var classofRaw = classofRaw$2;
|
|
6514
|
-
var uncurryThis$
|
|
6514
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
6515
6515
|
|
|
6516
6516
|
var functionUncurryThisClause = function (fn) {
|
|
6517
6517
|
// Nashorn bug:
|
|
6518
6518
|
// https://github.com/zloirock/core-js/issues/1128
|
|
6519
6519
|
// https://github.com/zloirock/core-js/issues/1130
|
|
6520
|
-
if (classofRaw(fn) === 'Function') return uncurryThis$
|
|
6520
|
+
if (classofRaw(fn) === 'Function') return uncurryThis$8(fn);
|
|
6521
6521
|
};
|
|
6522
6522
|
|
|
6523
6523
|
var isObject$4 = isObject$c;
|
|
@@ -6559,16 +6559,16 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
|
6559
6559
|
} return false;
|
|
6560
6560
|
};
|
|
6561
6561
|
|
|
6562
|
-
var $$
|
|
6563
|
-
var uncurryThis$
|
|
6562
|
+
var $$a = _export;
|
|
6563
|
+
var uncurryThis$7 = functionUncurryThisClause;
|
|
6564
6564
|
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
|
6565
|
-
var toLength$
|
|
6566
|
-
var toString$
|
|
6565
|
+
var toLength$3 = toLength$7;
|
|
6566
|
+
var toString$4 = toString$d;
|
|
6567
6567
|
var notARegExp$1 = notARegexp;
|
|
6568
|
-
var requireObjectCoercible$
|
|
6568
|
+
var requireObjectCoercible$3 = requireObjectCoercible$b;
|
|
6569
6569
|
var correctIsRegExpLogic$1 = correctIsRegexpLogic;
|
|
6570
6570
|
|
|
6571
|
-
var stringSlice$
|
|
6571
|
+
var stringSlice$4 = uncurryThis$7(''.slice);
|
|
6572
6572
|
var min$2 = Math.min;
|
|
6573
6573
|
|
|
6574
6574
|
var CORRECT_IS_REGEXP_LOGIC$1 = correctIsRegExpLogic$1('startsWith');
|
|
@@ -6580,26 +6580,26 @@ var MDN_POLYFILL_BUG$1 = !CORRECT_IS_REGEXP_LOGIC$1 && !!function () {
|
|
|
6580
6580
|
|
|
6581
6581
|
// `String.prototype.startsWith` method
|
|
6582
6582
|
// https://tc39.es/ecma262/#sec-string.prototype.startswith
|
|
6583
|
-
$$
|
|
6583
|
+
$$a({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_REGEXP_LOGIC$1 }, {
|
|
6584
6584
|
startsWith: function startsWith(searchString /* , position = 0 */) {
|
|
6585
|
-
var that = toString$
|
|
6585
|
+
var that = toString$4(requireObjectCoercible$3(this));
|
|
6586
6586
|
notARegExp$1(searchString);
|
|
6587
|
-
var index = toLength$
|
|
6588
|
-
var search = toString$
|
|
6589
|
-
return stringSlice$
|
|
6587
|
+
var index = toLength$3(min$2(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
|
6588
|
+
var search = toString$4(searchString);
|
|
6589
|
+
return stringSlice$4(that, index, index + search.length) === search;
|
|
6590
6590
|
}
|
|
6591
6591
|
});
|
|
6592
6592
|
|
|
6593
|
-
var $$
|
|
6594
|
-
var uncurryThis$
|
|
6593
|
+
var $$9 = _export;
|
|
6594
|
+
var uncurryThis$6 = functionUncurryThisClause;
|
|
6595
6595
|
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
6596
|
-
var toLength$
|
|
6597
|
-
var toString$
|
|
6596
|
+
var toLength$2 = toLength$7;
|
|
6597
|
+
var toString$3 = toString$d;
|
|
6598
6598
|
var notARegExp = notARegexp;
|
|
6599
|
-
var requireObjectCoercible$
|
|
6599
|
+
var requireObjectCoercible$2 = requireObjectCoercible$b;
|
|
6600
6600
|
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
6601
6601
|
|
|
6602
|
-
var slice = uncurryThis$
|
|
6602
|
+
var slice = uncurryThis$6(''.slice);
|
|
6603
6603
|
var min$1 = Math.min;
|
|
6604
6604
|
|
|
6605
6605
|
var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');
|
|
@@ -6611,18 +6611,71 @@ var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
|
|
|
6611
6611
|
|
|
6612
6612
|
// `String.prototype.endsWith` method
|
|
6613
6613
|
// https://tc39.es/ecma262/#sec-string.prototype.endswith
|
|
6614
|
-
$$
|
|
6614
|
+
$$9({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
|
|
6615
6615
|
endsWith: function endsWith(searchString /* , endPosition = @length */) {
|
|
6616
|
-
var that = toString$
|
|
6616
|
+
var that = toString$3(requireObjectCoercible$2(this));
|
|
6617
6617
|
notARegExp(searchString);
|
|
6618
6618
|
var endPosition = arguments.length > 1 ? arguments[1] : undefined;
|
|
6619
6619
|
var len = that.length;
|
|
6620
|
-
var end = endPosition === undefined ? len : min$1(toLength$
|
|
6621
|
-
var search = toString$
|
|
6620
|
+
var end = endPosition === undefined ? len : min$1(toLength$2(endPosition), len);
|
|
6621
|
+
var search = toString$3(searchString);
|
|
6622
6622
|
return slice(that, end - search.length, end) === search;
|
|
6623
6623
|
}
|
|
6624
6624
|
});
|
|
6625
6625
|
|
|
6626
|
+
// https://github.com/tc39/proposal-string-pad-start-end
|
|
6627
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
6628
|
+
var toLength$1 = toLength$7;
|
|
6629
|
+
var toString$2 = toString$d;
|
|
6630
|
+
var $repeat = stringRepeat;
|
|
6631
|
+
var requireObjectCoercible$1 = requireObjectCoercible$b;
|
|
6632
|
+
|
|
6633
|
+
var repeat = uncurryThis$5($repeat);
|
|
6634
|
+
var stringSlice$3 = uncurryThis$5(''.slice);
|
|
6635
|
+
var ceil = Math.ceil;
|
|
6636
|
+
|
|
6637
|
+
// `String.prototype.{ padStart, padEnd }` methods implementation
|
|
6638
|
+
var createMethod = function (IS_END) {
|
|
6639
|
+
return function ($this, maxLength, fillString) {
|
|
6640
|
+
var S = toString$2(requireObjectCoercible$1($this));
|
|
6641
|
+
var intMaxLength = toLength$1(maxLength);
|
|
6642
|
+
var stringLength = S.length;
|
|
6643
|
+
var fillStr = fillString === undefined ? ' ' : toString$2(fillString);
|
|
6644
|
+
var fillLen, stringFiller;
|
|
6645
|
+
if (intMaxLength <= stringLength || fillStr === '') return S;
|
|
6646
|
+
fillLen = intMaxLength - stringLength;
|
|
6647
|
+
stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));
|
|
6648
|
+
if (stringFiller.length > fillLen) stringFiller = stringSlice$3(stringFiller, 0, fillLen);
|
|
6649
|
+
return IS_END ? S + stringFiller : stringFiller + S;
|
|
6650
|
+
};
|
|
6651
|
+
};
|
|
6652
|
+
|
|
6653
|
+
var stringPad = {
|
|
6654
|
+
// `String.prototype.padStart` method
|
|
6655
|
+
// https://tc39.es/ecma262/#sec-string.prototype.padstart
|
|
6656
|
+
start: createMethod(false),
|
|
6657
|
+
// `String.prototype.padEnd` method
|
|
6658
|
+
// https://tc39.es/ecma262/#sec-string.prototype.padend
|
|
6659
|
+
end: createMethod(true)
|
|
6660
|
+
};
|
|
6661
|
+
|
|
6662
|
+
// https://github.com/zloirock/core-js/issues/280
|
|
6663
|
+
var userAgent$3 = engineUserAgent;
|
|
6664
|
+
|
|
6665
|
+
var stringPadWebkitBug = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent$3);
|
|
6666
|
+
|
|
6667
|
+
var $$8 = _export;
|
|
6668
|
+
var $padStart = stringPad.start;
|
|
6669
|
+
var WEBKIT_BUG = stringPadWebkitBug;
|
|
6670
|
+
|
|
6671
|
+
// `String.prototype.padStart` method
|
|
6672
|
+
// https://tc39.es/ecma262/#sec-string.prototype.padstart
|
|
6673
|
+
$$8({ target: 'String', proto: true, forced: WEBKIT_BUG }, {
|
|
6674
|
+
padStart: function padStart(maxLength /* , fillString = ' ' */) {
|
|
6675
|
+
return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);
|
|
6676
|
+
}
|
|
6677
|
+
});
|
|
6678
|
+
|
|
6626
6679
|
function stringTrimFunction(input) {
|
|
6627
6680
|
return input.trim();
|
|
6628
6681
|
}
|
|
@@ -6691,6 +6744,15 @@ function addSuffixFunction(suffix) {
|
|
|
6691
6744
|
return input.endsWith(suffix) ? input : input + suffix;
|
|
6692
6745
|
};
|
|
6693
6746
|
}
|
|
6747
|
+
/**
|
|
6748
|
+
*
|
|
6749
|
+
* @param minLength
|
|
6750
|
+
* @param padCharacter
|
|
6751
|
+
* @returns
|
|
6752
|
+
*/
|
|
6753
|
+
function padStartFunction(minLength, padCharacter) {
|
|
6754
|
+
return input => input.padStart(minLength, padCharacter);
|
|
6755
|
+
}
|
|
6694
6756
|
|
|
6695
6757
|
function hasDifferentStringsNoCase(a, b) {
|
|
6696
6758
|
return hasDifferentValues(a.map(caseInsensitiveString), b.map(caseInsensitiveString));
|
|
@@ -7706,7 +7768,7 @@ var create = objectCreate;
|
|
|
7706
7768
|
var getOwnPropertyNames = objectGetOwnPropertyNames.f;
|
|
7707
7769
|
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
7708
7770
|
var isRegExp = isRegexp;
|
|
7709
|
-
var toString$1 = toString$
|
|
7771
|
+
var toString$1 = toString$d;
|
|
7710
7772
|
var getRegExpFlags = regexpGetFlags;
|
|
7711
7773
|
var stickyHelpers = regexpStickyHelpers;
|
|
7712
7774
|
var proxyAccessor = proxyAccessor$1;
|
|
@@ -7954,9 +8016,9 @@ var anObject$4 = anObject$g;
|
|
|
7954
8016
|
var isCallable$4 = isCallable$n;
|
|
7955
8017
|
var isNullOrUndefined$1 = isNullOrUndefined$7;
|
|
7956
8018
|
var toIntegerOrInfinity$1 = toIntegerOrInfinity$7;
|
|
7957
|
-
var toLength = toLength$
|
|
7958
|
-
var toString = toString$
|
|
7959
|
-
var requireObjectCoercible = requireObjectCoercible$
|
|
8019
|
+
var toLength = toLength$7;
|
|
8020
|
+
var toString = toString$d;
|
|
8021
|
+
var requireObjectCoercible = requireObjectCoercible$b;
|
|
7960
8022
|
var advanceStringIndex = advanceStringIndex$3;
|
|
7961
8023
|
var getMethod$2 = getMethod$6;
|
|
7962
8024
|
var getSubstitution = getSubstitution$1;
|
|
@@ -8227,6 +8289,22 @@ const UTF_8_START_CHARACTER = '\u0000';
|
|
|
8227
8289
|
* https://firebase.google.com/docs/database/rest/retrieve-data#range-queries
|
|
8228
8290
|
*/
|
|
8229
8291
|
const UTF_PRIVATE_USAGE_AREA_START = '\uf8ff';
|
|
8292
|
+
/**
|
|
8293
|
+
* Takes in a string and returns a Record that has the index value mapped to the property of the character.
|
|
8294
|
+
*
|
|
8295
|
+
* The latest character index is used in collision cases.
|
|
8296
|
+
*
|
|
8297
|
+
* @param chars
|
|
8298
|
+
* @returns
|
|
8299
|
+
*/
|
|
8300
|
+
function stringCharactersToIndexRecord(chars) {
|
|
8301
|
+
const record = {};
|
|
8302
|
+
for (let i = 0; i < chars.length; i += 1) {
|
|
8303
|
+
const char = chars[i];
|
|
8304
|
+
record[char] = i;
|
|
8305
|
+
}
|
|
8306
|
+
return record;
|
|
8307
|
+
}
|
|
8230
8308
|
|
|
8231
8309
|
function replaceStringsFunction(config) {
|
|
8232
8310
|
const {
|
|
@@ -10490,149 +10568,595 @@ function mapKeysIntersectionObjectToArray(object, keys) {
|
|
|
10490
10568
|
return applyArray;
|
|
10491
10569
|
}
|
|
10492
10570
|
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
*
|
|
10496
|
-
* @param compressor
|
|
10497
|
-
*/
|
|
10498
|
-
function objectDeltaArrayCompressor(config) {
|
|
10499
|
-
const {
|
|
10500
|
-
equalityChecker: _equalityChecker
|
|
10501
|
-
} = config;
|
|
10502
|
-
const assignKnownValuesToCopy = assignValuesToPOJOFunction({
|
|
10503
|
-
keysFilter: Array.from(_equalityChecker._fields.keys()),
|
|
10504
|
-
valueFilter: exports.KeyValueTypleValueFilter.NULL
|
|
10505
|
-
});
|
|
10506
|
-
function compress(uncompressed) {
|
|
10507
|
-
// return an empty array if there is nothing to compress
|
|
10508
|
-
if (uncompressed.length === 0) {
|
|
10509
|
-
return [];
|
|
10510
|
-
}
|
|
10511
|
-
let current = assignKnownValuesToCopy({}, uncompressed[0]);
|
|
10512
|
-
const result = [current];
|
|
10513
|
-
uncompressed.slice(1).forEach(next => {
|
|
10514
|
-
const compressed = {};
|
|
10515
|
-
const fieldEqualityResult = _equalityChecker(current, next);
|
|
10516
|
-
// only append unequal fields
|
|
10517
|
-
fieldEqualityResult.unequalFields.forEach(field => {
|
|
10518
|
-
const nextValue = next[field];
|
|
10519
|
-
let saveValue;
|
|
10520
|
-
if (nextValue == null) {
|
|
10521
|
-
// if null or undefined, check previous value
|
|
10522
|
-
const previousValue = current[field];
|
|
10523
|
-
if (previousValue == null) {
|
|
10524
|
-
saveValue = undefined; // "no change"
|
|
10525
|
-
} else {
|
|
10526
|
-
saveValue = null; // "clear"
|
|
10527
|
-
}
|
|
10528
|
-
} else {
|
|
10529
|
-
saveValue = nextValue;
|
|
10530
|
-
}
|
|
10531
|
-
compressed[field] = saveValue;
|
|
10532
|
-
});
|
|
10533
|
-
result.push(compressed);
|
|
10534
|
-
current = next;
|
|
10535
|
-
});
|
|
10536
|
-
return result;
|
|
10537
|
-
}
|
|
10538
|
-
const allKeys = Array.from(_equalityChecker._fields.keys());
|
|
10539
|
-
function expand(compressed) {
|
|
10540
|
-
if (compressed.length === 0) {
|
|
10541
|
-
return [];
|
|
10542
|
-
}
|
|
10543
|
-
let current = assignKnownValuesToCopy({}, compressed[0]); // first one is never compressed.
|
|
10544
|
-
const result = [current];
|
|
10545
|
-
compressed.slice(1).forEach(next => {
|
|
10546
|
-
const uncompressed = {};
|
|
10547
|
-
allKeys.forEach(key => {
|
|
10548
|
-
let setValue;
|
|
10549
|
-
if (objectHasKey(next, key)) {
|
|
10550
|
-
const nextValue = next[key];
|
|
10551
|
-
if (nextValue === null) {
|
|
10552
|
-
// do nothing, since the value should be "undefined"
|
|
10553
|
-
setValue = undefined;
|
|
10554
|
-
} else {
|
|
10555
|
-
setValue = nextValue;
|
|
10556
|
-
}
|
|
10557
|
-
} else {
|
|
10558
|
-
setValue = current[key];
|
|
10559
|
-
}
|
|
10560
|
-
uncompressed[key] = setValue;
|
|
10561
|
-
});
|
|
10562
|
-
result.push(uncompressed);
|
|
10563
|
-
current = uncompressed;
|
|
10564
|
-
});
|
|
10565
|
-
return result;
|
|
10566
|
-
}
|
|
10567
|
-
return {
|
|
10568
|
-
_equalityChecker,
|
|
10569
|
-
compress: compress,
|
|
10570
|
-
expand: expand
|
|
10571
|
-
};
|
|
10572
|
-
}
|
|
10571
|
+
var $TypeError$5 = TypeError;
|
|
10572
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
|
10573
10573
|
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
return flattenArray(objectMergeMatrix(a, b));
|
|
10579
|
-
}
|
|
10580
|
-
/**
|
|
10581
|
-
* Creates a matrix of results by merging the input. If either a or b is null/undefined, the result is returned as an array of the other value.
|
|
10582
|
-
*/
|
|
10583
|
-
function objectMergeMatrix(a, b) {
|
|
10584
|
-
if (a && b) {
|
|
10585
|
-
const aNorm = convertToArray(a);
|
|
10586
|
-
const bNorm = convertToArray(b);
|
|
10587
|
-
const results = aNorm.map(a => {
|
|
10588
|
-
return bNorm.map(b => Object.assign(Object.assign({}, a), b));
|
|
10589
|
-
});
|
|
10590
|
-
return results;
|
|
10591
|
-
} else if (a) {
|
|
10592
|
-
return [convertToArray(a)];
|
|
10593
|
-
} else if (b) {
|
|
10594
|
-
return [convertToArray(b)];
|
|
10595
|
-
} else {
|
|
10596
|
-
return [[]];
|
|
10597
|
-
}
|
|
10598
|
-
}
|
|
10574
|
+
var doesNotExceedSafeInteger$1 = function (it) {
|
|
10575
|
+
if (it > MAX_SAFE_INTEGER) throw $TypeError$5('Maximum allowed index exceeded');
|
|
10576
|
+
return it;
|
|
10577
|
+
};
|
|
10599
10578
|
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
* @param obj
|
|
10604
|
-
*/
|
|
10605
|
-
function objectIsEmpty(obj) {
|
|
10606
|
-
if (obj != null && typeof obj === 'object') {
|
|
10607
|
-
const keys = Object.keys(obj);
|
|
10608
|
-
if (keys.length > 0) {
|
|
10609
|
-
for (let i = 0; i < keys.length; i += 1) {
|
|
10610
|
-
const key = keys[i];
|
|
10611
|
-
const value = obj[key];
|
|
10612
|
-
const isEmpty = typeof value === 'object' ? objectIsEmpty(value) : !hasValueOrNotEmpty(value);
|
|
10613
|
-
if (!isEmpty) {
|
|
10614
|
-
return false;
|
|
10615
|
-
}
|
|
10616
|
-
}
|
|
10617
|
-
}
|
|
10618
|
-
}
|
|
10619
|
-
return true;
|
|
10620
|
-
}
|
|
10579
|
+
var uncurryThis = functionUncurryThisClause;
|
|
10580
|
+
var aCallable$5 = aCallable$a;
|
|
10581
|
+
var NATIVE_BIND = functionBindNative;
|
|
10621
10582
|
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
function
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10583
|
+
var bind$5 = uncurryThis(uncurryThis.bind);
|
|
10584
|
+
|
|
10585
|
+
// optional / simple context binding
|
|
10586
|
+
var functionBindContext = function (fn, that) {
|
|
10587
|
+
aCallable$5(fn);
|
|
10588
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$5(fn, that) : function (/* ...args */) {
|
|
10589
|
+
return fn.apply(that, arguments);
|
|
10590
|
+
};
|
|
10591
|
+
};
|
|
10592
|
+
|
|
10593
|
+
var isArray$1 = isArray$3;
|
|
10594
|
+
var lengthOfArrayLike$2 = lengthOfArrayLike$6;
|
|
10595
|
+
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
|
|
10596
|
+
var bind$4 = functionBindContext;
|
|
10597
|
+
|
|
10598
|
+
// `FlattenIntoArray` abstract operation
|
|
10599
|
+
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
10600
|
+
var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
10601
|
+
var targetIndex = start;
|
|
10602
|
+
var sourceIndex = 0;
|
|
10603
|
+
var mapFn = mapper ? bind$4(mapper, thisArg) : false;
|
|
10604
|
+
var element, elementLen;
|
|
10605
|
+
|
|
10606
|
+
while (sourceIndex < sourceLen) {
|
|
10607
|
+
if (sourceIndex in source) {
|
|
10608
|
+
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
10609
|
+
|
|
10610
|
+
if (depth > 0 && isArray$1(element)) {
|
|
10611
|
+
elementLen = lengthOfArrayLike$2(element);
|
|
10612
|
+
targetIndex = flattenIntoArray$1(target, original, element, elementLen, targetIndex, depth - 1) - 1;
|
|
10613
|
+
} else {
|
|
10614
|
+
doesNotExceedSafeInteger(targetIndex + 1);
|
|
10615
|
+
target[targetIndex] = element;
|
|
10616
|
+
}
|
|
10617
|
+
|
|
10618
|
+
targetIndex++;
|
|
10619
|
+
}
|
|
10620
|
+
sourceIndex++;
|
|
10621
|
+
}
|
|
10622
|
+
return targetIndex;
|
|
10623
|
+
};
|
|
10624
|
+
|
|
10625
|
+
var flattenIntoArray_1 = flattenIntoArray$1;
|
|
10626
|
+
|
|
10627
|
+
var isArray = isArray$3;
|
|
10628
|
+
var isConstructor = isConstructor$2;
|
|
10629
|
+
var isObject$2 = isObject$c;
|
|
10630
|
+
var wellKnownSymbol$4 = wellKnownSymbol$k;
|
|
10631
|
+
|
|
10632
|
+
var SPECIES$1 = wellKnownSymbol$4('species');
|
|
10633
|
+
var $Array = Array;
|
|
10634
|
+
|
|
10635
|
+
// a part of `ArraySpeciesCreate` abstract operation
|
|
10636
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
10637
|
+
var arraySpeciesConstructor$1 = function (originalArray) {
|
|
10638
|
+
var C;
|
|
10639
|
+
if (isArray(originalArray)) {
|
|
10640
|
+
C = originalArray.constructor;
|
|
10641
|
+
// cross-realm fallback
|
|
10642
|
+
if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
|
|
10643
|
+
else if (isObject$2(C)) {
|
|
10644
|
+
C = C[SPECIES$1];
|
|
10645
|
+
if (C === null) C = undefined;
|
|
10646
|
+
}
|
|
10647
|
+
} return C === undefined ? $Array : C;
|
|
10648
|
+
};
|
|
10649
|
+
|
|
10650
|
+
var arraySpeciesConstructor = arraySpeciesConstructor$1;
|
|
10651
|
+
|
|
10652
|
+
// `ArraySpeciesCreate` abstract operation
|
|
10653
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
10654
|
+
var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
10655
|
+
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
|
10656
|
+
};
|
|
10657
|
+
|
|
10658
|
+
var $$6 = _export;
|
|
10659
|
+
var flattenIntoArray = flattenIntoArray_1;
|
|
10660
|
+
var toObject = toObject$7;
|
|
10661
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$6;
|
|
10662
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$7;
|
|
10663
|
+
var arraySpeciesCreate = arraySpeciesCreate$1;
|
|
10664
|
+
|
|
10665
|
+
// `Array.prototype.flat` method
|
|
10666
|
+
// https://tc39.es/ecma262/#sec-array.prototype.flat
|
|
10667
|
+
$$6({ target: 'Array', proto: true }, {
|
|
10668
|
+
flat: function flat(/* depthArg = 1 */) {
|
|
10669
|
+
var depthArg = arguments.length ? arguments[0] : undefined;
|
|
10670
|
+
var O = toObject(this);
|
|
10671
|
+
var sourceLen = lengthOfArrayLike$1(O);
|
|
10672
|
+
var A = arraySpeciesCreate(O, 0);
|
|
10673
|
+
A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
|
|
10674
|
+
return A;
|
|
10675
|
+
}
|
|
10676
|
+
});
|
|
10677
|
+
|
|
10678
|
+
// this method was added to unscopables after implementation
|
|
10679
|
+
// in popular engines, so it's moved to a separate module
|
|
10680
|
+
var addToUnscopables = addToUnscopables$2;
|
|
10681
|
+
|
|
10682
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
10683
|
+
addToUnscopables('flat');
|
|
10684
|
+
|
|
10685
|
+
function performTaskLoop(config) {
|
|
10686
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10687
|
+
let result;
|
|
10688
|
+
const initValue = config.initValue;
|
|
10689
|
+
const startLoop = initValue == null || (yield config.checkContinue(initValue, -1));
|
|
10690
|
+
if (startLoop) {
|
|
10691
|
+
let i = 0;
|
|
10692
|
+
let prevValue = initValue;
|
|
10693
|
+
let check;
|
|
10694
|
+
do {
|
|
10695
|
+
prevValue = yield config.next(i, prevValue);
|
|
10696
|
+
i += 1;
|
|
10697
|
+
check = yield config.checkContinue(prevValue, i);
|
|
10698
|
+
} while (check);
|
|
10699
|
+
result = prevValue;
|
|
10700
|
+
} else {
|
|
10701
|
+
result = initValue;
|
|
10702
|
+
}
|
|
10703
|
+
return result;
|
|
10704
|
+
});
|
|
10705
|
+
}
|
|
10706
|
+
function performTaskCountLoop(config) {
|
|
10707
|
+
return performTaskLoop(Object.assign(Object.assign({}, config), {
|
|
10708
|
+
checkContinue: (_, i) => i < config.count
|
|
10709
|
+
}));
|
|
10710
|
+
}
|
|
10711
|
+
function performMakeLoop(config) {
|
|
10712
|
+
return performTaskCountLoop({
|
|
10713
|
+
count: config.count,
|
|
10714
|
+
initValue: [],
|
|
10715
|
+
next: (i, accumulator) => __awaiter(this, void 0, void 0, function* () {
|
|
10716
|
+
const result = yield config.make(i, accumulator);
|
|
10717
|
+
accumulator.push(result);
|
|
10718
|
+
return accumulator;
|
|
10719
|
+
})
|
|
10720
|
+
});
|
|
10721
|
+
}
|
|
10722
|
+
function performBatchLoop(config) {
|
|
10723
|
+
const {
|
|
10724
|
+
make
|
|
10725
|
+
} = config;
|
|
10726
|
+
const calc = batchCalc(config);
|
|
10727
|
+
const {
|
|
10728
|
+
batchCount
|
|
10729
|
+
} = calc;
|
|
10730
|
+
return performMakeLoop({
|
|
10731
|
+
count: batchCount,
|
|
10732
|
+
make: (i, made) => __awaiter(this, void 0, void 0, function* () {
|
|
10733
|
+
const itemsToMake = itemCountForBatchIndex(i, calc);
|
|
10734
|
+
const batch = yield make(itemsToMake, i, made);
|
|
10735
|
+
return batch;
|
|
10736
|
+
})
|
|
10737
|
+
});
|
|
10738
|
+
}
|
|
10739
|
+
|
|
10740
|
+
/**
|
|
10741
|
+
* Creates an IdBatchFactory
|
|
10742
|
+
*
|
|
10743
|
+
* @param config
|
|
10744
|
+
* @returns
|
|
10745
|
+
*/
|
|
10746
|
+
function idBatchFactory(config) {
|
|
10747
|
+
const {
|
|
10748
|
+
factory,
|
|
10749
|
+
verifier
|
|
10750
|
+
} = config;
|
|
10751
|
+
const {
|
|
10752
|
+
maxBatchSize: tagsToGeneratePerBatch,
|
|
10753
|
+
filterUnique = x => x,
|
|
10754
|
+
verify: verifyTags
|
|
10755
|
+
} = verifier;
|
|
10756
|
+
const maxUniquenessFailures = 20; // arbitrary failure point, but generally shouldn't occur with proper input.
|
|
10757
|
+
return totalTagIdentifiersToGenerate => __awaiter(this, void 0, void 0, function* () {
|
|
10758
|
+
const uniquenessAccumulator = []; // used for uniqueness checks
|
|
10759
|
+
function generateIdentifiersBatch(batchSize) {
|
|
10760
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10761
|
+
let ids = [];
|
|
10762
|
+
let uniquenessFailure = 0;
|
|
10763
|
+
while (ids.length < batchSize) {
|
|
10764
|
+
const countToGenerate = batchSize - ids.length;
|
|
10765
|
+
let newIds = filterUnique(factory(countToGenerate), uniquenessAccumulator);
|
|
10766
|
+
if (newIds.length === 0) {
|
|
10767
|
+
uniquenessFailure += 1;
|
|
10768
|
+
if (uniquenessFailure === maxUniquenessFailures) {
|
|
10769
|
+
throw new Error(`idBatchFactory failed generating unique values "${maxUniquenessFailures}" times. Factory may be insufficient for generating unique values.`);
|
|
10770
|
+
}
|
|
10771
|
+
continue;
|
|
10772
|
+
} else if (newIds.length > countToGenerate) {
|
|
10773
|
+
newIds = newIds.slice(0, countToGenerate); // ignore any extra values the generator may return.
|
|
10774
|
+
}
|
|
10775
|
+
// add to the uniqueness acumulator to prevent further usage
|
|
10776
|
+
mergeArraysIntoArray(uniquenessAccumulator, newIds);
|
|
10777
|
+
const verifiedIds = yield verifyTags(newIds);
|
|
10778
|
+
// concat identifiers
|
|
10779
|
+
ids = ids.concat(verifiedIds);
|
|
10780
|
+
// restart loop if there are still items to be generated.
|
|
10781
|
+
}
|
|
10782
|
+
|
|
10783
|
+
return ids;
|
|
10784
|
+
});
|
|
10785
|
+
}
|
|
10786
|
+
const tagBatches = yield performBatchLoop({
|
|
10787
|
+
totalItems: totalTagIdentifiersToGenerate,
|
|
10788
|
+
itemsPerBatch: tagsToGeneratePerBatch,
|
|
10789
|
+
make: batchSize => __awaiter(this, void 0, void 0, function* () {
|
|
10790
|
+
const result = yield generateIdentifiersBatch(batchSize);
|
|
10791
|
+
return result;
|
|
10792
|
+
})
|
|
10793
|
+
});
|
|
10794
|
+
return tagBatches.flat();
|
|
10795
|
+
});
|
|
10796
|
+
}
|
|
10797
|
+
|
|
10798
|
+
/**
|
|
10799
|
+
* Creates a Map of the PrimativeKeyDencoder values.
|
|
10800
|
+
*
|
|
10801
|
+
* If any repeat values are found, an error will be thrown.
|
|
10802
|
+
*
|
|
10803
|
+
* @param values
|
|
10804
|
+
*/
|
|
10805
|
+
function primativeKeyDencoderMap(values) {
|
|
10806
|
+
const map = new Map();
|
|
10807
|
+
let valuesArray;
|
|
10808
|
+
if (!Array.isArray(values)) {
|
|
10809
|
+
valuesArray = [];
|
|
10810
|
+
forEachKeyValue(values, {
|
|
10811
|
+
forEach: pair => {
|
|
10812
|
+
valuesArray.push(pair);
|
|
10813
|
+
},
|
|
10814
|
+
filter: exports.KeyValueTypleValueFilter.UNDEFINED
|
|
10815
|
+
});
|
|
10816
|
+
} else {
|
|
10817
|
+
valuesArray = values;
|
|
10818
|
+
}
|
|
10819
|
+
valuesArray.forEach(value => {
|
|
10820
|
+
const [d, e] = value;
|
|
10821
|
+
if (map.has(d) || map.has(e)) {
|
|
10822
|
+
throw new Error(`primativeKeyDencoderMap() encountered a repeat key/value: ${d}/${e}. Keys and values must be unique.`);
|
|
10823
|
+
}
|
|
10824
|
+
map.set(d, e);
|
|
10825
|
+
map.set(e, d);
|
|
10826
|
+
});
|
|
10827
|
+
map._tuples = valuesArray;
|
|
10828
|
+
return map;
|
|
10829
|
+
}
|
|
10830
|
+
const PRIMATIVE_KEY_DENCODER_VALUE = input => null;
|
|
10831
|
+
/**
|
|
10832
|
+
* Creates a new PrimiativeKeyDencoder.
|
|
10833
|
+
*/
|
|
10834
|
+
function primativeKeyDencoder(config) {
|
|
10835
|
+
const {
|
|
10836
|
+
defaultValue = PRIMATIVE_KEY_DENCODER_VALUE
|
|
10837
|
+
} = config;
|
|
10838
|
+
const map = primativeKeyDencoderMap(config.values);
|
|
10839
|
+
const fn = input => {
|
|
10840
|
+
if (Array.isArray(input)) {
|
|
10841
|
+
const values = filterMaybeValues(input.map(x => map.get(x)));
|
|
10842
|
+
return values;
|
|
10843
|
+
} else {
|
|
10844
|
+
let value = map.get(input);
|
|
10845
|
+
if (value == null) {
|
|
10846
|
+
value = defaultValue(input);
|
|
10847
|
+
if (value == null) {
|
|
10848
|
+
throw new Error(`Encountered unknown value ${input} in primativeKeyDencoder.`);
|
|
10849
|
+
}
|
|
10850
|
+
}
|
|
10851
|
+
return value;
|
|
10852
|
+
}
|
|
10853
|
+
};
|
|
10854
|
+
fn._map = map;
|
|
10855
|
+
return fn;
|
|
10856
|
+
}
|
|
10857
|
+
/**
|
|
10858
|
+
* Creates a new PrimativeKeyStringDencoderFunction.
|
|
10859
|
+
*
|
|
10860
|
+
* @param config
|
|
10861
|
+
* @returns
|
|
10862
|
+
*/
|
|
10863
|
+
function primativeKeyStringDencoder(config) {
|
|
10864
|
+
const dencoder = typeof config.dencoder === 'function' ? config.dencoder : primativeKeyDencoder(config.dencoder);
|
|
10865
|
+
const {
|
|
10866
|
+
splitter
|
|
10867
|
+
} = config;
|
|
10868
|
+
const {
|
|
10869
|
+
_map: dencoderMap
|
|
10870
|
+
} = dencoder;
|
|
10871
|
+
if (splitter) {
|
|
10872
|
+
dencoderMap._tuples.forEach(x => {
|
|
10873
|
+
if (x[0].toString().indexOf(splitter) !== -1) {
|
|
10874
|
+
throw new Error(`primativeKeyStringDencoder() encountered a value (${x[0]}) that contains the splitter (${splitter}).`);
|
|
10875
|
+
}
|
|
10876
|
+
});
|
|
10877
|
+
} else {
|
|
10878
|
+
// Assert all encoded values are 1 character long max.
|
|
10879
|
+
dencoderMap._tuples.forEach(x => {
|
|
10880
|
+
if (x[0].toString().length !== 1) {
|
|
10881
|
+
throw new Error(`primativeKeyStringDencoder() without a splitter defined cannot use encoded values of a length greater than 1. Encountered encoded "${x[0]}".`);
|
|
10882
|
+
}
|
|
10883
|
+
});
|
|
10884
|
+
}
|
|
10885
|
+
const joiner = splitter || '';
|
|
10886
|
+
const splitEncodedValues = splitter ? encodedValues => encodedValues.split(splitter) : encodedValues => Array.from(encodedValues);
|
|
10887
|
+
return input => {
|
|
10888
|
+
if (typeof input === 'string') {
|
|
10889
|
+
const split = splitEncodedValues(input);
|
|
10890
|
+
return dencoder(split);
|
|
10891
|
+
} else {
|
|
10892
|
+
const encoded = dencoder(input);
|
|
10893
|
+
return encoded.join(joiner);
|
|
10894
|
+
}
|
|
10895
|
+
};
|
|
10896
|
+
}
|
|
10897
|
+
/**
|
|
10898
|
+
* Default 64 NumberStringDencoderDigits value.
|
|
10899
|
+
*/
|
|
10900
|
+
const NUMBER_STRING_DENCODER_64_DIGITS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_';
|
|
10901
|
+
/**
|
|
10902
|
+
* The default negative prefix for negative numbers.
|
|
10903
|
+
*/
|
|
10904
|
+
const NUMBER_STRING_DENCODER_64_DEFAULT_NEGATIVE_PREFIX = '!';
|
|
10905
|
+
/**
|
|
10906
|
+
* Creates an integer-type NumberStringDencoder.
|
|
10907
|
+
*
|
|
10908
|
+
* If the config does not include a negative prefix, any negative number will be treated like a positive number.
|
|
10909
|
+
*
|
|
10910
|
+
* @param config
|
|
10911
|
+
* @returns
|
|
10912
|
+
*/
|
|
10913
|
+
function numberStringDencoder(config) {
|
|
10914
|
+
const {
|
|
10915
|
+
negativePrefix,
|
|
10916
|
+
digits
|
|
10917
|
+
} = config;
|
|
10918
|
+
const type = negativePrefix ? 'integer' : 'positive_integer';
|
|
10919
|
+
const log2OfDigits = Math.min(6, Math.floor(Math.log2(digits.length))); // essentially the number of bits. Floor to round. Max of 6=64bits
|
|
10920
|
+
const bitDepth = Math.pow(2, log2OfDigits);
|
|
10921
|
+
const bitMask = bitDepth - 1;
|
|
10922
|
+
const digitsLookup = stringCharactersToIndexRecord(digits);
|
|
10923
|
+
function encodeNumber(number) {
|
|
10924
|
+
let result = '';
|
|
10925
|
+
const isNegativeNumber = number < 0;
|
|
10926
|
+
if (isNegativeNumber) {
|
|
10927
|
+
number = -number;
|
|
10928
|
+
}
|
|
10929
|
+
do {
|
|
10930
|
+
const index = number & bitMask;
|
|
10931
|
+
result = digits[index] + result; // Little-endian
|
|
10932
|
+
number >>>= log2OfDigits;
|
|
10933
|
+
} while (number !== 0);
|
|
10934
|
+
if (isNegativeNumber && negativePrefix) {
|
|
10935
|
+
result = negativePrefix + result;
|
|
10936
|
+
}
|
|
10937
|
+
return result;
|
|
10938
|
+
}
|
|
10939
|
+
function decodeNumber(encodedNumber) {
|
|
10940
|
+
let isNegativeNumber = false;
|
|
10941
|
+
if (encodedNumber[0] === negativePrefix) {
|
|
10942
|
+
isNegativeNumber = true;
|
|
10943
|
+
}
|
|
10944
|
+
const startAtIndex = isNegativeNumber ? 1 : 0;
|
|
10945
|
+
let result = 0;
|
|
10946
|
+
for (let i = startAtIndex; i < encodedNumber.length; i += 1) {
|
|
10947
|
+
result = (result << log2OfDigits) + digitsLookup[encodedNumber[i]];
|
|
10948
|
+
}
|
|
10949
|
+
if (isNegativeNumber) {
|
|
10950
|
+
result = -result;
|
|
10951
|
+
}
|
|
10952
|
+
return result;
|
|
10953
|
+
}
|
|
10954
|
+
return {
|
|
10955
|
+
type,
|
|
10956
|
+
digits,
|
|
10957
|
+
bitDepth,
|
|
10958
|
+
negativePrefix,
|
|
10959
|
+
encodeNumber,
|
|
10960
|
+
decodeNumber
|
|
10961
|
+
};
|
|
10962
|
+
}
|
|
10963
|
+
const NUMBER_STRING_DENCODER_64 = numberStringDencoder({
|
|
10964
|
+
negativePrefix: NUMBER_STRING_DENCODER_64_DEFAULT_NEGATIVE_PREFIX,
|
|
10965
|
+
digits: NUMBER_STRING_DENCODER_64_DIGITS
|
|
10966
|
+
});
|
|
10967
|
+
function numberStringDencoderFunction(dencoder) {
|
|
10968
|
+
const fn = input => {
|
|
10969
|
+
const result = typeof input === 'number' ? dencoder.encodeNumber(input) : dencoder.decodeNumber(input);
|
|
10970
|
+
return result;
|
|
10971
|
+
};
|
|
10972
|
+
return fn;
|
|
10973
|
+
}
|
|
10974
|
+
function numberStringDencoderEncodedStringValueFunction(dencoder) {
|
|
10975
|
+
return input => {
|
|
10976
|
+
return typeof input === 'number' ? dencoder.encodeNumber(input) : input;
|
|
10977
|
+
};
|
|
10978
|
+
}
|
|
10979
|
+
function numberStringDencoderDecodedNumberValueFunction(dencoder) {
|
|
10980
|
+
return input => {
|
|
10981
|
+
return typeof input === 'number' ? input : dencoder.decodeNumber(input);
|
|
10982
|
+
};
|
|
10983
|
+
}
|
|
10984
|
+
// TODO: can add a function that can encode/decode fractions by splitting at the decimal point and encoding twice.
|
|
10985
|
+
|
|
10986
|
+
/**
|
|
10987
|
+
* Creates a ModelIdFactory that generates sequential incrementing encoded NumberStringDencoderString values using the input configuration.
|
|
10988
|
+
*/
|
|
10989
|
+
function sequentialIncrementingNumberStringModelIdFactory(config = {}) {
|
|
10990
|
+
const {
|
|
10991
|
+
transform: inputTranformFunction,
|
|
10992
|
+
dencoder: inputDencoder,
|
|
10993
|
+
currentIndex,
|
|
10994
|
+
startAt: inputStartAt,
|
|
10995
|
+
increaseBy: inputIncreaseBy
|
|
10996
|
+
} = config;
|
|
10997
|
+
if (inputIncreaseBy === 0) {
|
|
10998
|
+
throw new Error('Cannot use 0 for increaseBy.');
|
|
10999
|
+
}
|
|
11000
|
+
const increaseBy = inputIncreaseBy !== null && inputIncreaseBy !== void 0 ? inputIncreaseBy : 1;
|
|
11001
|
+
const dencoder = inputDencoder !== null && inputDencoder !== void 0 ? inputDencoder : NUMBER_STRING_DENCODER_64;
|
|
11002
|
+
const dencoderNumberValue = numberStringDencoderDecodedNumberValueFunction(dencoder);
|
|
11003
|
+
const startAtFromCurrentIndex = currentIndex != null ? dencoderNumberValue(currentIndex) + increaseBy : undefined;
|
|
11004
|
+
const startAt = inputStartAt != null ? dencoderNumberValue(inputStartAt) : startAtFromCurrentIndex !== null && startAtFromCurrentIndex !== void 0 ? startAtFromCurrentIndex : 0;
|
|
11005
|
+
const transform = inputTranformFunction !== null && inputTranformFunction !== void 0 ? inputTranformFunction : mapIdentityFunction();
|
|
11006
|
+
const numberFactory = incrementingNumberFactory({
|
|
11007
|
+
startAt,
|
|
11008
|
+
increaseBy
|
|
11009
|
+
});
|
|
11010
|
+
return () => {
|
|
11011
|
+
const nextIndex = numberFactory();
|
|
11012
|
+
const next = dencoder.encodeNumber(nextIndex);
|
|
11013
|
+
return transform(next, nextIndex);
|
|
11014
|
+
};
|
|
11015
|
+
}
|
|
11016
|
+
|
|
11017
|
+
/**
|
|
11018
|
+
* Creates an object delta array compressor.
|
|
11019
|
+
*
|
|
11020
|
+
* @param compressor
|
|
11021
|
+
*/
|
|
11022
|
+
function objectDeltaArrayCompressor(config) {
|
|
11023
|
+
const {
|
|
11024
|
+
equalityChecker: _equalityChecker
|
|
11025
|
+
} = config;
|
|
11026
|
+
const assignKnownValuesToCopy = assignValuesToPOJOFunction({
|
|
11027
|
+
keysFilter: Array.from(_equalityChecker._fields.keys()),
|
|
11028
|
+
valueFilter: exports.KeyValueTypleValueFilter.NULL
|
|
11029
|
+
});
|
|
11030
|
+
function compress(uncompressed) {
|
|
11031
|
+
// return an empty array if there is nothing to compress
|
|
11032
|
+
if (uncompressed.length === 0) {
|
|
11033
|
+
return [];
|
|
11034
|
+
}
|
|
11035
|
+
let current = assignKnownValuesToCopy({}, uncompressed[0]);
|
|
11036
|
+
const result = [current];
|
|
11037
|
+
uncompressed.slice(1).forEach(next => {
|
|
11038
|
+
const compressed = {};
|
|
11039
|
+
const fieldEqualityResult = _equalityChecker(current, next);
|
|
11040
|
+
// only append unequal fields
|
|
11041
|
+
fieldEqualityResult.unequalFields.forEach(field => {
|
|
11042
|
+
const nextValue = next[field];
|
|
11043
|
+
let saveValue;
|
|
11044
|
+
if (nextValue == null) {
|
|
11045
|
+
// if null or undefined, check previous value
|
|
11046
|
+
const previousValue = current[field];
|
|
11047
|
+
if (previousValue == null) {
|
|
11048
|
+
saveValue = undefined; // "no change"
|
|
11049
|
+
} else {
|
|
11050
|
+
saveValue = null; // "clear"
|
|
11051
|
+
}
|
|
11052
|
+
} else {
|
|
11053
|
+
saveValue = nextValue;
|
|
11054
|
+
}
|
|
11055
|
+
compressed[field] = saveValue;
|
|
11056
|
+
});
|
|
11057
|
+
result.push(compressed);
|
|
11058
|
+
current = next;
|
|
11059
|
+
});
|
|
11060
|
+
return result;
|
|
11061
|
+
}
|
|
11062
|
+
const allKeys = Array.from(_equalityChecker._fields.keys());
|
|
11063
|
+
function expand(compressed) {
|
|
11064
|
+
if (compressed.length === 0) {
|
|
11065
|
+
return [];
|
|
11066
|
+
}
|
|
11067
|
+
let current = assignKnownValuesToCopy({}, compressed[0]); // first one is never compressed.
|
|
11068
|
+
const result = [current];
|
|
11069
|
+
compressed.slice(1).forEach(next => {
|
|
11070
|
+
const uncompressed = {};
|
|
11071
|
+
allKeys.forEach(key => {
|
|
11072
|
+
let setValue;
|
|
11073
|
+
if (objectHasKey(next, key)) {
|
|
11074
|
+
const nextValue = next[key];
|
|
11075
|
+
if (nextValue === null) {
|
|
11076
|
+
// do nothing, since the value should be "undefined"
|
|
11077
|
+
setValue = undefined;
|
|
11078
|
+
} else {
|
|
11079
|
+
setValue = nextValue;
|
|
11080
|
+
}
|
|
11081
|
+
} else {
|
|
11082
|
+
setValue = current[key];
|
|
11083
|
+
}
|
|
11084
|
+
uncompressed[key] = setValue;
|
|
11085
|
+
});
|
|
11086
|
+
result.push(uncompressed);
|
|
11087
|
+
current = uncompressed;
|
|
11088
|
+
});
|
|
11089
|
+
return result;
|
|
11090
|
+
}
|
|
11091
|
+
return {
|
|
11092
|
+
_equalityChecker,
|
|
11093
|
+
compress: compress,
|
|
11094
|
+
expand: expand
|
|
11095
|
+
};
|
|
11096
|
+
}
|
|
11097
|
+
|
|
11098
|
+
/**
|
|
11099
|
+
* Convenience function for objectMergeMatrix that returns a flat array.
|
|
11100
|
+
*/
|
|
11101
|
+
function objectFlatMergeMatrix(a, b) {
|
|
11102
|
+
return flattenArray(objectMergeMatrix(a, b));
|
|
11103
|
+
}
|
|
11104
|
+
/**
|
|
11105
|
+
* Creates a matrix of results by merging the input. If either a or b is null/undefined, the result is returned as an array of the other value.
|
|
11106
|
+
*/
|
|
11107
|
+
function objectMergeMatrix(a, b) {
|
|
11108
|
+
if (a && b) {
|
|
11109
|
+
const aNorm = convertToArray(a);
|
|
11110
|
+
const bNorm = convertToArray(b);
|
|
11111
|
+
const results = aNorm.map(a => {
|
|
11112
|
+
return bNorm.map(b => Object.assign(Object.assign({}, a), b));
|
|
11113
|
+
});
|
|
11114
|
+
return results;
|
|
11115
|
+
} else if (a) {
|
|
11116
|
+
return [convertToArray(a)];
|
|
11117
|
+
} else if (b) {
|
|
11118
|
+
return [convertToArray(b)];
|
|
11119
|
+
} else {
|
|
11120
|
+
return [[]];
|
|
11121
|
+
}
|
|
11122
|
+
}
|
|
11123
|
+
|
|
11124
|
+
/**
|
|
11125
|
+
* Recursively function that returns true if the input is not an object or if every key on the object is empty.
|
|
11126
|
+
*
|
|
11127
|
+
* @param obj
|
|
11128
|
+
*/
|
|
11129
|
+
function objectIsEmpty(obj) {
|
|
11130
|
+
if (obj != null && typeof obj === 'object') {
|
|
11131
|
+
const keys = Object.keys(obj);
|
|
11132
|
+
if (keys.length > 0) {
|
|
11133
|
+
for (let i = 0; i < keys.length; i += 1) {
|
|
11134
|
+
const key = keys[i];
|
|
11135
|
+
const value = obj[key];
|
|
11136
|
+
const isEmpty = typeof value === 'object' ? objectIsEmpty(value) : !hasValueOrNotEmpty(value);
|
|
11137
|
+
if (!isEmpty) {
|
|
11138
|
+
return false;
|
|
11139
|
+
}
|
|
11140
|
+
}
|
|
11141
|
+
}
|
|
11142
|
+
}
|
|
11143
|
+
return true;
|
|
11144
|
+
}
|
|
11145
|
+
|
|
11146
|
+
/**
|
|
11147
|
+
* Performs a deep comparison to check if all values on the input filters are equal.
|
|
11148
|
+
*/
|
|
11149
|
+
function areEqualPOJOValues(a, b) {
|
|
11150
|
+
return lodash.isEqual(a, b);
|
|
11151
|
+
}
|
|
11152
|
+
function objectFieldEqualityChecker(config) {
|
|
11153
|
+
const {
|
|
11154
|
+
fields,
|
|
11155
|
+
defaultEqualityFunction = (a, b) => a === b
|
|
11156
|
+
} = config;
|
|
11157
|
+
const _fields = new Map();
|
|
11158
|
+
fields.forEach(input => {
|
|
11159
|
+
let field;
|
|
10636
11160
|
if (typeof input === 'object') {
|
|
10637
11161
|
field = input;
|
|
10638
11162
|
} else {
|
|
@@ -10803,302 +11327,75 @@ function toModelMapFunctions(input) {
|
|
|
10803
11327
|
return mapFunctions;
|
|
10804
11328
|
}
|
|
10805
11329
|
|
|
10806
|
-
/**
|
|
10807
|
-
* Field conversion that copies the same value across.
|
|
10808
|
-
*
|
|
10809
|
-
* @param defaultValue
|
|
10810
|
-
* @returns
|
|
10811
|
-
*/
|
|
10812
|
-
function copyField(defaultOutput) {
|
|
10813
|
-
return {
|
|
10814
|
-
from: {
|
|
10815
|
-
default: defaultOutput,
|
|
10816
|
-
convert: x => x
|
|
10817
|
-
},
|
|
10818
|
-
to: {
|
|
10819
|
-
default: defaultOutput,
|
|
10820
|
-
convert: x => x
|
|
10821
|
-
}
|
|
10822
|
-
};
|
|
10823
|
-
}
|
|
10824
|
-
|
|
10825
|
-
function maybeMergeModelModifiers(input) {
|
|
10826
|
-
const modifiers = asArray(input);
|
|
10827
|
-
const allModifyData = filterMaybeValues(modifiers.map(x => x.modifyData));
|
|
10828
|
-
const allModifyModel = filterMaybeValues(modifiers.map(x => x.modifyModel));
|
|
10829
|
-
const modifyData = maybeMergeModifiers(allModifyData);
|
|
10830
|
-
const modifyModel = maybeMergeModifiers(allModifyModel);
|
|
10831
|
-
return {
|
|
10832
|
-
modifyData,
|
|
10833
|
-
modifyModel
|
|
10834
|
-
};
|
|
10835
|
-
}
|
|
10836
|
-
function modifyModelMapFunctions(config) {
|
|
10837
|
-
const {
|
|
10838
|
-
copy,
|
|
10839
|
-
copyModel = copy,
|
|
10840
|
-
copyData = copy,
|
|
10841
|
-
mapFunctions,
|
|
10842
|
-
modifiers
|
|
10843
|
-
} = config;
|
|
10844
|
-
const {
|
|
10845
|
-
from,
|
|
10846
|
-
to
|
|
10847
|
-
} = mapFunctions;
|
|
10848
|
-
const {
|
|
10849
|
-
modifyData,
|
|
10850
|
-
modifyModel
|
|
10851
|
-
} = maybeMergeModelModifiers(modifiers);
|
|
10852
|
-
const modifyFrom = modifyModelMapFunction(from, modifyData, copyData);
|
|
10853
|
-
const modifyTo = modifyModelMapFunction(to, modifyModel, copyModel);
|
|
10854
|
-
return {
|
|
10855
|
-
from: modifyFrom,
|
|
10856
|
-
to: modifyTo
|
|
10857
|
-
};
|
|
10858
|
-
}
|
|
10859
|
-
/**
|
|
10860
|
-
* Merges a ModifierFunction with a ModelMapFunction
|
|
10861
|
-
*
|
|
10862
|
-
* @param mapFn
|
|
10863
|
-
* @param modifyModel
|
|
10864
|
-
* @param copy
|
|
10865
|
-
* @returns
|
|
10866
|
-
*/
|
|
10867
|
-
function modifyModelMapFunction(mapFn, modifyModel, copy = true) {
|
|
10868
|
-
return modifyModel ? (input, target, options) => {
|
|
10869
|
-
const inputToMap = copy && input != null ? Object.assign({}, input) : input;
|
|
10870
|
-
if (inputToMap != null) {
|
|
10871
|
-
modifyModel(inputToMap);
|
|
10872
|
-
}
|
|
10873
|
-
return mapFn(inputToMap, target, options);
|
|
10874
|
-
} : mapFn;
|
|
10875
|
-
}
|
|
10876
|
-
|
|
10877
|
-
var $TypeError$5 = TypeError;
|
|
10878
|
-
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
|
10879
|
-
|
|
10880
|
-
var doesNotExceedSafeInteger$1 = function (it) {
|
|
10881
|
-
if (it > MAX_SAFE_INTEGER) throw $TypeError$5('Maximum allowed index exceeded');
|
|
10882
|
-
return it;
|
|
10883
|
-
};
|
|
10884
|
-
|
|
10885
|
-
var uncurryThis = functionUncurryThisClause;
|
|
10886
|
-
var aCallable$5 = aCallable$a;
|
|
10887
|
-
var NATIVE_BIND = functionBindNative;
|
|
10888
|
-
|
|
10889
|
-
var bind$5 = uncurryThis(uncurryThis.bind);
|
|
10890
|
-
|
|
10891
|
-
// optional / simple context binding
|
|
10892
|
-
var functionBindContext = function (fn, that) {
|
|
10893
|
-
aCallable$5(fn);
|
|
10894
|
-
return that === undefined ? fn : NATIVE_BIND ? bind$5(fn, that) : function (/* ...args */) {
|
|
10895
|
-
return fn.apply(that, arguments);
|
|
10896
|
-
};
|
|
10897
|
-
};
|
|
10898
|
-
|
|
10899
|
-
var isArray$1 = isArray$3;
|
|
10900
|
-
var lengthOfArrayLike$2 = lengthOfArrayLike$6;
|
|
10901
|
-
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
|
|
10902
|
-
var bind$4 = functionBindContext;
|
|
10903
|
-
|
|
10904
|
-
// `FlattenIntoArray` abstract operation
|
|
10905
|
-
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
10906
|
-
var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
10907
|
-
var targetIndex = start;
|
|
10908
|
-
var sourceIndex = 0;
|
|
10909
|
-
var mapFn = mapper ? bind$4(mapper, thisArg) : false;
|
|
10910
|
-
var element, elementLen;
|
|
10911
|
-
|
|
10912
|
-
while (sourceIndex < sourceLen) {
|
|
10913
|
-
if (sourceIndex in source) {
|
|
10914
|
-
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
10915
|
-
|
|
10916
|
-
if (depth > 0 && isArray$1(element)) {
|
|
10917
|
-
elementLen = lengthOfArrayLike$2(element);
|
|
10918
|
-
targetIndex = flattenIntoArray$1(target, original, element, elementLen, targetIndex, depth - 1) - 1;
|
|
10919
|
-
} else {
|
|
10920
|
-
doesNotExceedSafeInteger(targetIndex + 1);
|
|
10921
|
-
target[targetIndex] = element;
|
|
10922
|
-
}
|
|
10923
|
-
|
|
10924
|
-
targetIndex++;
|
|
10925
|
-
}
|
|
10926
|
-
sourceIndex++;
|
|
10927
|
-
}
|
|
10928
|
-
return targetIndex;
|
|
10929
|
-
};
|
|
10930
|
-
|
|
10931
|
-
var flattenIntoArray_1 = flattenIntoArray$1;
|
|
10932
|
-
|
|
10933
|
-
var isArray = isArray$3;
|
|
10934
|
-
var isConstructor = isConstructor$2;
|
|
10935
|
-
var isObject$2 = isObject$c;
|
|
10936
|
-
var wellKnownSymbol$4 = wellKnownSymbol$k;
|
|
10937
|
-
|
|
10938
|
-
var SPECIES$1 = wellKnownSymbol$4('species');
|
|
10939
|
-
var $Array = Array;
|
|
10940
|
-
|
|
10941
|
-
// a part of `ArraySpeciesCreate` abstract operation
|
|
10942
|
-
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
10943
|
-
var arraySpeciesConstructor$1 = function (originalArray) {
|
|
10944
|
-
var C;
|
|
10945
|
-
if (isArray(originalArray)) {
|
|
10946
|
-
C = originalArray.constructor;
|
|
10947
|
-
// cross-realm fallback
|
|
10948
|
-
if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
|
|
10949
|
-
else if (isObject$2(C)) {
|
|
10950
|
-
C = C[SPECIES$1];
|
|
10951
|
-
if (C === null) C = undefined;
|
|
10952
|
-
}
|
|
10953
|
-
} return C === undefined ? $Array : C;
|
|
10954
|
-
};
|
|
10955
|
-
|
|
10956
|
-
var arraySpeciesConstructor = arraySpeciesConstructor$1;
|
|
10957
|
-
|
|
10958
|
-
// `ArraySpeciesCreate` abstract operation
|
|
10959
|
-
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
10960
|
-
var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
10961
|
-
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
|
10962
|
-
};
|
|
10963
|
-
|
|
10964
|
-
var $$6 = _export;
|
|
10965
|
-
var flattenIntoArray = flattenIntoArray_1;
|
|
10966
|
-
var toObject = toObject$7;
|
|
10967
|
-
var lengthOfArrayLike$1 = lengthOfArrayLike$6;
|
|
10968
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$7;
|
|
10969
|
-
var arraySpeciesCreate = arraySpeciesCreate$1;
|
|
10970
|
-
|
|
10971
|
-
// `Array.prototype.flat` method
|
|
10972
|
-
// https://tc39.es/ecma262/#sec-array.prototype.flat
|
|
10973
|
-
$$6({ target: 'Array', proto: true }, {
|
|
10974
|
-
flat: function flat(/* depthArg = 1 */) {
|
|
10975
|
-
var depthArg = arguments.length ? arguments[0] : undefined;
|
|
10976
|
-
var O = toObject(this);
|
|
10977
|
-
var sourceLen = lengthOfArrayLike$1(O);
|
|
10978
|
-
var A = arraySpeciesCreate(O, 0);
|
|
10979
|
-
A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
|
|
10980
|
-
return A;
|
|
10981
|
-
}
|
|
10982
|
-
});
|
|
10983
|
-
|
|
10984
|
-
// this method was added to unscopables after implementation
|
|
10985
|
-
// in popular engines, so it's moved to a separate module
|
|
10986
|
-
var addToUnscopables = addToUnscopables$2;
|
|
10987
|
-
|
|
10988
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
10989
|
-
addToUnscopables('flat');
|
|
10990
|
-
|
|
10991
|
-
function performTaskLoop(config) {
|
|
10992
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
10993
|
-
let result;
|
|
10994
|
-
const initValue = config.initValue;
|
|
10995
|
-
const startLoop = initValue == null || (yield config.checkContinue(initValue, -1));
|
|
10996
|
-
if (startLoop) {
|
|
10997
|
-
let i = 0;
|
|
10998
|
-
let prevValue = initValue;
|
|
10999
|
-
let check;
|
|
11000
|
-
do {
|
|
11001
|
-
prevValue = yield config.next(i, prevValue);
|
|
11002
|
-
i += 1;
|
|
11003
|
-
check = yield config.checkContinue(prevValue, i);
|
|
11004
|
-
} while (check);
|
|
11005
|
-
result = prevValue;
|
|
11006
|
-
} else {
|
|
11007
|
-
result = initValue;
|
|
11330
|
+
/**
|
|
11331
|
+
* Field conversion that copies the same value across.
|
|
11332
|
+
*
|
|
11333
|
+
* @param defaultValue
|
|
11334
|
+
* @returns
|
|
11335
|
+
*/
|
|
11336
|
+
function copyField(defaultOutput) {
|
|
11337
|
+
return {
|
|
11338
|
+
from: {
|
|
11339
|
+
default: defaultOutput,
|
|
11340
|
+
convert: x => x
|
|
11341
|
+
},
|
|
11342
|
+
to: {
|
|
11343
|
+
default: defaultOutput,
|
|
11344
|
+
convert: x => x
|
|
11008
11345
|
}
|
|
11009
|
-
|
|
11010
|
-
});
|
|
11011
|
-
}
|
|
11012
|
-
function performTaskCountLoop(config) {
|
|
11013
|
-
return performTaskLoop(Object.assign(Object.assign({}, config), {
|
|
11014
|
-
checkContinue: (_, i) => i < config.count
|
|
11015
|
-
}));
|
|
11346
|
+
};
|
|
11016
11347
|
}
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11348
|
+
|
|
11349
|
+
function maybeMergeModelModifiers(input) {
|
|
11350
|
+
const modifiers = asArray(input);
|
|
11351
|
+
const allModifyData = filterMaybeValues(modifiers.map(x => x.modifyData));
|
|
11352
|
+
const allModifyModel = filterMaybeValues(modifiers.map(x => x.modifyModel));
|
|
11353
|
+
const modifyData = maybeMergeModifiers(allModifyData);
|
|
11354
|
+
const modifyModel = maybeMergeModifiers(allModifyModel);
|
|
11355
|
+
return {
|
|
11356
|
+
modifyData,
|
|
11357
|
+
modifyModel
|
|
11358
|
+
};
|
|
11027
11359
|
}
|
|
11028
|
-
function
|
|
11360
|
+
function modifyModelMapFunctions(config) {
|
|
11029
11361
|
const {
|
|
11030
|
-
|
|
11362
|
+
copy,
|
|
11363
|
+
copyModel = copy,
|
|
11364
|
+
copyData = copy,
|
|
11365
|
+
mapFunctions,
|
|
11366
|
+
modifiers
|
|
11031
11367
|
} = config;
|
|
11032
|
-
const calc = batchCalc(config);
|
|
11033
11368
|
const {
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
|
|
11041
|
-
|
|
11042
|
-
|
|
11043
|
-
|
|
11369
|
+
from,
|
|
11370
|
+
to
|
|
11371
|
+
} = mapFunctions;
|
|
11372
|
+
const {
|
|
11373
|
+
modifyData,
|
|
11374
|
+
modifyModel
|
|
11375
|
+
} = maybeMergeModelModifiers(modifiers);
|
|
11376
|
+
const modifyFrom = modifyModelMapFunction(from, modifyData, copyData);
|
|
11377
|
+
const modifyTo = modifyModelMapFunction(to, modifyModel, copyModel);
|
|
11378
|
+
return {
|
|
11379
|
+
from: modifyFrom,
|
|
11380
|
+
to: modifyTo
|
|
11381
|
+
};
|
|
11044
11382
|
}
|
|
11045
|
-
|
|
11046
11383
|
/**
|
|
11047
|
-
*
|
|
11384
|
+
* Merges a ModifierFunction with a ModelMapFunction
|
|
11048
11385
|
*
|
|
11049
|
-
* @param
|
|
11386
|
+
* @param mapFn
|
|
11387
|
+
* @param modifyModel
|
|
11388
|
+
* @param copy
|
|
11050
11389
|
* @returns
|
|
11051
11390
|
*/
|
|
11052
|
-
function
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
const {
|
|
11058
|
-
maxBatchSize: tagsToGeneratePerBatch,
|
|
11059
|
-
filterUnique = x => x,
|
|
11060
|
-
verify: verifyTags
|
|
11061
|
-
} = verifier;
|
|
11062
|
-
const maxUniquenessFailures = 20; // arbitrary failure point, but generally shouldn't occur with proper input.
|
|
11063
|
-
return totalTagIdentifiersToGenerate => __awaiter(this, void 0, void 0, function* () {
|
|
11064
|
-
const uniquenessAccumulator = []; // used for uniqueness checks
|
|
11065
|
-
function generateIdentifiersBatch(batchSize) {
|
|
11066
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
11067
|
-
let ids = [];
|
|
11068
|
-
let uniquenessFailure = 0;
|
|
11069
|
-
while (ids.length < batchSize) {
|
|
11070
|
-
const countToGenerate = batchSize - ids.length;
|
|
11071
|
-
let newIds = filterUnique(factory(countToGenerate), uniquenessAccumulator);
|
|
11072
|
-
if (newIds.length === 0) {
|
|
11073
|
-
uniquenessFailure += 1;
|
|
11074
|
-
if (uniquenessFailure === maxUniquenessFailures) {
|
|
11075
|
-
throw new Error(`idBatchFactory failed generating unique values "${maxUniquenessFailures}" times. Factory may be insufficient for generating unique values.`);
|
|
11076
|
-
}
|
|
11077
|
-
continue;
|
|
11078
|
-
} else if (newIds.length > countToGenerate) {
|
|
11079
|
-
newIds = newIds.slice(0, countToGenerate); // ignore any extra values the generator may return.
|
|
11080
|
-
}
|
|
11081
|
-
// add to the uniqueness acumulator to prevent further usage
|
|
11082
|
-
mergeArraysIntoArray(uniquenessAccumulator, newIds);
|
|
11083
|
-
const verifiedIds = yield verifyTags(newIds);
|
|
11084
|
-
// concat identifiers
|
|
11085
|
-
ids = ids.concat(verifiedIds);
|
|
11086
|
-
// restart loop if there are still items to be generated.
|
|
11087
|
-
}
|
|
11088
|
-
|
|
11089
|
-
return ids;
|
|
11090
|
-
});
|
|
11391
|
+
function modifyModelMapFunction(mapFn, modifyModel, copy = true) {
|
|
11392
|
+
return modifyModel ? (input, target, options) => {
|
|
11393
|
+
const inputToMap = copy && input != null ? Object.assign({}, input) : input;
|
|
11394
|
+
if (inputToMap != null) {
|
|
11395
|
+
modifyModel(inputToMap);
|
|
11091
11396
|
}
|
|
11092
|
-
|
|
11093
|
-
|
|
11094
|
-
itemsPerBatch: tagsToGeneratePerBatch,
|
|
11095
|
-
make: batchSize => __awaiter(this, void 0, void 0, function* () {
|
|
11096
|
-
const result = yield generateIdentifiersBatch(batchSize);
|
|
11097
|
-
return result;
|
|
11098
|
-
})
|
|
11099
|
-
});
|
|
11100
|
-
return tagBatches.flat();
|
|
11101
|
-
});
|
|
11397
|
+
return mapFn(inputToMap, target, options);
|
|
11398
|
+
} : mapFn;
|
|
11102
11399
|
}
|
|
11103
11400
|
|
|
11104
11401
|
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
@@ -13031,106 +13328,6 @@ class StorageObjectUtility {
|
|
|
13031
13328
|
}
|
|
13032
13329
|
}
|
|
13033
13330
|
|
|
13034
|
-
/**
|
|
13035
|
-
* Creates a Map of the PrimativeKeyDencoder values.
|
|
13036
|
-
*
|
|
13037
|
-
* If any repeat values are found, an error will be thrown.
|
|
13038
|
-
*
|
|
13039
|
-
* @param values
|
|
13040
|
-
*/
|
|
13041
|
-
function primativeKeyDencoderMap(values) {
|
|
13042
|
-
const map = new Map();
|
|
13043
|
-
let valuesArray;
|
|
13044
|
-
if (!Array.isArray(values)) {
|
|
13045
|
-
valuesArray = [];
|
|
13046
|
-
forEachKeyValue(values, {
|
|
13047
|
-
forEach: pair => {
|
|
13048
|
-
valuesArray.push(pair);
|
|
13049
|
-
},
|
|
13050
|
-
filter: exports.KeyValueTypleValueFilter.UNDEFINED
|
|
13051
|
-
});
|
|
13052
|
-
} else {
|
|
13053
|
-
valuesArray = values;
|
|
13054
|
-
}
|
|
13055
|
-
valuesArray.forEach(value => {
|
|
13056
|
-
const [d, e] = value;
|
|
13057
|
-
if (map.has(d) || map.has(e)) {
|
|
13058
|
-
throw new Error(`primativeKeyDencoderMap() encountered a repeat key/value: ${d}/${e}. Keys and values must be unique.`);
|
|
13059
|
-
}
|
|
13060
|
-
map.set(d, e);
|
|
13061
|
-
map.set(e, d);
|
|
13062
|
-
});
|
|
13063
|
-
map._tuples = valuesArray;
|
|
13064
|
-
return map;
|
|
13065
|
-
}
|
|
13066
|
-
const PRIMATIVE_KEY_DENCODER_VALUE = input => null;
|
|
13067
|
-
/**
|
|
13068
|
-
* Creates a new PrimiativeKeyDencoder.
|
|
13069
|
-
*/
|
|
13070
|
-
function primativeKeyDencoder(config) {
|
|
13071
|
-
const {
|
|
13072
|
-
defaultValue = PRIMATIVE_KEY_DENCODER_VALUE
|
|
13073
|
-
} = config;
|
|
13074
|
-
const map = primativeKeyDencoderMap(config.values);
|
|
13075
|
-
const fn = input => {
|
|
13076
|
-
if (Array.isArray(input)) {
|
|
13077
|
-
const values = filterMaybeValues(input.map(x => map.get(x)));
|
|
13078
|
-
return values;
|
|
13079
|
-
} else {
|
|
13080
|
-
let value = map.get(input);
|
|
13081
|
-
if (value == null) {
|
|
13082
|
-
value = defaultValue(input);
|
|
13083
|
-
if (value == null) {
|
|
13084
|
-
throw new Error(`Encountered unknown value ${input} in primativeKeyDencoder.`);
|
|
13085
|
-
}
|
|
13086
|
-
}
|
|
13087
|
-
return value;
|
|
13088
|
-
}
|
|
13089
|
-
};
|
|
13090
|
-
fn._map = map;
|
|
13091
|
-
return fn;
|
|
13092
|
-
}
|
|
13093
|
-
/**
|
|
13094
|
-
* Creates a new PrimativeKeyStringDencoderFunction.
|
|
13095
|
-
*
|
|
13096
|
-
* @param config
|
|
13097
|
-
* @returns
|
|
13098
|
-
*/
|
|
13099
|
-
function primativeKeyStringDencoder(config) {
|
|
13100
|
-
const dencoder = typeof config.dencoder === 'function' ? config.dencoder : primativeKeyDencoder(config.dencoder);
|
|
13101
|
-
const {
|
|
13102
|
-
splitter
|
|
13103
|
-
} = config;
|
|
13104
|
-
const {
|
|
13105
|
-
_map: dencoderMap
|
|
13106
|
-
} = dencoder;
|
|
13107
|
-
if (splitter) {
|
|
13108
|
-
dencoderMap._tuples.forEach(x => {
|
|
13109
|
-
if (x[0].toString().indexOf(splitter) !== -1) {
|
|
13110
|
-
throw new Error(`primativeKeyStringDencoder() encountered a value (${x[0]}) that contains the splitter (${splitter}).`);
|
|
13111
|
-
}
|
|
13112
|
-
});
|
|
13113
|
-
} else {
|
|
13114
|
-
// Assert all encoded values are 1 character long max.
|
|
13115
|
-
dencoderMap._tuples.forEach(x => {
|
|
13116
|
-
if (x[0].toString().length !== 1) {
|
|
13117
|
-
throw new Error(`primativeKeyStringDencoder() without a splitter defined cannot use encoded values of a length greater than 1. Encountered encoded "${x[0]}".`);
|
|
13118
|
-
}
|
|
13119
|
-
});
|
|
13120
|
-
}
|
|
13121
|
-
const joiner = splitter || '';
|
|
13122
|
-
const splitEncodedValues = splitter ? encodedValues => encodedValues.split(splitter) : encodedValues => Array.from(encodedValues);
|
|
13123
|
-
return input => {
|
|
13124
|
-
if (typeof input === 'string') {
|
|
13125
|
-
const split = splitEncodedValues(input);
|
|
13126
|
-
return dencoder(split);
|
|
13127
|
-
} else {
|
|
13128
|
-
const encoded = dencoder(input);
|
|
13129
|
-
return encoded.join(joiner);
|
|
13130
|
-
}
|
|
13131
|
-
};
|
|
13132
|
-
}
|
|
13133
|
-
|
|
13134
13331
|
/**
|
|
13135
13332
|
* Joins together various array of classes and only keeps the unique values.
|
|
13136
13333
|
*
|
|
@@ -14102,6 +14299,9 @@ exports.MS_IN_SECOND = MS_IN_SECOND;
|
|
|
14102
14299
|
exports.MemoryStorageInstance = MemoryStorageInstance;
|
|
14103
14300
|
exports.ModelRelationUtility = ModelRelationUtility;
|
|
14104
14301
|
exports.NOOP_MODIFIER = NOOP_MODIFIER;
|
|
14302
|
+
exports.NUMBER_STRING_DENCODER_64 = NUMBER_STRING_DENCODER_64;
|
|
14303
|
+
exports.NUMBER_STRING_DENCODER_64_DEFAULT_NEGATIVE_PREFIX = NUMBER_STRING_DENCODER_64_DEFAULT_NEGATIVE_PREFIX;
|
|
14304
|
+
exports.NUMBER_STRING_DENCODER_64_DIGITS = NUMBER_STRING_DENCODER_64_DIGITS;
|
|
14105
14305
|
exports.PHONE_EXTENSION_NUMBER_REGEX = PHONE_EXTENSION_NUMBER_REGEX;
|
|
14106
14306
|
exports.PRIMATIVE_KEY_DENCODER_VALUE = PRIMATIVE_KEY_DENCODER_VALUE;
|
|
14107
14307
|
exports.PageCalculator = PageCalculator;
|
|
@@ -14582,6 +14782,10 @@ exports.multiKeyValueMapFactory = multiKeyValueMapFactory;
|
|
|
14582
14782
|
exports.multiValueMapBuilder = multiValueMapBuilder;
|
|
14583
14783
|
exports.neMostLatLngPoint = neMostLatLngPoint;
|
|
14584
14784
|
exports.nearestDivisibleValues = nearestDivisibleValues;
|
|
14785
|
+
exports.numberStringDencoder = numberStringDencoder;
|
|
14786
|
+
exports.numberStringDencoderDecodedNumberValueFunction = numberStringDencoderDecodedNumberValueFunction;
|
|
14787
|
+
exports.numberStringDencoderEncodedStringValueFunction = numberStringDencoderEncodedStringValueFunction;
|
|
14788
|
+
exports.numberStringDencoderFunction = numberStringDencoderFunction;
|
|
14585
14789
|
exports.objectCopyFactory = objectCopyFactory;
|
|
14586
14790
|
exports.objectDeltaArrayCompressor = objectDeltaArrayCompressor;
|
|
14587
14791
|
exports.objectFieldEqualityChecker = objectFieldEqualityChecker;
|
|
@@ -14598,6 +14802,7 @@ exports.objectToTuples = objectToTuples;
|
|
|
14598
14802
|
exports.overlapsLatLngBoundFunction = overlapsLatLngBoundFunction;
|
|
14599
14803
|
exports.overrideInObject = overrideInObject;
|
|
14600
14804
|
exports.overrideInObjectFunctionFactory = overrideInObjectFunctionFactory;
|
|
14805
|
+
exports.padStartFunction = padStartFunction;
|
|
14601
14806
|
exports.pairGroupValues = pairGroupValues;
|
|
14602
14807
|
exports.parseISO8601DayStringToUTCDate = parseISO8601DayStringToUTCDate;
|
|
14603
14808
|
exports.partialServerError = partialServerError;
|
|
@@ -14714,6 +14919,7 @@ exports.safeFindBestIndexMatch = safeFindBestIndexMatch;
|
|
|
14714
14919
|
exports.searchStringFilterFunction = searchStringFilterFunction;
|
|
14715
14920
|
exports.separateValues = separateValues;
|
|
14716
14921
|
exports.separateValuesToSets = separateValuesToSets;
|
|
14922
|
+
exports.sequentialIncrementingNumberStringModelIdFactory = sequentialIncrementingNumberStringModelIdFactory;
|
|
14717
14923
|
exports.serverError = serverError;
|
|
14718
14924
|
exports.setContainsAllValues = setContainsAllValues;
|
|
14719
14925
|
exports.setContainsAnyValue = setContainsAnyValue;
|
|
@@ -14758,6 +14964,7 @@ exports.startOfDayForSystemDateInUTC = startOfDayForSystemDateInUTC;
|
|
|
14758
14964
|
exports.startOfDayForUTCDateInUTC = startOfDayForUTCDateInUTC;
|
|
14759
14965
|
exports.stepsFromIndex = stepsFromIndex;
|
|
14760
14966
|
exports.stepsFromIndexFunction = stepsFromIndexFunction;
|
|
14967
|
+
exports.stringCharactersToIndexRecord = stringCharactersToIndexRecord;
|
|
14761
14968
|
exports.stringFactoryFromFactory = stringFactoryFromFactory;
|
|
14762
14969
|
exports.stringToLowercaseFunction = stringToLowercaseFunction;
|
|
14763
14970
|
exports.stringToUppercaseFunction = stringToUppercaseFunction;
|