extra-request 4.0.1 → 4.0.2

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.
@@ -6,7 +6,7 @@
6
6
 
7
7
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
8
8
 
9
- var es2018$2 = {};
9
+ var es2018$5 = {};
10
10
 
11
11
  var fetch_browser = {};
12
12
 
@@ -56,7 +56,11 @@
56
56
  (function (exports) {
57
57
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
58
58
  if (k2 === undefined) k2 = k;
59
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
59
+ var desc = Object.getOwnPropertyDescriptor(m, k);
60
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
61
+ desc = { enumerable: true, get: function() { return m[k]; } };
62
+ }
63
+ Object.defineProperty(o, k2, desc);
60
64
  }) : (function(o, m, k, k2) {
61
65
  if (k2 === undefined) k2 = k;
62
66
  o[k2] = m[k];
@@ -73,9 +77,9 @@
73
77
  __exportStar(blob_browser, exports);
74
78
  __exportStar(eventSource_browser, exports);
75
79
 
76
- }(es2018$2));
80
+ }(es2018$5));
77
81
 
78
- var es2018$1 = {};
82
+ var es2018$4 = {};
79
83
 
80
84
  var array = {};
81
85
 
@@ -123,13 +127,26 @@
123
127
  }
124
128
  _undefined.isntUndefined = isntUndefined;
125
129
 
130
+ var _function = {};
131
+
132
+ _function.isntFunction = _function.isFunction = void 0;
133
+ function isFunction(val) {
134
+ return typeof val === 'function';
135
+ }
136
+ _function.isFunction = isFunction;
137
+ function isntFunction(val) {
138
+ return !isFunction(val);
139
+ }
140
+ _function.isntFunction = isntFunction;
141
+
126
142
  asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
127
- const null_1$1 = _null;
128
- const undefined_1$2 = _undefined;
143
+ const null_1$2 = _null;
144
+ const undefined_1$1 = _undefined;
145
+ const function_1$2 = _function;
129
146
  function isAsyncIterable(val) {
130
- return (0, null_1$1.isntNull)(val)
131
- && (0, undefined_1$2.isntUndefined)(val)
132
- && typeof val[Symbol.asyncIterator] === 'function';
147
+ return (0, null_1$2.isntNull)(val)
148
+ && (0, undefined_1$1.isntUndefined)(val)
149
+ && (0, function_1$2.isFunction)(val[Symbol.asyncIterator]);
133
150
  }
134
151
  asyncIterable.isAsyncIterable = isAsyncIterable;
135
152
  function isntAsyncIterable(val) {
@@ -231,27 +248,16 @@
231
248
  }
232
249
  falsy.isntFalsy = isntFalsy;
233
250
 
234
- var _function = {};
235
-
236
- _function.isntFunction = _function.isFunction = void 0;
237
- function isFunction(val) {
238
- return typeof val === 'function';
239
- }
240
- _function.isFunction = isFunction;
241
- function isntFunction(val) {
242
- return !isFunction(val);
243
- }
244
- _function.isntFunction = isntFunction;
245
-
246
251
  var iterable = {};
247
252
 
248
253
  iterable.isntIterable = iterable.isIterable = void 0;
249
- const null_1 = _null;
250
- const undefined_1$1 = _undefined;
254
+ const null_1$1 = _null;
255
+ const undefined_1 = _undefined;
256
+ const function_1$1 = _function;
251
257
  function isIterable(val) {
252
- return (0, null_1.isntNull)(val)
253
- && (0, undefined_1$1.isntUndefined)(val)
254
- && typeof val[Symbol.iterator] === 'function';
258
+ return (0, null_1$1.isntNull)(val)
259
+ && (0, undefined_1.isntUndefined)(val)
260
+ && (0, function_1$1.isFunction)(val[Symbol.iterator]);
255
261
  }
256
262
  iterable.isIterable = isIterable;
257
263
  function isntIterable(val) {
@@ -259,41 +265,145 @@
259
265
  }
260
266
  iterable.isntIterable = isntIterable;
261
267
 
262
- var jsonRpc = {};
268
+ var json$1 = {};
269
+
270
+ var number = {};
271
+
272
+ number.isntNumber = number.isNumber = void 0;
273
+ function isNumber(val) {
274
+ return typeof val === 'number';
275
+ }
276
+ number.isNumber = isNumber;
277
+ function isntNumber(val) {
278
+ return !isNumber(val);
279
+ }
280
+ number.isntNumber = isntNumber;
263
281
 
264
282
  var object = {};
265
283
 
284
+ /** Detect free variable `global` from Node.js. */
285
+
286
+ var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
287
+
288
+ var _freeGlobal = freeGlobal$1;
289
+
290
+ var freeGlobal = _freeGlobal;
291
+
292
+ /** Detect free variable `self`. */
293
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
294
+
295
+ /** Used as a reference to the global object. */
296
+ var root$1 = freeGlobal || freeSelf || Function('return this')();
297
+
298
+ var _root = root$1;
299
+
300
+ var root = _root;
301
+
302
+ /** Built-in value references. */
303
+ var Symbol$3 = root.Symbol;
304
+
305
+ var _Symbol = Symbol$3;
306
+
307
+ var Symbol$2 = _Symbol;
308
+
309
+ /** Used for built-in method references. */
310
+ var objectProto$2 = Object.prototype;
311
+
312
+ /** Used to check objects for own properties. */
313
+ var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
314
+
266
315
  /**
267
- * lodash (Custom Build) <https://lodash.com/>
268
- * Build: `lodash modularize exports="npm" -o ./`
269
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
270
- * Released under MIT license <https://lodash.com/license>
271
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
272
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
316
+ * Used to resolve the
317
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
318
+ * of values.
273
319
  */
320
+ var nativeObjectToString$1 = objectProto$2.toString;
274
321
 
275
- /** `Object#toString` result references. */
276
- var objectTag = '[object Object]';
322
+ /** Built-in value references. */
323
+ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
277
324
 
278
325
  /**
279
- * Checks if `value` is a host object in IE < 9.
326
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
280
327
  *
281
328
  * @private
282
- * @param {*} value The value to check.
283
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
329
+ * @param {*} value The value to query.
330
+ * @returns {string} Returns the raw `toStringTag`.
284
331
  */
285
- function isHostObject(value) {
286
- // Many host objects are `Object` objects that can coerce to strings
287
- // despite having improperly defined `toString` methods.
288
- var result = false;
289
- if (value != null && typeof value.toString != 'function') {
290
- try {
291
- result = !!(value + '');
292
- } catch (e) {}
332
+ function getRawTag$1(value) {
333
+ var isOwn = hasOwnProperty$1.call(value, symToStringTag$1),
334
+ tag = value[symToStringTag$1];
335
+
336
+ try {
337
+ value[symToStringTag$1] = undefined;
338
+ var unmasked = true;
339
+ } catch (e) {}
340
+
341
+ var result = nativeObjectToString$1.call(value);
342
+ if (unmasked) {
343
+ if (isOwn) {
344
+ value[symToStringTag$1] = tag;
345
+ } else {
346
+ delete value[symToStringTag$1];
347
+ }
293
348
  }
294
349
  return result;
295
350
  }
296
351
 
352
+ var _getRawTag = getRawTag$1;
353
+
354
+ /** Used for built-in method references. */
355
+
356
+ var objectProto$1 = Object.prototype;
357
+
358
+ /**
359
+ * Used to resolve the
360
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
361
+ * of values.
362
+ */
363
+ var nativeObjectToString = objectProto$1.toString;
364
+
365
+ /**
366
+ * Converts `value` to a string using `Object.prototype.toString`.
367
+ *
368
+ * @private
369
+ * @param {*} value The value to convert.
370
+ * @returns {string} Returns the converted string.
371
+ */
372
+ function objectToString$1(value) {
373
+ return nativeObjectToString.call(value);
374
+ }
375
+
376
+ var _objectToString = objectToString$1;
377
+
378
+ var Symbol$1 = _Symbol,
379
+ getRawTag = _getRawTag,
380
+ objectToString = _objectToString;
381
+
382
+ /** `Object#toString` result references. */
383
+ var nullTag = '[object Null]',
384
+ undefinedTag = '[object Undefined]';
385
+
386
+ /** Built-in value references. */
387
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
388
+
389
+ /**
390
+ * The base implementation of `getTag` without fallbacks for buggy environments.
391
+ *
392
+ * @private
393
+ * @param {*} value The value to query.
394
+ * @returns {string} Returns the `toStringTag`.
395
+ */
396
+ function baseGetTag$1(value) {
397
+ if (value == null) {
398
+ return value === undefined ? undefinedTag : nullTag;
399
+ }
400
+ return (symToStringTag && symToStringTag in Object(value))
401
+ ? getRawTag(value)
402
+ : objectToString(value);
403
+ }
404
+
405
+ var _baseGetTag = baseGetTag$1;
406
+
297
407
  /**
298
408
  * Creates a unary function that invokes `func` with its argument transformed.
299
409
  *
@@ -302,34 +412,21 @@
302
412
  * @param {Function} transform The argument transform.
303
413
  * @returns {Function} Returns the new function.
304
414
  */
305
- function overArg(func, transform) {
415
+
416
+ function overArg$1(func, transform) {
306
417
  return function(arg) {
307
418
  return func(transform(arg));
308
419
  };
309
420
  }
310
421
 
311
- /** Used for built-in method references. */
312
- var funcProto = Function.prototype,
313
- objectProto = Object.prototype;
314
-
315
- /** Used to resolve the decompiled source of functions. */
316
- var funcToString = funcProto.toString;
317
-
318
- /** Used to check objects for own properties. */
319
- var hasOwnProperty = objectProto.hasOwnProperty;
320
-
321
- /** Used to infer the `Object` constructor. */
322
- var objectCtorString = funcToString.call(Object);
422
+ var _overArg = overArg$1;
323
423
 
324
- /**
325
- * Used to resolve the
326
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
327
- * of values.
328
- */
329
- var objectToString = objectProto.toString;
424
+ var overArg = _overArg;
330
425
 
331
426
  /** Built-in value references. */
332
- var getPrototype = overArg(Object.getPrototypeOf, Object);
427
+ var getPrototype$1 = overArg(Object.getPrototypeOf, Object);
428
+
429
+ var _getPrototype = getPrototype$1;
333
430
 
334
431
  /**
335
432
  * Checks if `value` is object-like. A value is object-like if it's not `null`
@@ -355,10 +452,33 @@
355
452
  * _.isObjectLike(null);
356
453
  * // => false
357
454
  */
358
- function isObjectLike(value) {
359
- return !!value && typeof value == 'object';
455
+
456
+ function isObjectLike$1(value) {
457
+ return value != null && typeof value == 'object';
360
458
  }
361
459
 
460
+ var isObjectLike_1 = isObjectLike$1;
461
+
462
+ var baseGetTag = _baseGetTag,
463
+ getPrototype = _getPrototype,
464
+ isObjectLike = isObjectLike_1;
465
+
466
+ /** `Object#toString` result references. */
467
+ var objectTag = '[object Object]';
468
+
469
+ /** Used for built-in method references. */
470
+ var funcProto = Function.prototype,
471
+ objectProto = Object.prototype;
472
+
473
+ /** Used to resolve the decompiled source of functions. */
474
+ var funcToString = funcProto.toString;
475
+
476
+ /** Used to check objects for own properties. */
477
+ var hasOwnProperty = objectProto.hasOwnProperty;
478
+
479
+ /** Used to infer the `Object` constructor. */
480
+ var objectCtorString = funcToString.call(Object);
481
+
362
482
  /**
363
483
  * Checks if `value` is a plain object, that is, an object created by the
364
484
  * `Object` constructor or one with a `[[Prototype]]` of `null`.
@@ -388,8 +508,7 @@
388
508
  * // => true
389
509
  */
390
510
  function isPlainObject$1(value) {
391
- if (!isObjectLike(value) ||
392
- objectToString.call(value) != objectTag || isHostObject(value)) {
511
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
393
512
  return false;
394
513
  }
395
514
  var proto = getPrototype(value);
@@ -397,16 +516,16 @@
397
516
  return true;
398
517
  }
399
518
  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
400
- return (typeof Ctor == 'function' &&
401
- Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
519
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
520
+ funcToString.call(Ctor) == objectCtorString;
402
521
  }
403
522
 
404
- var lodash_isplainobject = isPlainObject$1;
523
+ var isPlainObject_1$1 = isPlainObject$1;
405
524
 
406
525
  var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
407
526
  return (mod && mod.__esModule) ? mod : { "default": mod };
408
527
  };object.isntEmptyObject = object.isEmptyObject = object.isntPlainObject = object.isPlainObject = object.isntObject = object.isObject = void 0;
409
- const lodash_isplainobject_1 = __importDefault(lodash_isplainobject);
528
+ const isPlainObject_1 = __importDefault(isPlainObject_1$1);
410
529
  function isObject(val) {
411
530
  return val !== null
412
531
  && typeof val === 'object';
@@ -417,7 +536,7 @@
417
536
  }
418
537
  object.isntObject = isntObject;
419
538
  function isPlainObject(val) {
420
- return (0, lodash_isplainobject_1.default)(val);
539
+ return (0, isPlainObject_1.default)(val);
421
540
  }
422
541
  object.isPlainObject = isPlainObject;
423
542
  function isntPlainObject(val) {
@@ -433,87 +552,27 @@
433
552
  }
434
553
  object.isntEmptyObject = isntEmptyObject;
435
554
 
436
- var number = {};
437
-
438
- number.isntNumber = number.isNumber = void 0;
439
- function isNumber(val) {
440
- return typeof val === 'number';
441
- }
442
- number.isNumber = isNumber;
443
- function isntNumber(val) {
444
- return !isNumber(val);
445
- }
446
- number.isntNumber = isntNumber;
447
-
448
- jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
449
- const array_1 = array;
450
- const object_1 = object;
555
+ json$1.isntJsonable = json$1.isJsonable = json$1.isntJson = json$1.isJson = void 0;
556
+ const null_1 = _null;
557
+ const boolean_1 = boolean;
451
558
  const string_1 = string;
452
559
  const number_1 = number;
453
- const undefined_1 = _undefined;
454
- function isJsonRpcId(val) {
455
- return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
456
- }
457
- function isJsonRpcParams(val) {
458
- return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
459
- }
460
- function isJsonRpcNotification(val) {
461
- return (0, object_1.isPlainObject)(val)
462
- && (0, string_1.isString)(val.jsonrpc)
463
- && (0, string_1.isString)(val.method)
464
- && (0, undefined_1.isUndefined)(val.id)
465
- && isJsonRpcParams(val.params);
466
- }
467
- jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
468
- function isntJsonRpcNotification(val) {
469
- return !isJsonRpcNotification(val);
470
- }
471
- jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
472
- function isJsonRpcRequest(val) {
473
- return (0, object_1.isPlainObject)(val)
474
- && (0, string_1.isString)(val.jsonrpc)
475
- && (0, string_1.isString)(val.method)
476
- && isJsonRpcId(val.id)
477
- && isJsonRpcParams(val.params);
478
- }
479
- jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
480
- function isntJsonRpcRequest(val) {
481
- return !isJsonRpcRequest(val);
482
- }
483
- jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
484
- function isJsonRpcSuccess(val) {
485
- return (0, object_1.isPlainObject)(val)
486
- && (0, string_1.isString)(val.jsonrpc)
487
- && (0, string_1.isString)(val.id)
488
- && 'result' in val;
489
- }
490
- jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
491
- function isntJsonRpcSuccess(val) {
492
- return !isJsonRpcSuccess(val);
493
- }
494
- jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
495
- function isJsonRpcError(val) {
496
- return (0, object_1.isPlainObject)(val)
497
- && (0, string_1.isString)(val.jsonrpc)
498
- && isJsonRpcId(val.id)
499
- && isJsonRpcErrorObject(val.error);
500
- }
501
- jsonRpc.isJsonRpcError = isJsonRpcError;
502
- function isntJsonRpcError(val) {
503
- return !isJsonRpcError(val);
504
- }
505
- jsonRpc.isntJsonRpcError = isntJsonRpcError;
506
- function isJsonRpcErrorObject(val) {
507
- return (0, object_1.isPlainObject)(val)
508
- && (0, number_1.isNumber)(val.code)
509
- && (0, string_1.isString)(val.message)
510
- && ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
511
- }
512
-
513
- var json$1 = {};
514
-
515
- json$1.isntJson = json$1.isJson = void 0;
560
+ const array_1 = array;
561
+ const object_1$1 = object;
516
562
  function isJson(val) {
563
+ return (0, null_1.isNull)(val)
564
+ || (0, boolean_1.isBoolean)(val)
565
+ || (0, string_1.isString)(val)
566
+ || (0, number_1.isNumber)(val)
567
+ || ((0, array_1.isArray)(val) && val.every(isJson))
568
+ || ((0, object_1$1.isPlainObject)(val) && Object.values(val).every(isJson));
569
+ }
570
+ json$1.isJson = isJson;
571
+ function isntJson(val) {
572
+ return !isJson(val);
573
+ }
574
+ json$1.isntJson = isntJson;
575
+ function isJsonable(val) {
517
576
  try {
518
577
  JSON.stringify(val);
519
578
  return true;
@@ -522,11 +581,34 @@
522
581
  return false;
523
582
  }
524
583
  }
525
- json$1.isJson = isJson;
526
- function isntJson(val) {
527
- return !isntJson();
584
+ json$1.isJsonable = isJsonable;
585
+ function isntJsonable(val) {
586
+ return !isntJsonable();
528
587
  }
529
- json$1.isntJson = isntJson;
588
+ json$1.isntJsonable = isntJsonable;
589
+
590
+ var promise = {};
591
+
592
+ promise.isPromiseLike = promise.isntPromiseLike = promise.isntPromise = promise.isPromise = void 0;
593
+ const object_1 = object;
594
+ const function_1 = _function;
595
+ function isPromise(val) {
596
+ return val instanceof Promise;
597
+ }
598
+ promise.isPromise = isPromise;
599
+ function isntPromise(val) {
600
+ return !isPromise(val);
601
+ }
602
+ promise.isntPromise = isntPromise;
603
+ function isntPromiseLike(val) {
604
+ return !isPromiseLike(val);
605
+ }
606
+ promise.isntPromiseLike = isntPromiseLike;
607
+ function isPromiseLike(val) {
608
+ return (0, object_1.isObject)(val)
609
+ && (0, function_1.isFunction)(val.then);
610
+ }
611
+ promise.isPromiseLike = isPromiseLike;
530
612
 
531
613
  var url$1 = {};
532
614
 
@@ -545,7 +627,11 @@
545
627
  (function (exports) {
546
628
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
547
629
  if (k2 === undefined) k2 = k;
548
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
630
+ var desc = Object.getOwnPropertyDescriptor(m, k);
631
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
632
+ desc = { enumerable: true, get: function() { return m[k]; } };
633
+ }
634
+ Object.defineProperty(o, k2, desc);
549
635
  }) : (function(o, m, k, k2) {
550
636
  if (k2 === undefined) k2 = k;
551
637
  o[k2] = m[k];
@@ -563,16 +649,16 @@
563
649
  __exportStar(falsy, exports);
564
650
  __exportStar(_function, exports);
565
651
  __exportStar(iterable, exports);
566
- __exportStar(jsonRpc, exports);
567
652
  __exportStar(json$1, exports);
568
653
  __exportStar(_null, exports);
569
654
  __exportStar(number, exports);
570
655
  __exportStar(object, exports);
656
+ __exportStar(promise, exports);
571
657
  __exportStar(string, exports);
572
658
  __exportStar(_undefined, exports);
573
659
  __exportStar(url$1, exports);
574
660
 
575
- }(es2018$1));
661
+ }(es2018$4));
576
662
 
577
663
  function get(...transformers) {
578
664
  return request('GET', ...transformers);
@@ -593,12 +679,12 @@
593
679
  return request('DELETE', ...transformers);
594
680
  }
595
681
  function request(method, ...transformers) {
596
- const options = transformers.reduce((options, trans) => es2018$1.isFunction(trans) ? trans(options) : options, {
682
+ const options = transformers.reduce((options, trans) => es2018$4.isFunction(trans) ? trans(options) : options, {
597
683
  url: new URL('http://localhost'),
598
- headers: new es2018$2.Headers()
684
+ headers: new es2018$5.Headers()
599
685
  });
600
- const headers = new es2018$2.Headers(options.headers);
601
- return new es2018$2.Request(options.url.href, {
686
+ const headers = new es2018$5.Headers(options.headers);
687
+ return new es2018$5.Request(options.url.href, {
602
688
  method,
603
689
  headers,
604
690
  signal: options.signal,
@@ -616,7 +702,7 @@
616
702
 
617
703
  function text(payload) {
618
704
  return (options) => {
619
- const headers = new es2018$2.Headers(options.headers);
705
+ const headers = new es2018$5.Headers(options.headers);
620
706
  headers.set('Content-Type', 'application/x-www-form-urlencoded');
621
707
  return Object.assign(Object.assign({}, options), { headers,
622
708
  payload });
@@ -625,7 +711,7 @@
625
711
 
626
712
  function json(payload) {
627
713
  return (options) => {
628
- const headers = new es2018$2.Headers(options.headers);
714
+ const headers = new es2018$5.Headers(options.headers);
629
715
  headers.set('Content-Type', 'application/json');
630
716
  return Object.assign(Object.assign({}, options), { headers, payload: JSON.stringify(payload) });
631
717
  };
@@ -635,75 +721,34 @@
635
721
 
636
722
  /* @license
637
723
  Papa Parse
638
- v5.3.1
724
+ v5.3.2
639
725
  https://github.com/mholt/PapaParse
640
726
  License: MIT
641
727
  */
642
728
 
643
729
  (function (module, exports) {
644
- !function(e,t){module.exports=t();}(commonjsGlobal,function s(){var f="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==f?f:{};var n=!f.document&&!!f.postMessage,o=n&&/blob:/i.test((f.location||{}).protocol),a={},h=0,b={parse:function(e,t){var i=(t=t||{}).dynamicTyping||!1;M(i)&&(t.dynamicTypingFunction=i,i={});if(t.dynamicTyping=i,t.transform=!!M(t.transform)&&t.transform,t.worker&&b.WORKERS_SUPPORTED){var r=function(){if(!b.WORKERS_SUPPORTED)return !1;var e=(i=f.URL||f.webkitURL||null,r=s.toString(),b.BLOB_URL||(b.BLOB_URL=i.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),t=new f.Worker(e);var i,r;return t.onmessage=_,t.id=h++,a[t.id]=t}();return r.userStep=t.step,r.userChunk=t.chunk,r.userComplete=t.complete,r.userError=t.error,t.step=M(t.step),t.chunk=M(t.chunk),t.complete=M(t.complete),t.error=M(t.error),delete t.worker,void r.postMessage({input:e,config:t,workerId:r.id})}var n=null;b.NODE_STREAM_INPUT,"string"==typeof e?n=t.download?new l(t):new p(t):!0===e.readable&&M(e.read)&&M(e.on)?n=new g(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new c(t));return n.stream(e)},unparse:function(e,t){var n=!1,_=!0,m=",",y="\r\n",s='"',a=s+s,i=!1,r=null,o=!1;!function(){if("object"!=typeof t)return;"string"!=typeof t.delimiter||b.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(m=t.delimiter);("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes);"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(i=t.skipEmptyLines);"string"==typeof t.newline&&(y=t.newline);"string"==typeof t.quoteChar&&(s=t.quoteChar);"boolean"==typeof t.header&&(_=t.header);if(Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");r=t.columns;}void 0!==t.escapeChar&&(a=t.escapeChar+s);"boolean"==typeof t.escapeFormulae&&(o=t.escapeFormulae);}();var h=new RegExp(j(s),"g");"string"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return u(null,e,i);if("object"==typeof e[0])return u(r||Object.keys(e[0]),e,i)}else if("object"==typeof e)return "string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),u(e.fields||[],e.data||[],i);throw new Error("Unable to serialize unrecognized input");function u(e,t,i){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=Array.isArray(e)&&0<e.length,s=!Array.isArray(t[0]);if(n&&_){for(var a=0;a<e.length;a++)0<a&&(r+=m),r+=v(e[a],a);0<t.length&&(r+=y);}for(var o=0;o<t.length;o++){var h=n?e.length:t[o].length,u=!1,f=n?0===Object.keys(t[o]).length:0===t[o].length;if(i&&!n&&(u="greedy"===i?""===t[o].join("").trim():1===t[o].length&&0===t[o][0].length),"greedy"===i&&n){for(var d=[],l=0;l<h;l++){var c=s?e[l]:l;d.push(t[o][c]);}u=""===d.join("").trim();}if(!u){for(var p=0;p<h;p++){0<p&&!f&&(r+=m);var g=n&&s?e[p]:p;r+=v(t[o][g],p);}o<t.length-1&&(!i||0<h&&!f)&&(r+=y);}}return r}function v(e,t){if(null==e)return "";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===o&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var i=e.toString().replace(h,a),r="boolean"==typeof n&&n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return !0;return !1}(i,b.BAD_DELIMITERS)||-1<i.indexOf(m)||" "===i.charAt(0)||" "===i.charAt(i.length-1);return r?s+i+s:i}}};if(b.RECORD_SEP=String.fromCharCode(30),b.UNIT_SEP=String.fromCharCode(31),b.BYTE_ORDER_MARK="\ufeff",b.BAD_DELIMITERS=["\r","\n",'"',b.BYTE_ORDER_MARK],b.WORKERS_SUPPORTED=!n&&!!f.Worker,b.NODE_STREAM_INPUT=1,b.LocalChunkSize=10485760,b.RemoteChunkSize=5242880,b.DefaultDelimiter=",",b.Parser=E,b.ParserHandle=i,b.NetworkStreamer=l,b.FileStreamer=c,b.StringStreamer=p,b.ReadableStreamStreamer=g,f.jQuery){var d=f.jQuery;d.fn.parse=function(o){var i=o.config||{},h=[];return this.each(function(e){if(!("INPUT"===d(this).prop("tagName").toUpperCase()&&"file"===d(this).attr("type").toLowerCase()&&f.FileReader)||!this.files||0===this.files.length)return !0;for(var t=0;t<this.files.length;t++)h.push({file:this.files[t],inputElem:this,instanceConfig:d.extend({},i)});}),e(),this;function e(){if(0!==h.length){var e,t,i,r,n=h[0];if(M(o.before)){var s=o.before(n.file,n.inputElem);if("object"==typeof s){if("abort"===s.action)return e="AbortError",t=n.file,i=n.inputElem,r=s.reason,void(M(o.error)&&o.error({name:e},t,i,r));if("skip"===s.action)return void u();"object"==typeof s.config&&(n.instanceConfig=d.extend(n.instanceConfig,s.config));}else if("skip"===s)return void u()}var a=n.instanceConfig.complete;n.instanceConfig.complete=function(e){M(a)&&a(e,n.file,n.inputElem),u();},b.parse(n.file,n.instanceConfig);}else M(o.complete)&&o.complete();}function u(){h.splice(0,1),e();}};}function u(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=w(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new i(t),(this._handle.streamer=this)._config=t;}.call(this,e),this.parseChunk=function(e,t){if(this.isFirstChunk&&M(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i);}this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var s=n.meta.cursor;this._finished||(this._partialLine=r.substring(s-this._baseIndex),this._baseIndex=s),n&&n.data&&(this._rowCount+=n.data.length);var a=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)f.postMessage({results:n,workerId:b.WORKER_ID,finished:a});else if(M(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);n=void 0,this._completeResults=void 0;}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!a||!M(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||n&&n.meta.paused||this._nextChunk(),n}this._halted=!0;},this._sendError=function(e){M(this._config.error)?this._config.error(e):o&&this._config.error&&f.postMessage({workerId:b.WORKER_ID,error:e,finished:!1});};}function l(e){var r;(e=e||{}).chunkSize||(e.chunkSize=b.RemoteChunkSize),u.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded();}:function(){this._readChunk();},this.stream=function(e){this._input=e,this._nextChunk();},this._readChunk=function(){if(this._finished)this._chunkLoaded();else {if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),n||(r.onload=v(this._chunkLoaded,this),r.onerror=v(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)r.setRequestHeader(t,e[t]);}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+i);}try{r.send(this._config.downloadRequestBody);}catch(e){this._chunkError(e.message);}n&&0===r.status&&this._chunkError();}},this._chunkLoaded=function(){4===r.readyState&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:r.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");if(null===t)return -1;return parseInt(t.substring(t.lastIndexOf("/")+1))}(r),this.parseChunk(r.responseText)));},this._chunkError=function(e){var t=r.statusText||e;this._sendError(new Error(t));};}function c(e){var r,n;(e=e||{}).chunkSize||(e.chunkSize=b.LocalChunkSize),u.call(this,e);var s="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,s?((r=new FileReader).onload=v(this._chunkLoaded,this),r.onerror=v(this._chunkError,this)):r=new FileReaderSync,this._nextChunk();},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk();},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var t=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,t);}var i=r.readAsText(e,this._config.encoding);s||this._chunkLoaded({target:{result:i}});},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result);},this._chunkError=function(){this._sendError(r.error);};}function p(e){var i;u.call(this,e=e||{}),this.stream=function(e){return i=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,t=this._config.chunkSize;return t?(e=i.substring(0,t),i=i.substring(t)):(e=i,i=""),this._finished=!i,this.parseChunk(e)}};}function g(e){u.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause();},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume();},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError);},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0);},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0;},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()));}catch(e){this._streamError(e);}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e);},this),this._streamEnd=v(function(){this._streamCleanUp(),r=!0,this._streamData("");},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError);},this);}function i(m){var a,o,h,r=Math.pow(2,53),n=-r,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,t=this,i=0,f=0,d=!1,e=!1,l=[],c={data:[],errors:[],meta:{}};if(M(m.step)){var p=m.step;m.step=function(e){if(c=e,_())g();else {if(g(),0===c.data.length)return;i+=e.data.length,m.preview&&i>m.preview?o.abort():(c.data=c.data[0],p(c,t));}};}function y(e){return "greedy"===m.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function g(){if(c&&h&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+b.DefaultDelimiter+"'"),h=!1),m.skipEmptyLines)for(var e=0;e<c.data.length;e++)y(c.data[e])&&c.data.splice(e--,1);return _()&&function(){if(!c)return;function e(e,t){M(m.transformHeader)&&(e=m.transformHeader(e,t)),l.push(e);}if(Array.isArray(c.data[0])){for(var t=0;_()&&t<c.data.length;t++)c.data[t].forEach(e);c.data.splice(0,1);}else c.data.forEach(e);}(),function(){if(!c||!m.header&&!m.dynamicTyping&&!m.transform)return c;function e(e,t){var i,r=m.header?{}:[];for(i=0;i<e.length;i++){var n=i,s=e[i];m.header&&(n=i>=l.length?"__parsed_extra":l[i]),m.transform&&(s=m.transform(s,n)),s=v(n,s),"__parsed_extra"===n?(r[n]=r[n]||[],r[n].push(s)):r[n]=s;}return m.header&&(i>l.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+l.length+" fields but parsed "+i,f+t):i<l.length&&k("FieldMismatch","TooFewFields","Too few fields: expected "+l.length+" fields but parsed "+i,f+t)),r}var t=1;!c.data.length||Array.isArray(c.data[0])?(c.data=c.data.map(e),t=c.data.length):c.data=e(c.data,0);m.header&&c.meta&&(c.meta.fields=l);return f+=t,c}()}function _(){return m.header&&0===l.length}function v(e,t){return i=e,m.dynamicTypingFunction&&void 0===m.dynamicTyping[i]&&(m.dynamicTyping[i]=m.dynamicTypingFunction(i)),!0===(m.dynamicTyping[i]||m.dynamicTyping)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(function(e){if(s.test(e)){var t=parseFloat(e);if(n<t&&t<r)return !0}return !1}(t)?parseFloat(t):u.test(t)?new Date(t):""===t?null:t):t;var i;}function k(e,t,i,r){var n={type:e,code:t,message:i};void 0!==r&&(n.row=r),c.errors.push(n);}this.parse=function(e,t,i){var r=m.quoteChar||'"';if(m.newline||(m.newline=function(e,t){e=e.substring(0,1048576);var i=new RegExp(j(t)+"([^]*?)"+j(t),"gm"),r=(e=e.replace(i,"")).split("\r"),n=e.split("\n"),s=1<n.length&&n[0].length<r[0].length;if(1===r.length||s)return "\n";for(var a=0,o=0;o<r.length;o++)"\n"===r[o][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(e,r)),h=!1,m.delimiter)M(m.delimiter)&&(m.delimiter=m.delimiter(e),c.meta.delimiter=m.delimiter);else {var n=function(e,t,i,r,n){var s,a,o,h;n=n||[",","\t","|",";",b.RECORD_SEP,b.UNIT_SEP];for(var u=0;u<n.length;u++){var f=n[u],d=0,l=0,c=0;o=void 0;for(var p=new E({comments:r,delimiter:f,newline:t,preview:10}).parse(e),g=0;g<p.data.length;g++)if(i&&y(p.data[g]))c++;else {var _=p.data[g].length;l+=_,void 0!==o?0<_&&(d+=Math.abs(_-o),o=_):o=_;}0<p.data.length&&(l/=p.data.length-c),(void 0===a||d<=a)&&(void 0===h||h<l)&&1.99<l&&(a=d,s=f,h=l);}return {successful:!!(m.delimiter=s),bestDelimiter:s}}(e,m.newline,m.skipEmptyLines,m.comments,m.delimitersToGuess);n.successful?m.delimiter=n.bestDelimiter:(h=!0,m.delimiter=b.DefaultDelimiter),c.meta.delimiter=m.delimiter;}var s=w(m);return m.preview&&m.header&&s.preview++,a=e,o=new E(s),c=o.parse(a,t,i),g(),d?{meta:{paused:!0}}:c||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,o.abort(),a=M(m.chunk)?"":a.substring(o.getCharIndex());},this.resume=function(){t.streamer._halted?(d=!1,t.streamer.parseChunk(a,!0)):setTimeout(t.resume,3);},this.aborted=function(){return e},this.abort=function(){e=!0,o.abort(),c.meta.aborted=!0,M(m.complete)&&m.complete(c),a="";};}function j(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function E(e){var S,O=(e=e||{}).delimiter,x=e.newline,I=e.comments,T=e.step,D=e.preview,A=e.fastMode,L=S=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(L=e.escapeChar),("string"!=typeof O||-1<b.BAD_DELIMITERS.indexOf(O))&&(O=","),I===O)throw new Error("Comment character same as delimiter");!0===I?I="#":("string"!=typeof I||-1<b.BAD_DELIMITERS.indexOf(I))&&(I=!1),"\n"!==x&&"\r"!==x&&"\r\n"!==x&&(x="\n");var F=0,z=!1;this.parse=function(r,t,i){if("string"!=typeof r)throw new Error("Input must be a string");var n=r.length,e=O.length,s=x.length,a=I.length,o=M(T),h=[],u=[],f=[],d=F=0;if(!r)return C();if(A||!1!==A&&-1===r.indexOf(S)){for(var l=r.split(x),c=0;c<l.length;c++){if(f=l[c],F+=f.length,c!==l.length-1)F+=x.length;else if(i)return C();if(!I||f.substring(0,a)!==I){if(o){if(h=[],k(f.split(O)),R(),z)return C()}else k(f.split(O));if(D&&D<=c)return h=h.slice(0,D),C(!0)}}return C()}for(var p=r.indexOf(O,F),g=r.indexOf(x,F),_=new RegExp(j(L)+j(S),"g"),m=r.indexOf(S,F);;)if(r[F]!==S)if(I&&0===f.length&&r.substring(F,F+a)===I){if(-1===g)return C();F=g+s,g=r.indexOf(x,F),p=r.indexOf(O,F);}else if(-1!==p&&(p<g||-1===g))f.push(r.substring(F,p)),F=p+e,p=r.indexOf(O,F);else {if(-1===g)break;if(f.push(r.substring(F,g)),w(g+s),o&&(R(),z))return C();if(D&&h.length>=D)return C(!0)}else for(m=F,F++;;){if(-1===(m=r.indexOf(S,m+1)))return i||u.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:h.length,index:F}),E();if(m===n-1)return E(r.substring(F,m).replace(_,S));if(S!==L||r[m+1]!==L){if(S===L||0===m||r[m-1]!==L){-1!==p&&p<m+1&&(p=r.indexOf(O,m+1)),-1!==g&&g<m+1&&(g=r.indexOf(x,m+1));var y=b(-1===g?p:Math.min(p,g));if(r[m+1+y]===O){f.push(r.substring(F,m).replace(_,S)),r[F=m+1+y+e]!==S&&(m=r.indexOf(S,F)),p=r.indexOf(O,F),g=r.indexOf(x,F);break}var v=b(g);if(r.substring(m+1+v,m+1+v+s)===x){if(f.push(r.substring(F,m).replace(_,S)),w(m+1+v+s),p=r.indexOf(O,F),m=r.indexOf(S,F),o&&(R(),z))return C();if(D&&h.length>=D)return C(!0);break}u.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:h.length,index:F}),m++;}}else m++;}return E();function k(e){h.push(e),d=F;}function b(e){var t=0;if(-1!==e){var i=r.substring(m+1,e);i&&""===i.trim()&&(t=i.length);}return t}function E(e){return i||(void 0===e&&(e=r.substring(F)),f.push(e),F=n,k(f),o&&R()),C()}function w(e){F=e,k(f),f=[],g=r.indexOf(x,F);}function C(e){return {data:h,errors:u,meta:{delimiter:O,linebreak:x,aborted:z,truncated:!!e,cursor:d+(t||0)}}}function R(){T(C()),h=[],u=[];}},this.abort=function(){z=!0;},this.getCharIndex=function(){return F};}function _(e){var t=e.data,i=a[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){r=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}});},pause:y,resume:y};if(M(i.userStep)){for(var s=0;s<t.results.data.length&&(i.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},n),!r);s++);delete t.results;}else M(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results);}t.finished&&!r&&m(t.workerId,t.results);}function m(e,t){var i=a[e];M(i.userComplete)&&i.userComplete(t),i.terminate(),delete a[e];}function y(){throw new Error("Not implemented.")}function w(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e)t[i]=w(e[i]);return t}function v(e,t){return function(){e.apply(t,arguments);}}function M(e){return "function"==typeof e}return o&&(f.onmessage=function(e){var t=e.data;void 0===b.WORKER_ID&&t&&(b.WORKER_ID=t.workerId);if("string"==typeof t.input)f.postMessage({workerId:b.WORKER_ID,results:b.parse(t.input,t.config),finished:!0});else if(f.File&&t.input instanceof File||t.input instanceof Object){var i=b.parse(t.input,t.config);i&&f.postMessage({workerId:b.WORKER_ID,results:i,finished:!0});}}),(l.prototype=Object.create(u.prototype)).constructor=l,(c.prototype=Object.create(u.prototype)).constructor=c,(p.prototype=Object.create(p.prototype)).constructor=p,(g.prototype=Object.create(u.prototype)).constructor=g,b});
730
+ !function(e,t){module.exports=t();}(commonjsGlobal,function s(){var f="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==f?f:{};var n=!f.document&&!!f.postMessage,o=n&&/blob:/i.test((f.location||{}).protocol),a={},h=0,b={parse:function(e,t){var i=(t=t||{}).dynamicTyping||!1;M(i)&&(t.dynamicTypingFunction=i,i={});if(t.dynamicTyping=i,t.transform=!!M(t.transform)&&t.transform,t.worker&&b.WORKERS_SUPPORTED){var r=function(){if(!b.WORKERS_SUPPORTED)return !1;var e=(i=f.URL||f.webkitURL||null,r=s.toString(),b.BLOB_URL||(b.BLOB_URL=i.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),t=new f.Worker(e);var i,r;return t.onmessage=_,t.id=h++,a[t.id]=t}();return r.userStep=t.step,r.userChunk=t.chunk,r.userComplete=t.complete,r.userError=t.error,t.step=M(t.step),t.chunk=M(t.chunk),t.complete=M(t.complete),t.error=M(t.error),delete t.worker,void r.postMessage({input:e,config:t,workerId:r.id})}var n=null;b.NODE_STREAM_INPUT,"string"==typeof e?n=t.download?new l(t):new p(t):!0===e.readable&&M(e.read)&&M(e.on)?n=new g(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new c(t));return n.stream(e)},unparse:function(e,t){var n=!1,_=!0,m=",",y="\r\n",s='"',a=s+s,i=!1,r=null,o=!1;!function(){if("object"!=typeof t)return;"string"!=typeof t.delimiter||b.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(m=t.delimiter);("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes);"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(i=t.skipEmptyLines);"string"==typeof t.newline&&(y=t.newline);"string"==typeof t.quoteChar&&(s=t.quoteChar);"boolean"==typeof t.header&&(_=t.header);if(Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");r=t.columns;}void 0!==t.escapeChar&&(a=t.escapeChar+s);("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(o=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/);}();var h=new RegExp(j(s),"g");"string"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return u(null,e,i);if("object"==typeof e[0])return u(r||Object.keys(e[0]),e,i)}else if("object"==typeof e)return "string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||r),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),u(e.fields||[],e.data||[],i);throw new Error("Unable to serialize unrecognized input");function u(e,t,i){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=Array.isArray(e)&&0<e.length,s=!Array.isArray(t[0]);if(n&&_){for(var a=0;a<e.length;a++)0<a&&(r+=m),r+=v(e[a],a);0<t.length&&(r+=y);}for(var o=0;o<t.length;o++){var h=n?e.length:t[o].length,u=!1,f=n?0===Object.keys(t[o]).length:0===t[o].length;if(i&&!n&&(u="greedy"===i?""===t[o].join("").trim():1===t[o].length&&0===t[o][0].length),"greedy"===i&&n){for(var d=[],l=0;l<h;l++){var c=s?e[l]:l;d.push(t[o][c]);}u=""===d.join("").trim();}if(!u){for(var p=0;p<h;p++){0<p&&!f&&(r+=m);var g=n&&s?e[p]:p;r+=v(t[o][g],p);}o<t.length-1&&(!i||0<h&&!f)&&(r+=y);}}return r}function v(e,t){if(null==e)return "";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var i=!1;o&&"string"==typeof e&&o.test(e)&&(e="'"+e,i=!0);var r=e.toString().replace(h,a);return (i=i||!0===n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return !0;return !1}(r,b.BAD_DELIMITERS)||-1<r.indexOf(m)||" "===r.charAt(0)||" "===r.charAt(r.length-1))?s+r+s:r}}};if(b.RECORD_SEP=String.fromCharCode(30),b.UNIT_SEP=String.fromCharCode(31),b.BYTE_ORDER_MARK="\ufeff",b.BAD_DELIMITERS=["\r","\n",'"',b.BYTE_ORDER_MARK],b.WORKERS_SUPPORTED=!n&&!!f.Worker,b.NODE_STREAM_INPUT=1,b.LocalChunkSize=10485760,b.RemoteChunkSize=5242880,b.DefaultDelimiter=",",b.Parser=E,b.ParserHandle=i,b.NetworkStreamer=l,b.FileStreamer=c,b.StringStreamer=p,b.ReadableStreamStreamer=g,f.jQuery){var d=f.jQuery;d.fn.parse=function(o){var i=o.config||{},h=[];return this.each(function(e){if(!("INPUT"===d(this).prop("tagName").toUpperCase()&&"file"===d(this).attr("type").toLowerCase()&&f.FileReader)||!this.files||0===this.files.length)return !0;for(var t=0;t<this.files.length;t++)h.push({file:this.files[t],inputElem:this,instanceConfig:d.extend({},i)});}),e(),this;function e(){if(0!==h.length){var e,t,i,r,n=h[0];if(M(o.before)){var s=o.before(n.file,n.inputElem);if("object"==typeof s){if("abort"===s.action)return e="AbortError",t=n.file,i=n.inputElem,r=s.reason,void(M(o.error)&&o.error({name:e},t,i,r));if("skip"===s.action)return void u();"object"==typeof s.config&&(n.instanceConfig=d.extend(n.instanceConfig,s.config));}else if("skip"===s)return void u()}var a=n.instanceConfig.complete;n.instanceConfig.complete=function(e){M(a)&&a(e,n.file,n.inputElem),u();},b.parse(n.file,n.instanceConfig);}else M(o.complete)&&o.complete();}function u(){h.splice(0,1),e();}};}function u(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=w(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new i(t),(this._handle.streamer=this)._config=t;}.call(this,e),this.parseChunk=function(e,t){if(this.isFirstChunk&&M(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i);}this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var s=n.meta.cursor;this._finished||(this._partialLine=r.substring(s-this._baseIndex),this._baseIndex=s),n&&n.data&&(this._rowCount+=n.data.length);var a=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)f.postMessage({results:n,workerId:b.WORKER_ID,finished:a});else if(M(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);n=void 0,this._completeResults=void 0;}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!a||!M(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||n&&n.meta.paused||this._nextChunk(),n}this._halted=!0;},this._sendError=function(e){M(this._config.error)?this._config.error(e):o&&this._config.error&&f.postMessage({workerId:b.WORKER_ID,error:e,finished:!1});};}function l(e){var r;(e=e||{}).chunkSize||(e.chunkSize=b.RemoteChunkSize),u.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded();}:function(){this._readChunk();},this.stream=function(e){this._input=e,this._nextChunk();},this._readChunk=function(){if(this._finished)this._chunkLoaded();else {if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),n||(r.onload=v(this._chunkLoaded,this),r.onerror=v(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)r.setRequestHeader(t,e[t]);}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+i);}try{r.send(this._config.downloadRequestBody);}catch(e){this._chunkError(e.message);}n&&0===r.status&&this._chunkError();}},this._chunkLoaded=function(){4===r.readyState&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:r.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");if(null===t)return -1;return parseInt(t.substring(t.lastIndexOf("/")+1))}(r),this.parseChunk(r.responseText)));},this._chunkError=function(e){var t=r.statusText||e;this._sendError(new Error(t));};}function c(e){var r,n;(e=e||{}).chunkSize||(e.chunkSize=b.LocalChunkSize),u.call(this,e);var s="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,s?((r=new FileReader).onload=v(this._chunkLoaded,this),r.onerror=v(this._chunkError,this)):r=new FileReaderSync,this._nextChunk();},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk();},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var t=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,t);}var i=r.readAsText(e,this._config.encoding);s||this._chunkLoaded({target:{result:i}});},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result);},this._chunkError=function(){this._sendError(r.error);};}function p(e){var i;u.call(this,e=e||{}),this.stream=function(e){return i=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,t=this._config.chunkSize;return t?(e=i.substring(0,t),i=i.substring(t)):(e=i,i=""),this._finished=!i,this.parseChunk(e)}};}function g(e){u.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause();},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume();},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError);},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0);},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0;},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()));}catch(e){this._streamError(e);}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e);},this),this._streamEnd=v(function(){this._streamCleanUp(),r=!0,this._streamData("");},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError);},this);}function i(m){var a,o,h,r=Math.pow(2,53),n=-r,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,t=this,i=0,f=0,d=!1,e=!1,l=[],c={data:[],errors:[],meta:{}};if(M(m.step)){var p=m.step;m.step=function(e){if(c=e,_())g();else {if(g(),0===c.data.length)return;i+=e.data.length,m.preview&&i>m.preview?o.abort():(c.data=c.data[0],p(c,t));}};}function y(e){return "greedy"===m.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function g(){return c&&h&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+b.DefaultDelimiter+"'"),h=!1),m.skipEmptyLines&&(c.data=c.data.filter(function(e){return !y(e)})),_()&&function(){if(!c)return;function e(e,t){M(m.transformHeader)&&(e=m.transformHeader(e,t)),l.push(e);}if(Array.isArray(c.data[0])){for(var t=0;_()&&t<c.data.length;t++)c.data[t].forEach(e);c.data.splice(0,1);}else c.data.forEach(e);}(),function(){if(!c||!m.header&&!m.dynamicTyping&&!m.transform)return c;function e(e,t){var i,r=m.header?{}:[];for(i=0;i<e.length;i++){var n=i,s=e[i];m.header&&(n=i>=l.length?"__parsed_extra":l[i]),m.transform&&(s=m.transform(s,n)),s=v(n,s),"__parsed_extra"===n?(r[n]=r[n]||[],r[n].push(s)):r[n]=s;}return m.header&&(i>l.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+l.length+" fields but parsed "+i,f+t):i<l.length&&k("FieldMismatch","TooFewFields","Too few fields: expected "+l.length+" fields but parsed "+i,f+t)),r}var t=1;!c.data.length||Array.isArray(c.data[0])?(c.data=c.data.map(e),t=c.data.length):c.data=e(c.data,0);m.header&&c.meta&&(c.meta.fields=l);return f+=t,c}()}function _(){return m.header&&0===l.length}function v(e,t){return i=e,m.dynamicTypingFunction&&void 0===m.dynamicTyping[i]&&(m.dynamicTyping[i]=m.dynamicTypingFunction(i)),!0===(m.dynamicTyping[i]||m.dynamicTyping)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(function(e){if(s.test(e)){var t=parseFloat(e);if(n<t&&t<r)return !0}return !1}(t)?parseFloat(t):u.test(t)?new Date(t):""===t?null:t):t;var i;}function k(e,t,i,r){var n={type:e,code:t,message:i};void 0!==r&&(n.row=r),c.errors.push(n);}this.parse=function(e,t,i){var r=m.quoteChar||'"';if(m.newline||(m.newline=function(e,t){e=e.substring(0,1048576);var i=new RegExp(j(t)+"([^]*?)"+j(t),"gm"),r=(e=e.replace(i,"")).split("\r"),n=e.split("\n"),s=1<n.length&&n[0].length<r[0].length;if(1===r.length||s)return "\n";for(var a=0,o=0;o<r.length;o++)"\n"===r[o][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(e,r)),h=!1,m.delimiter)M(m.delimiter)&&(m.delimiter=m.delimiter(e),c.meta.delimiter=m.delimiter);else {var n=function(e,t,i,r,n){var s,a,o,h;n=n||[",","\t","|",";",b.RECORD_SEP,b.UNIT_SEP];for(var u=0;u<n.length;u++){var f=n[u],d=0,l=0,c=0;o=void 0;for(var p=new E({comments:r,delimiter:f,newline:t,preview:10}).parse(e),g=0;g<p.data.length;g++)if(i&&y(p.data[g]))c++;else {var _=p.data[g].length;l+=_,void 0!==o?0<_&&(d+=Math.abs(_-o),o=_):o=_;}0<p.data.length&&(l/=p.data.length-c),(void 0===a||d<=a)&&(void 0===h||h<l)&&1.99<l&&(a=d,s=f,h=l);}return {successful:!!(m.delimiter=s),bestDelimiter:s}}(e,m.newline,m.skipEmptyLines,m.comments,m.delimitersToGuess);n.successful?m.delimiter=n.bestDelimiter:(h=!0,m.delimiter=b.DefaultDelimiter),c.meta.delimiter=m.delimiter;}var s=w(m);return m.preview&&m.header&&s.preview++,a=e,o=new E(s),c=o.parse(a,t,i),g(),d?{meta:{paused:!0}}:c||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,o.abort(),a=M(m.chunk)?"":a.substring(o.getCharIndex());},this.resume=function(){t.streamer._halted?(d=!1,t.streamer.parseChunk(a,!0)):setTimeout(t.resume,3);},this.aborted=function(){return e},this.abort=function(){e=!0,o.abort(),c.meta.aborted=!0,M(m.complete)&&m.complete(c),a="";};}function j(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function E(e){var S,O=(e=e||{}).delimiter,x=e.newline,I=e.comments,T=e.step,D=e.preview,A=e.fastMode,L=S=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(L=e.escapeChar),("string"!=typeof O||-1<b.BAD_DELIMITERS.indexOf(O))&&(O=","),I===O)throw new Error("Comment character same as delimiter");!0===I?I="#":("string"!=typeof I||-1<b.BAD_DELIMITERS.indexOf(I))&&(I=!1),"\n"!==x&&"\r"!==x&&"\r\n"!==x&&(x="\n");var F=0,z=!1;this.parse=function(r,t,i){if("string"!=typeof r)throw new Error("Input must be a string");var n=r.length,e=O.length,s=x.length,a=I.length,o=M(T),h=[],u=[],f=[],d=F=0;if(!r)return C();if(A||!1!==A&&-1===r.indexOf(S)){for(var l=r.split(x),c=0;c<l.length;c++){if(f=l[c],F+=f.length,c!==l.length-1)F+=x.length;else if(i)return C();if(!I||f.substring(0,a)!==I){if(o){if(h=[],k(f.split(O)),R(),z)return C()}else k(f.split(O));if(D&&D<=c)return h=h.slice(0,D),C(!0)}}return C()}for(var p=r.indexOf(O,F),g=r.indexOf(x,F),_=new RegExp(j(L)+j(S),"g"),m=r.indexOf(S,F);;)if(r[F]!==S)if(I&&0===f.length&&r.substring(F,F+a)===I){if(-1===g)return C();F=g+s,g=r.indexOf(x,F),p=r.indexOf(O,F);}else if(-1!==p&&(p<g||-1===g))f.push(r.substring(F,p)),F=p+e,p=r.indexOf(O,F);else {if(-1===g)break;if(f.push(r.substring(F,g)),w(g+s),o&&(R(),z))return C();if(D&&h.length>=D)return C(!0)}else for(m=F,F++;;){if(-1===(m=r.indexOf(S,m+1)))return i||u.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:h.length,index:F}),E();if(m===n-1)return E(r.substring(F,m).replace(_,S));if(S!==L||r[m+1]!==L){if(S===L||0===m||r[m-1]!==L){-1!==p&&p<m+1&&(p=r.indexOf(O,m+1)),-1!==g&&g<m+1&&(g=r.indexOf(x,m+1));var y=b(-1===g?p:Math.min(p,g));if(r.substr(m+1+y,e)===O){f.push(r.substring(F,m).replace(_,S)),r[F=m+1+y+e]!==S&&(m=r.indexOf(S,F)),p=r.indexOf(O,F),g=r.indexOf(x,F);break}var v=b(g);if(r.substring(m+1+v,m+1+v+s)===x){if(f.push(r.substring(F,m).replace(_,S)),w(m+1+v+s),p=r.indexOf(O,F),m=r.indexOf(S,F),o&&(R(),z))return C();if(D&&h.length>=D)return C(!0);break}u.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:h.length,index:F}),m++;}}else m++;}return E();function k(e){h.push(e),d=F;}function b(e){var t=0;if(-1!==e){var i=r.substring(m+1,e);i&&""===i.trim()&&(t=i.length);}return t}function E(e){return i||(void 0===e&&(e=r.substring(F)),f.push(e),F=n,k(f),o&&R()),C()}function w(e){F=e,k(f),f=[],g=r.indexOf(x,F);}function C(e){return {data:h,errors:u,meta:{delimiter:O,linebreak:x,aborted:z,truncated:!!e,cursor:d+(t||0)}}}function R(){T(C()),h=[],u=[];}},this.abort=function(){z=!0;},this.getCharIndex=function(){return F};}function _(e){var t=e.data,i=a[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){r=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}});},pause:y,resume:y};if(M(i.userStep)){for(var s=0;s<t.results.data.length&&(i.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},n),!r);s++);delete t.results;}else M(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results);}t.finished&&!r&&m(t.workerId,t.results);}function m(e,t){var i=a[e];M(i.userComplete)&&i.userComplete(t),i.terminate(),delete a[e];}function y(){throw new Error("Not implemented.")}function w(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e)t[i]=w(e[i]);return t}function v(e,t){return function(){e.apply(t,arguments);}}function M(e){return "function"==typeof e}return o&&(f.onmessage=function(e){var t=e.data;void 0===b.WORKER_ID&&t&&(b.WORKER_ID=t.workerId);if("string"==typeof t.input)f.postMessage({workerId:b.WORKER_ID,results:b.parse(t.input,t.config),finished:!0});else if(f.File&&t.input instanceof File||t.input instanceof Object){var i=b.parse(t.input,t.config);i&&f.postMessage({workerId:b.WORKER_ID,results:i,finished:!0});}}),(l.prototype=Object.create(u.prototype)).constructor=l,(c.prototype=Object.create(u.prototype)).constructor=c,(p.prototype=Object.create(p.prototype)).constructor=p,(g.prototype=Object.create(u.prototype)).constructor=g,b});
645
731
  }(papaparse_min));
646
732
 
647
- var es2018 = {};
733
+ var es2018$3 = {};
648
734
 
649
735
  var customError = {};
650
736
 
651
- customError.CustomError = void 0;
652
- class CustomError extends Error {
653
- get name() {
654
- return this.constructor.name;
655
- }
656
- }
657
- customError.CustomError = CustomError;
658
-
659
- var expectedError = {};
660
-
661
- expectedError.ExpectedError = void 0;
662
- const custom_error_1$1 = customError;
663
- class ExpectedError extends custom_error_1$1.CustomError {
664
- }
665
- expectedError.ExpectedError = ExpectedError;
666
-
667
- var assertionError = {};
668
-
669
- assertionError.AssertionError = void 0;
670
- const custom_error_1 = customError;
671
- class AssertionError extends custom_error_1.CustomError {
672
- }
673
- assertionError.AssertionError = AssertionError;
674
-
675
- var normalize$1 = {};
737
+ var es2018$2 = {};
676
738
 
677
- normalize$1.normalize = void 0;
678
- function normalize(err) {
679
- var _a;
680
- return {
681
- name: err.name,
682
- message: err.message,
683
- stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
684
- };
685
- }
686
- normalize$1.normalize = normalize;
739
+ var middleware = {};
687
740
 
688
- var refute$1 = {};
741
+ var chunkAsync$1 = {};
689
742
 
690
- refute$1.refute = void 0;
691
- const expected_error_1 = expectedError;
692
- function refute(condition, message) {
693
- if (condition)
694
- throw new expected_error_1.ExpectedError(message);
695
- }
696
- refute$1.refute = refute;
743
+ var es2018$1 = {};
697
744
 
698
- var assert$1 = {};
745
+ var go$1 = {};
699
746
 
700
- assert$1.assert = void 0;
701
- const assertion_error_1 = assertionError;
702
- function assert(condition, message) {
703
- if (!condition)
704
- throw new assertion_error_1.AssertionError(message);
747
+ go$1.go = void 0;
748
+ function go(fn) {
749
+ return fn();
705
750
  }
706
- assert$1.assert = assert;
751
+ go$1.go = go;
707
752
 
708
753
  (function (exports) {
709
754
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -715,19 +760,1971 @@
715
760
  }));
716
761
  var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
717
762
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
718
- };__exportStar(customError, exports);
719
- __exportStar(expectedError, exports);
720
- __exportStar(assertionError, exports);
721
- __exportStar(normalize$1, exports);
722
- __exportStar(refute$1, exports);
723
- __exportStar(assert$1, exports);
763
+ };__exportStar(go$1, exports);
724
764
 
725
- }(es2018));
765
+ }(es2018$1));
766
+
767
+ chunkAsync$1.chunkAsync = void 0;
768
+ const go_1$f = es2018$1;
769
+ const errors_1$f = es2018$3;
770
+ function chunkAsync(iterable, size) {
771
+ (0, errors_1$f.assert)(Number.isInteger(size), 'The parameter size must be an integer');
772
+ (0, errors_1$f.assert)(size > 0, 'The parameter size must be greater than 0');
773
+ return (0, go_1$f.go)(async function* () {
774
+ let buffer = [];
775
+ for await (const element of iterable) {
776
+ buffer.push(element);
777
+ if (buffer.length >= size) {
778
+ yield buffer;
779
+ buffer = [];
780
+ }
781
+ }
782
+ if (buffer.length)
783
+ yield buffer;
784
+ });
785
+ }
786
+ chunkAsync$1.chunkAsync = chunkAsync;
787
+
788
+ var chunkByAsync$1 = {};
789
+
790
+ chunkByAsync$1.chunkByAsync = void 0;
791
+ const types_1$k = es2018$4;
792
+ function chunkByAsync(iterable, predicate) {
793
+ if ((0, types_1$k.isAsyncIterable)(iterable)) {
794
+ return chunkByAsyncIterable(iterable);
795
+ }
796
+ else {
797
+ return chunkByIterable(iterable);
798
+ }
799
+ async function* chunkByAsyncIterable(iterable) {
800
+ let buffer = [];
801
+ let index = 0;
802
+ for await (const element of iterable) {
803
+ buffer.push(element);
804
+ if (await predicate(element, index)) {
805
+ yield buffer;
806
+ buffer = [];
807
+ }
808
+ index++;
809
+ }
810
+ if (buffer.length)
811
+ yield buffer;
812
+ }
813
+ async function* chunkByIterable(iterable) {
814
+ let buffer = [];
815
+ let index = 0;
816
+ for (const element of iterable) {
817
+ buffer.push(element);
818
+ if (await predicate(element, index)) {
819
+ yield buffer;
820
+ buffer = [];
821
+ }
822
+ index++;
823
+ }
824
+ if (buffer.length)
825
+ yield buffer;
826
+ }
827
+ }
828
+ chunkByAsync$1.chunkByAsync = chunkByAsync;
829
+
830
+ var chunkBy$1 = {};
831
+
832
+ chunkBy$1.chunkBy = void 0;
833
+ function* chunkBy(iterable, predicate) {
834
+ let buffer = [];
835
+ let index = 0;
836
+ for (const element of iterable) {
837
+ buffer.push(element);
838
+ if (predicate(element, index)) {
839
+ yield buffer;
840
+ buffer = [];
841
+ }
842
+ index++;
843
+ }
844
+ if (buffer.length)
845
+ yield buffer;
846
+ }
847
+ chunkBy$1.chunkBy = chunkBy;
848
+
849
+ var chunk$1 = {};
850
+
851
+ chunk$1.chunk = void 0;
852
+ const go_1$e = es2018$1;
853
+ const errors_1$e = es2018$3;
854
+ function chunk(iterable, size) {
855
+ (0, errors_1$e.assert)(Number.isInteger(size), 'The parameter size must be an integer');
856
+ (0, errors_1$e.assert)(size > 0, 'The parameter size must be greater than 0');
857
+ return (0, go_1$e.go)(function* () {
858
+ let buffer = [];
859
+ for (const element of iterable) {
860
+ buffer.push(element);
861
+ if (buffer.length >= size) {
862
+ yield buffer;
863
+ buffer = [];
864
+ }
865
+ }
866
+ if (buffer.length)
867
+ yield buffer;
868
+ });
869
+ }
870
+ chunk$1.chunk = chunk;
871
+
872
+ var concatAsync$1 = {};
873
+
874
+ concatAsync$1.concatAsync = void 0;
875
+ const types_1$j = es2018$4;
876
+ const go_1$d = es2018$1;
877
+ function concatAsync(iterable, ...otherIterables) {
878
+ return (0, go_1$d.go)(async function* () {
879
+ for (const iter of [iterable, ...otherIterables]) {
880
+ if ((0, types_1$j.isAsyncIterable)(iter)) {
881
+ for await (const element of iter) {
882
+ yield element;
883
+ }
884
+ }
885
+ else {
886
+ for (const element of iter) {
887
+ yield element;
888
+ }
889
+ }
890
+ }
891
+ });
892
+ }
893
+ concatAsync$1.concatAsync = concatAsync;
894
+
895
+ var concat$1 = {};
896
+
897
+ concat$1.concat = void 0;
898
+ const go_1$c = es2018$1;
899
+ function concat(iterable, ...otherIterables) {
900
+ return (0, go_1$c.go)(function* () {
901
+ for (const iter of [iterable, ...otherIterables]) {
902
+ yield* iter;
903
+ }
904
+ });
905
+ }
906
+ concat$1.concat = concat;
907
+
908
+ var dropAsync$1 = {};
909
+
910
+ var utils = {};
911
+
912
+ utils.copyIterable = utils.copyAsyncIterable = void 0;
913
+ async function* copyAsyncIterable(iterable) {
914
+ for await (const element of iterable) {
915
+ yield element;
916
+ }
917
+ }
918
+ utils.copyAsyncIterable = copyAsyncIterable;
919
+ function* copyIterable(iterable) {
920
+ for (const element of iterable) {
921
+ yield element;
922
+ }
923
+ }
924
+ utils.copyIterable = copyIterable;
925
+
926
+ dropAsync$1.dropAsync = void 0;
927
+ const go_1$b = es2018$1;
928
+ const utils_1$3 = utils;
929
+ const errors_1$d = es2018$3;
930
+ function dropAsync(iterable, count) {
931
+ (0, errors_1$d.assert)(Number.isInteger(count), 'The parameter count must be an integer');
932
+ (0, errors_1$d.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
933
+ if (count === 0)
934
+ return (0, utils_1$3.copyAsyncIterable)(iterable);
935
+ return (0, go_1$b.go)(async function* () {
936
+ var _a;
937
+ const iterator = iterable[Symbol.asyncIterator]();
938
+ let done;
939
+ try {
940
+ let value;
941
+ while ({ value, done } = await iterator.next(), !done) {
942
+ if (count <= 0)
943
+ break;
944
+ count--;
945
+ }
946
+ while (!done) {
947
+ yield value;
948
+ ({ value, done } = await iterator.next());
949
+ }
950
+ }
951
+ finally {
952
+ if (!done)
953
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
954
+ }
955
+ });
956
+ }
957
+ dropAsync$1.dropAsync = dropAsync;
958
+
959
+ var dropRightAsync$1 = {};
960
+
961
+ dropRightAsync$1.dropRightAsync = void 0;
962
+ const go_1$a = es2018$1;
963
+ const utils_1$2 = utils;
964
+ const errors_1$c = es2018$3;
965
+ function dropRightAsync(iterable, count) {
966
+ (0, errors_1$c.assert)(Number.isInteger(count), 'The parameter count must be an integer');
967
+ (0, errors_1$c.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
968
+ if (count === 0)
969
+ return (0, utils_1$2.copyAsyncIterable)(iterable);
970
+ return (0, go_1$a.go)(async function* () {
971
+ const arr = await toArrayAsync$2(iterable);
972
+ const result = arr.slice(0, -count);
973
+ for (const value of result) {
974
+ yield value;
975
+ }
976
+ });
977
+ }
978
+ dropRightAsync$1.dropRightAsync = dropRightAsync;
979
+ async function toArrayAsync$2(iterable) {
980
+ const result = [];
981
+ for await (const element of iterable) {
982
+ result.push(element);
983
+ }
984
+ return result;
985
+ }
986
+
987
+ var dropRight$1 = {};
988
+
989
+ dropRight$1.dropRight = void 0;
990
+ const go_1$9 = es2018$1;
991
+ const utils_1$1 = utils;
992
+ const errors_1$b = es2018$3;
993
+ function dropRight(iterable, count) {
994
+ (0, errors_1$b.assert)(Number.isInteger(count), 'The parameter count must be an integer');
995
+ (0, errors_1$b.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
996
+ if (count === 0)
997
+ return (0, utils_1$1.copyIterable)(iterable);
998
+ return (0, go_1$9.go)(function* () {
999
+ const arr = Array.from(iterable);
1000
+ yield* arr.slice(0, -count);
1001
+ });
1002
+ }
1003
+ dropRight$1.dropRight = dropRight;
1004
+
1005
+ var dropUntilAsync$1 = {};
1006
+
1007
+ dropUntilAsync$1.dropUntilAsync = void 0;
1008
+ const types_1$i = es2018$4;
1009
+ function dropUntilAsync(iterable, predicate) {
1010
+ if ((0, types_1$i.isAsyncIterable)(iterable)) {
1011
+ return dropUntilAsyncIterable(iterable);
1012
+ }
1013
+ else {
1014
+ return dropUntilIterable(iterable);
1015
+ }
1016
+ async function* dropUntilAsyncIterable(iterable) {
1017
+ var _a;
1018
+ const iterator = iterable[Symbol.asyncIterator]();
1019
+ let done;
1020
+ try {
1021
+ let index = 0;
1022
+ let value;
1023
+ while ({ value, done } = await iterator.next(), !done) {
1024
+ if (await predicate(value, index++))
1025
+ break;
1026
+ }
1027
+ while (!done) {
1028
+ yield value;
1029
+ ({ value, done } = await iterator.next());
1030
+ }
1031
+ }
1032
+ finally {
1033
+ if (!done)
1034
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
1035
+ }
1036
+ }
1037
+ async function* dropUntilIterable(iterable) {
1038
+ var _a;
1039
+ const iterator = iterable[Symbol.iterator]();
1040
+ let done;
1041
+ try {
1042
+ let index = 0;
1043
+ let value;
1044
+ while ({ value, done } = iterator.next(), !done) {
1045
+ if (await predicate(value, index++))
1046
+ break;
1047
+ }
1048
+ while (!done) {
1049
+ yield value;
1050
+ ({ value, done } = iterator.next());
1051
+ }
1052
+ }
1053
+ finally {
1054
+ if (!done)
1055
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1056
+ }
1057
+ }
1058
+ }
1059
+ dropUntilAsync$1.dropUntilAsync = dropUntilAsync;
1060
+
1061
+ var dropUntil$1 = {};
1062
+
1063
+ dropUntil$1.dropUntil = void 0;
1064
+ function* dropUntil(iterable, predicate) {
1065
+ var _a;
1066
+ const iterator = iterable[Symbol.iterator]();
1067
+ let done;
1068
+ try {
1069
+ let index = 0;
1070
+ let value;
1071
+ while ({ value, done } = iterator.next(), !done) {
1072
+ if (predicate(value, index++))
1073
+ break;
1074
+ }
1075
+ while (!done) {
1076
+ yield value;
1077
+ ({ value, done } = iterator.next());
1078
+ }
1079
+ }
1080
+ finally {
1081
+ if (!done)
1082
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1083
+ }
1084
+ }
1085
+ dropUntil$1.dropUntil = dropUntil;
1086
+
1087
+ var drop$1 = {};
1088
+
1089
+ drop$1.drop = void 0;
1090
+ const go_1$8 = es2018$1;
1091
+ const utils_1 = utils;
1092
+ const errors_1$a = es2018$3;
1093
+ function drop(iterable, count) {
1094
+ (0, errors_1$a.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1095
+ (0, errors_1$a.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1096
+ if (count === 0)
1097
+ return (0, utils_1.copyIterable)(iterable);
1098
+ return (0, go_1$8.go)(function* () {
1099
+ var _a;
1100
+ const iterator = iterable[Symbol.iterator]();
1101
+ let done;
1102
+ try {
1103
+ let value;
1104
+ while ({ value, done } = iterator.next(), !done) {
1105
+ if (count <= 0)
1106
+ break;
1107
+ count--;
1108
+ }
1109
+ while (!done) {
1110
+ yield value;
1111
+ ({ value, done } = iterator.next());
1112
+ }
1113
+ }
1114
+ finally {
1115
+ if (!done)
1116
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1117
+ }
1118
+ });
1119
+ }
1120
+ drop$1.drop = drop;
1121
+
1122
+ var filterAsync$1 = {};
1123
+
1124
+ filterAsync$1.filterAsync = void 0;
1125
+ const types_1$h = es2018$4;
1126
+ function filterAsync(iterable, predicate) {
1127
+ if ((0, types_1$h.isAsyncIterable)(iterable)) {
1128
+ return filterAsyncIterable(iterable);
1129
+ }
1130
+ else {
1131
+ return filterIterable(iterable);
1132
+ }
1133
+ async function* filterAsyncIterable(iterable) {
1134
+ let index = 0;
1135
+ for await (const element of iterable) {
1136
+ if (await predicate(element, index))
1137
+ yield element;
1138
+ index++;
1139
+ }
1140
+ }
1141
+ async function* filterIterable(iterable) {
1142
+ let index = 0;
1143
+ for (const element of iterable) {
1144
+ if (await predicate(element, index))
1145
+ yield element;
1146
+ index++;
1147
+ }
1148
+ }
1149
+ }
1150
+ filterAsync$1.filterAsync = filterAsync;
1151
+
1152
+ var filter$1 = {};
1153
+
1154
+ filter$1.filter = void 0;
1155
+ function* filter(iterable, predicate) {
1156
+ let index = 0;
1157
+ for (const element of iterable) {
1158
+ if (predicate(element, index))
1159
+ yield element;
1160
+ index++;
1161
+ }
1162
+ }
1163
+ filter$1.filter = filter;
1164
+
1165
+ var flattenAsync$1 = {};
1166
+
1167
+ var flattenDeepAsync$1 = {};
1168
+
1169
+ var flattenByAsync$1 = {};
1170
+
1171
+ flattenByAsync$1.flattenByAsync = void 0;
1172
+ const types_1$g = es2018$4;
1173
+ function flattenByAsync(iterable, predicate) {
1174
+ if ((0, types_1$g.isAsyncIterable)(iterable)) {
1175
+ return flattenByAsyncIterable(iterable);
1176
+ }
1177
+ else {
1178
+ return flattenByIterable(iterable);
1179
+ }
1180
+ async function* flattenByAsyncIterable(iterable) {
1181
+ const level = 1;
1182
+ for await (const element of iterable) {
1183
+ if (isFiniteIterable$1(element) && await predicate(element, level)) {
1184
+ yield* flatten(element, level + 1);
1185
+ }
1186
+ else {
1187
+ yield element;
1188
+ }
1189
+ }
1190
+ }
1191
+ function flattenByIterable(iterable) {
1192
+ return flatten(iterable, 1);
1193
+ }
1194
+ async function* flatten(iterable, level) {
1195
+ for (const element of iterable) {
1196
+ if (isFiniteIterable$1(element) && await predicate(element, level)) {
1197
+ yield* flatten(element, level + 1);
1198
+ }
1199
+ else {
1200
+ yield element;
1201
+ }
1202
+ }
1203
+ }
1204
+ }
1205
+ flattenByAsync$1.flattenByAsync = flattenByAsync;
1206
+ function isFiniteIterable$1(val) {
1207
+ return (0, types_1$g.isIterable)(val) && (0, types_1$g.isntChar)(val);
1208
+ }
1209
+
1210
+ flattenDeepAsync$1.flattenDeepAsync = void 0;
1211
+ const flatten_by_async_1 = flattenByAsync$1;
1212
+ const errors_1$9 = es2018$3;
1213
+ function flattenDeepAsync(iterable, depth = Infinity) {
1214
+ (0, errors_1$9.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1215
+ (0, errors_1$9.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
1216
+ return (0, flatten_by_async_1.flattenByAsync)(iterable, (_, level) => level <= depth);
1217
+ }
1218
+ flattenDeepAsync$1.flattenDeepAsync = flattenDeepAsync;
1219
+
1220
+ flattenAsync$1.flattenAsync = void 0;
1221
+ const flatten_deep_async_1 = flattenDeepAsync$1;
1222
+ function flattenAsync(iterable) {
1223
+ return (0, flatten_deep_async_1.flattenDeepAsync)(iterable, 1);
1224
+ }
1225
+ flattenAsync$1.flattenAsync = flattenAsync;
1226
+
1227
+ var flattenBy$1 = {};
1228
+
1229
+ flattenBy$1.flattenBy = void 0;
1230
+ const types_1$f = es2018$4;
1231
+ function flattenBy(iterable, predicate) {
1232
+ return flatten(iterable, 1);
1233
+ function* flatten(iterable, level) {
1234
+ for (const element of iterable) {
1235
+ if (isFiniteIterable(element) && predicate(element, level)) {
1236
+ yield* flatten(element, level + 1);
1237
+ }
1238
+ else {
1239
+ yield element;
1240
+ }
1241
+ }
1242
+ }
1243
+ }
1244
+ flattenBy$1.flattenBy = flattenBy;
1245
+ function isFiniteIterable(val) {
1246
+ return (0, types_1$f.isIterable)(val) && (0, types_1$f.isntChar)(val);
1247
+ }
1248
+
1249
+ var flattenDeep$1 = {};
1250
+
1251
+ flattenDeep$1.flattenDeep = void 0;
1252
+ const flatten_by_1 = flattenBy$1;
1253
+ const errors_1$8 = es2018$3;
1254
+ function flattenDeep(iterable, depth = Infinity) {
1255
+ (0, errors_1$8.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1256
+ (0, errors_1$8.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
1257
+ return (0, flatten_by_1.flattenBy)(iterable, (_, level) => level <= depth);
1258
+ }
1259
+ flattenDeep$1.flattenDeep = flattenDeep;
1260
+
1261
+ var flatten$1 = {};
1262
+
1263
+ flatten$1.flatten = void 0;
1264
+ const flatten_deep_1 = flattenDeep$1;
1265
+ function flatten(iterable) {
1266
+ return (0, flatten_deep_1.flattenDeep)(iterable, 1);
1267
+ }
1268
+ flatten$1.flatten = flatten;
1269
+
1270
+ var mapAsync$1 = {};
1271
+
1272
+ mapAsync$1.mapAsync = void 0;
1273
+ const types_1$e = es2018$4;
1274
+ function mapAsync(iterable, fn) {
1275
+ if ((0, types_1$e.isAsyncIterable)(iterable)) {
1276
+ return mapAsyncIterable(iterable);
1277
+ }
1278
+ else {
1279
+ return mapIterable(iterable);
1280
+ }
1281
+ async function* mapAsyncIterable(iterable) {
1282
+ let index = 0;
1283
+ for await (const element of iterable) {
1284
+ yield await fn(element, index);
1285
+ index++;
1286
+ }
1287
+ }
1288
+ async function* mapIterable(iterable) {
1289
+ let index = 0;
1290
+ for (const element of iterable) {
1291
+ yield await fn(element, index);
1292
+ index++;
1293
+ }
1294
+ }
1295
+ }
1296
+ mapAsync$1.mapAsync = mapAsync;
1297
+
1298
+ var map$1 = {};
1299
+
1300
+ map$1.map = void 0;
1301
+ function* map(iterable, fn) {
1302
+ let index = 0;
1303
+ for (const element of iterable) {
1304
+ yield fn(element, index);
1305
+ index++;
1306
+ }
1307
+ }
1308
+ map$1.map = map;
1309
+
1310
+ var repeatAsync$1 = {};
1311
+
1312
+ repeatAsync$1.repeatAsync = void 0;
1313
+ const go_1$7 = es2018$1;
1314
+ const errors_1$7 = es2018$3;
1315
+ function repeatAsync(iterable, times) {
1316
+ (0, errors_1$7.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1317
+ (0, errors_1$7.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
1318
+ if (times === Infinity)
1319
+ warnInfiniteLoop$1();
1320
+ return (0, go_1$7.go)(async function* () {
1321
+ const cache = [];
1322
+ if (times > 0) {
1323
+ for await (const element of iterable) {
1324
+ yield element;
1325
+ cache.push(element);
1326
+ }
1327
+ times--;
1328
+ }
1329
+ while (times > 0) {
1330
+ yield* cache;
1331
+ times--;
1332
+ }
1333
+ });
1334
+ }
1335
+ repeatAsync$1.repeatAsync = repeatAsync;
1336
+ function warnInfiniteLoop$1() {
1337
+ if (isProduction$1())
1338
+ return;
1339
+ console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
1340
+ }
1341
+ function isProduction$1() {
1342
+ return process.env.NODE_ENV === 'production';
1343
+ }
1344
+
1345
+ var repeat$1 = {};
1346
+
1347
+ repeat$1.repeat = void 0;
1348
+ const go_1$6 = es2018$1;
1349
+ const errors_1$6 = es2018$3;
1350
+ function repeat(iterable, times) {
1351
+ (0, errors_1$6.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1352
+ (0, errors_1$6.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
1353
+ if (times === Infinity)
1354
+ warnInfiniteLoop();
1355
+ return (0, go_1$6.go)(function* () {
1356
+ const cache = [];
1357
+ if (times > 0) {
1358
+ for (const element of iterable) {
1359
+ yield element;
1360
+ cache.push(element);
1361
+ }
1362
+ times--;
1363
+ }
1364
+ while (times > 0) {
1365
+ yield* cache;
1366
+ times--;
1367
+ }
1368
+ });
1369
+ }
1370
+ repeat$1.repeat = repeat;
1371
+ function warnInfiniteLoop() {
1372
+ if (isProduction())
1373
+ return;
1374
+ console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
1375
+ }
1376
+ function isProduction() {
1377
+ return process.env.NODE_ENV === 'production';
1378
+ }
1379
+
1380
+ var sliceAsync$1 = {};
1381
+
1382
+ sliceAsync$1.sliceAsync = void 0;
1383
+ const go_1$5 = es2018$1;
1384
+ const errors_1$5 = es2018$3;
1385
+ function sliceAsync(iterable, start, end = Infinity) {
1386
+ (0, errors_1$5.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1387
+ (0, errors_1$5.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
1388
+ (0, errors_1$5.assert)(Number.isInteger(end), 'The parameter end must be an integer');
1389
+ (0, errors_1$5.assert)(end >= start, 'The parameter end must be greater than or equal to start');
1390
+ return (0, go_1$5.go)(async function* () {
1391
+ let index = 0;
1392
+ for await (const element of iterable) {
1393
+ if (index >= end)
1394
+ break;
1395
+ if (index >= start)
1396
+ yield element;
1397
+ index++;
1398
+ }
1399
+ });
1400
+ }
1401
+ sliceAsync$1.sliceAsync = sliceAsync;
1402
+
1403
+ var slice$1 = {};
1404
+
1405
+ slice$1.slice = void 0;
1406
+ const go_1$4 = es2018$1;
1407
+ const errors_1$4 = es2018$3;
1408
+ function slice(iterable, start, end = Infinity) {
1409
+ (0, errors_1$4.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1410
+ (0, errors_1$4.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
1411
+ (0, errors_1$4.assert)(Number.isInteger(end), 'The parameter end must be an integer');
1412
+ (0, errors_1$4.assert)(end >= start, 'The parameter end must be greater than or equal to start');
1413
+ return (0, go_1$4.go)(function* () {
1414
+ let index = 0;
1415
+ for (const element of iterable) {
1416
+ if (index >= end)
1417
+ break;
1418
+ if (index >= start)
1419
+ yield element;
1420
+ index++;
1421
+ }
1422
+ });
1423
+ }
1424
+ slice$1.slice = slice;
1425
+
1426
+ var splitAsync$1 = {};
1427
+
1428
+ splitAsync$1.splitAsync = void 0;
1429
+ async function* splitAsync(iterable, separator) {
1430
+ let buffer = [];
1431
+ for await (const element of iterable) {
1432
+ if (element === separator) {
1433
+ yield buffer;
1434
+ buffer = [];
1435
+ }
1436
+ else {
1437
+ buffer.push(element);
1438
+ }
1439
+ }
1440
+ yield buffer;
1441
+ }
1442
+ splitAsync$1.splitAsync = splitAsync;
1443
+
1444
+ var splitByAsync$1 = {};
1445
+
1446
+ splitByAsync$1.splitByAsync = void 0;
1447
+ const types_1$d = es2018$4;
1448
+ function splitByAsync(iterable, predicate) {
1449
+ if ((0, types_1$d.isAsyncIterable)(iterable)) {
1450
+ return splitByAsyncIterable(iterable);
1451
+ }
1452
+ else {
1453
+ return splitByIterable(iterable);
1454
+ }
1455
+ async function* splitByIterable(iterable) {
1456
+ let buffer = [];
1457
+ let index = 0;
1458
+ for (const element of iterable) {
1459
+ if (await predicate(element, index)) {
1460
+ yield buffer;
1461
+ buffer = [];
1462
+ }
1463
+ else {
1464
+ buffer.push(element);
1465
+ }
1466
+ index++;
1467
+ }
1468
+ yield buffer;
1469
+ }
1470
+ async function* splitByAsyncIterable(iterable) {
1471
+ let buffer = [];
1472
+ let index = 0;
1473
+ for await (const element of iterable) {
1474
+ if (await predicate(element, index)) {
1475
+ yield buffer;
1476
+ buffer = [];
1477
+ }
1478
+ else {
1479
+ buffer.push(element);
1480
+ }
1481
+ index++;
1482
+ }
1483
+ yield buffer;
1484
+ }
1485
+ }
1486
+ splitByAsync$1.splitByAsync = splitByAsync;
1487
+
1488
+ var splitBy$1 = {};
1489
+
1490
+ splitBy$1.splitBy = void 0;
1491
+ function* splitBy(iterable, predicate) {
1492
+ let buffer = [];
1493
+ let index = 0;
1494
+ for (const element of iterable) {
1495
+ if (predicate(element, index)) {
1496
+ yield buffer;
1497
+ buffer = [];
1498
+ }
1499
+ else {
1500
+ buffer.push(element);
1501
+ }
1502
+ index++;
1503
+ }
1504
+ yield buffer;
1505
+ }
1506
+ splitBy$1.splitBy = splitBy;
1507
+
1508
+ var split$1 = {};
1509
+
1510
+ split$1.split = void 0;
1511
+ function* split(iterable, separator) {
1512
+ let buffer = [];
1513
+ for (const element of iterable) {
1514
+ if (element === separator) {
1515
+ yield buffer;
1516
+ buffer = [];
1517
+ }
1518
+ else {
1519
+ buffer.push(element);
1520
+ }
1521
+ }
1522
+ yield buffer;
1523
+ }
1524
+ split$1.split = split;
1525
+
1526
+ var takeAsync$1 = {};
1527
+
1528
+ takeAsync$1.takeAsync = void 0;
1529
+ const go_1$3 = es2018$1;
1530
+ const errors_1$3 = es2018$3;
1531
+ function takeAsync(iterable, count) {
1532
+ (0, errors_1$3.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1533
+ (0, errors_1$3.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1534
+ return (0, go_1$3.go)(async function* () {
1535
+ if (count === 0)
1536
+ return;
1537
+ for await (const element of iterable) {
1538
+ yield element;
1539
+ count--;
1540
+ if (count === 0)
1541
+ break;
1542
+ }
1543
+ });
1544
+ }
1545
+ takeAsync$1.takeAsync = takeAsync;
1546
+
1547
+ var takeRightAsync$1 = {};
1548
+
1549
+ takeRightAsync$1.takeRightAsync = void 0;
1550
+ const go_1$2 = es2018$1;
1551
+ const errors_1$2 = es2018$3;
1552
+ function takeRightAsync(iterable, count) {
1553
+ (0, errors_1$2.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1554
+ (0, errors_1$2.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1555
+ return (0, go_1$2.go)(async function* () {
1556
+ var _a;
1557
+ const iterator = iterable[Symbol.asyncIterator]();
1558
+ let done;
1559
+ try {
1560
+ const buffer = [];
1561
+ let value;
1562
+ while ({ value, done } = await iterator.next(), !done) {
1563
+ buffer.push(value);
1564
+ if (buffer.length > count)
1565
+ buffer.shift();
1566
+ }
1567
+ yield* buffer;
1568
+ }
1569
+ finally {
1570
+ if (!done)
1571
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
1572
+ }
1573
+ });
1574
+ }
1575
+ takeRightAsync$1.takeRightAsync = takeRightAsync;
1576
+
1577
+ var takeRight$1 = {};
1578
+
1579
+ takeRight$1.takeRight = void 0;
1580
+ const go_1$1 = es2018$1;
1581
+ const errors_1$1 = es2018$3;
1582
+ function takeRight(iterable, count) {
1583
+ (0, errors_1$1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1584
+ (0, errors_1$1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1585
+ return (0, go_1$1.go)(function* () {
1586
+ var _a;
1587
+ const iterator = iterable[Symbol.iterator]();
1588
+ let done;
1589
+ try {
1590
+ const buffer = [];
1591
+ let value;
1592
+ while ({ value, done } = iterator.next(), !done) {
1593
+ buffer.push(value);
1594
+ if (buffer.length > count)
1595
+ buffer.shift();
1596
+ }
1597
+ yield* buffer;
1598
+ }
1599
+ finally {
1600
+ if (!done)
1601
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1602
+ }
1603
+ });
1604
+ }
1605
+ takeRight$1.takeRight = takeRight;
1606
+
1607
+ var takeUntilAsync$1 = {};
1608
+
1609
+ takeUntilAsync$1.takeUntilAsync = void 0;
1610
+ const types_1$c = es2018$4;
1611
+ function takeUntilAsync(iterable, predicate) {
1612
+ if ((0, types_1$c.isAsyncIterable)(iterable)) {
1613
+ return takeUntilAsyncIterable(iterable);
1614
+ }
1615
+ else {
1616
+ return takeUntilIterable(iterable);
1617
+ }
1618
+ async function* takeUntilAsyncIterable(iterable) {
1619
+ let index = 0;
1620
+ for await (const element of iterable) {
1621
+ if (await predicate(element, index))
1622
+ break;
1623
+ yield element;
1624
+ index++;
1625
+ }
1626
+ }
1627
+ async function* takeUntilIterable(iterable) {
1628
+ let index = 0;
1629
+ for (const element of iterable) {
1630
+ if (await predicate(element, index))
1631
+ break;
1632
+ yield element;
1633
+ index++;
1634
+ }
1635
+ }
1636
+ }
1637
+ takeUntilAsync$1.takeUntilAsync = takeUntilAsync;
1638
+
1639
+ var takeUntil$1 = {};
1640
+
1641
+ takeUntil$1.takeUntil = void 0;
1642
+ function* takeUntil(iterable, predicate) {
1643
+ let index = 0;
1644
+ for (const element of iterable) {
1645
+ if (predicate(element, index))
1646
+ break;
1647
+ yield element;
1648
+ index++;
1649
+ }
1650
+ }
1651
+ takeUntil$1.takeUntil = takeUntil;
1652
+
1653
+ var take$1 = {};
1654
+
1655
+ take$1.take = void 0;
1656
+ const go_1 = es2018$1;
1657
+ const errors_1 = es2018$3;
1658
+ function take(iterable, count) {
1659
+ (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1660
+ (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1661
+ return (0, go_1.go)(function* () {
1662
+ if (count === 0)
1663
+ return;
1664
+ for (const element of iterable) {
1665
+ yield element;
1666
+ count--;
1667
+ if (count === 0)
1668
+ break;
1669
+ }
1670
+ });
1671
+ }
1672
+ take$1.take = take;
1673
+
1674
+ var tapAsync$1 = {};
1675
+
1676
+ tapAsync$1.tapAsync = void 0;
1677
+ const types_1$b = es2018$4;
1678
+ function tapAsync(iterable, fn) {
1679
+ if ((0, types_1$b.isAsyncIterable)(iterable)) {
1680
+ return tapAsyncIterable(iterable);
1681
+ }
1682
+ else {
1683
+ return tapIterable(iterable);
1684
+ }
1685
+ async function* tapIterable(iterable) {
1686
+ let index = 0;
1687
+ for (const element of iterable) {
1688
+ await fn(element, index);
1689
+ yield element;
1690
+ index++;
1691
+ }
1692
+ }
1693
+ async function* tapAsyncIterable(iterable) {
1694
+ let index = 0;
1695
+ for await (const element of iterable) {
1696
+ await fn(element, index);
1697
+ yield element;
1698
+ index++;
1699
+ }
1700
+ }
1701
+ }
1702
+ tapAsync$1.tapAsync = tapAsync;
1703
+
1704
+ var tap$1 = {};
1705
+
1706
+ tap$1.tap = void 0;
1707
+ function* tap(iterable, fn) {
1708
+ let index = 0;
1709
+ for (const element of iterable) {
1710
+ fn(element, index);
1711
+ yield element;
1712
+ index++;
1713
+ }
1714
+ }
1715
+ tap$1.tap = tap;
1716
+
1717
+ var toAsyncIterable$1 = {};
1718
+
1719
+ toAsyncIterable$1.toAsyncIterable = void 0;
1720
+ async function* toAsyncIterable(iterable) {
1721
+ for (const value of iterable) {
1722
+ yield value;
1723
+ }
1724
+ }
1725
+ toAsyncIterable$1.toAsyncIterable = toAsyncIterable;
1726
+
1727
+ var transformAsync$1 = {};
1728
+
1729
+ transformAsync$1.transformAsync = void 0;
1730
+ async function* transformAsync(iterable, transformer) {
1731
+ yield* transformer(iterable);
1732
+ }
1733
+ transformAsync$1.transformAsync = transformAsync;
1734
+
1735
+ var transform$1 = {};
1736
+
1737
+ transform$1.transform = void 0;
1738
+ function* transform(iterable, transformer) {
1739
+ yield* transformer(iterable);
1740
+ }
1741
+ transform$1.transform = transform;
1742
+
1743
+ var uniqAsync$1 = {};
1744
+
1745
+ uniqAsync$1.uniqAsync = void 0;
1746
+ async function* uniqAsync(iterable) {
1747
+ const bucket = new Set();
1748
+ for await (const element of iterable) {
1749
+ if (!bucket.has(element)) {
1750
+ yield element;
1751
+ bucket.add(element);
1752
+ }
1753
+ }
1754
+ }
1755
+ uniqAsync$1.uniqAsync = uniqAsync;
1756
+
1757
+ var uniqByAsync$1 = {};
1758
+
1759
+ uniqByAsync$1.uniqByAsync = void 0;
1760
+ const types_1$a = es2018$4;
1761
+ function uniqByAsync(iterable, fn) {
1762
+ if ((0, types_1$a.isAsyncIterable)(iterable)) {
1763
+ return uniqByAsyncIterable(iterable);
1764
+ }
1765
+ else {
1766
+ return uniqByIterable(iterable);
1767
+ }
1768
+ async function* uniqByAsyncIterable(iterable) {
1769
+ const bucket = new Set();
1770
+ let index = 0;
1771
+ for await (const element of iterable) {
1772
+ const result = await fn(element, index);
1773
+ if (!bucket.has(result)) {
1774
+ yield element;
1775
+ bucket.add(result);
1776
+ }
1777
+ index++;
1778
+ }
1779
+ }
1780
+ async function* uniqByIterable(iterable) {
1781
+ const bucket = new Set();
1782
+ let index = 0;
1783
+ for (const element of iterable) {
1784
+ const result = await fn(element, index);
1785
+ if (!bucket.has(result)) {
1786
+ yield element;
1787
+ bucket.add(result);
1788
+ }
1789
+ index++;
1790
+ }
1791
+ }
1792
+ }
1793
+ uniqByAsync$1.uniqByAsync = uniqByAsync;
1794
+
1795
+ var uniqBy$1 = {};
1796
+
1797
+ uniqBy$1.uniqBy = void 0;
1798
+ function* uniqBy(iterable, fn) {
1799
+ const bucket = new Set();
1800
+ let index = 0;
1801
+ for (const element of iterable) {
1802
+ const result = fn(element, index);
1803
+ if (!bucket.has(result)) {
1804
+ yield element;
1805
+ bucket.add(result);
1806
+ }
1807
+ index++;
1808
+ }
1809
+ }
1810
+ uniqBy$1.uniqBy = uniqBy;
1811
+
1812
+ var uniq$1 = {};
1813
+
1814
+ uniq$1.uniq = void 0;
1815
+ function* uniq(iterable) {
1816
+ const bucket = new Set();
1817
+ for (const element of iterable) {
1818
+ if (!bucket.has(element)) {
1819
+ yield element;
1820
+ bucket.add(element);
1821
+ }
1822
+ }
1823
+ }
1824
+ uniq$1.uniq = uniq;
1825
+
1826
+ var zipAsync$1 = {};
1827
+
1828
+ zipAsync$1.zipAsync = void 0;
1829
+ const types_1$9 = es2018$4;
1830
+ var Kind;
1831
+ (function (Kind) {
1832
+ Kind[Kind["Sync"] = 0] = "Sync";
1833
+ Kind[Kind["Async"] = 1] = "Async";
1834
+ })(Kind || (Kind = {}));
1835
+ function zipAsync(iterable, ...otherIterables) {
1836
+ return zipWithSize$1(iterable, ...otherIterables);
1837
+ }
1838
+ zipAsync$1.zipAsync = zipAsync;
1839
+ async function* zipWithSize$1(...iterables) {
1840
+ var _a, _b, _c, _d;
1841
+ const length = iterables.length;
1842
+ const iterators = iterables.map(iterable => {
1843
+ if ((0, types_1$9.isAsyncIterable)(iterable)) {
1844
+ return [Kind.Async, iterable[Symbol.asyncIterator]()];
1845
+ }
1846
+ else {
1847
+ return [Kind.Sync, iterable[Symbol.iterator]()];
1848
+ }
1849
+ });
1850
+ const dones = iterators.map(() => false);
1851
+ try {
1852
+ while (true) {
1853
+ const result = new Array(length);
1854
+ for (let i = 0; i < length; i++) {
1855
+ const [kind, iterator] = iterators[i];
1856
+ let temp;
1857
+ if (kind === Kind.Async) {
1858
+ temp = await iterator.next();
1859
+ }
1860
+ else {
1861
+ temp = iterator.next();
1862
+ }
1863
+ if (temp.done) {
1864
+ dones[i] = true;
1865
+ return;
1866
+ }
1867
+ result[i] = temp.value;
1868
+ }
1869
+ yield result;
1870
+ }
1871
+ }
1872
+ finally {
1873
+ const undoneIterators = iterators.filter((_, i) => !dones[i]);
1874
+ for (const [kind, iterator] of undoneIterators) {
1875
+ if (kind === Kind.Async) {
1876
+ await ((_b = (_a = iterator).return) === null || _b === void 0 ? void 0 : _b.call(_a));
1877
+ }
1878
+ else {
1879
+ (_d = (_c = iterator).return) === null || _d === void 0 ? void 0 : _d.call(_c);
1880
+ }
1881
+ }
1882
+ }
1883
+ }
1884
+
1885
+ var zip$1 = {};
1886
+
1887
+ zip$1.zip = void 0;
1888
+ function zip(iterable, ...otherIterables) {
1889
+ return zipWithSize(iterable, ...otherIterables);
1890
+ }
1891
+ zip$1.zip = zip;
1892
+ function* zipWithSize(...iterables) {
1893
+ const length = iterables.length;
1894
+ const iterators = iterables.map(iterable => iterable[Symbol.iterator]());
1895
+ const dones = iterators.map(() => false);
1896
+ try {
1897
+ while (true) {
1898
+ const result = new Array(length);
1899
+ for (let i = 0; i < length; i++) {
1900
+ const { value, done } = iterators[i].next();
1901
+ if (done) {
1902
+ dones[i] = true;
1903
+ return;
1904
+ }
1905
+ result[i] = value;
1906
+ }
1907
+ yield result;
1908
+ }
1909
+ }
1910
+ finally {
1911
+ const undoneIterators = iterators.filter((_, i) => !dones[i]);
1912
+ undoneIterators.forEach(x => { var _a; return (_a = x.return) === null || _a === void 0 ? void 0 : _a.call(x); });
1913
+ }
1914
+ }
1915
+
1916
+ (function (exports) {
1917
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1918
+ if (k2 === undefined) k2 = k;
1919
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1920
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1921
+ desc = { enumerable: true, get: function() { return m[k]; } };
1922
+ }
1923
+ Object.defineProperty(o, k2, desc);
1924
+ }) : (function(o, m, k, k2) {
1925
+ if (k2 === undefined) k2 = k;
1926
+ o[k2] = m[k];
1927
+ }));
1928
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
1929
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1930
+ };__exportStar(chunkAsync$1, exports);
1931
+ __exportStar(chunkByAsync$1, exports);
1932
+ __exportStar(chunkBy$1, exports);
1933
+ __exportStar(chunk$1, exports);
1934
+ __exportStar(concatAsync$1, exports);
1935
+ __exportStar(concat$1, exports);
1936
+ __exportStar(dropAsync$1, exports);
1937
+ __exportStar(dropRightAsync$1, exports);
1938
+ __exportStar(dropRight$1, exports);
1939
+ __exportStar(dropUntilAsync$1, exports);
1940
+ __exportStar(dropUntil$1, exports);
1941
+ __exportStar(drop$1, exports);
1942
+ __exportStar(filterAsync$1, exports);
1943
+ __exportStar(filter$1, exports);
1944
+ __exportStar(flattenAsync$1, exports);
1945
+ __exportStar(flattenByAsync$1, exports);
1946
+ __exportStar(flattenBy$1, exports);
1947
+ __exportStar(flattenDeepAsync$1, exports);
1948
+ __exportStar(flattenDeep$1, exports);
1949
+ __exportStar(flatten$1, exports);
1950
+ __exportStar(mapAsync$1, exports);
1951
+ __exportStar(map$1, exports);
1952
+ __exportStar(repeatAsync$1, exports);
1953
+ __exportStar(repeat$1, exports);
1954
+ __exportStar(sliceAsync$1, exports);
1955
+ __exportStar(slice$1, exports);
1956
+ __exportStar(splitAsync$1, exports);
1957
+ __exportStar(splitByAsync$1, exports);
1958
+ __exportStar(splitBy$1, exports);
1959
+ __exportStar(split$1, exports);
1960
+ __exportStar(takeAsync$1, exports);
1961
+ __exportStar(takeRightAsync$1, exports);
1962
+ __exportStar(takeRight$1, exports);
1963
+ __exportStar(takeUntilAsync$1, exports);
1964
+ __exportStar(takeUntil$1, exports);
1965
+ __exportStar(take$1, exports);
1966
+ __exportStar(tapAsync$1, exports);
1967
+ __exportStar(tap$1, exports);
1968
+ __exportStar(toAsyncIterable$1, exports);
1969
+ __exportStar(transformAsync$1, exports);
1970
+ __exportStar(transform$1, exports);
1971
+ __exportStar(uniqAsync$1, exports);
1972
+ __exportStar(uniqByAsync$1, exports);
1973
+ __exportStar(uniqBy$1, exports);
1974
+ __exportStar(uniq$1, exports);
1975
+ __exportStar(zipAsync$1, exports);
1976
+ __exportStar(zip$1, exports);
1977
+
1978
+ }(middleware));
1979
+
1980
+ var output = {};
1981
+
1982
+ var consume$1 = {};
1983
+
1984
+ consume$1.consume = void 0;
1985
+ function consume(iterable, consumer) {
1986
+ return consumer(iterable);
1987
+ }
1988
+ consume$1.consume = consume;
1989
+
1990
+ var eachAsync$1 = {};
1991
+
1992
+ eachAsync$1.eachAsync = void 0;
1993
+ const types_1$8 = es2018$4;
1994
+ function eachAsync(iterable, fn) {
1995
+ if ((0, types_1$8.isAsyncIterable)(iterable)) {
1996
+ return eachAsyncIterable(iterable);
1997
+ }
1998
+ else {
1999
+ return eachIterable(iterable);
2000
+ }
2001
+ async function eachAsyncIterable(iterable) {
2002
+ let index = 0;
2003
+ for await (const element of iterable) {
2004
+ await fn(element, index);
2005
+ index++;
2006
+ }
2007
+ }
2008
+ async function eachIterable(iterable) {
2009
+ let index = 0;
2010
+ for (const element of iterable) {
2011
+ await fn(element, index);
2012
+ index++;
2013
+ }
2014
+ }
2015
+ }
2016
+ eachAsync$1.eachAsync = eachAsync;
2017
+
2018
+ var each$1 = {};
2019
+
2020
+ each$1.each = void 0;
2021
+ function each(iterable, fn) {
2022
+ let index = 0;
2023
+ for (const element of iterable) {
2024
+ fn(element, index);
2025
+ index++;
2026
+ }
2027
+ }
2028
+ each$1.each = each;
2029
+
2030
+ var everyAsync$1 = {};
2031
+
2032
+ everyAsync$1.everyAsync = void 0;
2033
+ const types_1$7 = es2018$4;
2034
+ function everyAsync(iterable, predicate) {
2035
+ if ((0, types_1$7.isAsyncIterable)(iterable)) {
2036
+ return everyAsyncIterable(iterable);
2037
+ }
2038
+ else {
2039
+ return everyIterable(iterable);
2040
+ }
2041
+ async function everyIterable(iterable) {
2042
+ let index = 0;
2043
+ for (const element of iterable) {
2044
+ if (!await predicate(element, index))
2045
+ return false;
2046
+ index++;
2047
+ }
2048
+ return true;
2049
+ }
2050
+ async function everyAsyncIterable(iterable) {
2051
+ let index = 0;
2052
+ for await (const element of iterable) {
2053
+ if (!await predicate(element, index))
2054
+ return false;
2055
+ index++;
2056
+ }
2057
+ return true;
2058
+ }
2059
+ }
2060
+ everyAsync$1.everyAsync = everyAsync;
2061
+
2062
+ var every$1 = {};
2063
+
2064
+ every$1.every = void 0;
2065
+ function every(iterable, predicate) {
2066
+ let index = 0;
2067
+ for (const element of iterable) {
2068
+ if (!predicate(element, index))
2069
+ return false;
2070
+ index++;
2071
+ }
2072
+ return true;
2073
+ }
2074
+ every$1.every = every;
2075
+
2076
+ var findAsync$1 = {};
2077
+
2078
+ findAsync$1.findAsync = void 0;
2079
+ const types_1$6 = es2018$4;
2080
+ function findAsync(iterable, predicate) {
2081
+ if ((0, types_1$6.isAsyncIterable)(iterable)) {
2082
+ return findAsyncIterable(iterable);
2083
+ }
2084
+ else {
2085
+ return findIterable(iterable);
2086
+ }
2087
+ async function findIterable(iterable) {
2088
+ let index = 0;
2089
+ for (const element of iterable) {
2090
+ if (await predicate(element, index))
2091
+ return element;
2092
+ index++;
2093
+ }
2094
+ return undefined;
2095
+ }
2096
+ async function findAsyncIterable(iterable) {
2097
+ let index = 0;
2098
+ for await (const element of iterable) {
2099
+ if (await predicate(element, index))
2100
+ return element;
2101
+ index++;
2102
+ }
2103
+ return undefined;
2104
+ }
2105
+ }
2106
+ findAsync$1.findAsync = findAsync;
2107
+
2108
+ var find$1 = {};
2109
+
2110
+ find$1.find = void 0;
2111
+ function find(iterable, predicate) {
2112
+ let index = 0;
2113
+ for (const element of iterable) {
2114
+ if (predicate(element, index))
2115
+ return element;
2116
+ index++;
2117
+ }
2118
+ return undefined;
2119
+ }
2120
+ find$1.find = find;
2121
+
2122
+ var firstAsync$1 = {};
2123
+
2124
+ firstAsync$1.firstAsync = void 0;
2125
+ async function firstAsync(iterable) {
2126
+ for await (const element of iterable) {
2127
+ return element;
2128
+ }
2129
+ return undefined;
2130
+ }
2131
+ firstAsync$1.firstAsync = firstAsync;
2132
+
2133
+ var first$1 = {};
2134
+
2135
+ first$1.first = void 0;
2136
+ function first(iterable) {
2137
+ for (const element of iterable) {
2138
+ return element;
2139
+ }
2140
+ return undefined;
2141
+ }
2142
+ first$1.first = first;
2143
+
2144
+ var includesAsync$1 = {};
2145
+
2146
+ includesAsync$1.includesAsync = void 0;
2147
+ async function includesAsync(iterable, value) {
2148
+ for await (const element of iterable) {
2149
+ if (element === value)
2150
+ return true;
2151
+ }
2152
+ return false;
2153
+ }
2154
+ includesAsync$1.includesAsync = includesAsync;
2155
+
2156
+ var includes$1 = {};
2157
+
2158
+ includes$1.includes = void 0;
2159
+ function includes(iterable, value) {
2160
+ for (const element of iterable) {
2161
+ if (element === value)
2162
+ return true;
2163
+ }
2164
+ return false;
2165
+ }
2166
+ includes$1.includes = includes;
2167
+
2168
+ var matchAsync$1 = {};
2169
+
2170
+ matchAsync$1.matchAsync = void 0;
2171
+ async function matchAsync(iterable, sequence) {
2172
+ const sequenceLength = sequence.length;
2173
+ let matchCount = 0;
2174
+ for await (const element of iterable) {
2175
+ if (element === sequence[matchCount])
2176
+ matchCount++;
2177
+ if (matchCount === sequenceLength)
2178
+ return true;
2179
+ }
2180
+ return false;
2181
+ }
2182
+ matchAsync$1.matchAsync = matchAsync;
2183
+
2184
+ var match$1 = {};
2185
+
2186
+ match$1.match = void 0;
2187
+ function match(iterable, sequence) {
2188
+ const sequenceLength = sequence.length;
2189
+ let matchCount = 0;
2190
+ for (const element of iterable) {
2191
+ if (element === sequence[matchCount])
2192
+ matchCount++;
2193
+ if (matchCount === sequenceLength)
2194
+ return true;
2195
+ }
2196
+ return false;
2197
+ }
2198
+ match$1.match = match;
2199
+
2200
+ var reduceAsync$1 = {};
2201
+
2202
+ reduceAsync$1.reduceAsync = void 0;
2203
+ const types_1$5 = es2018$4;
2204
+ function reduceAsync(iterable, fn, initialValue) {
2205
+ if ((0, types_1$5.isUndefined)(initialValue)) {
2206
+ return reduceAsyncWithoutInitialValue(iterable, fn);
2207
+ }
2208
+ else {
2209
+ return reduceAsyncWithInitialValue(iterable, fn, initialValue);
2210
+ }
2211
+ }
2212
+ reduceAsync$1.reduceAsync = reduceAsync;
2213
+ function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
2214
+ if ((0, types_1$5.isAsyncIterable)(iterable)) {
2215
+ return reduceAsyncIterable(iterable);
2216
+ }
2217
+ else {
2218
+ return reduceIterable(iterable);
2219
+ }
2220
+ async function reduceIterable(iterable) {
2221
+ let result = initialValue, index = 0;
2222
+ for (const currentValue of iterable) {
2223
+ result = await fn(result, currentValue, index++);
2224
+ }
2225
+ return result;
2226
+ }
2227
+ async function reduceAsyncIterable(iterable) {
2228
+ let result = initialValue, index = 0;
2229
+ for await (const currentValue of iterable) {
2230
+ result = await fn(result, currentValue, index++);
2231
+ }
2232
+ return result;
2233
+ }
2234
+ }
2235
+ function reduceAsyncWithoutInitialValue(iterable, fn) {
2236
+ if ((0, types_1$5.isAsyncIterable)(iterable)) {
2237
+ return reduceAsyncIterable(iterable);
2238
+ }
2239
+ else {
2240
+ return reduceIterable(iterable);
2241
+ }
2242
+ async function reduceAsyncIterable(iterable) {
2243
+ var _a;
2244
+ const iterator = iterable[Symbol.asyncIterator]();
2245
+ let done;
2246
+ try {
2247
+ let result = await readInitialValue(iterator);
2248
+ let index = 1;
2249
+ let value;
2250
+ while ({ value, done } = await iterator.next(), !done) {
2251
+ result = await fn(result, value, index++);
2252
+ }
2253
+ return result;
2254
+ }
2255
+ finally {
2256
+ if (!done)
2257
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
2258
+ }
2259
+ async function readInitialValue(iterator) {
2260
+ const result = await iterator.next();
2261
+ if (result.done) {
2262
+ done = true;
2263
+ throw new Error('Reduce of empty iterable with no initial value');
2264
+ }
2265
+ return result.value;
2266
+ }
2267
+ }
2268
+ async function reduceIterable(iterable) {
2269
+ var _a;
2270
+ const iterator = iterable[Symbol.iterator]();
2271
+ let done;
2272
+ try {
2273
+ let result = readInitialValue(iterator);
2274
+ let index = 1;
2275
+ let value;
2276
+ while ({ value, done } = iterator.next(), !done) {
2277
+ result = await fn(result, value, index++);
2278
+ }
2279
+ return result;
2280
+ }
2281
+ finally {
2282
+ if (!done)
2283
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
2284
+ }
2285
+ function readInitialValue(iterator) {
2286
+ const result = iterator.next();
2287
+ if (result.done) {
2288
+ done = true;
2289
+ throw new Error('Reduce of empty iterable with no initial value');
2290
+ }
2291
+ return result.value;
2292
+ }
2293
+ }
2294
+ }
2295
+
2296
+ var reduce$1 = {};
2297
+
2298
+ reduce$1.reduce = void 0;
2299
+ const types_1$4 = es2018$4;
2300
+ function reduce(iterable, fn, initialValue) {
2301
+ if ((0, types_1$4.isUndefined)(initialValue)) {
2302
+ return reduceWithoutInitialValue(iterable, fn);
2303
+ }
2304
+ else {
2305
+ return reduceWithInitialValue(iterable, fn, initialValue);
2306
+ }
2307
+ }
2308
+ reduce$1.reduce = reduce;
2309
+ function reduceWithInitialValue(iterable, fn, initialValue) {
2310
+ let result = initialValue, index = 0;
2311
+ for (const currentValue of iterable) {
2312
+ result = fn(result, currentValue, index++);
2313
+ }
2314
+ return result;
2315
+ }
2316
+ function reduceWithoutInitialValue(iterable, fn) {
2317
+ var _a;
2318
+ const iterator = iterable[Symbol.iterator]();
2319
+ let done;
2320
+ try {
2321
+ let result = readInitialValue(iterator);
2322
+ let index = 1;
2323
+ let value;
2324
+ while ({ value, done } = iterator.next(), !done) {
2325
+ result = fn(result, value, index++);
2326
+ }
2327
+ return result;
2328
+ }
2329
+ finally {
2330
+ if (!done)
2331
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
2332
+ }
2333
+ function readInitialValue(iterator) {
2334
+ const result = iterator.next();
2335
+ if (result.done) {
2336
+ done = true;
2337
+ throw new Error('Reduce of empty iterable with no initial value');
2338
+ }
2339
+ return result.value;
2340
+ }
2341
+ }
2342
+
2343
+ var someAsync$1 = {};
2344
+
2345
+ someAsync$1.someAsync = void 0;
2346
+ const types_1$3 = es2018$4;
2347
+ function someAsync(iterable, predicate) {
2348
+ if ((0, types_1$3.isAsyncIterable)(iterable)) {
2349
+ return someAsyncIterable(iterable);
2350
+ }
2351
+ else {
2352
+ return someIterable(iterable);
2353
+ }
2354
+ async function someIterable(iterable) {
2355
+ let index = 0;
2356
+ for (const element of iterable) {
2357
+ if (await predicate(element, index))
2358
+ return true;
2359
+ index++;
2360
+ }
2361
+ return false;
2362
+ }
2363
+ async function someAsyncIterable(iterable) {
2364
+ let index = 0;
2365
+ for await (const element of iterable) {
2366
+ if (await predicate(element, index))
2367
+ return true;
2368
+ index++;
2369
+ }
2370
+ return false;
2371
+ }
2372
+ }
2373
+ someAsync$1.someAsync = someAsync;
2374
+
2375
+ var some$1 = {};
2376
+
2377
+ some$1.some = void 0;
2378
+ function some(iterable, predicate) {
2379
+ let index = 0;
2380
+ for (const element of iterable) {
2381
+ if (predicate(element, index))
2382
+ return true;
2383
+ index++;
2384
+ }
2385
+ return false;
2386
+ }
2387
+ some$1.some = some;
2388
+
2389
+ var lastAsync$1 = {};
2390
+
2391
+ lastAsync$1.lastAsync = void 0;
2392
+ async function lastAsync(iterable) {
2393
+ var _a;
2394
+ const iterator = iterable[Symbol.asyncIterator]();
2395
+ let done;
2396
+ try {
2397
+ let value;
2398
+ let result;
2399
+ while ({ value, done } = await iterator.next(), !done) {
2400
+ result = value;
2401
+ }
2402
+ return result;
2403
+ }
2404
+ finally {
2405
+ if (!done)
2406
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
2407
+ }
2408
+ }
2409
+ lastAsync$1.lastAsync = lastAsync;
2410
+
2411
+ var last$1 = {};
2412
+
2413
+ last$1.last = void 0;
2414
+ function last(iterable) {
2415
+ var _a;
2416
+ const iterator = iterable[Symbol.iterator]();
2417
+ let done;
2418
+ try {
2419
+ let value;
2420
+ let result;
2421
+ while ({ value, done } = iterator.next(), !done) {
2422
+ result = value;
2423
+ }
2424
+ return result;
2425
+ }
2426
+ finally {
2427
+ if (!done)
2428
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
2429
+ }
2430
+ }
2431
+ last$1.last = last;
2432
+
2433
+ var toArrayAsync$1 = {};
2434
+
2435
+ toArrayAsync$1.toArrayAsync = void 0;
2436
+ const consume_1$3 = consume$1;
2437
+ function toArrayAsync(iterable) {
2438
+ return (0, consume_1$3.consume)(iterable, async (iterable) => {
2439
+ const result = [];
2440
+ for await (const element of iterable) {
2441
+ result.push(element);
2442
+ }
2443
+ return result;
2444
+ });
2445
+ }
2446
+ toArrayAsync$1.toArrayAsync = toArrayAsync;
2447
+
2448
+ var toArray$1 = {};
2449
+
2450
+ toArray$1.toArray = void 0;
2451
+ const consume_1$2 = consume$1;
2452
+ function toArray(iterable) {
2453
+ return (0, consume_1$2.consume)(iterable, iterable => Array.from(iterable));
2454
+ }
2455
+ toArray$1.toArray = toArray;
2456
+
2457
+ var toSetAsync$1 = {};
2458
+
2459
+ toSetAsync$1.toSetAsync = void 0;
2460
+ const consume_1$1 = consume$1;
2461
+ function toSetAsync(iterable) {
2462
+ return (0, consume_1$1.consume)(iterable, async (iterable) => {
2463
+ const result = new Set();
2464
+ for await (const element of iterable) {
2465
+ result.add(element);
2466
+ }
2467
+ return result;
2468
+ });
2469
+ }
2470
+ toSetAsync$1.toSetAsync = toSetAsync;
2471
+
2472
+ var toSet$1 = {};
2473
+
2474
+ toSet$1.toSet = void 0;
2475
+ const consume_1 = consume$1;
2476
+ function toSet(iterable) {
2477
+ return (0, consume_1.consume)(iterable, iterable => new Set(iterable));
2478
+ }
2479
+ toSet$1.toSet = toSet;
2480
+
2481
+ (function (exports) {
2482
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2483
+ if (k2 === undefined) k2 = k;
2484
+ var desc = Object.getOwnPropertyDescriptor(m, k);
2485
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2486
+ desc = { enumerable: true, get: function() { return m[k]; } };
2487
+ }
2488
+ Object.defineProperty(o, k2, desc);
2489
+ }) : (function(o, m, k, k2) {
2490
+ if (k2 === undefined) k2 = k;
2491
+ o[k2] = m[k];
2492
+ }));
2493
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2494
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2495
+ };__exportStar(consume$1, exports);
2496
+ __exportStar(eachAsync$1, exports);
2497
+ __exportStar(each$1, exports);
2498
+ __exportStar(everyAsync$1, exports);
2499
+ __exportStar(every$1, exports);
2500
+ __exportStar(findAsync$1, exports);
2501
+ __exportStar(find$1, exports);
2502
+ __exportStar(firstAsync$1, exports);
2503
+ __exportStar(first$1, exports);
2504
+ __exportStar(includesAsync$1, exports);
2505
+ __exportStar(includes$1, exports);
2506
+ __exportStar(matchAsync$1, exports);
2507
+ __exportStar(match$1, exports);
2508
+ __exportStar(reduceAsync$1, exports);
2509
+ __exportStar(reduce$1, exports);
2510
+ __exportStar(someAsync$1, exports);
2511
+ __exportStar(some$1, exports);
2512
+ __exportStar(lastAsync$1, exports);
2513
+ __exportStar(last$1, exports);
2514
+ __exportStar(toArrayAsync$1, exports);
2515
+ __exportStar(toArray$1, exports);
2516
+ __exportStar(toSetAsync$1, exports);
2517
+ __exportStar(toSet$1, exports);
2518
+
2519
+ }(output));
2520
+
2521
+ (function (exports) {
2522
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2523
+ if (k2 === undefined) k2 = k;
2524
+ var desc = Object.getOwnPropertyDescriptor(m, k);
2525
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2526
+ desc = { enumerable: true, get: function() { return m[k]; } };
2527
+ }
2528
+ Object.defineProperty(o, k2, desc);
2529
+ }) : (function(o, m, k, k2) {
2530
+ if (k2 === undefined) k2 = k;
2531
+ o[k2] = m[k];
2532
+ }));
2533
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2534
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2535
+ };__exportStar(middleware, exports);
2536
+ __exportStar(output, exports);
2537
+
2538
+ }(es2018$2));
2539
+
2540
+ var getErrorNames$1 = {};
2541
+
2542
+ var traverseErrorPrototypeChain$1 = {};
2543
+
2544
+ traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = void 0;
2545
+ function* traverseErrorPrototypeChain(err) {
2546
+ let current = err;
2547
+ while ((current = Object.getPrototypeOf(current))) {
2548
+ yield current;
2549
+ if (current === Error.prototype)
2550
+ break;
2551
+ }
2552
+ }
2553
+ traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = traverseErrorPrototypeChain;
2554
+
2555
+ getErrorNames$1.getErrorNames = void 0;
2556
+ const types_1$2 = es2018$4;
2557
+ const traverse_error_prototype_chain_1 = traverseErrorPrototypeChain$1;
2558
+ function* getErrorNames(err) {
2559
+ var _a;
2560
+ if ((0, types_1$2.isError)(err)) {
2561
+ for (const prototype of (0, traverse_error_prototype_chain_1.traverseErrorPrototypeChain)(err)) {
2562
+ if ((_a = prototype.constructor) === null || _a === void 0 ? void 0 : _a.name) {
2563
+ yield prototype.constructor.name;
2564
+ }
2565
+ }
2566
+ }
2567
+ else {
2568
+ yield err.name;
2569
+ yield* err.ancestors;
2570
+ }
2571
+ }
2572
+ getErrorNames$1.getErrorNames = getErrorNames;
2573
+
2574
+ var serializableError = {};
2575
+
2576
+ serializableError.isSerializableError = void 0;
2577
+ const types_1$1 = es2018$4;
2578
+ function isSerializableError(val) {
2579
+ return (0, types_1$1.isObject)(val)
2580
+ && (0, types_1$1.isString)(val.name)
2581
+ && (0, types_1$1.isString)(val.message)
2582
+ && ((0, types_1$1.isString)(val.stack) || (0, types_1$1.isNull)(val.stack))
2583
+ && ((0, types_1$1.isArray)(val.ancestors) && val.ancestors.every(types_1$1.isString));
2584
+ }
2585
+ serializableError.isSerializableError = isSerializableError;
2586
+
2587
+ customError.CustomError = void 0;
2588
+ const iterable_operator_1$1 = es2018$2;
2589
+ const get_error_names_1$1 = getErrorNames$1;
2590
+ const types_1 = es2018$4;
2591
+ const serializable_error_1 = serializableError;
2592
+ class CustomError extends Error {
2593
+ get name() {
2594
+ var _a, _b;
2595
+ return (_b = (_a = (0, iterable_operator_1$1.first)((0, get_error_names_1$1.getErrorNames)(this))) !== null && _a !== void 0 ? _a : CustomError.name) !== null && _b !== void 0 ? _b : 'CustomError';
2596
+ }
2597
+ static [Symbol.hasInstance](instance) {
2598
+ var _a;
2599
+ if ((0, types_1.isError)(instance) || (0, serializable_error_1.isSerializableError)(instance)) {
2600
+ const reversedClassNames = [
2601
+ (_a = this.prototype.constructor.name) !== null && _a !== void 0 ? _a : this.name,
2602
+ ...(0, get_error_names_1$1.getErrorNames)(this.prototype)
2603
+ ].reverse();
2604
+ const reversedInstanceNames = (0, iterable_operator_1$1.toArray)((0, get_error_names_1$1.getErrorNames)(instance)).reverse();
2605
+ return reversedClassNames.every((x, i) => x === reversedInstanceNames[i]);
2606
+ }
2607
+ else {
2608
+ return false;
2609
+ }
2610
+ }
2611
+ }
2612
+ customError.CustomError = CustomError;
2613
+
2614
+ var assertionError = {};
2615
+
2616
+ assertionError.AssertionError = void 0;
2617
+ const custom_error_1 = customError;
2618
+ class AssertionError extends custom_error_1.CustomError {
2619
+ }
2620
+ assertionError.AssertionError = AssertionError;
2621
+
2622
+ var normalize$1 = {};
2623
+
2624
+ normalize$1.normalize = void 0;
2625
+ const get_error_names_1 = getErrorNames$1;
2626
+ const iterable_operator_1 = es2018$2;
2627
+ function normalize(err) {
2628
+ var _a;
2629
+ const [name, ...ancestors] = (0, iterable_operator_1.toArray)((0, get_error_names_1.getErrorNames)(err));
2630
+ return {
2631
+ name,
2632
+ ancestors,
2633
+ message: err.message,
2634
+ stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
2635
+ };
2636
+ }
2637
+ normalize$1.normalize = normalize;
2638
+
2639
+ var hydrate$1 = {};
2640
+
2641
+ var es2018 = {};
2642
+
2643
+ var pass$1 = {};
2644
+
2645
+ pass$1.pass = void 0;
2646
+ function pass() { }
2647
+ pass$1.pass = pass;
2648
+
2649
+ (function (exports) {
2650
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2651
+ if (k2 === undefined) k2 = k;
2652
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2653
+ }) : (function(o, m, k, k2) {
2654
+ if (k2 === undefined) k2 = k;
2655
+ o[k2] = m[k];
2656
+ }));
2657
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2658
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2659
+ };__exportStar(pass$1, exports);
2660
+
2661
+ }(es2018));
2662
+
2663
+ hydrate$1.hydrate = void 0;
2664
+ const pass_1 = es2018;
2665
+ function hydrate(err) {
2666
+ var _a;
2667
+ const errorNames = [err.name, ...err.ancestors]
2668
+ .slice(0, -1)
2669
+ .reverse();
2670
+ let errorConstructor = Error;
2671
+ for (const name of errorNames) {
2672
+ errorConstructor = createChildErrorConstructor(errorConstructor, name);
2673
+ }
2674
+ const result = new errorConstructor();
2675
+ result.name = err.name;
2676
+ result.message = err.message;
2677
+ result.stack = (_a = err.stack) !== null && _a !== void 0 ? _a : undefined;
2678
+ return result;
2679
+ }
2680
+ hydrate$1.hydrate = hydrate;
2681
+ function createChildErrorConstructor(parentErrorConstructor, name) {
2682
+ const constructor = function () { (0, pass_1.pass)(); };
2683
+ constructor.prototype = Object.create(parentErrorConstructor.prototype);
2684
+ constructor.prototype.constructor = constructor;
2685
+ Object.defineProperty(constructor, 'name', { value: name });
2686
+ return constructor;
2687
+ }
2688
+
2689
+ var assert$1 = {};
2690
+
2691
+ assert$1.assert = void 0;
2692
+ const assertion_error_1 = assertionError;
2693
+ function assert(condition, message) {
2694
+ if (!condition)
2695
+ throw new assertion_error_1.AssertionError(message);
2696
+ }
2697
+ assert$1.assert = assert;
2698
+
2699
+ (function (exports) {
2700
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2701
+ if (k2 === undefined) k2 = k;
2702
+ var desc = Object.getOwnPropertyDescriptor(m, k);
2703
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2704
+ desc = { enumerable: true, get: function() { return m[k]; } };
2705
+ }
2706
+ Object.defineProperty(o, k2, desc);
2707
+ }) : (function(o, m, k, k2) {
2708
+ if (k2 === undefined) k2 = k;
2709
+ o[k2] = m[k];
2710
+ }));
2711
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2712
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2713
+ };__exportStar(customError, exports);
2714
+ __exportStar(assertionError, exports);
2715
+ __exportStar(serializableError, exports);
2716
+ __exportStar(normalize$1, exports);
2717
+ __exportStar(hydrate$1, exports);
2718
+ __exportStar(assert$1, exports);
2719
+ __exportStar(getErrorNames$1, exports);
2720
+ __exportStar(traverseErrorPrototypeChain$1, exports);
2721
+
2722
+ }(es2018$3));
726
2723
 
727
2724
  function csv(payload) {
728
- es2018.assert(payload.length > 0, 'payload must be a non-empty array');
2725
+ es2018$3.assert(payload.length > 0, 'payload must be a non-empty array');
729
2726
  return (options) => {
730
- const headers = new es2018$2.Headers(options.headers);
2727
+ const headers = new es2018$5.Headers(options.headers);
731
2728
  headers.set('Content-Type', 'text/csv');
732
2729
  return Object.assign(Object.assign({}, options), { headers, payload: stringify(payload) });
733
2730
  };
@@ -745,7 +2742,7 @@
745
2742
 
746
2743
  function header(name, value) {
747
2744
  return (options) => {
748
- const headers = new es2018$2.Headers(options.headers);
2745
+ const headers = new es2018$5.Headers(options.headers);
749
2746
  headers.set(name, value);
750
2747
  return Object.assign(Object.assign({}, options), { headers });
751
2748
  };
@@ -753,7 +2750,7 @@
753
2750
 
754
2751
  function appendHeader(name, value) {
755
2752
  return (options) => {
756
- const headers = new es2018$2.Headers(options.headers);
2753
+ const headers = new es2018$5.Headers(options.headers);
757
2754
  headers.append(name, value);
758
2755
  return Object.assign(Object.assign({}, options), { headers });
759
2756
  };
@@ -761,7 +2758,7 @@
761
2758
 
762
2759
  function headers(headers) {
763
2760
  return (options) => {
764
- const newHeaders = new es2018$2.Headers(options.headers);
2761
+ const newHeaders = new es2018$5.Headers(options.headers);
765
2762
  for (const [name, value] of Object.entries(headers)) {
766
2763
  newHeaders.set(name, value);
767
2764
  }
@@ -839,10 +2836,10 @@
839
2836
 
840
2837
  function formDataField(name, value) {
841
2838
  return (options) => {
842
- const formData = options.payload instanceof es2018$2.FormData
2839
+ const formData = options.payload instanceof es2018$5.FormData
843
2840
  ? cloneFormData(options.payload)
844
- : new es2018$2.FormData();
845
- if (es2018$1.isArray(value)) {
2841
+ : new es2018$5.FormData();
2842
+ if (es2018$4.isArray(value)) {
846
2843
  value.forEach(x => formData.append(name, x));
847
2844
  }
848
2845
  else {
@@ -852,7 +2849,7 @@
852
2849
  };
853
2850
  }
854
2851
  function cloneFormData(formData) {
855
- const result = new es2018$2.FormData();
2852
+ const result = new es2018$5.FormData();
856
2853
  for (const [name, value] of formData.entries()) {
857
2854
  result.append(name, value);
858
2855
  }