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