@dereekb/util 12.6.21 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/LICENSE +1 -1
  2. package/fetch/LICENSE +1 -1
  3. package/fetch/index.cjs.js +42 -2529
  4. package/fetch/index.esm.js +44 -2530
  5. package/fetch/package.json +21 -16
  6. package/fetch/src/lib/fetch.page.d.ts +0 -4
  7. package/fetch/src/lib/fetch.url.d.ts +0 -8
  8. package/fetch/src/lib/provider.d.ts +0 -4
  9. package/index.cjs.js +36 -2354
  10. package/index.esm.js +39 -2344
  11. package/package.json +18 -7
  12. package/src/lib/array/array.boolean.d.ts +0 -11
  13. package/src/lib/array/array.value.d.ts +0 -18
  14. package/src/lib/boolean.d.ts +1 -1
  15. package/src/lib/date/date.d.ts +0 -8
  16. package/src/lib/date/date.unix.d.ts +6 -30
  17. package/src/lib/date/expires.d.ts +4 -4
  18. package/src/lib/date/hour.d.ts +1 -1
  19. package/src/lib/date/time.d.ts +0 -4
  20. package/src/lib/key.d.ts +4 -0
  21. package/src/lib/object/object.map.d.ts +0 -9
  22. package/src/lib/page/index.d.ts +0 -1
  23. package/src/lib/promise/promise.d.ts +2 -3
  24. package/src/lib/set/set.hashset.d.ts +4 -4
  25. package/src/lib/storage/storage.d.ts +2 -2
  26. package/src/lib/string/mimetype.d.ts +0 -8
  27. package/src/lib/string/replace.d.ts +11 -1
  28. package/src/lib/tree/tree.flatten.d.ts +0 -10
  29. package/src/lib/value/indexed.d.ts +1 -1
  30. package/src/lib/value/maybe.type.d.ts +3 -3
  31. package/src/lib/value/point.d.ts +2 -2
  32. package/test/LICENSE +21 -0
  33. package/test/index.cjs.js +707 -0
  34. package/test/index.esm.js +664 -0
  35. package/test/package.json +20 -6
  36. package/test/src/lib/index.d.ts +1 -3
  37. package/test/src/lib/jest/index.d.ts +4 -0
  38. package/test/src/lib/jest/jest.d.ts +55 -0
  39. package/test/src/lib/jest/jest.fail.d.ts +72 -0
  40. package/test/src/lib/jest/jest.function.d.ts +41 -0
  41. package/test/src/lib/jest/jest.wrap.d.ts +24 -0
  42. package/test/src/lib/shared/index.d.ts +4 -0
  43. package/test/src/lib/shared/shared.d.ts +154 -0
  44. package/test/src/lib/shared/shared.fail.d.ts +83 -0
  45. package/test/src/lib/shared/shared.function.d.ts +25 -0
  46. package/test/src/lib/{jest.wrap.d.ts → shared/shared.wrap.d.ts} +9 -9
  47. package/index.esm.d.ts +0 -1
  48. package/src/lib/page/page.calculator.d.ts +0 -29
  49. package/test/CHANGELOG.md +0 -1956
  50. package/test/src/index.js +0 -5
  51. package/test/src/index.js.map +0 -1
  52. package/test/src/lib/index.js +0 -8
  53. package/test/src/lib/index.js.map +0 -1
  54. package/test/src/lib/jest.d.ts +0 -100
  55. package/test/src/lib/jest.fail.d.ts +0 -104
  56. package/test/src/lib/jest.fail.js +0 -224
  57. package/test/src/lib/jest.fail.js.map +0 -1
  58. package/test/src/lib/jest.function.d.ts +0 -25
  59. package/test/src/lib/jest.function.js +0 -21
  60. package/test/src/lib/jest.function.js.map +0 -1
  61. package/test/src/lib/jest.js +0 -113
  62. package/test/src/lib/jest.js.map +0 -1
  63. package/test/src/lib/jest.wrap.js +0 -70
  64. package/test/src/lib/jest.wrap.js.map +0 -1
  65. /package/fetch/{index.cjs.d.ts → index.d.ts} +0 -0
  66. /package/{fetch/index.esm.d.ts → index.d.ts} +0 -0
  67. /package/{index.cjs.d.ts → test/index.d.ts} +0 -0
@@ -1,2298 +1,52 @@
1
1
  'use strict';
2
2
 
3
+ var makeError = require('make-error');
4
+ require('core-js/modules/es.iterator.constructor.js');
5
+ require('core-js/modules/es.iterator.for-each.js');
6
+ require('core-js/modules/es.set.difference.v2.js');
7
+ require('core-js/modules/es.set.symmetric-difference.v2.js');
8
+ require('core-js/modules/es.set.union.v2.js');
3
9
  var util = require('@dereekb/util');
10
+ var fastContentTypeParse = require('fast-content-type-parse');
11
+ require('core-js/modules/es.iterator.map.js');
12
+ require('core-js/modules/es.json.stringify.js');
4
13
 
5
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
-
7
- var makeError = {exports: {}};
8
-
9
- (function (module, exports) {
10
-
11
- // ===================================================================
12
-
13
- var construct = typeof Reflect !== "undefined" ? Reflect.construct : undefined;
14
- var defineProperty = Object.defineProperty;
15
-
16
- // -------------------------------------------------------------------
17
-
18
- var captureStackTrace = Error.captureStackTrace;
19
- if (captureStackTrace === undefined) {
20
- captureStackTrace = function captureStackTrace(error) {
21
- var container = new Error();
22
-
23
- defineProperty(error, "stack", {
24
- configurable: true,
25
- get: function getStack() {
26
- var stack = container.stack;
27
-
28
- // Replace property with value for faster future accesses.
29
- defineProperty(this, "stack", {
30
- configurable: true,
31
- value: stack,
32
- writable: true,
33
- });
34
-
35
- return stack;
36
- },
37
- set: function setStack(stack) {
38
- defineProperty(error, "stack", {
39
- configurable: true,
40
- value: stack,
41
- writable: true,
42
- });
43
- },
44
- });
45
- };
46
- }
47
-
48
- // -------------------------------------------------------------------
49
-
50
- function BaseError(message) {
51
- if (message !== undefined) {
52
- defineProperty(this, "message", {
53
- configurable: true,
54
- value: message,
55
- writable: true,
56
- });
57
- }
58
-
59
- var cname = this.constructor.name;
60
- if (cname !== undefined && cname !== this.name) {
61
- defineProperty(this, "name", {
62
- configurable: true,
63
- value: cname,
64
- writable: true,
65
- });
66
- }
67
-
68
- captureStackTrace(this, this.constructor);
69
- }
70
-
71
- BaseError.prototype = Object.create(Error.prototype, {
72
- // See: https://github.com/JsCommunity/make-error/issues/4
73
- constructor: {
74
- configurable: true,
75
- value: BaseError,
76
- writable: true,
77
- },
78
- });
79
-
80
- // -------------------------------------------------------------------
81
-
82
- // Sets the name of a function if possible (depends of the JS engine).
83
- var setFunctionName = (function() {
84
- function setFunctionName(fn, name) {
85
- return defineProperty(fn, "name", {
86
- configurable: true,
87
- value: name,
88
- });
89
- }
90
- try {
91
- var f = function() {};
92
- setFunctionName(f, "foo");
93
- if (f.name === "foo") {
94
- return setFunctionName;
95
- }
96
- } catch (_) {}
97
- })();
98
-
99
- // -------------------------------------------------------------------
100
-
101
- function makeError(constructor, super_) {
102
- if (super_ == null || super_ === Error) {
103
- super_ = BaseError;
104
- } else if (typeof super_ !== "function") {
105
- throw new TypeError("super_ should be a function");
106
- }
107
-
108
- var name;
109
- if (typeof constructor === "string") {
110
- name = constructor;
111
- constructor =
112
- construct !== undefined
113
- ? function() {
114
- return construct(super_, arguments, this.constructor);
115
- }
116
- : function() {
117
- super_.apply(this, arguments);
118
- };
119
-
120
- // If the name can be set, do it once and for all.
121
- if (setFunctionName !== undefined) {
122
- setFunctionName(constructor, name);
123
- name = undefined;
124
- }
125
- } else if (typeof constructor !== "function") {
126
- throw new TypeError("constructor should be either a string or a function");
127
- }
128
-
129
- // Also register the super constructor also as `constructor.super_` just
130
- // like Node's `util.inherits()`.
131
- //
132
- // eslint-disable-next-line dot-notation
133
- constructor.super_ = constructor["super"] = super_;
134
-
135
- var properties = {
136
- constructor: {
137
- configurable: true,
138
- value: constructor,
139
- writable: true,
140
- },
141
- };
142
-
143
- // If the name could not be set on the constructor, set it on the
144
- // prototype.
145
- if (name !== undefined) {
146
- properties.name = {
147
- configurable: true,
148
- value: name,
149
- writable: true,
150
- };
151
- }
152
- constructor.prototype = Object.create(super_.prototype, properties);
153
-
154
- return constructor;
155
- }
156
- exports = module.exports = makeError;
157
- exports.BaseError = BaseError;
158
- } (makeError, makeError.exports));
159
-
160
- var makeErrorExports = makeError.exports;
161
-
162
- /**
163
- * Thrown by a FetchRequestFactory if one of the async request initialization steps fails.
164
- */
165
- class FetchRequestFactoryError extends makeErrorExports.BaseError {
166
- constructor(error) {
167
- super(`Fetch request failed to build due to an unexpected error: ${typeof error === 'object' ? error.message ?? '' : error}`);
168
- this.error = void 0;
169
- this.error = error;
170
- }
171
- }
172
- /**
173
- * Wraps the input fetch function to always pass the fetch response promise to requireOkResponse().
174
- *
175
- * @param inputFetch
176
- * @returns
177
- */
178
- function fetchOk(inputFetch) {
179
- return (input, init) => requireOkResponse(inputFetch(input, init));
180
- }
181
- class FetchResponseError extends makeErrorExports.BaseError {
182
- constructor(response) {
183
- super(`Fetch response was a non-ok status code (${response.status}): ${response.statusText}`);
184
- this.response = void 0;
185
- this.response = response;
186
- }
187
- }
188
- function requireOkResponse(responsePromise) {
189
- return responsePromise.then(response => {
190
- if (!response.ok) {
191
- throw new FetchResponseError(response);
192
- }
193
- return response;
194
- });
195
- }
196
-
197
- var check = function (it) {
198
- return it && it.Math === Math && it;
199
- };
200
-
201
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
202
- var global$b =
203
- // eslint-disable-next-line es/no-global-this -- safe
204
- check(typeof globalThis == 'object' && globalThis) ||
205
- check(typeof window == 'object' && window) ||
206
- // eslint-disable-next-line no-restricted-globals -- safe
207
- check(typeof self == 'object' && self) ||
208
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
209
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
210
- // eslint-disable-next-line no-new-func -- fallback
211
- (function () { return this; })() || Function('return this')();
212
-
213
- var objectGetOwnPropertyDescriptor = {};
214
-
215
- var fails$d = function (exec) {
216
- try {
217
- return !!exec();
218
- } catch (error) {
219
- return true;
220
- }
221
- };
222
-
223
- var fails$c = fails$d;
224
-
225
- // Detect IE8's incomplete defineProperty implementation
226
- var descriptors = !fails$c(function () {
227
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
228
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
229
- });
230
-
231
- var fails$b = fails$d;
232
-
233
- var functionBindNative = !fails$b(function () {
234
- // eslint-disable-next-line es/no-function-prototype-bind -- safe
235
- var test = (function () { /* empty */ }).bind();
236
- // eslint-disable-next-line no-prototype-builtins -- safe
237
- return typeof test != 'function' || test.hasOwnProperty('prototype');
238
- });
239
-
240
- var NATIVE_BIND$2 = functionBindNative;
241
-
242
- var call$b = Function.prototype.call;
243
-
244
- var functionCall = NATIVE_BIND$2 ? call$b.bind(call$b) : function () {
245
- return call$b.apply(call$b, arguments);
246
- };
247
-
248
- var objectPropertyIsEnumerable = {};
249
-
250
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
251
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
252
- var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
253
-
254
- // Nashorn ~ JDK8 bug
255
- var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
256
-
257
- // `Object.prototype.propertyIsEnumerable` method implementation
258
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
259
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
260
- var descriptor = getOwnPropertyDescriptor$2(this, V);
261
- return !!descriptor && descriptor.enumerable;
262
- } : $propertyIsEnumerable;
263
-
264
- var createPropertyDescriptor$3 = function (bitmap, value) {
265
- return {
266
- enumerable: !(bitmap & 1),
267
- configurable: !(bitmap & 2),
268
- writable: !(bitmap & 4),
269
- value: value
270
- };
271
- };
272
-
273
- var NATIVE_BIND$1 = functionBindNative;
274
-
275
- var FunctionPrototype$1 = Function.prototype;
276
- var call$a = FunctionPrototype$1.call;
277
- var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$a, call$a);
278
-
279
- var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
280
- return function () {
281
- return call$a.apply(fn, arguments);
282
- };
283
- };
284
-
285
- var uncurryThis$g = functionUncurryThis;
286
-
287
- var toString$4 = uncurryThis$g({}.toString);
288
- var stringSlice$1 = uncurryThis$g(''.slice);
289
-
290
- var classofRaw$2 = function (it) {
291
- return stringSlice$1(toString$4(it), 8, -1);
292
- };
293
-
294
- var uncurryThis$f = functionUncurryThis;
295
- var fails$a = fails$d;
296
- var classof$4 = classofRaw$2;
297
-
298
- var $Object$4 = Object;
299
- var split = uncurryThis$f(''.split);
300
-
301
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
302
- var indexedObject = fails$a(function () {
303
- // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
304
- // eslint-disable-next-line no-prototype-builtins -- safe
305
- return !$Object$4('z').propertyIsEnumerable(0);
306
- }) ? function (it) {
307
- return classof$4(it) === 'String' ? split(it, '') : $Object$4(it);
308
- } : $Object$4;
309
-
310
- // we can't use just `it == null` since of `document.all` special case
311
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
312
- var isNullOrUndefined$3 = function (it) {
313
- return it === null || it === undefined;
314
- };
315
-
316
- var isNullOrUndefined$2 = isNullOrUndefined$3;
317
-
318
- var $TypeError$d = TypeError;
319
-
320
- // `RequireObjectCoercible` abstract operation
321
- // https://tc39.es/ecma262/#sec-requireobjectcoercible
322
- var requireObjectCoercible$2 = function (it) {
323
- if (isNullOrUndefined$2(it)) throw new $TypeError$d("Can't call method on " + it);
324
- return it;
325
- };
326
-
327
- // toObject with fallback for non-array-like ES3 strings
328
- var IndexedObject = indexedObject;
329
- var requireObjectCoercible$1 = requireObjectCoercible$2;
330
-
331
- var toIndexedObject$4 = function (it) {
332
- return IndexedObject(requireObjectCoercible$1(it));
333
- };
334
-
335
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
336
- var documentAll = typeof document == 'object' && document.all;
337
-
338
- // `IsCallable` abstract operation
339
- // https://tc39.es/ecma262/#sec-iscallable
340
- // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
341
- var isCallable$e = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
342
- return typeof argument == 'function' || argument === documentAll;
343
- } : function (argument) {
344
- return typeof argument == 'function';
345
- };
346
-
347
- var isCallable$d = isCallable$e;
348
-
349
- var isObject$6 = function (it) {
350
- return typeof it == 'object' ? it !== null : isCallable$d(it);
351
- };
352
-
353
- var global$a = global$b;
354
- var isCallable$c = isCallable$e;
355
-
356
- var aFunction = function (argument) {
357
- return isCallable$c(argument) ? argument : undefined;
358
- };
359
-
360
- var getBuiltIn$4 = function (namespace, method) {
361
- return arguments.length < 2 ? aFunction(global$a[namespace]) : global$a[namespace] && global$a[namespace][method];
362
- };
363
-
364
- var uncurryThis$e = functionUncurryThis;
365
-
366
- var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
367
-
368
- var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
369
-
370
- var global$9 = global$b;
371
- var userAgent = engineUserAgent;
372
-
373
- var process = global$9.process;
374
- var Deno = global$9.Deno;
375
- var versions = process && process.versions || Deno && Deno.version;
376
- var v8 = versions && versions.v8;
377
- var match, version;
378
-
379
- if (v8) {
380
- match = v8.split('.');
381
- // in old Chrome, versions of V8 isn't V8 = Chrome / 10
382
- // but their correct versions are not interesting for us
383
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
384
- }
385
-
386
- // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
387
- // so check `userAgent` even if `.v8` exists, but 0
388
- if (!version && userAgent) {
389
- match = userAgent.match(/Edge\/(\d+)/);
390
- if (!match || match[1] >= 74) {
391
- match = userAgent.match(/Chrome\/(\d+)/);
392
- if (match) version = +match[1];
393
- }
394
- }
395
-
396
- var engineV8Version = version;
397
-
398
- /* eslint-disable es/no-symbol -- required for testing */
399
- var V8_VERSION = engineV8Version;
400
- var fails$9 = fails$d;
401
- var global$8 = global$b;
402
-
403
- var $String$4 = global$8.String;
404
-
405
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
406
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$9(function () {
407
- var symbol = Symbol('symbol detection');
408
- // Chrome 38 Symbol has incorrect toString conversion
409
- // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
410
- // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
411
- // of course, fail.
412
- return !$String$4(symbol) || !(Object(symbol) instanceof Symbol) ||
413
- // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
414
- !Symbol.sham && V8_VERSION && V8_VERSION < 41;
415
- });
416
-
417
- /* eslint-disable es/no-symbol -- required for testing */
418
- var NATIVE_SYMBOL$1 = symbolConstructorDetection;
419
-
420
- var useSymbolAsUid = NATIVE_SYMBOL$1
421
- && !Symbol.sham
422
- && typeof Symbol.iterator == 'symbol';
423
-
424
- var getBuiltIn$3 = getBuiltIn$4;
425
- var isCallable$b = isCallable$e;
426
- var isPrototypeOf$2 = objectIsPrototypeOf;
427
- var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
428
-
429
- var $Object$3 = Object;
430
-
431
- var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
432
- return typeof it == 'symbol';
433
- } : function (it) {
434
- var $Symbol = getBuiltIn$3('Symbol');
435
- return isCallable$b($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$3(it));
436
- };
437
-
438
- var $String$3 = String;
439
-
440
- var tryToString$3 = function (argument) {
441
- try {
442
- return $String$3(argument);
443
- } catch (error) {
444
- return 'Object';
445
- }
446
- };
447
-
448
- var isCallable$a = isCallable$e;
449
- var tryToString$2 = tryToString$3;
450
-
451
- var $TypeError$c = TypeError;
452
-
453
- // `Assert: IsCallable(argument) is true`
454
- var aCallable$7 = function (argument) {
455
- if (isCallable$a(argument)) return argument;
456
- throw new $TypeError$c(tryToString$2(argument) + ' is not a function');
457
- };
458
-
459
- var aCallable$6 = aCallable$7;
460
- var isNullOrUndefined$1 = isNullOrUndefined$3;
461
-
462
- // `GetMethod` abstract operation
463
- // https://tc39.es/ecma262/#sec-getmethod
464
- var getMethod$4 = function (V, P) {
465
- var func = V[P];
466
- return isNullOrUndefined$1(func) ? undefined : aCallable$6(func);
467
- };
468
-
469
- var call$9 = functionCall;
470
- var isCallable$9 = isCallable$e;
471
- var isObject$5 = isObject$6;
472
-
473
- var $TypeError$b = TypeError;
474
-
475
- // `OrdinaryToPrimitive` abstract operation
476
- // https://tc39.es/ecma262/#sec-ordinarytoprimitive
477
- var ordinaryToPrimitive$1 = function (input, pref) {
478
- var fn, val;
479
- if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$9(fn, input))) return val;
480
- if (isCallable$9(fn = input.valueOf) && !isObject$5(val = call$9(fn, input))) return val;
481
- if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$9(fn, input))) return val;
482
- throw new $TypeError$b("Can't convert object to primitive value");
483
- };
484
-
485
- var sharedStore = {exports: {}};
486
-
487
- var isPure = false;
488
-
489
- var global$7 = global$b;
490
-
491
- // eslint-disable-next-line es/no-object-defineproperty -- safe
492
- var defineProperty$2 = Object.defineProperty;
493
-
494
- var defineGlobalProperty$3 = function (key, value) {
495
- try {
496
- defineProperty$2(global$7, key, { value: value, configurable: true, writable: true });
497
- } catch (error) {
498
- global$7[key] = value;
499
- } return value;
500
- };
501
-
502
- var globalThis$1 = global$b;
503
- var defineGlobalProperty$2 = defineGlobalProperty$3;
504
-
505
- var SHARED = '__core-js_shared__';
506
- var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
507
-
508
- (store$3.versions || (store$3.versions = [])).push({
509
- version: '3.36.1',
510
- mode: 'global',
511
- copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
512
- license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
513
- source: 'https://github.com/zloirock/core-js'
514
- });
515
-
516
- var sharedStoreExports = sharedStore.exports;
517
-
518
- var store$2 = sharedStoreExports;
519
-
520
- var shared$3 = function (key, value) {
521
- return store$2[key] || (store$2[key] = value || {});
522
- };
523
-
524
- var requireObjectCoercible = requireObjectCoercible$2;
525
-
526
- var $Object$2 = Object;
527
-
528
- // `ToObject` abstract operation
529
- // https://tc39.es/ecma262/#sec-toobject
530
- var toObject$3 = function (argument) {
531
- return $Object$2(requireObjectCoercible(argument));
532
- };
533
-
534
- var uncurryThis$d = functionUncurryThis;
535
- var toObject$2 = toObject$3;
536
-
537
- var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
538
-
539
- // `HasOwnProperty` abstract operation
540
- // https://tc39.es/ecma262/#sec-hasownproperty
541
- // eslint-disable-next-line es/no-object-hasown -- safe
542
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
543
- return hasOwnProperty(toObject$2(it), key);
544
- };
545
-
546
- var uncurryThis$c = functionUncurryThis;
547
-
548
- var id = 0;
549
- var postfix = Math.random();
550
- var toString$3 = uncurryThis$c(1.0.toString);
551
-
552
- var uid$2 = function (key) {
553
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
554
- };
555
-
556
- var global$6 = global$b;
557
- var shared$2 = shared$3;
558
- var hasOwn$8 = hasOwnProperty_1;
559
- var uid$1 = uid$2;
560
- var NATIVE_SYMBOL = symbolConstructorDetection;
561
- var USE_SYMBOL_AS_UID = useSymbolAsUid;
562
-
563
- var Symbol$1 = global$6.Symbol;
564
- var WellKnownSymbolsStore = shared$2('wks');
565
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
566
-
567
- var wellKnownSymbol$8 = function (name) {
568
- if (!hasOwn$8(WellKnownSymbolsStore, name)) {
569
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)
570
- ? Symbol$1[name]
571
- : createWellKnownSymbol('Symbol.' + name);
572
- } return WellKnownSymbolsStore[name];
573
- };
574
-
575
- var call$8 = functionCall;
576
- var isObject$4 = isObject$6;
577
- var isSymbol$1 = isSymbol$2;
578
- var getMethod$3 = getMethod$4;
579
- var ordinaryToPrimitive = ordinaryToPrimitive$1;
580
- var wellKnownSymbol$7 = wellKnownSymbol$8;
581
-
582
- var $TypeError$a = TypeError;
583
- var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
584
-
585
- // `ToPrimitive` abstract operation
586
- // https://tc39.es/ecma262/#sec-toprimitive
587
- var toPrimitive$1 = function (input, pref) {
588
- if (!isObject$4(input) || isSymbol$1(input)) return input;
589
- var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
590
- var result;
591
- if (exoticToPrim) {
592
- if (pref === undefined) pref = 'default';
593
- result = call$8(exoticToPrim, input, pref);
594
- if (!isObject$4(result) || isSymbol$1(result)) return result;
595
- throw new $TypeError$a("Can't convert object to primitive value");
596
- }
597
- if (pref === undefined) pref = 'number';
598
- return ordinaryToPrimitive(input, pref);
599
- };
600
-
601
- var toPrimitive = toPrimitive$1;
602
- var isSymbol = isSymbol$2;
603
-
604
- // `ToPropertyKey` abstract operation
605
- // https://tc39.es/ecma262/#sec-topropertykey
606
- var toPropertyKey$2 = function (argument) {
607
- var key = toPrimitive(argument, 'string');
608
- return isSymbol(key) ? key : key + '';
609
- };
610
-
611
- var global$5 = global$b;
612
- var isObject$3 = isObject$6;
613
-
614
- var document$1 = global$5.document;
615
- // typeof document.createElement is 'object' in old IE
616
- var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
617
-
618
- var documentCreateElement$1 = function (it) {
619
- return EXISTS$1 ? document$1.createElement(it) : {};
620
- };
621
-
622
- var DESCRIPTORS$b = descriptors;
623
- var fails$8 = fails$d;
624
- var createElement = documentCreateElement$1;
625
-
626
- // Thanks to IE8 for its funny defineProperty
627
- var ie8DomDefine = !DESCRIPTORS$b && !fails$8(function () {
628
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
629
- return Object.defineProperty(createElement('div'), 'a', {
630
- get: function () { return 7; }
631
- }).a !== 7;
632
- });
633
-
634
- var DESCRIPTORS$a = descriptors;
635
- var call$7 = functionCall;
636
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
637
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
638
- var toIndexedObject$3 = toIndexedObject$4;
639
- var toPropertyKey$1 = toPropertyKey$2;
640
- var hasOwn$7 = hasOwnProperty_1;
641
- var IE8_DOM_DEFINE$1 = ie8DomDefine;
642
-
643
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
644
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
645
-
646
- // `Object.getOwnPropertyDescriptor` method
647
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
648
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$a ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
649
- O = toIndexedObject$3(O);
650
- P = toPropertyKey$1(P);
651
- if (IE8_DOM_DEFINE$1) try {
652
- return $getOwnPropertyDescriptor$1(O, P);
653
- } catch (error) { /* empty */ }
654
- if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$7(propertyIsEnumerableModule.f, O, P), O[P]);
655
- };
656
-
657
- var objectDefineProperty = {};
658
-
659
- var DESCRIPTORS$9 = descriptors;
660
- var fails$7 = fails$d;
661
-
662
- // V8 ~ Chrome 36-
663
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
664
- var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$7(function () {
665
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
666
- return Object.defineProperty(function () { /* empty */ }, 'prototype', {
667
- value: 42,
668
- writable: false
669
- }).prototype !== 42;
670
- });
671
-
672
- var isObject$2 = isObject$6;
673
-
674
- var $String$2 = String;
675
- var $TypeError$9 = TypeError;
676
-
677
- // `Assert: Type(argument) is Object`
678
- var anObject$c = function (argument) {
679
- if (isObject$2(argument)) return argument;
680
- throw new $TypeError$9($String$2(argument) + ' is not an object');
681
- };
682
-
683
- var DESCRIPTORS$8 = descriptors;
684
- var IE8_DOM_DEFINE = ie8DomDefine;
685
- var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
686
- var anObject$b = anObject$c;
687
- var toPropertyKey = toPropertyKey$2;
688
-
689
- var $TypeError$8 = TypeError;
690
- // eslint-disable-next-line es/no-object-defineproperty -- safe
691
- var $defineProperty = Object.defineProperty;
692
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
693
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
694
- var ENUMERABLE = 'enumerable';
695
- var CONFIGURABLE$1 = 'configurable';
696
- var WRITABLE = 'writable';
697
-
698
- // `Object.defineProperty` method
699
- // https://tc39.es/ecma262/#sec-object.defineproperty
700
- objectDefineProperty.f = DESCRIPTORS$8 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
701
- anObject$b(O);
702
- P = toPropertyKey(P);
703
- anObject$b(Attributes);
704
- if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
705
- var current = $getOwnPropertyDescriptor(O, P);
706
- if (current && current[WRITABLE]) {
707
- O[P] = Attributes.value;
708
- Attributes = {
709
- configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
710
- enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
711
- writable: false
712
- };
713
- }
714
- } return $defineProperty(O, P, Attributes);
715
- } : $defineProperty : function defineProperty(O, P, Attributes) {
716
- anObject$b(O);
717
- P = toPropertyKey(P);
718
- anObject$b(Attributes);
719
- if (IE8_DOM_DEFINE) try {
720
- return $defineProperty(O, P, Attributes);
721
- } catch (error) { /* empty */ }
722
- if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$8('Accessors not supported');
723
- if ('value' in Attributes) O[P] = Attributes.value;
724
- return O;
725
- };
726
-
727
- var DESCRIPTORS$7 = descriptors;
728
- var definePropertyModule$4 = objectDefineProperty;
729
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
730
-
731
- var createNonEnumerableProperty$3 = DESCRIPTORS$7 ? function (object, key, value) {
732
- return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
733
- } : function (object, key, value) {
734
- object[key] = value;
735
- return object;
736
- };
737
-
738
- var makeBuiltIn$3 = {exports: {}};
739
-
740
- var DESCRIPTORS$6 = descriptors;
741
- var hasOwn$6 = hasOwnProperty_1;
742
-
743
- var FunctionPrototype = Function.prototype;
744
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
745
- var getDescriptor = DESCRIPTORS$6 && Object.getOwnPropertyDescriptor;
746
-
747
- var EXISTS = hasOwn$6(FunctionPrototype, 'name');
748
- // additional protection from minified / mangled / dropped function names
749
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
750
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$6 || (DESCRIPTORS$6 && getDescriptor(FunctionPrototype, 'name').configurable));
751
-
752
- var functionName = {
753
- EXISTS: EXISTS,
754
- PROPER: PROPER,
755
- CONFIGURABLE: CONFIGURABLE
756
- };
757
-
758
- var uncurryThis$b = functionUncurryThis;
759
- var isCallable$8 = isCallable$e;
760
- var store$1 = sharedStoreExports;
761
-
762
- var functionToString = uncurryThis$b(Function.toString);
763
-
764
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
765
- if (!isCallable$8(store$1.inspectSource)) {
766
- store$1.inspectSource = function (it) {
767
- return functionToString(it);
768
- };
769
- }
770
-
771
- var inspectSource$1 = store$1.inspectSource;
772
-
773
- var global$4 = global$b;
774
- var isCallable$7 = isCallable$e;
775
-
776
- var WeakMap$1 = global$4.WeakMap;
777
-
778
- var weakMapBasicDetection = isCallable$7(WeakMap$1) && /native code/.test(String(WeakMap$1));
779
-
780
- var shared$1 = shared$3;
781
- var uid = uid$2;
782
-
783
- var keys$1 = shared$1('keys');
784
-
785
- var sharedKey$3 = function (key) {
786
- return keys$1[key] || (keys$1[key] = uid(key));
787
- };
788
-
789
- var hiddenKeys$4 = {};
790
-
791
- var NATIVE_WEAK_MAP = weakMapBasicDetection;
792
- var global$3 = global$b;
793
- var isObject$1 = isObject$6;
794
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
795
- var hasOwn$5 = hasOwnProperty_1;
796
- var shared = sharedStoreExports;
797
- var sharedKey$2 = sharedKey$3;
798
- var hiddenKeys$3 = hiddenKeys$4;
799
-
800
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
801
- var TypeError$1 = global$3.TypeError;
802
- var WeakMap = global$3.WeakMap;
803
- var set, get, has$6;
804
-
805
- var enforce = function (it) {
806
- return has$6(it) ? get(it) : set(it, {});
807
- };
808
-
809
- var getterFor = function (TYPE) {
810
- return function (it) {
811
- var state;
812
- if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
813
- throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
814
- } return state;
815
- };
816
- };
817
-
818
- if (NATIVE_WEAK_MAP || shared.state) {
819
- var store = shared.state || (shared.state = new WeakMap());
820
- /* eslint-disable no-self-assign -- prototype methods protection */
821
- store.get = store.get;
822
- store.has = store.has;
823
- store.set = store.set;
824
- /* eslint-enable no-self-assign -- prototype methods protection */
825
- set = function (it, metadata) {
826
- if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
827
- metadata.facade = it;
828
- store.set(it, metadata);
829
- return metadata;
830
- };
831
- get = function (it) {
832
- return store.get(it) || {};
833
- };
834
- has$6 = function (it) {
835
- return store.has(it);
836
- };
837
- } else {
838
- var STATE = sharedKey$2('state');
839
- hiddenKeys$3[STATE] = true;
840
- set = function (it, metadata) {
841
- if (hasOwn$5(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
842
- metadata.facade = it;
843
- createNonEnumerableProperty$2(it, STATE, metadata);
844
- return metadata;
845
- };
846
- get = function (it) {
847
- return hasOwn$5(it, STATE) ? it[STATE] : {};
848
- };
849
- has$6 = function (it) {
850
- return hasOwn$5(it, STATE);
851
- };
852
- }
853
-
854
- var internalState = {
855
- set: set,
856
- get: get,
857
- has: has$6,
858
- enforce: enforce,
859
- getterFor: getterFor
860
- };
861
-
862
- var uncurryThis$a = functionUncurryThis;
863
- var fails$6 = fails$d;
864
- var isCallable$6 = isCallable$e;
865
- var hasOwn$4 = hasOwnProperty_1;
866
- var DESCRIPTORS$5 = descriptors;
867
- var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
868
- var inspectSource = inspectSource$1;
869
- var InternalStateModule$1 = internalState;
870
-
871
- var enforceInternalState = InternalStateModule$1.enforce;
872
- var getInternalState = InternalStateModule$1.get;
873
- var $String$1 = String;
874
- // eslint-disable-next-line es/no-object-defineproperty -- safe
875
- var defineProperty$1 = Object.defineProperty;
876
- var stringSlice = uncurryThis$a(''.slice);
877
- var replace = uncurryThis$a(''.replace);
878
- var join = uncurryThis$a([].join);
879
-
880
- var CONFIGURABLE_LENGTH = DESCRIPTORS$5 && !fails$6(function () {
881
- return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
882
- });
883
-
884
- var TEMPLATE = String(String).split('String');
885
-
886
- var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
887
- if (stringSlice($String$1(name), 0, 7) === 'Symbol(') {
888
- name = '[' + replace($String$1(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
889
- }
890
- if (options && options.getter) name = 'get ' + name;
891
- if (options && options.setter) name = 'set ' + name;
892
- if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
893
- if (DESCRIPTORS$5) defineProperty$1(value, 'name', { value: name, configurable: true });
894
- else value.name = name;
895
- }
896
- if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
897
- defineProperty$1(value, 'length', { value: options.arity });
898
- }
899
- try {
900
- if (options && hasOwn$4(options, 'constructor') && options.constructor) {
901
- if (DESCRIPTORS$5) defineProperty$1(value, 'prototype', { writable: false });
902
- // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
903
- } else if (value.prototype) value.prototype = undefined;
904
- } catch (error) { /* empty */ }
905
- var state = enforceInternalState(value);
906
- if (!hasOwn$4(state, 'source')) {
907
- state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
908
- } return value;
909
- };
910
-
911
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
912
- // eslint-disable-next-line no-extend-native -- required
913
- Function.prototype.toString = makeBuiltIn$2(function toString() {
914
- return isCallable$6(this) && getInternalState(this).source || inspectSource(this);
915
- }, 'toString');
916
-
917
- var makeBuiltInExports = makeBuiltIn$3.exports;
918
-
919
- var isCallable$5 = isCallable$e;
920
- var definePropertyModule$3 = objectDefineProperty;
921
- var makeBuiltIn$1 = makeBuiltInExports;
922
- var defineGlobalProperty$1 = defineGlobalProperty$3;
923
-
924
- var defineBuiltIn$5 = function (O, key, value, options) {
925
- if (!options) options = {};
926
- var simple = options.enumerable;
927
- var name = options.name !== undefined ? options.name : key;
928
- if (isCallable$5(value)) makeBuiltIn$1(value, name, options);
929
- if (options.global) {
930
- if (simple) O[key] = value;
931
- else defineGlobalProperty$1(key, value);
932
- } else {
933
- try {
934
- if (!options.unsafe) delete O[key];
935
- else if (O[key]) simple = true;
936
- } catch (error) { /* empty */ }
937
- if (simple) O[key] = value;
938
- else definePropertyModule$3.f(O, key, {
939
- value: value,
940
- enumerable: false,
941
- configurable: !options.nonConfigurable,
942
- writable: !options.nonWritable
943
- });
944
- } return O;
945
- };
946
-
947
- var objectGetOwnPropertyNames = {};
948
-
949
- var ceil = Math.ceil;
950
- var floor = Math.floor;
951
-
952
- // `Math.trunc` method
953
- // https://tc39.es/ecma262/#sec-math.trunc
954
- // eslint-disable-next-line es/no-math-trunc -- safe
955
- var mathTrunc = Math.trunc || function trunc(x) {
956
- var n = +x;
957
- return (n > 0 ? floor : ceil)(n);
958
- };
959
-
960
- var trunc = mathTrunc;
961
-
962
- // `ToIntegerOrInfinity` abstract operation
963
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
964
- var toIntegerOrInfinity$3 = function (argument) {
965
- var number = +argument;
966
- // eslint-disable-next-line no-self-compare -- NaN check
967
- return number !== number || number === 0 ? 0 : trunc(number);
968
- };
969
-
970
- var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
971
-
972
- var max$1 = Math.max;
973
- var min$1 = Math.min;
974
-
975
- // Helper for a popular repeating case of the spec:
976
- // Let integer be ? ToInteger(index).
977
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
978
- var toAbsoluteIndex$1 = function (index, length) {
979
- var integer = toIntegerOrInfinity$2(index);
980
- return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
981
- };
982
-
983
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
984
-
985
- var min = Math.min;
986
-
987
- // `ToLength` abstract operation
988
- // https://tc39.es/ecma262/#sec-tolength
989
- var toLength$1 = function (argument) {
990
- var len = toIntegerOrInfinity$1(argument);
991
- return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
992
- };
993
-
994
- var toLength = toLength$1;
995
-
996
- // `LengthOfArrayLike` abstract operation
997
- // https://tc39.es/ecma262/#sec-lengthofarraylike
998
- var lengthOfArrayLike$3 = function (obj) {
999
- return toLength(obj.length);
1000
- };
1001
-
1002
- var toIndexedObject$2 = toIndexedObject$4;
1003
- var toAbsoluteIndex = toAbsoluteIndex$1;
1004
- var lengthOfArrayLike$2 = lengthOfArrayLike$3;
1005
-
1006
- // `Array.prototype.{ indexOf, includes }` methods implementation
1007
- var createMethod = function (IS_INCLUDES) {
1008
- return function ($this, el, fromIndex) {
1009
- var O = toIndexedObject$2($this);
1010
- var length = lengthOfArrayLike$2(O);
1011
- if (length === 0) return !IS_INCLUDES && -1;
1012
- var index = toAbsoluteIndex(fromIndex, length);
1013
- var value;
1014
- // Array#includes uses SameValueZero equality algorithm
1015
- // eslint-disable-next-line no-self-compare -- NaN check
1016
- if (IS_INCLUDES && el !== el) while (length > index) {
1017
- value = O[index++];
1018
- // eslint-disable-next-line no-self-compare -- NaN check
1019
- if (value !== value) return true;
1020
- // Array#indexOf ignores holes, Array#includes - not
1021
- } else for (;length > index; index++) {
1022
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
1023
- } return !IS_INCLUDES && -1;
1024
- };
1025
- };
1026
-
1027
- var arrayIncludes = {
1028
- // `Array.prototype.includes` method
1029
- // https://tc39.es/ecma262/#sec-array.prototype.includes
1030
- includes: createMethod(true),
1031
- // `Array.prototype.indexOf` method
1032
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
1033
- indexOf: createMethod(false)
1034
- };
1035
-
1036
- var uncurryThis$9 = functionUncurryThis;
1037
- var hasOwn$3 = hasOwnProperty_1;
1038
- var toIndexedObject$1 = toIndexedObject$4;
1039
- var indexOf = arrayIncludes.indexOf;
1040
- var hiddenKeys$2 = hiddenKeys$4;
1041
-
1042
- var push$1 = uncurryThis$9([].push);
1043
-
1044
- var objectKeysInternal = function (object, names) {
1045
- var O = toIndexedObject$1(object);
1046
- var i = 0;
1047
- var result = [];
1048
- var key;
1049
- for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push$1(result, key);
1050
- // Don't enum bug & hidden keys
1051
- while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
1052
- ~indexOf(result, key) || push$1(result, key);
1053
- }
1054
- return result;
1055
- };
1056
-
1057
- // IE8- don't enum bug keys
1058
- var enumBugKeys$3 = [
1059
- 'constructor',
1060
- 'hasOwnProperty',
1061
- 'isPrototypeOf',
1062
- 'propertyIsEnumerable',
1063
- 'toLocaleString',
1064
- 'toString',
1065
- 'valueOf'
1066
- ];
1067
-
1068
- var internalObjectKeys$1 = objectKeysInternal;
1069
- var enumBugKeys$2 = enumBugKeys$3;
1070
-
1071
- var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
1072
-
1073
- // `Object.getOwnPropertyNames` method
1074
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
1075
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1076
- objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1077
- return internalObjectKeys$1(O, hiddenKeys$1);
1078
- };
1079
-
1080
- var objectGetOwnPropertySymbols = {};
1081
-
1082
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1083
- objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1084
-
1085
- var getBuiltIn$2 = getBuiltIn$4;
1086
- var uncurryThis$8 = functionUncurryThis;
1087
- var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1088
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1089
- var anObject$a = anObject$c;
1090
-
1091
- var concat = uncurryThis$8([].concat);
1092
-
1093
- // all object keys, includes non-enumerable and symbols
1094
- var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
1095
- var keys = getOwnPropertyNamesModule.f(anObject$a(it));
1096
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1097
- return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
1098
- };
1099
-
1100
- var hasOwn$2 = hasOwnProperty_1;
1101
- var ownKeys = ownKeys$1;
1102
- var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1103
- var definePropertyModule$2 = objectDefineProperty;
1104
-
1105
- var copyConstructorProperties$1 = function (target, source, exceptions) {
1106
- var keys = ownKeys(source);
1107
- var defineProperty = definePropertyModule$2.f;
1108
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1109
- for (var i = 0; i < keys.length; i++) {
1110
- var key = keys[i];
1111
- if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
1112
- defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1113
- }
1114
- }
1115
- };
1116
-
1117
- var fails$5 = fails$d;
1118
- var isCallable$4 = isCallable$e;
1119
-
1120
- var replacement = /#|\.prototype\./;
1121
-
1122
- var isForced$1 = function (feature, detection) {
1123
- var value = data[normalize(feature)];
1124
- return value === POLYFILL ? true
1125
- : value === NATIVE ? false
1126
- : isCallable$4(detection) ? fails$5(detection)
1127
- : !!detection;
1128
- };
1129
-
1130
- var normalize = isForced$1.normalize = function (string) {
1131
- return String(string).replace(replacement, '.').toLowerCase();
1132
- };
1133
-
1134
- var data = isForced$1.data = {};
1135
- var NATIVE = isForced$1.NATIVE = 'N';
1136
- var POLYFILL = isForced$1.POLYFILL = 'P';
1137
-
1138
- var isForced_1 = isForced$1;
1139
-
1140
- var global$2 = global$b;
1141
- var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
1142
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
1143
- var defineBuiltIn$4 = defineBuiltIn$5;
1144
- var defineGlobalProperty = defineGlobalProperty$3;
1145
- var copyConstructorProperties = copyConstructorProperties$1;
1146
- var isForced = isForced_1;
1147
-
1148
- /*
1149
- options.target - name of the target object
1150
- options.global - target is the global object
1151
- options.stat - export as static methods of target
1152
- options.proto - export as prototype methods of target
1153
- options.real - real prototype method for the `pure` version
1154
- options.forced - export even if the native feature is available
1155
- options.bind - bind methods to the target, required for the `pure` version
1156
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1157
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
1158
- options.sham - add a flag to not completely full polyfills
1159
- options.enumerable - export as enumerable property
1160
- options.dontCallGetSet - prevent calling a getter on target
1161
- options.name - the .name of the function if it does not match the key
1162
- */
1163
- var _export = function (options, source) {
1164
- var TARGET = options.target;
1165
- var GLOBAL = options.global;
1166
- var STATIC = options.stat;
1167
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1168
- if (GLOBAL) {
1169
- target = global$2;
1170
- } else if (STATIC) {
1171
- target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
1172
- } else {
1173
- target = global$2[TARGET] && global$2[TARGET].prototype;
1174
- }
1175
- if (target) for (key in source) {
1176
- sourceProperty = source[key];
1177
- if (options.dontCallGetSet) {
1178
- descriptor = getOwnPropertyDescriptor$1(target, key);
1179
- targetProperty = descriptor && descriptor.value;
1180
- } else targetProperty = target[key];
1181
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1182
- // contained in target
1183
- if (!FORCED && targetProperty !== undefined) {
1184
- if (typeof sourceProperty == typeof targetProperty) continue;
1185
- copyConstructorProperties(sourceProperty, targetProperty);
1186
- }
1187
- // add a flag to not completely full polyfills
1188
- if (options.sham || (targetProperty && targetProperty.sham)) {
1189
- createNonEnumerableProperty$1(sourceProperty, 'sham', true);
1190
- }
1191
- defineBuiltIn$4(target, key, sourceProperty, options);
1192
- }
1193
- };
1194
-
1195
- var classof$3 = classofRaw$2;
1196
-
1197
- // `IsArray` abstract operation
1198
- // https://tc39.es/ecma262/#sec-isarray
1199
- // eslint-disable-next-line es/no-array-isarray -- safe
1200
- var isArray$1 = Array.isArray || function isArray(argument) {
1201
- return classof$3(argument) === 'Array';
1202
- };
1203
-
1204
- var DESCRIPTORS$4 = descriptors;
1205
- var isArray = isArray$1;
1206
-
1207
- var $TypeError$7 = TypeError;
1208
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1209
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1210
-
1211
- // Safari < 13 does not throw an error in this case
1212
- var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$4 && !function () {
1213
- // makes no sense without proper strict mode support
1214
- if (this !== undefined) return true;
1215
- try {
1216
- // eslint-disable-next-line es/no-object-defineproperty -- safe
1217
- Object.defineProperty([], 'length', { writable: false }).length = 1;
1218
- } catch (error) {
1219
- return error instanceof TypeError;
1220
- }
1221
- }();
1222
-
1223
- var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
1224
- if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
1225
- throw new $TypeError$7('Cannot set read only .length');
1226
- } return O.length = length;
1227
- } : function (O, length) {
1228
- return O.length = length;
1229
- };
1230
-
1231
- var $TypeError$6 = TypeError;
1232
- var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
1233
-
1234
- var doesNotExceedSafeInteger$1 = function (it) {
1235
- if (it > MAX_SAFE_INTEGER) throw $TypeError$6('Maximum allowed index exceeded');
1236
- return it;
1237
- };
1238
-
1239
- var $$a = _export;
1240
- var toObject$1 = toObject$3;
1241
- var lengthOfArrayLike$1 = lengthOfArrayLike$3;
1242
- var setArrayLength = arraySetLength;
1243
- var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
1244
- var fails$4 = fails$d;
1245
-
1246
- var INCORRECT_TO_LENGTH = fails$4(function () {
1247
- return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
1248
- });
1249
-
1250
- // V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError
1251
- // https://bugs.chromium.org/p/v8/issues/detail?id=12681
1252
- var properErrorOnNonWritableLength = function () {
1253
- try {
1254
- // eslint-disable-next-line es/no-object-defineproperty -- safe
1255
- Object.defineProperty([], 'length', { writable: false }).push();
1256
- } catch (error) {
1257
- return error instanceof TypeError;
1258
- }
1259
- };
1260
-
1261
- var FORCED$1 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
1262
-
1263
- // `Array.prototype.push` method
1264
- // https://tc39.es/ecma262/#sec-array.prototype.push
1265
- $$a({ target: 'Array', proto: true, arity: 1, forced: FORCED$1 }, {
1266
- // eslint-disable-next-line no-unused-vars -- required for `.length`
1267
- push: function push(item) {
1268
- var O = toObject$1(this);
1269
- var len = lengthOfArrayLike$1(O);
1270
- var argCount = arguments.length;
1271
- doesNotExceedSafeInteger(len + argCount);
1272
- for (var i = 0; i < argCount; i++) {
1273
- O[len] = arguments[i];
1274
- len++;
1275
- }
1276
- setArrayLength(O, len);
1277
- return len;
1278
- }
1279
- });
1280
-
1281
- var isPrototypeOf$1 = objectIsPrototypeOf;
1282
-
1283
- var $TypeError$5 = TypeError;
1284
-
1285
- var anInstance$1 = function (it, Prototype) {
1286
- if (isPrototypeOf$1(Prototype, it)) return it;
1287
- throw new $TypeError$5('Incorrect invocation');
1288
- };
1289
-
1290
- var fails$3 = fails$d;
1291
-
1292
- var correctPrototypeGetter = !fails$3(function () {
1293
- function F() { /* empty */ }
1294
- F.prototype.constructor = null;
1295
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1296
- return Object.getPrototypeOf(new F()) !== F.prototype;
1297
- });
1298
-
1299
- var hasOwn$1 = hasOwnProperty_1;
1300
- var isCallable$3 = isCallable$e;
1301
- var toObject = toObject$3;
1302
- var sharedKey$1 = sharedKey$3;
1303
- var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1304
-
1305
- var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1306
- var $Object$1 = Object;
1307
- var ObjectPrototype = $Object$1.prototype;
1308
-
1309
- // `Object.getPrototypeOf` method
1310
- // https://tc39.es/ecma262/#sec-object.getprototypeof
1311
- // eslint-disable-next-line es/no-object-getprototypeof -- safe
1312
- var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1313
- var object = toObject(O);
1314
- if (hasOwn$1(object, IE_PROTO$1)) return object[IE_PROTO$1];
1315
- var constructor = object.constructor;
1316
- if (isCallable$3(constructor) && object instanceof constructor) {
1317
- return constructor.prototype;
1318
- } return object instanceof $Object$1 ? ObjectPrototype : null;
1319
- };
1320
-
1321
- var makeBuiltIn = makeBuiltInExports;
1322
- var defineProperty = objectDefineProperty;
1323
-
1324
- var defineBuiltInAccessor$2 = function (target, name, descriptor) {
1325
- if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
1326
- if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
1327
- return defineProperty.f(target, name, descriptor);
1328
- };
1329
-
1330
- var DESCRIPTORS$3 = descriptors;
1331
- var definePropertyModule$1 = objectDefineProperty;
1332
- var createPropertyDescriptor = createPropertyDescriptor$3;
1333
-
1334
- var createProperty$1 = function (object, key, value) {
1335
- if (DESCRIPTORS$3) definePropertyModule$1.f(object, key, createPropertyDescriptor(0, value));
1336
- else object[key] = value;
1337
- };
1338
-
1339
- var objectDefineProperties = {};
1340
-
1341
- var internalObjectKeys = objectKeysInternal;
1342
- var enumBugKeys$1 = enumBugKeys$3;
1343
-
1344
- // `Object.keys` method
1345
- // https://tc39.es/ecma262/#sec-object.keys
1346
- // eslint-disable-next-line es/no-object-keys -- safe
1347
- var objectKeys$1 = Object.keys || function keys(O) {
1348
- return internalObjectKeys(O, enumBugKeys$1);
1349
- };
1350
-
1351
- var DESCRIPTORS$2 = descriptors;
1352
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1353
- var definePropertyModule = objectDefineProperty;
1354
- var anObject$9 = anObject$c;
1355
- var toIndexedObject = toIndexedObject$4;
1356
- var objectKeys = objectKeys$1;
1357
-
1358
- // `Object.defineProperties` method
1359
- // https://tc39.es/ecma262/#sec-object.defineproperties
1360
- // eslint-disable-next-line es/no-object-defineproperties -- safe
1361
- objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1362
- anObject$9(O);
1363
- var props = toIndexedObject(Properties);
1364
- var keys = objectKeys(Properties);
1365
- var length = keys.length;
1366
- var index = 0;
1367
- var key;
1368
- while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1369
- return O;
1370
- };
1371
-
1372
- var getBuiltIn$1 = getBuiltIn$4;
1373
-
1374
- var html$1 = getBuiltIn$1('document', 'documentElement');
1375
-
1376
- /* global ActiveXObject -- old IE, WSH */
1377
- var anObject$8 = anObject$c;
1378
- var definePropertiesModule = objectDefineProperties;
1379
- var enumBugKeys = enumBugKeys$3;
1380
- var hiddenKeys = hiddenKeys$4;
1381
- var html = html$1;
1382
- var documentCreateElement = documentCreateElement$1;
1383
- var sharedKey = sharedKey$3;
1384
-
1385
- var GT = '>';
1386
- var LT = '<';
1387
- var PROTOTYPE = 'prototype';
1388
- var SCRIPT = 'script';
1389
- var IE_PROTO = sharedKey('IE_PROTO');
1390
-
1391
- var EmptyConstructor = function () { /* empty */ };
1392
-
1393
- var scriptTag = function (content) {
1394
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1395
- };
1396
-
1397
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1398
- var NullProtoObjectViaActiveX = function (activeXDocument) {
1399
- activeXDocument.write(scriptTag(''));
1400
- activeXDocument.close();
1401
- var temp = activeXDocument.parentWindow.Object;
1402
- activeXDocument = null; // avoid memory leak
1403
- return temp;
1404
- };
1405
-
1406
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
1407
- var NullProtoObjectViaIFrame = function () {
1408
- // Thrash, waste and sodomy: IE GC bug
1409
- var iframe = documentCreateElement('iframe');
1410
- var JS = 'java' + SCRIPT + ':';
1411
- var iframeDocument;
1412
- iframe.style.display = 'none';
1413
- html.appendChild(iframe);
1414
- // https://github.com/zloirock/core-js/issues/475
1415
- iframe.src = String(JS);
1416
- iframeDocument = iframe.contentWindow.document;
1417
- iframeDocument.open();
1418
- iframeDocument.write(scriptTag('document.F=Object'));
1419
- iframeDocument.close();
1420
- return iframeDocument.F;
1421
- };
1422
-
1423
- // Check for document.domain and active x support
1424
- // No need to use active x approach when document.domain is not set
1425
- // see https://github.com/es-shims/es5-shim/issues/150
1426
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1427
- // avoid IE GC bug
1428
- var activeXDocument;
1429
- var NullProtoObject = function () {
1430
- try {
1431
- activeXDocument = new ActiveXObject('htmlfile');
1432
- } catch (error) { /* ignore */ }
1433
- NullProtoObject = typeof document != 'undefined'
1434
- ? document.domain && activeXDocument
1435
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1436
- : NullProtoObjectViaIFrame()
1437
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
1438
- var length = enumBugKeys.length;
1439
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1440
- return NullProtoObject();
1441
- };
1442
-
1443
- hiddenKeys[IE_PROTO] = true;
1444
-
1445
- // `Object.create` method
1446
- // https://tc39.es/ecma262/#sec-object.create
1447
- // eslint-disable-next-line es/no-object-create -- safe
1448
- var objectCreate = Object.create || function create(O, Properties) {
1449
- var result;
1450
- if (O !== null) {
1451
- EmptyConstructor[PROTOTYPE] = anObject$8(O);
1452
- result = new EmptyConstructor();
1453
- EmptyConstructor[PROTOTYPE] = null;
1454
- // add "__proto__" for Object.getPrototypeOf polyfill
1455
- result[IE_PROTO] = O;
1456
- } else result = NullProtoObject();
1457
- return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1458
- };
1459
-
1460
- var fails$2 = fails$d;
1461
- var isCallable$2 = isCallable$e;
1462
- var isObject = isObject$6;
1463
- var getPrototypeOf$1 = objectGetPrototypeOf;
1464
- var defineBuiltIn$3 = defineBuiltIn$5;
1465
- var wellKnownSymbol$6 = wellKnownSymbol$8;
1466
-
1467
- var ITERATOR$3 = wellKnownSymbol$6('iterator');
1468
- var BUGGY_SAFARI_ITERATORS = false;
1469
-
1470
- // `%IteratorPrototype%` object
1471
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1472
- var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1473
-
1474
- /* eslint-disable es/no-array-prototype-keys -- safe */
1475
- if ([].keys) {
1476
- arrayIterator = [].keys();
1477
- // Safari 8 has buggy iterators w/o `next`
1478
- if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
1479
- else {
1480
- PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1481
- if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1482
- }
1483
- }
1484
-
1485
- var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$2(function () {
1486
- var test = {};
1487
- // FF44- legacy iterators case
1488
- return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
1489
- });
1490
-
1491
- if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1492
-
1493
- // `%IteratorPrototype%[@@iterator]()` method
1494
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1495
- if (!isCallable$2(IteratorPrototype$2[ITERATOR$3])) {
1496
- defineBuiltIn$3(IteratorPrototype$2, ITERATOR$3, function () {
1497
- return this;
1498
- });
1499
- }
1500
-
1501
- var iteratorsCore = {
1502
- IteratorPrototype: IteratorPrototype$2,
1503
- BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
1504
- };
1505
-
1506
- var $$9 = _export;
1507
- var global$1 = global$b;
1508
- var anInstance = anInstance$1;
1509
- var anObject$7 = anObject$c;
1510
- var isCallable$1 = isCallable$e;
1511
- var getPrototypeOf = objectGetPrototypeOf;
1512
- var defineBuiltInAccessor$1 = defineBuiltInAccessor$2;
1513
- var createProperty = createProperty$1;
1514
- var fails$1 = fails$d;
1515
- var hasOwn = hasOwnProperty_1;
1516
- var wellKnownSymbol$5 = wellKnownSymbol$8;
1517
- var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1518
- var DESCRIPTORS$1 = descriptors;
1519
-
1520
- var CONSTRUCTOR = 'constructor';
1521
- var ITERATOR$2 = 'Iterator';
1522
- var TO_STRING_TAG$3 = wellKnownSymbol$5('toStringTag');
1523
-
1524
- var $TypeError$4 = TypeError;
1525
- var NativeIterator = global$1[ITERATOR$2];
1526
-
1527
- // FF56- have non-standard global helper `Iterator`
1528
- var FORCED = !isCallable$1(NativeIterator)
1529
- || NativeIterator.prototype !== IteratorPrototype$1
1530
- // FF44- non-standard `Iterator` passes previous tests
1531
- || !fails$1(function () { NativeIterator({}); });
1532
-
1533
- var IteratorConstructor = function Iterator() {
1534
- anInstance(this, IteratorPrototype$1);
1535
- if (getPrototypeOf(this) === IteratorPrototype$1) throw new $TypeError$4('Abstract class Iterator not directly constructable');
1536
- };
1537
-
1538
- var defineIteratorPrototypeAccessor = function (key, value) {
1539
- if (DESCRIPTORS$1) {
1540
- defineBuiltInAccessor$1(IteratorPrototype$1, key, {
1541
- configurable: true,
1542
- get: function () {
1543
- return value;
1544
- },
1545
- set: function (replacement) {
1546
- anObject$7(this);
1547
- if (this === IteratorPrototype$1) throw new $TypeError$4("You can't redefine this property");
1548
- if (hasOwn(this, key)) this[key] = replacement;
1549
- else createProperty(this, key, replacement);
1550
- }
1551
- });
1552
- } else IteratorPrototype$1[key] = value;
1553
- };
1554
-
1555
- if (!hasOwn(IteratorPrototype$1, TO_STRING_TAG$3)) defineIteratorPrototypeAccessor(TO_STRING_TAG$3, ITERATOR$2);
1556
-
1557
- if (FORCED || !hasOwn(IteratorPrototype$1, CONSTRUCTOR) || IteratorPrototype$1[CONSTRUCTOR] === Object) {
1558
- defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);
1559
- }
1560
-
1561
- IteratorConstructor.prototype = IteratorPrototype$1;
1562
-
1563
- // `Iterator` constructor
1564
- // https://github.com/tc39/proposal-iterator-helpers
1565
- $$9({ global: true, constructor: true, forced: FORCED }, {
1566
- Iterator: IteratorConstructor
1567
- });
1568
-
1569
- var classofRaw$1 = classofRaw$2;
1570
- var uncurryThis$7 = functionUncurryThis;
1571
-
1572
- var functionUncurryThisClause = function (fn) {
1573
- // Nashorn bug:
1574
- // https://github.com/zloirock/core-js/issues/1128
1575
- // https://github.com/zloirock/core-js/issues/1130
1576
- if (classofRaw$1(fn) === 'Function') return uncurryThis$7(fn);
1577
- };
1578
-
1579
- var uncurryThis$6 = functionUncurryThisClause;
1580
- var aCallable$5 = aCallable$7;
1581
- var NATIVE_BIND = functionBindNative;
1582
-
1583
- var bind$1 = uncurryThis$6(uncurryThis$6.bind);
1584
-
1585
- // optional / simple context binding
1586
- var functionBindContext = function (fn, that) {
1587
- aCallable$5(fn);
1588
- return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
1589
- return fn.apply(that, arguments);
1590
- };
1591
- };
1592
-
1593
- var iterators = {};
1594
-
1595
- var wellKnownSymbol$4 = wellKnownSymbol$8;
1596
- var Iterators$1 = iterators;
1597
-
1598
- var ITERATOR$1 = wellKnownSymbol$4('iterator');
1599
- var ArrayPrototype = Array.prototype;
1600
-
1601
- // check on default Array iterator
1602
- var isArrayIteratorMethod$1 = function (it) {
1603
- return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$1] === it);
1604
- };
1605
-
1606
- var wellKnownSymbol$3 = wellKnownSymbol$8;
1607
-
1608
- var TO_STRING_TAG$2 = wellKnownSymbol$3('toStringTag');
1609
- var test = {};
1610
-
1611
- test[TO_STRING_TAG$2] = 'z';
1612
-
1613
- var toStringTagSupport = String(test) === '[object z]';
1614
-
1615
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1616
- var isCallable = isCallable$e;
1617
- var classofRaw = classofRaw$2;
1618
- var wellKnownSymbol$2 = wellKnownSymbol$8;
1619
-
1620
- var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
1621
- var $Object = Object;
1622
-
1623
- // ES3 wrong here
1624
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
1625
-
1626
- // fallback for IE11 Script Access Denied error
1627
- var tryGet = function (it, key) {
1628
- try {
1629
- return it[key];
1630
- } catch (error) { /* empty */ }
1631
- };
1632
-
1633
- // getting tag from ES6+ `Object.prototype.toString`
1634
- var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1635
- var O, tag, result;
1636
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1637
- // @@toStringTag case
1638
- : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG$1)) == 'string' ? tag
1639
- // builtinTag case
1640
- : CORRECT_ARGUMENTS ? classofRaw(O)
1641
- // ES3 arguments fallback
1642
- : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
1643
- };
1644
-
1645
- var classof$1 = classof$2;
1646
- var getMethod$2 = getMethod$4;
1647
- var isNullOrUndefined = isNullOrUndefined$3;
1648
- var Iterators = iterators;
1649
- var wellKnownSymbol$1 = wellKnownSymbol$8;
1650
-
1651
- var ITERATOR = wellKnownSymbol$1('iterator');
1652
-
1653
- var getIteratorMethod$2 = function (it) {
1654
- if (!isNullOrUndefined(it)) return getMethod$2(it, ITERATOR)
1655
- || getMethod$2(it, '@@iterator')
1656
- || Iterators[classof$1(it)];
1657
- };
1658
-
1659
- var call$6 = functionCall;
1660
- var aCallable$4 = aCallable$7;
1661
- var anObject$6 = anObject$c;
1662
- var tryToString$1 = tryToString$3;
1663
- var getIteratorMethod$1 = getIteratorMethod$2;
1664
-
1665
- var $TypeError$3 = TypeError;
1666
-
1667
- var getIterator$1 = function (argument, usingIterator) {
1668
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
1669
- if (aCallable$4(iteratorMethod)) return anObject$6(call$6(iteratorMethod, argument));
1670
- throw new $TypeError$3(tryToString$1(argument) + ' is not iterable');
1671
- };
1672
-
1673
- var call$5 = functionCall;
1674
- var anObject$5 = anObject$c;
1675
- var getMethod$1 = getMethod$4;
1676
-
1677
- var iteratorClose$5 = function (iterator, kind, value) {
1678
- var innerResult, innerError;
1679
- anObject$5(iterator);
1680
- try {
1681
- innerResult = getMethod$1(iterator, 'return');
1682
- if (!innerResult) {
1683
- if (kind === 'throw') throw value;
1684
- return value;
1685
- }
1686
- innerResult = call$5(innerResult, iterator);
1687
- } catch (error) {
1688
- innerError = true;
1689
- innerResult = error;
1690
- }
1691
- if (kind === 'throw') throw value;
1692
- if (innerError) throw innerResult;
1693
- anObject$5(innerResult);
1694
- return value;
1695
- };
1696
-
1697
- var bind = functionBindContext;
1698
- var call$4 = functionCall;
1699
- var anObject$4 = anObject$c;
1700
- var tryToString = tryToString$3;
1701
- var isArrayIteratorMethod = isArrayIteratorMethod$1;
1702
- var lengthOfArrayLike = lengthOfArrayLike$3;
1703
- var isPrototypeOf = objectIsPrototypeOf;
1704
- var getIterator = getIterator$1;
1705
- var getIteratorMethod = getIteratorMethod$2;
1706
- var iteratorClose$4 = iteratorClose$5;
1707
-
1708
- var $TypeError$2 = TypeError;
1709
-
1710
- var Result = function (stopped, result) {
1711
- this.stopped = stopped;
1712
- this.result = result;
1713
- };
1714
-
1715
- var ResultPrototype = Result.prototype;
1716
-
1717
- var iterate$3 = function (iterable, unboundFunction, options) {
1718
- var that = options && options.that;
1719
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
1720
- var IS_RECORD = !!(options && options.IS_RECORD);
1721
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1722
- var INTERRUPTED = !!(options && options.INTERRUPTED);
1723
- var fn = bind(unboundFunction, that);
1724
- var iterator, iterFn, index, length, result, next, step;
1725
-
1726
- var stop = function (condition) {
1727
- if (iterator) iteratorClose$4(iterator, 'normal', condition);
1728
- return new Result(true, condition);
1729
- };
1730
-
1731
- var callFn = function (value) {
1732
- if (AS_ENTRIES) {
1733
- anObject$4(value);
1734
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
1735
- } return INTERRUPTED ? fn(value, stop) : fn(value);
1736
- };
1737
-
1738
- if (IS_RECORD) {
1739
- iterator = iterable.iterator;
1740
- } else if (IS_ITERATOR) {
1741
- iterator = iterable;
1742
- } else {
1743
- iterFn = getIteratorMethod(iterable);
1744
- if (!iterFn) throw new $TypeError$2(tryToString(iterable) + ' is not iterable');
1745
- // optimisation for array iterators
1746
- if (isArrayIteratorMethod(iterFn)) {
1747
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
1748
- result = callFn(iterable[index]);
1749
- if (result && isPrototypeOf(ResultPrototype, result)) return result;
1750
- } return new Result(false);
1751
- }
1752
- iterator = getIterator(iterable, iterFn);
1753
- }
1754
-
1755
- next = IS_RECORD ? iterable.next : iterator.next;
1756
- while (!(step = call$4(next, iterator)).done) {
1757
- try {
1758
- result = callFn(step.value);
1759
- } catch (error) {
1760
- iteratorClose$4(iterator, 'throw', error);
1761
- }
1762
- if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
1763
- } return new Result(false);
1764
- };
1765
-
1766
- // `GetIteratorDirect(obj)` abstract operation
1767
- // https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect
1768
- var getIteratorDirect$3 = function (obj) {
1769
- return {
1770
- iterator: obj,
1771
- next: obj.next,
1772
- done: false
1773
- };
1774
- };
1775
-
1776
- var $$8 = _export;
1777
- var iterate$2 = iterate$3;
1778
- var aCallable$3 = aCallable$7;
1779
- var anObject$3 = anObject$c;
1780
- var getIteratorDirect$2 = getIteratorDirect$3;
1781
-
1782
- // `Iterator.prototype.forEach` method
1783
- // https://github.com/tc39/proposal-iterator-helpers
1784
- $$8({ target: 'Iterator', proto: true, real: true }, {
1785
- forEach: function forEach(fn) {
1786
- anObject$3(this);
1787
- aCallable$3(fn);
1788
- var record = getIteratorDirect$2(this);
1789
- var counter = 0;
1790
- iterate$2(record, function (value) {
1791
- fn(value, counter++);
1792
- }, { IS_RECORD: true });
1793
- }
1794
- });
1795
-
1796
- var uncurryThis$5 = functionUncurryThis;
1797
-
1798
- // eslint-disable-next-line es/no-set -- safe
1799
- var SetPrototype$1 = Set.prototype;
1800
-
1801
- var setHelpers = {
1802
- // eslint-disable-next-line es/no-set -- safe
1803
- Set: Set,
1804
- add: uncurryThis$5(SetPrototype$1.add),
1805
- has: uncurryThis$5(SetPrototype$1.has),
1806
- remove: uncurryThis$5(SetPrototype$1['delete']),
1807
- proto: SetPrototype$1
1808
- };
1809
-
1810
- var has$5 = setHelpers.has;
1811
-
1812
- // Perform ? RequireInternalSlot(M, [[SetData]])
1813
- var aSet$7 = function (it) {
1814
- has$5(it);
1815
- return it;
1816
- };
1817
-
1818
- var call$3 = functionCall;
1819
-
1820
- var iterateSimple$7 = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
1821
- var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
1822
- var next = record.next;
1823
- var step, result;
1824
- while (!(step = call$3(next, iterator)).done) {
1825
- result = fn(step.value);
1826
- if (result !== undefined) return result;
1827
- }
1828
- };
1829
-
1830
- var uncurryThis$4 = functionUncurryThis;
1831
- var iterateSimple$6 = iterateSimple$7;
1832
- var SetHelpers$5 = setHelpers;
1833
-
1834
- var Set$3 = SetHelpers$5.Set;
1835
- var SetPrototype = SetHelpers$5.proto;
1836
- var forEach$2 = uncurryThis$4(SetPrototype.forEach);
1837
- var keys = uncurryThis$4(SetPrototype.keys);
1838
- var next = keys(new Set$3()).next;
1839
-
1840
- var setIterate = function (set, fn, interruptible) {
1841
- return interruptible ? iterateSimple$6({ iterator: keys(set), next: next }, fn) : forEach$2(set, fn);
1842
- };
1843
-
1844
- var SetHelpers$4 = setHelpers;
1845
- var iterate$1 = setIterate;
1846
-
1847
- var Set$2 = SetHelpers$4.Set;
1848
- var add$3 = SetHelpers$4.add;
1849
-
1850
- var setClone = function (set) {
1851
- var result = new Set$2();
1852
- iterate$1(set, function (it) {
1853
- add$3(result, it);
1854
- });
1855
- return result;
1856
- };
1857
-
1858
- var uncurryThis$3 = functionUncurryThis;
1859
- var aCallable$2 = aCallable$7;
1860
-
1861
- var functionUncurryThisAccessor = function (object, key, method) {
1862
- try {
1863
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1864
- return uncurryThis$3(aCallable$2(Object.getOwnPropertyDescriptor(object, key)[method]));
1865
- } catch (error) { /* empty */ }
1866
- };
1867
-
1868
- var uncurryThisAccessor = functionUncurryThisAccessor;
1869
- var SetHelpers$3 = setHelpers;
1870
-
1871
- var setSize = uncurryThisAccessor(SetHelpers$3.proto, 'size', 'get') || function (set) {
1872
- return set.size;
1873
- };
1874
-
1875
- var aCallable$1 = aCallable$7;
1876
- var anObject$2 = anObject$c;
1877
- var call$2 = functionCall;
1878
- var toIntegerOrInfinity = toIntegerOrInfinity$3;
1879
- var getIteratorDirect$1 = getIteratorDirect$3;
1880
-
1881
- var INVALID_SIZE = 'Invalid size';
1882
- var $RangeError = RangeError;
1883
- var $TypeError$1 = TypeError;
1884
- var max = Math.max;
1885
-
1886
- var SetRecord = function (set, intSize) {
1887
- this.set = set;
1888
- this.size = max(intSize, 0);
1889
- this.has = aCallable$1(set.has);
1890
- this.keys = aCallable$1(set.keys);
1891
- };
1892
-
1893
- SetRecord.prototype = {
1894
- getIterator: function () {
1895
- return getIteratorDirect$1(anObject$2(call$2(this.keys, this.set)));
1896
- },
1897
- includes: function (it) {
1898
- return call$2(this.has, this.set, it);
1899
- }
1900
- };
1901
-
1902
- // `GetSetRecord` abstract operation
1903
- // https://tc39.es/proposal-set-methods/#sec-getsetrecord
1904
- var getSetRecord$7 = function (obj) {
1905
- anObject$2(obj);
1906
- var numSize = +obj.size;
1907
- // NOTE: If size is undefined, then numSize will be NaN
1908
- // eslint-disable-next-line no-self-compare -- NaN check
1909
- if (numSize !== numSize) throw new $TypeError$1(INVALID_SIZE);
1910
- var intSize = toIntegerOrInfinity(numSize);
1911
- if (intSize < 0) throw new $RangeError(INVALID_SIZE);
1912
- return new SetRecord(obj, intSize);
1913
- };
1914
-
1915
- var aSet$6 = aSet$7;
1916
- var SetHelpers$2 = setHelpers;
1917
- var clone$2 = setClone;
1918
- var size$4 = setSize;
1919
- var getSetRecord$6 = getSetRecord$7;
1920
- var iterateSet$2 = setIterate;
1921
- var iterateSimple$5 = iterateSimple$7;
1922
-
1923
- var has$4 = SetHelpers$2.has;
1924
- var remove$1 = SetHelpers$2.remove;
1925
-
1926
- // `Set.prototype.difference` method
1927
- // https://github.com/tc39/proposal-set-methods
1928
- var setDifference = function difference(other) {
1929
- var O = aSet$6(this);
1930
- var otherRec = getSetRecord$6(other);
1931
- var result = clone$2(O);
1932
- if (size$4(O) <= otherRec.size) iterateSet$2(O, function (e) {
1933
- if (otherRec.includes(e)) remove$1(result, e);
1934
- });
1935
- else iterateSimple$5(otherRec.getIterator(), function (e) {
1936
- if (has$4(O, e)) remove$1(result, e);
1937
- });
1938
- return result;
1939
- };
1940
-
1941
- var getBuiltIn = getBuiltIn$4;
1942
-
1943
- var createSetLike = function (size) {
1944
- return {
1945
- size: size,
1946
- has: function () {
1947
- return false;
1948
- },
1949
- keys: function () {
1950
- return {
1951
- next: function () {
1952
- return { done: true };
1953
- }
1954
- };
1955
- }
1956
- };
1957
- };
1958
-
1959
- var setMethodAcceptSetLike$7 = function (name) {
1960
- var Set = getBuiltIn('Set');
1961
- try {
1962
- new Set()[name](createSetLike(0));
1963
- try {
1964
- // late spec change, early WebKit ~ Safari 17.0 beta implementation does not pass it
1965
- // https://github.com/tc39/proposal-set-methods/pull/88
1966
- new Set()[name](createSetLike(-1));
1967
- return false;
1968
- } catch (error2) {
1969
- return true;
1970
- }
1971
- } catch (error) {
1972
- return false;
1973
- }
1974
- };
1975
-
1976
- var $$7 = _export;
1977
- var difference = setDifference;
1978
- var setMethodAcceptSetLike$6 = setMethodAcceptSetLike$7;
1979
-
1980
- // `Set.prototype.difference` method
1981
- // https://github.com/tc39/proposal-set-methods
1982
- $$7({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$6('difference') }, {
1983
- difference: difference
1984
- });
1985
-
1986
- var aSet$5 = aSet$7;
1987
- var SetHelpers$1 = setHelpers;
1988
- var size$3 = setSize;
1989
- var getSetRecord$5 = getSetRecord$7;
1990
- var iterateSet$1 = setIterate;
1991
- var iterateSimple$4 = iterateSimple$7;
1992
-
1993
- var Set$1 = SetHelpers$1.Set;
1994
- var add$2 = SetHelpers$1.add;
1995
- var has$3 = SetHelpers$1.has;
1996
-
1997
- // `Set.prototype.intersection` method
1998
- // https://github.com/tc39/proposal-set-methods
1999
- var setIntersection = function intersection(other) {
2000
- var O = aSet$5(this);
2001
- var otherRec = getSetRecord$5(other);
2002
- var result = new Set$1();
2003
-
2004
- if (size$3(O) > otherRec.size) {
2005
- iterateSimple$4(otherRec.getIterator(), function (e) {
2006
- if (has$3(O, e)) add$2(result, e);
2007
- });
2008
- } else {
2009
- iterateSet$1(O, function (e) {
2010
- if (otherRec.includes(e)) add$2(result, e);
2011
- });
14
+ /**
15
+ * Thrown by a FetchRequestFactory if one of the async request initialization steps fails.
16
+ */
17
+ class FetchRequestFactoryError extends makeError.BaseError {
18
+ constructor(error) {
19
+ super(`Fetch request failed to build due to an unexpected error: ${typeof error === 'object' ? error.message ?? '' : error}`);
20
+ this.error = void 0;
21
+ this.error = error;
2012
22
  }
2013
-
2014
- return result;
2015
- };
2016
-
2017
- var $$6 = _export;
2018
- var fails = fails$d;
2019
- var intersection = setIntersection;
2020
- var setMethodAcceptSetLike$5 = setMethodAcceptSetLike$7;
2021
-
2022
- var INCORRECT = !setMethodAcceptSetLike$5('intersection') || fails(function () {
2023
- // eslint-disable-next-line es/no-array-from, es/no-set -- testing
2024
- return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
2025
- });
2026
-
2027
- // `Set.prototype.intersection` method
2028
- // https://github.com/tc39/proposal-set-methods
2029
- $$6({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
2030
- intersection: intersection
2031
- });
2032
-
2033
- var aSet$4 = aSet$7;
2034
- var has$2 = setHelpers.has;
2035
- var size$2 = setSize;
2036
- var getSetRecord$4 = getSetRecord$7;
2037
- var iterateSet = setIterate;
2038
- var iterateSimple$3 = iterateSimple$7;
2039
- var iteratorClose$3 = iteratorClose$5;
2040
-
2041
- // `Set.prototype.isDisjointFrom` method
2042
- // https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom
2043
- var setIsDisjointFrom = function isDisjointFrom(other) {
2044
- var O = aSet$4(this);
2045
- var otherRec = getSetRecord$4(other);
2046
- if (size$2(O) <= otherRec.size) return iterateSet(O, function (e) {
2047
- if (otherRec.includes(e)) return false;
2048
- }, true) !== false;
2049
- var iterator = otherRec.getIterator();
2050
- return iterateSimple$3(iterator, function (e) {
2051
- if (has$2(O, e)) return iteratorClose$3(iterator, 'normal', false);
2052
- }) !== false;
2053
- };
2054
-
2055
- var $$5 = _export;
2056
- var isDisjointFrom = setIsDisjointFrom;
2057
- var setMethodAcceptSetLike$4 = setMethodAcceptSetLike$7;
2058
-
2059
- // `Set.prototype.isDisjointFrom` method
2060
- // https://github.com/tc39/proposal-set-methods
2061
- $$5({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$4('isDisjointFrom') }, {
2062
- isDisjointFrom: isDisjointFrom
2063
- });
2064
-
2065
- var aSet$3 = aSet$7;
2066
- var size$1 = setSize;
2067
- var iterate = setIterate;
2068
- var getSetRecord$3 = getSetRecord$7;
2069
-
2070
- // `Set.prototype.isSubsetOf` method
2071
- // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf
2072
- var setIsSubsetOf = function isSubsetOf(other) {
2073
- var O = aSet$3(this);
2074
- var otherRec = getSetRecord$3(other);
2075
- if (size$1(O) > otherRec.size) return false;
2076
- return iterate(O, function (e) {
2077
- if (!otherRec.includes(e)) return false;
2078
- }, true) !== false;
2079
- };
2080
-
2081
- var $$4 = _export;
2082
- var isSubsetOf = setIsSubsetOf;
2083
- var setMethodAcceptSetLike$3 = setMethodAcceptSetLike$7;
2084
-
2085
- // `Set.prototype.isSubsetOf` method
2086
- // https://github.com/tc39/proposal-set-methods
2087
- $$4({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$3('isSubsetOf') }, {
2088
- isSubsetOf: isSubsetOf
2089
- });
2090
-
2091
- var aSet$2 = aSet$7;
2092
- var has$1 = setHelpers.has;
2093
- var size = setSize;
2094
- var getSetRecord$2 = getSetRecord$7;
2095
- var iterateSimple$2 = iterateSimple$7;
2096
- var iteratorClose$2 = iteratorClose$5;
2097
-
2098
- // `Set.prototype.isSupersetOf` method
2099
- // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf
2100
- var setIsSupersetOf = function isSupersetOf(other) {
2101
- var O = aSet$2(this);
2102
- var otherRec = getSetRecord$2(other);
2103
- if (size(O) < otherRec.size) return false;
2104
- var iterator = otherRec.getIterator();
2105
- return iterateSimple$2(iterator, function (e) {
2106
- if (!has$1(O, e)) return iteratorClose$2(iterator, 'normal', false);
2107
- }) !== false;
2108
- };
2109
-
2110
- var $$3 = _export;
2111
- var isSupersetOf = setIsSupersetOf;
2112
- var setMethodAcceptSetLike$2 = setMethodAcceptSetLike$7;
2113
-
2114
- // `Set.prototype.isSupersetOf` method
2115
- // https://github.com/tc39/proposal-set-methods
2116
- $$3({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$2('isSupersetOf') }, {
2117
- isSupersetOf: isSupersetOf
2118
- });
2119
-
2120
- var aSet$1 = aSet$7;
2121
- var SetHelpers = setHelpers;
2122
- var clone$1 = setClone;
2123
- var getSetRecord$1 = getSetRecord$7;
2124
- var iterateSimple$1 = iterateSimple$7;
2125
-
2126
- var add$1 = SetHelpers.add;
2127
- var has = SetHelpers.has;
2128
- var remove = SetHelpers.remove;
2129
-
2130
- // `Set.prototype.symmetricDifference` method
2131
- // https://github.com/tc39/proposal-set-methods
2132
- var setSymmetricDifference = function symmetricDifference(other) {
2133
- var O = aSet$1(this);
2134
- var keysIter = getSetRecord$1(other).getIterator();
2135
- var result = clone$1(O);
2136
- iterateSimple$1(keysIter, function (e) {
2137
- if (has(O, e)) remove(result, e);
2138
- else add$1(result, e);
2139
- });
2140
- return result;
2141
- };
2142
-
2143
- var $$2 = _export;
2144
- var symmetricDifference = setSymmetricDifference;
2145
- var setMethodAcceptSetLike$1 = setMethodAcceptSetLike$7;
2146
-
2147
- // `Set.prototype.symmetricDifference` method
2148
- // https://github.com/tc39/proposal-set-methods
2149
- $$2({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$1('symmetricDifference') }, {
2150
- symmetricDifference: symmetricDifference
2151
- });
2152
-
2153
- var aSet = aSet$7;
2154
- var add = setHelpers.add;
2155
- var clone = setClone;
2156
- var getSetRecord = getSetRecord$7;
2157
- var iterateSimple = iterateSimple$7;
2158
-
2159
- // `Set.prototype.union` method
2160
- // https://github.com/tc39/proposal-set-methods
2161
- var setUnion = function union(other) {
2162
- var O = aSet(this);
2163
- var keysIter = getSetRecord(other).getIterator();
2164
- var result = clone(O);
2165
- iterateSimple(keysIter, function (it) {
2166
- add(result, it);
2167
- });
2168
- return result;
2169
- };
2170
-
2171
- var $$1 = _export;
2172
- var union = setUnion;
2173
- var setMethodAcceptSetLike = setMethodAcceptSetLike$7;
2174
-
2175
- // `Set.prototype.union` method
2176
- // https://github.com/tc39/proposal-set-methods
2177
- $$1({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
2178
- union: union
2179
- });
2180
-
2181
- var classof = classof$2;
2182
-
2183
- var $String = String;
2184
-
2185
- var toString$2 = function (argument) {
2186
- if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
2187
- return $String(argument);
2188
- };
2189
-
2190
- var $TypeError = TypeError;
2191
-
2192
- var validateArgumentsLength$2 = function (passed, required) {
2193
- if (passed < required) throw new $TypeError('Not enough arguments');
2194
- return passed;
2195
- };
2196
-
2197
- var defineBuiltIn$2 = defineBuiltIn$5;
2198
- var uncurryThis$2 = functionUncurryThis;
2199
- var toString$1 = toString$2;
2200
- var validateArgumentsLength$1 = validateArgumentsLength$2;
2201
-
2202
- var $URLSearchParams$1 = URLSearchParams;
2203
- var URLSearchParamsPrototype$2 = $URLSearchParams$1.prototype;
2204
- var append = uncurryThis$2(URLSearchParamsPrototype$2.append);
2205
- var $delete = uncurryThis$2(URLSearchParamsPrototype$2['delete']);
2206
- var forEach$1 = uncurryThis$2(URLSearchParamsPrototype$2.forEach);
2207
- var push = uncurryThis$2([].push);
2208
- var params$1 = new $URLSearchParams$1('a=1&a=2&b=3');
2209
-
2210
- params$1['delete']('a', 1);
2211
- // `undefined` case is a Chromium 117 bug
2212
- // https://bugs.chromium.org/p/v8/issues/detail?id=14222
2213
- params$1['delete']('b', undefined);
2214
-
2215
- if (params$1 + '' !== 'a=2') {
2216
- defineBuiltIn$2(URLSearchParamsPrototype$2, 'delete', function (name /* , value */) {
2217
- var length = arguments.length;
2218
- var $value = length < 2 ? undefined : arguments[1];
2219
- if (length && $value === undefined) return $delete(this, name);
2220
- var entries = [];
2221
- forEach$1(this, function (v, k) { // also validates `this`
2222
- push(entries, { key: k, value: v });
2223
- });
2224
- validateArgumentsLength$1(length, 1);
2225
- var key = toString$1(name);
2226
- var value = toString$1($value);
2227
- var index = 0;
2228
- var dindex = 0;
2229
- var found = false;
2230
- var entriesLength = entries.length;
2231
- var entry;
2232
- while (index < entriesLength) {
2233
- entry = entries[index++];
2234
- if (found || entry.key === key) {
2235
- found = true;
2236
- $delete(this, entry.key);
2237
- } else dindex++;
2238
- }
2239
- while (dindex < entriesLength) {
2240
- entry = entries[dindex++];
2241
- if (!(entry.key === key && entry.value === value)) append(this, entry.key, entry.value);
2242
- }
2243
- }, { enumerable: true, unsafe: true });
2244
23
  }
2245
-
2246
- var defineBuiltIn$1 = defineBuiltIn$5;
2247
- var uncurryThis$1 = functionUncurryThis;
2248
- var toString = toString$2;
2249
- var validateArgumentsLength = validateArgumentsLength$2;
2250
-
2251
- var $URLSearchParams = URLSearchParams;
2252
- var URLSearchParamsPrototype$1 = $URLSearchParams.prototype;
2253
- var getAll = uncurryThis$1(URLSearchParamsPrototype$1.getAll);
2254
- var $has = uncurryThis$1(URLSearchParamsPrototype$1.has);
2255
- var params = new $URLSearchParams('a=1');
2256
-
2257
- // `undefined` case is a Chromium 117 bug
2258
- // https://bugs.chromium.org/p/v8/issues/detail?id=14222
2259
- if (params.has('a', 2) || !params.has('a', undefined)) {
2260
- defineBuiltIn$1(URLSearchParamsPrototype$1, 'has', function has(name /* , value */) {
2261
- var length = arguments.length;
2262
- var $value = length < 2 ? undefined : arguments[1];
2263
- if (length && $value === undefined) return $has(this, name);
2264
- var values = getAll(this, name); // also validates `this`
2265
- validateArgumentsLength(length, 1);
2266
- var value = toString($value);
2267
- var index = 0;
2268
- while (index < values.length) {
2269
- if (values[index++] === value) return true;
2270
- } return false;
2271
- }, { enumerable: true, unsafe: true });
24
+ /**
25
+ * Wraps the input fetch function to always pass the fetch response promise to requireOkResponse().
26
+ *
27
+ * @param inputFetch
28
+ * @returns
29
+ */
30
+ function fetchOk(inputFetch) {
31
+ return (input, init) => requireOkResponse(inputFetch(input, init));
2272
32
  }
2273
-
2274
- var DESCRIPTORS = descriptors;
2275
- var uncurryThis = functionUncurryThis;
2276
- var defineBuiltInAccessor = defineBuiltInAccessor$2;
2277
-
2278
- var URLSearchParamsPrototype = URLSearchParams.prototype;
2279
- var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
2280
-
2281
- // `URLSearchParams.prototype.size` getter
2282
- // https://github.com/whatwg/url/pull/734
2283
- if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {
2284
- defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {
2285
- get: function size() {
2286
- var count = 0;
2287
- forEach(this, function () { count++; });
2288
- return count;
2289
- },
2290
- configurable: true,
2291
- enumerable: true
33
+ class FetchResponseError extends makeError.BaseError {
34
+ constructor(response) {
35
+ super(`Fetch response was a non-ok status code (${response.status}): ${response.statusText}`);
36
+ this.response = void 0;
37
+ this.response = response;
38
+ }
39
+ }
40
+ function requireOkResponse(responsePromise) {
41
+ return responsePromise.then(response => {
42
+ if (!response.ok) {
43
+ throw new FetchResponseError(response);
44
+ }
45
+ return response;
2292
46
  });
2293
47
  }
2294
48
 
2295
- class FetchTimeoutError extends makeErrorExports.BaseError {
49
+ class FetchTimeoutError extends makeError.BaseError {
2296
50
  constructor(response, timeout) {
2297
51
  super(`Fetch response was timed out (${timeout})`);
2298
52
  this.response = void 0;
@@ -2551,105 +305,6 @@ function isFetchRequest(input) {
2551
305
  return Boolean(input.url);
2552
306
  }
2553
307
 
2554
- const NullObject = function NullObject () { };
2555
- NullObject.prototype = Object.create(null);
2556
-
2557
- /**
2558
- * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
2559
- *
2560
- * parameter = token "=" ( token / quoted-string )
2561
- * token = 1*tchar
2562
- * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
2563
- * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
2564
- * / DIGIT / ALPHA
2565
- * ; any VCHAR, except delimiters
2566
- * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
2567
- * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
2568
- * obs-text = %x80-FF
2569
- * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
2570
- */
2571
- const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu;
2572
-
2573
- /**
2574
- * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
2575
- *
2576
- * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
2577
- * obs-text = %x80-FF
2578
- */
2579
- const quotedPairRE = /\\([\v\u0020-\u00ff])/gu;
2580
-
2581
- /**
2582
- * RegExp to match type in RFC 7231 sec 3.1.1.1
2583
- *
2584
- * media-type = type "/" subtype
2585
- * type = token
2586
- * subtype = token
2587
- */
2588
- const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u;
2589
-
2590
- // default ContentType to prevent repeated object creation
2591
- const defaultContentType = { type: '', parameters: new NullObject() };
2592
- Object.freeze(defaultContentType.parameters);
2593
- Object.freeze(defaultContentType);
2594
-
2595
- function safeParse (header) {
2596
- if (typeof header !== 'string') {
2597
- return defaultContentType
2598
- }
2599
-
2600
- let index = header.indexOf(';');
2601
- const type = index !== -1
2602
- ? header.slice(0, index).trim()
2603
- : header.trim();
2604
-
2605
- if (mediaTypeRE.test(type) === false) {
2606
- return defaultContentType
2607
- }
2608
-
2609
- const result = {
2610
- type: type.toLowerCase(),
2611
- parameters: new NullObject()
2612
- };
2613
-
2614
- // parse parameters
2615
- if (index === -1) {
2616
- return result
2617
- }
2618
-
2619
- let key;
2620
- let match;
2621
- let value;
2622
-
2623
- paramRE.lastIndex = index;
2624
-
2625
- while ((match = paramRE.exec(header))) {
2626
- if (match.index !== index) {
2627
- return defaultContentType
2628
- }
2629
-
2630
- index += match[0].length;
2631
- key = match[1].toLowerCase();
2632
- value = match[2];
2633
-
2634
- if (value[0] === '"') {
2635
- // remove quotes and escapes
2636
- value = value
2637
- .slice(1, value.length - 1);
2638
-
2639
- quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'));
2640
- }
2641
-
2642
- result.parameters[key] = value;
2643
- }
2644
-
2645
- if (index !== header.length) {
2646
- return defaultContentType
2647
- }
2648
-
2649
- return result
2650
- }
2651
- var safeParse_1 = safeParse;
2652
-
2653
308
  function fetchUploadFile(input) {
2654
309
  const {
2655
310
  fetch: inputFetch,
@@ -2673,7 +328,7 @@ function fetchUploadFile(input) {
2673
328
  */
2674
329
  function parseFetchFileResponse(response) {
2675
330
  const rawContentType = response.headers.get('content-type');
2676
- const parseContentTypeResult = safeParse_1(rawContentType ?? '');
331
+ const parseContentTypeResult = fastContentTypeParse.safeParse(rawContentType ?? '');
2677
332
  const contentType = parseContentTypeResult.type !== '' ? parseContentTypeResult : undefined;
2678
333
  return {
2679
334
  response,
@@ -2816,141 +471,6 @@ function fetchPageFactory(config) {
2816
471
  };
2817
472
  }
2818
473
 
2819
- var defineBuiltIn = defineBuiltIn$5;
2820
-
2821
- var defineBuiltIns$1 = function (target, src, options) {
2822
- for (var key in src) defineBuiltIn(target, key, src[key], options);
2823
- return target;
2824
- };
2825
-
2826
- // `CreateIterResultObject` abstract operation
2827
- // https://tc39.es/ecma262/#sec-createiterresultobject
2828
- var createIterResultObject$1 = function (value, done) {
2829
- return { value: value, done: done };
2830
- };
2831
-
2832
- var call$1 = functionCall;
2833
- var create = objectCreate;
2834
- var createNonEnumerableProperty = createNonEnumerableProperty$3;
2835
- var defineBuiltIns = defineBuiltIns$1;
2836
- var wellKnownSymbol = wellKnownSymbol$8;
2837
- var InternalStateModule = internalState;
2838
- var getMethod = getMethod$4;
2839
- var IteratorPrototype = iteratorsCore.IteratorPrototype;
2840
- var createIterResultObject = createIterResultObject$1;
2841
- var iteratorClose$1 = iteratorClose$5;
2842
-
2843
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2844
- var ITERATOR_HELPER = 'IteratorHelper';
2845
- var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
2846
- var setInternalState = InternalStateModule.set;
2847
-
2848
- var createIteratorProxyPrototype = function (IS_ITERATOR) {
2849
- var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
2850
-
2851
- return defineBuiltIns(create(IteratorPrototype), {
2852
- next: function next() {
2853
- var state = getInternalState(this);
2854
- // for simplification:
2855
- // for `%WrapForValidIteratorPrototype%.next` our `nextHandler` returns `IterResultObject`
2856
- // for `%IteratorHelperPrototype%.next` - just a value
2857
- if (IS_ITERATOR) return state.nextHandler();
2858
- try {
2859
- var result = state.done ? undefined : state.nextHandler();
2860
- return createIterResultObject(result, state.done);
2861
- } catch (error) {
2862
- state.done = true;
2863
- throw error;
2864
- }
2865
- },
2866
- 'return': function () {
2867
- var state = getInternalState(this);
2868
- var iterator = state.iterator;
2869
- state.done = true;
2870
- if (IS_ITERATOR) {
2871
- var returnMethod = getMethod(iterator, 'return');
2872
- return returnMethod ? call$1(returnMethod, iterator) : createIterResultObject(undefined, true);
2873
- }
2874
- if (state.inner) try {
2875
- iteratorClose$1(state.inner.iterator, 'normal');
2876
- } catch (error) {
2877
- return iteratorClose$1(iterator, 'throw', error);
2878
- }
2879
- iteratorClose$1(iterator, 'normal');
2880
- return createIterResultObject(undefined, true);
2881
- }
2882
- });
2883
- };
2884
-
2885
- var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
2886
- var IteratorHelperPrototype = createIteratorProxyPrototype(false);
2887
-
2888
- createNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper');
2889
-
2890
- var iteratorCreateProxy = function (nextHandler, IS_ITERATOR) {
2891
- var IteratorProxy = function Iterator(record, state) {
2892
- if (state) {
2893
- state.iterator = record.iterator;
2894
- state.next = record.next;
2895
- } else state = record;
2896
- state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
2897
- state.nextHandler = nextHandler;
2898
- state.counter = 0;
2899
- state.done = false;
2900
- setInternalState(this, state);
2901
- };
2902
-
2903
- IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
2904
-
2905
- return IteratorProxy;
2906
- };
2907
-
2908
- var anObject$1 = anObject$c;
2909
- var iteratorClose = iteratorClose$5;
2910
-
2911
- // call something on iterator step with safe closing on error
2912
- var callWithSafeIterationClosing$1 = function (iterator, fn, value, ENTRIES) {
2913
- try {
2914
- return ENTRIES ? fn(anObject$1(value)[0], value[1]) : fn(value);
2915
- } catch (error) {
2916
- iteratorClose(iterator, 'throw', error);
2917
- }
2918
- };
2919
-
2920
- var call = functionCall;
2921
- var aCallable = aCallable$7;
2922
- var anObject = anObject$c;
2923
- var getIteratorDirect = getIteratorDirect$3;
2924
- var createIteratorProxy = iteratorCreateProxy;
2925
- var callWithSafeIterationClosing = callWithSafeIterationClosing$1;
2926
-
2927
- var IteratorProxy = createIteratorProxy(function () {
2928
- var iterator = this.iterator;
2929
- var result = anObject(call(this.next, iterator));
2930
- var done = this.done = !!result.done;
2931
- if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
2932
- });
2933
-
2934
- // `Iterator.prototype.map` method
2935
- // https://github.com/tc39/proposal-iterator-helpers
2936
- var iteratorMap = function map(mapper) {
2937
- anObject(this);
2938
- aCallable(mapper);
2939
- return new IteratorProxy(getIteratorDirect(this), {
2940
- mapper: mapper
2941
- });
2942
- };
2943
-
2944
- var $ = _export;
2945
- var map = iteratorMap;
2946
- var IS_PURE = isPure;
2947
-
2948
- // `Iterator.prototype.map` method
2949
- // https://github.com/tc39/proposal-iterator-helpers
2950
- $({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
2951
- map: map
2952
- });
2953
-
2954
474
  /**
2955
475
  * Iterates through the pages of a created FetchPage instance by each item individually.
2956
476
  *
@@ -3089,11 +609,10 @@ async function iterateFetchPages(config) {
3089
609
  function makeUrlSearchParams(input, options) {
3090
610
  const {
3091
611
  omitKeys,
3092
- filterNullAndUndefinedValues,
3093
- filterEmptyValues: filterValues = filterNullAndUndefinedValues ?? true
612
+ filterEmptyValues: filterValues
3094
613
  } = options ?? {};
3095
614
  const mergedInput = Array.isArray(input) ? util.mergeObjects(input) : input;
3096
- const filteredInput = filterValues ? util.filterEmptyPojoValues(mergedInput ?? {}) : mergedInput;
615
+ const filteredInput = filterValues ?? true ? util.filterEmptyPojoValues(mergedInput ?? {}) : mergedInput;
3097
616
  const searchParams = new URLSearchParams(filteredInput);
3098
617
  if (omitKeys != null) {
3099
618
  util.useIterableOrValue(omitKeys, key => searchParams.delete(key), false);
@@ -3290,11 +809,6 @@ const fetchApiFetchService = fetchService({
3290
809
  makeFetch: fetch,
3291
810
  makeRequest: (x, y) => new Request(x, y)
3292
811
  });
3293
- // MARK: Compat
3294
- /**
3295
- * @deprecated use fetchApiFetchService instead. This is an alias.
3296
- */
3297
- const nodeFetchService = fetchApiFetchService;
3298
812
 
3299
813
  exports.DEFAULT_FETCH_HANDLER = DEFAULT_FETCH_HANDLER;
3300
814
  exports.DEFAULT_FETCH_REQUEST_FACTORY = DEFAULT_FETCH_REQUEST_FACTORY;
@@ -3331,7 +845,6 @@ exports.makeUrlSearchParams = makeUrlSearchParams;
3331
845
  exports.mergeMakeUrlSearchParamsOptions = mergeMakeUrlSearchParamsOptions;
3332
846
  exports.mergeRequestHeaders = mergeRequestHeaders;
3333
847
  exports.mergeRequestInits = mergeRequestInits;
3334
- exports.nodeFetchService = nodeFetchService;
3335
848
  exports.parseFetchFileResponse = parseFetchFileResponse;
3336
849
  exports.queryParamsToSearchParams = queryParamsToSearchParams;
3337
850
  exports.rateLimitedFetchHandler = rateLimitedFetchHandler;