@ninetailed/experience.js-plugin-google-analytics 3.0.1-beta.4 → 3.0.2-beta.1

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.cjs ADDED
@@ -0,0 +1,2287 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var template = require('lodash/template');
6
+ var experience_jsPluginAnalytics = require('@ninetailed/experience.js-plugin-analytics');
7
+
8
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
+
10
+ var template__default = /*#__PURE__*/_interopDefaultLegacy(template);
11
+
12
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
13
+
14
+ var check = function (it) {
15
+ return it && it.Math == Math && it;
16
+ };
17
+
18
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
19
+ var global$i =
20
+ // eslint-disable-next-line es/no-global-this -- safe
21
+ check(typeof globalThis == 'object' && globalThis) ||
22
+ check(typeof window == 'object' && window) ||
23
+ // eslint-disable-next-line no-restricted-globals -- safe
24
+ check(typeof self == 'object' && self) ||
25
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
26
+ // eslint-disable-next-line no-new-func -- fallback
27
+ (function () { return this; })() || Function('return this')();
28
+
29
+ var objectGetOwnPropertyDescriptor = {};
30
+
31
+ var fails$a = function (exec) {
32
+ try {
33
+ return !!exec();
34
+ } catch (error) {
35
+ return true;
36
+ }
37
+ };
38
+
39
+ var fails$9 = fails$a;
40
+
41
+ // Detect IE8's incomplete defineProperty implementation
42
+ var descriptors = !fails$9(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$8 = fails$a;
48
+
49
+ var functionBindNative = !fails$8(function () {
50
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
51
+ var test = (function () { /* empty */ }).bind();
52
+ // eslint-disable-next-line no-prototype-builtins -- safe
53
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
54
+ });
55
+
56
+ var NATIVE_BIND$3 = functionBindNative;
57
+
58
+ var call$c = Function.prototype.call;
59
+
60
+ var functionCall = NATIVE_BIND$3 ? call$c.bind(call$c) : function () {
61
+ return call$c.apply(call$c, arguments);
62
+ };
63
+
64
+ var objectPropertyIsEnumerable = {};
65
+
66
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
67
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
68
+ var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
69
+
70
+ // Nashorn ~ JDK8 bug
71
+ var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$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$2(this, V);
77
+ return !!descriptor && descriptor.enumerable;
78
+ } : $propertyIsEnumerable;
79
+
80
+ var createPropertyDescriptor$2 = 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$2 = functionBindNative;
90
+
91
+ var FunctionPrototype$2 = Function.prototype;
92
+ var call$b = FunctionPrototype$2.call;
93
+ var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$b, call$b);
94
+
95
+ var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
96
+ return function () {
97
+ return call$b.apply(fn, arguments);
98
+ };
99
+ };
100
+
101
+ var uncurryThis$c = functionUncurryThis;
102
+
103
+ var toString$1 = uncurryThis$c({}.toString);
104
+ var stringSlice = uncurryThis$c(''.slice);
105
+
106
+ var classofRaw$2 = function (it) {
107
+ return stringSlice(toString$1(it), 8, -1);
108
+ };
109
+
110
+ var uncurryThis$b = functionUncurryThis;
111
+ var fails$7 = fails$a;
112
+ var classof$4 = classofRaw$2;
113
+
114
+ var $Object$3 = Object;
115
+ var split = uncurryThis$b(''.split);
116
+
117
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
118
+ var indexedObject = fails$7(function () {
119
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
120
+ // eslint-disable-next-line no-prototype-builtins -- safe
121
+ return !$Object$3('z').propertyIsEnumerable(0);
122
+ }) ? function (it) {
123
+ return classof$4(it) == 'String' ? split(it, '') : $Object$3(it);
124
+ } : $Object$3;
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$4 = function (it) {
129
+ return it === null || it === undefined;
130
+ };
131
+
132
+ var isNullOrUndefined$3 = isNullOrUndefined$4;
133
+
134
+ var $TypeError$c = TypeError;
135
+
136
+ // `RequireObjectCoercible` abstract operation
137
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
138
+ var requireObjectCoercible$2 = function (it) {
139
+ if (isNullOrUndefined$3(it)) throw $TypeError$c("Can't call method on " + it);
140
+ return it;
141
+ };
142
+
143
+ // toObject with fallback for non-array-like ES3 strings
144
+ var IndexedObject = indexedObject;
145
+ var requireObjectCoercible$1 = requireObjectCoercible$2;
146
+
147
+ var toIndexedObject$3 = function (it) {
148
+ return IndexedObject(requireObjectCoercible$1(it));
149
+ };
150
+
151
+ var documentAll$2 = typeof document == 'object' && document.all;
152
+
153
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
154
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
155
+
156
+ var documentAll_1 = {
157
+ all: documentAll$2,
158
+ IS_HTMLDDA: IS_HTMLDDA
159
+ };
160
+
161
+ var $documentAll$1 = documentAll_1;
162
+
163
+ var documentAll$1 = $documentAll$1.all;
164
+
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';
171
+ };
172
+
173
+ var isCallable$g = isCallable$h;
174
+ var $documentAll = documentAll_1;
175
+
176
+ var documentAll = $documentAll.all;
177
+
178
+ var isObject$7 = $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);
182
+ };
183
+
184
+ var global$h = global$i;
185
+ var isCallable$f = isCallable$h;
186
+
187
+ var aFunction = function (argument) {
188
+ return isCallable$f(argument) ? argument : undefined;
189
+ };
190
+
191
+ var getBuiltIn$8 = function (namespace, method) {
192
+ return arguments.length < 2 ? aFunction(global$h[namespace]) : global$h[namespace] && global$h[namespace][method];
193
+ };
194
+
195
+ var uncurryThis$a = functionUncurryThis;
196
+
197
+ var objectIsPrototypeOf = uncurryThis$a({}.isPrototypeOf);
198
+
199
+ var getBuiltIn$7 = getBuiltIn$8;
200
+
201
+ var engineUserAgent = getBuiltIn$7('navigator', 'userAgent') || '';
202
+
203
+ var global$g = global$i;
204
+ var userAgent$3 = engineUserAgent;
205
+
206
+ var process$3 = global$g.process;
207
+ var Deno$1 = global$g.Deno;
208
+ var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
209
+ var v8 = versions && versions.v8;
210
+ var match, version;
211
+
212
+ if (v8) {
213
+ match = v8.split('.');
214
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
215
+ // but their correct versions are not interesting for us
216
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
217
+ }
218
+
219
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
220
+ // so check `userAgent` even if `.v8` exists, but 0
221
+ if (!version && userAgent$3) {
222
+ match = userAgent$3.match(/Edge\/(\d+)/);
223
+ if (!match || match[1] >= 74) {
224
+ match = userAgent$3.match(/Chrome\/(\d+)/);
225
+ if (match) version = +match[1];
226
+ }
227
+ }
228
+
229
+ var engineV8Version = version;
230
+
231
+ /* eslint-disable es/no-symbol -- required for testing */
232
+
233
+ var V8_VERSION$1 = engineV8Version;
234
+ var fails$6 = fails$a;
235
+
236
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
237
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$6(function () {
238
+ var symbol = Symbol();
239
+ // Chrome 38 Symbol has incorrect toString conversion
240
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
241
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
242
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
243
+ !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
244
+ });
245
+
246
+ /* eslint-disable es/no-symbol -- required for testing */
247
+
248
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
249
+
250
+ var useSymbolAsUid = NATIVE_SYMBOL$1
251
+ && !Symbol.sham
252
+ && typeof Symbol.iterator == 'symbol';
253
+
254
+ var getBuiltIn$6 = getBuiltIn$8;
255
+ var isCallable$e = isCallable$h;
256
+ var isPrototypeOf$2 = objectIsPrototypeOf;
257
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
258
+
259
+ var $Object$2 = Object;
260
+
261
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
262
+ return typeof it == 'symbol';
263
+ } : function (it) {
264
+ var $Symbol = getBuiltIn$6('Symbol');
265
+ return isCallable$e($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$2(it));
266
+ };
267
+
268
+ var $String$2 = String;
269
+
270
+ var tryToString$4 = function (argument) {
271
+ try {
272
+ return $String$2(argument);
273
+ } catch (error) {
274
+ return 'Object';
275
+ }
276
+ };
277
+
278
+ var isCallable$d = isCallable$h;
279
+ var tryToString$3 = tryToString$4;
280
+
281
+ var $TypeError$b = TypeError;
282
+
283
+ // `Assert: IsCallable(argument) is true`
284
+ var aCallable$7 = function (argument) {
285
+ if (isCallable$d(argument)) return argument;
286
+ throw $TypeError$b(tryToString$3(argument) + ' is not a function');
287
+ };
288
+
289
+ var aCallable$6 = aCallable$7;
290
+ var isNullOrUndefined$2 = isNullOrUndefined$4;
291
+
292
+ // `GetMethod` abstract operation
293
+ // https://tc39.es/ecma262/#sec-getmethod
294
+ var getMethod$3 = function (V, P) {
295
+ var func = V[P];
296
+ return isNullOrUndefined$2(func) ? undefined : aCallable$6(func);
297
+ };
298
+
299
+ var call$a = functionCall;
300
+ var isCallable$c = isCallable$h;
301
+ var isObject$6 = isObject$7;
302
+
303
+ var $TypeError$a = TypeError;
304
+
305
+ // `OrdinaryToPrimitive` abstract operation
306
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
307
+ var ordinaryToPrimitive$1 = function (input, pref) {
308
+ var fn, val;
309
+ if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$6(val = call$a(fn, input))) return val;
310
+ if (isCallable$c(fn = input.valueOf) && !isObject$6(val = call$a(fn, input))) return val;
311
+ if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$6(val = call$a(fn, input))) return val;
312
+ throw $TypeError$a("Can't convert object to primitive value");
313
+ };
314
+
315
+ var shared$3 = {exports: {}};
316
+
317
+ var global$f = global$i;
318
+
319
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
320
+ var defineProperty$2 = Object.defineProperty;
321
+
322
+ var defineGlobalProperty$3 = function (key, value) {
323
+ try {
324
+ defineProperty$2(global$f, key, { value: value, configurable: true, writable: true });
325
+ } catch (error) {
326
+ global$f[key] = value;
327
+ } return value;
328
+ };
329
+
330
+ var global$e = global$i;
331
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
332
+
333
+ var SHARED = '__core-js_shared__';
334
+ var store$3 = global$e[SHARED] || defineGlobalProperty$2(SHARED, {});
335
+
336
+ var sharedStore = store$3;
337
+
338
+ var store$2 = sharedStore;
339
+
340
+ (shared$3.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 = requireObjectCoercible$2;
351
+
352
+ var $Object$1 = Object;
353
+
354
+ // `ToObject` abstract operation
355
+ // https://tc39.es/ecma262/#sec-toobject
356
+ var toObject$1 = function (argument) {
357
+ return $Object$1(requireObjectCoercible(argument));
358
+ };
359
+
360
+ var uncurryThis$9 = functionUncurryThis;
361
+ var toObject = toObject$1;
362
+
363
+ var hasOwnProperty = uncurryThis$9({}.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(it), key);
370
+ };
371
+
372
+ var uncurryThis$8 = functionUncurryThis;
373
+
374
+ var id = 0;
375
+ var postfix = Math.random();
376
+ var toString = uncurryThis$8(1.0.toString);
377
+
378
+ var uid$2 = function (key) {
379
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
380
+ };
381
+
382
+ var global$d = global$i;
383
+ var shared$2 = shared$3.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$2('wks');
390
+ var Symbol$1 = global$d.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$9 = functionCall;
408
+ var isObject$5 = isObject$7;
409
+ var isSymbol$1 = isSymbol$2;
410
+ var getMethod$2 = getMethod$3;
411
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
412
+ var wellKnownSymbol$9 = wellKnownSymbol$a;
413
+
414
+ var $TypeError$9 = 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$5(input) || isSymbol$1(input)) return input;
421
+ var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
422
+ var result;
423
+ if (exoticToPrim) {
424
+ if (pref === undefined) pref = 'default';
425
+ result = call$9(exoticToPrim, input, pref);
426
+ if (!isObject$5(result) || isSymbol$1(result)) return result;
427
+ throw $TypeError$9("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');
440
+ return isSymbol(key) ? key : key + '';
441
+ };
442
+
443
+ var global$c = global$i;
444
+ var isObject$4 = isObject$7;
445
+
446
+ var document$3 = global$c.document;
447
+ // typeof document.createElement is 'object' in old IE
448
+ var EXISTS$1 = isObject$4(document$3) && isObject$4(document$3.createElement);
449
+
450
+ var documentCreateElement = function (it) {
451
+ return EXISTS$1 ? document$3.createElement(it) : {};
452
+ };
453
+
454
+ var DESCRIPTORS$7 = descriptors;
455
+ var fails$5 = fails$a;
456
+ var createElement$1 = documentCreateElement;
457
+
458
+ // Thanks to IE8 for its funny defineProperty
459
+ var ie8DomDefine = !DESCRIPTORS$7 && !fails$5(function () {
460
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
461
+ return Object.defineProperty(createElement$1('div'), 'a', {
462
+ get: function () { return 7; }
463
+ }).a != 7;
464
+ });
465
+
466
+ var DESCRIPTORS$6 = descriptors;
467
+ var call$8 = functionCall;
468
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
469
+ var createPropertyDescriptor$1 = createPropertyDescriptor$2;
470
+ var toIndexedObject$2 = toIndexedObject$3;
471
+ var toPropertyKey$1 = toPropertyKey$2;
472
+ var hasOwn$7 = hasOwnProperty_1;
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$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
481
+ O = toIndexedObject$2(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$1(!call$8(propertyIsEnumerableModule.f, O, P), O[P]);
487
+ };
488
+
489
+ var objectDefineProperty = {};
490
+
491
+ var DESCRIPTORS$5 = descriptors;
492
+ var fails$4 = fails$a;
493
+
494
+ // V8 ~ Chrome 36-
495
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
496
+ var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$4(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$3 = isObject$7;
505
+
506
+ var $String$1 = String;
507
+ var $TypeError$8 = TypeError;
508
+
509
+ // `Assert: Type(argument) is Object`
510
+ var anObject$8 = function (argument) {
511
+ if (isObject$3(argument)) return argument;
512
+ throw $TypeError$8($String$1(argument) + ' is not an object');
513
+ };
514
+
515
+ var DESCRIPTORS$4 = descriptors;
516
+ var IE8_DOM_DEFINE = ie8DomDefine;
517
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
518
+ var anObject$7 = anObject$8;
519
+ var toPropertyKey = toPropertyKey$2;
520
+
521
+ var $TypeError$7 = TypeError;
522
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
523
+ var $defineProperty = Object.defineProperty;
524
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
525
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
526
+ var ENUMERABLE = 'enumerable';
527
+ var CONFIGURABLE$1 = 'configurable';
528
+ var WRITABLE = 'writable';
529
+
530
+ // `Object.defineProperty` method
531
+ // https://tc39.es/ecma262/#sec-object.defineproperty
532
+ objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
533
+ anObject$7(O);
534
+ P = toPropertyKey(P);
535
+ anObject$7(Attributes);
536
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
537
+ var current = $getOwnPropertyDescriptor(O, P);
538
+ if (current && current[WRITABLE]) {
539
+ O[P] = Attributes.value;
540
+ Attributes = {
541
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
542
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
543
+ writable: false
544
+ };
545
+ }
546
+ } return $defineProperty(O, P, Attributes);
547
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
548
+ anObject$7(O);
549
+ P = toPropertyKey(P);
550
+ anObject$7(Attributes);
551
+ if (IE8_DOM_DEFINE) try {
552
+ return $defineProperty(O, P, Attributes);
553
+ } catch (error) { /* empty */ }
554
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$7('Accessors not supported');
555
+ if ('value' in Attributes) O[P] = Attributes.value;
556
+ return O;
557
+ };
558
+
559
+ var DESCRIPTORS$3 = descriptors;
560
+ var definePropertyModule$3 = objectDefineProperty;
561
+ var createPropertyDescriptor = createPropertyDescriptor$2;
562
+
563
+ var createNonEnumerableProperty$2 = DESCRIPTORS$3 ? function (object, key, value) {
564
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor(1, value));
565
+ } : function (object, key, value) {
566
+ object[key] = value;
567
+ return object;
568
+ };
569
+
570
+ var makeBuiltIn$2 = {exports: {}};
571
+
572
+ var DESCRIPTORS$2 = descriptors;
573
+ var hasOwn$6 = hasOwnProperty_1;
574
+
575
+ var FunctionPrototype$1 = Function.prototype;
576
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
577
+ var getDescriptor = DESCRIPTORS$2 && 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$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype$1, 'name').configurable));
583
+
584
+ var functionName = {
585
+ EXISTS: EXISTS,
586
+ PROPER: PROPER,
587
+ CONFIGURABLE: CONFIGURABLE
588
+ };
589
+
590
+ var uncurryThis$7 = functionUncurryThis;
591
+ var isCallable$b = isCallable$h;
592
+ var store$1 = sharedStore;
593
+
594
+ var functionToString = uncurryThis$7(Function.toString);
595
+
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
+ }
602
+
603
+ var inspectSource$3 = store$1.inspectSource;
604
+
605
+ var global$b = global$i;
606
+ var isCallable$a = isCallable$h;
607
+
608
+ var WeakMap$1 = global$b.WeakMap;
609
+
610
+ var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String(WeakMap$1));
611
+
612
+ var shared$1 = shared$3.exports;
613
+ var uid = uid$2;
614
+
615
+ var keys = shared$1('keys');
616
+
617
+ var sharedKey$1 = function (key) {
618
+ return keys[key] || (keys[key] = uid(key));
619
+ };
620
+
621
+ var hiddenKeys$3 = {};
622
+
623
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
624
+ var global$a = global$i;
625
+ var isObject$2 = isObject$7;
626
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
627
+ var hasOwn$5 = hasOwnProperty_1;
628
+ var shared = sharedStore;
629
+ var sharedKey = sharedKey$1;
630
+ var hiddenKeys$2 = hiddenKeys$3;
631
+
632
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
633
+ var TypeError$2 = global$a.TypeError;
634
+ var WeakMap = global$a.WeakMap;
635
+ var set$1, get, has;
636
+
637
+ var enforce = function (it) {
638
+ return has(it) ? get(it) : set$1(it, {});
639
+ };
640
+
641
+ var getterFor = function (TYPE) {
642
+ return function (it) {
643
+ var state;
644
+ if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
645
+ throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
646
+ } return state;
647
+ };
648
+ };
649
+
650
+ if (NATIVE_WEAK_MAP || shared.state) {
651
+ var store = shared.state || (shared.state = new WeakMap());
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 */
657
+ set$1 = function (it, metadata) {
658
+ if (store.has(it)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
659
+ metadata.facade = it;
660
+ store.set(it, metadata);
661
+ return metadata;
662
+ };
663
+ get = function (it) {
664
+ return store.get(it) || {};
665
+ };
666
+ has = function (it) {
667
+ return store.has(it);
668
+ };
669
+ } else {
670
+ var STATE = sharedKey('state');
671
+ hiddenKeys$2[STATE] = true;
672
+ set$1 = function (it, metadata) {
673
+ if (hasOwn$5(it, STATE)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
674
+ metadata.facade = it;
675
+ createNonEnumerableProperty$1(it, STATE, metadata);
676
+ return metadata;
677
+ };
678
+ get = function (it) {
679
+ return hasOwn$5(it, STATE) ? it[STATE] : {};
680
+ };
681
+ has = function (it) {
682
+ return hasOwn$5(it, STATE);
683
+ };
684
+ }
685
+
686
+ var internalState = {
687
+ set: set$1,
688
+ get: get,
689
+ has: has,
690
+ enforce: enforce,
691
+ getterFor: getterFor
692
+ };
693
+
694
+ var fails$3 = fails$a;
695
+ var isCallable$9 = isCallable$h;
696
+ var hasOwn$4 = hasOwnProperty_1;
697
+ var DESCRIPTORS$1 = descriptors;
698
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
699
+ var inspectSource$2 = inspectSource$3;
700
+ var InternalStateModule$1 = internalState;
701
+
702
+ var enforceInternalState = InternalStateModule$1.enforce;
703
+ var getInternalState = InternalStateModule$1.get;
704
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
705
+ var defineProperty$1 = Object.defineProperty;
706
+
707
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$3(function () {
708
+ return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
709
+ });
710
+
711
+ var TEMPLATE = String(String).split('String');
712
+
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 && value.name !== name)) {
720
+ if (DESCRIPTORS$1) defineProperty$1(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$1(value, 'length', { value: options.arity });
725
+ }
726
+ try {
727
+ if (options && hasOwn$4(options, 'constructor') && options.constructor) {
728
+ if (DESCRIPTORS$1) defineProperty$1(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;
731
+ } catch (error) { /* empty */ }
732
+ var state = enforceInternalState(value);
733
+ if (!hasOwn$4(state, 'source')) {
734
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
735
+ } return value;
736
+ };
737
+
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(this).source || inspectSource$2(this);
742
+ }, 'toString');
743
+
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$3 = 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
+ };
771
+
772
+ var objectGetOwnPropertyNames = {};
773
+
774
+ var ceil = Math.ceil;
775
+ var floor = Math.floor;
776
+
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 : ceil)(n);
783
+ };
784
+
785
+ var trunc = mathTrunc;
786
+
787
+ // `ToIntegerOrInfinity` abstract operation
788
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
789
+ var toIntegerOrInfinity$2 = 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$1 = toIntegerOrInfinity$2;
796
+
797
+ var max = Math.max;
798
+ var min$1 = 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$1(index);
805
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
806
+ };
807
+
808
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
809
+
810
+ var min = Math.min;
811
+
812
+ // `ToLength` abstract operation
813
+ // https://tc39.es/ecma262/#sec-tolength
814
+ var toLength$1 = function (argument) {
815
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
816
+ };
817
+
818
+ var toLength = toLength$1;
819
+
820
+ // `LengthOfArrayLike` abstract operation
821
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
822
+ var lengthOfArrayLike$2 = function (obj) {
823
+ return toLength(obj.length);
824
+ };
825
+
826
+ var toIndexedObject$1 = toIndexedObject$3;
827
+ var toAbsoluteIndex = toAbsoluteIndex$1;
828
+ var lengthOfArrayLike$1 = lengthOfArrayLike$2;
829
+
830
+ // `Array.prototype.{ indexOf, includes }` methods implementation
831
+ var createMethod = function (IS_INCLUDES) {
832
+ return function ($this, el, fromIndex) {
833
+ var O = toIndexedObject$1($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(true),
854
+ // `Array.prototype.indexOf` method
855
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
856
+ indexOf: createMethod(false)
857
+ };
858
+
859
+ var uncurryThis$6 = functionUncurryThis;
860
+ var hasOwn$3 = hasOwnProperty_1;
861
+ var toIndexedObject = toIndexedObject$3;
862
+ var indexOf = arrayIncludes.indexOf;
863
+ var hiddenKeys$1 = hiddenKeys$3;
864
+
865
+ var push = uncurryThis$6([].push);
866
+
867
+ var objectKeysInternal = function (object, names) {
868
+ var O = toIndexedObject(object);
869
+ var i = 0;
870
+ var result = [];
871
+ var key;
872
+ for (key in O) !hasOwn$3(hiddenKeys$1, key) && hasOwn$3(O, key) && push(result, key);
873
+ // Don't enum bug & hidden keys
874
+ while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
875
+ ~indexOf(result, key) || push(result, key);
876
+ }
877
+ return result;
878
+ };
879
+
880
+ // IE8- don't enum bug keys
881
+ var enumBugKeys$1 = [
882
+ 'constructor',
883
+ 'hasOwnProperty',
884
+ 'isPrototypeOf',
885
+ 'propertyIsEnumerable',
886
+ 'toLocaleString',
887
+ 'toString',
888
+ 'valueOf'
889
+ ];
890
+
891
+ var internalObjectKeys = objectKeysInternal;
892
+ var enumBugKeys = enumBugKeys$1;
893
+
894
+ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
895
+
896
+ // `Object.getOwnPropertyNames` method
897
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
898
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
899
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
900
+ return internalObjectKeys(O, hiddenKeys);
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$5 = getBuiltIn$8;
909
+ var uncurryThis$5 = functionUncurryThis;
910
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
911
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
912
+ var anObject$6 = anObject$8;
913
+
914
+ var concat = uncurryThis$5([].concat);
915
+
916
+ // all object keys, includes non-enumerable and symbols
917
+ var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
918
+ var keys = getOwnPropertyNamesModule.f(anObject$6(it));
919
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
920
+ return getOwnPropertySymbols ? concat(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$2 = fails$a;
941
+ var isCallable$7 = isCallable$h;
942
+
943
+ var replacement = /#|\.prototype\./;
944
+
945
+ var isForced$2 = function (feature, detection) {
946
+ var value = data[normalize(feature)];
947
+ return value == POLYFILL ? true
948
+ : value == NATIVE ? false
949
+ : isCallable$7(detection) ? fails$2(detection)
950
+ : !!detection;
951
+ };
952
+
953
+ var normalize = isForced$2.normalize = function (string) {
954
+ return String(string).replace(replacement, '.').toLowerCase();
955
+ };
956
+
957
+ var data = isForced$2.data = {};
958
+ var NATIVE = isForced$2.NATIVE = 'N';
959
+ var POLYFILL = isForced$2.POLYFILL = 'P';
960
+
961
+ var isForced_1 = isForced$2;
962
+
963
+ var global$9 = global$i;
964
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
965
+ var createNonEnumerableProperty = createNonEnumerableProperty$2;
966
+ var defineBuiltIn$2 = defineBuiltIn$3;
967
+ var defineGlobalProperty = defineGlobalProperty$3;
968
+ var copyConstructorProperties = copyConstructorProperties$1;
969
+ var isForced$1 = 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$9;
993
+ } else if (STATIC) {
994
+ target = global$9[TARGET] || defineGlobalProperty(TARGET, {});
995
+ } else {
996
+ target = (global$9[TARGET] || {}).prototype;
997
+ }
998
+ if (target) for (key in source) {
999
+ sourceProperty = source[key];
1000
+ if (options.dontCallGetSet) {
1001
+ descriptor = getOwnPropertyDescriptor$1(target, key);
1002
+ targetProperty = descriptor && descriptor.value;
1003
+ } else targetProperty = target[key];
1004
+ FORCED = isForced$1(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(sourceProperty, 'sham', true);
1013
+ }
1014
+ defineBuiltIn$2(target, key, sourceProperty, options);
1015
+ }
1016
+ };
1017
+
1018
+ var classof$3 = classofRaw$2;
1019
+ var global$8 = global$i;
1020
+
1021
+ var engineIsNode = classof$3(global$8.process) == 'process';
1022
+
1023
+ var isCallable$6 = isCallable$h;
1024
+
1025
+ var $String = String;
1026
+ var $TypeError$6 = TypeError;
1027
+
1028
+ var aPossiblePrototype$1 = function (argument) {
1029
+ if (typeof argument == 'object' || isCallable$6(argument)) return argument;
1030
+ throw $TypeError$6("Can't set " + $String(argument) + ' as a prototype');
1031
+ };
1032
+
1033
+ /* eslint-disable no-proto -- safe */
1034
+
1035
+ var uncurryThis$4 = functionUncurryThis;
1036
+ var anObject$5 = anObject$8;
1037
+ var aPossiblePrototype = aPossiblePrototype$1;
1038
+
1039
+ // `Object.setPrototypeOf` method
1040
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1041
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1042
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1043
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1044
+ var CORRECT_SETTER = false;
1045
+ var test = {};
1046
+ var setter;
1047
+ try {
1048
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1049
+ setter = uncurryThis$4(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1050
+ setter(test, []);
1051
+ CORRECT_SETTER = test instanceof Array;
1052
+ } catch (error) { /* empty */ }
1053
+ return function setPrototypeOf(O, proto) {
1054
+ anObject$5(O);
1055
+ aPossiblePrototype(proto);
1056
+ if (CORRECT_SETTER) setter(O, proto);
1057
+ else O.__proto__ = proto;
1058
+ return O;
1059
+ };
1060
+ }() : undefined);
1061
+
1062
+ var defineProperty = objectDefineProperty.f;
1063
+ var hasOwn$1 = hasOwnProperty_1;
1064
+ var wellKnownSymbol$8 = wellKnownSymbol$a;
1065
+
1066
+ var TO_STRING_TAG$2 = wellKnownSymbol$8('toStringTag');
1067
+
1068
+ var setToStringTag$1 = function (target, TAG, STATIC) {
1069
+ if (target && !STATIC) target = target.prototype;
1070
+ if (target && !hasOwn$1(target, TO_STRING_TAG$2)) {
1071
+ defineProperty(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
1072
+ }
1073
+ };
1074
+
1075
+ var getBuiltIn$4 = getBuiltIn$8;
1076
+ var definePropertyModule = objectDefineProperty;
1077
+ var wellKnownSymbol$7 = wellKnownSymbol$a;
1078
+ var DESCRIPTORS = descriptors;
1079
+
1080
+ var SPECIES$2 = wellKnownSymbol$7('species');
1081
+
1082
+ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
1083
+ var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
1084
+ var defineProperty = definePropertyModule.f;
1085
+
1086
+ if (DESCRIPTORS && Constructor && !Constructor[SPECIES$2]) {
1087
+ defineProperty(Constructor, SPECIES$2, {
1088
+ configurable: true,
1089
+ get: function () { return this; }
1090
+ });
1091
+ }
1092
+ };
1093
+
1094
+ var isPrototypeOf$1 = objectIsPrototypeOf;
1095
+
1096
+ var $TypeError$5 = TypeError;
1097
+
1098
+ var anInstance$1 = function (it, Prototype) {
1099
+ if (isPrototypeOf$1(Prototype, it)) return it;
1100
+ throw $TypeError$5('Incorrect invocation');
1101
+ };
1102
+
1103
+ var wellKnownSymbol$6 = wellKnownSymbol$a;
1104
+
1105
+ var TO_STRING_TAG$1 = wellKnownSymbol$6('toStringTag');
1106
+ var test = {};
1107
+
1108
+ test[TO_STRING_TAG$1] = 'z';
1109
+
1110
+ var toStringTagSupport = String(test) === '[object z]';
1111
+
1112
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1113
+ var isCallable$5 = isCallable$h;
1114
+ var classofRaw$1 = classofRaw$2;
1115
+ var wellKnownSymbol$5 = wellKnownSymbol$a;
1116
+
1117
+ var TO_STRING_TAG = wellKnownSymbol$5('toStringTag');
1118
+ var $Object = Object;
1119
+
1120
+ // ES3 wrong here
1121
+ var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
1122
+
1123
+ // fallback for IE11 Script Access Denied error
1124
+ var tryGet = function (it, key) {
1125
+ try {
1126
+ return it[key];
1127
+ } catch (error) { /* empty */ }
1128
+ };
1129
+
1130
+ // getting tag from ES6+ `Object.prototype.toString`
1131
+ var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1132
+ var O, tag, result;
1133
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1134
+ // @@toStringTag case
1135
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1136
+ // builtinTag case
1137
+ : CORRECT_ARGUMENTS ? classofRaw$1(O)
1138
+ // ES3 arguments fallback
1139
+ : (result = classofRaw$1(O)) == 'Object' && isCallable$5(O.callee) ? 'Arguments' : result;
1140
+ };
1141
+
1142
+ var uncurryThis$3 = functionUncurryThis;
1143
+ var fails$1 = fails$a;
1144
+ var isCallable$4 = isCallable$h;
1145
+ var classof$1 = classof$2;
1146
+ var getBuiltIn$3 = getBuiltIn$8;
1147
+ var inspectSource$1 = inspectSource$3;
1148
+
1149
+ var noop = function () { /* empty */ };
1150
+ var empty = [];
1151
+ var construct = getBuiltIn$3('Reflect', 'construct');
1152
+ var constructorRegExp = /^\s*(?:class|function)\b/;
1153
+ var exec = uncurryThis$3(constructorRegExp.exec);
1154
+ var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1155
+
1156
+ var isConstructorModern = function isConstructor(argument) {
1157
+ if (!isCallable$4(argument)) return false;
1158
+ try {
1159
+ construct(noop, empty, argument);
1160
+ return true;
1161
+ } catch (error) {
1162
+ return false;
1163
+ }
1164
+ };
1165
+
1166
+ var isConstructorLegacy = function isConstructor(argument) {
1167
+ if (!isCallable$4(argument)) return false;
1168
+ switch (classof$1(argument)) {
1169
+ case 'AsyncFunction':
1170
+ case 'GeneratorFunction':
1171
+ case 'AsyncGeneratorFunction': return false;
1172
+ }
1173
+ try {
1174
+ // we can't check .prototype since constructors produced by .bind haven't it
1175
+ // `Function#toString` throws on some built-it function in some legacy engines
1176
+ // (for example, `DOMQuad` and similar in FF41-)
1177
+ return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
1178
+ } catch (error) {
1179
+ return true;
1180
+ }
1181
+ };
1182
+
1183
+ isConstructorLegacy.sham = true;
1184
+
1185
+ // `IsConstructor` abstract operation
1186
+ // https://tc39.es/ecma262/#sec-isconstructor
1187
+ var isConstructor$1 = !construct || fails$1(function () {
1188
+ var called;
1189
+ return isConstructorModern(isConstructorModern.call)
1190
+ || !isConstructorModern(Object)
1191
+ || !isConstructorModern(function () { called = true; })
1192
+ || called;
1193
+ }) ? isConstructorLegacy : isConstructorModern;
1194
+
1195
+ var isConstructor = isConstructor$1;
1196
+ var tryToString$2 = tryToString$4;
1197
+
1198
+ var $TypeError$4 = TypeError;
1199
+
1200
+ // `Assert: IsConstructor(argument) is true`
1201
+ var aConstructor$1 = function (argument) {
1202
+ if (isConstructor(argument)) return argument;
1203
+ throw $TypeError$4(tryToString$2(argument) + ' is not a constructor');
1204
+ };
1205
+
1206
+ var anObject$4 = anObject$8;
1207
+ var aConstructor = aConstructor$1;
1208
+ var isNullOrUndefined$1 = isNullOrUndefined$4;
1209
+ var wellKnownSymbol$4 = wellKnownSymbol$a;
1210
+
1211
+ var SPECIES$1 = wellKnownSymbol$4('species');
1212
+
1213
+ // `SpeciesConstructor` abstract operation
1214
+ // https://tc39.es/ecma262/#sec-speciesconstructor
1215
+ var speciesConstructor$1 = function (O, defaultConstructor) {
1216
+ var C = anObject$4(O).constructor;
1217
+ var S;
1218
+ return C === undefined || isNullOrUndefined$1(S = anObject$4(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
1219
+ };
1220
+
1221
+ var NATIVE_BIND$1 = functionBindNative;
1222
+
1223
+ var FunctionPrototype = Function.prototype;
1224
+ var apply$1 = FunctionPrototype.apply;
1225
+ var call$7 = FunctionPrototype.call;
1226
+
1227
+ // eslint-disable-next-line es/no-reflect -- safe
1228
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$7.bind(apply$1) : function () {
1229
+ return call$7.apply(apply$1, arguments);
1230
+ });
1231
+
1232
+ var classofRaw = classofRaw$2;
1233
+ var uncurryThis$2 = functionUncurryThis;
1234
+
1235
+ var functionUncurryThisClause = function (fn) {
1236
+ // Nashorn bug:
1237
+ // https://github.com/zloirock/core-js/issues/1128
1238
+ // https://github.com/zloirock/core-js/issues/1130
1239
+ if (classofRaw(fn) === 'Function') return uncurryThis$2(fn);
1240
+ };
1241
+
1242
+ var uncurryThis$1 = functionUncurryThisClause;
1243
+ var aCallable$5 = aCallable$7;
1244
+ var NATIVE_BIND = functionBindNative;
1245
+
1246
+ var bind$4 = uncurryThis$1(uncurryThis$1.bind);
1247
+
1248
+ // optional / simple context binding
1249
+ var functionBindContext = function (fn, that) {
1250
+ aCallable$5(fn);
1251
+ return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
1252
+ return fn.apply(that, arguments);
1253
+ };
1254
+ };
1255
+
1256
+ var getBuiltIn$2 = getBuiltIn$8;
1257
+
1258
+ var html$1 = getBuiltIn$2('document', 'documentElement');
1259
+
1260
+ var uncurryThis = functionUncurryThis;
1261
+
1262
+ var arraySlice$1 = uncurryThis([].slice);
1263
+
1264
+ var $TypeError$3 = TypeError;
1265
+
1266
+ var validateArgumentsLength$1 = function (passed, required) {
1267
+ if (passed < required) throw $TypeError$3('Not enough arguments');
1268
+ return passed;
1269
+ };
1270
+
1271
+ var userAgent$2 = engineUserAgent;
1272
+
1273
+ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
1274
+
1275
+ var global$7 = global$i;
1276
+ var apply = functionApply;
1277
+ var bind$3 = functionBindContext;
1278
+ var isCallable$3 = isCallable$h;
1279
+ var hasOwn = hasOwnProperty_1;
1280
+ var fails = fails$a;
1281
+ var html = html$1;
1282
+ var arraySlice = arraySlice$1;
1283
+ var createElement = documentCreateElement;
1284
+ var validateArgumentsLength = validateArgumentsLength$1;
1285
+ var IS_IOS$1 = engineIsIos;
1286
+ var IS_NODE$3 = engineIsNode;
1287
+
1288
+ var set = global$7.setImmediate;
1289
+ var clear = global$7.clearImmediate;
1290
+ var process$2 = global$7.process;
1291
+ var Dispatch = global$7.Dispatch;
1292
+ var Function$1 = global$7.Function;
1293
+ var MessageChannel = global$7.MessageChannel;
1294
+ var String$1 = global$7.String;
1295
+ var counter = 0;
1296
+ var queue$1 = {};
1297
+ var ONREADYSTATECHANGE = 'onreadystatechange';
1298
+ var $location, defer, channel, port;
1299
+
1300
+ try {
1301
+ // Deno throws a ReferenceError on `location` access without `--location` flag
1302
+ $location = global$7.location;
1303
+ } catch (error) { /* empty */ }
1304
+
1305
+ var run = function (id) {
1306
+ if (hasOwn(queue$1, id)) {
1307
+ var fn = queue$1[id];
1308
+ delete queue$1[id];
1309
+ fn();
1310
+ }
1311
+ };
1312
+
1313
+ var runner = function (id) {
1314
+ return function () {
1315
+ run(id);
1316
+ };
1317
+ };
1318
+
1319
+ var listener = function (event) {
1320
+ run(event.data);
1321
+ };
1322
+
1323
+ var post = function (id) {
1324
+ // old engines have not location.origin
1325
+ global$7.postMessage(String$1(id), $location.protocol + '//' + $location.host);
1326
+ };
1327
+
1328
+ // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
1329
+ if (!set || !clear) {
1330
+ set = function setImmediate(handler) {
1331
+ validateArgumentsLength(arguments.length, 1);
1332
+ var fn = isCallable$3(handler) ? handler : Function$1(handler);
1333
+ var args = arraySlice(arguments, 1);
1334
+ queue$1[++counter] = function () {
1335
+ apply(fn, undefined, args);
1336
+ };
1337
+ defer(counter);
1338
+ return counter;
1339
+ };
1340
+ clear = function clearImmediate(id) {
1341
+ delete queue$1[id];
1342
+ };
1343
+ // Node.js 0.8-
1344
+ if (IS_NODE$3) {
1345
+ defer = function (id) {
1346
+ process$2.nextTick(runner(id));
1347
+ };
1348
+ // Sphere (JS game engine) Dispatch API
1349
+ } else if (Dispatch && Dispatch.now) {
1350
+ defer = function (id) {
1351
+ Dispatch.now(runner(id));
1352
+ };
1353
+ // Browsers with MessageChannel, includes WebWorkers
1354
+ // except iOS - https://github.com/zloirock/core-js/issues/624
1355
+ } else if (MessageChannel && !IS_IOS$1) {
1356
+ channel = new MessageChannel();
1357
+ port = channel.port2;
1358
+ channel.port1.onmessage = listener;
1359
+ defer = bind$3(port.postMessage, port);
1360
+ // Browsers with postMessage, skip WebWorkers
1361
+ // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
1362
+ } else if (
1363
+ global$7.addEventListener &&
1364
+ isCallable$3(global$7.postMessage) &&
1365
+ !global$7.importScripts &&
1366
+ $location && $location.protocol !== 'file:' &&
1367
+ !fails(post)
1368
+ ) {
1369
+ defer = post;
1370
+ global$7.addEventListener('message', listener, false);
1371
+ // IE8-
1372
+ } else if (ONREADYSTATECHANGE in createElement('script')) {
1373
+ defer = function (id) {
1374
+ html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
1375
+ html.removeChild(this);
1376
+ run(id);
1377
+ };
1378
+ };
1379
+ // Rest old browsers
1380
+ } else {
1381
+ defer = function (id) {
1382
+ setTimeout(runner(id), 0);
1383
+ };
1384
+ }
1385
+ }
1386
+
1387
+ var task$1 = {
1388
+ set: set,
1389
+ clear: clear
1390
+ };
1391
+
1392
+ var userAgent$1 = engineUserAgent;
1393
+ var global$6 = global$i;
1394
+
1395
+ var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$6.Pebble !== undefined;
1396
+
1397
+ var userAgent = engineUserAgent;
1398
+
1399
+ var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
1400
+
1401
+ var global$5 = global$i;
1402
+ var bind$2 = functionBindContext;
1403
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1404
+ var macrotask = task$1.set;
1405
+ var IS_IOS = engineIsIos;
1406
+ var IS_IOS_PEBBLE = engineIsIosPebble;
1407
+ var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
1408
+ var IS_NODE$2 = engineIsNode;
1409
+
1410
+ var MutationObserver = global$5.MutationObserver || global$5.WebKitMutationObserver;
1411
+ var document$2 = global$5.document;
1412
+ var process$1 = global$5.process;
1413
+ var Promise$1 = global$5.Promise;
1414
+ // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
1415
+ var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$5, 'queueMicrotask');
1416
+ var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
1417
+
1418
+ var flush, head, last, notify$1, toggle, node, promise, then;
1419
+
1420
+ // modern engines have queueMicrotask method
1421
+ if (!queueMicrotask) {
1422
+ flush = function () {
1423
+ var parent, fn;
1424
+ if (IS_NODE$2 && (parent = process$1.domain)) parent.exit();
1425
+ while (head) {
1426
+ fn = head.fn;
1427
+ head = head.next;
1428
+ try {
1429
+ fn();
1430
+ } catch (error) {
1431
+ if (head) notify$1();
1432
+ else last = undefined;
1433
+ throw error;
1434
+ }
1435
+ } last = undefined;
1436
+ if (parent) parent.enter();
1437
+ };
1438
+
1439
+ // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
1440
+ // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
1441
+ if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
1442
+ toggle = true;
1443
+ node = document$2.createTextNode('');
1444
+ new MutationObserver(flush).observe(node, { characterData: true });
1445
+ notify$1 = function () {
1446
+ node.data = toggle = !toggle;
1447
+ };
1448
+ // environments with maybe non-completely correct, but existent Promise
1449
+ } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
1450
+ // Promise.resolve without an argument throws an error in LG WebOS 2
1451
+ promise = Promise$1.resolve(undefined);
1452
+ // workaround of WebKit ~ iOS Safari 10.1 bug
1453
+ promise.constructor = Promise$1;
1454
+ then = bind$2(promise.then, promise);
1455
+ notify$1 = function () {
1456
+ then(flush);
1457
+ };
1458
+ // Node.js without promises
1459
+ } else if (IS_NODE$2) {
1460
+ notify$1 = function () {
1461
+ process$1.nextTick(flush);
1462
+ };
1463
+ // for other environments - macrotask based on:
1464
+ // - setImmediate
1465
+ // - MessageChannel
1466
+ // - window.postMessage
1467
+ // - onreadystatechange
1468
+ // - setTimeout
1469
+ } else {
1470
+ // strange IE + webpack dev server bug - use .bind(global)
1471
+ macrotask = bind$2(macrotask, global$5);
1472
+ notify$1 = function () {
1473
+ macrotask(flush);
1474
+ };
1475
+ }
1476
+ }
1477
+
1478
+ var microtask$1 = queueMicrotask || function (fn) {
1479
+ var task = { fn: fn, next: undefined };
1480
+ if (last) last.next = task;
1481
+ if (!head) {
1482
+ head = task;
1483
+ notify$1();
1484
+ } last = task;
1485
+ };
1486
+
1487
+ var global$4 = global$i;
1488
+
1489
+ var hostReportErrors$1 = function (a, b) {
1490
+ var console = global$4.console;
1491
+ if (console && console.error) {
1492
+ arguments.length == 1 ? console.error(a) : console.error(a, b);
1493
+ }
1494
+ };
1495
+
1496
+ var perform$3 = function (exec) {
1497
+ try {
1498
+ return { error: false, value: exec() };
1499
+ } catch (error) {
1500
+ return { error: true, value: error };
1501
+ }
1502
+ };
1503
+
1504
+ var Queue$1 = function () {
1505
+ this.head = null;
1506
+ this.tail = null;
1507
+ };
1508
+
1509
+ Queue$1.prototype = {
1510
+ add: function (item) {
1511
+ var entry = { item: item, next: null };
1512
+ if (this.head) this.tail.next = entry;
1513
+ else this.head = entry;
1514
+ this.tail = entry;
1515
+ },
1516
+ get: function () {
1517
+ var entry = this.head;
1518
+ if (entry) {
1519
+ this.head = entry.next;
1520
+ if (this.tail === entry) this.tail = null;
1521
+ return entry.item;
1522
+ }
1523
+ }
1524
+ };
1525
+
1526
+ var queue = Queue$1;
1527
+
1528
+ var global$3 = global$i;
1529
+
1530
+ var promiseNativeConstructor = global$3.Promise;
1531
+
1532
+ /* global Deno -- Deno case */
1533
+
1534
+ var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
1535
+
1536
+ var IS_DENO$1 = engineIsDeno;
1537
+ var IS_NODE$1 = engineIsNode;
1538
+
1539
+ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
1540
+ && typeof window == 'object'
1541
+ && typeof document == 'object';
1542
+
1543
+ var global$2 = global$i;
1544
+ var NativePromiseConstructor$3 = promiseNativeConstructor;
1545
+ var isCallable$2 = isCallable$h;
1546
+ var isForced = isForced_1;
1547
+ var inspectSource = inspectSource$3;
1548
+ var wellKnownSymbol$3 = wellKnownSymbol$a;
1549
+ var IS_BROWSER = engineIsBrowser;
1550
+ var IS_DENO = engineIsDeno;
1551
+ var V8_VERSION = engineV8Version;
1552
+
1553
+ NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
1554
+ var SPECIES = wellKnownSymbol$3('species');
1555
+ var SUBCLASSING = false;
1556
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$2(global$2.PromiseRejectionEvent);
1557
+
1558
+ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
1559
+ var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
1560
+ var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
1561
+ // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
1562
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
1563
+ // We can't detect it synchronously, so just check versions
1564
+ if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
1565
+ // We can't use @@species feature detection in V8 since it causes
1566
+ // deoptimization and performance degradation
1567
+ // https://github.com/zloirock/core-js/issues/679
1568
+ if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
1569
+ // Detect correctness of subclassing with @@species support
1570
+ var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
1571
+ var FakePromise = function (exec) {
1572
+ exec(function () { /* empty */ }, function () { /* empty */ });
1573
+ };
1574
+ var constructor = promise.constructor = {};
1575
+ constructor[SPECIES] = FakePromise;
1576
+ SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
1577
+ if (!SUBCLASSING) return true;
1578
+ // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
1579
+ } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
1580
+ });
1581
+
1582
+ var promiseConstructorDetection = {
1583
+ CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
1584
+ REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
1585
+ SUBCLASSING: SUBCLASSING
1586
+ };
1587
+
1588
+ var newPromiseCapability$2 = {};
1589
+
1590
+ var aCallable$4 = aCallable$7;
1591
+
1592
+ var $TypeError$2 = TypeError;
1593
+
1594
+ var PromiseCapability = function (C) {
1595
+ var resolve, reject;
1596
+ this.promise = new C(function ($$resolve, $$reject) {
1597
+ if (resolve !== undefined || reject !== undefined) throw $TypeError$2('Bad Promise constructor');
1598
+ resolve = $$resolve;
1599
+ reject = $$reject;
1600
+ });
1601
+ this.resolve = aCallable$4(resolve);
1602
+ this.reject = aCallable$4(reject);
1603
+ };
1604
+
1605
+ // `NewPromiseCapability` abstract operation
1606
+ // https://tc39.es/ecma262/#sec-newpromisecapability
1607
+ newPromiseCapability$2.f = function (C) {
1608
+ return new PromiseCapability(C);
1609
+ };
1610
+
1611
+ var $$5 = _export;
1612
+ var IS_NODE = engineIsNode;
1613
+ var global$1 = global$i;
1614
+ var call$6 = functionCall;
1615
+ var defineBuiltIn$1 = defineBuiltIn$3;
1616
+ var setPrototypeOf = objectSetPrototypeOf;
1617
+ var setToStringTag = setToStringTag$1;
1618
+ var setSpecies = setSpecies$1;
1619
+ var aCallable$3 = aCallable$7;
1620
+ var isCallable$1 = isCallable$h;
1621
+ var isObject$1 = isObject$7;
1622
+ var anInstance = anInstance$1;
1623
+ var speciesConstructor = speciesConstructor$1;
1624
+ var task = task$1.set;
1625
+ var microtask = microtask$1;
1626
+ var hostReportErrors = hostReportErrors$1;
1627
+ var perform$2 = perform$3;
1628
+ var Queue = queue;
1629
+ var InternalStateModule = internalState;
1630
+ var NativePromiseConstructor$2 = promiseNativeConstructor;
1631
+ var PromiseConstructorDetection = promiseConstructorDetection;
1632
+ var newPromiseCapabilityModule$3 = newPromiseCapability$2;
1633
+
1634
+ var PROMISE = 'Promise';
1635
+ var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
1636
+ var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
1637
+ var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
1638
+ var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
1639
+ var setInternalState = InternalStateModule.set;
1640
+ var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
1641
+ var PromiseConstructor = NativePromiseConstructor$2;
1642
+ var PromisePrototype = NativePromisePrototype$1;
1643
+ var TypeError$1 = global$1.TypeError;
1644
+ var document$1 = global$1.document;
1645
+ var process = global$1.process;
1646
+ var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
1647
+ var newGenericPromiseCapability = newPromiseCapability$1;
1648
+
1649
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$1.dispatchEvent);
1650
+ var UNHANDLED_REJECTION = 'unhandledrejection';
1651
+ var REJECTION_HANDLED = 'rejectionhandled';
1652
+ var PENDING = 0;
1653
+ var FULFILLED = 1;
1654
+ var REJECTED = 2;
1655
+ var HANDLED = 1;
1656
+ var UNHANDLED = 2;
1657
+
1658
+ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
1659
+
1660
+ // helpers
1661
+ var isThenable = function (it) {
1662
+ var then;
1663
+ return isObject$1(it) && isCallable$1(then = it.then) ? then : false;
1664
+ };
1665
+
1666
+ var callReaction = function (reaction, state) {
1667
+ var value = state.value;
1668
+ var ok = state.state == FULFILLED;
1669
+ var handler = ok ? reaction.ok : reaction.fail;
1670
+ var resolve = reaction.resolve;
1671
+ var reject = reaction.reject;
1672
+ var domain = reaction.domain;
1673
+ var result, then, exited;
1674
+ try {
1675
+ if (handler) {
1676
+ if (!ok) {
1677
+ if (state.rejection === UNHANDLED) onHandleUnhandled(state);
1678
+ state.rejection = HANDLED;
1679
+ }
1680
+ if (handler === true) result = value;
1681
+ else {
1682
+ if (domain) domain.enter();
1683
+ result = handler(value); // can throw
1684
+ if (domain) {
1685
+ domain.exit();
1686
+ exited = true;
1687
+ }
1688
+ }
1689
+ if (result === reaction.promise) {
1690
+ reject(TypeError$1('Promise-chain cycle'));
1691
+ } else if (then = isThenable(result)) {
1692
+ call$6(then, result, resolve, reject);
1693
+ } else resolve(result);
1694
+ } else reject(value);
1695
+ } catch (error) {
1696
+ if (domain && !exited) domain.exit();
1697
+ reject(error);
1698
+ }
1699
+ };
1700
+
1701
+ var notify = function (state, isReject) {
1702
+ if (state.notified) return;
1703
+ state.notified = true;
1704
+ microtask(function () {
1705
+ var reactions = state.reactions;
1706
+ var reaction;
1707
+ while (reaction = reactions.get()) {
1708
+ callReaction(reaction, state);
1709
+ }
1710
+ state.notified = false;
1711
+ if (isReject && !state.rejection) onUnhandled(state);
1712
+ });
1713
+ };
1714
+
1715
+ var dispatchEvent = function (name, promise, reason) {
1716
+ var event, handler;
1717
+ if (DISPATCH_EVENT) {
1718
+ event = document$1.createEvent('Event');
1719
+ event.promise = promise;
1720
+ event.reason = reason;
1721
+ event.initEvent(name, false, true);
1722
+ global$1.dispatchEvent(event);
1723
+ } else event = { promise: promise, reason: reason };
1724
+ if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$1['on' + name])) handler(event);
1725
+ else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
1726
+ };
1727
+
1728
+ var onUnhandled = function (state) {
1729
+ call$6(task, global$1, function () {
1730
+ var promise = state.facade;
1731
+ var value = state.value;
1732
+ var IS_UNHANDLED = isUnhandled(state);
1733
+ var result;
1734
+ if (IS_UNHANDLED) {
1735
+ result = perform$2(function () {
1736
+ if (IS_NODE) {
1737
+ process.emit('unhandledRejection', value, promise);
1738
+ } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
1739
+ });
1740
+ // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
1741
+ state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
1742
+ if (result.error) throw result.value;
1743
+ }
1744
+ });
1745
+ };
1746
+
1747
+ var isUnhandled = function (state) {
1748
+ return state.rejection !== HANDLED && !state.parent;
1749
+ };
1750
+
1751
+ var onHandleUnhandled = function (state) {
1752
+ call$6(task, global$1, function () {
1753
+ var promise = state.facade;
1754
+ if (IS_NODE) {
1755
+ process.emit('rejectionHandled', promise);
1756
+ } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
1757
+ });
1758
+ };
1759
+
1760
+ var bind$1 = function (fn, state, unwrap) {
1761
+ return function (value) {
1762
+ fn(state, value, unwrap);
1763
+ };
1764
+ };
1765
+
1766
+ var internalReject = function (state, value, unwrap) {
1767
+ if (state.done) return;
1768
+ state.done = true;
1769
+ if (unwrap) state = unwrap;
1770
+ state.value = value;
1771
+ state.state = REJECTED;
1772
+ notify(state, true);
1773
+ };
1774
+
1775
+ var internalResolve = function (state, value, unwrap) {
1776
+ if (state.done) return;
1777
+ state.done = true;
1778
+ if (unwrap) state = unwrap;
1779
+ try {
1780
+ if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
1781
+ var then = isThenable(value);
1782
+ if (then) {
1783
+ microtask(function () {
1784
+ var wrapper = { done: false };
1785
+ try {
1786
+ call$6(then, value,
1787
+ bind$1(internalResolve, wrapper, state),
1788
+ bind$1(internalReject, wrapper, state)
1789
+ );
1790
+ } catch (error) {
1791
+ internalReject(wrapper, error, state);
1792
+ }
1793
+ });
1794
+ } else {
1795
+ state.value = value;
1796
+ state.state = FULFILLED;
1797
+ notify(state, false);
1798
+ }
1799
+ } catch (error) {
1800
+ internalReject({ done: false }, error, state);
1801
+ }
1802
+ };
1803
+
1804
+ // constructor polyfill
1805
+ if (FORCED_PROMISE_CONSTRUCTOR$4) {
1806
+ // 25.4.3.1 Promise(executor)
1807
+ PromiseConstructor = function Promise(executor) {
1808
+ anInstance(this, PromisePrototype);
1809
+ aCallable$3(executor);
1810
+ call$6(Internal, this);
1811
+ var state = getInternalPromiseState(this);
1812
+ try {
1813
+ executor(bind$1(internalResolve, state), bind$1(internalReject, state));
1814
+ } catch (error) {
1815
+ internalReject(state, error);
1816
+ }
1817
+ };
1818
+
1819
+ PromisePrototype = PromiseConstructor.prototype;
1820
+
1821
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
1822
+ Internal = function Promise(executor) {
1823
+ setInternalState(this, {
1824
+ type: PROMISE,
1825
+ done: false,
1826
+ notified: false,
1827
+ parent: false,
1828
+ reactions: new Queue(),
1829
+ rejection: false,
1830
+ state: PENDING,
1831
+ value: undefined
1832
+ });
1833
+ };
1834
+
1835
+ // `Promise.prototype.then` method
1836
+ // https://tc39.es/ecma262/#sec-promise.prototype.then
1837
+ Internal.prototype = defineBuiltIn$1(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
1838
+ var state = getInternalPromiseState(this);
1839
+ var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
1840
+ state.parent = true;
1841
+ reaction.ok = isCallable$1(onFulfilled) ? onFulfilled : true;
1842
+ reaction.fail = isCallable$1(onRejected) && onRejected;
1843
+ reaction.domain = IS_NODE ? process.domain : undefined;
1844
+ if (state.state == PENDING) state.reactions.add(reaction);
1845
+ else microtask(function () {
1846
+ callReaction(reaction, state);
1847
+ });
1848
+ return reaction.promise;
1849
+ });
1850
+
1851
+ OwnPromiseCapability = function () {
1852
+ var promise = new Internal();
1853
+ var state = getInternalPromiseState(promise);
1854
+ this.promise = promise;
1855
+ this.resolve = bind$1(internalResolve, state);
1856
+ this.reject = bind$1(internalReject, state);
1857
+ };
1858
+
1859
+ newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
1860
+ return C === PromiseConstructor || C === PromiseWrapper
1861
+ ? new OwnPromiseCapability(C)
1862
+ : newGenericPromiseCapability(C);
1863
+ };
1864
+
1865
+ if (isCallable$1(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
1866
+ nativeThen = NativePromisePrototype$1.then;
1867
+
1868
+ if (!NATIVE_PROMISE_SUBCLASSING) {
1869
+ // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
1870
+ defineBuiltIn$1(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
1871
+ var that = this;
1872
+ return new PromiseConstructor(function (resolve, reject) {
1873
+ call$6(nativeThen, that, resolve, reject);
1874
+ }).then(onFulfilled, onRejected);
1875
+ // https://github.com/zloirock/core-js/issues/640
1876
+ }, { unsafe: true });
1877
+ }
1878
+
1879
+ // make `.constructor === Promise` work for native promise-based APIs
1880
+ try {
1881
+ delete NativePromisePrototype$1.constructor;
1882
+ } catch (error) { /* empty */ }
1883
+
1884
+ // make `instanceof Promise` work for native promise-based APIs
1885
+ if (setPrototypeOf) {
1886
+ setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
1887
+ }
1888
+ }
1889
+ }
1890
+
1891
+ $$5({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
1892
+ Promise: PromiseConstructor
1893
+ });
1894
+
1895
+ setToStringTag(PromiseConstructor, PROMISE, false);
1896
+ setSpecies(PROMISE);
1897
+
1898
+ var iterators = {};
1899
+
1900
+ var wellKnownSymbol$2 = wellKnownSymbol$a;
1901
+ var Iterators$1 = iterators;
1902
+
1903
+ var ITERATOR$2 = wellKnownSymbol$2('iterator');
1904
+ var ArrayPrototype = Array.prototype;
1905
+
1906
+ // check on default Array iterator
1907
+ var isArrayIteratorMethod$1 = function (it) {
1908
+ return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
1909
+ };
1910
+
1911
+ var classof = classof$2;
1912
+ var getMethod$1 = getMethod$3;
1913
+ var isNullOrUndefined = isNullOrUndefined$4;
1914
+ var Iterators = iterators;
1915
+ var wellKnownSymbol$1 = wellKnownSymbol$a;
1916
+
1917
+ var ITERATOR$1 = wellKnownSymbol$1('iterator');
1918
+
1919
+ var getIteratorMethod$2 = function (it) {
1920
+ if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$1)
1921
+ || getMethod$1(it, '@@iterator')
1922
+ || Iterators[classof(it)];
1923
+ };
1924
+
1925
+ var call$5 = functionCall;
1926
+ var aCallable$2 = aCallable$7;
1927
+ var anObject$3 = anObject$8;
1928
+ var tryToString$1 = tryToString$4;
1929
+ var getIteratorMethod$1 = getIteratorMethod$2;
1930
+
1931
+ var $TypeError$1 = TypeError;
1932
+
1933
+ var getIterator$1 = function (argument, usingIterator) {
1934
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
1935
+ if (aCallable$2(iteratorMethod)) return anObject$3(call$5(iteratorMethod, argument));
1936
+ throw $TypeError$1(tryToString$1(argument) + ' is not iterable');
1937
+ };
1938
+
1939
+ var call$4 = functionCall;
1940
+ var anObject$2 = anObject$8;
1941
+ var getMethod = getMethod$3;
1942
+
1943
+ var iteratorClose$1 = function (iterator, kind, value) {
1944
+ var innerResult, innerError;
1945
+ anObject$2(iterator);
1946
+ try {
1947
+ innerResult = getMethod(iterator, 'return');
1948
+ if (!innerResult) {
1949
+ if (kind === 'throw') throw value;
1950
+ return value;
1951
+ }
1952
+ innerResult = call$4(innerResult, iterator);
1953
+ } catch (error) {
1954
+ innerError = true;
1955
+ innerResult = error;
1956
+ }
1957
+ if (kind === 'throw') throw value;
1958
+ if (innerError) throw innerResult;
1959
+ anObject$2(innerResult);
1960
+ return value;
1961
+ };
1962
+
1963
+ var bind = functionBindContext;
1964
+ var call$3 = functionCall;
1965
+ var anObject$1 = anObject$8;
1966
+ var tryToString = tryToString$4;
1967
+ var isArrayIteratorMethod = isArrayIteratorMethod$1;
1968
+ var lengthOfArrayLike = lengthOfArrayLike$2;
1969
+ var isPrototypeOf = objectIsPrototypeOf;
1970
+ var getIterator = getIterator$1;
1971
+ var getIteratorMethod = getIteratorMethod$2;
1972
+ var iteratorClose = iteratorClose$1;
1973
+
1974
+ var $TypeError = TypeError;
1975
+
1976
+ var Result = function (stopped, result) {
1977
+ this.stopped = stopped;
1978
+ this.result = result;
1979
+ };
1980
+
1981
+ var ResultPrototype = Result.prototype;
1982
+
1983
+ var iterate$2 = function (iterable, unboundFunction, options) {
1984
+ var that = options && options.that;
1985
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
1986
+ var IS_RECORD = !!(options && options.IS_RECORD);
1987
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1988
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
1989
+ var fn = bind(unboundFunction, that);
1990
+ var iterator, iterFn, index, length, result, next, step;
1991
+
1992
+ var stop = function (condition) {
1993
+ if (iterator) iteratorClose(iterator, 'normal', condition);
1994
+ return new Result(true, condition);
1995
+ };
1996
+
1997
+ var callFn = function (value) {
1998
+ if (AS_ENTRIES) {
1999
+ anObject$1(value);
2000
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
2001
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
2002
+ };
2003
+
2004
+ if (IS_RECORD) {
2005
+ iterator = iterable.iterator;
2006
+ } else if (IS_ITERATOR) {
2007
+ iterator = iterable;
2008
+ } else {
2009
+ iterFn = getIteratorMethod(iterable);
2010
+ if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');
2011
+ // optimisation for array iterators
2012
+ if (isArrayIteratorMethod(iterFn)) {
2013
+ for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
2014
+ result = callFn(iterable[index]);
2015
+ if (result && isPrototypeOf(ResultPrototype, result)) return result;
2016
+ } return new Result(false);
2017
+ }
2018
+ iterator = getIterator(iterable, iterFn);
2019
+ }
2020
+
2021
+ next = IS_RECORD ? iterable.next : iterator.next;
2022
+ while (!(step = call$3(next, iterator)).done) {
2023
+ try {
2024
+ result = callFn(step.value);
2025
+ } catch (error) {
2026
+ iteratorClose(iterator, 'throw', error);
2027
+ }
2028
+ if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
2029
+ } return new Result(false);
2030
+ };
2031
+
2032
+ var wellKnownSymbol = wellKnownSymbol$a;
2033
+
2034
+ var ITERATOR = wellKnownSymbol('iterator');
2035
+ var SAFE_CLOSING = false;
2036
+
2037
+ try {
2038
+ var called = 0;
2039
+ var iteratorWithReturn = {
2040
+ next: function () {
2041
+ return { done: !!called++ };
2042
+ },
2043
+ 'return': function () {
2044
+ SAFE_CLOSING = true;
2045
+ }
2046
+ };
2047
+ iteratorWithReturn[ITERATOR] = function () {
2048
+ return this;
2049
+ };
2050
+ // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
2051
+ Array.from(iteratorWithReturn, function () { throw 2; });
2052
+ } catch (error) { /* empty */ }
2053
+
2054
+ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
2055
+ if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
2056
+ var ITERATION_SUPPORT = false;
2057
+ try {
2058
+ var object = {};
2059
+ object[ITERATOR] = function () {
2060
+ return {
2061
+ next: function () {
2062
+ return { done: ITERATION_SUPPORT = true };
2063
+ }
2064
+ };
2065
+ };
2066
+ exec(object);
2067
+ } catch (error) { /* empty */ }
2068
+ return ITERATION_SUPPORT;
2069
+ };
2070
+
2071
+ var NativePromiseConstructor$1 = promiseNativeConstructor;
2072
+ var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
2073
+ var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
2074
+
2075
+ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
2076
+ NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
2077
+ });
2078
+
2079
+ var $$4 = _export;
2080
+ var call$2 = functionCall;
2081
+ var aCallable$1 = aCallable$7;
2082
+ var newPromiseCapabilityModule$2 = newPromiseCapability$2;
2083
+ var perform$1 = perform$3;
2084
+ var iterate$1 = iterate$2;
2085
+ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
2086
+
2087
+ // `Promise.all` method
2088
+ // https://tc39.es/ecma262/#sec-promise.all
2089
+ $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
2090
+ all: function all(iterable) {
2091
+ var C = this;
2092
+ var capability = newPromiseCapabilityModule$2.f(C);
2093
+ var resolve = capability.resolve;
2094
+ var reject = capability.reject;
2095
+ var result = perform$1(function () {
2096
+ var $promiseResolve = aCallable$1(C.resolve);
2097
+ var values = [];
2098
+ var counter = 0;
2099
+ var remaining = 1;
2100
+ iterate$1(iterable, function (promise) {
2101
+ var index = counter++;
2102
+ var alreadyCalled = false;
2103
+ remaining++;
2104
+ call$2($promiseResolve, C, promise).then(function (value) {
2105
+ if (alreadyCalled) return;
2106
+ alreadyCalled = true;
2107
+ values[index] = value;
2108
+ --remaining || resolve(values);
2109
+ }, reject);
2110
+ });
2111
+ --remaining || resolve(values);
2112
+ });
2113
+ if (result.error) reject(result.value);
2114
+ return capability.promise;
2115
+ }
2116
+ });
2117
+
2118
+ var $$3 = _export;
2119
+ var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
2120
+ var NativePromiseConstructor = promiseNativeConstructor;
2121
+ var getBuiltIn$1 = getBuiltIn$8;
2122
+ var isCallable = isCallable$h;
2123
+ var defineBuiltIn = defineBuiltIn$3;
2124
+
2125
+ var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
2126
+
2127
+ // `Promise.prototype.catch` method
2128
+ // https://tc39.es/ecma262/#sec-promise.prototype.catch
2129
+ $$3({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
2130
+ 'catch': function (onRejected) {
2131
+ return this.then(undefined, onRejected);
2132
+ }
2133
+ });
2134
+
2135
+ // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
2136
+ if (isCallable(NativePromiseConstructor)) {
2137
+ var method = getBuiltIn$1('Promise').prototype['catch'];
2138
+ if (NativePromisePrototype['catch'] !== method) {
2139
+ defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
2140
+ }
2141
+ }
2142
+
2143
+ var $$2 = _export;
2144
+ var call$1 = functionCall;
2145
+ var aCallable = aCallable$7;
2146
+ var newPromiseCapabilityModule$1 = newPromiseCapability$2;
2147
+ var perform = perform$3;
2148
+ var iterate = iterate$2;
2149
+ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
2150
+
2151
+ // `Promise.race` method
2152
+ // https://tc39.es/ecma262/#sec-promise.race
2153
+ $$2({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
2154
+ race: function race(iterable) {
2155
+ var C = this;
2156
+ var capability = newPromiseCapabilityModule$1.f(C);
2157
+ var reject = capability.reject;
2158
+ var result = perform(function () {
2159
+ var $promiseResolve = aCallable(C.resolve);
2160
+ iterate(iterable, function (promise) {
2161
+ call$1($promiseResolve, C, promise).then(capability.resolve, reject);
2162
+ });
2163
+ });
2164
+ if (result.error) reject(result.value);
2165
+ return capability.promise;
2166
+ }
2167
+ });
2168
+
2169
+ var $$1 = _export;
2170
+ var call = functionCall;
2171
+ var newPromiseCapabilityModule = newPromiseCapability$2;
2172
+ var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
2173
+
2174
+ // `Promise.reject` method
2175
+ // https://tc39.es/ecma262/#sec-promise.reject
2176
+ $$1({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
2177
+ reject: function reject(r) {
2178
+ var capability = newPromiseCapabilityModule.f(this);
2179
+ call(capability.reject, undefined, r);
2180
+ return capability.promise;
2181
+ }
2182
+ });
2183
+
2184
+ var anObject = anObject$8;
2185
+ var isObject = isObject$7;
2186
+ var newPromiseCapability = newPromiseCapability$2;
2187
+
2188
+ var promiseResolve$1 = function (C, x) {
2189
+ anObject(C);
2190
+ if (isObject(x) && x.constructor === C) return x;
2191
+ var promiseCapability = newPromiseCapability.f(C);
2192
+ var resolve = promiseCapability.resolve;
2193
+ resolve(x);
2194
+ return promiseCapability.promise;
2195
+ };
2196
+
2197
+ var $ = _export;
2198
+ var getBuiltIn = getBuiltIn$8;
2199
+ var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
2200
+ var promiseResolve = promiseResolve$1;
2201
+
2202
+ getBuiltIn('Promise');
2203
+
2204
+ // `Promise.resolve` method
2205
+ // https://tc39.es/ecma262/#sec-promise.resolve
2206
+ $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2207
+ resolve: function resolve(x) {
2208
+ return promiseResolve(this, x);
2209
+ }
2210
+ });
2211
+
2212
+ /******************************************************************************
2213
+ Copyright (c) Microsoft Corporation.
2214
+
2215
+ Permission to use, copy, modify, and/or distribute this software for any
2216
+ purpose with or without fee is hereby granted.
2217
+
2218
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2219
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2220
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2221
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2222
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2223
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2224
+ PERFORMANCE OF THIS SOFTWARE.
2225
+ ***************************************************************************** */
2226
+
2227
+ function __awaiter(thisArg, _arguments, P, generator) {
2228
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2229
+ return new (P || (P = Promise))(function (resolve, reject) {
2230
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
2231
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
2232
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
2233
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
2234
+ });
2235
+ }
2236
+
2237
+ const TEMPLATE_OPTIONS = {
2238
+ interpolate: /{{([\s\S]+?)}}/g
2239
+ };
2240
+ const isGoogleAnalyticsInitialized = () => {
2241
+ return typeof window === 'object' && 'gtag' in window &&
2242
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2243
+ // @ts-ignore
2244
+ typeof window.gtag === 'function';
2245
+ };
2246
+ class NinetailedGoogleAnalyticsPlugin extends experience_jsPluginAnalytics.NinetailedAnalyticsPlugin {
2247
+ constructor(options = {}) {
2248
+ super();
2249
+ this.name = 'ninetailed:google-analytics';
2250
+ this.actionTemplate = template__default["default"](options.actionTemplate || 'Has Seen Component - Audience:{{ audience.id }}', TEMPLATE_OPTIONS);
2251
+ this.labelTemplate = template__default["default"](options.labelTemplate || '{{ baselineOrVariant }}:{{ component.id }}', TEMPLATE_OPTIONS);
2252
+ }
2253
+ onTrackExperience(properties) {
2254
+ return Promise.resolve();
2255
+ }
2256
+ onTrackComponent(properties) {
2257
+ return __awaiter(this, void 0, void 0, function* () {
2258
+ if (!isGoogleAnalyticsInitialized()) {
2259
+ return;
2260
+ }
2261
+ const {
2262
+ variant,
2263
+ audience,
2264
+ isPersonalized
2265
+ } = properties;
2266
+ const action = this.actionTemplate({
2267
+ component: variant,
2268
+ audience
2269
+ });
2270
+ const label = this.labelTemplate({
2271
+ component: variant,
2272
+ audience,
2273
+ baselineOrVariant: isPersonalized ? 'Variant' : 'Baseline'
2274
+ });
2275
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2276
+ // @ts-ignore
2277
+ window.gtag('event', action, {
2278
+ category: 'Ninetailed',
2279
+ label,
2280
+ nonInteraction: true
2281
+ });
2282
+ });
2283
+ }
2284
+ }
2285
+
2286
+ exports.NinetailedGoogleAnalyticsPlugin = NinetailedGoogleAnalyticsPlugin;
2287
+ exports["default"] = NinetailedGoogleAnalyticsPlugin;