mocha 8.2.0 → 8.3.2
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/CHANGELOG.md +56 -1
- package/LICENSE +1 -1
- package/README.md +12 -3
- package/bin/mocha +0 -3
- package/lib/browser/growl.js +1 -1
- package/lib/cli/collect-files.js +25 -25
- package/lib/cli/config.js +1 -2
- package/lib/cli/options.js +2 -1
- package/lib/cli/watch-run.js +6 -0
- package/lib/errors.js +103 -5
- package/lib/esm-utils.js +23 -1
- package/lib/mocha.js +57 -15
- package/lib/runnable.js +7 -8
- package/lib/runner.js +34 -10
- package/lib/utils.js +3 -0
- package/mocha.js +1117 -679
- package/mocha.js.map +1 -1
- package/package.json +15 -14
package/mocha.js
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.mocha = factory());
|
|
5
5
|
}(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
|
+
var regeneratorRuntime;
|
|
8
|
+
|
|
7
9
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
8
10
|
|
|
9
11
|
function createCommonjsModule(fn, basedir, module) {
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
check(typeof self == 'object' && self) ||
|
|
37
39
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
38
40
|
// eslint-disable-next-line no-new-func
|
|
39
|
-
Function('return this')();
|
|
41
|
+
(function () { return this; })() || Function('return this')();
|
|
40
42
|
|
|
41
43
|
var fails = function (exec) {
|
|
42
44
|
try {
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
}
|
|
47
49
|
};
|
|
48
50
|
|
|
49
|
-
//
|
|
51
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
50
52
|
var descriptors = !fails(function () {
|
|
51
53
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
52
54
|
});
|
|
@@ -58,7 +60,7 @@
|
|
|
58
60
|
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
|
59
61
|
|
|
60
62
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
61
|
-
// https://tc39.
|
|
63
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
62
64
|
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
63
65
|
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
64
66
|
return !!descriptor && descriptor.enumerable;
|
|
@@ -95,7 +97,7 @@
|
|
|
95
97
|
} : Object;
|
|
96
98
|
|
|
97
99
|
// `RequireObjectCoercible` abstract operation
|
|
98
|
-
// https://tc39.
|
|
100
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
99
101
|
var requireObjectCoercible = function (it) {
|
|
100
102
|
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
101
103
|
return it;
|
|
@@ -114,7 +116,7 @@
|
|
|
114
116
|
};
|
|
115
117
|
|
|
116
118
|
// `ToPrimitive` abstract operation
|
|
117
|
-
// https://tc39.
|
|
119
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
118
120
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
119
121
|
// and the second argument - flag - preferred type is a string
|
|
120
122
|
var toPrimitive = function (input, PREFERRED_STRING) {
|
|
@@ -150,7 +152,7 @@
|
|
|
150
152
|
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
151
153
|
|
|
152
154
|
// `Object.getOwnPropertyDescriptor` method
|
|
153
|
-
// https://tc39.
|
|
155
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
154
156
|
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
155
157
|
O = toIndexedObject(O);
|
|
156
158
|
P = toPrimitive(P, true);
|
|
@@ -173,7 +175,7 @@
|
|
|
173
175
|
var nativeDefineProperty = Object.defineProperty;
|
|
174
176
|
|
|
175
177
|
// `Object.defineProperty` method
|
|
176
|
-
// https://tc39.
|
|
178
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
177
179
|
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
|
178
180
|
anObject(O);
|
|
179
181
|
P = toPrimitive(P, true);
|
|
@@ -229,9 +231,9 @@
|
|
|
229
231
|
(module.exports = function (key, value) {
|
|
230
232
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
231
233
|
})('versions', []).push({
|
|
232
|
-
version: '3.
|
|
234
|
+
version: '3.8.3',
|
|
233
235
|
mode: 'global',
|
|
234
|
-
copyright: '©
|
|
236
|
+
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
|
235
237
|
});
|
|
236
238
|
});
|
|
237
239
|
|
|
@@ -267,11 +269,12 @@
|
|
|
267
269
|
};
|
|
268
270
|
|
|
269
271
|
if (nativeWeakMap) {
|
|
270
|
-
var store$1 = new WeakMap$1();
|
|
272
|
+
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
|
|
271
273
|
var wmget = store$1.get;
|
|
272
274
|
var wmhas = store$1.has;
|
|
273
275
|
var wmset = store$1.set;
|
|
274
276
|
set = function (it, metadata) {
|
|
277
|
+
metadata.facade = it;
|
|
275
278
|
wmset.call(store$1, it, metadata);
|
|
276
279
|
return metadata;
|
|
277
280
|
};
|
|
@@ -285,6 +288,7 @@
|
|
|
285
288
|
var STATE = sharedKey('state');
|
|
286
289
|
hiddenKeys[STATE] = true;
|
|
287
290
|
set = function (it, metadata) {
|
|
291
|
+
metadata.facade = it;
|
|
288
292
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
289
293
|
return metadata;
|
|
290
294
|
};
|
|
@@ -313,9 +317,15 @@
|
|
|
313
317
|
var unsafe = options ? !!options.unsafe : false;
|
|
314
318
|
var simple = options ? !!options.enumerable : false;
|
|
315
319
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
320
|
+
var state;
|
|
316
321
|
if (typeof value == 'function') {
|
|
317
|
-
if (typeof key == 'string' && !has(value, 'name'))
|
|
318
|
-
|
|
322
|
+
if (typeof key == 'string' && !has(value, 'name')) {
|
|
323
|
+
createNonEnumerableProperty(value, 'name', key);
|
|
324
|
+
}
|
|
325
|
+
state = enforceInternalState(value);
|
|
326
|
+
if (!state.source) {
|
|
327
|
+
state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
|
328
|
+
}
|
|
319
329
|
}
|
|
320
330
|
if (O === global_1) {
|
|
321
331
|
if (simple) O[key] = value;
|
|
@@ -349,7 +359,7 @@
|
|
|
349
359
|
var floor = Math.floor;
|
|
350
360
|
|
|
351
361
|
// `ToInteger` abstract operation
|
|
352
|
-
// https://tc39.
|
|
362
|
+
// https://tc39.es/ecma262/#sec-tointeger
|
|
353
363
|
var toInteger = function (argument) {
|
|
354
364
|
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
|
355
365
|
};
|
|
@@ -357,7 +367,7 @@
|
|
|
357
367
|
var min = Math.min;
|
|
358
368
|
|
|
359
369
|
// `ToLength` abstract operation
|
|
360
|
-
// https://tc39.
|
|
370
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
361
371
|
var toLength = function (argument) {
|
|
362
372
|
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
363
373
|
};
|
|
@@ -395,10 +405,10 @@
|
|
|
395
405
|
|
|
396
406
|
var arrayIncludes = {
|
|
397
407
|
// `Array.prototype.includes` method
|
|
398
|
-
// https://tc39.
|
|
408
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
399
409
|
includes: createMethod(true),
|
|
400
410
|
// `Array.prototype.indexOf` method
|
|
401
|
-
// https://tc39.
|
|
411
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
402
412
|
indexOf: createMethod(false)
|
|
403
413
|
};
|
|
404
414
|
|
|
@@ -432,7 +442,7 @@
|
|
|
432
442
|
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
|
433
443
|
|
|
434
444
|
// `Object.getOwnPropertyNames` method
|
|
435
|
-
// https://tc39.
|
|
445
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
436
446
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
437
447
|
return objectKeysInternal(O, hiddenKeys$1);
|
|
438
448
|
};
|
|
@@ -568,13 +578,13 @@
|
|
|
568
578
|
};
|
|
569
579
|
|
|
570
580
|
// `ToObject` abstract operation
|
|
571
|
-
// https://tc39.
|
|
581
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
572
582
|
var toObject = function (argument) {
|
|
573
583
|
return Object(requireObjectCoercible(argument));
|
|
574
584
|
};
|
|
575
585
|
|
|
576
586
|
// `IsArray` abstract operation
|
|
577
|
-
// https://tc39.
|
|
587
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
578
588
|
var isArray = Array.isArray || function isArray(arg) {
|
|
579
589
|
return classofRaw(arg) == 'Array';
|
|
580
590
|
};
|
|
@@ -605,7 +615,7 @@
|
|
|
605
615
|
var SPECIES = wellKnownSymbol('species');
|
|
606
616
|
|
|
607
617
|
// `ArraySpeciesCreate` abstract operation
|
|
608
|
-
// https://tc39.
|
|
618
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
609
619
|
var arraySpeciesCreate = function (originalArray, length) {
|
|
610
620
|
var C;
|
|
611
621
|
if (isArray(originalArray)) {
|
|
@@ -621,13 +631,14 @@
|
|
|
621
631
|
|
|
622
632
|
var push = [].push;
|
|
623
633
|
|
|
624
|
-
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
|
|
634
|
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
|
|
625
635
|
var createMethod$1 = function (TYPE) {
|
|
626
636
|
var IS_MAP = TYPE == 1;
|
|
627
637
|
var IS_FILTER = TYPE == 2;
|
|
628
638
|
var IS_SOME = TYPE == 3;
|
|
629
639
|
var IS_EVERY = TYPE == 4;
|
|
630
640
|
var IS_FIND_INDEX = TYPE == 6;
|
|
641
|
+
var IS_FILTER_OUT = TYPE == 7;
|
|
631
642
|
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
|
632
643
|
return function ($this, callbackfn, that, specificCreate) {
|
|
633
644
|
var O = toObject($this);
|
|
@@ -636,7 +647,7 @@
|
|
|
636
647
|
var length = toLength(self.length);
|
|
637
648
|
var index = 0;
|
|
638
649
|
var create = specificCreate || arraySpeciesCreate;
|
|
639
|
-
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
|
|
650
|
+
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
|
|
640
651
|
var value, result;
|
|
641
652
|
for (;length > index; index++) if (NO_HOLES || index in self) {
|
|
642
653
|
value = self[index];
|
|
@@ -648,7 +659,10 @@
|
|
|
648
659
|
case 5: return value; // find
|
|
649
660
|
case 6: return index; // findIndex
|
|
650
661
|
case 2: push.call(target, value); // filter
|
|
651
|
-
} else
|
|
662
|
+
} else switch (TYPE) {
|
|
663
|
+
case 4: return false; // every
|
|
664
|
+
case 7: push.call(target, value); // filterOut
|
|
665
|
+
}
|
|
652
666
|
}
|
|
653
667
|
}
|
|
654
668
|
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
|
@@ -657,26 +671,29 @@
|
|
|
657
671
|
|
|
658
672
|
var arrayIteration = {
|
|
659
673
|
// `Array.prototype.forEach` method
|
|
660
|
-
// https://tc39.
|
|
674
|
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
661
675
|
forEach: createMethod$1(0),
|
|
662
676
|
// `Array.prototype.map` method
|
|
663
|
-
// https://tc39.
|
|
677
|
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
664
678
|
map: createMethod$1(1),
|
|
665
679
|
// `Array.prototype.filter` method
|
|
666
|
-
// https://tc39.
|
|
680
|
+
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
|
667
681
|
filter: createMethod$1(2),
|
|
668
682
|
// `Array.prototype.some` method
|
|
669
|
-
// https://tc39.
|
|
683
|
+
// https://tc39.es/ecma262/#sec-array.prototype.some
|
|
670
684
|
some: createMethod$1(3),
|
|
671
685
|
// `Array.prototype.every` method
|
|
672
|
-
// https://tc39.
|
|
686
|
+
// https://tc39.es/ecma262/#sec-array.prototype.every
|
|
673
687
|
every: createMethod$1(4),
|
|
674
688
|
// `Array.prototype.find` method
|
|
675
|
-
// https://tc39.
|
|
689
|
+
// https://tc39.es/ecma262/#sec-array.prototype.find
|
|
676
690
|
find: createMethod$1(5),
|
|
677
691
|
// `Array.prototype.findIndex` method
|
|
678
|
-
// https://tc39.
|
|
679
|
-
findIndex: createMethod$1(6)
|
|
692
|
+
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
|
693
|
+
findIndex: createMethod$1(6),
|
|
694
|
+
// `Array.prototype.filterOut` method
|
|
695
|
+
// https://github.com/tc39/proposal-array-filtering
|
|
696
|
+
filterOut: createMethod$1(7)
|
|
680
697
|
};
|
|
681
698
|
|
|
682
699
|
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
@@ -748,7 +765,7 @@
|
|
|
748
765
|
var USES_TO_LENGTH = arrayMethodUsesToLength('filter');
|
|
749
766
|
|
|
750
767
|
// `Array.prototype.filter` method
|
|
751
|
-
// https://tc39.
|
|
768
|
+
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
|
752
769
|
// with adding support of @@species
|
|
753
770
|
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
|
|
754
771
|
filter: function filter(callbackfn /* , thisArg */) {
|
|
@@ -756,54 +773,6 @@
|
|
|
756
773
|
}
|
|
757
774
|
});
|
|
758
775
|
|
|
759
|
-
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
|
760
|
-
var method = [][METHOD_NAME];
|
|
761
|
-
return !!method && fails(function () {
|
|
762
|
-
// eslint-disable-next-line no-useless-call,no-throw-literal
|
|
763
|
-
method.call(null, argument || function () { throw 1; }, 1);
|
|
764
|
-
});
|
|
765
|
-
};
|
|
766
|
-
|
|
767
|
-
var $forEach = arrayIteration.forEach;
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
|
772
|
-
var USES_TO_LENGTH$1 = arrayMethodUsesToLength('forEach');
|
|
773
|
-
|
|
774
|
-
// `Array.prototype.forEach` method implementation
|
|
775
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
|
776
|
-
var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$1) ? function forEach(callbackfn /* , thisArg */) {
|
|
777
|
-
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
778
|
-
} : [].forEach;
|
|
779
|
-
|
|
780
|
-
// `Array.prototype.forEach` method
|
|
781
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
|
782
|
-
_export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, {
|
|
783
|
-
forEach: arrayForEach
|
|
784
|
-
});
|
|
785
|
-
|
|
786
|
-
var $indexOf = arrayIncludes.indexOf;
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
var nativeIndexOf = [].indexOf;
|
|
791
|
-
|
|
792
|
-
var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
|
|
793
|
-
var STRICT_METHOD$1 = arrayMethodIsStrict('indexOf');
|
|
794
|
-
var USES_TO_LENGTH$2 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
|
795
|
-
|
|
796
|
-
// `Array.prototype.indexOf` method
|
|
797
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
|
798
|
-
_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$1 || !USES_TO_LENGTH$2 }, {
|
|
799
|
-
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
|
|
800
|
-
return NEGATIVE_ZERO
|
|
801
|
-
// convert -0 to +0
|
|
802
|
-
? nativeIndexOf.apply(this, arguments) || 0
|
|
803
|
-
: $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
804
|
-
}
|
|
805
|
-
});
|
|
806
|
-
|
|
807
776
|
var createProperty = function (object, key, value) {
|
|
808
777
|
var propertyKey = toPrimitive(key);
|
|
809
778
|
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
|
@@ -811,7 +780,7 @@
|
|
|
811
780
|
};
|
|
812
781
|
|
|
813
782
|
var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('splice');
|
|
814
|
-
var USES_TO_LENGTH$
|
|
783
|
+
var USES_TO_LENGTH$1 = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });
|
|
815
784
|
|
|
816
785
|
var max$1 = Math.max;
|
|
817
786
|
var min$2 = Math.min;
|
|
@@ -819,9 +788,9 @@
|
|
|
819
788
|
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
|
|
820
789
|
|
|
821
790
|
// `Array.prototype.splice` method
|
|
822
|
-
// https://tc39.
|
|
791
|
+
// https://tc39.es/ecma262/#sec-array.prototype.splice
|
|
823
792
|
// with adding support of @@species
|
|
824
|
-
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$
|
|
793
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$1 }, {
|
|
825
794
|
splice: function splice(start, deleteCount /* , ...items */) {
|
|
826
795
|
var O = toObject(this);
|
|
827
796
|
var len = toLength(O.length);
|
|
@@ -871,7 +840,7 @@
|
|
|
871
840
|
});
|
|
872
841
|
|
|
873
842
|
// `Object.keys` method
|
|
874
|
-
// https://tc39.
|
|
843
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
875
844
|
var objectKeys = Object.keys || function keys(O) {
|
|
876
845
|
return objectKeysInternal(O, enumBugKeys);
|
|
877
846
|
};
|
|
@@ -880,7 +849,7 @@
|
|
|
880
849
|
var defineProperty$1 = Object.defineProperty;
|
|
881
850
|
|
|
882
851
|
// `Object.assign` method
|
|
883
|
-
// https://tc39.
|
|
852
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
884
853
|
var objectAssign = !nativeAssign || fails(function () {
|
|
885
854
|
// should have correct order of operations (Edge bug)
|
|
886
855
|
if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$1({}, 'a', {
|
|
@@ -921,7 +890,7 @@
|
|
|
921
890
|
} : nativeAssign;
|
|
922
891
|
|
|
923
892
|
// `Object.assign` method
|
|
924
|
-
// https://tc39.
|
|
893
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
925
894
|
_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
|
|
926
895
|
assign: objectAssign
|
|
927
896
|
});
|
|
@@ -929,7 +898,7 @@
|
|
|
929
898
|
var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });
|
|
930
899
|
|
|
931
900
|
// `Object.keys` method
|
|
932
|
-
// https://tc39.
|
|
901
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
933
902
|
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
934
903
|
keys: function keys(it) {
|
|
935
904
|
return objectKeys(toObject(it));
|
|
@@ -937,7 +906,7 @@
|
|
|
937
906
|
});
|
|
938
907
|
|
|
939
908
|
// `RegExp.prototype.flags` getter implementation
|
|
940
|
-
// https://tc39.
|
|
909
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
941
910
|
var regexpFlags = function () {
|
|
942
911
|
var that = anObject(this);
|
|
943
912
|
var result = '';
|
|
@@ -1059,6 +1028,8 @@
|
|
|
1059
1028
|
|
|
1060
1029
|
var regexpExec = patchedExec;
|
|
1061
1030
|
|
|
1031
|
+
// `RegExp.prototype.exec` method
|
|
1032
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
1062
1033
|
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
|
1063
1034
|
exec: regexpExec
|
|
1064
1035
|
});
|
|
@@ -1189,14 +1160,14 @@
|
|
|
1189
1160
|
};
|
|
1190
1161
|
|
|
1191
1162
|
// `SameValue` abstract operation
|
|
1192
|
-
// https://tc39.
|
|
1163
|
+
// https://tc39.es/ecma262/#sec-samevalue
|
|
1193
1164
|
var sameValue = Object.is || function is(x, y) {
|
|
1194
1165
|
// eslint-disable-next-line no-self-compare
|
|
1195
1166
|
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
|
|
1196
1167
|
};
|
|
1197
1168
|
|
|
1198
1169
|
// `RegExpExec` abstract operation
|
|
1199
|
-
// https://tc39.
|
|
1170
|
+
// https://tc39.es/ecma262/#sec-regexpexec
|
|
1200
1171
|
var regexpExecAbstract = function (R, S) {
|
|
1201
1172
|
var exec = R.exec;
|
|
1202
1173
|
if (typeof exec === 'function') {
|
|
@@ -1218,14 +1189,14 @@
|
|
|
1218
1189
|
fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
|
|
1219
1190
|
return [
|
|
1220
1191
|
// `String.prototype.search` method
|
|
1221
|
-
// https://tc39.
|
|
1192
|
+
// https://tc39.es/ecma262/#sec-string.prototype.search
|
|
1222
1193
|
function search(regexp) {
|
|
1223
1194
|
var O = requireObjectCoercible(this);
|
|
1224
1195
|
var searcher = regexp == undefined ? undefined : regexp[SEARCH];
|
|
1225
1196
|
return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
|
|
1226
1197
|
},
|
|
1227
1198
|
// `RegExp.prototype[@@search]` method
|
|
1228
|
-
// https://tc39.
|
|
1199
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@search
|
|
1229
1200
|
function (regexp) {
|
|
1230
1201
|
var res = maybeCallNative(nativeSearch, regexp, this);
|
|
1231
1202
|
if (res.done) return res.value;
|
|
@@ -1278,6 +1249,27 @@
|
|
|
1278
1249
|
TouchList: 0
|
|
1279
1250
|
};
|
|
1280
1251
|
|
|
1252
|
+
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
|
1253
|
+
var method = [][METHOD_NAME];
|
|
1254
|
+
return !!method && fails(function () {
|
|
1255
|
+
// eslint-disable-next-line no-useless-call,no-throw-literal
|
|
1256
|
+
method.call(null, argument || function () { throw 1; }, 1);
|
|
1257
|
+
});
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1260
|
+
var $forEach = arrayIteration.forEach;
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
|
1265
|
+
var USES_TO_LENGTH$2 = arrayMethodUsesToLength('forEach');
|
|
1266
|
+
|
|
1267
|
+
// `Array.prototype.forEach` method implementation
|
|
1268
|
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
1269
|
+
var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$2) ? function forEach(callbackfn /* , thisArg */) {
|
|
1270
|
+
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
1271
|
+
} : [].forEach;
|
|
1272
|
+
|
|
1281
1273
|
for (var COLLECTION_NAME in domIterables) {
|
|
1282
1274
|
var Collection = global_1[COLLECTION_NAME];
|
|
1283
1275
|
var CollectionPrototype = Collection && Collection.prototype;
|
|
@@ -1313,7 +1305,7 @@
|
|
|
1313
1305
|
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
|
1314
1306
|
|
|
1315
1307
|
// `Array.prototype.concat` method
|
|
1316
|
-
// https://tc39.
|
|
1308
|
+
// https://tc39.es/ecma262/#sec-array.prototype.concat
|
|
1317
1309
|
// with adding support of @@isConcatSpreadable and @@species
|
|
1318
1310
|
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
|
1319
1311
|
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
|
@@ -1612,13 +1604,13 @@
|
|
|
1612
1604
|
};
|
|
1613
1605
|
|
|
1614
1606
|
// `Object.prototype.toString` method implementation
|
|
1615
|
-
// https://tc39.
|
|
1607
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
1616
1608
|
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
|
1617
1609
|
return '[object ' + classof(this) + ']';
|
|
1618
1610
|
};
|
|
1619
1611
|
|
|
1620
1612
|
// `Object.prototype.toString` method
|
|
1621
|
-
// https://tc39.
|
|
1613
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
1622
1614
|
if (!toStringTagSupport) {
|
|
1623
1615
|
redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
|
|
1624
1616
|
}
|
|
@@ -1632,7 +1624,7 @@
|
|
|
1632
1624
|
var INCORRECT_NAME = nativeToString.name != TO_STRING;
|
|
1633
1625
|
|
|
1634
1626
|
// `RegExp.prototype.toString` method
|
|
1635
|
-
// https://tc39.
|
|
1627
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
1636
1628
|
if (NOT_GENERIC || INCORRECT_NAME) {
|
|
1637
1629
|
redefine(RegExp.prototype, TO_STRING, function toString() {
|
|
1638
1630
|
var R = anObject(this);
|
|
@@ -1651,7 +1643,7 @@
|
|
|
1651
1643
|
var NAME = 'name';
|
|
1652
1644
|
|
|
1653
1645
|
// Function instances `.name` property
|
|
1654
|
-
// https://tc39.
|
|
1646
|
+
// https://tc39.es/ecma262/#sec-function-instances-name
|
|
1655
1647
|
if (descriptors && !(NAME in FunctionPrototype)) {
|
|
1656
1648
|
defineProperty$2(FunctionPrototype, NAME, {
|
|
1657
1649
|
configurable: true,
|
|
@@ -1675,7 +1667,7 @@
|
|
|
1675
1667
|
var ObjectPrototype = Object.prototype;
|
|
1676
1668
|
|
|
1677
1669
|
// `Object.getPrototypeOf` method
|
|
1678
|
-
// https://tc39.
|
|
1670
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1679
1671
|
var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
|
|
1680
1672
|
O = toObject(O);
|
|
1681
1673
|
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
|
@@ -1687,7 +1679,7 @@
|
|
|
1687
1679
|
var FAILS_ON_PRIMITIVES$1 = fails(function () { objectGetPrototypeOf(1); });
|
|
1688
1680
|
|
|
1689
1681
|
// `Object.getPrototypeOf` method
|
|
1690
|
-
// https://tc39.
|
|
1682
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1691
1683
|
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$1, sham: !correctPrototypeGetter }, {
|
|
1692
1684
|
getPrototypeOf: function getPrototypeOf(it) {
|
|
1693
1685
|
return objectGetPrototypeOf(toObject(it));
|
|
@@ -1695,7 +1687,7 @@
|
|
|
1695
1687
|
});
|
|
1696
1688
|
|
|
1697
1689
|
// `Reflect.ownKeys` method
|
|
1698
|
-
// https://tc39.
|
|
1690
|
+
// https://tc39.es/ecma262/#sec-reflect.ownkeys
|
|
1699
1691
|
_export({ target: 'Reflect', stat: true }, {
|
|
1700
1692
|
ownKeys: ownKeys
|
|
1701
1693
|
});
|
|
@@ -2145,11 +2137,11 @@
|
|
|
2145
2137
|
var nativeJoin = [].join;
|
|
2146
2138
|
|
|
2147
2139
|
var ES3_STRINGS = indexedObject != Object;
|
|
2148
|
-
var STRICT_METHOD$
|
|
2140
|
+
var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
|
2149
2141
|
|
|
2150
2142
|
// `Array.prototype.join` method
|
|
2151
|
-
// https://tc39.
|
|
2152
|
-
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$
|
|
2143
|
+
// https://tc39.es/ecma262/#sec-array.prototype.join
|
|
2144
|
+
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
|
|
2153
2145
|
join: function join(separator) {
|
|
2154
2146
|
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
|
2155
2147
|
}
|
|
@@ -2161,68 +2153,17 @@
|
|
|
2161
2153
|
|
|
2162
2154
|
var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('map');
|
|
2163
2155
|
// FF49- issue
|
|
2164
|
-
var USES_TO_LENGTH$
|
|
2156
|
+
var USES_TO_LENGTH$3 = arrayMethodUsesToLength('map');
|
|
2165
2157
|
|
|
2166
2158
|
// `Array.prototype.map` method
|
|
2167
|
-
// https://tc39.
|
|
2159
|
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
2168
2160
|
// with adding support of @@species
|
|
2169
|
-
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$
|
|
2161
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$3 }, {
|
|
2170
2162
|
map: function map(callbackfn /* , thisArg */) {
|
|
2171
2163
|
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
2172
2164
|
}
|
|
2173
2165
|
});
|
|
2174
2166
|
|
|
2175
|
-
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
2176
|
-
var createMethod$2 = function (IS_RIGHT) {
|
|
2177
|
-
return function (that, callbackfn, argumentsLength, memo) {
|
|
2178
|
-
aFunction$1(callbackfn);
|
|
2179
|
-
var O = toObject(that);
|
|
2180
|
-
var self = indexedObject(O);
|
|
2181
|
-
var length = toLength(O.length);
|
|
2182
|
-
var index = IS_RIGHT ? length - 1 : 0;
|
|
2183
|
-
var i = IS_RIGHT ? -1 : 1;
|
|
2184
|
-
if (argumentsLength < 2) while (true) {
|
|
2185
|
-
if (index in self) {
|
|
2186
|
-
memo = self[index];
|
|
2187
|
-
index += i;
|
|
2188
|
-
break;
|
|
2189
|
-
}
|
|
2190
|
-
index += i;
|
|
2191
|
-
if (IS_RIGHT ? index < 0 : length <= index) {
|
|
2192
|
-
throw TypeError('Reduce of empty array with no initial value');
|
|
2193
|
-
}
|
|
2194
|
-
}
|
|
2195
|
-
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
|
2196
|
-
memo = callbackfn(memo, self[index], index, O);
|
|
2197
|
-
}
|
|
2198
|
-
return memo;
|
|
2199
|
-
};
|
|
2200
|
-
};
|
|
2201
|
-
|
|
2202
|
-
var arrayReduce = {
|
|
2203
|
-
// `Array.prototype.reduce` method
|
|
2204
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
2205
|
-
left: createMethod$2(false),
|
|
2206
|
-
// `Array.prototype.reduceRight` method
|
|
2207
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
|
|
2208
|
-
right: createMethod$2(true)
|
|
2209
|
-
};
|
|
2210
|
-
|
|
2211
|
-
var $reduce = arrayReduce.left;
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
var STRICT_METHOD$3 = arrayMethodIsStrict('reduce');
|
|
2216
|
-
var USES_TO_LENGTH$5 = arrayMethodUsesToLength('reduce', { 1: 0 });
|
|
2217
|
-
|
|
2218
|
-
// `Array.prototype.reduce` method
|
|
2219
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
2220
|
-
_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$3 || !USES_TO_LENGTH$5 }, {
|
|
2221
|
-
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
2222
|
-
return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
|
2223
|
-
}
|
|
2224
|
-
});
|
|
2225
|
-
|
|
2226
2167
|
var aPossiblePrototype = function (it) {
|
|
2227
2168
|
if (!isObject(it) && it !== null) {
|
|
2228
2169
|
throw TypeError("Can't set " + String(it) + ' as a prototype');
|
|
@@ -2230,7 +2171,7 @@
|
|
|
2230
2171
|
};
|
|
2231
2172
|
|
|
2232
2173
|
// `Object.setPrototypeOf` method
|
|
2233
|
-
// https://tc39.
|
|
2174
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
2234
2175
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
2235
2176
|
/* eslint-disable no-proto */
|
|
2236
2177
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
@@ -2267,7 +2208,7 @@
|
|
|
2267
2208
|
};
|
|
2268
2209
|
|
|
2269
2210
|
// `Object.defineProperties` method
|
|
2270
|
-
// https://tc39.
|
|
2211
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
2271
2212
|
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
2272
2213
|
anObject(O);
|
|
2273
2214
|
var keys = objectKeys(Properties);
|
|
@@ -2338,7 +2279,7 @@
|
|
|
2338
2279
|
hiddenKeys[IE_PROTO$1] = true;
|
|
2339
2280
|
|
|
2340
2281
|
// `Object.create` method
|
|
2341
|
-
// https://tc39.
|
|
2282
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
2342
2283
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
2343
2284
|
var result;
|
|
2344
2285
|
if (O !== null) {
|
|
@@ -2360,7 +2301,7 @@
|
|
|
2360
2301
|
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
2361
2302
|
|
|
2362
2303
|
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
2363
|
-
var createMethod$
|
|
2304
|
+
var createMethod$2 = function (TYPE) {
|
|
2364
2305
|
return function ($this) {
|
|
2365
2306
|
var string = String(requireObjectCoercible($this));
|
|
2366
2307
|
if (TYPE & 1) string = string.replace(ltrim, '');
|
|
@@ -2371,14 +2312,14 @@
|
|
|
2371
2312
|
|
|
2372
2313
|
var stringTrim = {
|
|
2373
2314
|
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
2374
|
-
// https://tc39.
|
|
2375
|
-
start: createMethod$
|
|
2315
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
2316
|
+
start: createMethod$2(1),
|
|
2376
2317
|
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
2377
|
-
// https://tc39.
|
|
2378
|
-
end: createMethod$
|
|
2318
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
2319
|
+
end: createMethod$2(2),
|
|
2379
2320
|
// `String.prototype.trim` method
|
|
2380
|
-
// https://tc39.
|
|
2381
|
-
trim: createMethod$
|
|
2321
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
2322
|
+
trim: createMethod$2(3)
|
|
2382
2323
|
};
|
|
2383
2324
|
|
|
2384
2325
|
var getOwnPropertyNames = objectGetOwnPropertyNames.f;
|
|
@@ -2394,7 +2335,7 @@
|
|
|
2394
2335
|
var BROKEN_CLASSOF = classofRaw(objectCreate(NumberPrototype)) == NUMBER;
|
|
2395
2336
|
|
|
2396
2337
|
// `ToNumber` abstract operation
|
|
2397
|
-
// https://tc39.
|
|
2338
|
+
// https://tc39.es/ecma262/#sec-tonumber
|
|
2398
2339
|
var toNumber = function (argument) {
|
|
2399
2340
|
var it = toPrimitive(argument, false);
|
|
2400
2341
|
var first, third, radix, maxCode, digits, length, index, code;
|
|
@@ -2423,7 +2364,7 @@
|
|
|
2423
2364
|
};
|
|
2424
2365
|
|
|
2425
2366
|
// `Number` constructor
|
|
2426
|
-
// https://tc39.
|
|
2367
|
+
// https://tc39.es/ecma262/#sec-number-constructor
|
|
2427
2368
|
if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
|
|
2428
2369
|
var NumberWrapper = function Number(value) {
|
|
2429
2370
|
var it = arguments.length < 1 ? 0 : value;
|
|
@@ -2438,7 +2379,9 @@
|
|
|
2438
2379
|
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
|
|
2439
2380
|
// ES2015 (in case, if modules with ES2015 Number statics required before):
|
|
2440
2381
|
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
|
|
2441
|
-
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
|
|
2382
|
+
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
|
|
2383
|
+
// ESNext
|
|
2384
|
+
'fromString,range'
|
|
2442
2385
|
).split(','), j = 0, key; keys$1.length > j; j++) {
|
|
2443
2386
|
if (has(NativeNumber, key = keys$1[j]) && !has(NumberWrapper, key)) {
|
|
2444
2387
|
defineProperty$3(NumberWrapper, key, getOwnPropertyDescriptor$2(NativeNumber, key));
|
|
@@ -2456,7 +2399,7 @@
|
|
|
2456
2399
|
var FORCED$1 = !descriptors || FAILS_ON_PRIMITIVES$2;
|
|
2457
2400
|
|
|
2458
2401
|
// `Object.getOwnPropertyDescriptor` method
|
|
2459
|
-
// https://tc39.
|
|
2402
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
2460
2403
|
_export({ target: 'Object', stat: true, forced: FORCED$1, sham: !descriptors }, {
|
|
2461
2404
|
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
|
2462
2405
|
return nativeGetOwnPropertyDescriptor$1(toIndexedObject(it), key);
|
|
@@ -2494,7 +2437,7 @@
|
|
|
2494
2437
|
var FAILS_ON_PRIMITIVES$3 = fails(function () { return !Object.getOwnPropertyNames(1); });
|
|
2495
2438
|
|
|
2496
2439
|
// `Object.getOwnPropertyNames` method
|
|
2497
|
-
// https://tc39.
|
|
2440
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
2498
2441
|
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$3 }, {
|
|
2499
2442
|
getOwnPropertyNames: nativeGetOwnPropertyNames$1
|
|
2500
2443
|
});
|
|
@@ -2502,7 +2445,7 @@
|
|
|
2502
2445
|
var MATCH = wellKnownSymbol('match');
|
|
2503
2446
|
|
|
2504
2447
|
// `IsRegExp` abstract operation
|
|
2505
|
-
// https://tc39.
|
|
2448
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
|
2506
2449
|
var isRegexp = function (it) {
|
|
2507
2450
|
var isRegExp;
|
|
2508
2451
|
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
|
@@ -2551,7 +2494,7 @@
|
|
|
2551
2494
|
})));
|
|
2552
2495
|
|
|
2553
2496
|
// `RegExp` constructor
|
|
2554
|
-
// https://tc39.
|
|
2497
|
+
// https://tc39.es/ecma262/#sec-regexp-constructor
|
|
2555
2498
|
if (FORCED$2) {
|
|
2556
2499
|
var RegExpWrapper = function RegExp(pattern, flags) {
|
|
2557
2500
|
var thisIsRegExp = this instanceof RegExpWrapper;
|
|
@@ -2600,11 +2543,11 @@
|
|
|
2600
2543
|
redefine(global_1, 'RegExp', RegExpWrapper);
|
|
2601
2544
|
}
|
|
2602
2545
|
|
|
2603
|
-
// https://tc39.
|
|
2546
|
+
// https://tc39.es/ecma262/#sec-get-regexp-@@species
|
|
2604
2547
|
setSpecies('RegExp');
|
|
2605
2548
|
|
|
2606
2549
|
// `String.prototype.{ codePointAt, at }` methods implementation
|
|
2607
|
-
var createMethod$
|
|
2550
|
+
var createMethod$3 = function (CONVERT_TO_STRING) {
|
|
2608
2551
|
return function ($this, pos) {
|
|
2609
2552
|
var S = String(requireObjectCoercible($this));
|
|
2610
2553
|
var position = toInteger(pos);
|
|
@@ -2621,17 +2564,17 @@
|
|
|
2621
2564
|
|
|
2622
2565
|
var stringMultibyte = {
|
|
2623
2566
|
// `String.prototype.codePointAt` method
|
|
2624
|
-
// https://tc39.
|
|
2625
|
-
codeAt: createMethod$
|
|
2567
|
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
2568
|
+
codeAt: createMethod$3(false),
|
|
2626
2569
|
// `String.prototype.at` method
|
|
2627
2570
|
// https://github.com/mathiasbynens/String.prototype.at
|
|
2628
|
-
charAt: createMethod$
|
|
2571
|
+
charAt: createMethod$3(true)
|
|
2629
2572
|
};
|
|
2630
2573
|
|
|
2631
2574
|
var charAt = stringMultibyte.charAt;
|
|
2632
2575
|
|
|
2633
2576
|
// `AdvanceStringIndex` abstract operation
|
|
2634
|
-
// https://tc39.
|
|
2577
|
+
// https://tc39.es/ecma262/#sec-advancestringindex
|
|
2635
2578
|
var advanceStringIndex = function (S, index, unicode) {
|
|
2636
2579
|
return index + (unicode ? charAt(S, index).length : 1);
|
|
2637
2580
|
};
|
|
@@ -2640,14 +2583,14 @@
|
|
|
2640
2583
|
fixRegexpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
|
|
2641
2584
|
return [
|
|
2642
2585
|
// `String.prototype.match` method
|
|
2643
|
-
// https://tc39.
|
|
2586
|
+
// https://tc39.es/ecma262/#sec-string.prototype.match
|
|
2644
2587
|
function match(regexp) {
|
|
2645
2588
|
var O = requireObjectCoercible(this);
|
|
2646
2589
|
var matcher = regexp == undefined ? undefined : regexp[MATCH];
|
|
2647
2590
|
return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
|
|
2648
2591
|
},
|
|
2649
2592
|
// `RegExp.prototype[@@match]` method
|
|
2650
|
-
// https://tc39.
|
|
2593
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@match
|
|
2651
2594
|
function (regexp) {
|
|
2652
2595
|
var res = maybeCallNative(nativeMatch, regexp, this);
|
|
2653
2596
|
if (res.done) return res.value;
|
|
@@ -2673,12 +2616,48 @@
|
|
|
2673
2616
|
];
|
|
2674
2617
|
});
|
|
2675
2618
|
|
|
2676
|
-
var max$2 = Math.max;
|
|
2677
|
-
var min$3 = Math.min;
|
|
2678
2619
|
var floor$1 = Math.floor;
|
|
2620
|
+
var replace = ''.replace;
|
|
2679
2621
|
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
|
|
2680
2622
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
|
|
2681
2623
|
|
|
2624
|
+
// https://tc39.es/ecma262/#sec-getsubstitution
|
|
2625
|
+
var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
|
|
2626
|
+
var tailPos = position + matched.length;
|
|
2627
|
+
var m = captures.length;
|
|
2628
|
+
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
2629
|
+
if (namedCaptures !== undefined) {
|
|
2630
|
+
namedCaptures = toObject(namedCaptures);
|
|
2631
|
+
symbols = SUBSTITUTION_SYMBOLS;
|
|
2632
|
+
}
|
|
2633
|
+
return replace.call(replacement, symbols, function (match, ch) {
|
|
2634
|
+
var capture;
|
|
2635
|
+
switch (ch.charAt(0)) {
|
|
2636
|
+
case '$': return '$';
|
|
2637
|
+
case '&': return matched;
|
|
2638
|
+
case '`': return str.slice(0, position);
|
|
2639
|
+
case "'": return str.slice(tailPos);
|
|
2640
|
+
case '<':
|
|
2641
|
+
capture = namedCaptures[ch.slice(1, -1)];
|
|
2642
|
+
break;
|
|
2643
|
+
default: // \d\d?
|
|
2644
|
+
var n = +ch;
|
|
2645
|
+
if (n === 0) return match;
|
|
2646
|
+
if (n > m) {
|
|
2647
|
+
var f = floor$1(n / 10);
|
|
2648
|
+
if (f === 0) return match;
|
|
2649
|
+
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
|
2650
|
+
return match;
|
|
2651
|
+
}
|
|
2652
|
+
capture = captures[n - 1];
|
|
2653
|
+
}
|
|
2654
|
+
return capture === undefined ? '' : capture;
|
|
2655
|
+
});
|
|
2656
|
+
};
|
|
2657
|
+
|
|
2658
|
+
var max$2 = Math.max;
|
|
2659
|
+
var min$3 = Math.min;
|
|
2660
|
+
|
|
2682
2661
|
var maybeToString = function (it) {
|
|
2683
2662
|
return it === undefined ? it : String(it);
|
|
2684
2663
|
};
|
|
@@ -2691,7 +2670,7 @@
|
|
|
2691
2670
|
|
|
2692
2671
|
return [
|
|
2693
2672
|
// `String.prototype.replace` method
|
|
2694
|
-
// https://tc39.
|
|
2673
|
+
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
2695
2674
|
function replace(searchValue, replaceValue) {
|
|
2696
2675
|
var O = requireObjectCoercible(this);
|
|
2697
2676
|
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
|
|
@@ -2700,7 +2679,7 @@
|
|
|
2700
2679
|
: nativeReplace.call(String(O), searchValue, replaceValue);
|
|
2701
2680
|
},
|
|
2702
2681
|
// `RegExp.prototype[@@replace]` method
|
|
2703
|
-
// https://tc39.
|
|
2682
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
2704
2683
|
function (regexp, replaceValue) {
|
|
2705
2684
|
if (
|
|
2706
2685
|
(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
|
|
@@ -2763,46 +2742,12 @@
|
|
|
2763
2742
|
return accumulatedResult + S.slice(nextSourcePosition);
|
|
2764
2743
|
}
|
|
2765
2744
|
];
|
|
2766
|
-
|
|
2767
|
-
// https://tc39.github.io/ecma262/#sec-getsubstitution
|
|
2768
|
-
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
|
2769
|
-
var tailPos = position + matched.length;
|
|
2770
|
-
var m = captures.length;
|
|
2771
|
-
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
2772
|
-
if (namedCaptures !== undefined) {
|
|
2773
|
-
namedCaptures = toObject(namedCaptures);
|
|
2774
|
-
symbols = SUBSTITUTION_SYMBOLS;
|
|
2775
|
-
}
|
|
2776
|
-
return nativeReplace.call(replacement, symbols, function (match, ch) {
|
|
2777
|
-
var capture;
|
|
2778
|
-
switch (ch.charAt(0)) {
|
|
2779
|
-
case '$': return '$';
|
|
2780
|
-
case '&': return matched;
|
|
2781
|
-
case '`': return str.slice(0, position);
|
|
2782
|
-
case "'": return str.slice(tailPos);
|
|
2783
|
-
case '<':
|
|
2784
|
-
capture = namedCaptures[ch.slice(1, -1)];
|
|
2785
|
-
break;
|
|
2786
|
-
default: // \d\d?
|
|
2787
|
-
var n = +ch;
|
|
2788
|
-
if (n === 0) return match;
|
|
2789
|
-
if (n > m) {
|
|
2790
|
-
var f = floor$1(n / 10);
|
|
2791
|
-
if (f === 0) return match;
|
|
2792
|
-
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
|
2793
|
-
return match;
|
|
2794
|
-
}
|
|
2795
|
-
capture = captures[n - 1];
|
|
2796
|
-
}
|
|
2797
|
-
return capture === undefined ? '' : capture;
|
|
2798
|
-
});
|
|
2799
|
-
}
|
|
2800
2745
|
});
|
|
2801
2746
|
|
|
2802
2747
|
var SPECIES$4 = wellKnownSymbol('species');
|
|
2803
2748
|
|
|
2804
2749
|
// `SpeciesConstructor` abstract operation
|
|
2805
|
-
// https://tc39.
|
|
2750
|
+
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
2806
2751
|
var speciesConstructor = function (O, defaultConstructor) {
|
|
2807
2752
|
var C = anObject(O).constructor;
|
|
2808
2753
|
var S;
|
|
@@ -2871,7 +2816,7 @@
|
|
|
2871
2816
|
|
|
2872
2817
|
return [
|
|
2873
2818
|
// `String.prototype.split` method
|
|
2874
|
-
// https://tc39.
|
|
2819
|
+
// https://tc39.es/ecma262/#sec-string.prototype.split
|
|
2875
2820
|
function split(separator, limit) {
|
|
2876
2821
|
var O = requireObjectCoercible(this);
|
|
2877
2822
|
var splitter = separator == undefined ? undefined : separator[SPLIT];
|
|
@@ -2880,7 +2825,7 @@
|
|
|
2880
2825
|
: internalSplit.call(String(O), separator, limit);
|
|
2881
2826
|
},
|
|
2882
2827
|
// `RegExp.prototype[@@split]` method
|
|
2883
|
-
// https://tc39.
|
|
2828
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
|
2884
2829
|
//
|
|
2885
2830
|
// NOTE: This cannot be properly polyfilled in engines that don't support
|
|
2886
2831
|
// the 'y' flag.
|
|
@@ -3321,7 +3266,7 @@
|
|
|
3321
3266
|
};
|
|
3322
3267
|
|
|
3323
3268
|
// `Symbol` constructor
|
|
3324
|
-
// https://tc39.
|
|
3269
|
+
// https://tc39.es/ecma262/#sec-symbol-constructor
|
|
3325
3270
|
if (!nativeSymbol) {
|
|
3326
3271
|
$Symbol = function Symbol() {
|
|
3327
3272
|
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
|
|
@@ -3378,7 +3323,7 @@
|
|
|
3378
3323
|
|
|
3379
3324
|
_export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
|
|
3380
3325
|
// `Symbol.for` method
|
|
3381
|
-
// https://tc39.
|
|
3326
|
+
// https://tc39.es/ecma262/#sec-symbol.for
|
|
3382
3327
|
'for': function (key) {
|
|
3383
3328
|
var string = String(key);
|
|
3384
3329
|
if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
|
|
@@ -3388,7 +3333,7 @@
|
|
|
3388
3333
|
return symbol;
|
|
3389
3334
|
},
|
|
3390
3335
|
// `Symbol.keyFor` method
|
|
3391
|
-
// https://tc39.
|
|
3336
|
+
// https://tc39.es/ecma262/#sec-symbol.keyfor
|
|
3392
3337
|
keyFor: function keyFor(sym) {
|
|
3393
3338
|
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
|
|
3394
3339
|
if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
|
|
@@ -3399,25 +3344,25 @@
|
|
|
3399
3344
|
|
|
3400
3345
|
_export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
|
|
3401
3346
|
// `Object.create` method
|
|
3402
|
-
// https://tc39.
|
|
3347
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
3403
3348
|
create: $create,
|
|
3404
3349
|
// `Object.defineProperty` method
|
|
3405
|
-
// https://tc39.
|
|
3350
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
3406
3351
|
defineProperty: $defineProperty,
|
|
3407
3352
|
// `Object.defineProperties` method
|
|
3408
|
-
// https://tc39.
|
|
3353
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
3409
3354
|
defineProperties: $defineProperties,
|
|
3410
3355
|
// `Object.getOwnPropertyDescriptor` method
|
|
3411
|
-
// https://tc39.
|
|
3356
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
|
|
3412
3357
|
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
|
3413
3358
|
});
|
|
3414
3359
|
|
|
3415
3360
|
_export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
|
|
3416
3361
|
// `Object.getOwnPropertyNames` method
|
|
3417
|
-
// https://tc39.
|
|
3362
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
3418
3363
|
getOwnPropertyNames: $getOwnPropertyNames,
|
|
3419
3364
|
// `Object.getOwnPropertySymbols` method
|
|
3420
|
-
// https://tc39.
|
|
3365
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertysymbols
|
|
3421
3366
|
getOwnPropertySymbols: $getOwnPropertySymbols
|
|
3422
3367
|
});
|
|
3423
3368
|
|
|
@@ -3430,7 +3375,7 @@
|
|
|
3430
3375
|
});
|
|
3431
3376
|
|
|
3432
3377
|
// `JSON.stringify` method behavior with symbols
|
|
3433
|
-
// https://tc39.
|
|
3378
|
+
// https://tc39.es/ecma262/#sec-json.stringify
|
|
3434
3379
|
if ($stringify) {
|
|
3435
3380
|
var FORCED_JSON_STRINGIFY = !nativeSymbol || fails(function () {
|
|
3436
3381
|
var symbol = $Symbol();
|
|
@@ -3462,12 +3407,12 @@
|
|
|
3462
3407
|
}
|
|
3463
3408
|
|
|
3464
3409
|
// `Symbol.prototype[@@toPrimitive]` method
|
|
3465
|
-
// https://tc39.
|
|
3410
|
+
// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
|
|
3466
3411
|
if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) {
|
|
3467
3412
|
createNonEnumerableProperty($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
|
|
3468
3413
|
}
|
|
3469
3414
|
// `Symbol.prototype[@@toStringTag]` property
|
|
3470
|
-
// https://tc39.
|
|
3415
|
+
// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
|
|
3471
3416
|
setToStringTag($Symbol, SYMBOL);
|
|
3472
3417
|
|
|
3473
3418
|
hiddenKeys[HIDDEN] = true;
|
|
@@ -3516,11 +3461,11 @@
|
|
|
3516
3461
|
}
|
|
3517
3462
|
|
|
3518
3463
|
// `Symbol.species` well-known symbol
|
|
3519
|
-
// https://tc39.
|
|
3464
|
+
// https://tc39.es/ecma262/#sec-symbol.species
|
|
3520
3465
|
defineWellKnownSymbol('species');
|
|
3521
3466
|
|
|
3522
3467
|
// `Array.prototype.fill` method implementation
|
|
3523
|
-
// https://tc39.
|
|
3468
|
+
// https://tc39.es/ecma262/#sec-array.prototype.fill
|
|
3524
3469
|
var arrayFill = function fill(value /* , start = 0, end = @length */) {
|
|
3525
3470
|
var O = toObject(this);
|
|
3526
3471
|
var length = toLength(O.length);
|
|
@@ -3536,7 +3481,7 @@
|
|
|
3536
3481
|
var ArrayPrototype = Array.prototype;
|
|
3537
3482
|
|
|
3538
3483
|
// Array.prototype[@@unscopables]
|
|
3539
|
-
// https://tc39.
|
|
3484
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3540
3485
|
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
3541
3486
|
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
|
3542
3487
|
configurable: true,
|
|
@@ -3550,29 +3495,29 @@
|
|
|
3550
3495
|
};
|
|
3551
3496
|
|
|
3552
3497
|
// `Array.prototype.fill` method
|
|
3553
|
-
// https://tc39.
|
|
3498
|
+
// https://tc39.es/ecma262/#sec-array.prototype.fill
|
|
3554
3499
|
_export({ target: 'Array', proto: true }, {
|
|
3555
3500
|
fill: arrayFill
|
|
3556
3501
|
});
|
|
3557
3502
|
|
|
3558
|
-
// https://tc39.
|
|
3503
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3559
3504
|
addToUnscopables('fill');
|
|
3560
3505
|
|
|
3561
3506
|
var $includes = arrayIncludes.includes;
|
|
3562
3507
|
|
|
3563
3508
|
|
|
3564
3509
|
|
|
3565
|
-
var USES_TO_LENGTH$
|
|
3510
|
+
var USES_TO_LENGTH$4 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
|
3566
3511
|
|
|
3567
3512
|
// `Array.prototype.includes` method
|
|
3568
|
-
// https://tc39.
|
|
3569
|
-
_export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$
|
|
3513
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
3514
|
+
_export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$4 }, {
|
|
3570
3515
|
includes: function includes(el /* , fromIndex = 0 */) {
|
|
3571
3516
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
3572
3517
|
}
|
|
3573
3518
|
});
|
|
3574
3519
|
|
|
3575
|
-
// https://tc39.
|
|
3520
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3576
3521
|
addToUnscopables('includes');
|
|
3577
3522
|
|
|
3578
3523
|
var iterators = {};
|
|
@@ -3583,7 +3528,7 @@
|
|
|
3583
3528
|
var returnThis = function () { return this; };
|
|
3584
3529
|
|
|
3585
3530
|
// `%IteratorPrototype%` object
|
|
3586
|
-
// https://tc39.
|
|
3531
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
3587
3532
|
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
3588
3533
|
|
|
3589
3534
|
if ([].keys) {
|
|
@@ -3596,7 +3541,13 @@
|
|
|
3596
3541
|
}
|
|
3597
3542
|
}
|
|
3598
3543
|
|
|
3599
|
-
|
|
3544
|
+
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
|
|
3545
|
+
var test = {};
|
|
3546
|
+
// FF44- legacy iterators case
|
|
3547
|
+
return IteratorPrototype[ITERATOR].call(test) !== test;
|
|
3548
|
+
});
|
|
3549
|
+
|
|
3550
|
+
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
|
|
3600
3551
|
|
|
3601
3552
|
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
|
3602
3553
|
if ( !has(IteratorPrototype, ITERATOR)) {
|
|
@@ -3706,15 +3657,15 @@
|
|
|
3706
3657
|
var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
|
|
3707
3658
|
|
|
3708
3659
|
// `Array.prototype.entries` method
|
|
3709
|
-
// https://tc39.
|
|
3660
|
+
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
3710
3661
|
// `Array.prototype.keys` method
|
|
3711
|
-
// https://tc39.
|
|
3662
|
+
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
3712
3663
|
// `Array.prototype.values` method
|
|
3713
|
-
// https://tc39.
|
|
3664
|
+
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
3714
3665
|
// `Array.prototype[@@iterator]` method
|
|
3715
|
-
// https://tc39.
|
|
3666
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
3716
3667
|
// `CreateArrayIterator` internal method
|
|
3717
|
-
// https://tc39.
|
|
3668
|
+
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
3718
3669
|
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
3719
3670
|
setInternalState$2(this, {
|
|
3720
3671
|
type: ARRAY_ITERATOR,
|
|
@@ -3723,7 +3674,7 @@
|
|
|
3723
3674
|
kind: kind // kind
|
|
3724
3675
|
});
|
|
3725
3676
|
// `%ArrayIteratorPrototype%.next` method
|
|
3726
|
-
// https://tc39.
|
|
3677
|
+
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
3727
3678
|
}, function () {
|
|
3728
3679
|
var state = getInternalState$1(this);
|
|
3729
3680
|
var target = state.target;
|
|
@@ -3739,54 +3690,26 @@
|
|
|
3739
3690
|
}, 'values');
|
|
3740
3691
|
|
|
3741
3692
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
3742
|
-
// https://tc39.
|
|
3743
|
-
// https://tc39.
|
|
3693
|
+
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
3694
|
+
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
3744
3695
|
iterators.Arguments = iterators.Array;
|
|
3745
3696
|
|
|
3746
|
-
// https://tc39.
|
|
3697
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3747
3698
|
addToUnscopables('keys');
|
|
3748
3699
|
addToUnscopables('values');
|
|
3749
3700
|
addToUnscopables('entries');
|
|
3750
3701
|
|
|
3751
|
-
var min$5 = Math.min;
|
|
3752
|
-
var nativeLastIndexOf = [].lastIndexOf;
|
|
3753
|
-
var NEGATIVE_ZERO$1 = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
|
|
3754
|
-
var STRICT_METHOD$4 = arrayMethodIsStrict('lastIndexOf');
|
|
3755
|
-
// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
|
|
3756
|
-
var USES_TO_LENGTH$7 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
|
3757
|
-
var FORCED$3 = NEGATIVE_ZERO$1 || !STRICT_METHOD$4 || !USES_TO_LENGTH$7;
|
|
3758
|
-
|
|
3759
|
-
// `Array.prototype.lastIndexOf` method implementation
|
|
3760
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
|
|
3761
|
-
var arrayLastIndexOf = FORCED$3 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
|
|
3762
|
-
// convert -0 to +0
|
|
3763
|
-
if (NEGATIVE_ZERO$1) return nativeLastIndexOf.apply(this, arguments) || 0;
|
|
3764
|
-
var O = toIndexedObject(this);
|
|
3765
|
-
var length = toLength(O.length);
|
|
3766
|
-
var index = length - 1;
|
|
3767
|
-
if (arguments.length > 1) index = min$5(index, toInteger(arguments[1]));
|
|
3768
|
-
if (index < 0) index = length + index;
|
|
3769
|
-
for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
|
|
3770
|
-
return -1;
|
|
3771
|
-
} : nativeLastIndexOf;
|
|
3772
|
-
|
|
3773
|
-
// `Array.prototype.lastIndexOf` method
|
|
3774
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
|
|
3775
|
-
_export({ target: 'Array', proto: true, forced: arrayLastIndexOf !== [].lastIndexOf }, {
|
|
3776
|
-
lastIndexOf: arrayLastIndexOf
|
|
3777
|
-
});
|
|
3778
|
-
|
|
3779
3702
|
var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('slice');
|
|
3780
|
-
var USES_TO_LENGTH$
|
|
3703
|
+
var USES_TO_LENGTH$5 = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });
|
|
3781
3704
|
|
|
3782
3705
|
var SPECIES$5 = wellKnownSymbol('species');
|
|
3783
3706
|
var nativeSlice = [].slice;
|
|
3784
3707
|
var max$3 = Math.max;
|
|
3785
3708
|
|
|
3786
3709
|
// `Array.prototype.slice` method
|
|
3787
|
-
// https://tc39.
|
|
3710
|
+
// https://tc39.es/ecma262/#sec-array.prototype.slice
|
|
3788
3711
|
// fallback for not array-like ES3 strings and DOM objects
|
|
3789
|
-
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 || !USES_TO_LENGTH$
|
|
3712
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 || !USES_TO_LENGTH$5 }, {
|
|
3790
3713
|
slice: function slice(start, end) {
|
|
3791
3714
|
var O = toIndexedObject(this);
|
|
3792
3715
|
var length = toLength(O.length);
|
|
@@ -3815,7 +3738,7 @@
|
|
|
3815
3738
|
});
|
|
3816
3739
|
|
|
3817
3740
|
// `Array[@@species]` getter
|
|
3818
|
-
// https://tc39.
|
|
3741
|
+
// https://tc39.es/ecma262/#sec-get-array-@@species
|
|
3819
3742
|
setSpecies('Array');
|
|
3820
3743
|
|
|
3821
3744
|
var arrayBufferNative = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';
|
|
@@ -3832,7 +3755,7 @@
|
|
|
3832
3755
|
};
|
|
3833
3756
|
|
|
3834
3757
|
// `ToIndex` abstract operation
|
|
3835
|
-
// https://tc39.
|
|
3758
|
+
// https://tc39.es/ecma262/#sec-toindex
|
|
3836
3759
|
var toIndex = function (it) {
|
|
3837
3760
|
if (it === undefined) return 0;
|
|
3838
3761
|
var number = toInteger(it);
|
|
@@ -4148,7 +4071,7 @@
|
|
|
4148
4071
|
var NativeArrayBuffer$1 = global_1[ARRAY_BUFFER$1];
|
|
4149
4072
|
|
|
4150
4073
|
// `ArrayBuffer` constructor
|
|
4151
|
-
// https://tc39.
|
|
4074
|
+
// https://tc39.es/ecma262/#sec-arraybuffer-constructor
|
|
4152
4075
|
_export({ global: true, forced: NativeArrayBuffer$1 !== ArrayBuffer$1 }, {
|
|
4153
4076
|
ArrayBuffer: ArrayBuffer$1
|
|
4154
4077
|
});
|
|
@@ -4167,16 +4090,16 @@
|
|
|
4167
4090
|
var regexp = /./;
|
|
4168
4091
|
try {
|
|
4169
4092
|
'/./'[METHOD_NAME](regexp);
|
|
4170
|
-
} catch (
|
|
4093
|
+
} catch (error1) {
|
|
4171
4094
|
try {
|
|
4172
4095
|
regexp[MATCH$2] = false;
|
|
4173
4096
|
return '/./'[METHOD_NAME](regexp);
|
|
4174
|
-
} catch (
|
|
4097
|
+
} catch (error2) { /* empty */ }
|
|
4175
4098
|
} return false;
|
|
4176
4099
|
};
|
|
4177
4100
|
|
|
4178
4101
|
// `String.prototype.includes` method
|
|
4179
|
-
// https://tc39.
|
|
4102
|
+
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
4180
4103
|
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
|
|
4181
4104
|
includes: function includes(searchString /* , position = 0 */) {
|
|
4182
4105
|
return !!~String(requireObjectCoercible(this))
|
|
@@ -4198,7 +4121,7 @@
|
|
|
4198
4121
|
|
|
4199
4122
|
|
|
4200
4123
|
// `String.prototype.trim` method
|
|
4201
|
-
// https://tc39.
|
|
4124
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
4202
4125
|
_export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, {
|
|
4203
4126
|
trim: function trim() {
|
|
4204
4127
|
return $trim(this);
|
|
@@ -4276,13 +4199,24 @@
|
|
|
4276
4199
|
Float64Array: 8
|
|
4277
4200
|
};
|
|
4278
4201
|
|
|
4202
|
+
var BigIntArrayConstructorsList = {
|
|
4203
|
+
BigInt64Array: 8,
|
|
4204
|
+
BigUint64Array: 8
|
|
4205
|
+
};
|
|
4206
|
+
|
|
4279
4207
|
var isView = function isView(it) {
|
|
4208
|
+
if (!isObject(it)) return false;
|
|
4280
4209
|
var klass = classof(it);
|
|
4281
|
-
return klass === 'DataView'
|
|
4210
|
+
return klass === 'DataView'
|
|
4211
|
+
|| has(TypedArrayConstructorsList, klass)
|
|
4212
|
+
|| has(BigIntArrayConstructorsList, klass);
|
|
4282
4213
|
};
|
|
4283
4214
|
|
|
4284
4215
|
var isTypedArray = function (it) {
|
|
4285
|
-
|
|
4216
|
+
if (!isObject(it)) return false;
|
|
4217
|
+
var klass = classof(it);
|
|
4218
|
+
return has(TypedArrayConstructorsList, klass)
|
|
4219
|
+
|| has(BigIntArrayConstructorsList, klass);
|
|
4286
4220
|
};
|
|
4287
4221
|
|
|
4288
4222
|
var aTypedArray = function (it) {
|
|
@@ -4702,24 +4636,24 @@
|
|
|
4702
4636
|
});
|
|
4703
4637
|
|
|
4704
4638
|
// `Uint8Array` constructor
|
|
4705
|
-
// https://tc39.
|
|
4639
|
+
// https://tc39.es/ecma262/#sec-typedarray-objects
|
|
4706
4640
|
typedArrayConstructor('Uint8', function (init) {
|
|
4707
4641
|
return function Uint8Array(data, byteOffset, length) {
|
|
4708
4642
|
return init(this, data, byteOffset, length);
|
|
4709
4643
|
};
|
|
4710
4644
|
});
|
|
4711
4645
|
|
|
4712
|
-
var min$
|
|
4646
|
+
var min$5 = Math.min;
|
|
4713
4647
|
|
|
4714
4648
|
// `Array.prototype.copyWithin` method implementation
|
|
4715
|
-
// https://tc39.
|
|
4649
|
+
// https://tc39.es/ecma262/#sec-array.prototype.copywithin
|
|
4716
4650
|
var arrayCopyWithin = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
|
|
4717
4651
|
var O = toObject(this);
|
|
4718
4652
|
var len = toLength(O.length);
|
|
4719
4653
|
var to = toAbsoluteIndex(target, len);
|
|
4720
4654
|
var from = toAbsoluteIndex(start, len);
|
|
4721
4655
|
var end = arguments.length > 2 ? arguments[2] : undefined;
|
|
4722
|
-
var count = min$
|
|
4656
|
+
var count = min$5((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
|
|
4723
4657
|
var inc = 1;
|
|
4724
4658
|
if (from < to && to < from + count) {
|
|
4725
4659
|
inc = -1;
|
|
@@ -4738,7 +4672,7 @@
|
|
|
4738
4672
|
var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4739
4673
|
|
|
4740
4674
|
// `%TypedArray%.prototype.copyWithin` method
|
|
4741
|
-
// https://tc39.
|
|
4675
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
|
|
4742
4676
|
exportTypedArrayMethod$1('copyWithin', function copyWithin(target, start /* , end */) {
|
|
4743
4677
|
return arrayCopyWithin.call(aTypedArray$1(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
|
|
4744
4678
|
});
|
|
@@ -4749,7 +4683,7 @@
|
|
|
4749
4683
|
var exportTypedArrayMethod$2 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4750
4684
|
|
|
4751
4685
|
// `%TypedArray%.prototype.every` method
|
|
4752
|
-
// https://tc39.
|
|
4686
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
|
|
4753
4687
|
exportTypedArrayMethod$2('every', function every(callbackfn /* , thisArg */) {
|
|
4754
4688
|
return $every(aTypedArray$2(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
4755
4689
|
});
|
|
@@ -4758,7 +4692,7 @@
|
|
|
4758
4692
|
var exportTypedArrayMethod$3 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4759
4693
|
|
|
4760
4694
|
// `%TypedArray%.prototype.fill` method
|
|
4761
|
-
// https://tc39.
|
|
4695
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
|
|
4762
4696
|
// eslint-disable-next-line no-unused-vars
|
|
4763
4697
|
exportTypedArrayMethod$3('fill', function fill(value /* , start, end */) {
|
|
4764
4698
|
return arrayFill.apply(aTypedArray$3(this), arguments);
|
|
@@ -4772,7 +4706,7 @@
|
|
|
4772
4706
|
var exportTypedArrayMethod$4 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4773
4707
|
|
|
4774
4708
|
// `%TypedArray%.prototype.filter` method
|
|
4775
|
-
// https://tc39.
|
|
4709
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
|
|
4776
4710
|
exportTypedArrayMethod$4('filter', function filter(callbackfn /* , thisArg */) {
|
|
4777
4711
|
var list = $filter$1(aTypedArray$4(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
4778
4712
|
var C = speciesConstructor(this, this.constructor);
|
|
@@ -4789,7 +4723,7 @@
|
|
|
4789
4723
|
var exportTypedArrayMethod$5 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4790
4724
|
|
|
4791
4725
|
// `%TypedArray%.prototype.find` method
|
|
4792
|
-
// https://tc39.
|
|
4726
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
|
|
4793
4727
|
exportTypedArrayMethod$5('find', function find(predicate /* , thisArg */) {
|
|
4794
4728
|
return $find(aTypedArray$5(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
|
|
4795
4729
|
});
|
|
@@ -4800,7 +4734,7 @@
|
|
|
4800
4734
|
var exportTypedArrayMethod$6 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4801
4735
|
|
|
4802
4736
|
// `%TypedArray%.prototype.findIndex` method
|
|
4803
|
-
// https://tc39.
|
|
4737
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
|
|
4804
4738
|
exportTypedArrayMethod$6('findIndex', function findIndex(predicate /* , thisArg */) {
|
|
4805
4739
|
return $findIndex(aTypedArray$6(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
|
|
4806
4740
|
});
|
|
@@ -4811,7 +4745,7 @@
|
|
|
4811
4745
|
var exportTypedArrayMethod$7 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4812
4746
|
|
|
4813
4747
|
// `%TypedArray%.prototype.forEach` method
|
|
4814
|
-
// https://tc39.
|
|
4748
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
|
|
4815
4749
|
exportTypedArrayMethod$7('forEach', function forEach(callbackfn /* , thisArg */) {
|
|
4816
4750
|
$forEach$2(aTypedArray$7(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
4817
4751
|
});
|
|
@@ -4822,20 +4756,20 @@
|
|
|
4822
4756
|
var exportTypedArrayMethod$8 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4823
4757
|
|
|
4824
4758
|
// `%TypedArray%.prototype.includes` method
|
|
4825
|
-
// https://tc39.
|
|
4759
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
|
|
4826
4760
|
exportTypedArrayMethod$8('includes', function includes(searchElement /* , fromIndex */) {
|
|
4827
4761
|
return $includes$1(aTypedArray$8(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
4828
4762
|
});
|
|
4829
4763
|
|
|
4830
|
-
var $indexOf
|
|
4764
|
+
var $indexOf = arrayIncludes.indexOf;
|
|
4831
4765
|
|
|
4832
4766
|
var aTypedArray$9 = arrayBufferViewCore.aTypedArray;
|
|
4833
4767
|
var exportTypedArrayMethod$9 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4834
4768
|
|
|
4835
4769
|
// `%TypedArray%.prototype.indexOf` method
|
|
4836
|
-
// https://tc39.
|
|
4770
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
|
|
4837
4771
|
exportTypedArrayMethod$9('indexOf', function indexOf(searchElement /* , fromIndex */) {
|
|
4838
|
-
return $indexOf
|
|
4772
|
+
return $indexOf(aTypedArray$9(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
4839
4773
|
});
|
|
4840
4774
|
|
|
4841
4775
|
var ITERATOR$5 = wellKnownSymbol('iterator');
|
|
@@ -4855,20 +4789,20 @@
|
|
|
4855
4789
|
};
|
|
4856
4790
|
|
|
4857
4791
|
// `%TypedArray%.prototype.entries` method
|
|
4858
|
-
// https://tc39.
|
|
4792
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
|
|
4859
4793
|
exportTypedArrayMethod$a('entries', function entries() {
|
|
4860
4794
|
return arrayEntries.call(aTypedArray$a(this));
|
|
4861
4795
|
});
|
|
4862
4796
|
// `%TypedArray%.prototype.keys` method
|
|
4863
|
-
// https://tc39.
|
|
4797
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
|
|
4864
4798
|
exportTypedArrayMethod$a('keys', function keys() {
|
|
4865
4799
|
return arrayKeys.call(aTypedArray$a(this));
|
|
4866
4800
|
});
|
|
4867
4801
|
// `%TypedArray%.prototype.values` method
|
|
4868
|
-
// https://tc39.
|
|
4802
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
|
|
4869
4803
|
exportTypedArrayMethod$a('values', typedArrayValues, !CORRECT_ITER_NAME);
|
|
4870
4804
|
// `%TypedArray%.prototype[@@iterator]` method
|
|
4871
|
-
// https://tc39.
|
|
4805
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
|
|
4872
4806
|
exportTypedArrayMethod$a(ITERATOR$5, typedArrayValues, !CORRECT_ITER_NAME);
|
|
4873
4807
|
|
|
4874
4808
|
var aTypedArray$b = arrayBufferViewCore.aTypedArray;
|
|
@@ -4876,17 +4810,39 @@
|
|
|
4876
4810
|
var $join = [].join;
|
|
4877
4811
|
|
|
4878
4812
|
// `%TypedArray%.prototype.join` method
|
|
4879
|
-
// https://tc39.
|
|
4813
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
|
|
4880
4814
|
// eslint-disable-next-line no-unused-vars
|
|
4881
4815
|
exportTypedArrayMethod$b('join', function join(separator) {
|
|
4882
4816
|
return $join.apply(aTypedArray$b(this), arguments);
|
|
4883
4817
|
});
|
|
4884
4818
|
|
|
4819
|
+
var min$6 = Math.min;
|
|
4820
|
+
var nativeLastIndexOf = [].lastIndexOf;
|
|
4821
|
+
var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
|
|
4822
|
+
var STRICT_METHOD$2 = arrayMethodIsStrict('lastIndexOf');
|
|
4823
|
+
// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
|
|
4824
|
+
var USES_TO_LENGTH$6 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
|
4825
|
+
var FORCED$3 = NEGATIVE_ZERO || !STRICT_METHOD$2 || !USES_TO_LENGTH$6;
|
|
4826
|
+
|
|
4827
|
+
// `Array.prototype.lastIndexOf` method implementation
|
|
4828
|
+
// https://tc39.es/ecma262/#sec-array.prototype.lastindexof
|
|
4829
|
+
var arrayLastIndexOf = FORCED$3 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
|
|
4830
|
+
// convert -0 to +0
|
|
4831
|
+
if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
|
|
4832
|
+
var O = toIndexedObject(this);
|
|
4833
|
+
var length = toLength(O.length);
|
|
4834
|
+
var index = length - 1;
|
|
4835
|
+
if (arguments.length > 1) index = min$6(index, toInteger(arguments[1]));
|
|
4836
|
+
if (index < 0) index = length + index;
|
|
4837
|
+
for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
|
|
4838
|
+
return -1;
|
|
4839
|
+
} : nativeLastIndexOf;
|
|
4840
|
+
|
|
4885
4841
|
var aTypedArray$c = arrayBufferViewCore.aTypedArray;
|
|
4886
4842
|
var exportTypedArrayMethod$c = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4887
4843
|
|
|
4888
4844
|
// `%TypedArray%.prototype.lastIndexOf` method
|
|
4889
|
-
// https://tc39.
|
|
4845
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
|
|
4890
4846
|
// eslint-disable-next-line no-unused-vars
|
|
4891
4847
|
exportTypedArrayMethod$c('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
|
|
4892
4848
|
return arrayLastIndexOf.apply(aTypedArray$c(this), arguments);
|
|
@@ -4900,22 +4856,58 @@
|
|
|
4900
4856
|
var exportTypedArrayMethod$d = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4901
4857
|
|
|
4902
4858
|
// `%TypedArray%.prototype.map` method
|
|
4903
|
-
// https://tc39.
|
|
4859
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
|
|
4904
4860
|
exportTypedArrayMethod$d('map', function map(mapfn /* , thisArg */) {
|
|
4905
4861
|
return $map$1(aTypedArray$d(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
|
|
4906
4862
|
return new (aTypedArrayConstructor$3(speciesConstructor(O, O.constructor)))(length);
|
|
4907
4863
|
});
|
|
4908
4864
|
});
|
|
4909
4865
|
|
|
4910
|
-
|
|
4866
|
+
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
4867
|
+
var createMethod$4 = function (IS_RIGHT) {
|
|
4868
|
+
return function (that, callbackfn, argumentsLength, memo) {
|
|
4869
|
+
aFunction$1(callbackfn);
|
|
4870
|
+
var O = toObject(that);
|
|
4871
|
+
var self = indexedObject(O);
|
|
4872
|
+
var length = toLength(O.length);
|
|
4873
|
+
var index = IS_RIGHT ? length - 1 : 0;
|
|
4874
|
+
var i = IS_RIGHT ? -1 : 1;
|
|
4875
|
+
if (argumentsLength < 2) while (true) {
|
|
4876
|
+
if (index in self) {
|
|
4877
|
+
memo = self[index];
|
|
4878
|
+
index += i;
|
|
4879
|
+
break;
|
|
4880
|
+
}
|
|
4881
|
+
index += i;
|
|
4882
|
+
if (IS_RIGHT ? index < 0 : length <= index) {
|
|
4883
|
+
throw TypeError('Reduce of empty array with no initial value');
|
|
4884
|
+
}
|
|
4885
|
+
}
|
|
4886
|
+
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
|
4887
|
+
memo = callbackfn(memo, self[index], index, O);
|
|
4888
|
+
}
|
|
4889
|
+
return memo;
|
|
4890
|
+
};
|
|
4891
|
+
};
|
|
4892
|
+
|
|
4893
|
+
var arrayReduce = {
|
|
4894
|
+
// `Array.prototype.reduce` method
|
|
4895
|
+
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
4896
|
+
left: createMethod$4(false),
|
|
4897
|
+
// `Array.prototype.reduceRight` method
|
|
4898
|
+
// https://tc39.es/ecma262/#sec-array.prototype.reduceright
|
|
4899
|
+
right: createMethod$4(true)
|
|
4900
|
+
};
|
|
4901
|
+
|
|
4902
|
+
var $reduce = arrayReduce.left;
|
|
4911
4903
|
|
|
4912
4904
|
var aTypedArray$e = arrayBufferViewCore.aTypedArray;
|
|
4913
4905
|
var exportTypedArrayMethod$e = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4914
4906
|
|
|
4915
4907
|
// `%TypedArray%.prototype.reduce` method
|
|
4916
|
-
// https://tc39.
|
|
4908
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
|
|
4917
4909
|
exportTypedArrayMethod$e('reduce', function reduce(callbackfn /* , initialValue */) {
|
|
4918
|
-
return $reduce
|
|
4910
|
+
return $reduce(aTypedArray$e(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
|
4919
4911
|
});
|
|
4920
4912
|
|
|
4921
4913
|
var $reduceRight = arrayReduce.right;
|
|
@@ -4924,7 +4916,7 @@
|
|
|
4924
4916
|
var exportTypedArrayMethod$f = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4925
4917
|
|
|
4926
4918
|
// `%TypedArray%.prototype.reduceRicht` method
|
|
4927
|
-
// https://tc39.
|
|
4919
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
|
|
4928
4920
|
exportTypedArrayMethod$f('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
|
|
4929
4921
|
return $reduceRight(aTypedArray$f(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
|
4930
4922
|
});
|
|
@@ -4934,7 +4926,7 @@
|
|
|
4934
4926
|
var floor$3 = Math.floor;
|
|
4935
4927
|
|
|
4936
4928
|
// `%TypedArray%.prototype.reverse` method
|
|
4937
|
-
// https://tc39.
|
|
4929
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
|
|
4938
4930
|
exportTypedArrayMethod$g('reverse', function reverse() {
|
|
4939
4931
|
var that = this;
|
|
4940
4932
|
var length = aTypedArray$g(that).length;
|
|
@@ -4957,7 +4949,7 @@
|
|
|
4957
4949
|
});
|
|
4958
4950
|
|
|
4959
4951
|
// `%TypedArray%.prototype.set` method
|
|
4960
|
-
// https://tc39.
|
|
4952
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
|
|
4961
4953
|
exportTypedArrayMethod$h('set', function set(arrayLike /* , offset */) {
|
|
4962
4954
|
aTypedArray$h(this);
|
|
4963
4955
|
var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
|
|
@@ -4980,7 +4972,7 @@
|
|
|
4980
4972
|
});
|
|
4981
4973
|
|
|
4982
4974
|
// `%TypedArray%.prototype.slice` method
|
|
4983
|
-
// https://tc39.
|
|
4975
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
|
|
4984
4976
|
exportTypedArrayMethod$i('slice', function slice(start, end) {
|
|
4985
4977
|
var list = $slice.call(aTypedArray$i(this), start, end);
|
|
4986
4978
|
var C = speciesConstructor(this, this.constructor);
|
|
@@ -4997,7 +4989,7 @@
|
|
|
4997
4989
|
var exportTypedArrayMethod$j = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4998
4990
|
|
|
4999
4991
|
// `%TypedArray%.prototype.some` method
|
|
5000
|
-
// https://tc39.
|
|
4992
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
|
|
5001
4993
|
exportTypedArrayMethod$j('some', function some(callbackfn /* , thisArg */) {
|
|
5002
4994
|
return $some(aTypedArray$j(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
5003
4995
|
});
|
|
@@ -5007,7 +4999,7 @@
|
|
|
5007
4999
|
var $sort = [].sort;
|
|
5008
5000
|
|
|
5009
5001
|
// `%TypedArray%.prototype.sort` method
|
|
5010
|
-
// https://tc39.
|
|
5002
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
|
|
5011
5003
|
exportTypedArrayMethod$k('sort', function sort(comparefn) {
|
|
5012
5004
|
return $sort.call(aTypedArray$k(this), comparefn);
|
|
5013
5005
|
});
|
|
@@ -5016,7 +5008,7 @@
|
|
|
5016
5008
|
var exportTypedArrayMethod$l = arrayBufferViewCore.exportTypedArrayMethod;
|
|
5017
5009
|
|
|
5018
5010
|
// `%TypedArray%.prototype.subarray` method
|
|
5019
|
-
// https://tc39.
|
|
5011
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
|
|
5020
5012
|
exportTypedArrayMethod$l('subarray', function subarray(begin, end) {
|
|
5021
5013
|
var O = aTypedArray$l(this);
|
|
5022
5014
|
var length = O.length;
|
|
@@ -5046,7 +5038,7 @@
|
|
|
5046
5038
|
});
|
|
5047
5039
|
|
|
5048
5040
|
// `%TypedArray%.prototype.toLocaleString` method
|
|
5049
|
-
// https://tc39.
|
|
5041
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
|
|
5050
5042
|
exportTypedArrayMethod$m('toLocaleString', function toLocaleString() {
|
|
5051
5043
|
return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice$1.call(aTypedArray$m(this)) : aTypedArray$m(this), arguments);
|
|
5052
5044
|
}, FORCED$6);
|
|
@@ -5069,7 +5061,7 @@
|
|
|
5069
5061
|
var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
|
|
5070
5062
|
|
|
5071
5063
|
// `%TypedArray%.prototype.toString` method
|
|
5072
|
-
// https://tc39.
|
|
5064
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
|
|
5073
5065
|
exportTypedArrayMethod$n('toString', arrayToString, IS_NOT_ARRAY_METHOD);
|
|
5074
5066
|
|
|
5075
5067
|
// `URL.prototype.toJSON` method
|
|
@@ -7253,7 +7245,7 @@
|
|
|
7253
7245
|
|
|
7254
7246
|
var performance$1 = global$2.performance || {};
|
|
7255
7247
|
|
|
7256
|
-
|
|
7248
|
+
performance$1.now || performance$1.mozNow || performance$1.msNow || performance$1.oNow || performance$1.webkitNow || function () {
|
|
7257
7249
|
return new Date().getTime();
|
|
7258
7250
|
}; // generate timestamp or delta
|
|
7259
7251
|
|
|
@@ -10995,6 +10987,7 @@
|
|
|
10995
10987
|
return -1;
|
|
10996
10988
|
}
|
|
10997
10989
|
|
|
10990
|
+
// A bit simpler than readable streams.
|
|
10998
10991
|
Writable.WritableState = WritableState;
|
|
10999
10992
|
inherits$1(Writable, EventEmitter);
|
|
11000
10993
|
|
|
@@ -11741,28 +11734,38 @@
|
|
|
11741
11734
|
|
|
11742
11735
|
var nativePromiseConstructor = global_1.Promise;
|
|
11743
11736
|
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
return
|
|
11748
|
-
// 7.4.6 IteratorClose(iterator, completion)
|
|
11749
|
-
} catch (error) {
|
|
11750
|
-
var returnMethod = iterator['return'];
|
|
11751
|
-
if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
|
|
11752
|
-
throw error;
|
|
11737
|
+
var iteratorClose = function (iterator) {
|
|
11738
|
+
var returnMethod = iterator['return'];
|
|
11739
|
+
if (returnMethod !== undefined) {
|
|
11740
|
+
return anObject(returnMethod.call(iterator)).value;
|
|
11753
11741
|
}
|
|
11754
11742
|
};
|
|
11755
11743
|
|
|
11756
|
-
var iterate_1 = createCommonjsModule(function (module) {
|
|
11757
11744
|
var Result = function (stopped, result) {
|
|
11758
11745
|
this.stopped = stopped;
|
|
11759
11746
|
this.result = result;
|
|
11760
11747
|
};
|
|
11761
11748
|
|
|
11762
|
-
var iterate =
|
|
11763
|
-
var
|
|
11749
|
+
var iterate = function (iterable, unboundFunction, options) {
|
|
11750
|
+
var that = options && options.that;
|
|
11751
|
+
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
11752
|
+
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
11753
|
+
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
11754
|
+
var fn = functionBindContext(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
|
|
11764
11755
|
var iterator, iterFn, index, length, result, next, step;
|
|
11765
11756
|
|
|
11757
|
+
var stop = function (condition) {
|
|
11758
|
+
if (iterator) iteratorClose(iterator);
|
|
11759
|
+
return new Result(true, condition);
|
|
11760
|
+
};
|
|
11761
|
+
|
|
11762
|
+
var callFn = function (value) {
|
|
11763
|
+
if (AS_ENTRIES) {
|
|
11764
|
+
anObject(value);
|
|
11765
|
+
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
11766
|
+
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
11767
|
+
};
|
|
11768
|
+
|
|
11766
11769
|
if (IS_ITERATOR) {
|
|
11767
11770
|
iterator = iterable;
|
|
11768
11771
|
} else {
|
|
@@ -11771,9 +11774,7 @@
|
|
|
11771
11774
|
// optimisation for array iterators
|
|
11772
11775
|
if (isArrayIteratorMethod(iterFn)) {
|
|
11773
11776
|
for (index = 0, length = toLength(iterable.length); length > index; index++) {
|
|
11774
|
-
result =
|
|
11775
|
-
? boundFunction(anObject(step = iterable[index])[0], step[1])
|
|
11776
|
-
: boundFunction(iterable[index]);
|
|
11777
|
+
result = callFn(iterable[index]);
|
|
11777
11778
|
if (result && result instanceof Result) return result;
|
|
11778
11779
|
} return new Result(false);
|
|
11779
11780
|
}
|
|
@@ -11782,18 +11783,20 @@
|
|
|
11782
11783
|
|
|
11783
11784
|
next = iterator.next;
|
|
11784
11785
|
while (!(step = next.call(iterator)).done) {
|
|
11785
|
-
|
|
11786
|
+
try {
|
|
11787
|
+
result = callFn(step.value);
|
|
11788
|
+
} catch (error) {
|
|
11789
|
+
iteratorClose(iterator);
|
|
11790
|
+
throw error;
|
|
11791
|
+
}
|
|
11786
11792
|
if (typeof result == 'object' && result && result instanceof Result) return result;
|
|
11787
11793
|
} return new Result(false);
|
|
11788
11794
|
};
|
|
11789
11795
|
|
|
11790
|
-
iterate.stop = function (result) {
|
|
11791
|
-
return new Result(true, result);
|
|
11792
|
-
};
|
|
11793
|
-
});
|
|
11794
|
-
|
|
11795
11796
|
var engineIsIos = /(iphone|ipod|ipad).*applewebkit/i.test(engineUserAgent);
|
|
11796
11797
|
|
|
11798
|
+
var engineIsNode = classofRaw(global_1.process) == 'process';
|
|
11799
|
+
|
|
11797
11800
|
var location$1 = global_1.location;
|
|
11798
11801
|
var set$2 = global_1.setImmediate;
|
|
11799
11802
|
var clear = global_1.clearImmediate;
|
|
@@ -11846,7 +11849,7 @@
|
|
|
11846
11849
|
delete queue$2[id];
|
|
11847
11850
|
};
|
|
11848
11851
|
// Node.js 0.8-
|
|
11849
|
-
if (
|
|
11852
|
+
if (engineIsNode) {
|
|
11850
11853
|
defer = function (id) {
|
|
11851
11854
|
process$2.nextTick(runner(id));
|
|
11852
11855
|
};
|
|
@@ -11868,8 +11871,8 @@
|
|
|
11868
11871
|
global_1.addEventListener &&
|
|
11869
11872
|
typeof postMessage == 'function' &&
|
|
11870
11873
|
!global_1.importScripts &&
|
|
11871
|
-
|
|
11872
|
-
|
|
11874
|
+
location$1 && location$1.protocol !== 'file:' &&
|
|
11875
|
+
!fails(post)
|
|
11873
11876
|
) {
|
|
11874
11877
|
defer = post;
|
|
11875
11878
|
global_1.addEventListener('message', listener, false);
|
|
@@ -11894,15 +11897,18 @@
|
|
|
11894
11897
|
clear: clear
|
|
11895
11898
|
};
|
|
11896
11899
|
|
|
11897
|
-
var
|
|
11900
|
+
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(engineUserAgent);
|
|
11898
11901
|
|
|
11902
|
+
var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
|
|
11899
11903
|
var macrotask = task.set;
|
|
11900
11904
|
|
|
11901
11905
|
|
|
11906
|
+
|
|
11907
|
+
|
|
11902
11908
|
var MutationObserver = global_1.MutationObserver || global_1.WebKitMutationObserver;
|
|
11909
|
+
var document$2 = global_1.document;
|
|
11903
11910
|
var process$3 = global_1.process;
|
|
11904
11911
|
var Promise$1 = global_1.Promise;
|
|
11905
|
-
var IS_NODE = classofRaw(process$3) == 'process';
|
|
11906
11912
|
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
|
11907
11913
|
var queueMicrotaskDescriptor = getOwnPropertyDescriptor$3(global_1, 'queueMicrotask');
|
|
11908
11914
|
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
|
@@ -11913,7 +11919,7 @@
|
|
|
11913
11919
|
if (!queueMicrotask) {
|
|
11914
11920
|
flush = function () {
|
|
11915
11921
|
var parent, fn;
|
|
11916
|
-
if (
|
|
11922
|
+
if (engineIsNode && (parent = process$3.domain)) parent.exit();
|
|
11917
11923
|
while (head) {
|
|
11918
11924
|
fn = head.fn;
|
|
11919
11925
|
head = head.next;
|
|
@@ -11928,15 +11934,11 @@
|
|
|
11928
11934
|
if (parent) parent.enter();
|
|
11929
11935
|
};
|
|
11930
11936
|
|
|
11931
|
-
// Node.js
|
|
11932
|
-
if (IS_NODE) {
|
|
11933
|
-
notify = function () {
|
|
11934
|
-
process$3.nextTick(flush);
|
|
11935
|
-
};
|
|
11936
11937
|
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
|
|
11937
|
-
|
|
11938
|
+
// also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
|
|
11939
|
+
if (!engineIsIos && !engineIsNode && !engineIsWebosWebkit && MutationObserver && document$2) {
|
|
11938
11940
|
toggle = true;
|
|
11939
|
-
node = document.createTextNode('');
|
|
11941
|
+
node = document$2.createTextNode('');
|
|
11940
11942
|
new MutationObserver(flush).observe(node, { characterData: true });
|
|
11941
11943
|
notify = function () {
|
|
11942
11944
|
node.data = toggle = !toggle;
|
|
@@ -11949,6 +11951,11 @@
|
|
|
11949
11951
|
notify = function () {
|
|
11950
11952
|
then.call(promise, flush);
|
|
11951
11953
|
};
|
|
11954
|
+
// Node.js without promises
|
|
11955
|
+
} else if (engineIsNode) {
|
|
11956
|
+
notify = function () {
|
|
11957
|
+
process$3.nextTick(flush);
|
|
11958
|
+
};
|
|
11952
11959
|
// for other environments - macrotask based on:
|
|
11953
11960
|
// - setImmediate
|
|
11954
11961
|
// - MessageChannel
|
|
@@ -12027,6 +12034,7 @@
|
|
|
12027
12034
|
|
|
12028
12035
|
|
|
12029
12036
|
|
|
12037
|
+
|
|
12030
12038
|
var SPECIES$6 = wellKnownSymbol('species');
|
|
12031
12039
|
var PROMISE = 'Promise';
|
|
12032
12040
|
var getInternalState$3 = internalState.get;
|
|
@@ -12034,13 +12042,13 @@
|
|
|
12034
12042
|
var getInternalPromiseState = internalState.getterFor(PROMISE);
|
|
12035
12043
|
var PromiseConstructor = nativePromiseConstructor;
|
|
12036
12044
|
var TypeError$1 = global_1.TypeError;
|
|
12037
|
-
var document$
|
|
12045
|
+
var document$3 = global_1.document;
|
|
12038
12046
|
var process$4 = global_1.process;
|
|
12039
12047
|
var $fetch = getBuiltIn('fetch');
|
|
12040
12048
|
var newPromiseCapability$1 = newPromiseCapability.f;
|
|
12041
12049
|
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
12042
|
-
var
|
|
12043
|
-
var
|
|
12050
|
+
var DISPATCH_EVENT = !!(document$3 && document$3.createEvent && global_1.dispatchEvent);
|
|
12051
|
+
var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
|
|
12044
12052
|
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
12045
12053
|
var REJECTION_HANDLED = 'rejectionhandled';
|
|
12046
12054
|
var PENDING = 0;
|
|
@@ -12058,7 +12066,7 @@
|
|
|
12058
12066
|
// We can't detect it synchronously, so just check versions
|
|
12059
12067
|
if (engineV8Version === 66) return true;
|
|
12060
12068
|
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
12061
|
-
if (!
|
|
12069
|
+
if (!engineIsNode && !NATIVE_REJECTION_EVENT) return true;
|
|
12062
12070
|
}
|
|
12063
12071
|
// We can't use @@species feature detection in V8 since it causes
|
|
12064
12072
|
// deoptimization and performance degradation
|
|
@@ -12084,7 +12092,7 @@
|
|
|
12084
12092
|
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
|
|
12085
12093
|
};
|
|
12086
12094
|
|
|
12087
|
-
var notify$1 = function (
|
|
12095
|
+
var notify$1 = function (state, isReject) {
|
|
12088
12096
|
if (state.notified) return;
|
|
12089
12097
|
state.notified = true;
|
|
12090
12098
|
var chain = state.reactions;
|
|
@@ -12103,7 +12111,7 @@
|
|
|
12103
12111
|
try {
|
|
12104
12112
|
if (handler) {
|
|
12105
12113
|
if (!ok) {
|
|
12106
|
-
if (state.rejection === UNHANDLED) onHandleUnhandled(
|
|
12114
|
+
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
12107
12115
|
state.rejection = HANDLED;
|
|
12108
12116
|
}
|
|
12109
12117
|
if (handler === true) result = value;
|
|
@@ -12128,36 +12136,37 @@
|
|
|
12128
12136
|
}
|
|
12129
12137
|
state.reactions = [];
|
|
12130
12138
|
state.notified = false;
|
|
12131
|
-
if (isReject && !state.rejection) onUnhandled(
|
|
12139
|
+
if (isReject && !state.rejection) onUnhandled(state);
|
|
12132
12140
|
});
|
|
12133
12141
|
};
|
|
12134
12142
|
|
|
12135
12143
|
var dispatchEvent = function (name, promise, reason) {
|
|
12136
12144
|
var event, handler;
|
|
12137
12145
|
if (DISPATCH_EVENT) {
|
|
12138
|
-
event = document$
|
|
12146
|
+
event = document$3.createEvent('Event');
|
|
12139
12147
|
event.promise = promise;
|
|
12140
12148
|
event.reason = reason;
|
|
12141
12149
|
event.initEvent(name, false, true);
|
|
12142
12150
|
global_1.dispatchEvent(event);
|
|
12143
12151
|
} else event = { promise: promise, reason: reason };
|
|
12144
|
-
if (handler = global_1['on' + name]) handler(event);
|
|
12152
|
+
if (!NATIVE_REJECTION_EVENT && (handler = global_1['on' + name])) handler(event);
|
|
12145
12153
|
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
12146
12154
|
};
|
|
12147
12155
|
|
|
12148
|
-
var onUnhandled = function (
|
|
12156
|
+
var onUnhandled = function (state) {
|
|
12149
12157
|
task$1.call(global_1, function () {
|
|
12158
|
+
var promise = state.facade;
|
|
12150
12159
|
var value = state.value;
|
|
12151
12160
|
var IS_UNHANDLED = isUnhandled(state);
|
|
12152
12161
|
var result;
|
|
12153
12162
|
if (IS_UNHANDLED) {
|
|
12154
12163
|
result = perform(function () {
|
|
12155
|
-
if (
|
|
12164
|
+
if (engineIsNode) {
|
|
12156
12165
|
process$4.emit('unhandledRejection', value, promise);
|
|
12157
12166
|
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
12158
12167
|
});
|
|
12159
12168
|
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
12160
|
-
state.rejection =
|
|
12169
|
+
state.rejection = engineIsNode || isUnhandled(state) ? UNHANDLED : HANDLED;
|
|
12161
12170
|
if (result.error) throw result.value;
|
|
12162
12171
|
}
|
|
12163
12172
|
});
|
|
@@ -12167,55 +12176,56 @@
|
|
|
12167
12176
|
return state.rejection !== HANDLED && !state.parent;
|
|
12168
12177
|
};
|
|
12169
12178
|
|
|
12170
|
-
var onHandleUnhandled = function (
|
|
12179
|
+
var onHandleUnhandled = function (state) {
|
|
12171
12180
|
task$1.call(global_1, function () {
|
|
12172
|
-
|
|
12181
|
+
var promise = state.facade;
|
|
12182
|
+
if (engineIsNode) {
|
|
12173
12183
|
process$4.emit('rejectionHandled', promise);
|
|
12174
12184
|
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
12175
12185
|
});
|
|
12176
12186
|
};
|
|
12177
12187
|
|
|
12178
|
-
var bind = function (fn,
|
|
12188
|
+
var bind = function (fn, state, unwrap) {
|
|
12179
12189
|
return function (value) {
|
|
12180
|
-
fn(
|
|
12190
|
+
fn(state, value, unwrap);
|
|
12181
12191
|
};
|
|
12182
12192
|
};
|
|
12183
12193
|
|
|
12184
|
-
var internalReject = function (
|
|
12194
|
+
var internalReject = function (state, value, unwrap) {
|
|
12185
12195
|
if (state.done) return;
|
|
12186
12196
|
state.done = true;
|
|
12187
12197
|
if (unwrap) state = unwrap;
|
|
12188
12198
|
state.value = value;
|
|
12189
12199
|
state.state = REJECTED;
|
|
12190
|
-
notify$1(
|
|
12200
|
+
notify$1(state, true);
|
|
12191
12201
|
};
|
|
12192
12202
|
|
|
12193
|
-
var internalResolve = function (
|
|
12203
|
+
var internalResolve = function (state, value, unwrap) {
|
|
12194
12204
|
if (state.done) return;
|
|
12195
12205
|
state.done = true;
|
|
12196
12206
|
if (unwrap) state = unwrap;
|
|
12197
12207
|
try {
|
|
12198
|
-
if (
|
|
12208
|
+
if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
|
|
12199
12209
|
var then = isThenable(value);
|
|
12200
12210
|
if (then) {
|
|
12201
12211
|
microtask(function () {
|
|
12202
12212
|
var wrapper = { done: false };
|
|
12203
12213
|
try {
|
|
12204
12214
|
then.call(value,
|
|
12205
|
-
bind(internalResolve,
|
|
12206
|
-
bind(internalReject,
|
|
12215
|
+
bind(internalResolve, wrapper, state),
|
|
12216
|
+
bind(internalReject, wrapper, state)
|
|
12207
12217
|
);
|
|
12208
12218
|
} catch (error) {
|
|
12209
|
-
internalReject(
|
|
12219
|
+
internalReject(wrapper, error, state);
|
|
12210
12220
|
}
|
|
12211
12221
|
});
|
|
12212
12222
|
} else {
|
|
12213
12223
|
state.value = value;
|
|
12214
12224
|
state.state = FULFILLED;
|
|
12215
|
-
notify$1(
|
|
12225
|
+
notify$1(state, false);
|
|
12216
12226
|
}
|
|
12217
12227
|
} catch (error) {
|
|
12218
|
-
internalReject(
|
|
12228
|
+
internalReject({ done: false }, error, state);
|
|
12219
12229
|
}
|
|
12220
12230
|
};
|
|
12221
12231
|
|
|
@@ -12228,9 +12238,9 @@
|
|
|
12228
12238
|
Internal.call(this);
|
|
12229
12239
|
var state = getInternalState$3(this);
|
|
12230
12240
|
try {
|
|
12231
|
-
executor(bind(internalResolve,
|
|
12241
|
+
executor(bind(internalResolve, state), bind(internalReject, state));
|
|
12232
12242
|
} catch (error) {
|
|
12233
|
-
internalReject(
|
|
12243
|
+
internalReject(state, error);
|
|
12234
12244
|
}
|
|
12235
12245
|
};
|
|
12236
12246
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -12248,20 +12258,20 @@
|
|
|
12248
12258
|
};
|
|
12249
12259
|
Internal.prototype = redefineAll(PromiseConstructor.prototype, {
|
|
12250
12260
|
// `Promise.prototype.then` method
|
|
12251
|
-
// https://tc39.
|
|
12261
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
12252
12262
|
then: function then(onFulfilled, onRejected) {
|
|
12253
12263
|
var state = getInternalPromiseState(this);
|
|
12254
12264
|
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
|
|
12255
12265
|
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
|
|
12256
12266
|
reaction.fail = typeof onRejected == 'function' && onRejected;
|
|
12257
|
-
reaction.domain =
|
|
12267
|
+
reaction.domain = engineIsNode ? process$4.domain : undefined;
|
|
12258
12268
|
state.parent = true;
|
|
12259
12269
|
state.reactions.push(reaction);
|
|
12260
|
-
if (state.state != PENDING) notify$1(
|
|
12270
|
+
if (state.state != PENDING) notify$1(state, false);
|
|
12261
12271
|
return reaction.promise;
|
|
12262
12272
|
},
|
|
12263
12273
|
// `Promise.prototype.catch` method
|
|
12264
|
-
// https://tc39.
|
|
12274
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
12265
12275
|
'catch': function (onRejected) {
|
|
12266
12276
|
return this.then(undefined, onRejected);
|
|
12267
12277
|
}
|
|
@@ -12270,8 +12280,8 @@
|
|
|
12270
12280
|
var promise = new Internal();
|
|
12271
12281
|
var state = getInternalState$3(promise);
|
|
12272
12282
|
this.promise = promise;
|
|
12273
|
-
this.resolve = bind(internalResolve,
|
|
12274
|
-
this.reject = bind(internalReject,
|
|
12283
|
+
this.resolve = bind(internalResolve, state);
|
|
12284
|
+
this.reject = bind(internalReject, state);
|
|
12275
12285
|
};
|
|
12276
12286
|
newPromiseCapability.f = newPromiseCapability$1 = function (C) {
|
|
12277
12287
|
return C === PromiseConstructor || C === PromiseWrapper
|
|
@@ -12313,7 +12323,7 @@
|
|
|
12313
12323
|
// statics
|
|
12314
12324
|
_export({ target: PROMISE, stat: true, forced: FORCED$7 }, {
|
|
12315
12325
|
// `Promise.reject` method
|
|
12316
|
-
// https://tc39.
|
|
12326
|
+
// https://tc39.es/ecma262/#sec-promise.reject
|
|
12317
12327
|
reject: function reject(r) {
|
|
12318
12328
|
var capability = newPromiseCapability$1(this);
|
|
12319
12329
|
capability.reject.call(undefined, r);
|
|
@@ -12323,7 +12333,7 @@
|
|
|
12323
12333
|
|
|
12324
12334
|
_export({ target: PROMISE, stat: true, forced: FORCED$7 }, {
|
|
12325
12335
|
// `Promise.resolve` method
|
|
12326
|
-
// https://tc39.
|
|
12336
|
+
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
12327
12337
|
resolve: function resolve(x) {
|
|
12328
12338
|
return promiseResolve( this, x);
|
|
12329
12339
|
}
|
|
@@ -12331,7 +12341,7 @@
|
|
|
12331
12341
|
|
|
12332
12342
|
_export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
12333
12343
|
// `Promise.all` method
|
|
12334
|
-
// https://tc39.
|
|
12344
|
+
// https://tc39.es/ecma262/#sec-promise.all
|
|
12335
12345
|
all: function all(iterable) {
|
|
12336
12346
|
var C = this;
|
|
12337
12347
|
var capability = newPromiseCapability$1(C);
|
|
@@ -12342,7 +12352,7 @@
|
|
|
12342
12352
|
var values = [];
|
|
12343
12353
|
var counter = 0;
|
|
12344
12354
|
var remaining = 1;
|
|
12345
|
-
|
|
12355
|
+
iterate(iterable, function (promise) {
|
|
12346
12356
|
var index = counter++;
|
|
12347
12357
|
var alreadyCalled = false;
|
|
12348
12358
|
values.push(undefined);
|
|
@@ -12360,14 +12370,14 @@
|
|
|
12360
12370
|
return capability.promise;
|
|
12361
12371
|
},
|
|
12362
12372
|
// `Promise.race` method
|
|
12363
|
-
// https://tc39.
|
|
12373
|
+
// https://tc39.es/ecma262/#sec-promise.race
|
|
12364
12374
|
race: function race(iterable) {
|
|
12365
12375
|
var C = this;
|
|
12366
12376
|
var capability = newPromiseCapability$1(C);
|
|
12367
12377
|
var reject = capability.reject;
|
|
12368
12378
|
var result = perform(function () {
|
|
12369
12379
|
var $promiseResolve = aFunction$1(C.resolve);
|
|
12370
|
-
|
|
12380
|
+
iterate(iterable, function (promise) {
|
|
12371
12381
|
$promiseResolve.call(C, promise).then(capability.resolve, reject);
|
|
12372
12382
|
});
|
|
12373
12383
|
});
|
|
@@ -12377,23 +12387,23 @@
|
|
|
12377
12387
|
});
|
|
12378
12388
|
|
|
12379
12389
|
// `Symbol.asyncIterator` well-known symbol
|
|
12380
|
-
// https://tc39.
|
|
12390
|
+
// https://tc39.es/ecma262/#sec-symbol.asynciterator
|
|
12381
12391
|
defineWellKnownSymbol('asyncIterator');
|
|
12382
12392
|
|
|
12383
12393
|
// `Symbol.iterator` well-known symbol
|
|
12384
|
-
// https://tc39.
|
|
12394
|
+
// https://tc39.es/ecma262/#sec-symbol.iterator
|
|
12385
12395
|
defineWellKnownSymbol('iterator');
|
|
12386
12396
|
|
|
12387
12397
|
// `Symbol.toStringTag` well-known symbol
|
|
12388
|
-
// https://tc39.
|
|
12398
|
+
// https://tc39.es/ecma262/#sec-symbol.tostringtag
|
|
12389
12399
|
defineWellKnownSymbol('toStringTag');
|
|
12390
12400
|
|
|
12391
12401
|
// JSON[@@toStringTag] property
|
|
12392
|
-
// https://tc39.
|
|
12402
|
+
// https://tc39.es/ecma262/#sec-json-@@tostringtag
|
|
12393
12403
|
setToStringTag(global_1.JSON, 'JSON', true);
|
|
12394
12404
|
|
|
12395
12405
|
// Math[@@toStringTag] property
|
|
12396
|
-
// https://tc39.
|
|
12406
|
+
// https://tc39.es/ecma262/#sec-math-@@tostringtag
|
|
12397
12407
|
setToStringTag(Math, 'Math', true);
|
|
12398
12408
|
|
|
12399
12409
|
var charAt$1 = stringMultibyte.charAt;
|
|
@@ -12405,7 +12415,7 @@
|
|
|
12405
12415
|
var getInternalState$4 = internalState.getterFor(STRING_ITERATOR);
|
|
12406
12416
|
|
|
12407
12417
|
// `String.prototype[@@iterator]` method
|
|
12408
|
-
// https://tc39.
|
|
12418
|
+
// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
|
|
12409
12419
|
defineIterator(String, 'String', function (iterated) {
|
|
12410
12420
|
setInternalState$5(this, {
|
|
12411
12421
|
type: STRING_ITERATOR,
|
|
@@ -12413,7 +12423,7 @@
|
|
|
12413
12423
|
index: 0
|
|
12414
12424
|
});
|
|
12415
12425
|
// `%StringIteratorPrototype%.next` method
|
|
12416
|
-
// https://tc39.
|
|
12426
|
+
// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
|
|
12417
12427
|
}, function next() {
|
|
12418
12428
|
var state = getInternalState$4(this);
|
|
12419
12429
|
var string = state.string;
|
|
@@ -12453,14 +12463,14 @@
|
|
|
12453
12463
|
}
|
|
12454
12464
|
}
|
|
12455
12465
|
|
|
12456
|
-
|
|
12466
|
+
createCommonjsModule(function (module) {
|
|
12457
12467
|
/**
|
|
12458
12468
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
12459
12469
|
*
|
|
12460
12470
|
* This source code is licensed under the MIT license found in the
|
|
12461
12471
|
* LICENSE file in the root directory of this source tree.
|
|
12462
12472
|
*/
|
|
12463
|
-
|
|
12473
|
+
var runtime = function (exports) {
|
|
12464
12474
|
|
|
12465
12475
|
var Op = Object.prototype;
|
|
12466
12476
|
var hasOwn = Op.hasOwnProperty;
|
|
@@ -12470,23 +12480,25 @@
|
|
|
12470
12480
|
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
12471
12481
|
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
12472
12482
|
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
12473
|
-
var runtime = global.regeneratorRuntime;
|
|
12474
|
-
|
|
12475
|
-
if (runtime) {
|
|
12476
|
-
{
|
|
12477
|
-
// If regeneratorRuntime is defined globally and we're in a module,
|
|
12478
|
-
// make the exports object identical to regeneratorRuntime.
|
|
12479
|
-
module.exports = runtime;
|
|
12480
|
-
} // Don't bother evaluating the rest of this file if the runtime was
|
|
12481
|
-
// already defined globally.
|
|
12482
|
-
|
|
12483
|
-
|
|
12484
|
-
return;
|
|
12485
|
-
} // Define the runtime globally (as expected by generated code) as either
|
|
12486
|
-
// module.exports (if we're in a module) or a new, empty object.
|
|
12487
12483
|
|
|
12484
|
+
function define(obj, key, value) {
|
|
12485
|
+
Object.defineProperty(obj, key, {
|
|
12486
|
+
value: value,
|
|
12487
|
+
enumerable: true,
|
|
12488
|
+
configurable: true,
|
|
12489
|
+
writable: true
|
|
12490
|
+
});
|
|
12491
|
+
return obj[key];
|
|
12492
|
+
}
|
|
12488
12493
|
|
|
12489
|
-
|
|
12494
|
+
try {
|
|
12495
|
+
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
12496
|
+
define({}, "");
|
|
12497
|
+
} catch (err) {
|
|
12498
|
+
define = function define(obj, key, value) {
|
|
12499
|
+
return obj[key] = value;
|
|
12500
|
+
};
|
|
12501
|
+
}
|
|
12490
12502
|
|
|
12491
12503
|
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
12492
12504
|
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
@@ -12499,7 +12511,7 @@
|
|
|
12499
12511
|
return generator;
|
|
12500
12512
|
}
|
|
12501
12513
|
|
|
12502
|
-
|
|
12514
|
+
exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
|
|
12503
12515
|
// record like context.tryEntries[i].completion. This interface could
|
|
12504
12516
|
// have been (and was previously) designed to take a closure to be
|
|
12505
12517
|
// invoked without arguments, but in all the cases we care about we
|
|
@@ -12561,33 +12573,30 @@
|
|
|
12561
12573
|
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
12562
12574
|
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
12563
12575
|
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
12564
|
-
|
|
12576
|
+
GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
|
|
12565
12577
|
// Iterator interface in terms of a single ._invoke method.
|
|
12566
12578
|
|
|
12567
12579
|
function defineIteratorMethods(prototype) {
|
|
12568
12580
|
["next", "throw", "return"].forEach(function (method) {
|
|
12569
|
-
prototype
|
|
12581
|
+
define(prototype, method, function (arg) {
|
|
12570
12582
|
return this._invoke(method, arg);
|
|
12571
|
-
};
|
|
12583
|
+
});
|
|
12572
12584
|
});
|
|
12573
12585
|
}
|
|
12574
12586
|
|
|
12575
|
-
|
|
12587
|
+
exports.isGeneratorFunction = function (genFun) {
|
|
12576
12588
|
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
12577
12589
|
return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
|
|
12578
12590
|
// do is to check its .name property.
|
|
12579
12591
|
(ctor.displayName || ctor.name) === "GeneratorFunction" : false;
|
|
12580
12592
|
};
|
|
12581
12593
|
|
|
12582
|
-
|
|
12594
|
+
exports.mark = function (genFun) {
|
|
12583
12595
|
if (Object.setPrototypeOf) {
|
|
12584
12596
|
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
12585
12597
|
} else {
|
|
12586
12598
|
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
12587
|
-
|
|
12588
|
-
if (!(toStringTagSymbol in genFun)) {
|
|
12589
|
-
genFun[toStringTagSymbol] = "GeneratorFunction";
|
|
12590
|
-
}
|
|
12599
|
+
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
12591
12600
|
}
|
|
12592
12601
|
|
|
12593
12602
|
genFun.prototype = Object.create(Gp);
|
|
@@ -12598,13 +12607,13 @@
|
|
|
12598
12607
|
// meant to be awaited.
|
|
12599
12608
|
|
|
12600
12609
|
|
|
12601
|
-
|
|
12610
|
+
exports.awrap = function (arg) {
|
|
12602
12611
|
return {
|
|
12603
12612
|
__await: arg
|
|
12604
12613
|
};
|
|
12605
12614
|
};
|
|
12606
12615
|
|
|
12607
|
-
function AsyncIterator(generator) {
|
|
12616
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
12608
12617
|
function invoke(method, arg, resolve, reject) {
|
|
12609
12618
|
var record = tryCatch(generator[method], generator, arg);
|
|
12610
12619
|
|
|
@@ -12615,32 +12624,24 @@
|
|
|
12615
12624
|
var value = result.value;
|
|
12616
12625
|
|
|
12617
12626
|
if (value && _typeof(value) === "object" && hasOwn.call(value, "__await")) {
|
|
12618
|
-
return
|
|
12627
|
+
return PromiseImpl.resolve(value.__await).then(function (value) {
|
|
12619
12628
|
invoke("next", value, resolve, reject);
|
|
12620
12629
|
}, function (err) {
|
|
12621
12630
|
invoke("throw", err, resolve, reject);
|
|
12622
12631
|
});
|
|
12623
12632
|
}
|
|
12624
12633
|
|
|
12625
|
-
return
|
|
12634
|
+
return PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
12626
12635
|
// When a yielded Promise is resolved, its final value becomes
|
|
12627
12636
|
// the .value of the Promise<{value,done}> result for the
|
|
12628
|
-
// current iteration.
|
|
12629
|
-
// result for this iteration will be rejected with the same
|
|
12630
|
-
// reason. Note that rejections of yielded Promises are not
|
|
12631
|
-
// thrown back into the generator function, as is the case
|
|
12632
|
-
// when an awaited Promise is rejected. This difference in
|
|
12633
|
-
// behavior between yield and await is important, because it
|
|
12634
|
-
// allows the consumer to decide what to do with the yielded
|
|
12635
|
-
// rejection (swallow it and continue, manually .throw it back
|
|
12636
|
-
// into the generator, abandon iteration, whatever). With
|
|
12637
|
-
// await, by contrast, there is no opportunity to examine the
|
|
12638
|
-
// rejection reason outside the generator function, so the
|
|
12639
|
-
// only option is to throw it from the await expression, and
|
|
12640
|
-
// let the generator function handle the exception.
|
|
12637
|
+
// current iteration.
|
|
12641
12638
|
result.value = unwrapped;
|
|
12642
12639
|
resolve(result);
|
|
12643
|
-
},
|
|
12640
|
+
}, function (error) {
|
|
12641
|
+
// If a rejected Promise was yielded, throw the rejection back
|
|
12642
|
+
// into the async generator function so it can be handled there.
|
|
12643
|
+
return invoke("throw", error, resolve, reject);
|
|
12644
|
+
});
|
|
12644
12645
|
}
|
|
12645
12646
|
}
|
|
12646
12647
|
|
|
@@ -12648,7 +12649,7 @@
|
|
|
12648
12649
|
|
|
12649
12650
|
function enqueue(method, arg) {
|
|
12650
12651
|
function callInvokeWithMethodAndArg() {
|
|
12651
|
-
return new
|
|
12652
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
12652
12653
|
invoke(method, arg, resolve, reject);
|
|
12653
12654
|
});
|
|
12654
12655
|
}
|
|
@@ -12681,13 +12682,14 @@
|
|
|
12681
12682
|
return this;
|
|
12682
12683
|
};
|
|
12683
12684
|
|
|
12684
|
-
|
|
12685
|
+
exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
|
|
12685
12686
|
// AsyncIterator objects; they just return a Promise for the value of
|
|
12686
12687
|
// the final result produced by the iterator.
|
|
12687
12688
|
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12689
|
+
exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
12690
|
+
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
12691
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
12692
|
+
return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
|
|
12691
12693
|
: iter.next().then(function (result) {
|
|
12692
12694
|
return result.done ? result.value : iter.next();
|
|
12693
12695
|
});
|
|
@@ -12780,6 +12782,7 @@
|
|
|
12780
12782
|
context.delegate = null;
|
|
12781
12783
|
|
|
12782
12784
|
if (context.method === "throw") {
|
|
12785
|
+
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
12783
12786
|
if (delegate.iterator["return"]) {
|
|
12784
12787
|
// If the delegate iterator has a return method, give it a
|
|
12785
12788
|
// chance to clean up.
|
|
@@ -12849,7 +12852,7 @@
|
|
|
12849
12852
|
|
|
12850
12853
|
|
|
12851
12854
|
defineIteratorMethods(Gp);
|
|
12852
|
-
Gp
|
|
12855
|
+
define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the
|
|
12853
12856
|
// @@iterator function is called on it. Some browsers' implementations of the
|
|
12854
12857
|
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
12855
12858
|
// object to not be returned from this call. This ensures that doesn't happen.
|
|
@@ -12898,7 +12901,7 @@
|
|
|
12898
12901
|
this.reset(true);
|
|
12899
12902
|
}
|
|
12900
12903
|
|
|
12901
|
-
|
|
12904
|
+
exports.keys = function (object) {
|
|
12902
12905
|
var keys = [];
|
|
12903
12906
|
|
|
12904
12907
|
for (var key in object) {
|
|
@@ -12965,7 +12968,7 @@
|
|
|
12965
12968
|
};
|
|
12966
12969
|
}
|
|
12967
12970
|
|
|
12968
|
-
|
|
12971
|
+
exports.values = values;
|
|
12969
12972
|
|
|
12970
12973
|
function doneResult() {
|
|
12971
12974
|
return {
|
|
@@ -13156,13 +13159,32 @@
|
|
|
13156
13159
|
|
|
13157
13160
|
return ContinueSentinel;
|
|
13158
13161
|
}
|
|
13159
|
-
};
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
return
|
|
13165
|
-
}(
|
|
13162
|
+
}; // Regardless of whether this script is executing as a CommonJS module
|
|
13163
|
+
// or not, return the runtime object so that we can declare the variable
|
|
13164
|
+
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
13165
|
+
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
13166
|
+
|
|
13167
|
+
return exports;
|
|
13168
|
+
}( // If this script is executing as a CommonJS module, use module.exports
|
|
13169
|
+
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
13170
|
+
// object. Either way, the resulting object will be used to initialize
|
|
13171
|
+
// the regeneratorRuntime variable at the top of this file.
|
|
13172
|
+
module.exports );
|
|
13173
|
+
|
|
13174
|
+
try {
|
|
13175
|
+
regeneratorRuntime = runtime;
|
|
13176
|
+
} catch (accidentalStrictMode) {
|
|
13177
|
+
// This module should not be running in strict mode, so the above
|
|
13178
|
+
// assignment should always work unless something is misconfigured. Just
|
|
13179
|
+
// in case runtime.js accidentally runs in strict mode, we can escape
|
|
13180
|
+
// strict mode using a global Function call. This could conceivably fail
|
|
13181
|
+
// if a Content Security Policy forbids using Function, but in that case
|
|
13182
|
+
// the proper solution is to fix the accidental strict mode problem. If
|
|
13183
|
+
// you've misconfigured your bundler to force strict mode and applied a
|
|
13184
|
+
// CSP to forbid Function, and you're not willing to fix either of those
|
|
13185
|
+
// problems, please detail your unique predicament in a GitHub issue.
|
|
13186
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
13187
|
+
}
|
|
13166
13188
|
});
|
|
13167
13189
|
|
|
13168
13190
|
var escapeStringRegexp = function escapeStringRegexp(string) {
|
|
@@ -13404,8 +13426,19 @@
|
|
|
13404
13426
|
return str.substr(start, len);
|
|
13405
13427
|
};
|
|
13406
13428
|
|
|
13429
|
+
// call something on iterator step with safe closing on error
|
|
13430
|
+
var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
|
|
13431
|
+
try {
|
|
13432
|
+
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
|
13433
|
+
// 7.4.6 IteratorClose(iterator, completion)
|
|
13434
|
+
} catch (error) {
|
|
13435
|
+
iteratorClose(iterator);
|
|
13436
|
+
throw error;
|
|
13437
|
+
}
|
|
13438
|
+
};
|
|
13439
|
+
|
|
13407
13440
|
// `Array.from` method implementation
|
|
13408
|
-
// https://tc39.
|
|
13441
|
+
// https://tc39.es/ecma262/#sec-array.from
|
|
13409
13442
|
var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
|
13410
13443
|
var O = toObject(arrayLike);
|
|
13411
13444
|
var C = typeof this == 'function' ? this : Array;
|
|
@@ -13442,49 +13475,12 @@
|
|
|
13442
13475
|
});
|
|
13443
13476
|
|
|
13444
13477
|
// `Array.from` method
|
|
13445
|
-
// https://tc39.
|
|
13478
|
+
// https://tc39.es/ecma262/#sec-array.from
|
|
13446
13479
|
_export({ target: 'Array', stat: true, forced: INCORRECT_ITERATION$1 }, {
|
|
13447
13480
|
from: arrayFrom
|
|
13448
13481
|
});
|
|
13449
13482
|
|
|
13450
13483
|
var diff = createCommonjsModule(function (module, exports) {
|
|
13451
|
-
/*!
|
|
13452
|
-
|
|
13453
|
-
diff v4.0.1
|
|
13454
|
-
|
|
13455
|
-
Software License Agreement (BSD License)
|
|
13456
|
-
|
|
13457
|
-
Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>
|
|
13458
|
-
|
|
13459
|
-
All rights reserved.
|
|
13460
|
-
|
|
13461
|
-
Redistribution and use of this software in source and binary forms, with or without modification,
|
|
13462
|
-
are permitted provided that the following conditions are met:
|
|
13463
|
-
|
|
13464
|
-
* Redistributions of source code must retain the above
|
|
13465
|
-
copyright notice, this list of conditions and the
|
|
13466
|
-
following disclaimer.
|
|
13467
|
-
|
|
13468
|
-
* Redistributions in binary form must reproduce the above
|
|
13469
|
-
copyright notice, this list of conditions and the
|
|
13470
|
-
following disclaimer in the documentation and/or other
|
|
13471
|
-
materials provided with the distribution.
|
|
13472
|
-
|
|
13473
|
-
* Neither the name of Kevin Decker nor the names of its
|
|
13474
|
-
contributors may be used to endorse or promote products
|
|
13475
|
-
derived from this software without specific prior
|
|
13476
|
-
written permission.
|
|
13477
|
-
|
|
13478
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
13479
|
-
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
13480
|
-
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
13481
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
13482
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
13483
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
13484
|
-
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
13485
|
-
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
13486
|
-
@license
|
|
13487
|
-
*/
|
|
13488
13484
|
(function (global, factory) {
|
|
13489
13485
|
factory(exports) ;
|
|
13490
13486
|
})(commonjsGlobal, function (exports) {
|
|
@@ -13798,7 +13794,8 @@
|
|
|
13798
13794
|
};
|
|
13799
13795
|
|
|
13800
13796
|
wordDiff.tokenize = function (value) {
|
|
13801
|
-
|
|
13797
|
+
// All whitespace symbols except newline group into one token, each newline - in separate token
|
|
13798
|
+
var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
|
|
13802
13799
|
|
|
13803
13800
|
for (var i = 0; i < tokens.length - 1; i++) {
|
|
13804
13801
|
// If we have an empty string in the next field and we have only word chars before and after, merge
|
|
@@ -13882,40 +13879,55 @@
|
|
|
13882
13879
|
return cssDiff.diff(oldStr, newStr, callback);
|
|
13883
13880
|
}
|
|
13884
13881
|
|
|
13885
|
-
function _typeof
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
|
|
13882
|
+
function _typeof(obj) {
|
|
13883
|
+
"@babel/helpers - typeof";
|
|
13884
|
+
|
|
13885
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
13886
|
+
_typeof = function _typeof(obj) {
|
|
13887
|
+
return typeof obj;
|
|
13889
13888
|
};
|
|
13890
13889
|
} else {
|
|
13891
|
-
_typeof
|
|
13892
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" :
|
|
13890
|
+
_typeof = function _typeof(obj) {
|
|
13891
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
13893
13892
|
};
|
|
13894
13893
|
}
|
|
13895
13894
|
|
|
13896
|
-
return _typeof
|
|
13895
|
+
return _typeof(obj);
|
|
13897
13896
|
}
|
|
13898
13897
|
|
|
13899
13898
|
function _toConsumableArray(arr) {
|
|
13900
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
|
13899
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
13901
13900
|
}
|
|
13902
13901
|
|
|
13903
13902
|
function _arrayWithoutHoles(arr) {
|
|
13904
|
-
if (Array.isArray(arr))
|
|
13905
|
-
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
|
13906
|
-
arr2[i] = arr[i];
|
|
13907
|
-
}
|
|
13908
|
-
|
|
13909
|
-
return arr2;
|
|
13910
|
-
}
|
|
13903
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
13911
13904
|
}
|
|
13912
13905
|
|
|
13913
13906
|
function _iterableToArray(iter) {
|
|
13914
|
-
if (Symbol.iterator in Object(iter)
|
|
13907
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
|
13908
|
+
}
|
|
13909
|
+
|
|
13910
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
13911
|
+
if (!o) return;
|
|
13912
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
13913
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13914
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13915
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13916
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
13917
|
+
}
|
|
13918
|
+
|
|
13919
|
+
function _arrayLikeToArray(arr, len) {
|
|
13920
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
13921
|
+
|
|
13922
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
13923
|
+
arr2[i] = arr[i];
|
|
13924
|
+
}
|
|
13925
|
+
|
|
13926
|
+
return arr2;
|
|
13915
13927
|
}
|
|
13916
13928
|
|
|
13917
13929
|
function _nonIterableSpread() {
|
|
13918
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
13930
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13919
13931
|
}
|
|
13920
13932
|
|
|
13921
13933
|
var objectPrototypeToString = Object.prototype.toString;
|
|
@@ -13981,7 +13993,7 @@
|
|
|
13981
13993
|
obj = obj.toJSON();
|
|
13982
13994
|
}
|
|
13983
13995
|
|
|
13984
|
-
if (_typeof
|
|
13996
|
+
if (_typeof(obj) === 'object' && obj !== null) {
|
|
13985
13997
|
stack.push(obj);
|
|
13986
13998
|
canonicalizedObj = {};
|
|
13987
13999
|
replacementStack.push(canonicalizedObj);
|
|
@@ -14105,12 +14117,23 @@
|
|
|
14105
14117
|
chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
|
|
14106
14118
|
var hunk = {
|
|
14107
14119
|
oldStart: +chunkHeader[1],
|
|
14108
|
-
oldLines:
|
|
14120
|
+
oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2],
|
|
14109
14121
|
newStart: +chunkHeader[3],
|
|
14110
|
-
newLines:
|
|
14122
|
+
newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4],
|
|
14111
14123
|
lines: [],
|
|
14112
14124
|
linedelimiters: []
|
|
14113
|
-
};
|
|
14125
|
+
}; // Unified Diff Format quirk: If the chunk size is 0,
|
|
14126
|
+
// the first number is one lower than one would expect.
|
|
14127
|
+
// https://www.artima.com/weblogs/viewpost.jsp?thread=164293
|
|
14128
|
+
|
|
14129
|
+
if (hunk.oldLines === 0) {
|
|
14130
|
+
hunk.oldStart += 1;
|
|
14131
|
+
}
|
|
14132
|
+
|
|
14133
|
+
if (hunk.newLines === 0) {
|
|
14134
|
+
hunk.newStart += 1;
|
|
14135
|
+
}
|
|
14136
|
+
|
|
14114
14137
|
var addCount = 0,
|
|
14115
14138
|
removeCount = 0;
|
|
14116
14139
|
|
|
@@ -14303,11 +14326,6 @@
|
|
|
14303
14326
|
|
|
14304
14327
|
diffOffset += _hunk.newLines - _hunk.oldLines;
|
|
14305
14328
|
|
|
14306
|
-
if (_toPos < 0) {
|
|
14307
|
-
// Creating a new file
|
|
14308
|
-
_toPos = 0;
|
|
14309
|
-
}
|
|
14310
|
-
|
|
14311
14329
|
for (var j = 0; j < _hunk.lines.length; j++) {
|
|
14312
14330
|
var line = _hunk.lines[j],
|
|
14313
14331
|
operation = line.length > 0 ? line[0] : ' ',
|
|
@@ -14479,8 +14497,9 @@
|
|
|
14479
14497
|
var newEOFNewline = /\n$/.test(newStr);
|
|
14480
14498
|
var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
|
|
14481
14499
|
|
|
14482
|
-
if (!oldEOFNewline && noNlBeforeAdds) {
|
|
14500
|
+
if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
|
|
14483
14501
|
// special case: old has no eol and no trailing context; no-nl can end up before adds
|
|
14502
|
+
// however, if the old file is empty, do not output the no-nl line
|
|
14484
14503
|
curRange.splice(hunk.oldLines, 0, '\');
|
|
14485
14504
|
}
|
|
14486
14505
|
|
|
@@ -14514,12 +14533,11 @@
|
|
|
14514
14533
|
};
|
|
14515
14534
|
}
|
|
14516
14535
|
|
|
14517
|
-
function
|
|
14518
|
-
var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
|
|
14536
|
+
function formatPatch(diff) {
|
|
14519
14537
|
var ret = [];
|
|
14520
14538
|
|
|
14521
|
-
if (oldFileName == newFileName) {
|
|
14522
|
-
ret.push('Index: ' + oldFileName);
|
|
14539
|
+
if (diff.oldFileName == diff.newFileName) {
|
|
14540
|
+
ret.push('Index: ' + diff.oldFileName);
|
|
14523
14541
|
}
|
|
14524
14542
|
|
|
14525
14543
|
ret.push('===================================================================');
|
|
@@ -14527,7 +14545,18 @@
|
|
|
14527
14545
|
ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
|
|
14528
14546
|
|
|
14529
14547
|
for (var i = 0; i < diff.hunks.length; i++) {
|
|
14530
|
-
var hunk = diff.hunks[i];
|
|
14548
|
+
var hunk = diff.hunks[i]; // Unified Diff Format quirk: If the chunk size is 0,
|
|
14549
|
+
// the first number is one lower than one would expect.
|
|
14550
|
+
// https://www.artima.com/weblogs/viewpost.jsp?thread=164293
|
|
14551
|
+
|
|
14552
|
+
if (hunk.oldLines === 0) {
|
|
14553
|
+
hunk.oldStart -= 1;
|
|
14554
|
+
}
|
|
14555
|
+
|
|
14556
|
+
if (hunk.newLines === 0) {
|
|
14557
|
+
hunk.newStart -= 1;
|
|
14558
|
+
}
|
|
14559
|
+
|
|
14531
14560
|
ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
|
|
14532
14561
|
ret.push.apply(ret, hunk.lines);
|
|
14533
14562
|
}
|
|
@@ -14535,6 +14564,10 @@
|
|
|
14535
14564
|
return ret.join('\n') + '\n';
|
|
14536
14565
|
}
|
|
14537
14566
|
|
|
14567
|
+
function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
14568
|
+
return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
|
|
14569
|
+
}
|
|
14570
|
+
|
|
14538
14571
|
function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
14539
14572
|
return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
|
|
14540
14573
|
}
|
|
@@ -15015,29 +15048,27 @@
|
|
|
15015
15048
|
n = n.replace(/"/g, '"');
|
|
15016
15049
|
return n;
|
|
15017
15050
|
}
|
|
15018
|
-
/* See LICENSE file for terms of use */
|
|
15019
|
-
|
|
15020
15051
|
|
|
15021
15052
|
exports.Diff = Diff;
|
|
15022
|
-
exports.diffChars = diffChars;
|
|
15023
|
-
exports.diffWords = diffWords;
|
|
15024
|
-
exports.diffWordsWithSpace = diffWordsWithSpace;
|
|
15025
|
-
exports.diffLines = diffLines;
|
|
15026
|
-
exports.diffTrimmedLines = diffTrimmedLines;
|
|
15027
|
-
exports.diffSentences = diffSentences;
|
|
15028
|
-
exports.diffCss = diffCss;
|
|
15029
|
-
exports.diffJson = diffJson;
|
|
15030
|
-
exports.diffArrays = diffArrays;
|
|
15031
|
-
exports.structuredPatch = structuredPatch;
|
|
15032
|
-
exports.createTwoFilesPatch = createTwoFilesPatch;
|
|
15033
|
-
exports.createPatch = createPatch;
|
|
15034
15053
|
exports.applyPatch = applyPatch;
|
|
15035
15054
|
exports.applyPatches = applyPatches;
|
|
15036
|
-
exports.
|
|
15037
|
-
exports.merge = merge;
|
|
15055
|
+
exports.canonicalize = canonicalize;
|
|
15038
15056
|
exports.convertChangesToDMP = convertChangesToDMP;
|
|
15039
15057
|
exports.convertChangesToXML = convertChangesToXML;
|
|
15040
|
-
exports.
|
|
15058
|
+
exports.createPatch = createPatch;
|
|
15059
|
+
exports.createTwoFilesPatch = createTwoFilesPatch;
|
|
15060
|
+
exports.diffArrays = diffArrays;
|
|
15061
|
+
exports.diffChars = diffChars;
|
|
15062
|
+
exports.diffCss = diffCss;
|
|
15063
|
+
exports.diffJson = diffJson;
|
|
15064
|
+
exports.diffLines = diffLines;
|
|
15065
|
+
exports.diffSentences = diffSentences;
|
|
15066
|
+
exports.diffTrimmedLines = diffTrimmedLines;
|
|
15067
|
+
exports.diffWords = diffWords;
|
|
15068
|
+
exports.diffWordsWithSpace = diffWordsWithSpace;
|
|
15069
|
+
exports.merge = merge;
|
|
15070
|
+
exports.parsePatch = parsePatch;
|
|
15071
|
+
exports.structuredPatch = structuredPatch;
|
|
15041
15072
|
Object.defineProperty(exports, '__esModule', {
|
|
15042
15073
|
value: true
|
|
15043
15074
|
});
|
|
@@ -15296,7 +15327,7 @@
|
|
|
15296
15327
|
var FAILS_ON_PRIMITIVES$4 = fails(function () { nativeFreeze(1); });
|
|
15297
15328
|
|
|
15298
15329
|
// `Object.freeze` method
|
|
15299
|
-
// https://tc39.
|
|
15330
|
+
// https://tc39.es/ecma262/#sec-object.freeze
|
|
15300
15331
|
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$4, sham: !freezing }, {
|
|
15301
15332
|
freeze: function freeze(it) {
|
|
15302
15333
|
return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;
|
|
@@ -15360,7 +15391,7 @@
|
|
|
15360
15391
|
Constructor = wrapper(function (dummy, iterable) {
|
|
15361
15392
|
anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
|
|
15362
15393
|
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
|
|
15363
|
-
if (iterable != undefined)
|
|
15394
|
+
if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
|
15364
15395
|
return that;
|
|
15365
15396
|
});
|
|
15366
15397
|
Constructor.prototype = NativePrototype;
|
|
@@ -15416,7 +15447,7 @@
|
|
|
15416
15447
|
size: 0
|
|
15417
15448
|
});
|
|
15418
15449
|
if (!descriptors) that.size = 0;
|
|
15419
|
-
if (iterable != undefined)
|
|
15450
|
+
if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
|
15420
15451
|
});
|
|
15421
15452
|
|
|
15422
15453
|
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
|
@@ -15576,8 +15607,8 @@
|
|
|
15576
15607
|
};
|
|
15577
15608
|
|
|
15578
15609
|
// `Set` constructor
|
|
15579
|
-
// https://tc39.
|
|
15580
|
-
|
|
15610
|
+
// https://tc39.es/ecma262/#sec-set-objects
|
|
15611
|
+
collection('Set', function (init) {
|
|
15581
15612
|
return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
|
|
15582
15613
|
}, collectionStrong);
|
|
15583
15614
|
|
|
@@ -19749,6 +19780,46 @@
|
|
|
19749
19780
|
})(commonjsGlobal);
|
|
19750
19781
|
});
|
|
19751
19782
|
|
|
19783
|
+
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
|
19784
|
+
|
|
19785
|
+
// `Object.{ entries, values }` methods implementation
|
|
19786
|
+
var createMethod$5 = function (TO_ENTRIES) {
|
|
19787
|
+
return function (it) {
|
|
19788
|
+
var O = toIndexedObject(it);
|
|
19789
|
+
var keys = objectKeys(O);
|
|
19790
|
+
var length = keys.length;
|
|
19791
|
+
var i = 0;
|
|
19792
|
+
var result = [];
|
|
19793
|
+
var key;
|
|
19794
|
+
while (length > i) {
|
|
19795
|
+
key = keys[i++];
|
|
19796
|
+
if (!descriptors || propertyIsEnumerable.call(O, key)) {
|
|
19797
|
+
result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
|
|
19798
|
+
}
|
|
19799
|
+
}
|
|
19800
|
+
return result;
|
|
19801
|
+
};
|
|
19802
|
+
};
|
|
19803
|
+
|
|
19804
|
+
var objectToArray = {
|
|
19805
|
+
// `Object.entries` method
|
|
19806
|
+
// https://tc39.es/ecma262/#sec-object.entries
|
|
19807
|
+
entries: createMethod$5(true),
|
|
19808
|
+
// `Object.values` method
|
|
19809
|
+
// https://tc39.es/ecma262/#sec-object.values
|
|
19810
|
+
values: createMethod$5(false)
|
|
19811
|
+
};
|
|
19812
|
+
|
|
19813
|
+
var $values = objectToArray.values;
|
|
19814
|
+
|
|
19815
|
+
// `Object.values` method
|
|
19816
|
+
// https://tc39.es/ecma262/#sec-object.values
|
|
19817
|
+
_export({ target: 'Object', stat: true }, {
|
|
19818
|
+
values: function values(O) {
|
|
19819
|
+
return $values(O);
|
|
19820
|
+
}
|
|
19821
|
+
});
|
|
19822
|
+
|
|
19752
19823
|
var format$1 = util.format;
|
|
19753
19824
|
/**
|
|
19754
19825
|
* Contains error codes, factory functions to create throwable error objects,
|
|
@@ -19766,6 +19837,7 @@
|
|
|
19766
19837
|
if (process$1.emitWarning) {
|
|
19767
19838
|
process$1.emitWarning(msg, type);
|
|
19768
19839
|
} else {
|
|
19840
|
+
/* istanbul ignore next */
|
|
19769
19841
|
nextTick(function () {
|
|
19770
19842
|
console.warn(type + ': ' + msg);
|
|
19771
19843
|
});
|
|
@@ -19804,87 +19876,130 @@
|
|
|
19804
19876
|
}
|
|
19805
19877
|
};
|
|
19806
19878
|
/**
|
|
19807
|
-
* When Mocha
|
|
19808
|
-
*
|
|
19809
|
-
*
|
|
19879
|
+
* When Mocha throws exceptions (or rejects `Promise`s), it attempts to assign a `code` property to the `Error` object, for easier handling. These are the potential values of `code`.
|
|
19880
|
+
* @public
|
|
19881
|
+
* @namespace
|
|
19882
|
+
* @memberof module:lib/errors
|
|
19810
19883
|
*/
|
|
19811
19884
|
|
|
19812
19885
|
|
|
19813
19886
|
var constants = {
|
|
19814
19887
|
/**
|
|
19815
19888
|
* An unrecoverable error.
|
|
19889
|
+
* @constant
|
|
19890
|
+
* @default
|
|
19816
19891
|
*/
|
|
19817
19892
|
FATAL: 'ERR_MOCHA_FATAL',
|
|
19818
19893
|
|
|
19819
19894
|
/**
|
|
19820
19895
|
* The type of an argument to a function call is invalid
|
|
19896
|
+
* @constant
|
|
19897
|
+
* @default
|
|
19821
19898
|
*/
|
|
19822
19899
|
INVALID_ARG_TYPE: 'ERR_MOCHA_INVALID_ARG_TYPE',
|
|
19823
19900
|
|
|
19824
19901
|
/**
|
|
19825
19902
|
* The value of an argument to a function call is invalid
|
|
19903
|
+
* @constant
|
|
19904
|
+
* @default
|
|
19826
19905
|
*/
|
|
19827
19906
|
INVALID_ARG_VALUE: 'ERR_MOCHA_INVALID_ARG_VALUE',
|
|
19828
19907
|
|
|
19829
19908
|
/**
|
|
19830
19909
|
* Something was thrown, but it wasn't an `Error`
|
|
19910
|
+
* @constant
|
|
19911
|
+
* @default
|
|
19831
19912
|
*/
|
|
19832
19913
|
INVALID_EXCEPTION: 'ERR_MOCHA_INVALID_EXCEPTION',
|
|
19833
19914
|
|
|
19834
19915
|
/**
|
|
19835
19916
|
* An interface (e.g., `Mocha.interfaces`) is unknown or invalid
|
|
19917
|
+
* @constant
|
|
19918
|
+
* @default
|
|
19836
19919
|
*/
|
|
19837
19920
|
INVALID_INTERFACE: 'ERR_MOCHA_INVALID_INTERFACE',
|
|
19838
19921
|
|
|
19839
19922
|
/**
|
|
19840
19923
|
* A reporter (.e.g, `Mocha.reporters`) is unknown or invalid
|
|
19924
|
+
* @constant
|
|
19925
|
+
* @default
|
|
19841
19926
|
*/
|
|
19842
19927
|
INVALID_REPORTER: 'ERR_MOCHA_INVALID_REPORTER',
|
|
19843
19928
|
|
|
19844
19929
|
/**
|
|
19845
19930
|
* `done()` was called twice in a `Test` or `Hook` callback
|
|
19931
|
+
* @constant
|
|
19932
|
+
* @default
|
|
19846
19933
|
*/
|
|
19847
19934
|
MULTIPLE_DONE: 'ERR_MOCHA_MULTIPLE_DONE',
|
|
19848
19935
|
|
|
19849
19936
|
/**
|
|
19850
19937
|
* No files matched the pattern provided by the user
|
|
19938
|
+
* @constant
|
|
19939
|
+
* @default
|
|
19851
19940
|
*/
|
|
19852
19941
|
NO_FILES_MATCH_PATTERN: 'ERR_MOCHA_NO_FILES_MATCH_PATTERN',
|
|
19853
19942
|
|
|
19854
19943
|
/**
|
|
19855
19944
|
* Known, but unsupported behavior of some kind
|
|
19945
|
+
* @constant
|
|
19946
|
+
* @default
|
|
19856
19947
|
*/
|
|
19857
19948
|
UNSUPPORTED: 'ERR_MOCHA_UNSUPPORTED',
|
|
19858
19949
|
|
|
19859
19950
|
/**
|
|
19860
19951
|
* Invalid state transition occurring in `Mocha` instance
|
|
19952
|
+
* @constant
|
|
19953
|
+
* @default
|
|
19861
19954
|
*/
|
|
19862
19955
|
INSTANCE_ALREADY_RUNNING: 'ERR_MOCHA_INSTANCE_ALREADY_RUNNING',
|
|
19863
19956
|
|
|
19864
19957
|
/**
|
|
19865
19958
|
* Invalid state transition occurring in `Mocha` instance
|
|
19959
|
+
* @constant
|
|
19960
|
+
* @default
|
|
19866
19961
|
*/
|
|
19867
19962
|
INSTANCE_ALREADY_DISPOSED: 'ERR_MOCHA_INSTANCE_ALREADY_DISPOSED',
|
|
19868
19963
|
|
|
19869
19964
|
/**
|
|
19870
19965
|
* Use of `only()` w/ `--forbid-only` results in this error.
|
|
19966
|
+
* @constant
|
|
19967
|
+
* @default
|
|
19871
19968
|
*/
|
|
19872
19969
|
FORBIDDEN_EXCLUSIVITY: 'ERR_MOCHA_FORBIDDEN_EXCLUSIVITY',
|
|
19873
19970
|
|
|
19874
19971
|
/**
|
|
19875
19972
|
* To be thrown when a user-defined plugin implementation (e.g., `mochaHooks`) is invalid
|
|
19973
|
+
* @constant
|
|
19974
|
+
* @default
|
|
19876
19975
|
*/
|
|
19877
19976
|
INVALID_PLUGIN_IMPLEMENTATION: 'ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION',
|
|
19878
19977
|
|
|
19879
19978
|
/**
|
|
19880
19979
|
* To be thrown when a builtin or third-party plugin definition (the _definition_ of `mochaHooks`) is invalid
|
|
19980
|
+
* @constant
|
|
19981
|
+
* @default
|
|
19982
|
+
*/
|
|
19983
|
+
INVALID_PLUGIN_DEFINITION: 'ERR_MOCHA_INVALID_PLUGIN_DEFINITION',
|
|
19984
|
+
|
|
19985
|
+
/**
|
|
19986
|
+
* When a runnable exceeds its allowed run time.
|
|
19987
|
+
* @constant
|
|
19988
|
+
* @default
|
|
19881
19989
|
*/
|
|
19882
|
-
|
|
19990
|
+
TIMEOUT: 'ERR_MOCHA_TIMEOUT'
|
|
19883
19991
|
};
|
|
19992
|
+
/**
|
|
19993
|
+
* A set containing all string values of all Mocha error constants, for use by {@link isMochaError}.
|
|
19994
|
+
* @private
|
|
19995
|
+
*/
|
|
19996
|
+
|
|
19997
|
+
var MOCHA_ERRORS = new Set(Object.values(constants));
|
|
19884
19998
|
/**
|
|
19885
19999
|
* Creates an error object to be thrown when no files to be tested could be found using specified pattern.
|
|
19886
20000
|
*
|
|
19887
20001
|
* @public
|
|
20002
|
+
* @static
|
|
19888
20003
|
* @param {string} message - Error message to be displayed.
|
|
19889
20004
|
* @param {string} pattern - User-specified argument value.
|
|
19890
20005
|
* @returns {Error} instance detailing the error condition
|
|
@@ -19916,6 +20031,7 @@
|
|
|
19916
20031
|
* Creates an error object to be thrown when the interface specified in the options was not found.
|
|
19917
20032
|
*
|
|
19918
20033
|
* @public
|
|
20034
|
+
* @static
|
|
19919
20035
|
* @param {string} message - Error message to be displayed.
|
|
19920
20036
|
* @param {string} ui - User-specified interface value.
|
|
19921
20037
|
* @returns {Error} instance detailing the error condition
|
|
@@ -19932,6 +20048,7 @@
|
|
|
19932
20048
|
* Creates an error object to be thrown when a behavior, option, or parameter is unsupported.
|
|
19933
20049
|
*
|
|
19934
20050
|
* @public
|
|
20051
|
+
* @static
|
|
19935
20052
|
* @param {string} message - Error message to be displayed.
|
|
19936
20053
|
* @returns {Error} instance detailing the error condition
|
|
19937
20054
|
*/
|
|
@@ -19946,6 +20063,7 @@
|
|
|
19946
20063
|
* Creates an error object to be thrown when an argument is missing.
|
|
19947
20064
|
*
|
|
19948
20065
|
* @public
|
|
20066
|
+
* @static
|
|
19949
20067
|
* @param {string} message - Error message to be displayed.
|
|
19950
20068
|
* @param {string} argument - Argument name.
|
|
19951
20069
|
* @param {string} expected - Expected argument datatype.
|
|
@@ -19960,6 +20078,7 @@
|
|
|
19960
20078
|
* Creates an error object to be thrown when an argument did not use the supported type
|
|
19961
20079
|
*
|
|
19962
20080
|
* @public
|
|
20081
|
+
* @static
|
|
19963
20082
|
* @param {string} message - Error message to be displayed.
|
|
19964
20083
|
* @param {string} argument - Argument name.
|
|
19965
20084
|
* @param {string} expected - Expected argument datatype.
|
|
@@ -19979,6 +20098,7 @@
|
|
|
19979
20098
|
* Creates an error object to be thrown when an argument did not use the supported value
|
|
19980
20099
|
*
|
|
19981
20100
|
* @public
|
|
20101
|
+
* @static
|
|
19982
20102
|
* @param {string} message - Error message to be displayed.
|
|
19983
20103
|
* @param {string} argument - Argument name.
|
|
19984
20104
|
* @param {string} value - Argument value.
|
|
@@ -19999,6 +20119,7 @@
|
|
|
19999
20119
|
* Creates an error object to be thrown when an exception was caught, but the `Error` is falsy or undefined.
|
|
20000
20120
|
*
|
|
20001
20121
|
* @public
|
|
20122
|
+
* @static
|
|
20002
20123
|
* @param {string} message - Error message to be displayed.
|
|
20003
20124
|
* @returns {Error} instance detailing the error condition
|
|
20004
20125
|
*/
|
|
@@ -20015,6 +20136,7 @@
|
|
|
20015
20136
|
* Creates an error object to be thrown when an unrecoverable error occurs.
|
|
20016
20137
|
*
|
|
20017
20138
|
* @public
|
|
20139
|
+
* @static
|
|
20018
20140
|
* @param {string} message - Error message to be displayed.
|
|
20019
20141
|
* @returns {Error} instance detailing the error condition
|
|
20020
20142
|
*/
|
|
@@ -20034,6 +20156,7 @@
|
|
|
20034
20156
|
* @param {string} [pluginId] - Name/path of plugin, if any
|
|
20035
20157
|
* @throws When `pluginType` is not known
|
|
20036
20158
|
* @public
|
|
20159
|
+
* @static
|
|
20037
20160
|
* @returns {Error}
|
|
20038
20161
|
*/
|
|
20039
20162
|
|
|
@@ -20058,6 +20181,7 @@
|
|
|
20058
20181
|
* @param {string} [pluginId] - Name/path of plugin, if any
|
|
20059
20182
|
* @throws When `pluginType` is not known
|
|
20060
20183
|
* @public
|
|
20184
|
+
* @static
|
|
20061
20185
|
* @returns {Error}
|
|
20062
20186
|
*/
|
|
20063
20187
|
|
|
@@ -20071,6 +20195,7 @@
|
|
|
20071
20195
|
* @param {string} message The error message to be displayed.
|
|
20072
20196
|
* @param {boolean} cleanReferencesAfterRun the value of `cleanReferencesAfterRun`
|
|
20073
20197
|
* @param {Mocha} instance the mocha instance that throw this error
|
|
20198
|
+
* @static
|
|
20074
20199
|
*/
|
|
20075
20200
|
|
|
20076
20201
|
|
|
@@ -20084,6 +20209,8 @@
|
|
|
20084
20209
|
/**
|
|
20085
20210
|
* Creates an error object to be thrown when a mocha object's `run` method is called while a test run is in progress.
|
|
20086
20211
|
* @param {string} message The error message to be displayed.
|
|
20212
|
+
* @static
|
|
20213
|
+
* @public
|
|
20087
20214
|
*/
|
|
20088
20215
|
|
|
20089
20216
|
|
|
@@ -20093,13 +20220,14 @@
|
|
|
20093
20220
|
err.instance = instance;
|
|
20094
20221
|
return err;
|
|
20095
20222
|
}
|
|
20096
|
-
|
|
20223
|
+
/**
|
|
20097
20224
|
* Creates an error object to be thrown when done() is called multiple times in a test
|
|
20098
20225
|
*
|
|
20099
20226
|
* @public
|
|
20100
20227
|
* @param {Runnable} runnable - Original runnable
|
|
20101
20228
|
* @param {Error} [originalErr] - Original error, if any
|
|
20102
20229
|
* @returns {Error} instance detailing the error condition
|
|
20230
|
+
* @static
|
|
20103
20231
|
*/
|
|
20104
20232
|
|
|
20105
20233
|
|
|
@@ -20135,6 +20263,7 @@
|
|
|
20135
20263
|
/**
|
|
20136
20264
|
* Creates an error object to be thrown when `.only()` is used with
|
|
20137
20265
|
* `--forbid-only`.
|
|
20266
|
+
* @static
|
|
20138
20267
|
* @public
|
|
20139
20268
|
* @param {Mocha} mocha - Mocha instance
|
|
20140
20269
|
* @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY}
|
|
@@ -20148,6 +20277,7 @@
|
|
|
20148
20277
|
}
|
|
20149
20278
|
/**
|
|
20150
20279
|
* Creates an error object to be thrown when a plugin definition is invalid
|
|
20280
|
+
* @static
|
|
20151
20281
|
* @param {string} msg - Error message
|
|
20152
20282
|
* @param {PluginDefinition} [pluginDef] - Problematic plugin definition
|
|
20153
20283
|
* @public
|
|
@@ -20163,6 +20293,7 @@
|
|
|
20163
20293
|
}
|
|
20164
20294
|
/**
|
|
20165
20295
|
* Creates an error object to be thrown when a plugin implementation (user code) is invalid
|
|
20296
|
+
* @static
|
|
20166
20297
|
* @param {string} msg - Error message
|
|
20167
20298
|
* @param {Object} [opts] - Plugin definition and user-supplied implementation
|
|
20168
20299
|
* @param {PluginDefinition} [opts.pluginDef] - Plugin Definition
|
|
@@ -20183,6 +20314,36 @@
|
|
|
20183
20314
|
err.pluginImpl = pluginImpl;
|
|
20184
20315
|
return err;
|
|
20185
20316
|
}
|
|
20317
|
+
/**
|
|
20318
|
+
* Creates an error object to be thrown when a runnable exceeds its allowed run time.
|
|
20319
|
+
* @static
|
|
20320
|
+
* @param {string} msg - Error message
|
|
20321
|
+
* @param {number} [timeout] - Timeout in ms
|
|
20322
|
+
* @param {string} [file] - File, if given
|
|
20323
|
+
* @returns {MochaTimeoutError}
|
|
20324
|
+
*/
|
|
20325
|
+
|
|
20326
|
+
|
|
20327
|
+
function createTimeoutError(msg, timeout, file) {
|
|
20328
|
+
var err = new Error(msg);
|
|
20329
|
+
err.code = constants.TIMEOUT;
|
|
20330
|
+
err.timeout = timeout;
|
|
20331
|
+
err.file = file;
|
|
20332
|
+
return err;
|
|
20333
|
+
}
|
|
20334
|
+
/**
|
|
20335
|
+
* Returns `true` if an error came out of Mocha.
|
|
20336
|
+
* _Can suffer from false negatives, but not false positives._
|
|
20337
|
+
* @static
|
|
20338
|
+
* @public
|
|
20339
|
+
* @param {*} err - Error, or anything
|
|
20340
|
+
* @returns {boolean}
|
|
20341
|
+
*/
|
|
20342
|
+
|
|
20343
|
+
|
|
20344
|
+
var isMochaError = function isMochaError(err) {
|
|
20345
|
+
return Boolean(err && _typeof(err) === 'object' && MOCHA_ERRORS.has(err.code));
|
|
20346
|
+
};
|
|
20186
20347
|
|
|
20187
20348
|
var errors = {
|
|
20188
20349
|
constants: constants,
|
|
@@ -20202,8 +20363,10 @@
|
|
|
20202
20363
|
createMochaInstanceAlreadyRunningError: createMochaInstanceAlreadyRunningError,
|
|
20203
20364
|
createMultipleDoneError: createMultipleDoneError,
|
|
20204
20365
|
createNoFilesMatchPatternError: createNoFilesMatchPatternError,
|
|
20366
|
+
createTimeoutError: createTimeoutError,
|
|
20205
20367
|
createUnsupportedError: createUnsupportedError,
|
|
20206
20368
|
deprecate: deprecate$1,
|
|
20369
|
+
isMochaError: isMochaError,
|
|
20207
20370
|
warn: warn
|
|
20208
20371
|
};
|
|
20209
20372
|
|
|
@@ -20491,6 +20654,10 @@
|
|
|
20491
20654
|
? '-0' : val.toString();
|
|
20492
20655
|
break;
|
|
20493
20656
|
|
|
20657
|
+
case 'bigint':
|
|
20658
|
+
val = val.toString() + 'n';
|
|
20659
|
+
break;
|
|
20660
|
+
|
|
20494
20661
|
case 'date':
|
|
20495
20662
|
var sDate = isNaN(val.getTime()) ? val.toString() : val.toISOString();
|
|
20496
20663
|
val = '[Date: ' + sDate + ']';
|
|
@@ -20929,8 +21096,8 @@
|
|
|
20929
21096
|
});
|
|
20930
21097
|
|
|
20931
21098
|
// `Map` constructor
|
|
20932
|
-
// https://tc39.
|
|
20933
|
-
|
|
21099
|
+
// https://tc39.es/ecma262/#sec-map-objects
|
|
21100
|
+
collection('Map', function (init) {
|
|
20934
21101
|
return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
|
|
20935
21102
|
}, collectionStrong);
|
|
20936
21103
|
|
|
@@ -20949,6 +21116,187 @@
|
|
|
20949
21116
|
this.message = message;
|
|
20950
21117
|
}
|
|
20951
21118
|
|
|
21119
|
+
/**
|
|
21120
|
+
* Helpers.
|
|
21121
|
+
*/
|
|
21122
|
+
var s$1 = 1000;
|
|
21123
|
+
var m$1 = s$1 * 60;
|
|
21124
|
+
var h$1 = m$1 * 60;
|
|
21125
|
+
var d$1 = h$1 * 24;
|
|
21126
|
+
var w$1 = d$1 * 7;
|
|
21127
|
+
var y$1 = d$1 * 365.25;
|
|
21128
|
+
/**
|
|
21129
|
+
* Parse or format the given `val`.
|
|
21130
|
+
*
|
|
21131
|
+
* Options:
|
|
21132
|
+
*
|
|
21133
|
+
* - `long` verbose formatting [false]
|
|
21134
|
+
*
|
|
21135
|
+
* @param {String|Number} val
|
|
21136
|
+
* @param {Object} [options]
|
|
21137
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
21138
|
+
* @return {String|Number}
|
|
21139
|
+
* @api public
|
|
21140
|
+
*/
|
|
21141
|
+
|
|
21142
|
+
var ms$1 = function ms(val, options) {
|
|
21143
|
+
options = options || {};
|
|
21144
|
+
|
|
21145
|
+
var type = _typeof(val);
|
|
21146
|
+
|
|
21147
|
+
if (type === 'string' && val.length > 0) {
|
|
21148
|
+
return parse$1(val);
|
|
21149
|
+
} else if (type === 'number' && isFinite(val)) {
|
|
21150
|
+
return options["long"] ? fmtLong$1(val) : fmtShort$1(val);
|
|
21151
|
+
}
|
|
21152
|
+
|
|
21153
|
+
throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
|
|
21154
|
+
};
|
|
21155
|
+
/**
|
|
21156
|
+
* Parse the given `str` and return milliseconds.
|
|
21157
|
+
*
|
|
21158
|
+
* @param {String} str
|
|
21159
|
+
* @return {Number}
|
|
21160
|
+
* @api private
|
|
21161
|
+
*/
|
|
21162
|
+
|
|
21163
|
+
|
|
21164
|
+
function parse$1(str) {
|
|
21165
|
+
str = String(str);
|
|
21166
|
+
|
|
21167
|
+
if (str.length > 100) {
|
|
21168
|
+
return;
|
|
21169
|
+
}
|
|
21170
|
+
|
|
21171
|
+
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
|
|
21172
|
+
|
|
21173
|
+
if (!match) {
|
|
21174
|
+
return;
|
|
21175
|
+
}
|
|
21176
|
+
|
|
21177
|
+
var n = parseFloat(match[1]);
|
|
21178
|
+
var type = (match[2] || 'ms').toLowerCase();
|
|
21179
|
+
|
|
21180
|
+
switch (type) {
|
|
21181
|
+
case 'years':
|
|
21182
|
+
case 'year':
|
|
21183
|
+
case 'yrs':
|
|
21184
|
+
case 'yr':
|
|
21185
|
+
case 'y':
|
|
21186
|
+
return n * y$1;
|
|
21187
|
+
|
|
21188
|
+
case 'weeks':
|
|
21189
|
+
case 'week':
|
|
21190
|
+
case 'w':
|
|
21191
|
+
return n * w$1;
|
|
21192
|
+
|
|
21193
|
+
case 'days':
|
|
21194
|
+
case 'day':
|
|
21195
|
+
case 'd':
|
|
21196
|
+
return n * d$1;
|
|
21197
|
+
|
|
21198
|
+
case 'hours':
|
|
21199
|
+
case 'hour':
|
|
21200
|
+
case 'hrs':
|
|
21201
|
+
case 'hr':
|
|
21202
|
+
case 'h':
|
|
21203
|
+
return n * h$1;
|
|
21204
|
+
|
|
21205
|
+
case 'minutes':
|
|
21206
|
+
case 'minute':
|
|
21207
|
+
case 'mins':
|
|
21208
|
+
case 'min':
|
|
21209
|
+
case 'm':
|
|
21210
|
+
return n * m$1;
|
|
21211
|
+
|
|
21212
|
+
case 'seconds':
|
|
21213
|
+
case 'second':
|
|
21214
|
+
case 'secs':
|
|
21215
|
+
case 'sec':
|
|
21216
|
+
case 's':
|
|
21217
|
+
return n * s$1;
|
|
21218
|
+
|
|
21219
|
+
case 'milliseconds':
|
|
21220
|
+
case 'millisecond':
|
|
21221
|
+
case 'msecs':
|
|
21222
|
+
case 'msec':
|
|
21223
|
+
case 'ms':
|
|
21224
|
+
return n;
|
|
21225
|
+
|
|
21226
|
+
default:
|
|
21227
|
+
return undefined;
|
|
21228
|
+
}
|
|
21229
|
+
}
|
|
21230
|
+
/**
|
|
21231
|
+
* Short format for `ms`.
|
|
21232
|
+
*
|
|
21233
|
+
* @param {Number} ms
|
|
21234
|
+
* @return {String}
|
|
21235
|
+
* @api private
|
|
21236
|
+
*/
|
|
21237
|
+
|
|
21238
|
+
|
|
21239
|
+
function fmtShort$1(ms) {
|
|
21240
|
+
var msAbs = Math.abs(ms);
|
|
21241
|
+
|
|
21242
|
+
if (msAbs >= d$1) {
|
|
21243
|
+
return Math.round(ms / d$1) + 'd';
|
|
21244
|
+
}
|
|
21245
|
+
|
|
21246
|
+
if (msAbs >= h$1) {
|
|
21247
|
+
return Math.round(ms / h$1) + 'h';
|
|
21248
|
+
}
|
|
21249
|
+
|
|
21250
|
+
if (msAbs >= m$1) {
|
|
21251
|
+
return Math.round(ms / m$1) + 'm';
|
|
21252
|
+
}
|
|
21253
|
+
|
|
21254
|
+
if (msAbs >= s$1) {
|
|
21255
|
+
return Math.round(ms / s$1) + 's';
|
|
21256
|
+
}
|
|
21257
|
+
|
|
21258
|
+
return ms + 'ms';
|
|
21259
|
+
}
|
|
21260
|
+
/**
|
|
21261
|
+
* Long format for `ms`.
|
|
21262
|
+
*
|
|
21263
|
+
* @param {Number} ms
|
|
21264
|
+
* @return {String}
|
|
21265
|
+
* @api private
|
|
21266
|
+
*/
|
|
21267
|
+
|
|
21268
|
+
|
|
21269
|
+
function fmtLong$1(ms) {
|
|
21270
|
+
var msAbs = Math.abs(ms);
|
|
21271
|
+
|
|
21272
|
+
if (msAbs >= d$1) {
|
|
21273
|
+
return plural$1(ms, msAbs, d$1, 'day');
|
|
21274
|
+
}
|
|
21275
|
+
|
|
21276
|
+
if (msAbs >= h$1) {
|
|
21277
|
+
return plural$1(ms, msAbs, h$1, 'hour');
|
|
21278
|
+
}
|
|
21279
|
+
|
|
21280
|
+
if (msAbs >= m$1) {
|
|
21281
|
+
return plural$1(ms, msAbs, m$1, 'minute');
|
|
21282
|
+
}
|
|
21283
|
+
|
|
21284
|
+
if (msAbs >= s$1) {
|
|
21285
|
+
return plural$1(ms, msAbs, s$1, 'second');
|
|
21286
|
+
}
|
|
21287
|
+
|
|
21288
|
+
return ms + ' ms';
|
|
21289
|
+
}
|
|
21290
|
+
/**
|
|
21291
|
+
* Pluralization helper.
|
|
21292
|
+
*/
|
|
21293
|
+
|
|
21294
|
+
|
|
21295
|
+
function plural$1(ms, msAbs, n, name) {
|
|
21296
|
+
var isPlural = msAbs >= n * 1.5;
|
|
21297
|
+
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
21298
|
+
}
|
|
21299
|
+
|
|
20952
21300
|
/**
|
|
20953
21301
|
* This is the common logic for both the Node.js and web browser
|
|
20954
21302
|
* implementations of `debug()`.
|
|
@@ -20961,16 +21309,12 @@
|
|
|
20961
21309
|
createDebug.disable = disable;
|
|
20962
21310
|
createDebug.enable = enable;
|
|
20963
21311
|
createDebug.enabled = enabled;
|
|
20964
|
-
createDebug.humanize = ms;
|
|
21312
|
+
createDebug.humanize = ms$1;
|
|
21313
|
+
createDebug.destroy = destroy;
|
|
20965
21314
|
Object.keys(env).forEach(function (key) {
|
|
20966
21315
|
createDebug[key] = env[key];
|
|
20967
21316
|
});
|
|
20968
21317
|
/**
|
|
20969
|
-
* Active `debug` instances.
|
|
20970
|
-
*/
|
|
20971
|
-
|
|
20972
|
-
createDebug.instances = [];
|
|
20973
|
-
/**
|
|
20974
21318
|
* The currently active debug mode names, and names to skip.
|
|
20975
21319
|
*/
|
|
20976
21320
|
|
|
@@ -21012,6 +21356,7 @@
|
|
|
21012
21356
|
|
|
21013
21357
|
function createDebug(namespace) {
|
|
21014
21358
|
var prevTime;
|
|
21359
|
+
var enableOverride = null;
|
|
21015
21360
|
|
|
21016
21361
|
function debug() {
|
|
21017
21362
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -21043,7 +21388,7 @@
|
|
|
21043
21388
|
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
|
|
21044
21389
|
// If we encounter an escaped % then don't increase the array index
|
|
21045
21390
|
if (match === '%%') {
|
|
21046
|
-
return
|
|
21391
|
+
return '%';
|
|
21047
21392
|
}
|
|
21048
21393
|
|
|
21049
21394
|
index++;
|
|
@@ -21066,31 +21411,29 @@
|
|
|
21066
21411
|
}
|
|
21067
21412
|
|
|
21068
21413
|
debug.namespace = namespace;
|
|
21069
|
-
debug.enabled = createDebug.enabled(namespace);
|
|
21070
21414
|
debug.useColors = createDebug.useColors();
|
|
21071
21415
|
debug.color = createDebug.selectColor(namespace);
|
|
21072
|
-
debug.
|
|
21073
|
-
debug.
|
|
21416
|
+
debug.extend = extend;
|
|
21417
|
+
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
21418
|
+
|
|
21419
|
+
Object.defineProperty(debug, 'enabled', {
|
|
21420
|
+
enumerable: true,
|
|
21421
|
+
configurable: false,
|
|
21422
|
+
get: function get() {
|
|
21423
|
+
return enableOverride === null ? createDebug.enabled(namespace) : enableOverride;
|
|
21424
|
+
},
|
|
21425
|
+
set: function set(v) {
|
|
21426
|
+
enableOverride = v;
|
|
21427
|
+
}
|
|
21428
|
+
}); // Env-specific initialization logic for debug instances
|
|
21074
21429
|
|
|
21075
21430
|
if (typeof createDebug.init === 'function') {
|
|
21076
21431
|
createDebug.init(debug);
|
|
21077
21432
|
}
|
|
21078
21433
|
|
|
21079
|
-
createDebug.instances.push(debug);
|
|
21080
21434
|
return debug;
|
|
21081
21435
|
}
|
|
21082
21436
|
|
|
21083
|
-
function destroy() {
|
|
21084
|
-
var index = createDebug.instances.indexOf(this);
|
|
21085
|
-
|
|
21086
|
-
if (index !== -1) {
|
|
21087
|
-
createDebug.instances.splice(index, 1);
|
|
21088
|
-
return true;
|
|
21089
|
-
}
|
|
21090
|
-
|
|
21091
|
-
return false;
|
|
21092
|
-
}
|
|
21093
|
-
|
|
21094
21437
|
function extend(namespace, delimiter) {
|
|
21095
21438
|
var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
21096
21439
|
newDebug.log = this.log;
|
|
@@ -21127,11 +21470,6 @@
|
|
|
21127
21470
|
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
21128
21471
|
}
|
|
21129
21472
|
}
|
|
21130
|
-
|
|
21131
|
-
for (i = 0; i < createDebug.instances.length; i++) {
|
|
21132
|
-
var instance = createDebug.instances[i];
|
|
21133
|
-
instance.enabled = createDebug.enabled(instance.namespace);
|
|
21134
|
-
}
|
|
21135
21473
|
}
|
|
21136
21474
|
/**
|
|
21137
21475
|
* Disable debug output.
|
|
@@ -21207,6 +21545,15 @@
|
|
|
21207
21545
|
|
|
21208
21546
|
return val;
|
|
21209
21547
|
}
|
|
21548
|
+
/**
|
|
21549
|
+
* XXX DO NOT USE. This is a temporary stub function.
|
|
21550
|
+
* XXX It WILL be removed in the next major release.
|
|
21551
|
+
*/
|
|
21552
|
+
|
|
21553
|
+
|
|
21554
|
+
function destroy() {
|
|
21555
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
21556
|
+
}
|
|
21210
21557
|
|
|
21211
21558
|
createDebug.enable(createDebug.load());
|
|
21212
21559
|
return createDebug;
|
|
@@ -21225,10 +21572,21 @@
|
|
|
21225
21572
|
exports.load = load;
|
|
21226
21573
|
exports.useColors = useColors;
|
|
21227
21574
|
exports.storage = localstorage();
|
|
21575
|
+
|
|
21576
|
+
exports.destroy = function () {
|
|
21577
|
+
var warned = false;
|
|
21578
|
+
return function () {
|
|
21579
|
+
if (!warned) {
|
|
21580
|
+
warned = true;
|
|
21581
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
21582
|
+
}
|
|
21583
|
+
};
|
|
21584
|
+
}();
|
|
21228
21585
|
/**
|
|
21229
21586
|
* Colors.
|
|
21230
21587
|
*/
|
|
21231
21588
|
|
|
21589
|
+
|
|
21232
21590
|
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
|
|
21233
21591
|
/**
|
|
21234
21592
|
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
@@ -21389,8 +21747,9 @@
|
|
|
21389
21747
|
|
|
21390
21748
|
var EventEmitter$1 = EventEmitter.EventEmitter;
|
|
21391
21749
|
var debug$1 = browser$2('mocha:runnable');
|
|
21392
|
-
var createInvalidExceptionError$1 = errors.createInvalidExceptionError
|
|
21393
|
-
|
|
21750
|
+
var createInvalidExceptionError$1 = errors.createInvalidExceptionError,
|
|
21751
|
+
createMultipleDoneError$1 = errors.createMultipleDoneError,
|
|
21752
|
+
createTimeoutError$1 = errors.createTimeoutError;
|
|
21394
21753
|
/**
|
|
21395
21754
|
* Save timer references to avoid Sinon interfering (see GH-237).
|
|
21396
21755
|
* @private
|
|
@@ -21823,13 +22182,13 @@
|
|
|
21823
22182
|
|
|
21824
22183
|
|
|
21825
22184
|
Runnable.prototype._timeoutError = function (ms) {
|
|
21826
|
-
var msg =
|
|
22185
|
+
var msg = "Timeout of ".concat(ms, "ms exceeded. For async tests and hooks, ensure \"done()\" is called; if returning a Promise, ensure it resolves.");
|
|
21827
22186
|
|
|
21828
22187
|
if (this.file) {
|
|
21829
22188
|
msg += ' (' + this.file + ')';
|
|
21830
22189
|
}
|
|
21831
22190
|
|
|
21832
|
-
return
|
|
22191
|
+
return createTimeoutError$1(msg, ms, this.file);
|
|
21833
22192
|
};
|
|
21834
22193
|
|
|
21835
22194
|
var constants$1 = utils.defineConstants(
|
|
@@ -21871,21 +22230,6 @@
|
|
|
21871
22230
|
|
|
21872
22231
|
Runnable.constants = constants$1;
|
|
21873
22232
|
|
|
21874
|
-
var $some$1 = arrayIteration.some;
|
|
21875
|
-
|
|
21876
|
-
|
|
21877
|
-
|
|
21878
|
-
var STRICT_METHOD$5 = arrayMethodIsStrict('some');
|
|
21879
|
-
var USES_TO_LENGTH$9 = arrayMethodUsesToLength('some');
|
|
21880
|
-
|
|
21881
|
-
// `Array.prototype.some` method
|
|
21882
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.some
|
|
21883
|
-
_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$5 || !USES_TO_LENGTH$9 }, {
|
|
21884
|
-
some: function some(callbackfn /* , thisArg */) {
|
|
21885
|
-
return $some$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
21886
|
-
}
|
|
21887
|
-
});
|
|
21888
|
-
|
|
21889
22233
|
var inherits$3 = utils.inherits,
|
|
21890
22234
|
constants$2 = utils.constants;
|
|
21891
22235
|
var MOCHA_ID_PROP_NAME = constants$2.MOCHA_ID_PROP_NAME;
|
|
@@ -21984,7 +22328,7 @@
|
|
|
21984
22328
|
* Expose `Suite`.
|
|
21985
22329
|
*/
|
|
21986
22330
|
|
|
21987
|
-
|
|
22331
|
+
module.exports = Suite;
|
|
21988
22332
|
/**
|
|
21989
22333
|
* Create a new `Suite` with the given `title` and parent `Suite`.
|
|
21990
22334
|
*
|
|
@@ -22724,9 +23068,11 @@
|
|
|
22724
23068
|
var sQuote = utils.sQuote;
|
|
22725
23069
|
var stackFilter = utils.stackTraceFilter();
|
|
22726
23070
|
var stringify = utils.stringify;
|
|
22727
|
-
var createInvalidExceptionError$2 = errors.createInvalidExceptionError
|
|
22728
|
-
|
|
22729
|
-
|
|
23071
|
+
var createInvalidExceptionError$2 = errors.createInvalidExceptionError,
|
|
23072
|
+
createUnsupportedError$1 = errors.createUnsupportedError,
|
|
23073
|
+
createFatalError$1 = errors.createFatalError,
|
|
23074
|
+
isMochaError$1 = errors.isMochaError,
|
|
23075
|
+
errorConstants = errors.constants;
|
|
22730
23076
|
/**
|
|
22731
23077
|
* Non-enumerable globals.
|
|
22732
23078
|
* @private
|
|
@@ -22901,6 +23247,25 @@
|
|
|
22901
23247
|
_this.globals(_this.globalProps());
|
|
22902
23248
|
|
|
22903
23249
|
_this.uncaught = _this._uncaught.bind(_assertThisInitialized(_this));
|
|
23250
|
+
|
|
23251
|
+
_this.unhandled = function (reason, promise) {
|
|
23252
|
+
if (isMochaError$1(reason)) {
|
|
23253
|
+
debug$2('trapped unhandled rejection coming out of Mocha; forwarding to uncaught handler:', reason);
|
|
23254
|
+
|
|
23255
|
+
_this.uncaught(reason);
|
|
23256
|
+
} else {
|
|
23257
|
+
debug$2('trapped unhandled rejection from (probably) user code; re-emitting on process');
|
|
23258
|
+
|
|
23259
|
+
_this._removeEventListener(process$1, 'unhandledRejection', _this.unhandled);
|
|
23260
|
+
|
|
23261
|
+
try {
|
|
23262
|
+
process$1.emit('unhandledRejection', reason, promise);
|
|
23263
|
+
} finally {
|
|
23264
|
+
_this._addEventListener(process$1, 'unhandledRejection', _this.unhandled);
|
|
23265
|
+
}
|
|
23266
|
+
}
|
|
23267
|
+
};
|
|
23268
|
+
|
|
22904
23269
|
return _this;
|
|
22905
23270
|
}
|
|
22906
23271
|
|
|
@@ -23141,7 +23506,7 @@
|
|
|
23141
23506
|
}
|
|
23142
23507
|
|
|
23143
23508
|
if (this.state === constants$3.STATE_STOPPED) {
|
|
23144
|
-
if (err.code ===
|
|
23509
|
+
if (err.code === errorConstants.MULTIPLE_DONE) {
|
|
23145
23510
|
throw err;
|
|
23146
23511
|
}
|
|
23147
23512
|
|
|
@@ -23777,20 +24142,7 @@
|
|
|
23777
24142
|
|
|
23778
24143
|
debug$2('run(): emitted %s', constants$3.EVENT_RUN_BEGIN);
|
|
23779
24144
|
|
|
23780
|
-
_this2.runSuite(rootSuite,
|
|
23781
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
23782
|
-
while (1) {
|
|
23783
|
-
switch (_context.prev = _context.next) {
|
|
23784
|
-
case 0:
|
|
23785
|
-
end();
|
|
23786
|
-
|
|
23787
|
-
case 1:
|
|
23788
|
-
case "end":
|
|
23789
|
-
return _context.stop();
|
|
23790
|
-
}
|
|
23791
|
-
}
|
|
23792
|
-
}, _callee);
|
|
23793
|
-
})));
|
|
24145
|
+
_this2.runSuite(rootSuite, end);
|
|
23794
24146
|
};
|
|
23795
24147
|
|
|
23796
24148
|
var prepare = function prepare() {
|
|
@@ -23828,11 +24180,11 @@
|
|
|
23828
24180
|
|
|
23829
24181
|
this._removeEventListener(process$1, 'uncaughtException', this.uncaught);
|
|
23830
24182
|
|
|
23831
|
-
this._removeEventListener(process$1, 'unhandledRejection', this.
|
|
24183
|
+
this._removeEventListener(process$1, 'unhandledRejection', this.unhandled);
|
|
23832
24184
|
|
|
23833
24185
|
this._addEventListener(process$1, 'uncaughtException', this.uncaught);
|
|
23834
24186
|
|
|
23835
|
-
this._addEventListener(process$1, 'unhandledRejection', this.
|
|
24187
|
+
this._addEventListener(process$1, 'unhandledRejection', this.unhandled);
|
|
23836
24188
|
|
|
23837
24189
|
if (this._delay) {
|
|
23838
24190
|
// for reporters, I guess.
|
|
@@ -23885,26 +24237,26 @@
|
|
|
23885
24237
|
|
|
23886
24238
|
|
|
23887
24239
|
Runner.prototype.runAsync = /*#__PURE__*/function () {
|
|
23888
|
-
var _runAsync = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
24240
|
+
var _runAsync = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
23889
24241
|
var _this3 = this;
|
|
23890
24242
|
|
|
23891
24243
|
var opts,
|
|
23892
|
-
|
|
23893
|
-
return regeneratorRuntime.wrap(function
|
|
24244
|
+
_args = arguments;
|
|
24245
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
23894
24246
|
while (1) {
|
|
23895
|
-
switch (
|
|
24247
|
+
switch (_context.prev = _context.next) {
|
|
23896
24248
|
case 0:
|
|
23897
|
-
opts =
|
|
23898
|
-
return
|
|
24249
|
+
opts = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
|
24250
|
+
return _context.abrupt("return", new Promise(function (resolve) {
|
|
23899
24251
|
_this3.run(resolve, opts);
|
|
23900
24252
|
}));
|
|
23901
24253
|
|
|
23902
24254
|
case 2:
|
|
23903
24255
|
case "end":
|
|
23904
|
-
return
|
|
24256
|
+
return _context.stop();
|
|
23905
24257
|
}
|
|
23906
24258
|
}
|
|
23907
|
-
},
|
|
24259
|
+
}, _callee);
|
|
23908
24260
|
}));
|
|
23909
24261
|
|
|
23910
24262
|
function runAsync() {
|
|
@@ -24552,7 +24904,7 @@
|
|
|
24552
24904
|
* Expose `Dot`.
|
|
24553
24905
|
*/
|
|
24554
24906
|
|
|
24555
|
-
|
|
24907
|
+
module.exports = Dot;
|
|
24556
24908
|
/**
|
|
24557
24909
|
* Constructs a new `Dot` reporter instance.
|
|
24558
24910
|
*
|
|
@@ -24629,7 +24981,7 @@
|
|
|
24629
24981
|
* Expose `Doc`.
|
|
24630
24982
|
*/
|
|
24631
24983
|
|
|
24632
|
-
|
|
24984
|
+
module.exports = Doc;
|
|
24633
24985
|
/**
|
|
24634
24986
|
* Constructs a new `Doc` reporter instance.
|
|
24635
24987
|
*
|
|
@@ -24710,7 +25062,7 @@
|
|
|
24710
25062
|
* Expose `TAP`.
|
|
24711
25063
|
*/
|
|
24712
25064
|
|
|
24713
|
-
|
|
25065
|
+
module.exports = TAP;
|
|
24714
25066
|
/**
|
|
24715
25067
|
* Constructs a new `TAP` reporter instance.
|
|
24716
25068
|
*
|
|
@@ -25010,7 +25362,7 @@
|
|
|
25010
25362
|
* Expose `JSON`.
|
|
25011
25363
|
*/
|
|
25012
25364
|
|
|
25013
|
-
|
|
25365
|
+
module.exports = JSONReporter;
|
|
25014
25366
|
/**
|
|
25015
25367
|
* Constructs a new `JSON` reporter instance.
|
|
25016
25368
|
*
|
|
@@ -25125,7 +25477,7 @@
|
|
|
25125
25477
|
});
|
|
25126
25478
|
|
|
25127
25479
|
// `thisNumberValue` abstract operation
|
|
25128
|
-
// https://tc39.
|
|
25480
|
+
// https://tc39.es/ecma262/#sec-thisnumbervalue
|
|
25129
25481
|
var thisNumberValue = function (value) {
|
|
25130
25482
|
if (typeof value != 'number' && classofRaw(value) != 'Number') {
|
|
25131
25483
|
throw TypeError('Incorrect invocation');
|
|
@@ -25134,7 +25486,7 @@
|
|
|
25134
25486
|
};
|
|
25135
25487
|
|
|
25136
25488
|
// `String.prototype.repeat` method implementation
|
|
25137
|
-
// https://tc39.
|
|
25489
|
+
// https://tc39.es/ecma262/#sec-string.prototype.repeat
|
|
25138
25490
|
var stringRepeat = ''.repeat || function repeat(count) {
|
|
25139
25491
|
var str = String(requireObjectCoercible(this));
|
|
25140
25492
|
var result = '';
|
|
@@ -25175,7 +25527,7 @@
|
|
|
25175
25527
|
});
|
|
25176
25528
|
|
|
25177
25529
|
// `Number.prototype.toFixed` method
|
|
25178
|
-
// https://tc39.
|
|
25530
|
+
// https://tc39.es/ecma262/#sec-number.prototype.tofixed
|
|
25179
25531
|
_export({ target: 'Number', proto: true, forced: FORCED$8 }, {
|
|
25180
25532
|
// eslint-disable-next-line max-statements
|
|
25181
25533
|
toFixed: function toFixed(fractionDigits) {
|
|
@@ -25413,7 +25765,7 @@
|
|
|
25413
25765
|
* Expose `HTML`.
|
|
25414
25766
|
*/
|
|
25415
25767
|
|
|
25416
|
-
|
|
25768
|
+
module.exports = HTML;
|
|
25417
25769
|
/**
|
|
25418
25770
|
* Stats template.
|
|
25419
25771
|
*/
|
|
@@ -25760,7 +26112,7 @@
|
|
|
25760
26112
|
* Expose `List`.
|
|
25761
26113
|
*/
|
|
25762
26114
|
|
|
25763
|
-
|
|
26115
|
+
module.exports = List;
|
|
25764
26116
|
/**
|
|
25765
26117
|
* Constructs a new `List` reporter instance.
|
|
25766
26118
|
*
|
|
@@ -25823,7 +26175,7 @@
|
|
|
25823
26175
|
* Expose `Min`.
|
|
25824
26176
|
*/
|
|
25825
26177
|
|
|
25826
|
-
|
|
26178
|
+
module.exports = Min;
|
|
25827
26179
|
/**
|
|
25828
26180
|
* Constructs a new `Min` reporter instance.
|
|
25829
26181
|
*
|
|
@@ -25880,7 +26232,7 @@
|
|
|
25880
26232
|
* Expose `Spec`.
|
|
25881
26233
|
*/
|
|
25882
26234
|
|
|
25883
|
-
|
|
26235
|
+
module.exports = Spec;
|
|
25884
26236
|
/**
|
|
25885
26237
|
* Constructs a new `Spec` reporter instance.
|
|
25886
26238
|
*
|
|
@@ -25965,7 +26317,7 @@
|
|
|
25965
26317
|
* Expose `Dot`.
|
|
25966
26318
|
*/
|
|
25967
26319
|
|
|
25968
|
-
|
|
26320
|
+
module.exports = NyanCat;
|
|
25969
26321
|
/**
|
|
25970
26322
|
* Constructs a new `Nyan` reporter instance.
|
|
25971
26323
|
*
|
|
@@ -26247,7 +26599,7 @@
|
|
|
26247
26599
|
* Expose `XUnit`.
|
|
26248
26600
|
*/
|
|
26249
26601
|
|
|
26250
|
-
|
|
26602
|
+
module.exports = XUnit;
|
|
26251
26603
|
/**
|
|
26252
26604
|
* Constructs a new `XUnit` reporter instance.
|
|
26253
26605
|
*
|
|
@@ -26432,7 +26784,7 @@
|
|
|
26432
26784
|
* Expose `Markdown`.
|
|
26433
26785
|
*/
|
|
26434
26786
|
|
|
26435
|
-
|
|
26787
|
+
module.exports = Markdown;
|
|
26436
26788
|
/**
|
|
26437
26789
|
* Constructs a new `Markdown` reporter instance.
|
|
26438
26790
|
*
|
|
@@ -26539,7 +26891,7 @@
|
|
|
26539
26891
|
* Expose `Progress`.
|
|
26540
26892
|
*/
|
|
26541
26893
|
|
|
26542
|
-
|
|
26894
|
+
module.exports = Progress;
|
|
26543
26895
|
/**
|
|
26544
26896
|
* General progress bar color.
|
|
26545
26897
|
*/
|
|
@@ -26638,7 +26990,7 @@
|
|
|
26638
26990
|
* Expose `Landing`.
|
|
26639
26991
|
*/
|
|
26640
26992
|
|
|
26641
|
-
|
|
26993
|
+
module.exports = Landing;
|
|
26642
26994
|
/**
|
|
26643
26995
|
* Airplane color.
|
|
26644
26996
|
*/
|
|
@@ -26743,7 +27095,7 @@
|
|
|
26743
27095
|
* Expose `JSONStream`.
|
|
26744
27096
|
*/
|
|
26745
27097
|
|
|
26746
|
-
|
|
27098
|
+
module.exports = JSONStream;
|
|
26747
27099
|
/**
|
|
26748
27100
|
* Constructs a new `JSONStream` reporter instance.
|
|
26749
27101
|
*
|
|
@@ -26838,7 +27190,7 @@
|
|
|
26838
27190
|
});
|
|
26839
27191
|
|
|
26840
27192
|
var name = "mocha";
|
|
26841
|
-
var version$2 = "8.2
|
|
27193
|
+
var version$2 = "8.3.2";
|
|
26842
27194
|
var homepage = "https://mochajs.org/";
|
|
26843
27195
|
var notifyLogo = "https://ibin.co/4QuRuGjXvl36.png";
|
|
26844
27196
|
var _package = {
|
|
@@ -28024,6 +28376,104 @@
|
|
|
28024
28376
|
exports.Suite = suite;
|
|
28025
28377
|
exports.Hook = hook;
|
|
28026
28378
|
exports.Test = test$1;
|
|
28379
|
+
var currentContext;
|
|
28380
|
+
|
|
28381
|
+
exports.afterEach = function () {
|
|
28382
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
28383
|
+
args[_key] = arguments[_key];
|
|
28384
|
+
}
|
|
28385
|
+
|
|
28386
|
+
return (currentContext.afterEach || currentContext.teardown).apply(this, args);
|
|
28387
|
+
};
|
|
28388
|
+
|
|
28389
|
+
exports.after = function () {
|
|
28390
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
28391
|
+
args[_key2] = arguments[_key2];
|
|
28392
|
+
}
|
|
28393
|
+
|
|
28394
|
+
return (currentContext.after || currentContext.suiteTeardown).apply(this, args);
|
|
28395
|
+
};
|
|
28396
|
+
|
|
28397
|
+
exports.beforeEach = function () {
|
|
28398
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
28399
|
+
args[_key3] = arguments[_key3];
|
|
28400
|
+
}
|
|
28401
|
+
|
|
28402
|
+
return (currentContext.beforeEach || currentContext.setup).apply(this, args);
|
|
28403
|
+
};
|
|
28404
|
+
|
|
28405
|
+
exports.before = function () {
|
|
28406
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
28407
|
+
args[_key4] = arguments[_key4];
|
|
28408
|
+
}
|
|
28409
|
+
|
|
28410
|
+
return (currentContext.before || currentContext.suiteSetup).apply(this, args);
|
|
28411
|
+
};
|
|
28412
|
+
|
|
28413
|
+
exports.describe = function () {
|
|
28414
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
28415
|
+
args[_key5] = arguments[_key5];
|
|
28416
|
+
}
|
|
28417
|
+
|
|
28418
|
+
return (currentContext.describe || currentContext.suite).apply(this, args);
|
|
28419
|
+
};
|
|
28420
|
+
|
|
28421
|
+
exports.describe.only = function () {
|
|
28422
|
+
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
28423
|
+
args[_key6] = arguments[_key6];
|
|
28424
|
+
}
|
|
28425
|
+
|
|
28426
|
+
return (currentContext.describe || currentContext.suite).only.apply(this, args);
|
|
28427
|
+
};
|
|
28428
|
+
|
|
28429
|
+
exports.describe.skip = function () {
|
|
28430
|
+
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
28431
|
+
args[_key7] = arguments[_key7];
|
|
28432
|
+
}
|
|
28433
|
+
|
|
28434
|
+
return (currentContext.describe || currentContext.suite).skip.apply(this, args);
|
|
28435
|
+
};
|
|
28436
|
+
|
|
28437
|
+
exports.it = function () {
|
|
28438
|
+
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
|
28439
|
+
args[_key8] = arguments[_key8];
|
|
28440
|
+
}
|
|
28441
|
+
|
|
28442
|
+
return (currentContext.it || currentContext.test).apply(this, args);
|
|
28443
|
+
};
|
|
28444
|
+
|
|
28445
|
+
exports.it.only = function () {
|
|
28446
|
+
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
|
28447
|
+
args[_key9] = arguments[_key9];
|
|
28448
|
+
}
|
|
28449
|
+
|
|
28450
|
+
return (currentContext.it || currentContext.test).only.apply(this, args);
|
|
28451
|
+
};
|
|
28452
|
+
|
|
28453
|
+
exports.it.skip = function () {
|
|
28454
|
+
for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
|
|
28455
|
+
args[_key10] = arguments[_key10];
|
|
28456
|
+
}
|
|
28457
|
+
|
|
28458
|
+
return (currentContext.it || currentContext.test).skip.apply(this, args);
|
|
28459
|
+
};
|
|
28460
|
+
|
|
28461
|
+
exports.xdescribe = exports.describe.skip;
|
|
28462
|
+
exports.xit = exports.it.skip;
|
|
28463
|
+
exports.setup = exports.beforeEach;
|
|
28464
|
+
exports.suiteSetup = exports.before;
|
|
28465
|
+
exports.suiteTeardown = exports.after;
|
|
28466
|
+
exports.suite = exports.describe;
|
|
28467
|
+
exports.teardown = exports.afterEach;
|
|
28468
|
+
exports.test = exports.it;
|
|
28469
|
+
|
|
28470
|
+
exports.run = function () {
|
|
28471
|
+
for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
|
|
28472
|
+
args[_key11] = arguments[_key11];
|
|
28473
|
+
}
|
|
28474
|
+
|
|
28475
|
+
return currentContext.run.apply(this, args);
|
|
28476
|
+
};
|
|
28027
28477
|
/**
|
|
28028
28478
|
* Constructs a new Mocha instance with `options`.
|
|
28029
28479
|
*
|
|
@@ -28060,6 +28510,7 @@
|
|
|
28060
28510
|
* @param {boolean} [options.isWorker] - Should be `true` if `Mocha` process is running in a worker process.
|
|
28061
28511
|
*/
|
|
28062
28512
|
|
|
28513
|
+
|
|
28063
28514
|
function Mocha() {
|
|
28064
28515
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
28065
28516
|
options = _objectSpread2(_objectSpread2({}, mocharc$2), options);
|
|
@@ -28248,20 +28699,7 @@
|
|
|
28248
28699
|
|
|
28249
28700
|
bindInterface(this.suite);
|
|
28250
28701
|
this.suite.on(EVENT_FILE_PRE_REQUIRE, function (context) {
|
|
28251
|
-
|
|
28252
|
-
exports.after = context.after || context.suiteTeardown;
|
|
28253
|
-
exports.beforeEach = context.beforeEach || context.setup;
|
|
28254
|
-
exports.before = context.before || context.suiteSetup;
|
|
28255
|
-
exports.describe = context.describe || context.suite;
|
|
28256
|
-
exports.it = context.it || context.test;
|
|
28257
|
-
exports.xit = context.xit || context.test && context.test.skip;
|
|
28258
|
-
exports.setup = context.setup || context.beforeEach;
|
|
28259
|
-
exports.suiteSetup = context.suiteSetup || context.before;
|
|
28260
|
-
exports.suiteTeardown = context.suiteTeardown || context.after;
|
|
28261
|
-
exports.suite = context.suite || context.describe;
|
|
28262
|
-
exports.teardown = context.teardown || context.afterEach;
|
|
28263
|
-
exports.test = context.test || context.it;
|
|
28264
|
-
exports.run = context.run;
|
|
28702
|
+
currentContext = context;
|
|
28265
28703
|
});
|
|
28266
28704
|
return this;
|
|
28267
28705
|
};
|
|
@@ -29430,7 +29868,7 @@
|
|
|
29430
29868
|
* A (sync) function to assert a user-supplied plugin implementation is valid.
|
|
29431
29869
|
*
|
|
29432
29870
|
* Defined in a {@link PluginDefinition}.
|
|
29433
|
-
|
|
29871
|
+
|
|
29434
29872
|
* @callback PluginValidator
|
|
29435
29873
|
* @param {*} value - Value to check
|
|
29436
29874
|
* @this {PluginDefinition}
|