@trackunit/react-core-contexts-test 0.1.12 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/HookRenderer.js +16 -22
  2. package/index2.js +297 -2644
  3. package/package.json +4 -4
package/index2.js CHANGED
@@ -9,2283 +9,6 @@ import { onError } from '@apollo/client/link/error';
9
9
  import { MockLink, MockedProvider } from '@apollo/client/testing';
10
10
  import { GraphQLError } from 'graphql';
11
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$b = function (exec) {
32
- try {
33
- return !!exec();
34
- } catch (error) {
35
- return true;
36
- }
37
- };
38
-
39
- var fails$a = fails$b;
40
-
41
- // Detect IE8's incomplete defineProperty implementation
42
- var descriptors = !fails$a(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$9 = fails$b;
48
-
49
- var functionBindNative = !fails$9(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$d = Function.prototype.call;
59
-
60
- var functionCall = NATIVE_BIND$3 ? call$d.bind(call$d) : function () {
61
- return call$d.apply(call$d, 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$c = FunctionPrototype$2.call;
93
- var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$c, call$c);
94
-
95
- var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
96
- return function () {
97
- return call$c.apply(fn, arguments);
98
- };
99
- };
100
-
101
- var uncurryThis$d = functionUncurryThis;
102
-
103
- var toString$1 = uncurryThis$d({}.toString);
104
- var stringSlice = uncurryThis$d(''.slice);
105
-
106
- var classofRaw$2 = function (it) {
107
- return stringSlice(toString$1(it), 8, -1);
108
- };
109
-
110
- var uncurryThis$c = functionUncurryThis;
111
- var fails$8 = fails$b;
112
- var classof$4 = classofRaw$2;
113
-
114
- var $Object$3 = Object;
115
- var split = uncurryThis$c(''.split);
116
-
117
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
118
- var indexedObject = fails$8(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$1 = indexedObject;
145
- var requireObjectCoercible$1 = requireObjectCoercible$2;
146
-
147
- var toIndexedObject$3 = function (it) {
148
- return IndexedObject$1(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$b = functionUncurryThis;
196
-
197
- var objectIsPrototypeOf = uncurryThis$b({}.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$4 = global$g.process;
207
- var Deno$1 = global$g.Deno;
208
- var versions = process$4 && process$4.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$7 = fails$b;
235
-
236
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
237
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$7(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$b = 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$b(fn, input))) return val;
310
- if (isCallable$c(fn = input.valueOf) && !isObject$6(val = call$b(fn, input))) return val;
311
- if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$6(val = call$b(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$3 = Object.defineProperty;
321
-
322
- var defineGlobalProperty$3 = function (key, value) {
323
- try {
324
- defineProperty$3(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$2 = function (argument) {
357
- return $Object$1(requireObjectCoercible(argument));
358
- };
359
-
360
- var uncurryThis$a = functionUncurryThis;
361
- var toObject$1 = toObject$2;
362
-
363
- var hasOwnProperty = uncurryThis$a({}.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$1(it), key);
370
- };
371
-
372
- var uncurryThis$9 = functionUncurryThis;
373
-
374
- var id = 0;
375
- var postfix = Math.random();
376
- var toString = uncurryThis$9(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$a = 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$a(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$8 = descriptors;
455
- var fails$6 = fails$b;
456
- var createElement$1 = documentCreateElement;
457
-
458
- // Thanks to IE8 for its funny defineProperty
459
- var ie8DomDefine = !DESCRIPTORS$8 && !fails$6(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$7 = descriptors;
467
- var call$9 = functionCall;
468
- var propertyIsEnumerableModule$1 = 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$7 ? $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$9(propertyIsEnumerableModule$1.f, O, P), O[P]);
487
- };
488
-
489
- var objectDefineProperty = {};
490
-
491
- var DESCRIPTORS$6 = descriptors;
492
- var fails$5 = fails$b;
493
-
494
- // V8 ~ Chrome 36-
495
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
496
- var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$5(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$5 = 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$5 ? 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$4 = descriptors;
560
- var definePropertyModule$3 = objectDefineProperty;
561
- var createPropertyDescriptor = createPropertyDescriptor$2;
562
-
563
- var createNonEnumerableProperty$2 = DESCRIPTORS$4 ? 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$3 = 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$3 && 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$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype$1, 'name').configurable));
583
-
584
- var functionName = {
585
- EXISTS: EXISTS,
586
- PROPER: PROPER,
587
- CONFIGURABLE: CONFIGURABLE
588
- };
589
-
590
- var uncurryThis$8 = functionUncurryThis;
591
- var isCallable$b = isCallable$h;
592
- var store$1 = sharedStore;
593
-
594
- var functionToString = uncurryThis$8(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$4 = fails$b;
695
- var isCallable$9 = isCallable$h;
696
- var hasOwn$4 = hasOwnProperty_1;
697
- var DESCRIPTORS$2 = 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$2 = Object.defineProperty;
706
-
707
- var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$4(function () {
708
- return defineProperty$2(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$2) defineProperty$2(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$2(value, 'length', { value: options.arity });
725
- }
726
- try {
727
- if (options && hasOwn$4(options, 'constructor') && options.constructor) {
728
- if (DESCRIPTORS$2) defineProperty$2(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$7 = 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$7([].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$2 = [
882
- 'constructor',
883
- 'hasOwnProperty',
884
- 'isPrototypeOf',
885
- 'propertyIsEnumerable',
886
- 'toLocaleString',
887
- 'toString',
888
- 'valueOf'
889
- ];
890
-
891
- var internalObjectKeys$1 = objectKeysInternal;
892
- var enumBugKeys$1 = enumBugKeys$2;
893
-
894
- var hiddenKeys = enumBugKeys$1.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$1(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$6 = functionUncurryThis;
910
- var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
911
- var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
912
- var anObject$6 = anObject$8;
913
-
914
- var concat$1 = uncurryThis$6([].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$1.f;
920
- return getOwnPropertySymbols ? concat$1(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$3 = fails$b;
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$3(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 internalObjectKeys = objectKeysInternal;
1019
- var enumBugKeys = enumBugKeys$2;
1020
-
1021
- // `Object.keys` method
1022
- // https://tc39.es/ecma262/#sec-object.keys
1023
- // eslint-disable-next-line es/no-object-keys -- safe
1024
- var objectKeys$1 = Object.keys || function keys(O) {
1025
- return internalObjectKeys(O, enumBugKeys);
1026
- };
1027
-
1028
- var DESCRIPTORS$1 = descriptors;
1029
- var uncurryThis$5 = functionUncurryThis;
1030
- var call$8 = functionCall;
1031
- var fails$2 = fails$b;
1032
- var objectKeys = objectKeys$1;
1033
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1034
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1035
- var toObject = toObject$2;
1036
- var IndexedObject = indexedObject;
1037
-
1038
- // eslint-disable-next-line es/no-object-assign -- safe
1039
- var $assign = Object.assign;
1040
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1041
- var defineProperty$1 = Object.defineProperty;
1042
- var concat = uncurryThis$5([].concat);
1043
-
1044
- // `Object.assign` method
1045
- // https://tc39.es/ecma262/#sec-object.assign
1046
- var objectAssign = !$assign || fails$2(function () {
1047
- // should have correct order of operations (Edge bug)
1048
- if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', {
1049
- enumerable: true,
1050
- get: function () {
1051
- defineProperty$1(this, 'b', {
1052
- value: 3,
1053
- enumerable: false
1054
- });
1055
- }
1056
- }), { b: 2 })).b !== 1) return true;
1057
- // should work with symbols and should have deterministic property order (V8 bug)
1058
- var A = {};
1059
- var B = {};
1060
- // eslint-disable-next-line es/no-symbol -- safe
1061
- var symbol = Symbol();
1062
- var alphabet = 'abcdefghijklmnopqrst';
1063
- A[symbol] = 7;
1064
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1065
- return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
1066
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1067
- var T = toObject(target);
1068
- var argumentsLength = arguments.length;
1069
- var index = 1;
1070
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1071
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
1072
- while (argumentsLength > index) {
1073
- var S = IndexedObject(arguments[index++]);
1074
- var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1075
- var length = keys.length;
1076
- var j = 0;
1077
- var key;
1078
- while (length > j) {
1079
- key = keys[j++];
1080
- if (!DESCRIPTORS$1 || call$8(propertyIsEnumerable, S, key)) T[key] = S[key];
1081
- }
1082
- } return T;
1083
- } : $assign;
1084
-
1085
- var $$6 = _export;
1086
- var assign = objectAssign;
1087
-
1088
- // `Object.assign` method
1089
- // https://tc39.es/ecma262/#sec-object.assign
1090
- // eslint-disable-next-line es/no-object-assign -- required for testing
1091
- $$6({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1092
- assign: assign
1093
- });
1094
-
1095
- var classof$3 = classofRaw$2;
1096
- var global$8 = global$i;
1097
-
1098
- var engineIsNode = classof$3(global$8.process) == 'process';
1099
-
1100
- var isCallable$6 = isCallable$h;
1101
-
1102
- var $String = String;
1103
- var $TypeError$6 = TypeError;
1104
-
1105
- var aPossiblePrototype$1 = function (argument) {
1106
- if (typeof argument == 'object' || isCallable$6(argument)) return argument;
1107
- throw $TypeError$6("Can't set " + $String(argument) + ' as a prototype');
1108
- };
1109
-
1110
- /* eslint-disable no-proto -- safe */
1111
-
1112
- var uncurryThis$4 = functionUncurryThis;
1113
- var anObject$5 = anObject$8;
1114
- var aPossiblePrototype = aPossiblePrototype$1;
1115
-
1116
- // `Object.setPrototypeOf` method
1117
- // https://tc39.es/ecma262/#sec-object.setprototypeof
1118
- // Works with __proto__ only. Old v8 can't work with null proto objects.
1119
- // eslint-disable-next-line es/no-object-setprototypeof -- safe
1120
- var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1121
- var CORRECT_SETTER = false;
1122
- var test = {};
1123
- var setter;
1124
- try {
1125
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1126
- setter = uncurryThis$4(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1127
- setter(test, []);
1128
- CORRECT_SETTER = test instanceof Array;
1129
- } catch (error) { /* empty */ }
1130
- return function setPrototypeOf(O, proto) {
1131
- anObject$5(O);
1132
- aPossiblePrototype(proto);
1133
- if (CORRECT_SETTER) setter(O, proto);
1134
- else O.__proto__ = proto;
1135
- return O;
1136
- };
1137
- }() : undefined);
1138
-
1139
- var defineProperty = objectDefineProperty.f;
1140
- var hasOwn$1 = hasOwnProperty_1;
1141
- var wellKnownSymbol$8 = wellKnownSymbol$a;
1142
-
1143
- var TO_STRING_TAG$2 = wellKnownSymbol$8('toStringTag');
1144
-
1145
- var setToStringTag$1 = function (target, TAG, STATIC) {
1146
- if (target && !STATIC) target = target.prototype;
1147
- if (target && !hasOwn$1(target, TO_STRING_TAG$2)) {
1148
- defineProperty(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
1149
- }
1150
- };
1151
-
1152
- var getBuiltIn$4 = getBuiltIn$8;
1153
- var definePropertyModule = objectDefineProperty;
1154
- var wellKnownSymbol$7 = wellKnownSymbol$a;
1155
- var DESCRIPTORS = descriptors;
1156
-
1157
- var SPECIES$2 = wellKnownSymbol$7('species');
1158
-
1159
- var setSpecies$1 = function (CONSTRUCTOR_NAME) {
1160
- var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
1161
- var defineProperty = definePropertyModule.f;
1162
-
1163
- if (DESCRIPTORS && Constructor && !Constructor[SPECIES$2]) {
1164
- defineProperty(Constructor, SPECIES$2, {
1165
- configurable: true,
1166
- get: function () { return this; }
1167
- });
1168
- }
1169
- };
1170
-
1171
- var isPrototypeOf$1 = objectIsPrototypeOf;
1172
-
1173
- var $TypeError$5 = TypeError;
1174
-
1175
- var anInstance$1 = function (it, Prototype) {
1176
- if (isPrototypeOf$1(Prototype, it)) return it;
1177
- throw $TypeError$5('Incorrect invocation');
1178
- };
1179
-
1180
- var wellKnownSymbol$6 = wellKnownSymbol$a;
1181
-
1182
- var TO_STRING_TAG$1 = wellKnownSymbol$6('toStringTag');
1183
- var test = {};
1184
-
1185
- test[TO_STRING_TAG$1] = 'z';
1186
-
1187
- var toStringTagSupport = String(test) === '[object z]';
1188
-
1189
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1190
- var isCallable$5 = isCallable$h;
1191
- var classofRaw$1 = classofRaw$2;
1192
- var wellKnownSymbol$5 = wellKnownSymbol$a;
1193
-
1194
- var TO_STRING_TAG = wellKnownSymbol$5('toStringTag');
1195
- var $Object = Object;
1196
-
1197
- // ES3 wrong here
1198
- var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
1199
-
1200
- // fallback for IE11 Script Access Denied error
1201
- var tryGet = function (it, key) {
1202
- try {
1203
- return it[key];
1204
- } catch (error) { /* empty */ }
1205
- };
1206
-
1207
- // getting tag from ES6+ `Object.prototype.toString`
1208
- var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1209
- var O, tag, result;
1210
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1211
- // @@toStringTag case
1212
- : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1213
- // builtinTag case
1214
- : CORRECT_ARGUMENTS ? classofRaw$1(O)
1215
- // ES3 arguments fallback
1216
- : (result = classofRaw$1(O)) == 'Object' && isCallable$5(O.callee) ? 'Arguments' : result;
1217
- };
1218
-
1219
- var uncurryThis$3 = functionUncurryThis;
1220
- var fails$1 = fails$b;
1221
- var isCallable$4 = isCallable$h;
1222
- var classof$1 = classof$2;
1223
- var getBuiltIn$3 = getBuiltIn$8;
1224
- var inspectSource$1 = inspectSource$3;
1225
-
1226
- var noop = function () { /* empty */ };
1227
- var empty = [];
1228
- var construct = getBuiltIn$3('Reflect', 'construct');
1229
- var constructorRegExp = /^\s*(?:class|function)\b/;
1230
- var exec = uncurryThis$3(constructorRegExp.exec);
1231
- var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1232
-
1233
- var isConstructorModern = function isConstructor(argument) {
1234
- if (!isCallable$4(argument)) return false;
1235
- try {
1236
- construct(noop, empty, argument);
1237
- return true;
1238
- } catch (error) {
1239
- return false;
1240
- }
1241
- };
1242
-
1243
- var isConstructorLegacy = function isConstructor(argument) {
1244
- if (!isCallable$4(argument)) return false;
1245
- switch (classof$1(argument)) {
1246
- case 'AsyncFunction':
1247
- case 'GeneratorFunction':
1248
- case 'AsyncGeneratorFunction': return false;
1249
- }
1250
- try {
1251
- // we can't check .prototype since constructors produced by .bind haven't it
1252
- // `Function#toString` throws on some built-it function in some legacy engines
1253
- // (for example, `DOMQuad` and similar in FF41-)
1254
- return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
1255
- } catch (error) {
1256
- return true;
1257
- }
1258
- };
1259
-
1260
- isConstructorLegacy.sham = true;
1261
-
1262
- // `IsConstructor` abstract operation
1263
- // https://tc39.es/ecma262/#sec-isconstructor
1264
- var isConstructor$1 = !construct || fails$1(function () {
1265
- var called;
1266
- return isConstructorModern(isConstructorModern.call)
1267
- || !isConstructorModern(Object)
1268
- || !isConstructorModern(function () { called = true; })
1269
- || called;
1270
- }) ? isConstructorLegacy : isConstructorModern;
1271
-
1272
- var isConstructor = isConstructor$1;
1273
- var tryToString$2 = tryToString$4;
1274
-
1275
- var $TypeError$4 = TypeError;
1276
-
1277
- // `Assert: IsConstructor(argument) is true`
1278
- var aConstructor$1 = function (argument) {
1279
- if (isConstructor(argument)) return argument;
1280
- throw $TypeError$4(tryToString$2(argument) + ' is not a constructor');
1281
- };
1282
-
1283
- var anObject$4 = anObject$8;
1284
- var aConstructor = aConstructor$1;
1285
- var isNullOrUndefined$1 = isNullOrUndefined$4;
1286
- var wellKnownSymbol$4 = wellKnownSymbol$a;
1287
-
1288
- var SPECIES$1 = wellKnownSymbol$4('species');
1289
-
1290
- // `SpeciesConstructor` abstract operation
1291
- // https://tc39.es/ecma262/#sec-speciesconstructor
1292
- var speciesConstructor$1 = function (O, defaultConstructor) {
1293
- var C = anObject$4(O).constructor;
1294
- var S;
1295
- return C === undefined || isNullOrUndefined$1(S = anObject$4(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
1296
- };
1297
-
1298
- var NATIVE_BIND$1 = functionBindNative;
1299
-
1300
- var FunctionPrototype = Function.prototype;
1301
- var apply$1 = FunctionPrototype.apply;
1302
- var call$7 = FunctionPrototype.call;
1303
-
1304
- // eslint-disable-next-line es/no-reflect -- safe
1305
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$7.bind(apply$1) : function () {
1306
- return call$7.apply(apply$1, arguments);
1307
- });
1308
-
1309
- var classofRaw = classofRaw$2;
1310
- var uncurryThis$2 = functionUncurryThis;
1311
-
1312
- var functionUncurryThisClause = function (fn) {
1313
- // Nashorn bug:
1314
- // https://github.com/zloirock/core-js/issues/1128
1315
- // https://github.com/zloirock/core-js/issues/1130
1316
- if (classofRaw(fn) === 'Function') return uncurryThis$2(fn);
1317
- };
1318
-
1319
- var uncurryThis$1 = functionUncurryThisClause;
1320
- var aCallable$5 = aCallable$7;
1321
- var NATIVE_BIND = functionBindNative;
1322
-
1323
- var bind$4 = uncurryThis$1(uncurryThis$1.bind);
1324
-
1325
- // optional / simple context binding
1326
- var functionBindContext = function (fn, that) {
1327
- aCallable$5(fn);
1328
- return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
1329
- return fn.apply(that, arguments);
1330
- };
1331
- };
1332
-
1333
- var getBuiltIn$2 = getBuiltIn$8;
1334
-
1335
- var html$1 = getBuiltIn$2('document', 'documentElement');
1336
-
1337
- var uncurryThis = functionUncurryThis;
1338
-
1339
- var arraySlice$1 = uncurryThis([].slice);
1340
-
1341
- var $TypeError$3 = TypeError;
1342
-
1343
- var validateArgumentsLength$1 = function (passed, required) {
1344
- if (passed < required) throw $TypeError$3('Not enough arguments');
1345
- return passed;
1346
- };
1347
-
1348
- var userAgent$2 = engineUserAgent;
1349
-
1350
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
1351
-
1352
- var global$7 = global$i;
1353
- var apply = functionApply;
1354
- var bind$3 = functionBindContext;
1355
- var isCallable$3 = isCallable$h;
1356
- var hasOwn = hasOwnProperty_1;
1357
- var fails = fails$b;
1358
- var html = html$1;
1359
- var arraySlice = arraySlice$1;
1360
- var createElement = documentCreateElement;
1361
- var validateArgumentsLength = validateArgumentsLength$1;
1362
- var IS_IOS$1 = engineIsIos;
1363
- var IS_NODE$3 = engineIsNode;
1364
-
1365
- var set = global$7.setImmediate;
1366
- var clear = global$7.clearImmediate;
1367
- var process$3 = global$7.process;
1368
- var Dispatch = global$7.Dispatch;
1369
- var Function$1 = global$7.Function;
1370
- var MessageChannel = global$7.MessageChannel;
1371
- var String$1 = global$7.String;
1372
- var counter = 0;
1373
- var queue$1 = {};
1374
- var ONREADYSTATECHANGE = 'onreadystatechange';
1375
- var $location, defer, channel, port;
1376
-
1377
- try {
1378
- // Deno throws a ReferenceError on `location` access without `--location` flag
1379
- $location = global$7.location;
1380
- } catch (error) { /* empty */ }
1381
-
1382
- var run = function (id) {
1383
- if (hasOwn(queue$1, id)) {
1384
- var fn = queue$1[id];
1385
- delete queue$1[id];
1386
- fn();
1387
- }
1388
- };
1389
-
1390
- var runner = function (id) {
1391
- return function () {
1392
- run(id);
1393
- };
1394
- };
1395
-
1396
- var listener = function (event) {
1397
- run(event.data);
1398
- };
1399
-
1400
- var post = function (id) {
1401
- // old engines have not location.origin
1402
- global$7.postMessage(String$1(id), $location.protocol + '//' + $location.host);
1403
- };
1404
-
1405
- // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
1406
- if (!set || !clear) {
1407
- set = function setImmediate(handler) {
1408
- validateArgumentsLength(arguments.length, 1);
1409
- var fn = isCallable$3(handler) ? handler : Function$1(handler);
1410
- var args = arraySlice(arguments, 1);
1411
- queue$1[++counter] = function () {
1412
- apply(fn, undefined, args);
1413
- };
1414
- defer(counter);
1415
- return counter;
1416
- };
1417
- clear = function clearImmediate(id) {
1418
- delete queue$1[id];
1419
- };
1420
- // Node.js 0.8-
1421
- if (IS_NODE$3) {
1422
- defer = function (id) {
1423
- process$3.nextTick(runner(id));
1424
- };
1425
- // Sphere (JS game engine) Dispatch API
1426
- } else if (Dispatch && Dispatch.now) {
1427
- defer = function (id) {
1428
- Dispatch.now(runner(id));
1429
- };
1430
- // Browsers with MessageChannel, includes WebWorkers
1431
- // except iOS - https://github.com/zloirock/core-js/issues/624
1432
- } else if (MessageChannel && !IS_IOS$1) {
1433
- channel = new MessageChannel();
1434
- port = channel.port2;
1435
- channel.port1.onmessage = listener;
1436
- defer = bind$3(port.postMessage, port);
1437
- // Browsers with postMessage, skip WebWorkers
1438
- // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
1439
- } else if (
1440
- global$7.addEventListener &&
1441
- isCallable$3(global$7.postMessage) &&
1442
- !global$7.importScripts &&
1443
- $location && $location.protocol !== 'file:' &&
1444
- !fails(post)
1445
- ) {
1446
- defer = post;
1447
- global$7.addEventListener('message', listener, false);
1448
- // IE8-
1449
- } else if (ONREADYSTATECHANGE in createElement('script')) {
1450
- defer = function (id) {
1451
- html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
1452
- html.removeChild(this);
1453
- run(id);
1454
- };
1455
- };
1456
- // Rest old browsers
1457
- } else {
1458
- defer = function (id) {
1459
- setTimeout(runner(id), 0);
1460
- };
1461
- }
1462
- }
1463
-
1464
- var task$1 = {
1465
- set: set,
1466
- clear: clear
1467
- };
1468
-
1469
- var userAgent$1 = engineUserAgent;
1470
- var global$6 = global$i;
1471
-
1472
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$6.Pebble !== undefined;
1473
-
1474
- var userAgent = engineUserAgent;
1475
-
1476
- var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
1477
-
1478
- var global$5 = global$i;
1479
- var bind$2 = functionBindContext;
1480
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1481
- var macrotask = task$1.set;
1482
- var IS_IOS = engineIsIos;
1483
- var IS_IOS_PEBBLE = engineIsIosPebble;
1484
- var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
1485
- var IS_NODE$2 = engineIsNode;
1486
-
1487
- var MutationObserver = global$5.MutationObserver || global$5.WebKitMutationObserver;
1488
- var document$2 = global$5.document;
1489
- var process$2 = global$5.process;
1490
- var Promise$1 = global$5.Promise;
1491
- // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
1492
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$5, 'queueMicrotask');
1493
- var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
1494
-
1495
- var flush, head, last, notify$1, toggle, node, promise, then;
1496
-
1497
- // modern engines have queueMicrotask method
1498
- if (!queueMicrotask) {
1499
- flush = function () {
1500
- var parent, fn;
1501
- if (IS_NODE$2 && (parent = process$2.domain)) parent.exit();
1502
- while (head) {
1503
- fn = head.fn;
1504
- head = head.next;
1505
- try {
1506
- fn();
1507
- } catch (error) {
1508
- if (head) notify$1();
1509
- else last = undefined;
1510
- throw error;
1511
- }
1512
- } last = undefined;
1513
- if (parent) parent.enter();
1514
- };
1515
-
1516
- // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
1517
- // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
1518
- if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
1519
- toggle = true;
1520
- node = document$2.createTextNode('');
1521
- new MutationObserver(flush).observe(node, { characterData: true });
1522
- notify$1 = function () {
1523
- node.data = toggle = !toggle;
1524
- };
1525
- // environments with maybe non-completely correct, but existent Promise
1526
- } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
1527
- // Promise.resolve without an argument throws an error in LG WebOS 2
1528
- promise = Promise$1.resolve(undefined);
1529
- // workaround of WebKit ~ iOS Safari 10.1 bug
1530
- promise.constructor = Promise$1;
1531
- then = bind$2(promise.then, promise);
1532
- notify$1 = function () {
1533
- then(flush);
1534
- };
1535
- // Node.js without promises
1536
- } else if (IS_NODE$2) {
1537
- notify$1 = function () {
1538
- process$2.nextTick(flush);
1539
- };
1540
- // for other environments - macrotask based on:
1541
- // - setImmediate
1542
- // - MessageChannel
1543
- // - window.postMessage
1544
- // - onreadystatechange
1545
- // - setTimeout
1546
- } else {
1547
- // strange IE + webpack dev server bug - use .bind(global)
1548
- macrotask = bind$2(macrotask, global$5);
1549
- notify$1 = function () {
1550
- macrotask(flush);
1551
- };
1552
- }
1553
- }
1554
-
1555
- var microtask$1 = queueMicrotask || function (fn) {
1556
- var task = { fn: fn, next: undefined };
1557
- if (last) last.next = task;
1558
- if (!head) {
1559
- head = task;
1560
- notify$1();
1561
- } last = task;
1562
- };
1563
-
1564
- var global$4 = global$i;
1565
-
1566
- var hostReportErrors$1 = function (a, b) {
1567
- var console = global$4.console;
1568
- if (console && console.error) {
1569
- arguments.length == 1 ? console.error(a) : console.error(a, b);
1570
- }
1571
- };
1572
-
1573
- var perform$3 = function (exec) {
1574
- try {
1575
- return { error: false, value: exec() };
1576
- } catch (error) {
1577
- return { error: true, value: error };
1578
- }
1579
- };
1580
-
1581
- var Queue$1 = function () {
1582
- this.head = null;
1583
- this.tail = null;
1584
- };
1585
-
1586
- Queue$1.prototype = {
1587
- add: function (item) {
1588
- var entry = { item: item, next: null };
1589
- if (this.head) this.tail.next = entry;
1590
- else this.head = entry;
1591
- this.tail = entry;
1592
- },
1593
- get: function () {
1594
- var entry = this.head;
1595
- if (entry) {
1596
- this.head = entry.next;
1597
- if (this.tail === entry) this.tail = null;
1598
- return entry.item;
1599
- }
1600
- }
1601
- };
1602
-
1603
- var queue = Queue$1;
1604
-
1605
- var global$3 = global$i;
1606
-
1607
- var promiseNativeConstructor = global$3.Promise;
1608
-
1609
- /* global Deno -- Deno case */
1610
-
1611
- var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
1612
-
1613
- var IS_DENO$1 = engineIsDeno;
1614
- var IS_NODE$1 = engineIsNode;
1615
-
1616
- var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
1617
- && typeof window == 'object'
1618
- && typeof document == 'object';
1619
-
1620
- var global$2 = global$i;
1621
- var NativePromiseConstructor$3 = promiseNativeConstructor;
1622
- var isCallable$2 = isCallable$h;
1623
- var isForced = isForced_1;
1624
- var inspectSource = inspectSource$3;
1625
- var wellKnownSymbol$3 = wellKnownSymbol$a;
1626
- var IS_BROWSER = engineIsBrowser;
1627
- var IS_DENO = engineIsDeno;
1628
- var V8_VERSION = engineV8Version;
1629
-
1630
- NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
1631
- var SPECIES = wellKnownSymbol$3('species');
1632
- var SUBCLASSING = false;
1633
- var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$2(global$2.PromiseRejectionEvent);
1634
-
1635
- var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
1636
- var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
1637
- var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
1638
- // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
1639
- // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
1640
- // We can't detect it synchronously, so just check versions
1641
- if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
1642
- // We can't use @@species feature detection in V8 since it causes
1643
- // deoptimization and performance degradation
1644
- // https://github.com/zloirock/core-js/issues/679
1645
- if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
1646
- // Detect correctness of subclassing with @@species support
1647
- var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
1648
- var FakePromise = function (exec) {
1649
- exec(function () { /* empty */ }, function () { /* empty */ });
1650
- };
1651
- var constructor = promise.constructor = {};
1652
- constructor[SPECIES] = FakePromise;
1653
- SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
1654
- if (!SUBCLASSING) return true;
1655
- // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
1656
- } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
1657
- });
1658
-
1659
- var promiseConstructorDetection = {
1660
- CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
1661
- REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
1662
- SUBCLASSING: SUBCLASSING
1663
- };
1664
-
1665
- var newPromiseCapability$2 = {};
1666
-
1667
- var aCallable$4 = aCallable$7;
1668
-
1669
- var $TypeError$2 = TypeError;
1670
-
1671
- var PromiseCapability = function (C) {
1672
- var resolve, reject;
1673
- this.promise = new C(function ($$resolve, $$reject) {
1674
- if (resolve !== undefined || reject !== undefined) throw $TypeError$2('Bad Promise constructor');
1675
- resolve = $$resolve;
1676
- reject = $$reject;
1677
- });
1678
- this.resolve = aCallable$4(resolve);
1679
- this.reject = aCallable$4(reject);
1680
- };
1681
-
1682
- // `NewPromiseCapability` abstract operation
1683
- // https://tc39.es/ecma262/#sec-newpromisecapability
1684
- newPromiseCapability$2.f = function (C) {
1685
- return new PromiseCapability(C);
1686
- };
1687
-
1688
- var $$5 = _export;
1689
- var IS_NODE = engineIsNode;
1690
- var global$1 = global$i;
1691
- var call$6 = functionCall;
1692
- var defineBuiltIn$1 = defineBuiltIn$3;
1693
- var setPrototypeOf = objectSetPrototypeOf;
1694
- var setToStringTag = setToStringTag$1;
1695
- var setSpecies = setSpecies$1;
1696
- var aCallable$3 = aCallable$7;
1697
- var isCallable$1 = isCallable$h;
1698
- var isObject$1 = isObject$7;
1699
- var anInstance = anInstance$1;
1700
- var speciesConstructor = speciesConstructor$1;
1701
- var task = task$1.set;
1702
- var microtask = microtask$1;
1703
- var hostReportErrors = hostReportErrors$1;
1704
- var perform$2 = perform$3;
1705
- var Queue = queue;
1706
- var InternalStateModule = internalState;
1707
- var NativePromiseConstructor$2 = promiseNativeConstructor;
1708
- var PromiseConstructorDetection = promiseConstructorDetection;
1709
- var newPromiseCapabilityModule$3 = newPromiseCapability$2;
1710
-
1711
- var PROMISE = 'Promise';
1712
- var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
1713
- var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
1714
- var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
1715
- var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
1716
- var setInternalState = InternalStateModule.set;
1717
- var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
1718
- var PromiseConstructor = NativePromiseConstructor$2;
1719
- var PromisePrototype = NativePromisePrototype$1;
1720
- var TypeError$1 = global$1.TypeError;
1721
- var document$1 = global$1.document;
1722
- var process$1 = global$1.process;
1723
- var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
1724
- var newGenericPromiseCapability = newPromiseCapability$1;
1725
-
1726
- var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$1.dispatchEvent);
1727
- var UNHANDLED_REJECTION = 'unhandledrejection';
1728
- var REJECTION_HANDLED = 'rejectionhandled';
1729
- var PENDING = 0;
1730
- var FULFILLED = 1;
1731
- var REJECTED = 2;
1732
- var HANDLED = 1;
1733
- var UNHANDLED = 2;
1734
-
1735
- var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
1736
-
1737
- // helpers
1738
- var isThenable = function (it) {
1739
- var then;
1740
- return isObject$1(it) && isCallable$1(then = it.then) ? then : false;
1741
- };
1742
-
1743
- var callReaction = function (reaction, state) {
1744
- var value = state.value;
1745
- var ok = state.state == FULFILLED;
1746
- var handler = ok ? reaction.ok : reaction.fail;
1747
- var resolve = reaction.resolve;
1748
- var reject = reaction.reject;
1749
- var domain = reaction.domain;
1750
- var result, then, exited;
1751
- try {
1752
- if (handler) {
1753
- if (!ok) {
1754
- if (state.rejection === UNHANDLED) onHandleUnhandled(state);
1755
- state.rejection = HANDLED;
1756
- }
1757
- if (handler === true) result = value;
1758
- else {
1759
- if (domain) domain.enter();
1760
- result = handler(value); // can throw
1761
- if (domain) {
1762
- domain.exit();
1763
- exited = true;
1764
- }
1765
- }
1766
- if (result === reaction.promise) {
1767
- reject(TypeError$1('Promise-chain cycle'));
1768
- } else if (then = isThenable(result)) {
1769
- call$6(then, result, resolve, reject);
1770
- } else resolve(result);
1771
- } else reject(value);
1772
- } catch (error) {
1773
- if (domain && !exited) domain.exit();
1774
- reject(error);
1775
- }
1776
- };
1777
-
1778
- var notify = function (state, isReject) {
1779
- if (state.notified) return;
1780
- state.notified = true;
1781
- microtask(function () {
1782
- var reactions = state.reactions;
1783
- var reaction;
1784
- while (reaction = reactions.get()) {
1785
- callReaction(reaction, state);
1786
- }
1787
- state.notified = false;
1788
- if (isReject && !state.rejection) onUnhandled(state);
1789
- });
1790
- };
1791
-
1792
- var dispatchEvent = function (name, promise, reason) {
1793
- var event, handler;
1794
- if (DISPATCH_EVENT) {
1795
- event = document$1.createEvent('Event');
1796
- event.promise = promise;
1797
- event.reason = reason;
1798
- event.initEvent(name, false, true);
1799
- global$1.dispatchEvent(event);
1800
- } else event = { promise: promise, reason: reason };
1801
- if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$1['on' + name])) handler(event);
1802
- else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
1803
- };
1804
-
1805
- var onUnhandled = function (state) {
1806
- call$6(task, global$1, function () {
1807
- var promise = state.facade;
1808
- var value = state.value;
1809
- var IS_UNHANDLED = isUnhandled(state);
1810
- var result;
1811
- if (IS_UNHANDLED) {
1812
- result = perform$2(function () {
1813
- if (IS_NODE) {
1814
- process$1.emit('unhandledRejection', value, promise);
1815
- } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
1816
- });
1817
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
1818
- state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
1819
- if (result.error) throw result.value;
1820
- }
1821
- });
1822
- };
1823
-
1824
- var isUnhandled = function (state) {
1825
- return state.rejection !== HANDLED && !state.parent;
1826
- };
1827
-
1828
- var onHandleUnhandled = function (state) {
1829
- call$6(task, global$1, function () {
1830
- var promise = state.facade;
1831
- if (IS_NODE) {
1832
- process$1.emit('rejectionHandled', promise);
1833
- } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
1834
- });
1835
- };
1836
-
1837
- var bind$1 = function (fn, state, unwrap) {
1838
- return function (value) {
1839
- fn(state, value, unwrap);
1840
- };
1841
- };
1842
-
1843
- var internalReject = function (state, value, unwrap) {
1844
- if (state.done) return;
1845
- state.done = true;
1846
- if (unwrap) state = unwrap;
1847
- state.value = value;
1848
- state.state = REJECTED;
1849
- notify(state, true);
1850
- };
1851
-
1852
- var internalResolve = function (state, value, unwrap) {
1853
- if (state.done) return;
1854
- state.done = true;
1855
- if (unwrap) state = unwrap;
1856
- try {
1857
- if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
1858
- var then = isThenable(value);
1859
- if (then) {
1860
- microtask(function () {
1861
- var wrapper = { done: false };
1862
- try {
1863
- call$6(then, value,
1864
- bind$1(internalResolve, wrapper, state),
1865
- bind$1(internalReject, wrapper, state)
1866
- );
1867
- } catch (error) {
1868
- internalReject(wrapper, error, state);
1869
- }
1870
- });
1871
- } else {
1872
- state.value = value;
1873
- state.state = FULFILLED;
1874
- notify(state, false);
1875
- }
1876
- } catch (error) {
1877
- internalReject({ done: false }, error, state);
1878
- }
1879
- };
1880
-
1881
- // constructor polyfill
1882
- if (FORCED_PROMISE_CONSTRUCTOR$4) {
1883
- // 25.4.3.1 Promise(executor)
1884
- PromiseConstructor = function Promise(executor) {
1885
- anInstance(this, PromisePrototype);
1886
- aCallable$3(executor);
1887
- call$6(Internal, this);
1888
- var state = getInternalPromiseState(this);
1889
- try {
1890
- executor(bind$1(internalResolve, state), bind$1(internalReject, state));
1891
- } catch (error) {
1892
- internalReject(state, error);
1893
- }
1894
- };
1895
-
1896
- PromisePrototype = PromiseConstructor.prototype;
1897
-
1898
- // eslint-disable-next-line no-unused-vars -- required for `.length`
1899
- Internal = function Promise(executor) {
1900
- setInternalState(this, {
1901
- type: PROMISE,
1902
- done: false,
1903
- notified: false,
1904
- parent: false,
1905
- reactions: new Queue(),
1906
- rejection: false,
1907
- state: PENDING,
1908
- value: undefined
1909
- });
1910
- };
1911
-
1912
- // `Promise.prototype.then` method
1913
- // https://tc39.es/ecma262/#sec-promise.prototype.then
1914
- Internal.prototype = defineBuiltIn$1(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
1915
- var state = getInternalPromiseState(this);
1916
- var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
1917
- state.parent = true;
1918
- reaction.ok = isCallable$1(onFulfilled) ? onFulfilled : true;
1919
- reaction.fail = isCallable$1(onRejected) && onRejected;
1920
- reaction.domain = IS_NODE ? process$1.domain : undefined;
1921
- if (state.state == PENDING) state.reactions.add(reaction);
1922
- else microtask(function () {
1923
- callReaction(reaction, state);
1924
- });
1925
- return reaction.promise;
1926
- });
1927
-
1928
- OwnPromiseCapability = function () {
1929
- var promise = new Internal();
1930
- var state = getInternalPromiseState(promise);
1931
- this.promise = promise;
1932
- this.resolve = bind$1(internalResolve, state);
1933
- this.reject = bind$1(internalReject, state);
1934
- };
1935
-
1936
- newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
1937
- return C === PromiseConstructor || C === PromiseWrapper
1938
- ? new OwnPromiseCapability(C)
1939
- : newGenericPromiseCapability(C);
1940
- };
1941
-
1942
- if (isCallable$1(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
1943
- nativeThen = NativePromisePrototype$1.then;
1944
-
1945
- if (!NATIVE_PROMISE_SUBCLASSING) {
1946
- // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
1947
- defineBuiltIn$1(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
1948
- var that = this;
1949
- return new PromiseConstructor(function (resolve, reject) {
1950
- call$6(nativeThen, that, resolve, reject);
1951
- }).then(onFulfilled, onRejected);
1952
- // https://github.com/zloirock/core-js/issues/640
1953
- }, { unsafe: true });
1954
- }
1955
-
1956
- // make `.constructor === Promise` work for native promise-based APIs
1957
- try {
1958
- delete NativePromisePrototype$1.constructor;
1959
- } catch (error) { /* empty */ }
1960
-
1961
- // make `instanceof Promise` work for native promise-based APIs
1962
- if (setPrototypeOf) {
1963
- setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
1964
- }
1965
- }
1966
- }
1967
-
1968
- $$5({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
1969
- Promise: PromiseConstructor
1970
- });
1971
-
1972
- setToStringTag(PromiseConstructor, PROMISE, false);
1973
- setSpecies(PROMISE);
1974
-
1975
- var iterators = {};
1976
-
1977
- var wellKnownSymbol$2 = wellKnownSymbol$a;
1978
- var Iterators$1 = iterators;
1979
-
1980
- var ITERATOR$2 = wellKnownSymbol$2('iterator');
1981
- var ArrayPrototype = Array.prototype;
1982
-
1983
- // check on default Array iterator
1984
- var isArrayIteratorMethod$1 = function (it) {
1985
- return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
1986
- };
1987
-
1988
- var classof = classof$2;
1989
- var getMethod$1 = getMethod$3;
1990
- var isNullOrUndefined = isNullOrUndefined$4;
1991
- var Iterators = iterators;
1992
- var wellKnownSymbol$1 = wellKnownSymbol$a;
1993
-
1994
- var ITERATOR$1 = wellKnownSymbol$1('iterator');
1995
-
1996
- var getIteratorMethod$2 = function (it) {
1997
- if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$1)
1998
- || getMethod$1(it, '@@iterator')
1999
- || Iterators[classof(it)];
2000
- };
2001
-
2002
- var call$5 = functionCall;
2003
- var aCallable$2 = aCallable$7;
2004
- var anObject$3 = anObject$8;
2005
- var tryToString$1 = tryToString$4;
2006
- var getIteratorMethod$1 = getIteratorMethod$2;
2007
-
2008
- var $TypeError$1 = TypeError;
2009
-
2010
- var getIterator$1 = function (argument, usingIterator) {
2011
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
2012
- if (aCallable$2(iteratorMethod)) return anObject$3(call$5(iteratorMethod, argument));
2013
- throw $TypeError$1(tryToString$1(argument) + ' is not iterable');
2014
- };
2015
-
2016
- var call$4 = functionCall;
2017
- var anObject$2 = anObject$8;
2018
- var getMethod = getMethod$3;
2019
-
2020
- var iteratorClose$1 = function (iterator, kind, value) {
2021
- var innerResult, innerError;
2022
- anObject$2(iterator);
2023
- try {
2024
- innerResult = getMethod(iterator, 'return');
2025
- if (!innerResult) {
2026
- if (kind === 'throw') throw value;
2027
- return value;
2028
- }
2029
- innerResult = call$4(innerResult, iterator);
2030
- } catch (error) {
2031
- innerError = true;
2032
- innerResult = error;
2033
- }
2034
- if (kind === 'throw') throw value;
2035
- if (innerError) throw innerResult;
2036
- anObject$2(innerResult);
2037
- return value;
2038
- };
2039
-
2040
- var bind = functionBindContext;
2041
- var call$3 = functionCall;
2042
- var anObject$1 = anObject$8;
2043
- var tryToString = tryToString$4;
2044
- var isArrayIteratorMethod = isArrayIteratorMethod$1;
2045
- var lengthOfArrayLike = lengthOfArrayLike$2;
2046
- var isPrototypeOf = objectIsPrototypeOf;
2047
- var getIterator = getIterator$1;
2048
- var getIteratorMethod = getIteratorMethod$2;
2049
- var iteratorClose = iteratorClose$1;
2050
-
2051
- var $TypeError = TypeError;
2052
-
2053
- var Result = function (stopped, result) {
2054
- this.stopped = stopped;
2055
- this.result = result;
2056
- };
2057
-
2058
- var ResultPrototype = Result.prototype;
2059
-
2060
- var iterate$2 = function (iterable, unboundFunction, options) {
2061
- var that = options && options.that;
2062
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
2063
- var IS_RECORD = !!(options && options.IS_RECORD);
2064
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
2065
- var INTERRUPTED = !!(options && options.INTERRUPTED);
2066
- var fn = bind(unboundFunction, that);
2067
- var iterator, iterFn, index, length, result, next, step;
2068
-
2069
- var stop = function (condition) {
2070
- if (iterator) iteratorClose(iterator, 'normal', condition);
2071
- return new Result(true, condition);
2072
- };
2073
-
2074
- var callFn = function (value) {
2075
- if (AS_ENTRIES) {
2076
- anObject$1(value);
2077
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
2078
- } return INTERRUPTED ? fn(value, stop) : fn(value);
2079
- };
2080
-
2081
- if (IS_RECORD) {
2082
- iterator = iterable.iterator;
2083
- } else if (IS_ITERATOR) {
2084
- iterator = iterable;
2085
- } else {
2086
- iterFn = getIteratorMethod(iterable);
2087
- if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');
2088
- // optimisation for array iterators
2089
- if (isArrayIteratorMethod(iterFn)) {
2090
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
2091
- result = callFn(iterable[index]);
2092
- if (result && isPrototypeOf(ResultPrototype, result)) return result;
2093
- } return new Result(false);
2094
- }
2095
- iterator = getIterator(iterable, iterFn);
2096
- }
2097
-
2098
- next = IS_RECORD ? iterable.next : iterator.next;
2099
- while (!(step = call$3(next, iterator)).done) {
2100
- try {
2101
- result = callFn(step.value);
2102
- } catch (error) {
2103
- iteratorClose(iterator, 'throw', error);
2104
- }
2105
- if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
2106
- } return new Result(false);
2107
- };
2108
-
2109
- var wellKnownSymbol = wellKnownSymbol$a;
2110
-
2111
- var ITERATOR = wellKnownSymbol('iterator');
2112
- var SAFE_CLOSING = false;
2113
-
2114
- try {
2115
- var called = 0;
2116
- var iteratorWithReturn = {
2117
- next: function () {
2118
- return { done: !!called++ };
2119
- },
2120
- 'return': function () {
2121
- SAFE_CLOSING = true;
2122
- }
2123
- };
2124
- iteratorWithReturn[ITERATOR] = function () {
2125
- return this;
2126
- };
2127
- // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
2128
- Array.from(iteratorWithReturn, function () { throw 2; });
2129
- } catch (error) { /* empty */ }
2130
-
2131
- var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
2132
- if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
2133
- var ITERATION_SUPPORT = false;
2134
- try {
2135
- var object = {};
2136
- object[ITERATOR] = function () {
2137
- return {
2138
- next: function () {
2139
- return { done: ITERATION_SUPPORT = true };
2140
- }
2141
- };
2142
- };
2143
- exec(object);
2144
- } catch (error) { /* empty */ }
2145
- return ITERATION_SUPPORT;
2146
- };
2147
-
2148
- var NativePromiseConstructor$1 = promiseNativeConstructor;
2149
- var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
2150
- var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
2151
-
2152
- var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
2153
- NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
2154
- });
2155
-
2156
- var $$4 = _export;
2157
- var call$2 = functionCall;
2158
- var aCallable$1 = aCallable$7;
2159
- var newPromiseCapabilityModule$2 = newPromiseCapability$2;
2160
- var perform$1 = perform$3;
2161
- var iterate$1 = iterate$2;
2162
- var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
2163
-
2164
- // `Promise.all` method
2165
- // https://tc39.es/ecma262/#sec-promise.all
2166
- $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
2167
- all: function all(iterable) {
2168
- var C = this;
2169
- var capability = newPromiseCapabilityModule$2.f(C);
2170
- var resolve = capability.resolve;
2171
- var reject = capability.reject;
2172
- var result = perform$1(function () {
2173
- var $promiseResolve = aCallable$1(C.resolve);
2174
- var values = [];
2175
- var counter = 0;
2176
- var remaining = 1;
2177
- iterate$1(iterable, function (promise) {
2178
- var index = counter++;
2179
- var alreadyCalled = false;
2180
- remaining++;
2181
- call$2($promiseResolve, C, promise).then(function (value) {
2182
- if (alreadyCalled) return;
2183
- alreadyCalled = true;
2184
- values[index] = value;
2185
- --remaining || resolve(values);
2186
- }, reject);
2187
- });
2188
- --remaining || resolve(values);
2189
- });
2190
- if (result.error) reject(result.value);
2191
- return capability.promise;
2192
- }
2193
- });
2194
-
2195
- var $$3 = _export;
2196
- var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
2197
- var NativePromiseConstructor = promiseNativeConstructor;
2198
- var getBuiltIn$1 = getBuiltIn$8;
2199
- var isCallable = isCallable$h;
2200
- var defineBuiltIn = defineBuiltIn$3;
2201
-
2202
- var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
2203
-
2204
- // `Promise.prototype.catch` method
2205
- // https://tc39.es/ecma262/#sec-promise.prototype.catch
2206
- $$3({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
2207
- 'catch': function (onRejected) {
2208
- return this.then(undefined, onRejected);
2209
- }
2210
- });
2211
-
2212
- // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
2213
- if (isCallable(NativePromiseConstructor)) {
2214
- var method = getBuiltIn$1('Promise').prototype['catch'];
2215
- if (NativePromisePrototype['catch'] !== method) {
2216
- defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
2217
- }
2218
- }
2219
-
2220
- var $$2 = _export;
2221
- var call$1 = functionCall;
2222
- var aCallable = aCallable$7;
2223
- var newPromiseCapabilityModule$1 = newPromiseCapability$2;
2224
- var perform = perform$3;
2225
- var iterate = iterate$2;
2226
- var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
2227
-
2228
- // `Promise.race` method
2229
- // https://tc39.es/ecma262/#sec-promise.race
2230
- $$2({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
2231
- race: function race(iterable) {
2232
- var C = this;
2233
- var capability = newPromiseCapabilityModule$1.f(C);
2234
- var reject = capability.reject;
2235
- var result = perform(function () {
2236
- var $promiseResolve = aCallable(C.resolve);
2237
- iterate(iterable, function (promise) {
2238
- call$1($promiseResolve, C, promise).then(capability.resolve, reject);
2239
- });
2240
- });
2241
- if (result.error) reject(result.value);
2242
- return capability.promise;
2243
- }
2244
- });
2245
-
2246
- var $$1 = _export;
2247
- var call = functionCall;
2248
- var newPromiseCapabilityModule = newPromiseCapability$2;
2249
- var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
2250
-
2251
- // `Promise.reject` method
2252
- // https://tc39.es/ecma262/#sec-promise.reject
2253
- $$1({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
2254
- reject: function reject(r) {
2255
- var capability = newPromiseCapabilityModule.f(this);
2256
- call(capability.reject, undefined, r);
2257
- return capability.promise;
2258
- }
2259
- });
2260
-
2261
- var anObject = anObject$8;
2262
- var isObject = isObject$7;
2263
- var newPromiseCapability = newPromiseCapability$2;
2264
-
2265
- var promiseResolve$1 = function (C, x) {
2266
- anObject(C);
2267
- if (isObject(x) && x.constructor === C) return x;
2268
- var promiseCapability = newPromiseCapability.f(C);
2269
- var resolve = promiseCapability.resolve;
2270
- resolve(x);
2271
- return promiseCapability.promise;
2272
- };
2273
-
2274
- var $ = _export;
2275
- var getBuiltIn = getBuiltIn$8;
2276
- var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
2277
- var promiseResolve = promiseResolve$1;
2278
-
2279
- getBuiltIn('Promise');
2280
-
2281
- // `Promise.resolve` method
2282
- // https://tc39.es/ecma262/#sec-promise.resolve
2283
- $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2284
- resolve: function resolve(x) {
2285
- return promiseResolve(this, x);
2286
- }
2287
- });
2288
-
2289
12
  /******************************************************************************
2290
13
  Copyright (c) Microsoft Corporation.
2291
14
 
@@ -2323,366 +46,287 @@ function __awaiter(thisArg, _arguments, P, generator) {
2323
46
  });
2324
47
  }
2325
48
 
2326
- const defaultOptions = {
2327
- mutate: {
2328
- errorPolicy: "all"
2329
- },
2330
- query: {
2331
- errorPolicy: "all"
2332
- }
2333
- };
2334
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2335
- function ApolloMockedProviderWithError(props) {
2336
- const {
2337
- mocks
2338
- } = props,
2339
- otherProps = __rest(props, ["mocks"]);
2340
- const mockLink = new MockLink(mocks);
2341
- const errorLoggingLink = onError(({
2342
- graphQLErrors,
2343
- networkError
2344
- }) => {
2345
- if (graphQLErrors) {
2346
- // eslint-disable-next-line array-callback-return
2347
- graphQLErrors.map(({
2348
- message,
2349
- locations,
2350
- path
2351
- }) => {
2352
- if (process.env["VSCODE_INSPECTOR_OPTIONS"] || process.env["DEBUG"]) {
2353
- // eslint-disable-next-line no-console
2354
- console.log(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`);
2355
- }
2356
- });
2357
- }
2358
- if (networkError) {
2359
- if (process.env["VSCODE_INSPECTOR_OPTIONS"] || process.env["DEBUG"]) {
2360
- // eslint-disable-next-line no-console
2361
- console.log(`[Network error]: ${networkError}`);
2362
- }
2363
- }
2364
- });
2365
- const link = ApolloLink.from([errorLoggingLink, mockLink]);
2366
- return jsx(MockedProvider, Object.assign({}, otherProps, {
2367
- link: link,
2368
- defaultOptions: defaultOptions
2369
- }));
49
+ const defaultOptions = {
50
+ mutate: {
51
+ errorPolicy: "all",
52
+ },
53
+ query: {
54
+ errorPolicy: "all",
55
+ },
56
+ };
57
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
58
+ function ApolloMockedProviderWithError(props) {
59
+ const { mocks } = props, otherProps = __rest(props, ["mocks"]);
60
+ const mockLink = new MockLink(mocks);
61
+ const errorLoggingLink = onError(({ graphQLErrors, networkError }) => {
62
+ if (graphQLErrors) {
63
+ // eslint-disable-next-line array-callback-return
64
+ graphQLErrors.map(({ message, locations, path }) => {
65
+ if (process.env["VSCODE_INSPECTOR_OPTIONS"] || process.env["DEBUG"]) {
66
+ // eslint-disable-next-line no-console
67
+ console.log(`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`);
68
+ }
69
+ });
70
+ }
71
+ if (networkError) {
72
+ if (process.env["VSCODE_INSPECTOR_OPTIONS"] || process.env["DEBUG"]) {
73
+ // eslint-disable-next-line no-console
74
+ console.log(`[Network error]: ${networkError}`);
75
+ }
76
+ }
77
+ });
78
+ const link = ApolloLink.from([errorLoggingLink, mockLink]);
79
+ return jsx(MockedProvider, Object.assign({}, otherProps, { link: link, defaultOptions: defaultOptions }));
2370
80
  }
2371
81
 
2372
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2373
- const doNothing = () => {
2374
- /* Do nothing */
2375
- };
2376
-
2377
- const mockAssetSortingContext = {
2378
- setSortBy: doNothing,
2379
- sortingState: {
2380
- sortBy: AssetSortByProperty.Criticality,
2381
- order: SortOrder.Desc
2382
- }
2383
- };
2384
-
2385
- const mockCurrentUserContext = (overrides = {}) => Object.assign({
2386
- userName: "",
2387
- customerId: 12345,
2388
- userId: 154312,
2389
- tasUserId: "751ea227-f199-4d00-925f-a608312c5e45",
2390
- email: "",
2391
- name: "",
2392
- accountId: "",
2393
- assumedUser: null,
2394
- jobTitle: "",
2395
- isAuthenticated: true
2396
- }, overrides);
2397
-
2398
- const mockEnvironmentContext = {
2399
- auth: {
2400
- url: "",
2401
- clientId: "",
2402
- issuer: ""
2403
- },
2404
- managerClassicUrl: "https://sso.trackunit.com",
2405
- googleMapsApiKey: "",
2406
- amplitudeApiKey: "",
2407
- launchDarklyApiKey: "",
2408
- graphqlLegacyUrl: "",
2409
- graphqlManagerUrl: "",
2410
- graphqlManagerImageUploadUrl: "",
2411
- graphqlReportUrl: "",
2412
- graphqlSimulatorUrl: "",
2413
- buildVersion: "",
2414
- commitNumber: 0,
2415
- buildDate: "",
2416
- irisAppSdkServerUrl: "",
2417
- publicUrl: "",
2418
- isDev: true,
2419
- environment: "",
2420
- sentryDsn: "",
2421
- sessionId: "",
2422
- tracingHeaders: {
2423
- "X-TrackunitAppVersion": "",
2424
- "session-id": ""
2425
- },
2426
- trackunitRestApiUrl: ""
2427
- };
2428
-
2429
- const mockUserSubscriptionProviderValue = (features, packageType) => {
2430
- return {
2431
- numberOfDaysWithAccessToHistoricalData: 30,
2432
- numberOfDaysWithAccessToHistoricalInsights: 30,
2433
- features,
2434
- packageType
2435
- };
2436
- };
2437
-
2438
- const flushPromises = (waitTimeInMS = 0) => {
2439
- return new Promise(resolve => {
2440
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2441
- if (global.ORG_setTimeout) {
2442
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2443
- return global.ORG_setTimeout(() => global.ORG_setTimeout(resolve, waitTimeInMS), 1);
2444
- } else {
2445
- setTimeout(() => setTimeout(resolve, waitTimeInMS), 1);
2446
- }
2447
- });
2448
- };
2449
- const flushPromisesInAct = (waitTimeInMS = 0) => {
2450
- return act(() => {
2451
- return new Promise(resolve => {
2452
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2453
- if (global.ORG_setTimeout) {
2454
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2455
- return global.ORG_setTimeout(() => global.ORG_setTimeout(resolve, waitTimeInMS), 1);
2456
- } else {
2457
- setTimeout(() => setTimeout(resolve, waitTimeInMS), 1);
2458
- }
2459
- });
2460
- });
82
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
83
+ const doNothing = () => {
84
+ /* Do nothing */
85
+ };
86
+
87
+ const mockAssetSortingContext = {
88
+ setSortBy: doNothing,
89
+ sortingState: {
90
+ sortBy: AssetSortByProperty.Criticality,
91
+ order: SortOrder.Desc,
92
+ },
93
+ };
94
+
95
+ const mockCurrentUserContext = (overrides = {}) => (Object.assign({ userName: "", customerId: 12345, userId: 154312, tasUserId: "751ea227-f199-4d00-925f-a608312c5e45", email: "", name: "", accountId: "", assumedUser: null, jobTitle: "", isAuthenticated: true }, overrides));
96
+
97
+ const mockEnvironmentContext = {
98
+ auth: {
99
+ url: "",
100
+ clientId: "",
101
+ issuer: "",
102
+ },
103
+ managerClassicUrl: "https://sso.trackunit.com",
104
+ googleMapsApiKey: "",
105
+ amplitudeApiKey: "",
106
+ launchDarklyApiKey: "",
107
+ graphqlLegacyUrl: "",
108
+ graphqlManagerUrl: "",
109
+ graphqlManagerImageUploadUrl: "",
110
+ graphqlReportUrl: "",
111
+ graphqlSimulatorUrl: "",
112
+ buildVersion: "",
113
+ commitNumber: 0,
114
+ buildDate: "",
115
+ irisAppSdkServerUrl: "",
116
+ publicUrl: "",
117
+ isDev: true,
118
+ environment: "",
119
+ sentryDsn: "",
120
+ sessionId: "",
121
+ tracingHeaders: {
122
+ "X-TrackunitAppVersion": "",
123
+ "session-id": "",
124
+ },
125
+ trackunitRestApiUrl: "",
126
+ };
127
+
128
+ const mockUserSubscriptionProviderValue = (features, packageType) => {
129
+ return {
130
+ numberOfDaysWithAccessToHistoricalData: 30,
131
+ numberOfDaysWithAccessToHistoricalInsights: 30,
132
+ features,
133
+ packageType,
134
+ };
135
+ };
136
+
137
+ const flushPromises = (waitTimeInMS = 0) => {
138
+ return new Promise(resolve => {
139
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
140
+ if (global.ORG_setTimeout) {
141
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
142
+ return global.ORG_setTimeout(() => global.ORG_setTimeout(resolve, waitTimeInMS), 1);
143
+ }
144
+ else {
145
+ setTimeout(() => setTimeout(resolve, waitTimeInMS), 1);
146
+ }
147
+ });
148
+ };
149
+ const flushPromisesInAct = (waitTimeInMS = 0) => {
150
+ return act(() => {
151
+ return new Promise(resolve => {
152
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
153
+ if (global.ORG_setTimeout) {
154
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
155
+ return global.ORG_setTimeout(() => global.ORG_setTimeout(resolve, waitTimeInMS), 1);
156
+ }
157
+ else {
158
+ setTimeout(() => setTimeout(resolve, waitTimeInMS), 1);
159
+ }
160
+ });
161
+ });
2461
162
  };
2462
163
 
2463
- let _ = t => t,
2464
- _t;
2465
164
  /**
2466
165
  * This builder allows you to enable providers using the builder pattern, and then call 1 of either:
2467
166
  * - render
2468
167
  * - mount
2469
- */
2470
- class MockContextProviderBuilder {
2471
- constructor() {
2472
- this.selectedEnvironmentContext = mockEnvironmentContext;
2473
- this.selectedTokenContext = {
2474
- token: "fakeToken"
2475
- };
2476
- this.userSubscriptionPackageType = UserSubscriptionPackageType.Insight;
2477
- this.features = [];
2478
- this.selectedApolloMocks = [];
2479
- this.selectedRouterProps = {};
2480
- this.selectedAssumedUser = mockCurrentUserContext().assumedUser;
2481
- this.selectedGlobalSelection = {
2482
- selection: null
2483
- };
2484
- this.selectedAssetSortingContext = mockAssetSortingContext;
2485
- }
2486
- /**
2487
- * Use this Environment Context.
2488
- *
2489
- * @param environmentContext
2490
- */
2491
- environment(environmentContext) {
2492
- this.selectedEnvironmentContext = environmentContext || mockEnvironmentContext;
2493
- return this;
2494
- }
2495
- /**
2496
- * Use this token.
2497
- *
2498
- * @param token
2499
- */
2500
- token(token) {
2501
- this.selectedTokenContext = {
2502
- token
2503
- };
2504
- return this;
2505
- }
2506
- /**
2507
- * Use this to pass in userSubscriptionPackage.
2508
- *
2509
- * @param developerSettingsContext
2510
- */
2511
- userSubscriptionPackage(userSubscriptionPackage) {
2512
- if (userSubscriptionPackage) {
2513
- this.userSubscriptionPackageType = userSubscriptionPackage;
2514
- }
2515
- return this;
2516
- }
2517
- /**
2518
- * Use this to pass in SupportedFeatures.
2519
- *
2520
- * @param developerSettingsContext
2521
- */
2522
- supportedFeatures(features) {
2523
- if (features) {
2524
- this.features = features.map(feature => {
2525
- return {
2526
- id: feature,
2527
- name: feature
2528
- };
2529
- });
2530
- }
2531
- return this;
2532
- }
2533
- /**
2534
- * Assume this user
2535
- *
2536
- * @param assumeUser
2537
- */
2538
- assumeUser(assumeUser) {
2539
- this.selectedAssumedUser = assumeUser;
2540
- return this;
2541
- }
2542
- /**
2543
- * Use this Router Props with the given mocks.
2544
- *
2545
- * @param routerProps
2546
- */
2547
- routerProps(routerProps) {
2548
- this.selectedRouterProps = routerProps || {};
2549
- return this;
2550
- }
2551
- /**
2552
- * Use this global selection.
2553
- *
2554
- * @param globalSelection
2555
- */
2556
- globalSelection(globalSelection) {
2557
- this.selectedGlobalSelection = {
2558
- selection: globalSelection
2559
- };
2560
- return this;
2561
- }
2562
- /**
2563
- * Set global asset sorting context.
2564
- *
2565
- * @param overrides - Override the default context.
2566
- */
2567
- assetSorting(overrides) {
2568
- this.selectedAssetSortingContext = Object.assign(Object.assign({}, mockAssetSortingContext), overrides);
2569
- return this;
2570
- }
2571
- renderHook(callback, parentElement) {
2572
- return __awaiter(this, void 0, void 0, function* () {
2573
- this.validateSuppliedMocks();
2574
- // This ensures correct act loading when using hooks
2575
- const hookRenderer = yield import('./HookRenderer.js');
2576
- return hookRenderer.reactHooksRenderHook(callback, children => this.getMockedCompositionRoot(parentElement ? parentElement(children) : children));
2577
- });
2578
- }
2579
- /**
2580
- * Use this Manager Apollo Context Provider with the given mocks.
2581
- *
2582
- * @param apolloMocks
2583
- */
2584
- apollo(apolloMocks) {
2585
- this.selectedApolloMocks = apolloMocks || [];
2586
- return this;
2587
- }
2588
- /**
2589
- * This will use RTL.render the child in the correct mocked hierarchy of context providers.
2590
- *
2591
- * @param child - the child element being tested.
2592
- */
2593
- render(child) {
2594
- return __awaiter(this, void 0, void 0, function* () {
2595
- this.validateSuppliedMocks();
2596
- let mountedcomponent;
2597
- yield act(() => __awaiter(this, void 0, void 0, function* () {
2598
- mountedcomponent = render(child, {
2599
- wrapper: ({
2600
- children
2601
- }) => this.getMockedCompositionRoot(children)
2602
- });
2603
- yield flushPromises();
2604
- }));
2605
- yield act(() => __awaiter(this, void 0, void 0, function* () {
2606
- yield flushPromises();
2607
- }));
2608
- yield act(() => __awaiter(this, void 0, void 0, function* () {
2609
- yield flushPromises();
2610
- }));
2611
- return mountedcomponent;
2612
- });
2613
- }
2614
- /**
2615
- * Validate the mocks that has been supplied to make sure they make sense.
2616
- * Note: This function is overriden in builders extending this one.
2617
- *
2618
- * @returns true or throws error if any invalid mocks
2619
- */
2620
- validateSuppliedMocks() {
2621
- return true;
2622
- }
2623
- /**
2624
- * Make sure this represent the same structure as the main index.tsx does.
2625
- *
2626
- * @param testChildren - the child element being tested.
2627
- * @param addTestRootContainer - if you want to add a root container to the test.
2628
- */
2629
- getMockedCompositionRoot(testChildren, addTestRootContainer = true) {
2630
- return jsx(EnvironmentContextProvider, Object.assign({
2631
- value: this.selectedEnvironmentContext
2632
- }, {
2633
- children: jsx(MemoryRouter, Object.assign({}, this.selectedRouterProps, {
2634
- children: jsx(CurrentUserProvider, Object.assign({
2635
- value: mockCurrentUserContext({
2636
- assumedUser: this.selectedAssumedUser
2637
- })
2638
- }, {
2639
- children: jsx(UserSubscriptionProvider, Object.assign({
2640
- value: mockUserSubscriptionProviderValue(this.features, this.userSubscriptionPackageType)
2641
- }, {
2642
- children: jsx(TokenProvider, Object.assign({
2643
- value: this.selectedTokenContext
2644
- }, {
2645
- children: jsx(ToastProvider, Object.assign({
2646
- value: {
2647
- addToast: () => {}
2648
- }
2649
- }, {
2650
- children: jsx(GlobalSelectionProvider, Object.assign({
2651
- value: this.selectedGlobalSelection
2652
- }, {
2653
- children: jsx(AssetSortingProvider, Object.assign({
2654
- value: this.selectedAssetSortingContext
2655
- }, {
2656
- children: jsx(ApolloMockedProviderWithError, Object.assign({
2657
- mocks: this.selectedApolloMocks,
2658
- addTypename: false
2659
- }, {
2660
- children: addTestRootContainer ? jsx(TestRoot, Object.assign({
2661
- "data-testid": "testRoot"
2662
- }, {
2663
- children: testChildren
2664
- })) : jsx("div", {
2665
- children: testChildren
2666
- })
2667
- }))
2668
- }))
2669
- }))
2670
- }))
2671
- }))
2672
- }))
2673
- }))
2674
- }))
2675
- }));
2676
- }
2677
- }
2678
- const rootContext = () => new MockContextProviderBuilder();
2679
- const TestRoot = tw.div(_t || (_t = _`
168
+ */
169
+ class MockContextProviderBuilder {
170
+ constructor() {
171
+ this.selectedEnvironmentContext = mockEnvironmentContext;
172
+ this.selectedTokenContext = { token: "fakeToken" };
173
+ this.userSubscriptionPackageType = UserSubscriptionPackageType.Insight;
174
+ this.features = [];
175
+ this.selectedApolloMocks = [];
176
+ this.selectedRouterProps = {};
177
+ this.selectedAssumedUser = mockCurrentUserContext().assumedUser;
178
+ this.selectedGlobalSelection = { selection: null };
179
+ this.selectedAssetSortingContext = mockAssetSortingContext;
180
+ }
181
+ /**
182
+ * Use this Environment Context.
183
+ *
184
+ * @param environmentContext
185
+ */
186
+ environment(environmentContext) {
187
+ this.selectedEnvironmentContext = environmentContext || mockEnvironmentContext;
188
+ return this;
189
+ }
190
+ /**
191
+ * Use this token.
192
+ *
193
+ * @param token
194
+ */
195
+ token(token) {
196
+ this.selectedTokenContext = { token };
197
+ return this;
198
+ }
199
+ /**
200
+ * Use this to pass in userSubscriptionPackage.
201
+ *
202
+ * @param developerSettingsContext
203
+ */
204
+ userSubscriptionPackage(userSubscriptionPackage) {
205
+ if (userSubscriptionPackage) {
206
+ this.userSubscriptionPackageType = userSubscriptionPackage;
207
+ }
208
+ return this;
209
+ }
210
+ /**
211
+ * Use this to pass in SupportedFeatures.
212
+ *
213
+ * @param developerSettingsContext
214
+ */
215
+ supportedFeatures(features) {
216
+ if (features) {
217
+ this.features = features.map(feature => {
218
+ return {
219
+ id: feature,
220
+ name: feature,
221
+ };
222
+ });
223
+ }
224
+ return this;
225
+ }
226
+ /**
227
+ * Assume this user
228
+ *
229
+ * @param assumeUser
230
+ */
231
+ assumeUser(assumeUser) {
232
+ this.selectedAssumedUser = assumeUser;
233
+ return this;
234
+ }
235
+ /**
236
+ * Use this Router Props with the given mocks.
237
+ *
238
+ * @param routerProps
239
+ */
240
+ routerProps(routerProps) {
241
+ this.selectedRouterProps = routerProps || {};
242
+ return this;
243
+ }
244
+ /**
245
+ * Use this global selection.
246
+ *
247
+ * @param globalSelection
248
+ */
249
+ globalSelection(globalSelection) {
250
+ this.selectedGlobalSelection = { selection: globalSelection };
251
+ return this;
252
+ }
253
+ /**
254
+ * Set global asset sorting context.
255
+ *
256
+ * @param overrides - Override the default context.
257
+ */
258
+ assetSorting(overrides) {
259
+ this.selectedAssetSortingContext = Object.assign(Object.assign({}, mockAssetSortingContext), overrides);
260
+ return this;
261
+ }
262
+ renderHook(callback, parentElement) {
263
+ return __awaiter(this, void 0, void 0, function* () {
264
+ this.validateSuppliedMocks();
265
+ // This ensures correct act loading when using hooks
266
+ const hookRenderer = yield import('./HookRenderer.js');
267
+ return hookRenderer.reactHooksRenderHook(callback, children => this.getMockedCompositionRoot(parentElement ? parentElement(children) : children));
268
+ });
269
+ }
270
+ /**
271
+ * Use this Manager Apollo Context Provider with the given mocks.
272
+ *
273
+ * @param apolloMocks
274
+ */
275
+ apollo(apolloMocks) {
276
+ this.selectedApolloMocks = apolloMocks || [];
277
+ return this;
278
+ }
279
+ /**
280
+ * This will use RTL.render the child in the correct mocked hierarchy of context providers.
281
+ *
282
+ * @param child - the child element being tested.
283
+ */
284
+ render(child) {
285
+ return __awaiter(this, void 0, void 0, function* () {
286
+ this.validateSuppliedMocks();
287
+ let mountedcomponent;
288
+ yield act(() => __awaiter(this, void 0, void 0, function* () {
289
+ mountedcomponent = render(child, {
290
+ wrapper: ({ children }) => this.getMockedCompositionRoot(children),
291
+ });
292
+ yield flushPromises();
293
+ }));
294
+ yield act(() => __awaiter(this, void 0, void 0, function* () {
295
+ yield flushPromises();
296
+ }));
297
+ yield act(() => __awaiter(this, void 0, void 0, function* () {
298
+ yield flushPromises();
299
+ }));
300
+ return mountedcomponent;
301
+ });
302
+ }
303
+ /**
304
+ * Validate the mocks that has been supplied to make sure they make sense.
305
+ * Note: This function is overriden in builders extending this one.
306
+ *
307
+ * @returns true or throws error if any invalid mocks
308
+ */
309
+ validateSuppliedMocks() {
310
+ return true;
311
+ }
312
+ /**
313
+ * Make sure this represent the same structure as the main index.tsx does.
314
+ *
315
+ * @param testChildren - the child element being tested.
316
+ * @param addTestRootContainer - if you want to add a root container to the test.
317
+ */
318
+ getMockedCompositionRoot(testChildren, addTestRootContainer = true) {
319
+ return (jsx(EnvironmentContextProvider, Object.assign({ value: this.selectedEnvironmentContext }, { children: jsx(MemoryRouter, Object.assign({}, this.selectedRouterProps, { children: jsx(CurrentUserProvider, Object.assign({ value: mockCurrentUserContext({ assumedUser: this.selectedAssumedUser }) }, { children: jsx(UserSubscriptionProvider, Object.assign({ value: mockUserSubscriptionProviderValue(this.features, this.userSubscriptionPackageType) }, { children: jsx(TokenProvider, Object.assign({ value: this.selectedTokenContext }, { children: jsx(ToastProvider, Object.assign({ value: { addToast: () => { } } }, { children: jsx(GlobalSelectionProvider, Object.assign({ value: this.selectedGlobalSelection }, { children: jsx(AssetSortingProvider, Object.assign({ value: this.selectedAssetSortingContext }, { children: jsx(ApolloMockedProviderWithError, Object.assign({ mocks: this.selectedApolloMocks, addTypename: false }, { children: addTestRootContainer ? (jsx(TestRoot, Object.assign({ "data-testid": "testRoot" }, { children: testChildren }))) : (jsx("div", { children: testChildren })) })) })) })) })) })) })) })) })) })));
320
+ }
321
+ }
322
+ const rootContext = () => new MockContextProviderBuilder();
323
+ const TestRoot = tw.div `
2680
324
  --tw-scale-x: 0.99;
2681
325
  --tw-scale-y: 0.99;
2682
326
  w[1024px];
2683
327
  h[1000px];
2684
328
  inline-block;
2685
- `));
329
+ `;
2686
330
 
2687
331
  /**
2688
332
  *
@@ -2695,26 +339,35 @@ const TestRoot = tw.div(_t || (_t = _`
2695
339
  * @param error ApolloError object to be returned.
2696
340
  * @returns MockedResponse that can be passed to the mocked ApolloProvider.
2697
341
  * @see [Testing React components using MockedProvider and associated APIs](https://www.apollographql.com/docs/react/development-testing/testing/)
2698
- */
2699
- const queryFor = (document, variables, data, error) => {
2700
- return {
2701
- request: {
2702
- query: document,
2703
- variables
2704
- },
2705
- newData: () => {
2706
- if (process.env["VSCODE_INSPECTOR_OPTIONS"] || process.env["DEBUG"]) {
2707
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2708
- const name = document.definitions[0].name.value;
2709
- // eslint-disable-next-line no-console
2710
- console.log("Found Response for: " + name + " for variables: " + JSON.stringify(variables, null, 2) + " Returning: " + "{ data: " + JSON.stringify(data, null, 2) + ", error: " + JSON.stringify(error, null, 2) + "}");
2711
- }
2712
- return {
2713
- data,
2714
- errors: error ? [new GraphQLError(error.message)] : undefined
2715
- };
2716
- }
2717
- };
342
+ */
343
+ const queryFor = (document, variables, data, error) => {
344
+ return {
345
+ request: {
346
+ query: document,
347
+ variables,
348
+ },
349
+ newData: () => {
350
+ if (process.env["VSCODE_INSPECTOR_OPTIONS"] || process.env["DEBUG"]) {
351
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
352
+ const name = document.definitions[0].name.value;
353
+ // eslint-disable-next-line no-console
354
+ console.log("Found Response for: " +
355
+ name +
356
+ " for variables: " +
357
+ JSON.stringify(variables, null, 2) +
358
+ " Returning: " +
359
+ "{ data: " +
360
+ JSON.stringify(data, null, 2) +
361
+ ", error: " +
362
+ JSON.stringify(error, null, 2) +
363
+ "}");
364
+ }
365
+ return {
366
+ data,
367
+ errors: error ? [new GraphQLError(error.message)] : undefined,
368
+ };
369
+ },
370
+ };
2718
371
  };
2719
372
 
2720
373
  export { MockContextProviderBuilder as M, __awaiter as _, mockEnvironmentContext as a, flushPromisesInAct as b, doNothing as d, flushPromises as f, mockCurrentUserContext as m, queryFor as q, rootContext as r };