mocha 9.1.4 → 9.2.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/mocha.js CHANGED
@@ -1,4 +1,4 @@
1
- // mocha@9.1.4 transpiled to javascript ES5
1
+ // mocha@9.2.2 transpiled to javascript ES5
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -56,9 +56,15 @@
56
56
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
57
57
  });
58
58
 
59
+ var functionBindNative = !fails(function () {
60
+ var test = (function () { /* empty */ }).bind();
61
+ // eslint-disable-next-line no-prototype-builtins -- safe
62
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
63
+ });
64
+
59
65
  var call$2 = Function.prototype.call;
60
66
 
61
- var functionCall = call$2.bind ? call$2.bind(call$2) : function () {
67
+ var functionCall = functionBindNative ? call$2.bind(call$2) : function () {
62
68
  return call$2.apply(call$2, arguments);
63
69
  };
64
70
 
@@ -71,13 +77,13 @@
71
77
 
72
78
  // `Object.prototype.propertyIsEnumerable` method implementation
73
79
  // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
74
- var f$7 = NASHORN_BUG ? function propertyIsEnumerable(V) {
80
+ var f$8 = NASHORN_BUG ? function propertyIsEnumerable(V) {
75
81
  var descriptor = getOwnPropertyDescriptor$3(this, V);
76
82
  return !!descriptor && descriptor.enumerable;
77
83
  } : $propertyIsEnumerable$2;
78
84
 
79
85
  var objectPropertyIsEnumerable = {
80
- f: f$7
86
+ f: f$8
81
87
  };
82
88
 
83
89
  var createPropertyDescriptor = function (bitmap, value) {
@@ -90,12 +96,12 @@
90
96
  };
91
97
 
92
98
  var FunctionPrototype$3 = Function.prototype;
93
- var bind$3 = FunctionPrototype$3.bind;
99
+ var bind$2 = FunctionPrototype$3.bind;
94
100
  var call$1 = FunctionPrototype$3.call;
95
- var callBind = bind$3 && bind$3.bind(call$1);
101
+ var uncurryThis = functionBindNative && bind$2.bind(call$1, call$1);
96
102
 
97
- var functionUncurryThis = bind$3 ? function (fn) {
98
- return fn && callBind(call$1, fn);
103
+ var functionUncurryThis = functionBindNative ? function (fn) {
104
+ return fn && uncurryThis(fn);
99
105
  } : function (fn) {
100
106
  return fn && function () {
101
107
  return call$1.apply(fn, arguments);
@@ -121,12 +127,12 @@
121
127
  return classofRaw(it) == 'String' ? split(it, '') : Object$5(it);
122
128
  } : Object$5;
123
129
 
124
- var TypeError$l = global_1.TypeError;
130
+ var TypeError$m = global_1.TypeError;
125
131
 
126
132
  // `RequireObjectCoercible` abstract operation
127
133
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
128
134
  var requireObjectCoercible = function (it) {
129
- if (it == undefined) throw TypeError$l("Can't call method on " + it);
135
+ if (it == undefined) throw TypeError$m("Can't call method on " + it);
130
136
  return it;
131
137
  };
132
138
 
@@ -225,12 +231,12 @@
225
231
  }
226
232
  };
227
233
 
228
- var TypeError$k = global_1.TypeError;
234
+ var TypeError$l = global_1.TypeError;
229
235
 
230
236
  // `Assert: IsCallable(argument) is true`
231
237
  var aCallable = function (argument) {
232
238
  if (isCallable(argument)) return argument;
233
- throw TypeError$k(tryToString(argument) + ' is not a function');
239
+ throw TypeError$l(tryToString(argument) + ' is not a function');
234
240
  };
235
241
 
236
242
  // `GetMethod` abstract operation
@@ -240,7 +246,7 @@
240
246
  return func == null ? undefined : aCallable(func);
241
247
  };
242
248
 
243
- var TypeError$j = global_1.TypeError;
249
+ var TypeError$k = global_1.TypeError;
244
250
 
245
251
  // `OrdinaryToPrimitive` abstract operation
246
252
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
@@ -249,15 +255,15 @@
249
255
  if (pref === 'string' && isCallable(fn = input.toString) && !isObject$1(val = functionCall(fn, input))) return val;
250
256
  if (isCallable(fn = input.valueOf) && !isObject$1(val = functionCall(fn, input))) return val;
251
257
  if (pref !== 'string' && isCallable(fn = input.toString) && !isObject$1(val = functionCall(fn, input))) return val;
252
- throw TypeError$j("Can't convert object to primitive value");
258
+ throw TypeError$k("Can't convert object to primitive value");
253
259
  };
254
260
 
255
261
  // eslint-disable-next-line es/no-object-defineproperty -- safe
256
- var defineProperty$a = Object.defineProperty;
262
+ var defineProperty$b = Object.defineProperty;
257
263
 
258
264
  var setGlobal = function (key, value) {
259
265
  try {
260
- defineProperty$a(global_1, key, { value: value, configurable: true, writable: true });
266
+ defineProperty$b(global_1, key, { value: value, configurable: true, writable: true });
261
267
  } catch (error) {
262
268
  global_1[key] = value;
263
269
  } return value;
@@ -272,9 +278,11 @@
272
278
  (module.exports = function (key, value) {
273
279
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
274
280
  })('versions', []).push({
275
- version: '3.19.0',
281
+ version: '3.21.1',
276
282
  mode: 'global',
277
- copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
283
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
284
+ license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
285
+ source: 'https://github.com/zloirock/core-js'
278
286
  });
279
287
  });
280
288
 
@@ -320,7 +328,7 @@
320
328
  } return WellKnownSymbolsStore$1[name];
321
329
  };
322
330
 
323
- var TypeError$i = global_1.TypeError;
331
+ var TypeError$j = global_1.TypeError;
324
332
  var TO_PRIMITIVE$1 = wellKnownSymbol('toPrimitive');
325
333
 
326
334
  // `ToPrimitive` abstract operation
@@ -333,7 +341,7 @@
333
341
  if (pref === undefined) pref = 'default';
334
342
  result = functionCall(exoticToPrim, input, pref);
335
343
  if (!isObject$1(result) || isSymbol$1(result)) return result;
336
- throw TypeError$i("Can't convert object to primitive value");
344
+ throw TypeError$j("Can't convert object to primitive value");
337
345
  }
338
346
  if (pref === undefined) pref = 'number';
339
347
  return ordinaryToPrimitive(input, pref);
@@ -354,61 +362,91 @@
354
362
  return EXISTS$1 ? document$3.createElement(it) : {};
355
363
  };
356
364
 
357
- // Thank's IE8 for his funny defineProperty
365
+ // Thanks to IE8 for its funny defineProperty
358
366
  var ie8DomDefine = !descriptors && !fails(function () {
359
- // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
367
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
360
368
  return Object.defineProperty(documentCreateElement('div'), 'a', {
361
369
  get: function () { return 7; }
362
370
  }).a != 7;
363
371
  });
364
372
 
365
373
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
366
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
374
+ var $getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
367
375
 
368
376
  // `Object.getOwnPropertyDescriptor` method
369
377
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
370
- var f$6 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
378
+ var f$7 = descriptors ? $getOwnPropertyDescriptor$2 : function getOwnPropertyDescriptor(O, P) {
371
379
  O = toIndexedObject(O);
372
380
  P = toPropertyKey(P);
373
381
  if (ie8DomDefine) try {
374
- return $getOwnPropertyDescriptor$1(O, P);
382
+ return $getOwnPropertyDescriptor$2(O, P);
375
383
  } catch (error) { /* empty */ }
376
384
  if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
377
385
  };
378
386
 
379
387
  var objectGetOwnPropertyDescriptor = {
380
- f: f$6
388
+ f: f$7
381
389
  };
382
390
 
391
+ // V8 ~ Chrome 36-
392
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
393
+ var v8PrototypeDefineBug = descriptors && fails(function () {
394
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
395
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
396
+ value: 42,
397
+ writable: false
398
+ }).prototype != 42;
399
+ });
400
+
383
401
  var String$5 = global_1.String;
384
- var TypeError$h = global_1.TypeError;
402
+ var TypeError$i = global_1.TypeError;
385
403
 
386
404
  // `Assert: Type(argument) is Object`
387
405
  var anObject = function (argument) {
388
406
  if (isObject$1(argument)) return argument;
389
- throw TypeError$h(String$5(argument) + ' is not an object');
407
+ throw TypeError$i(String$5(argument) + ' is not an object');
390
408
  };
391
409
 
392
- var TypeError$g = global_1.TypeError;
410
+ var TypeError$h = global_1.TypeError;
393
411
  // eslint-disable-next-line es/no-object-defineproperty -- safe
394
412
  var $defineProperty$1 = Object.defineProperty;
413
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
414
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
415
+ var ENUMERABLE = 'enumerable';
416
+ var CONFIGURABLE$1 = 'configurable';
417
+ var WRITABLE = 'writable';
395
418
 
396
419
  // `Object.defineProperty` method
397
420
  // https://tc39.es/ecma262/#sec-object.defineproperty
398
- var f$5 = descriptors ? $defineProperty$1 : function defineProperty(O, P, Attributes) {
421
+ var f$6 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
422
+ anObject(O);
423
+ P = toPropertyKey(P);
424
+ anObject(Attributes);
425
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
426
+ var current = $getOwnPropertyDescriptor$1(O, P);
427
+ if (current && current[WRITABLE]) {
428
+ O[P] = Attributes.value;
429
+ Attributes = {
430
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
431
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
432
+ writable: false
433
+ };
434
+ }
435
+ } return $defineProperty$1(O, P, Attributes);
436
+ } : $defineProperty$1 : function defineProperty(O, P, Attributes) {
399
437
  anObject(O);
400
438
  P = toPropertyKey(P);
401
439
  anObject(Attributes);
402
440
  if (ie8DomDefine) try {
403
441
  return $defineProperty$1(O, P, Attributes);
404
442
  } catch (error) { /* empty */ }
405
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$g('Accessors not supported');
443
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$h('Accessors not supported');
406
444
  if ('value' in Attributes) O[P] = Attributes.value;
407
445
  return O;
408
446
  };
409
447
 
410
448
  var objectDefineProperty = {
411
- f: f$5
449
+ f: f$6
412
450
  };
413
451
 
414
452
  var createNonEnumerableProperty = descriptors ? function (object, key, value) {
@@ -442,7 +480,7 @@
442
480
  var hiddenKeys$1 = {};
443
481
 
444
482
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
445
- var TypeError$f = global_1.TypeError;
483
+ var TypeError$g = global_1.TypeError;
446
484
  var WeakMap = global_1.WeakMap;
447
485
  var set$2, get$1, has;
448
486
 
@@ -454,7 +492,7 @@
454
492
  return function (it) {
455
493
  var state;
456
494
  if (!isObject$1(it) || (state = get$1(it)).type !== TYPE) {
457
- throw TypeError$f('Incompatible receiver, ' + TYPE + ' required');
495
+ throw TypeError$g('Incompatible receiver, ' + TYPE + ' required');
458
496
  } return state;
459
497
  };
460
498
  };
@@ -465,7 +503,7 @@
465
503
  var wmhas = functionUncurryThis(store.has);
466
504
  var wmset = functionUncurryThis(store.set);
467
505
  set$2 = function (it, metadata) {
468
- if (wmhas(store, it)) throw new TypeError$f(OBJECT_ALREADY_INITIALIZED);
506
+ if (wmhas(store, it)) throw new TypeError$g(OBJECT_ALREADY_INITIALIZED);
469
507
  metadata.facade = it;
470
508
  wmset(store, it, metadata);
471
509
  return metadata;
@@ -480,7 +518,7 @@
480
518
  var STATE = sharedKey('state');
481
519
  hiddenKeys$1[STATE] = true;
482
520
  set$2 = function (it, metadata) {
483
- if (hasOwnProperty_1(it, STATE)) throw new TypeError$f(OBJECT_ALREADY_INITIALIZED);
521
+ if (hasOwnProperty_1(it, STATE)) throw new TypeError$g(OBJECT_ALREADY_INITIALIZED);
484
522
  metadata.facade = it;
485
523
  createNonEnumerableProperty(it, STATE, metadata);
486
524
  return metadata;
@@ -569,7 +607,7 @@
569
607
  return number !== number || number === 0 ? 0 : (number > 0 ? floor$6 : ceil)(number);
570
608
  };
571
609
 
572
- var max$3 = Math.max;
610
+ var max$4 = Math.max;
573
611
  var min$7 = Math.min;
574
612
 
575
613
  // Helper for a popular repeating case of the spec:
@@ -577,7 +615,7 @@
577
615
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
578
616
  var toAbsoluteIndex = function (index, length) {
579
617
  var integer = toIntegerOrInfinity(index);
580
- return integer < 0 ? max$3(integer + length, 0) : min$7(integer, length);
618
+ return integer < 0 ? max$4(integer + length, 0) : min$7(integer, length);
581
619
  };
582
620
 
583
621
  var min$6 = Math.min;
@@ -657,19 +695,19 @@
657
695
  // `Object.getOwnPropertyNames` method
658
696
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
659
697
  // eslint-disable-next-line es/no-object-getownpropertynames -- safe
660
- var f$4 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
698
+ var f$5 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
661
699
  return objectKeysInternal(O, hiddenKeys);
662
700
  };
663
701
 
664
702
  var objectGetOwnPropertyNames = {
665
- f: f$4
703
+ f: f$5
666
704
  };
667
705
 
668
706
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
669
- var f$3 = Object.getOwnPropertySymbols;
707
+ var f$4 = Object.getOwnPropertySymbols;
670
708
 
671
709
  var objectGetOwnPropertySymbols = {
672
- f: f$3
710
+ f: f$4
673
711
  };
674
712
 
675
713
  var concat$2 = functionUncurryThis([].concat);
@@ -681,13 +719,15 @@
681
719
  return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
682
720
  };
683
721
 
684
- var copyConstructorProperties = function (target, source) {
722
+ var copyConstructorProperties = function (target, source, exceptions) {
685
723
  var keys = ownKeys$1(source);
686
724
  var defineProperty = objectDefineProperty.f;
687
725
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
688
726
  for (var i = 0; i < keys.length; i++) {
689
727
  var key = keys[i];
690
- if (!hasOwnProperty_1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
728
+ if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
729
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
730
+ }
691
731
  }
692
732
  };
693
733
 
@@ -812,7 +852,7 @@
812
852
  var exec$2 = functionUncurryThis(constructorRegExp.exec);
813
853
  var INCORRECT_TO_STRING = !constructorRegExp.exec(noop$2);
814
854
 
815
- var isConstructorModern = function (argument) {
855
+ var isConstructorModern = function isConstructor(argument) {
816
856
  if (!isCallable(argument)) return false;
817
857
  try {
818
858
  construct(noop$2, empty, argument);
@@ -822,16 +862,25 @@
822
862
  }
823
863
  };
824
864
 
825
- var isConstructorLegacy = function (argument) {
865
+ var isConstructorLegacy = function isConstructor(argument) {
826
866
  if (!isCallable(argument)) return false;
827
867
  switch (classof(argument)) {
828
868
  case 'AsyncFunction':
829
869
  case 'GeneratorFunction':
830
870
  case 'AsyncGeneratorFunction': return false;
871
+ }
872
+ try {
831
873
  // we can't check .prototype since constructors produced by .bind haven't it
832
- } return INCORRECT_TO_STRING || !!exec$2(constructorRegExp, inspectSource(argument));
874
+ // `Function#toString` throws on some built-it function in some legacy engines
875
+ // (for example, `DOMQuad` and similar in FF41-)
876
+ return INCORRECT_TO_STRING || !!exec$2(constructorRegExp, inspectSource(argument));
877
+ } catch (error) {
878
+ return true;
879
+ }
833
880
  };
834
881
 
882
+ isConstructorLegacy.sham = true;
883
+
835
884
  // `IsConstructor` abstract operation
836
885
  // https://tc39.es/ecma262/#sec-isconstructor
837
886
  var isConstructor = !construct || fails(function () {
@@ -843,7 +892,7 @@
843
892
  }) ? isConstructorLegacy : isConstructorModern;
844
893
 
845
894
  var SPECIES$6 = wellKnownSymbol('species');
846
- var Array$6 = global_1.Array;
895
+ var Array$7 = global_1.Array;
847
896
 
848
897
  // a part of `ArraySpeciesCreate` abstract operation
849
898
  // https://tc39.es/ecma262/#sec-arrayspeciescreate
@@ -852,12 +901,12 @@
852
901
  if (isArray$3(originalArray)) {
853
902
  C = originalArray.constructor;
854
903
  // cross-realm fallback
855
- if (isConstructor(C) && (C === Array$6 || isArray$3(C.prototype))) C = undefined;
904
+ if (isConstructor(C) && (C === Array$7 || isArray$3(C.prototype))) C = undefined;
856
905
  else if (isObject$1(C)) {
857
906
  C = C[SPECIES$6];
858
907
  if (C === null) C = undefined;
859
908
  }
860
- } return C === undefined ? Array$6 : C;
909
+ } return C === undefined ? Array$7 : C;
861
910
  };
862
911
 
863
912
  // `ArraySpeciesCreate` abstract operation
@@ -890,8 +939,8 @@
890
939
 
891
940
  var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('splice');
892
941
 
893
- var TypeError$e = global_1.TypeError;
894
- var max$2 = Math.max;
942
+ var TypeError$f = global_1.TypeError;
943
+ var max$3 = Math.max;
895
944
  var min$5 = Math.min;
896
945
  var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
897
946
  var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
@@ -913,10 +962,10 @@
913
962
  actualDeleteCount = len - actualStart;
914
963
  } else {
915
964
  insertCount = argumentsLength - 2;
916
- actualDeleteCount = min$5(max$2(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
965
+ actualDeleteCount = min$5(max$3(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
917
966
  }
918
967
  if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$1) {
919
- throw TypeError$e(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
968
+ throw TypeError$f(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
920
969
  }
921
970
  A = arraySpeciesCreate(O, actualDeleteCount);
922
971
  for (k = 0; k < actualDeleteCount; k++) {
@@ -948,6 +997,18 @@
948
997
  }
949
998
  });
950
999
 
1000
+ // `Object.prototype.toString` method implementation
1001
+ // https://tc39.es/ecma262/#sec-object.prototype.tostring
1002
+ var objectToString$1 = toStringTagSupport ? {}.toString : function toString() {
1003
+ return '[object ' + classof(this) + ']';
1004
+ };
1005
+
1006
+ // `Object.prototype.toString` method
1007
+ // https://tc39.es/ecma262/#sec-object.prototype.tostring
1008
+ if (!toStringTagSupport) {
1009
+ redefine(Object.prototype, 'toString', objectToString$1, { unsafe: true });
1010
+ }
1011
+
951
1012
  // iterable DOM collections
952
1013
  // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
953
1014
  var domIterables = {
@@ -992,12 +1053,12 @@
992
1053
 
993
1054
  var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
994
1055
 
995
- var bind$2 = functionUncurryThis(functionUncurryThis.bind);
1056
+ var bind$1 = functionUncurryThis(functionUncurryThis.bind);
996
1057
 
997
1058
  // optional / simple context binding
998
1059
  var functionBindContext = function (fn, that) {
999
1060
  aCallable(fn);
1000
- return that === undefined ? fn : bind$2 ? bind$2(fn, that) : function (/* ...args */) {
1061
+ return that === undefined ? fn : functionBindNative ? bind$1(fn, that) : function (/* ...args */) {
1001
1062
  return fn.apply(that, arguments);
1002
1063
  };
1003
1064
  };
@@ -1072,8 +1133,8 @@
1072
1133
  var arrayMethodIsStrict = function (METHOD_NAME, argument) {
1073
1134
  var method = [][METHOD_NAME];
1074
1135
  return !!method && fails(function () {
1075
- // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
1076
- method.call(null, argument || function () { throw 1; }, 1);
1136
+ // eslint-disable-next-line no-useless-call -- required for testing
1137
+ method.call(null, argument || function () { return 1; }, 1);
1077
1138
  });
1078
1139
  };
1079
1140
 
@@ -1127,11 +1188,11 @@
1127
1188
  return objectKeysInternal(O, enumBugKeys);
1128
1189
  };
1129
1190
 
1130
- var FAILS_ON_PRIMITIVES$4 = fails(function () { objectKeys(1); });
1191
+ var FAILS_ON_PRIMITIVES$5 = fails(function () { objectKeys(1); });
1131
1192
 
1132
1193
  // `Object.keys` method
1133
1194
  // https://tc39.es/ecma262/#sec-object.keys
1134
- _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$4 }, {
1195
+ _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$5 }, {
1135
1196
  keys: function keys(it) {
1136
1197
  return objectKeys(toObject(it));
1137
1198
  }
@@ -1167,7 +1228,13 @@
1167
1228
  return re.exec('abcd') != null;
1168
1229
  });
1169
1230
 
1170
- var BROKEN_CARET = fails(function () {
1231
+ // UC Browser bug
1232
+ // https://github.com/zloirock/core-js/issues/1008
1233
+ var MISSED_STICKY$1 = UNSUPPORTED_Y$3 || fails(function () {
1234
+ return !$RegExp$2('a', 'y').sticky;
1235
+ });
1236
+
1237
+ var BROKEN_CARET = UNSUPPORTED_Y$3 || fails(function () {
1171
1238
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1172
1239
  var re = $RegExp$2('^r', 'gy');
1173
1240
  re.lastIndex = 2;
@@ -1175,14 +1242,15 @@
1175
1242
  });
1176
1243
 
1177
1244
  var regexpStickyHelpers = {
1178
- UNSUPPORTED_Y: UNSUPPORTED_Y$3,
1179
- BROKEN_CARET: BROKEN_CARET
1245
+ BROKEN_CARET: BROKEN_CARET,
1246
+ MISSED_STICKY: MISSED_STICKY$1,
1247
+ UNSUPPORTED_Y: UNSUPPORTED_Y$3
1180
1248
  };
1181
1249
 
1182
1250
  // `Object.defineProperties` method
1183
1251
  // https://tc39.es/ecma262/#sec-object.defineproperties
1184
1252
  // eslint-disable-next-line es/no-object-defineproperties -- safe
1185
- var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
1253
+ var f$3 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
1186
1254
  anObject(O);
1187
1255
  var props = toIndexedObject(Properties);
1188
1256
  var keys = objectKeys(Properties);
@@ -1193,6 +1261,10 @@
1193
1261
  return O;
1194
1262
  };
1195
1263
 
1264
+ var objectDefineProperties = {
1265
+ f: f$3
1266
+ };
1267
+
1196
1268
  var html$1 = getBuiltIn('document', 'documentElement');
1197
1269
 
1198
1270
  /* global ActiveXObject -- old IE, WSH */
@@ -1275,7 +1347,7 @@
1275
1347
  // add "__proto__" for Object.getPrototypeOf polyfill
1276
1348
  result[IE_PROTO$1] = O;
1277
1349
  } else result = NullProtoObject();
1278
- return Properties === undefined ? result : objectDefineProperties(result, Properties);
1350
+ return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
1279
1351
  };
1280
1352
 
1281
1353
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
@@ -1324,7 +1396,7 @@
1324
1396
  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1325
1397
  })();
1326
1398
 
1327
- var UNSUPPORTED_Y$2 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
1399
+ var UNSUPPORTED_Y$2 = regexpStickyHelpers.BROKEN_CARET;
1328
1400
 
1329
1401
  // nonparticipating capturing group, copied from es5-shim's String#split patch.
1330
1402
  var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
@@ -1332,7 +1404,6 @@
1332
1404
  var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$2 || regexpUnsupportedDotAll || regexpUnsupportedNcg;
1333
1405
 
1334
1406
  if (PATCH) {
1335
- // eslint-disable-next-line max-statements -- TODO
1336
1407
  patchedExec = function exec(string) {
1337
1408
  var re = this;
1338
1409
  var state = getInternalState$5(re);
@@ -1501,7 +1572,7 @@
1501
1572
  return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
1502
1573
  };
1503
1574
 
1504
- var TypeError$d = global_1.TypeError;
1575
+ var TypeError$e = global_1.TypeError;
1505
1576
 
1506
1577
  // `RegExpExec` abstract operation
1507
1578
  // https://tc39.es/ecma262/#sec-regexpexec
@@ -1513,7 +1584,7 @@
1513
1584
  return result;
1514
1585
  }
1515
1586
  if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S);
1516
- throw TypeError$d('RegExp#exec called on incompatible receiver');
1587
+ throw TypeError$e('RegExp#exec called on incompatible receiver');
1517
1588
  };
1518
1589
 
1519
1590
  // @@search logic
@@ -1547,7 +1618,7 @@
1547
1618
  var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
1548
1619
  var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
1549
1620
  var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
1550
- var TypeError$c = global_1.TypeError;
1621
+ var TypeError$d = global_1.TypeError;
1551
1622
 
1552
1623
  // We can't use this feature detection in V8 since it causes
1553
1624
  // deoptimization and serious performance degradation
@@ -1566,12 +1637,12 @@
1566
1637
  return spreadable !== undefined ? !!spreadable : isArray$3(O);
1567
1638
  };
1568
1639
 
1569
- var FORCED$8 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
1640
+ var FORCED$7 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
1570
1641
 
1571
1642
  // `Array.prototype.concat` method
1572
1643
  // https://tc39.es/ecma262/#sec-array.prototype.concat
1573
1644
  // with adding support of @@isConcatSpreadable and @@species
1574
- _export({ target: 'Array', proto: true, forced: FORCED$8 }, {
1645
+ _export({ target: 'Array', proto: true, forced: FORCED$7 }, {
1575
1646
  // eslint-disable-next-line no-unused-vars -- required for `.length`
1576
1647
  concat: function concat(arg) {
1577
1648
  var O = toObject(this);
@@ -1582,10 +1653,10 @@
1582
1653
  E = i === -1 ? O : arguments[i];
1583
1654
  if (isConcatSpreadable(E)) {
1584
1655
  len = lengthOfArrayLike(E);
1585
- if (n + len > MAX_SAFE_INTEGER) throw TypeError$c(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1656
+ if (n + len > MAX_SAFE_INTEGER) throw TypeError$d(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1586
1657
  for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
1587
1658
  } else {
1588
- if (n >= MAX_SAFE_INTEGER) throw TypeError$c(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1659
+ if (n >= MAX_SAFE_INTEGER) throw TypeError$d(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1589
1660
  createProperty(A, n++, E);
1590
1661
  }
1591
1662
  }
@@ -1672,7 +1743,7 @@
1672
1743
  }
1673
1744
  }
1674
1745
 
1675
- var queue$2 = [];
1746
+ var queue$3 = [];
1676
1747
  var draining$1 = false;
1677
1748
  var currentQueue$1;
1678
1749
  var queueIndex$1 = -1;
@@ -1685,12 +1756,12 @@
1685
1756
  draining$1 = false;
1686
1757
 
1687
1758
  if (currentQueue$1.length) {
1688
- queue$2 = currentQueue$1.concat(queue$2);
1759
+ queue$3 = currentQueue$1.concat(queue$3);
1689
1760
  } else {
1690
1761
  queueIndex$1 = -1;
1691
1762
  }
1692
1763
 
1693
- if (queue$2.length) {
1764
+ if (queue$3.length) {
1694
1765
  drainQueue$1();
1695
1766
  }
1696
1767
  }
@@ -1702,11 +1773,11 @@
1702
1773
 
1703
1774
  var timeout = runTimeout$1(cleanUpNextTick$1);
1704
1775
  draining$1 = true;
1705
- var len = queue$2.length;
1776
+ var len = queue$3.length;
1706
1777
 
1707
1778
  while (len) {
1708
- currentQueue$1 = queue$2;
1709
- queue$2 = [];
1779
+ currentQueue$1 = queue$3;
1780
+ queue$3 = [];
1710
1781
 
1711
1782
  while (++queueIndex$1 < len) {
1712
1783
  if (currentQueue$1) {
@@ -1715,7 +1786,7 @@
1715
1786
  }
1716
1787
 
1717
1788
  queueIndex$1 = -1;
1718
- len = queue$2.length;
1789
+ len = queue$3.length;
1719
1790
  }
1720
1791
 
1721
1792
  currentQueue$1 = null;
@@ -1732,9 +1803,9 @@
1732
1803
  }
1733
1804
  }
1734
1805
 
1735
- queue$2.push(new Item$1(fun, args));
1806
+ queue$3.push(new Item$1(fun, args));
1736
1807
 
1737
- if (queue$2.length === 1 && !draining$1) {
1808
+ if (queue$3.length === 1 && !draining$1) {
1738
1809
  runTimeout$1(drainQueue$1);
1739
1810
  }
1740
1811
  } // v8 likes predictible objects
@@ -1838,19 +1909,7 @@
1838
1909
  uptime: uptime$1
1839
1910
  };
1840
1911
 
1841
- // `Object.prototype.toString` method implementation
1842
- // https://tc39.es/ecma262/#sec-object.prototype.tostring
1843
- var objectToString$1 = toStringTagSupport ? {}.toString : function toString() {
1844
- return '[object ' + classof(this) + ']';
1845
- };
1846
-
1847
- // `Object.prototype.toString` method
1848
- // https://tc39.es/ecma262/#sec-object.prototype.tostring
1849
- if (!toStringTagSupport) {
1850
- redefine(Object.prototype, 'toString', objectToString$1, { unsafe: true });
1851
- }
1852
-
1853
- var PROPER_FUNCTION_NAME$4 = functionName.PROPER;
1912
+ var PROPER_FUNCTION_NAME$3 = functionName.PROPER;
1854
1913
 
1855
1914
 
1856
1915
 
@@ -1865,7 +1924,7 @@
1865
1924
 
1866
1925
  var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
1867
1926
  // FF44- RegExp#toString has a wrong name
1868
- var INCORRECT_NAME = PROPER_FUNCTION_NAME$4 && n$ToString.name != TO_STRING;
1927
+ var INCORRECT_NAME = PROPER_FUNCTION_NAME$3 && n$ToString.name != TO_STRING;
1869
1928
 
1870
1929
  // `RegExp.prototype.toString` method
1871
1930
  // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
@@ -1901,11 +1960,11 @@
1901
1960
  } return object instanceof Object$1 ? ObjectPrototype$3 : null;
1902
1961
  };
1903
1962
 
1904
- var FAILS_ON_PRIMITIVES$3 = fails(function () { objectGetPrototypeOf(1); });
1963
+ var FAILS_ON_PRIMITIVES$4 = fails(function () { objectGetPrototypeOf(1); });
1905
1964
 
1906
1965
  // `Object.getPrototypeOf` method
1907
1966
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1908
- _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$3, sham: !correctPrototypeGetter }, {
1967
+ _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$4, sham: !correctPrototypeGetter }, {
1909
1968
  getPrototypeOf: function getPrototypeOf(it) {
1910
1969
  return objectGetPrototypeOf(toObject(it));
1911
1970
  }
@@ -1913,18 +1972,18 @@
1913
1972
 
1914
1973
  var FUNCTION_NAME_EXISTS = functionName.EXISTS;
1915
1974
 
1916
- var defineProperty$9 = objectDefineProperty.f;
1975
+ var defineProperty$a = objectDefineProperty.f;
1917
1976
 
1918
1977
  var FunctionPrototype$1 = Function.prototype;
1919
1978
  var functionToString = functionUncurryThis(FunctionPrototype$1.toString);
1920
- var nameRE = /^\s*function ([^ (]*)/;
1979
+ var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/;
1921
1980
  var regExpExec = functionUncurryThis(nameRE.exec);
1922
1981
  var NAME$1 = 'name';
1923
1982
 
1924
1983
  // Function instances `.name` property
1925
1984
  // https://tc39.es/ecma262/#sec-function-instances-name
1926
1985
  if (descriptors && !FUNCTION_NAME_EXISTS) {
1927
- defineProperty$9(FunctionPrototype$1, NAME$1, {
1986
+ defineProperty$a(FunctionPrototype$1, NAME$1, {
1928
1987
  configurable: true,
1929
1988
  get: function () {
1930
1989
  try {
@@ -2384,19 +2443,63 @@
2384
2443
  return ret;
2385
2444
  }
2386
2445
 
2446
+ function _asyncIterator(iterable) {
2447
+ var method,
2448
+ async,
2449
+ sync,
2450
+ retry = 2;
2451
+
2452
+ for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) {
2453
+ if (async && null != (method = iterable[async])) return method.call(iterable);
2454
+ if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable));
2455
+ async = "@@asyncIterator", sync = "@@iterator";
2456
+ }
2457
+
2458
+ throw new TypeError("Object is not async iterable");
2459
+ }
2460
+
2461
+ function AsyncFromSyncIterator(s) {
2462
+ function AsyncFromSyncIteratorContinuation(r) {
2463
+ if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
2464
+ var done = r.done;
2465
+ return Promise.resolve(r.value).then(function (value) {
2466
+ return {
2467
+ value: value,
2468
+ done: done
2469
+ };
2470
+ });
2471
+ }
2472
+
2473
+ return AsyncFromSyncIterator = function (s) {
2474
+ this.s = s, this.n = s.next;
2475
+ }, AsyncFromSyncIterator.prototype = {
2476
+ s: null,
2477
+ n: null,
2478
+ next: function () {
2479
+ return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
2480
+ },
2481
+ return: function (value) {
2482
+ var ret = this.s.return;
2483
+ return void 0 === ret ? Promise.resolve({
2484
+ value: value,
2485
+ done: !0
2486
+ }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments));
2487
+ },
2488
+ throw: function (value) {
2489
+ var thr = this.s.return;
2490
+ return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments));
2491
+ }
2492
+ }, new AsyncFromSyncIterator(s);
2493
+ }
2494
+
2387
2495
  function ownKeys(object, enumerableOnly) {
2388
2496
  var keys = Object.keys(object);
2389
2497
 
2390
2498
  if (Object.getOwnPropertySymbols) {
2391
2499
  var symbols = Object.getOwnPropertySymbols(object);
2392
-
2393
- if (enumerableOnly) {
2394
- symbols = symbols.filter(function (sym) {
2395
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2396
- });
2397
- }
2398
-
2399
- keys.push.apply(keys, symbols);
2500
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
2501
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2502
+ })), keys.push.apply(keys, symbols);
2400
2503
  }
2401
2504
 
2402
2505
  return keys;
@@ -2404,19 +2507,12 @@
2404
2507
 
2405
2508
  function _objectSpread2(target) {
2406
2509
  for (var i = 1; i < arguments.length; i++) {
2407
- var source = arguments[i] != null ? arguments[i] : {};
2408
-
2409
- if (i % 2) {
2410
- ownKeys(Object(source), true).forEach(function (key) {
2411
- _defineProperty(target, key, source[key]);
2412
- });
2413
- } else if (Object.getOwnPropertyDescriptors) {
2414
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2415
- } else {
2416
- ownKeys(Object(source)).forEach(function (key) {
2417
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2418
- });
2419
- }
2510
+ var source = null != arguments[i] ? arguments[i] : {};
2511
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
2512
+ _defineProperty(target, key, source[key]);
2513
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
2514
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2515
+ });
2420
2516
  }
2421
2517
 
2422
2518
  return target;
@@ -2425,31 +2521,11 @@
2425
2521
  function _typeof(obj) {
2426
2522
  "@babel/helpers - typeof";
2427
2523
 
2428
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
2429
- _typeof = function (obj) {
2430
- return typeof obj;
2431
- };
2432
- } else {
2433
- _typeof = function (obj) {
2434
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2435
- };
2436
- }
2437
-
2438
- return _typeof(obj);
2439
- }
2440
-
2441
- function _asyncIterator(iterable) {
2442
- var method;
2443
-
2444
- if (typeof Symbol !== "undefined") {
2445
- if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator];
2446
- if (method == null && Symbol.iterator) method = iterable[Symbol.iterator];
2447
- }
2448
-
2449
- if (method == null) method = iterable["@@asyncIterator"];
2450
- if (method == null) method = iterable["@@iterator"];
2451
- if (method == null) throw new TypeError("Object is not async iterable");
2452
- return method.call(iterable);
2524
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
2525
+ return typeof obj;
2526
+ } : function (obj) {
2527
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2528
+ }, _typeof(obj);
2453
2529
  }
2454
2530
 
2455
2531
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -2494,6 +2570,25 @@
2494
2570
  }
2495
2571
  }
2496
2572
 
2573
+ function _defineProperties(target, props) {
2574
+ for (var i = 0; i < props.length; i++) {
2575
+ var descriptor = props[i];
2576
+ descriptor.enumerable = descriptor.enumerable || false;
2577
+ descriptor.configurable = true;
2578
+ if ("value" in descriptor) descriptor.writable = true;
2579
+ Object.defineProperty(target, descriptor.key, descriptor);
2580
+ }
2581
+ }
2582
+
2583
+ function _createClass(Constructor, protoProps, staticProps) {
2584
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
2585
+ if (staticProps) _defineProperties(Constructor, staticProps);
2586
+ Object.defineProperty(Constructor, "prototype", {
2587
+ writable: false
2588
+ });
2589
+ return Constructor;
2590
+ }
2591
+
2497
2592
  function _defineProperty(obj, key, value) {
2498
2593
  if (key in obj) {
2499
2594
  Object.defineProperty(obj, key, {
@@ -2521,6 +2616,9 @@
2521
2616
  configurable: true
2522
2617
  }
2523
2618
  });
2619
+ Object.defineProperty(subClass, "prototype", {
2620
+ writable: false
2621
+ });
2524
2622
  if (superClass) _setPrototypeOf(subClass, superClass);
2525
2623
  }
2526
2624
 
@@ -2638,11 +2736,10 @@
2638
2736
 
2639
2737
  var FunctionPrototype = Function.prototype;
2640
2738
  var apply = FunctionPrototype.apply;
2641
- var bind$1 = FunctionPrototype.bind;
2642
2739
  var call = FunctionPrototype.call;
2643
2740
 
2644
2741
  // eslint-disable-next-line es/no-reflect -- safe
2645
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (bind$1 ? call.bind(apply) : function () {
2742
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () {
2646
2743
  return call.apply(apply, arguments);
2647
2744
  });
2648
2745
 
@@ -2729,7 +2826,7 @@
2729
2826
  };
2730
2827
 
2731
2828
  var REPLACE = wellKnownSymbol('replace');
2732
- var max$1 = Math.max;
2829
+ var max$2 = Math.max;
2733
2830
  var min$4 = Math.min;
2734
2831
  var concat$1 = functionUncurryThis([].concat);
2735
2832
  var push$4 = functionUncurryThis([].push);
@@ -2821,7 +2918,7 @@
2821
2918
  result = results[i];
2822
2919
 
2823
2920
  var matched = toString_1(result[0]);
2824
- var position = max$1(min$4(toIntegerOrInfinity(result.index), S.length), 0);
2921
+ var position = max$2(min$4(toIntegerOrInfinity(result.index), S.length), 0);
2825
2922
  var captures = [];
2826
2923
  // NOTE: This is equivalent to
2827
2924
  // captures = result.slice(1).map(maybeToString)
@@ -2848,11 +2945,11 @@
2848
2945
  }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
2849
2946
 
2850
2947
  var String$3 = global_1.String;
2851
- var TypeError$b = global_1.TypeError;
2948
+ var TypeError$c = global_1.TypeError;
2852
2949
 
2853
2950
  var aPossiblePrototype = function (argument) {
2854
2951
  if (typeof argument == 'object' || isCallable(argument)) return argument;
2855
- throw TypeError$b("Can't set " + String$3(argument) + ' as a prototype');
2952
+ throw TypeError$c("Can't set " + String$3(argument) + ' as a prototype');
2856
2953
  };
2857
2954
 
2858
2955
  /* eslint-disable no-proto -- safe */
@@ -2935,14 +3032,14 @@
2935
3032
 
2936
3033
  var getOwnPropertyNames$3 = objectGetOwnPropertyNames.f;
2937
3034
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
2938
- var defineProperty$8 = objectDefineProperty.f;
3035
+ var defineProperty$9 = objectDefineProperty.f;
2939
3036
 
2940
3037
  var trim = stringTrim.trim;
2941
3038
 
2942
3039
  var NUMBER = 'Number';
2943
3040
  var NativeNumber = global_1[NUMBER];
2944
3041
  var NumberPrototype = NativeNumber.prototype;
2945
- var TypeError$a = global_1.TypeError;
3042
+ var TypeError$b = global_1.TypeError;
2946
3043
  var arraySlice$1 = functionUncurryThis(''.slice);
2947
3044
  var charCodeAt = functionUncurryThis(''.charCodeAt);
2948
3045
 
@@ -2958,7 +3055,7 @@
2958
3055
  var toNumber = function (argument) {
2959
3056
  var it = toPrimitive(argument, 'number');
2960
3057
  var first, third, radix, maxCode, digits, length, index, code;
2961
- if (isSymbol$1(it)) throw TypeError$a('Cannot convert a Symbol value to a number');
3058
+ if (isSymbol$1(it)) throw TypeError$b('Cannot convert a Symbol value to a number');
2962
3059
  if (typeof it == 'string' && it.length > 2) {
2963
3060
  it = trim(it);
2964
3061
  first = charCodeAt(it, 0);
@@ -3002,7 +3099,7 @@
3002
3099
  'fromString,range'
3003
3100
  ).split(','), j$1 = 0, key$1; keys$3.length > j$1; j$1++) {
3004
3101
  if (hasOwnProperty_1(NativeNumber, key$1 = keys$3[j$1]) && !hasOwnProperty_1(NumberWrapper, key$1)) {
3005
- defineProperty$8(NumberWrapper, key$1, getOwnPropertyDescriptor$1(NativeNumber, key$1));
3102
+ defineProperty$9(NumberWrapper, key$1, getOwnPropertyDescriptor$1(NativeNumber, key$1));
3006
3103
  }
3007
3104
  }
3008
3105
  NumberWrapper.prototype = NumberPrototype;
@@ -3033,7 +3130,7 @@
3033
3130
  }
3034
3131
  };
3035
3132
 
3036
- var defineProperty$7 = objectDefineProperty.f;
3133
+ var defineProperty$8 = objectDefineProperty.f;
3037
3134
  var getOwnPropertyNames$2 = objectGetOwnPropertyNames.f;
3038
3135
 
3039
3136
 
@@ -3067,10 +3164,11 @@
3067
3164
  // "new" should create a new object, old webkit bug
3068
3165
  var CORRECT_NEW = new NativeRegExp(re1) !== re1;
3069
3166
 
3167
+ var MISSED_STICKY = regexpStickyHelpers.MISSED_STICKY;
3070
3168
  var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y;
3071
3169
 
3072
3170
  var BASE_FORCED = descriptors &&
3073
- (!CORRECT_NEW || UNSUPPORTED_Y$1 || regexpUnsupportedDotAll || regexpUnsupportedNcg || fails(function () {
3171
+ (!CORRECT_NEW || MISSED_STICKY || regexpUnsupportedDotAll || regexpUnsupportedNcg || fails(function () {
3074
3172
  re2[MATCH$1] = false;
3075
3173
  // RegExp constructor can alter flags and IsRegExp works correct with @@match
3076
3174
  return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
@@ -3175,9 +3273,9 @@
3175
3273
 
3176
3274
  rawFlags = flags;
3177
3275
 
3178
- if (UNSUPPORTED_Y$1 && 'sticky' in re1) {
3276
+ if (MISSED_STICKY && 'sticky' in re1) {
3179
3277
  sticky = !!flags && stringIndexOf$1(flags, 'y') > -1;
3180
- if (sticky) flags = replace$1(flags, /y/g, '');
3278
+ if (sticky && UNSUPPORTED_Y$1) flags = replace$1(flags, /y/g, '');
3181
3279
  }
3182
3280
 
3183
3281
  if (regexpUnsupportedNcg) {
@@ -3207,7 +3305,7 @@
3207
3305
  };
3208
3306
 
3209
3307
  var proxy = function (key) {
3210
- key in RegExpWrapper || defineProperty$7(RegExpWrapper, key, {
3308
+ key in RegExpWrapper || defineProperty$8(RegExpWrapper, key, {
3211
3309
  configurable: true,
3212
3310
  get: function () { return NativeRegExp[key]; },
3213
3311
  set: function (it) { NativeRegExp[key] = it; }
@@ -3226,7 +3324,18 @@
3226
3324
  // https://tc39.es/ecma262/#sec-get-regexp-@@species
3227
3325
  setSpecies('RegExp');
3228
3326
 
3229
- var arraySlice = functionUncurryThis([].slice);
3327
+ var Array$6 = global_1.Array;
3328
+ var max$1 = Math.max;
3329
+
3330
+ var arraySliceSimple = function (O, start, end) {
3331
+ var length = lengthOfArrayLike(O);
3332
+ var k = toAbsoluteIndex(start, length);
3333
+ var fin = toAbsoluteIndex(end === undefined ? length : end, length);
3334
+ var result = Array$6(max$1(fin - k, 0));
3335
+ for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
3336
+ result.length = n;
3337
+ return result;
3338
+ };
3230
3339
 
3231
3340
  /* eslint-disable es/no-object-getownpropertynames -- safe */
3232
3341
 
@@ -3241,7 +3350,7 @@
3241
3350
  try {
3242
3351
  return $getOwnPropertyNames$1(it);
3243
3352
  } catch (error) {
3244
- return arraySlice(windowNames);
3353
+ return arraySliceSimple(windowNames);
3245
3354
  }
3246
3355
  };
3247
3356
 
@@ -3259,11 +3368,11 @@
3259
3368
  var getOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
3260
3369
 
3261
3370
  // eslint-disable-next-line es/no-object-getownpropertynames -- required for testing
3262
- var FAILS_ON_PRIMITIVES$2 = fails(function () { return !Object.getOwnPropertyNames(1); });
3371
+ var FAILS_ON_PRIMITIVES$3 = fails(function () { return !Object.getOwnPropertyNames(1); });
3263
3372
 
3264
3373
  // `Object.getOwnPropertyNames` method
3265
3374
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
3266
- _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$2 }, {
3375
+ _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$3 }, {
3267
3376
  getOwnPropertyNames: getOwnPropertyNames$1
3268
3377
  });
3269
3378
 
@@ -3321,23 +3430,23 @@
3321
3430
  var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
3322
3431
 
3323
3432
 
3324
- var FAILS_ON_PRIMITIVES$1 = fails(function () { nativeGetOwnPropertyDescriptor$1(1); });
3325
- var FORCED$7 = !descriptors || FAILS_ON_PRIMITIVES$1;
3433
+ var FAILS_ON_PRIMITIVES$2 = fails(function () { nativeGetOwnPropertyDescriptor$1(1); });
3434
+ var FORCED$6 = !descriptors || FAILS_ON_PRIMITIVES$2;
3326
3435
 
3327
3436
  // `Object.getOwnPropertyDescriptor` method
3328
3437
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
3329
- _export({ target: 'Object', stat: true, forced: FORCED$7, sham: !descriptors }, {
3438
+ _export({ target: 'Object', stat: true, forced: FORCED$6, sham: !descriptors }, {
3330
3439
  getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
3331
3440
  return nativeGetOwnPropertyDescriptor$1(toIndexedObject(it), key);
3332
3441
  }
3333
3442
  });
3334
3443
 
3335
- var TypeError$9 = global_1.TypeError;
3444
+ var TypeError$a = global_1.TypeError;
3336
3445
 
3337
3446
  // `Assert: IsConstructor(argument) is true`
3338
3447
  var aConstructor = function (argument) {
3339
3448
  if (isConstructor(argument)) return argument;
3340
- throw TypeError$9(tryToString(argument) + ' is not a constructor');
3449
+ throw TypeError$a(tryToString(argument) + ' is not a constructor');
3341
3450
  };
3342
3451
 
3343
3452
  var SPECIES$2 = wellKnownSymbol('species');
@@ -3405,7 +3514,7 @@
3405
3514
  lastIndex = separatorCopy.lastIndex;
3406
3515
  if (lastIndex > lastLastIndex) {
3407
3516
  push$3(output, stringSlice$2(string, lastLastIndex, match.index));
3408
- if (match.length > 1 && match.index < string.length) functionApply($push, output, arraySlice(match, 1));
3517
+ if (match.length > 1 && match.index < string.length) functionApply($push, output, arraySliceSimple(match, 1));
3409
3518
  lastLength = match[0].length;
3410
3519
  lastLastIndex = lastIndex;
3411
3520
  if (output.length >= lim) break;
@@ -3415,7 +3524,7 @@
3415
3524
  if (lastLastIndex === string.length) {
3416
3525
  if (lastLength || !exec(separatorCopy, '')) push$3(output, '');
3417
3526
  } else push$3(output, stringSlice$2(string, lastLastIndex));
3418
- return output.length > lim ? arraySlice(output, 0, lim) : output;
3527
+ return output.length > lim ? arraySliceSimple(output, 0, lim) : output;
3419
3528
  };
3420
3529
  // Chakra, V8
3421
3530
  } else if ('0'.split(undefined, 0).length) {
@@ -3546,15 +3655,16 @@
3546
3655
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
3547
3656
  };
3548
3657
 
3549
- var defineProperty$6 = objectDefineProperty.f;
3658
+ var defineProperty$7 = objectDefineProperty.f;
3550
3659
 
3551
3660
 
3552
3661
 
3553
3662
  var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
3554
3663
 
3555
- var setToStringTag = function (it, TAG, STATIC) {
3556
- if (it && !hasOwnProperty_1(it = STATIC ? it : it.prototype, TO_STRING_TAG$2)) {
3557
- defineProperty$6(it, TO_STRING_TAG$2, { configurable: true, value: TAG });
3664
+ var setToStringTag = function (target, TAG, STATIC) {
3665
+ if (target && !STATIC) target = target.prototype;
3666
+ if (target && !hasOwnProperty_1(target, TO_STRING_TAG$2)) {
3667
+ defineProperty$7(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
3558
3668
  }
3559
3669
  };
3560
3670
 
@@ -3566,15 +3676,15 @@
3566
3676
 
3567
3677
  var returnThis$1 = function () { return this; };
3568
3678
 
3569
- var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
3679
+ var createIteratorConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
3570
3680
  var TO_STRING_TAG = NAME + ' Iterator';
3571
- IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(1, next) });
3681
+ IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
3572
3682
  setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
3573
3683
  iterators[TO_STRING_TAG] = returnThis$1;
3574
3684
  return IteratorConstructor;
3575
3685
  };
3576
3686
 
3577
- var PROPER_FUNCTION_NAME$3 = functionName.PROPER;
3687
+ var PROPER_FUNCTION_NAME$2 = functionName.PROPER;
3578
3688
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
3579
3689
  var IteratorPrototype = iteratorsCore.IteratorPrototype;
3580
3690
  var BUGGY_SAFARI_ITERATORS = iteratorsCore.BUGGY_SAFARI_ITERATORS;
@@ -3625,7 +3735,7 @@
3625
3735
  }
3626
3736
 
3627
3737
  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
3628
- if (PROPER_FUNCTION_NAME$3 && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
3738
+ if (PROPER_FUNCTION_NAME$2 && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
3629
3739
  if (CONFIGURABLE_FUNCTION_NAME$1) {
3630
3740
  createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
3631
3741
  } else {
@@ -3657,6 +3767,11 @@
3657
3767
  return methods;
3658
3768
  };
3659
3769
 
3770
+ var defineProperty$6 = objectDefineProperty.f;
3771
+
3772
+
3773
+
3774
+
3660
3775
  var ARRAY_ITERATOR = 'Array Iterator';
3661
3776
  var setInternalState$5 = internalState.set;
3662
3777
  var getInternalState$4 = internalState.getterFor(ARRAY_ITERATOR);
@@ -3697,13 +3812,18 @@
3697
3812
  // argumentsList[@@iterator] is %ArrayProto_values%
3698
3813
  // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
3699
3814
  // https://tc39.es/ecma262/#sec-createmappedargumentsobject
3700
- iterators.Arguments = iterators.Array;
3815
+ var values = iterators.Arguments = iterators.Array;
3701
3816
 
3702
3817
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3703
3818
  addToUnscopables('keys');
3704
3819
  addToUnscopables('values');
3705
3820
  addToUnscopables('entries');
3706
3821
 
3822
+ // V8 ~ Chrome 45- bug
3823
+ if (descriptors && values.name !== 'values') try {
3824
+ defineProperty$6(values, 'name', { value: 'values' });
3825
+ } catch (error) { /* empty */ }
3826
+
3707
3827
  var ITERATOR$4 = wellKnownSymbol('iterator');
3708
3828
  var SAFE_CLOSING = false;
3709
3829
 
@@ -3751,21 +3871,21 @@
3751
3871
 
3752
3872
 
3753
3873
 
3754
- var Int8Array$3 = global_1.Int8Array;
3755
- var Int8ArrayPrototype = Int8Array$3 && Int8Array$3.prototype;
3756
- var Uint8ClampedArray = global_1.Uint8ClampedArray;
3757
- var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
3758
- var TypedArray = Int8Array$3 && objectGetPrototypeOf(Int8Array$3);
3759
- var TypedArrayPrototype = Int8ArrayPrototype && objectGetPrototypeOf(Int8ArrayPrototype);
3874
+ var Int8Array$4 = global_1.Int8Array;
3875
+ var Int8ArrayPrototype$1 = Int8Array$4 && Int8Array$4.prototype;
3876
+ var Uint8ClampedArray$1 = global_1.Uint8ClampedArray;
3877
+ var Uint8ClampedArrayPrototype = Uint8ClampedArray$1 && Uint8ClampedArray$1.prototype;
3878
+ var TypedArray = Int8Array$4 && objectGetPrototypeOf(Int8Array$4);
3879
+ var TypedArrayPrototype$1 = Int8ArrayPrototype$1 && objectGetPrototypeOf(Int8ArrayPrototype$1);
3760
3880
  var ObjectPrototype$2 = Object.prototype;
3761
- var TypeError$8 = global_1.TypeError;
3881
+ var TypeError$9 = global_1.TypeError;
3762
3882
 
3763
3883
  var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
3764
3884
  var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
3765
3885
  var TYPED_ARRAY_CONSTRUCTOR$1 = uid('TYPED_ARRAY_CONSTRUCTOR');
3766
3886
  // Fixing native typed arrays in Opera Presto crashes the browser, see #595
3767
3887
  var NATIVE_ARRAY_BUFFER_VIEWS$1 = arrayBufferNative && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
3768
- var TYPED_ARRAY_TAG_REQIRED = false;
3888
+ var TYPED_ARRAY_TAG_REQUIRED = false;
3769
3889
  var NAME, Constructor, Prototype;
3770
3890
 
3771
3891
  var TypedArrayConstructorsList = {
@@ -3802,25 +3922,30 @@
3802
3922
 
3803
3923
  var aTypedArray$m = function (it) {
3804
3924
  if (isTypedArray(it)) return it;
3805
- throw TypeError$8('Target is not a typed array');
3925
+ throw TypeError$9('Target is not a typed array');
3806
3926
  };
3807
3927
 
3808
3928
  var aTypedArrayConstructor$2 = function (C) {
3809
3929
  if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
3810
- throw TypeError$8(tryToString(C) + ' is not a typed array constructor');
3930
+ throw TypeError$9(tryToString(C) + ' is not a typed array constructor');
3811
3931
  };
3812
3932
 
3813
- var exportTypedArrayMethod$n = function (KEY, property, forced) {
3933
+ var exportTypedArrayMethod$n = function (KEY, property, forced, options) {
3814
3934
  if (!descriptors) return;
3815
3935
  if (forced) for (var ARRAY in TypedArrayConstructorsList) {
3816
3936
  var TypedArrayConstructor = global_1[ARRAY];
3817
3937
  if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor.prototype, KEY)) try {
3818
3938
  delete TypedArrayConstructor.prototype[KEY];
3819
- } catch (error) { /* empty */ }
3939
+ } catch (error) {
3940
+ // old WebKit bug - some methods are non-configurable
3941
+ try {
3942
+ TypedArrayConstructor.prototype[KEY] = property;
3943
+ } catch (error2) { /* empty */ }
3944
+ }
3820
3945
  }
3821
- if (!TypedArrayPrototype[KEY] || forced) {
3822
- redefine(TypedArrayPrototype, KEY, forced ? property
3823
- : NATIVE_ARRAY_BUFFER_VIEWS$1 && Int8ArrayPrototype[KEY] || property);
3946
+ if (!TypedArrayPrototype$1[KEY] || forced) {
3947
+ redefine(TypedArrayPrototype$1, KEY, forced ? property
3948
+ : NATIVE_ARRAY_BUFFER_VIEWS$1 && Int8ArrayPrototype$1[KEY] || property, options);
3824
3949
  }
3825
3950
  };
3826
3951
 
@@ -3866,28 +3991,28 @@
3866
3991
  if (!NATIVE_ARRAY_BUFFER_VIEWS$1 || !isCallable(TypedArray) || TypedArray === Function.prototype) {
3867
3992
  // eslint-disable-next-line no-shadow -- safe
3868
3993
  TypedArray = function TypedArray() {
3869
- throw TypeError$8('Incorrect invocation');
3994
+ throw TypeError$9('Incorrect invocation');
3870
3995
  };
3871
3996
  if (NATIVE_ARRAY_BUFFER_VIEWS$1) for (NAME in TypedArrayConstructorsList) {
3872
3997
  if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME], TypedArray);
3873
3998
  }
3874
3999
  }
3875
4000
 
3876
- if (!NATIVE_ARRAY_BUFFER_VIEWS$1 || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype$2) {
3877
- TypedArrayPrototype = TypedArray.prototype;
4001
+ if (!NATIVE_ARRAY_BUFFER_VIEWS$1 || !TypedArrayPrototype$1 || TypedArrayPrototype$1 === ObjectPrototype$2) {
4002
+ TypedArrayPrototype$1 = TypedArray.prototype;
3878
4003
  if (NATIVE_ARRAY_BUFFER_VIEWS$1) for (NAME in TypedArrayConstructorsList) {
3879
- if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME].prototype, TypedArrayPrototype);
4004
+ if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME].prototype, TypedArrayPrototype$1);
3880
4005
  }
3881
4006
  }
3882
4007
 
3883
4008
  // WebKit bug - one more object in Uint8ClampedArray prototype chain
3884
- if (NATIVE_ARRAY_BUFFER_VIEWS$1 && objectGetPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
3885
- objectSetPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
4009
+ if (NATIVE_ARRAY_BUFFER_VIEWS$1 && objectGetPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype$1) {
4010
+ objectSetPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype$1);
3886
4011
  }
3887
4012
 
3888
- if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG$1)) {
3889
- TYPED_ARRAY_TAG_REQIRED = true;
3890
- defineProperty$5(TypedArrayPrototype, TO_STRING_TAG$1, { get: function () {
4013
+ if (descriptors && !hasOwnProperty_1(TypedArrayPrototype$1, TO_STRING_TAG$1)) {
4014
+ TYPED_ARRAY_TAG_REQUIRED = true;
4015
+ defineProperty$5(TypedArrayPrototype$1, TO_STRING_TAG$1, { get: function () {
3891
4016
  return isObject$1(this) ? this[TYPED_ARRAY_TAG] : undefined;
3892
4017
  } });
3893
4018
  for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
@@ -3898,7 +4023,7 @@
3898
4023
  var arrayBufferViewCore = {
3899
4024
  NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS$1,
3900
4025
  TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR$1,
3901
- TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
4026
+ TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
3902
4027
  aTypedArray: aTypedArray$m,
3903
4028
  aTypedArrayConstructor: aTypedArrayConstructor$2,
3904
4029
  exportTypedArrayMethod: exportTypedArrayMethod$n,
@@ -3906,7 +4031,7 @@
3906
4031
  isView: isView,
3907
4032
  isTypedArray: isTypedArray,
3908
4033
  TypedArray: TypedArray,
3909
- TypedArrayPrototype: TypedArrayPrototype
4034
+ TypedArrayPrototype: TypedArrayPrototype$1
3910
4035
  };
3911
4036
 
3912
4037
  /* eslint-disable no-new -- required for testing */
@@ -3916,20 +4041,20 @@
3916
4041
  var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
3917
4042
 
3918
4043
  var ArrayBuffer$2 = global_1.ArrayBuffer;
3919
- var Int8Array$2 = global_1.Int8Array;
4044
+ var Int8Array$3 = global_1.Int8Array;
3920
4045
 
3921
4046
  var typedArrayConstructorsRequireWrappers = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {
3922
- Int8Array$2(1);
4047
+ Int8Array$3(1);
3923
4048
  }) || !fails(function () {
3924
- new Int8Array$2(-1);
4049
+ new Int8Array$3(-1);
3925
4050
  }) || !checkCorrectnessOfIteration(function (iterable) {
3926
- new Int8Array$2();
3927
- new Int8Array$2(null);
3928
- new Int8Array$2(1.5);
3929
- new Int8Array$2(iterable);
4051
+ new Int8Array$3();
4052
+ new Int8Array$3(null);
4053
+ new Int8Array$3(1.5);
4054
+ new Int8Array$3(iterable);
3930
4055
  }, true) || fails(function () {
3931
4056
  // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
3932
- return new Int8Array$2(new ArrayBuffer$2(2), 1, undefined).length !== 1;
4057
+ return new Int8Array$3(new ArrayBuffer$2(2), 1, undefined).length !== 1;
3933
4058
  });
3934
4059
 
3935
4060
  var redefineAll = function (target, src, options) {
@@ -3937,11 +4062,11 @@
3937
4062
  return target;
3938
4063
  };
3939
4064
 
3940
- var TypeError$7 = global_1.TypeError;
4065
+ var TypeError$8 = global_1.TypeError;
3941
4066
 
3942
4067
  var anInstance = function (it, Prototype) {
3943
4068
  if (objectIsPrototypeOf(Prototype, it)) return it;
3944
- throw TypeError$7('Incorrect invocation');
4069
+ throw TypeError$8('Incorrect invocation');
3945
4070
  };
3946
4071
 
3947
4072
  var RangeError$7 = global_1.RangeError;
@@ -3983,7 +4108,8 @@
3983
4108
  exponent = eMax;
3984
4109
  } else {
3985
4110
  exponent = floor$4(log$2(number) / LN2);
3986
- if (number * (c = pow$1(2, -exponent)) < 1) {
4111
+ c = pow$1(2, -exponent);
4112
+ if (number * c < 1) {
3987
4113
  exponent--;
3988
4114
  c *= 2;
3989
4115
  }
@@ -4007,10 +4133,18 @@
4007
4133
  exponent = 0;
4008
4134
  }
4009
4135
  }
4010
- for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);
4136
+ while (mantissaLength >= 8) {
4137
+ buffer[index++] = mantissa & 255;
4138
+ mantissa /= 256;
4139
+ mantissaLength -= 8;
4140
+ }
4011
4141
  exponent = exponent << mantissaLength | mantissa;
4012
4142
  exponentLength += mantissaLength;
4013
- for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);
4143
+ while (exponentLength > 0) {
4144
+ buffer[index++] = exponent & 255;
4145
+ exponent /= 256;
4146
+ exponentLength -= 8;
4147
+ }
4014
4148
  buffer[--index] |= sign * 128;
4015
4149
  return buffer;
4016
4150
  };
@@ -4026,11 +4160,17 @@
4026
4160
  var exponent = sign & 127;
4027
4161
  var mantissa;
4028
4162
  sign >>= 7;
4029
- for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);
4163
+ while (nBits > 0) {
4164
+ exponent = exponent * 256 + buffer[index--];
4165
+ nBits -= 8;
4166
+ }
4030
4167
  mantissa = exponent & (1 << -nBits) - 1;
4031
4168
  exponent >>= -nBits;
4032
4169
  nBits += mantissaLength;
4033
- for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);
4170
+ while (nBits > 0) {
4171
+ mantissa = mantissa * 256 + buffer[index--];
4172
+ nBits -= 8;
4173
+ }
4034
4174
  if (exponent === 0) {
4035
4175
  exponent = 1 - eBias;
4036
4176
  } else if (exponent === eMax) {
@@ -4066,7 +4206,7 @@
4066
4206
 
4067
4207
 
4068
4208
 
4069
- var PROPER_FUNCTION_NAME$2 = functionName.PROPER;
4209
+ var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
4070
4210
  var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
4071
4211
  var getInternalState$3 = internalState.get;
4072
4212
  var setInternalState$4 = internalState.set;
@@ -4123,7 +4263,7 @@
4123
4263
  if (intIndex + count > store.byteLength) throw RangeError$6(WRONG_INDEX);
4124
4264
  var bytes = getInternalState$3(store.buffer).bytes;
4125
4265
  var start = intIndex + store.byteOffset;
4126
- var pack = arraySlice(bytes, start, start + count);
4266
+ var pack = arraySliceSimple(bytes, start, start + count);
4127
4267
  return isLittleEndian ? pack : reverse(pack);
4128
4268
  };
4129
4269
 
@@ -4232,7 +4372,7 @@
4232
4372
  }
4233
4373
  });
4234
4374
  } else {
4235
- var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME$2 && NativeArrayBuffer$1.name !== ARRAY_BUFFER$1;
4375
+ var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME$1 && NativeArrayBuffer$1.name !== ARRAY_BUFFER$1;
4236
4376
  /* eslint-disable no-new -- required for testing */
4237
4377
  if (!fails(function () {
4238
4378
  NativeArrayBuffer$1(1);
@@ -4324,12 +4464,12 @@
4324
4464
  || iterators[classof(it)];
4325
4465
  };
4326
4466
 
4327
- var TypeError$6 = global_1.TypeError;
4467
+ var TypeError$7 = global_1.TypeError;
4328
4468
 
4329
4469
  var getIterator = function (argument, usingIterator) {
4330
4470
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
4331
4471
  if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
4332
- throw TypeError$6(tryToString(argument) + ' is not iterable');
4472
+ throw TypeError$7(tryToString(argument) + ' is not iterable');
4333
4473
  };
4334
4474
 
4335
4475
  var ITERATOR$2 = wellKnownSymbol('iterator');
@@ -4686,7 +4826,7 @@
4686
4826
 
4687
4827
  var arrayFromConstructorAndList = function (Constructor, list) {
4688
4828
  var index = 0;
4689
- var length = list.length;
4829
+ var length = lengthOfArrayLike(list);
4690
4830
  var result = new Constructor(length);
4691
4831
  while (length > index) result[index] = list[index++];
4692
4832
  return result;
@@ -4773,11 +4913,6 @@
4773
4913
  return $indexOf(aTypedArray$d(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
4774
4914
  });
4775
4915
 
4776
- var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
4777
-
4778
-
4779
-
4780
-
4781
4916
  var ITERATOR$1 = wellKnownSymbol('iterator');
4782
4917
  var Uint8Array$2 = global_1.Uint8Array;
4783
4918
  var arrayValues = functionUncurryThis(es_array_iterator.values);
@@ -4785,9 +4920,16 @@
4785
4920
  var arrayEntries = functionUncurryThis(es_array_iterator.entries);
4786
4921
  var aTypedArray$c = arrayBufferViewCore.aTypedArray;
4787
4922
  var exportTypedArrayMethod$d = arrayBufferViewCore.exportTypedArrayMethod;
4788
- var nativeTypedArrayIterator = Uint8Array$2 && Uint8Array$2.prototype[ITERATOR$1];
4923
+ var TypedArrayPrototype = Uint8Array$2 && Uint8Array$2.prototype;
4789
4924
 
4790
- var PROPER_ARRAY_VALUES_NAME = !!nativeTypedArrayIterator && nativeTypedArrayIterator.name === 'values';
4925
+ var GENERIC = !fails(function () {
4926
+ TypedArrayPrototype[ITERATOR$1].call([1]);
4927
+ });
4928
+
4929
+ var ITERATOR_IS_VALUES = !!TypedArrayPrototype
4930
+ && TypedArrayPrototype.values
4931
+ && TypedArrayPrototype[ITERATOR$1] === TypedArrayPrototype.values
4932
+ && TypedArrayPrototype.values.name === 'values';
4791
4933
 
4792
4934
  var typedArrayValues = function values() {
4793
4935
  return arrayValues(aTypedArray$c(this));
@@ -4797,18 +4939,18 @@
4797
4939
  // https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
4798
4940
  exportTypedArrayMethod$d('entries', function entries() {
4799
4941
  return arrayEntries(aTypedArray$c(this));
4800
- });
4942
+ }, GENERIC);
4801
4943
  // `%TypedArray%.prototype.keys` method
4802
4944
  // https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
4803
4945
  exportTypedArrayMethod$d('keys', function keys() {
4804
4946
  return arrayKeys(aTypedArray$c(this));
4805
- });
4947
+ }, GENERIC);
4806
4948
  // `%TypedArray%.prototype.values` method
4807
4949
  // https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
4808
- exportTypedArrayMethod$d('values', typedArrayValues, PROPER_FUNCTION_NAME$1 && !PROPER_ARRAY_VALUES_NAME);
4950
+ exportTypedArrayMethod$d('values', typedArrayValues, GENERIC || !ITERATOR_IS_VALUES, { name: 'values' });
4809
4951
  // `%TypedArray%.prototype[@@iterator]` method
4810
4952
  // https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
4811
- exportTypedArrayMethod$d(ITERATOR$1, typedArrayValues, PROPER_FUNCTION_NAME$1 && !PROPER_ARRAY_VALUES_NAME);
4953
+ exportTypedArrayMethod$d(ITERATOR$1, typedArrayValues, GENERIC || !ITERATOR_IS_VALUES, { name: 'values' });
4812
4954
 
4813
4955
  var aTypedArray$b = arrayBufferViewCore.aTypedArray;
4814
4956
  var exportTypedArrayMethod$c = arrayBufferViewCore.exportTypedArrayMethod;
@@ -4831,11 +4973,11 @@
4831
4973
  var $lastIndexOf = [].lastIndexOf;
4832
4974
  var NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
4833
4975
  var STRICT_METHOD$1 = arrayMethodIsStrict('lastIndexOf');
4834
- var FORCED$6 = NEGATIVE_ZERO || !STRICT_METHOD$1;
4976
+ var FORCED$5 = NEGATIVE_ZERO || !STRICT_METHOD$1;
4835
4977
 
4836
4978
  // `Array.prototype.lastIndexOf` method implementation
4837
4979
  // https://tc39.es/ecma262/#sec-array.prototype.lastindexof
4838
- var arrayLastIndexOf = FORCED$6 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
4980
+ var arrayLastIndexOf = FORCED$5 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
4839
4981
  // convert -0 to +0
4840
4982
  if (NEGATIVE_ZERO) return functionApply($lastIndexOf, this, arguments) || 0;
4841
4983
  var O = toIndexedObject(this);
@@ -4871,7 +5013,7 @@
4871
5013
  });
4872
5014
  });
4873
5015
 
4874
- var TypeError$5 = global_1.TypeError;
5016
+ var TypeError$6 = global_1.TypeError;
4875
5017
 
4876
5018
  // `Array.prototype.{ reduce, reduceRight }` methods implementation
4877
5019
  var createMethod$1 = function (IS_RIGHT) {
@@ -4890,7 +5032,7 @@
4890
5032
  }
4891
5033
  index += i;
4892
5034
  if (IS_RIGHT ? index < 0 : length <= index) {
4893
- throw TypeError$5('Reduce of empty array with no initial value');
5035
+ throw TypeError$6('Reduce of empty array with no initial value');
4894
5036
  }
4895
5037
  }
4896
5038
  for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
@@ -4953,12 +5095,25 @@
4953
5095
  });
4954
5096
 
4955
5097
  var RangeError$3 = global_1.RangeError;
5098
+ var Int8Array$2 = global_1.Int8Array;
5099
+ var Int8ArrayPrototype = Int8Array$2 && Int8Array$2.prototype;
5100
+ var $set = Int8ArrayPrototype && Int8ArrayPrototype.set;
4956
5101
  var aTypedArray$5 = arrayBufferViewCore.aTypedArray;
4957
5102
  var exportTypedArrayMethod$6 = arrayBufferViewCore.exportTypedArrayMethod;
4958
5103
 
4959
- var FORCED$5 = fails(function () {
5104
+ var WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {
4960
5105
  // eslint-disable-next-line es/no-typed-arrays -- required for testing
4961
- new Int8Array(1).set({});
5106
+ var array = new Uint8ClampedArray(2);
5107
+ functionCall($set, array, { length: 1, 0: 3 }, 1);
5108
+ return array[1] !== 3;
5109
+ });
5110
+
5111
+ // https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other
5112
+ var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {
5113
+ var array = new Int8Array$2(2);
5114
+ array.set(1);
5115
+ array.set('2', 1);
5116
+ return array[0] !== 0 || array[1] !== 2;
4962
5117
  });
4963
5118
 
4964
5119
  // `%TypedArray%.prototype.set` method
@@ -4966,13 +5121,16 @@
4966
5121
  exportTypedArrayMethod$6('set', function set(arrayLike /* , offset */) {
4967
5122
  aTypedArray$5(this);
4968
5123
  var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
4969
- var length = this.length;
4970
5124
  var src = toObject(arrayLike);
5125
+ if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return functionCall($set, this, src, offset);
5126
+ var length = this.length;
4971
5127
  var len = lengthOfArrayLike(src);
4972
5128
  var index = 0;
4973
5129
  if (len + offset > length) throw RangeError$3('Wrong length');
4974
5130
  while (index < len) this[offset + index] = src[index++];
4975
- }, FORCED$5);
5131
+ }, !WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);
5132
+
5133
+ var arraySlice = functionUncurryThis([].slice);
4976
5134
 
4977
5135
  var aTypedArray$4 = arrayBufferViewCore.aTypedArray;
4978
5136
  var exportTypedArrayMethod$5 = arrayBufferViewCore.exportTypedArrayMethod;
@@ -5012,8 +5170,8 @@
5012
5170
  var middle = floor$1(length / 2);
5013
5171
  return length < 8 ? insertionSort(array, comparefn) : merge(
5014
5172
  array,
5015
- mergeSort(arraySlice(array, 0, middle), comparefn),
5016
- mergeSort(arraySlice(array, middle), comparefn),
5173
+ mergeSort(arraySliceSimple(array, 0, middle), comparefn),
5174
+ mergeSort(arraySliceSimple(array, middle), comparefn),
5017
5175
  comparefn
5018
5176
  );
5019
5177
  };
@@ -5225,7 +5383,7 @@
5225
5383
  var ObjectPrototype = Object[PROTOTYPE];
5226
5384
  var $Symbol = global_1.Symbol;
5227
5385
  var SymbolPrototype$1 = $Symbol && $Symbol[PROTOTYPE];
5228
- var TypeError$4 = global_1.TypeError;
5386
+ var TypeError$5 = global_1.TypeError;
5229
5387
  var QObject = global_1.QObject;
5230
5388
  var $stringify = getBuiltIn('JSON', 'stringify');
5231
5389
  var nativeGetOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
@@ -5342,7 +5500,7 @@
5342
5500
  // https://tc39.es/ecma262/#sec-symbol-constructor
5343
5501
  if (!nativeSymbol) {
5344
5502
  $Symbol = function Symbol() {
5345
- if (objectIsPrototypeOf(SymbolPrototype$1, this)) throw TypeError$4('Symbol is not a constructor');
5503
+ if (objectIsPrototypeOf(SymbolPrototype$1, this)) throw TypeError$5('Symbol is not a constructor');
5346
5504
  var description = !arguments.length || arguments[0] === undefined ? undefined : toString_1(arguments[0]);
5347
5505
  var tag = uid(description);
5348
5506
  var setter = function (value) {
@@ -5366,6 +5524,7 @@
5366
5524
 
5367
5525
  objectPropertyIsEnumerable.f = $propertyIsEnumerable$1;
5368
5526
  objectDefineProperty.f = $defineProperty;
5527
+ objectDefineProperties.f = $defineProperties;
5369
5528
  objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;
5370
5529
  objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;
5371
5530
  objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;
@@ -5410,7 +5569,7 @@
5410
5569
  // `Symbol.keyFor` method
5411
5570
  // https://tc39.es/ecma262/#sec-symbol.keyfor
5412
5571
  keyFor: function keyFor(sym) {
5413
- if (!isSymbol$1(sym)) throw TypeError$4(sym + ' is not a symbol');
5572
+ if (!isSymbol$1(sym)) throw TypeError$5(sym + ' is not a symbol');
5414
5573
  if (hasOwnProperty_1(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
5415
5574
  },
5416
5575
  useSetter: function () { USE_SETTER = true; },
@@ -5611,11 +5770,11 @@
5611
5770
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
5612
5771
  addToUnscopables('includes');
5613
5772
 
5614
- var TypeError$3 = global_1.TypeError;
5773
+ var TypeError$4 = global_1.TypeError;
5615
5774
 
5616
5775
  var notARegexp = function (it) {
5617
5776
  if (isRegexp(it)) {
5618
- throw TypeError$3("The method doesn't accept regular expressions");
5777
+ throw TypeError$4("The method doesn't accept regular expressions");
5619
5778
  } return it;
5620
5779
  };
5621
5780
 
@@ -7775,7 +7934,7 @@
7775
7934
  }
7776
7935
  }
7777
7936
 
7778
- var queue$1 = [];
7937
+ var queue$2 = [];
7779
7938
  var draining = false;
7780
7939
  var currentQueue;
7781
7940
  var queueIndex = -1;
@@ -7788,12 +7947,12 @@
7788
7947
  draining = false;
7789
7948
 
7790
7949
  if (currentQueue.length) {
7791
- queue$1 = currentQueue.concat(queue$1);
7950
+ queue$2 = currentQueue.concat(queue$2);
7792
7951
  } else {
7793
7952
  queueIndex = -1;
7794
7953
  }
7795
7954
 
7796
- if (queue$1.length) {
7955
+ if (queue$2.length) {
7797
7956
  drainQueue();
7798
7957
  }
7799
7958
  }
@@ -7805,11 +7964,11 @@
7805
7964
 
7806
7965
  var timeout = runTimeout(cleanUpNextTick);
7807
7966
  draining = true;
7808
- var len = queue$1.length;
7967
+ var len = queue$2.length;
7809
7968
 
7810
7969
  while (len) {
7811
- currentQueue = queue$1;
7812
- queue$1 = [];
7970
+ currentQueue = queue$2;
7971
+ queue$2 = [];
7813
7972
 
7814
7973
  while (++queueIndex < len) {
7815
7974
  if (currentQueue) {
@@ -7818,7 +7977,7 @@
7818
7977
  }
7819
7978
 
7820
7979
  queueIndex = -1;
7821
- len = queue$1.length;
7980
+ len = queue$2.length;
7822
7981
  }
7823
7982
 
7824
7983
  currentQueue = null;
@@ -7835,9 +7994,9 @@
7835
7994
  }
7836
7995
  }
7837
7996
 
7838
- queue$1.push(new Item(fun, args));
7997
+ queue$2.push(new Item(fun, args));
7839
7998
 
7840
- if (queue$1.length === 1 && !draining) {
7999
+ if (queue$2.length === 1 && !draining) {
7841
8000
  runTimeout(drainQueue);
7842
8001
  }
7843
8002
  } // v8 likes predictible objects
@@ -12546,7 +12705,7 @@
12546
12705
  return value;
12547
12706
  };
12548
12707
 
12549
- var TypeError$2 = global_1.TypeError;
12708
+ var TypeError$3 = global_1.TypeError;
12550
12709
 
12551
12710
  var Result = function (stopped, result) {
12552
12711
  this.stopped = stopped;
@@ -12579,7 +12738,7 @@
12579
12738
  iterator = iterable;
12580
12739
  } else {
12581
12740
  iterFn = getIteratorMethod(iterable);
12582
- if (!iterFn) throw TypeError$2(tryToString(iterable) + ' is not iterable');
12741
+ if (!iterFn) throw TypeError$3(tryToString(iterable) + ' is not iterable');
12583
12742
  // optimisation for array iterators
12584
12743
  if (isArrayIteratorMethod(iterFn)) {
12585
12744
  for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
@@ -12601,6 +12760,13 @@
12601
12760
  } return new Result(false);
12602
12761
  };
12603
12762
 
12763
+ var TypeError$2 = global_1.TypeError;
12764
+
12765
+ var validateArgumentsLength = function (passed, required) {
12766
+ if (passed < required) throw TypeError$2('Not enough arguments');
12767
+ return passed;
12768
+ };
12769
+
12604
12770
  var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent);
12605
12771
 
12606
12772
  var engineIsNode = classofRaw(global_1.process) == 'process';
@@ -12613,7 +12779,7 @@
12613
12779
  var MessageChannel = global_1.MessageChannel;
12614
12780
  var String$2 = global_1.String;
12615
12781
  var counter = 0;
12616
- var queue = {};
12782
+ var queue$1 = {};
12617
12783
  var ONREADYSTATECHANGE = 'onreadystatechange';
12618
12784
  var location$1, defer, channel, port;
12619
12785
 
@@ -12623,9 +12789,9 @@
12623
12789
  } catch (error) { /* empty */ }
12624
12790
 
12625
12791
  var run = function (id) {
12626
- if (hasOwnProperty_1(queue, id)) {
12627
- var fn = queue[id];
12628
- delete queue[id];
12792
+ if (hasOwnProperty_1(queue$1, id)) {
12793
+ var fn = queue$1[id];
12794
+ delete queue$1[id];
12629
12795
  fn();
12630
12796
  }
12631
12797
  };
@@ -12647,16 +12813,18 @@
12647
12813
 
12648
12814
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
12649
12815
  if (!set || !clear) {
12650
- set = function setImmediate(fn) {
12816
+ set = function setImmediate(handler) {
12817
+ validateArgumentsLength(arguments.length, 1);
12818
+ var fn = isCallable(handler) ? handler : Function$1(handler);
12651
12819
  var args = arraySlice(arguments, 1);
12652
- queue[++counter] = function () {
12653
- functionApply(isCallable(fn) ? fn : Function$1(fn), undefined, args);
12820
+ queue$1[++counter] = function () {
12821
+ functionApply(fn, undefined, args);
12654
12822
  };
12655
12823
  defer(counter);
12656
12824
  return counter;
12657
12825
  };
12658
12826
  clear = function clearImmediate(id) {
12659
- delete queue[id];
12827
+ delete queue$1[id];
12660
12828
  };
12661
12829
  // Node.js 0.8-
12662
12830
  if (engineIsNode) {
@@ -12840,6 +13008,30 @@
12840
13008
  }
12841
13009
  };
12842
13010
 
13011
+ var Queue = function () {
13012
+ this.head = null;
13013
+ this.tail = null;
13014
+ };
13015
+
13016
+ Queue.prototype = {
13017
+ add: function (item) {
13018
+ var entry = { item: item, next: null };
13019
+ if (this.head) this.tail.next = entry;
13020
+ else this.head = entry;
13021
+ this.tail = entry;
13022
+ },
13023
+ get: function () {
13024
+ var entry = this.head;
13025
+ if (entry) {
13026
+ this.head = entry.next;
13027
+ if (this.tail === entry) this.tail = null;
13028
+ return entry.item;
13029
+ }
13030
+ }
13031
+ };
13032
+
13033
+ var queue = Queue;
13034
+
12843
13035
  var engineIsBrowser = typeof window == 'object';
12844
13036
 
12845
13037
  var task = task$1.set;
@@ -12855,10 +13047,11 @@
12855
13047
 
12856
13048
 
12857
13049
 
13050
+
12858
13051
  var SPECIES = wellKnownSymbol('species');
12859
13052
  var PROMISE = 'Promise';
12860
13053
 
12861
- var getInternalState = internalState.get;
13054
+ var getInternalState = internalState.getterFor(PROMISE);
12862
13055
  var setInternalState$1 = internalState.set;
12863
13056
  var getInternalPromiseState = internalState.getterFor(PROMISE);
12864
13057
  var NativePromisePrototype = nativePromiseConstructor && nativePromiseConstructor.prototype;
@@ -12917,49 +13110,50 @@
12917
13110
  return isObject$1(it) && isCallable(then = it.then) ? then : false;
12918
13111
  };
12919
13112
 
13113
+ var callReaction = function (reaction, state) {
13114
+ var value = state.value;
13115
+ var ok = state.state == FULFILLED;
13116
+ var handler = ok ? reaction.ok : reaction.fail;
13117
+ var resolve = reaction.resolve;
13118
+ var reject = reaction.reject;
13119
+ var domain = reaction.domain;
13120
+ var result, then, exited;
13121
+ try {
13122
+ if (handler) {
13123
+ if (!ok) {
13124
+ if (state.rejection === UNHANDLED) onHandleUnhandled(state);
13125
+ state.rejection = HANDLED;
13126
+ }
13127
+ if (handler === true) result = value;
13128
+ else {
13129
+ if (domain) domain.enter();
13130
+ result = handler(value); // can throw
13131
+ if (domain) {
13132
+ domain.exit();
13133
+ exited = true;
13134
+ }
13135
+ }
13136
+ if (result === reaction.promise) {
13137
+ reject(TypeError$1('Promise-chain cycle'));
13138
+ } else if (then = isThenable(result)) {
13139
+ functionCall(then, result, resolve, reject);
13140
+ } else resolve(result);
13141
+ } else reject(value);
13142
+ } catch (error) {
13143
+ if (domain && !exited) domain.exit();
13144
+ reject(error);
13145
+ }
13146
+ };
13147
+
12920
13148
  var notify$1 = function (state, isReject) {
12921
13149
  if (state.notified) return;
12922
13150
  state.notified = true;
12923
- var chain = state.reactions;
12924
13151
  microtask(function () {
12925
- var value = state.value;
12926
- var ok = state.state == FULFILLED;
12927
- var index = 0;
12928
- // variable length - can't use forEach
12929
- while (chain.length > index) {
12930
- var reaction = chain[index++];
12931
- var handler = ok ? reaction.ok : reaction.fail;
12932
- var resolve = reaction.resolve;
12933
- var reject = reaction.reject;
12934
- var domain = reaction.domain;
12935
- var result, then, exited;
12936
- try {
12937
- if (handler) {
12938
- if (!ok) {
12939
- if (state.rejection === UNHANDLED) onHandleUnhandled(state);
12940
- state.rejection = HANDLED;
12941
- }
12942
- if (handler === true) result = value;
12943
- else {
12944
- if (domain) domain.enter();
12945
- result = handler(value); // can throw
12946
- if (domain) {
12947
- domain.exit();
12948
- exited = true;
12949
- }
12950
- }
12951
- if (result === reaction.promise) {
12952
- reject(TypeError$1('Promise-chain cycle'));
12953
- } else if (then = isThenable(result)) {
12954
- functionCall(then, result, resolve, reject);
12955
- } else resolve(result);
12956
- } else reject(value);
12957
- } catch (error) {
12958
- if (domain && !exited) domain.exit();
12959
- reject(error);
12960
- }
13152
+ var reactions = state.reactions;
13153
+ var reaction;
13154
+ while (reaction = reactions.get()) {
13155
+ callReaction(reaction, state);
12961
13156
  }
12962
- state.reactions = [];
12963
13157
  state.notified = false;
12964
13158
  if (isReject && !state.rejection) onUnhandled(state);
12965
13159
  });
@@ -13076,7 +13270,7 @@
13076
13270
  done: false,
13077
13271
  notified: false,
13078
13272
  parent: false,
13079
- reactions: [],
13273
+ reactions: new queue(),
13080
13274
  rejection: false,
13081
13275
  state: PENDING,
13082
13276
  value: undefined
@@ -13085,16 +13279,18 @@
13085
13279
  Internal.prototype = redefineAll(PromisePrototype, {
13086
13280
  // `Promise.prototype.then` method
13087
13281
  // https://tc39.es/ecma262/#sec-promise.prototype.then
13282
+ // eslint-disable-next-line unicorn/no-thenable -- safe
13088
13283
  then: function then(onFulfilled, onRejected) {
13089
13284
  var state = getInternalPromiseState(this);
13090
- var reactions = state.reactions;
13091
13285
  var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
13286
+ state.parent = true;
13092
13287
  reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
13093
13288
  reaction.fail = isCallable(onRejected) && onRejected;
13094
13289
  reaction.domain = engineIsNode ? process.domain : undefined;
13095
- state.parent = true;
13096
- reactions[reactions.length] = reaction;
13097
- if (state.state != PENDING) notify$1(state, false);
13290
+ if (state.state == PENDING) state.reactions.add(reaction);
13291
+ else microtask(function () {
13292
+ callReaction(reaction, state);
13293
+ });
13098
13294
  return reaction.promise;
13099
13295
  },
13100
13296
  // `Promise.prototype.catch` method
@@ -16104,6 +16300,29 @@
16104
16300
  return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
16105
16301
  }
16106
16302
 
16303
+ // FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it
16304
+
16305
+
16306
+ var arrayBufferNonExtensible = fails(function () {
16307
+ if (typeof ArrayBuffer == 'function') {
16308
+ var buffer = new ArrayBuffer(8);
16309
+ // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe
16310
+ if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });
16311
+ }
16312
+ });
16313
+
16314
+ // eslint-disable-next-line es/no-object-isextensible -- safe
16315
+ var $isExtensible = Object.isExtensible;
16316
+ var FAILS_ON_PRIMITIVES$1 = fails(function () { $isExtensible(1); });
16317
+
16318
+ // `Object.isExtensible` method
16319
+ // https://tc39.es/ecma262/#sec-object.isextensible
16320
+ var objectIsExtensible = (FAILS_ON_PRIMITIVES$1 || arrayBufferNonExtensible) ? function isExtensible(it) {
16321
+ if (!isObject$1(it)) return false;
16322
+ if (arrayBufferNonExtensible && classofRaw(it) == 'ArrayBuffer') return false;
16323
+ return $isExtensible ? $isExtensible(it) : true;
16324
+ } : $isExtensible;
16325
+
16107
16326
  var freezing = !fails(function () {
16108
16327
  // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
16109
16328
  return Object.isExtensible(Object.preventExtensions({}));
@@ -16116,15 +16335,11 @@
16116
16335
 
16117
16336
 
16118
16337
 
16338
+
16119
16339
  var REQUIRED = false;
16120
16340
  var METADATA = uid('meta');
16121
16341
  var id = 0;
16122
16342
 
16123
- // eslint-disable-next-line es/no-object-isextensible -- safe
16124
- var isExtensible = Object.isExtensible || function () {
16125
- return true;
16126
- };
16127
-
16128
16343
  var setMetadata = function (it) {
16129
16344
  defineProperty(it, METADATA, { value: {
16130
16345
  objectID: 'O' + id++, // object ID
@@ -16137,7 +16352,7 @@
16137
16352
  if (!isObject$1(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
16138
16353
  if (!hasOwnProperty_1(it, METADATA)) {
16139
16354
  // can't set metadata to uncaught frozen object
16140
- if (!isExtensible(it)) return 'F';
16355
+ if (!objectIsExtensible(it)) return 'F';
16141
16356
  // not necessary to add metadata
16142
16357
  if (!create) return 'E';
16143
16358
  // add missing metadata
@@ -16149,7 +16364,7 @@
16149
16364
  var getWeakData = function (it, create) {
16150
16365
  if (!hasOwnProperty_1(it, METADATA)) {
16151
16366
  // can't set metadata to uncaught frozen object
16152
- if (!isExtensible(it)) return true;
16367
+ if (!objectIsExtensible(it)) return true;
16153
16368
  // not necessary to add metadata
16154
16369
  if (!create) return false;
16155
16370
  // add missing metadata
@@ -16160,7 +16375,7 @@
16160
16375
 
16161
16376
  // add metadata on freeze-family methods calling
16162
16377
  var onFreeze = function (it) {
16163
- if (freezing && REQUIRED && isExtensible(it) && !hasOwnProperty_1(it, METADATA)) setMetadata(it);
16378
+ if (freezing && REQUIRED && objectIsExtensible(it) && !hasOwnProperty_1(it, METADATA)) setMetadata(it);
16164
16379
  return it;
16165
16380
  };
16166
16381
 
@@ -16570,18 +16785,16 @@
16570
16785
 
16571
16786
  var browser$2 = true;
16572
16787
 
16573
- // This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped
16574
- // optimize the gzip compression for this alphabet.
16575
- var urlAlphabet = 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW';
16788
+ var urlAlphabet = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
16576
16789
 
16577
- var customAlphabet = function customAlphabet(alphabet, size) {
16790
+ var customAlphabet = function customAlphabet(alphabet) {
16791
+ var defaultSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 21;
16578
16792
  return function () {
16579
- var id = ''; // A compact alternative for `for (var i = 0; i < step; i++)`.
16580
-
16793
+ var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultSize;
16794
+ var id = '';
16581
16795
  var i = size;
16582
16796
 
16583
16797
  while (i--) {
16584
- // `| 0` is more compact and faster than `Math.floor()`.
16585
16798
  id += alphabet[Math.random() * alphabet.length | 0];
16586
16799
  }
16587
16800
 
@@ -16591,12 +16804,10 @@
16591
16804
 
16592
16805
  var nanoid = function nanoid() {
16593
16806
  var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 21;
16594
- var id = ''; // A compact alternative for `for (var i = 0; i < step; i++)`.
16595
-
16807
+ var id = '';
16596
16808
  var i = size;
16597
16809
 
16598
16810
  while (i--) {
16599
- // `| 0` is more compact and faster than `Math.floor()`.
16600
16811
  id += urlAlphabet[Math.random() * 64 | 0];
16601
16812
  }
16602
16813
 
@@ -21606,7 +21817,7 @@
21606
21817
  createDebug.formatters = {};
21607
21818
  /**
21608
21819
  * Selects a color for a debug namespace
21609
- * @param {String} namespace The namespace string for the for the debug instance to be colored
21820
+ * @param {String} namespace The namespace string for the debug instance to be colored
21610
21821
  * @return {Number|String} An ANSI color code for the given namespace
21611
21822
  * @api private
21612
21823
  */
@@ -24161,7 +24372,7 @@
24161
24372
  return _this;
24162
24373
  }
24163
24374
 
24164
- return Runner;
24375
+ return _createClass(Runner);
24165
24376
  }(EventEmitter);
24166
24377
  /**
24167
24378
  * Wrapper for setImmediate, process.nextTick, or browser polyfill.
@@ -24626,7 +24837,7 @@
24626
24837
 
24627
24838
 
24628
24839
  Runner.prototype.runTest = function (fn) {
24629
- if (this._opts.dryRun) return fn();
24840
+ if (this._opts.dryRun) return Runner.immediately(fn);
24630
24841
  var self = this;
24631
24842
  var test = this.test;
24632
24843
 
@@ -25332,6 +25543,11 @@
25332
25543
  */
25333
25544
 
25334
25545
  exports.inlineDiffs = false;
25546
+ /**
25547
+ * Truncate diffs longer than this value to avoid slow performance
25548
+ */
25549
+
25550
+ exports.maxDiffSize = 8192;
25335
25551
  /**
25336
25552
  * Default color map.
25337
25553
  */
@@ -25458,17 +25674,22 @@
25458
25674
 
25459
25675
  var generateDiff = exports.generateDiff = function (actual, expected) {
25460
25676
  try {
25461
- var diffSize = 2048;
25677
+ var maxLen = exports.maxDiffSize;
25678
+ var skipped = 0;
25462
25679
 
25463
- if (actual.length > diffSize) {
25464
- actual = actual.substring(0, diffSize) + ' ... Lines skipped';
25680
+ if (maxLen > 0) {
25681
+ skipped = Math.max(actual.length - maxLen, expected.length - maxLen);
25682
+ actual = actual.slice(0, maxLen);
25683
+ expected = expected.slice(0, maxLen);
25465
25684
  }
25466
25685
 
25467
- if (expected.length > diffSize) {
25468
- expected = expected.substring(0, diffSize) + ' ... Lines skipped';
25686
+ var result = exports.inlineDiffs ? inlineDiff(actual, expected) : unifiedDiff(actual, expected);
25687
+
25688
+ if (skipped > 0) {
25689
+ result = "".concat(result, "\n [mocha] output truncated to ").concat(maxLen, " characters, see \"maxDiffSize\" reporter-option\n");
25469
25690
  }
25470
25691
 
25471
- return exports.inlineDiffs ? inlineDiff(actual, expected) : unifiedDiff(actual, expected);
25692
+ return result;
25472
25693
  } catch (err) {
25473
25694
  var msg = '\n ' + color('diff added', '+ expected') + ' ' + color('diff removed', '- actual: failed to generate Mocha diff') + '\n';
25474
25695
  return msg;
@@ -25585,6 +25806,12 @@
25585
25806
  this.runner = runner;
25586
25807
  this.stats = runner.stats; // assigned so Reporters keep a closer reference
25587
25808
 
25809
+ var maxDiffSizeOpt = this.options.reporterOption && this.options.reporterOption.maxDiffSize;
25810
+
25811
+ if (maxDiffSizeOpt !== undefined && !isNaN(Number(maxDiffSizeOpt))) {
25812
+ exports.maxDiffSize = Number(maxDiffSizeOpt);
25813
+ }
25814
+
25588
25815
  runner.on(EVENT_TEST_PASS, function (test) {
25589
25816
  if (test.duration > test.slow()) {
25590
25817
  test.speed = 'slow';
@@ -26493,6 +26720,7 @@
26493
26720
  var result = '0';
26494
26721
  var e, z, j, k;
26495
26722
 
26723
+ // TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation
26496
26724
  if (fractDigits < 0 || fractDigits > 20) throw RangeError$1('Incorrect fraction digits');
26497
26725
  // eslint-disable-next-line no-self-compare -- NaN check
26498
26726
  if (number != number) return 'NaN';
@@ -27545,9 +27773,14 @@
27545
27773
 
27546
27774
  if (options && options.reporterOptions) {
27547
27775
  if (options.reporterOptions.output) {
27548
- {
27776
+ if (!fs.createWriteStream) {
27549
27777
  throw createUnsupportedError('file output not supported in browser');
27550
27778
  }
27779
+
27780
+ fs.mkdirSync(path.dirname(options.reporterOptions.output), {
27781
+ recursive: true
27782
+ });
27783
+ self.fileStream = fs.createWriteStream(options.reporterOptions.output);
27551
27784
  } // get the suite name from the reporter options (if provided)
27552
27785
 
27553
27786
 
@@ -28107,7 +28340,7 @@
28107
28340
  });
28108
28341
 
28109
28342
  var name = "mocha";
28110
- var version = "9.1.4";
28343
+ var version = "9.2.2";
28111
28344
  var homepage = "https://mochajs.org/";
28112
28345
  var notifyLogo = "https://ibin.co/4QuRuGjXvl36.png";
28113
28346
  var _package = {
@@ -29090,14 +29323,6 @@
29090
29323
  exports: exports$1
29091
29324
  };
29092
29325
 
29093
- /**
29094
- * @module Context
29095
- */
29096
-
29097
- /**
29098
- * Expose `Context`.
29099
- */
29100
-
29101
29326
  var context = Context;
29102
29327
  /**
29103
29328
  * Initialize a new `Context`.
@@ -29195,8 +29420,7 @@
29195
29420
  * MIT Licensed
29196
29421
  */
29197
29422
 
29198
- var warn = errors.warn,
29199
- createInvalidReporterError = errors.createInvalidReporterError,
29423
+ var createInvalidReporterError = errors.createInvalidReporterError,
29200
29424
  createInvalidInterfaceError = errors.createInvalidInterfaceError,
29201
29425
  createMochaInstanceAlreadyDisposedError = errors.createMochaInstanceAlreadyDisposedError,
29202
29426
  createMochaInstanceAlreadyRunningError = errors.createMochaInstanceAlreadyRunningError,
@@ -29536,30 +29760,29 @@
29536
29760
 
29537
29761
 
29538
29762
  if (!reporter) {
29763
+ var foundReporter;
29764
+
29539
29765
  try {
29540
- reporter = commonjsRequire(reporterName);
29766
+ foundReporter = require.resolve(reporterName);
29767
+ reporter = commonjsRequire(foundReporter);
29541
29768
  } catch (err) {
29542
- if (err.code === 'MODULE_NOT_FOUND') {
29543
- // Try to load reporters from a path (absolute or relative)
29544
- try {
29545
- reporter = commonjsRequire(path.resolve(utils.cwd(), reporterName));
29546
- } catch (_err) {
29547
- _err.code === 'MODULE_NOT_FOUND' ? warn("'".concat(reporterName, "' reporter not found")) : warn("'".concat(reporterName, "' reporter blew up with error:\n ").concat(err.stack));
29548
- }
29549
- } else {
29550
- warn("'".concat(reporterName, "' reporter blew up with error:\n ").concat(err.stack));
29769
+ if (foundReporter) {
29770
+ throw createInvalidReporterError(err.message, foundReporter);
29771
+ } // Try to load reporters from a cwd-relative path
29772
+
29773
+
29774
+ try {
29775
+ reporter = commonjsRequire(path.resolve(reporterName));
29776
+ } catch (e) {
29777
+ throw createInvalidReporterError(e.message, reporterName);
29551
29778
  }
29552
29779
  }
29553
29780
  }
29554
29781
 
29555
- if (!reporter) {
29556
- throw createInvalidReporterError("invalid reporter '".concat(reporterName, "'"), reporterName);
29557
- }
29558
-
29559
29782
  this._reporter = reporter;
29560
29783
  }
29561
29784
 
29562
- this.options.reporterOption = reporterOptions; // alias option name is used in public reporters xunit/tap/progress
29785
+ this.options.reporterOption = reporterOptions; // alias option name is used in built-in reporters xunit/tap/progress
29563
29786
 
29564
29787
  this.options.reporterOptions = reporterOptions;
29565
29788
  return this;