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