@ninetailed/experience.js-react 1.0.0-beta.9 → 1.0.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.
package/index.umd.js CHANGED
@@ -1,13 +1,14 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@ninetailed/experience.js'), require('react-visibility-sensor')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react', '@ninetailed/experience.js', 'react-visibility-sensor'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}, global.React, global.experience_js, global.VisibilitySensor));
5
- })(this, (function (exports, React, experience_js, VisibilitySensor) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@ninetailed/experience.js'), require('react-visibility-sensor'), require('@ninetailed/experience.js-shared'), require('lodash/get')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react', '@ninetailed/experience.js', 'react-visibility-sensor', '@ninetailed/experience.js-shared', 'lodash/get'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}, global.React, global.experience_js, global.VisibilitySensor, global.experience_jsShared, global.get$1));
5
+ })(this, (function (exports, React, experience_js, VisibilitySensor, experience_jsShared, get$1) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
9
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
10
  var VisibilitySensor__default = /*#__PURE__*/_interopDefaultLegacy(VisibilitySensor);
11
+ var get__default = /*#__PURE__*/_interopDefaultLegacy(get$1);
11
12
 
12
13
  var NinetailedContext = /*#__PURE__*/React.createContext(undefined);
13
14
 
@@ -15,6 +16,7 @@
15
16
  var children = _a.children,
16
17
  clientId = _a.clientId,
17
18
  environment = _a.environment,
19
+ preview = _a.preview,
18
20
  url = _a.url,
19
21
  profile = _a.profile,
20
22
  locale = _a.locale,
@@ -23,7 +25,8 @@
23
25
  var ninetailed = React.useMemo(function () {
24
26
  return new experience_js.Ninetailed({
25
27
  clientId: clientId,
26
- environment: environment
28
+ environment: environment,
29
+ preview: preview
27
30
  }, {
28
31
  url: url,
29
32
  plugins: plugins,
@@ -99,10 +102,6 @@
99
102
  return t;
100
103
  }
101
104
 
102
- var isBrowser = function isBrowser() {
103
- return typeof window !== 'undefined';
104
- };
105
-
106
105
  var usePersonalize = function usePersonalize(baseline, variants, options) {
107
106
  if (options === void 0) {
108
107
  options = {
@@ -123,14 +122,15 @@
123
122
  holdout = _c === void 0 ? -1 : _c,
124
123
  baseline = __rest(_a, ["component", "loadingComponent", "variants", "holdout"]);
125
124
 
125
+ var ninetailed = useNinetailed();
126
+
126
127
  var _d = usePersonalize(baseline, variants, {
127
128
  holdout: holdout
128
129
  }),
129
130
  loading = _d.loading,
130
131
  variant = _d.variant,
131
132
  isPersonalized = _d.isPersonalized,
132
- audience = _d.audience; // const trackSeenComponent = useTrackSeenComponent<P>();
133
-
133
+ audience = _d.audience;
134
134
 
135
135
  var _e = React.useState(false),
136
136
  isVisible = _e[0],
@@ -144,12 +144,12 @@
144
144
  var trackCallFired = React.useRef(false);
145
145
  var hasVariants = variants.length > 0;
146
146
  React.useEffect(function () {
147
- if (isBrowser() && hasVariants && !loading && isVisible && variant && audience && audience.id !== 'baseline' && !trackCallFired.current) {
148
- // trackSeenComponent({
149
- // variant,
150
- // audience,
151
- // isPersonalized,
152
- // });
147
+ if (experience_jsShared.isBrowser() && hasVariants && !loading && isVisible && variant && audience && audience.id !== 'baseline' && !trackCallFired.current) {
148
+ ninetailed.trackHasSeenComponent({
149
+ variant: variant,
150
+ audience: audience,
151
+ isPersonalized: isPersonalized
152
+ });
153
153
  trackCallFired.current = true;
154
154
  }
155
155
  }, [loading, isVisible, variant, baseline, isPersonalized]);
@@ -193,6 +193,1672 @@
193
193
  })));
194
194
  };
195
195
 
196
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
197
+
198
+ var check = function (it) {
199
+ return it && it.Math == Math && it;
200
+ };
201
+
202
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
203
+ var global$r =
204
+ // eslint-disable-next-line es/no-global-this -- safe
205
+ check(typeof globalThis == 'object' && globalThis) ||
206
+ check(typeof window == 'object' && window) ||
207
+ // eslint-disable-next-line no-restricted-globals -- safe
208
+ check(typeof self == 'object' && self) ||
209
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
210
+ // eslint-disable-next-line no-new-func -- fallback
211
+ (function () { return this; })() || Function('return this')();
212
+
213
+ var objectGetOwnPropertyDescriptor = {};
214
+
215
+ var fails$c = function (exec) {
216
+ try {
217
+ return !!exec();
218
+ } catch (error) {
219
+ return true;
220
+ }
221
+ };
222
+
223
+ var fails$b = fails$c;
224
+
225
+ // Detect IE8's incomplete defineProperty implementation
226
+ var descriptors = !fails$b(function () {
227
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
228
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
229
+ });
230
+
231
+ var fails$a = fails$c;
232
+
233
+ var functionBindNative = !fails$a(function () {
234
+ var test = (function () { /* empty */ }).bind();
235
+ // eslint-disable-next-line no-prototype-builtins -- safe
236
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
237
+ });
238
+
239
+ var NATIVE_BIND$2 = functionBindNative;
240
+
241
+ var call$8 = Function.prototype.call;
242
+
243
+ var functionCall = NATIVE_BIND$2 ? call$8.bind(call$8) : function () {
244
+ return call$8.apply(call$8, arguments);
245
+ };
246
+
247
+ var objectPropertyIsEnumerable = {};
248
+
249
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
250
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
251
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
252
+
253
+ // Nashorn ~ JDK8 bug
254
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
255
+
256
+ // `Object.prototype.propertyIsEnumerable` method implementation
257
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
258
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
259
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
260
+ return !!descriptor && descriptor.enumerable;
261
+ } : $propertyIsEnumerable;
262
+
263
+ var createPropertyDescriptor$2 = function (bitmap, value) {
264
+ return {
265
+ enumerable: !(bitmap & 1),
266
+ configurable: !(bitmap & 2),
267
+ writable: !(bitmap & 4),
268
+ value: value
269
+ };
270
+ };
271
+
272
+ var NATIVE_BIND$1 = functionBindNative;
273
+
274
+ var FunctionPrototype$2 = Function.prototype;
275
+ var bind = FunctionPrototype$2.bind;
276
+ var call$7 = FunctionPrototype$2.call;
277
+ var uncurryThis$e = NATIVE_BIND$1 && bind.bind(call$7, call$7);
278
+
279
+ var functionUncurryThis = NATIVE_BIND$1 ? function (fn) {
280
+ return fn && uncurryThis$e(fn);
281
+ } : function (fn) {
282
+ return fn && function () {
283
+ return call$7.apply(fn, arguments);
284
+ };
285
+ };
286
+
287
+ var uncurryThis$d = functionUncurryThis;
288
+
289
+ var toString$5 = uncurryThis$d({}.toString);
290
+ var stringSlice$4 = uncurryThis$d(''.slice);
291
+
292
+ var classofRaw$1 = function (it) {
293
+ return stringSlice$4(toString$5(it), 8, -1);
294
+ };
295
+
296
+ var global$q = global$r;
297
+ var uncurryThis$c = functionUncurryThis;
298
+ var fails$9 = fails$c;
299
+ var classof$3 = classofRaw$1;
300
+
301
+ var Object$4 = global$q.Object;
302
+ var split = uncurryThis$c(''.split);
303
+
304
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
305
+ var indexedObject = fails$9(function () {
306
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
307
+ // eslint-disable-next-line no-prototype-builtins -- safe
308
+ return !Object$4('z').propertyIsEnumerable(0);
309
+ }) ? function (it) {
310
+ return classof$3(it) == 'String' ? split(it, '') : Object$4(it);
311
+ } : Object$4;
312
+
313
+ var global$p = global$r;
314
+
315
+ var TypeError$8 = global$p.TypeError;
316
+
317
+ // `RequireObjectCoercible` abstract operation
318
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
319
+ var requireObjectCoercible$4 = function (it) {
320
+ if (it == undefined) throw TypeError$8("Can't call method on " + it);
321
+ return it;
322
+ };
323
+
324
+ // toObject with fallback for non-array-like ES3 strings
325
+ var IndexedObject = indexedObject;
326
+ var requireObjectCoercible$3 = requireObjectCoercible$4;
327
+
328
+ var toIndexedObject$4 = function (it) {
329
+ return IndexedObject(requireObjectCoercible$3(it));
330
+ };
331
+
332
+ // `IsCallable` abstract operation
333
+ // https://tc39.es/ecma262/#sec-iscallable
334
+ var isCallable$c = function (argument) {
335
+ return typeof argument == 'function';
336
+ };
337
+
338
+ var isCallable$b = isCallable$c;
339
+
340
+ var isObject$5 = function (it) {
341
+ return typeof it == 'object' ? it !== null : isCallable$b(it);
342
+ };
343
+
344
+ var global$o = global$r;
345
+ var isCallable$a = isCallable$c;
346
+
347
+ var aFunction = function (argument) {
348
+ return isCallable$a(argument) ? argument : undefined;
349
+ };
350
+
351
+ var getBuiltIn$4 = function (namespace, method) {
352
+ return arguments.length < 2 ? aFunction(global$o[namespace]) : global$o[namespace] && global$o[namespace][method];
353
+ };
354
+
355
+ var uncurryThis$b = functionUncurryThis;
356
+
357
+ var objectIsPrototypeOf = uncurryThis$b({}.isPrototypeOf);
358
+
359
+ var getBuiltIn$3 = getBuiltIn$4;
360
+
361
+ var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
362
+
363
+ var global$n = global$r;
364
+ var userAgent = engineUserAgent;
365
+
366
+ var process = global$n.process;
367
+ var Deno = global$n.Deno;
368
+ var versions = process && process.versions || Deno && Deno.version;
369
+ var v8 = versions && versions.v8;
370
+ var match, version;
371
+
372
+ if (v8) {
373
+ match = v8.split('.');
374
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
375
+ // but their correct versions are not interesting for us
376
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
377
+ }
378
+
379
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
380
+ // so check `userAgent` even if `.v8` exists, but 0
381
+ if (!version && userAgent) {
382
+ match = userAgent.match(/Edge\/(\d+)/);
383
+ if (!match || match[1] >= 74) {
384
+ match = userAgent.match(/Chrome\/(\d+)/);
385
+ if (match) version = +match[1];
386
+ }
387
+ }
388
+
389
+ var engineV8Version = version;
390
+
391
+ /* eslint-disable es/no-symbol -- required for testing */
392
+
393
+ var V8_VERSION = engineV8Version;
394
+ var fails$8 = fails$c;
395
+
396
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
397
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$8(function () {
398
+ var symbol = Symbol();
399
+ // Chrome 38 Symbol has incorrect toString conversion
400
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
401
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
402
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
403
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
404
+ });
405
+
406
+ /* eslint-disable es/no-symbol -- required for testing */
407
+
408
+ var NATIVE_SYMBOL$1 = nativeSymbol;
409
+
410
+ var useSymbolAsUid = NATIVE_SYMBOL$1
411
+ && !Symbol.sham
412
+ && typeof Symbol.iterator == 'symbol';
413
+
414
+ var global$m = global$r;
415
+ var getBuiltIn$2 = getBuiltIn$4;
416
+ var isCallable$9 = isCallable$c;
417
+ var isPrototypeOf = objectIsPrototypeOf;
418
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
419
+
420
+ var Object$3 = global$m.Object;
421
+
422
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
423
+ return typeof it == 'symbol';
424
+ } : function (it) {
425
+ var $Symbol = getBuiltIn$2('Symbol');
426
+ return isCallable$9($Symbol) && isPrototypeOf($Symbol.prototype, Object$3(it));
427
+ };
428
+
429
+ var global$l = global$r;
430
+
431
+ var String$3 = global$l.String;
432
+
433
+ var tryToString$1 = function (argument) {
434
+ try {
435
+ return String$3(argument);
436
+ } catch (error) {
437
+ return 'Object';
438
+ }
439
+ };
440
+
441
+ var global$k = global$r;
442
+ var isCallable$8 = isCallable$c;
443
+ var tryToString = tryToString$1;
444
+
445
+ var TypeError$7 = global$k.TypeError;
446
+
447
+ // `Assert: IsCallable(argument) is true`
448
+ var aCallable$1 = function (argument) {
449
+ if (isCallable$8(argument)) return argument;
450
+ throw TypeError$7(tryToString(argument) + ' is not a function');
451
+ };
452
+
453
+ var aCallable = aCallable$1;
454
+
455
+ // `GetMethod` abstract operation
456
+ // https://tc39.es/ecma262/#sec-getmethod
457
+ var getMethod$2 = function (V, P) {
458
+ var func = V[P];
459
+ return func == null ? undefined : aCallable(func);
460
+ };
461
+
462
+ var global$j = global$r;
463
+ var call$6 = functionCall;
464
+ var isCallable$7 = isCallable$c;
465
+ var isObject$4 = isObject$5;
466
+
467
+ var TypeError$6 = global$j.TypeError;
468
+
469
+ // `OrdinaryToPrimitive` abstract operation
470
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
471
+ var ordinaryToPrimitive$1 = function (input, pref) {
472
+ var fn, val;
473
+ if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$4(val = call$6(fn, input))) return val;
474
+ if (isCallable$7(fn = input.valueOf) && !isObject$4(val = call$6(fn, input))) return val;
475
+ if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$4(val = call$6(fn, input))) return val;
476
+ throw TypeError$6("Can't convert object to primitive value");
477
+ };
478
+
479
+ var shared$4 = {exports: {}};
480
+
481
+ var global$i = global$r;
482
+
483
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
484
+ var defineProperty = Object.defineProperty;
485
+
486
+ var setGlobal$3 = function (key, value) {
487
+ try {
488
+ defineProperty(global$i, key, { value: value, configurable: true, writable: true });
489
+ } catch (error) {
490
+ global$i[key] = value;
491
+ } return value;
492
+ };
493
+
494
+ var global$h = global$r;
495
+ var setGlobal$2 = setGlobal$3;
496
+
497
+ var SHARED = '__core-js_shared__';
498
+ var store$3 = global$h[SHARED] || setGlobal$2(SHARED, {});
499
+
500
+ var sharedStore = store$3;
501
+
502
+ var store$2 = sharedStore;
503
+
504
+ (shared$4.exports = function (key, value) {
505
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
506
+ })('versions', []).push({
507
+ version: '3.21.1',
508
+ mode: 'global',
509
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
510
+ license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
511
+ source: 'https://github.com/zloirock/core-js'
512
+ });
513
+
514
+ var global$g = global$r;
515
+ var requireObjectCoercible$2 = requireObjectCoercible$4;
516
+
517
+ var Object$2 = global$g.Object;
518
+
519
+ // `ToObject` abstract operation
520
+ // https://tc39.es/ecma262/#sec-toobject
521
+ var toObject$2 = function (argument) {
522
+ return Object$2(requireObjectCoercible$2(argument));
523
+ };
524
+
525
+ var uncurryThis$a = functionUncurryThis;
526
+ var toObject$1 = toObject$2;
527
+
528
+ var hasOwnProperty = uncurryThis$a({}.hasOwnProperty);
529
+
530
+ // `HasOwnProperty` abstract operation
531
+ // https://tc39.es/ecma262/#sec-hasownproperty
532
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
533
+ return hasOwnProperty(toObject$1(it), key);
534
+ };
535
+
536
+ var uncurryThis$9 = functionUncurryThis;
537
+
538
+ var id = 0;
539
+ var postfix = Math.random();
540
+ var toString$4 = uncurryThis$9(1.0.toString);
541
+
542
+ var uid$2 = function (key) {
543
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
544
+ };
545
+
546
+ var global$f = global$r;
547
+ var shared$3 = shared$4.exports;
548
+ var hasOwn$6 = hasOwnProperty_1;
549
+ var uid$1 = uid$2;
550
+ var NATIVE_SYMBOL = nativeSymbol;
551
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
552
+
553
+ var WellKnownSymbolsStore = shared$3('wks');
554
+ var Symbol$1 = global$f.Symbol;
555
+ var symbolFor = Symbol$1 && Symbol$1['for'];
556
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
557
+
558
+ var wellKnownSymbol$5 = function (name) {
559
+ if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
560
+ var description = 'Symbol.' + name;
561
+ if (NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)) {
562
+ WellKnownSymbolsStore[name] = Symbol$1[name];
563
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
564
+ WellKnownSymbolsStore[name] = symbolFor(description);
565
+ } else {
566
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
567
+ }
568
+ } return WellKnownSymbolsStore[name];
569
+ };
570
+
571
+ var global$e = global$r;
572
+ var call$5 = functionCall;
573
+ var isObject$3 = isObject$5;
574
+ var isSymbol$1 = isSymbol$2;
575
+ var getMethod$1 = getMethod$2;
576
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
577
+ var wellKnownSymbol$4 = wellKnownSymbol$5;
578
+
579
+ var TypeError$5 = global$e.TypeError;
580
+ var TO_PRIMITIVE = wellKnownSymbol$4('toPrimitive');
581
+
582
+ // `ToPrimitive` abstract operation
583
+ // https://tc39.es/ecma262/#sec-toprimitive
584
+ var toPrimitive$1 = function (input, pref) {
585
+ if (!isObject$3(input) || isSymbol$1(input)) return input;
586
+ var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
587
+ var result;
588
+ if (exoticToPrim) {
589
+ if (pref === undefined) pref = 'default';
590
+ result = call$5(exoticToPrim, input, pref);
591
+ if (!isObject$3(result) || isSymbol$1(result)) return result;
592
+ throw TypeError$5("Can't convert object to primitive value");
593
+ }
594
+ if (pref === undefined) pref = 'number';
595
+ return ordinaryToPrimitive(input, pref);
596
+ };
597
+
598
+ var toPrimitive = toPrimitive$1;
599
+ var isSymbol = isSymbol$2;
600
+
601
+ // `ToPropertyKey` abstract operation
602
+ // https://tc39.es/ecma262/#sec-topropertykey
603
+ var toPropertyKey$2 = function (argument) {
604
+ var key = toPrimitive(argument, 'string');
605
+ return isSymbol(key) ? key : key + '';
606
+ };
607
+
608
+ var global$d = global$r;
609
+ var isObject$2 = isObject$5;
610
+
611
+ var document$1 = global$d.document;
612
+ // typeof document.createElement is 'object' in old IE
613
+ var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
614
+
615
+ var documentCreateElement$1 = function (it) {
616
+ return EXISTS$1 ? document$1.createElement(it) : {};
617
+ };
618
+
619
+ var DESCRIPTORS$6 = descriptors;
620
+ var fails$7 = fails$c;
621
+ var createElement = documentCreateElement$1;
622
+
623
+ // Thanks to IE8 for its funny defineProperty
624
+ var ie8DomDefine = !DESCRIPTORS$6 && !fails$7(function () {
625
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
626
+ return Object.defineProperty(createElement('div'), 'a', {
627
+ get: function () { return 7; }
628
+ }).a != 7;
629
+ });
630
+
631
+ var DESCRIPTORS$5 = descriptors;
632
+ var call$4 = functionCall;
633
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
634
+ var createPropertyDescriptor$1 = createPropertyDescriptor$2;
635
+ var toIndexedObject$3 = toIndexedObject$4;
636
+ var toPropertyKey$1 = toPropertyKey$2;
637
+ var hasOwn$5 = hasOwnProperty_1;
638
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
639
+
640
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
641
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
642
+
643
+ // `Object.getOwnPropertyDescriptor` method
644
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
645
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
646
+ O = toIndexedObject$3(O);
647
+ P = toPropertyKey$1(P);
648
+ if (IE8_DOM_DEFINE$1) try {
649
+ return $getOwnPropertyDescriptor$1(O, P);
650
+ } catch (error) { /* empty */ }
651
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$4(propertyIsEnumerableModule.f, O, P), O[P]);
652
+ };
653
+
654
+ var objectDefineProperty = {};
655
+
656
+ var DESCRIPTORS$4 = descriptors;
657
+ var fails$6 = fails$c;
658
+
659
+ // V8 ~ Chrome 36-
660
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
661
+ var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$6(function () {
662
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
663
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
664
+ value: 42,
665
+ writable: false
666
+ }).prototype != 42;
667
+ });
668
+
669
+ var global$c = global$r;
670
+ var isObject$1 = isObject$5;
671
+
672
+ var String$2 = global$c.String;
673
+ var TypeError$4 = global$c.TypeError;
674
+
675
+ // `Assert: Type(argument) is Object`
676
+ var anObject$7 = function (argument) {
677
+ if (isObject$1(argument)) return argument;
678
+ throw TypeError$4(String$2(argument) + ' is not an object');
679
+ };
680
+
681
+ var global$b = global$r;
682
+ var DESCRIPTORS$3 = descriptors;
683
+ var IE8_DOM_DEFINE = ie8DomDefine;
684
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
685
+ var anObject$6 = anObject$7;
686
+ var toPropertyKey = toPropertyKey$2;
687
+
688
+ var TypeError$3 = global$b.TypeError;
689
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
690
+ var $defineProperty = Object.defineProperty;
691
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
692
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
693
+ var ENUMERABLE = 'enumerable';
694
+ var CONFIGURABLE$1 = 'configurable';
695
+ var WRITABLE = 'writable';
696
+
697
+ // `Object.defineProperty` method
698
+ // https://tc39.es/ecma262/#sec-object.defineproperty
699
+ objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
700
+ anObject$6(O);
701
+ P = toPropertyKey(P);
702
+ anObject$6(Attributes);
703
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
704
+ var current = $getOwnPropertyDescriptor(O, P);
705
+ if (current && current[WRITABLE]) {
706
+ O[P] = Attributes.value;
707
+ Attributes = {
708
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
709
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
710
+ writable: false
711
+ };
712
+ }
713
+ } return $defineProperty(O, P, Attributes);
714
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
715
+ anObject$6(O);
716
+ P = toPropertyKey(P);
717
+ anObject$6(Attributes);
718
+ if (IE8_DOM_DEFINE) try {
719
+ return $defineProperty(O, P, Attributes);
720
+ } catch (error) { /* empty */ }
721
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$3('Accessors not supported');
722
+ if ('value' in Attributes) O[P] = Attributes.value;
723
+ return O;
724
+ };
725
+
726
+ var DESCRIPTORS$2 = descriptors;
727
+ var definePropertyModule$2 = objectDefineProperty;
728
+ var createPropertyDescriptor = createPropertyDescriptor$2;
729
+
730
+ var createNonEnumerableProperty$4 = DESCRIPTORS$2 ? function (object, key, value) {
731
+ return definePropertyModule$2.f(object, key, createPropertyDescriptor(1, value));
732
+ } : function (object, key, value) {
733
+ object[key] = value;
734
+ return object;
735
+ };
736
+
737
+ var redefine$2 = {exports: {}};
738
+
739
+ var uncurryThis$8 = functionUncurryThis;
740
+ var isCallable$6 = isCallable$c;
741
+ var store$1 = sharedStore;
742
+
743
+ var functionToString = uncurryThis$8(Function.toString);
744
+
745
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
746
+ if (!isCallable$6(store$1.inspectSource)) {
747
+ store$1.inspectSource = function (it) {
748
+ return functionToString(it);
749
+ };
750
+ }
751
+
752
+ var inspectSource$2 = store$1.inspectSource;
753
+
754
+ var global$a = global$r;
755
+ var isCallable$5 = isCallable$c;
756
+ var inspectSource$1 = inspectSource$2;
757
+
758
+ var WeakMap$1 = global$a.WeakMap;
759
+
760
+ var nativeWeakMap = isCallable$5(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
761
+
762
+ var shared$2 = shared$4.exports;
763
+ var uid = uid$2;
764
+
765
+ var keys = shared$2('keys');
766
+
767
+ var sharedKey$2 = function (key) {
768
+ return keys[key] || (keys[key] = uid(key));
769
+ };
770
+
771
+ var hiddenKeys$4 = {};
772
+
773
+ var NATIVE_WEAK_MAP = nativeWeakMap;
774
+ var global$9 = global$r;
775
+ var uncurryThis$7 = functionUncurryThis;
776
+ var isObject = isObject$5;
777
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
778
+ var hasOwn$4 = hasOwnProperty_1;
779
+ var shared$1 = sharedStore;
780
+ var sharedKey$1 = sharedKey$2;
781
+ var hiddenKeys$3 = hiddenKeys$4;
782
+
783
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
784
+ var TypeError$2 = global$9.TypeError;
785
+ var WeakMap = global$9.WeakMap;
786
+ var set, get, has;
787
+
788
+ var enforce = function (it) {
789
+ return has(it) ? get(it) : set(it, {});
790
+ };
791
+
792
+ var getterFor = function (TYPE) {
793
+ return function (it) {
794
+ var state;
795
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
796
+ throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
797
+ } return state;
798
+ };
799
+ };
800
+
801
+ if (NATIVE_WEAK_MAP || shared$1.state) {
802
+ var store = shared$1.state || (shared$1.state = new WeakMap());
803
+ var wmget = uncurryThis$7(store.get);
804
+ var wmhas = uncurryThis$7(store.has);
805
+ var wmset = uncurryThis$7(store.set);
806
+ set = function (it, metadata) {
807
+ if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
808
+ metadata.facade = it;
809
+ wmset(store, it, metadata);
810
+ return metadata;
811
+ };
812
+ get = function (it) {
813
+ return wmget(store, it) || {};
814
+ };
815
+ has = function (it) {
816
+ return wmhas(store, it);
817
+ };
818
+ } else {
819
+ var STATE = sharedKey$1('state');
820
+ hiddenKeys$3[STATE] = true;
821
+ set = function (it, metadata) {
822
+ if (hasOwn$4(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
823
+ metadata.facade = it;
824
+ createNonEnumerableProperty$3(it, STATE, metadata);
825
+ return metadata;
826
+ };
827
+ get = function (it) {
828
+ return hasOwn$4(it, STATE) ? it[STATE] : {};
829
+ };
830
+ has = function (it) {
831
+ return hasOwn$4(it, STATE);
832
+ };
833
+ }
834
+
835
+ var internalState = {
836
+ set: set,
837
+ get: get,
838
+ has: has,
839
+ enforce: enforce,
840
+ getterFor: getterFor
841
+ };
842
+
843
+ var DESCRIPTORS$1 = descriptors;
844
+ var hasOwn$3 = hasOwnProperty_1;
845
+
846
+ var FunctionPrototype$1 = Function.prototype;
847
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
848
+ var getDescriptor = DESCRIPTORS$1 && Object.getOwnPropertyDescriptor;
849
+
850
+ var EXISTS = hasOwn$3(FunctionPrototype$1, 'name');
851
+ // additional protection from minified / mangled / dropped function names
852
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
853
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$1 || (DESCRIPTORS$1 && getDescriptor(FunctionPrototype$1, 'name').configurable));
854
+
855
+ var functionName = {
856
+ EXISTS: EXISTS,
857
+ PROPER: PROPER,
858
+ CONFIGURABLE: CONFIGURABLE
859
+ };
860
+
861
+ var global$8 = global$r;
862
+ var isCallable$4 = isCallable$c;
863
+ var hasOwn$2 = hasOwnProperty_1;
864
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
865
+ var setGlobal$1 = setGlobal$3;
866
+ var inspectSource = inspectSource$2;
867
+ var InternalStateModule = internalState;
868
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
869
+
870
+ var getInternalState$1 = InternalStateModule.get;
871
+ var enforceInternalState = InternalStateModule.enforce;
872
+ var TEMPLATE = String(String).split('String');
873
+
874
+ (redefine$2.exports = function (O, key, value, options) {
875
+ var unsafe = options ? !!options.unsafe : false;
876
+ var simple = options ? !!options.enumerable : false;
877
+ var noTargetGet = options ? !!options.noTargetGet : false;
878
+ var name = options && options.name !== undefined ? options.name : key;
879
+ var state;
880
+ if (isCallable$4(value)) {
881
+ if (String(name).slice(0, 7) === 'Symbol(') {
882
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
883
+ }
884
+ if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
885
+ createNonEnumerableProperty$2(value, 'name', name);
886
+ }
887
+ state = enforceInternalState(value);
888
+ if (!state.source) {
889
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
890
+ }
891
+ }
892
+ if (O === global$8) {
893
+ if (simple) O[key] = value;
894
+ else setGlobal$1(key, value);
895
+ return;
896
+ } else if (!unsafe) {
897
+ delete O[key];
898
+ } else if (!noTargetGet && O[key]) {
899
+ simple = true;
900
+ }
901
+ if (simple) O[key] = value;
902
+ else createNonEnumerableProperty$2(O, key, value);
903
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
904
+ })(Function.prototype, 'toString', function toString() {
905
+ return isCallable$4(this) && getInternalState$1(this).source || inspectSource(this);
906
+ });
907
+
908
+ var objectGetOwnPropertyNames = {};
909
+
910
+ var ceil = Math.ceil;
911
+ var floor$1 = Math.floor;
912
+
913
+ // `ToIntegerOrInfinity` abstract operation
914
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
915
+ var toIntegerOrInfinity$4 = function (argument) {
916
+ var number = +argument;
917
+ // eslint-disable-next-line no-self-compare -- safe
918
+ return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
919
+ };
920
+
921
+ var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
922
+
923
+ var max$1 = Math.max;
924
+ var min$2 = Math.min;
925
+
926
+ // Helper for a popular repeating case of the spec:
927
+ // Let integer be ? ToInteger(index).
928
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
929
+ var toAbsoluteIndex$1 = function (index, length) {
930
+ var integer = toIntegerOrInfinity$3(index);
931
+ return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
932
+ };
933
+
934
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
935
+
936
+ var min$1 = Math.min;
937
+
938
+ // `ToLength` abstract operation
939
+ // https://tc39.es/ecma262/#sec-tolength
940
+ var toLength$2 = function (argument) {
941
+ return argument > 0 ? min$1(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
942
+ };
943
+
944
+ var toLength$1 = toLength$2;
945
+
946
+ // `LengthOfArrayLike` abstract operation
947
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
948
+ var lengthOfArrayLike$1 = function (obj) {
949
+ return toLength$1(obj.length);
950
+ };
951
+
952
+ var toIndexedObject$2 = toIndexedObject$4;
953
+ var toAbsoluteIndex = toAbsoluteIndex$1;
954
+ var lengthOfArrayLike = lengthOfArrayLike$1;
955
+
956
+ // `Array.prototype.{ indexOf, includes }` methods implementation
957
+ var createMethod$1 = function (IS_INCLUDES) {
958
+ return function ($this, el, fromIndex) {
959
+ var O = toIndexedObject$2($this);
960
+ var length = lengthOfArrayLike(O);
961
+ var index = toAbsoluteIndex(fromIndex, length);
962
+ var value;
963
+ // Array#includes uses SameValueZero equality algorithm
964
+ // eslint-disable-next-line no-self-compare -- NaN check
965
+ if (IS_INCLUDES && el != el) while (length > index) {
966
+ value = O[index++];
967
+ // eslint-disable-next-line no-self-compare -- NaN check
968
+ if (value != value) return true;
969
+ // Array#indexOf ignores holes, Array#includes - not
970
+ } else for (;length > index; index++) {
971
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
972
+ } return !IS_INCLUDES && -1;
973
+ };
974
+ };
975
+
976
+ var arrayIncludes = {
977
+ // `Array.prototype.includes` method
978
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
979
+ includes: createMethod$1(true),
980
+ // `Array.prototype.indexOf` method
981
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
982
+ indexOf: createMethod$1(false)
983
+ };
984
+
985
+ var uncurryThis$6 = functionUncurryThis;
986
+ var hasOwn$1 = hasOwnProperty_1;
987
+ var toIndexedObject$1 = toIndexedObject$4;
988
+ var indexOf$1 = arrayIncludes.indexOf;
989
+ var hiddenKeys$2 = hiddenKeys$4;
990
+
991
+ var push$1 = uncurryThis$6([].push);
992
+
993
+ var objectKeysInternal = function (object, names) {
994
+ var O = toIndexedObject$1(object);
995
+ var i = 0;
996
+ var result = [];
997
+ var key;
998
+ for (key in O) !hasOwn$1(hiddenKeys$2, key) && hasOwn$1(O, key) && push$1(result, key);
999
+ // Don't enum bug & hidden keys
1000
+ while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
1001
+ ~indexOf$1(result, key) || push$1(result, key);
1002
+ }
1003
+ return result;
1004
+ };
1005
+
1006
+ // IE8- don't enum bug keys
1007
+ var enumBugKeys$3 = [
1008
+ 'constructor',
1009
+ 'hasOwnProperty',
1010
+ 'isPrototypeOf',
1011
+ 'propertyIsEnumerable',
1012
+ 'toLocaleString',
1013
+ 'toString',
1014
+ 'valueOf'
1015
+ ];
1016
+
1017
+ var internalObjectKeys$1 = objectKeysInternal;
1018
+ var enumBugKeys$2 = enumBugKeys$3;
1019
+
1020
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
1021
+
1022
+ // `Object.getOwnPropertyNames` method
1023
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
1024
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1025
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1026
+ return internalObjectKeys$1(O, hiddenKeys$1);
1027
+ };
1028
+
1029
+ var objectGetOwnPropertySymbols = {};
1030
+
1031
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1032
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1033
+
1034
+ var getBuiltIn$1 = getBuiltIn$4;
1035
+ var uncurryThis$5 = functionUncurryThis;
1036
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1037
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1038
+ var anObject$5 = anObject$7;
1039
+
1040
+ var concat$1 = uncurryThis$5([].concat);
1041
+
1042
+ // all object keys, includes non-enumerable and symbols
1043
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
1044
+ var keys = getOwnPropertyNamesModule.f(anObject$5(it));
1045
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1046
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
1047
+ };
1048
+
1049
+ var hasOwn = hasOwnProperty_1;
1050
+ var ownKeys = ownKeys$1;
1051
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1052
+ var definePropertyModule$1 = objectDefineProperty;
1053
+
1054
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
1055
+ var keys = ownKeys(source);
1056
+ var defineProperty = definePropertyModule$1.f;
1057
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1058
+ for (var i = 0; i < keys.length; i++) {
1059
+ var key = keys[i];
1060
+ if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
1061
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1062
+ }
1063
+ }
1064
+ };
1065
+
1066
+ var fails$5 = fails$c;
1067
+ var isCallable$3 = isCallable$c;
1068
+
1069
+ var replacement = /#|\.prototype\./;
1070
+
1071
+ var isForced$1 = function (feature, detection) {
1072
+ var value = data[normalize(feature)];
1073
+ return value == POLYFILL ? true
1074
+ : value == NATIVE ? false
1075
+ : isCallable$3(detection) ? fails$5(detection)
1076
+ : !!detection;
1077
+ };
1078
+
1079
+ var normalize = isForced$1.normalize = function (string) {
1080
+ return String(string).replace(replacement, '.').toLowerCase();
1081
+ };
1082
+
1083
+ var data = isForced$1.data = {};
1084
+ var NATIVE = isForced$1.NATIVE = 'N';
1085
+ var POLYFILL = isForced$1.POLYFILL = 'P';
1086
+
1087
+ var isForced_1 = isForced$1;
1088
+
1089
+ var global$7 = global$r;
1090
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1091
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1092
+ var redefine$1 = redefine$2.exports;
1093
+ var setGlobal = setGlobal$3;
1094
+ var copyConstructorProperties = copyConstructorProperties$1;
1095
+ var isForced = isForced_1;
1096
+
1097
+ /*
1098
+ options.target - name of the target object
1099
+ options.global - target is the global object
1100
+ options.stat - export as static methods of target
1101
+ options.proto - export as prototype methods of target
1102
+ options.real - real prototype method for the `pure` version
1103
+ options.forced - export even if the native feature is available
1104
+ options.bind - bind methods to the target, required for the `pure` version
1105
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1106
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
1107
+ options.sham - add a flag to not completely full polyfills
1108
+ options.enumerable - export as enumerable property
1109
+ options.noTargetGet - prevent calling a getter on target
1110
+ options.name - the .name of the function if it does not match the key
1111
+ */
1112
+ var _export = function (options, source) {
1113
+ var TARGET = options.target;
1114
+ var GLOBAL = options.global;
1115
+ var STATIC = options.stat;
1116
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1117
+ if (GLOBAL) {
1118
+ target = global$7;
1119
+ } else if (STATIC) {
1120
+ target = global$7[TARGET] || setGlobal(TARGET, {});
1121
+ } else {
1122
+ target = (global$7[TARGET] || {}).prototype;
1123
+ }
1124
+ if (target) for (key in source) {
1125
+ sourceProperty = source[key];
1126
+ if (options.noTargetGet) {
1127
+ descriptor = getOwnPropertyDescriptor(target, key);
1128
+ targetProperty = descriptor && descriptor.value;
1129
+ } else targetProperty = target[key];
1130
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1131
+ // contained in target
1132
+ if (!FORCED && targetProperty !== undefined) {
1133
+ if (typeof sourceProperty == typeof targetProperty) continue;
1134
+ copyConstructorProperties(sourceProperty, targetProperty);
1135
+ }
1136
+ // add a flag to not completely full polyfills
1137
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1138
+ createNonEnumerableProperty$1(sourceProperty, 'sham', true);
1139
+ }
1140
+ // extend global
1141
+ redefine$1(target, key, sourceProperty, options);
1142
+ }
1143
+ };
1144
+
1145
+ var wellKnownSymbol$3 = wellKnownSymbol$5;
1146
+
1147
+ var TO_STRING_TAG$1 = wellKnownSymbol$3('toStringTag');
1148
+ var test = {};
1149
+
1150
+ test[TO_STRING_TAG$1] = 'z';
1151
+
1152
+ var toStringTagSupport = String(test) === '[object z]';
1153
+
1154
+ var global$6 = global$r;
1155
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1156
+ var isCallable$2 = isCallable$c;
1157
+ var classofRaw = classofRaw$1;
1158
+ var wellKnownSymbol$2 = wellKnownSymbol$5;
1159
+
1160
+ var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1161
+ var Object$1 = global$6.Object;
1162
+
1163
+ // ES3 wrong here
1164
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1165
+
1166
+ // fallback for IE11 Script Access Denied error
1167
+ var tryGet = function (it, key) {
1168
+ try {
1169
+ return it[key];
1170
+ } catch (error) { /* empty */ }
1171
+ };
1172
+
1173
+ // getting tag from ES6+ `Object.prototype.toString`
1174
+ var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1175
+ var O, tag, result;
1176
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1177
+ // @@toStringTag case
1178
+ : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
1179
+ // builtinTag case
1180
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1181
+ // ES3 arguments fallback
1182
+ : (result = classofRaw(O)) == 'Object' && isCallable$2(O.callee) ? 'Arguments' : result;
1183
+ };
1184
+
1185
+ var global$5 = global$r;
1186
+ var classof$1 = classof$2;
1187
+
1188
+ var String$1 = global$5.String;
1189
+
1190
+ var toString$3 = function (argument) {
1191
+ if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1192
+ return String$1(argument);
1193
+ };
1194
+
1195
+ var anObject$4 = anObject$7;
1196
+
1197
+ // `RegExp.prototype.flags` getter implementation
1198
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1199
+ var regexpFlags$1 = function () {
1200
+ var that = anObject$4(this);
1201
+ var result = '';
1202
+ if (that.global) result += 'g';
1203
+ if (that.ignoreCase) result += 'i';
1204
+ if (that.multiline) result += 'm';
1205
+ if (that.dotAll) result += 's';
1206
+ if (that.unicode) result += 'u';
1207
+ if (that.sticky) result += 'y';
1208
+ return result;
1209
+ };
1210
+
1211
+ var fails$4 = fails$c;
1212
+ var global$4 = global$r;
1213
+
1214
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1215
+ var $RegExp$2 = global$4.RegExp;
1216
+
1217
+ var UNSUPPORTED_Y$1 = fails$4(function () {
1218
+ var re = $RegExp$2('a', 'y');
1219
+ re.lastIndex = 2;
1220
+ return re.exec('abcd') != null;
1221
+ });
1222
+
1223
+ // UC Browser bug
1224
+ // https://github.com/zloirock/core-js/issues/1008
1225
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$4(function () {
1226
+ return !$RegExp$2('a', 'y').sticky;
1227
+ });
1228
+
1229
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$4(function () {
1230
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1231
+ var re = $RegExp$2('^r', 'gy');
1232
+ re.lastIndex = 2;
1233
+ return re.exec('str') != null;
1234
+ });
1235
+
1236
+ var regexpStickyHelpers = {
1237
+ BROKEN_CARET: BROKEN_CARET,
1238
+ MISSED_STICKY: MISSED_STICKY,
1239
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1
1240
+ };
1241
+
1242
+ var objectDefineProperties = {};
1243
+
1244
+ var internalObjectKeys = objectKeysInternal;
1245
+ var enumBugKeys$1 = enumBugKeys$3;
1246
+
1247
+ // `Object.keys` method
1248
+ // https://tc39.es/ecma262/#sec-object.keys
1249
+ // eslint-disable-next-line es/no-object-keys -- safe
1250
+ var objectKeys$1 = Object.keys || function keys(O) {
1251
+ return internalObjectKeys(O, enumBugKeys$1);
1252
+ };
1253
+
1254
+ var DESCRIPTORS = descriptors;
1255
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1256
+ var definePropertyModule = objectDefineProperty;
1257
+ var anObject$3 = anObject$7;
1258
+ var toIndexedObject = toIndexedObject$4;
1259
+ var objectKeys = objectKeys$1;
1260
+
1261
+ // `Object.defineProperties` method
1262
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1263
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1264
+ objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1265
+ anObject$3(O);
1266
+ var props = toIndexedObject(Properties);
1267
+ var keys = objectKeys(Properties);
1268
+ var length = keys.length;
1269
+ var index = 0;
1270
+ var key;
1271
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1272
+ return O;
1273
+ };
1274
+
1275
+ var getBuiltIn = getBuiltIn$4;
1276
+
1277
+ var html$1 = getBuiltIn('document', 'documentElement');
1278
+
1279
+ /* global ActiveXObject -- old IE, WSH */
1280
+
1281
+ var anObject$2 = anObject$7;
1282
+ var definePropertiesModule = objectDefineProperties;
1283
+ var enumBugKeys = enumBugKeys$3;
1284
+ var hiddenKeys = hiddenKeys$4;
1285
+ var html = html$1;
1286
+ var documentCreateElement = documentCreateElement$1;
1287
+ var sharedKey = sharedKey$2;
1288
+
1289
+ var GT = '>';
1290
+ var LT = '<';
1291
+ var PROTOTYPE = 'prototype';
1292
+ var SCRIPT = 'script';
1293
+ var IE_PROTO = sharedKey('IE_PROTO');
1294
+
1295
+ var EmptyConstructor = function () { /* empty */ };
1296
+
1297
+ var scriptTag = function (content) {
1298
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1299
+ };
1300
+
1301
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1302
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1303
+ activeXDocument.write(scriptTag(''));
1304
+ activeXDocument.close();
1305
+ var temp = activeXDocument.parentWindow.Object;
1306
+ activeXDocument = null; // avoid memory leak
1307
+ return temp;
1308
+ };
1309
+
1310
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1311
+ var NullProtoObjectViaIFrame = function () {
1312
+ // Thrash, waste and sodomy: IE GC bug
1313
+ var iframe = documentCreateElement('iframe');
1314
+ var JS = 'java' + SCRIPT + ':';
1315
+ var iframeDocument;
1316
+ iframe.style.display = 'none';
1317
+ html.appendChild(iframe);
1318
+ // https://github.com/zloirock/core-js/issues/475
1319
+ iframe.src = String(JS);
1320
+ iframeDocument = iframe.contentWindow.document;
1321
+ iframeDocument.open();
1322
+ iframeDocument.write(scriptTag('document.F=Object'));
1323
+ iframeDocument.close();
1324
+ return iframeDocument.F;
1325
+ };
1326
+
1327
+ // Check for document.domain and active x support
1328
+ // No need to use active x approach when document.domain is not set
1329
+ // see https://github.com/es-shims/es5-shim/issues/150
1330
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1331
+ // avoid IE GC bug
1332
+ var activeXDocument;
1333
+ var NullProtoObject = function () {
1334
+ try {
1335
+ activeXDocument = new ActiveXObject('htmlfile');
1336
+ } catch (error) { /* ignore */ }
1337
+ NullProtoObject = typeof document != 'undefined'
1338
+ ? document.domain && activeXDocument
1339
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1340
+ : NullProtoObjectViaIFrame()
1341
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1342
+ var length = enumBugKeys.length;
1343
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1344
+ return NullProtoObject();
1345
+ };
1346
+
1347
+ hiddenKeys[IE_PROTO] = true;
1348
+
1349
+ // `Object.create` method
1350
+ // https://tc39.es/ecma262/#sec-object.create
1351
+ var objectCreate = Object.create || function create(O, Properties) {
1352
+ var result;
1353
+ if (O !== null) {
1354
+ EmptyConstructor[PROTOTYPE] = anObject$2(O);
1355
+ result = new EmptyConstructor();
1356
+ EmptyConstructor[PROTOTYPE] = null;
1357
+ // add "__proto__" for Object.getPrototypeOf polyfill
1358
+ result[IE_PROTO] = O;
1359
+ } else result = NullProtoObject();
1360
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1361
+ };
1362
+
1363
+ var fails$3 = fails$c;
1364
+ var global$3 = global$r;
1365
+
1366
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1367
+ var $RegExp$1 = global$3.RegExp;
1368
+
1369
+ var regexpUnsupportedDotAll = fails$3(function () {
1370
+ var re = $RegExp$1('.', 's');
1371
+ return !(re.dotAll && re.exec('\n') && re.flags === 's');
1372
+ });
1373
+
1374
+ var fails$2 = fails$c;
1375
+ var global$2 = global$r;
1376
+
1377
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1378
+ var $RegExp = global$2.RegExp;
1379
+
1380
+ var regexpUnsupportedNcg = fails$2(function () {
1381
+ var re = $RegExp('(?<a>b)', 'g');
1382
+ return re.exec('b').groups.a !== 'b' ||
1383
+ 'b'.replace(re, '$<a>c') !== 'bc';
1384
+ });
1385
+
1386
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1387
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
1388
+ var call$3 = functionCall;
1389
+ var uncurryThis$4 = functionUncurryThis;
1390
+ var toString$2 = toString$3;
1391
+ var regexpFlags = regexpFlags$1;
1392
+ var stickyHelpers = regexpStickyHelpers;
1393
+ var shared = shared$4.exports;
1394
+ var create = objectCreate;
1395
+ var getInternalState = internalState.get;
1396
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
1397
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1398
+
1399
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
1400
+ var nativeExec = RegExp.prototype.exec;
1401
+ var patchedExec = nativeExec;
1402
+ var charAt$3 = uncurryThis$4(''.charAt);
1403
+ var indexOf = uncurryThis$4(''.indexOf);
1404
+ var replace$1 = uncurryThis$4(''.replace);
1405
+ var stringSlice$3 = uncurryThis$4(''.slice);
1406
+
1407
+ var UPDATES_LAST_INDEX_WRONG = (function () {
1408
+ var re1 = /a/;
1409
+ var re2 = /b*/g;
1410
+ call$3(nativeExec, re1, 'a');
1411
+ call$3(nativeExec, re2, 'a');
1412
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1413
+ })();
1414
+
1415
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
1416
+
1417
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
1418
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1419
+
1420
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
1421
+
1422
+ if (PATCH) {
1423
+ patchedExec = function exec(string) {
1424
+ var re = this;
1425
+ var state = getInternalState(re);
1426
+ var str = toString$2(string);
1427
+ var raw = state.raw;
1428
+ var result, reCopy, lastIndex, match, i, object, group;
1429
+
1430
+ if (raw) {
1431
+ raw.lastIndex = re.lastIndex;
1432
+ result = call$3(patchedExec, raw, str);
1433
+ re.lastIndex = raw.lastIndex;
1434
+ return result;
1435
+ }
1436
+
1437
+ var groups = state.groups;
1438
+ var sticky = UNSUPPORTED_Y && re.sticky;
1439
+ var flags = call$3(regexpFlags, re);
1440
+ var source = re.source;
1441
+ var charsAdded = 0;
1442
+ var strCopy = str;
1443
+
1444
+ if (sticky) {
1445
+ flags = replace$1(flags, 'y', '');
1446
+ if (indexOf(flags, 'g') === -1) {
1447
+ flags += 'g';
1448
+ }
1449
+
1450
+ strCopy = stringSlice$3(str, re.lastIndex);
1451
+ // Support anchored sticky behavior.
1452
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
1453
+ source = '(?: ' + source + ')';
1454
+ strCopy = ' ' + strCopy;
1455
+ charsAdded++;
1456
+ }
1457
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
1458
+ // simulate the 'y' flag.
1459
+ reCopy = new RegExp('^(?:' + source + ')', flags);
1460
+ }
1461
+
1462
+ if (NPCG_INCLUDED) {
1463
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1464
+ }
1465
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1466
+
1467
+ match = call$3(nativeExec, sticky ? reCopy : re, strCopy);
1468
+
1469
+ if (sticky) {
1470
+ if (match) {
1471
+ match.input = stringSlice$3(match.input, charsAdded);
1472
+ match[0] = stringSlice$3(match[0], charsAdded);
1473
+ match.index = re.lastIndex;
1474
+ re.lastIndex += match[0].length;
1475
+ } else re.lastIndex = 0;
1476
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
1477
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1478
+ }
1479
+ if (NPCG_INCLUDED && match && match.length > 1) {
1480
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
1481
+ // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
1482
+ call$3(nativeReplace, match[0], reCopy, function () {
1483
+ for (i = 1; i < arguments.length - 2; i++) {
1484
+ if (arguments[i] === undefined) match[i] = undefined;
1485
+ }
1486
+ });
1487
+ }
1488
+
1489
+ if (match && groups) {
1490
+ match.groups = object = create(null);
1491
+ for (i = 0; i < groups.length; i++) {
1492
+ group = groups[i];
1493
+ object[group[0]] = match[group[1]];
1494
+ }
1495
+ }
1496
+
1497
+ return match;
1498
+ };
1499
+ }
1500
+
1501
+ var regexpExec$2 = patchedExec;
1502
+
1503
+ var $ = _export;
1504
+ var exec = regexpExec$2;
1505
+
1506
+ // `RegExp.prototype.exec` method
1507
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1508
+ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
1509
+ exec: exec
1510
+ });
1511
+
1512
+ var NATIVE_BIND = functionBindNative;
1513
+
1514
+ var FunctionPrototype = Function.prototype;
1515
+ var apply$1 = FunctionPrototype.apply;
1516
+ var call$2 = FunctionPrototype.call;
1517
+
1518
+ // eslint-disable-next-line es/no-reflect -- safe
1519
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$2.bind(apply$1) : function () {
1520
+ return call$2.apply(apply$1, arguments);
1521
+ });
1522
+
1523
+ // TODO: Remove from `core-js@4` since it's moved to entry points
1524
+
1525
+ var uncurryThis$3 = functionUncurryThis;
1526
+ var redefine = redefine$2.exports;
1527
+ var regexpExec$1 = regexpExec$2;
1528
+ var fails$1 = fails$c;
1529
+ var wellKnownSymbol$1 = wellKnownSymbol$5;
1530
+ var createNonEnumerableProperty = createNonEnumerableProperty$4;
1531
+
1532
+ var SPECIES = wellKnownSymbol$1('species');
1533
+ var RegExpPrototype = RegExp.prototype;
1534
+
1535
+ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
1536
+ var SYMBOL = wellKnownSymbol$1(KEY);
1537
+
1538
+ var DELEGATES_TO_SYMBOL = !fails$1(function () {
1539
+ // String methods call symbol-named RegEp methods
1540
+ var O = {};
1541
+ O[SYMBOL] = function () { return 7; };
1542
+ return ''[KEY](O) != 7;
1543
+ });
1544
+
1545
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
1546
+ // Symbol-named RegExp methods call .exec
1547
+ var execCalled = false;
1548
+ var re = /a/;
1549
+
1550
+ if (KEY === 'split') {
1551
+ // We can't use real regex here since it causes deoptimization
1552
+ // and serious performance degradation in V8
1553
+ // https://github.com/zloirock/core-js/issues/306
1554
+ re = {};
1555
+ // RegExp[@@split] doesn't call the regex's exec method, but first creates
1556
+ // a new one. We need to return the patched regex when creating the new one.
1557
+ re.constructor = {};
1558
+ re.constructor[SPECIES] = function () { return re; };
1559
+ re.flags = '';
1560
+ re[SYMBOL] = /./[SYMBOL];
1561
+ }
1562
+
1563
+ re.exec = function () { execCalled = true; return null; };
1564
+
1565
+ re[SYMBOL]('');
1566
+ return !execCalled;
1567
+ });
1568
+
1569
+ if (
1570
+ !DELEGATES_TO_SYMBOL ||
1571
+ !DELEGATES_TO_EXEC ||
1572
+ FORCED
1573
+ ) {
1574
+ var uncurriedNativeRegExpMethod = uncurryThis$3(/./[SYMBOL]);
1575
+ var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1576
+ var uncurriedNativeMethod = uncurryThis$3(nativeMethod);
1577
+ var $exec = regexp.exec;
1578
+ if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
1579
+ if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1580
+ // The native String method already delegates to @@method (this
1581
+ // polyfilled function), leasing to infinite recursion.
1582
+ // We avoid it by directly calling the native @@method method.
1583
+ return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
1584
+ }
1585
+ return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
1586
+ }
1587
+ return { done: false };
1588
+ });
1589
+
1590
+ redefine(String.prototype, KEY, methods[0]);
1591
+ redefine(RegExpPrototype, SYMBOL, methods[1]);
1592
+ }
1593
+
1594
+ if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
1595
+ };
1596
+
1597
+ var uncurryThis$2 = functionUncurryThis;
1598
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
1599
+ var toString$1 = toString$3;
1600
+ var requireObjectCoercible$1 = requireObjectCoercible$4;
1601
+
1602
+ var charAt$2 = uncurryThis$2(''.charAt);
1603
+ var charCodeAt = uncurryThis$2(''.charCodeAt);
1604
+ var stringSlice$2 = uncurryThis$2(''.slice);
1605
+
1606
+ var createMethod = function (CONVERT_TO_STRING) {
1607
+ return function ($this, pos) {
1608
+ var S = toString$1(requireObjectCoercible$1($this));
1609
+ var position = toIntegerOrInfinity$1(pos);
1610
+ var size = S.length;
1611
+ var first, second;
1612
+ if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1613
+ first = charCodeAt(S, position);
1614
+ return first < 0xD800 || first > 0xDBFF || position + 1 === size
1615
+ || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
1616
+ ? CONVERT_TO_STRING
1617
+ ? charAt$2(S, position)
1618
+ : first
1619
+ : CONVERT_TO_STRING
1620
+ ? stringSlice$2(S, position, position + 2)
1621
+ : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1622
+ };
1623
+ };
1624
+
1625
+ var stringMultibyte = {
1626
+ // `String.prototype.codePointAt` method
1627
+ // https://tc39.es/ecma262/#sec-string.prototype.codepointat
1628
+ codeAt: createMethod(false),
1629
+ // `String.prototype.at` method
1630
+ // https://github.com/mathiasbynens/String.prototype.at
1631
+ charAt: createMethod(true)
1632
+ };
1633
+
1634
+ var charAt$1 = stringMultibyte.charAt;
1635
+
1636
+ // `AdvanceStringIndex` abstract operation
1637
+ // https://tc39.es/ecma262/#sec-advancestringindex
1638
+ var advanceStringIndex$1 = function (S, index, unicode) {
1639
+ return index + (unicode ? charAt$1(S, index).length : 1);
1640
+ };
1641
+
1642
+ var uncurryThis$1 = functionUncurryThis;
1643
+ var toObject = toObject$2;
1644
+
1645
+ var floor = Math.floor;
1646
+ var charAt = uncurryThis$1(''.charAt);
1647
+ var replace = uncurryThis$1(''.replace);
1648
+ var stringSlice$1 = uncurryThis$1(''.slice);
1649
+ var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
1650
+ var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
1651
+
1652
+ // `GetSubstitution` abstract operation
1653
+ // https://tc39.es/ecma262/#sec-getsubstitution
1654
+ var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
1655
+ var tailPos = position + matched.length;
1656
+ var m = captures.length;
1657
+ var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
1658
+ if (namedCaptures !== undefined) {
1659
+ namedCaptures = toObject(namedCaptures);
1660
+ symbols = SUBSTITUTION_SYMBOLS;
1661
+ }
1662
+ return replace(replacement, symbols, function (match, ch) {
1663
+ var capture;
1664
+ switch (charAt(ch, 0)) {
1665
+ case '$': return '$';
1666
+ case '&': return matched;
1667
+ case '`': return stringSlice$1(str, 0, position);
1668
+ case "'": return stringSlice$1(str, tailPos);
1669
+ case '<':
1670
+ capture = namedCaptures[stringSlice$1(ch, 1, -1)];
1671
+ break;
1672
+ default: // \d\d?
1673
+ var n = +ch;
1674
+ if (n === 0) return match;
1675
+ if (n > m) {
1676
+ var f = floor(n / 10);
1677
+ if (f === 0) return match;
1678
+ if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
1679
+ return match;
1680
+ }
1681
+ capture = captures[n - 1];
1682
+ }
1683
+ return capture === undefined ? '' : capture;
1684
+ });
1685
+ };
1686
+
1687
+ var global$1 = global$r;
1688
+ var call$1 = functionCall;
1689
+ var anObject$1 = anObject$7;
1690
+ var isCallable$1 = isCallable$c;
1691
+ var classof = classofRaw$1;
1692
+ var regexpExec = regexpExec$2;
1693
+
1694
+ var TypeError$1 = global$1.TypeError;
1695
+
1696
+ // `RegExpExec` abstract operation
1697
+ // https://tc39.es/ecma262/#sec-regexpexec
1698
+ var regexpExecAbstract = function (R, S) {
1699
+ var exec = R.exec;
1700
+ if (isCallable$1(exec)) {
1701
+ var result = call$1(exec, R, S);
1702
+ if (result !== null) anObject$1(result);
1703
+ return result;
1704
+ }
1705
+ if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
1706
+ throw TypeError$1('RegExp#exec called on incompatible receiver');
1707
+ };
1708
+
1709
+ var apply = functionApply;
1710
+ var call = functionCall;
1711
+ var uncurryThis = functionUncurryThis;
1712
+ var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
1713
+ var fails = fails$c;
1714
+ var anObject = anObject$7;
1715
+ var isCallable = isCallable$c;
1716
+ var toIntegerOrInfinity = toIntegerOrInfinity$4;
1717
+ var toLength = toLength$2;
1718
+ var toString = toString$3;
1719
+ var requireObjectCoercible = requireObjectCoercible$4;
1720
+ var advanceStringIndex = advanceStringIndex$1;
1721
+ var getMethod = getMethod$2;
1722
+ var getSubstitution = getSubstitution$1;
1723
+ var regExpExec = regexpExecAbstract;
1724
+ var wellKnownSymbol = wellKnownSymbol$5;
1725
+
1726
+ var REPLACE = wellKnownSymbol('replace');
1727
+ var max = Math.max;
1728
+ var min = Math.min;
1729
+ var concat = uncurryThis([].concat);
1730
+ var push = uncurryThis([].push);
1731
+ var stringIndexOf = uncurryThis(''.indexOf);
1732
+ var stringSlice = uncurryThis(''.slice);
1733
+
1734
+ var maybeToString = function (it) {
1735
+ return it === undefined ? it : String(it);
1736
+ };
1737
+
1738
+ // IE <= 11 replaces $0 with the whole match, as if it was $&
1739
+ // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
1740
+ var REPLACE_KEEPS_$0 = (function () {
1741
+ // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
1742
+ return 'a'.replace(/./, '$0') === '$0';
1743
+ })();
1744
+
1745
+ // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
1746
+ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
1747
+ if (/./[REPLACE]) {
1748
+ return /./[REPLACE]('a', '$0') === '';
1749
+ }
1750
+ return false;
1751
+ })();
1752
+
1753
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
1754
+ var re = /./;
1755
+ re.exec = function () {
1756
+ var result = [];
1757
+ result.groups = { a: '7' };
1758
+ return result;
1759
+ };
1760
+ // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
1761
+ return ''.replace(re, '$<a>') !== '7';
1762
+ });
1763
+
1764
+ // @@replace logic
1765
+ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
1766
+ var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
1767
+
1768
+ return [
1769
+ // `String.prototype.replace` method
1770
+ // https://tc39.es/ecma262/#sec-string.prototype.replace
1771
+ function replace(searchValue, replaceValue) {
1772
+ var O = requireObjectCoercible(this);
1773
+ var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
1774
+ return replacer
1775
+ ? call(replacer, searchValue, O, replaceValue)
1776
+ : call(nativeReplace, toString(O), searchValue, replaceValue);
1777
+ },
1778
+ // `RegExp.prototype[@@replace]` method
1779
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
1780
+ function (string, replaceValue) {
1781
+ var rx = anObject(this);
1782
+ var S = toString(string);
1783
+
1784
+ if (
1785
+ typeof replaceValue == 'string' &&
1786
+ stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
1787
+ stringIndexOf(replaceValue, '$<') === -1
1788
+ ) {
1789
+ var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
1790
+ if (res.done) return res.value;
1791
+ }
1792
+
1793
+ var functionalReplace = isCallable(replaceValue);
1794
+ if (!functionalReplace) replaceValue = toString(replaceValue);
1795
+
1796
+ var global = rx.global;
1797
+ if (global) {
1798
+ var fullUnicode = rx.unicode;
1799
+ rx.lastIndex = 0;
1800
+ }
1801
+ var results = [];
1802
+ while (true) {
1803
+ var result = regExpExec(rx, S);
1804
+ if (result === null) break;
1805
+
1806
+ push(results, result);
1807
+ if (!global) break;
1808
+
1809
+ var matchStr = toString(result[0]);
1810
+ if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
1811
+ }
1812
+
1813
+ var accumulatedResult = '';
1814
+ var nextSourcePosition = 0;
1815
+ for (var i = 0; i < results.length; i++) {
1816
+ result = results[i];
1817
+
1818
+ var matched = toString(result[0]);
1819
+ var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
1820
+ var captures = [];
1821
+ // NOTE: This is equivalent to
1822
+ // captures = result.slice(1).map(maybeToString)
1823
+ // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
1824
+ // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
1825
+ // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
1826
+ for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
1827
+ var namedCaptures = result.groups;
1828
+ if (functionalReplace) {
1829
+ var replacerArgs = concat([matched], captures, position, S);
1830
+ if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
1831
+ var replacement = toString(apply(replaceValue, undefined, replacerArgs));
1832
+ } else {
1833
+ replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
1834
+ }
1835
+ if (position >= nextSourcePosition) {
1836
+ accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
1837
+ nextSourcePosition = position + matched.length;
1838
+ }
1839
+ }
1840
+ return accumulatedResult + stringSlice(S, nextSourcePosition);
1841
+ }
1842
+ ];
1843
+ }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
1844
+
1845
+ var MergeTag = function MergeTag(_a) {
1846
+ var id = _a.id;
1847
+
1848
+ var _b = useProfile(),
1849
+ loading = _b.loading,
1850
+ profile = _b.profile;
1851
+
1852
+ if (loading || !profile) {
1853
+ return null;
1854
+ }
1855
+
1856
+ var value = get__default["default"](profile, id.replace(/_/g, '.')); // DON'T CHANGE
1857
+
1858
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, value);
1859
+ };
1860
+
1861
+ exports.MergeTag = MergeTag;
196
1862
  exports.NinetailedProvider = NinetailedProvider;
197
1863
  exports.Personalize = Personalize;
198
1864
  exports.useNinetailed = useNinetailed;