@trackunit/react-core-contexts 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js ADDED
@@ -0,0 +1,2453 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { ApolloClient, InMemoryCache, from, split as split$1, ApolloProvider } from '@apollo/client';
3
+ import { setContext } from '@apollo/client/link/context';
4
+ import { onError } from '@apollo/client/link/error';
5
+ import * as Sentry from '@sentry/browser';
6
+ import { useEnvironment, useToken, EnvironmentContextProvider, TokenProvider, CurrentUserProvider, UserSubscriptionProvider as UserSubscriptionProvider$1 } from '@trackunit/react-core-hooks';
7
+ import { createUploadLink } from 'apollo-upload-client';
8
+ import { tokens } from '@trackunit/ui-design-tokens';
9
+ import { ThemeProvider } from '@trackunit/ui-theme';
10
+ import { EnvironmentRuntime, TokenRuntime, CurrentUserRuntime, UserSubscriptionRuntime } from '@trackunit/iris-app-runtime-core';
11
+ import * as React from 'react';
12
+
13
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
14
+
15
+ var check = function (it) {
16
+ return it && it.Math == Math && it;
17
+ };
18
+
19
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
20
+ var global$v =
21
+ // eslint-disable-next-line es-x/no-global-this -- safe
22
+ check(typeof globalThis == 'object' && globalThis) ||
23
+ check(typeof window == 'object' && window) ||
24
+ // eslint-disable-next-line no-restricted-globals -- safe
25
+ check(typeof self == 'object' && self) ||
26
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
27
+ // eslint-disable-next-line no-new-func -- fallback
28
+ (function () { return this; })() || Function('return this')();
29
+
30
+ var objectGetOwnPropertyDescriptor = {};
31
+
32
+ var fails$f = function (exec) {
33
+ try {
34
+ return !!exec();
35
+ } catch (error) {
36
+ return true;
37
+ }
38
+ };
39
+
40
+ var fails$e = fails$f;
41
+
42
+ // Detect IE8's incomplete defineProperty implementation
43
+ var descriptors = !fails$e(function () {
44
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
45
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
46
+ });
47
+
48
+ var fails$d = fails$f;
49
+
50
+ var functionBindNative = !fails$d(function () {
51
+ // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
52
+ var test = (function () { /* empty */ }).bind();
53
+ // eslint-disable-next-line no-prototype-builtins -- safe
54
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
55
+ });
56
+
57
+ var NATIVE_BIND$2 = functionBindNative;
58
+
59
+ var call$a = Function.prototype.call;
60
+
61
+ var functionCall = NATIVE_BIND$2 ? call$a.bind(call$a) : function () {
62
+ return call$a.apply(call$a, arguments);
63
+ };
64
+
65
+ var objectPropertyIsEnumerable = {};
66
+
67
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
68
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
69
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
70
+
71
+ // Nashorn ~ JDK8 bug
72
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
73
+
74
+ // `Object.prototype.propertyIsEnumerable` method implementation
75
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
76
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
77
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
78
+ return !!descriptor && descriptor.enumerable;
79
+ } : $propertyIsEnumerable;
80
+
81
+ var createPropertyDescriptor$3 = function (bitmap, value) {
82
+ return {
83
+ enumerable: !(bitmap & 1),
84
+ configurable: !(bitmap & 2),
85
+ writable: !(bitmap & 4),
86
+ value: value
87
+ };
88
+ };
89
+
90
+ var NATIVE_BIND$1 = functionBindNative;
91
+
92
+ var FunctionPrototype$2 = Function.prototype;
93
+ var bind = FunctionPrototype$2.bind;
94
+ var call$9 = FunctionPrototype$2.call;
95
+ var uncurryThis$h = NATIVE_BIND$1 && bind.bind(call$9, call$9);
96
+
97
+ var functionUncurryThis = NATIVE_BIND$1 ? function (fn) {
98
+ return fn && uncurryThis$h(fn);
99
+ } : function (fn) {
100
+ return fn && function () {
101
+ return call$9.apply(fn, arguments);
102
+ };
103
+ };
104
+
105
+ var uncurryThis$g = functionUncurryThis;
106
+
107
+ var toString$6 = uncurryThis$g({}.toString);
108
+ var stringSlice$4 = uncurryThis$g(''.slice);
109
+
110
+ var classofRaw$1 = function (it) {
111
+ return stringSlice$4(toString$6(it), 8, -1);
112
+ };
113
+
114
+ var global$u = global$v;
115
+ var uncurryThis$f = functionUncurryThis;
116
+ var fails$c = fails$f;
117
+ var classof$4 = classofRaw$1;
118
+
119
+ var Object$5 = global$u.Object;
120
+ var split = uncurryThis$f(''.split);
121
+
122
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
123
+ var indexedObject = fails$c(function () {
124
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
125
+ // eslint-disable-next-line no-prototype-builtins -- safe
126
+ return !Object$5('z').propertyIsEnumerable(0);
127
+ }) ? function (it) {
128
+ return classof$4(it) == 'String' ? split(it, '') : Object$5(it);
129
+ } : Object$5;
130
+
131
+ var global$t = global$v;
132
+
133
+ var TypeError$a = global$t.TypeError;
134
+
135
+ // `RequireObjectCoercible` abstract operation
136
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
137
+ var requireObjectCoercible$5 = function (it) {
138
+ if (it == undefined) throw TypeError$a("Can't call method on " + it);
139
+ return it;
140
+ };
141
+
142
+ // toObject with fallback for non-array-like ES3 strings
143
+ var IndexedObject$1 = indexedObject;
144
+ var requireObjectCoercible$4 = requireObjectCoercible$5;
145
+
146
+ var toIndexedObject$5 = function (it) {
147
+ return IndexedObject$1(requireObjectCoercible$4(it));
148
+ };
149
+
150
+ // `IsCallable` abstract operation
151
+ // https://tc39.es/ecma262/#sec-iscallable
152
+ var isCallable$g = function (argument) {
153
+ return typeof argument == 'function';
154
+ };
155
+
156
+ var isCallable$f = isCallable$g;
157
+
158
+ var isObject$6 = function (it) {
159
+ return typeof it == 'object' ? it !== null : isCallable$f(it);
160
+ };
161
+
162
+ var global$s = global$v;
163
+ var isCallable$e = isCallable$g;
164
+
165
+ var aFunction = function (argument) {
166
+ return isCallable$e(argument) ? argument : undefined;
167
+ };
168
+
169
+ var getBuiltIn$4 = function (namespace, method) {
170
+ return arguments.length < 2 ? aFunction(global$s[namespace]) : global$s[namespace] && global$s[namespace][method];
171
+ };
172
+
173
+ var uncurryThis$e = functionUncurryThis;
174
+
175
+ var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
176
+
177
+ var getBuiltIn$3 = getBuiltIn$4;
178
+
179
+ var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
180
+
181
+ var global$r = global$v;
182
+ var userAgent = engineUserAgent;
183
+
184
+ var process = global$r.process;
185
+ var Deno = global$r.Deno;
186
+ var versions = process && process.versions || Deno && Deno.version;
187
+ var v8 = versions && versions.v8;
188
+ var match, version;
189
+
190
+ if (v8) {
191
+ match = v8.split('.');
192
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
193
+ // but their correct versions are not interesting for us
194
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
195
+ }
196
+
197
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
198
+ // so check `userAgent` even if `.v8` exists, but 0
199
+ if (!version && userAgent) {
200
+ match = userAgent.match(/Edge\/(\d+)/);
201
+ if (!match || match[1] >= 74) {
202
+ match = userAgent.match(/Chrome\/(\d+)/);
203
+ if (match) version = +match[1];
204
+ }
205
+ }
206
+
207
+ var engineV8Version = version;
208
+
209
+ /* eslint-disable es-x/no-symbol -- required for testing */
210
+
211
+ var V8_VERSION = engineV8Version;
212
+ var fails$b = fails$f;
213
+
214
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
215
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$b(function () {
216
+ var symbol = Symbol();
217
+ // Chrome 38 Symbol has incorrect toString conversion
218
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
219
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
220
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
221
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
222
+ });
223
+
224
+ /* eslint-disable es-x/no-symbol -- required for testing */
225
+
226
+ var NATIVE_SYMBOL$1 = nativeSymbol;
227
+
228
+ var useSymbolAsUid = NATIVE_SYMBOL$1
229
+ && !Symbol.sham
230
+ && typeof Symbol.iterator == 'symbol';
231
+
232
+ var global$q = global$v;
233
+ var getBuiltIn$2 = getBuiltIn$4;
234
+ var isCallable$d = isCallable$g;
235
+ var isPrototypeOf = objectIsPrototypeOf;
236
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
237
+
238
+ var Object$4 = global$q.Object;
239
+
240
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
241
+ return typeof it == 'symbol';
242
+ } : function (it) {
243
+ var $Symbol = getBuiltIn$2('Symbol');
244
+ return isCallable$d($Symbol) && isPrototypeOf($Symbol.prototype, Object$4(it));
245
+ };
246
+
247
+ var global$p = global$v;
248
+
249
+ var String$4 = global$p.String;
250
+
251
+ var tryToString$1 = function (argument) {
252
+ try {
253
+ return String$4(argument);
254
+ } catch (error) {
255
+ return 'Object';
256
+ }
257
+ };
258
+
259
+ var global$o = global$v;
260
+ var isCallable$c = isCallable$g;
261
+ var tryToString = tryToString$1;
262
+
263
+ var TypeError$9 = global$o.TypeError;
264
+
265
+ // `Assert: IsCallable(argument) is true`
266
+ var aCallable$1 = function (argument) {
267
+ if (isCallable$c(argument)) return argument;
268
+ throw TypeError$9(tryToString(argument) + ' is not a function');
269
+ };
270
+
271
+ var aCallable = aCallable$1;
272
+
273
+ // `GetMethod` abstract operation
274
+ // https://tc39.es/ecma262/#sec-getmethod
275
+ var getMethod$2 = function (V, P) {
276
+ var func = V[P];
277
+ return func == null ? undefined : aCallable(func);
278
+ };
279
+
280
+ var global$n = global$v;
281
+ var call$8 = functionCall;
282
+ var isCallable$b = isCallable$g;
283
+ var isObject$5 = isObject$6;
284
+
285
+ var TypeError$8 = global$n.TypeError;
286
+
287
+ // `OrdinaryToPrimitive` abstract operation
288
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
289
+ var ordinaryToPrimitive$1 = function (input, pref) {
290
+ var fn, val;
291
+ if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$5(val = call$8(fn, input))) return val;
292
+ if (isCallable$b(fn = input.valueOf) && !isObject$5(val = call$8(fn, input))) return val;
293
+ if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$5(val = call$8(fn, input))) return val;
294
+ throw TypeError$8("Can't convert object to primitive value");
295
+ };
296
+
297
+ var shared$4 = {exports: {}};
298
+
299
+ var global$m = global$v;
300
+
301
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
302
+ var defineProperty$3 = Object.defineProperty;
303
+
304
+ var setGlobal$3 = function (key, value) {
305
+ try {
306
+ defineProperty$3(global$m, key, { value: value, configurable: true, writable: true });
307
+ } catch (error) {
308
+ global$m[key] = value;
309
+ } return value;
310
+ };
311
+
312
+ var global$l = global$v;
313
+ var setGlobal$2 = setGlobal$3;
314
+
315
+ var SHARED = '__core-js_shared__';
316
+ var store$3 = global$l[SHARED] || setGlobal$2(SHARED, {});
317
+
318
+ var sharedStore = store$3;
319
+
320
+ var store$2 = sharedStore;
321
+
322
+ (shared$4.exports = function (key, value) {
323
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
324
+ })('versions', []).push({
325
+ version: '3.22.0',
326
+ mode: 'global',
327
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
328
+ license: 'https://github.com/zloirock/core-js/blob/v3.22.0/LICENSE',
329
+ source: 'https://github.com/zloirock/core-js'
330
+ });
331
+
332
+ var global$k = global$v;
333
+ var requireObjectCoercible$3 = requireObjectCoercible$5;
334
+
335
+ var Object$3 = global$k.Object;
336
+
337
+ // `ToObject` abstract operation
338
+ // https://tc39.es/ecma262/#sec-toobject
339
+ var toObject$4 = function (argument) {
340
+ return Object$3(requireObjectCoercible$3(argument));
341
+ };
342
+
343
+ var uncurryThis$d = functionUncurryThis;
344
+ var toObject$3 = toObject$4;
345
+
346
+ var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
347
+
348
+ // `HasOwnProperty` abstract operation
349
+ // https://tc39.es/ecma262/#sec-hasownproperty
350
+ // eslint-disable-next-line es-x/no-object-hasown -- safe
351
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
352
+ return hasOwnProperty(toObject$3(it), key);
353
+ };
354
+
355
+ var uncurryThis$c = functionUncurryThis;
356
+
357
+ var id = 0;
358
+ var postfix = Math.random();
359
+ var toString$5 = uncurryThis$c(1.0.toString);
360
+
361
+ var uid$2 = function (key) {
362
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
363
+ };
364
+
365
+ var global$j = global$v;
366
+ var shared$3 = shared$4.exports;
367
+ var hasOwn$8 = hasOwnProperty_1;
368
+ var uid$1 = uid$2;
369
+ var NATIVE_SYMBOL = nativeSymbol;
370
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
371
+
372
+ var WellKnownSymbolsStore = shared$3('wks');
373
+ var Symbol$1 = global$j.Symbol;
374
+ var symbolFor = Symbol$1 && Symbol$1['for'];
375
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
376
+
377
+ var wellKnownSymbol$c = function (name) {
378
+ if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
379
+ var description = 'Symbol.' + name;
380
+ if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
381
+ WellKnownSymbolsStore[name] = Symbol$1[name];
382
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
383
+ WellKnownSymbolsStore[name] = symbolFor(description);
384
+ } else {
385
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
386
+ }
387
+ } return WellKnownSymbolsStore[name];
388
+ };
389
+
390
+ var global$i = global$v;
391
+ var call$7 = functionCall;
392
+ var isObject$4 = isObject$6;
393
+ var isSymbol$1 = isSymbol$2;
394
+ var getMethod$1 = getMethod$2;
395
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
396
+ var wellKnownSymbol$b = wellKnownSymbol$c;
397
+
398
+ var TypeError$7 = global$i.TypeError;
399
+ var TO_PRIMITIVE = wellKnownSymbol$b('toPrimitive');
400
+
401
+ // `ToPrimitive` abstract operation
402
+ // https://tc39.es/ecma262/#sec-toprimitive
403
+ var toPrimitive$1 = function (input, pref) {
404
+ if (!isObject$4(input) || isSymbol$1(input)) return input;
405
+ var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
406
+ var result;
407
+ if (exoticToPrim) {
408
+ if (pref === undefined) pref = 'default';
409
+ result = call$7(exoticToPrim, input, pref);
410
+ if (!isObject$4(result) || isSymbol$1(result)) return result;
411
+ throw TypeError$7("Can't convert object to primitive value");
412
+ }
413
+ if (pref === undefined) pref = 'number';
414
+ return ordinaryToPrimitive(input, pref);
415
+ };
416
+
417
+ var toPrimitive = toPrimitive$1;
418
+ var isSymbol = isSymbol$2;
419
+
420
+ // `ToPropertyKey` abstract operation
421
+ // https://tc39.es/ecma262/#sec-topropertykey
422
+ var toPropertyKey$2 = function (argument) {
423
+ var key = toPrimitive(argument, 'string');
424
+ return isSymbol(key) ? key : key + '';
425
+ };
426
+
427
+ var global$h = global$v;
428
+ var isObject$3 = isObject$6;
429
+
430
+ var document$1 = global$h.document;
431
+ // typeof document.createElement is 'object' in old IE
432
+ var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
433
+
434
+ var documentCreateElement$2 = function (it) {
435
+ return EXISTS$1 ? document$1.createElement(it) : {};
436
+ };
437
+
438
+ var DESCRIPTORS$8 = descriptors;
439
+ var fails$a = fails$f;
440
+ var createElement = documentCreateElement$2;
441
+
442
+ // Thanks to IE8 for its funny defineProperty
443
+ var ie8DomDefine = !DESCRIPTORS$8 && !fails$a(function () {
444
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
445
+ return Object.defineProperty(createElement('div'), 'a', {
446
+ get: function () { return 7; }
447
+ }).a != 7;
448
+ });
449
+
450
+ var DESCRIPTORS$7 = descriptors;
451
+ var call$6 = functionCall;
452
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
453
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
454
+ var toIndexedObject$4 = toIndexedObject$5;
455
+ var toPropertyKey$1 = toPropertyKey$2;
456
+ var hasOwn$7 = hasOwnProperty_1;
457
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
458
+
459
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
460
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
461
+
462
+ // `Object.getOwnPropertyDescriptor` method
463
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
464
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
465
+ O = toIndexedObject$4(O);
466
+ P = toPropertyKey$1(P);
467
+ if (IE8_DOM_DEFINE$1) try {
468
+ return $getOwnPropertyDescriptor$1(O, P);
469
+ } catch (error) { /* empty */ }
470
+ if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$6(propertyIsEnumerableModule$1.f, O, P), O[P]);
471
+ };
472
+
473
+ var objectDefineProperty = {};
474
+
475
+ var DESCRIPTORS$6 = descriptors;
476
+ var fails$9 = fails$f;
477
+
478
+ // V8 ~ Chrome 36-
479
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
480
+ var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$9(function () {
481
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
482
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
483
+ value: 42,
484
+ writable: false
485
+ }).prototype != 42;
486
+ });
487
+
488
+ var global$g = global$v;
489
+ var isObject$2 = isObject$6;
490
+
491
+ var String$3 = global$g.String;
492
+ var TypeError$6 = global$g.TypeError;
493
+
494
+ // `Assert: Type(argument) is Object`
495
+ var anObject$8 = function (argument) {
496
+ if (isObject$2(argument)) return argument;
497
+ throw TypeError$6(String$3(argument) + ' is not an object');
498
+ };
499
+
500
+ var global$f = global$v;
501
+ var DESCRIPTORS$5 = descriptors;
502
+ var IE8_DOM_DEFINE = ie8DomDefine;
503
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
504
+ var anObject$7 = anObject$8;
505
+ var toPropertyKey = toPropertyKey$2;
506
+
507
+ var TypeError$5 = global$f.TypeError;
508
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
509
+ var $defineProperty = Object.defineProperty;
510
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
511
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
512
+ var ENUMERABLE = 'enumerable';
513
+ var CONFIGURABLE$1 = 'configurable';
514
+ var WRITABLE = 'writable';
515
+
516
+ // `Object.defineProperty` method
517
+ // https://tc39.es/ecma262/#sec-object.defineproperty
518
+ objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
519
+ anObject$7(O);
520
+ P = toPropertyKey(P);
521
+ anObject$7(Attributes);
522
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
523
+ var current = $getOwnPropertyDescriptor(O, P);
524
+ if (current && current[WRITABLE]) {
525
+ O[P] = Attributes.value;
526
+ Attributes = {
527
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
528
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
529
+ writable: false
530
+ };
531
+ }
532
+ } return $defineProperty(O, P, Attributes);
533
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
534
+ anObject$7(O);
535
+ P = toPropertyKey(P);
536
+ anObject$7(Attributes);
537
+ if (IE8_DOM_DEFINE) try {
538
+ return $defineProperty(O, P, Attributes);
539
+ } catch (error) { /* empty */ }
540
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$5('Accessors not supported');
541
+ if ('value' in Attributes) O[P] = Attributes.value;
542
+ return O;
543
+ };
544
+
545
+ var DESCRIPTORS$4 = descriptors;
546
+ var definePropertyModule$3 = objectDefineProperty;
547
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
548
+
549
+ var createNonEnumerableProperty$6 = DESCRIPTORS$4 ? function (object, key, value) {
550
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
551
+ } : function (object, key, value) {
552
+ object[key] = value;
553
+ return object;
554
+ };
555
+
556
+ var redefine$4 = {exports: {}};
557
+
558
+ var uncurryThis$b = functionUncurryThis;
559
+ var isCallable$a = isCallable$g;
560
+ var store$1 = sharedStore;
561
+
562
+ var functionToString = uncurryThis$b(Function.toString);
563
+
564
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
565
+ if (!isCallable$a(store$1.inspectSource)) {
566
+ store$1.inspectSource = function (it) {
567
+ return functionToString(it);
568
+ };
569
+ }
570
+
571
+ var inspectSource$2 = store$1.inspectSource;
572
+
573
+ var global$e = global$v;
574
+ var isCallable$9 = isCallable$g;
575
+ var inspectSource$1 = inspectSource$2;
576
+
577
+ var WeakMap$1 = global$e.WeakMap;
578
+
579
+ var nativeWeakMap = isCallable$9(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
580
+
581
+ var shared$2 = shared$4.exports;
582
+ var uid = uid$2;
583
+
584
+ var keys = shared$2('keys');
585
+
586
+ var sharedKey$3 = function (key) {
587
+ return keys[key] || (keys[key] = uid(key));
588
+ };
589
+
590
+ var hiddenKeys$4 = {};
591
+
592
+ var NATIVE_WEAK_MAP = nativeWeakMap;
593
+ var global$d = global$v;
594
+ var uncurryThis$a = functionUncurryThis;
595
+ var isObject$1 = isObject$6;
596
+ var createNonEnumerableProperty$5 = createNonEnumerableProperty$6;
597
+ var hasOwn$6 = hasOwnProperty_1;
598
+ var shared$1 = sharedStore;
599
+ var sharedKey$2 = sharedKey$3;
600
+ var hiddenKeys$3 = hiddenKeys$4;
601
+
602
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
603
+ var TypeError$4 = global$d.TypeError;
604
+ var WeakMap = global$d.WeakMap;
605
+ var set, get, has;
606
+
607
+ var enforce = function (it) {
608
+ return has(it) ? get(it) : set(it, {});
609
+ };
610
+
611
+ var getterFor = function (TYPE) {
612
+ return function (it) {
613
+ var state;
614
+ if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
615
+ throw TypeError$4('Incompatible receiver, ' + TYPE + ' required');
616
+ } return state;
617
+ };
618
+ };
619
+
620
+ if (NATIVE_WEAK_MAP || shared$1.state) {
621
+ var store = shared$1.state || (shared$1.state = new WeakMap());
622
+ var wmget = uncurryThis$a(store.get);
623
+ var wmhas = uncurryThis$a(store.has);
624
+ var wmset = uncurryThis$a(store.set);
625
+ set = function (it, metadata) {
626
+ if (wmhas(store, it)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
627
+ metadata.facade = it;
628
+ wmset(store, it, metadata);
629
+ return metadata;
630
+ };
631
+ get = function (it) {
632
+ return wmget(store, it) || {};
633
+ };
634
+ has = function (it) {
635
+ return wmhas(store, it);
636
+ };
637
+ } else {
638
+ var STATE = sharedKey$2('state');
639
+ hiddenKeys$3[STATE] = true;
640
+ set = function (it, metadata) {
641
+ if (hasOwn$6(it, STATE)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
642
+ metadata.facade = it;
643
+ createNonEnumerableProperty$5(it, STATE, metadata);
644
+ return metadata;
645
+ };
646
+ get = function (it) {
647
+ return hasOwn$6(it, STATE) ? it[STATE] : {};
648
+ };
649
+ has = function (it) {
650
+ return hasOwn$6(it, STATE);
651
+ };
652
+ }
653
+
654
+ var internalState = {
655
+ set: set,
656
+ get: get,
657
+ has: has,
658
+ enforce: enforce,
659
+ getterFor: getterFor
660
+ };
661
+
662
+ var DESCRIPTORS$3 = descriptors;
663
+ var hasOwn$5 = hasOwnProperty_1;
664
+
665
+ var FunctionPrototype$1 = Function.prototype;
666
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
667
+ var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
668
+
669
+ var EXISTS = hasOwn$5(FunctionPrototype$1, 'name');
670
+ // additional protection from minified / mangled / dropped function names
671
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
672
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype$1, 'name').configurable));
673
+
674
+ var functionName = {
675
+ EXISTS: EXISTS,
676
+ PROPER: PROPER,
677
+ CONFIGURABLE: CONFIGURABLE
678
+ };
679
+
680
+ var global$c = global$v;
681
+ var isCallable$8 = isCallable$g;
682
+ var hasOwn$4 = hasOwnProperty_1;
683
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$6;
684
+ var setGlobal$1 = setGlobal$3;
685
+ var inspectSource = inspectSource$2;
686
+ var InternalStateModule$1 = internalState;
687
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
688
+
689
+ var getInternalState$2 = InternalStateModule$1.get;
690
+ var enforceInternalState = InternalStateModule$1.enforce;
691
+ var TEMPLATE = String(String).split('String');
692
+
693
+ (redefine$4.exports = function (O, key, value, options) {
694
+ var unsafe = options ? !!options.unsafe : false;
695
+ var simple = options ? !!options.enumerable : false;
696
+ var noTargetGet = options ? !!options.noTargetGet : false;
697
+ var name = options && options.name !== undefined ? options.name : key;
698
+ var state;
699
+ if (isCallable$8(value)) {
700
+ if (String(name).slice(0, 7) === 'Symbol(') {
701
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
702
+ }
703
+ if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
704
+ createNonEnumerableProperty$4(value, 'name', name);
705
+ }
706
+ state = enforceInternalState(value);
707
+ if (!state.source) {
708
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
709
+ }
710
+ }
711
+ if (O === global$c) {
712
+ if (simple) O[key] = value;
713
+ else setGlobal$1(key, value);
714
+ return;
715
+ } else if (!unsafe) {
716
+ delete O[key];
717
+ } else if (!noTargetGet && O[key]) {
718
+ simple = true;
719
+ }
720
+ if (simple) O[key] = value;
721
+ else createNonEnumerableProperty$4(O, key, value);
722
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
723
+ })(Function.prototype, 'toString', function toString() {
724
+ return isCallable$8(this) && getInternalState$2(this).source || inspectSource(this);
725
+ });
726
+
727
+ var objectGetOwnPropertyNames = {};
728
+
729
+ var ceil = Math.ceil;
730
+ var floor$1 = Math.floor;
731
+
732
+ // `ToIntegerOrInfinity` abstract operation
733
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
734
+ var toIntegerOrInfinity$4 = function (argument) {
735
+ var number = +argument;
736
+ // eslint-disable-next-line no-self-compare -- safe
737
+ return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
738
+ };
739
+
740
+ var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
741
+
742
+ var max$1 = Math.max;
743
+ var min$2 = Math.min;
744
+
745
+ // Helper for a popular repeating case of the spec:
746
+ // Let integer be ? ToInteger(index).
747
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
748
+ var toAbsoluteIndex$1 = function (index, length) {
749
+ var integer = toIntegerOrInfinity$3(index);
750
+ return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
751
+ };
752
+
753
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
754
+
755
+ var min$1 = Math.min;
756
+
757
+ // `ToLength` abstract operation
758
+ // https://tc39.es/ecma262/#sec-tolength
759
+ var toLength$2 = function (argument) {
760
+ return argument > 0 ? min$1(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
761
+ };
762
+
763
+ var toLength$1 = toLength$2;
764
+
765
+ // `LengthOfArrayLike` abstract operation
766
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
767
+ var lengthOfArrayLike$1 = function (obj) {
768
+ return toLength$1(obj.length);
769
+ };
770
+
771
+ var toIndexedObject$3 = toIndexedObject$5;
772
+ var toAbsoluteIndex = toAbsoluteIndex$1;
773
+ var lengthOfArrayLike = lengthOfArrayLike$1;
774
+
775
+ // `Array.prototype.{ indexOf, includes }` methods implementation
776
+ var createMethod$1 = function (IS_INCLUDES) {
777
+ return function ($this, el, fromIndex) {
778
+ var O = toIndexedObject$3($this);
779
+ var length = lengthOfArrayLike(O);
780
+ var index = toAbsoluteIndex(fromIndex, length);
781
+ var value;
782
+ // Array#includes uses SameValueZero equality algorithm
783
+ // eslint-disable-next-line no-self-compare -- NaN check
784
+ if (IS_INCLUDES && el != el) while (length > index) {
785
+ value = O[index++];
786
+ // eslint-disable-next-line no-self-compare -- NaN check
787
+ if (value != value) return true;
788
+ // Array#indexOf ignores holes, Array#includes - not
789
+ } else for (;length > index; index++) {
790
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
791
+ } return !IS_INCLUDES && -1;
792
+ };
793
+ };
794
+
795
+ var arrayIncludes = {
796
+ // `Array.prototype.includes` method
797
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
798
+ includes: createMethod$1(true),
799
+ // `Array.prototype.indexOf` method
800
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
801
+ indexOf: createMethod$1(false)
802
+ };
803
+
804
+ var uncurryThis$9 = functionUncurryThis;
805
+ var hasOwn$3 = hasOwnProperty_1;
806
+ var toIndexedObject$2 = toIndexedObject$5;
807
+ var indexOf$1 = arrayIncludes.indexOf;
808
+ var hiddenKeys$2 = hiddenKeys$4;
809
+
810
+ var push$1 = uncurryThis$9([].push);
811
+
812
+ var objectKeysInternal = function (object, names) {
813
+ var O = toIndexedObject$2(object);
814
+ var i = 0;
815
+ var result = [];
816
+ var key;
817
+ for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push$1(result, key);
818
+ // Don't enum bug & hidden keys
819
+ while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
820
+ ~indexOf$1(result, key) || push$1(result, key);
821
+ }
822
+ return result;
823
+ };
824
+
825
+ // IE8- don't enum bug keys
826
+ var enumBugKeys$3 = [
827
+ 'constructor',
828
+ 'hasOwnProperty',
829
+ 'isPrototypeOf',
830
+ 'propertyIsEnumerable',
831
+ 'toLocaleString',
832
+ 'toString',
833
+ 'valueOf'
834
+ ];
835
+
836
+ var internalObjectKeys$1 = objectKeysInternal;
837
+ var enumBugKeys$2 = enumBugKeys$3;
838
+
839
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
840
+
841
+ // `Object.getOwnPropertyNames` method
842
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
843
+ // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
844
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
845
+ return internalObjectKeys$1(O, hiddenKeys$1);
846
+ };
847
+
848
+ var objectGetOwnPropertySymbols = {};
849
+
850
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
851
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
852
+
853
+ var getBuiltIn$1 = getBuiltIn$4;
854
+ var uncurryThis$8 = functionUncurryThis;
855
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
856
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
857
+ var anObject$6 = anObject$8;
858
+
859
+ var concat$2 = uncurryThis$8([].concat);
860
+
861
+ // all object keys, includes non-enumerable and symbols
862
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
863
+ var keys = getOwnPropertyNamesModule.f(anObject$6(it));
864
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
865
+ return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
866
+ };
867
+
868
+ var hasOwn$2 = hasOwnProperty_1;
869
+ var ownKeys = ownKeys$1;
870
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
871
+ var definePropertyModule$2 = objectDefineProperty;
872
+
873
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
874
+ var keys = ownKeys(source);
875
+ var defineProperty = definePropertyModule$2.f;
876
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
877
+ for (var i = 0; i < keys.length; i++) {
878
+ var key = keys[i];
879
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
880
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
881
+ }
882
+ }
883
+ };
884
+
885
+ var fails$8 = fails$f;
886
+ var isCallable$7 = isCallable$g;
887
+
888
+ var replacement = /#|\.prototype\./;
889
+
890
+ var isForced$1 = function (feature, detection) {
891
+ var value = data[normalize(feature)];
892
+ return value == POLYFILL ? true
893
+ : value == NATIVE ? false
894
+ : isCallable$7(detection) ? fails$8(detection)
895
+ : !!detection;
896
+ };
897
+
898
+ var normalize = isForced$1.normalize = function (string) {
899
+ return String(string).replace(replacement, '.').toLowerCase();
900
+ };
901
+
902
+ var data = isForced$1.data = {};
903
+ var NATIVE = isForced$1.NATIVE = 'N';
904
+ var POLYFILL = isForced$1.POLYFILL = 'P';
905
+
906
+ var isForced_1 = isForced$1;
907
+
908
+ var global$b = global$v;
909
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
910
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$6;
911
+ var redefine$3 = redefine$4.exports;
912
+ var setGlobal = setGlobal$3;
913
+ var copyConstructorProperties = copyConstructorProperties$1;
914
+ var isForced = isForced_1;
915
+
916
+ /*
917
+ options.target - name of the target object
918
+ options.global - target is the global object
919
+ options.stat - export as static methods of target
920
+ options.proto - export as prototype methods of target
921
+ options.real - real prototype method for the `pure` version
922
+ options.forced - export even if the native feature is available
923
+ options.bind - bind methods to the target, required for the `pure` version
924
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
925
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
926
+ options.sham - add a flag to not completely full polyfills
927
+ options.enumerable - export as enumerable property
928
+ options.noTargetGet - prevent calling a getter on target
929
+ options.name - the .name of the function if it does not match the key
930
+ */
931
+ var _export = function (options, source) {
932
+ var TARGET = options.target;
933
+ var GLOBAL = options.global;
934
+ var STATIC = options.stat;
935
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
936
+ if (GLOBAL) {
937
+ target = global$b;
938
+ } else if (STATIC) {
939
+ target = global$b[TARGET] || setGlobal(TARGET, {});
940
+ } else {
941
+ target = (global$b[TARGET] || {}).prototype;
942
+ }
943
+ if (target) for (key in source) {
944
+ sourceProperty = source[key];
945
+ if (options.noTargetGet) {
946
+ descriptor = getOwnPropertyDescriptor(target, key);
947
+ targetProperty = descriptor && descriptor.value;
948
+ } else targetProperty = target[key];
949
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
950
+ // contained in target
951
+ if (!FORCED && targetProperty !== undefined) {
952
+ if (typeof sourceProperty == typeof targetProperty) continue;
953
+ copyConstructorProperties(sourceProperty, targetProperty);
954
+ }
955
+ // add a flag to not completely full polyfills
956
+ if (options.sham || (targetProperty && targetProperty.sham)) {
957
+ createNonEnumerableProperty$3(sourceProperty, 'sham', true);
958
+ }
959
+ // extend global
960
+ redefine$3(target, key, sourceProperty, options);
961
+ }
962
+ };
963
+
964
+ var internalObjectKeys = objectKeysInternal;
965
+ var enumBugKeys$1 = enumBugKeys$3;
966
+
967
+ // `Object.keys` method
968
+ // https://tc39.es/ecma262/#sec-object.keys
969
+ // eslint-disable-next-line es-x/no-object-keys -- safe
970
+ var objectKeys$2 = Object.keys || function keys(O) {
971
+ return internalObjectKeys(O, enumBugKeys$1);
972
+ };
973
+
974
+ var DESCRIPTORS$2 = descriptors;
975
+ var uncurryThis$7 = functionUncurryThis;
976
+ var call$5 = functionCall;
977
+ var fails$7 = fails$f;
978
+ var objectKeys$1 = objectKeys$2;
979
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
980
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
981
+ var toObject$2 = toObject$4;
982
+ var IndexedObject = indexedObject;
983
+
984
+ // eslint-disable-next-line es-x/no-object-assign -- safe
985
+ var $assign = Object.assign;
986
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
987
+ var defineProperty$2 = Object.defineProperty;
988
+ var concat$1 = uncurryThis$7([].concat);
989
+
990
+ // `Object.assign` method
991
+ // https://tc39.es/ecma262/#sec-object.assign
992
+ var objectAssign = !$assign || fails$7(function () {
993
+ // should have correct order of operations (Edge bug)
994
+ if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
995
+ enumerable: true,
996
+ get: function () {
997
+ defineProperty$2(this, 'b', {
998
+ value: 3,
999
+ enumerable: false
1000
+ });
1001
+ }
1002
+ }), { b: 2 })).b !== 1) return true;
1003
+ // should work with symbols and should have deterministic property order (V8 bug)
1004
+ var A = {};
1005
+ var B = {};
1006
+ // eslint-disable-next-line es-x/no-symbol -- safe
1007
+ var symbol = Symbol();
1008
+ var alphabet = 'abcdefghijklmnopqrst';
1009
+ A[symbol] = 7;
1010
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1011
+ return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
1012
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1013
+ var T = toObject$2(target);
1014
+ var argumentsLength = arguments.length;
1015
+ var index = 1;
1016
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1017
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1018
+ while (argumentsLength > index) {
1019
+ var S = IndexedObject(arguments[index++]);
1020
+ var keys = getOwnPropertySymbols ? concat$1(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1021
+ var length = keys.length;
1022
+ var j = 0;
1023
+ var key;
1024
+ while (length > j) {
1025
+ key = keys[j++];
1026
+ if (!DESCRIPTORS$2 || call$5(propertyIsEnumerable, S, key)) T[key] = S[key];
1027
+ }
1028
+ } return T;
1029
+ } : $assign;
1030
+
1031
+ var $$3 = _export;
1032
+ var assign = objectAssign;
1033
+
1034
+ // `Object.assign` method
1035
+ // https://tc39.es/ecma262/#sec-object.assign
1036
+ // eslint-disable-next-line es-x/no-object-assign -- required for testing
1037
+ $$3({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1038
+ assign: assign
1039
+ });
1040
+
1041
+ var isObject = isObject$6;
1042
+ var classof$3 = classofRaw$1;
1043
+ var wellKnownSymbol$a = wellKnownSymbol$c;
1044
+
1045
+ var MATCH$1 = wellKnownSymbol$a('match');
1046
+
1047
+ // `IsRegExp` abstract operation
1048
+ // https://tc39.es/ecma262/#sec-isregexp
1049
+ var isRegexp = function (it) {
1050
+ var isRegExp;
1051
+ return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$3(it) == 'RegExp');
1052
+ };
1053
+
1054
+ var global$a = global$v;
1055
+ var isRegExp = isRegexp;
1056
+
1057
+ var TypeError$3 = global$a.TypeError;
1058
+
1059
+ var notARegexp = function (it) {
1060
+ if (isRegExp(it)) {
1061
+ throw TypeError$3("The method doesn't accept regular expressions");
1062
+ } return it;
1063
+ };
1064
+
1065
+ var wellKnownSymbol$9 = wellKnownSymbol$c;
1066
+
1067
+ var TO_STRING_TAG$3 = wellKnownSymbol$9('toStringTag');
1068
+ var test = {};
1069
+
1070
+ test[TO_STRING_TAG$3] = 'z';
1071
+
1072
+ var toStringTagSupport = String(test) === '[object z]';
1073
+
1074
+ var global$9 = global$v;
1075
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1076
+ var isCallable$6 = isCallable$g;
1077
+ var classofRaw = classofRaw$1;
1078
+ var wellKnownSymbol$8 = wellKnownSymbol$c;
1079
+
1080
+ var TO_STRING_TAG$2 = wellKnownSymbol$8('toStringTag');
1081
+ var Object$2 = global$9.Object;
1082
+
1083
+ // ES3 wrong here
1084
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1085
+
1086
+ // fallback for IE11 Script Access Denied error
1087
+ var tryGet = function (it, key) {
1088
+ try {
1089
+ return it[key];
1090
+ } catch (error) { /* empty */ }
1091
+ };
1092
+
1093
+ // getting tag from ES6+ `Object.prototype.toString`
1094
+ var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1095
+ var O, tag, result;
1096
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1097
+ // @@toStringTag case
1098
+ : typeof (tag = tryGet(O = Object$2(it), TO_STRING_TAG$2)) == 'string' ? tag
1099
+ // builtinTag case
1100
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1101
+ // ES3 arguments fallback
1102
+ : (result = classofRaw(O)) == 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
1103
+ };
1104
+
1105
+ var global$8 = global$v;
1106
+ var classof$1 = classof$2;
1107
+
1108
+ var String$2 = global$8.String;
1109
+
1110
+ var toString$4 = function (argument) {
1111
+ if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1112
+ return String$2(argument);
1113
+ };
1114
+
1115
+ var wellKnownSymbol$7 = wellKnownSymbol$c;
1116
+
1117
+ var MATCH = wellKnownSymbol$7('match');
1118
+
1119
+ var correctIsRegexpLogic = function (METHOD_NAME) {
1120
+ var regexp = /./;
1121
+ try {
1122
+ '/./'[METHOD_NAME](regexp);
1123
+ } catch (error1) {
1124
+ try {
1125
+ regexp[MATCH] = false;
1126
+ return '/./'[METHOD_NAME](regexp);
1127
+ } catch (error2) { /* empty */ }
1128
+ } return false;
1129
+ };
1130
+
1131
+ var $$2 = _export;
1132
+ var uncurryThis$6 = functionUncurryThis;
1133
+ var notARegExp = notARegexp;
1134
+ var requireObjectCoercible$2 = requireObjectCoercible$5;
1135
+ var toString$3 = toString$4;
1136
+ var correctIsRegExpLogic = correctIsRegexpLogic;
1137
+
1138
+ var stringIndexOf$1 = uncurryThis$6(''.indexOf);
1139
+
1140
+ // `String.prototype.includes` method
1141
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
1142
+ $$2({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1143
+ includes: function includes(searchString /* , position = 0 */) {
1144
+ return !!~stringIndexOf$1(
1145
+ toString$3(requireObjectCoercible$2(this)),
1146
+ toString$3(notARegExp(searchString)),
1147
+ arguments.length > 1 ? arguments[1] : undefined
1148
+ );
1149
+ }
1150
+ });
1151
+
1152
+ var anObject$5 = anObject$8;
1153
+
1154
+ // `RegExp.prototype.flags` getter implementation
1155
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1156
+ var regexpFlags$1 = function () {
1157
+ var that = anObject$5(this);
1158
+ var result = '';
1159
+ if (that.global) result += 'g';
1160
+ if (that.ignoreCase) result += 'i';
1161
+ if (that.multiline) result += 'm';
1162
+ if (that.dotAll) result += 's';
1163
+ if (that.unicode) result += 'u';
1164
+ if (that.sticky) result += 'y';
1165
+ return result;
1166
+ };
1167
+
1168
+ var fails$6 = fails$f;
1169
+ var global$7 = global$v;
1170
+
1171
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1172
+ var $RegExp$2 = global$7.RegExp;
1173
+
1174
+ var UNSUPPORTED_Y$1 = fails$6(function () {
1175
+ var re = $RegExp$2('a', 'y');
1176
+ re.lastIndex = 2;
1177
+ return re.exec('abcd') != null;
1178
+ });
1179
+
1180
+ // UC Browser bug
1181
+ // https://github.com/zloirock/core-js/issues/1008
1182
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$6(function () {
1183
+ return !$RegExp$2('a', 'y').sticky;
1184
+ });
1185
+
1186
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$6(function () {
1187
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1188
+ var re = $RegExp$2('^r', 'gy');
1189
+ re.lastIndex = 2;
1190
+ return re.exec('str') != null;
1191
+ });
1192
+
1193
+ var regexpStickyHelpers = {
1194
+ BROKEN_CARET: BROKEN_CARET,
1195
+ MISSED_STICKY: MISSED_STICKY,
1196
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1
1197
+ };
1198
+
1199
+ var objectDefineProperties = {};
1200
+
1201
+ var DESCRIPTORS$1 = descriptors;
1202
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1203
+ var definePropertyModule$1 = objectDefineProperty;
1204
+ var anObject$4 = anObject$8;
1205
+ var toIndexedObject$1 = toIndexedObject$5;
1206
+ var objectKeys = objectKeys$2;
1207
+
1208
+ // `Object.defineProperties` method
1209
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1210
+ // eslint-disable-next-line es-x/no-object-defineproperties -- safe
1211
+ objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1212
+ anObject$4(O);
1213
+ var props = toIndexedObject$1(Properties);
1214
+ var keys = objectKeys(Properties);
1215
+ var length = keys.length;
1216
+ var index = 0;
1217
+ var key;
1218
+ while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
1219
+ return O;
1220
+ };
1221
+
1222
+ var getBuiltIn = getBuiltIn$4;
1223
+
1224
+ var html$1 = getBuiltIn('document', 'documentElement');
1225
+
1226
+ /* global ActiveXObject -- old IE, WSH */
1227
+
1228
+ var anObject$3 = anObject$8;
1229
+ var definePropertiesModule = objectDefineProperties;
1230
+ var enumBugKeys = enumBugKeys$3;
1231
+ var hiddenKeys = hiddenKeys$4;
1232
+ var html = html$1;
1233
+ var documentCreateElement$1 = documentCreateElement$2;
1234
+ var sharedKey$1 = sharedKey$3;
1235
+
1236
+ var GT = '>';
1237
+ var LT = '<';
1238
+ var PROTOTYPE = 'prototype';
1239
+ var SCRIPT = 'script';
1240
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1241
+
1242
+ var EmptyConstructor = function () { /* empty */ };
1243
+
1244
+ var scriptTag = function (content) {
1245
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1246
+ };
1247
+
1248
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1249
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1250
+ activeXDocument.write(scriptTag(''));
1251
+ activeXDocument.close();
1252
+ var temp = activeXDocument.parentWindow.Object;
1253
+ activeXDocument = null; // avoid memory leak
1254
+ return temp;
1255
+ };
1256
+
1257
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1258
+ var NullProtoObjectViaIFrame = function () {
1259
+ // Thrash, waste and sodomy: IE GC bug
1260
+ var iframe = documentCreateElement$1('iframe');
1261
+ var JS = 'java' + SCRIPT + ':';
1262
+ var iframeDocument;
1263
+ iframe.style.display = 'none';
1264
+ html.appendChild(iframe);
1265
+ // https://github.com/zloirock/core-js/issues/475
1266
+ iframe.src = String(JS);
1267
+ iframeDocument = iframe.contentWindow.document;
1268
+ iframeDocument.open();
1269
+ iframeDocument.write(scriptTag('document.F=Object'));
1270
+ iframeDocument.close();
1271
+ return iframeDocument.F;
1272
+ };
1273
+
1274
+ // Check for document.domain and active x support
1275
+ // No need to use active x approach when document.domain is not set
1276
+ // see https://github.com/es-shims/es5-shim/issues/150
1277
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1278
+ // avoid IE GC bug
1279
+ var activeXDocument;
1280
+ var NullProtoObject = function () {
1281
+ try {
1282
+ activeXDocument = new ActiveXObject('htmlfile');
1283
+ } catch (error) { /* ignore */ }
1284
+ NullProtoObject = typeof document != 'undefined'
1285
+ ? document.domain && activeXDocument
1286
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1287
+ : NullProtoObjectViaIFrame()
1288
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1289
+ var length = enumBugKeys.length;
1290
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1291
+ return NullProtoObject();
1292
+ };
1293
+
1294
+ hiddenKeys[IE_PROTO$1] = true;
1295
+
1296
+ // `Object.create` method
1297
+ // https://tc39.es/ecma262/#sec-object.create
1298
+ // eslint-disable-next-line es-x/no-object-create -- safe
1299
+ var objectCreate = Object.create || function create(O, Properties) {
1300
+ var result;
1301
+ if (O !== null) {
1302
+ EmptyConstructor[PROTOTYPE] = anObject$3(O);
1303
+ result = new EmptyConstructor();
1304
+ EmptyConstructor[PROTOTYPE] = null;
1305
+ // add "__proto__" for Object.getPrototypeOf polyfill
1306
+ result[IE_PROTO$1] = O;
1307
+ } else result = NullProtoObject();
1308
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1309
+ };
1310
+
1311
+ var fails$5 = fails$f;
1312
+ var global$6 = global$v;
1313
+
1314
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1315
+ var $RegExp$1 = global$6.RegExp;
1316
+
1317
+ var regexpUnsupportedDotAll = fails$5(function () {
1318
+ var re = $RegExp$1('.', 's');
1319
+ return !(re.dotAll && re.exec('\n') && re.flags === 's');
1320
+ });
1321
+
1322
+ var fails$4 = fails$f;
1323
+ var global$5 = global$v;
1324
+
1325
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1326
+ var $RegExp = global$5.RegExp;
1327
+
1328
+ var regexpUnsupportedNcg = fails$4(function () {
1329
+ var re = $RegExp('(?<a>b)', 'g');
1330
+ return re.exec('b').groups.a !== 'b' ||
1331
+ 'b'.replace(re, '$<a>c') !== 'bc';
1332
+ });
1333
+
1334
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1335
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
1336
+ var call$4 = functionCall;
1337
+ var uncurryThis$5 = functionUncurryThis;
1338
+ var toString$2 = toString$4;
1339
+ var regexpFlags = regexpFlags$1;
1340
+ var stickyHelpers = regexpStickyHelpers;
1341
+ var shared = shared$4.exports;
1342
+ var create$2 = objectCreate;
1343
+ var getInternalState$1 = internalState.get;
1344
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
1345
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1346
+
1347
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
1348
+ var nativeExec = RegExp.prototype.exec;
1349
+ var patchedExec = nativeExec;
1350
+ var charAt$3 = uncurryThis$5(''.charAt);
1351
+ var indexOf = uncurryThis$5(''.indexOf);
1352
+ var replace$1 = uncurryThis$5(''.replace);
1353
+ var stringSlice$3 = uncurryThis$5(''.slice);
1354
+
1355
+ var UPDATES_LAST_INDEX_WRONG = (function () {
1356
+ var re1 = /a/;
1357
+ var re2 = /b*/g;
1358
+ call$4(nativeExec, re1, 'a');
1359
+ call$4(nativeExec, re2, 'a');
1360
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1361
+ })();
1362
+
1363
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
1364
+
1365
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
1366
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1367
+
1368
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
1369
+
1370
+ if (PATCH) {
1371
+ patchedExec = function exec(string) {
1372
+ var re = this;
1373
+ var state = getInternalState$1(re);
1374
+ var str = toString$2(string);
1375
+ var raw = state.raw;
1376
+ var result, reCopy, lastIndex, match, i, object, group;
1377
+
1378
+ if (raw) {
1379
+ raw.lastIndex = re.lastIndex;
1380
+ result = call$4(patchedExec, raw, str);
1381
+ re.lastIndex = raw.lastIndex;
1382
+ return result;
1383
+ }
1384
+
1385
+ var groups = state.groups;
1386
+ var sticky = UNSUPPORTED_Y && re.sticky;
1387
+ var flags = call$4(regexpFlags, re);
1388
+ var source = re.source;
1389
+ var charsAdded = 0;
1390
+ var strCopy = str;
1391
+
1392
+ if (sticky) {
1393
+ flags = replace$1(flags, 'y', '');
1394
+ if (indexOf(flags, 'g') === -1) {
1395
+ flags += 'g';
1396
+ }
1397
+
1398
+ strCopy = stringSlice$3(str, re.lastIndex);
1399
+ // Support anchored sticky behavior.
1400
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
1401
+ source = '(?: ' + source + ')';
1402
+ strCopy = ' ' + strCopy;
1403
+ charsAdded++;
1404
+ }
1405
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
1406
+ // simulate the 'y' flag.
1407
+ reCopy = new RegExp('^(?:' + source + ')', flags);
1408
+ }
1409
+
1410
+ if (NPCG_INCLUDED) {
1411
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1412
+ }
1413
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1414
+
1415
+ match = call$4(nativeExec, sticky ? reCopy : re, strCopy);
1416
+
1417
+ if (sticky) {
1418
+ if (match) {
1419
+ match.input = stringSlice$3(match.input, charsAdded);
1420
+ match[0] = stringSlice$3(match[0], charsAdded);
1421
+ match.index = re.lastIndex;
1422
+ re.lastIndex += match[0].length;
1423
+ } else re.lastIndex = 0;
1424
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
1425
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1426
+ }
1427
+ if (NPCG_INCLUDED && match && match.length > 1) {
1428
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
1429
+ // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
1430
+ call$4(nativeReplace, match[0], reCopy, function () {
1431
+ for (i = 1; i < arguments.length - 2; i++) {
1432
+ if (arguments[i] === undefined) match[i] = undefined;
1433
+ }
1434
+ });
1435
+ }
1436
+
1437
+ if (match && groups) {
1438
+ match.groups = object = create$2(null);
1439
+ for (i = 0; i < groups.length; i++) {
1440
+ group = groups[i];
1441
+ object[group[0]] = match[group[1]];
1442
+ }
1443
+ }
1444
+
1445
+ return match;
1446
+ };
1447
+ }
1448
+
1449
+ var regexpExec$2 = patchedExec;
1450
+
1451
+ var $$1 = _export;
1452
+ var exec = regexpExec$2;
1453
+
1454
+ // `RegExp.prototype.exec` method
1455
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1456
+ $$1({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
1457
+ exec: exec
1458
+ });
1459
+
1460
+ var NATIVE_BIND = functionBindNative;
1461
+
1462
+ var FunctionPrototype = Function.prototype;
1463
+ var apply$1 = FunctionPrototype.apply;
1464
+ var call$3 = FunctionPrototype.call;
1465
+
1466
+ // eslint-disable-next-line es-x/no-reflect -- safe
1467
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$3.bind(apply$1) : function () {
1468
+ return call$3.apply(apply$1, arguments);
1469
+ });
1470
+
1471
+ // TODO: Remove from `core-js@4` since it's moved to entry points
1472
+
1473
+ var uncurryThis$4 = functionUncurryThis;
1474
+ var redefine$2 = redefine$4.exports;
1475
+ var regexpExec$1 = regexpExec$2;
1476
+ var fails$3 = fails$f;
1477
+ var wellKnownSymbol$6 = wellKnownSymbol$c;
1478
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$6;
1479
+
1480
+ var SPECIES = wellKnownSymbol$6('species');
1481
+ var RegExpPrototype = RegExp.prototype;
1482
+
1483
+ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
1484
+ var SYMBOL = wellKnownSymbol$6(KEY);
1485
+
1486
+ var DELEGATES_TO_SYMBOL = !fails$3(function () {
1487
+ // String methods call symbol-named RegEp methods
1488
+ var O = {};
1489
+ O[SYMBOL] = function () { return 7; };
1490
+ return ''[KEY](O) != 7;
1491
+ });
1492
+
1493
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$3(function () {
1494
+ // Symbol-named RegExp methods call .exec
1495
+ var execCalled = false;
1496
+ var re = /a/;
1497
+
1498
+ if (KEY === 'split') {
1499
+ // We can't use real regex here since it causes deoptimization
1500
+ // and serious performance degradation in V8
1501
+ // https://github.com/zloirock/core-js/issues/306
1502
+ re = {};
1503
+ // RegExp[@@split] doesn't call the regex's exec method, but first creates
1504
+ // a new one. We need to return the patched regex when creating the new one.
1505
+ re.constructor = {};
1506
+ re.constructor[SPECIES] = function () { return re; };
1507
+ re.flags = '';
1508
+ re[SYMBOL] = /./[SYMBOL];
1509
+ }
1510
+
1511
+ re.exec = function () { execCalled = true; return null; };
1512
+
1513
+ re[SYMBOL]('');
1514
+ return !execCalled;
1515
+ });
1516
+
1517
+ if (
1518
+ !DELEGATES_TO_SYMBOL ||
1519
+ !DELEGATES_TO_EXEC ||
1520
+ FORCED
1521
+ ) {
1522
+ var uncurriedNativeRegExpMethod = uncurryThis$4(/./[SYMBOL]);
1523
+ var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1524
+ var uncurriedNativeMethod = uncurryThis$4(nativeMethod);
1525
+ var $exec = regexp.exec;
1526
+ if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
1527
+ if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1528
+ // The native String method already delegates to @@method (this
1529
+ // polyfilled function), leasing to infinite recursion.
1530
+ // We avoid it by directly calling the native @@method method.
1531
+ return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
1532
+ }
1533
+ return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
1534
+ }
1535
+ return { done: false };
1536
+ });
1537
+
1538
+ redefine$2(String.prototype, KEY, methods[0]);
1539
+ redefine$2(RegExpPrototype, SYMBOL, methods[1]);
1540
+ }
1541
+
1542
+ if (SHAM) createNonEnumerableProperty$2(RegExpPrototype[SYMBOL], 'sham', true);
1543
+ };
1544
+
1545
+ var uncurryThis$3 = functionUncurryThis;
1546
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
1547
+ var toString$1 = toString$4;
1548
+ var requireObjectCoercible$1 = requireObjectCoercible$5;
1549
+
1550
+ var charAt$2 = uncurryThis$3(''.charAt);
1551
+ var charCodeAt = uncurryThis$3(''.charCodeAt);
1552
+ var stringSlice$2 = uncurryThis$3(''.slice);
1553
+
1554
+ var createMethod = function (CONVERT_TO_STRING) {
1555
+ return function ($this, pos) {
1556
+ var S = toString$1(requireObjectCoercible$1($this));
1557
+ var position = toIntegerOrInfinity$1(pos);
1558
+ var size = S.length;
1559
+ var first, second;
1560
+ if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1561
+ first = charCodeAt(S, position);
1562
+ return first < 0xD800 || first > 0xDBFF || position + 1 === size
1563
+ || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
1564
+ ? CONVERT_TO_STRING
1565
+ ? charAt$2(S, position)
1566
+ : first
1567
+ : CONVERT_TO_STRING
1568
+ ? stringSlice$2(S, position, position + 2)
1569
+ : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1570
+ };
1571
+ };
1572
+
1573
+ var stringMultibyte = {
1574
+ // `String.prototype.codePointAt` method
1575
+ // https://tc39.es/ecma262/#sec-string.prototype.codepointat
1576
+ codeAt: createMethod(false),
1577
+ // `String.prototype.at` method
1578
+ // https://github.com/mathiasbynens/String.prototype.at
1579
+ charAt: createMethod(true)
1580
+ };
1581
+
1582
+ var charAt$1 = stringMultibyte.charAt;
1583
+
1584
+ // `AdvanceStringIndex` abstract operation
1585
+ // https://tc39.es/ecma262/#sec-advancestringindex
1586
+ var advanceStringIndex$1 = function (S, index, unicode) {
1587
+ return index + (unicode ? charAt$1(S, index).length : 1);
1588
+ };
1589
+
1590
+ var uncurryThis$2 = functionUncurryThis;
1591
+ var toObject$1 = toObject$4;
1592
+
1593
+ var floor = Math.floor;
1594
+ var charAt = uncurryThis$2(''.charAt);
1595
+ var replace = uncurryThis$2(''.replace);
1596
+ var stringSlice$1 = uncurryThis$2(''.slice);
1597
+ var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
1598
+ var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
1599
+
1600
+ // `GetSubstitution` abstract operation
1601
+ // https://tc39.es/ecma262/#sec-getsubstitution
1602
+ var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
1603
+ var tailPos = position + matched.length;
1604
+ var m = captures.length;
1605
+ var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
1606
+ if (namedCaptures !== undefined) {
1607
+ namedCaptures = toObject$1(namedCaptures);
1608
+ symbols = SUBSTITUTION_SYMBOLS;
1609
+ }
1610
+ return replace(replacement, symbols, function (match, ch) {
1611
+ var capture;
1612
+ switch (charAt(ch, 0)) {
1613
+ case '$': return '$';
1614
+ case '&': return matched;
1615
+ case '`': return stringSlice$1(str, 0, position);
1616
+ case "'": return stringSlice$1(str, tailPos);
1617
+ case '<':
1618
+ capture = namedCaptures[stringSlice$1(ch, 1, -1)];
1619
+ break;
1620
+ default: // \d\d?
1621
+ var n = +ch;
1622
+ if (n === 0) return match;
1623
+ if (n > m) {
1624
+ var f = floor(n / 10);
1625
+ if (f === 0) return match;
1626
+ if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
1627
+ return match;
1628
+ }
1629
+ capture = captures[n - 1];
1630
+ }
1631
+ return capture === undefined ? '' : capture;
1632
+ });
1633
+ };
1634
+
1635
+ var global$4 = global$v;
1636
+ var call$2 = functionCall;
1637
+ var anObject$2 = anObject$8;
1638
+ var isCallable$5 = isCallable$g;
1639
+ var classof = classofRaw$1;
1640
+ var regexpExec = regexpExec$2;
1641
+
1642
+ var TypeError$2 = global$4.TypeError;
1643
+
1644
+ // `RegExpExec` abstract operation
1645
+ // https://tc39.es/ecma262/#sec-regexpexec
1646
+ var regexpExecAbstract = function (R, S) {
1647
+ var exec = R.exec;
1648
+ if (isCallable$5(exec)) {
1649
+ var result = call$2(exec, R, S);
1650
+ if (result !== null) anObject$2(result);
1651
+ return result;
1652
+ }
1653
+ if (classof(R) === 'RegExp') return call$2(regexpExec, R, S);
1654
+ throw TypeError$2('RegExp#exec called on incompatible receiver');
1655
+ };
1656
+
1657
+ var apply = functionApply;
1658
+ var call$1 = functionCall;
1659
+ var uncurryThis$1 = functionUncurryThis;
1660
+ var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
1661
+ var fails$2 = fails$f;
1662
+ var anObject$1 = anObject$8;
1663
+ var isCallable$4 = isCallable$g;
1664
+ var toIntegerOrInfinity = toIntegerOrInfinity$4;
1665
+ var toLength = toLength$2;
1666
+ var toString = toString$4;
1667
+ var requireObjectCoercible = requireObjectCoercible$5;
1668
+ var advanceStringIndex = advanceStringIndex$1;
1669
+ var getMethod = getMethod$2;
1670
+ var getSubstitution = getSubstitution$1;
1671
+ var regExpExec = regexpExecAbstract;
1672
+ var wellKnownSymbol$5 = wellKnownSymbol$c;
1673
+
1674
+ var REPLACE = wellKnownSymbol$5('replace');
1675
+ var max = Math.max;
1676
+ var min = Math.min;
1677
+ var concat = uncurryThis$1([].concat);
1678
+ var push = uncurryThis$1([].push);
1679
+ var stringIndexOf = uncurryThis$1(''.indexOf);
1680
+ var stringSlice = uncurryThis$1(''.slice);
1681
+
1682
+ var maybeToString = function (it) {
1683
+ return it === undefined ? it : String(it);
1684
+ };
1685
+
1686
+ // IE <= 11 replaces $0 with the whole match, as if it was $&
1687
+ // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
1688
+ var REPLACE_KEEPS_$0 = (function () {
1689
+ // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
1690
+ return 'a'.replace(/./, '$0') === '$0';
1691
+ })();
1692
+
1693
+ // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
1694
+ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
1695
+ if (/./[REPLACE]) {
1696
+ return /./[REPLACE]('a', '$0') === '';
1697
+ }
1698
+ return false;
1699
+ })();
1700
+
1701
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$2(function () {
1702
+ var re = /./;
1703
+ re.exec = function () {
1704
+ var result = [];
1705
+ result.groups = { a: '7' };
1706
+ return result;
1707
+ };
1708
+ // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
1709
+ return ''.replace(re, '$<a>') !== '7';
1710
+ });
1711
+
1712
+ // @@replace logic
1713
+ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
1714
+ var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
1715
+
1716
+ return [
1717
+ // `String.prototype.replace` method
1718
+ // https://tc39.es/ecma262/#sec-string.prototype.replace
1719
+ function replace(searchValue, replaceValue) {
1720
+ var O = requireObjectCoercible(this);
1721
+ var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
1722
+ return replacer
1723
+ ? call$1(replacer, searchValue, O, replaceValue)
1724
+ : call$1(nativeReplace, toString(O), searchValue, replaceValue);
1725
+ },
1726
+ // `RegExp.prototype[@@replace]` method
1727
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
1728
+ function (string, replaceValue) {
1729
+ var rx = anObject$1(this);
1730
+ var S = toString(string);
1731
+
1732
+ if (
1733
+ typeof replaceValue == 'string' &&
1734
+ stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
1735
+ stringIndexOf(replaceValue, '$<') === -1
1736
+ ) {
1737
+ var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
1738
+ if (res.done) return res.value;
1739
+ }
1740
+
1741
+ var functionalReplace = isCallable$4(replaceValue);
1742
+ if (!functionalReplace) replaceValue = toString(replaceValue);
1743
+
1744
+ var global = rx.global;
1745
+ if (global) {
1746
+ var fullUnicode = rx.unicode;
1747
+ rx.lastIndex = 0;
1748
+ }
1749
+ var results = [];
1750
+ while (true) {
1751
+ var result = regExpExec(rx, S);
1752
+ if (result === null) break;
1753
+
1754
+ push(results, result);
1755
+ if (!global) break;
1756
+
1757
+ var matchStr = toString(result[0]);
1758
+ if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
1759
+ }
1760
+
1761
+ var accumulatedResult = '';
1762
+ var nextSourcePosition = 0;
1763
+ for (var i = 0; i < results.length; i++) {
1764
+ result = results[i];
1765
+
1766
+ var matched = toString(result[0]);
1767
+ var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
1768
+ var captures = [];
1769
+ // NOTE: This is equivalent to
1770
+ // captures = result.slice(1).map(maybeToString)
1771
+ // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
1772
+ // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
1773
+ // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
1774
+ for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
1775
+ var namedCaptures = result.groups;
1776
+ if (functionalReplace) {
1777
+ var replacerArgs = concat([matched], captures, position, S);
1778
+ if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
1779
+ var replacement = toString(apply(replaceValue, undefined, replacerArgs));
1780
+ } else {
1781
+ replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
1782
+ }
1783
+ if (position >= nextSourcePosition) {
1784
+ accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
1785
+ nextSourcePosition = position + matched.length;
1786
+ }
1787
+ }
1788
+ return accumulatedResult + stringSlice(S, nextSourcePosition);
1789
+ }
1790
+ ];
1791
+ }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
1792
+
1793
+ /******************************************************************************
1794
+ Copyright (c) Microsoft Corporation.
1795
+
1796
+ Permission to use, copy, modify, and/or distribute this software for any
1797
+ purpose with or without fee is hereby granted.
1798
+
1799
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1800
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1801
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1802
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1803
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1804
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1805
+ PERFORMANCE OF THIS SOFTWARE.
1806
+ ***************************************************************************** */
1807
+
1808
+ function __awaiter(thisArg, _arguments, P, generator) {
1809
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1810
+ return new (P || (P = Promise))(function (resolve, reject) {
1811
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1812
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1813
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1814
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1815
+ });
1816
+ }
1817
+
1818
+ const ManagerApolloProvider = ({
1819
+ children
1820
+ }) => {
1821
+ const {
1822
+ publicUrl,
1823
+ graphqlLegacyUrl,
1824
+ graphqlManagerUrl,
1825
+ graphqlReportUrl,
1826
+ graphqlSimulatorUrl,
1827
+ isDev,
1828
+ tracingHeaders
1829
+ } = useEnvironment();
1830
+ const {
1831
+ token
1832
+ } = useToken();
1833
+ const legacyGraphQLLink = createUploadLink({
1834
+ uri: request => graphqlLegacyUrl + "/" + request.operationName
1835
+ });
1836
+ const managerGraphQLLink = createUploadLink({
1837
+ uri: request => graphqlManagerUrl + "/" + request.operationName
1838
+ });
1839
+ const reportGraphQLLink = createUploadLink({
1840
+ uri: request => graphqlReportUrl + "/" + request.operationName
1841
+ });
1842
+ const simulatorGraphQLLink = createUploadLink({
1843
+ uri: request => graphqlSimulatorUrl + "/" + request.operationName
1844
+ });
1845
+ const authLink = setContext((_, {
1846
+ headers
1847
+ }) => __awaiter(void 0, void 0, void 0, function* () {
1848
+ return {
1849
+ headers: Object.assign(Object.assign(Object.assign({}, headers), tracingHeaders), {
1850
+ Authorization: token ? `Bearer ${token}` : null
1851
+ })
1852
+ };
1853
+ }));
1854
+ const errorLink = onError(errorResponse => {
1855
+ var _a, _b;
1856
+
1857
+ const traceIds = []; // Used to hold id's for use in Sentry
1858
+
1859
+ if (errorResponse.graphQLErrors) {
1860
+ // eslint-disable-next-line no-console
1861
+ console.error("Error Fetching Data", errorResponse.graphQLErrors);
1862
+ (_a = errorResponse.graphQLErrors) === null || _a === void 0 ? void 0 : _a.forEach(error => {
1863
+ var _a, _b;
1864
+
1865
+ if (error === null || error === void 0 ? void 0 : error.extensions) {
1866
+ error.extensions.traceId = (_b = (_a = errorResponse.response) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.traceId;
1867
+ traceIds.push(error.extensions.traceId);
1868
+ }
1869
+ });
1870
+ /**
1871
+ * We want to see the full graphQL error since
1872
+ * it contains extra details like the query/mutation
1873
+ * name.
1874
+ */
1875
+
1876
+ if (Sentry) {
1877
+ if (traceIds.length) {
1878
+ Sentry.setTag("traceIds", traceIds.join(", "));
1879
+ }
1880
+
1881
+ Sentry.addBreadcrumb({
1882
+ category: "GraphQL",
1883
+ message: "GraphQL Error",
1884
+ level: Sentry.Severity.Error,
1885
+ data: {
1886
+ log: JSON.stringify(errorResponse.graphQLErrors)
1887
+ }
1888
+ });
1889
+ }
1890
+ }
1891
+
1892
+ const invalidToken = (_b = errorResponse.graphQLErrors) === null || _b === void 0 ? void 0 : _b.some(x => {
1893
+ var _a, _b;
1894
+
1895
+ return ((_a = x === null || x === void 0 ? void 0 : x.extensions) === null || _a === void 0 ? void 0 : _a.code) === "UNAUTHENTICATED" || ((_b = x === null || x === void 0 ? void 0 : x.message) === null || _b === void 0 ? void 0 : _b.includes("Invalid token specified"));
1896
+ });
1897
+
1898
+ if (invalidToken) {
1899
+ window.location.replace(`${publicUrl}logout`);
1900
+ }
1901
+
1902
+ if (errorResponse.networkError) {
1903
+ // eslint-disable-next-line no-console
1904
+ console.error(errorResponse.networkError);
1905
+ }
1906
+ });
1907
+ const defaultOptions = {
1908
+ watchQuery: {
1909
+ fetchPolicy: "no-cache",
1910
+ errorPolicy: "all"
1911
+ },
1912
+ query: {
1913
+ fetchPolicy: "no-cache"
1914
+ }
1915
+ };
1916
+ const client = new ApolloClient({
1917
+ name: "Manager",
1918
+ connectToDevTools: isDev,
1919
+ cache: new InMemoryCache(),
1920
+ defaultOptions,
1921
+ link: from([errorLink, authLink, split$1(operation => operation.getContext().clientName === "simulator", simulatorGraphQLLink), split$1(operation => operation.getContext().clientName === "manager", managerGraphQLLink, split$1(operation => operation.getContext().clientName === "report", reportGraphQLLink, legacyGraphQLLink))])
1922
+ });
1923
+ return jsx(ApolloProvider, Object.assign({
1924
+ client: client
1925
+ }, {
1926
+ children: children
1927
+ }));
1928
+ };
1929
+
1930
+ var wellKnownSymbol$4 = wellKnownSymbol$c;
1931
+ var create$1 = objectCreate;
1932
+ var definePropertyModule = objectDefineProperty;
1933
+
1934
+ var UNSCOPABLES = wellKnownSymbol$4('unscopables');
1935
+ var ArrayPrototype = Array.prototype;
1936
+
1937
+ // Array.prototype[@@unscopables]
1938
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1939
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
1940
+ definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
1941
+ configurable: true,
1942
+ value: create$1(null)
1943
+ });
1944
+ }
1945
+
1946
+ // add a key to Array.prototype[@@unscopables]
1947
+ var addToUnscopables$1 = function (key) {
1948
+ ArrayPrototype[UNSCOPABLES][key] = true;
1949
+ };
1950
+
1951
+ var iterators = {};
1952
+
1953
+ var fails$1 = fails$f;
1954
+
1955
+ var correctPrototypeGetter = !fails$1(function () {
1956
+ function F() { /* empty */ }
1957
+ F.prototype.constructor = null;
1958
+ // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
1959
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1960
+ });
1961
+
1962
+ var global$3 = global$v;
1963
+ var hasOwn$1 = hasOwnProperty_1;
1964
+ var isCallable$3 = isCallable$g;
1965
+ var toObject = toObject$4;
1966
+ var sharedKey = sharedKey$3;
1967
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1968
+
1969
+ var IE_PROTO = sharedKey('IE_PROTO');
1970
+ var Object$1 = global$3.Object;
1971
+ var ObjectPrototype = Object$1.prototype;
1972
+
1973
+ // `Object.getPrototypeOf` method
1974
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1975
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$1.getPrototypeOf : function (O) {
1976
+ var object = toObject(O);
1977
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1978
+ var constructor = object.constructor;
1979
+ if (isCallable$3(constructor) && object instanceof constructor) {
1980
+ return constructor.prototype;
1981
+ } return object instanceof Object$1 ? ObjectPrototype : null;
1982
+ };
1983
+
1984
+ var fails = fails$f;
1985
+ var isCallable$2 = isCallable$g;
1986
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1987
+ var redefine$1 = redefine$4.exports;
1988
+ var wellKnownSymbol$3 = wellKnownSymbol$c;
1989
+
1990
+ var ITERATOR$2 = wellKnownSymbol$3('iterator');
1991
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1992
+
1993
+ // `%IteratorPrototype%` object
1994
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1995
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1996
+
1997
+ /* eslint-disable es-x/no-array-prototype-keys -- safe */
1998
+ if ([].keys) {
1999
+ arrayIterator = [].keys();
2000
+ // Safari 8 has buggy iterators w/o `next`
2001
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
2002
+ else {
2003
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
2004
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
2005
+ }
2006
+ }
2007
+
2008
+ var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails(function () {
2009
+ var test = {};
2010
+ // FF44- legacy iterators case
2011
+ return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
2012
+ });
2013
+
2014
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
2015
+
2016
+ // `%IteratorPrototype%[@@iterator]()` method
2017
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
2018
+ if (!isCallable$2(IteratorPrototype$2[ITERATOR$2])) {
2019
+ redefine$1(IteratorPrototype$2, ITERATOR$2, function () {
2020
+ return this;
2021
+ });
2022
+ }
2023
+
2024
+ var iteratorsCore = {
2025
+ IteratorPrototype: IteratorPrototype$2,
2026
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
2027
+ };
2028
+
2029
+ var defineProperty$1 = objectDefineProperty.f;
2030
+ var hasOwn = hasOwnProperty_1;
2031
+ var wellKnownSymbol$2 = wellKnownSymbol$c;
2032
+
2033
+ var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
2034
+
2035
+ var setToStringTag$2 = function (target, TAG, STATIC) {
2036
+ if (target && !STATIC) target = target.prototype;
2037
+ if (target && !hasOwn(target, TO_STRING_TAG$1)) {
2038
+ defineProperty$1(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
2039
+ }
2040
+ };
2041
+
2042
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
2043
+ var create = objectCreate;
2044
+ var createPropertyDescriptor = createPropertyDescriptor$3;
2045
+ var setToStringTag$1 = setToStringTag$2;
2046
+ var Iterators$2 = iterators;
2047
+
2048
+ var returnThis$1 = function () { return this; };
2049
+
2050
+ var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
2051
+ var TO_STRING_TAG = NAME + ' Iterator';
2052
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
2053
+ setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
2054
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
2055
+ return IteratorConstructor;
2056
+ };
2057
+
2058
+ var global$2 = global$v;
2059
+ var isCallable$1 = isCallable$g;
2060
+
2061
+ var String$1 = global$2.String;
2062
+ var TypeError$1 = global$2.TypeError;
2063
+
2064
+ var aPossiblePrototype$1 = function (argument) {
2065
+ if (typeof argument == 'object' || isCallable$1(argument)) return argument;
2066
+ throw TypeError$1("Can't set " + String$1(argument) + ' as a prototype');
2067
+ };
2068
+
2069
+ /* eslint-disable no-proto -- safe */
2070
+
2071
+ var uncurryThis = functionUncurryThis;
2072
+ var anObject = anObject$8;
2073
+ var aPossiblePrototype = aPossiblePrototype$1;
2074
+
2075
+ // `Object.setPrototypeOf` method
2076
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
2077
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
2078
+ // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
2079
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
2080
+ var CORRECT_SETTER = false;
2081
+ var test = {};
2082
+ var setter;
2083
+ try {
2084
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
2085
+ setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
2086
+ setter(test, []);
2087
+ CORRECT_SETTER = test instanceof Array;
2088
+ } catch (error) { /* empty */ }
2089
+ return function setPrototypeOf(O, proto) {
2090
+ anObject(O);
2091
+ aPossiblePrototype(proto);
2092
+ if (CORRECT_SETTER) setter(O, proto);
2093
+ else O.__proto__ = proto;
2094
+ return O;
2095
+ };
2096
+ }() : undefined);
2097
+
2098
+ var $ = _export;
2099
+ var call = functionCall;
2100
+ var FunctionName = functionName;
2101
+ var isCallable = isCallable$g;
2102
+ var createIteratorConstructor = createIteratorConstructor$1;
2103
+ var getPrototypeOf = objectGetPrototypeOf;
2104
+ var setPrototypeOf = objectSetPrototypeOf;
2105
+ var setToStringTag = setToStringTag$2;
2106
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$6;
2107
+ var redefine = redefine$4.exports;
2108
+ var wellKnownSymbol$1 = wellKnownSymbol$c;
2109
+ var Iterators$1 = iterators;
2110
+ var IteratorsCore = iteratorsCore;
2111
+
2112
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
2113
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
2114
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
2115
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
2116
+ var ITERATOR$1 = wellKnownSymbol$1('iterator');
2117
+ var KEYS = 'keys';
2118
+ var VALUES = 'values';
2119
+ var ENTRIES = 'entries';
2120
+
2121
+ var returnThis = function () { return this; };
2122
+
2123
+ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
2124
+ createIteratorConstructor(IteratorConstructor, NAME, next);
2125
+
2126
+ var getIterationMethod = function (KIND) {
2127
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
2128
+ if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
2129
+ switch (KIND) {
2130
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
2131
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
2132
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
2133
+ } return function () { return new IteratorConstructor(this); };
2134
+ };
2135
+
2136
+ var TO_STRING_TAG = NAME + ' Iterator';
2137
+ var INCORRECT_VALUES_NAME = false;
2138
+ var IterablePrototype = Iterable.prototype;
2139
+ var nativeIterator = IterablePrototype[ITERATOR$1]
2140
+ || IterablePrototype['@@iterator']
2141
+ || DEFAULT && IterablePrototype[DEFAULT];
2142
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
2143
+ var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
2144
+ var CurrentIteratorPrototype, methods, KEY;
2145
+
2146
+ // fix native
2147
+ if (anyNativeIterator) {
2148
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
2149
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
2150
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
2151
+ if (setPrototypeOf) {
2152
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
2153
+ } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
2154
+ redefine(CurrentIteratorPrototype, ITERATOR$1, returnThis);
2155
+ }
2156
+ }
2157
+ // Set @@toStringTag to native iterators
2158
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
2159
+ }
2160
+ }
2161
+
2162
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
2163
+ if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
2164
+ if (CONFIGURABLE_FUNCTION_NAME) {
2165
+ createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
2166
+ } else {
2167
+ INCORRECT_VALUES_NAME = true;
2168
+ defaultIterator = function values() { return call(nativeIterator, this); };
2169
+ }
2170
+ }
2171
+
2172
+ // export additional methods
2173
+ if (DEFAULT) {
2174
+ methods = {
2175
+ values: getIterationMethod(VALUES),
2176
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
2177
+ entries: getIterationMethod(ENTRIES)
2178
+ };
2179
+ if (FORCED) for (KEY in methods) {
2180
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
2181
+ redefine(IterablePrototype, KEY, methods[KEY]);
2182
+ }
2183
+ } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
2184
+ }
2185
+
2186
+ // define iterator
2187
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
2188
+ redefine(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
2189
+ }
2190
+ Iterators$1[NAME] = defaultIterator;
2191
+
2192
+ return methods;
2193
+ };
2194
+
2195
+ var toIndexedObject = toIndexedObject$5;
2196
+ var addToUnscopables = addToUnscopables$1;
2197
+ var Iterators = iterators;
2198
+ var InternalStateModule = internalState;
2199
+ var defineProperty = objectDefineProperty.f;
2200
+ var defineIterator = defineIterator$1;
2201
+ var DESCRIPTORS = descriptors;
2202
+
2203
+ var ARRAY_ITERATOR = 'Array Iterator';
2204
+ var setInternalState = InternalStateModule.set;
2205
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
2206
+
2207
+ // `Array.prototype.entries` method
2208
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
2209
+ // `Array.prototype.keys` method
2210
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
2211
+ // `Array.prototype.values` method
2212
+ // https://tc39.es/ecma262/#sec-array.prototype.values
2213
+ // `Array.prototype[@@iterator]` method
2214
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
2215
+ // `CreateArrayIterator` internal method
2216
+ // https://tc39.es/ecma262/#sec-createarrayiterator
2217
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
2218
+ setInternalState(this, {
2219
+ type: ARRAY_ITERATOR,
2220
+ target: toIndexedObject(iterated), // target
2221
+ index: 0, // next index
2222
+ kind: kind // kind
2223
+ });
2224
+ // `%ArrayIteratorPrototype%.next` method
2225
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
2226
+ }, function () {
2227
+ var state = getInternalState(this);
2228
+ var target = state.target;
2229
+ var kind = state.kind;
2230
+ var index = state.index++;
2231
+ if (!target || index >= target.length) {
2232
+ state.target = undefined;
2233
+ return { value: undefined, done: true };
2234
+ }
2235
+ if (kind == 'keys') return { value: index, done: false };
2236
+ if (kind == 'values') return { value: target[index], done: false };
2237
+ return { value: [index, target[index]], done: false };
2238
+ }, 'values');
2239
+
2240
+ // argumentsList[@@iterator] is %ArrayProto_values%
2241
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
2242
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
2243
+ var values = Iterators.Arguments = Iterators.Array;
2244
+
2245
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2246
+ addToUnscopables('keys');
2247
+ addToUnscopables('values');
2248
+ addToUnscopables('entries');
2249
+
2250
+ // V8 ~ Chrome 45- bug
2251
+ if (DESCRIPTORS && values.name !== 'values') try {
2252
+ defineProperty(values, 'name', { value: 'values' });
2253
+ } catch (error) { /* empty */ }
2254
+
2255
+ // iterable DOM collections
2256
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
2257
+ var domIterables = {
2258
+ CSSRuleList: 0,
2259
+ CSSStyleDeclaration: 0,
2260
+ CSSValueList: 0,
2261
+ ClientRectList: 0,
2262
+ DOMRectList: 0,
2263
+ DOMStringList: 0,
2264
+ DOMTokenList: 1,
2265
+ DataTransferItemList: 0,
2266
+ FileList: 0,
2267
+ HTMLAllCollection: 0,
2268
+ HTMLCollection: 0,
2269
+ HTMLFormElement: 0,
2270
+ HTMLSelectElement: 0,
2271
+ MediaList: 0,
2272
+ MimeTypeArray: 0,
2273
+ NamedNodeMap: 0,
2274
+ NodeList: 1,
2275
+ PaintRequestList: 0,
2276
+ Plugin: 0,
2277
+ PluginArray: 0,
2278
+ SVGLengthList: 0,
2279
+ SVGNumberList: 0,
2280
+ SVGPathSegList: 0,
2281
+ SVGPointList: 0,
2282
+ SVGStringList: 0,
2283
+ SVGTransformList: 0,
2284
+ SourceBufferList: 0,
2285
+ StyleSheetList: 0,
2286
+ TextTrackCueList: 0,
2287
+ TextTrackList: 0,
2288
+ TouchList: 0
2289
+ };
2290
+
2291
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
2292
+ var documentCreateElement = documentCreateElement$2;
2293
+
2294
+ var classList = documentCreateElement('span').classList;
2295
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
2296
+
2297
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
2298
+
2299
+ var global$1 = global$v;
2300
+ var DOMIterables = domIterables;
2301
+ var DOMTokenListPrototype = domTokenListPrototype;
2302
+ var ArrayIteratorMethods = es_array_iterator;
2303
+ var createNonEnumerableProperty = createNonEnumerableProperty$6;
2304
+ var wellKnownSymbol = wellKnownSymbol$c;
2305
+
2306
+ var ITERATOR = wellKnownSymbol('iterator');
2307
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2308
+ var ArrayValues = ArrayIteratorMethods.values;
2309
+
2310
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
2311
+ if (CollectionPrototype) {
2312
+ // some Chrome versions have non-configurable methods on DOMTokenList
2313
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
2314
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
2315
+ } catch (error) {
2316
+ CollectionPrototype[ITERATOR] = ArrayValues;
2317
+ }
2318
+ if (!CollectionPrototype[TO_STRING_TAG]) {
2319
+ createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
2320
+ }
2321
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
2322
+ // some Chrome versions have non-configurable methods on DOMTokenList
2323
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
2324
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
2325
+ } catch (error) {
2326
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
2327
+ }
2328
+ }
2329
+ }
2330
+ };
2331
+
2332
+ for (var COLLECTION_NAME in DOMIterables) {
2333
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
2334
+ }
2335
+
2336
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
2337
+
2338
+ const TileEnvironmentProvider = ({
2339
+ children
2340
+ }) => {
2341
+ const [environment, setEnvironment] = React.useState(null);
2342
+ React.useEffect(() => {
2343
+ const updateEnv = () => __awaiter(void 0, void 0, void 0, function* () {
2344
+ try {
2345
+ setEnvironment(yield EnvironmentRuntime.getEnvironmentContext());
2346
+ } catch (error) {
2347
+ setEnvironment(null);
2348
+ }
2349
+ });
2350
+
2351
+ updateEnv();
2352
+ }, []);
2353
+
2354
+ if (!environment) {
2355
+ return null;
2356
+ }
2357
+
2358
+ return jsx(EnvironmentContextProvider, Object.assign({
2359
+ value: environment
2360
+ }, {
2361
+ children: children
2362
+ }));
2363
+ };
2364
+
2365
+ const TileTokenProvider = ({
2366
+ children
2367
+ }) => {
2368
+ const [tokenContext, setTokenContext] = React.useState(null);
2369
+ React.useEffect(() => {
2370
+ const updateContext = () => __awaiter(void 0, void 0, void 0, function* () {
2371
+ try {
2372
+ setTokenContext(yield TokenRuntime.getTokenContext());
2373
+ } catch (error) {
2374
+ setTokenContext(null);
2375
+ }
2376
+ });
2377
+
2378
+ updateContext();
2379
+ }, []);
2380
+
2381
+ if (!tokenContext) {
2382
+ return null;
2383
+ }
2384
+
2385
+ return jsx(TokenProvider, Object.assign({
2386
+ value: tokenContext
2387
+ }, {
2388
+ children: children
2389
+ }));
2390
+ };
2391
+
2392
+ const TileCurrentUserProvider = ({
2393
+ children
2394
+ }) => {
2395
+ const [currentuserContext, setCurrentUserContext] = React.useState(null);
2396
+ React.useEffect(() => {
2397
+ CurrentUserRuntime.getCurrentUserContext().catch(() => null).then(setCurrentUserContext);
2398
+ }, []);
2399
+
2400
+ if (!currentuserContext) {
2401
+ return null;
2402
+ }
2403
+
2404
+ return jsx(CurrentUserProvider, Object.assign({
2405
+ value: currentuserContext
2406
+ }, {
2407
+ children: children
2408
+ }));
2409
+ };
2410
+
2411
+ const UserSubscriptionProvider = ({
2412
+ children
2413
+ }) => {
2414
+ const [subscription, setSubscription] = React.useState(null);
2415
+ React.useEffect(() => {
2416
+ UserSubscriptionRuntime.getUserSubscriptionContext().catch(() => null).then(setSubscription);
2417
+ }, []);
2418
+
2419
+ if (!subscription) {
2420
+ return null;
2421
+ }
2422
+
2423
+ return jsx(UserSubscriptionProvider$1, Object.assign({
2424
+ value: subscription
2425
+ }, {
2426
+ children: children
2427
+ }));
2428
+ };
2429
+
2430
+ const tuTheme = Object.assign({
2431
+ branding: null
2432
+ }, tokens);
2433
+ const TrackunitProviders = ({
2434
+ children
2435
+ }) => {
2436
+ return jsx(TileEnvironmentProvider, {
2437
+ children: jsx(TileTokenProvider, {
2438
+ children: jsx(TileCurrentUserProvider, {
2439
+ children: jsx(UserSubscriptionProvider, {
2440
+ children: jsx(ManagerApolloProvider, {
2441
+ children: jsx(ThemeProvider, Object.assign({
2442
+ theme: tuTheme
2443
+ }, {
2444
+ children: children
2445
+ }))
2446
+ })
2447
+ })
2448
+ })
2449
+ })
2450
+ });
2451
+ };
2452
+
2453
+ export { ManagerApolloProvider, TrackunitProviders, tuTheme };