@ninetailed/experience.js 4.2.0-beta.0 → 4.2.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,10 +1,6 @@
1
- import unionBy from 'lodash/unionBy';
2
- import { FEATURES, logger, ConsoleLogSink, buildPageEvent, buildTrackEvent, buildIdentifyEvent, NinetailedApiClient, OnLogLogSink, OnErrorLogSink, PageviewProperties, Properties, Traits, pipe } from '@ninetailed/experience.js-shared';
1
+ import { FEATURES, logger, ConsoleLogSink, buildPageEvent, buildTrackEvent, buildIdentifyEvent, unionBy, NinetailedApiClient, OnLogLogSink, OnErrorLogSink, PageviewProperties, Properties, Traits, pipe } from '@ninetailed/experience.js-shared';
3
2
  export { EXPERIENCE_TRAIT_PREFIX, isExperienceMatch, selectActiveExperiments, selectDistribution, selectEligibleExperiences, selectExperience, selectBaselineWithVariants as selectExperienceBaselineWithVariants, selectVariant as selectExperienceVariant, selectVariants as selectExperienceVariants, selectHasVariants as selectHasExperienceVariants } from '@ninetailed/experience.js-shared';
4
3
  import Analytics from 'analytics';
5
- import flatten from 'lodash/flatten';
6
- import find from 'lodash/find';
7
- import includes from 'lodash/includes';
8
4
  import { z } from 'zod';
9
5
 
10
6
  const HAS_SEEN_EXPERIENCE = 'has_seen_experience';
@@ -110,7 +106,7 @@ var classofRaw$2 = function (it) {
110
106
 
111
107
  var uncurryThis$f = functionUncurryThis;
112
108
  var fails$e = fails$h;
113
- var classof$6 = classofRaw$2;
109
+ var classof$7 = classofRaw$2;
114
110
 
115
111
  var $Object$4 = Object;
116
112
  var split = uncurryThis$f(''.split);
@@ -121,7 +117,7 @@ var indexedObject = fails$e(function () {
121
117
  // eslint-disable-next-line no-prototype-builtins -- safe
122
118
  return !$Object$4('z').propertyIsEnumerable(0);
123
119
  }) ? function (it) {
124
- return classof$6(it) == 'String' ? split(it, '') : $Object$4(it);
120
+ return classof$7(it) == 'String' ? split(it, '') : $Object$4(it);
125
121
  } : $Object$4;
126
122
 
127
123
  // we can't use just `it == null` since of `document.all` special case
@@ -132,12 +128,12 @@ var isNullOrUndefined$4 = function (it) {
132
128
 
133
129
  var isNullOrUndefined$3 = isNullOrUndefined$4;
134
130
 
135
- var $TypeError$e = TypeError;
131
+ var $TypeError$f = TypeError;
136
132
 
137
133
  // `RequireObjectCoercible` abstract operation
138
134
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
139
135
  var requireObjectCoercible$4 = function (it) {
140
- if (isNullOrUndefined$3(it)) throw $TypeError$e("Can't call method on " + it);
136
+ if (isNullOrUndefined$3(it)) throw $TypeError$f("Can't call method on " + it);
141
137
  return it;
142
138
  };
143
139
 
@@ -176,7 +172,7 @@ var $documentAll = documentAll_1;
176
172
 
177
173
  var documentAll = $documentAll.all;
178
174
 
179
- var isObject$9 = $documentAll.IS_HTMLDDA ? function (it) {
175
+ var isObject$a = $documentAll.IS_HTMLDDA ? function (it) {
180
176
  return typeof it == 'object' ? it !== null : isCallable$j(it) || it === documentAll;
181
177
  } : function (it) {
182
178
  return typeof it == 'object' ? it !== null : isCallable$j(it);
@@ -279,12 +275,12 @@ var tryToString$4 = function (argument) {
279
275
  var isCallable$g = isCallable$k;
280
276
  var tryToString$3 = tryToString$4;
281
277
 
282
- var $TypeError$d = TypeError;
278
+ var $TypeError$e = TypeError;
283
279
 
284
280
  // `Assert: IsCallable(argument) is true`
285
281
  var aCallable$8 = function (argument) {
286
282
  if (isCallable$g(argument)) return argument;
287
- throw $TypeError$d(tryToString$3(argument) + ' is not a function');
283
+ throw $TypeError$e(tryToString$3(argument) + ' is not a function');
288
284
  };
289
285
 
290
286
  var aCallable$7 = aCallable$8;
@@ -299,18 +295,18 @@ var getMethod$3 = function (V, P) {
299
295
 
300
296
  var call$d = functionCall;
301
297
  var isCallable$f = isCallable$k;
302
- var isObject$8 = isObject$9;
298
+ var isObject$9 = isObject$a;
303
299
 
304
- var $TypeError$c = TypeError;
300
+ var $TypeError$d = TypeError;
305
301
 
306
302
  // `OrdinaryToPrimitive` abstract operation
307
303
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
308
304
  var ordinaryToPrimitive$1 = function (input, pref) {
309
305
  var fn, val;
310
- if (pref === 'string' && isCallable$f(fn = input.toString) && !isObject$8(val = call$d(fn, input))) return val;
311
- if (isCallable$f(fn = input.valueOf) && !isObject$8(val = call$d(fn, input))) return val;
312
- if (pref !== 'string' && isCallable$f(fn = input.toString) && !isObject$8(val = call$d(fn, input))) return val;
313
- throw $TypeError$c("Can't convert object to primitive value");
306
+ if (pref === 'string' && isCallable$f(fn = input.toString) && !isObject$9(val = call$d(fn, input))) return val;
307
+ if (isCallable$f(fn = input.valueOf) && !isObject$9(val = call$d(fn, input))) return val;
308
+ if (pref !== 'string' && isCallable$f(fn = input.toString) && !isObject$9(val = call$d(fn, input))) return val;
309
+ throw $TypeError$d("Can't convert object to primitive value");
314
310
  };
315
311
 
316
312
  var shared$3 = {exports: {}};
@@ -354,12 +350,12 @@ var $Object$2 = Object;
354
350
 
355
351
  // `ToObject` abstract operation
356
352
  // https://tc39.es/ecma262/#sec-toobject
357
- var toObject$4 = function (argument) {
353
+ var toObject$5 = function (argument) {
358
354
  return $Object$2(requireObjectCoercible$2(argument));
359
355
  };
360
356
 
361
357
  var uncurryThis$d = functionUncurryThis;
362
- var toObject$3 = toObject$4;
358
+ var toObject$4 = toObject$5;
363
359
 
364
360
  var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
365
361
 
@@ -367,7 +363,7 @@ var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
367
363
  // https://tc39.es/ecma262/#sec-hasownproperty
368
364
  // eslint-disable-next-line es/no-object-hasown -- safe
369
365
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
370
- return hasOwnProperty(toObject$3(it), key);
366
+ return hasOwnProperty(toObject$4(it), key);
371
367
  };
372
368
 
373
369
  var uncurryThis$c = functionUncurryThis;
@@ -392,7 +388,7 @@ var Symbol$2 = global$f.Symbol;
392
388
  var symbolFor = Symbol$2 && Symbol$2['for'];
393
389
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
394
390
 
395
- var wellKnownSymbol$g = function (name) {
391
+ var wellKnownSymbol$h = function (name) {
396
392
  if (!hasOwn$a(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
397
393
  var description = 'Symbol.' + name;
398
394
  if (NATIVE_SYMBOL && hasOwn$a(Symbol$2, name)) {
@@ -406,26 +402,26 @@ var wellKnownSymbol$g = function (name) {
406
402
  };
407
403
 
408
404
  var call$c = functionCall;
409
- var isObject$7 = isObject$9;
405
+ var isObject$8 = isObject$a;
410
406
  var isSymbol$1 = isSymbol$2;
411
407
  var getMethod$2 = getMethod$3;
412
408
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
413
- var wellKnownSymbol$f = wellKnownSymbol$g;
409
+ var wellKnownSymbol$g = wellKnownSymbol$h;
414
410
 
415
- var $TypeError$b = TypeError;
416
- var TO_PRIMITIVE = wellKnownSymbol$f('toPrimitive');
411
+ var $TypeError$c = TypeError;
412
+ var TO_PRIMITIVE = wellKnownSymbol$g('toPrimitive');
417
413
 
418
414
  // `ToPrimitive` abstract operation
419
415
  // https://tc39.es/ecma262/#sec-toprimitive
420
416
  var toPrimitive$1 = function (input, pref) {
421
- if (!isObject$7(input) || isSymbol$1(input)) return input;
417
+ if (!isObject$8(input) || isSymbol$1(input)) return input;
422
418
  var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
423
419
  var result;
424
420
  if (exoticToPrim) {
425
421
  if (pref === undefined) pref = 'default';
426
422
  result = call$c(exoticToPrim, input, pref);
427
- if (!isObject$7(result) || isSymbol$1(result)) return result;
428
- throw $TypeError$b("Can't convert object to primitive value");
423
+ if (!isObject$8(result) || isSymbol$1(result)) return result;
424
+ throw $TypeError$c("Can't convert object to primitive value");
429
425
  }
430
426
  if (pref === undefined) pref = 'number';
431
427
  return ordinaryToPrimitive(input, pref);
@@ -442,11 +438,11 @@ var toPropertyKey$2 = function (argument) {
442
438
  };
443
439
 
444
440
  var global$e = global$k;
445
- var isObject$6 = isObject$9;
441
+ var isObject$7 = isObject$a;
446
442
 
447
443
  var document$3 = global$e.document;
448
444
  // typeof document.createElement is 'object' in old IE
449
- var EXISTS$1 = isObject$6(document$3) && isObject$6(document$3.createElement);
445
+ var EXISTS$1 = isObject$7(document$3) && isObject$7(document$3.createElement);
450
446
 
451
447
  var documentCreateElement$2 = function (it) {
452
448
  return EXISTS$1 ? document$3.createElement(it) : {};
@@ -502,15 +498,15 @@ var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$b(function () {
502
498
  }).prototype != 42;
503
499
  });
504
500
 
505
- var isObject$5 = isObject$9;
501
+ var isObject$6 = isObject$a;
506
502
 
507
503
  var $String$2 = String;
508
- var $TypeError$a = TypeError;
504
+ var $TypeError$b = TypeError;
509
505
 
510
506
  // `Assert: Type(argument) is Object`
511
507
  var anObject$c = function (argument) {
512
- if (isObject$5(argument)) return argument;
513
- throw $TypeError$a($String$2(argument) + ' is not an object');
508
+ if (isObject$6(argument)) return argument;
509
+ throw $TypeError$b($String$2(argument) + ' is not an object');
514
510
  };
515
511
 
516
512
  var DESCRIPTORS$7 = descriptors;
@@ -519,7 +515,7 @@ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
519
515
  var anObject$b = anObject$c;
520
516
  var toPropertyKey = toPropertyKey$2;
521
517
 
522
- var $TypeError$9 = TypeError;
518
+ var $TypeError$a = TypeError;
523
519
  // eslint-disable-next-line es/no-object-defineproperty -- safe
524
520
  var $defineProperty = Object.defineProperty;
525
521
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -552,7 +548,7 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
552
548
  if (IE8_DOM_DEFINE) try {
553
549
  return $defineProperty(O, P, Attributes);
554
550
  } catch (error) { /* empty */ }
555
- if ('get' in Attributes || 'set' in Attributes) throw $TypeError$9('Accessors not supported');
551
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$a('Accessors not supported');
556
552
  if ('value' in Attributes) O[P] = Attributes.value;
557
553
  return O;
558
554
  };
@@ -623,7 +619,7 @@ var hiddenKeys$4 = {};
623
619
 
624
620
  var NATIVE_WEAK_MAP = weakMapBasicDetection;
625
621
  var global$c = global$k;
626
- var isObject$4 = isObject$9;
622
+ var isObject$5 = isObject$a;
627
623
  var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
628
624
  var hasOwn$7 = hasOwnProperty_1;
629
625
  var shared = sharedStore;
@@ -642,7 +638,7 @@ var enforce = function (it) {
642
638
  var getterFor = function (TYPE) {
643
639
  return function (it) {
644
640
  var state;
645
- if (!isObject$4(it) || (state = get(it)).type !== TYPE) {
641
+ if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
646
642
  throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
647
643
  } return state;
648
644
  };
@@ -787,13 +783,13 @@ var trunc = mathTrunc;
787
783
 
788
784
  // `ToIntegerOrInfinity` abstract operation
789
785
  // https://tc39.es/ecma262/#sec-tointegerorinfinity
790
- var toIntegerOrInfinity$2 = function (argument) {
786
+ var toIntegerOrInfinity$3 = function (argument) {
791
787
  var number = +argument;
792
788
  // eslint-disable-next-line no-self-compare -- NaN check
793
789
  return number !== number || number === 0 ? 0 : trunc(number);
794
790
  };
795
791
 
796
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
792
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
797
793
 
798
794
  var max = Math.max;
799
795
  var min$1 = Math.min;
@@ -802,37 +798,37 @@ var min$1 = Math.min;
802
798
  // Let integer be ? ToInteger(index).
803
799
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
804
800
  var toAbsoluteIndex$1 = function (index, length) {
805
- var integer = toIntegerOrInfinity$1(index);
801
+ var integer = toIntegerOrInfinity$2(index);
806
802
  return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
807
803
  };
808
804
 
809
- var toIntegerOrInfinity = toIntegerOrInfinity$2;
805
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
810
806
 
811
807
  var min = Math.min;
812
808
 
813
809
  // `ToLength` abstract operation
814
810
  // https://tc39.es/ecma262/#sec-tolength
815
811
  var toLength$1 = function (argument) {
816
- return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
812
+ return argument > 0 ? min(toIntegerOrInfinity$1(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
817
813
  };
818
814
 
819
815
  var toLength = toLength$1;
820
816
 
821
817
  // `LengthOfArrayLike` abstract operation
822
818
  // https://tc39.es/ecma262/#sec-lengthofarraylike
823
- var lengthOfArrayLike$3 = function (obj) {
819
+ var lengthOfArrayLike$5 = function (obj) {
824
820
  return toLength(obj.length);
825
821
  };
826
822
 
827
823
  var toIndexedObject$3 = toIndexedObject$5;
828
824
  var toAbsoluteIndex = toAbsoluteIndex$1;
829
- var lengthOfArrayLike$2 = lengthOfArrayLike$3;
825
+ var lengthOfArrayLike$4 = lengthOfArrayLike$5;
830
826
 
831
827
  // `Array.prototype.{ indexOf, includes }` methods implementation
832
828
  var createMethod$2 = function (IS_INCLUDES) {
833
829
  return function ($this, el, fromIndex) {
834
830
  var O = toIndexedObject$3($this);
835
- var length = lengthOfArrayLike$2(O);
831
+ var length = lengthOfArrayLike$4(O);
836
832
  var index = toAbsoluteIndex(fromIndex, length);
837
833
  var value;
838
834
  // Array#includes uses SameValueZero equality algorithm
@@ -1016,19 +1012,19 @@ var _export = function (options, source) {
1016
1012
  }
1017
1013
  };
1018
1014
 
1019
- var classof$5 = classofRaw$2;
1015
+ var classof$6 = classofRaw$2;
1020
1016
  var global$a = global$k;
1021
1017
 
1022
- var engineIsNode = classof$5(global$a.process) == 'process';
1018
+ var engineIsNode = classof$6(global$a.process) == 'process';
1023
1019
 
1024
1020
  var isCallable$9 = isCallable$k;
1025
1021
 
1026
1022
  var $String$1 = String;
1027
- var $TypeError$8 = TypeError;
1023
+ var $TypeError$9 = TypeError;
1028
1024
 
1029
1025
  var aPossiblePrototype$1 = function (argument) {
1030
1026
  if (typeof argument == 'object' || isCallable$9(argument)) return argument;
1031
- throw $TypeError$8("Can't set " + $String$1(argument) + ' as a prototype');
1027
+ throw $TypeError$9("Can't set " + $String$1(argument) + ' as a prototype');
1032
1028
  };
1033
1029
 
1034
1030
  /* eslint-disable no-proto -- safe */
@@ -1062,9 +1058,9 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1062
1058
 
1063
1059
  var defineProperty$3 = objectDefineProperty.f;
1064
1060
  var hasOwn$3 = hasOwnProperty_1;
1065
- var wellKnownSymbol$e = wellKnownSymbol$g;
1061
+ var wellKnownSymbol$f = wellKnownSymbol$h;
1066
1062
 
1067
- var TO_STRING_TAG$3 = wellKnownSymbol$e('toStringTag');
1063
+ var TO_STRING_TAG$3 = wellKnownSymbol$f('toStringTag');
1068
1064
 
1069
1065
  var setToStringTag$3 = function (target, TAG, STATIC) {
1070
1066
  if (target && !STATIC) target = target.prototype;
@@ -1075,17 +1071,17 @@ var setToStringTag$3 = function (target, TAG, STATIC) {
1075
1071
 
1076
1072
  var getBuiltIn$4 = getBuiltIn$8;
1077
1073
  var definePropertyModule$1 = objectDefineProperty;
1078
- var wellKnownSymbol$d = wellKnownSymbol$g;
1074
+ var wellKnownSymbol$e = wellKnownSymbol$h;
1079
1075
  var DESCRIPTORS$3 = descriptors;
1080
1076
 
1081
- var SPECIES$2 = wellKnownSymbol$d('species');
1077
+ var SPECIES$3 = wellKnownSymbol$e('species');
1082
1078
 
1083
1079
  var setSpecies$1 = function (CONSTRUCTOR_NAME) {
1084
1080
  var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
1085
1081
  var defineProperty = definePropertyModule$1.f;
1086
1082
 
1087
- if (DESCRIPTORS$3 && Constructor && !Constructor[SPECIES$2]) {
1088
- defineProperty(Constructor, SPECIES$2, {
1083
+ if (DESCRIPTORS$3 && Constructor && !Constructor[SPECIES$3]) {
1084
+ defineProperty(Constructor, SPECIES$3, {
1089
1085
  configurable: true,
1090
1086
  get: function () { return this; }
1091
1087
  });
@@ -1094,16 +1090,16 @@ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
1094
1090
 
1095
1091
  var isPrototypeOf$2 = objectIsPrototypeOf;
1096
1092
 
1097
- var $TypeError$7 = TypeError;
1093
+ var $TypeError$8 = TypeError;
1098
1094
 
1099
1095
  var anInstance$1 = function (it, Prototype) {
1100
1096
  if (isPrototypeOf$2(Prototype, it)) return it;
1101
- throw $TypeError$7('Incorrect invocation');
1097
+ throw $TypeError$8('Incorrect invocation');
1102
1098
  };
1103
1099
 
1104
- var wellKnownSymbol$c = wellKnownSymbol$g;
1100
+ var wellKnownSymbol$d = wellKnownSymbol$h;
1105
1101
 
1106
- var TO_STRING_TAG$2 = wellKnownSymbol$c('toStringTag');
1102
+ var TO_STRING_TAG$2 = wellKnownSymbol$d('toStringTag');
1107
1103
  var test = {};
1108
1104
 
1109
1105
  test[TO_STRING_TAG$2] = 'z';
@@ -1113,9 +1109,9 @@ var toStringTagSupport = String(test) === '[object z]';
1113
1109
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1114
1110
  var isCallable$8 = isCallable$k;
1115
1111
  var classofRaw$1 = classofRaw$2;
1116
- var wellKnownSymbol$b = wellKnownSymbol$g;
1112
+ var wellKnownSymbol$c = wellKnownSymbol$h;
1117
1113
 
1118
- var TO_STRING_TAG$1 = wellKnownSymbol$b('toStringTag');
1114
+ var TO_STRING_TAG$1 = wellKnownSymbol$c('toStringTag');
1119
1115
  var $Object$1 = Object;
1120
1116
 
1121
1117
  // ES3 wrong here
@@ -1129,7 +1125,7 @@ var tryGet = function (it, key) {
1129
1125
  };
1130
1126
 
1131
1127
  // getting tag from ES6+ `Object.prototype.toString`
1132
- var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1128
+ var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1133
1129
  var O, tag, result;
1134
1130
  return it === undefined ? 'Undefined' : it === null ? 'Null'
1135
1131
  // @@toStringTag case
@@ -1143,7 +1139,7 @@ var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1143
1139
  var uncurryThis$7 = functionUncurryThis;
1144
1140
  var fails$8 = fails$h;
1145
1141
  var isCallable$7 = isCallable$k;
1146
- var classof$3 = classof$4;
1142
+ var classof$4 = classof$5;
1147
1143
  var getBuiltIn$3 = getBuiltIn$8;
1148
1144
  var inspectSource$1 = inspectSource$3;
1149
1145
 
@@ -1166,7 +1162,7 @@ var isConstructorModern = function isConstructor(argument) {
1166
1162
 
1167
1163
  var isConstructorLegacy = function isConstructor(argument) {
1168
1164
  if (!isCallable$7(argument)) return false;
1169
- switch (classof$3(argument)) {
1165
+ switch (classof$4(argument)) {
1170
1166
  case 'AsyncFunction':
1171
1167
  case 'GeneratorFunction':
1172
1168
  case 'AsyncGeneratorFunction': return false;
@@ -1185,7 +1181,7 @@ isConstructorLegacy.sham = true;
1185
1181
 
1186
1182
  // `IsConstructor` abstract operation
1187
1183
  // https://tc39.es/ecma262/#sec-isconstructor
1188
- var isConstructor$1 = !construct || fails$8(function () {
1184
+ var isConstructor$2 = !construct || fails$8(function () {
1189
1185
  var called;
1190
1186
  return isConstructorModern(isConstructorModern.call)
1191
1187
  || !isConstructorModern(Object)
@@ -1193,30 +1189,30 @@ var isConstructor$1 = !construct || fails$8(function () {
1193
1189
  || called;
1194
1190
  }) ? isConstructorLegacy : isConstructorModern;
1195
1191
 
1196
- var isConstructor = isConstructor$1;
1192
+ var isConstructor$1 = isConstructor$2;
1197
1193
  var tryToString$2 = tryToString$4;
1198
1194
 
1199
- var $TypeError$6 = TypeError;
1195
+ var $TypeError$7 = TypeError;
1200
1196
 
1201
1197
  // `Assert: IsConstructor(argument) is true`
1202
1198
  var aConstructor$1 = function (argument) {
1203
- if (isConstructor(argument)) return argument;
1204
- throw $TypeError$6(tryToString$2(argument) + ' is not a constructor');
1199
+ if (isConstructor$1(argument)) return argument;
1200
+ throw $TypeError$7(tryToString$2(argument) + ' is not a constructor');
1205
1201
  };
1206
1202
 
1207
1203
  var anObject$8 = anObject$c;
1208
1204
  var aConstructor = aConstructor$1;
1209
1205
  var isNullOrUndefined$1 = isNullOrUndefined$4;
1210
- var wellKnownSymbol$a = wellKnownSymbol$g;
1206
+ var wellKnownSymbol$b = wellKnownSymbol$h;
1211
1207
 
1212
- var SPECIES$1 = wellKnownSymbol$a('species');
1208
+ var SPECIES$2 = wellKnownSymbol$b('species');
1213
1209
 
1214
1210
  // `SpeciesConstructor` abstract operation
1215
1211
  // https://tc39.es/ecma262/#sec-speciesconstructor
1216
1212
  var speciesConstructor$1 = function (O, defaultConstructor) {
1217
1213
  var C = anObject$8(O).constructor;
1218
1214
  var S;
1219
- return C === undefined || isNullOrUndefined$1(S = anObject$8(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
1215
+ return C === undefined || isNullOrUndefined$1(S = anObject$8(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
1220
1216
  };
1221
1217
 
1222
1218
  var NATIVE_BIND$1 = functionBindNative;
@@ -1244,12 +1240,12 @@ var uncurryThis$5 = functionUncurryThisClause;
1244
1240
  var aCallable$6 = aCallable$8;
1245
1241
  var NATIVE_BIND = functionBindNative;
1246
1242
 
1247
- var bind$4 = uncurryThis$5(uncurryThis$5.bind);
1243
+ var bind$5 = uncurryThis$5(uncurryThis$5.bind);
1248
1244
 
1249
1245
  // optional / simple context binding
1250
1246
  var functionBindContext = function (fn, that) {
1251
1247
  aCallable$6(fn);
1252
- return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
1248
+ return that === undefined ? fn : NATIVE_BIND ? bind$5(fn, that) : function (/* ...args */) {
1253
1249
  return fn.apply(that, arguments);
1254
1250
  };
1255
1251
  };
@@ -1262,10 +1258,10 @@ var uncurryThis$4 = functionUncurryThis;
1262
1258
 
1263
1259
  var arraySlice$1 = uncurryThis$4([].slice);
1264
1260
 
1265
- var $TypeError$5 = TypeError;
1261
+ var $TypeError$6 = TypeError;
1266
1262
 
1267
1263
  var validateArgumentsLength$1 = function (passed, required) {
1268
- if (passed < required) throw $TypeError$5('Not enough arguments');
1264
+ if (passed < required) throw $TypeError$6('Not enough arguments');
1269
1265
  return passed;
1270
1266
  };
1271
1267
 
@@ -1275,7 +1271,7 @@ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
1275
1271
 
1276
1272
  var global$9 = global$k;
1277
1273
  var apply = functionApply;
1278
- var bind$3 = functionBindContext;
1274
+ var bind$4 = functionBindContext;
1279
1275
  var isCallable$6 = isCallable$k;
1280
1276
  var hasOwn$2 = hasOwnProperty_1;
1281
1277
  var fails$7 = fails$h;
@@ -1357,7 +1353,7 @@ if (!set || !clear) {
1357
1353
  channel = new MessageChannel();
1358
1354
  port = channel.port2;
1359
1355
  channel.port1.onmessage = listener;
1360
- defer = bind$3(port.postMessage, port);
1356
+ defer = bind$4(port.postMessage, port);
1361
1357
  // Browsers with postMessage, skip WebWorkers
1362
1358
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
1363
1359
  } else if (
@@ -1400,7 +1396,7 @@ var userAgent = engineUserAgent;
1400
1396
  var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
1401
1397
 
1402
1398
  var global$7 = global$k;
1403
- var bind$2 = functionBindContext;
1399
+ var bind$3 = functionBindContext;
1404
1400
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1405
1401
  var macrotask = task$1.set;
1406
1402
  var IS_IOS = engineIsIos;
@@ -1452,7 +1448,7 @@ if (!queueMicrotask) {
1452
1448
  promise = Promise$1.resolve(undefined);
1453
1449
  // workaround of WebKit ~ iOS Safari 10.1 bug
1454
1450
  promise.constructor = Promise$1;
1455
- then = bind$2(promise.then, promise);
1451
+ then = bind$3(promise.then, promise);
1456
1452
  notify$1 = function () {
1457
1453
  then(flush);
1458
1454
  };
@@ -1469,7 +1465,7 @@ if (!queueMicrotask) {
1469
1465
  // - setTimeout
1470
1466
  } else {
1471
1467
  // strange IE + webpack dev server bug - use .bind(global)
1472
- macrotask = bind$2(macrotask, global$7);
1468
+ macrotask = bind$3(macrotask, global$7);
1473
1469
  notify$1 = function () {
1474
1470
  macrotask(flush);
1475
1471
  };
@@ -1546,13 +1542,13 @@ var NativePromiseConstructor$3 = promiseNativeConstructor;
1546
1542
  var isCallable$5 = isCallable$k;
1547
1543
  var isForced = isForced_1;
1548
1544
  var inspectSource = inspectSource$3;
1549
- var wellKnownSymbol$9 = wellKnownSymbol$g;
1545
+ var wellKnownSymbol$a = wellKnownSymbol$h;
1550
1546
  var IS_BROWSER = engineIsBrowser;
1551
1547
  var IS_DENO = engineIsDeno;
1552
1548
  var V8_VERSION = engineV8Version;
1553
1549
 
1554
1550
  NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
1555
- var SPECIES = wellKnownSymbol$9('species');
1551
+ var SPECIES$1 = wellKnownSymbol$a('species');
1556
1552
  var SUBCLASSING = false;
1557
1553
  var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$5(global$4.PromiseRejectionEvent);
1558
1554
 
@@ -1573,7 +1569,7 @@ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
1573
1569
  exec(function () { /* empty */ }, function () { /* empty */ });
1574
1570
  };
1575
1571
  var constructor = promise.constructor = {};
1576
- constructor[SPECIES] = FakePromise;
1572
+ constructor[SPECIES$1] = FakePromise;
1577
1573
  SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
1578
1574
  if (!SUBCLASSING) return true;
1579
1575
  // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
@@ -1590,12 +1586,12 @@ var newPromiseCapability$2 = {};
1590
1586
 
1591
1587
  var aCallable$5 = aCallable$8;
1592
1588
 
1593
- var $TypeError$4 = TypeError;
1589
+ var $TypeError$5 = TypeError;
1594
1590
 
1595
1591
  var PromiseCapability = function (C) {
1596
1592
  var resolve, reject;
1597
1593
  this.promise = new C(function ($$resolve, $$reject) {
1598
- if (resolve !== undefined || reject !== undefined) throw $TypeError$4('Bad Promise constructor');
1594
+ if (resolve !== undefined || reject !== undefined) throw $TypeError$5('Bad Promise constructor');
1599
1595
  resolve = $$resolve;
1600
1596
  reject = $$reject;
1601
1597
  });
@@ -1609,7 +1605,7 @@ newPromiseCapability$2.f = function (C) {
1609
1605
  return new PromiseCapability(C);
1610
1606
  };
1611
1607
 
1612
- var $$b = _export;
1608
+ var $$c = _export;
1613
1609
  var IS_NODE$1 = engineIsNode;
1614
1610
  var global$3 = global$k;
1615
1611
  var call$9 = functionCall;
@@ -1619,7 +1615,7 @@ var setToStringTag$2 = setToStringTag$3;
1619
1615
  var setSpecies = setSpecies$1;
1620
1616
  var aCallable$4 = aCallable$8;
1621
1617
  var isCallable$4 = isCallable$k;
1622
- var isObject$3 = isObject$9;
1618
+ var isObject$4 = isObject$a;
1623
1619
  var anInstance = anInstance$1;
1624
1620
  var speciesConstructor = speciesConstructor$1;
1625
1621
  var task = task$1.set;
@@ -1661,7 +1657,7 @@ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
1661
1657
  // helpers
1662
1658
  var isThenable = function (it) {
1663
1659
  var then;
1664
- return isObject$3(it) && isCallable$4(then = it.then) ? then : false;
1660
+ return isObject$4(it) && isCallable$4(then = it.then) ? then : false;
1665
1661
  };
1666
1662
 
1667
1663
  var callReaction = function (reaction, state) {
@@ -1758,7 +1754,7 @@ var onHandleUnhandled = function (state) {
1758
1754
  });
1759
1755
  };
1760
1756
 
1761
- var bind$1 = function (fn, state, unwrap) {
1757
+ var bind$2 = function (fn, state, unwrap) {
1762
1758
  return function (value) {
1763
1759
  fn(state, value, unwrap);
1764
1760
  };
@@ -1785,8 +1781,8 @@ var internalResolve = function (state, value, unwrap) {
1785
1781
  var wrapper = { done: false };
1786
1782
  try {
1787
1783
  call$9(then, value,
1788
- bind$1(internalResolve, wrapper, state),
1789
- bind$1(internalReject, wrapper, state)
1784
+ bind$2(internalResolve, wrapper, state),
1785
+ bind$2(internalReject, wrapper, state)
1790
1786
  );
1791
1787
  } catch (error) {
1792
1788
  internalReject(wrapper, error, state);
@@ -1811,7 +1807,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
1811
1807
  call$9(Internal, this);
1812
1808
  var state = getInternalPromiseState(this);
1813
1809
  try {
1814
- executor(bind$1(internalResolve, state), bind$1(internalReject, state));
1810
+ executor(bind$2(internalResolve, state), bind$2(internalReject, state));
1815
1811
  } catch (error) {
1816
1812
  internalReject(state, error);
1817
1813
  }
@@ -1853,8 +1849,8 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
1853
1849
  var promise = new Internal();
1854
1850
  var state = getInternalPromiseState(promise);
1855
1851
  this.promise = promise;
1856
- this.resolve = bind$1(internalResolve, state);
1857
- this.reject = bind$1(internalReject, state);
1852
+ this.resolve = bind$2(internalResolve, state);
1853
+ this.reject = bind$2(internalReject, state);
1858
1854
  };
1859
1855
 
1860
1856
  newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
@@ -1889,7 +1885,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
1889
1885
  }
1890
1886
  }
1891
1887
 
1892
- $$b({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
1888
+ $$c({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
1893
1889
  Promise: PromiseConstructor
1894
1890
  });
1895
1891
 
@@ -1898,10 +1894,10 @@ setSpecies(PROMISE);
1898
1894
 
1899
1895
  var iterators = {};
1900
1896
 
1901
- var wellKnownSymbol$8 = wellKnownSymbol$g;
1897
+ var wellKnownSymbol$9 = wellKnownSymbol$h;
1902
1898
  var Iterators$4 = iterators;
1903
1899
 
1904
- var ITERATOR$6 = wellKnownSymbol$8('iterator');
1900
+ var ITERATOR$6 = wellKnownSymbol$9('iterator');
1905
1901
  var ArrayPrototype$1 = Array.prototype;
1906
1902
 
1907
1903
  // check on default Array iterator
@@ -1909,18 +1905,18 @@ var isArrayIteratorMethod$1 = function (it) {
1909
1905
  return it !== undefined && (Iterators$4.Array === it || ArrayPrototype$1[ITERATOR$6] === it);
1910
1906
  };
1911
1907
 
1912
- var classof$2 = classof$4;
1908
+ var classof$3 = classof$5;
1913
1909
  var getMethod$1 = getMethod$3;
1914
1910
  var isNullOrUndefined = isNullOrUndefined$4;
1915
1911
  var Iterators$3 = iterators;
1916
- var wellKnownSymbol$7 = wellKnownSymbol$g;
1912
+ var wellKnownSymbol$8 = wellKnownSymbol$h;
1917
1913
 
1918
- var ITERATOR$5 = wellKnownSymbol$7('iterator');
1914
+ var ITERATOR$5 = wellKnownSymbol$8('iterator');
1919
1915
 
1920
1916
  var getIteratorMethod$2 = function (it) {
1921
1917
  if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$5)
1922
1918
  || getMethod$1(it, '@@iterator')
1923
- || Iterators$3[classof$2(it)];
1919
+ || Iterators$3[classof$3(it)];
1924
1920
  };
1925
1921
 
1926
1922
  var call$8 = functionCall;
@@ -1929,12 +1925,12 @@ var anObject$7 = anObject$c;
1929
1925
  var tryToString$1 = tryToString$4;
1930
1926
  var getIteratorMethod$1 = getIteratorMethod$2;
1931
1927
 
1932
- var $TypeError$3 = TypeError;
1928
+ var $TypeError$4 = TypeError;
1933
1929
 
1934
1930
  var getIterator$1 = function (argument, usingIterator) {
1935
1931
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
1936
1932
  if (aCallable$3(iteratorMethod)) return anObject$7(call$8(iteratorMethod, argument));
1937
- throw $TypeError$3(tryToString$1(argument) + ' is not iterable');
1933
+ throw $TypeError$4(tryToString$1(argument) + ' is not iterable');
1938
1934
  };
1939
1935
 
1940
1936
  var call$7 = functionCall;
@@ -1961,18 +1957,18 @@ var iteratorClose$1 = function (iterator, kind, value) {
1961
1957
  return value;
1962
1958
  };
1963
1959
 
1964
- var bind = functionBindContext;
1960
+ var bind$1 = functionBindContext;
1965
1961
  var call$6 = functionCall;
1966
1962
  var anObject$5 = anObject$c;
1967
1963
  var tryToString = tryToString$4;
1968
1964
  var isArrayIteratorMethod = isArrayIteratorMethod$1;
1969
- var lengthOfArrayLike$1 = lengthOfArrayLike$3;
1965
+ var lengthOfArrayLike$3 = lengthOfArrayLike$5;
1970
1966
  var isPrototypeOf$1 = objectIsPrototypeOf;
1971
1967
  var getIterator = getIterator$1;
1972
1968
  var getIteratorMethod = getIteratorMethod$2;
1973
1969
  var iteratorClose = iteratorClose$1;
1974
1970
 
1975
- var $TypeError$2 = TypeError;
1971
+ var $TypeError$3 = TypeError;
1976
1972
 
1977
1973
  var Result = function (stopped, result) {
1978
1974
  this.stopped = stopped;
@@ -1987,7 +1983,7 @@ var iterate$2 = function (iterable, unboundFunction, options) {
1987
1983
  var IS_RECORD = !!(options && options.IS_RECORD);
1988
1984
  var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1989
1985
  var INTERRUPTED = !!(options && options.INTERRUPTED);
1990
- var fn = bind(unboundFunction, that);
1986
+ var fn = bind$1(unboundFunction, that);
1991
1987
  var iterator, iterFn, index, length, result, next, step;
1992
1988
 
1993
1989
  var stop = function (condition) {
@@ -2008,10 +2004,10 @@ var iterate$2 = function (iterable, unboundFunction, options) {
2008
2004
  iterator = iterable;
2009
2005
  } else {
2010
2006
  iterFn = getIteratorMethod(iterable);
2011
- if (!iterFn) throw $TypeError$2(tryToString(iterable) + ' is not iterable');
2007
+ if (!iterFn) throw $TypeError$3(tryToString(iterable) + ' is not iterable');
2012
2008
  // optimisation for array iterators
2013
2009
  if (isArrayIteratorMethod(iterFn)) {
2014
- for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
2010
+ for (index = 0, length = lengthOfArrayLike$3(iterable); length > index; index++) {
2015
2011
  result = callFn(iterable[index]);
2016
2012
  if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
2017
2013
  } return new Result(false);
@@ -2030,9 +2026,9 @@ var iterate$2 = function (iterable, unboundFunction, options) {
2030
2026
  } return new Result(false);
2031
2027
  };
2032
2028
 
2033
- var wellKnownSymbol$6 = wellKnownSymbol$g;
2029
+ var wellKnownSymbol$7 = wellKnownSymbol$h;
2034
2030
 
2035
- var ITERATOR$4 = wellKnownSymbol$6('iterator');
2031
+ var ITERATOR$4 = wellKnownSymbol$7('iterator');
2036
2032
  var SAFE_CLOSING = false;
2037
2033
 
2038
2034
  try {
@@ -2077,7 +2073,7 @@ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCor
2077
2073
  NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
2078
2074
  });
2079
2075
 
2080
- var $$a = _export;
2076
+ var $$b = _export;
2081
2077
  var call$5 = functionCall;
2082
2078
  var aCallable$2 = aCallable$8;
2083
2079
  var newPromiseCapabilityModule$2 = newPromiseCapability$2;
@@ -2087,7 +2083,7 @@ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
2087
2083
 
2088
2084
  // `Promise.all` method
2089
2085
  // https://tc39.es/ecma262/#sec-promise.all
2090
- $$a({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
2086
+ $$b({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
2091
2087
  all: function all(iterable) {
2092
2088
  var C = this;
2093
2089
  var capability = newPromiseCapabilityModule$2.f(C);
@@ -2116,7 +2112,7 @@ $$a({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
2116
2112
  }
2117
2113
  });
2118
2114
 
2119
- var $$9 = _export;
2115
+ var $$a = _export;
2120
2116
  var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
2121
2117
  var NativePromiseConstructor = promiseNativeConstructor;
2122
2118
  var getBuiltIn$1 = getBuiltIn$8;
@@ -2127,7 +2123,7 @@ var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructo
2127
2123
 
2128
2124
  // `Promise.prototype.catch` method
2129
2125
  // https://tc39.es/ecma262/#sec-promise.prototype.catch
2130
- $$9({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
2126
+ $$a({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
2131
2127
  'catch': function (onRejected) {
2132
2128
  return this.then(undefined, onRejected);
2133
2129
  }
@@ -2141,7 +2137,7 @@ if (isCallable$3(NativePromiseConstructor)) {
2141
2137
  }
2142
2138
  }
2143
2139
 
2144
- var $$8 = _export;
2140
+ var $$9 = _export;
2145
2141
  var call$4 = functionCall;
2146
2142
  var aCallable$1 = aCallable$8;
2147
2143
  var newPromiseCapabilityModule$1 = newPromiseCapability$2;
@@ -2151,7 +2147,7 @@ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
2151
2147
 
2152
2148
  // `Promise.race` method
2153
2149
  // https://tc39.es/ecma262/#sec-promise.race
2154
- $$8({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
2150
+ $$9({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
2155
2151
  race: function race(iterable) {
2156
2152
  var C = this;
2157
2153
  var capability = newPromiseCapabilityModule$1.f(C);
@@ -2167,14 +2163,14 @@ $$8({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
2167
2163
  }
2168
2164
  });
2169
2165
 
2170
- var $$7 = _export;
2166
+ var $$8 = _export;
2171
2167
  var call$3 = functionCall;
2172
2168
  var newPromiseCapabilityModule = newPromiseCapability$2;
2173
2169
  var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
2174
2170
 
2175
2171
  // `Promise.reject` method
2176
2172
  // https://tc39.es/ecma262/#sec-promise.reject
2177
- $$7({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
2173
+ $$8({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
2178
2174
  reject: function reject(r) {
2179
2175
  var capability = newPromiseCapabilityModule.f(this);
2180
2176
  call$3(capability.reject, undefined, r);
@@ -2183,19 +2179,19 @@ $$7({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
2183
2179
  });
2184
2180
 
2185
2181
  var anObject$4 = anObject$c;
2186
- var isObject$2 = isObject$9;
2182
+ var isObject$3 = isObject$a;
2187
2183
  var newPromiseCapability = newPromiseCapability$2;
2188
2184
 
2189
2185
  var promiseResolve$1 = function (C, x) {
2190
2186
  anObject$4(C);
2191
- if (isObject$2(x) && x.constructor === C) return x;
2187
+ if (isObject$3(x) && x.constructor === C) return x;
2192
2188
  var promiseCapability = newPromiseCapability.f(C);
2193
2189
  var resolve = promiseCapability.resolve;
2194
2190
  resolve(x);
2195
2191
  return promiseCapability.promise;
2196
2192
  };
2197
2193
 
2198
- var $$6 = _export;
2194
+ var $$7 = _export;
2199
2195
  var getBuiltIn = getBuiltIn$8;
2200
2196
  var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
2201
2197
  var promiseResolve = promiseResolve$1;
@@ -2204,7 +2200,7 @@ getBuiltIn('Promise');
2204
2200
 
2205
2201
  // `Promise.resolve` method
2206
2202
  // https://tc39.es/ecma262/#sec-promise.resolve
2207
- $$6({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2203
+ $$7({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2208
2204
  resolve: function resolve(x) {
2209
2205
  return promiseResolve(this, x);
2210
2206
  }
@@ -2227,7 +2223,7 @@ var fails$6 = fails$h;
2227
2223
  var objectKeys$1 = objectKeys$2;
2228
2224
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
2229
2225
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
2230
- var toObject$2 = toObject$4;
2226
+ var toObject$3 = toObject$5;
2231
2227
  var IndexedObject$1 = indexedObject;
2232
2228
 
2233
2229
  // eslint-disable-next-line es/no-object-assign -- safe
@@ -2259,7 +2255,7 @@ var objectAssign = !$assign || fails$6(function () {
2259
2255
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
2260
2256
  return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
2261
2257
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
2262
- var T = toObject$2(target);
2258
+ var T = toObject$3(target);
2263
2259
  var argumentsLength = arguments.length;
2264
2260
  var index = 1;
2265
2261
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
@@ -2277,13 +2273,13 @@ var objectAssign = !$assign || fails$6(function () {
2277
2273
  } return T;
2278
2274
  } : $assign;
2279
2275
 
2280
- var $$5 = _export;
2276
+ var $$6 = _export;
2281
2277
  var assign = objectAssign;
2282
2278
 
2283
2279
  // `Object.assign` method
2284
2280
  // https://tc39.es/ecma262/#sec-object.assign
2285
2281
  // eslint-disable-next-line es/no-object-assign -- required for testing
2286
- $$5({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
2282
+ $$6({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
2287
2283
  assign: assign
2288
2284
  });
2289
2285
 
@@ -2395,11 +2391,11 @@ var objectCreate = Object.create || function create(O, Properties) {
2395
2391
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
2396
2392
  };
2397
2393
 
2398
- var wellKnownSymbol$5 = wellKnownSymbol$g;
2394
+ var wellKnownSymbol$6 = wellKnownSymbol$h;
2399
2395
  var create$1 = objectCreate;
2400
2396
  var defineProperty$1 = objectDefineProperty.f;
2401
2397
 
2402
- var UNSCOPABLES = wellKnownSymbol$5('unscopables');
2398
+ var UNSCOPABLES = wellKnownSymbol$6('unscopables');
2403
2399
  var ArrayPrototype = Array.prototype;
2404
2400
 
2405
2401
  // Array.prototype[@@unscopables]
@@ -2412,14 +2408,14 @@ if (ArrayPrototype[UNSCOPABLES] == undefined) {
2412
2408
  }
2413
2409
 
2414
2410
  // add a key to Array.prototype[@@unscopables]
2415
- var addToUnscopables$2 = function (key) {
2411
+ var addToUnscopables$3 = function (key) {
2416
2412
  ArrayPrototype[UNSCOPABLES][key] = true;
2417
2413
  };
2418
2414
 
2419
- var $$4 = _export;
2415
+ var $$5 = _export;
2420
2416
  var $includes = arrayIncludes.includes;
2421
2417
  var fails$5 = fails$h;
2422
- var addToUnscopables$1 = addToUnscopables$2;
2418
+ var addToUnscopables$2 = addToUnscopables$3;
2423
2419
 
2424
2420
  // FF99+ bug
2425
2421
  var BROKEN_ON_SPARSE = fails$5(function () {
@@ -2428,50 +2424,50 @@ var BROKEN_ON_SPARSE = fails$5(function () {
2428
2424
 
2429
2425
  // `Array.prototype.includes` method
2430
2426
  // https://tc39.es/ecma262/#sec-array.prototype.includes
2431
- $$4({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2427
+ $$5({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2432
2428
  includes: function includes(el /* , fromIndex = 0 */) {
2433
2429
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2434
2430
  }
2435
2431
  });
2436
2432
 
2437
2433
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2438
- addToUnscopables$1('includes');
2434
+ addToUnscopables$2('includes');
2439
2435
 
2440
- var isObject$1 = isObject$9;
2441
- var classof$1 = classofRaw$2;
2442
- var wellKnownSymbol$4 = wellKnownSymbol$g;
2436
+ var isObject$2 = isObject$a;
2437
+ var classof$2 = classofRaw$2;
2438
+ var wellKnownSymbol$5 = wellKnownSymbol$h;
2443
2439
 
2444
- var MATCH$1 = wellKnownSymbol$4('match');
2440
+ var MATCH$1 = wellKnownSymbol$5('match');
2445
2441
 
2446
2442
  // `IsRegExp` abstract operation
2447
2443
  // https://tc39.es/ecma262/#sec-isregexp
2448
2444
  var isRegexp = function (it) {
2449
2445
  var isRegExp;
2450
- return isObject$1(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) == 'RegExp');
2446
+ return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$2(it) == 'RegExp');
2451
2447
  };
2452
2448
 
2453
2449
  var isRegExp = isRegexp;
2454
2450
 
2455
- var $TypeError$1 = TypeError;
2451
+ var $TypeError$2 = TypeError;
2456
2452
 
2457
2453
  var notARegexp = function (it) {
2458
2454
  if (isRegExp(it)) {
2459
- throw $TypeError$1("The method doesn't accept regular expressions");
2455
+ throw $TypeError$2("The method doesn't accept regular expressions");
2460
2456
  } return it;
2461
2457
  };
2462
2458
 
2463
- var classof = classof$4;
2459
+ var classof$1 = classof$5;
2464
2460
 
2465
2461
  var $String = String;
2466
2462
 
2467
2463
  var toString$3 = function (argument) {
2468
- if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
2464
+ if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
2469
2465
  return $String(argument);
2470
2466
  };
2471
2467
 
2472
- var wellKnownSymbol$3 = wellKnownSymbol$g;
2468
+ var wellKnownSymbol$4 = wellKnownSymbol$h;
2473
2469
 
2474
- var MATCH = wellKnownSymbol$3('match');
2470
+ var MATCH = wellKnownSymbol$4('match');
2475
2471
 
2476
2472
  var correctIsRegexpLogic = function (METHOD_NAME) {
2477
2473
  var regexp = /./;
@@ -2485,7 +2481,7 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
2485
2481
  } return false;
2486
2482
  };
2487
2483
 
2488
- var $$3 = _export;
2484
+ var $$4 = _export;
2489
2485
  var uncurryThis$2 = functionUncurryThis;
2490
2486
  var notARegExp = notARegexp;
2491
2487
  var requireObjectCoercible$1 = requireObjectCoercible$4;
@@ -2496,7 +2492,7 @@ var stringIndexOf = uncurryThis$2(''.indexOf);
2496
2492
 
2497
2493
  // `String.prototype.includes` method
2498
2494
  // https://tc39.es/ecma262/#sec-string.prototype.includes
2499
- $$3({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
2495
+ $$4({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
2500
2496
  includes: function includes(searchString /* , position = 0 */) {
2501
2497
  return !!~stringIndexOf(
2502
2498
  toString$2(requireObjectCoercible$1(this)),
@@ -2684,7 +2680,6 @@ const ninetailedPlugin = ({
2684
2680
  instance.on(SET_ENABLED_FEATURES, ({
2685
2681
  payload
2686
2682
  }) => {
2687
- console.log('setEnabledFeatues');
2688
2683
  enabledFeatures = payload.features || [];
2689
2684
  });
2690
2685
  logger.debug('Ninetailed Core plugin initialized.');
@@ -2851,7 +2846,7 @@ var correctPrototypeGetter = !fails$3(function () {
2851
2846
 
2852
2847
  var hasOwn = hasOwnProperty_1;
2853
2848
  var isCallable$2 = isCallable$k;
2854
- var toObject$1 = toObject$4;
2849
+ var toObject$2 = toObject$5;
2855
2850
  var sharedKey = sharedKey$3;
2856
2851
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
2857
2852
 
@@ -2863,7 +2858,7 @@ var ObjectPrototype = $Object.prototype;
2863
2858
  // https://tc39.es/ecma262/#sec-object.getprototypeof
2864
2859
  // eslint-disable-next-line es/no-object-getprototypeof -- safe
2865
2860
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
2866
- var object = toObject$1(O);
2861
+ var object = toObject$2(O);
2867
2862
  if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
2868
2863
  var constructor = object.constructor;
2869
2864
  if (isCallable$2(constructor) && object instanceof constructor) {
@@ -2873,12 +2868,12 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : f
2873
2868
 
2874
2869
  var fails$2 = fails$h;
2875
2870
  var isCallable$1 = isCallable$k;
2876
- var isObject = isObject$9;
2871
+ var isObject$1 = isObject$a;
2877
2872
  var getPrototypeOf$1 = objectGetPrototypeOf;
2878
2873
  var defineBuiltIn$1 = defineBuiltIn$6;
2879
- var wellKnownSymbol$2 = wellKnownSymbol$g;
2874
+ var wellKnownSymbol$3 = wellKnownSymbol$h;
2880
2875
 
2881
- var ITERATOR$3 = wellKnownSymbol$2('iterator');
2876
+ var ITERATOR$3 = wellKnownSymbol$3('iterator');
2882
2877
  var BUGGY_SAFARI_ITERATORS$1 = false;
2883
2878
 
2884
2879
  // `%IteratorPrototype%` object
@@ -2896,7 +2891,7 @@ if ([].keys) {
2896
2891
  }
2897
2892
  }
2898
2893
 
2899
- var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$2(function () {
2894
+ var NEW_ITERATOR_PROTOTYPE = !isObject$1(IteratorPrototype$2) || fails$2(function () {
2900
2895
  var test = {};
2901
2896
  // FF44- legacy iterators case
2902
2897
  return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
@@ -2933,7 +2928,7 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
2933
2928
  return IteratorConstructor;
2934
2929
  };
2935
2930
 
2936
- var $$2 = _export;
2931
+ var $$3 = _export;
2937
2932
  var call = functionCall;
2938
2933
  var FunctionName = functionName;
2939
2934
  var isCallable = isCallable$k;
@@ -2943,7 +2938,7 @@ var setPrototypeOf = objectSetPrototypeOf;
2943
2938
  var setToStringTag = setToStringTag$3;
2944
2939
  var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
2945
2940
  var defineBuiltIn = defineBuiltIn$6;
2946
- var wellKnownSymbol$1 = wellKnownSymbol$g;
2941
+ var wellKnownSymbol$2 = wellKnownSymbol$h;
2947
2942
  var Iterators$1 = iterators;
2948
2943
  var IteratorsCore = iteratorsCore;
2949
2944
 
@@ -2951,7 +2946,7 @@ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
2951
2946
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
2952
2947
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
2953
2948
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
2954
- var ITERATOR$2 = wellKnownSymbol$1('iterator');
2949
+ var ITERATOR$2 = wellKnownSymbol$2('iterator');
2955
2950
  var KEYS = 'keys';
2956
2951
  var VALUES = 'values';
2957
2952
  var ENTRIES = 'entries';
@@ -3018,7 +3013,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
3018
3013
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
3019
3014
  defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
3020
3015
  }
3021
- } else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
3016
+ } else $$3({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
3022
3017
  }
3023
3018
 
3024
3019
  // define iterator
@@ -3037,7 +3032,7 @@ var createIterResultObject$1 = function (value, done) {
3037
3032
  };
3038
3033
 
3039
3034
  var toIndexedObject = toIndexedObject$5;
3040
- var addToUnscopables = addToUnscopables$2;
3035
+ var addToUnscopables$1 = addToUnscopables$3;
3041
3036
  var Iterators = iterators;
3042
3037
  var InternalStateModule = internalState;
3043
3038
  var defineProperty = objectDefineProperty.f;
@@ -3088,9 +3083,9 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
3088
3083
  var values = Iterators.Arguments = Iterators.Array;
3089
3084
 
3090
3085
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3091
- addToUnscopables('keys');
3092
- addToUnscopables('values');
3093
- addToUnscopables('entries');
3086
+ addToUnscopables$1('keys');
3087
+ addToUnscopables$1('values');
3088
+ addToUnscopables$1('entries');
3094
3089
 
3095
3090
  // V8 ~ Chrome 45- bug
3096
3091
  if (DESCRIPTORS && values.name !== 'values') try {
@@ -3146,10 +3141,10 @@ var DOMIterables = domIterables;
3146
3141
  var DOMTokenListPrototype = domTokenListPrototype;
3147
3142
  var ArrayIteratorMethods = es_array_iterator;
3148
3143
  var createNonEnumerableProperty = createNonEnumerableProperty$4;
3149
- var wellKnownSymbol = wellKnownSymbol$g;
3144
+ var wellKnownSymbol$1 = wellKnownSymbol$h;
3150
3145
 
3151
- var ITERATOR$1 = wellKnownSymbol('iterator');
3152
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
3146
+ var ITERATOR$1 = wellKnownSymbol$1('iterator');
3147
+ var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
3153
3148
  var ArrayValues = ArrayIteratorMethods.values;
3154
3149
 
3155
3150
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
@@ -3180,6 +3175,115 @@ for (var COLLECTION_NAME in DOMIterables) {
3180
3175
 
3181
3176
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
3182
3177
 
3178
+ var classof = classofRaw$2;
3179
+
3180
+ // `IsArray` abstract operation
3181
+ // https://tc39.es/ecma262/#sec-isarray
3182
+ // eslint-disable-next-line es/no-array-isarray -- safe
3183
+ var isArray$2 = Array.isArray || function isArray(argument) {
3184
+ return classof(argument) == 'Array';
3185
+ };
3186
+
3187
+ var $TypeError$1 = TypeError;
3188
+ var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
3189
+
3190
+ var doesNotExceedSafeInteger$1 = function (it) {
3191
+ if (it > MAX_SAFE_INTEGER) throw $TypeError$1('Maximum allowed index exceeded');
3192
+ return it;
3193
+ };
3194
+
3195
+ var isArray$1 = isArray$2;
3196
+ var lengthOfArrayLike$2 = lengthOfArrayLike$5;
3197
+ var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
3198
+ var bind = functionBindContext;
3199
+
3200
+ // `FlattenIntoArray` abstract operation
3201
+ // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
3202
+ var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
3203
+ var targetIndex = start;
3204
+ var sourceIndex = 0;
3205
+ var mapFn = mapper ? bind(mapper, thisArg) : false;
3206
+ var element, elementLen;
3207
+
3208
+ while (sourceIndex < sourceLen) {
3209
+ if (sourceIndex in source) {
3210
+ element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
3211
+
3212
+ if (depth > 0 && isArray$1(element)) {
3213
+ elementLen = lengthOfArrayLike$2(element);
3214
+ targetIndex = flattenIntoArray$1(target, original, element, elementLen, targetIndex, depth - 1) - 1;
3215
+ } else {
3216
+ doesNotExceedSafeInteger(targetIndex + 1);
3217
+ target[targetIndex] = element;
3218
+ }
3219
+
3220
+ targetIndex++;
3221
+ }
3222
+ sourceIndex++;
3223
+ }
3224
+ return targetIndex;
3225
+ };
3226
+
3227
+ var flattenIntoArray_1 = flattenIntoArray$1;
3228
+
3229
+ var isArray = isArray$2;
3230
+ var isConstructor = isConstructor$2;
3231
+ var isObject = isObject$a;
3232
+ var wellKnownSymbol = wellKnownSymbol$h;
3233
+
3234
+ var SPECIES = wellKnownSymbol('species');
3235
+ var $Array = Array;
3236
+
3237
+ // a part of `ArraySpeciesCreate` abstract operation
3238
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
3239
+ var arraySpeciesConstructor$1 = function (originalArray) {
3240
+ var C;
3241
+ if (isArray(originalArray)) {
3242
+ C = originalArray.constructor;
3243
+ // cross-realm fallback
3244
+ if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
3245
+ else if (isObject(C)) {
3246
+ C = C[SPECIES];
3247
+ if (C === null) C = undefined;
3248
+ }
3249
+ } return C === undefined ? $Array : C;
3250
+ };
3251
+
3252
+ var arraySpeciesConstructor = arraySpeciesConstructor$1;
3253
+
3254
+ // `ArraySpeciesCreate` abstract operation
3255
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
3256
+ var arraySpeciesCreate$1 = function (originalArray, length) {
3257
+ return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
3258
+ };
3259
+
3260
+ var $$2 = _export;
3261
+ var flattenIntoArray = flattenIntoArray_1;
3262
+ var toObject$1 = toObject$5;
3263
+ var lengthOfArrayLike$1 = lengthOfArrayLike$5;
3264
+ var toIntegerOrInfinity = toIntegerOrInfinity$3;
3265
+ var arraySpeciesCreate = arraySpeciesCreate$1;
3266
+
3267
+ // `Array.prototype.flat` method
3268
+ // https://tc39.es/ecma262/#sec-array.prototype.flat
3269
+ $$2({ target: 'Array', proto: true }, {
3270
+ flat: function flat(/* depthArg = 1 */) {
3271
+ var depthArg = arguments.length ? arguments[0] : undefined;
3272
+ var O = toObject$1(this);
3273
+ var sourceLen = lengthOfArrayLike$1(O);
3274
+ var A = arraySpeciesCreate(O, 0);
3275
+ A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
3276
+ return A;
3277
+ }
3278
+ });
3279
+
3280
+ // this method was added to unscopables after implementation
3281
+ // in popular engines, so it's moved to a separate module
3282
+ var addToUnscopables = addToUnscopables$3;
3283
+
3284
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3285
+ addToUnscopables('flat');
3286
+
3183
3287
  class Ninetailed {
3184
3288
  constructor(ninetailedApiClientInstanceOrOptions, {
3185
3289
  plugins,
@@ -3310,6 +3414,8 @@ class Ninetailed {
3310
3414
  environment,
3311
3415
  preview
3312
3416
  } = ninetailedApiClientInstanceOrOptions;
3417
+ this.clientId = clientId;
3418
+ this.environment = environment || 'main';
3313
3419
  this.apiClient = new NinetailedApiClient({
3314
3420
  clientId,
3315
3421
  environment,
@@ -3317,7 +3423,15 @@ class Ninetailed {
3317
3423
  preview
3318
3424
  });
3319
3425
  }
3320
- this.plugins = flatten(plugins || []);
3426
+ this.plugins = [...(plugins || []).map(plugin => {
3427
+ if ('setCredentials' in plugin && typeof plugin['setCredentials'] === 'function') {
3428
+ plugin['setCredentials']({
3429
+ clientId: this.clientId,
3430
+ environment: this.environment
3431
+ });
3432
+ }
3433
+ return plugin;
3434
+ }).flat()];
3321
3435
  if (profile) {
3322
3436
  this._profileState = {
3323
3437
  status: 'success',
@@ -3428,9 +3542,9 @@ const selectVariant = (baseline, variants, {
3428
3542
  error: error
3429
3543
  };
3430
3544
  }
3431
- const variant = find(variants, variant => {
3432
- var _a;
3433
- return includes(profile === null || profile === void 0 ? void 0 : profile.audiences, (_a = variant.audience) === null || _a === void 0 ? void 0 : _a.id);
3545
+ const variant = variants.find(variant => {
3546
+ var _a, _b;
3547
+ return (_a = profile === null || profile === void 0 ? void 0 : profile.audiences) === null || _a === void 0 ? void 0 : _a.includes((_b = variant.audience) === null || _b === void 0 ? void 0 : _b.id);
3434
3548
  });
3435
3549
  if (variant) {
3436
3550
  if ((options === null || options === void 0 ? void 0 : options.holdout) || -1 > (profile === null || profile === void 0 ? void 0 : profile.random)) {
@@ -3511,9 +3625,9 @@ const TrackComponentProperties = z.object({
3511
3625
  class NinetailedPlugin {}
3512
3626
 
3513
3627
  var aCallable = aCallable$8;
3514
- var toObject = toObject$4;
3628
+ var toObject = toObject$5;
3515
3629
  var IndexedObject = indexedObject;
3516
- var lengthOfArrayLike = lengthOfArrayLike$3;
3630
+ var lengthOfArrayLike = lengthOfArrayLike$5;
3517
3631
 
3518
3632
  var $TypeError = TypeError;
3519
3633