@ninetailed/experience.js-react 3.0.1-beta.4 → 3.0.2-beta.0

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.
@@ -1,70 +1,14 @@
1
- import React, { createContext, useMemo, useContext, useState, useRef, useEffect, useCallback } from 'react';
2
- import { Ninetailed, selectVariant, selectDistribution, selectHasExperienceVariants, selectActiveExperiments, selectExperience, selectExperienceVariant } from '@ninetailed/experience.js';
3
- import isEqual from 'lodash/isEqual';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import React, { createContext, useContext, useCallback, useMemo, useState, useRef, useEffect, createElement as createElement$1 } from 'react';
3
+ import { selectActiveExperiments, Ninetailed, selectVariant, selectDistribution, selectHasExperienceVariants, selectExperience, selectExperienceVariant } from '@ninetailed/experience.js';
4
+ import _debounce from 'lodash/debounce';
5
+ import values$1 from 'lodash/values';
4
6
  import { logger, isBrowser } from '@ninetailed/experience.js-shared';
7
+ import isEqual from 'lodash/isEqual';
5
8
  import { useInView } from 'react-intersection-observer';
6
9
  import get$1 from 'lodash/get';
7
10
  import has$1 from 'lodash/has';
8
11
 
9
- const NinetailedContext = /*#__PURE__*/createContext(undefined);
10
-
11
- const ExperimentsContext = /*#__PURE__*/createContext(undefined);
12
-
13
- const ExperimentsProvider = ({
14
- experiments,
15
- children
16
- }) => {
17
- return /*#__PURE__*/React.createElement(ExperimentsContext.Provider, {
18
- value: {
19
- experiments
20
- }
21
- }, children);
22
- };
23
-
24
- const NinetailedProvider = ({
25
- children,
26
- clientId,
27
- experiments: _experiments = [],
28
- environment,
29
- preview,
30
- url,
31
- profile,
32
- locale,
33
- requestTimeout,
34
- plugins: _plugins = [],
35
- onLog,
36
- onError
37
- }) => {
38
- const ninetailed = useMemo(() => new Ninetailed({
39
- clientId,
40
- environment,
41
- preview
42
- }, {
43
- url,
44
- plugins: _plugins,
45
- profile,
46
- locale,
47
- requestTimeout,
48
- onLog,
49
- onError
50
- }), []);
51
- return /*#__PURE__*/React.createElement(NinetailedContext.Provider, {
52
- value: ninetailed
53
- }, /*#__PURE__*/React.createElement(ExperimentsProvider, {
54
- experiments: _experiments
55
- }, children));
56
- };
57
-
58
- const useNinetailed = () => {
59
- const ninetailed = useContext(NinetailedContext);
60
-
61
- if (ninetailed === undefined) {
62
- throw new Error('The component using the the context must be a descendant of the NinetailedProvider');
63
- }
64
-
65
- return ninetailed;
66
- };
67
-
68
12
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
69
13
 
70
14
  var check = function (it) {
@@ -72,7 +16,7 @@ var check = function (it) {
72
16
  };
73
17
 
74
18
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
75
- var global$w =
19
+ var global$f =
76
20
  // eslint-disable-next-line es/no-global-this -- safe
77
21
  check(typeof globalThis == 'object' && globalThis) ||
78
22
  check(typeof window == 'object' && window) ||
@@ -82,7 +26,9 @@ var global$w =
82
26
  // eslint-disable-next-line no-new-func -- fallback
83
27
  (function () { return this; })() || Function('return this')();
84
28
 
85
- var fails$g = function (exec) {
29
+ var objectGetOwnPropertyDescriptor = {};
30
+
31
+ var fails$h = function (exec) {
86
32
  try {
87
33
  return !!exec();
88
34
  } catch (error) {
@@ -90,9 +36,18 @@ var fails$g = function (exec) {
90
36
  }
91
37
  };
92
38
 
93
- var fails$f = fails$g;
39
+ var fails$g = fails$h;
40
+
41
+ // Detect IE8's incomplete defineProperty implementation
42
+ var descriptors = !fails$g(function () {
43
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
44
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
45
+ });
46
+
47
+ var fails$f = fails$h;
94
48
 
95
49
  var functionBindNative = !fails$f(function () {
50
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
96
51
  var test = (function () { /* empty */ }).bind();
97
52
  // eslint-disable-next-line no-prototype-builtins -- safe
98
53
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -100,16 +55,46 @@ var functionBindNative = !fails$f(function () {
100
55
 
101
56
  var NATIVE_BIND$2 = functionBindNative;
102
57
 
58
+ var call$a = Function.prototype.call;
59
+
60
+ var functionCall = NATIVE_BIND$2 ? call$a.bind(call$a) : function () {
61
+ return call$a.apply(call$a, arguments);
62
+ };
63
+
64
+ var objectPropertyIsEnumerable = {};
65
+
66
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
67
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
68
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
69
+
70
+ // Nashorn ~ JDK8 bug
71
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
72
+
73
+ // `Object.prototype.propertyIsEnumerable` method implementation
74
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
75
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
76
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
77
+ return !!descriptor && descriptor.enumerable;
78
+ } : $propertyIsEnumerable;
79
+
80
+ var createPropertyDescriptor$3 = function (bitmap, value) {
81
+ return {
82
+ enumerable: !(bitmap & 1),
83
+ configurable: !(bitmap & 2),
84
+ writable: !(bitmap & 4),
85
+ value: value
86
+ };
87
+ };
88
+
89
+ var NATIVE_BIND$1 = functionBindNative;
90
+
103
91
  var FunctionPrototype$2 = Function.prototype;
104
- var bind = FunctionPrototype$2.bind;
105
- var call$a = FunctionPrototype$2.call;
106
- var uncurryThis$g = NATIVE_BIND$2 && bind.bind(call$a, call$a);
107
-
108
- var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
109
- return fn && uncurryThis$g(fn);
110
- } : function (fn) {
111
- return fn && function () {
112
- return call$a.apply(fn, arguments);
92
+ var call$9 = FunctionPrototype$2.call;
93
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$9, call$9);
94
+
95
+ var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
96
+ return function () {
97
+ return call$9.apply(fn, arguments);
113
98
  };
114
99
  };
115
100
 
@@ -118,35 +103,40 @@ var uncurryThis$f = functionUncurryThis;
118
103
  var toString$5 = uncurryThis$f({}.toString);
119
104
  var stringSlice$4 = uncurryThis$f(''.slice);
120
105
 
121
- var classofRaw$1 = function (it) {
106
+ var classofRaw$2 = function (it) {
122
107
  return stringSlice$4(toString$5(it), 8, -1);
123
108
  };
124
109
 
125
- var global$v = global$w;
126
110
  var uncurryThis$e = functionUncurryThis;
127
- var fails$e = fails$g;
128
- var classof$4 = classofRaw$1;
111
+ var fails$e = fails$h;
112
+ var classof$4 = classofRaw$2;
129
113
 
130
- var Object$5 = global$v.Object;
114
+ var $Object$4 = Object;
131
115
  var split = uncurryThis$e(''.split);
132
116
 
133
117
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
134
118
  var indexedObject = fails$e(function () {
135
119
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
136
120
  // eslint-disable-next-line no-prototype-builtins -- safe
137
- return !Object$5('z').propertyIsEnumerable(0);
121
+ return !$Object$4('z').propertyIsEnumerable(0);
138
122
  }) ? function (it) {
139
- return classof$4(it) == 'String' ? split(it, '') : Object$5(it);
140
- } : Object$5;
123
+ return classof$4(it) == 'String' ? split(it, '') : $Object$4(it);
124
+ } : $Object$4;
125
+
126
+ // we can't use just `it == null` since of `document.all` special case
127
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
128
+ var isNullOrUndefined$3 = function (it) {
129
+ return it === null || it === undefined;
130
+ };
141
131
 
142
- var global$u = global$w;
132
+ var isNullOrUndefined$2 = isNullOrUndefined$3;
143
133
 
144
- var TypeError$a = global$u.TypeError;
134
+ var $TypeError$8 = TypeError;
145
135
 
146
136
  // `RequireObjectCoercible` abstract operation
147
137
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
148
138
  var requireObjectCoercible$4 = function (it) {
149
- if (it == undefined) throw TypeError$a("Can't call method on " + it);
139
+ if (isNullOrUndefined$2(it)) throw $TypeError$8("Can't call method on " + it);
150
140
  return it;
151
141
  };
152
142
 
@@ -158,99 +148,63 @@ var toIndexedObject$5 = function (it) {
158
148
  return IndexedObject$2(requireObjectCoercible$3(it));
159
149
  };
160
150
 
161
- var shared$4 = {exports: {}};
162
-
163
- var global$t = global$w;
164
-
165
- // eslint-disable-next-line es/no-object-defineproperty -- safe
166
- var defineProperty$3 = Object.defineProperty;
167
-
168
- var setGlobal$3 = function (key, value) {
169
- try {
170
- defineProperty$3(global$t, key, { value: value, configurable: true, writable: true });
171
- } catch (error) {
172
- global$t[key] = value;
173
- } return value;
174
- };
175
-
176
- var global$s = global$w;
177
- var setGlobal$2 = setGlobal$3;
178
-
179
- var SHARED = '__core-js_shared__';
180
- var store$3 = global$s[SHARED] || setGlobal$2(SHARED, {});
181
-
182
- var sharedStore = store$3;
183
-
184
- var store$2 = sharedStore;
185
-
186
- (shared$4.exports = function (key, value) {
187
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
188
- })('versions', []).push({
189
- version: '3.21.1',
190
- mode: 'global',
191
- copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
192
- license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
193
- source: 'https://github.com/zloirock/core-js'
194
- });
195
-
196
- var global$r = global$w;
197
- var requireObjectCoercible$2 = requireObjectCoercible$4;
151
+ var documentAll$2 = typeof document == 'object' && document.all;
198
152
 
199
- var Object$4 = global$r.Object;
153
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
154
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
200
155
 
201
- // `ToObject` abstract operation
202
- // https://tc39.es/ecma262/#sec-toobject
203
- var toObject$5 = function (argument) {
204
- return Object$4(requireObjectCoercible$2(argument));
156
+ var documentAll_1 = {
157
+ all: documentAll$2,
158
+ IS_HTMLDDA: IS_HTMLDDA
205
159
  };
206
160
 
207
- var uncurryThis$d = functionUncurryThis;
208
- var toObject$4 = toObject$5;
161
+ var $documentAll$1 = documentAll_1;
209
162
 
210
- var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
163
+ var documentAll$1 = $documentAll$1.all;
211
164
 
212
- // `HasOwnProperty` abstract operation
213
- // https://tc39.es/ecma262/#sec-hasownproperty
214
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
215
- return hasOwnProperty(toObject$4(it), key);
165
+ // `IsCallable` abstract operation
166
+ // https://tc39.es/ecma262/#sec-iscallable
167
+ var isCallable$h = $documentAll$1.IS_HTMLDDA ? function (argument) {
168
+ return typeof argument == 'function' || argument === documentAll$1;
169
+ } : function (argument) {
170
+ return typeof argument == 'function';
216
171
  };
217
172
 
218
- var uncurryThis$c = functionUncurryThis;
219
-
220
- var id = 0;
221
- var postfix = Math.random();
222
- var toString$4 = uncurryThis$c(1.0.toString);
173
+ var isCallable$g = isCallable$h;
174
+ var $documentAll = documentAll_1;
223
175
 
224
- var uid$2 = function (key) {
225
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
226
- };
176
+ var documentAll = $documentAll.all;
227
177
 
228
- // `IsCallable` abstract operation
229
- // https://tc39.es/ecma262/#sec-iscallable
230
- var isCallable$g = function (argument) {
231
- return typeof argument == 'function';
178
+ var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
179
+ return typeof it == 'object' ? it !== null : isCallable$g(it) || it === documentAll;
180
+ } : function (it) {
181
+ return typeof it == 'object' ? it !== null : isCallable$g(it);
232
182
  };
233
183
 
234
- var global$q = global$w;
235
- var isCallable$f = isCallable$g;
184
+ var global$e = global$f;
185
+ var isCallable$f = isCallable$h;
236
186
 
237
187
  var aFunction = function (argument) {
238
188
  return isCallable$f(argument) ? argument : undefined;
239
189
  };
240
190
 
241
191
  var getBuiltIn$4 = function (namespace, method) {
242
- return arguments.length < 2 ? aFunction(global$q[namespace]) : global$q[namespace] && global$q[namespace][method];
192
+ return arguments.length < 2 ? aFunction(global$e[namespace]) : global$e[namespace] && global$e[namespace][method];
243
193
  };
244
194
 
195
+ var uncurryThis$d = functionUncurryThis;
196
+
197
+ var objectIsPrototypeOf = uncurryThis$d({}.isPrototypeOf);
198
+
245
199
  var getBuiltIn$3 = getBuiltIn$4;
246
200
 
247
201
  var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
248
202
 
249
- var global$p = global$w;
203
+ var global$d = global$f;
250
204
  var userAgent = engineUserAgent;
251
205
 
252
- var process = global$p.process;
253
- var Deno = global$p.Deno;
206
+ var process = global$d.process;
207
+ var Deno = global$d.Deno;
254
208
  var versions = process && process.versions || Deno && Deno.version;
255
209
  var v8 = versions && versions.v8;
256
210
  var match, version;
@@ -277,10 +231,10 @@ var engineV8Version = version;
277
231
  /* eslint-disable es/no-symbol -- required for testing */
278
232
 
279
233
  var V8_VERSION = engineV8Version;
280
- var fails$d = fails$g;
234
+ var fails$d = fails$h;
281
235
 
282
236
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
283
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$d(function () {
237
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
284
238
  var symbol = Symbol();
285
239
  // Chrome 38 Symbol has incorrect toString conversion
286
240
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -291,229 +245,284 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$d(function () {
291
245
 
292
246
  /* eslint-disable es/no-symbol -- required for testing */
293
247
 
294
- var NATIVE_SYMBOL$1 = nativeSymbol;
248
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
295
249
 
296
250
  var useSymbolAsUid = NATIVE_SYMBOL$1
297
251
  && !Symbol.sham
298
252
  && typeof Symbol.iterator == 'symbol';
299
253
 
300
- var global$o = global$w;
301
- var shared$3 = shared$4.exports;
302
- var hasOwn$8 = hasOwnProperty_1;
303
- var uid$1 = uid$2;
304
- var NATIVE_SYMBOL = nativeSymbol;
305
- var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
306
-
307
- var WellKnownSymbolsStore = shared$3('wks');
308
- var Symbol$1 = global$o.Symbol;
309
- var symbolFor = Symbol$1 && Symbol$1['for'];
310
- var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
311
-
312
- var wellKnownSymbol$a = function (name) {
313
- if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
314
- var description = 'Symbol.' + name;
315
- if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
316
- WellKnownSymbolsStore[name] = Symbol$1[name];
317
- } else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
318
- WellKnownSymbolsStore[name] = symbolFor(description);
319
- } else {
320
- WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
321
- }
322
- } return WellKnownSymbolsStore[name];
323
- };
324
-
325
- var isCallable$e = isCallable$g;
326
-
327
- var isObject$5 = function (it) {
328
- return typeof it == 'object' ? it !== null : isCallable$e(it);
329
- };
330
-
331
- var global$n = global$w;
332
- var isObject$4 = isObject$5;
333
-
334
- var String$4 = global$n.String;
335
- var TypeError$9 = global$n.TypeError;
336
-
337
- // `Assert: Type(argument) is Object`
338
- var anObject$8 = function (argument) {
339
- if (isObject$4(argument)) return argument;
340
- throw TypeError$9(String$4(argument) + ' is not an object');
341
- };
342
-
343
- var objectDefineProperties = {};
344
-
345
- var fails$c = fails$g;
346
-
347
- // Detect IE8's incomplete defineProperty implementation
348
- var descriptors = !fails$c(function () {
349
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
350
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
351
- });
352
-
353
- var DESCRIPTORS$8 = descriptors;
354
- var fails$b = fails$g;
355
-
356
- // V8 ~ Chrome 36-
357
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
358
- var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$b(function () {
359
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
360
- return Object.defineProperty(function () { /* empty */ }, 'prototype', {
361
- value: 42,
362
- writable: false
363
- }).prototype != 42;
364
- });
365
-
366
- var objectDefineProperty = {};
367
-
368
- var global$m = global$w;
369
- var isObject$3 = isObject$5;
370
-
371
- var document$1 = global$m.document;
372
- // typeof document.createElement is 'object' in old IE
373
- var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
374
-
375
- var documentCreateElement$2 = function (it) {
376
- return EXISTS$1 ? document$1.createElement(it) : {};
377
- };
378
-
379
- var DESCRIPTORS$7 = descriptors;
380
- var fails$a = fails$g;
381
- var createElement = documentCreateElement$2;
382
-
383
- // Thanks to IE8 for its funny defineProperty
384
- var ie8DomDefine = !DESCRIPTORS$7 && !fails$a(function () {
385
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
386
- return Object.defineProperty(createElement('div'), 'a', {
387
- get: function () { return 7; }
388
- }).a != 7;
389
- });
390
-
391
- var NATIVE_BIND$1 = functionBindNative;
392
-
393
- var call$9 = Function.prototype.call;
394
-
395
- var functionCall = NATIVE_BIND$1 ? call$9.bind(call$9) : function () {
396
- return call$9.apply(call$9, arguments);
397
- };
398
-
399
- var uncurryThis$b = functionUncurryThis;
400
-
401
- var objectIsPrototypeOf = uncurryThis$b({}.isPrototypeOf);
402
-
403
- var global$l = global$w;
404
254
  var getBuiltIn$2 = getBuiltIn$4;
405
- var isCallable$d = isCallable$g;
255
+ var isCallable$e = isCallable$h;
406
256
  var isPrototypeOf = objectIsPrototypeOf;
407
- var USE_SYMBOL_AS_UID = useSymbolAsUid;
257
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
408
258
 
409
- var Object$3 = global$l.Object;
259
+ var $Object$3 = Object;
410
260
 
411
- var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
261
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
412
262
  return typeof it == 'symbol';
413
263
  } : function (it) {
414
264
  var $Symbol = getBuiltIn$2('Symbol');
415
- return isCallable$d($Symbol) && isPrototypeOf($Symbol.prototype, Object$3(it));
265
+ return isCallable$e($Symbol) && isPrototypeOf($Symbol.prototype, $Object$3(it));
416
266
  };
417
267
 
418
- var global$k = global$w;
419
-
420
- var String$3 = global$k.String;
268
+ var $String$3 = String;
421
269
 
422
270
  var tryToString$1 = function (argument) {
423
271
  try {
424
- return String$3(argument);
272
+ return $String$3(argument);
425
273
  } catch (error) {
426
274
  return 'Object';
427
275
  }
428
276
  };
429
277
 
430
- var global$j = global$w;
431
- var isCallable$c = isCallable$g;
278
+ var isCallable$d = isCallable$h;
432
279
  var tryToString = tryToString$1;
433
280
 
434
- var TypeError$8 = global$j.TypeError;
281
+ var $TypeError$7 = TypeError;
435
282
 
436
283
  // `Assert: IsCallable(argument) is true`
437
284
  var aCallable$2 = function (argument) {
438
- if (isCallable$c(argument)) return argument;
439
- throw TypeError$8(tryToString(argument) + ' is not a function');
285
+ if (isCallable$d(argument)) return argument;
286
+ throw $TypeError$7(tryToString(argument) + ' is not a function');
440
287
  };
441
288
 
442
289
  var aCallable$1 = aCallable$2;
290
+ var isNullOrUndefined$1 = isNullOrUndefined$3;
443
291
 
444
292
  // `GetMethod` abstract operation
445
293
  // https://tc39.es/ecma262/#sec-getmethod
446
294
  var getMethod$2 = function (V, P) {
447
295
  var func = V[P];
448
- return func == null ? undefined : aCallable$1(func);
296
+ return isNullOrUndefined$1(func) ? undefined : aCallable$1(func);
449
297
  };
450
298
 
451
- var global$i = global$w;
452
299
  var call$8 = functionCall;
453
- var isCallable$b = isCallable$g;
454
- var isObject$2 = isObject$5;
300
+ var isCallable$c = isCallable$h;
301
+ var isObject$5 = isObject$6;
455
302
 
456
- var TypeError$7 = global$i.TypeError;
303
+ var $TypeError$6 = TypeError;
457
304
 
458
305
  // `OrdinaryToPrimitive` abstract operation
459
306
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
460
307
  var ordinaryToPrimitive$1 = function (input, pref) {
461
308
  var fn, val;
462
- if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$2(val = call$8(fn, input))) return val;
463
- if (isCallable$b(fn = input.valueOf) && !isObject$2(val = call$8(fn, input))) return val;
464
- if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$2(val = call$8(fn, input))) return val;
465
- throw TypeError$7("Can't convert object to primitive value");
309
+ if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$5(val = call$8(fn, input))) return val;
310
+ if (isCallable$c(fn = input.valueOf) && !isObject$5(val = call$8(fn, input))) return val;
311
+ if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$5(val = call$8(fn, input))) return val;
312
+ throw $TypeError$6("Can't convert object to primitive value");
466
313
  };
467
314
 
468
- var global$h = global$w;
469
- var call$7 = functionCall;
470
- var isObject$1 = isObject$5;
471
- var isSymbol$1 = isSymbol$2;
472
- var getMethod$1 = getMethod$2;
473
- var ordinaryToPrimitive = ordinaryToPrimitive$1;
474
- var wellKnownSymbol$9 = wellKnownSymbol$a;
315
+ var shared$4 = {exports: {}};
475
316
 
476
- var TypeError$6 = global$h.TypeError;
477
- var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
317
+ var global$c = global$f;
478
318
 
479
- // `ToPrimitive` abstract operation
480
- // https://tc39.es/ecma262/#sec-toprimitive
481
- var toPrimitive$1 = function (input, pref) {
482
- if (!isObject$1(input) || isSymbol$1(input)) return input;
483
- var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
484
- var result;
485
- if (exoticToPrim) {
486
- if (pref === undefined) pref = 'default';
487
- result = call$7(exoticToPrim, input, pref);
488
- if (!isObject$1(result) || isSymbol$1(result)) return result;
489
- throw TypeError$6("Can't convert object to primitive value");
490
- }
491
- if (pref === undefined) pref = 'number';
492
- return ordinaryToPrimitive(input, pref);
319
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
320
+ var defineProperty$5 = Object.defineProperty;
321
+
322
+ var defineGlobalProperty$3 = function (key, value) {
323
+ try {
324
+ defineProperty$5(global$c, key, { value: value, configurable: true, writable: true });
325
+ } catch (error) {
326
+ global$c[key] = value;
327
+ } return value;
493
328
  };
494
329
 
495
- var toPrimitive = toPrimitive$1;
496
- var isSymbol = isSymbol$2;
330
+ var global$b = global$f;
331
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
497
332
 
498
- // `ToPropertyKey` abstract operation
499
- // https://tc39.es/ecma262/#sec-topropertykey
500
- var toPropertyKey$2 = function (argument) {
501
- var key = toPrimitive(argument, 'string');
333
+ var SHARED = '__core-js_shared__';
334
+ var store$3 = global$b[SHARED] || defineGlobalProperty$2(SHARED, {});
335
+
336
+ var sharedStore = store$3;
337
+
338
+ var store$2 = sharedStore;
339
+
340
+ (shared$4.exports = function (key, value) {
341
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
342
+ })('versions', []).push({
343
+ version: '3.26.1',
344
+ mode: 'global',
345
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
346
+ license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
347
+ source: 'https://github.com/zloirock/core-js'
348
+ });
349
+
350
+ var requireObjectCoercible$2 = requireObjectCoercible$4;
351
+
352
+ var $Object$2 = Object;
353
+
354
+ // `ToObject` abstract operation
355
+ // https://tc39.es/ecma262/#sec-toobject
356
+ var toObject$5 = function (argument) {
357
+ return $Object$2(requireObjectCoercible$2(argument));
358
+ };
359
+
360
+ var uncurryThis$c = functionUncurryThis;
361
+ var toObject$4 = toObject$5;
362
+
363
+ var hasOwnProperty = uncurryThis$c({}.hasOwnProperty);
364
+
365
+ // `HasOwnProperty` abstract operation
366
+ // https://tc39.es/ecma262/#sec-hasownproperty
367
+ // eslint-disable-next-line es/no-object-hasown -- safe
368
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
369
+ return hasOwnProperty(toObject$4(it), key);
370
+ };
371
+
372
+ var uncurryThis$b = functionUncurryThis;
373
+
374
+ var id = 0;
375
+ var postfix = Math.random();
376
+ var toString$4 = uncurryThis$b(1.0.toString);
377
+
378
+ var uid$2 = function (key) {
379
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
380
+ };
381
+
382
+ var global$a = global$f;
383
+ var shared$3 = shared$4.exports;
384
+ var hasOwn$8 = hasOwnProperty_1;
385
+ var uid$1 = uid$2;
386
+ var NATIVE_SYMBOL = symbolConstructorDetection;
387
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
388
+
389
+ var WellKnownSymbolsStore = shared$3('wks');
390
+ var Symbol$1 = global$a.Symbol;
391
+ var symbolFor = Symbol$1 && Symbol$1['for'];
392
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
393
+
394
+ var wellKnownSymbol$a = function (name) {
395
+ if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
396
+ var description = 'Symbol.' + name;
397
+ if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
398
+ WellKnownSymbolsStore[name] = Symbol$1[name];
399
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
400
+ WellKnownSymbolsStore[name] = symbolFor(description);
401
+ } else {
402
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
403
+ }
404
+ } return WellKnownSymbolsStore[name];
405
+ };
406
+
407
+ var call$7 = functionCall;
408
+ var isObject$4 = isObject$6;
409
+ var isSymbol$1 = isSymbol$2;
410
+ var getMethod$1 = getMethod$2;
411
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
412
+ var wellKnownSymbol$9 = wellKnownSymbol$a;
413
+
414
+ var $TypeError$5 = TypeError;
415
+ var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
416
+
417
+ // `ToPrimitive` abstract operation
418
+ // https://tc39.es/ecma262/#sec-toprimitive
419
+ var toPrimitive$1 = function (input, pref) {
420
+ if (!isObject$4(input) || isSymbol$1(input)) return input;
421
+ var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
422
+ var result;
423
+ if (exoticToPrim) {
424
+ if (pref === undefined) pref = 'default';
425
+ result = call$7(exoticToPrim, input, pref);
426
+ if (!isObject$4(result) || isSymbol$1(result)) return result;
427
+ throw $TypeError$5("Can't convert object to primitive value");
428
+ }
429
+ if (pref === undefined) pref = 'number';
430
+ return ordinaryToPrimitive(input, pref);
431
+ };
432
+
433
+ var toPrimitive = toPrimitive$1;
434
+ var isSymbol = isSymbol$2;
435
+
436
+ // `ToPropertyKey` abstract operation
437
+ // https://tc39.es/ecma262/#sec-topropertykey
438
+ var toPropertyKey$2 = function (argument) {
439
+ var key = toPrimitive(argument, 'string');
502
440
  return isSymbol(key) ? key : key + '';
503
441
  };
504
442
 
505
- var global$g = global$w;
506
- var DESCRIPTORS$6 = descriptors;
443
+ var global$9 = global$f;
444
+ var isObject$3 = isObject$6;
445
+
446
+ var document$1 = global$9.document;
447
+ // typeof document.createElement is 'object' in old IE
448
+ var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
449
+
450
+ var documentCreateElement$2 = function (it) {
451
+ return EXISTS$1 ? document$1.createElement(it) : {};
452
+ };
453
+
454
+ var DESCRIPTORS$9 = descriptors;
455
+ var fails$c = fails$h;
456
+ var createElement = documentCreateElement$2;
457
+
458
+ // Thanks to IE8 for its funny defineProperty
459
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$c(function () {
460
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
461
+ return Object.defineProperty(createElement('div'), 'a', {
462
+ get: function () { return 7; }
463
+ }).a != 7;
464
+ });
465
+
466
+ var DESCRIPTORS$8 = descriptors;
467
+ var call$6 = functionCall;
468
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
469
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
470
+ var toIndexedObject$4 = toIndexedObject$5;
471
+ var toPropertyKey$1 = toPropertyKey$2;
472
+ var hasOwn$7 = hasOwnProperty_1;
507
473
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
474
+
475
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
476
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
477
+
478
+ // `Object.getOwnPropertyDescriptor` method
479
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
480
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
481
+ O = toIndexedObject$4(O);
482
+ P = toPropertyKey$1(P);
483
+ if (IE8_DOM_DEFINE$1) try {
484
+ return $getOwnPropertyDescriptor$1(O, P);
485
+ } catch (error) { /* empty */ }
486
+ if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$6(propertyIsEnumerableModule$1.f, O, P), O[P]);
487
+ };
488
+
489
+ var objectDefineProperty = {};
490
+
491
+ var DESCRIPTORS$7 = descriptors;
492
+ var fails$b = fails$h;
493
+
494
+ // V8 ~ Chrome 36-
495
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
496
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$b(function () {
497
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
498
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
499
+ value: 42,
500
+ writable: false
501
+ }).prototype != 42;
502
+ });
503
+
504
+ var isObject$2 = isObject$6;
505
+
506
+ var $String$2 = String;
507
+ var $TypeError$4 = TypeError;
508
+
509
+ // `Assert: Type(argument) is Object`
510
+ var anObject$8 = function (argument) {
511
+ if (isObject$2(argument)) return argument;
512
+ throw $TypeError$4($String$2(argument) + ' is not an object');
513
+ };
514
+
515
+ var DESCRIPTORS$6 = descriptors;
516
+ var IE8_DOM_DEFINE = ie8DomDefine;
508
517
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
509
518
  var anObject$7 = anObject$8;
510
- var toPropertyKey$1 = toPropertyKey$2;
519
+ var toPropertyKey = toPropertyKey$2;
511
520
 
512
- var TypeError$5 = global$g.TypeError;
521
+ var $TypeError$3 = TypeError;
513
522
  // eslint-disable-next-line es/no-object-defineproperty -- safe
514
523
  var $defineProperty = Object.defineProperty;
515
524
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
516
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
525
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
517
526
  var ENUMERABLE = 'enumerable';
518
527
  var CONFIGURABLE$1 = 'configurable';
519
528
  var WRITABLE = 'writable';
@@ -522,10 +531,10 @@ var WRITABLE = 'writable';
522
531
  // https://tc39.es/ecma262/#sec-object.defineproperty
523
532
  objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
524
533
  anObject$7(O);
525
- P = toPropertyKey$1(P);
534
+ P = toPropertyKey(P);
526
535
  anObject$7(Attributes);
527
536
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
528
- var current = $getOwnPropertyDescriptor$1(O, P);
537
+ var current = $getOwnPropertyDescriptor(O, P);
529
538
  if (current && current[WRITABLE]) {
530
539
  O[P] = Attributes.value;
531
540
  Attributes = {
@@ -537,333 +546,93 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
537
546
  } return $defineProperty(O, P, Attributes);
538
547
  } : $defineProperty : function defineProperty(O, P, Attributes) {
539
548
  anObject$7(O);
540
- P = toPropertyKey$1(P);
549
+ P = toPropertyKey(P);
541
550
  anObject$7(Attributes);
542
- if (IE8_DOM_DEFINE$1) try {
551
+ if (IE8_DOM_DEFINE) try {
543
552
  return $defineProperty(O, P, Attributes);
544
553
  } catch (error) { /* empty */ }
545
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$5('Accessors not supported');
554
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$3('Accessors not supported');
546
555
  if ('value' in Attributes) O[P] = Attributes.value;
547
556
  return O;
548
557
  };
549
558
 
550
- var ceil = Math.ceil;
551
- var floor$1 = Math.floor;
559
+ var DESCRIPTORS$5 = descriptors;
560
+ var definePropertyModule$3 = objectDefineProperty;
561
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
552
562
 
553
- // `ToIntegerOrInfinity` abstract operation
554
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
555
- var toIntegerOrInfinity$4 = function (argument) {
556
- var number = +argument;
557
- // eslint-disable-next-line no-self-compare -- safe
558
- return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
563
+ var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
564
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
565
+ } : function (object, key, value) {
566
+ object[key] = value;
567
+ return object;
559
568
  };
560
569
 
561
- var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
570
+ var makeBuiltIn$2 = {exports: {}};
562
571
 
563
- var max$1 = Math.max;
564
- var min$2 = Math.min;
572
+ var DESCRIPTORS$4 = descriptors;
573
+ var hasOwn$6 = hasOwnProperty_1;
565
574
 
566
- // Helper for a popular repeating case of the spec:
567
- // Let integer be ? ToInteger(index).
568
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
569
- var toAbsoluteIndex$1 = function (index, length) {
570
- var integer = toIntegerOrInfinity$3(index);
571
- return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
575
+ var FunctionPrototype$1 = Function.prototype;
576
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
577
+ var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
578
+
579
+ var EXISTS = hasOwn$6(FunctionPrototype$1, 'name');
580
+ // additional protection from minified / mangled / dropped function names
581
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
582
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype$1, 'name').configurable));
583
+
584
+ var functionName = {
585
+ EXISTS: EXISTS,
586
+ PROPER: PROPER,
587
+ CONFIGURABLE: CONFIGURABLE
572
588
  };
573
589
 
574
- var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
590
+ var uncurryThis$a = functionUncurryThis;
591
+ var isCallable$b = isCallable$h;
592
+ var store$1 = sharedStore;
575
593
 
576
- var min$1 = Math.min;
594
+ var functionToString = uncurryThis$a(Function.toString);
577
595
 
578
- // `ToLength` abstract operation
579
- // https://tc39.es/ecma262/#sec-tolength
580
- var toLength$2 = function (argument) {
581
- return argument > 0 ? min$1(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
582
- };
596
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
597
+ if (!isCallable$b(store$1.inspectSource)) {
598
+ store$1.inspectSource = function (it) {
599
+ return functionToString(it);
600
+ };
601
+ }
583
602
 
584
- var toLength$1 = toLength$2;
603
+ var inspectSource$1 = store$1.inspectSource;
585
604
 
586
- // `LengthOfArrayLike` abstract operation
587
- // https://tc39.es/ecma262/#sec-lengthofarraylike
588
- var lengthOfArrayLike$2 = function (obj) {
589
- return toLength$1(obj.length);
590
- };
605
+ var global$8 = global$f;
606
+ var isCallable$a = isCallable$h;
591
607
 
592
- var toIndexedObject$4 = toIndexedObject$5;
593
- var toAbsoluteIndex = toAbsoluteIndex$1;
594
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
608
+ var WeakMap$1 = global$8.WeakMap;
595
609
 
596
- // `Array.prototype.{ indexOf, includes }` methods implementation
597
- var createMethod$2 = function (IS_INCLUDES) {
598
- return function ($this, el, fromIndex) {
599
- var O = toIndexedObject$4($this);
600
- var length = lengthOfArrayLike$1(O);
601
- var index = toAbsoluteIndex(fromIndex, length);
602
- var value;
603
- // Array#includes uses SameValueZero equality algorithm
604
- // eslint-disable-next-line no-self-compare -- NaN check
605
- if (IS_INCLUDES && el != el) while (length > index) {
606
- value = O[index++];
607
- // eslint-disable-next-line no-self-compare -- NaN check
608
- if (value != value) return true;
609
- // Array#indexOf ignores holes, Array#includes - not
610
- } else for (;length > index; index++) {
611
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
612
- } return !IS_INCLUDES && -1;
613
- };
614
- };
610
+ var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String(WeakMap$1));
615
611
 
616
- var arrayIncludes = {
617
- // `Array.prototype.includes` method
618
- // https://tc39.es/ecma262/#sec-array.prototype.includes
619
- includes: createMethod$2(true),
620
- // `Array.prototype.indexOf` method
621
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
622
- indexOf: createMethod$2(false)
612
+ var shared$2 = shared$4.exports;
613
+ var uid = uid$2;
614
+
615
+ var keys = shared$2('keys');
616
+
617
+ var sharedKey$3 = function (key) {
618
+ return keys[key] || (keys[key] = uid(key));
623
619
  };
624
620
 
625
621
  var hiddenKeys$4 = {};
626
622
 
627
- var uncurryThis$a = functionUncurryThis;
628
- var hasOwn$7 = hasOwnProperty_1;
629
- var toIndexedObject$3 = toIndexedObject$5;
630
- var indexOf$1 = arrayIncludes.indexOf;
623
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
624
+ var global$7 = global$f;
625
+ var isObject$1 = isObject$6;
626
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
627
+ var hasOwn$5 = hasOwnProperty_1;
628
+ var shared$1 = sharedStore;
629
+ var sharedKey$2 = sharedKey$3;
631
630
  var hiddenKeys$3 = hiddenKeys$4;
632
631
 
633
- var push$1 = uncurryThis$a([].push);
634
-
635
- var objectKeysInternal = function (object, names) {
636
- var O = toIndexedObject$3(object);
637
- var i = 0;
638
- var result = [];
639
- var key;
640
- for (key in O) !hasOwn$7(hiddenKeys$3, key) && hasOwn$7(O, key) && push$1(result, key);
641
- // Don't enum bug & hidden keys
642
- while (names.length > i) if (hasOwn$7(O, key = names[i++])) {
643
- ~indexOf$1(result, key) || push$1(result, key);
644
- }
645
- return result;
646
- };
647
-
648
- // IE8- don't enum bug keys
649
- var enumBugKeys$3 = [
650
- 'constructor',
651
- 'hasOwnProperty',
652
- 'isPrototypeOf',
653
- 'propertyIsEnumerable',
654
- 'toLocaleString',
655
- 'toString',
656
- 'valueOf'
657
- ];
658
-
659
- var internalObjectKeys$1 = objectKeysInternal;
660
- var enumBugKeys$2 = enumBugKeys$3;
661
-
662
- // `Object.keys` method
663
- // https://tc39.es/ecma262/#sec-object.keys
664
- // eslint-disable-next-line es/no-object-keys -- safe
665
- var objectKeys$2 = Object.keys || function keys(O) {
666
- return internalObjectKeys$1(O, enumBugKeys$2);
667
- };
668
-
669
- var DESCRIPTORS$5 = descriptors;
670
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
671
- var definePropertyModule$3 = objectDefineProperty;
672
- var anObject$6 = anObject$8;
673
- var toIndexedObject$2 = toIndexedObject$5;
674
- var objectKeys$1 = objectKeys$2;
675
-
676
- // `Object.defineProperties` method
677
- // https://tc39.es/ecma262/#sec-object.defineproperties
678
- // eslint-disable-next-line es/no-object-defineproperties -- safe
679
- objectDefineProperties.f = DESCRIPTORS$5 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
680
- anObject$6(O);
681
- var props = toIndexedObject$2(Properties);
682
- var keys = objectKeys$1(Properties);
683
- var length = keys.length;
684
- var index = 0;
685
- var key;
686
- while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
687
- return O;
688
- };
689
-
690
- var getBuiltIn$1 = getBuiltIn$4;
691
-
692
- var html$1 = getBuiltIn$1('document', 'documentElement');
693
-
694
- var shared$2 = shared$4.exports;
695
- var uid = uid$2;
696
-
697
- var keys = shared$2('keys');
698
-
699
- var sharedKey$3 = function (key) {
700
- return keys[key] || (keys[key] = uid(key));
701
- };
702
-
703
- /* global ActiveXObject -- old IE, WSH */
704
-
705
- var anObject$5 = anObject$8;
706
- var definePropertiesModule = objectDefineProperties;
707
- var enumBugKeys$1 = enumBugKeys$3;
708
- var hiddenKeys$2 = hiddenKeys$4;
709
- var html = html$1;
710
- var documentCreateElement$1 = documentCreateElement$2;
711
- var sharedKey$2 = sharedKey$3;
712
-
713
- var GT = '>';
714
- var LT = '<';
715
- var PROTOTYPE = 'prototype';
716
- var SCRIPT = 'script';
717
- var IE_PROTO$1 = sharedKey$2('IE_PROTO');
718
-
719
- var EmptyConstructor = function () { /* empty */ };
720
-
721
- var scriptTag = function (content) {
722
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
723
- };
724
-
725
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
726
- var NullProtoObjectViaActiveX = function (activeXDocument) {
727
- activeXDocument.write(scriptTag(''));
728
- activeXDocument.close();
729
- var temp = activeXDocument.parentWindow.Object;
730
- activeXDocument = null; // avoid memory leak
731
- return temp;
732
- };
733
-
734
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
735
- var NullProtoObjectViaIFrame = function () {
736
- // Thrash, waste and sodomy: IE GC bug
737
- var iframe = documentCreateElement$1('iframe');
738
- var JS = 'java' + SCRIPT + ':';
739
- var iframeDocument;
740
- iframe.style.display = 'none';
741
- html.appendChild(iframe);
742
- // https://github.com/zloirock/core-js/issues/475
743
- iframe.src = String(JS);
744
- iframeDocument = iframe.contentWindow.document;
745
- iframeDocument.open();
746
- iframeDocument.write(scriptTag('document.F=Object'));
747
- iframeDocument.close();
748
- return iframeDocument.F;
749
- };
750
-
751
- // Check for document.domain and active x support
752
- // No need to use active x approach when document.domain is not set
753
- // see https://github.com/es-shims/es5-shim/issues/150
754
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
755
- // avoid IE GC bug
756
- var activeXDocument;
757
- var NullProtoObject = function () {
758
- try {
759
- activeXDocument = new ActiveXObject('htmlfile');
760
- } catch (error) { /* ignore */ }
761
- NullProtoObject = typeof document != 'undefined'
762
- ? document.domain && activeXDocument
763
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
764
- : NullProtoObjectViaIFrame()
765
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
766
- var length = enumBugKeys$1.length;
767
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
768
- return NullProtoObject();
769
- };
770
-
771
- hiddenKeys$2[IE_PROTO$1] = true;
772
-
773
- // `Object.create` method
774
- // https://tc39.es/ecma262/#sec-object.create
775
- var objectCreate = Object.create || function create(O, Properties) {
776
- var result;
777
- if (O !== null) {
778
- EmptyConstructor[PROTOTYPE] = anObject$5(O);
779
- result = new EmptyConstructor();
780
- EmptyConstructor[PROTOTYPE] = null;
781
- // add "__proto__" for Object.getPrototypeOf polyfill
782
- result[IE_PROTO$1] = O;
783
- } else result = NullProtoObject();
784
- return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
785
- };
786
-
787
- var wellKnownSymbol$8 = wellKnownSymbol$a;
788
- var create$2 = objectCreate;
789
- var definePropertyModule$2 = objectDefineProperty;
790
-
791
- var UNSCOPABLES = wellKnownSymbol$8('unscopables');
792
- var ArrayPrototype = Array.prototype;
793
-
794
- // Array.prototype[@@unscopables]
795
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
796
- if (ArrayPrototype[UNSCOPABLES] == undefined) {
797
- definePropertyModule$2.f(ArrayPrototype, UNSCOPABLES, {
798
- configurable: true,
799
- value: create$2(null)
800
- });
801
- }
802
-
803
- // add a key to Array.prototype[@@unscopables]
804
- var addToUnscopables$1 = function (key) {
805
- ArrayPrototype[UNSCOPABLES][key] = true;
806
- };
807
-
808
- var iterators = {};
809
-
810
- var uncurryThis$9 = functionUncurryThis;
811
- var isCallable$a = isCallable$g;
812
- var store$1 = sharedStore;
813
-
814
- var functionToString = uncurryThis$9(Function.toString);
815
-
816
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
817
- if (!isCallable$a(store$1.inspectSource)) {
818
- store$1.inspectSource = function (it) {
819
- return functionToString(it);
820
- };
821
- }
822
-
823
- var inspectSource$2 = store$1.inspectSource;
824
-
825
- var global$f = global$w;
826
- var isCallable$9 = isCallable$g;
827
- var inspectSource$1 = inspectSource$2;
828
-
829
- var WeakMap$1 = global$f.WeakMap;
830
-
831
- var nativeWeakMap = isCallable$9(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
832
-
833
- var createPropertyDescriptor$3 = function (bitmap, value) {
834
- return {
835
- enumerable: !(bitmap & 1),
836
- configurable: !(bitmap & 2),
837
- writable: !(bitmap & 4),
838
- value: value
839
- };
840
- };
841
-
842
- var DESCRIPTORS$4 = descriptors;
843
- var definePropertyModule$1 = objectDefineProperty;
844
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
845
-
846
- var createNonEnumerableProperty$6 = DESCRIPTORS$4 ? function (object, key, value) {
847
- return definePropertyModule$1.f(object, key, createPropertyDescriptor$2(1, value));
848
- } : function (object, key, value) {
849
- object[key] = value;
850
- return object;
851
- };
852
-
853
- var NATIVE_WEAK_MAP = nativeWeakMap;
854
- var global$e = global$w;
855
- var uncurryThis$8 = functionUncurryThis;
856
- var isObject = isObject$5;
857
- var createNonEnumerableProperty$5 = createNonEnumerableProperty$6;
858
- var hasOwn$6 = hasOwnProperty_1;
859
- var shared$1 = sharedStore;
860
- var sharedKey$1 = sharedKey$3;
861
- var hiddenKeys$1 = hiddenKeys$4;
862
-
863
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
864
- var TypeError$4 = global$e.TypeError;
865
- var WeakMap = global$e.WeakMap;
866
- var set, get, has;
632
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
633
+ var TypeError$1 = global$7.TypeError;
634
+ var WeakMap = global$7.WeakMap;
635
+ var set, get, has;
867
636
 
868
637
  var enforce = function (it) {
869
638
  return has(it) ? get(it) : set(it, {});
@@ -872,43 +641,45 @@ var enforce = function (it) {
872
641
  var getterFor = function (TYPE) {
873
642
  return function (it) {
874
643
  var state;
875
- if (!isObject(it) || (state = get(it)).type !== TYPE) {
876
- throw TypeError$4('Incompatible receiver, ' + TYPE + ' required');
644
+ if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
645
+ throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
877
646
  } return state;
878
647
  };
879
648
  };
880
649
 
881
650
  if (NATIVE_WEAK_MAP || shared$1.state) {
882
651
  var store = shared$1.state || (shared$1.state = new WeakMap());
883
- var wmget = uncurryThis$8(store.get);
884
- var wmhas = uncurryThis$8(store.has);
885
- var wmset = uncurryThis$8(store.set);
652
+ /* eslint-disable no-self-assign -- prototype methods protection */
653
+ store.get = store.get;
654
+ store.has = store.has;
655
+ store.set = store.set;
656
+ /* eslint-enable no-self-assign -- prototype methods protection */
886
657
  set = function (it, metadata) {
887
- if (wmhas(store, it)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
658
+ if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
888
659
  metadata.facade = it;
889
- wmset(store, it, metadata);
660
+ store.set(it, metadata);
890
661
  return metadata;
891
662
  };
892
663
  get = function (it) {
893
- return wmget(store, it) || {};
664
+ return store.get(it) || {};
894
665
  };
895
666
  has = function (it) {
896
- return wmhas(store, it);
667
+ return store.has(it);
897
668
  };
898
669
  } else {
899
- var STATE = sharedKey$1('state');
900
- hiddenKeys$1[STATE] = true;
670
+ var STATE = sharedKey$2('state');
671
+ hiddenKeys$3[STATE] = true;
901
672
  set = function (it, metadata) {
902
- if (hasOwn$6(it, STATE)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
673
+ if (hasOwn$5(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
903
674
  metadata.facade = it;
904
- createNonEnumerableProperty$5(it, STATE, metadata);
675
+ createNonEnumerableProperty$4(it, STATE, metadata);
905
676
  return metadata;
906
677
  };
907
678
  get = function (it) {
908
- return hasOwn$6(it, STATE) ? it[STATE] : {};
679
+ return hasOwn$5(it, STATE) ? it[STATE] : {};
909
680
  };
910
681
  has = function (it) {
911
- return hasOwn$6(it, STATE);
682
+ return hasOwn$5(it, STATE);
912
683
  };
913
684
  }
914
685
 
@@ -920,279 +691,660 @@ var internalState = {
920
691
  getterFor: getterFor
921
692
  };
922
693
 
923
- var objectGetOwnPropertyDescriptor = {};
924
-
925
- var objectPropertyIsEnumerable = {};
926
-
927
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
928
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
929
- var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
930
-
931
- // Nashorn ~ JDK8 bug
932
- var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
694
+ var fails$a = fails$h;
695
+ var isCallable$9 = isCallable$h;
696
+ var hasOwn$4 = hasOwnProperty_1;
697
+ var DESCRIPTORS$3 = descriptors;
698
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
699
+ var inspectSource = inspectSource$1;
700
+ var InternalStateModule$1 = internalState;
933
701
 
934
- // `Object.prototype.propertyIsEnumerable` method implementation
935
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
936
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
937
- var descriptor = getOwnPropertyDescriptor$1(this, V);
938
- return !!descriptor && descriptor.enumerable;
939
- } : $propertyIsEnumerable;
702
+ var enforceInternalState = InternalStateModule$1.enforce;
703
+ var getInternalState$2 = InternalStateModule$1.get;
704
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
705
+ var defineProperty$4 = Object.defineProperty;
940
706
 
941
- var DESCRIPTORS$3 = descriptors;
942
- var call$6 = functionCall;
943
- var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
944
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
945
- var toIndexedObject$1 = toIndexedObject$5;
946
- var toPropertyKey = toPropertyKey$2;
947
- var hasOwn$5 = hasOwnProperty_1;
948
- var IE8_DOM_DEFINE = ie8DomDefine;
707
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$a(function () {
708
+ return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
709
+ });
949
710
 
950
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
951
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
711
+ var TEMPLATE = String(String).split('String');
952
712
 
953
- // `Object.getOwnPropertyDescriptor` method
954
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
955
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
956
- O = toIndexedObject$1(O);
957
- P = toPropertyKey(P);
958
- if (IE8_DOM_DEFINE) try {
959
- return $getOwnPropertyDescriptor(O, P);
713
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
714
+ if (String(name).slice(0, 7) === 'Symbol(') {
715
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
716
+ }
717
+ if (options && options.getter) name = 'get ' + name;
718
+ if (options && options.setter) name = 'set ' + name;
719
+ if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
720
+ if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
721
+ else value.name = name;
722
+ }
723
+ if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
724
+ defineProperty$4(value, 'length', { value: options.arity });
725
+ }
726
+ try {
727
+ if (options && hasOwn$4(options, 'constructor') && options.constructor) {
728
+ if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
729
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
730
+ } else if (value.prototype) value.prototype = undefined;
960
731
  } catch (error) { /* empty */ }
961
- if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$6(propertyIsEnumerableModule$1.f, O, P), O[P]);
732
+ var state = enforceInternalState(value);
733
+ if (!hasOwn$4(state, 'source')) {
734
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
735
+ } return value;
962
736
  };
963
737
 
964
- var redefine$4 = {exports: {}};
738
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
739
+ // eslint-disable-next-line no-extend-native -- required
740
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
741
+ return isCallable$9(this) && getInternalState$2(this).source || inspectSource(this);
742
+ }, 'toString');
965
743
 
966
- var DESCRIPTORS$2 = descriptors;
967
- var hasOwn$4 = hasOwnProperty_1;
744
+ var isCallable$8 = isCallable$h;
745
+ var definePropertyModule$2 = objectDefineProperty;
746
+ var makeBuiltIn = makeBuiltIn$2.exports;
747
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
748
+
749
+ var defineBuiltIn$4 = function (O, key, value, options) {
750
+ if (!options) options = {};
751
+ var simple = options.enumerable;
752
+ var name = options.name !== undefined ? options.name : key;
753
+ if (isCallable$8(value)) makeBuiltIn(value, name, options);
754
+ if (options.global) {
755
+ if (simple) O[key] = value;
756
+ else defineGlobalProperty$1(key, value);
757
+ } else {
758
+ try {
759
+ if (!options.unsafe) delete O[key];
760
+ else if (O[key]) simple = true;
761
+ } catch (error) { /* empty */ }
762
+ if (simple) O[key] = value;
763
+ else definePropertyModule$2.f(O, key, {
764
+ value: value,
765
+ enumerable: false,
766
+ configurable: !options.nonConfigurable,
767
+ writable: !options.nonWritable
768
+ });
769
+ } return O;
770
+ };
968
771
 
969
- var FunctionPrototype$1 = Function.prototype;
970
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
971
- var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
772
+ var objectGetOwnPropertyNames = {};
972
773
 
973
- var EXISTS = hasOwn$4(FunctionPrototype$1, 'name');
974
- // additional protection from minified / mangled / dropped function names
975
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
976
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype$1, 'name').configurable));
774
+ var ceil = Math.ceil;
775
+ var floor$1 = Math.floor;
977
776
 
978
- var functionName = {
979
- EXISTS: EXISTS,
980
- PROPER: PROPER,
981
- CONFIGURABLE: CONFIGURABLE
777
+ // `Math.trunc` method
778
+ // https://tc39.es/ecma262/#sec-math.trunc
779
+ // eslint-disable-next-line es/no-math-trunc -- safe
780
+ var mathTrunc = Math.trunc || function trunc(x) {
781
+ var n = +x;
782
+ return (n > 0 ? floor$1 : ceil)(n);
783
+ };
784
+
785
+ var trunc = mathTrunc;
786
+
787
+ // `ToIntegerOrInfinity` abstract operation
788
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
789
+ var toIntegerOrInfinity$4 = function (argument) {
790
+ var number = +argument;
791
+ // eslint-disable-next-line no-self-compare -- NaN check
792
+ return number !== number || number === 0 ? 0 : trunc(number);
793
+ };
794
+
795
+ var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
796
+
797
+ var max$1 = Math.max;
798
+ var min$2 = Math.min;
799
+
800
+ // Helper for a popular repeating case of the spec:
801
+ // Let integer be ? ToInteger(index).
802
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
803
+ var toAbsoluteIndex$1 = function (index, length) {
804
+ var integer = toIntegerOrInfinity$3(index);
805
+ return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
806
+ };
807
+
808
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
809
+
810
+ var min$1 = Math.min;
811
+
812
+ // `ToLength` abstract operation
813
+ // https://tc39.es/ecma262/#sec-tolength
814
+ var toLength$2 = function (argument) {
815
+ return argument > 0 ? min$1(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
982
816
  };
983
817
 
984
- var global$d = global$w;
985
- var isCallable$8 = isCallable$g;
818
+ var toLength$1 = toLength$2;
819
+
820
+ // `LengthOfArrayLike` abstract operation
821
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
822
+ var lengthOfArrayLike$2 = function (obj) {
823
+ return toLength$1(obj.length);
824
+ };
825
+
826
+ var toIndexedObject$3 = toIndexedObject$5;
827
+ var toAbsoluteIndex = toAbsoluteIndex$1;
828
+ var lengthOfArrayLike$1 = lengthOfArrayLike$2;
829
+
830
+ // `Array.prototype.{ indexOf, includes }` methods implementation
831
+ var createMethod$2 = function (IS_INCLUDES) {
832
+ return function ($this, el, fromIndex) {
833
+ var O = toIndexedObject$3($this);
834
+ var length = lengthOfArrayLike$1(O);
835
+ var index = toAbsoluteIndex(fromIndex, length);
836
+ var value;
837
+ // Array#includes uses SameValueZero equality algorithm
838
+ // eslint-disable-next-line no-self-compare -- NaN check
839
+ if (IS_INCLUDES && el != el) while (length > index) {
840
+ value = O[index++];
841
+ // eslint-disable-next-line no-self-compare -- NaN check
842
+ if (value != value) return true;
843
+ // Array#indexOf ignores holes, Array#includes - not
844
+ } else for (;length > index; index++) {
845
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
846
+ } return !IS_INCLUDES && -1;
847
+ };
848
+ };
849
+
850
+ var arrayIncludes = {
851
+ // `Array.prototype.includes` method
852
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
853
+ includes: createMethod$2(true),
854
+ // `Array.prototype.indexOf` method
855
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
856
+ indexOf: createMethod$2(false)
857
+ };
858
+
859
+ var uncurryThis$9 = functionUncurryThis;
986
860
  var hasOwn$3 = hasOwnProperty_1;
987
- var createNonEnumerableProperty$4 = createNonEnumerableProperty$6;
988
- var setGlobal$1 = setGlobal$3;
989
- var inspectSource = inspectSource$2;
990
- var InternalStateModule$1 = internalState;
991
- var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
861
+ var toIndexedObject$2 = toIndexedObject$5;
862
+ var indexOf$1 = arrayIncludes.indexOf;
863
+ var hiddenKeys$2 = hiddenKeys$4;
992
864
 
993
- var getInternalState$2 = InternalStateModule$1.get;
994
- var enforceInternalState = InternalStateModule$1.enforce;
995
- var TEMPLATE = String(String).split('String');
865
+ var push$1 = uncurryThis$9([].push);
996
866
 
997
- (redefine$4.exports = function (O, key, value, options) {
998
- var unsafe = options ? !!options.unsafe : false;
999
- var simple = options ? !!options.enumerable : false;
1000
- var noTargetGet = options ? !!options.noTargetGet : false;
1001
- var name = options && options.name !== undefined ? options.name : key;
1002
- var state;
1003
- if (isCallable$8(value)) {
1004
- if (String(name).slice(0, 7) === 'Symbol(') {
1005
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
1006
- }
1007
- if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
1008
- createNonEnumerableProperty$4(value, 'name', name);
1009
- }
1010
- state = enforceInternalState(value);
1011
- if (!state.source) {
1012
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
1013
- }
1014
- }
1015
- if (O === global$d) {
1016
- if (simple) O[key] = value;
1017
- else setGlobal$1(key, value);
1018
- return;
1019
- } else if (!unsafe) {
1020
- delete O[key];
1021
- } else if (!noTargetGet && O[key]) {
1022
- simple = true;
867
+ var objectKeysInternal = function (object, names) {
868
+ var O = toIndexedObject$2(object);
869
+ var i = 0;
870
+ var result = [];
871
+ var key;
872
+ for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push$1(result, key);
873
+ // Don't enum bug & hidden keys
874
+ while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
875
+ ~indexOf$1(result, key) || push$1(result, key);
1023
876
  }
1024
- if (simple) O[key] = value;
1025
- else createNonEnumerableProperty$4(O, key, value);
1026
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
1027
- })(Function.prototype, 'toString', function toString() {
1028
- return isCallable$8(this) && getInternalState$2(this).source || inspectSource(this);
1029
- });
877
+ return result;
878
+ };
1030
879
 
1031
- var objectGetOwnPropertyNames = {};
880
+ // IE8- don't enum bug keys
881
+ var enumBugKeys$3 = [
882
+ 'constructor',
883
+ 'hasOwnProperty',
884
+ 'isPrototypeOf',
885
+ 'propertyIsEnumerable',
886
+ 'toLocaleString',
887
+ 'toString',
888
+ 'valueOf'
889
+ ];
1032
890
 
1033
- var internalObjectKeys = objectKeysInternal;
1034
- var enumBugKeys = enumBugKeys$3;
891
+ var internalObjectKeys$1 = objectKeysInternal;
892
+ var enumBugKeys$2 = enumBugKeys$3;
1035
893
 
1036
- var hiddenKeys = enumBugKeys.concat('length', 'prototype');
894
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
1037
895
 
1038
896
  // `Object.getOwnPropertyNames` method
1039
897
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
1040
898
  // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1041
899
  objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1042
- return internalObjectKeys(O, hiddenKeys);
900
+ return internalObjectKeys$1(O, hiddenKeys$1);
901
+ };
902
+
903
+ var objectGetOwnPropertySymbols = {};
904
+
905
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
906
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
907
+
908
+ var getBuiltIn$1 = getBuiltIn$4;
909
+ var uncurryThis$8 = functionUncurryThis;
910
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
911
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
912
+ var anObject$6 = anObject$8;
913
+
914
+ var concat$2 = uncurryThis$8([].concat);
915
+
916
+ // all object keys, includes non-enumerable and symbols
917
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
918
+ var keys = getOwnPropertyNamesModule.f(anObject$6(it));
919
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
920
+ return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
921
+ };
922
+
923
+ var hasOwn$2 = hasOwnProperty_1;
924
+ var ownKeys = ownKeys$1;
925
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
926
+ var definePropertyModule$1 = objectDefineProperty;
927
+
928
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
929
+ var keys = ownKeys(source);
930
+ var defineProperty = definePropertyModule$1.f;
931
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
932
+ for (var i = 0; i < keys.length; i++) {
933
+ var key = keys[i];
934
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
935
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
936
+ }
937
+ }
938
+ };
939
+
940
+ var fails$9 = fails$h;
941
+ var isCallable$7 = isCallable$h;
942
+
943
+ var replacement = /#|\.prototype\./;
944
+
945
+ var isForced$1 = function (feature, detection) {
946
+ var value = data[normalize(feature)];
947
+ return value == POLYFILL ? true
948
+ : value == NATIVE ? false
949
+ : isCallable$7(detection) ? fails$9(detection)
950
+ : !!detection;
951
+ };
952
+
953
+ var normalize = isForced$1.normalize = function (string) {
954
+ return String(string).replace(replacement, '.').toLowerCase();
955
+ };
956
+
957
+ var data = isForced$1.data = {};
958
+ var NATIVE = isForced$1.NATIVE = 'N';
959
+ var POLYFILL = isForced$1.POLYFILL = 'P';
960
+
961
+ var isForced_1 = isForced$1;
962
+
963
+ var global$6 = global$f;
964
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
965
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
966
+ var defineBuiltIn$3 = defineBuiltIn$4;
967
+ var defineGlobalProperty = defineGlobalProperty$3;
968
+ var copyConstructorProperties = copyConstructorProperties$1;
969
+ var isForced = isForced_1;
970
+
971
+ /*
972
+ options.target - name of the target object
973
+ options.global - target is the global object
974
+ options.stat - export as static methods of target
975
+ options.proto - export as prototype methods of target
976
+ options.real - real prototype method for the `pure` version
977
+ options.forced - export even if the native feature is available
978
+ options.bind - bind methods to the target, required for the `pure` version
979
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
980
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
981
+ options.sham - add a flag to not completely full polyfills
982
+ options.enumerable - export as enumerable property
983
+ options.dontCallGetSet - prevent calling a getter on target
984
+ options.name - the .name of the function if it does not match the key
985
+ */
986
+ var _export = function (options, source) {
987
+ var TARGET = options.target;
988
+ var GLOBAL = options.global;
989
+ var STATIC = options.stat;
990
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
991
+ if (GLOBAL) {
992
+ target = global$6;
993
+ } else if (STATIC) {
994
+ target = global$6[TARGET] || defineGlobalProperty(TARGET, {});
995
+ } else {
996
+ target = (global$6[TARGET] || {}).prototype;
997
+ }
998
+ if (target) for (key in source) {
999
+ sourceProperty = source[key];
1000
+ if (options.dontCallGetSet) {
1001
+ descriptor = getOwnPropertyDescriptor(target, key);
1002
+ targetProperty = descriptor && descriptor.value;
1003
+ } else targetProperty = target[key];
1004
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1005
+ // contained in target
1006
+ if (!FORCED && targetProperty !== undefined) {
1007
+ if (typeof sourceProperty == typeof targetProperty) continue;
1008
+ copyConstructorProperties(sourceProperty, targetProperty);
1009
+ }
1010
+ // add a flag to not completely full polyfills
1011
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1012
+ createNonEnumerableProperty$3(sourceProperty, 'sham', true);
1013
+ }
1014
+ defineBuiltIn$3(target, key, sourceProperty, options);
1015
+ }
1016
+ };
1017
+
1018
+ var internalObjectKeys = objectKeysInternal;
1019
+ var enumBugKeys$1 = enumBugKeys$3;
1020
+
1021
+ // `Object.keys` method
1022
+ // https://tc39.es/ecma262/#sec-object.keys
1023
+ // eslint-disable-next-line es/no-object-keys -- safe
1024
+ var objectKeys$2 = Object.keys || function keys(O) {
1025
+ return internalObjectKeys(O, enumBugKeys$1);
1026
+ };
1027
+
1028
+ var DESCRIPTORS$2 = descriptors;
1029
+ var uncurryThis$7 = functionUncurryThis;
1030
+ var call$5 = functionCall;
1031
+ var fails$8 = fails$h;
1032
+ var objectKeys$1 = objectKeys$2;
1033
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1034
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1035
+ var toObject$3 = toObject$5;
1036
+ var IndexedObject$1 = indexedObject;
1037
+
1038
+ // eslint-disable-next-line es/no-object-assign -- safe
1039
+ var $assign = Object.assign;
1040
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1041
+ var defineProperty$3 = Object.defineProperty;
1042
+ var concat$1 = uncurryThis$7([].concat);
1043
+
1044
+ // `Object.assign` method
1045
+ // https://tc39.es/ecma262/#sec-object.assign
1046
+ var objectAssign = !$assign || fails$8(function () {
1047
+ // should have correct order of operations (Edge bug)
1048
+ if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
1049
+ enumerable: true,
1050
+ get: function () {
1051
+ defineProperty$3(this, 'b', {
1052
+ value: 3,
1053
+ enumerable: false
1054
+ });
1055
+ }
1056
+ }), { b: 2 })).b !== 1) return true;
1057
+ // should work with symbols and should have deterministic property order (V8 bug)
1058
+ var A = {};
1059
+ var B = {};
1060
+ // eslint-disable-next-line es/no-symbol -- safe
1061
+ var symbol = Symbol();
1062
+ var alphabet = 'abcdefghijklmnopqrst';
1063
+ A[symbol] = 7;
1064
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1065
+ return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
1066
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1067
+ var T = toObject$3(target);
1068
+ var argumentsLength = arguments.length;
1069
+ var index = 1;
1070
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1071
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1072
+ while (argumentsLength > index) {
1073
+ var S = IndexedObject$1(arguments[index++]);
1074
+ var keys = getOwnPropertySymbols ? concat$1(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1075
+ var length = keys.length;
1076
+ var j = 0;
1077
+ var key;
1078
+ while (length > j) {
1079
+ key = keys[j++];
1080
+ if (!DESCRIPTORS$2 || call$5(propertyIsEnumerable, S, key)) T[key] = S[key];
1081
+ }
1082
+ } return T;
1083
+ } : $assign;
1084
+
1085
+ var $$3 = _export;
1086
+ var assign = objectAssign;
1087
+
1088
+ // `Object.assign` method
1089
+ // https://tc39.es/ecma262/#sec-object.assign
1090
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1091
+ $$3({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1092
+ assign: assign
1093
+ });
1094
+
1095
+ const NinetailedContext = /*#__PURE__*/createContext(undefined);
1096
+
1097
+ const ExperimentsContext = /*#__PURE__*/createContext(undefined);
1098
+
1099
+ var aCallable = aCallable$2;
1100
+ var toObject$2 = toObject$5;
1101
+ var IndexedObject = indexedObject;
1102
+ var lengthOfArrayLike = lengthOfArrayLike$2;
1103
+
1104
+ var $TypeError$2 = TypeError;
1105
+
1106
+ // `Array.prototype.{ reduce, reduceRight }` methods implementation
1107
+ var createMethod$1 = function (IS_RIGHT) {
1108
+ return function (that, callbackfn, argumentsLength, memo) {
1109
+ aCallable(callbackfn);
1110
+ var O = toObject$2(that);
1111
+ var self = IndexedObject(O);
1112
+ var length = lengthOfArrayLike(O);
1113
+ var index = IS_RIGHT ? length - 1 : 0;
1114
+ var i = IS_RIGHT ? -1 : 1;
1115
+ if (argumentsLength < 2) while (true) {
1116
+ if (index in self) {
1117
+ memo = self[index];
1118
+ index += i;
1119
+ break;
1120
+ }
1121
+ index += i;
1122
+ if (IS_RIGHT ? index < 0 : length <= index) {
1123
+ throw $TypeError$2('Reduce of empty array with no initial value');
1124
+ }
1125
+ }
1126
+ for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
1127
+ memo = callbackfn(memo, self[index], index, O);
1128
+ }
1129
+ return memo;
1130
+ };
1131
+ };
1132
+
1133
+ var arrayReduce = {
1134
+ // `Array.prototype.reduce` method
1135
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
1136
+ left: createMethod$1(false),
1137
+ // `Array.prototype.reduceRight` method
1138
+ // https://tc39.es/ecma262/#sec-array.prototype.reduceright
1139
+ right: createMethod$1(true)
1140
+ };
1141
+
1142
+ var fails$7 = fails$h;
1143
+
1144
+ var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1145
+ var method = [][METHOD_NAME];
1146
+ return !!method && fails$7(function () {
1147
+ // eslint-disable-next-line no-useless-call -- required for testing
1148
+ method.call(null, argument || function () { return 1; }, 1);
1149
+ });
1150
+ };
1151
+
1152
+ var classof$3 = classofRaw$2;
1153
+ var global$5 = global$f;
1154
+
1155
+ var engineIsNode = classof$3(global$5.process) == 'process';
1156
+
1157
+ var $$2 = _export;
1158
+ var $reduce = arrayReduce.left;
1159
+ var arrayMethodIsStrict = arrayMethodIsStrict$1;
1160
+ var CHROME_VERSION = engineV8Version;
1161
+ var IS_NODE = engineIsNode;
1162
+
1163
+ var STRICT_METHOD = arrayMethodIsStrict('reduce');
1164
+ // Chrome 80-82 has a critical bug
1165
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
1166
+ var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
1167
+
1168
+ // `Array.prototype.reduce` method
1169
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
1170
+ $$2({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
1171
+ reduce: function reduce(callbackfn /* , initialValue */) {
1172
+ var length = arguments.length;
1173
+ return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
1174
+ }
1175
+ });
1176
+
1177
+ var objectDefineProperties = {};
1178
+
1179
+ var DESCRIPTORS$1 = descriptors;
1180
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1181
+ var definePropertyModule = objectDefineProperty;
1182
+ var anObject$5 = anObject$8;
1183
+ var toIndexedObject$1 = toIndexedObject$5;
1184
+ var objectKeys = objectKeys$2;
1185
+
1186
+ // `Object.defineProperties` method
1187
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1188
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1189
+ objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1190
+ anObject$5(O);
1191
+ var props = toIndexedObject$1(Properties);
1192
+ var keys = objectKeys(Properties);
1193
+ var length = keys.length;
1194
+ var index = 0;
1195
+ var key;
1196
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1197
+ return O;
1043
1198
  };
1044
1199
 
1045
- var objectGetOwnPropertySymbols = {};
1200
+ var getBuiltIn = getBuiltIn$4;
1046
1201
 
1047
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1048
- objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1202
+ var html$1 = getBuiltIn('document', 'documentElement');
1049
1203
 
1050
- var getBuiltIn = getBuiltIn$4;
1051
- var uncurryThis$7 = functionUncurryThis;
1052
- var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1053
- var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1054
- var anObject$4 = anObject$8;
1204
+ /* global ActiveXObject -- old IE, WSH */
1055
1205
 
1056
- var concat$2 = uncurryThis$7([].concat);
1206
+ var anObject$4 = anObject$8;
1207
+ var definePropertiesModule = objectDefineProperties;
1208
+ var enumBugKeys = enumBugKeys$3;
1209
+ var hiddenKeys = hiddenKeys$4;
1210
+ var html = html$1;
1211
+ var documentCreateElement$1 = documentCreateElement$2;
1212
+ var sharedKey$1 = sharedKey$3;
1057
1213
 
1058
- // all object keys, includes non-enumerable and symbols
1059
- var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
1060
- var keys = getOwnPropertyNamesModule.f(anObject$4(it));
1061
- var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1062
- return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
1063
- };
1214
+ var GT = '>';
1215
+ var LT = '<';
1216
+ var PROTOTYPE = 'prototype';
1217
+ var SCRIPT = 'script';
1218
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1064
1219
 
1065
- var hasOwn$2 = hasOwnProperty_1;
1066
- var ownKeys = ownKeys$1;
1067
- var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1068
- var definePropertyModule = objectDefineProperty;
1220
+ var EmptyConstructor = function () { /* empty */ };
1069
1221
 
1070
- var copyConstructorProperties$1 = function (target, source, exceptions) {
1071
- var keys = ownKeys(source);
1072
- var defineProperty = definePropertyModule.f;
1073
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1074
- for (var i = 0; i < keys.length; i++) {
1075
- var key = keys[i];
1076
- if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
1077
- defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1078
- }
1079
- }
1222
+ var scriptTag = function (content) {
1223
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1080
1224
  };
1081
1225
 
1082
- var fails$9 = fails$g;
1083
- var isCallable$7 = isCallable$g;
1226
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1227
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1228
+ activeXDocument.write(scriptTag(''));
1229
+ activeXDocument.close();
1230
+ var temp = activeXDocument.parentWindow.Object;
1231
+ activeXDocument = null; // avoid memory leak
1232
+ return temp;
1233
+ };
1084
1234
 
1085
- var replacement = /#|\.prototype\./;
1235
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1236
+ var NullProtoObjectViaIFrame = function () {
1237
+ // Thrash, waste and sodomy: IE GC bug
1238
+ var iframe = documentCreateElement$1('iframe');
1239
+ var JS = 'java' + SCRIPT + ':';
1240
+ var iframeDocument;
1241
+ iframe.style.display = 'none';
1242
+ html.appendChild(iframe);
1243
+ // https://github.com/zloirock/core-js/issues/475
1244
+ iframe.src = String(JS);
1245
+ iframeDocument = iframe.contentWindow.document;
1246
+ iframeDocument.open();
1247
+ iframeDocument.write(scriptTag('document.F=Object'));
1248
+ iframeDocument.close();
1249
+ return iframeDocument.F;
1250
+ };
1086
1251
 
1087
- var isForced$1 = function (feature, detection) {
1088
- var value = data[normalize(feature)];
1089
- return value == POLYFILL ? true
1090
- : value == NATIVE ? false
1091
- : isCallable$7(detection) ? fails$9(detection)
1092
- : !!detection;
1252
+ // Check for document.domain and active x support
1253
+ // No need to use active x approach when document.domain is not set
1254
+ // see https://github.com/es-shims/es5-shim/issues/150
1255
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1256
+ // avoid IE GC bug
1257
+ var activeXDocument;
1258
+ var NullProtoObject = function () {
1259
+ try {
1260
+ activeXDocument = new ActiveXObject('htmlfile');
1261
+ } catch (error) { /* ignore */ }
1262
+ NullProtoObject = typeof document != 'undefined'
1263
+ ? document.domain && activeXDocument
1264
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1265
+ : NullProtoObjectViaIFrame()
1266
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1267
+ var length = enumBugKeys.length;
1268
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1269
+ return NullProtoObject();
1093
1270
  };
1094
1271
 
1095
- var normalize = isForced$1.normalize = function (string) {
1096
- return String(string).replace(replacement, '.').toLowerCase();
1272
+ hiddenKeys[IE_PROTO$1] = true;
1273
+
1274
+ // `Object.create` method
1275
+ // https://tc39.es/ecma262/#sec-object.create
1276
+ // eslint-disable-next-line es/no-object-create -- safe
1277
+ var objectCreate = Object.create || function create(O, Properties) {
1278
+ var result;
1279
+ if (O !== null) {
1280
+ EmptyConstructor[PROTOTYPE] = anObject$4(O);
1281
+ result = new EmptyConstructor();
1282
+ EmptyConstructor[PROTOTYPE] = null;
1283
+ // add "__proto__" for Object.getPrototypeOf polyfill
1284
+ result[IE_PROTO$1] = O;
1285
+ } else result = NullProtoObject();
1286
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1097
1287
  };
1098
1288
 
1099
- var data = isForced$1.data = {};
1100
- var NATIVE = isForced$1.NATIVE = 'N';
1101
- var POLYFILL = isForced$1.POLYFILL = 'P';
1289
+ var wellKnownSymbol$8 = wellKnownSymbol$a;
1290
+ var create$2 = objectCreate;
1291
+ var defineProperty$2 = objectDefineProperty.f;
1102
1292
 
1103
- var isForced_1 = isForced$1;
1293
+ var UNSCOPABLES = wellKnownSymbol$8('unscopables');
1294
+ var ArrayPrototype = Array.prototype;
1104
1295
 
1105
- var global$c = global$w;
1106
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1107
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$6;
1108
- var redefine$3 = redefine$4.exports;
1109
- var setGlobal = setGlobal$3;
1110
- var copyConstructorProperties = copyConstructorProperties$1;
1111
- var isForced = isForced_1;
1296
+ // Array.prototype[@@unscopables]
1297
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1298
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
1299
+ defineProperty$2(ArrayPrototype, UNSCOPABLES, {
1300
+ configurable: true,
1301
+ value: create$2(null)
1302
+ });
1303
+ }
1112
1304
 
1113
- /*
1114
- options.target - name of the target object
1115
- options.global - target is the global object
1116
- options.stat - export as static methods of target
1117
- options.proto - export as prototype methods of target
1118
- options.real - real prototype method for the `pure` version
1119
- options.forced - export even if the native feature is available
1120
- options.bind - bind methods to the target, required for the `pure` version
1121
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1122
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
1123
- options.sham - add a flag to not completely full polyfills
1124
- options.enumerable - export as enumerable property
1125
- options.noTargetGet - prevent calling a getter on target
1126
- options.name - the .name of the function if it does not match the key
1127
- */
1128
- var _export = function (options, source) {
1129
- var TARGET = options.target;
1130
- var GLOBAL = options.global;
1131
- var STATIC = options.stat;
1132
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1133
- if (GLOBAL) {
1134
- target = global$c;
1135
- } else if (STATIC) {
1136
- target = global$c[TARGET] || setGlobal(TARGET, {});
1137
- } else {
1138
- target = (global$c[TARGET] || {}).prototype;
1139
- }
1140
- if (target) for (key in source) {
1141
- sourceProperty = source[key];
1142
- if (options.noTargetGet) {
1143
- descriptor = getOwnPropertyDescriptor(target, key);
1144
- targetProperty = descriptor && descriptor.value;
1145
- } else targetProperty = target[key];
1146
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1147
- // contained in target
1148
- if (!FORCED && targetProperty !== undefined) {
1149
- if (typeof sourceProperty == typeof targetProperty) continue;
1150
- copyConstructorProperties(sourceProperty, targetProperty);
1151
- }
1152
- // add a flag to not completely full polyfills
1153
- if (options.sham || (targetProperty && targetProperty.sham)) {
1154
- createNonEnumerableProperty$3(sourceProperty, 'sham', true);
1155
- }
1156
- // extend global
1157
- redefine$3(target, key, sourceProperty, options);
1158
- }
1305
+ // add a key to Array.prototype[@@unscopables]
1306
+ var addToUnscopables$1 = function (key) {
1307
+ ArrayPrototype[UNSCOPABLES][key] = true;
1159
1308
  };
1160
1309
 
1161
- var fails$8 = fails$g;
1310
+ var iterators = {};
1311
+
1312
+ var fails$6 = fails$h;
1162
1313
 
1163
- var correctPrototypeGetter = !fails$8(function () {
1314
+ var correctPrototypeGetter = !fails$6(function () {
1164
1315
  function F() { /* empty */ }
1165
1316
  F.prototype.constructor = null;
1166
1317
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1167
1318
  return Object.getPrototypeOf(new F()) !== F.prototype;
1168
1319
  });
1169
1320
 
1170
- var global$b = global$w;
1171
1321
  var hasOwn$1 = hasOwnProperty_1;
1172
- var isCallable$6 = isCallable$g;
1173
- var toObject$3 = toObject$5;
1322
+ var isCallable$6 = isCallable$h;
1323
+ var toObject$1 = toObject$5;
1174
1324
  var sharedKey = sharedKey$3;
1175
1325
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1176
1326
 
1177
1327
  var IE_PROTO = sharedKey('IE_PROTO');
1178
- var Object$2 = global$b.Object;
1179
- var ObjectPrototype = Object$2.prototype;
1328
+ var $Object$1 = Object;
1329
+ var ObjectPrototype = $Object$1.prototype;
1180
1330
 
1181
1331
  // `Object.getPrototypeOf` method
1182
1332
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1183
- var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$2.getPrototypeOf : function (O) {
1184
- var object = toObject$3(O);
1333
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1334
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1335
+ var object = toObject$1(O);
1185
1336
  if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1186
1337
  var constructor = object.constructor;
1187
1338
  if (isCallable$6(constructor) && object instanceof constructor) {
1188
1339
  return constructor.prototype;
1189
- } return object instanceof Object$2 ? ObjectPrototype : null;
1340
+ } return object instanceof $Object$1 ? ObjectPrototype : null;
1190
1341
  };
1191
1342
 
1192
- var fails$7 = fails$g;
1193
- var isCallable$5 = isCallable$g;
1343
+ var fails$5 = fails$h;
1344
+ var isCallable$5 = isCallable$h;
1345
+ var isObject = isObject$6;
1194
1346
  var getPrototypeOf$1 = objectGetPrototypeOf;
1195
- var redefine$2 = redefine$4.exports;
1347
+ var defineBuiltIn$2 = defineBuiltIn$4;
1196
1348
  var wellKnownSymbol$7 = wellKnownSymbol$a;
1197
1349
 
1198
1350
  var ITERATOR$2 = wellKnownSymbol$7('iterator');
@@ -1213,7 +1365,7 @@ if ([].keys) {
1213
1365
  }
1214
1366
  }
1215
1367
 
1216
- var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$7(function () {
1368
+ var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$5(function () {
1217
1369
  var test = {};
1218
1370
  // FF44- legacy iterators case
1219
1371
  return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
@@ -1224,7 +1376,7 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1224
1376
  // `%IteratorPrototype%[@@iterator]()` method
1225
1377
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1226
1378
  if (!isCallable$5(IteratorPrototype$2[ITERATOR$2])) {
1227
- redefine$2(IteratorPrototype$2, ITERATOR$2, function () {
1379
+ defineBuiltIn$2(IteratorPrototype$2, ITERATOR$2, function () {
1228
1380
  return this;
1229
1381
  });
1230
1382
  }
@@ -1234,7 +1386,7 @@ var iteratorsCore = {
1234
1386
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1235
1387
  };
1236
1388
 
1237
- var defineProperty$2 = objectDefineProperty.f;
1389
+ var defineProperty$1 = objectDefineProperty.f;
1238
1390
  var hasOwn = hasOwnProperty_1;
1239
1391
  var wellKnownSymbol$6 = wellKnownSymbol$a;
1240
1392
 
@@ -1243,7 +1395,7 @@ var TO_STRING_TAG$3 = wellKnownSymbol$6('toStringTag');
1243
1395
  var setToStringTag$2 = function (target, TAG, STATIC) {
1244
1396
  if (target && !STATIC) target = target.prototype;
1245
1397
  if (target && !hasOwn(target, TO_STRING_TAG$3)) {
1246
- defineProperty$2(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1398
+ defineProperty$1(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1247
1399
  }
1248
1400
  };
1249
1401
 
@@ -1255,7 +1407,7 @@ var Iterators$2 = iterators;
1255
1407
 
1256
1408
  var returnThis$1 = function () { return this; };
1257
1409
 
1258
- var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1410
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1259
1411
  var TO_STRING_TAG = NAME + ' Iterator';
1260
1412
  IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1261
1413
  setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
@@ -1263,15 +1415,14 @@ var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENU
1263
1415
  return IteratorConstructor;
1264
1416
  };
1265
1417
 
1266
- var global$a = global$w;
1267
- var isCallable$4 = isCallable$g;
1418
+ var isCallable$4 = isCallable$h;
1268
1419
 
1269
- var String$2 = global$a.String;
1270
- var TypeError$3 = global$a.TypeError;
1420
+ var $String$1 = String;
1421
+ var $TypeError$1 = TypeError;
1271
1422
 
1272
1423
  var aPossiblePrototype$1 = function (argument) {
1273
1424
  if (typeof argument == 'object' || isCallable$4(argument)) return argument;
1274
- throw TypeError$3("Can't set " + String$2(argument) + ' as a prototype');
1425
+ throw $TypeError$1("Can't set " + $String$1(argument) + ' as a prototype');
1275
1426
  };
1276
1427
 
1277
1428
  /* eslint-disable no-proto -- safe */
@@ -1303,16 +1454,16 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1303
1454
  };
1304
1455
  }() : undefined);
1305
1456
 
1306
- var $$3 = _export;
1307
- var call$5 = functionCall;
1457
+ var $$1 = _export;
1458
+ var call$4 = functionCall;
1308
1459
  var FunctionName = functionName;
1309
- var isCallable$3 = isCallable$g;
1310
- var createIteratorConstructor = createIteratorConstructor$1;
1460
+ var isCallable$3 = isCallable$h;
1461
+ var createIteratorConstructor = iteratorCreateConstructor;
1311
1462
  var getPrototypeOf = objectGetPrototypeOf;
1312
1463
  var setPrototypeOf = objectSetPrototypeOf;
1313
1464
  var setToStringTag = setToStringTag$2;
1314
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$6;
1315
- var redefine$1 = redefine$4.exports;
1465
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
1466
+ var defineBuiltIn$1 = defineBuiltIn$4;
1316
1467
  var wellKnownSymbol$5 = wellKnownSymbol$a;
1317
1468
  var Iterators$1 = iterators;
1318
1469
  var IteratorsCore = iteratorsCore;
@@ -1328,7 +1479,7 @@ var ENTRIES = 'entries';
1328
1479
 
1329
1480
  var returnThis = function () { return this; };
1330
1481
 
1331
- var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1482
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1332
1483
  createIteratorConstructor(IteratorConstructor, NAME, next);
1333
1484
 
1334
1485
  var getIterationMethod = function (KIND) {
@@ -1359,7 +1510,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1359
1510
  if (setPrototypeOf) {
1360
1511
  setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1361
1512
  } else if (!isCallable$3(CurrentIteratorPrototype[ITERATOR$1])) {
1362
- redefine$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1513
+ defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1363
1514
  }
1364
1515
  }
1365
1516
  // Set @@toStringTag to native iterators
@@ -1373,7 +1524,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1373
1524
  createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
1374
1525
  } else {
1375
1526
  INCORRECT_VALUES_NAME = true;
1376
- defaultIterator = function values() { return call$5(nativeIterator, this); };
1527
+ defaultIterator = function values() { return call$4(nativeIterator, this); };
1377
1528
  }
1378
1529
  }
1379
1530
 
@@ -1386,27 +1537,34 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1386
1537
  };
1387
1538
  if (FORCED) for (KEY in methods) {
1388
1539
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1389
- redefine$1(IterablePrototype, KEY, methods[KEY]);
1540
+ defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1390
1541
  }
1391
- } else $$3({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1542
+ } else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1392
1543
  }
1393
1544
 
1394
1545
  // define iterator
1395
1546
  if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1396
- redefine$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1547
+ defineBuiltIn$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1397
1548
  }
1398
1549
  Iterators$1[NAME] = defaultIterator;
1399
1550
 
1400
1551
  return methods;
1401
1552
  };
1402
1553
 
1554
+ // `CreateIterResultObject` abstract operation
1555
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1556
+ var createIterResultObject$1 = function (value, done) {
1557
+ return { value: value, done: done };
1558
+ };
1559
+
1403
1560
  var toIndexedObject = toIndexedObject$5;
1404
1561
  var addToUnscopables = addToUnscopables$1;
1405
1562
  var Iterators = iterators;
1406
1563
  var InternalStateModule = internalState;
1407
- var defineProperty$1 = objectDefineProperty.f;
1408
- var defineIterator = defineIterator$1;
1409
- var DESCRIPTORS$1 = descriptors;
1564
+ var defineProperty = objectDefineProperty.f;
1565
+ var defineIterator = iteratorDefine;
1566
+ var createIterResultObject = createIterResultObject$1;
1567
+ var DESCRIPTORS = descriptors;
1410
1568
 
1411
1569
  var ARRAY_ITERATOR = 'Array Iterator';
1412
1570
  var setInternalState = InternalStateModule.set;
@@ -1438,11 +1596,11 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1438
1596
  var index = state.index++;
1439
1597
  if (!target || index >= target.length) {
1440
1598
  state.target = undefined;
1441
- return { value: undefined, done: true };
1599
+ return createIterResultObject(undefined, true);
1442
1600
  }
1443
- if (kind == 'keys') return { value: index, done: false };
1444
- if (kind == 'values') return { value: target[index], done: false };
1445
- return { value: [index, target[index]], done: false };
1601
+ if (kind == 'keys') return createIterResultObject(index, false);
1602
+ if (kind == 'values') return createIterResultObject(target[index], false);
1603
+ return createIterResultObject([index, target[index]], false);
1446
1604
  }, 'values');
1447
1605
 
1448
1606
  // argumentsList[@@iterator] is %ArrayProto_values%
@@ -1456,8 +1614,8 @@ addToUnscopables('values');
1456
1614
  addToUnscopables('entries');
1457
1615
 
1458
1616
  // V8 ~ Chrome 45- bug
1459
- if (DESCRIPTORS$1 && values.name !== 'values') try {
1460
- defineProperty$1(values, 'name', { value: 'values' });
1617
+ if (DESCRIPTORS && values.name !== 'values') try {
1618
+ defineProperty(values, 'name', { value: 'values' });
1461
1619
  } catch (error) { /* empty */ }
1462
1620
 
1463
1621
  // iterable DOM collections
@@ -1504,11 +1662,11 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
1504
1662
 
1505
1663
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1506
1664
 
1507
- var global$9 = global$w;
1665
+ var global$4 = global$f;
1508
1666
  var DOMIterables = domIterables;
1509
1667
  var DOMTokenListPrototype = domTokenListPrototype;
1510
1668
  var ArrayIteratorMethods = es_array_iterator;
1511
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$6;
1669
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1512
1670
  var wellKnownSymbol$4 = wellKnownSymbol$a;
1513
1671
 
1514
1672
  var ITERATOR = wellKnownSymbol$4('iterator');
@@ -1538,77 +1696,166 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1538
1696
  };
1539
1697
 
1540
1698
  for (var COLLECTION_NAME in DOMIterables) {
1541
- handlePrototype(global$9[COLLECTION_NAME] && global$9[COLLECTION_NAME].prototype, COLLECTION_NAME);
1699
+ handlePrototype(global$4[COLLECTION_NAME] && global$4[COLLECTION_NAME].prototype, COLLECTION_NAME);
1542
1700
  }
1543
1701
 
1544
1702
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1545
1703
 
1546
- var DESCRIPTORS = descriptors;
1547
- var uncurryThis$5 = functionUncurryThis;
1548
- var call$4 = functionCall;
1549
- var fails$6 = fails$g;
1550
- var objectKeys = objectKeys$2;
1551
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1552
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1553
- var toObject$2 = toObject$5;
1554
- var IndexedObject$1 = indexedObject;
1704
+ /******************************************************************************
1705
+ Copyright (c) Microsoft Corporation.
1706
+
1707
+ Permission to use, copy, modify, and/or distribute this software for any
1708
+ purpose with or without fee is hereby granted.
1709
+
1710
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1711
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1712
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1713
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1714
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1715
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1716
+ PERFORMANCE OF THIS SOFTWARE.
1717
+ ***************************************************************************** */
1718
+
1719
+ function __rest(s, e) {
1720
+ var t = {};
1721
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1722
+ t[p] = s[p];
1723
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1724
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1725
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1726
+ t[p[i]] = s[p[i]];
1727
+ }
1728
+ return t;
1729
+ }
1730
+
1731
+ function __awaiter(thisArg, _arguments, P, generator) {
1732
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1733
+ return new (P || (P = Promise))(function (resolve, reject) {
1734
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1735
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1736
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1737
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1738
+ });
1739
+ }
1555
1740
 
1556
- // eslint-disable-next-line es/no-object-assign -- safe
1557
- var $assign = Object.assign;
1558
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1559
- var defineProperty = Object.defineProperty;
1560
- var concat$1 = uncurryThis$5([].concat);
1741
+ const EXPERIENCE_TRAIT_PREFIX = 'nt_experiment_';
1561
1742
 
1562
- // `Object.assign` method
1563
- // https://tc39.es/ecma262/#sec-object.assign
1564
- var objectAssign = !$assign || fails$6(function () {
1565
- // should have correct order of operations (Edge bug)
1566
- if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1567
- enumerable: true,
1568
- get: function () {
1569
- defineProperty(this, 'b', {
1570
- value: 3,
1571
- enumerable: false
1572
- });
1573
- }
1574
- }), { b: 2 })).b !== 1) return true;
1575
- // should work with symbols and should have deterministic property order (V8 bug)
1576
- var A = {};
1577
- var B = {};
1578
- // eslint-disable-next-line es/no-symbol -- safe
1579
- var symbol = Symbol();
1580
- var alphabet = 'abcdefghijklmnopqrst';
1581
- A[symbol] = 7;
1582
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1583
- return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
1584
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1585
- var T = toObject$2(target);
1586
- var argumentsLength = arguments.length;
1587
- var index = 1;
1588
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1589
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
1590
- while (argumentsLength > index) {
1591
- var S = IndexedObject$1(arguments[index++]);
1592
- var keys = getOwnPropertySymbols ? concat$1(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1593
- var length = keys.length;
1594
- var j = 0;
1595
- var key;
1596
- while (length > j) {
1597
- key = keys[j++];
1598
- if (!DESCRIPTORS || call$4(propertyIsEnumerable, S, key)) T[key] = S[key];
1743
+ const useNinetailed = () => {
1744
+ const ninetailed = useContext(NinetailedContext);
1745
+ if (ninetailed === undefined) {
1746
+ throw new Error('The component using the the context must be a descendant of the NinetailedProvider');
1747
+ }
1748
+ return ninetailed;
1749
+ };
1750
+
1751
+ const debounce = (fn, wait, options) => {
1752
+ let debouncedArgs = [];
1753
+ const debouncedFn = _debounce(() => {
1754
+ fn.call(undefined, debouncedArgs);
1755
+ debouncedArgs = [];
1756
+ }, wait, options);
1757
+ return (...args) => {
1758
+ debouncedArgs.push(values$1(args));
1759
+ debouncedFn();
1760
+ };
1761
+ };
1762
+ const useProvideJoinExperiment = ({
1763
+ experiments,
1764
+ maximumActiveExperiments: _maximumActiveExperiments = 1
1765
+ }) => {
1766
+ const {
1767
+ identify
1768
+ } = useNinetailed();
1769
+ const joinExperimentIdentify = debounce(args => {
1770
+ const traits = args.slice(0, _maximumActiveExperiments).reduce((traits, [experimentJoinTraits]) => {
1771
+ return Object.assign(Object.assign({}, experimentJoinTraits), traits);
1772
+ }, {});
1773
+ identify('', traits);
1774
+ });
1775
+ return useCallback(data => __awaiter(void 0, void 0, void 0, function* () {
1776
+ const {
1777
+ experiment,
1778
+ profile
1779
+ } = data;
1780
+ const isExperiment = experiment.type === 'nt_experiment';
1781
+ if (!isExperiment) {
1782
+ logger.warn(`The experience ${experiment.id}, which you tried to join, is not an experiment.`);
1783
+ return;
1599
1784
  }
1600
- } return T;
1601
- } : $assign;
1785
+ const activeExperiments = selectActiveExperiments(experiments, profile);
1786
+ if (activeExperiments.length >= _maximumActiveExperiments) {
1787
+ logger.warn(`The maximum number of active experiments (${_maximumActiveExperiments}) has been reached.`);
1788
+ return;
1789
+ }
1790
+ if (activeExperiments.some(activeExperiment => activeExperiment.id === experiment.id)) {
1791
+ logger.debug(`The user is already part of experiment ${experiment.id}. Won't join again.`);
1792
+ return;
1793
+ }
1794
+ joinExperimentIdentify({
1795
+ [`${EXPERIENCE_TRAIT_PREFIX}${experiment.id}`]: true
1796
+ });
1797
+ logger.debug(`Sent event to join experiment ${experiment.id}.`);
1798
+ }), []);
1799
+ };
1602
1800
 
1603
- var $$2 = _export;
1604
- var assign = objectAssign;
1801
+ const ExperimentsProvider = ({
1802
+ experiments,
1803
+ maximumActiveExperiments: _maximumActiveExperiments = 1,
1804
+ children
1805
+ }) => {
1806
+ const joinExperiment = useProvideJoinExperiment({
1807
+ experiments,
1808
+ maximumActiveExperiments: _maximumActiveExperiments
1809
+ });
1810
+ return jsx(ExperimentsContext.Provider, Object.assign({
1811
+ value: {
1812
+ experiments,
1813
+ joinExperiment
1814
+ }
1815
+ }, {
1816
+ children: children
1817
+ }));
1818
+ };
1605
1819
 
1606
- // `Object.assign` method
1607
- // https://tc39.es/ecma262/#sec-object.assign
1608
- // eslint-disable-next-line es/no-object-assign -- required for testing
1609
- $$2({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1610
- assign: assign
1611
- });
1820
+ const NinetailedProvider = ({
1821
+ children,
1822
+ clientId,
1823
+ experiments: _experiments = [],
1824
+ maximumActiveExperiments,
1825
+ environment,
1826
+ preview,
1827
+ url,
1828
+ profile,
1829
+ locale,
1830
+ requestTimeout,
1831
+ plugins: _plugins = [],
1832
+ onLog,
1833
+ onError
1834
+ }) => {
1835
+ const ninetailed = useMemo(() => new Ninetailed({
1836
+ clientId,
1837
+ environment,
1838
+ preview
1839
+ }, {
1840
+ url,
1841
+ plugins: _plugins,
1842
+ profile,
1843
+ locale,
1844
+ requestTimeout,
1845
+ onLog,
1846
+ onError
1847
+ }), []);
1848
+ return jsx(NinetailedContext.Provider, Object.assign({
1849
+ value: ninetailed
1850
+ }, {
1851
+ children: jsx(ExperimentsProvider, Object.assign({
1852
+ experiments: _experiments,
1853
+ maximumActiveExperiments: maximumActiveExperiments
1854
+ }, {
1855
+ children: children
1856
+ }))
1857
+ }));
1858
+ };
1612
1859
 
1613
1860
  const useProfile = () => {
1614
1861
  const ninetailed = useNinetailed();
@@ -1620,30 +1867,27 @@ const useProfile = () => {
1620
1867
  * This behaviour occurred as the validation handling on the error property was not set properly in the "CreateProfile" and "UpdateProfile" endpoint types.
1621
1868
  * Furthermore, it was also observed, that it "only" occurred when the preview plugin was used in parallel.
1622
1869
  */
1623
-
1624
1870
  useEffect(() => {
1625
1871
  ninetailed.onProfileChange(profileState => {
1626
1872
  if (isEqual(profileState, profileStateRef.current)) {
1627
- logger.debug("Profile State Did Not Change", profileState);
1873
+ logger.debug('Profile State Did Not Change', profileState);
1628
1874
  return;
1629
1875
  } else {
1630
1876
  setProfileState(profileState);
1631
1877
  profileStateRef.current = profileState;
1632
- logger.debug("Profile State Changed", profileState);
1878
+ logger.debug('Profile State Changed', profileState);
1633
1879
  }
1634
1880
  });
1635
1881
  }, []);
1636
1882
  /**
1637
1883
  * Old implementation without profile state deep comparison
1638
1884
  */
1639
-
1640
1885
  /*useEffect(() => {
1641
- return ninetailed.onProfileChange((profileState) => {
1642
- console.log('profileState', profileState);
1643
- setProfileState(profileState);
1644
- });
1886
+ return ninetailed.onProfileChange((profileState) => {
1887
+ console.log('profileState', profileState);
1888
+ setProfileState(profileState);
1889
+ });
1645
1890
  }, []);*/
1646
-
1647
1891
  return Object.assign(Object.assign({}, profileState), {
1648
1892
  loading: profileState.status === 'loading'
1649
1893
  });
@@ -1656,33 +1900,6 @@ const usePersonalize = (baseline, variants, options = {
1656
1900
  return selectVariant(baseline, variants, profile, options);
1657
1901
  };
1658
1902
 
1659
- /*! *****************************************************************************
1660
- Copyright (c) Microsoft Corporation.
1661
-
1662
- Permission to use, copy, modify, and/or distribute this software for any
1663
- purpose with or without fee is hereby granted.
1664
-
1665
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1666
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1667
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1668
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1669
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1670
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1671
- PERFORMANCE OF THIS SOFTWARE.
1672
- ***************************************************************************** */
1673
-
1674
- function __rest(s, e) {
1675
- var t = {};
1676
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1677
- t[p] = s[p];
1678
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1679
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1680
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1681
- t[p[i]] = s[p[i]];
1682
- }
1683
- return t;
1684
- }
1685
-
1686
1903
  const TrackHasSeenComponent = ({
1687
1904
  children,
1688
1905
  variant,
@@ -1705,20 +1922,21 @@ const TrackHasSeenComponent = ({
1705
1922
  });
1706
1923
  }
1707
1924
  }, [inView]);
1708
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1709
- ref: ref
1710
- }), children);
1925
+ return jsxs(Fragment, {
1926
+ children: [jsx("div", {
1927
+ ref: ref
1928
+ }), children]
1929
+ });
1711
1930
  };
1712
1931
 
1713
1932
  const Personalize = _a => {
1714
1933
  var {
1715
- component: Component,
1716
- loadingComponent: LoadingComponent,
1717
- variants = [],
1718
- holdout = -1
1719
- } = _a,
1720
- baseline = __rest(_a, ["component", "loadingComponent", "variants", "holdout"]);
1721
-
1934
+ component: Component,
1935
+ loadingComponent: LoadingComponent,
1936
+ variants = [],
1937
+ holdout = -1
1938
+ } = _a,
1939
+ baseline = __rest(_a, ["component", "loadingComponent", "variants", "holdout"]);
1722
1940
  const {
1723
1941
  loading,
1724
1942
  variant,
@@ -1728,45 +1946,44 @@ const Personalize = _a => {
1728
1946
  holdout
1729
1947
  });
1730
1948
  const hasVariants = variants.length > 0;
1731
-
1732
1949
  if (!hasVariants) {
1733
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, baseline, {
1950
+ return jsx(Component, Object.assign({}, baseline, {
1734
1951
  ninetailed: {
1735
1952
  isPersonalized,
1736
1953
  audience
1737
1954
  }
1738
1955
  }));
1739
1956
  }
1740
-
1741
1957
  if (loading) {
1742
1958
  if (LoadingComponent) {
1743
- return /*#__PURE__*/React.createElement(LoadingComponent, null);
1959
+ return jsx(LoadingComponent, {});
1744
1960
  }
1745
-
1746
- return /*#__PURE__*/React.createElement("div", {
1747
- key: "hide",
1961
+ return jsx("div", Object.assign({
1748
1962
  style: {
1749
1963
  opacity: 0
1750
1964
  }
1751
- }, /*#__PURE__*/React.createElement(Component, Object.assign({}, variant, {
1752
- ninetailed: {
1753
- isPersonalized,
1754
- audience
1755
- }
1756
- })));
1965
+ }, {
1966
+ children: jsx(Component, Object.assign({}, variant, {
1967
+ ninetailed: {
1968
+ isPersonalized,
1969
+ audience
1970
+ }
1971
+ }))
1972
+ }), "hide");
1757
1973
  }
1758
-
1759
- return /*#__PURE__*/React.createElement(TrackHasSeenComponent, {
1974
+ return jsx(TrackHasSeenComponent, Object.assign({
1760
1975
  variant: variant,
1761
1976
  audience: audience,
1762
1977
  isPersonalized: isPersonalized
1763
- }, /*#__PURE__*/React.createElement(Component, Object.assign({}, variant, {
1764
- key: `${audience.id}-${variant.id}`,
1765
- ninetailed: {
1766
- isPersonalized,
1767
- audience
1768
- }
1769
- })));
1978
+ }, {
1979
+ children: /*#__PURE__*/createElement$1(Component, Object.assign({}, variant, {
1980
+ key: `${audience.id}-${variant.id}`,
1981
+ ninetailed: {
1982
+ isPersonalized,
1983
+ audience
1984
+ }
1985
+ }))
1986
+ }));
1770
1987
  };
1771
1988
 
1772
1989
  var wellKnownSymbol$3 = wellKnownSymbol$a;
@@ -1778,17 +1995,16 @@ test[TO_STRING_TAG$1] = 'z';
1778
1995
 
1779
1996
  var toStringTagSupport = String(test) === '[object z]';
1780
1997
 
1781
- var global$8 = global$w;
1782
1998
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1783
- var isCallable$2 = isCallable$g;
1784
- var classofRaw = classofRaw$1;
1999
+ var isCallable$2 = isCallable$h;
2000
+ var classofRaw$1 = classofRaw$2;
1785
2001
  var wellKnownSymbol$2 = wellKnownSymbol$a;
1786
2002
 
1787
2003
  var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1788
- var Object$1 = global$8.Object;
2004
+ var $Object = Object;
1789
2005
 
1790
2006
  // ES3 wrong here
1791
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
2007
+ var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
1792
2008
 
1793
2009
  // fallback for IE11 Script Access Denied error
1794
2010
  var tryGet = function (it, key) {
@@ -1798,25 +2014,24 @@ var tryGet = function (it, key) {
1798
2014
  };
1799
2015
 
1800
2016
  // getting tag from ES6+ `Object.prototype.toString`
1801
- var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
2017
+ var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1802
2018
  var O, tag, result;
1803
2019
  return it === undefined ? 'Undefined' : it === null ? 'Null'
1804
2020
  // @@toStringTag case
1805
- : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
2021
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1806
2022
  // builtinTag case
1807
- : CORRECT_ARGUMENTS ? classofRaw(O)
2023
+ : CORRECT_ARGUMENTS ? classofRaw$1(O)
1808
2024
  // ES3 arguments fallback
1809
- : (result = classofRaw(O)) == 'Object' && isCallable$2(O.callee) ? 'Arguments' : result;
2025
+ : (result = classofRaw$1(O)) == 'Object' && isCallable$2(O.callee) ? 'Arguments' : result;
1810
2026
  };
1811
2027
 
1812
- var global$7 = global$w;
1813
- var classof$2 = classof$3;
2028
+ var classof$1 = classof$2;
1814
2029
 
1815
- var String$1 = global$7.String;
2030
+ var $String = String;
1816
2031
 
1817
2032
  var toString$3 = function (argument) {
1818
- if (classof$2(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1819
- return String$1(argument);
2033
+ if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
2034
+ return $String(argument);
1820
2035
  };
1821
2036
 
1822
2037
  var anObject$2 = anObject$8;
@@ -1826,22 +2041,24 @@ var anObject$2 = anObject$8;
1826
2041
  var regexpFlags$1 = function () {
1827
2042
  var that = anObject$2(this);
1828
2043
  var result = '';
2044
+ if (that.hasIndices) result += 'd';
1829
2045
  if (that.global) result += 'g';
1830
2046
  if (that.ignoreCase) result += 'i';
1831
2047
  if (that.multiline) result += 'm';
1832
2048
  if (that.dotAll) result += 's';
1833
2049
  if (that.unicode) result += 'u';
2050
+ if (that.unicodeSets) result += 'v';
1834
2051
  if (that.sticky) result += 'y';
1835
2052
  return result;
1836
2053
  };
1837
2054
 
1838
- var fails$5 = fails$g;
1839
- var global$6 = global$w;
2055
+ var fails$4 = fails$h;
2056
+ var global$3 = global$f;
1840
2057
 
1841
2058
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1842
- var $RegExp$2 = global$6.RegExp;
2059
+ var $RegExp$2 = global$3.RegExp;
1843
2060
 
1844
- var UNSUPPORTED_Y$1 = fails$5(function () {
2061
+ var UNSUPPORTED_Y$1 = fails$4(function () {
1845
2062
  var re = $RegExp$2('a', 'y');
1846
2063
  re.lastIndex = 2;
1847
2064
  return re.exec('abcd') != null;
@@ -1849,11 +2066,11 @@ var UNSUPPORTED_Y$1 = fails$5(function () {
1849
2066
 
1850
2067
  // UC Browser bug
1851
2068
  // https://github.com/zloirock/core-js/issues/1008
1852
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$5(function () {
2069
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$4(function () {
1853
2070
  return !$RegExp$2('a', 'y').sticky;
1854
2071
  });
1855
2072
 
1856
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$5(function () {
2073
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$4(function () {
1857
2074
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1858
2075
  var re = $RegExp$2('^r', 'gy');
1859
2076
  re.lastIndex = 2;
@@ -1866,24 +2083,24 @@ var regexpStickyHelpers = {
1866
2083
  UNSUPPORTED_Y: UNSUPPORTED_Y$1
1867
2084
  };
1868
2085
 
1869
- var fails$4 = fails$g;
1870
- var global$5 = global$w;
2086
+ var fails$3 = fails$h;
2087
+ var global$2 = global$f;
1871
2088
 
1872
2089
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1873
- var $RegExp$1 = global$5.RegExp;
2090
+ var $RegExp$1 = global$2.RegExp;
1874
2091
 
1875
- var regexpUnsupportedDotAll = fails$4(function () {
2092
+ var regexpUnsupportedDotAll = fails$3(function () {
1876
2093
  var re = $RegExp$1('.', 's');
1877
2094
  return !(re.dotAll && re.exec('\n') && re.flags === 's');
1878
2095
  });
1879
2096
 
1880
- var fails$3 = fails$g;
1881
- var global$4 = global$w;
2097
+ var fails$2 = fails$h;
2098
+ var global$1 = global$f;
1882
2099
 
1883
2100
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1884
- var $RegExp = global$4.RegExp;
2101
+ var $RegExp = global$1.RegExp;
1885
2102
 
1886
- var regexpUnsupportedNcg = fails$3(function () {
2103
+ var regexpUnsupportedNcg = fails$2(function () {
1887
2104
  var re = $RegExp('(?<a>b)', 'g');
1888
2105
  return re.exec('b').groups.a !== 'b' ||
1889
2106
  'b'.replace(re, '$<a>c') !== 'bc';
@@ -1892,7 +2109,7 @@ var regexpUnsupportedNcg = fails$3(function () {
1892
2109
  /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1893
2110
  /* eslint-disable regexp/no-useless-quantifier -- testing */
1894
2111
  var call$3 = functionCall;
1895
- var uncurryThis$4 = functionUncurryThis;
2112
+ var uncurryThis$5 = functionUncurryThis;
1896
2113
  var toString$2 = toString$3;
1897
2114
  var regexpFlags = regexpFlags$1;
1898
2115
  var stickyHelpers = regexpStickyHelpers;
@@ -1905,10 +2122,10 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1905
2122
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
1906
2123
  var nativeExec = RegExp.prototype.exec;
1907
2124
  var patchedExec = nativeExec;
1908
- var charAt$3 = uncurryThis$4(''.charAt);
1909
- var indexOf = uncurryThis$4(''.indexOf);
1910
- var replace$1 = uncurryThis$4(''.replace);
1911
- var stringSlice$3 = uncurryThis$4(''.slice);
2125
+ var charAt$3 = uncurryThis$5(''.charAt);
2126
+ var indexOf = uncurryThis$5(''.indexOf);
2127
+ var replace$1 = uncurryThis$5(''.replace);
2128
+ var stringSlice$3 = uncurryThis$5(''.slice);
1912
2129
 
1913
2130
  var UPDATES_LAST_INDEX_WRONG = (function () {
1914
2131
  var re1 = /a/;
@@ -1984,7 +2201,7 @@ if (PATCH) {
1984
2201
  }
1985
2202
  if (NPCG_INCLUDED && match && match.length > 1) {
1986
2203
  // Fix browsers whose `exec` methods don't consistently return `undefined`
1987
- // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
2204
+ // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
1988
2205
  call$3(nativeReplace, match[0], reCopy, function () {
1989
2206
  for (i = 1; i < arguments.length - 2; i++) {
1990
2207
  if (arguments[i] === undefined) match[i] = undefined;
@@ -2006,12 +2223,12 @@ if (PATCH) {
2006
2223
 
2007
2224
  var regexpExec$2 = patchedExec;
2008
2225
 
2009
- var $$1 = _export;
2226
+ var $ = _export;
2010
2227
  var exec = regexpExec$2;
2011
2228
 
2012
2229
  // `RegExp.prototype.exec` method
2013
2230
  // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2014
- $$1({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2231
+ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2015
2232
  exec: exec
2016
2233
  });
2017
2234
 
@@ -2026,14 +2243,24 @@ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND
2026
2243
  return call$2.apply(apply$1, arguments);
2027
2244
  });
2028
2245
 
2246
+ var classofRaw = classofRaw$2;
2247
+ var uncurryThis$4 = functionUncurryThis;
2248
+
2249
+ var functionUncurryThisClause = function (fn) {
2250
+ // Nashorn bug:
2251
+ // https://github.com/zloirock/core-js/issues/1128
2252
+ // https://github.com/zloirock/core-js/issues/1130
2253
+ if (classofRaw(fn) === 'Function') return uncurryThis$4(fn);
2254
+ };
2255
+
2029
2256
  // TODO: Remove from `core-js@4` since it's moved to entry points
2030
2257
 
2031
- var uncurryThis$3 = functionUncurryThis;
2032
- var redefine = redefine$4.exports;
2258
+ var uncurryThis$3 = functionUncurryThisClause;
2259
+ var defineBuiltIn = defineBuiltIn$4;
2033
2260
  var regexpExec$1 = regexpExec$2;
2034
- var fails$2 = fails$g;
2261
+ var fails$1 = fails$h;
2035
2262
  var wellKnownSymbol$1 = wellKnownSymbol$a;
2036
- var createNonEnumerableProperty = createNonEnumerableProperty$6;
2263
+ var createNonEnumerableProperty = createNonEnumerableProperty$5;
2037
2264
 
2038
2265
  var SPECIES = wellKnownSymbol$1('species');
2039
2266
  var RegExpPrototype = RegExp.prototype;
@@ -2041,14 +2268,14 @@ var RegExpPrototype = RegExp.prototype;
2041
2268
  var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2042
2269
  var SYMBOL = wellKnownSymbol$1(KEY);
2043
2270
 
2044
- var DELEGATES_TO_SYMBOL = !fails$2(function () {
2271
+ var DELEGATES_TO_SYMBOL = !fails$1(function () {
2045
2272
  // String methods call symbol-named RegEp methods
2046
2273
  var O = {};
2047
2274
  O[SYMBOL] = function () { return 7; };
2048
2275
  return ''[KEY](O) != 7;
2049
2276
  });
2050
2277
 
2051
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$2(function () {
2278
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
2052
2279
  // Symbol-named RegExp methods call .exec
2053
2280
  var execCalled = false;
2054
2281
  var re = /a/;
@@ -2093,8 +2320,8 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2093
2320
  return { done: false };
2094
2321
  });
2095
2322
 
2096
- redefine(String.prototype, KEY, methods[0]);
2097
- redefine(RegExpPrototype, SYMBOL, methods[1]);
2323
+ defineBuiltIn(String.prototype, KEY, methods[0]);
2324
+ defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
2098
2325
  }
2099
2326
 
2100
2327
  if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
@@ -2109,7 +2336,7 @@ var charAt$2 = uncurryThis$2(''.charAt);
2109
2336
  var charCodeAt = uncurryThis$2(''.charCodeAt);
2110
2337
  var stringSlice$2 = uncurryThis$2(''.slice);
2111
2338
 
2112
- var createMethod$1 = function (CONVERT_TO_STRING) {
2339
+ var createMethod = function (CONVERT_TO_STRING) {
2113
2340
  return function ($this, pos) {
2114
2341
  var S = toString$1(requireObjectCoercible$1($this));
2115
2342
  var position = toIntegerOrInfinity$1(pos);
@@ -2131,10 +2358,10 @@ var createMethod$1 = function (CONVERT_TO_STRING) {
2131
2358
  var stringMultibyte = {
2132
2359
  // `String.prototype.codePointAt` method
2133
2360
  // https://tc39.es/ecma262/#sec-string.prototype.codepointat
2134
- codeAt: createMethod$1(false),
2361
+ codeAt: createMethod(false),
2135
2362
  // `String.prototype.at` method
2136
2363
  // https://github.com/mathiasbynens/String.prototype.at
2137
- charAt: createMethod$1(true)
2364
+ charAt: createMethod(true)
2138
2365
  };
2139
2366
 
2140
2367
  var charAt$1 = stringMultibyte.charAt;
@@ -2146,7 +2373,7 @@ var advanceStringIndex$1 = function (S, index, unicode) {
2146
2373
  };
2147
2374
 
2148
2375
  var uncurryThis$1 = functionUncurryThis;
2149
- var toObject$1 = toObject$5;
2376
+ var toObject = toObject$5;
2150
2377
 
2151
2378
  var floor = Math.floor;
2152
2379
  var charAt = uncurryThis$1(''.charAt);
@@ -2162,7 +2389,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2162
2389
  var m = captures.length;
2163
2390
  var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
2164
2391
  if (namedCaptures !== undefined) {
2165
- namedCaptures = toObject$1(namedCaptures);
2392
+ namedCaptures = toObject(namedCaptures);
2166
2393
  symbols = SUBSTITUTION_SYMBOLS;
2167
2394
  }
2168
2395
  return replace(replacement, symbols, function (match, ch) {
@@ -2190,14 +2417,13 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2190
2417
  });
2191
2418
  };
2192
2419
 
2193
- var global$3 = global$w;
2194
2420
  var call$1 = functionCall;
2195
2421
  var anObject$1 = anObject$8;
2196
- var isCallable$1 = isCallable$g;
2197
- var classof$1 = classofRaw$1;
2422
+ var isCallable$1 = isCallable$h;
2423
+ var classof = classofRaw$2;
2198
2424
  var regexpExec = regexpExec$2;
2199
2425
 
2200
- var TypeError$2 = global$3.TypeError;
2426
+ var $TypeError = TypeError;
2201
2427
 
2202
2428
  // `RegExpExec` abstract operation
2203
2429
  // https://tc39.es/ecma262/#sec-regexpexec
@@ -2208,17 +2434,18 @@ var regexpExecAbstract = function (R, S) {
2208
2434
  if (result !== null) anObject$1(result);
2209
2435
  return result;
2210
2436
  }
2211
- if (classof$1(R) === 'RegExp') return call$1(regexpExec, R, S);
2212
- throw TypeError$2('RegExp#exec called on incompatible receiver');
2437
+ if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
2438
+ throw $TypeError('RegExp#exec called on incompatible receiver');
2213
2439
  };
2214
2440
 
2215
2441
  var apply = functionApply;
2216
2442
  var call = functionCall;
2217
2443
  var uncurryThis = functionUncurryThis;
2218
2444
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2219
- var fails$1 = fails$g;
2445
+ var fails = fails$h;
2220
2446
  var anObject = anObject$8;
2221
- var isCallable = isCallable$g;
2447
+ var isCallable = isCallable$h;
2448
+ var isNullOrUndefined = isNullOrUndefined$3;
2222
2449
  var toIntegerOrInfinity = toIntegerOrInfinity$4;
2223
2450
  var toLength = toLength$2;
2224
2451
  var toString = toString$3;
@@ -2256,7 +2483,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2256
2483
  return false;
2257
2484
  })();
2258
2485
 
2259
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$1(function () {
2486
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
2260
2487
  var re = /./;
2261
2488
  re.exec = function () {
2262
2489
  var result = [];
@@ -2276,7 +2503,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2276
2503
  // https://tc39.es/ecma262/#sec-string.prototype.replace
2277
2504
  function replace(searchValue, replaceValue) {
2278
2505
  var O = requireObjectCoercible(this);
2279
- var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
2506
+ var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
2280
2507
  return replacer
2281
2508
  ? call(replacer, searchValue, O, replaceValue)
2282
2509
  : call(nativeReplace, toString(O), searchValue, replaceValue);
@@ -2355,14 +2582,14 @@ const MergeTag = ({
2355
2582
  loading,
2356
2583
  profile
2357
2584
  } = useProfile();
2358
-
2359
2585
  if (loading || !profile) {
2360
2586
  return null;
2361
2587
  }
2362
-
2363
- const value = get$1(profile, id.replace(/_/g, '.')); // DON'T CHANGE
2364
-
2365
- return /*#__PURE__*/React.createElement(React.Fragment, null, value);
2588
+ const value = get$1(profile, id.replace(/_/g, '.'));
2589
+ // DON'T CHANGE
2590
+ return jsx(Fragment, {
2591
+ children: value
2592
+ });
2366
2593
  };
2367
2594
 
2368
2595
  const TrackExperience = ({
@@ -2384,105 +2611,37 @@ const TrackExperience = ({
2384
2611
  experience,
2385
2612
  profile
2386
2613
  });
2387
- ninetailed.trackExperience({
2388
- experience,
2389
- component: variant,
2390
- variant: distribution.index
2614
+ ninetailed.trackHasSeenExperience({
2615
+ experience: {
2616
+ id: experience.id,
2617
+ type: experience.type,
2618
+ name: '',
2619
+ description: ''
2620
+ },
2621
+ audience: experience.audience,
2622
+ selectedVariant: variant,
2623
+ selectedVariantIndex: distribution.index
2391
2624
  });
2392
2625
  }
2393
2626
  }, [inView]);
2394
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2395
- ref: ref,
2396
- id: "nt-experience-handle"
2397
- }), children);
2398
- };
2399
-
2400
- var global$2 = global$w;
2401
- var aCallable = aCallable$2;
2402
- var toObject = toObject$5;
2403
- var IndexedObject = indexedObject;
2404
- var lengthOfArrayLike = lengthOfArrayLike$2;
2405
-
2406
- var TypeError$1 = global$2.TypeError;
2407
-
2408
- // `Array.prototype.{ reduce, reduceRight }` methods implementation
2409
- var createMethod = function (IS_RIGHT) {
2410
- return function (that, callbackfn, argumentsLength, memo) {
2411
- aCallable(callbackfn);
2412
- var O = toObject(that);
2413
- var self = IndexedObject(O);
2414
- var length = lengthOfArrayLike(O);
2415
- var index = IS_RIGHT ? length - 1 : 0;
2416
- var i = IS_RIGHT ? -1 : 1;
2417
- if (argumentsLength < 2) while (true) {
2418
- if (index in self) {
2419
- memo = self[index];
2420
- index += i;
2421
- break;
2422
- }
2423
- index += i;
2424
- if (IS_RIGHT ? index < 0 : length <= index) {
2425
- throw TypeError$1('Reduce of empty array with no initial value');
2426
- }
2427
- }
2428
- for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
2429
- memo = callbackfn(memo, self[index], index, O);
2430
- }
2431
- return memo;
2432
- };
2433
- };
2434
-
2435
- var arrayReduce = {
2436
- // `Array.prototype.reduce` method
2437
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
2438
- left: createMethod(false),
2439
- // `Array.prototype.reduceRight` method
2440
- // https://tc39.es/ecma262/#sec-array.prototype.reduceright
2441
- right: createMethod(true)
2442
- };
2443
-
2444
- var fails = fails$g;
2445
-
2446
- var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
2447
- var method = [][METHOD_NAME];
2448
- return !!method && fails(function () {
2449
- // eslint-disable-next-line no-useless-call -- required for testing
2450
- method.call(null, argument || function () { return 1; }, 1);
2627
+ return jsxs(Fragment, {
2628
+ children: [jsx("div", {
2629
+ ref: ref,
2630
+ id: "nt-experience-handle"
2631
+ }), children]
2451
2632
  });
2452
2633
  };
2453
2634
 
2454
- var classof = classofRaw$1;
2455
- var global$1 = global$w;
2456
-
2457
- var engineIsNode = classof(global$1.process) == 'process';
2458
-
2459
- var $ = _export;
2460
- var $reduce = arrayReduce.left;
2461
- var arrayMethodIsStrict = arrayMethodIsStrict$1;
2462
- var CHROME_VERSION = engineV8Version;
2463
- var IS_NODE = engineIsNode;
2464
-
2465
- var STRICT_METHOD = arrayMethodIsStrict('reduce');
2466
- // Chrome 80-82 has a critical bug
2467
- // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
2468
- var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
2469
-
2470
- // `Array.prototype.reduce` method
2471
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
2472
- $({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
2473
- reduce: function reduce(callbackfn /* , initialValue */) {
2474
- var length = arguments.length;
2475
- return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
2476
- }
2477
- });
2478
-
2479
- const useExperiments = () => {
2635
+ const useExperimentsContext = () => {
2480
2636
  const context = useContext(ExperimentsContext);
2481
-
2482
2637
  if (context === undefined) {
2483
2638
  throw new Error('The component using the the context must be a descendant of the ExperimentsProvider');
2484
2639
  }
2640
+ return context;
2641
+ };
2485
2642
 
2643
+ const useExperiments = () => {
2644
+ const context = useExperimentsContext();
2486
2645
  return {
2487
2646
  experiments: context.experiments
2488
2647
  };
@@ -2512,45 +2671,38 @@ const useExperience = ({
2512
2671
  isPersonalized: false,
2513
2672
  profile: null
2514
2673
  });
2515
-
2516
2674
  if (status === 'loading') {
2517
2675
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2518
2676
  // @ts-ignore
2519
2677
  return emptyReturn;
2520
2678
  }
2521
-
2522
2679
  if (status === 'error') {
2523
2680
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2524
2681
  // @ts-ignore
2525
2682
  return emptyReturn;
2526
2683
  }
2527
-
2528
2684
  if (!profile) {
2529
2685
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2530
2686
  // @ts-ignore
2531
2687
  return emptyReturn;
2532
2688
  }
2533
-
2534
2689
  const activeExperiments = selectActiveExperiments(experiments, profile);
2535
2690
  const experience = selectExperience({
2536
2691
  experiences,
2537
2692
  activeExperiments,
2538
2693
  profile
2539
2694
  });
2540
-
2541
2695
  if (!experience) {
2542
2696
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2543
2697
  // @ts-ignore
2544
2698
  return emptyReturn;
2545
2699
  }
2546
-
2547
2700
  const audience = experience.audience;
2548
2701
  const variant = selectExperienceVariant({
2549
2702
  baseline,
2550
2703
  experience,
2551
2704
  profile
2552
2705
  });
2553
-
2554
2706
  if (!variant) {
2555
2707
  return Object.assign(Object.assign({}, baseReturn), {
2556
2708
  status: 'success',
@@ -2563,7 +2715,6 @@ const useExperience = ({
2563
2715
  isPersonalized: false
2564
2716
  });
2565
2717
  }
2566
-
2567
2718
  return Object.assign(Object.assign({}, baseReturn), {
2568
2719
  status: 'success',
2569
2720
  loading: false,
@@ -2576,38 +2727,18 @@ const useExperience = ({
2576
2727
  });
2577
2728
  };
2578
2729
 
2579
- const EXPERIENCE_TRAIT_PREFIX = 'nt_experiment_';
2580
-
2581
- const useJoinExperiment = ({
2582
- experiences
2583
- }) => {
2584
- const {
2585
- identify
2586
- } = useNinetailed(); // TODO this gets called twice
2587
-
2588
- return useCallback(({
2589
- experiment,
2590
- profile
2591
- }) => {
2592
- const activeExperiments = selectActiveExperiments(experiences, profile);
2593
-
2594
- if (!activeExperiments.length && experiment.type === 'nt_experiment') {
2595
- identify(profile.id, {
2596
- [`${EXPERIENCE_TRAIT_PREFIX}${experiment.id}`]: true
2597
- });
2598
- }
2599
- }, [experiences]);
2730
+ const useJoinExperiment = () => {
2731
+ const context = useExperimentsContext();
2732
+ return context.joinExperiment;
2600
2733
  };
2601
2734
 
2602
2735
  const DefaultExperienceLoadingComponent = _a => {
2603
2736
  var {
2604
- component: Component,
2605
- experiences,
2606
- unhideAfterMs = 5000,
2607
- passthroughProps
2608
- } = _a,
2609
- baseline = __rest(_a, ["component", "experiences", "unhideAfterMs", "passthroughProps"]);
2610
-
2737
+ component: Component,
2738
+ unhideAfterMs = 5000,
2739
+ passthroughProps
2740
+ } = _a,
2741
+ baseline = __rest(_a, ["component", "unhideAfterMs", "passthroughProps"]);
2611
2742
  const {
2612
2743
  logger
2613
2744
  } = useNinetailed();
@@ -2621,24 +2752,23 @@ const DefaultExperienceLoadingComponent = _a => {
2621
2752
  clearTimeout(timer);
2622
2753
  };
2623
2754
  }, []);
2624
-
2625
2755
  if (hidden) {
2626
- return /*#__PURE__*/React.createElement("div", {
2627
- key: "hide",
2756
+ return jsx("div", Object.assign({
2628
2757
  style: {
2629
2758
  opacity: 0
2630
2759
  }
2631
- }, /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2632
- ninetailed: {
2633
- isPersonalized: false,
2634
- audience: {
2635
- id: 'baseline'
2760
+ }, {
2761
+ children: jsx(Component, Object.assign({}, passthroughProps, baseline, {
2762
+ ninetailed: {
2763
+ isPersonalized: false,
2764
+ audience: {
2765
+ id: 'baseline'
2766
+ }
2636
2767
  }
2637
- }
2638
- })));
2768
+ }))
2769
+ }), "hide");
2639
2770
  }
2640
-
2641
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2771
+ return jsx(Component, Object.assign({}, passthroughProps, baseline, {
2642
2772
  ninetailed: {
2643
2773
  isPersonalized: false,
2644
2774
  audience: {
@@ -2649,13 +2779,12 @@ const DefaultExperienceLoadingComponent = _a => {
2649
2779
  };
2650
2780
  const Experience = _a => {
2651
2781
  var {
2652
- experiences,
2653
- component: Component,
2654
- loadingComponent: LoadingComponent = DefaultExperienceLoadingComponent,
2655
- passthroughProps
2656
- } = _a,
2657
- baseline = __rest(_a, ["experiences", "component", "loadingComponent", "passthroughProps"]);
2658
-
2782
+ experiences,
2783
+ component: Component,
2784
+ loadingComponent: LoadingComponent = DefaultExperienceLoadingComponent,
2785
+ passthroughProps
2786
+ } = _a,
2787
+ baseline = __rest(_a, ["experiences", "component", "loadingComponent", "passthroughProps"]);
2659
2788
  const {
2660
2789
  status,
2661
2790
  hasVariants,
@@ -2668,32 +2797,28 @@ const Experience = _a => {
2668
2797
  baseline,
2669
2798
  experiences
2670
2799
  });
2671
- const joinExperiment = useJoinExperiment({
2672
- experiences
2673
- });
2800
+ const joinExperiment = useJoinExperiment();
2674
2801
  useEffect(() => {
2675
2802
  if (status === 'success' && experience && profile) {
2676
2803
  joinExperiment({
2804
+ experiences,
2677
2805
  experiment: experience,
2678
2806
  profile
2679
2807
  });
2680
2808
  }
2681
2809
  }, [status, experience, profile]);
2682
-
2683
2810
  if (!hasVariants) {
2684
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline));
2811
+ return jsx(Component, Object.assign({}, passthroughProps, baseline));
2685
2812
  }
2686
-
2687
2813
  if (status === 'loading') {
2688
- return /*#__PURE__*/React.createElement(LoadingComponent, Object.assign({}, baseline, {
2814
+ return jsx(LoadingComponent, Object.assign({}, baseline, {
2689
2815
  passthroughProps: passthroughProps,
2690
2816
  experiences: experiences,
2691
2817
  component: Component
2692
2818
  }));
2693
2819
  }
2694
-
2695
2820
  if (!experience) {
2696
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2821
+ return /*#__PURE__*/createElement$1(Component, Object.assign({}, passthroughProps, baseline, {
2697
2822
  key: baseline.id,
2698
2823
  ninetailed: {
2699
2824
  isPersonalized: false,
@@ -2703,38 +2828,40 @@ const Experience = _a => {
2703
2828
  }
2704
2829
  }));
2705
2830
  }
2706
-
2707
2831
  if (!variant) {
2708
- return /*#__PURE__*/React.createElement(TrackExperience, {
2832
+ return jsx(TrackExperience, Object.assign({
2709
2833
  experience: experience,
2710
2834
  variant: baseline,
2711
2835
  // the profile is definitely defined, otherwise there wouldn't be an experience selected
2712
2836
  profile: profile
2713
- }, /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2714
- key: baseline.id,
2715
- ninetailed: {
2716
- isPersonalized: false,
2717
- audience: {
2718
- id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
2837
+ }, {
2838
+ children: /*#__PURE__*/createElement$1(Component, Object.assign({}, passthroughProps, baseline, {
2839
+ key: baseline.id,
2840
+ ninetailed: {
2841
+ isPersonalized: false,
2842
+ audience: {
2843
+ id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
2844
+ }
2719
2845
  }
2720
- }
2721
- })));
2846
+ }))
2847
+ }));
2722
2848
  }
2723
-
2724
- return /*#__PURE__*/React.createElement(TrackExperience, {
2849
+ return jsx(TrackExperience, Object.assign({
2725
2850
  experience: experience,
2726
2851
  variant: variant,
2727
2852
  // the profile is definitely defined, otherwise there wouldn't be an experience selected
2728
2853
  profile: profile
2729
- }, (variant === null || variant === void 0 ? void 0 : variant.hidden) ? null : /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, variant, {
2730
- key: `${experience.id}-${variant.id}`,
2731
- ninetailed: {
2732
- isPersonalized,
2733
- audience: {
2734
- id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
2854
+ }, {
2855
+ children: 'hidden' in variant && variant.hidden ? null : /*#__PURE__*/createElement$1(Component, Object.assign({}, Object.assign(Object.assign({}, passthroughProps), variant), {
2856
+ key: `${experience.id}-${variant.id}`,
2857
+ ninetailed: {
2858
+ isPersonalized,
2859
+ audience: {
2860
+ id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
2861
+ }
2735
2862
  }
2736
- }
2737
- })));
2863
+ }))
2864
+ }));
2738
2865
  };
2739
2866
 
2740
2867
  const ESRContext = /*#__PURE__*/React.createContext(undefined);
@@ -2742,38 +2869,36 @@ const ESRProvider = ({
2742
2869
  experienceVariantsMap,
2743
2870
  children
2744
2871
  }) => {
2745
- return /*#__PURE__*/React.createElement(ESRContext.Provider, {
2872
+ return jsx(ESRContext.Provider, Object.assign({
2746
2873
  value: {
2747
2874
  experienceVariantsMap
2748
2875
  }
2749
- }, children);
2876
+ }, {
2877
+ children: children
2878
+ }));
2750
2879
  };
2751
2880
  const useESR = () => {
2752
2881
  const context = React.useContext(ESRContext);
2753
-
2754
2882
  if (context === undefined) {
2755
2883
  throw new Error('The component using the the context must be a descendant of the ESRProvider');
2756
2884
  }
2757
-
2758
2885
  return {
2759
2886
  experienceVariantsMap: context.experienceVariantsMap
2760
2887
  };
2761
2888
  };
2762
2889
  const ESRLoadingComponent = _a => {
2763
2890
  var {
2764
- experiences,
2765
- component: Component,
2766
- passthroughProps
2767
- } = _a,
2768
- baseline = __rest(_a, ["experiences", "component", "passthroughProps"]);
2769
-
2891
+ experiences,
2892
+ component: Component,
2893
+ passthroughProps
2894
+ } = _a,
2895
+ baseline = __rest(_a, ["experiences", "component", "passthroughProps"]);
2770
2896
  const {
2771
2897
  experienceVariantsMap
2772
2898
  } = useESR();
2773
2899
  const experience = experiences.find(experience => has$1(experienceVariantsMap, experience.id));
2774
-
2775
2900
  if (!experience) {
2776
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2901
+ return jsx(Component, Object.assign({}, passthroughProps, baseline, {
2777
2902
  ninetailed: {
2778
2903
  isPersonalized: false,
2779
2904
  audience: {
@@ -2782,11 +2907,9 @@ const ESRLoadingComponent = _a => {
2782
2907
  }
2783
2908
  }));
2784
2909
  }
2785
-
2786
2910
  const component = experience.components.find(component => component.baseline.id === baseline.id);
2787
-
2788
2911
  if (!component) {
2789
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2912
+ return jsx(Component, Object.assign({}, passthroughProps, baseline, {
2790
2913
  ninetailed: {
2791
2914
  isPersonalized: false,
2792
2915
  audience: {
@@ -2795,9 +2918,8 @@ const ESRLoadingComponent = _a => {
2795
2918
  }
2796
2919
  }));
2797
2920
  }
2798
-
2799
2921
  if (experienceVariantsMap[experience.id] === 0) {
2800
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2922
+ return jsx(Component, Object.assign({}, passthroughProps, baseline, {
2801
2923
  ninetailed: {
2802
2924
  isPersonalized: false,
2803
2925
  audience: {
@@ -2806,11 +2928,9 @@ const ESRLoadingComponent = _a => {
2806
2928
  }
2807
2929
  }));
2808
2930
  }
2809
-
2810
2931
  const variant = component.variants[experienceVariantsMap[experience.id] - 1];
2811
-
2812
2932
  if (!variant) {
2813
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2933
+ return jsx(Component, Object.assign({}, passthroughProps, baseline, {
2814
2934
  ninetailed: {
2815
2935
  isPersonalized: false,
2816
2936
  audience: {
@@ -2819,8 +2939,7 @@ const ESRLoadingComponent = _a => {
2819
2939
  }
2820
2940
  }));
2821
2941
  }
2822
-
2823
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, variant, {
2942
+ return jsx(Component, Object.assign({}, passthroughProps, variant, {
2824
2943
  ninetailed: {
2825
2944
  isPersonalized: false,
2826
2945
  audience: {
@@ -2830,4 +2949,4 @@ const ESRLoadingComponent = _a => {
2830
2949
  }));
2831
2950
  };
2832
2951
 
2833
- export { DefaultExperienceLoadingComponent, ESRLoadingComponent, ESRProvider, Experience, MergeTag, NinetailedProvider, Personalize, TrackHasSeenComponent, useNinetailed, usePersonalize, useProfile };
2952
+ export { DefaultExperienceLoadingComponent, ESRLoadingComponent, ESRProvider, Experience, ExperimentsProvider, MergeTag, NinetailedProvider, Personalize, TrackExperience, TrackHasSeenComponent, useExperience, useExperiments, useJoinExperiment, useNinetailed, usePersonalize, useProfile };