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