@dotcms/experiments 1.5.5-next.2323 → 1.5.5-next.2335

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.
Files changed (2) hide show
  1. package/index.esm.js +1360 -1313
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { createContext, useContext, useState, useEffect, useRef, useCallback } from 'react';
3
- import { UVE_MODE } from '@dotcms/types';
4
3
  import { getUVEState } from '@dotcms/uve';
5
4
  import { jitsuClient } from '@jitsu/sdk-js';
6
5
 
@@ -24,7 +23,7 @@ var global$q =
24
23
 
25
24
  var objectGetOwnPropertyDescriptor = {};
26
25
 
27
- var fails$o = function (exec) {
26
+ var fails$p = function (exec) {
28
27
  try {
29
28
  return !!exec();
30
29
  } catch (error) {
@@ -32,17 +31,17 @@ var fails$o = function (exec) {
32
31
  }
33
32
  };
34
33
 
35
- var fails$n = fails$o;
34
+ var fails$o = fails$p;
36
35
 
37
36
  // Detect IE8's incomplete defineProperty implementation
38
- var descriptors = !fails$n(function () {
37
+ var descriptors = !fails$o(function () {
39
38
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
40
39
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
41
40
  });
42
41
 
43
- var fails$m = fails$o;
42
+ var fails$n = fails$p;
44
43
 
45
- var functionBindNative = !fails$m(function () {
44
+ var functionBindNative = !fails$n(function () {
46
45
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
47
46
  var test = (function () { /* empty */ }).bind();
48
47
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -104,14 +103,14 @@ var classofRaw$2 = function (it) {
104
103
  };
105
104
 
106
105
  var uncurryThis$q = functionUncurryThis;
107
- var fails$l = fails$o;
106
+ var fails$m = fails$p;
108
107
  var classof$b = classofRaw$2;
109
108
 
110
109
  var $Object$4 = Object;
111
110
  var split$3 = uncurryThis$q(''.split);
112
111
 
113
112
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
114
- var indexedObject = fails$l(function () {
113
+ var indexedObject = fails$m(function () {
115
114
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
116
115
  // eslint-disable-next-line no-prototype-builtins -- safe
117
116
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -150,26 +149,26 @@ var documentAll = typeof document == 'object' && document.all;
150
149
  // `IsCallable` abstract operation
151
150
  // https://tc39.es/ecma262/#sec-iscallable
152
151
  // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
153
- var isCallable$q = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
152
+ var isCallable$r = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
154
153
  return typeof argument == 'function' || argument === documentAll;
155
154
  } : function (argument) {
156
155
  return typeof argument == 'function';
157
156
  };
158
157
 
159
- var isCallable$p = isCallable$q;
158
+ var isCallable$q = isCallable$r;
160
159
 
161
160
  var isObject$e = function (it) {
162
- return typeof it == 'object' ? it !== null : isCallable$p(it);
161
+ return typeof it == 'object' ? it !== null : isCallable$q(it);
163
162
  };
164
163
 
165
164
  var global$p = global$q;
166
- var isCallable$o = isCallable$q;
165
+ var isCallable$p = isCallable$r;
167
166
 
168
167
  var aFunction = function (argument) {
169
- return isCallable$o(argument) ? argument : undefined;
168
+ return isCallable$p(argument) ? argument : undefined;
170
169
  };
171
170
 
172
- var getBuiltIn$9 = function (namespace, method) {
171
+ var getBuiltIn$a = function (namespace, method) {
173
172
  return arguments.length < 2 ? aFunction(global$p[namespace]) : global$p[namespace] && global$p[namespace][method];
174
173
  };
175
174
 
@@ -209,13 +208,13 @@ var engineV8Version = version;
209
208
 
210
209
  /* eslint-disable es/no-symbol -- required for testing */
211
210
  var V8_VERSION$1 = engineV8Version;
212
- var fails$k = fails$o;
211
+ var fails$l = fails$p;
213
212
  var global$n = global$q;
214
213
 
215
214
  var $String$6 = global$n.String;
216
215
 
217
216
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
218
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$k(function () {
217
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$l(function () {
219
218
  var symbol = Symbol('symbol detection');
220
219
  // Chrome 38 Symbol has incorrect toString conversion
221
220
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -233,8 +232,8 @@ var useSymbolAsUid = NATIVE_SYMBOL$2
233
232
  && !Symbol.sham
234
233
  && typeof Symbol.iterator == 'symbol';
235
234
 
236
- var getBuiltIn$8 = getBuiltIn$9;
237
- var isCallable$n = isCallable$q;
235
+ var getBuiltIn$9 = getBuiltIn$a;
236
+ var isCallable$o = isCallable$r;
238
237
  var isPrototypeOf$5 = objectIsPrototypeOf;
239
238
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
240
239
 
@@ -243,8 +242,8 @@ var $Object$3 = Object;
243
242
  var isSymbol$3 = USE_SYMBOL_AS_UID$1 ? function (it) {
244
243
  return typeof it == 'symbol';
245
244
  } : function (it) {
246
- var $Symbol = getBuiltIn$8('Symbol');
247
- return isCallable$n($Symbol) && isPrototypeOf$5($Symbol.prototype, $Object$3(it));
245
+ var $Symbol = getBuiltIn$9('Symbol');
246
+ return isCallable$o($Symbol) && isPrototypeOf$5($Symbol.prototype, $Object$3(it));
248
247
  };
249
248
 
250
249
  var $String$5 = String;
@@ -257,14 +256,14 @@ var tryToString$4 = function (argument) {
257
256
  }
258
257
  };
259
258
 
260
- var isCallable$m = isCallable$q;
259
+ var isCallable$n = isCallable$r;
261
260
  var tryToString$3 = tryToString$4;
262
261
 
263
262
  var $TypeError$f = TypeError;
264
263
 
265
264
  // `Assert: IsCallable(argument) is true`
266
265
  var aCallable$c = function (argument) {
267
- if (isCallable$m(argument)) return argument;
266
+ if (isCallable$n(argument)) return argument;
268
267
  throw new $TypeError$f(tryToString$3(argument) + ' is not a function');
269
268
  };
270
269
 
@@ -279,7 +278,7 @@ var getMethod$5 = function (V, P) {
279
278
  };
280
279
 
281
280
  var call$o = functionCall;
282
- var isCallable$l = isCallable$q;
281
+ var isCallable$m = isCallable$r;
283
282
  var isObject$d = isObject$e;
284
283
 
285
284
  var $TypeError$e = TypeError;
@@ -288,9 +287,9 @@ var $TypeError$e = TypeError;
288
287
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
289
288
  var ordinaryToPrimitive$1 = function (input, pref) {
290
289
  var fn, val;
291
- if (pref === 'string' && isCallable$l(fn = input.toString) && !isObject$d(val = call$o(fn, input))) return val;
292
- if (isCallable$l(fn = input.valueOf) && !isObject$d(val = call$o(fn, input))) return val;
293
- if (pref !== 'string' && isCallable$l(fn = input.toString) && !isObject$d(val = call$o(fn, input))) return val;
290
+ if (pref === 'string' && isCallable$m(fn = input.toString) && !isObject$d(val = call$o(fn, input))) return val;
291
+ if (isCallable$m(fn = input.valueOf) && !isObject$d(val = call$o(fn, input))) return val;
292
+ if (pref !== 'string' && isCallable$m(fn = input.toString) && !isObject$d(val = call$o(fn, input))) return val;
294
293
  throw new $TypeError$e("Can't convert object to primitive value");
295
294
  };
296
295
 
@@ -432,11 +431,11 @@ var documentCreateElement$2 = function (it) {
432
431
  };
433
432
 
434
433
  var DESCRIPTORS$k = descriptors;
435
- var fails$j = fails$o;
434
+ var fails$k = fails$p;
436
435
  var createElement$1 = documentCreateElement$2;
437
436
 
438
437
  // Thanks to IE8 for its funny defineProperty
439
- var ie8DomDefine = !DESCRIPTORS$k && !fails$j(function () {
438
+ var ie8DomDefine = !DESCRIPTORS$k && !fails$k(function () {
440
439
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
441
440
  return Object.defineProperty(createElement$1('div'), 'a', {
442
441
  get: function () { return 7; }
@@ -469,11 +468,11 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$j ? $getOwnPropertyDescriptor$1 :
469
468
  var objectDefineProperty = {};
470
469
 
471
470
  var DESCRIPTORS$i = descriptors;
472
- var fails$i = fails$o;
471
+ var fails$j = fails$p;
473
472
 
474
473
  // V8 ~ Chrome 36-
475
474
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
476
- var v8PrototypeDefineBug = DESCRIPTORS$i && fails$i(function () {
475
+ var v8PrototypeDefineBug = DESCRIPTORS$i && fails$j(function () {
477
476
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
478
477
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
479
478
  value: 42,
@@ -568,13 +567,13 @@ var functionName = {
568
567
  };
569
568
 
570
569
  var uncurryThis$m = functionUncurryThis;
571
- var isCallable$k = isCallable$q;
570
+ var isCallable$l = isCallable$r;
572
571
  var store$1 = sharedStoreExports;
573
572
 
574
573
  var functionToString = uncurryThis$m(Function.toString);
575
574
 
576
575
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
577
- if (!isCallable$k(store$1.inspectSource)) {
576
+ if (!isCallable$l(store$1.inspectSource)) {
578
577
  store$1.inspectSource = function (it) {
579
578
  return functionToString(it);
580
579
  };
@@ -583,11 +582,11 @@ if (!isCallable$k(store$1.inspectSource)) {
583
582
  var inspectSource$3 = store$1.inspectSource;
584
583
 
585
584
  var global$j = global$q;
586
- var isCallable$j = isCallable$q;
585
+ var isCallable$k = isCallable$r;
587
586
 
588
587
  var WeakMap$1 = global$j.WeakMap;
589
588
 
590
- var weakMapBasicDetection = isCallable$j(WeakMap$1) && /native code/.test(String(WeakMap$1));
589
+ var weakMapBasicDetection = isCallable$k(WeakMap$1) && /native code/.test(String(WeakMap$1));
591
590
 
592
591
  var shared$2 = shared$4;
593
592
  var uid = uid$2;
@@ -672,8 +671,8 @@ var internalState = {
672
671
  };
673
672
 
674
673
  var uncurryThis$l = functionUncurryThis;
675
- var fails$h = fails$o;
676
- var isCallable$i = isCallable$q;
674
+ var fails$i = fails$p;
675
+ var isCallable$j = isCallable$r;
677
676
  var hasOwn$b = hasOwnProperty_1;
678
677
  var DESCRIPTORS$e = descriptors;
679
678
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
@@ -689,7 +688,7 @@ var stringSlice$5 = uncurryThis$l(''.slice);
689
688
  var replace$7 = uncurryThis$l(''.replace);
690
689
  var join$3 = uncurryThis$l([].join);
691
690
 
692
- var CONFIGURABLE_LENGTH = DESCRIPTORS$e && !fails$h(function () {
691
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$e && !fails$i(function () {
693
692
  return defineProperty$6(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
694
693
  });
695
694
 
@@ -723,21 +722,21 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
723
722
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
724
723
  // eslint-disable-next-line no-extend-native -- required
725
724
  Function.prototype.toString = makeBuiltIn$2(function toString() {
726
- return isCallable$i(this) && getInternalState$4(this).source || inspectSource$2(this);
725
+ return isCallable$j(this) && getInternalState$4(this).source || inspectSource$2(this);
727
726
  }, 'toString');
728
727
 
729
728
  var makeBuiltInExports = makeBuiltIn$3.exports;
730
729
 
731
- var isCallable$h = isCallable$q;
730
+ var isCallable$i = isCallable$r;
732
731
  var definePropertyModule$3 = objectDefineProperty;
733
732
  var makeBuiltIn$1 = makeBuiltInExports;
734
733
  var defineGlobalProperty$1 = defineGlobalProperty$3;
735
734
 
736
- var defineBuiltIn$d = function (O, key, value, options) {
735
+ var defineBuiltIn$e = function (O, key, value, options) {
737
736
  if (!options) options = {};
738
737
  var simple = options.enumerable;
739
738
  var name = options.name !== undefined ? options.name : key;
740
- if (isCallable$h(value)) makeBuiltIn$1(value, name, options);
739
+ if (isCallable$i(value)) makeBuiltIn$1(value, name, options);
741
740
  if (options.global) {
742
741
  if (simple) O[key] = value;
743
742
  else defineGlobalProperty$1(key, value);
@@ -894,7 +893,7 @@ var objectGetOwnPropertySymbols = {};
894
893
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
895
894
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
896
895
 
897
- var getBuiltIn$7 = getBuiltIn$9;
896
+ var getBuiltIn$8 = getBuiltIn$a;
898
897
  var uncurryThis$j = functionUncurryThis;
899
898
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
900
899
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
@@ -903,7 +902,7 @@ var anObject$j = anObject$l;
903
902
  var concat$1 = uncurryThis$j([].concat);
904
903
 
905
904
  // all object keys, includes non-enumerable and symbols
906
- var ownKeys$1 = getBuiltIn$7('Reflect', 'ownKeys') || function ownKeys(it) {
905
+ var ownKeys$1 = getBuiltIn$8('Reflect', 'ownKeys') || function ownKeys(it) {
907
906
  var keys = getOwnPropertyNamesModule.f(anObject$j(it));
908
907
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
909
908
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
@@ -926,8 +925,8 @@ var copyConstructorProperties$2 = function (target, source, exceptions) {
926
925
  }
927
926
  };
928
927
 
929
- var fails$g = fails$o;
930
- var isCallable$g = isCallable$q;
928
+ var fails$h = fails$p;
929
+ var isCallable$h = isCallable$r;
931
930
 
932
931
  var replacement = /#|\.prototype\./;
933
932
 
@@ -935,7 +934,7 @@ var isForced$3 = function (feature, detection) {
935
934
  var value = data[normalize(feature)];
936
935
  return value === POLYFILL ? true
937
936
  : value === NATIVE ? false
938
- : isCallable$g(detection) ? fails$g(detection)
937
+ : isCallable$h(detection) ? fails$h(detection)
939
938
  : !!detection;
940
939
  };
941
940
 
@@ -952,7 +951,7 @@ var isForced_1 = isForced$3;
952
951
  var global$h = global$q;
953
952
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
954
953
  var createNonEnumerableProperty$8 = createNonEnumerableProperty$a;
955
- var defineBuiltIn$c = defineBuiltIn$d;
954
+ var defineBuiltIn$d = defineBuiltIn$e;
956
955
  var defineGlobalProperty = defineGlobalProperty$3;
957
956
  var copyConstructorProperties$1 = copyConstructorProperties$2;
958
957
  var isForced$2 = isForced_1;
@@ -1000,7 +999,7 @@ var _export = function (options, source) {
1000
999
  if (options.sham || (targetProperty && targetProperty.sham)) {
1001
1000
  createNonEnumerableProperty$8(sourceProperty, 'sham', true);
1002
1001
  }
1003
- defineBuiltIn$c(target, key, sourceProperty, options);
1002
+ defineBuiltIn$d(target, key, sourceProperty, options);
1004
1003
  }
1005
1004
  };
1006
1005
 
@@ -1017,7 +1016,7 @@ var objectKeys$2 = Object.keys || function keys(O) {
1017
1016
  var DESCRIPTORS$d = descriptors;
1018
1017
  var uncurryThis$i = functionUncurryThis;
1019
1018
  var call$l = functionCall;
1020
- var fails$f = fails$o;
1019
+ var fails$g = fails$p;
1021
1020
  var objectKeys$1 = objectKeys$2;
1022
1021
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1023
1022
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
@@ -1032,7 +1031,7 @@ var concat = uncurryThis$i([].concat);
1032
1031
 
1033
1032
  // `Object.assign` method
1034
1033
  // https://tc39.es/ecma262/#sec-object.assign
1035
- var objectAssign = !$assign || fails$f(function () {
1034
+ var objectAssign = !$assign || fails$g(function () {
1036
1035
  // should have correct order of operations (Edge bug)
1037
1036
  if (DESCRIPTORS$d && $assign({ b: 1 }, $assign(defineProperty$5({}, 'a', {
1038
1037
  enumerable: true,
@@ -1071,13 +1070,13 @@ var objectAssign = !$assign || fails$f(function () {
1071
1070
  } return T;
1072
1071
  } : $assign;
1073
1072
 
1074
- var $$l = _export;
1073
+ var $$m = _export;
1075
1074
  var assign$1 = objectAssign;
1076
1075
 
1077
1076
  // `Object.assign` method
1078
1077
  // https://tc39.es/ecma262/#sec-object.assign
1079
1078
  // eslint-disable-next-line es/no-object-assign -- required for testing
1080
- $$l({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign$1 }, {
1079
+ $$m({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign$1 }, {
1081
1080
  assign: assign$1
1082
1081
  });
1083
1082
 
@@ -1114,9 +1113,9 @@ objectDefineProperties.f = DESCRIPTORS$c && !V8_PROTOTYPE_DEFINE_BUG ? Object.de
1114
1113
  return O;
1115
1114
  };
1116
1115
 
1117
- var getBuiltIn$6 = getBuiltIn$9;
1116
+ var getBuiltIn$7 = getBuiltIn$a;
1118
1117
 
1119
- var html$2 = getBuiltIn$6('document', 'documentElement');
1118
+ var html$2 = getBuiltIn$7('document', 'documentElement');
1120
1119
 
1121
1120
  /* global ActiveXObject -- old IE, WSH */
1122
1121
  var anObject$h = anObject$l;
@@ -1225,9 +1224,9 @@ var addToUnscopables$2 = function (key) {
1225
1224
 
1226
1225
  var iterators = {};
1227
1226
 
1228
- var fails$e = fails$o;
1227
+ var fails$f = fails$p;
1229
1228
 
1230
- var correctPrototypeGetter = !fails$e(function () {
1229
+ var correctPrototypeGetter = !fails$f(function () {
1231
1230
  function F() { /* empty */ }
1232
1231
  F.prototype.constructor = null;
1233
1232
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -1235,7 +1234,7 @@ var correctPrototypeGetter = !fails$e(function () {
1235
1234
  });
1236
1235
 
1237
1236
  var hasOwn$8 = hasOwnProperty_1;
1238
- var isCallable$f = isCallable$q;
1237
+ var isCallable$g = isCallable$r;
1239
1238
  var toObject$1 = toObject$4;
1240
1239
  var sharedKey = sharedKey$3;
1241
1240
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
@@ -1251,16 +1250,16 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
1251
1250
  var object = toObject$1(O);
1252
1251
  if (hasOwn$8(object, IE_PROTO)) return object[IE_PROTO];
1253
1252
  var constructor = object.constructor;
1254
- if (isCallable$f(constructor) && object instanceof constructor) {
1253
+ if (isCallable$g(constructor) && object instanceof constructor) {
1255
1254
  return constructor.prototype;
1256
1255
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1257
1256
  };
1258
1257
 
1259
- var fails$d = fails$o;
1260
- var isCallable$e = isCallable$q;
1258
+ var fails$e = fails$p;
1259
+ var isCallable$f = isCallable$r;
1261
1260
  var isObject$8 = isObject$e;
1262
1261
  var getPrototypeOf$2 = objectGetPrototypeOf;
1263
- var defineBuiltIn$b = defineBuiltIn$d;
1262
+ var defineBuiltIn$c = defineBuiltIn$e;
1264
1263
  var wellKnownSymbol$j = wellKnownSymbol$m;
1265
1264
 
1266
1265
  var ITERATOR$8 = wellKnownSymbol$j('iterator');
@@ -1281,7 +1280,7 @@ if ([].keys) {
1281
1280
  }
1282
1281
  }
1283
1282
 
1284
- var NEW_ITERATOR_PROTOTYPE = !isObject$8(IteratorPrototype$4) || fails$d(function () {
1283
+ var NEW_ITERATOR_PROTOTYPE = !isObject$8(IteratorPrototype$4) || fails$e(function () {
1285
1284
  var test = {};
1286
1285
  // FF44- legacy iterators case
1287
1286
  return IteratorPrototype$4[ITERATOR$8].call(test) !== test;
@@ -1291,8 +1290,8 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$4 = {};
1291
1290
 
1292
1291
  // `%IteratorPrototype%[@@iterator]()` method
1293
1292
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1294
- if (!isCallable$e(IteratorPrototype$4[ITERATOR$8])) {
1295
- defineBuiltIn$b(IteratorPrototype$4, ITERATOR$8, function () {
1293
+ if (!isCallable$f(IteratorPrototype$4[ITERATOR$8])) {
1294
+ defineBuiltIn$c(IteratorPrototype$4, ITERATOR$8, function () {
1296
1295
  return this;
1297
1296
  });
1298
1297
  }
@@ -1386,16 +1385,16 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1386
1385
  };
1387
1386
  }() : undefined);
1388
1387
 
1389
- var $$k = _export;
1388
+ var $$l = _export;
1390
1389
  var call$k = functionCall;
1391
1390
  var FunctionName = functionName;
1392
- var isCallable$d = isCallable$q;
1391
+ var isCallable$e = isCallable$r;
1393
1392
  var createIteratorConstructor$1 = iteratorCreateConstructor;
1394
1393
  var getPrototypeOf$1 = objectGetPrototypeOf;
1395
1394
  var setPrototypeOf$3 = objectSetPrototypeOf;
1396
1395
  var setToStringTag$4 = setToStringTag$6;
1397
1396
  var createNonEnumerableProperty$7 = createNonEnumerableProperty$a;
1398
- var defineBuiltIn$a = defineBuiltIn$d;
1397
+ var defineBuiltIn$b = defineBuiltIn$e;
1399
1398
  var wellKnownSymbol$h = wellKnownSymbol$m;
1400
1399
  var Iterators$3 = iterators;
1401
1400
  var IteratorsCore = iteratorsCore;
@@ -1444,8 +1443,8 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1444
1443
  if (getPrototypeOf$1(CurrentIteratorPrototype) !== IteratorPrototype$2) {
1445
1444
  if (setPrototypeOf$3) {
1446
1445
  setPrototypeOf$3(CurrentIteratorPrototype, IteratorPrototype$2);
1447
- } else if (!isCallable$d(CurrentIteratorPrototype[ITERATOR$7])) {
1448
- defineBuiltIn$a(CurrentIteratorPrototype, ITERATOR$7, returnThis);
1446
+ } else if (!isCallable$e(CurrentIteratorPrototype[ITERATOR$7])) {
1447
+ defineBuiltIn$b(CurrentIteratorPrototype, ITERATOR$7, returnThis);
1449
1448
  }
1450
1449
  }
1451
1450
  // Set @@toStringTag to native iterators
@@ -1472,14 +1471,14 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1472
1471
  };
1473
1472
  if (FORCED) for (KEY in methods) {
1474
1473
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1475
- defineBuiltIn$a(IterablePrototype, KEY, methods[KEY]);
1474
+ defineBuiltIn$b(IterablePrototype, KEY, methods[KEY]);
1476
1475
  }
1477
- } else $$k({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1476
+ } else $$l({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1478
1477
  }
1479
1478
 
1480
1479
  // define iterator
1481
1480
  if (IterablePrototype[ITERATOR$7] !== defaultIterator) {
1482
- defineBuiltIn$a(IterablePrototype, ITERATOR$7, defaultIterator, { name: DEFAULT });
1481
+ defineBuiltIn$b(IterablePrototype, ITERATOR$7, defaultIterator, { name: DEFAULT });
1483
1482
  }
1484
1483
  Iterators$3[NAME] = defaultIterator;
1485
1484
 
@@ -1669,7 +1668,8 @@ const useExperimentVariant = data => {
1669
1668
  const [shouldWaitForVariant, setShouldWaitForVariant] = useState(true);
1670
1669
  useEffect(() => {
1671
1670
  var _getUVEState;
1672
- const isInsideEditor = ((_getUVEState = getUVEState()) == null ? void 0 : _getUVEState.mode) === UVE_MODE.EDIT;
1671
+ // Any UVE mode counts as "inside the editor" - must match DotExperimentsProvider's check.
1672
+ const isInsideEditor = !!((_getUVEState = getUVEState()) != null && _getUVEState.mode);
1673
1673
  if (isInsideEditor || !runningExperimentId) {
1674
1674
  setShouldWaitForVariant(false);
1675
1675
  return;
@@ -1729,49 +1729,50 @@ const DotExperimentHandlingComponent = _ref => {
1729
1729
  return jsx(WrappedComponent, Object.assign({}, props));
1730
1730
  };
1731
1731
 
1732
- var NATIVE_BIND$1 = functionBindNative;
1732
+ var global$f = global$q;
1733
+ var classof$a = classofRaw$2;
1733
1734
 
1734
- var FunctionPrototype = Function.prototype;
1735
- var apply$3 = FunctionPrototype.apply;
1736
- var call$j = FunctionPrototype.call;
1735
+ var engineIsNode = classof$a(global$f.process) === 'process';
1737
1736
 
1738
- // eslint-disable-next-line es/no-reflect -- safe
1739
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$j.bind(apply$3) : function () {
1740
- return call$j.apply(apply$3, arguments);
1741
- });
1737
+ var makeBuiltIn = makeBuiltInExports;
1738
+ var defineProperty$1 = objectDefineProperty;
1739
+
1740
+ var defineBuiltInAccessor$6 = function (target, name, descriptor) {
1741
+ if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
1742
+ if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
1743
+ return defineProperty$1.f(target, name, descriptor);
1744
+ };
1742
1745
 
1743
- var defineProperty$1 = objectDefineProperty.f;
1746
+ var getBuiltIn$6 = getBuiltIn$a;
1747
+ var defineBuiltInAccessor$5 = defineBuiltInAccessor$6;
1748
+ var wellKnownSymbol$f = wellKnownSymbol$m;
1749
+ var DESCRIPTORS$a = descriptors;
1744
1750
 
1745
- var proxyAccessor$2 = function (Target, Source, key) {
1746
- key in Target || defineProperty$1(Target, key, {
1747
- configurable: true,
1748
- get: function () { return Source[key]; },
1749
- set: function (it) { Source[key] = it; }
1750
- });
1751
+ var SPECIES$3 = wellKnownSymbol$f('species');
1752
+
1753
+ var setSpecies$2 = function (CONSTRUCTOR_NAME) {
1754
+ var Constructor = getBuiltIn$6(CONSTRUCTOR_NAME);
1755
+
1756
+ if (DESCRIPTORS$a && Constructor && !Constructor[SPECIES$3]) {
1757
+ defineBuiltInAccessor$5(Constructor, SPECIES$3, {
1758
+ configurable: true,
1759
+ get: function () { return this; }
1760
+ });
1761
+ }
1751
1762
  };
1752
1763
 
1753
- var isCallable$c = isCallable$q;
1754
- var isObject$5 = isObject$e;
1755
- var setPrototypeOf$2 = objectSetPrototypeOf;
1764
+ var isPrototypeOf$4 = objectIsPrototypeOf;
1756
1765
 
1757
- // makes subclassing work correct for wrapped built-ins
1758
- var inheritIfRequired$2 = function ($this, dummy, Wrapper) {
1759
- var NewTarget, NewTargetPrototype;
1760
- if (
1761
- // it can work only with native `setPrototypeOf`
1762
- setPrototypeOf$2 &&
1763
- // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
1764
- isCallable$c(NewTarget = dummy.constructor) &&
1765
- NewTarget !== Wrapper &&
1766
- isObject$5(NewTargetPrototype = NewTarget.prototype) &&
1767
- NewTargetPrototype !== Wrapper.prototype
1768
- ) setPrototypeOf$2($this, NewTargetPrototype);
1769
- return $this;
1766
+ var $TypeError$9 = TypeError;
1767
+
1768
+ var anInstance$4 = function (it, Prototype) {
1769
+ if (isPrototypeOf$4(Prototype, it)) return it;
1770
+ throw new $TypeError$9('Incorrect invocation');
1770
1771
  };
1771
1772
 
1772
- var wellKnownSymbol$f = wellKnownSymbol$m;
1773
+ var wellKnownSymbol$e = wellKnownSymbol$m;
1773
1774
 
1774
- var TO_STRING_TAG$3 = wellKnownSymbol$f('toStringTag');
1775
+ var TO_STRING_TAG$3 = wellKnownSymbol$e('toStringTag');
1775
1776
  var test = {};
1776
1777
 
1777
1778
  test[TO_STRING_TAG$3] = 'z';
@@ -1779,11 +1780,11 @@ test[TO_STRING_TAG$3] = 'z';
1779
1780
  var toStringTagSupport = String(test) === '[object z]';
1780
1781
 
1781
1782
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1782
- var isCallable$b = isCallable$q;
1783
+ var isCallable$d = isCallable$r;
1783
1784
  var classofRaw$1 = classofRaw$2;
1784
- var wellKnownSymbol$e = wellKnownSymbol$m;
1785
+ var wellKnownSymbol$d = wellKnownSymbol$m;
1785
1786
 
1786
- var TO_STRING_TAG$2 = wellKnownSymbol$e('toStringTag');
1787
+ var TO_STRING_TAG$2 = wellKnownSymbol$d('toStringTag');
1787
1788
  var $Object = Object;
1788
1789
 
1789
1790
  // ES3 wrong here
@@ -1797,7 +1798,7 @@ var tryGet = function (it, key) {
1797
1798
  };
1798
1799
 
1799
1800
  // getting tag from ES6+ `Object.prototype.toString`
1800
- var classof$a = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1801
+ var classof$9 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1801
1802
  var O, tag, result;
1802
1803
  return it === undefined ? 'Undefined' : it === null ? 'Null'
1803
1804
  // @@toStringTag case
@@ -1805,1408 +1806,1449 @@ var classof$a = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1805
1806
  // builtinTag case
1806
1807
  : CORRECT_ARGUMENTS ? classofRaw$1(O)
1807
1808
  // ES3 arguments fallback
1808
- : (result = classofRaw$1(O)) === 'Object' && isCallable$b(O.callee) ? 'Arguments' : result;
1809
+ : (result = classofRaw$1(O)) === 'Object' && isCallable$d(O.callee) ? 'Arguments' : result;
1809
1810
  };
1810
1811
 
1811
- var classof$9 = classof$a;
1812
+ var uncurryThis$g = functionUncurryThis;
1813
+ var fails$d = fails$p;
1814
+ var isCallable$c = isCallable$r;
1815
+ var classof$8 = classof$9;
1816
+ var getBuiltIn$5 = getBuiltIn$a;
1817
+ var inspectSource$1 = inspectSource$3;
1812
1818
 
1813
- var $String$1 = String;
1819
+ var noop = function () { /* empty */ };
1820
+ var construct = getBuiltIn$5('Reflect', 'construct');
1821
+ var constructorRegExp = /^\s*(?:class|function)\b/;
1822
+ var exec$5 = uncurryThis$g(constructorRegExp.exec);
1823
+ var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
1814
1824
 
1815
- var toString$b = function (argument) {
1816
- if (classof$9(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1817
- return $String$1(argument);
1825
+ var isConstructorModern = function isConstructor(argument) {
1826
+ if (!isCallable$c(argument)) return false;
1827
+ try {
1828
+ construct(noop, [], argument);
1829
+ return true;
1830
+ } catch (error) {
1831
+ return false;
1832
+ }
1818
1833
  };
1819
1834
 
1820
- var toString$a = toString$b;
1821
-
1822
- var normalizeStringArgument$1 = function (argument, $default) {
1823
- return argument === undefined ? arguments.length < 2 ? '' : $default : toString$a(argument);
1835
+ var isConstructorLegacy = function isConstructor(argument) {
1836
+ if (!isCallable$c(argument)) return false;
1837
+ switch (classof$8(argument)) {
1838
+ case 'AsyncFunction':
1839
+ case 'GeneratorFunction':
1840
+ case 'AsyncGeneratorFunction': return false;
1841
+ }
1842
+ try {
1843
+ // we can't check .prototype since constructors produced by .bind haven't it
1844
+ // `Function#toString` throws on some built-it function in some legacy engines
1845
+ // (for example, `DOMQuad` and similar in FF41-)
1846
+ return INCORRECT_TO_STRING || !!exec$5(constructorRegExp, inspectSource$1(argument));
1847
+ } catch (error) {
1848
+ return true;
1849
+ }
1824
1850
  };
1825
1851
 
1826
- var isObject$4 = isObject$e;
1827
- var createNonEnumerableProperty$5 = createNonEnumerableProperty$a;
1852
+ isConstructorLegacy.sham = true;
1828
1853
 
1829
- // `InstallErrorCause` abstract operation
1830
- // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
1831
- var installErrorCause$1 = function (O, options) {
1832
- if (isObject$4(options) && 'cause' in options) {
1833
- createNonEnumerableProperty$5(O, 'cause', options.cause);
1834
- }
1835
- };
1854
+ // `IsConstructor` abstract operation
1855
+ // https://tc39.es/ecma262/#sec-isconstructor
1856
+ var isConstructor$2 = !construct || fails$d(function () {
1857
+ var called;
1858
+ return isConstructorModern(isConstructorModern.call)
1859
+ || !isConstructorModern(Object)
1860
+ || !isConstructorModern(function () { called = true; })
1861
+ || called;
1862
+ }) ? isConstructorLegacy : isConstructorModern;
1836
1863
 
1837
- var uncurryThis$g = functionUncurryThis;
1864
+ var isConstructor$1 = isConstructor$2;
1865
+ var tryToString$2 = tryToString$4;
1838
1866
 
1839
- var $Error = Error;
1840
- var replace$6 = uncurryThis$g(''.replace);
1867
+ var $TypeError$8 = TypeError;
1841
1868
 
1842
- var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
1843
- // eslint-disable-next-line redos/no-vulnerable -- safe
1844
- var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
1845
- var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
1869
+ // `Assert: IsConstructor(argument) is true`
1870
+ var aConstructor$1 = function (argument) {
1871
+ if (isConstructor$1(argument)) return argument;
1872
+ throw new $TypeError$8(tryToString$2(argument) + ' is not a constructor');
1873
+ };
1846
1874
 
1847
- var errorStackClear = function (stack, dropEntries) {
1848
- if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
1849
- while (dropEntries--) stack = replace$6(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
1850
- } return stack;
1875
+ var anObject$g = anObject$l;
1876
+ var aConstructor = aConstructor$1;
1877
+ var isNullOrUndefined$2 = isNullOrUndefined$5;
1878
+ var wellKnownSymbol$c = wellKnownSymbol$m;
1879
+
1880
+ var SPECIES$2 = wellKnownSymbol$c('species');
1881
+
1882
+ // `SpeciesConstructor` abstract operation
1883
+ // https://tc39.es/ecma262/#sec-speciesconstructor
1884
+ var speciesConstructor$2 = function (O, defaultConstructor) {
1885
+ var C = anObject$g(O).constructor;
1886
+ var S;
1887
+ return C === undefined || isNullOrUndefined$2(S = anObject$g(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
1851
1888
  };
1852
1889
 
1853
- var fails$c = fails$o;
1854
- var createPropertyDescriptor$2 = createPropertyDescriptor$6;
1890
+ var NATIVE_BIND$1 = functionBindNative;
1855
1891
 
1856
- var errorStackInstallable = !fails$c(function () {
1857
- var error = new Error('a');
1858
- if (!('stack' in error)) return true;
1859
- // eslint-disable-next-line es/no-object-defineproperty -- safe
1860
- Object.defineProperty(error, 'stack', createPropertyDescriptor$2(1, 7));
1861
- return error.stack !== 7;
1892
+ var FunctionPrototype = Function.prototype;
1893
+ var apply$3 = FunctionPrototype.apply;
1894
+ var call$j = FunctionPrototype.call;
1895
+
1896
+ // eslint-disable-next-line es/no-reflect -- safe
1897
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$j.bind(apply$3) : function () {
1898
+ return call$j.apply(apply$3, arguments);
1862
1899
  });
1863
1900
 
1864
- var createNonEnumerableProperty$4 = createNonEnumerableProperty$a;
1865
- var clearErrorStack = errorStackClear;
1866
- var ERROR_STACK_INSTALLABLE = errorStackInstallable;
1901
+ var classofRaw = classofRaw$2;
1902
+ var uncurryThis$f = functionUncurryThis;
1867
1903
 
1868
- // non-standard V8
1869
- var captureStackTrace = Error.captureStackTrace;
1904
+ var functionUncurryThisClause = function (fn) {
1905
+ // Nashorn bug:
1906
+ // https://github.com/zloirock/core-js/issues/1128
1907
+ // https://github.com/zloirock/core-js/issues/1130
1908
+ if (classofRaw(fn) === 'Function') return uncurryThis$f(fn);
1909
+ };
1870
1910
 
1871
- var errorStackInstall = function (error, C, stack, dropEntries) {
1872
- if (ERROR_STACK_INSTALLABLE) {
1873
- if (captureStackTrace) captureStackTrace(error, C);
1874
- else createNonEnumerableProperty$4(error, 'stack', clearErrorStack(stack, dropEntries));
1875
- }
1911
+ var uncurryThis$e = functionUncurryThisClause;
1912
+ var aCallable$9 = aCallable$c;
1913
+ var NATIVE_BIND = functionBindNative;
1914
+
1915
+ var bind$7 = uncurryThis$e(uncurryThis$e.bind);
1916
+
1917
+ // optional / simple context binding
1918
+ var functionBindContext = function (fn, that) {
1919
+ aCallable$9(fn);
1920
+ return that === undefined ? fn : NATIVE_BIND ? bind$7(fn, that) : function (/* ...args */) {
1921
+ return fn.apply(that, arguments);
1922
+ };
1876
1923
  };
1877
1924
 
1878
- var getBuiltIn$5 = getBuiltIn$9;
1879
- var hasOwn$6 = hasOwnProperty_1;
1880
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$a;
1881
- var isPrototypeOf$4 = objectIsPrototypeOf;
1882
- var setPrototypeOf$1 = objectSetPrototypeOf;
1883
- var copyConstructorProperties = copyConstructorProperties$2;
1884
- var proxyAccessor$1 = proxyAccessor$2;
1885
- var inheritIfRequired$1 = inheritIfRequired$2;
1886
- var normalizeStringArgument = normalizeStringArgument$1;
1887
- var installErrorCause = installErrorCause$1;
1888
- var installErrorStack = errorStackInstall;
1889
- var DESCRIPTORS$a = descriptors;
1925
+ var uncurryThis$d = functionUncurryThis;
1890
1926
 
1891
- var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
1892
- var STACK_TRACE_LIMIT = 'stackTraceLimit';
1893
- var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
1894
- var path = FULL_NAME.split('.');
1895
- var ERROR_NAME = path[path.length - 1];
1896
- var OriginalError = getBuiltIn$5.apply(null, path);
1927
+ var arraySlice$4 = uncurryThis$d([].slice);
1897
1928
 
1898
- if (!OriginalError) return;
1929
+ var $TypeError$7 = TypeError;
1899
1930
 
1900
- var OriginalErrorPrototype = OriginalError.prototype;
1931
+ var validateArgumentsLength$5 = function (passed, required) {
1932
+ if (passed < required) throw new $TypeError$7('Not enough arguments');
1933
+ return passed;
1934
+ };
1901
1935
 
1902
- // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
1903
- if (hasOwn$6(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
1936
+ var userAgent$2 = engineUserAgent;
1904
1937
 
1905
- if (!FORCED) return OriginalError;
1938
+ // eslint-disable-next-line redos/no-vulnerable -- safe
1939
+ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
1906
1940
 
1907
- var BaseError = getBuiltIn$5('Error');
1941
+ var global$e = global$q;
1942
+ var apply$2 = functionApply;
1943
+ var bind$6 = functionBindContext;
1944
+ var isCallable$b = isCallable$r;
1945
+ var hasOwn$6 = hasOwnProperty_1;
1946
+ var fails$c = fails$p;
1947
+ var html = html$2;
1948
+ var arraySlice$3 = arraySlice$4;
1949
+ var createElement = documentCreateElement$2;
1950
+ var validateArgumentsLength$4 = validateArgumentsLength$5;
1951
+ var IS_IOS$1 = engineIsIos;
1952
+ var IS_NODE$3 = engineIsNode;
1908
1953
 
1909
- var WrappedError = wrapper(function (a, b) {
1910
- var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
1911
- var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
1912
- if (message !== undefined) createNonEnumerableProperty$3(result, 'message', message);
1913
- installErrorStack(result, WrappedError, result.stack, 2);
1914
- if (this && isPrototypeOf$4(OriginalErrorPrototype, this)) inheritIfRequired$1(result, this, WrappedError);
1915
- if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
1916
- return result;
1917
- });
1954
+ var set = global$e.setImmediate;
1955
+ var clear = global$e.clearImmediate;
1956
+ var process$2 = global$e.process;
1957
+ var Dispatch = global$e.Dispatch;
1958
+ var Function$1 = global$e.Function;
1959
+ var MessageChannel = global$e.MessageChannel;
1960
+ var String$1 = global$e.String;
1961
+ var counter = 0;
1962
+ var queue$2 = {};
1963
+ var ONREADYSTATECHANGE = 'onreadystatechange';
1964
+ var $location, defer, channel, port;
1918
1965
 
1919
- WrappedError.prototype = OriginalErrorPrototype;
1966
+ fails$c(function () {
1967
+ // Deno throws a ReferenceError on `location` access without `--location` flag
1968
+ $location = global$e.location;
1969
+ });
1920
1970
 
1921
- if (ERROR_NAME !== 'Error') {
1922
- if (setPrototypeOf$1) setPrototypeOf$1(WrappedError, BaseError);
1923
- else copyConstructorProperties(WrappedError, BaseError, { name: true });
1924
- } else if (DESCRIPTORS$a && STACK_TRACE_LIMIT in OriginalError) {
1925
- proxyAccessor$1(WrappedError, OriginalError, STACK_TRACE_LIMIT);
1926
- proxyAccessor$1(WrappedError, OriginalError, 'prepareStackTrace');
1971
+ var run = function (id) {
1972
+ if (hasOwn$6(queue$2, id)) {
1973
+ var fn = queue$2[id];
1974
+ delete queue$2[id];
1975
+ fn();
1927
1976
  }
1977
+ };
1928
1978
 
1929
- copyConstructorProperties(WrappedError, OriginalError);
1979
+ var runner = function (id) {
1980
+ return function () {
1981
+ run(id);
1982
+ };
1983
+ };
1930
1984
 
1931
- try {
1932
- // Safari 13- bug: WebAssembly errors does not have a proper `.name`
1933
- if (OriginalErrorPrototype.name !== ERROR_NAME) {
1934
- createNonEnumerableProperty$3(OriginalErrorPrototype, 'name', ERROR_NAME);
1935
- }
1936
- OriginalErrorPrototype.constructor = WrappedError;
1937
- } catch (error) { /* empty */ }
1985
+ var eventListener = function (event) {
1986
+ run(event.data);
1987
+ };
1938
1988
 
1939
- return WrappedError;
1989
+ var globalPostMessageDefer = function (id) {
1990
+ // old engines have not location.origin
1991
+ global$e.postMessage(String$1(id), $location.protocol + '//' + $location.host);
1940
1992
  };
1941
1993
 
1942
- /* eslint-disable no-unused-vars -- required for functions `.length` */
1943
- var $$j = _export;
1944
- var global$f = global$q;
1945
- var apply$2 = functionApply;
1946
- var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
1994
+ // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
1995
+ if (!set || !clear) {
1996
+ set = function setImmediate(handler) {
1997
+ validateArgumentsLength$4(arguments.length, 1);
1998
+ var fn = isCallable$b(handler) ? handler : Function$1(handler);
1999
+ var args = arraySlice$3(arguments, 1);
2000
+ queue$2[++counter] = function () {
2001
+ apply$2(fn, undefined, args);
2002
+ };
2003
+ defer(counter);
2004
+ return counter;
2005
+ };
2006
+ clear = function clearImmediate(id) {
2007
+ delete queue$2[id];
2008
+ };
2009
+ // Node.js 0.8-
2010
+ if (IS_NODE$3) {
2011
+ defer = function (id) {
2012
+ process$2.nextTick(runner(id));
2013
+ };
2014
+ // Sphere (JS game engine) Dispatch API
2015
+ } else if (Dispatch && Dispatch.now) {
2016
+ defer = function (id) {
2017
+ Dispatch.now(runner(id));
2018
+ };
2019
+ // Browsers with MessageChannel, includes WebWorkers
2020
+ // except iOS - https://github.com/zloirock/core-js/issues/624
2021
+ } else if (MessageChannel && !IS_IOS$1) {
2022
+ channel = new MessageChannel();
2023
+ port = channel.port2;
2024
+ channel.port1.onmessage = eventListener;
2025
+ defer = bind$6(port.postMessage, port);
2026
+ // Browsers with postMessage, skip WebWorkers
2027
+ // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
2028
+ } else if (
2029
+ global$e.addEventListener &&
2030
+ isCallable$b(global$e.postMessage) &&
2031
+ !global$e.importScripts &&
2032
+ $location && $location.protocol !== 'file:' &&
2033
+ !fails$c(globalPostMessageDefer)
2034
+ ) {
2035
+ defer = globalPostMessageDefer;
2036
+ global$e.addEventListener('message', eventListener, false);
2037
+ // IE8-
2038
+ } else if (ONREADYSTATECHANGE in createElement('script')) {
2039
+ defer = function (id) {
2040
+ html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
2041
+ html.removeChild(this);
2042
+ run(id);
2043
+ };
2044
+ };
2045
+ // Rest old browsers
2046
+ } else {
2047
+ defer = function (id) {
2048
+ setTimeout(runner(id), 0);
2049
+ };
2050
+ }
2051
+ }
1947
2052
 
1948
- var WEB_ASSEMBLY = 'WebAssembly';
1949
- var WebAssembly = global$f[WEB_ASSEMBLY];
2053
+ var task$1 = {
2054
+ set: set,
2055
+ clear: clear
2056
+ };
1950
2057
 
1951
- // eslint-disable-next-line es/no-error-cause -- feature detection
1952
- var FORCED$1 = new Error('e', { cause: 7 }).cause !== 7;
2058
+ var global$d = global$q;
2059
+ var DESCRIPTORS$9 = descriptors;
1953
2060
 
1954
- var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
1955
- var O = {};
1956
- O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$1);
1957
- $$j({ global: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
2061
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
2062
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2063
+
2064
+ // Avoid NodeJS experimental warning
2065
+ var safeGetBuiltIn$2 = function (name) {
2066
+ if (!DESCRIPTORS$9) return global$d[name];
2067
+ var descriptor = getOwnPropertyDescriptor(global$d, name);
2068
+ return descriptor && descriptor.value;
1958
2069
  };
1959
2070
 
1960
- var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
1961
- if (WebAssembly && WebAssembly[ERROR_NAME]) {
1962
- var O = {};
1963
- O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$1);
1964
- $$j({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
2071
+ var Queue$2 = function () {
2072
+ this.head = null;
2073
+ this.tail = null;
2074
+ };
2075
+
2076
+ Queue$2.prototype = {
2077
+ add: function (item) {
2078
+ var entry = { item: item, next: null };
2079
+ var tail = this.tail;
2080
+ if (tail) tail.next = entry;
2081
+ else this.head = entry;
2082
+ this.tail = entry;
2083
+ },
2084
+ get: function () {
2085
+ var entry = this.head;
2086
+ if (entry) {
2087
+ var next = this.head = entry.next;
2088
+ if (next === null) this.tail = null;
2089
+ return entry.item;
2090
+ }
1965
2091
  }
1966
2092
  };
1967
2093
 
1968
- // https://tc39.es/ecma262/#sec-nativeerror
1969
- exportGlobalErrorCauseWrapper('Error', function (init) {
1970
- return function Error(message) { return apply$2(init, this, arguments); };
1971
- });
1972
- exportGlobalErrorCauseWrapper('EvalError', function (init) {
1973
- return function EvalError(message) { return apply$2(init, this, arguments); };
1974
- });
1975
- exportGlobalErrorCauseWrapper('RangeError', function (init) {
1976
- return function RangeError(message) { return apply$2(init, this, arguments); };
1977
- });
1978
- exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
1979
- return function ReferenceError(message) { return apply$2(init, this, arguments); };
1980
- });
1981
- exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
1982
- return function SyntaxError(message) { return apply$2(init, this, arguments); };
1983
- });
1984
- exportGlobalErrorCauseWrapper('TypeError', function (init) {
1985
- return function TypeError(message) { return apply$2(init, this, arguments); };
1986
- });
1987
- exportGlobalErrorCauseWrapper('URIError', function (init) {
1988
- return function URIError(message) { return apply$2(init, this, arguments); };
1989
- });
1990
- exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
1991
- return function CompileError(message) { return apply$2(init, this, arguments); };
1992
- });
1993
- exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
1994
- return function LinkError(message) { return apply$2(init, this, arguments); };
1995
- });
1996
- exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
1997
- return function RuntimeError(message) { return apply$2(init, this, arguments); };
1998
- });
2094
+ var queue$1 = Queue$2;
1999
2095
 
2000
- var uncurryThis$f = functionUncurryThis;
2096
+ var userAgent$1 = engineUserAgent;
2001
2097
 
2002
- var arraySlice$4 = uncurryThis$f([].slice);
2098
+ var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
2003
2099
 
2004
- var classof$8 = classofRaw$2;
2100
+ var userAgent = engineUserAgent;
2005
2101
 
2006
- // `IsArray` abstract operation
2007
- // https://tc39.es/ecma262/#sec-isarray
2008
- // eslint-disable-next-line es/no-array-isarray -- safe
2009
- var isArray$1 = Array.isArray || function isArray(argument) {
2010
- return classof$8(argument) === 'Array';
2011
- };
2102
+ var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
2012
2103
 
2013
- var uncurryThis$e = functionUncurryThis;
2014
- var isArray = isArray$1;
2015
- var isCallable$a = isCallable$q;
2016
- var classof$7 = classofRaw$2;
2017
- var toString$9 = toString$b;
2104
+ var global$c = global$q;
2105
+ var safeGetBuiltIn$1 = safeGetBuiltIn$2;
2106
+ var bind$5 = functionBindContext;
2107
+ var macrotask = task$1.set;
2108
+ var Queue$1 = queue$1;
2109
+ var IS_IOS = engineIsIos;
2110
+ var IS_IOS_PEBBLE = engineIsIosPebble;
2111
+ var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
2112
+ var IS_NODE$2 = engineIsNode;
2018
2113
 
2019
- var push$4 = uncurryThis$e([].push);
2114
+ var MutationObserver = global$c.MutationObserver || global$c.WebKitMutationObserver;
2115
+ var document$2 = global$c.document;
2116
+ var process$1 = global$c.process;
2117
+ var Promise$1 = global$c.Promise;
2118
+ var microtask$1 = safeGetBuiltIn$1('queueMicrotask');
2119
+ var notify$1, toggle, node, promise, then;
2020
2120
 
2021
- var getJsonReplacerFunction = function (replacer) {
2022
- if (isCallable$a(replacer)) return replacer;
2023
- if (!isArray(replacer)) return;
2024
- var rawLength = replacer.length;
2025
- var keys = [];
2026
- for (var i = 0; i < rawLength; i++) {
2027
- var element = replacer[i];
2028
- if (typeof element == 'string') push$4(keys, element);
2029
- else if (typeof element == 'number' || classof$7(element) === 'Number' || classof$7(element) === 'String') push$4(keys, toString$9(element));
2030
- }
2031
- var keysLength = keys.length;
2032
- var root = true;
2033
- return function (key, value) {
2034
- if (root) {
2035
- root = false;
2036
- return value;
2121
+ // modern engines have queueMicrotask method
2122
+ if (!microtask$1) {
2123
+ var queue = new Queue$1();
2124
+
2125
+ var flush = function () {
2126
+ var parent, fn;
2127
+ if (IS_NODE$2 && (parent = process$1.domain)) parent.exit();
2128
+ while (fn = queue.get()) try {
2129
+ fn();
2130
+ } catch (error) {
2131
+ if (queue.head) notify$1();
2132
+ throw error;
2037
2133
  }
2038
- if (isArray(this)) return value;
2039
- for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
2134
+ if (parent) parent.enter();
2040
2135
  };
2041
- };
2042
-
2043
- var $$i = _export;
2044
- var getBuiltIn$4 = getBuiltIn$9;
2045
- var apply$1 = functionApply;
2046
- var call$i = functionCall;
2047
- var uncurryThis$d = functionUncurryThis;
2048
- var fails$b = fails$o;
2049
- var isCallable$9 = isCallable$q;
2050
- var isSymbol = isSymbol$3;
2051
- var arraySlice$3 = arraySlice$4;
2052
- var getReplacerFunction = getJsonReplacerFunction;
2053
- var NATIVE_SYMBOL = symbolConstructorDetection;
2054
2136
 
2055
- var $String = String;
2056
- var $stringify = getBuiltIn$4('JSON', 'stringify');
2057
- var exec$5 = uncurryThis$d(/./.exec);
2058
- var charAt$6 = uncurryThis$d(''.charAt);
2059
- var charCodeAt$2 = uncurryThis$d(''.charCodeAt);
2060
- var replace$5 = uncurryThis$d(''.replace);
2061
- var numberToString$1 = uncurryThis$d(1.0.toString);
2137
+ // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
2138
+ // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
2139
+ if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
2140
+ toggle = true;
2141
+ node = document$2.createTextNode('');
2142
+ new MutationObserver(flush).observe(node, { characterData: true });
2143
+ notify$1 = function () {
2144
+ node.data = toggle = !toggle;
2145
+ };
2146
+ // environments with maybe non-completely correct, but existent Promise
2147
+ } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
2148
+ // Promise.resolve without an argument throws an error in LG WebOS 2
2149
+ promise = Promise$1.resolve(undefined);
2150
+ // workaround of WebKit ~ iOS Safari 10.1 bug
2151
+ promise.constructor = Promise$1;
2152
+ then = bind$5(promise.then, promise);
2153
+ notify$1 = function () {
2154
+ then(flush);
2155
+ };
2156
+ // Node.js without promises
2157
+ } else if (IS_NODE$2) {
2158
+ notify$1 = function () {
2159
+ process$1.nextTick(flush);
2160
+ };
2161
+ // for other environments - macrotask based on:
2162
+ // - setImmediate
2163
+ // - MessageChannel
2164
+ // - window.postMessage
2165
+ // - onreadystatechange
2166
+ // - setTimeout
2167
+ } else {
2168
+ // `webpack` dev server bug on IE global methods - use bind(fn, global)
2169
+ macrotask = bind$5(macrotask, global$c);
2170
+ notify$1 = function () {
2171
+ macrotask(flush);
2172
+ };
2173
+ }
2062
2174
 
2063
- var tester = /[\uD800-\uDFFF]/g;
2064
- var low = /^[\uD800-\uDBFF]$/;
2065
- var hi = /^[\uDC00-\uDFFF]$/;
2175
+ microtask$1 = function (fn) {
2176
+ if (!queue.head) notify$1();
2177
+ queue.add(fn);
2178
+ };
2179
+ }
2066
2180
 
2067
- var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$b(function () {
2068
- var symbol = getBuiltIn$4('Symbol')('stringify detection');
2069
- // MS Edge converts symbol values to JSON as {}
2070
- return $stringify([symbol]) !== '[null]'
2071
- // WebKit converts symbol values to JSON as null
2072
- || $stringify({ a: symbol }) !== '{}'
2073
- // V8 throws on boxed symbols
2074
- || $stringify(Object(symbol)) !== '{}';
2075
- });
2181
+ var microtask_1 = microtask$1;
2076
2182
 
2077
- // https://github.com/tc39/proposal-well-formed-stringify
2078
- var ILL_FORMED_UNICODE = fails$b(function () {
2079
- return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
2080
- || $stringify('\uDEAD') !== '"\\udead"';
2081
- });
2183
+ var hostReportErrors$1 = function (a, b) {
2184
+ try {
2185
+ // eslint-disable-next-line no-console -- safe
2186
+ arguments.length === 1 ? console.error(a) : console.error(a, b);
2187
+ } catch (error) { /* empty */ }
2188
+ };
2082
2189
 
2083
- var stringifyWithSymbolsFix = function (it, replacer) {
2084
- var args = arraySlice$3(arguments);
2085
- var $replacer = getReplacerFunction(replacer);
2086
- if (!isCallable$9($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
2087
- args[1] = function (key, value) {
2088
- // some old implementations (like WebKit) could pass numbers as keys
2089
- if (isCallable$9($replacer)) value = call$i($replacer, this, $String(key), value);
2090
- if (!isSymbol(value)) return value;
2091
- };
2092
- return apply$1($stringify, null, args);
2190
+ var perform$3 = function (exec) {
2191
+ try {
2192
+ return { error: false, value: exec() };
2193
+ } catch (error) {
2194
+ return { error: true, value: error };
2195
+ }
2093
2196
  };
2094
2197
 
2095
- var fixIllFormed = function (match, offset, string) {
2096
- var prev = charAt$6(string, offset - 1);
2097
- var next = charAt$6(string, offset + 1);
2098
- if ((exec$5(low, match) && !exec$5(hi, next)) || (exec$5(hi, match) && !exec$5(low, prev))) {
2099
- return '\\u' + numberToString$1(charCodeAt$2(match, 0), 16);
2100
- } return match;
2101
- };
2198
+ var global$b = global$q;
2102
2199
 
2103
- if ($stringify) {
2104
- // `JSON.stringify` method
2105
- // https://tc39.es/ecma262/#sec-json.stringify
2106
- $$i({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
2107
- // eslint-disable-next-line no-unused-vars -- required for `.length`
2108
- stringify: function stringify(it, replacer, space) {
2109
- var args = arraySlice$3(arguments);
2110
- var result = apply$1(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
2111
- return ILL_FORMED_UNICODE && typeof result == 'string' ? replace$5(result, tester, fixIllFormed) : result;
2112
- }
2113
- });
2114
- }
2200
+ var promiseNativeConstructor = global$b.Promise;
2115
2201
 
2116
- var global$e = global$q;
2117
- var classof$6 = classofRaw$2;
2202
+ /* global Deno -- Deno case */
2203
+ var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
2118
2204
 
2119
- var engineIsNode = classof$6(global$e.process) === 'process';
2205
+ var IS_DENO$1 = engineIsDeno;
2206
+ var IS_NODE$1 = engineIsNode;
2120
2207
 
2121
- var makeBuiltIn = makeBuiltInExports;
2122
- var defineProperty = objectDefineProperty;
2208
+ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
2209
+ && typeof window == 'object'
2210
+ && typeof document == 'object';
2123
2211
 
2124
- var defineBuiltInAccessor$6 = function (target, name, descriptor) {
2125
- if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
2126
- if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
2127
- return defineProperty.f(target, name, descriptor);
2212
+ var global$a = global$q;
2213
+ var NativePromiseConstructor$4 = promiseNativeConstructor;
2214
+ var isCallable$a = isCallable$r;
2215
+ var isForced$1 = isForced_1;
2216
+ var inspectSource = inspectSource$3;
2217
+ var wellKnownSymbol$b = wellKnownSymbol$m;
2218
+ var IS_BROWSER = engineIsBrowser;
2219
+ var IS_DENO = engineIsDeno;
2220
+ var V8_VERSION = engineV8Version;
2221
+
2222
+ NativePromiseConstructor$4 && NativePromiseConstructor$4.prototype;
2223
+ var SPECIES$1 = wellKnownSymbol$b('species');
2224
+ var SUBCLASSING = false;
2225
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$a(global$a.PromiseRejectionEvent);
2226
+
2227
+ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced$1('Promise', function () {
2228
+ var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$4);
2229
+ var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$4);
2230
+ // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
2231
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
2232
+ // We can't detect it synchronously, so just check versions
2233
+ if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
2234
+ // We can't use @@species feature detection in V8 since it causes
2235
+ // deoptimization and performance degradation
2236
+ // https://github.com/zloirock/core-js/issues/679
2237
+ if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
2238
+ // Detect correctness of subclassing with @@species support
2239
+ var promise = new NativePromiseConstructor$4(function (resolve) { resolve(1); });
2240
+ var FakePromise = function (exec) {
2241
+ exec(function () { /* empty */ }, function () { /* empty */ });
2242
+ };
2243
+ var constructor = promise.constructor = {};
2244
+ constructor[SPECIES$1] = FakePromise;
2245
+ SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
2246
+ if (!SUBCLASSING) return true;
2247
+ // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
2248
+ } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
2249
+ });
2250
+
2251
+ var promiseConstructorDetection = {
2252
+ CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
2253
+ REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
2254
+ SUBCLASSING: SUBCLASSING
2128
2255
  };
2129
2256
 
2130
- var getBuiltIn$3 = getBuiltIn$9;
2131
- var defineBuiltInAccessor$5 = defineBuiltInAccessor$6;
2132
- var wellKnownSymbol$d = wellKnownSymbol$m;
2133
- var DESCRIPTORS$9 = descriptors;
2257
+ var newPromiseCapability$2 = {};
2134
2258
 
2135
- var SPECIES$3 = wellKnownSymbol$d('species');
2259
+ var aCallable$8 = aCallable$c;
2136
2260
 
2137
- var setSpecies$2 = function (CONSTRUCTOR_NAME) {
2138
- var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
2261
+ var $TypeError$6 = TypeError;
2139
2262
 
2140
- if (DESCRIPTORS$9 && Constructor && !Constructor[SPECIES$3]) {
2141
- defineBuiltInAccessor$5(Constructor, SPECIES$3, {
2142
- configurable: true,
2143
- get: function () { return this; }
2144
- });
2145
- }
2263
+ var PromiseCapability = function (C) {
2264
+ var resolve, reject;
2265
+ this.promise = new C(function ($$resolve, $$reject) {
2266
+ if (resolve !== undefined || reject !== undefined) throw new $TypeError$6('Bad Promise constructor');
2267
+ resolve = $$resolve;
2268
+ reject = $$reject;
2269
+ });
2270
+ this.resolve = aCallable$8(resolve);
2271
+ this.reject = aCallable$8(reject);
2146
2272
  };
2147
2273
 
2148
- var isPrototypeOf$3 = objectIsPrototypeOf;
2274
+ // `NewPromiseCapability` abstract operation
2275
+ // https://tc39.es/ecma262/#sec-newpromisecapability
2276
+ newPromiseCapability$2.f = function (C) {
2277
+ return new PromiseCapability(C);
2278
+ };
2149
2279
 
2150
- var $TypeError$9 = TypeError;
2280
+ var $$k = _export;
2281
+ var IS_NODE = engineIsNode;
2282
+ var global$9 = global$q;
2283
+ var call$i = functionCall;
2284
+ var defineBuiltIn$a = defineBuiltIn$e;
2285
+ var setPrototypeOf$2 = objectSetPrototypeOf;
2286
+ var setToStringTag$2 = setToStringTag$6;
2287
+ var setSpecies$1 = setSpecies$2;
2288
+ var aCallable$7 = aCallable$c;
2289
+ var isCallable$9 = isCallable$r;
2290
+ var isObject$5 = isObject$e;
2291
+ var anInstance$3 = anInstance$4;
2292
+ var speciesConstructor$1 = speciesConstructor$2;
2293
+ var task = task$1.set;
2294
+ var microtask = microtask_1;
2295
+ var hostReportErrors = hostReportErrors$1;
2296
+ var perform$2 = perform$3;
2297
+ var Queue = queue$1;
2298
+ var InternalStateModule$4 = internalState;
2299
+ var NativePromiseConstructor$3 = promiseNativeConstructor;
2300
+ var PromiseConstructorDetection = promiseConstructorDetection;
2301
+ var newPromiseCapabilityModule$3 = newPromiseCapability$2;
2151
2302
 
2152
- var anInstance$4 = function (it, Prototype) {
2153
- if (isPrototypeOf$3(Prototype, it)) return it;
2154
- throw new $TypeError$9('Incorrect invocation');
2155
- };
2303
+ var PROMISE = 'Promise';
2304
+ var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
2305
+ var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
2306
+ var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
2307
+ var getInternalPromiseState = InternalStateModule$4.getterFor(PROMISE);
2308
+ var setInternalState$4 = InternalStateModule$4.set;
2309
+ var NativePromisePrototype$2 = NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
2310
+ var PromiseConstructor = NativePromiseConstructor$3;
2311
+ var PromisePrototype = NativePromisePrototype$2;
2312
+ var TypeError$3 = global$9.TypeError;
2313
+ var document$1 = global$9.document;
2314
+ var process = global$9.process;
2315
+ var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
2316
+ var newGenericPromiseCapability = newPromiseCapability$1;
2156
2317
 
2157
- var uncurryThis$c = functionUncurryThis;
2158
- var fails$a = fails$o;
2159
- var isCallable$8 = isCallable$q;
2160
- var classof$5 = classof$a;
2161
- var getBuiltIn$2 = getBuiltIn$9;
2162
- var inspectSource$1 = inspectSource$3;
2318
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$9.dispatchEvent);
2319
+ var UNHANDLED_REJECTION = 'unhandledrejection';
2320
+ var REJECTION_HANDLED = 'rejectionhandled';
2321
+ var PENDING = 0;
2322
+ var FULFILLED = 1;
2323
+ var REJECTED = 2;
2324
+ var HANDLED = 1;
2325
+ var UNHANDLED = 2;
2163
2326
 
2164
- var noop = function () { /* empty */ };
2165
- var construct = getBuiltIn$2('Reflect', 'construct');
2166
- var constructorRegExp = /^\s*(?:class|function)\b/;
2167
- var exec$4 = uncurryThis$c(constructorRegExp.exec);
2168
- var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
2327
+ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
2169
2328
 
2170
- var isConstructorModern = function isConstructor(argument) {
2171
- if (!isCallable$8(argument)) return false;
2172
- try {
2173
- construct(noop, [], argument);
2174
- return true;
2175
- } catch (error) {
2176
- return false;
2177
- }
2329
+ // helpers
2330
+ var isThenable = function (it) {
2331
+ var then;
2332
+ return isObject$5(it) && isCallable$9(then = it.then) ? then : false;
2178
2333
  };
2179
2334
 
2180
- var isConstructorLegacy = function isConstructor(argument) {
2181
- if (!isCallable$8(argument)) return false;
2182
- switch (classof$5(argument)) {
2183
- case 'AsyncFunction':
2184
- case 'GeneratorFunction':
2185
- case 'AsyncGeneratorFunction': return false;
2186
- }
2335
+ var callReaction = function (reaction, state) {
2336
+ var value = state.value;
2337
+ var ok = state.state === FULFILLED;
2338
+ var handler = ok ? reaction.ok : reaction.fail;
2339
+ var resolve = reaction.resolve;
2340
+ var reject = reaction.reject;
2341
+ var domain = reaction.domain;
2342
+ var result, then, exited;
2187
2343
  try {
2188
- // we can't check .prototype since constructors produced by .bind haven't it
2189
- // `Function#toString` throws on some built-it function in some legacy engines
2190
- // (for example, `DOMQuad` and similar in FF41-)
2191
- return INCORRECT_TO_STRING || !!exec$4(constructorRegExp, inspectSource$1(argument));
2344
+ if (handler) {
2345
+ if (!ok) {
2346
+ if (state.rejection === UNHANDLED) onHandleUnhandled(state);
2347
+ state.rejection = HANDLED;
2348
+ }
2349
+ if (handler === true) result = value;
2350
+ else {
2351
+ if (domain) domain.enter();
2352
+ result = handler(value); // can throw
2353
+ if (domain) {
2354
+ domain.exit();
2355
+ exited = true;
2356
+ }
2357
+ }
2358
+ if (result === reaction.promise) {
2359
+ reject(new TypeError$3('Promise-chain cycle'));
2360
+ } else if (then = isThenable(result)) {
2361
+ call$i(then, result, resolve, reject);
2362
+ } else resolve(result);
2363
+ } else reject(value);
2192
2364
  } catch (error) {
2193
- return true;
2365
+ if (domain && !exited) domain.exit();
2366
+ reject(error);
2194
2367
  }
2195
2368
  };
2196
2369
 
2197
- isConstructorLegacy.sham = true;
2370
+ var notify = function (state, isReject) {
2371
+ if (state.notified) return;
2372
+ state.notified = true;
2373
+ microtask(function () {
2374
+ var reactions = state.reactions;
2375
+ var reaction;
2376
+ while (reaction = reactions.get()) {
2377
+ callReaction(reaction, state);
2378
+ }
2379
+ state.notified = false;
2380
+ if (isReject && !state.rejection) onUnhandled(state);
2381
+ });
2382
+ };
2198
2383
 
2199
- // `IsConstructor` abstract operation
2200
- // https://tc39.es/ecma262/#sec-isconstructor
2201
- var isConstructor$2 = !construct || fails$a(function () {
2202
- var called;
2203
- return isConstructorModern(isConstructorModern.call)
2204
- || !isConstructorModern(Object)
2205
- || !isConstructorModern(function () { called = true; })
2206
- || called;
2207
- }) ? isConstructorLegacy : isConstructorModern;
2384
+ var dispatchEvent = function (name, promise, reason) {
2385
+ var event, handler;
2386
+ if (DISPATCH_EVENT) {
2387
+ event = document$1.createEvent('Event');
2388
+ event.promise = promise;
2389
+ event.reason = reason;
2390
+ event.initEvent(name, false, true);
2391
+ global$9.dispatchEvent(event);
2392
+ } else event = { promise: promise, reason: reason };
2393
+ if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$9['on' + name])) handler(event);
2394
+ else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
2395
+ };
2208
2396
 
2209
- var isConstructor$1 = isConstructor$2;
2210
- var tryToString$2 = tryToString$4;
2397
+ var onUnhandled = function (state) {
2398
+ call$i(task, global$9, function () {
2399
+ var promise = state.facade;
2400
+ var value = state.value;
2401
+ var IS_UNHANDLED = isUnhandled(state);
2402
+ var result;
2403
+ if (IS_UNHANDLED) {
2404
+ result = perform$2(function () {
2405
+ if (IS_NODE) {
2406
+ process.emit('unhandledRejection', value, promise);
2407
+ } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
2408
+ });
2409
+ // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
2410
+ state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
2411
+ if (result.error) throw result.value;
2412
+ }
2413
+ });
2414
+ };
2211
2415
 
2212
- var $TypeError$8 = TypeError;
2416
+ var isUnhandled = function (state) {
2417
+ return state.rejection !== HANDLED && !state.parent;
2418
+ };
2213
2419
 
2214
- // `Assert: IsConstructor(argument) is true`
2215
- var aConstructor$1 = function (argument) {
2216
- if (isConstructor$1(argument)) return argument;
2217
- throw new $TypeError$8(tryToString$2(argument) + ' is not a constructor');
2420
+ var onHandleUnhandled = function (state) {
2421
+ call$i(task, global$9, function () {
2422
+ var promise = state.facade;
2423
+ if (IS_NODE) {
2424
+ process.emit('rejectionHandled', promise);
2425
+ } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
2426
+ });
2218
2427
  };
2219
2428
 
2220
- var anObject$g = anObject$l;
2221
- var aConstructor = aConstructor$1;
2222
- var isNullOrUndefined$2 = isNullOrUndefined$5;
2223
- var wellKnownSymbol$c = wellKnownSymbol$m;
2429
+ var bind$4 = function (fn, state, unwrap) {
2430
+ return function (value) {
2431
+ fn(state, value, unwrap);
2432
+ };
2433
+ };
2224
2434
 
2225
- var SPECIES$2 = wellKnownSymbol$c('species');
2226
-
2227
- // `SpeciesConstructor` abstract operation
2228
- // https://tc39.es/ecma262/#sec-speciesconstructor
2229
- var speciesConstructor$1 = function (O, defaultConstructor) {
2230
- var C = anObject$g(O).constructor;
2231
- var S;
2232
- return C === undefined || isNullOrUndefined$2(S = anObject$g(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
2435
+ var internalReject = function (state, value, unwrap) {
2436
+ if (state.done) return;
2437
+ state.done = true;
2438
+ if (unwrap) state = unwrap;
2439
+ state.value = value;
2440
+ state.state = REJECTED;
2441
+ notify(state, true);
2233
2442
  };
2234
2443
 
2235
- var classofRaw = classofRaw$2;
2236
- var uncurryThis$b = functionUncurryThis;
2237
-
2238
- var functionUncurryThisClause = function (fn) {
2239
- // Nashorn bug:
2240
- // https://github.com/zloirock/core-js/issues/1128
2241
- // https://github.com/zloirock/core-js/issues/1130
2242
- if (classofRaw(fn) === 'Function') return uncurryThis$b(fn);
2444
+ var internalResolve = function (state, value, unwrap) {
2445
+ if (state.done) return;
2446
+ state.done = true;
2447
+ if (unwrap) state = unwrap;
2448
+ try {
2449
+ if (state.facade === value) throw new TypeError$3("Promise can't be resolved itself");
2450
+ var then = isThenable(value);
2451
+ if (then) {
2452
+ microtask(function () {
2453
+ var wrapper = { done: false };
2454
+ try {
2455
+ call$i(then, value,
2456
+ bind$4(internalResolve, wrapper, state),
2457
+ bind$4(internalReject, wrapper, state)
2458
+ );
2459
+ } catch (error) {
2460
+ internalReject(wrapper, error, state);
2461
+ }
2462
+ });
2463
+ } else {
2464
+ state.value = value;
2465
+ state.state = FULFILLED;
2466
+ notify(state, false);
2467
+ }
2468
+ } catch (error) {
2469
+ internalReject({ done: false }, error, state);
2470
+ }
2243
2471
  };
2244
2472
 
2245
- var uncurryThis$a = functionUncurryThisClause;
2246
- var aCallable$9 = aCallable$c;
2247
- var NATIVE_BIND = functionBindNative;
2473
+ // constructor polyfill
2474
+ if (FORCED_PROMISE_CONSTRUCTOR$4) {
2475
+ // 25.4.3.1 Promise(executor)
2476
+ PromiseConstructor = function Promise(executor) {
2477
+ anInstance$3(this, PromisePrototype);
2478
+ aCallable$7(executor);
2479
+ call$i(Internal, this);
2480
+ var state = getInternalPromiseState(this);
2481
+ try {
2482
+ executor(bind$4(internalResolve, state), bind$4(internalReject, state));
2483
+ } catch (error) {
2484
+ internalReject(state, error);
2485
+ }
2486
+ };
2248
2487
 
2249
- var bind$7 = uncurryThis$a(uncurryThis$a.bind);
2488
+ PromisePrototype = PromiseConstructor.prototype;
2250
2489
 
2251
- // optional / simple context binding
2252
- var functionBindContext = function (fn, that) {
2253
- aCallable$9(fn);
2254
- return that === undefined ? fn : NATIVE_BIND ? bind$7(fn, that) : function (/* ...args */) {
2255
- return fn.apply(that, arguments);
2490
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
2491
+ Internal = function Promise(executor) {
2492
+ setInternalState$4(this, {
2493
+ type: PROMISE,
2494
+ done: false,
2495
+ notified: false,
2496
+ parent: false,
2497
+ reactions: new Queue(),
2498
+ rejection: false,
2499
+ state: PENDING,
2500
+ value: undefined
2501
+ });
2256
2502
  };
2257
- };
2258
2503
 
2259
- var $TypeError$7 = TypeError;
2504
+ // `Promise.prototype.then` method
2505
+ // https://tc39.es/ecma262/#sec-promise.prototype.then
2506
+ Internal.prototype = defineBuiltIn$a(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
2507
+ var state = getInternalPromiseState(this);
2508
+ var reaction = newPromiseCapability$1(speciesConstructor$1(this, PromiseConstructor));
2509
+ state.parent = true;
2510
+ reaction.ok = isCallable$9(onFulfilled) ? onFulfilled : true;
2511
+ reaction.fail = isCallable$9(onRejected) && onRejected;
2512
+ reaction.domain = IS_NODE ? process.domain : undefined;
2513
+ if (state.state === PENDING) state.reactions.add(reaction);
2514
+ else microtask(function () {
2515
+ callReaction(reaction, state);
2516
+ });
2517
+ return reaction.promise;
2518
+ });
2260
2519
 
2261
- var validateArgumentsLength$5 = function (passed, required) {
2262
- if (passed < required) throw new $TypeError$7('Not enough arguments');
2263
- return passed;
2264
- };
2520
+ OwnPromiseCapability = function () {
2521
+ var promise = new Internal();
2522
+ var state = getInternalPromiseState(promise);
2523
+ this.promise = promise;
2524
+ this.resolve = bind$4(internalResolve, state);
2525
+ this.reject = bind$4(internalReject, state);
2526
+ };
2265
2527
 
2266
- var userAgent$2 = engineUserAgent;
2528
+ newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
2529
+ return C === PromiseConstructor || C === PromiseWrapper
2530
+ ? new OwnPromiseCapability(C)
2531
+ : newGenericPromiseCapability(C);
2532
+ };
2267
2533
 
2268
- // eslint-disable-next-line redos/no-vulnerable -- safe
2269
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
2534
+ if (isCallable$9(NativePromiseConstructor$3) && NativePromisePrototype$2 !== Object.prototype) {
2535
+ nativeThen = NativePromisePrototype$2.then;
2270
2536
 
2271
- var global$d = global$q;
2272
- var apply = functionApply;
2273
- var bind$6 = functionBindContext;
2274
- var isCallable$7 = isCallable$q;
2275
- var hasOwn$5 = hasOwnProperty_1;
2276
- var fails$9 = fails$o;
2277
- var html = html$2;
2278
- var arraySlice$2 = arraySlice$4;
2279
- var createElement = documentCreateElement$2;
2280
- var validateArgumentsLength$4 = validateArgumentsLength$5;
2281
- var IS_IOS$1 = engineIsIos;
2282
- var IS_NODE$3 = engineIsNode;
2537
+ if (!NATIVE_PROMISE_SUBCLASSING) {
2538
+ // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
2539
+ defineBuiltIn$a(NativePromisePrototype$2, 'then', function then(onFulfilled, onRejected) {
2540
+ var that = this;
2541
+ return new PromiseConstructor(function (resolve, reject) {
2542
+ call$i(nativeThen, that, resolve, reject);
2543
+ }).then(onFulfilled, onRejected);
2544
+ // https://github.com/zloirock/core-js/issues/640
2545
+ }, { unsafe: true });
2546
+ }
2283
2547
 
2284
- var set = global$d.setImmediate;
2285
- var clear = global$d.clearImmediate;
2286
- var process$2 = global$d.process;
2287
- var Dispatch = global$d.Dispatch;
2288
- var Function$1 = global$d.Function;
2289
- var MessageChannel = global$d.MessageChannel;
2290
- var String$1 = global$d.String;
2291
- var counter = 0;
2292
- var queue$2 = {};
2293
- var ONREADYSTATECHANGE = 'onreadystatechange';
2294
- var $location, defer, channel, port;
2548
+ // make `.constructor === Promise` work for native promise-based APIs
2549
+ try {
2550
+ delete NativePromisePrototype$2.constructor;
2551
+ } catch (error) { /* empty */ }
2295
2552
 
2296
- fails$9(function () {
2297
- // Deno throws a ReferenceError on `location` access without `--location` flag
2298
- $location = global$d.location;
2553
+ // make `instanceof Promise` work for native promise-based APIs
2554
+ if (setPrototypeOf$2) {
2555
+ setPrototypeOf$2(NativePromisePrototype$2, PromisePrototype);
2556
+ }
2557
+ }
2558
+ }
2559
+
2560
+ $$k({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
2561
+ Promise: PromiseConstructor
2299
2562
  });
2300
2563
 
2301
- var run = function (id) {
2302
- if (hasOwn$5(queue$2, id)) {
2303
- var fn = queue$2[id];
2304
- delete queue$2[id];
2305
- fn();
2306
- }
2307
- };
2564
+ setToStringTag$2(PromiseConstructor, PROMISE, false);
2565
+ setSpecies$1(PROMISE);
2308
2566
 
2309
- var runner = function (id) {
2310
- return function () {
2311
- run(id);
2312
- };
2313
- };
2567
+ var wellKnownSymbol$a = wellKnownSymbol$m;
2568
+ var Iterators$1 = iterators;
2314
2569
 
2315
- var eventListener = function (event) {
2316
- run(event.data);
2317
- };
2570
+ var ITERATOR$5 = wellKnownSymbol$a('iterator');
2571
+ var ArrayPrototype = Array.prototype;
2318
2572
 
2319
- var globalPostMessageDefer = function (id) {
2320
- // old engines have not location.origin
2321
- global$d.postMessage(String$1(id), $location.protocol + '//' + $location.host);
2573
+ // check on default Array iterator
2574
+ var isArrayIteratorMethod$2 = function (it) {
2575
+ return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$5] === it);
2322
2576
  };
2323
2577
 
2324
- // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
2325
- if (!set || !clear) {
2326
- set = function setImmediate(handler) {
2327
- validateArgumentsLength$4(arguments.length, 1);
2328
- var fn = isCallable$7(handler) ? handler : Function$1(handler);
2329
- var args = arraySlice$2(arguments, 1);
2330
- queue$2[++counter] = function () {
2331
- apply(fn, undefined, args);
2332
- };
2333
- defer(counter);
2334
- return counter;
2335
- };
2336
- clear = function clearImmediate(id) {
2337
- delete queue$2[id];
2338
- };
2339
- // Node.js 0.8-
2340
- if (IS_NODE$3) {
2341
- defer = function (id) {
2342
- process$2.nextTick(runner(id));
2343
- };
2344
- // Sphere (JS game engine) Dispatch API
2345
- } else if (Dispatch && Dispatch.now) {
2346
- defer = function (id) {
2347
- Dispatch.now(runner(id));
2348
- };
2349
- // Browsers with MessageChannel, includes WebWorkers
2350
- // except iOS - https://github.com/zloirock/core-js/issues/624
2351
- } else if (MessageChannel && !IS_IOS$1) {
2352
- channel = new MessageChannel();
2353
- port = channel.port2;
2354
- channel.port1.onmessage = eventListener;
2355
- defer = bind$6(port.postMessage, port);
2356
- // Browsers with postMessage, skip WebWorkers
2357
- // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
2358
- } else if (
2359
- global$d.addEventListener &&
2360
- isCallable$7(global$d.postMessage) &&
2361
- !global$d.importScripts &&
2362
- $location && $location.protocol !== 'file:' &&
2363
- !fails$9(globalPostMessageDefer)
2364
- ) {
2365
- defer = globalPostMessageDefer;
2366
- global$d.addEventListener('message', eventListener, false);
2367
- // IE8-
2368
- } else if (ONREADYSTATECHANGE in createElement('script')) {
2369
- defer = function (id) {
2370
- html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
2371
- html.removeChild(this);
2372
- run(id);
2373
- };
2374
- };
2375
- // Rest old browsers
2376
- } else {
2377
- defer = function (id) {
2378
- setTimeout(runner(id), 0);
2379
- };
2380
- }
2381
- }
2578
+ var classof$7 = classof$9;
2579
+ var getMethod$3 = getMethod$5;
2580
+ var isNullOrUndefined$1 = isNullOrUndefined$5;
2581
+ var Iterators = iterators;
2582
+ var wellKnownSymbol$9 = wellKnownSymbol$m;
2382
2583
 
2383
- var task$1 = {
2384
- set: set,
2385
- clear: clear
2584
+ var ITERATOR$4 = wellKnownSymbol$9('iterator');
2585
+
2586
+ var getIteratorMethod$4 = function (it) {
2587
+ if (!isNullOrUndefined$1(it)) return getMethod$3(it, ITERATOR$4)
2588
+ || getMethod$3(it, '@@iterator')
2589
+ || Iterators[classof$7(it)];
2386
2590
  };
2387
2591
 
2388
- var global$c = global$q;
2389
- var DESCRIPTORS$8 = descriptors;
2592
+ var call$h = functionCall;
2593
+ var aCallable$6 = aCallable$c;
2594
+ var anObject$f = anObject$l;
2595
+ var tryToString$1 = tryToString$4;
2596
+ var getIteratorMethod$3 = getIteratorMethod$4;
2390
2597
 
2391
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
2392
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2598
+ var $TypeError$5 = TypeError;
2393
2599
 
2394
- // Avoid NodeJS experimental warning
2395
- var safeGetBuiltIn$2 = function (name) {
2396
- if (!DESCRIPTORS$8) return global$c[name];
2397
- var descriptor = getOwnPropertyDescriptor(global$c, name);
2398
- return descriptor && descriptor.value;
2600
+ var getIterator$3 = function (argument, usingIterator) {
2601
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$3(argument) : usingIterator;
2602
+ if (aCallable$6(iteratorMethod)) return anObject$f(call$h(iteratorMethod, argument));
2603
+ throw new $TypeError$5(tryToString$1(argument) + ' is not iterable');
2399
2604
  };
2400
2605
 
2401
- var Queue$2 = function () {
2402
- this.head = null;
2403
- this.tail = null;
2404
- };
2606
+ var call$g = functionCall;
2607
+ var anObject$e = anObject$l;
2608
+ var getMethod$2 = getMethod$5;
2405
2609
 
2406
- Queue$2.prototype = {
2407
- add: function (item) {
2408
- var entry = { item: item, next: null };
2409
- var tail = this.tail;
2410
- if (tail) tail.next = entry;
2411
- else this.head = entry;
2412
- this.tail = entry;
2413
- },
2414
- get: function () {
2415
- var entry = this.head;
2416
- if (entry) {
2417
- var next = this.head = entry.next;
2418
- if (next === null) this.tail = null;
2419
- return entry.item;
2610
+ var iteratorClose$3 = function (iterator, kind, value) {
2611
+ var innerResult, innerError;
2612
+ anObject$e(iterator);
2613
+ try {
2614
+ innerResult = getMethod$2(iterator, 'return');
2615
+ if (!innerResult) {
2616
+ if (kind === 'throw') throw value;
2617
+ return value;
2420
2618
  }
2619
+ innerResult = call$g(innerResult, iterator);
2620
+ } catch (error) {
2621
+ innerError = true;
2622
+ innerResult = error;
2421
2623
  }
2624
+ if (kind === 'throw') throw value;
2625
+ if (innerError) throw innerResult;
2626
+ anObject$e(innerResult);
2627
+ return value;
2422
2628
  };
2423
2629
 
2424
- var queue$1 = Queue$2;
2630
+ var bind$3 = functionBindContext;
2631
+ var call$f = functionCall;
2632
+ var anObject$d = anObject$l;
2633
+ var tryToString = tryToString$4;
2634
+ var isArrayIteratorMethod$1 = isArrayIteratorMethod$2;
2635
+ var lengthOfArrayLike$1 = lengthOfArrayLike$3;
2636
+ var isPrototypeOf$3 = objectIsPrototypeOf;
2637
+ var getIterator$2 = getIterator$3;
2638
+ var getIteratorMethod$2 = getIteratorMethod$4;
2639
+ var iteratorClose$2 = iteratorClose$3;
2425
2640
 
2426
- var userAgent$1 = engineUserAgent;
2641
+ var $TypeError$4 = TypeError;
2427
2642
 
2428
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
2643
+ var Result = function (stopped, result) {
2644
+ this.stopped = stopped;
2645
+ this.result = result;
2646
+ };
2429
2647
 
2430
- var userAgent = engineUserAgent;
2648
+ var ResultPrototype = Result.prototype;
2431
2649
 
2432
- var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
2650
+ var iterate$4 = function (iterable, unboundFunction, options) {
2651
+ var that = options && options.that;
2652
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
2653
+ var IS_RECORD = !!(options && options.IS_RECORD);
2654
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
2655
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
2656
+ var fn = bind$3(unboundFunction, that);
2657
+ var iterator, iterFn, index, length, result, next, step;
2433
2658
 
2434
- var global$b = global$q;
2435
- var safeGetBuiltIn$1 = safeGetBuiltIn$2;
2436
- var bind$5 = functionBindContext;
2437
- var macrotask = task$1.set;
2438
- var Queue$1 = queue$1;
2439
- var IS_IOS = engineIsIos;
2440
- var IS_IOS_PEBBLE = engineIsIosPebble;
2441
- var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
2442
- var IS_NODE$2 = engineIsNode;
2659
+ var stop = function (condition) {
2660
+ if (iterator) iteratorClose$2(iterator, 'normal', condition);
2661
+ return new Result(true, condition);
2662
+ };
2443
2663
 
2444
- var MutationObserver = global$b.MutationObserver || global$b.WebKitMutationObserver;
2445
- var document$2 = global$b.document;
2446
- var process$1 = global$b.process;
2447
- var Promise$1 = global$b.Promise;
2448
- var microtask$1 = safeGetBuiltIn$1('queueMicrotask');
2449
- var notify$1, toggle, node, promise, then;
2664
+ var callFn = function (value) {
2665
+ if (AS_ENTRIES) {
2666
+ anObject$d(value);
2667
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
2668
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
2669
+ };
2450
2670
 
2451
- // modern engines have queueMicrotask method
2452
- if (!microtask$1) {
2453
- var queue = new Queue$1();
2671
+ if (IS_RECORD) {
2672
+ iterator = iterable.iterator;
2673
+ } else if (IS_ITERATOR) {
2674
+ iterator = iterable;
2675
+ } else {
2676
+ iterFn = getIteratorMethod$2(iterable);
2677
+ if (!iterFn) throw new $TypeError$4(tryToString(iterable) + ' is not iterable');
2678
+ // optimisation for array iterators
2679
+ if (isArrayIteratorMethod$1(iterFn)) {
2680
+ for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
2681
+ result = callFn(iterable[index]);
2682
+ if (result && isPrototypeOf$3(ResultPrototype, result)) return result;
2683
+ } return new Result(false);
2684
+ }
2685
+ iterator = getIterator$2(iterable, iterFn);
2686
+ }
2454
2687
 
2455
- var flush = function () {
2456
- var parent, fn;
2457
- if (IS_NODE$2 && (parent = process$1.domain)) parent.exit();
2458
- while (fn = queue.get()) try {
2459
- fn();
2688
+ next = IS_RECORD ? iterable.next : iterator.next;
2689
+ while (!(step = call$f(next, iterator)).done) {
2690
+ try {
2691
+ result = callFn(step.value);
2460
2692
  } catch (error) {
2461
- if (queue.head) notify$1();
2462
- throw error;
2693
+ iteratorClose$2(iterator, 'throw', error);
2463
2694
  }
2464
- if (parent) parent.enter();
2465
- };
2695
+ if (typeof result == 'object' && result && isPrototypeOf$3(ResultPrototype, result)) return result;
2696
+ } return new Result(false);
2697
+ };
2466
2698
 
2467
- // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
2468
- // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
2469
- if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
2470
- toggle = true;
2471
- node = document$2.createTextNode('');
2472
- new MutationObserver(flush).observe(node, { characterData: true });
2473
- notify$1 = function () {
2474
- node.data = toggle = !toggle;
2475
- };
2476
- // environments with maybe non-completely correct, but existent Promise
2477
- } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
2478
- // Promise.resolve without an argument throws an error in LG WebOS 2
2479
- promise = Promise$1.resolve(undefined);
2480
- // workaround of WebKit ~ iOS Safari 10.1 bug
2481
- promise.constructor = Promise$1;
2482
- then = bind$5(promise.then, promise);
2483
- notify$1 = function () {
2484
- then(flush);
2485
- };
2486
- // Node.js without promises
2487
- } else if (IS_NODE$2) {
2488
- notify$1 = function () {
2489
- process$1.nextTick(flush);
2490
- };
2491
- // for other environments - macrotask based on:
2492
- // - setImmediate
2493
- // - MessageChannel
2494
- // - window.postMessage
2495
- // - onreadystatechange
2496
- // - setTimeout
2497
- } else {
2498
- // `webpack` dev server bug on IE global methods - use bind(fn, global)
2499
- macrotask = bind$5(macrotask, global$b);
2500
- notify$1 = function () {
2501
- macrotask(flush);
2502
- };
2503
- }
2699
+ var wellKnownSymbol$8 = wellKnownSymbol$m;
2504
2700
 
2505
- microtask$1 = function (fn) {
2506
- if (!queue.head) notify$1();
2507
- queue.add(fn);
2508
- };
2509
- }
2701
+ var ITERATOR$3 = wellKnownSymbol$8('iterator');
2702
+ var SAFE_CLOSING = false;
2510
2703
 
2511
- var microtask_1 = microtask$1;
2704
+ try {
2705
+ var called = 0;
2706
+ var iteratorWithReturn = {
2707
+ next: function () {
2708
+ return { done: !!called++ };
2709
+ },
2710
+ 'return': function () {
2711
+ SAFE_CLOSING = true;
2712
+ }
2713
+ };
2714
+ iteratorWithReturn[ITERATOR$3] = function () {
2715
+ return this;
2716
+ };
2717
+ // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
2718
+ Array.from(iteratorWithReturn, function () { throw 2; });
2719
+ } catch (error) { /* empty */ }
2512
2720
 
2513
- var hostReportErrors$1 = function (a, b) {
2721
+ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
2514
2722
  try {
2515
- // eslint-disable-next-line no-console -- safe
2516
- arguments.length === 1 ? console.error(a) : console.error(a, b);
2517
- } catch (error) { /* empty */ }
2518
- };
2519
-
2520
- var perform$3 = function (exec) {
2723
+ if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
2724
+ } catch (error) { return false; } // workaround of old WebKit + `eval` bug
2725
+ var ITERATION_SUPPORT = false;
2521
2726
  try {
2522
- return { error: false, value: exec() };
2523
- } catch (error) {
2524
- return { error: true, value: error };
2525
- }
2727
+ var object = {};
2728
+ object[ITERATOR$3] = function () {
2729
+ return {
2730
+ next: function () {
2731
+ return { done: ITERATION_SUPPORT = true };
2732
+ }
2733
+ };
2734
+ };
2735
+ exec(object);
2736
+ } catch (error) { /* empty */ }
2737
+ return ITERATION_SUPPORT;
2526
2738
  };
2527
2739
 
2528
- var global$a = global$q;
2740
+ var NativePromiseConstructor$2 = promiseNativeConstructor;
2741
+ var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
2742
+ var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
2529
2743
 
2530
- var promiseNativeConstructor = global$a.Promise;
2744
+ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
2745
+ NativePromiseConstructor$2.all(iterable).then(undefined, function () { /* empty */ });
2746
+ });
2531
2747
 
2532
- /* global Deno -- Deno case */
2533
- var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
2748
+ var $$j = _export;
2749
+ var call$e = functionCall;
2750
+ var aCallable$5 = aCallable$c;
2751
+ var newPromiseCapabilityModule$2 = newPromiseCapability$2;
2752
+ var perform$1 = perform$3;
2753
+ var iterate$3 = iterate$4;
2754
+ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
2534
2755
 
2535
- var IS_DENO$1 = engineIsDeno;
2536
- var IS_NODE$1 = engineIsNode;
2756
+ // `Promise.all` method
2757
+ // https://tc39.es/ecma262/#sec-promise.all
2758
+ $$j({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
2759
+ all: function all(iterable) {
2760
+ var C = this;
2761
+ var capability = newPromiseCapabilityModule$2.f(C);
2762
+ var resolve = capability.resolve;
2763
+ var reject = capability.reject;
2764
+ var result = perform$1(function () {
2765
+ var $promiseResolve = aCallable$5(C.resolve);
2766
+ var values = [];
2767
+ var counter = 0;
2768
+ var remaining = 1;
2769
+ iterate$3(iterable, function (promise) {
2770
+ var index = counter++;
2771
+ var alreadyCalled = false;
2772
+ remaining++;
2773
+ call$e($promiseResolve, C, promise).then(function (value) {
2774
+ if (alreadyCalled) return;
2775
+ alreadyCalled = true;
2776
+ values[index] = value;
2777
+ --remaining || resolve(values);
2778
+ }, reject);
2779
+ });
2780
+ --remaining || resolve(values);
2781
+ });
2782
+ if (result.error) reject(result.value);
2783
+ return capability.promise;
2784
+ }
2785
+ });
2537
2786
 
2538
- var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
2539
- && typeof window == 'object'
2540
- && typeof document == 'object';
2787
+ var $$i = _export;
2788
+ var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
2789
+ var NativePromiseConstructor$1 = promiseNativeConstructor;
2790
+ var getBuiltIn$4 = getBuiltIn$a;
2791
+ var isCallable$8 = isCallable$r;
2792
+ var defineBuiltIn$9 = defineBuiltIn$e;
2541
2793
 
2542
- var global$9 = global$q;
2543
- var NativePromiseConstructor$3 = promiseNativeConstructor;
2544
- var isCallable$6 = isCallable$q;
2545
- var isForced$1 = isForced_1;
2546
- var inspectSource = inspectSource$3;
2547
- var wellKnownSymbol$b = wellKnownSymbol$m;
2548
- var IS_BROWSER = engineIsBrowser;
2549
- var IS_DENO = engineIsDeno;
2550
- var V8_VERSION = engineV8Version;
2794
+ var NativePromisePrototype$1 = NativePromiseConstructor$1 && NativePromiseConstructor$1.prototype;
2551
2795
 
2552
- NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
2553
- var SPECIES$1 = wellKnownSymbol$b('species');
2554
- var SUBCLASSING = false;
2555
- var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$6(global$9.PromiseRejectionEvent);
2556
-
2557
- var FORCED_PROMISE_CONSTRUCTOR$5 = isForced$1('Promise', function () {
2558
- var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
2559
- var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
2560
- // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
2561
- // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
2562
- // We can't detect it synchronously, so just check versions
2563
- if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
2564
- // We can't use @@species feature detection in V8 since it causes
2565
- // deoptimization and performance degradation
2566
- // https://github.com/zloirock/core-js/issues/679
2567
- if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
2568
- // Detect correctness of subclassing with @@species support
2569
- var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
2570
- var FakePromise = function (exec) {
2571
- exec(function () { /* empty */ }, function () { /* empty */ });
2572
- };
2573
- var constructor = promise.constructor = {};
2574
- constructor[SPECIES$1] = FakePromise;
2575
- SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
2576
- if (!SUBCLASSING) return true;
2577
- // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
2578
- } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
2796
+ // `Promise.prototype.catch` method
2797
+ // https://tc39.es/ecma262/#sec-promise.prototype.catch
2798
+ $$i({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
2799
+ 'catch': function (onRejected) {
2800
+ return this.then(undefined, onRejected);
2801
+ }
2579
2802
  });
2580
2803
 
2581
- var promiseConstructorDetection = {
2582
- CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
2583
- REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
2584
- SUBCLASSING: SUBCLASSING
2585
- };
2586
-
2587
- var newPromiseCapability$2 = {};
2588
-
2589
- var aCallable$8 = aCallable$c;
2590
-
2591
- var $TypeError$6 = TypeError;
2592
-
2593
- var PromiseCapability = function (C) {
2594
- var resolve, reject;
2595
- this.promise = new C(function ($$resolve, $$reject) {
2596
- if (resolve !== undefined || reject !== undefined) throw new $TypeError$6('Bad Promise constructor');
2597
- resolve = $$resolve;
2598
- reject = $$reject;
2599
- });
2600
- this.resolve = aCallable$8(resolve);
2601
- this.reject = aCallable$8(reject);
2602
- };
2603
-
2604
- // `NewPromiseCapability` abstract operation
2605
- // https://tc39.es/ecma262/#sec-newpromisecapability
2606
- newPromiseCapability$2.f = function (C) {
2607
- return new PromiseCapability(C);
2608
- };
2609
-
2610
- var $$h = _export;
2611
- var IS_NODE = engineIsNode;
2612
- var global$8 = global$q;
2613
- var call$h = functionCall;
2614
- var defineBuiltIn$9 = defineBuiltIn$d;
2615
- var setPrototypeOf = objectSetPrototypeOf;
2616
- var setToStringTag$2 = setToStringTag$6;
2617
- var setSpecies$1 = setSpecies$2;
2618
- var aCallable$7 = aCallable$c;
2619
- var isCallable$5 = isCallable$q;
2620
- var isObject$3 = isObject$e;
2621
- var anInstance$3 = anInstance$4;
2622
- var speciesConstructor = speciesConstructor$1;
2623
- var task = task$1.set;
2624
- var microtask = microtask_1;
2625
- var hostReportErrors = hostReportErrors$1;
2626
- var perform$2 = perform$3;
2627
- var Queue = queue$1;
2628
- var InternalStateModule$4 = internalState;
2629
- var NativePromiseConstructor$2 = promiseNativeConstructor;
2630
- var PromiseConstructorDetection = promiseConstructorDetection;
2631
- var newPromiseCapabilityModule$3 = newPromiseCapability$2;
2632
-
2633
- var PROMISE = 'Promise';
2634
- var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
2635
- var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
2636
- var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
2637
- var getInternalPromiseState = InternalStateModule$4.getterFor(PROMISE);
2638
- var setInternalState$4 = InternalStateModule$4.set;
2639
- var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
2640
- var PromiseConstructor = NativePromiseConstructor$2;
2641
- var PromisePrototype = NativePromisePrototype$1;
2642
- var TypeError$3 = global$8.TypeError;
2643
- var document$1 = global$8.document;
2644
- var process = global$8.process;
2645
- var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
2646
- var newGenericPromiseCapability = newPromiseCapability$1;
2647
-
2648
- var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$8.dispatchEvent);
2649
- var UNHANDLED_REJECTION = 'unhandledrejection';
2650
- var REJECTION_HANDLED = 'rejectionhandled';
2651
- var PENDING = 0;
2652
- var FULFILLED = 1;
2653
- var REJECTED = 2;
2654
- var HANDLED = 1;
2655
- var UNHANDLED = 2;
2656
-
2657
- var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
2658
-
2659
- // helpers
2660
- var isThenable = function (it) {
2661
- var then;
2662
- return isObject$3(it) && isCallable$5(then = it.then) ? then : false;
2663
- };
2664
-
2665
- var callReaction = function (reaction, state) {
2666
- var value = state.value;
2667
- var ok = state.state === FULFILLED;
2668
- var handler = ok ? reaction.ok : reaction.fail;
2669
- var resolve = reaction.resolve;
2670
- var reject = reaction.reject;
2671
- var domain = reaction.domain;
2672
- var result, then, exited;
2673
- try {
2674
- if (handler) {
2675
- if (!ok) {
2676
- if (state.rejection === UNHANDLED) onHandleUnhandled(state);
2677
- state.rejection = HANDLED;
2678
- }
2679
- if (handler === true) result = value;
2680
- else {
2681
- if (domain) domain.enter();
2682
- result = handler(value); // can throw
2683
- if (domain) {
2684
- domain.exit();
2685
- exited = true;
2686
- }
2687
- }
2688
- if (result === reaction.promise) {
2689
- reject(new TypeError$3('Promise-chain cycle'));
2690
- } else if (then = isThenable(result)) {
2691
- call$h(then, result, resolve, reject);
2692
- } else resolve(result);
2693
- } else reject(value);
2694
- } catch (error) {
2695
- if (domain && !exited) domain.exit();
2696
- reject(error);
2804
+ // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
2805
+ if (isCallable$8(NativePromiseConstructor$1)) {
2806
+ var method$1 = getBuiltIn$4('Promise').prototype['catch'];
2807
+ if (NativePromisePrototype$1['catch'] !== method$1) {
2808
+ defineBuiltIn$9(NativePromisePrototype$1, 'catch', method$1, { unsafe: true });
2697
2809
  }
2698
- };
2699
-
2700
- var notify = function (state, isReject) {
2701
- if (state.notified) return;
2702
- state.notified = true;
2703
- microtask(function () {
2704
- var reactions = state.reactions;
2705
- var reaction;
2706
- while (reaction = reactions.get()) {
2707
- callReaction(reaction, state);
2708
- }
2709
- state.notified = false;
2710
- if (isReject && !state.rejection) onUnhandled(state);
2711
- });
2712
- };
2713
-
2714
- var dispatchEvent = function (name, promise, reason) {
2715
- var event, handler;
2716
- if (DISPATCH_EVENT) {
2717
- event = document$1.createEvent('Event');
2718
- event.promise = promise;
2719
- event.reason = reason;
2720
- event.initEvent(name, false, true);
2721
- global$8.dispatchEvent(event);
2722
- } else event = { promise: promise, reason: reason };
2723
- if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$8['on' + name])) handler(event);
2724
- else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
2725
- };
2726
-
2727
- var onUnhandled = function (state) {
2728
- call$h(task, global$8, function () {
2729
- var promise = state.facade;
2730
- var value = state.value;
2731
- var IS_UNHANDLED = isUnhandled(state);
2732
- var result;
2733
- if (IS_UNHANDLED) {
2734
- result = perform$2(function () {
2735
- if (IS_NODE) {
2736
- process.emit('unhandledRejection', value, promise);
2737
- } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
2738
- });
2739
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
2740
- state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
2741
- if (result.error) throw result.value;
2742
- }
2743
- });
2744
- };
2745
-
2746
- var isUnhandled = function (state) {
2747
- return state.rejection !== HANDLED && !state.parent;
2748
- };
2749
-
2750
- var onHandleUnhandled = function (state) {
2751
- call$h(task, global$8, function () {
2752
- var promise = state.facade;
2753
- if (IS_NODE) {
2754
- process.emit('rejectionHandled', promise);
2755
- } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
2756
- });
2757
- };
2758
-
2759
- var bind$4 = function (fn, state, unwrap) {
2760
- return function (value) {
2761
- fn(state, value, unwrap);
2762
- };
2763
- };
2810
+ }
2764
2811
 
2765
- var internalReject = function (state, value, unwrap) {
2766
- if (state.done) return;
2767
- state.done = true;
2768
- if (unwrap) state = unwrap;
2769
- state.value = value;
2770
- state.state = REJECTED;
2771
- notify(state, true);
2772
- };
2812
+ var $$h = _export;
2813
+ var call$d = functionCall;
2814
+ var aCallable$4 = aCallable$c;
2815
+ var newPromiseCapabilityModule$1 = newPromiseCapability$2;
2816
+ var perform = perform$3;
2817
+ var iterate$2 = iterate$4;
2818
+ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
2773
2819
 
2774
- var internalResolve = function (state, value, unwrap) {
2775
- if (state.done) return;
2776
- state.done = true;
2777
- if (unwrap) state = unwrap;
2778
- try {
2779
- if (state.facade === value) throw new TypeError$3("Promise can't be resolved itself");
2780
- var then = isThenable(value);
2781
- if (then) {
2782
- microtask(function () {
2783
- var wrapper = { done: false };
2784
- try {
2785
- call$h(then, value,
2786
- bind$4(internalResolve, wrapper, state),
2787
- bind$4(internalReject, wrapper, state)
2788
- );
2789
- } catch (error) {
2790
- internalReject(wrapper, error, state);
2791
- }
2820
+ // `Promise.race` method
2821
+ // https://tc39.es/ecma262/#sec-promise.race
2822
+ $$h({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
2823
+ race: function race(iterable) {
2824
+ var C = this;
2825
+ var capability = newPromiseCapabilityModule$1.f(C);
2826
+ var reject = capability.reject;
2827
+ var result = perform(function () {
2828
+ var $promiseResolve = aCallable$4(C.resolve);
2829
+ iterate$2(iterable, function (promise) {
2830
+ call$d($promiseResolve, C, promise).then(capability.resolve, reject);
2792
2831
  });
2793
- } else {
2794
- state.value = value;
2795
- state.state = FULFILLED;
2796
- notify(state, false);
2797
- }
2798
- } catch (error) {
2799
- internalReject({ done: false }, error, state);
2800
- }
2801
- };
2802
-
2803
- // constructor polyfill
2804
- if (FORCED_PROMISE_CONSTRUCTOR$4) {
2805
- // 25.4.3.1 Promise(executor)
2806
- PromiseConstructor = function Promise(executor) {
2807
- anInstance$3(this, PromisePrototype);
2808
- aCallable$7(executor);
2809
- call$h(Internal, this);
2810
- var state = getInternalPromiseState(this);
2811
- try {
2812
- executor(bind$4(internalResolve, state), bind$4(internalReject, state));
2813
- } catch (error) {
2814
- internalReject(state, error);
2815
- }
2816
- };
2817
-
2818
- PromisePrototype = PromiseConstructor.prototype;
2819
-
2820
- // eslint-disable-next-line no-unused-vars -- required for `.length`
2821
- Internal = function Promise(executor) {
2822
- setInternalState$4(this, {
2823
- type: PROMISE,
2824
- done: false,
2825
- notified: false,
2826
- parent: false,
2827
- reactions: new Queue(),
2828
- rejection: false,
2829
- state: PENDING,
2830
- value: undefined
2831
2832
  });
2832
- };
2833
+ if (result.error) reject(result.value);
2834
+ return capability.promise;
2835
+ }
2836
+ });
2833
2837
 
2834
- // `Promise.prototype.then` method
2835
- // https://tc39.es/ecma262/#sec-promise.prototype.then
2836
- Internal.prototype = defineBuiltIn$9(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
2837
- var state = getInternalPromiseState(this);
2838
- var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
2839
- state.parent = true;
2840
- reaction.ok = isCallable$5(onFulfilled) ? onFulfilled : true;
2841
- reaction.fail = isCallable$5(onRejected) && onRejected;
2842
- reaction.domain = IS_NODE ? process.domain : undefined;
2843
- if (state.state === PENDING) state.reactions.add(reaction);
2844
- else microtask(function () {
2845
- callReaction(reaction, state);
2846
- });
2847
- return reaction.promise;
2848
- });
2838
+ var $$g = _export;
2839
+ var newPromiseCapabilityModule = newPromiseCapability$2;
2840
+ var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
2849
2841
 
2850
- OwnPromiseCapability = function () {
2851
- var promise = new Internal();
2852
- var state = getInternalPromiseState(promise);
2853
- this.promise = promise;
2854
- this.resolve = bind$4(internalResolve, state);
2855
- this.reject = bind$4(internalReject, state);
2856
- };
2842
+ // `Promise.reject` method
2843
+ // https://tc39.es/ecma262/#sec-promise.reject
2844
+ $$g({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
2845
+ reject: function reject(r) {
2846
+ var capability = newPromiseCapabilityModule.f(this);
2847
+ var capabilityReject = capability.reject;
2848
+ capabilityReject(r);
2849
+ return capability.promise;
2850
+ }
2851
+ });
2857
2852
 
2858
- newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
2859
- return C === PromiseConstructor || C === PromiseWrapper
2860
- ? new OwnPromiseCapability(C)
2861
- : newGenericPromiseCapability(C);
2862
- };
2853
+ var anObject$c = anObject$l;
2854
+ var isObject$4 = isObject$e;
2855
+ var newPromiseCapability = newPromiseCapability$2;
2863
2856
 
2864
- if (isCallable$5(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
2865
- nativeThen = NativePromisePrototype$1.then;
2857
+ var promiseResolve$2 = function (C, x) {
2858
+ anObject$c(C);
2859
+ if (isObject$4(x) && x.constructor === C) return x;
2860
+ var promiseCapability = newPromiseCapability.f(C);
2861
+ var resolve = promiseCapability.resolve;
2862
+ resolve(x);
2863
+ return promiseCapability.promise;
2864
+ };
2866
2865
 
2867
- if (!NATIVE_PROMISE_SUBCLASSING) {
2868
- // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
2869
- defineBuiltIn$9(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
2870
- var that = this;
2871
- return new PromiseConstructor(function (resolve, reject) {
2872
- call$h(nativeThen, that, resolve, reject);
2873
- }).then(onFulfilled, onRejected);
2874
- // https://github.com/zloirock/core-js/issues/640
2875
- }, { unsafe: true });
2876
- }
2866
+ var $$f = _export;
2867
+ var getBuiltIn$3 = getBuiltIn$a;
2868
+ var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
2869
+ var promiseResolve$1 = promiseResolve$2;
2877
2870
 
2878
- // make `.constructor === Promise` work for native promise-based APIs
2879
- try {
2880
- delete NativePromisePrototype$1.constructor;
2881
- } catch (error) { /* empty */ }
2871
+ getBuiltIn$3('Promise');
2882
2872
 
2883
- // make `instanceof Promise` work for native promise-based APIs
2884
- if (setPrototypeOf) {
2885
- setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
2886
- }
2873
+ // `Promise.resolve` method
2874
+ // https://tc39.es/ecma262/#sec-promise.resolve
2875
+ $$f({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2876
+ resolve: function resolve(x) {
2877
+ return promiseResolve$1(this, x);
2887
2878
  }
2888
- }
2879
+ });
2889
2880
 
2890
- $$h({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
2891
- Promise: PromiseConstructor
2881
+ var $$e = _export;
2882
+ var NativePromiseConstructor = promiseNativeConstructor;
2883
+ var fails$b = fails$p;
2884
+ var getBuiltIn$2 = getBuiltIn$a;
2885
+ var isCallable$7 = isCallable$r;
2886
+ var speciesConstructor = speciesConstructor$2;
2887
+ var promiseResolve = promiseResolve$2;
2888
+ var defineBuiltIn$8 = defineBuiltIn$e;
2889
+
2890
+ var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
2891
+
2892
+ // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829
2893
+ var NON_GENERIC = !!NativePromiseConstructor && fails$b(function () {
2894
+ // eslint-disable-next-line unicorn/no-thenable -- required for testing
2895
+ NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
2892
2896
  });
2893
2897
 
2894
- setToStringTag$2(PromiseConstructor, PROMISE, false);
2895
- setSpecies$1(PROMISE);
2898
+ // `Promise.prototype.finally` method
2899
+ // https://tc39.es/ecma262/#sec-promise.prototype.finally
2900
+ $$e({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
2901
+ 'finally': function (onFinally) {
2902
+ var C = speciesConstructor(this, getBuiltIn$2('Promise'));
2903
+ var isFunction = isCallable$7(onFinally);
2904
+ return this.then(
2905
+ isFunction ? function (x) {
2906
+ return promiseResolve(C, onFinally()).then(function () { return x; });
2907
+ } : onFinally,
2908
+ isFunction ? function (e) {
2909
+ return promiseResolve(C, onFinally()).then(function () { throw e; });
2910
+ } : onFinally
2911
+ );
2912
+ }
2913
+ });
2896
2914
 
2897
- var wellKnownSymbol$a = wellKnownSymbol$m;
2898
- var Iterators$1 = iterators;
2915
+ // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`
2916
+ if (isCallable$7(NativePromiseConstructor)) {
2917
+ var method = getBuiltIn$2('Promise').prototype['finally'];
2918
+ if (NativePromisePrototype['finally'] !== method) {
2919
+ defineBuiltIn$8(NativePromisePrototype, 'finally', method, { unsafe: true });
2920
+ }
2921
+ }
2899
2922
 
2900
- var ITERATOR$5 = wellKnownSymbol$a('iterator');
2901
- var ArrayPrototype = Array.prototype;
2923
+ var defineProperty = objectDefineProperty.f;
2902
2924
 
2903
- // check on default Array iterator
2904
- var isArrayIteratorMethod$2 = function (it) {
2905
- return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$5] === it);
2925
+ var proxyAccessor$2 = function (Target, Source, key) {
2926
+ key in Target || defineProperty(Target, key, {
2927
+ configurable: true,
2928
+ get: function () { return Source[key]; },
2929
+ set: function (it) { Source[key] = it; }
2930
+ });
2906
2931
  };
2907
2932
 
2908
- var classof$4 = classof$a;
2909
- var getMethod$3 = getMethod$5;
2910
- var isNullOrUndefined$1 = isNullOrUndefined$5;
2911
- var Iterators = iterators;
2912
- var wellKnownSymbol$9 = wellKnownSymbol$m;
2913
-
2914
- var ITERATOR$4 = wellKnownSymbol$9('iterator');
2933
+ var isCallable$6 = isCallable$r;
2934
+ var isObject$3 = isObject$e;
2935
+ var setPrototypeOf$1 = objectSetPrototypeOf;
2915
2936
 
2916
- var getIteratorMethod$4 = function (it) {
2917
- if (!isNullOrUndefined$1(it)) return getMethod$3(it, ITERATOR$4)
2918
- || getMethod$3(it, '@@iterator')
2919
- || Iterators[classof$4(it)];
2937
+ // makes subclassing work correct for wrapped built-ins
2938
+ var inheritIfRequired$2 = function ($this, dummy, Wrapper) {
2939
+ var NewTarget, NewTargetPrototype;
2940
+ if (
2941
+ // it can work only with native `setPrototypeOf`
2942
+ setPrototypeOf$1 &&
2943
+ // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
2944
+ isCallable$6(NewTarget = dummy.constructor) &&
2945
+ NewTarget !== Wrapper &&
2946
+ isObject$3(NewTargetPrototype = NewTarget.prototype) &&
2947
+ NewTargetPrototype !== Wrapper.prototype
2948
+ ) setPrototypeOf$1($this, NewTargetPrototype);
2949
+ return $this;
2920
2950
  };
2921
2951
 
2922
- var call$g = functionCall;
2923
- var aCallable$6 = aCallable$c;
2924
- var anObject$f = anObject$l;
2925
- var tryToString$1 = tryToString$4;
2926
- var getIteratorMethod$3 = getIteratorMethod$4;
2952
+ var classof$6 = classof$9;
2927
2953
 
2928
- var $TypeError$5 = TypeError;
2954
+ var $String$1 = String;
2929
2955
 
2930
- var getIterator$3 = function (argument, usingIterator) {
2931
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod$3(argument) : usingIterator;
2932
- if (aCallable$6(iteratorMethod)) return anObject$f(call$g(iteratorMethod, argument));
2933
- throw new $TypeError$5(tryToString$1(argument) + ' is not iterable');
2956
+ var toString$b = function (argument) {
2957
+ if (classof$6(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
2958
+ return $String$1(argument);
2934
2959
  };
2935
2960
 
2936
- var call$f = functionCall;
2937
- var anObject$e = anObject$l;
2938
- var getMethod$2 = getMethod$5;
2961
+ var toString$a = toString$b;
2939
2962
 
2940
- var iteratorClose$3 = function (iterator, kind, value) {
2941
- var innerResult, innerError;
2942
- anObject$e(iterator);
2943
- try {
2944
- innerResult = getMethod$2(iterator, 'return');
2945
- if (!innerResult) {
2946
- if (kind === 'throw') throw value;
2947
- return value;
2948
- }
2949
- innerResult = call$f(innerResult, iterator);
2950
- } catch (error) {
2951
- innerError = true;
2952
- innerResult = error;
2963
+ var normalizeStringArgument$1 = function (argument, $default) {
2964
+ return argument === undefined ? arguments.length < 2 ? '' : $default : toString$a(argument);
2965
+ };
2966
+
2967
+ var isObject$2 = isObject$e;
2968
+ var createNonEnumerableProperty$5 = createNonEnumerableProperty$a;
2969
+
2970
+ // `InstallErrorCause` abstract operation
2971
+ // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
2972
+ var installErrorCause$1 = function (O, options) {
2973
+ if (isObject$2(options) && 'cause' in options) {
2974
+ createNonEnumerableProperty$5(O, 'cause', options.cause);
2953
2975
  }
2954
- if (kind === 'throw') throw value;
2955
- if (innerError) throw innerResult;
2956
- anObject$e(innerResult);
2957
- return value;
2958
2976
  };
2959
2977
 
2960
- var bind$3 = functionBindContext;
2961
- var call$e = functionCall;
2962
- var anObject$d = anObject$l;
2963
- var tryToString = tryToString$4;
2964
- var isArrayIteratorMethod$1 = isArrayIteratorMethod$2;
2965
- var lengthOfArrayLike$1 = lengthOfArrayLike$3;
2966
- var isPrototypeOf$2 = objectIsPrototypeOf;
2967
- var getIterator$2 = getIterator$3;
2968
- var getIteratorMethod$2 = getIteratorMethod$4;
2969
- var iteratorClose$2 = iteratorClose$3;
2978
+ var uncurryThis$c = functionUncurryThis;
2970
2979
 
2971
- var $TypeError$4 = TypeError;
2980
+ var $Error = Error;
2981
+ var replace$6 = uncurryThis$c(''.replace);
2972
2982
 
2973
- var Result = function (stopped, result) {
2974
- this.stopped = stopped;
2975
- this.result = result;
2983
+ var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
2984
+ // eslint-disable-next-line redos/no-vulnerable -- safe
2985
+ var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
2986
+ var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
2987
+
2988
+ var errorStackClear = function (stack, dropEntries) {
2989
+ if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
2990
+ while (dropEntries--) stack = replace$6(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
2991
+ } return stack;
2976
2992
  };
2977
2993
 
2978
- var ResultPrototype = Result.prototype;
2994
+ var fails$a = fails$p;
2995
+ var createPropertyDescriptor$2 = createPropertyDescriptor$6;
2979
2996
 
2980
- var iterate$4 = function (iterable, unboundFunction, options) {
2981
- var that = options && options.that;
2982
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
2983
- var IS_RECORD = !!(options && options.IS_RECORD);
2984
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
2985
- var INTERRUPTED = !!(options && options.INTERRUPTED);
2986
- var fn = bind$3(unboundFunction, that);
2987
- var iterator, iterFn, index, length, result, next, step;
2997
+ var errorStackInstallable = !fails$a(function () {
2998
+ var error = new Error('a');
2999
+ if (!('stack' in error)) return true;
3000
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
3001
+ Object.defineProperty(error, 'stack', createPropertyDescriptor$2(1, 7));
3002
+ return error.stack !== 7;
3003
+ });
2988
3004
 
2989
- var stop = function (condition) {
2990
- if (iterator) iteratorClose$2(iterator, 'normal', condition);
2991
- return new Result(true, condition);
2992
- };
3005
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$a;
3006
+ var clearErrorStack = errorStackClear;
3007
+ var ERROR_STACK_INSTALLABLE = errorStackInstallable;
2993
3008
 
2994
- var callFn = function (value) {
2995
- if (AS_ENTRIES) {
2996
- anObject$d(value);
2997
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
2998
- } return INTERRUPTED ? fn(value, stop) : fn(value);
2999
- };
3009
+ // non-standard V8
3010
+ var captureStackTrace = Error.captureStackTrace;
3000
3011
 
3001
- if (IS_RECORD) {
3002
- iterator = iterable.iterator;
3003
- } else if (IS_ITERATOR) {
3004
- iterator = iterable;
3005
- } else {
3006
- iterFn = getIteratorMethod$2(iterable);
3007
- if (!iterFn) throw new $TypeError$4(tryToString(iterable) + ' is not iterable');
3008
- // optimisation for array iterators
3009
- if (isArrayIteratorMethod$1(iterFn)) {
3010
- for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
3011
- result = callFn(iterable[index]);
3012
- if (result && isPrototypeOf$2(ResultPrototype, result)) return result;
3013
- } return new Result(false);
3014
- }
3015
- iterator = getIterator$2(iterable, iterFn);
3012
+ var errorStackInstall = function (error, C, stack, dropEntries) {
3013
+ if (ERROR_STACK_INSTALLABLE) {
3014
+ if (captureStackTrace) captureStackTrace(error, C);
3015
+ else createNonEnumerableProperty$4(error, 'stack', clearErrorStack(stack, dropEntries));
3016
3016
  }
3017
-
3018
- next = IS_RECORD ? iterable.next : iterator.next;
3019
- while (!(step = call$e(next, iterator)).done) {
3020
- try {
3021
- result = callFn(step.value);
3022
- } catch (error) {
3023
- iteratorClose$2(iterator, 'throw', error);
3024
- }
3025
- if (typeof result == 'object' && result && isPrototypeOf$2(ResultPrototype, result)) return result;
3026
- } return new Result(false);
3027
3017
  };
3028
3018
 
3029
- var wellKnownSymbol$8 = wellKnownSymbol$m;
3019
+ var getBuiltIn$1 = getBuiltIn$a;
3020
+ var hasOwn$5 = hasOwnProperty_1;
3021
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$a;
3022
+ var isPrototypeOf$2 = objectIsPrototypeOf;
3023
+ var setPrototypeOf = objectSetPrototypeOf;
3024
+ var copyConstructorProperties = copyConstructorProperties$2;
3025
+ var proxyAccessor$1 = proxyAccessor$2;
3026
+ var inheritIfRequired$1 = inheritIfRequired$2;
3027
+ var normalizeStringArgument = normalizeStringArgument$1;
3028
+ var installErrorCause = installErrorCause$1;
3029
+ var installErrorStack = errorStackInstall;
3030
+ var DESCRIPTORS$8 = descriptors;
3031
+
3032
+ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
3033
+ var STACK_TRACE_LIMIT = 'stackTraceLimit';
3034
+ var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
3035
+ var path = FULL_NAME.split('.');
3036
+ var ERROR_NAME = path[path.length - 1];
3037
+ var OriginalError = getBuiltIn$1.apply(null, path);
3038
+
3039
+ if (!OriginalError) return;
3040
+
3041
+ var OriginalErrorPrototype = OriginalError.prototype;
3042
+
3043
+ // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
3044
+ if (hasOwn$5(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
3045
+
3046
+ if (!FORCED) return OriginalError;
3047
+
3048
+ var BaseError = getBuiltIn$1('Error');
3049
+
3050
+ var WrappedError = wrapper(function (a, b) {
3051
+ var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
3052
+ var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
3053
+ if (message !== undefined) createNonEnumerableProperty$3(result, 'message', message);
3054
+ installErrorStack(result, WrappedError, result.stack, 2);
3055
+ if (this && isPrototypeOf$2(OriginalErrorPrototype, this)) inheritIfRequired$1(result, this, WrappedError);
3056
+ if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
3057
+ return result;
3058
+ });
3059
+
3060
+ WrappedError.prototype = OriginalErrorPrototype;
3030
3061
 
3031
- var ITERATOR$3 = wellKnownSymbol$8('iterator');
3032
- var SAFE_CLOSING = false;
3062
+ if (ERROR_NAME !== 'Error') {
3063
+ if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
3064
+ else copyConstructorProperties(WrappedError, BaseError, { name: true });
3065
+ } else if (DESCRIPTORS$8 && STACK_TRACE_LIMIT in OriginalError) {
3066
+ proxyAccessor$1(WrappedError, OriginalError, STACK_TRACE_LIMIT);
3067
+ proxyAccessor$1(WrappedError, OriginalError, 'prepareStackTrace');
3068
+ }
3033
3069
 
3034
- try {
3035
- var called = 0;
3036
- var iteratorWithReturn = {
3037
- next: function () {
3038
- return { done: !!called++ };
3039
- },
3040
- 'return': function () {
3041
- SAFE_CLOSING = true;
3042
- }
3043
- };
3044
- iteratorWithReturn[ITERATOR$3] = function () {
3045
- return this;
3046
- };
3047
- // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
3048
- Array.from(iteratorWithReturn, function () { throw 2; });
3049
- } catch (error) { /* empty */ }
3070
+ copyConstructorProperties(WrappedError, OriginalError);
3050
3071
 
3051
- var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
3052
- try {
3053
- if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
3054
- } catch (error) { return false; } // workaround of old WebKit + `eval` bug
3055
- var ITERATION_SUPPORT = false;
3056
3072
  try {
3057
- var object = {};
3058
- object[ITERATOR$3] = function () {
3059
- return {
3060
- next: function () {
3061
- return { done: ITERATION_SUPPORT = true };
3062
- }
3063
- };
3064
- };
3065
- exec(object);
3073
+ // Safari 13- bug: WebAssembly errors does not have a proper `.name`
3074
+ if (OriginalErrorPrototype.name !== ERROR_NAME) {
3075
+ createNonEnumerableProperty$3(OriginalErrorPrototype, 'name', ERROR_NAME);
3076
+ }
3077
+ OriginalErrorPrototype.constructor = WrappedError;
3066
3078
  } catch (error) { /* empty */ }
3067
- return ITERATION_SUPPORT;
3079
+
3080
+ return WrappedError;
3068
3081
  };
3069
3082
 
3070
- var NativePromiseConstructor$1 = promiseNativeConstructor;
3071
- var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
3072
- var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
3083
+ /* eslint-disable no-unused-vars -- required for functions `.length` */
3084
+ var $$d = _export;
3085
+ var global$8 = global$q;
3086
+ var apply$1 = functionApply;
3087
+ var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
3073
3088
 
3074
- var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
3075
- NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
3076
- });
3089
+ var WEB_ASSEMBLY = 'WebAssembly';
3090
+ var WebAssembly = global$8[WEB_ASSEMBLY];
3077
3091
 
3078
- var $$g = _export;
3079
- var call$d = functionCall;
3080
- var aCallable$5 = aCallable$c;
3081
- var newPromiseCapabilityModule$2 = newPromiseCapability$2;
3082
- var perform$1 = perform$3;
3083
- var iterate$3 = iterate$4;
3084
- var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
3092
+ // eslint-disable-next-line es/no-error-cause -- feature detection
3093
+ var FORCED$1 = new Error('e', { cause: 7 }).cause !== 7;
3085
3094
 
3086
- // `Promise.all` method
3087
- // https://tc39.es/ecma262/#sec-promise.all
3088
- $$g({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
3089
- all: function all(iterable) {
3090
- var C = this;
3091
- var capability = newPromiseCapabilityModule$2.f(C);
3092
- var resolve = capability.resolve;
3093
- var reject = capability.reject;
3094
- var result = perform$1(function () {
3095
- var $promiseResolve = aCallable$5(C.resolve);
3096
- var values = [];
3097
- var counter = 0;
3098
- var remaining = 1;
3099
- iterate$3(iterable, function (promise) {
3100
- var index = counter++;
3101
- var alreadyCalled = false;
3102
- remaining++;
3103
- call$d($promiseResolve, C, promise).then(function (value) {
3104
- if (alreadyCalled) return;
3105
- alreadyCalled = true;
3106
- values[index] = value;
3107
- --remaining || resolve(values);
3108
- }, reject);
3109
- });
3110
- --remaining || resolve(values);
3111
- });
3112
- if (result.error) reject(result.value);
3113
- return capability.promise;
3095
+ var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
3096
+ var O = {};
3097
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$1);
3098
+ $$d({ global: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
3099
+ };
3100
+
3101
+ var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
3102
+ if (WebAssembly && WebAssembly[ERROR_NAME]) {
3103
+ var O = {};
3104
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$1);
3105
+ $$d({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
3114
3106
  }
3107
+ };
3108
+
3109
+ // https://tc39.es/ecma262/#sec-nativeerror
3110
+ exportGlobalErrorCauseWrapper('Error', function (init) {
3111
+ return function Error(message) { return apply$1(init, this, arguments); };
3112
+ });
3113
+ exportGlobalErrorCauseWrapper('EvalError', function (init) {
3114
+ return function EvalError(message) { return apply$1(init, this, arguments); };
3115
+ });
3116
+ exportGlobalErrorCauseWrapper('RangeError', function (init) {
3117
+ return function RangeError(message) { return apply$1(init, this, arguments); };
3118
+ });
3119
+ exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
3120
+ return function ReferenceError(message) { return apply$1(init, this, arguments); };
3121
+ });
3122
+ exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
3123
+ return function SyntaxError(message) { return apply$1(init, this, arguments); };
3124
+ });
3125
+ exportGlobalErrorCauseWrapper('TypeError', function (init) {
3126
+ return function TypeError(message) { return apply$1(init, this, arguments); };
3127
+ });
3128
+ exportGlobalErrorCauseWrapper('URIError', function (init) {
3129
+ return function URIError(message) { return apply$1(init, this, arguments); };
3130
+ });
3131
+ exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
3132
+ return function CompileError(message) { return apply$1(init, this, arguments); };
3133
+ });
3134
+ exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
3135
+ return function LinkError(message) { return apply$1(init, this, arguments); };
3136
+ });
3137
+ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
3138
+ return function RuntimeError(message) { return apply$1(init, this, arguments); };
3115
3139
  });
3116
3140
 
3117
- var $$f = _export;
3118
- var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
3119
- var NativePromiseConstructor = promiseNativeConstructor;
3120
- var getBuiltIn$1 = getBuiltIn$9;
3121
- var isCallable$4 = isCallable$q;
3122
- var defineBuiltIn$8 = defineBuiltIn$d;
3141
+ var classof$5 = classofRaw$2;
3123
3142
 
3124
- var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
3143
+ // `IsArray` abstract operation
3144
+ // https://tc39.es/ecma262/#sec-isarray
3145
+ // eslint-disable-next-line es/no-array-isarray -- safe
3146
+ var isArray$1 = Array.isArray || function isArray(argument) {
3147
+ return classof$5(argument) === 'Array';
3148
+ };
3125
3149
 
3126
- // `Promise.prototype.catch` method
3127
- // https://tc39.es/ecma262/#sec-promise.prototype.catch
3128
- $$f({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
3129
- 'catch': function (onRejected) {
3130
- return this.then(undefined, onRejected);
3131
- }
3132
- });
3150
+ var uncurryThis$b = functionUncurryThis;
3151
+ var isArray = isArray$1;
3152
+ var isCallable$5 = isCallable$r;
3153
+ var classof$4 = classofRaw$2;
3154
+ var toString$9 = toString$b;
3133
3155
 
3134
- // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
3135
- if (isCallable$4(NativePromiseConstructor)) {
3136
- var method = getBuiltIn$1('Promise').prototype['catch'];
3137
- if (NativePromisePrototype['catch'] !== method) {
3138
- defineBuiltIn$8(NativePromisePrototype, 'catch', method, { unsafe: true });
3156
+ var push$4 = uncurryThis$b([].push);
3157
+
3158
+ var getJsonReplacerFunction = function (replacer) {
3159
+ if (isCallable$5(replacer)) return replacer;
3160
+ if (!isArray(replacer)) return;
3161
+ var rawLength = replacer.length;
3162
+ var keys = [];
3163
+ for (var i = 0; i < rawLength; i++) {
3164
+ var element = replacer[i];
3165
+ if (typeof element == 'string') push$4(keys, element);
3166
+ else if (typeof element == 'number' || classof$4(element) === 'Number' || classof$4(element) === 'String') push$4(keys, toString$9(element));
3139
3167
  }
3140
- }
3168
+ var keysLength = keys.length;
3169
+ var root = true;
3170
+ return function (key, value) {
3171
+ if (root) {
3172
+ root = false;
3173
+ return value;
3174
+ }
3175
+ if (isArray(this)) return value;
3176
+ for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
3177
+ };
3178
+ };
3141
3179
 
3142
- var $$e = _export;
3180
+ var $$c = _export;
3181
+ var getBuiltIn = getBuiltIn$a;
3182
+ var apply = functionApply;
3143
3183
  var call$c = functionCall;
3144
- var aCallable$4 = aCallable$c;
3145
- var newPromiseCapabilityModule$1 = newPromiseCapability$2;
3146
- var perform = perform$3;
3147
- var iterate$2 = iterate$4;
3148
- var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
3184
+ var uncurryThis$a = functionUncurryThis;
3185
+ var fails$9 = fails$p;
3186
+ var isCallable$4 = isCallable$r;
3187
+ var isSymbol = isSymbol$3;
3188
+ var arraySlice$2 = arraySlice$4;
3189
+ var getReplacerFunction = getJsonReplacerFunction;
3190
+ var NATIVE_SYMBOL = symbolConstructorDetection;
3149
3191
 
3150
- // `Promise.race` method
3151
- // https://tc39.es/ecma262/#sec-promise.race
3152
- $$e({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
3153
- race: function race(iterable) {
3154
- var C = this;
3155
- var capability = newPromiseCapabilityModule$1.f(C);
3156
- var reject = capability.reject;
3157
- var result = perform(function () {
3158
- var $promiseResolve = aCallable$4(C.resolve);
3159
- iterate$2(iterable, function (promise) {
3160
- call$c($promiseResolve, C, promise).then(capability.resolve, reject);
3161
- });
3162
- });
3163
- if (result.error) reject(result.value);
3164
- return capability.promise;
3165
- }
3166
- });
3192
+ var $String = String;
3193
+ var $stringify = getBuiltIn('JSON', 'stringify');
3194
+ var exec$4 = uncurryThis$a(/./.exec);
3195
+ var charAt$6 = uncurryThis$a(''.charAt);
3196
+ var charCodeAt$2 = uncurryThis$a(''.charCodeAt);
3197
+ var replace$5 = uncurryThis$a(''.replace);
3198
+ var numberToString$1 = uncurryThis$a(1.0.toString);
3167
3199
 
3168
- var $$d = _export;
3169
- var newPromiseCapabilityModule = newPromiseCapability$2;
3170
- var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
3200
+ var tester = /[\uD800-\uDFFF]/g;
3201
+ var low = /^[\uD800-\uDBFF]$/;
3202
+ var hi = /^[\uDC00-\uDFFF]$/;
3171
3203
 
3172
- // `Promise.reject` method
3173
- // https://tc39.es/ecma262/#sec-promise.reject
3174
- $$d({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
3175
- reject: function reject(r) {
3176
- var capability = newPromiseCapabilityModule.f(this);
3177
- var capabilityReject = capability.reject;
3178
- capabilityReject(r);
3179
- return capability.promise;
3180
- }
3204
+ var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$9(function () {
3205
+ var symbol = getBuiltIn('Symbol')('stringify detection');
3206
+ // MS Edge converts symbol values to JSON as {}
3207
+ return $stringify([symbol]) !== '[null]'
3208
+ // WebKit converts symbol values to JSON as null
3209
+ || $stringify({ a: symbol }) !== '{}'
3210
+ // V8 throws on boxed symbols
3211
+ || $stringify(Object(symbol)) !== '{}';
3181
3212
  });
3182
3213
 
3183
- var anObject$c = anObject$l;
3184
- var isObject$2 = isObject$e;
3185
- var newPromiseCapability = newPromiseCapability$2;
3214
+ // https://github.com/tc39/proposal-well-formed-stringify
3215
+ var ILL_FORMED_UNICODE = fails$9(function () {
3216
+ return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
3217
+ || $stringify('\uDEAD') !== '"\\udead"';
3218
+ });
3186
3219
 
3187
- var promiseResolve$1 = function (C, x) {
3188
- anObject$c(C);
3189
- if (isObject$2(x) && x.constructor === C) return x;
3190
- var promiseCapability = newPromiseCapability.f(C);
3191
- var resolve = promiseCapability.resolve;
3192
- resolve(x);
3193
- return promiseCapability.promise;
3220
+ var stringifyWithSymbolsFix = function (it, replacer) {
3221
+ var args = arraySlice$2(arguments);
3222
+ var $replacer = getReplacerFunction(replacer);
3223
+ if (!isCallable$4($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
3224
+ args[1] = function (key, value) {
3225
+ // some old implementations (like WebKit) could pass numbers as keys
3226
+ if (isCallable$4($replacer)) value = call$c($replacer, this, $String(key), value);
3227
+ if (!isSymbol(value)) return value;
3228
+ };
3229
+ return apply($stringify, null, args);
3194
3230
  };
3195
3231
 
3196
- var $$c = _export;
3197
- var getBuiltIn = getBuiltIn$9;
3198
- var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
3199
- var promiseResolve = promiseResolve$1;
3200
-
3201
- getBuiltIn('Promise');
3232
+ var fixIllFormed = function (match, offset, string) {
3233
+ var prev = charAt$6(string, offset - 1);
3234
+ var next = charAt$6(string, offset + 1);
3235
+ if ((exec$4(low, match) && !exec$4(hi, next)) || (exec$4(hi, match) && !exec$4(low, prev))) {
3236
+ return '\\u' + numberToString$1(charCodeAt$2(match, 0), 16);
3237
+ } return match;
3238
+ };
3202
3239
 
3203
- // `Promise.resolve` method
3204
- // https://tc39.es/ecma262/#sec-promise.resolve
3205
- $$c({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
3206
- resolve: function resolve(x) {
3207
- return promiseResolve(this, x);
3208
- }
3209
- });
3240
+ if ($stringify) {
3241
+ // `JSON.stringify` method
3242
+ // https://tc39.es/ecma262/#sec-json.stringify
3243
+ $$c({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
3244
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
3245
+ stringify: function stringify(it, replacer, space) {
3246
+ var args = arraySlice$2(arguments);
3247
+ var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
3248
+ return ILL_FORMED_UNICODE && typeof result == 'string' ? replace$5(result, tester, fixIllFormed) : result;
3249
+ }
3250
+ });
3251
+ }
3210
3252
 
3211
3253
  var anObject$b = anObject$l;
3212
3254
 
@@ -3226,7 +3268,7 @@ var regexpFlags$1 = function () {
3226
3268
  return result;
3227
3269
  };
3228
3270
 
3229
- var fails$8 = fails$o;
3271
+ var fails$8 = fails$p;
3230
3272
  var global$7 = global$q;
3231
3273
 
3232
3274
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
@@ -3257,7 +3299,7 @@ var regexpStickyHelpers = {
3257
3299
  UNSUPPORTED_Y: UNSUPPORTED_Y$2
3258
3300
  };
3259
3301
 
3260
- var fails$7 = fails$o;
3302
+ var fails$7 = fails$p;
3261
3303
  var global$6 = global$q;
3262
3304
 
3263
3305
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
@@ -3268,7 +3310,7 @@ var regexpUnsupportedDotAll = fails$7(function () {
3268
3310
  return !(re.dotAll && re.test('\n') && re.flags === 's');
3269
3311
  });
3270
3312
 
3271
- var fails$6 = fails$o;
3313
+ var fails$6 = fails$p;
3272
3314
  var global$5 = global$q;
3273
3315
 
3274
3316
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
@@ -3409,9 +3451,9 @@ $$b({ target: 'RegExp', proto: true, forced: /./.exec !== exec$3 }, {
3409
3451
  // TODO: Remove from `core-js@4` since it's moved to entry points
3410
3452
 
3411
3453
  var call$a = functionCall;
3412
- var defineBuiltIn$7 = defineBuiltIn$d;
3454
+ var defineBuiltIn$7 = defineBuiltIn$e;
3413
3455
  var regexpExec$1 = regexpExec$2;
3414
- var fails$5 = fails$o;
3456
+ var fails$5 = fails$p;
3415
3457
  var wellKnownSymbol$7 = wellKnownSymbol$m;
3416
3458
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$a;
3417
3459
 
@@ -3492,7 +3534,7 @@ var sameValue$1 = Object.is || function is(x, y) {
3492
3534
 
3493
3535
  var call$9 = functionCall;
3494
3536
  var anObject$a = anObject$l;
3495
- var isCallable$3 = isCallable$q;
3537
+ var isCallable$3 = isCallable$r;
3496
3538
  var classof$3 = classofRaw$2;
3497
3539
  var regexpExec = regexpExec$2;
3498
3540
 
@@ -3562,11 +3604,11 @@ var $$a = _export;
3562
3604
  var global$4 = global$q;
3563
3605
  var anInstance$2 = anInstance$4;
3564
3606
  var anObject$8 = anObject$l;
3565
- var isCallable$2 = isCallable$q;
3607
+ var isCallable$2 = isCallable$r;
3566
3608
  var getPrototypeOf = objectGetPrototypeOf;
3567
3609
  var defineBuiltInAccessor$4 = defineBuiltInAccessor$6;
3568
3610
  var createProperty$1 = createProperty$2;
3569
- var fails$4 = fails$o;
3611
+ var fails$4 = fails$p;
3570
3612
  var hasOwn$4 = hasOwnProperty_1;
3571
3613
  var wellKnownSymbol$6 = wellKnownSymbol$m;
3572
3614
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
@@ -3671,7 +3713,7 @@ $$8({ target: 'Iterator', proto: true, real: true }, {
3671
3713
  }
3672
3714
  });
3673
3715
 
3674
- var fails$3 = fails$o;
3716
+ var fails$3 = fails$p;
3675
3717
  var wellKnownSymbol$5 = wellKnownSymbol$m;
3676
3718
  var DESCRIPTORS$5 = descriptors;
3677
3719
  var IS_PURE$2 = isPure;
@@ -3713,7 +3755,7 @@ var urlConstructorDetection = !fails$3(function () {
3713
3755
  || new URL('http://x', undefined).host !== 'x';
3714
3756
  });
3715
3757
 
3716
- var defineBuiltIn$6 = defineBuiltIn$d;
3758
+ var defineBuiltIn$6 = defineBuiltIn$e;
3717
3759
 
3718
3760
  var defineBuiltIns$2 = function (target, src, options) {
3719
3761
  for (var key in src) defineBuiltIn$6(target, key, src[key], options);
@@ -3771,17 +3813,17 @@ var call$7 = functionCall;
3771
3813
  var uncurryThis$8 = functionUncurryThis;
3772
3814
  var DESCRIPTORS$4 = descriptors;
3773
3815
  var USE_NATIVE_URL$1 = urlConstructorDetection;
3774
- var defineBuiltIn$5 = defineBuiltIn$d;
3816
+ var defineBuiltIn$5 = defineBuiltIn$e;
3775
3817
  var defineBuiltInAccessor$3 = defineBuiltInAccessor$6;
3776
3818
  var defineBuiltIns$1 = defineBuiltIns$2;
3777
3819
  var setToStringTag$1 = setToStringTag$6;
3778
3820
  var createIteratorConstructor = iteratorCreateConstructor;
3779
3821
  var InternalStateModule$3 = internalState;
3780
3822
  var anInstance$1 = anInstance$4;
3781
- var isCallable$1 = isCallable$q;
3823
+ var isCallable$1 = isCallable$r;
3782
3824
  var hasOwn$3 = hasOwnProperty_1;
3783
3825
  var bind$2 = functionBindContext;
3784
- var classof$2 = classof$a;
3826
+ var classof$2 = classof$9;
3785
3827
  var anObject$5 = anObject$l;
3786
3828
  var isObject$1 = isObject$e;
3787
3829
  var $toString$2 = toString$b;
@@ -4178,7 +4220,7 @@ var web_urlSearchParams_constructor = {
4178
4220
  getState: getInternalParamsState
4179
4221
  };
4180
4222
 
4181
- var defineBuiltIn$4 = defineBuiltIn$d;
4223
+ var defineBuiltIn$4 = defineBuiltIn$e;
4182
4224
  var uncurryThis$7 = functionUncurryThis;
4183
4225
  var toString$6 = toString$b;
4184
4226
  var validateArgumentsLength$2 = validateArgumentsLength$5;
@@ -4227,7 +4269,7 @@ if (params$1 + '' !== 'a=2') {
4227
4269
  }, { enumerable: true, unsafe: true });
4228
4270
  }
4229
4271
 
4230
- var defineBuiltIn$3 = defineBuiltIn$d;
4272
+ var defineBuiltIn$3 = defineBuiltIn$e;
4231
4273
  var uncurryThis$6 = functionUncurryThis;
4232
4274
  var toString$5 = toString$b;
4233
4275
  var validateArgumentsLength$1 = validateArgumentsLength$5;
@@ -4355,7 +4397,7 @@ const PAGE_VIEW_EVENT_NAME = 'pageview';
4355
4397
 
4356
4398
  var $$6 = _export;
4357
4399
  var $includes = arrayIncludes.includes;
4358
- var fails$2 = fails$o;
4400
+ var fails$2 = fails$p;
4359
4401
  var addToUnscopables = addToUnscopables$2;
4360
4402
 
4361
4403
  // FF99+ bug
@@ -4415,8 +4457,8 @@ var toString$4 = toString$b;
4415
4457
  var getRegExpFlags$1 = regexpGetFlags;
4416
4458
  var stickyHelpers = regexpStickyHelpers;
4417
4459
  var proxyAccessor = proxyAccessor$2;
4418
- var defineBuiltIn$2 = defineBuiltIn$d;
4419
- var fails$1 = fails$o;
4460
+ var defineBuiltIn$2 = defineBuiltIn$e;
4461
+ var fails$1 = fails$p;
4420
4462
  var hasOwn$1 = hasOwnProperty_1;
4421
4463
  var enforceInternalState = internalState.enforce;
4422
4464
  var setSpecies = setSpecies$2;
@@ -4623,7 +4665,7 @@ if (DESCRIPTORS$1 && UNSUPPORTED_DOT_ALL) {
4623
4665
 
4624
4666
  var $$5 = _export;
4625
4667
  var call$5 = functionCall;
4626
- var isCallable = isCallable$q;
4668
+ var isCallable = isCallable$r;
4627
4669
  var anObject$4 = anObject$l;
4628
4670
  var toString$3 = toString$b;
4629
4671
 
@@ -4655,10 +4697,10 @@ $$5({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
4655
4697
  });
4656
4698
 
4657
4699
  var PROPER_FUNCTION_NAME = functionName.PROPER;
4658
- var defineBuiltIn$1 = defineBuiltIn$d;
4700
+ var defineBuiltIn$1 = defineBuiltIn$e;
4659
4701
  var anObject$3 = anObject$l;
4660
4702
  var $toString$1 = toString$b;
4661
- var fails = fails$o;
4703
+ var fails = fails$p;
4662
4704
  var getRegExpFlags = regexpGetFlags;
4663
4705
 
4664
4706
  var TO_STRING = 'toString';
@@ -5187,7 +5229,7 @@ var USE_NATIVE_URL = urlConstructorDetection;
5187
5229
  var global$1 = global$q;
5188
5230
  var bind = functionBindContext;
5189
5231
  var uncurryThis = functionUncurryThis;
5190
- var defineBuiltIn = defineBuiltIn$d;
5232
+ var defineBuiltIn = defineBuiltIn$e;
5191
5233
  var defineBuiltInAccessor = defineBuiltInAccessor$6;
5192
5234
  var anInstance = anInstance$4;
5193
5235
  var hasOwn = hasOwnProperty_1;
@@ -7327,7 +7369,12 @@ const DotExperimentsProvider = ({
7327
7369
  const insideEditor = (_getUVEState = getUVEState()) == null ? void 0 : _getUVEState.mode;
7328
7370
  if (!insideEditor) {
7329
7371
  const dotExperimentsInstance = DotExperiments.getInstance(config);
7330
- dotExperimentsInstance.ready().then(() => {
7372
+ dotExperimentsInstance.ready().catch(error => {
7373
+ if (config.debug) {
7374
+ console.error('DotExperimentsProvider: failed to initialize DotExperiments instance.', error);
7375
+ }
7376
+ }).finally(() => {
7377
+ // Expose the instance even on failure, so consumers stop waiting and render.
7331
7378
  setInstance(dotExperimentsInstance);
7332
7379
  });
7333
7380
  } else {