extra-react-hooks 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -30
- package/dist/es2015/index.min.mjs +3 -3
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +1987 -1937
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +1988 -1936
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +1 -1
- 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 +1987 -1937
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +1988 -1936
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +1 -1
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/index.d.ts +2 -0
- package/lib/es2015/index.js +2 -0
- package/lib/es2015/index.js.map +1 -1
- package/lib/es2015/types.d.ts +3 -0
- package/lib/es2015/types.js +3 -0
- package/lib/es2015/types.js.map +1 -0
- package/lib/es2015/use-finite-state-machine.js +1 -1
- package/lib/es2015/use-finite-state-machine.js.map +1 -1
- package/lib/es2015/use-force-update.js +4 -1
- package/lib/es2015/use-force-update.js.map +1 -1
- package/lib/es2015/use-iife.d.ts +2 -0
- package/lib/es2015/use-iife.js +25 -0
- package/lib/es2015/use-iife.js.map +1 -0
- package/lib/es2015/use-increment.js +1 -1
- package/lib/es2015/use-increment.js.map +1 -1
- package/lib/es2015/use-is-first-render.js +4 -1
- package/lib/es2015/use-is-first-render.js.map +1 -1
- package/lib/es2015/use-is-mounted.js +7 -4
- package/lib/es2015/use-is-mounted.js.map +1 -1
- package/lib/es2015/use-multiple-selection.d.ts +8 -12
- package/lib/es2015/use-multiple-selection.js +45 -29
- package/lib/es2015/use-multiple-selection.js.map +1 -1
- package/lib/es2015/use-single-selection.d.ts +6 -13
- package/lib/es2015/use-single-selection.js +18 -15
- package/lib/es2015/use-single-selection.js.map +1 -1
- package/lib/es2015/use-state-cycle.d.ts +2 -1
- package/lib/es2015/use-state-cycle.js +3 -3
- package/lib/es2015/use-state-cycle.js.map +1 -1
- package/lib/es2015/use-step.d.ts +2 -1
- package/lib/es2015/use-step.js +1 -1
- package/lib/es2015/use-step.js.map +1 -1
- package/lib/es2015/use-toggle.d.ts +1 -4
- package/lib/es2015/use-toggle.js +1 -1
- package/lib/es2015/use-toggle.js.map +1 -1
- package/lib/es2015/use-unmount.d.ts +1 -0
- package/lib/es2015/use-unmount.js +9 -0
- package/lib/es2015/use-unmount.js.map +1 -0
- package/lib/es2018/index.d.ts +2 -0
- package/lib/es2018/index.js +2 -0
- package/lib/es2018/index.js.map +1 -1
- package/lib/es2018/types.d.ts +3 -0
- package/lib/es2018/types.js +3 -0
- package/lib/es2018/types.js.map +1 -0
- package/lib/es2018/use-finite-state-machine.js +1 -1
- package/lib/es2018/use-finite-state-machine.js.map +1 -1
- package/lib/es2018/use-force-update.js +4 -1
- package/lib/es2018/use-force-update.js.map +1 -1
- package/lib/es2018/use-iife.d.ts +2 -0
- package/lib/es2018/use-iife.js +25 -0
- package/lib/es2018/use-iife.js.map +1 -0
- package/lib/es2018/use-increment.js +1 -1
- package/lib/es2018/use-increment.js.map +1 -1
- package/lib/es2018/use-is-first-render.js +4 -1
- package/lib/es2018/use-is-first-render.js.map +1 -1
- package/lib/es2018/use-is-mounted.js +7 -4
- package/lib/es2018/use-is-mounted.js.map +1 -1
- package/lib/es2018/use-multiple-selection.d.ts +8 -12
- package/lib/es2018/use-multiple-selection.js +45 -29
- package/lib/es2018/use-multiple-selection.js.map +1 -1
- package/lib/es2018/use-single-selection.d.ts +6 -13
- package/lib/es2018/use-single-selection.js +18 -15
- package/lib/es2018/use-single-selection.js.map +1 -1
- package/lib/es2018/use-state-cycle.d.ts +2 -1
- package/lib/es2018/use-state-cycle.js +3 -3
- package/lib/es2018/use-state-cycle.js.map +1 -1
- package/lib/es2018/use-step.d.ts +2 -1
- package/lib/es2018/use-step.js +1 -1
- package/lib/es2018/use-step.js.map +1 -1
- package/lib/es2018/use-toggle.d.ts +1 -4
- package/lib/es2018/use-toggle.js +1 -1
- package/lib/es2018/use-toggle.js.map +1 -1
- package/lib/es2018/use-unmount.d.ts +1 -0
- package/lib/es2018/use-unmount.js +9 -0
- package/lib/es2018/use-unmount.js.map +1 -0
- package/package.json +2 -1
package/dist/es2018/index.umd.js
CHANGED
|
@@ -2491,7 +2491,7 @@
|
|
|
2491
2491
|
|
|
2492
2492
|
function useIncrement(initialValue) {
|
|
2493
2493
|
const [value, setValue] = react.exports.useState(initialValue);
|
|
2494
|
-
return [value, increment, reset];
|
|
2494
|
+
return [value, react.exports.useCallback(increment, []), react.exports.useCallback(reset, [])];
|
|
2495
2495
|
function increment(step = 1) {
|
|
2496
2496
|
setValue(value => value + step);
|
|
2497
2497
|
}
|
|
@@ -2505,14 +2505,17 @@
|
|
|
2505
2505
|
}
|
|
2506
2506
|
|
|
2507
2507
|
function useIsMounted() {
|
|
2508
|
-
const
|
|
2508
|
+
const mounted = react.exports.useRef(false);
|
|
2509
2509
|
useMount(() => {
|
|
2510
|
-
|
|
2510
|
+
mounted.current = true;
|
|
2511
2511
|
return () => {
|
|
2512
|
-
|
|
2512
|
+
mounted.current = false;
|
|
2513
2513
|
};
|
|
2514
2514
|
});
|
|
2515
|
-
return ()
|
|
2515
|
+
return react.exports.useCallback(isMounted, []);
|
|
2516
|
+
function isMounted() {
|
|
2517
|
+
return mounted.current;
|
|
2518
|
+
}
|
|
2516
2519
|
}
|
|
2517
2520
|
|
|
2518
2521
|
var State;
|
|
@@ -2532,7 +2535,10 @@
|
|
|
2532
2535
|
break;
|
|
2533
2536
|
case State.NotFirst: break;
|
|
2534
2537
|
}
|
|
2535
|
-
return ()
|
|
2538
|
+
return react.exports.useCallback(isFirstRender, []);
|
|
2539
|
+
function isFirstRender() {
|
|
2540
|
+
return state.current === State.First;
|
|
2541
|
+
}
|
|
2536
2542
|
}
|
|
2537
2543
|
|
|
2538
2544
|
function useRenderCounter() {
|
|
@@ -2541,6 +2547,10 @@
|
|
|
2541
2547
|
return counter.current;
|
|
2542
2548
|
}
|
|
2543
2549
|
|
|
2550
|
+
function useUnmount(effect) {
|
|
2551
|
+
react.exports.useEffect(() => effect, []);
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2544
2554
|
function useUpdateEffect(effect, deps) {
|
|
2545
2555
|
const isFirstRender = useIsFirstRender();
|
|
2546
2556
|
react.exports.useEffect(() => {
|
|
@@ -2552,6 +2562,71 @@
|
|
|
2552
2562
|
|
|
2553
2563
|
var es2018$9 = {};
|
|
2554
2564
|
|
|
2565
|
+
var customError = {};
|
|
2566
|
+
|
|
2567
|
+
var es2018$8 = {};
|
|
2568
|
+
|
|
2569
|
+
var middleware = {};
|
|
2570
|
+
|
|
2571
|
+
var chunkAsync = {};
|
|
2572
|
+
|
|
2573
|
+
var es2018$7 = {};
|
|
2574
|
+
|
|
2575
|
+
var go$1 = {};
|
|
2576
|
+
|
|
2577
|
+
go$1.go = void 0;
|
|
2578
|
+
function go(fn) {
|
|
2579
|
+
return fn();
|
|
2580
|
+
}
|
|
2581
|
+
go$1.go = go;
|
|
2582
|
+
|
|
2583
|
+
(function (exports) {
|
|
2584
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2585
|
+
if (k2 === undefined) k2 = k;
|
|
2586
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
2587
|
+
}) : (function(o, m, k, k2) {
|
|
2588
|
+
if (k2 === undefined) k2 = k;
|
|
2589
|
+
o[k2] = m[k];
|
|
2590
|
+
}));
|
|
2591
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
2592
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2593
|
+
};__exportStar(go$1, exports);
|
|
2594
|
+
|
|
2595
|
+
} (es2018$7));
|
|
2596
|
+
|
|
2597
|
+
var hasRequiredChunkAsync;
|
|
2598
|
+
|
|
2599
|
+
function requireChunkAsync () {
|
|
2600
|
+
if (hasRequiredChunkAsync) return chunkAsync;
|
|
2601
|
+
hasRequiredChunkAsync = 1;
|
|
2602
|
+
chunkAsync.chunkAsync = void 0;
|
|
2603
|
+
const go_1 = es2018$7;
|
|
2604
|
+
const errors_1 = requireEs2018();
|
|
2605
|
+
function chunkAsync$1(iterable, size) {
|
|
2606
|
+
(0, errors_1.assert)(Number.isInteger(size), 'The parameter size must be an integer');
|
|
2607
|
+
(0, errors_1.assert)(size > 0, 'The parameter size must be greater than 0');
|
|
2608
|
+
return (0, go_1.go)(async function* () {
|
|
2609
|
+
let buffer = [];
|
|
2610
|
+
for await (const element of iterable) {
|
|
2611
|
+
buffer.push(element);
|
|
2612
|
+
if (buffer.length >= size) {
|
|
2613
|
+
yield buffer;
|
|
2614
|
+
buffer = [];
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
if (buffer.length)
|
|
2618
|
+
yield buffer;
|
|
2619
|
+
});
|
|
2620
|
+
}
|
|
2621
|
+
chunkAsync.chunkAsync = chunkAsync$1;
|
|
2622
|
+
|
|
2623
|
+
return chunkAsync;
|
|
2624
|
+
}
|
|
2625
|
+
|
|
2626
|
+
var chunkByAsync$1 = {};
|
|
2627
|
+
|
|
2628
|
+
var es2018$6 = {};
|
|
2629
|
+
|
|
2555
2630
|
var array$2 = {};
|
|
2556
2631
|
|
|
2557
2632
|
array$2.isntEmptyArray = array$2.isEmptyArray = array$2.isntArray = array$2.isArray = void 0;
|
|
@@ -3115,18 +3190,6 @@
|
|
|
3115
3190
|
}
|
|
3116
3191
|
url$2.isAbsoluteURL = isAbsoluteURL$2;
|
|
3117
3192
|
|
|
3118
|
-
var regexp = {};
|
|
3119
|
-
|
|
3120
|
-
regexp.isntRegExp = regexp.isRegExp = void 0;
|
|
3121
|
-
function isRegExp(val) {
|
|
3122
|
-
return val instanceof RegExp;
|
|
3123
|
-
}
|
|
3124
|
-
regexp.isRegExp = isRegExp;
|
|
3125
|
-
function isntRegExp(val) {
|
|
3126
|
-
return !isRegExp(val);
|
|
3127
|
-
}
|
|
3128
|
-
regexp.isntRegExp = isntRegExp;
|
|
3129
|
-
|
|
3130
3193
|
(function (exports) {
|
|
3131
3194
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3132
3195
|
if (k2 === undefined) k2 = k;
|
|
@@ -3160,58 +3223,84 @@
|
|
|
3160
3223
|
__exportStar(string$2, exports);
|
|
3161
3224
|
__exportStar(_undefined$2, exports);
|
|
3162
3225
|
__exportStar(url$2, exports);
|
|
3163
|
-
__exportStar(regexp, exports);
|
|
3164
3226
|
|
|
3165
|
-
} (es2018$
|
|
3166
|
-
|
|
3167
|
-
var es2018$8 = {};
|
|
3168
|
-
|
|
3169
|
-
var customError = {};
|
|
3170
|
-
|
|
3171
|
-
var es2018$7 = {};
|
|
3172
|
-
|
|
3173
|
-
var middleware = {};
|
|
3174
|
-
|
|
3175
|
-
var chunkAsync = {};
|
|
3227
|
+
} (es2018$6));
|
|
3176
3228
|
|
|
3177
|
-
|
|
3229
|
+
chunkByAsync$1.chunkByAsync = void 0;
|
|
3230
|
+
const types_1$j = es2018$6;
|
|
3231
|
+
function chunkByAsync(iterable, predicate) {
|
|
3232
|
+
if ((0, types_1$j.isAsyncIterable)(iterable)) {
|
|
3233
|
+
return chunkByAsyncIterable(iterable);
|
|
3234
|
+
}
|
|
3235
|
+
else {
|
|
3236
|
+
return chunkByIterable(iterable);
|
|
3237
|
+
}
|
|
3238
|
+
async function* chunkByAsyncIterable(iterable) {
|
|
3239
|
+
let buffer = [];
|
|
3240
|
+
let index = 0;
|
|
3241
|
+
for await (const element of iterable) {
|
|
3242
|
+
buffer.push(element);
|
|
3243
|
+
if (await predicate(element, index)) {
|
|
3244
|
+
yield buffer;
|
|
3245
|
+
buffer = [];
|
|
3246
|
+
}
|
|
3247
|
+
index++;
|
|
3248
|
+
}
|
|
3249
|
+
if (buffer.length)
|
|
3250
|
+
yield buffer;
|
|
3251
|
+
}
|
|
3252
|
+
async function* chunkByIterable(iterable) {
|
|
3253
|
+
let buffer = [];
|
|
3254
|
+
let index = 0;
|
|
3255
|
+
for (const element of iterable) {
|
|
3256
|
+
buffer.push(element);
|
|
3257
|
+
if (await predicate(element, index)) {
|
|
3258
|
+
yield buffer;
|
|
3259
|
+
buffer = [];
|
|
3260
|
+
}
|
|
3261
|
+
index++;
|
|
3262
|
+
}
|
|
3263
|
+
if (buffer.length)
|
|
3264
|
+
yield buffer;
|
|
3265
|
+
}
|
|
3266
|
+
}
|
|
3267
|
+
chunkByAsync$1.chunkByAsync = chunkByAsync;
|
|
3178
3268
|
|
|
3179
|
-
var
|
|
3269
|
+
var chunkBy$1 = {};
|
|
3180
3270
|
|
|
3181
|
-
|
|
3182
|
-
function
|
|
3183
|
-
|
|
3271
|
+
chunkBy$1.chunkBy = void 0;
|
|
3272
|
+
function* chunkBy(iterable, predicate) {
|
|
3273
|
+
let buffer = [];
|
|
3274
|
+
let index = 0;
|
|
3275
|
+
for (const element of iterable) {
|
|
3276
|
+
buffer.push(element);
|
|
3277
|
+
if (predicate(element, index)) {
|
|
3278
|
+
yield buffer;
|
|
3279
|
+
buffer = [];
|
|
3280
|
+
}
|
|
3281
|
+
index++;
|
|
3282
|
+
}
|
|
3283
|
+
if (buffer.length)
|
|
3284
|
+
yield buffer;
|
|
3184
3285
|
}
|
|
3185
|
-
|
|
3286
|
+
chunkBy$1.chunkBy = chunkBy;
|
|
3186
3287
|
|
|
3187
|
-
|
|
3188
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3189
|
-
if (k2 === undefined) k2 = k;
|
|
3190
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
3191
|
-
}) : (function(o, m, k, k2) {
|
|
3192
|
-
if (k2 === undefined) k2 = k;
|
|
3193
|
-
o[k2] = m[k];
|
|
3194
|
-
}));
|
|
3195
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
3196
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
3197
|
-
};__exportStar(go$1, exports);
|
|
3198
|
-
|
|
3199
|
-
} (es2018$6));
|
|
3288
|
+
var chunk = {};
|
|
3200
3289
|
|
|
3201
|
-
var
|
|
3290
|
+
var hasRequiredChunk;
|
|
3202
3291
|
|
|
3203
|
-
function
|
|
3204
|
-
if (
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
const go_1 = es2018$
|
|
3292
|
+
function requireChunk () {
|
|
3293
|
+
if (hasRequiredChunk) return chunk;
|
|
3294
|
+
hasRequiredChunk = 1;
|
|
3295
|
+
chunk.chunk = void 0;
|
|
3296
|
+
const go_1 = es2018$7;
|
|
3208
3297
|
const errors_1 = requireEs2018();
|
|
3209
|
-
function
|
|
3298
|
+
function chunk$1(iterable, size) {
|
|
3210
3299
|
(0, errors_1.assert)(Number.isInteger(size), 'The parameter size must be an integer');
|
|
3211
3300
|
(0, errors_1.assert)(size > 0, 'The parameter size must be greater than 0');
|
|
3212
|
-
return (0, go_1.go)(
|
|
3301
|
+
return (0, go_1.go)(function* () {
|
|
3213
3302
|
let buffer = [];
|
|
3214
|
-
for
|
|
3303
|
+
for (const element of iterable) {
|
|
3215
3304
|
buffer.push(element);
|
|
3216
3305
|
if (buffer.length >= size) {
|
|
3217
3306
|
yield buffer;
|
|
@@ -3222,733 +3311,854 @@
|
|
|
3222
3311
|
yield buffer;
|
|
3223
3312
|
});
|
|
3224
3313
|
}
|
|
3225
|
-
|
|
3314
|
+
chunk.chunk = chunk$1;
|
|
3226
3315
|
|
|
3227
|
-
return
|
|
3316
|
+
return chunk;
|
|
3228
3317
|
}
|
|
3229
3318
|
|
|
3230
|
-
var
|
|
3319
|
+
var concatAsync$1 = {};
|
|
3231
3320
|
|
|
3232
|
-
|
|
3321
|
+
concatAsync$1.concatAsync = void 0;
|
|
3322
|
+
const types_1$i = es2018$6;
|
|
3323
|
+
const go_1$1 = es2018$7;
|
|
3324
|
+
function concatAsync(iterable, ...otherIterables) {
|
|
3325
|
+
return (0, go_1$1.go)(async function* () {
|
|
3326
|
+
for (const iter of [iterable, ...otherIterables]) {
|
|
3327
|
+
if ((0, types_1$i.isAsyncIterable)(iter)) {
|
|
3328
|
+
for await (const element of iter) {
|
|
3329
|
+
yield element;
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
else {
|
|
3333
|
+
for (const element of iter) {
|
|
3334
|
+
yield element;
|
|
3335
|
+
}
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3338
|
+
});
|
|
3339
|
+
}
|
|
3340
|
+
concatAsync$1.concatAsync = concatAsync;
|
|
3233
3341
|
|
|
3234
|
-
var
|
|
3342
|
+
var concat$5 = {};
|
|
3235
3343
|
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
array$1.isntArray = isntArray$1;
|
|
3245
|
-
function isEmptyArray$1(val) {
|
|
3246
|
-
return val.length === 0;
|
|
3247
|
-
}
|
|
3248
|
-
array$1.isEmptyArray = isEmptyArray$1;
|
|
3249
|
-
function isntEmptyArray$1(val) {
|
|
3250
|
-
return val.length !== 0;
|
|
3344
|
+
concat$5.concat = void 0;
|
|
3345
|
+
const go_1 = es2018$7;
|
|
3346
|
+
function concat$4(iterable, ...otherIterables) {
|
|
3347
|
+
return (0, go_1.go)(function* () {
|
|
3348
|
+
for (const iter of [iterable, ...otherIterables]) {
|
|
3349
|
+
yield* iter;
|
|
3350
|
+
}
|
|
3351
|
+
});
|
|
3251
3352
|
}
|
|
3252
|
-
|
|
3353
|
+
concat$5.concat = concat$4;
|
|
3253
3354
|
|
|
3254
|
-
var
|
|
3355
|
+
var dropAsync = {};
|
|
3255
3356
|
|
|
3256
|
-
var
|
|
3357
|
+
var utils = {};
|
|
3257
3358
|
|
|
3258
|
-
|
|
3259
|
-
function
|
|
3260
|
-
|
|
3359
|
+
utils.copyIterable = utils.copyAsyncIterable = void 0;
|
|
3360
|
+
async function* copyAsyncIterable(iterable) {
|
|
3361
|
+
for await (const element of iterable) {
|
|
3362
|
+
yield element;
|
|
3363
|
+
}
|
|
3261
3364
|
}
|
|
3262
|
-
|
|
3263
|
-
function
|
|
3264
|
-
|
|
3365
|
+
utils.copyAsyncIterable = copyAsyncIterable;
|
|
3366
|
+
function* copyIterable(iterable) {
|
|
3367
|
+
for (const element of iterable) {
|
|
3368
|
+
yield element;
|
|
3369
|
+
}
|
|
3265
3370
|
}
|
|
3266
|
-
|
|
3371
|
+
utils.copyIterable = copyIterable;
|
|
3267
3372
|
|
|
3268
|
-
var
|
|
3373
|
+
var hasRequiredDropAsync;
|
|
3269
3374
|
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3375
|
+
function requireDropAsync () {
|
|
3376
|
+
if (hasRequiredDropAsync) return dropAsync;
|
|
3377
|
+
hasRequiredDropAsync = 1;
|
|
3378
|
+
dropAsync.dropAsync = void 0;
|
|
3379
|
+
const go_1 = es2018$7;
|
|
3380
|
+
const utils_1 = utils;
|
|
3381
|
+
const errors_1 = requireEs2018();
|
|
3382
|
+
function dropAsync$1(iterable, count) {
|
|
3383
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
3384
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
3385
|
+
if (count === 0)
|
|
3386
|
+
return (0, utils_1.copyAsyncIterable)(iterable);
|
|
3387
|
+
return (0, go_1.go)(async function* () {
|
|
3388
|
+
var _a;
|
|
3389
|
+
const iterator = iterable[Symbol.asyncIterator]();
|
|
3390
|
+
let done;
|
|
3391
|
+
try {
|
|
3392
|
+
let value;
|
|
3393
|
+
while ({ value, done } = await iterator.next(), !done) {
|
|
3394
|
+
if (count <= 0)
|
|
3395
|
+
break;
|
|
3396
|
+
count--;
|
|
3397
|
+
}
|
|
3398
|
+
while (!done) {
|
|
3399
|
+
yield value;
|
|
3400
|
+
({ value, done } = await iterator.next());
|
|
3401
|
+
}
|
|
3402
|
+
}
|
|
3403
|
+
finally {
|
|
3404
|
+
if (!done)
|
|
3405
|
+
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
3406
|
+
}
|
|
3407
|
+
});
|
|
3408
|
+
}
|
|
3409
|
+
dropAsync.dropAsync = dropAsync$1;
|
|
3410
|
+
|
|
3411
|
+
return dropAsync;
|
|
3277
3412
|
}
|
|
3278
|
-
_undefined$1.isntUndefined = isntUndefined$1;
|
|
3279
3413
|
|
|
3280
|
-
var
|
|
3414
|
+
var dropRightAsync = {};
|
|
3281
3415
|
|
|
3282
|
-
|
|
3283
|
-
function isFunction$3(val) {
|
|
3284
|
-
return typeof val === 'function';
|
|
3285
|
-
}
|
|
3286
|
-
_function$1.isFunction = isFunction$3;
|
|
3287
|
-
function isntFunction$1(val) {
|
|
3288
|
-
return !isFunction$3(val);
|
|
3289
|
-
}
|
|
3290
|
-
_function$1.isntFunction = isntFunction$1;
|
|
3416
|
+
var hasRequiredDropRightAsync;
|
|
3291
3417
|
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3418
|
+
function requireDropRightAsync () {
|
|
3419
|
+
if (hasRequiredDropRightAsync) return dropRightAsync;
|
|
3420
|
+
hasRequiredDropRightAsync = 1;
|
|
3421
|
+
dropRightAsync.dropRightAsync = void 0;
|
|
3422
|
+
const go_1 = es2018$7;
|
|
3423
|
+
const utils_1 = utils;
|
|
3424
|
+
const errors_1 = requireEs2018();
|
|
3425
|
+
function dropRightAsync$1(iterable, count) {
|
|
3426
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
3427
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
3428
|
+
if (count === 0)
|
|
3429
|
+
return (0, utils_1.copyAsyncIterable)(iterable);
|
|
3430
|
+
return (0, go_1.go)(async function* () {
|
|
3431
|
+
const arr = await toArrayAsync(iterable);
|
|
3432
|
+
const result = arr.slice(0, -count);
|
|
3433
|
+
for (const value of result) {
|
|
3434
|
+
yield value;
|
|
3435
|
+
}
|
|
3436
|
+
});
|
|
3437
|
+
}
|
|
3438
|
+
dropRightAsync.dropRightAsync = dropRightAsync$1;
|
|
3439
|
+
async function toArrayAsync(iterable) {
|
|
3440
|
+
const result = [];
|
|
3441
|
+
for await (const element of iterable) {
|
|
3442
|
+
result.push(element);
|
|
3443
|
+
}
|
|
3444
|
+
return result;
|
|
3445
|
+
}
|
|
3446
|
+
|
|
3447
|
+
return dropRightAsync;
|
|
3304
3448
|
}
|
|
3305
|
-
asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
|
|
3306
3449
|
|
|
3307
|
-
var
|
|
3308
|
-
|
|
3309
|
-
bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
|
|
3310
|
-
function isBigInt$1(val) {
|
|
3311
|
-
return typeof val === 'bigint';
|
|
3312
|
-
}
|
|
3313
|
-
bigint$1.isBigInt = isBigInt$1;
|
|
3314
|
-
function isntBigInt$1(val) {
|
|
3315
|
-
return !isBigInt$1(val);
|
|
3316
|
-
}
|
|
3317
|
-
bigint$1.isntBigInt = isntBigInt$1;
|
|
3450
|
+
var dropRight = {};
|
|
3318
3451
|
|
|
3319
|
-
var
|
|
3452
|
+
var hasRequiredDropRight;
|
|
3320
3453
|
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3454
|
+
function requireDropRight () {
|
|
3455
|
+
if (hasRequiredDropRight) return dropRight;
|
|
3456
|
+
hasRequiredDropRight = 1;
|
|
3457
|
+
dropRight.dropRight = void 0;
|
|
3458
|
+
const go_1 = es2018$7;
|
|
3459
|
+
const utils_1 = utils;
|
|
3460
|
+
const errors_1 = requireEs2018();
|
|
3461
|
+
function dropRight$1(iterable, count) {
|
|
3462
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
3463
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
3464
|
+
if (count === 0)
|
|
3465
|
+
return (0, utils_1.copyIterable)(iterable);
|
|
3466
|
+
return (0, go_1.go)(function* () {
|
|
3467
|
+
const arr = Array.from(iterable);
|
|
3468
|
+
yield* arr.slice(0, -count);
|
|
3469
|
+
});
|
|
3470
|
+
}
|
|
3471
|
+
dropRight.dropRight = dropRight$1;
|
|
3472
|
+
|
|
3473
|
+
return dropRight;
|
|
3328
3474
|
}
|
|
3329
|
-
boolean$1.isntBoolean = isntBoolean$1;
|
|
3330
|
-
|
|
3331
|
-
var char$1 = {};
|
|
3332
|
-
|
|
3333
|
-
var string$1 = {};
|
|
3334
3475
|
|
|
3335
|
-
|
|
3336
|
-
function isString$1(val) {
|
|
3337
|
-
return typeof val === 'string';
|
|
3338
|
-
}
|
|
3339
|
-
string$1.isString = isString$1;
|
|
3340
|
-
function isntString$1(val) {
|
|
3341
|
-
return !isString$1(val);
|
|
3342
|
-
}
|
|
3343
|
-
string$1.isntString = isntString$1;
|
|
3476
|
+
var dropUntilAsync$1 = {};
|
|
3344
3477
|
|
|
3345
|
-
|
|
3346
|
-
const
|
|
3347
|
-
function
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3478
|
+
dropUntilAsync$1.dropUntilAsync = void 0;
|
|
3479
|
+
const types_1$h = es2018$6;
|
|
3480
|
+
function dropUntilAsync(iterable, predicate) {
|
|
3481
|
+
if ((0, types_1$h.isAsyncIterable)(iterable)) {
|
|
3482
|
+
return dropUntilAsyncIterable(iterable);
|
|
3483
|
+
}
|
|
3484
|
+
else {
|
|
3485
|
+
return dropUntilIterable(iterable);
|
|
3486
|
+
}
|
|
3487
|
+
async function* dropUntilAsyncIterable(iterable) {
|
|
3488
|
+
var _a;
|
|
3489
|
+
const iterator = iterable[Symbol.asyncIterator]();
|
|
3490
|
+
let done;
|
|
3491
|
+
try {
|
|
3492
|
+
let index = 0;
|
|
3493
|
+
let value;
|
|
3494
|
+
while ({ value, done } = await iterator.next(), !done) {
|
|
3495
|
+
if (await predicate(value, index++))
|
|
3496
|
+
break;
|
|
3497
|
+
}
|
|
3498
|
+
while (!done) {
|
|
3499
|
+
yield value;
|
|
3500
|
+
({ value, done } = await iterator.next());
|
|
3501
|
+
}
|
|
3502
|
+
}
|
|
3503
|
+
finally {
|
|
3504
|
+
if (!done)
|
|
3505
|
+
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
3506
|
+
}
|
|
3507
|
+
}
|
|
3508
|
+
async function* dropUntilIterable(iterable) {
|
|
3509
|
+
var _a;
|
|
3510
|
+
const iterator = iterable[Symbol.iterator]();
|
|
3511
|
+
let done;
|
|
3512
|
+
try {
|
|
3513
|
+
let index = 0;
|
|
3514
|
+
let value;
|
|
3515
|
+
while ({ value, done } = iterator.next(), !done) {
|
|
3516
|
+
if (await predicate(value, index++))
|
|
3517
|
+
break;
|
|
3518
|
+
}
|
|
3519
|
+
while (!done) {
|
|
3520
|
+
yield value;
|
|
3521
|
+
({ value, done } = iterator.next());
|
|
3522
|
+
}
|
|
3523
|
+
}
|
|
3524
|
+
finally {
|
|
3525
|
+
if (!done)
|
|
3526
|
+
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
3527
|
+
}
|
|
3528
|
+
}
|
|
3354
3529
|
}
|
|
3355
|
-
|
|
3530
|
+
dropUntilAsync$1.dropUntilAsync = dropUntilAsync;
|
|
3356
3531
|
|
|
3357
|
-
var
|
|
3532
|
+
var dropUntil$1 = {};
|
|
3358
3533
|
|
|
3359
|
-
|
|
3360
|
-
function
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3534
|
+
dropUntil$1.dropUntil = void 0;
|
|
3535
|
+
function* dropUntil(iterable, predicate) {
|
|
3536
|
+
var _a;
|
|
3537
|
+
const iterator = iterable[Symbol.iterator]();
|
|
3538
|
+
let done;
|
|
3539
|
+
try {
|
|
3540
|
+
let index = 0;
|
|
3541
|
+
let value;
|
|
3542
|
+
while ({ value, done } = iterator.next(), !done) {
|
|
3543
|
+
if (predicate(value, index++))
|
|
3544
|
+
break;
|
|
3545
|
+
}
|
|
3546
|
+
while (!done) {
|
|
3547
|
+
yield value;
|
|
3548
|
+
({ value, done } = iterator.next());
|
|
3549
|
+
}
|
|
3550
|
+
}
|
|
3551
|
+
finally {
|
|
3552
|
+
if (!done)
|
|
3553
|
+
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
3554
|
+
}
|
|
3366
3555
|
}
|
|
3367
|
-
|
|
3556
|
+
dropUntil$1.dropUntil = dropUntil;
|
|
3368
3557
|
|
|
3369
|
-
var
|
|
3558
|
+
var drop = {};
|
|
3370
3559
|
|
|
3371
|
-
|
|
3372
|
-
function inEnum$1(val, _enum) {
|
|
3373
|
-
return Object.values(_enum).includes(val);
|
|
3374
|
-
}
|
|
3375
|
-
_enum$1.inEnum = inEnum$1;
|
|
3560
|
+
var hasRequiredDrop;
|
|
3376
3561
|
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3562
|
+
function requireDrop () {
|
|
3563
|
+
if (hasRequiredDrop) return drop;
|
|
3564
|
+
hasRequiredDrop = 1;
|
|
3565
|
+
drop.drop = void 0;
|
|
3566
|
+
const go_1 = es2018$7;
|
|
3567
|
+
const utils_1 = utils;
|
|
3568
|
+
const errors_1 = requireEs2018();
|
|
3569
|
+
function drop$1(iterable, count) {
|
|
3570
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
3571
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
3572
|
+
if (count === 0)
|
|
3573
|
+
return (0, utils_1.copyIterable)(iterable);
|
|
3574
|
+
return (0, go_1.go)(function* () {
|
|
3575
|
+
var _a;
|
|
3576
|
+
const iterator = iterable[Symbol.iterator]();
|
|
3577
|
+
let done;
|
|
3578
|
+
try {
|
|
3579
|
+
let value;
|
|
3580
|
+
while ({ value, done } = iterator.next(), !done) {
|
|
3581
|
+
if (count <= 0)
|
|
3582
|
+
break;
|
|
3583
|
+
count--;
|
|
3584
|
+
}
|
|
3585
|
+
while (!done) {
|
|
3586
|
+
yield value;
|
|
3587
|
+
({ value, done } = iterator.next());
|
|
3588
|
+
}
|
|
3589
|
+
}
|
|
3590
|
+
finally {
|
|
3591
|
+
if (!done)
|
|
3592
|
+
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
3593
|
+
}
|
|
3594
|
+
});
|
|
3595
|
+
}
|
|
3596
|
+
drop.drop = drop$1;
|
|
3597
|
+
|
|
3598
|
+
return drop;
|
|
3386
3599
|
}
|
|
3387
|
-
error$1.isntError = isntError$1;
|
|
3388
3600
|
|
|
3389
|
-
var
|
|
3601
|
+
var filterAsync$1 = {};
|
|
3390
3602
|
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3603
|
+
filterAsync$1.filterAsync = void 0;
|
|
3604
|
+
const types_1$g = es2018$6;
|
|
3605
|
+
function filterAsync(iterable, predicate) {
|
|
3606
|
+
if ((0, types_1$g.isAsyncIterable)(iterable)) {
|
|
3607
|
+
return filterAsyncIterable(iterable);
|
|
3608
|
+
}
|
|
3609
|
+
else {
|
|
3610
|
+
return filterIterable(iterable);
|
|
3611
|
+
}
|
|
3612
|
+
async function* filterAsyncIterable(iterable) {
|
|
3613
|
+
let index = 0;
|
|
3614
|
+
for await (const element of iterable) {
|
|
3615
|
+
if (await predicate(element, index))
|
|
3616
|
+
yield element;
|
|
3617
|
+
index++;
|
|
3618
|
+
}
|
|
3619
|
+
}
|
|
3620
|
+
async function* filterIterable(iterable) {
|
|
3621
|
+
let index = 0;
|
|
3622
|
+
for (const element of iterable) {
|
|
3623
|
+
if (await predicate(element, index))
|
|
3624
|
+
yield element;
|
|
3625
|
+
index++;
|
|
3626
|
+
}
|
|
3627
|
+
}
|
|
3398
3628
|
}
|
|
3399
|
-
|
|
3629
|
+
filterAsync$1.filterAsync = filterAsync;
|
|
3400
3630
|
|
|
3401
|
-
var
|
|
3631
|
+
var filter$3 = {};
|
|
3402
3632
|
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
}
|
|
3412
|
-
iterable$1.isIterable = isIterable$3;
|
|
3413
|
-
function isntIterable$1(val) {
|
|
3414
|
-
return !isIterable$3(val);
|
|
3633
|
+
filter$3.filter = void 0;
|
|
3634
|
+
function* filter$2(iterable, predicate) {
|
|
3635
|
+
let index = 0;
|
|
3636
|
+
for (const element of iterable) {
|
|
3637
|
+
if (predicate(element, index))
|
|
3638
|
+
yield element;
|
|
3639
|
+
index++;
|
|
3640
|
+
}
|
|
3415
3641
|
}
|
|
3416
|
-
|
|
3642
|
+
filter$3.filter = filter$2;
|
|
3417
3643
|
|
|
3418
|
-
var
|
|
3644
|
+
var flattenAsync = {};
|
|
3419
3645
|
|
|
3420
|
-
var
|
|
3646
|
+
var flattenDeepAsync = {};
|
|
3421
3647
|
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3648
|
+
var flattenByAsync$1 = {};
|
|
3649
|
+
|
|
3650
|
+
flattenByAsync$1.flattenByAsync = void 0;
|
|
3651
|
+
const types_1$f = es2018$6;
|
|
3652
|
+
function flattenByAsync(iterable, predicate) {
|
|
3653
|
+
if ((0, types_1$f.isAsyncIterable)(iterable)) {
|
|
3654
|
+
return flattenByAsyncIterable(iterable);
|
|
3655
|
+
}
|
|
3656
|
+
else {
|
|
3657
|
+
return flattenByIterable(iterable);
|
|
3658
|
+
}
|
|
3659
|
+
async function* flattenByAsyncIterable(iterable) {
|
|
3660
|
+
const level = 1;
|
|
3661
|
+
for await (const element of iterable) {
|
|
3662
|
+
if (isFiniteIterable$1(element) && await predicate(element, level)) {
|
|
3663
|
+
yield* flatten(element, level + 1);
|
|
3664
|
+
}
|
|
3665
|
+
else {
|
|
3666
|
+
yield element;
|
|
3667
|
+
}
|
|
3668
|
+
}
|
|
3669
|
+
}
|
|
3670
|
+
function flattenByIterable(iterable) {
|
|
3671
|
+
return flatten(iterable, 1);
|
|
3672
|
+
}
|
|
3673
|
+
async function* flatten(iterable, level) {
|
|
3674
|
+
for (const element of iterable) {
|
|
3675
|
+
if (isFiniteIterable$1(element) && await predicate(element, level)) {
|
|
3676
|
+
yield* flatten(element, level + 1);
|
|
3677
|
+
}
|
|
3678
|
+
else {
|
|
3679
|
+
yield element;
|
|
3680
|
+
}
|
|
3681
|
+
}
|
|
3682
|
+
}
|
|
3445
3683
|
}
|
|
3446
|
-
|
|
3447
|
-
function
|
|
3448
|
-
return
|
|
3684
|
+
flattenByAsync$1.flattenByAsync = flattenByAsync;
|
|
3685
|
+
function isFiniteIterable$1(val) {
|
|
3686
|
+
return (0, types_1$f.isIterable)(val) && (0, types_1$f.isntChar)(val);
|
|
3449
3687
|
}
|
|
3450
|
-
number$1.isntNaN = isntNaN$1;
|
|
3451
3688
|
|
|
3452
|
-
var
|
|
3689
|
+
var hasRequiredFlattenDeepAsync;
|
|
3453
3690
|
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
return (0, isPlainObject_1$1.default)(val);
|
|
3691
|
+
function requireFlattenDeepAsync () {
|
|
3692
|
+
if (hasRequiredFlattenDeepAsync) return flattenDeepAsync;
|
|
3693
|
+
hasRequiredFlattenDeepAsync = 1;
|
|
3694
|
+
flattenDeepAsync.flattenDeepAsync = void 0;
|
|
3695
|
+
const flatten_by_async_1 = flattenByAsync$1;
|
|
3696
|
+
const errors_1 = requireEs2018();
|
|
3697
|
+
function flattenDeepAsync$1(iterable, depth = Infinity) {
|
|
3698
|
+
(0, errors_1.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
3699
|
+
(0, errors_1.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
3700
|
+
return (0, flatten_by_async_1.flattenByAsync)(iterable, (_, level) => level <= depth);
|
|
3701
|
+
}
|
|
3702
|
+
flattenDeepAsync.flattenDeepAsync = flattenDeepAsync$1;
|
|
3703
|
+
|
|
3704
|
+
return flattenDeepAsync;
|
|
3469
3705
|
}
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3706
|
+
|
|
3707
|
+
var hasRequiredFlattenAsync;
|
|
3708
|
+
|
|
3709
|
+
function requireFlattenAsync () {
|
|
3710
|
+
if (hasRequiredFlattenAsync) return flattenAsync;
|
|
3711
|
+
hasRequiredFlattenAsync = 1;
|
|
3712
|
+
flattenAsync.flattenAsync = void 0;
|
|
3713
|
+
const flatten_deep_async_1 = requireFlattenDeepAsync();
|
|
3714
|
+
function flattenAsync$1(iterable) {
|
|
3715
|
+
return (0, flatten_deep_async_1.flattenDeepAsync)(iterable, 1);
|
|
3716
|
+
}
|
|
3717
|
+
flattenAsync.flattenAsync = flattenAsync$1;
|
|
3718
|
+
|
|
3719
|
+
return flattenAsync;
|
|
3473
3720
|
}
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3721
|
+
|
|
3722
|
+
var flattenBy$1 = {};
|
|
3723
|
+
|
|
3724
|
+
flattenBy$1.flattenBy = void 0;
|
|
3725
|
+
const types_1$e = es2018$6;
|
|
3726
|
+
function flattenBy(iterable, predicate) {
|
|
3727
|
+
return flatten(iterable, 1);
|
|
3728
|
+
function* flatten(iterable, level) {
|
|
3729
|
+
for (const element of iterable) {
|
|
3730
|
+
if (isFiniteIterable(element) && predicate(element, level)) {
|
|
3731
|
+
yield* flatten(element, level + 1);
|
|
3732
|
+
}
|
|
3733
|
+
else {
|
|
3734
|
+
yield element;
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3737
|
+
}
|
|
3477
3738
|
}
|
|
3478
|
-
|
|
3479
|
-
function
|
|
3480
|
-
return
|
|
3739
|
+
flattenBy$1.flattenBy = flattenBy;
|
|
3740
|
+
function isFiniteIterable(val) {
|
|
3741
|
+
return (0, types_1$e.isIterable)(val) && (0, types_1$e.isntChar)(val);
|
|
3481
3742
|
}
|
|
3482
|
-
object$1.isntEmptyObject = isntEmptyObject$1;
|
|
3483
3743
|
|
|
3484
|
-
|
|
3485
|
-
const null_1$3 = _null$1;
|
|
3486
|
-
const boolean_1$1 = boolean$1;
|
|
3487
|
-
const string_1$2 = string$1;
|
|
3488
|
-
const number_1$1 = number$1;
|
|
3489
|
-
const array_1$1 = array$1;
|
|
3490
|
-
const object_1$3 = object$1;
|
|
3491
|
-
function isJson$1(val) {
|
|
3492
|
-
return (0, null_1$3.isNull)(val)
|
|
3493
|
-
|| (0, boolean_1$1.isBoolean)(val)
|
|
3494
|
-
|| (0, string_1$2.isString)(val)
|
|
3495
|
-
|| (0, number_1$1.isNumber)(val)
|
|
3496
|
-
|| ((0, array_1$1.isArray)(val) && val.every(isJson$1))
|
|
3497
|
-
|| ((0, object_1$3.isPlainObject)(val) && Object.values(val).every(isJson$1));
|
|
3498
|
-
}
|
|
3499
|
-
json$1.isJson = isJson$1;
|
|
3500
|
-
function isntJson$1(val) {
|
|
3501
|
-
return !isJson$1(val);
|
|
3502
|
-
}
|
|
3503
|
-
json$1.isntJson = isntJson$1;
|
|
3504
|
-
function isJsonable$1(val) {
|
|
3505
|
-
try {
|
|
3506
|
-
JSON.stringify(val);
|
|
3507
|
-
return true;
|
|
3508
|
-
}
|
|
3509
|
-
catch (_a) {
|
|
3510
|
-
return false;
|
|
3511
|
-
}
|
|
3512
|
-
}
|
|
3513
|
-
json$1.isJsonable = isJsonable$1;
|
|
3514
|
-
function isntJsonable$1(val) {
|
|
3515
|
-
return !isntJsonable$1();
|
|
3516
|
-
}
|
|
3517
|
-
json$1.isntJsonable = isntJsonable$1;
|
|
3744
|
+
var flattenDeep = {};
|
|
3518
3745
|
|
|
3519
|
-
var
|
|
3746
|
+
var hasRequiredFlattenDeep;
|
|
3520
3747
|
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
promise$1.isntPromiseLike = isntPromiseLike$1;
|
|
3536
|
-
function isPromiseLike$1(val) {
|
|
3537
|
-
return (0, object_1$2.isObject)(val)
|
|
3538
|
-
&& (0, function_1$3.isFunction)(val.then);
|
|
3748
|
+
function requireFlattenDeep () {
|
|
3749
|
+
if (hasRequiredFlattenDeep) return flattenDeep;
|
|
3750
|
+
hasRequiredFlattenDeep = 1;
|
|
3751
|
+
flattenDeep.flattenDeep = void 0;
|
|
3752
|
+
const flatten_by_1 = flattenBy$1;
|
|
3753
|
+
const errors_1 = requireEs2018();
|
|
3754
|
+
function flattenDeep$1(iterable, depth = Infinity) {
|
|
3755
|
+
(0, errors_1.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
3756
|
+
(0, errors_1.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
3757
|
+
return (0, flatten_by_1.flattenBy)(iterable, (_, level) => level <= depth);
|
|
3758
|
+
}
|
|
3759
|
+
flattenDeep.flattenDeep = flattenDeep$1;
|
|
3760
|
+
|
|
3761
|
+
return flattenDeep;
|
|
3539
3762
|
}
|
|
3540
|
-
promise$1.isPromiseLike = isPromiseLike$1;
|
|
3541
3763
|
|
|
3542
|
-
var
|
|
3764
|
+
var flatten = {};
|
|
3543
3765
|
|
|
3544
|
-
|
|
3545
|
-
function isAbsoluteURL$1(str) {
|
|
3546
|
-
try {
|
|
3547
|
-
new URL(str);
|
|
3548
|
-
return true;
|
|
3549
|
-
}
|
|
3550
|
-
catch (_a) {
|
|
3551
|
-
return false;
|
|
3552
|
-
}
|
|
3553
|
-
}
|
|
3554
|
-
url$1.isAbsoluteURL = isAbsoluteURL$1;
|
|
3766
|
+
var hasRequiredFlatten;
|
|
3555
3767
|
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
if (k2 === undefined) k2 = k;
|
|
3566
|
-
o[k2] = m[k];
|
|
3567
|
-
}));
|
|
3568
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
3569
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
3570
|
-
};__exportStar(array$1, exports);
|
|
3571
|
-
__exportStar(asyncIterable$1, exports);
|
|
3572
|
-
__exportStar(bigint$1, exports);
|
|
3573
|
-
__exportStar(boolean$1, exports);
|
|
3574
|
-
__exportStar(char$1, exports);
|
|
3575
|
-
__exportStar(date$1, exports);
|
|
3576
|
-
__exportStar(_enum$1, exports);
|
|
3577
|
-
__exportStar(error$1, exports);
|
|
3578
|
-
__exportStar(falsy$1, exports);
|
|
3579
|
-
__exportStar(_function$1, exports);
|
|
3580
|
-
__exportStar(iterable$1, exports);
|
|
3581
|
-
__exportStar(json$1, exports);
|
|
3582
|
-
__exportStar(_null$1, exports);
|
|
3583
|
-
__exportStar(number$1, exports);
|
|
3584
|
-
__exportStar(object$1, exports);
|
|
3585
|
-
__exportStar(promise$1, exports);
|
|
3586
|
-
__exportStar(string$1, exports);
|
|
3587
|
-
__exportStar(_undefined$1, exports);
|
|
3588
|
-
__exportStar(url$1, exports);
|
|
3768
|
+
function requireFlatten () {
|
|
3769
|
+
if (hasRequiredFlatten) return flatten;
|
|
3770
|
+
hasRequiredFlatten = 1;
|
|
3771
|
+
flatten.flatten = void 0;
|
|
3772
|
+
const flatten_deep_1 = requireFlattenDeep();
|
|
3773
|
+
function flatten$1(iterable) {
|
|
3774
|
+
return (0, flatten_deep_1.flattenDeep)(iterable, 1);
|
|
3775
|
+
}
|
|
3776
|
+
flatten.flatten = flatten$1;
|
|
3589
3777
|
|
|
3590
|
-
|
|
3778
|
+
return flatten;
|
|
3779
|
+
}
|
|
3591
3780
|
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3781
|
+
var mapAsync$1 = {};
|
|
3782
|
+
|
|
3783
|
+
mapAsync$1.mapAsync = void 0;
|
|
3784
|
+
const types_1$d = es2018$6;
|
|
3785
|
+
function mapAsync(iterable, fn) {
|
|
3786
|
+
if ((0, types_1$d.isAsyncIterable)(iterable)) {
|
|
3787
|
+
return mapAsyncIterable(iterable);
|
|
3597
3788
|
}
|
|
3598
3789
|
else {
|
|
3599
|
-
return
|
|
3790
|
+
return mapIterable(iterable);
|
|
3600
3791
|
}
|
|
3601
|
-
async function*
|
|
3602
|
-
let buffer = [];
|
|
3792
|
+
async function* mapAsyncIterable(iterable) {
|
|
3603
3793
|
let index = 0;
|
|
3604
3794
|
for await (const element of iterable) {
|
|
3605
|
-
|
|
3606
|
-
if (await predicate(element, index)) {
|
|
3607
|
-
yield buffer;
|
|
3608
|
-
buffer = [];
|
|
3609
|
-
}
|
|
3795
|
+
yield await fn(element, index);
|
|
3610
3796
|
index++;
|
|
3611
3797
|
}
|
|
3612
|
-
if (buffer.length)
|
|
3613
|
-
yield buffer;
|
|
3614
3798
|
}
|
|
3615
|
-
async function*
|
|
3616
|
-
let buffer = [];
|
|
3799
|
+
async function* mapIterable(iterable) {
|
|
3617
3800
|
let index = 0;
|
|
3618
3801
|
for (const element of iterable) {
|
|
3619
|
-
|
|
3620
|
-
if (await predicate(element, index)) {
|
|
3621
|
-
yield buffer;
|
|
3622
|
-
buffer = [];
|
|
3623
|
-
}
|
|
3802
|
+
yield await fn(element, index);
|
|
3624
3803
|
index++;
|
|
3625
3804
|
}
|
|
3626
|
-
if (buffer.length)
|
|
3627
|
-
yield buffer;
|
|
3628
3805
|
}
|
|
3629
3806
|
}
|
|
3630
|
-
|
|
3807
|
+
mapAsync$1.mapAsync = mapAsync;
|
|
3631
3808
|
|
|
3632
|
-
var
|
|
3809
|
+
var map$3 = {};
|
|
3633
3810
|
|
|
3634
|
-
|
|
3635
|
-
function*
|
|
3636
|
-
let buffer = [];
|
|
3811
|
+
map$3.map = void 0;
|
|
3812
|
+
function* map$2(iterable, fn) {
|
|
3637
3813
|
let index = 0;
|
|
3638
3814
|
for (const element of iterable) {
|
|
3639
|
-
|
|
3640
|
-
if (predicate(element, index)) {
|
|
3641
|
-
yield buffer;
|
|
3642
|
-
buffer = [];
|
|
3643
|
-
}
|
|
3815
|
+
yield fn(element, index);
|
|
3644
3816
|
index++;
|
|
3645
3817
|
}
|
|
3646
|
-
if (buffer.length)
|
|
3647
|
-
yield buffer;
|
|
3648
3818
|
}
|
|
3649
|
-
|
|
3819
|
+
map$3.map = map$2;
|
|
3650
3820
|
|
|
3651
|
-
var
|
|
3821
|
+
var repeatAsync = {};
|
|
3652
3822
|
|
|
3653
|
-
var
|
|
3823
|
+
var hasRequiredRepeatAsync;
|
|
3654
3824
|
|
|
3655
|
-
function
|
|
3656
|
-
if (
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
const go_1 = es2018$
|
|
3825
|
+
function requireRepeatAsync () {
|
|
3826
|
+
if (hasRequiredRepeatAsync) return repeatAsync;
|
|
3827
|
+
hasRequiredRepeatAsync = 1;
|
|
3828
|
+
repeatAsync.repeatAsync = void 0;
|
|
3829
|
+
const go_1 = es2018$7;
|
|
3660
3830
|
const errors_1 = requireEs2018();
|
|
3661
|
-
function
|
|
3662
|
-
(0, errors_1.assert)(Number.isInteger(
|
|
3663
|
-
(0, errors_1.assert)(
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3831
|
+
function repeatAsync$1(iterable, times) {
|
|
3832
|
+
(0, errors_1.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
3833
|
+
(0, errors_1.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
3834
|
+
if (times === Infinity)
|
|
3835
|
+
warnInfiniteLoop();
|
|
3836
|
+
return (0, go_1.go)(async function* () {
|
|
3837
|
+
const cache = [];
|
|
3838
|
+
if (times > 0) {
|
|
3839
|
+
for await (const element of iterable) {
|
|
3840
|
+
yield element;
|
|
3841
|
+
cache.push(element);
|
|
3671
3842
|
}
|
|
3843
|
+
times--;
|
|
3844
|
+
}
|
|
3845
|
+
while (times > 0) {
|
|
3846
|
+
yield* cache;
|
|
3847
|
+
times--;
|
|
3672
3848
|
}
|
|
3673
|
-
if (buffer.length)
|
|
3674
|
-
yield buffer;
|
|
3675
3849
|
});
|
|
3676
3850
|
}
|
|
3677
|
-
|
|
3851
|
+
repeatAsync.repeatAsync = repeatAsync$1;
|
|
3852
|
+
function warnInfiniteLoop() {
|
|
3853
|
+
if (isProduction())
|
|
3854
|
+
return;
|
|
3855
|
+
console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
|
|
3856
|
+
}
|
|
3857
|
+
function isProduction() {
|
|
3858
|
+
return process.env.NODE_ENV === 'production';
|
|
3859
|
+
}
|
|
3678
3860
|
|
|
3679
|
-
return
|
|
3861
|
+
return repeatAsync;
|
|
3680
3862
|
}
|
|
3681
3863
|
|
|
3682
|
-
var
|
|
3683
|
-
|
|
3684
|
-
concatAsync$1.concatAsync = void 0;
|
|
3685
|
-
const types_1$i = es2018$5;
|
|
3686
|
-
const go_1$1 = es2018$6;
|
|
3687
|
-
function concatAsync(iterable, ...otherIterables) {
|
|
3688
|
-
return (0, go_1$1.go)(async function* () {
|
|
3689
|
-
for (const iter of [iterable, ...otherIterables]) {
|
|
3690
|
-
if ((0, types_1$i.isAsyncIterable)(iter)) {
|
|
3691
|
-
for await (const element of iter) {
|
|
3692
|
-
yield element;
|
|
3693
|
-
}
|
|
3694
|
-
}
|
|
3695
|
-
else {
|
|
3696
|
-
for (const element of iter) {
|
|
3697
|
-
yield element;
|
|
3698
|
-
}
|
|
3699
|
-
}
|
|
3700
|
-
}
|
|
3701
|
-
});
|
|
3702
|
-
}
|
|
3703
|
-
concatAsync$1.concatAsync = concatAsync;
|
|
3864
|
+
var repeat$2 = {};
|
|
3704
3865
|
|
|
3705
|
-
var
|
|
3866
|
+
var hasRequiredRepeat;
|
|
3706
3867
|
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
yield* iter;
|
|
3713
|
-
}
|
|
3714
|
-
});
|
|
3715
|
-
}
|
|
3716
|
-
concat$5.concat = concat$4;
|
|
3717
|
-
|
|
3718
|
-
var dropAsync = {};
|
|
3719
|
-
|
|
3720
|
-
var utils = {};
|
|
3721
|
-
|
|
3722
|
-
utils.copyIterable = utils.copyAsyncIterable = void 0;
|
|
3723
|
-
async function* copyAsyncIterable(iterable) {
|
|
3724
|
-
for await (const element of iterable) {
|
|
3725
|
-
yield element;
|
|
3726
|
-
}
|
|
3727
|
-
}
|
|
3728
|
-
utils.copyAsyncIterable = copyAsyncIterable;
|
|
3729
|
-
function* copyIterable(iterable) {
|
|
3730
|
-
for (const element of iterable) {
|
|
3731
|
-
yield element;
|
|
3732
|
-
}
|
|
3733
|
-
}
|
|
3734
|
-
utils.copyIterable = copyIterable;
|
|
3735
|
-
|
|
3736
|
-
var hasRequiredDropAsync;
|
|
3737
|
-
|
|
3738
|
-
function requireDropAsync () {
|
|
3739
|
-
if (hasRequiredDropAsync) return dropAsync;
|
|
3740
|
-
hasRequiredDropAsync = 1;
|
|
3741
|
-
dropAsync.dropAsync = void 0;
|
|
3742
|
-
const go_1 = es2018$6;
|
|
3743
|
-
const utils_1 = utils;
|
|
3868
|
+
function requireRepeat () {
|
|
3869
|
+
if (hasRequiredRepeat) return repeat$2;
|
|
3870
|
+
hasRequiredRepeat = 1;
|
|
3871
|
+
repeat$2.repeat = void 0;
|
|
3872
|
+
const go_1 = es2018$7;
|
|
3744
3873
|
const errors_1 = requireEs2018();
|
|
3745
|
-
function
|
|
3746
|
-
(0, errors_1.assert)(Number.isInteger(
|
|
3747
|
-
(0, errors_1.assert)(
|
|
3748
|
-
if (
|
|
3749
|
-
|
|
3750
|
-
return (0, go_1.go)(
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
while ({ value, done } = await iterator.next(), !done) {
|
|
3757
|
-
if (count <= 0)
|
|
3758
|
-
break;
|
|
3759
|
-
count--;
|
|
3760
|
-
}
|
|
3761
|
-
while (!done) {
|
|
3762
|
-
yield value;
|
|
3763
|
-
({ value, done } = await iterator.next());
|
|
3874
|
+
function repeat(iterable, times) {
|
|
3875
|
+
(0, errors_1.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
3876
|
+
(0, errors_1.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
3877
|
+
if (times === Infinity)
|
|
3878
|
+
warnInfiniteLoop();
|
|
3879
|
+
return (0, go_1.go)(function* () {
|
|
3880
|
+
const cache = [];
|
|
3881
|
+
if (times > 0) {
|
|
3882
|
+
for (const element of iterable) {
|
|
3883
|
+
yield element;
|
|
3884
|
+
cache.push(element);
|
|
3764
3885
|
}
|
|
3886
|
+
times--;
|
|
3765
3887
|
}
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3888
|
+
while (times > 0) {
|
|
3889
|
+
yield* cache;
|
|
3890
|
+
times--;
|
|
3769
3891
|
}
|
|
3770
3892
|
});
|
|
3771
3893
|
}
|
|
3772
|
-
|
|
3894
|
+
repeat$2.repeat = repeat;
|
|
3895
|
+
function warnInfiniteLoop() {
|
|
3896
|
+
if (isProduction())
|
|
3897
|
+
return;
|
|
3898
|
+
console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
|
|
3899
|
+
}
|
|
3900
|
+
function isProduction() {
|
|
3901
|
+
return process.env.NODE_ENV === 'production';
|
|
3902
|
+
}
|
|
3773
3903
|
|
|
3774
|
-
return
|
|
3904
|
+
return repeat$2;
|
|
3775
3905
|
}
|
|
3776
3906
|
|
|
3777
|
-
var
|
|
3907
|
+
var sliceAsync = {};
|
|
3778
3908
|
|
|
3779
|
-
var
|
|
3909
|
+
var hasRequiredSliceAsync;
|
|
3780
3910
|
|
|
3781
|
-
function
|
|
3782
|
-
if (
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
const go_1 = es2018$
|
|
3786
|
-
const utils_1 = utils;
|
|
3911
|
+
function requireSliceAsync () {
|
|
3912
|
+
if (hasRequiredSliceAsync) return sliceAsync;
|
|
3913
|
+
hasRequiredSliceAsync = 1;
|
|
3914
|
+
sliceAsync.sliceAsync = void 0;
|
|
3915
|
+
const go_1 = es2018$7;
|
|
3787
3916
|
const errors_1 = requireEs2018();
|
|
3788
|
-
function
|
|
3789
|
-
(0, errors_1.assert)(Number.isInteger(
|
|
3790
|
-
(0, errors_1.assert)(
|
|
3791
|
-
|
|
3792
|
-
|
|
3917
|
+
function sliceAsync$1(iterable, start, end = Infinity) {
|
|
3918
|
+
(0, errors_1.assert)(Number.isInteger(start), 'The parameter start must be an integer');
|
|
3919
|
+
(0, errors_1.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
3920
|
+
(0, errors_1.assert)(Number.isInteger(end), 'The parameter end must be an integer');
|
|
3921
|
+
(0, errors_1.assert)(end >= start, 'The parameter end must be greater than or equal to start');
|
|
3793
3922
|
return (0, go_1.go)(async function* () {
|
|
3794
|
-
|
|
3795
|
-
const
|
|
3796
|
-
|
|
3797
|
-
|
|
3923
|
+
let index = 0;
|
|
3924
|
+
for await (const element of iterable) {
|
|
3925
|
+
if (index >= end)
|
|
3926
|
+
break;
|
|
3927
|
+
if (index >= start)
|
|
3928
|
+
yield element;
|
|
3929
|
+
index++;
|
|
3798
3930
|
}
|
|
3799
3931
|
});
|
|
3800
3932
|
}
|
|
3801
|
-
|
|
3802
|
-
async function toArrayAsync(iterable) {
|
|
3803
|
-
const result = [];
|
|
3804
|
-
for await (const element of iterable) {
|
|
3805
|
-
result.push(element);
|
|
3806
|
-
}
|
|
3807
|
-
return result;
|
|
3808
|
-
}
|
|
3933
|
+
sliceAsync.sliceAsync = sliceAsync$1;
|
|
3809
3934
|
|
|
3810
|
-
return
|
|
3935
|
+
return sliceAsync;
|
|
3811
3936
|
}
|
|
3812
3937
|
|
|
3813
|
-
var
|
|
3938
|
+
var slice = {};
|
|
3814
3939
|
|
|
3815
|
-
var
|
|
3940
|
+
var hasRequiredSlice;
|
|
3816
3941
|
|
|
3817
|
-
function
|
|
3818
|
-
if (
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
const go_1 = es2018$
|
|
3822
|
-
const utils_1 = utils;
|
|
3942
|
+
function requireSlice () {
|
|
3943
|
+
if (hasRequiredSlice) return slice;
|
|
3944
|
+
hasRequiredSlice = 1;
|
|
3945
|
+
slice.slice = void 0;
|
|
3946
|
+
const go_1 = es2018$7;
|
|
3823
3947
|
const errors_1 = requireEs2018();
|
|
3824
|
-
function
|
|
3825
|
-
(0, errors_1.assert)(Number.isInteger(
|
|
3826
|
-
(0, errors_1.assert)(
|
|
3827
|
-
|
|
3828
|
-
|
|
3948
|
+
function slice$1(iterable, start, end = Infinity) {
|
|
3949
|
+
(0, errors_1.assert)(Number.isInteger(start), 'The parameter start must be an integer');
|
|
3950
|
+
(0, errors_1.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
3951
|
+
(0, errors_1.assert)(Number.isInteger(end), 'The parameter end must be an integer');
|
|
3952
|
+
(0, errors_1.assert)(end >= start, 'The parameter end must be greater than or equal to start');
|
|
3829
3953
|
return (0, go_1.go)(function* () {
|
|
3830
|
-
|
|
3831
|
-
|
|
3954
|
+
let index = 0;
|
|
3955
|
+
for (const element of iterable) {
|
|
3956
|
+
if (index >= end)
|
|
3957
|
+
break;
|
|
3958
|
+
if (index >= start)
|
|
3959
|
+
yield element;
|
|
3960
|
+
index++;
|
|
3961
|
+
}
|
|
3832
3962
|
});
|
|
3833
3963
|
}
|
|
3834
|
-
|
|
3964
|
+
slice.slice = slice$1;
|
|
3835
3965
|
|
|
3836
|
-
return
|
|
3966
|
+
return slice;
|
|
3837
3967
|
}
|
|
3838
3968
|
|
|
3839
|
-
var
|
|
3969
|
+
var splitAsync$1 = {};
|
|
3840
3970
|
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3971
|
+
splitAsync$1.splitAsync = void 0;
|
|
3972
|
+
async function* splitAsync(iterable, separator) {
|
|
3973
|
+
let buffer = [];
|
|
3974
|
+
for await (const element of iterable) {
|
|
3975
|
+
if (element === separator) {
|
|
3976
|
+
yield buffer;
|
|
3977
|
+
buffer = [];
|
|
3978
|
+
}
|
|
3979
|
+
else {
|
|
3980
|
+
buffer.push(element);
|
|
3981
|
+
}
|
|
3982
|
+
}
|
|
3983
|
+
yield buffer;
|
|
3984
|
+
}
|
|
3985
|
+
splitAsync$1.splitAsync = splitAsync;
|
|
3986
|
+
|
|
3987
|
+
var splitByAsync$1 = {};
|
|
3988
|
+
|
|
3989
|
+
splitByAsync$1.splitByAsync = void 0;
|
|
3990
|
+
const types_1$c = es2018$6;
|
|
3991
|
+
function splitByAsync(iterable, predicate) {
|
|
3992
|
+
if ((0, types_1$c.isAsyncIterable)(iterable)) {
|
|
3993
|
+
return splitByAsyncIterable(iterable);
|
|
3846
3994
|
}
|
|
3847
3995
|
else {
|
|
3848
|
-
return
|
|
3996
|
+
return splitByIterable(iterable);
|
|
3849
3997
|
}
|
|
3850
|
-
async function*
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
while ({ value, done } = await iterator.next(), !done) {
|
|
3858
|
-
if (await predicate(value, index++))
|
|
3859
|
-
break;
|
|
3998
|
+
async function* splitByIterable(iterable) {
|
|
3999
|
+
let buffer = [];
|
|
4000
|
+
let index = 0;
|
|
4001
|
+
for (const element of iterable) {
|
|
4002
|
+
if (await predicate(element, index)) {
|
|
4003
|
+
yield buffer;
|
|
4004
|
+
buffer = [];
|
|
3860
4005
|
}
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
({ value, done } = await iterator.next());
|
|
4006
|
+
else {
|
|
4007
|
+
buffer.push(element);
|
|
3864
4008
|
}
|
|
4009
|
+
index++;
|
|
3865
4010
|
}
|
|
3866
|
-
|
|
3867
|
-
if (!done)
|
|
3868
|
-
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
3869
|
-
}
|
|
4011
|
+
yield buffer;
|
|
3870
4012
|
}
|
|
3871
|
-
async function*
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
while ({ value, done } = iterator.next(), !done) {
|
|
3879
|
-
if (await predicate(value, index++))
|
|
3880
|
-
break;
|
|
4013
|
+
async function* splitByAsyncIterable(iterable) {
|
|
4014
|
+
let buffer = [];
|
|
4015
|
+
let index = 0;
|
|
4016
|
+
for await (const element of iterable) {
|
|
4017
|
+
if (await predicate(element, index)) {
|
|
4018
|
+
yield buffer;
|
|
4019
|
+
buffer = [];
|
|
3881
4020
|
}
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
({ value, done } = iterator.next());
|
|
4021
|
+
else {
|
|
4022
|
+
buffer.push(element);
|
|
3885
4023
|
}
|
|
4024
|
+
index++;
|
|
3886
4025
|
}
|
|
3887
|
-
|
|
3888
|
-
if (!done)
|
|
3889
|
-
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
3890
|
-
}
|
|
4026
|
+
yield buffer;
|
|
3891
4027
|
}
|
|
3892
4028
|
}
|
|
3893
|
-
|
|
4029
|
+
splitByAsync$1.splitByAsync = splitByAsync;
|
|
3894
4030
|
|
|
3895
|
-
var
|
|
4031
|
+
var splitBy$1 = {};
|
|
3896
4032
|
|
|
3897
|
-
|
|
3898
|
-
function*
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
while ({ value, done } = iterator.next(), !done) {
|
|
3906
|
-
if (predicate(value, index++))
|
|
3907
|
-
break;
|
|
4033
|
+
splitBy$1.splitBy = void 0;
|
|
4034
|
+
function* splitBy(iterable, predicate) {
|
|
4035
|
+
let buffer = [];
|
|
4036
|
+
let index = 0;
|
|
4037
|
+
for (const element of iterable) {
|
|
4038
|
+
if (predicate(element, index)) {
|
|
4039
|
+
yield buffer;
|
|
4040
|
+
buffer = [];
|
|
3908
4041
|
}
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
({ value, done } = iterator.next());
|
|
4042
|
+
else {
|
|
4043
|
+
buffer.push(element);
|
|
3912
4044
|
}
|
|
4045
|
+
index++;
|
|
3913
4046
|
}
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
4047
|
+
yield buffer;
|
|
4048
|
+
}
|
|
4049
|
+
splitBy$1.splitBy = splitBy;
|
|
4050
|
+
|
|
4051
|
+
var split$1 = {};
|
|
4052
|
+
|
|
4053
|
+
split$1.split = void 0;
|
|
4054
|
+
function* split(iterable, separator) {
|
|
4055
|
+
let buffer = [];
|
|
4056
|
+
for (const element of iterable) {
|
|
4057
|
+
if (element === separator) {
|
|
4058
|
+
yield buffer;
|
|
4059
|
+
buffer = [];
|
|
4060
|
+
}
|
|
4061
|
+
else {
|
|
4062
|
+
buffer.push(element);
|
|
4063
|
+
}
|
|
3917
4064
|
}
|
|
4065
|
+
yield buffer;
|
|
3918
4066
|
}
|
|
3919
|
-
|
|
4067
|
+
split$1.split = split;
|
|
3920
4068
|
|
|
3921
|
-
var
|
|
4069
|
+
var takeAsync = {};
|
|
3922
4070
|
|
|
3923
|
-
var
|
|
4071
|
+
var hasRequiredTakeAsync;
|
|
3924
4072
|
|
|
3925
|
-
function
|
|
3926
|
-
if (
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
const go_1 = es2018$
|
|
3930
|
-
const utils_1 = utils;
|
|
4073
|
+
function requireTakeAsync () {
|
|
4074
|
+
if (hasRequiredTakeAsync) return takeAsync;
|
|
4075
|
+
hasRequiredTakeAsync = 1;
|
|
4076
|
+
takeAsync.takeAsync = void 0;
|
|
4077
|
+
const go_1 = es2018$7;
|
|
3931
4078
|
const errors_1 = requireEs2018();
|
|
3932
|
-
function
|
|
4079
|
+
function takeAsync$1(iterable, count) {
|
|
4080
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
4081
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
4082
|
+
return (0, go_1.go)(async function* () {
|
|
4083
|
+
if (count === 0)
|
|
4084
|
+
return;
|
|
4085
|
+
for await (const element of iterable) {
|
|
4086
|
+
yield element;
|
|
4087
|
+
count--;
|
|
4088
|
+
if (count === 0)
|
|
4089
|
+
break;
|
|
4090
|
+
}
|
|
4091
|
+
});
|
|
4092
|
+
}
|
|
4093
|
+
takeAsync.takeAsync = takeAsync$1;
|
|
4094
|
+
|
|
4095
|
+
return takeAsync;
|
|
4096
|
+
}
|
|
4097
|
+
|
|
4098
|
+
var takeRightAsync = {};
|
|
4099
|
+
|
|
4100
|
+
var hasRequiredTakeRightAsync;
|
|
4101
|
+
|
|
4102
|
+
function requireTakeRightAsync () {
|
|
4103
|
+
if (hasRequiredTakeRightAsync) return takeRightAsync;
|
|
4104
|
+
hasRequiredTakeRightAsync = 1;
|
|
4105
|
+
takeRightAsync.takeRightAsync = void 0;
|
|
4106
|
+
const go_1 = es2018$7;
|
|
4107
|
+
const errors_1 = requireEs2018();
|
|
4108
|
+
function takeRightAsync$1(iterable, count) {
|
|
4109
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
4110
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
4111
|
+
return (0, go_1.go)(async function* () {
|
|
4112
|
+
var _a;
|
|
4113
|
+
const iterator = iterable[Symbol.asyncIterator]();
|
|
4114
|
+
let done;
|
|
4115
|
+
try {
|
|
4116
|
+
const buffer = [];
|
|
4117
|
+
let value;
|
|
4118
|
+
while ({ value, done } = await iterator.next(), !done) {
|
|
4119
|
+
buffer.push(value);
|
|
4120
|
+
if (buffer.length > count)
|
|
4121
|
+
buffer.shift();
|
|
4122
|
+
}
|
|
4123
|
+
yield* buffer;
|
|
4124
|
+
}
|
|
4125
|
+
finally {
|
|
4126
|
+
if (!done)
|
|
4127
|
+
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
4128
|
+
}
|
|
4129
|
+
});
|
|
4130
|
+
}
|
|
4131
|
+
takeRightAsync.takeRightAsync = takeRightAsync$1;
|
|
4132
|
+
|
|
4133
|
+
return takeRightAsync;
|
|
4134
|
+
}
|
|
4135
|
+
|
|
4136
|
+
var takeRight = {};
|
|
4137
|
+
|
|
4138
|
+
var hasRequiredTakeRight;
|
|
4139
|
+
|
|
4140
|
+
function requireTakeRight () {
|
|
4141
|
+
if (hasRequiredTakeRight) return takeRight;
|
|
4142
|
+
hasRequiredTakeRight = 1;
|
|
4143
|
+
takeRight.takeRight = void 0;
|
|
4144
|
+
const go_1 = es2018$7;
|
|
4145
|
+
const errors_1 = requireEs2018();
|
|
4146
|
+
function takeRight$1(iterable, count) {
|
|
3933
4147
|
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
3934
4148
|
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
3935
|
-
if (count === 0)
|
|
3936
|
-
return (0, utils_1.copyIterable)(iterable);
|
|
3937
4149
|
return (0, go_1.go)(function* () {
|
|
3938
4150
|
var _a;
|
|
3939
4151
|
const iterator = iterable[Symbol.iterator]();
|
|
3940
4152
|
let done;
|
|
3941
4153
|
try {
|
|
4154
|
+
const buffer = [];
|
|
3942
4155
|
let value;
|
|
3943
4156
|
while ({ value, done } = iterator.next(), !done) {
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
}
|
|
3948
|
-
while (!done) {
|
|
3949
|
-
yield value;
|
|
3950
|
-
({ value, done } = iterator.next());
|
|
4157
|
+
buffer.push(value);
|
|
4158
|
+
if (buffer.length > count)
|
|
4159
|
+
buffer.shift();
|
|
3951
4160
|
}
|
|
4161
|
+
yield* buffer;
|
|
3952
4162
|
}
|
|
3953
4163
|
finally {
|
|
3954
4164
|
if (!done)
|
|
@@ -3956,1318 +4166,842 @@
|
|
|
3956
4166
|
}
|
|
3957
4167
|
});
|
|
3958
4168
|
}
|
|
3959
|
-
|
|
4169
|
+
takeRight.takeRight = takeRight$1;
|
|
3960
4170
|
|
|
3961
|
-
return
|
|
4171
|
+
return takeRight;
|
|
3962
4172
|
}
|
|
3963
4173
|
|
|
3964
|
-
var
|
|
4174
|
+
var takeUntilAsync$1 = {};
|
|
3965
4175
|
|
|
3966
|
-
|
|
3967
|
-
const types_1$
|
|
3968
|
-
function
|
|
3969
|
-
if ((0, types_1$
|
|
3970
|
-
return
|
|
4176
|
+
takeUntilAsync$1.takeUntilAsync = void 0;
|
|
4177
|
+
const types_1$b = es2018$6;
|
|
4178
|
+
function takeUntilAsync(iterable, predicate) {
|
|
4179
|
+
if ((0, types_1$b.isAsyncIterable)(iterable)) {
|
|
4180
|
+
return takeUntilAsyncIterable(iterable);
|
|
3971
4181
|
}
|
|
3972
4182
|
else {
|
|
3973
|
-
return
|
|
4183
|
+
return takeUntilIterable(iterable);
|
|
3974
4184
|
}
|
|
3975
|
-
async function*
|
|
4185
|
+
async function* takeUntilAsyncIterable(iterable) {
|
|
3976
4186
|
let index = 0;
|
|
3977
4187
|
for await (const element of iterable) {
|
|
3978
4188
|
if (await predicate(element, index))
|
|
3979
|
-
|
|
4189
|
+
break;
|
|
4190
|
+
yield element;
|
|
3980
4191
|
index++;
|
|
3981
4192
|
}
|
|
3982
4193
|
}
|
|
3983
|
-
async function*
|
|
4194
|
+
async function* takeUntilIterable(iterable) {
|
|
3984
4195
|
let index = 0;
|
|
3985
4196
|
for (const element of iterable) {
|
|
3986
4197
|
if (await predicate(element, index))
|
|
3987
|
-
|
|
4198
|
+
break;
|
|
4199
|
+
yield element;
|
|
3988
4200
|
index++;
|
|
3989
4201
|
}
|
|
3990
4202
|
}
|
|
3991
4203
|
}
|
|
3992
|
-
|
|
4204
|
+
takeUntilAsync$1.takeUntilAsync = takeUntilAsync;
|
|
3993
4205
|
|
|
3994
|
-
var
|
|
4206
|
+
var takeUntil$3 = {};
|
|
3995
4207
|
|
|
3996
|
-
|
|
3997
|
-
function*
|
|
4208
|
+
takeUntil$3.takeUntil = void 0;
|
|
4209
|
+
function* takeUntil$2(iterable, predicate) {
|
|
3998
4210
|
let index = 0;
|
|
3999
4211
|
for (const element of iterable) {
|
|
4000
4212
|
if (predicate(element, index))
|
|
4001
|
-
|
|
4213
|
+
break;
|
|
4214
|
+
yield element;
|
|
4002
4215
|
index++;
|
|
4003
4216
|
}
|
|
4004
4217
|
}
|
|
4005
|
-
|
|
4218
|
+
takeUntil$3.takeUntil = takeUntil$2;
|
|
4006
4219
|
|
|
4007
|
-
var
|
|
4220
|
+
var take$2 = {};
|
|
4008
4221
|
|
|
4009
|
-
var
|
|
4222
|
+
var hasRequiredTake;
|
|
4010
4223
|
|
|
4011
|
-
|
|
4224
|
+
function requireTake () {
|
|
4225
|
+
if (hasRequiredTake) return take$2;
|
|
4226
|
+
hasRequiredTake = 1;
|
|
4227
|
+
take$2.take = void 0;
|
|
4228
|
+
const go_1 = es2018$7;
|
|
4229
|
+
const errors_1 = requireEs2018();
|
|
4230
|
+
function take(iterable, count) {
|
|
4231
|
+
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
4232
|
+
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
4233
|
+
return (0, go_1.go)(function* () {
|
|
4234
|
+
if (count === 0)
|
|
4235
|
+
return;
|
|
4236
|
+
for (const element of iterable) {
|
|
4237
|
+
yield element;
|
|
4238
|
+
count--;
|
|
4239
|
+
if (count === 0)
|
|
4240
|
+
break;
|
|
4241
|
+
}
|
|
4242
|
+
});
|
|
4243
|
+
}
|
|
4244
|
+
take$2.take = take;
|
|
4245
|
+
|
|
4246
|
+
return take$2;
|
|
4247
|
+
}
|
|
4012
4248
|
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4249
|
+
var tapAsync$1 = {};
|
|
4250
|
+
|
|
4251
|
+
tapAsync$1.tapAsync = void 0;
|
|
4252
|
+
const types_1$a = es2018$6;
|
|
4253
|
+
function tapAsync(iterable, fn) {
|
|
4254
|
+
if ((0, types_1$a.isAsyncIterable)(iterable)) {
|
|
4255
|
+
return tapAsyncIterable(iterable);
|
|
4018
4256
|
}
|
|
4019
4257
|
else {
|
|
4020
|
-
return
|
|
4258
|
+
return tapIterable(iterable);
|
|
4021
4259
|
}
|
|
4022
|
-
async function*
|
|
4023
|
-
|
|
4024
|
-
for
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
else {
|
|
4029
|
-
yield element;
|
|
4030
|
-
}
|
|
4260
|
+
async function* tapIterable(iterable) {
|
|
4261
|
+
let index = 0;
|
|
4262
|
+
for (const element of iterable) {
|
|
4263
|
+
await fn(element, index);
|
|
4264
|
+
yield element;
|
|
4265
|
+
index++;
|
|
4031
4266
|
}
|
|
4032
4267
|
}
|
|
4033
|
-
function
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
yield* flatten(element, level + 1);
|
|
4040
|
-
}
|
|
4041
|
-
else {
|
|
4042
|
-
yield element;
|
|
4043
|
-
}
|
|
4268
|
+
async function* tapAsyncIterable(iterable) {
|
|
4269
|
+
let index = 0;
|
|
4270
|
+
for await (const element of iterable) {
|
|
4271
|
+
await fn(element, index);
|
|
4272
|
+
yield element;
|
|
4273
|
+
index++;
|
|
4044
4274
|
}
|
|
4045
4275
|
}
|
|
4046
4276
|
}
|
|
4047
|
-
|
|
4048
|
-
function isFiniteIterable$1(val) {
|
|
4049
|
-
return (0, types_1$f.isIterable)(val) && (0, types_1$f.isntChar)(val);
|
|
4050
|
-
}
|
|
4277
|
+
tapAsync$1.tapAsync = tapAsync;
|
|
4051
4278
|
|
|
4052
|
-
var
|
|
4279
|
+
var tap$3 = {};
|
|
4053
4280
|
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
(0, errors_1.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
4063
|
-
return (0, flatten_by_async_1.flattenByAsync)(iterable, (_, level) => level <= depth);
|
|
4064
|
-
}
|
|
4065
|
-
flattenDeepAsync.flattenDeepAsync = flattenDeepAsync$1;
|
|
4066
|
-
|
|
4067
|
-
return flattenDeepAsync;
|
|
4281
|
+
tap$3.tap = void 0;
|
|
4282
|
+
function* tap$2(iterable, fn) {
|
|
4283
|
+
let index = 0;
|
|
4284
|
+
for (const element of iterable) {
|
|
4285
|
+
fn(element, index);
|
|
4286
|
+
yield element;
|
|
4287
|
+
index++;
|
|
4288
|
+
}
|
|
4068
4289
|
}
|
|
4290
|
+
tap$3.tap = tap$2;
|
|
4069
4291
|
|
|
4070
|
-
var
|
|
4292
|
+
var toAsyncIterable$1 = {};
|
|
4071
4293
|
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
function flattenAsync$1(iterable) {
|
|
4078
|
-
return (0, flatten_deep_async_1.flattenDeepAsync)(iterable, 1);
|
|
4079
|
-
}
|
|
4080
|
-
flattenAsync.flattenAsync = flattenAsync$1;
|
|
4081
|
-
|
|
4082
|
-
return flattenAsync;
|
|
4294
|
+
toAsyncIterable$1.toAsyncIterable = void 0;
|
|
4295
|
+
async function* toAsyncIterable(iterable) {
|
|
4296
|
+
for (const value of iterable) {
|
|
4297
|
+
yield value;
|
|
4298
|
+
}
|
|
4083
4299
|
}
|
|
4300
|
+
toAsyncIterable$1.toAsyncIterable = toAsyncIterable;
|
|
4084
4301
|
|
|
4085
|
-
var
|
|
4302
|
+
var transformAsync$1 = {};
|
|
4086
4303
|
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
return flatten(iterable, 1);
|
|
4091
|
-
function* flatten(iterable, level) {
|
|
4092
|
-
for (const element of iterable) {
|
|
4093
|
-
if (isFiniteIterable(element) && predicate(element, level)) {
|
|
4094
|
-
yield* flatten(element, level + 1);
|
|
4095
|
-
}
|
|
4096
|
-
else {
|
|
4097
|
-
yield element;
|
|
4098
|
-
}
|
|
4099
|
-
}
|
|
4100
|
-
}
|
|
4101
|
-
}
|
|
4102
|
-
flattenBy$1.flattenBy = flattenBy;
|
|
4103
|
-
function isFiniteIterable(val) {
|
|
4104
|
-
return (0, types_1$e.isIterable)(val) && (0, types_1$e.isntChar)(val);
|
|
4304
|
+
transformAsync$1.transformAsync = void 0;
|
|
4305
|
+
async function* transformAsync(iterable, transformer) {
|
|
4306
|
+
yield* transformer(iterable);
|
|
4105
4307
|
}
|
|
4308
|
+
transformAsync$1.transformAsync = transformAsync;
|
|
4106
4309
|
|
|
4107
|
-
var
|
|
4108
|
-
|
|
4109
|
-
var hasRequiredFlattenDeep;
|
|
4310
|
+
var transform$1 = {};
|
|
4110
4311
|
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
flattenDeep.flattenDeep = void 0;
|
|
4115
|
-
const flatten_by_1 = flattenBy$1;
|
|
4116
|
-
const errors_1 = requireEs2018();
|
|
4117
|
-
function flattenDeep$1(iterable, depth = Infinity) {
|
|
4118
|
-
(0, errors_1.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
4119
|
-
(0, errors_1.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
4120
|
-
return (0, flatten_by_1.flattenBy)(iterable, (_, level) => level <= depth);
|
|
4121
|
-
}
|
|
4122
|
-
flattenDeep.flattenDeep = flattenDeep$1;
|
|
4123
|
-
|
|
4124
|
-
return flattenDeep;
|
|
4312
|
+
transform$1.transform = void 0;
|
|
4313
|
+
function* transform(iterable, transformer) {
|
|
4314
|
+
yield* transformer(iterable);
|
|
4125
4315
|
}
|
|
4316
|
+
transform$1.transform = transform;
|
|
4126
4317
|
|
|
4127
|
-
var
|
|
4128
|
-
|
|
4129
|
-
var hasRequiredFlatten;
|
|
4318
|
+
var uniqAsync$1 = {};
|
|
4130
4319
|
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
return flatten;
|
|
4320
|
+
uniqAsync$1.uniqAsync = void 0;
|
|
4321
|
+
async function* uniqAsync(iterable) {
|
|
4322
|
+
const bucket = new Set();
|
|
4323
|
+
for await (const element of iterable) {
|
|
4324
|
+
if (!bucket.has(element)) {
|
|
4325
|
+
yield element;
|
|
4326
|
+
bucket.add(element);
|
|
4327
|
+
}
|
|
4328
|
+
}
|
|
4142
4329
|
}
|
|
4330
|
+
uniqAsync$1.uniqAsync = uniqAsync;
|
|
4143
4331
|
|
|
4144
|
-
var
|
|
4332
|
+
var uniqByAsync$1 = {};
|
|
4145
4333
|
|
|
4146
|
-
|
|
4147
|
-
const types_1$
|
|
4148
|
-
function
|
|
4149
|
-
if ((0, types_1$
|
|
4150
|
-
return
|
|
4334
|
+
uniqByAsync$1.uniqByAsync = void 0;
|
|
4335
|
+
const types_1$9 = es2018$6;
|
|
4336
|
+
function uniqByAsync(iterable, fn) {
|
|
4337
|
+
if ((0, types_1$9.isAsyncIterable)(iterable)) {
|
|
4338
|
+
return uniqByAsyncIterable(iterable);
|
|
4151
4339
|
}
|
|
4152
4340
|
else {
|
|
4153
|
-
return
|
|
4341
|
+
return uniqByIterable(iterable);
|
|
4154
4342
|
}
|
|
4155
|
-
async function*
|
|
4343
|
+
async function* uniqByAsyncIterable(iterable) {
|
|
4344
|
+
const bucket = new Set();
|
|
4156
4345
|
let index = 0;
|
|
4157
4346
|
for await (const element of iterable) {
|
|
4158
|
-
|
|
4347
|
+
const result = await fn(element, index);
|
|
4348
|
+
if (!bucket.has(result)) {
|
|
4349
|
+
yield element;
|
|
4350
|
+
bucket.add(result);
|
|
4351
|
+
}
|
|
4159
4352
|
index++;
|
|
4160
4353
|
}
|
|
4161
4354
|
}
|
|
4162
|
-
async function*
|
|
4355
|
+
async function* uniqByIterable(iterable) {
|
|
4356
|
+
const bucket = new Set();
|
|
4163
4357
|
let index = 0;
|
|
4164
4358
|
for (const element of iterable) {
|
|
4165
|
-
|
|
4359
|
+
const result = await fn(element, index);
|
|
4360
|
+
if (!bucket.has(result)) {
|
|
4361
|
+
yield element;
|
|
4362
|
+
bucket.add(result);
|
|
4363
|
+
}
|
|
4166
4364
|
index++;
|
|
4167
4365
|
}
|
|
4168
4366
|
}
|
|
4169
4367
|
}
|
|
4170
|
-
|
|
4368
|
+
uniqByAsync$1.uniqByAsync = uniqByAsync;
|
|
4171
4369
|
|
|
4172
|
-
var
|
|
4370
|
+
var uniqBy$1 = {};
|
|
4173
4371
|
|
|
4174
|
-
|
|
4175
|
-
function*
|
|
4372
|
+
uniqBy$1.uniqBy = void 0;
|
|
4373
|
+
function* uniqBy(iterable, fn) {
|
|
4374
|
+
const bucket = new Set();
|
|
4176
4375
|
let index = 0;
|
|
4177
4376
|
for (const element of iterable) {
|
|
4178
|
-
|
|
4377
|
+
const result = fn(element, index);
|
|
4378
|
+
if (!bucket.has(result)) {
|
|
4379
|
+
yield element;
|
|
4380
|
+
bucket.add(result);
|
|
4381
|
+
}
|
|
4179
4382
|
index++;
|
|
4180
4383
|
}
|
|
4181
4384
|
}
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
var repeatAsync = {};
|
|
4185
|
-
|
|
4186
|
-
var hasRequiredRepeatAsync;
|
|
4187
|
-
|
|
4188
|
-
function requireRepeatAsync () {
|
|
4189
|
-
if (hasRequiredRepeatAsync) return repeatAsync;
|
|
4190
|
-
hasRequiredRepeatAsync = 1;
|
|
4191
|
-
repeatAsync.repeatAsync = void 0;
|
|
4192
|
-
const go_1 = es2018$6;
|
|
4193
|
-
const errors_1 = requireEs2018();
|
|
4194
|
-
function repeatAsync$1(iterable, times) {
|
|
4195
|
-
(0, errors_1.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
4196
|
-
(0, errors_1.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
4197
|
-
if (times === Infinity)
|
|
4198
|
-
warnInfiniteLoop();
|
|
4199
|
-
return (0, go_1.go)(async function* () {
|
|
4200
|
-
const cache = [];
|
|
4201
|
-
if (times > 0) {
|
|
4202
|
-
for await (const element of iterable) {
|
|
4203
|
-
yield element;
|
|
4204
|
-
cache.push(element);
|
|
4205
|
-
}
|
|
4206
|
-
times--;
|
|
4207
|
-
}
|
|
4208
|
-
while (times > 0) {
|
|
4209
|
-
yield* cache;
|
|
4210
|
-
times--;
|
|
4211
|
-
}
|
|
4212
|
-
});
|
|
4213
|
-
}
|
|
4214
|
-
repeatAsync.repeatAsync = repeatAsync$1;
|
|
4215
|
-
function warnInfiniteLoop() {
|
|
4216
|
-
if (isProduction())
|
|
4217
|
-
return;
|
|
4218
|
-
console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
|
|
4219
|
-
}
|
|
4220
|
-
function isProduction() {
|
|
4221
|
-
return process.env.NODE_ENV === 'production';
|
|
4222
|
-
}
|
|
4223
|
-
|
|
4224
|
-
return repeatAsync;
|
|
4225
|
-
}
|
|
4226
|
-
|
|
4227
|
-
var repeat$2 = {};
|
|
4385
|
+
uniqBy$1.uniqBy = uniqBy;
|
|
4228
4386
|
|
|
4229
|
-
var
|
|
4387
|
+
var uniq$1 = {};
|
|
4230
4388
|
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
if (times === Infinity)
|
|
4241
|
-
warnInfiniteLoop();
|
|
4242
|
-
return (0, go_1.go)(function* () {
|
|
4243
|
-
const cache = [];
|
|
4244
|
-
if (times > 0) {
|
|
4245
|
-
for (const element of iterable) {
|
|
4246
|
-
yield element;
|
|
4247
|
-
cache.push(element);
|
|
4248
|
-
}
|
|
4249
|
-
times--;
|
|
4250
|
-
}
|
|
4251
|
-
while (times > 0) {
|
|
4252
|
-
yield* cache;
|
|
4253
|
-
times--;
|
|
4254
|
-
}
|
|
4255
|
-
});
|
|
4256
|
-
}
|
|
4257
|
-
repeat$2.repeat = repeat;
|
|
4258
|
-
function warnInfiniteLoop() {
|
|
4259
|
-
if (isProduction())
|
|
4260
|
-
return;
|
|
4261
|
-
console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
|
|
4262
|
-
}
|
|
4263
|
-
function isProduction() {
|
|
4264
|
-
return process.env.NODE_ENV === 'production';
|
|
4265
|
-
}
|
|
4266
|
-
|
|
4267
|
-
return repeat$2;
|
|
4389
|
+
uniq$1.uniq = void 0;
|
|
4390
|
+
function* uniq(iterable) {
|
|
4391
|
+
const bucket = new Set();
|
|
4392
|
+
for (const element of iterable) {
|
|
4393
|
+
if (!bucket.has(element)) {
|
|
4394
|
+
yield element;
|
|
4395
|
+
bucket.add(element);
|
|
4396
|
+
}
|
|
4397
|
+
}
|
|
4268
4398
|
}
|
|
4399
|
+
uniq$1.uniq = uniq;
|
|
4269
4400
|
|
|
4270
|
-
var
|
|
4271
|
-
|
|
4272
|
-
var hasRequiredSliceAsync;
|
|
4401
|
+
var zipAsync$1 = {};
|
|
4273
4402
|
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
(0, errors_1.assert)(Number.isInteger(end), 'The parameter end must be an integer');
|
|
4284
|
-
(0, errors_1.assert)(end >= start, 'The parameter end must be greater than or equal to start');
|
|
4285
|
-
return (0, go_1.go)(async function* () {
|
|
4286
|
-
let index = 0;
|
|
4287
|
-
for await (const element of iterable) {
|
|
4288
|
-
if (index >= end)
|
|
4289
|
-
break;
|
|
4290
|
-
if (index >= start)
|
|
4291
|
-
yield element;
|
|
4292
|
-
index++;
|
|
4293
|
-
}
|
|
4294
|
-
});
|
|
4295
|
-
}
|
|
4296
|
-
sliceAsync.sliceAsync = sliceAsync$1;
|
|
4297
|
-
|
|
4298
|
-
return sliceAsync;
|
|
4299
|
-
}
|
|
4300
|
-
|
|
4301
|
-
var slice = {};
|
|
4302
|
-
|
|
4303
|
-
var hasRequiredSlice;
|
|
4304
|
-
|
|
4305
|
-
function requireSlice () {
|
|
4306
|
-
if (hasRequiredSlice) return slice;
|
|
4307
|
-
hasRequiredSlice = 1;
|
|
4308
|
-
slice.slice = void 0;
|
|
4309
|
-
const go_1 = es2018$6;
|
|
4310
|
-
const errors_1 = requireEs2018();
|
|
4311
|
-
function slice$1(iterable, start, end = Infinity) {
|
|
4312
|
-
(0, errors_1.assert)(Number.isInteger(start), 'The parameter start must be an integer');
|
|
4313
|
-
(0, errors_1.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
4314
|
-
(0, errors_1.assert)(Number.isInteger(end), 'The parameter end must be an integer');
|
|
4315
|
-
(0, errors_1.assert)(end >= start, 'The parameter end must be greater than or equal to start');
|
|
4316
|
-
return (0, go_1.go)(function* () {
|
|
4317
|
-
let index = 0;
|
|
4318
|
-
for (const element of iterable) {
|
|
4319
|
-
if (index >= end)
|
|
4320
|
-
break;
|
|
4321
|
-
if (index >= start)
|
|
4322
|
-
yield element;
|
|
4323
|
-
index++;
|
|
4324
|
-
}
|
|
4325
|
-
});
|
|
4326
|
-
}
|
|
4327
|
-
slice.slice = slice$1;
|
|
4328
|
-
|
|
4329
|
-
return slice;
|
|
4403
|
+
zipAsync$1.zipAsync = void 0;
|
|
4404
|
+
const types_1$8 = es2018$6;
|
|
4405
|
+
var Kind;
|
|
4406
|
+
(function (Kind) {
|
|
4407
|
+
Kind[Kind["Sync"] = 0] = "Sync";
|
|
4408
|
+
Kind[Kind["Async"] = 1] = "Async";
|
|
4409
|
+
})(Kind || (Kind = {}));
|
|
4410
|
+
function zipAsync(iterable, ...otherIterables) {
|
|
4411
|
+
return zipWithSize$1(iterable, ...otherIterables);
|
|
4330
4412
|
}
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
if (element === separator) {
|
|
4339
|
-
yield buffer;
|
|
4340
|
-
buffer = [];
|
|
4413
|
+
zipAsync$1.zipAsync = zipAsync;
|
|
4414
|
+
async function* zipWithSize$1(...iterables) {
|
|
4415
|
+
var _a, _b, _c, _d;
|
|
4416
|
+
const length = iterables.length;
|
|
4417
|
+
const iterators = iterables.map(iterable => {
|
|
4418
|
+
if ((0, types_1$8.isAsyncIterable)(iterable)) {
|
|
4419
|
+
return [Kind.Async, iterable[Symbol.asyncIterator]()];
|
|
4341
4420
|
}
|
|
4342
4421
|
else {
|
|
4343
|
-
|
|
4422
|
+
return [Kind.Sync, iterable[Symbol.iterator]()];
|
|
4344
4423
|
}
|
|
4345
|
-
}
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
for (const element of iterable) {
|
|
4365
|
-
if (await predicate(element, index)) {
|
|
4366
|
-
yield buffer;
|
|
4367
|
-
buffer = [];
|
|
4368
|
-
}
|
|
4369
|
-
else {
|
|
4370
|
-
buffer.push(element);
|
|
4424
|
+
});
|
|
4425
|
+
const dones = iterators.map(() => false);
|
|
4426
|
+
try {
|
|
4427
|
+
while (true) {
|
|
4428
|
+
const result = new Array(length);
|
|
4429
|
+
for (let i = 0; i < length; i++) {
|
|
4430
|
+
const [kind, iterator] = iterators[i];
|
|
4431
|
+
let temp;
|
|
4432
|
+
if (kind === Kind.Async) {
|
|
4433
|
+
temp = await iterator.next();
|
|
4434
|
+
}
|
|
4435
|
+
else {
|
|
4436
|
+
temp = iterator.next();
|
|
4437
|
+
}
|
|
4438
|
+
if (temp.done) {
|
|
4439
|
+
dones[i] = true;
|
|
4440
|
+
return;
|
|
4441
|
+
}
|
|
4442
|
+
result[i] = temp.value;
|
|
4371
4443
|
}
|
|
4372
|
-
|
|
4444
|
+
yield result;
|
|
4373
4445
|
}
|
|
4374
|
-
yield buffer;
|
|
4375
4446
|
}
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
yield buffer;
|
|
4382
|
-
buffer = [];
|
|
4447
|
+
finally {
|
|
4448
|
+
const undoneIterators = iterators.filter((_, i) => !dones[i]);
|
|
4449
|
+
for (const [kind, iterator] of undoneIterators) {
|
|
4450
|
+
if (kind === Kind.Async) {
|
|
4451
|
+
await ((_b = (_a = iterator).return) === null || _b === void 0 ? void 0 : _b.call(_a));
|
|
4383
4452
|
}
|
|
4384
4453
|
else {
|
|
4385
|
-
|
|
4454
|
+
(_d = (_c = iterator).return) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
4386
4455
|
}
|
|
4387
|
-
index++;
|
|
4388
4456
|
}
|
|
4389
|
-
yield buffer;
|
|
4390
4457
|
}
|
|
4391
4458
|
}
|
|
4392
|
-
splitByAsync$1.splitByAsync = splitByAsync;
|
|
4393
4459
|
|
|
4394
|
-
var
|
|
4460
|
+
var zip$5 = {};
|
|
4395
4461
|
|
|
4396
|
-
|
|
4397
|
-
function
|
|
4398
|
-
|
|
4399
|
-
let index = 0;
|
|
4400
|
-
for (const element of iterable) {
|
|
4401
|
-
if (predicate(element, index)) {
|
|
4402
|
-
yield buffer;
|
|
4403
|
-
buffer = [];
|
|
4404
|
-
}
|
|
4405
|
-
else {
|
|
4406
|
-
buffer.push(element);
|
|
4407
|
-
}
|
|
4408
|
-
index++;
|
|
4409
|
-
}
|
|
4410
|
-
yield buffer;
|
|
4462
|
+
zip$5.zip = void 0;
|
|
4463
|
+
function zip$4(iterable, ...otherIterables) {
|
|
4464
|
+
return zipWithSize(iterable, ...otherIterables);
|
|
4411
4465
|
}
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4466
|
+
zip$5.zip = zip$4;
|
|
4467
|
+
function* zipWithSize(...iterables) {
|
|
4468
|
+
const length = iterables.length;
|
|
4469
|
+
const iterators = iterables.map(iterable => iterable[Symbol.iterator]());
|
|
4470
|
+
const dones = iterators.map(() => false);
|
|
4471
|
+
try {
|
|
4472
|
+
while (true) {
|
|
4473
|
+
const result = new Array(length);
|
|
4474
|
+
for (let i = 0; i < length; i++) {
|
|
4475
|
+
const { value, done } = iterators[i].next();
|
|
4476
|
+
if (done) {
|
|
4477
|
+
dones[i] = true;
|
|
4478
|
+
return;
|
|
4479
|
+
}
|
|
4480
|
+
result[i] = value;
|
|
4481
|
+
}
|
|
4482
|
+
yield result;
|
|
4426
4483
|
}
|
|
4427
4484
|
}
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
var takeAsync = {};
|
|
4433
|
-
|
|
4434
|
-
var hasRequiredTakeAsync;
|
|
4435
|
-
|
|
4436
|
-
function requireTakeAsync () {
|
|
4437
|
-
if (hasRequiredTakeAsync) return takeAsync;
|
|
4438
|
-
hasRequiredTakeAsync = 1;
|
|
4439
|
-
takeAsync.takeAsync = void 0;
|
|
4440
|
-
const go_1 = es2018$6;
|
|
4441
|
-
const errors_1 = requireEs2018();
|
|
4442
|
-
function takeAsync$1(iterable, count) {
|
|
4443
|
-
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
4444
|
-
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
4445
|
-
return (0, go_1.go)(async function* () {
|
|
4446
|
-
if (count === 0)
|
|
4447
|
-
return;
|
|
4448
|
-
for await (const element of iterable) {
|
|
4449
|
-
yield element;
|
|
4450
|
-
count--;
|
|
4451
|
-
if (count === 0)
|
|
4452
|
-
break;
|
|
4453
|
-
}
|
|
4454
|
-
});
|
|
4455
|
-
}
|
|
4456
|
-
takeAsync.takeAsync = takeAsync$1;
|
|
4457
|
-
|
|
4458
|
-
return takeAsync;
|
|
4485
|
+
finally {
|
|
4486
|
+
const undoneIterators = iterators.filter((_, i) => !dones[i]);
|
|
4487
|
+
undoneIterators.forEach(x => { var _a; return (_a = x.return) === null || _a === void 0 ? void 0 : _a.call(x); });
|
|
4488
|
+
}
|
|
4459
4489
|
}
|
|
4460
4490
|
|
|
4461
|
-
var
|
|
4462
|
-
|
|
4463
|
-
var hasRequiredTakeRightAsync;
|
|
4491
|
+
var hasRequiredMiddleware;
|
|
4464
4492
|
|
|
4465
|
-
function
|
|
4466
|
-
if (
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4493
|
+
function requireMiddleware () {
|
|
4494
|
+
if (hasRequiredMiddleware) return middleware;
|
|
4495
|
+
hasRequiredMiddleware = 1;
|
|
4496
|
+
(function (exports) {
|
|
4497
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4498
|
+
if (k2 === undefined) k2 = k;
|
|
4499
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4500
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
4501
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
4502
|
+
}
|
|
4503
|
+
Object.defineProperty(o, k2, desc);
|
|
4504
|
+
}) : (function(o, m, k, k2) {
|
|
4505
|
+
if (k2 === undefined) k2 = k;
|
|
4506
|
+
o[k2] = m[k];
|
|
4507
|
+
}));
|
|
4508
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
4509
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
4510
|
+
};__exportStar(requireChunkAsync(), exports);
|
|
4511
|
+
__exportStar(chunkByAsync$1, exports);
|
|
4512
|
+
__exportStar(chunkBy$1, exports);
|
|
4513
|
+
__exportStar(requireChunk(), exports);
|
|
4514
|
+
__exportStar(concatAsync$1, exports);
|
|
4515
|
+
__exportStar(concat$5, exports);
|
|
4516
|
+
__exportStar(requireDropAsync(), exports);
|
|
4517
|
+
__exportStar(requireDropRightAsync(), exports);
|
|
4518
|
+
__exportStar(requireDropRight(), exports);
|
|
4519
|
+
__exportStar(dropUntilAsync$1, exports);
|
|
4520
|
+
__exportStar(dropUntil$1, exports);
|
|
4521
|
+
__exportStar(requireDrop(), exports);
|
|
4522
|
+
__exportStar(filterAsync$1, exports);
|
|
4523
|
+
__exportStar(filter$3, exports);
|
|
4524
|
+
__exportStar(requireFlattenAsync(), exports);
|
|
4525
|
+
__exportStar(flattenByAsync$1, exports);
|
|
4526
|
+
__exportStar(flattenBy$1, exports);
|
|
4527
|
+
__exportStar(requireFlattenDeepAsync(), exports);
|
|
4528
|
+
__exportStar(requireFlattenDeep(), exports);
|
|
4529
|
+
__exportStar(requireFlatten(), exports);
|
|
4530
|
+
__exportStar(mapAsync$1, exports);
|
|
4531
|
+
__exportStar(map$3, exports);
|
|
4532
|
+
__exportStar(requireRepeatAsync(), exports);
|
|
4533
|
+
__exportStar(requireRepeat(), exports);
|
|
4534
|
+
__exportStar(requireSliceAsync(), exports);
|
|
4535
|
+
__exportStar(requireSlice(), exports);
|
|
4536
|
+
__exportStar(splitAsync$1, exports);
|
|
4537
|
+
__exportStar(splitByAsync$1, exports);
|
|
4538
|
+
__exportStar(splitBy$1, exports);
|
|
4539
|
+
__exportStar(split$1, exports);
|
|
4540
|
+
__exportStar(requireTakeAsync(), exports);
|
|
4541
|
+
__exportStar(requireTakeRightAsync(), exports);
|
|
4542
|
+
__exportStar(requireTakeRight(), exports);
|
|
4543
|
+
__exportStar(takeUntilAsync$1, exports);
|
|
4544
|
+
__exportStar(takeUntil$3, exports);
|
|
4545
|
+
__exportStar(requireTake(), exports);
|
|
4546
|
+
__exportStar(tapAsync$1, exports);
|
|
4547
|
+
__exportStar(tap$3, exports);
|
|
4548
|
+
__exportStar(toAsyncIterable$1, exports);
|
|
4549
|
+
__exportStar(transformAsync$1, exports);
|
|
4550
|
+
__exportStar(transform$1, exports);
|
|
4551
|
+
__exportStar(uniqAsync$1, exports);
|
|
4552
|
+
__exportStar(uniqByAsync$1, exports);
|
|
4553
|
+
__exportStar(uniqBy$1, exports);
|
|
4554
|
+
__exportStar(uniq$1, exports);
|
|
4555
|
+
__exportStar(zipAsync$1, exports);
|
|
4556
|
+
__exportStar(zip$5, exports);
|
|
4557
|
+
|
|
4558
|
+
} (middleware));
|
|
4559
|
+
return middleware;
|
|
4497
4560
|
}
|
|
4498
4561
|
|
|
4499
|
-
var
|
|
4562
|
+
var output = {};
|
|
4500
4563
|
|
|
4501
|
-
var
|
|
4564
|
+
var consume$1 = {};
|
|
4502
4565
|
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
takeRight.takeRight = void 0;
|
|
4507
|
-
const go_1 = es2018$6;
|
|
4508
|
-
const errors_1 = requireEs2018();
|
|
4509
|
-
function takeRight$1(iterable, count) {
|
|
4510
|
-
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
4511
|
-
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
4512
|
-
return (0, go_1.go)(function* () {
|
|
4513
|
-
var _a;
|
|
4514
|
-
const iterator = iterable[Symbol.iterator]();
|
|
4515
|
-
let done;
|
|
4516
|
-
try {
|
|
4517
|
-
const buffer = [];
|
|
4518
|
-
let value;
|
|
4519
|
-
while ({ value, done } = iterator.next(), !done) {
|
|
4520
|
-
buffer.push(value);
|
|
4521
|
-
if (buffer.length > count)
|
|
4522
|
-
buffer.shift();
|
|
4523
|
-
}
|
|
4524
|
-
yield* buffer;
|
|
4525
|
-
}
|
|
4526
|
-
finally {
|
|
4527
|
-
if (!done)
|
|
4528
|
-
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
4529
|
-
}
|
|
4530
|
-
});
|
|
4531
|
-
}
|
|
4532
|
-
takeRight.takeRight = takeRight$1;
|
|
4533
|
-
|
|
4534
|
-
return takeRight;
|
|
4566
|
+
consume$1.consume = void 0;
|
|
4567
|
+
function consume(iterable, consumer) {
|
|
4568
|
+
return consumer(iterable);
|
|
4535
4569
|
}
|
|
4570
|
+
consume$1.consume = consume;
|
|
4536
4571
|
|
|
4537
|
-
var
|
|
4572
|
+
var eachAsync$1 = {};
|
|
4538
4573
|
|
|
4539
|
-
|
|
4540
|
-
const types_1$
|
|
4541
|
-
function
|
|
4542
|
-
if ((0, types_1$
|
|
4543
|
-
return
|
|
4574
|
+
eachAsync$1.eachAsync = void 0;
|
|
4575
|
+
const types_1$7 = es2018$6;
|
|
4576
|
+
function eachAsync(iterable, fn) {
|
|
4577
|
+
if ((0, types_1$7.isAsyncIterable)(iterable)) {
|
|
4578
|
+
return eachAsyncIterable(iterable);
|
|
4544
4579
|
}
|
|
4545
4580
|
else {
|
|
4546
|
-
return
|
|
4581
|
+
return eachIterable(iterable);
|
|
4547
4582
|
}
|
|
4548
|
-
async function
|
|
4583
|
+
async function eachAsyncIterable(iterable) {
|
|
4549
4584
|
let index = 0;
|
|
4550
4585
|
for await (const element of iterable) {
|
|
4551
|
-
|
|
4552
|
-
break;
|
|
4553
|
-
yield element;
|
|
4586
|
+
await fn(element, index);
|
|
4554
4587
|
index++;
|
|
4555
4588
|
}
|
|
4556
4589
|
}
|
|
4557
|
-
async function
|
|
4590
|
+
async function eachIterable(iterable) {
|
|
4558
4591
|
let index = 0;
|
|
4559
4592
|
for (const element of iterable) {
|
|
4560
|
-
|
|
4561
|
-
break;
|
|
4562
|
-
yield element;
|
|
4593
|
+
await fn(element, index);
|
|
4563
4594
|
index++;
|
|
4564
4595
|
}
|
|
4565
4596
|
}
|
|
4566
4597
|
}
|
|
4567
|
-
|
|
4598
|
+
eachAsync$1.eachAsync = eachAsync;
|
|
4568
4599
|
|
|
4569
|
-
var
|
|
4600
|
+
var each$1 = {};
|
|
4570
4601
|
|
|
4571
|
-
|
|
4572
|
-
function
|
|
4602
|
+
each$1.each = void 0;
|
|
4603
|
+
function each(iterable, fn) {
|
|
4573
4604
|
let index = 0;
|
|
4574
4605
|
for (const element of iterable) {
|
|
4575
|
-
|
|
4576
|
-
break;
|
|
4577
|
-
yield element;
|
|
4606
|
+
fn(element, index);
|
|
4578
4607
|
index++;
|
|
4579
4608
|
}
|
|
4580
4609
|
}
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
var take$2 = {};
|
|
4584
|
-
|
|
4585
|
-
var hasRequiredTake;
|
|
4586
|
-
|
|
4587
|
-
function requireTake () {
|
|
4588
|
-
if (hasRequiredTake) return take$2;
|
|
4589
|
-
hasRequiredTake = 1;
|
|
4590
|
-
take$2.take = void 0;
|
|
4591
|
-
const go_1 = es2018$6;
|
|
4592
|
-
const errors_1 = requireEs2018();
|
|
4593
|
-
function take(iterable, count) {
|
|
4594
|
-
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
4595
|
-
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
4596
|
-
return (0, go_1.go)(function* () {
|
|
4597
|
-
if (count === 0)
|
|
4598
|
-
return;
|
|
4599
|
-
for (const element of iterable) {
|
|
4600
|
-
yield element;
|
|
4601
|
-
count--;
|
|
4602
|
-
if (count === 0)
|
|
4603
|
-
break;
|
|
4604
|
-
}
|
|
4605
|
-
});
|
|
4606
|
-
}
|
|
4607
|
-
take$2.take = take;
|
|
4608
|
-
|
|
4609
|
-
return take$2;
|
|
4610
|
-
}
|
|
4610
|
+
each$1.each = each;
|
|
4611
4611
|
|
|
4612
|
-
var
|
|
4612
|
+
var everyAsync$1 = {};
|
|
4613
4613
|
|
|
4614
|
-
|
|
4615
|
-
const types_1$
|
|
4616
|
-
function
|
|
4617
|
-
if ((0, types_1$
|
|
4618
|
-
return
|
|
4614
|
+
everyAsync$1.everyAsync = void 0;
|
|
4615
|
+
const types_1$6 = es2018$6;
|
|
4616
|
+
function everyAsync(iterable, predicate) {
|
|
4617
|
+
if ((0, types_1$6.isAsyncIterable)(iterable)) {
|
|
4618
|
+
return everyAsyncIterable(iterable);
|
|
4619
4619
|
}
|
|
4620
4620
|
else {
|
|
4621
|
-
return
|
|
4621
|
+
return everyIterable(iterable);
|
|
4622
4622
|
}
|
|
4623
|
-
async function
|
|
4623
|
+
async function everyIterable(iterable) {
|
|
4624
4624
|
let index = 0;
|
|
4625
4625
|
for (const element of iterable) {
|
|
4626
|
-
await
|
|
4627
|
-
|
|
4626
|
+
if (!await predicate(element, index))
|
|
4627
|
+
return false;
|
|
4628
4628
|
index++;
|
|
4629
4629
|
}
|
|
4630
|
+
return true;
|
|
4630
4631
|
}
|
|
4631
|
-
async function
|
|
4632
|
+
async function everyAsyncIterable(iterable) {
|
|
4632
4633
|
let index = 0;
|
|
4633
4634
|
for await (const element of iterable) {
|
|
4634
|
-
await
|
|
4635
|
-
|
|
4635
|
+
if (!await predicate(element, index))
|
|
4636
|
+
return false;
|
|
4636
4637
|
index++;
|
|
4637
4638
|
}
|
|
4639
|
+
return true;
|
|
4638
4640
|
}
|
|
4639
4641
|
}
|
|
4640
|
-
|
|
4642
|
+
everyAsync$1.everyAsync = everyAsync;
|
|
4641
4643
|
|
|
4642
|
-
var
|
|
4644
|
+
var every$3 = {};
|
|
4643
4645
|
|
|
4644
|
-
|
|
4645
|
-
function
|
|
4646
|
+
every$3.every = void 0;
|
|
4647
|
+
function every$2(iterable, predicate) {
|
|
4646
4648
|
let index = 0;
|
|
4647
4649
|
for (const element of iterable) {
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
+
if (!predicate(element, index))
|
|
4651
|
+
return false;
|
|
4650
4652
|
index++;
|
|
4651
4653
|
}
|
|
4654
|
+
return true;
|
|
4652
4655
|
}
|
|
4653
|
-
|
|
4656
|
+
every$3.every = every$2;
|
|
4654
4657
|
|
|
4655
|
-
var
|
|
4658
|
+
var findAsync$1 = {};
|
|
4656
4659
|
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4660
|
+
findAsync$1.findAsync = void 0;
|
|
4661
|
+
const types_1$5 = es2018$6;
|
|
4662
|
+
function findAsync(iterable, predicate) {
|
|
4663
|
+
if ((0, types_1$5.isAsyncIterable)(iterable)) {
|
|
4664
|
+
return findAsyncIterable(iterable);
|
|
4665
|
+
}
|
|
4666
|
+
else {
|
|
4667
|
+
return findIterable(iterable);
|
|
4668
|
+
}
|
|
4669
|
+
async function findIterable(iterable) {
|
|
4670
|
+
let index = 0;
|
|
4671
|
+
for (const element of iterable) {
|
|
4672
|
+
if (await predicate(element, index))
|
|
4673
|
+
return element;
|
|
4674
|
+
index++;
|
|
4675
|
+
}
|
|
4676
|
+
return undefined;
|
|
4677
|
+
}
|
|
4678
|
+
async function findAsyncIterable(iterable) {
|
|
4679
|
+
let index = 0;
|
|
4680
|
+
for await (const element of iterable) {
|
|
4681
|
+
if (await predicate(element, index))
|
|
4682
|
+
return element;
|
|
4683
|
+
index++;
|
|
4684
|
+
}
|
|
4685
|
+
return undefined;
|
|
4661
4686
|
}
|
|
4662
4687
|
}
|
|
4663
|
-
|
|
4688
|
+
findAsync$1.findAsync = findAsync;
|
|
4664
4689
|
|
|
4665
|
-
var
|
|
4690
|
+
var find$3 = {};
|
|
4666
4691
|
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4692
|
+
find$3.find = void 0;
|
|
4693
|
+
function find$2(iterable, predicate) {
|
|
4694
|
+
let index = 0;
|
|
4695
|
+
for (const element of iterable) {
|
|
4696
|
+
if (predicate(element, index))
|
|
4697
|
+
return element;
|
|
4698
|
+
index++;
|
|
4699
|
+
}
|
|
4700
|
+
return undefined;
|
|
4670
4701
|
}
|
|
4671
|
-
|
|
4702
|
+
find$3.find = find$2;
|
|
4672
4703
|
|
|
4673
|
-
var
|
|
4704
|
+
var firstAsync$1 = {};
|
|
4674
4705
|
|
|
4675
|
-
|
|
4676
|
-
function
|
|
4677
|
-
|
|
4706
|
+
firstAsync$1.firstAsync = void 0;
|
|
4707
|
+
async function firstAsync(iterable) {
|
|
4708
|
+
for await (const element of iterable) {
|
|
4709
|
+
return element;
|
|
4710
|
+
}
|
|
4711
|
+
return undefined;
|
|
4678
4712
|
}
|
|
4679
|
-
|
|
4713
|
+
firstAsync$1.firstAsync = firstAsync;
|
|
4680
4714
|
|
|
4681
|
-
var
|
|
4715
|
+
var first$3 = {};
|
|
4682
4716
|
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
const
|
|
4686
|
-
|
|
4687
|
-
if (!bucket.has(element)) {
|
|
4688
|
-
yield element;
|
|
4689
|
-
bucket.add(element);
|
|
4690
|
-
}
|
|
4717
|
+
first$3.first = void 0;
|
|
4718
|
+
function first$2(iterable) {
|
|
4719
|
+
for (const element of iterable) {
|
|
4720
|
+
return element;
|
|
4691
4721
|
}
|
|
4722
|
+
return undefined;
|
|
4692
4723
|
}
|
|
4693
|
-
|
|
4724
|
+
first$3.first = first$2;
|
|
4694
4725
|
|
|
4695
|
-
var
|
|
4726
|
+
var includesAsync$1 = {};
|
|
4696
4727
|
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
}
|
|
4703
|
-
else {
|
|
4704
|
-
return uniqByIterable(iterable);
|
|
4705
|
-
}
|
|
4706
|
-
async function* uniqByAsyncIterable(iterable) {
|
|
4707
|
-
const bucket = new Set();
|
|
4708
|
-
let index = 0;
|
|
4709
|
-
for await (const element of iterable) {
|
|
4710
|
-
const result = await fn(element, index);
|
|
4711
|
-
if (!bucket.has(result)) {
|
|
4712
|
-
yield element;
|
|
4713
|
-
bucket.add(result);
|
|
4714
|
-
}
|
|
4715
|
-
index++;
|
|
4716
|
-
}
|
|
4717
|
-
}
|
|
4718
|
-
async function* uniqByIterable(iterable) {
|
|
4719
|
-
const bucket = new Set();
|
|
4720
|
-
let index = 0;
|
|
4721
|
-
for (const element of iterable) {
|
|
4722
|
-
const result = await fn(element, index);
|
|
4723
|
-
if (!bucket.has(result)) {
|
|
4724
|
-
yield element;
|
|
4725
|
-
bucket.add(result);
|
|
4726
|
-
}
|
|
4727
|
-
index++;
|
|
4728
|
-
}
|
|
4728
|
+
includesAsync$1.includesAsync = void 0;
|
|
4729
|
+
async function includesAsync(iterable, value) {
|
|
4730
|
+
for await (const element of iterable) {
|
|
4731
|
+
if (element === value)
|
|
4732
|
+
return true;
|
|
4729
4733
|
}
|
|
4734
|
+
return false;
|
|
4730
4735
|
}
|
|
4731
|
-
|
|
4736
|
+
includesAsync$1.includesAsync = includesAsync;
|
|
4732
4737
|
|
|
4733
|
-
var
|
|
4738
|
+
var includes$1 = {};
|
|
4734
4739
|
|
|
4735
|
-
|
|
4736
|
-
function
|
|
4737
|
-
const bucket = new Set();
|
|
4738
|
-
let index = 0;
|
|
4740
|
+
includes$1.includes = void 0;
|
|
4741
|
+
function includes(iterable, value) {
|
|
4739
4742
|
for (const element of iterable) {
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
yield element;
|
|
4743
|
-
bucket.add(result);
|
|
4744
|
-
}
|
|
4745
|
-
index++;
|
|
4743
|
+
if (element === value)
|
|
4744
|
+
return true;
|
|
4746
4745
|
}
|
|
4746
|
+
return false;
|
|
4747
4747
|
}
|
|
4748
|
-
|
|
4748
|
+
includes$1.includes = includes;
|
|
4749
4749
|
|
|
4750
|
-
var
|
|
4750
|
+
var matchAsync$1 = {};
|
|
4751
4751
|
|
|
4752
|
-
|
|
4753
|
-
function
|
|
4754
|
-
const
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4752
|
+
matchAsync$1.matchAsync = void 0;
|
|
4753
|
+
async function matchAsync(iterable, sequence) {
|
|
4754
|
+
const sequenceLength = sequence.length;
|
|
4755
|
+
let matchCount = 0;
|
|
4756
|
+
for await (const element of iterable) {
|
|
4757
|
+
if (element === sequence[matchCount])
|
|
4758
|
+
matchCount++;
|
|
4759
|
+
if (matchCount === sequenceLength)
|
|
4760
|
+
return true;
|
|
4760
4761
|
}
|
|
4762
|
+
return false;
|
|
4761
4763
|
}
|
|
4762
|
-
|
|
4764
|
+
matchAsync$1.matchAsync = matchAsync;
|
|
4763
4765
|
|
|
4764
|
-
var
|
|
4766
|
+
var match$1 = {};
|
|
4765
4767
|
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
}
|
|
4776
|
-
zipAsync$1.zipAsync = zipAsync;
|
|
4777
|
-
async function* zipWithSize$1(...iterables) {
|
|
4778
|
-
var _a, _b, _c, _d;
|
|
4779
|
-
const length = iterables.length;
|
|
4780
|
-
const iterators = iterables.map(iterable => {
|
|
4781
|
-
if ((0, types_1$8.isAsyncIterable)(iterable)) {
|
|
4782
|
-
return [Kind.Async, iterable[Symbol.asyncIterator]()];
|
|
4783
|
-
}
|
|
4784
|
-
else {
|
|
4785
|
-
return [Kind.Sync, iterable[Symbol.iterator]()];
|
|
4786
|
-
}
|
|
4787
|
-
});
|
|
4788
|
-
const dones = iterators.map(() => false);
|
|
4789
|
-
try {
|
|
4790
|
-
while (true) {
|
|
4791
|
-
const result = new Array(length);
|
|
4792
|
-
for (let i = 0; i < length; i++) {
|
|
4793
|
-
const [kind, iterator] = iterators[i];
|
|
4794
|
-
let temp;
|
|
4795
|
-
if (kind === Kind.Async) {
|
|
4796
|
-
temp = await iterator.next();
|
|
4797
|
-
}
|
|
4798
|
-
else {
|
|
4799
|
-
temp = iterator.next();
|
|
4800
|
-
}
|
|
4801
|
-
if (temp.done) {
|
|
4802
|
-
dones[i] = true;
|
|
4803
|
-
return;
|
|
4804
|
-
}
|
|
4805
|
-
result[i] = temp.value;
|
|
4806
|
-
}
|
|
4807
|
-
yield result;
|
|
4808
|
-
}
|
|
4809
|
-
}
|
|
4810
|
-
finally {
|
|
4811
|
-
const undoneIterators = iterators.filter((_, i) => !dones[i]);
|
|
4812
|
-
for (const [kind, iterator] of undoneIterators) {
|
|
4813
|
-
if (kind === Kind.Async) {
|
|
4814
|
-
await ((_b = (_a = iterator).return) === null || _b === void 0 ? void 0 : _b.call(_a));
|
|
4815
|
-
}
|
|
4816
|
-
else {
|
|
4817
|
-
(_d = (_c = iterator).return) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
4818
|
-
}
|
|
4819
|
-
}
|
|
4768
|
+
match$1.match = void 0;
|
|
4769
|
+
function match(iterable, sequence) {
|
|
4770
|
+
const sequenceLength = sequence.length;
|
|
4771
|
+
let matchCount = 0;
|
|
4772
|
+
for (const element of iterable) {
|
|
4773
|
+
if (element === sequence[matchCount])
|
|
4774
|
+
matchCount++;
|
|
4775
|
+
if (matchCount === sequenceLength)
|
|
4776
|
+
return true;
|
|
4820
4777
|
}
|
|
4778
|
+
return false;
|
|
4821
4779
|
}
|
|
4780
|
+
match$1.match = match;
|
|
4822
4781
|
|
|
4823
|
-
var
|
|
4782
|
+
var reduceAsync$1 = {};
|
|
4824
4783
|
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4784
|
+
reduceAsync$1.reduceAsync = void 0;
|
|
4785
|
+
const types_1$4 = es2018$6;
|
|
4786
|
+
function reduceAsync(iterable, fn, initialValue) {
|
|
4787
|
+
if ((0, types_1$4.isUndefined)(initialValue)) {
|
|
4788
|
+
return reduceAsyncWithoutInitialValue(iterable, fn);
|
|
4789
|
+
}
|
|
4790
|
+
else {
|
|
4791
|
+
return reduceAsyncWithInitialValue(iterable, fn, initialValue);
|
|
4792
|
+
}
|
|
4828
4793
|
}
|
|
4829
|
-
|
|
4830
|
-
function
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
return;
|
|
4842
|
-
}
|
|
4843
|
-
result[i] = value;
|
|
4844
|
-
}
|
|
4845
|
-
yield result;
|
|
4794
|
+
reduceAsync$1.reduceAsync = reduceAsync;
|
|
4795
|
+
function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
|
|
4796
|
+
if ((0, types_1$4.isAsyncIterable)(iterable)) {
|
|
4797
|
+
return reduceAsyncIterable(iterable);
|
|
4798
|
+
}
|
|
4799
|
+
else {
|
|
4800
|
+
return reduceIterable(iterable);
|
|
4801
|
+
}
|
|
4802
|
+
async function reduceIterable(iterable) {
|
|
4803
|
+
let result = initialValue, index = 0;
|
|
4804
|
+
for (const currentValue of iterable) {
|
|
4805
|
+
result = await fn(result, currentValue, index++);
|
|
4846
4806
|
}
|
|
4807
|
+
return result;
|
|
4847
4808
|
}
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4809
|
+
async function reduceAsyncIterable(iterable) {
|
|
4810
|
+
let result = initialValue, index = 0;
|
|
4811
|
+
for await (const currentValue of iterable) {
|
|
4812
|
+
result = await fn(result, currentValue, index++);
|
|
4813
|
+
}
|
|
4814
|
+
return result;
|
|
4851
4815
|
}
|
|
4852
4816
|
}
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
function requireMiddleware () {
|
|
4857
|
-
if (hasRequiredMiddleware) return middleware;
|
|
4858
|
-
hasRequiredMiddleware = 1;
|
|
4859
|
-
(function (exports) {
|
|
4860
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4861
|
-
if (k2 === undefined) k2 = k;
|
|
4862
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4863
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
4864
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
4865
|
-
}
|
|
4866
|
-
Object.defineProperty(o, k2, desc);
|
|
4867
|
-
}) : (function(o, m, k, k2) {
|
|
4868
|
-
if (k2 === undefined) k2 = k;
|
|
4869
|
-
o[k2] = m[k];
|
|
4870
|
-
}));
|
|
4871
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
4872
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
4873
|
-
};__exportStar(requireChunkAsync(), exports);
|
|
4874
|
-
__exportStar(chunkByAsync$1, exports);
|
|
4875
|
-
__exportStar(chunkBy$1, exports);
|
|
4876
|
-
__exportStar(requireChunk(), exports);
|
|
4877
|
-
__exportStar(concatAsync$1, exports);
|
|
4878
|
-
__exportStar(concat$5, exports);
|
|
4879
|
-
__exportStar(requireDropAsync(), exports);
|
|
4880
|
-
__exportStar(requireDropRightAsync(), exports);
|
|
4881
|
-
__exportStar(requireDropRight(), exports);
|
|
4882
|
-
__exportStar(dropUntilAsync$1, exports);
|
|
4883
|
-
__exportStar(dropUntil$1, exports);
|
|
4884
|
-
__exportStar(requireDrop(), exports);
|
|
4885
|
-
__exportStar(filterAsync$1, exports);
|
|
4886
|
-
__exportStar(filter$3, exports);
|
|
4887
|
-
__exportStar(requireFlattenAsync(), exports);
|
|
4888
|
-
__exportStar(flattenByAsync$1, exports);
|
|
4889
|
-
__exportStar(flattenBy$1, exports);
|
|
4890
|
-
__exportStar(requireFlattenDeepAsync(), exports);
|
|
4891
|
-
__exportStar(requireFlattenDeep(), exports);
|
|
4892
|
-
__exportStar(requireFlatten(), exports);
|
|
4893
|
-
__exportStar(mapAsync$1, exports);
|
|
4894
|
-
__exportStar(map$3, exports);
|
|
4895
|
-
__exportStar(requireRepeatAsync(), exports);
|
|
4896
|
-
__exportStar(requireRepeat(), exports);
|
|
4897
|
-
__exportStar(requireSliceAsync(), exports);
|
|
4898
|
-
__exportStar(requireSlice(), exports);
|
|
4899
|
-
__exportStar(splitAsync$1, exports);
|
|
4900
|
-
__exportStar(splitByAsync$1, exports);
|
|
4901
|
-
__exportStar(splitBy$1, exports);
|
|
4902
|
-
__exportStar(split$1, exports);
|
|
4903
|
-
__exportStar(requireTakeAsync(), exports);
|
|
4904
|
-
__exportStar(requireTakeRightAsync(), exports);
|
|
4905
|
-
__exportStar(requireTakeRight(), exports);
|
|
4906
|
-
__exportStar(takeUntilAsync$1, exports);
|
|
4907
|
-
__exportStar(takeUntil$3, exports);
|
|
4908
|
-
__exportStar(requireTake(), exports);
|
|
4909
|
-
__exportStar(tapAsync$1, exports);
|
|
4910
|
-
__exportStar(tap$3, exports);
|
|
4911
|
-
__exportStar(toAsyncIterable$1, exports);
|
|
4912
|
-
__exportStar(transformAsync$1, exports);
|
|
4913
|
-
__exportStar(transform$1, exports);
|
|
4914
|
-
__exportStar(uniqAsync$1, exports);
|
|
4915
|
-
__exportStar(uniqByAsync$1, exports);
|
|
4916
|
-
__exportStar(uniqBy$1, exports);
|
|
4917
|
-
__exportStar(uniq$1, exports);
|
|
4918
|
-
__exportStar(zipAsync$1, exports);
|
|
4919
|
-
__exportStar(zip$5, exports);
|
|
4920
|
-
|
|
4921
|
-
} (middleware));
|
|
4922
|
-
return middleware;
|
|
4923
|
-
}
|
|
4924
|
-
|
|
4925
|
-
var output = {};
|
|
4926
|
-
|
|
4927
|
-
var consume$1 = {};
|
|
4928
|
-
|
|
4929
|
-
consume$1.consume = void 0;
|
|
4930
|
-
function consume(iterable, consumer) {
|
|
4931
|
-
return consumer(iterable);
|
|
4932
|
-
}
|
|
4933
|
-
consume$1.consume = consume;
|
|
4934
|
-
|
|
4935
|
-
var eachAsync$1 = {};
|
|
4936
|
-
|
|
4937
|
-
eachAsync$1.eachAsync = void 0;
|
|
4938
|
-
const types_1$7 = es2018$5;
|
|
4939
|
-
function eachAsync(iterable, fn) {
|
|
4940
|
-
if ((0, types_1$7.isAsyncIterable)(iterable)) {
|
|
4941
|
-
return eachAsyncIterable(iterable);
|
|
4817
|
+
function reduceAsyncWithoutInitialValue(iterable, fn) {
|
|
4818
|
+
if ((0, types_1$4.isAsyncIterable)(iterable)) {
|
|
4819
|
+
return reduceAsyncIterable(iterable);
|
|
4942
4820
|
}
|
|
4943
4821
|
else {
|
|
4944
|
-
return
|
|
4822
|
+
return reduceIterable(iterable);
|
|
4945
4823
|
}
|
|
4946
|
-
async function
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4824
|
+
async function reduceAsyncIterable(iterable) {
|
|
4825
|
+
var _a;
|
|
4826
|
+
const iterator = iterable[Symbol.asyncIterator]();
|
|
4827
|
+
let done;
|
|
4828
|
+
try {
|
|
4829
|
+
let result = await readInitialValue(iterator);
|
|
4830
|
+
let index = 1;
|
|
4831
|
+
let value;
|
|
4832
|
+
while ({ value, done } = await iterator.next(), !done) {
|
|
4833
|
+
result = await fn(result, value, index++);
|
|
4834
|
+
}
|
|
4835
|
+
return result;
|
|
4951
4836
|
}
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4837
|
+
finally {
|
|
4838
|
+
if (!done)
|
|
4839
|
+
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
4840
|
+
}
|
|
4841
|
+
async function readInitialValue(iterator) {
|
|
4842
|
+
const result = await iterator.next();
|
|
4843
|
+
if (result.done) {
|
|
4844
|
+
done = true;
|
|
4845
|
+
throw new Error('Reduce of empty iterable with no initial value');
|
|
4846
|
+
}
|
|
4847
|
+
return result.value;
|
|
4958
4848
|
}
|
|
4959
4849
|
}
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4850
|
+
async function reduceIterable(iterable) {
|
|
4851
|
+
var _a;
|
|
4852
|
+
const iterator = iterable[Symbol.iterator]();
|
|
4853
|
+
let done;
|
|
4854
|
+
try {
|
|
4855
|
+
let result = readInitialValue(iterator);
|
|
4856
|
+
let index = 1;
|
|
4857
|
+
let value;
|
|
4858
|
+
while ({ value, done } = iterator.next(), !done) {
|
|
4859
|
+
result = await fn(result, value, index++);
|
|
4860
|
+
}
|
|
4861
|
+
return result;
|
|
4862
|
+
}
|
|
4863
|
+
finally {
|
|
4864
|
+
if (!done)
|
|
4865
|
+
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
4866
|
+
}
|
|
4867
|
+
function readInitialValue(iterator) {
|
|
4868
|
+
const result = iterator.next();
|
|
4869
|
+
if (result.done) {
|
|
4870
|
+
done = true;
|
|
4871
|
+
throw new Error('Reduce of empty iterable with no initial value');
|
|
4872
|
+
}
|
|
4873
|
+
return result.value;
|
|
4874
|
+
}
|
|
4971
4875
|
}
|
|
4972
4876
|
}
|
|
4973
|
-
each$1.each = each;
|
|
4974
4877
|
|
|
4975
|
-
var
|
|
4878
|
+
var reduce$3 = {};
|
|
4976
4879
|
|
|
4977
|
-
|
|
4978
|
-
const types_1$
|
|
4979
|
-
function
|
|
4980
|
-
if ((0, types_1$
|
|
4981
|
-
return
|
|
4880
|
+
reduce$3.reduce = void 0;
|
|
4881
|
+
const types_1$3 = es2018$6;
|
|
4882
|
+
function reduce$2(iterable, fn, initialValue) {
|
|
4883
|
+
if ((0, types_1$3.isUndefined)(initialValue)) {
|
|
4884
|
+
return reduceWithoutInitialValue(iterable, fn);
|
|
4982
4885
|
}
|
|
4983
4886
|
else {
|
|
4984
|
-
return
|
|
4887
|
+
return reduceWithInitialValue(iterable, fn, initialValue);
|
|
4985
4888
|
}
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
}
|
|
4993
|
-
return true;
|
|
4889
|
+
}
|
|
4890
|
+
reduce$3.reduce = reduce$2;
|
|
4891
|
+
function reduceWithInitialValue(iterable, fn, initialValue) {
|
|
4892
|
+
let result = initialValue, index = 0;
|
|
4893
|
+
for (const currentValue of iterable) {
|
|
4894
|
+
result = fn(result, currentValue, index++);
|
|
4994
4895
|
}
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
4896
|
+
return result;
|
|
4897
|
+
}
|
|
4898
|
+
function reduceWithoutInitialValue(iterable, fn) {
|
|
4899
|
+
var _a;
|
|
4900
|
+
const iterator = iterable[Symbol.iterator]();
|
|
4901
|
+
let done;
|
|
4902
|
+
try {
|
|
4903
|
+
let result = readInitialValue(iterator);
|
|
4904
|
+
let index = 1;
|
|
4905
|
+
let value;
|
|
4906
|
+
while ({ value, done } = iterator.next(), !done) {
|
|
4907
|
+
result = fn(result, value, index++);
|
|
5001
4908
|
}
|
|
5002
|
-
return
|
|
4909
|
+
return result;
|
|
5003
4910
|
}
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
index++;
|
|
4911
|
+
finally {
|
|
4912
|
+
if (!done)
|
|
4913
|
+
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
4914
|
+
}
|
|
4915
|
+
function readInitialValue(iterator) {
|
|
4916
|
+
const result = iterator.next();
|
|
4917
|
+
if (result.done) {
|
|
4918
|
+
done = true;
|
|
4919
|
+
throw new Error('Reduce of empty iterable with no initial value');
|
|
4920
|
+
}
|
|
4921
|
+
return result.value;
|
|
5016
4922
|
}
|
|
5017
|
-
return true;
|
|
5018
4923
|
}
|
|
5019
|
-
every$3.every = every$2;
|
|
5020
4924
|
|
|
5021
|
-
var
|
|
4925
|
+
var someAsync$1 = {};
|
|
5022
4926
|
|
|
5023
|
-
|
|
5024
|
-
const types_1$
|
|
5025
|
-
function
|
|
5026
|
-
if ((0, types_1$
|
|
5027
|
-
return
|
|
4927
|
+
someAsync$1.someAsync = void 0;
|
|
4928
|
+
const types_1$2 = es2018$6;
|
|
4929
|
+
function someAsync(iterable, predicate) {
|
|
4930
|
+
if ((0, types_1$2.isAsyncIterable)(iterable)) {
|
|
4931
|
+
return someAsyncIterable(iterable);
|
|
5028
4932
|
}
|
|
5029
4933
|
else {
|
|
5030
|
-
return
|
|
4934
|
+
return someIterable(iterable);
|
|
5031
4935
|
}
|
|
5032
|
-
async function
|
|
4936
|
+
async function someIterable(iterable) {
|
|
5033
4937
|
let index = 0;
|
|
5034
4938
|
for (const element of iterable) {
|
|
5035
4939
|
if (await predicate(element, index))
|
|
5036
|
-
return
|
|
4940
|
+
return true;
|
|
5037
4941
|
index++;
|
|
5038
4942
|
}
|
|
5039
|
-
return
|
|
4943
|
+
return false;
|
|
5040
4944
|
}
|
|
5041
|
-
async function
|
|
4945
|
+
async function someAsyncIterable(iterable) {
|
|
5042
4946
|
let index = 0;
|
|
5043
4947
|
for await (const element of iterable) {
|
|
5044
4948
|
if (await predicate(element, index))
|
|
5045
|
-
return
|
|
4949
|
+
return true;
|
|
5046
4950
|
index++;
|
|
5047
4951
|
}
|
|
5048
|
-
return
|
|
4952
|
+
return false;
|
|
5049
4953
|
}
|
|
5050
4954
|
}
|
|
5051
|
-
|
|
4955
|
+
someAsync$1.someAsync = someAsync;
|
|
5052
4956
|
|
|
5053
|
-
var
|
|
4957
|
+
var some$1 = {};
|
|
5054
4958
|
|
|
5055
|
-
|
|
5056
|
-
function
|
|
4959
|
+
some$1.some = void 0;
|
|
4960
|
+
function some(iterable, predicate) {
|
|
5057
4961
|
let index = 0;
|
|
5058
4962
|
for (const element of iterable) {
|
|
5059
4963
|
if (predicate(element, index))
|
|
5060
|
-
return element;
|
|
5061
|
-
index++;
|
|
5062
|
-
}
|
|
5063
|
-
return undefined;
|
|
5064
|
-
}
|
|
5065
|
-
find$3.find = find$2;
|
|
5066
|
-
|
|
5067
|
-
var firstAsync$1 = {};
|
|
5068
|
-
|
|
5069
|
-
firstAsync$1.firstAsync = void 0;
|
|
5070
|
-
async function firstAsync(iterable) {
|
|
5071
|
-
for await (const element of iterable) {
|
|
5072
|
-
return element;
|
|
5073
|
-
}
|
|
5074
|
-
return undefined;
|
|
5075
|
-
}
|
|
5076
|
-
firstAsync$1.firstAsync = firstAsync;
|
|
5077
|
-
|
|
5078
|
-
var first$3 = {};
|
|
5079
|
-
|
|
5080
|
-
first$3.first = void 0;
|
|
5081
|
-
function first$2(iterable) {
|
|
5082
|
-
for (const element of iterable) {
|
|
5083
|
-
return element;
|
|
5084
|
-
}
|
|
5085
|
-
return undefined;
|
|
5086
|
-
}
|
|
5087
|
-
first$3.first = first$2;
|
|
5088
|
-
|
|
5089
|
-
var includesAsync$1 = {};
|
|
5090
|
-
|
|
5091
|
-
includesAsync$1.includesAsync = void 0;
|
|
5092
|
-
async function includesAsync(iterable, value) {
|
|
5093
|
-
for await (const element of iterable) {
|
|
5094
|
-
if (element === value)
|
|
5095
|
-
return true;
|
|
5096
|
-
}
|
|
5097
|
-
return false;
|
|
5098
|
-
}
|
|
5099
|
-
includesAsync$1.includesAsync = includesAsync;
|
|
5100
|
-
|
|
5101
|
-
var includes$1 = {};
|
|
5102
|
-
|
|
5103
|
-
includes$1.includes = void 0;
|
|
5104
|
-
function includes(iterable, value) {
|
|
5105
|
-
for (const element of iterable) {
|
|
5106
|
-
if (element === value)
|
|
5107
|
-
return true;
|
|
5108
|
-
}
|
|
5109
|
-
return false;
|
|
5110
|
-
}
|
|
5111
|
-
includes$1.includes = includes;
|
|
5112
|
-
|
|
5113
|
-
var matchAsync$1 = {};
|
|
5114
|
-
|
|
5115
|
-
matchAsync$1.matchAsync = void 0;
|
|
5116
|
-
async function matchAsync(iterable, sequence) {
|
|
5117
|
-
const sequenceLength = sequence.length;
|
|
5118
|
-
let matchCount = 0;
|
|
5119
|
-
for await (const element of iterable) {
|
|
5120
|
-
if (element === sequence[matchCount])
|
|
5121
|
-
matchCount++;
|
|
5122
|
-
if (matchCount === sequenceLength)
|
|
5123
|
-
return true;
|
|
5124
|
-
}
|
|
5125
|
-
return false;
|
|
5126
|
-
}
|
|
5127
|
-
matchAsync$1.matchAsync = matchAsync;
|
|
5128
|
-
|
|
5129
|
-
var match$1 = {};
|
|
5130
|
-
|
|
5131
|
-
match$1.match = void 0;
|
|
5132
|
-
function match(iterable, sequence) {
|
|
5133
|
-
const sequenceLength = sequence.length;
|
|
5134
|
-
let matchCount = 0;
|
|
5135
|
-
for (const element of iterable) {
|
|
5136
|
-
if (element === sequence[matchCount])
|
|
5137
|
-
matchCount++;
|
|
5138
|
-
if (matchCount === sequenceLength)
|
|
5139
4964
|
return true;
|
|
4965
|
+
index++;
|
|
5140
4966
|
}
|
|
5141
4967
|
return false;
|
|
5142
4968
|
}
|
|
5143
|
-
|
|
4969
|
+
some$1.some = some;
|
|
5144
4970
|
|
|
5145
|
-
var
|
|
4971
|
+
var lastAsync$1 = {};
|
|
5146
4972
|
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
reduceAsync$1.reduceAsync = reduceAsync;
|
|
5158
|
-
function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
|
|
5159
|
-
if ((0, types_1$4.isAsyncIterable)(iterable)) {
|
|
5160
|
-
return reduceAsyncIterable(iterable);
|
|
5161
|
-
}
|
|
5162
|
-
else {
|
|
5163
|
-
return reduceIterable(iterable);
|
|
5164
|
-
}
|
|
5165
|
-
async function reduceIterable(iterable) {
|
|
5166
|
-
let result = initialValue, index = 0;
|
|
5167
|
-
for (const currentValue of iterable) {
|
|
5168
|
-
result = await fn(result, currentValue, index++);
|
|
5169
|
-
}
|
|
5170
|
-
return result;
|
|
5171
|
-
}
|
|
5172
|
-
async function reduceAsyncIterable(iterable) {
|
|
5173
|
-
let result = initialValue, index = 0;
|
|
5174
|
-
for await (const currentValue of iterable) {
|
|
5175
|
-
result = await fn(result, currentValue, index++);
|
|
4973
|
+
lastAsync$1.lastAsync = void 0;
|
|
4974
|
+
async function lastAsync(iterable) {
|
|
4975
|
+
var _a;
|
|
4976
|
+
const iterator = iterable[Symbol.asyncIterator]();
|
|
4977
|
+
let done;
|
|
4978
|
+
try {
|
|
4979
|
+
let value;
|
|
4980
|
+
let result;
|
|
4981
|
+
while ({ value, done } = await iterator.next(), !done) {
|
|
4982
|
+
result = value;
|
|
5176
4983
|
}
|
|
5177
4984
|
return result;
|
|
5178
4985
|
}
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
return reduceAsyncIterable(iterable);
|
|
5183
|
-
}
|
|
5184
|
-
else {
|
|
5185
|
-
return reduceIterable(iterable);
|
|
5186
|
-
}
|
|
5187
|
-
async function reduceAsyncIterable(iterable) {
|
|
5188
|
-
var _a;
|
|
5189
|
-
const iterator = iterable[Symbol.asyncIterator]();
|
|
5190
|
-
let done;
|
|
5191
|
-
try {
|
|
5192
|
-
let result = await readInitialValue(iterator);
|
|
5193
|
-
let index = 1;
|
|
5194
|
-
let value;
|
|
5195
|
-
while ({ value, done } = await iterator.next(), !done) {
|
|
5196
|
-
result = await fn(result, value, index++);
|
|
5197
|
-
}
|
|
5198
|
-
return result;
|
|
5199
|
-
}
|
|
5200
|
-
finally {
|
|
5201
|
-
if (!done)
|
|
5202
|
-
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
5203
|
-
}
|
|
5204
|
-
async function readInitialValue(iterator) {
|
|
5205
|
-
const result = await iterator.next();
|
|
5206
|
-
if (result.done) {
|
|
5207
|
-
done = true;
|
|
5208
|
-
throw new Error('Reduce of empty iterable with no initial value');
|
|
5209
|
-
}
|
|
5210
|
-
return result.value;
|
|
5211
|
-
}
|
|
5212
|
-
}
|
|
5213
|
-
async function reduceIterable(iterable) {
|
|
5214
|
-
var _a;
|
|
5215
|
-
const iterator = iterable[Symbol.iterator]();
|
|
5216
|
-
let done;
|
|
5217
|
-
try {
|
|
5218
|
-
let result = readInitialValue(iterator);
|
|
5219
|
-
let index = 1;
|
|
5220
|
-
let value;
|
|
5221
|
-
while ({ value, done } = iterator.next(), !done) {
|
|
5222
|
-
result = await fn(result, value, index++);
|
|
5223
|
-
}
|
|
5224
|
-
return result;
|
|
5225
|
-
}
|
|
5226
|
-
finally {
|
|
5227
|
-
if (!done)
|
|
5228
|
-
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
5229
|
-
}
|
|
5230
|
-
function readInitialValue(iterator) {
|
|
5231
|
-
const result = iterator.next();
|
|
5232
|
-
if (result.done) {
|
|
5233
|
-
done = true;
|
|
5234
|
-
throw new Error('Reduce of empty iterable with no initial value');
|
|
5235
|
-
}
|
|
5236
|
-
return result.value;
|
|
5237
|
-
}
|
|
4986
|
+
finally {
|
|
4987
|
+
if (!done)
|
|
4988
|
+
await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
|
|
5238
4989
|
}
|
|
5239
4990
|
}
|
|
4991
|
+
lastAsync$1.lastAsync = lastAsync;
|
|
5240
4992
|
|
|
5241
|
-
var
|
|
4993
|
+
var last$4 = {};
|
|
5242
4994
|
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
function reduce$2(iterable, fn, initialValue) {
|
|
5246
|
-
if ((0, types_1$3.isUndefined)(initialValue)) {
|
|
5247
|
-
return reduceWithoutInitialValue(iterable, fn);
|
|
5248
|
-
}
|
|
5249
|
-
else {
|
|
5250
|
-
return reduceWithInitialValue(iterable, fn, initialValue);
|
|
5251
|
-
}
|
|
5252
|
-
}
|
|
5253
|
-
reduce$3.reduce = reduce$2;
|
|
5254
|
-
function reduceWithInitialValue(iterable, fn, initialValue) {
|
|
5255
|
-
let result = initialValue, index = 0;
|
|
5256
|
-
for (const currentValue of iterable) {
|
|
5257
|
-
result = fn(result, currentValue, index++);
|
|
5258
|
-
}
|
|
5259
|
-
return result;
|
|
5260
|
-
}
|
|
5261
|
-
function reduceWithoutInitialValue(iterable, fn) {
|
|
4995
|
+
last$4.last = void 0;
|
|
4996
|
+
function last$3(iterable) {
|
|
5262
4997
|
var _a;
|
|
5263
4998
|
const iterator = iterable[Symbol.iterator]();
|
|
5264
4999
|
let done;
|
|
5265
5000
|
try {
|
|
5266
|
-
let result = readInitialValue(iterator);
|
|
5267
|
-
let index = 1;
|
|
5268
5001
|
let value;
|
|
5002
|
+
let result;
|
|
5269
5003
|
while ({ value, done } = iterator.next(), !done) {
|
|
5270
|
-
result =
|
|
5004
|
+
result = value;
|
|
5271
5005
|
}
|
|
5272
5006
|
return result;
|
|
5273
5007
|
}
|
|
@@ -5275,177 +5009,486 @@
|
|
|
5275
5009
|
if (!done)
|
|
5276
5010
|
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
5277
5011
|
}
|
|
5278
|
-
function readInitialValue(iterator) {
|
|
5279
|
-
const result = iterator.next();
|
|
5280
|
-
if (result.done) {
|
|
5281
|
-
done = true;
|
|
5282
|
-
throw new Error('Reduce of empty iterable with no initial value');
|
|
5283
|
-
}
|
|
5284
|
-
return result.value;
|
|
5285
|
-
}
|
|
5286
5012
|
}
|
|
5013
|
+
last$4.last = last$3;
|
|
5287
5014
|
|
|
5288
|
-
var
|
|
5015
|
+
var toArrayAsync$1 = {};
|
|
5289
5016
|
|
|
5290
|
-
|
|
5291
|
-
const
|
|
5292
|
-
function
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
}
|
|
5296
|
-
else {
|
|
5297
|
-
return someIterable(iterable);
|
|
5298
|
-
}
|
|
5299
|
-
async function someIterable(iterable) {
|
|
5300
|
-
let index = 0;
|
|
5301
|
-
for (const element of iterable) {
|
|
5302
|
-
if (await predicate(element, index))
|
|
5303
|
-
return true;
|
|
5304
|
-
index++;
|
|
5305
|
-
}
|
|
5306
|
-
return false;
|
|
5307
|
-
}
|
|
5308
|
-
async function someAsyncIterable(iterable) {
|
|
5309
|
-
let index = 0;
|
|
5017
|
+
toArrayAsync$1.toArrayAsync = void 0;
|
|
5018
|
+
const consume_1$3 = consume$1;
|
|
5019
|
+
function toArrayAsync(iterable) {
|
|
5020
|
+
return (0, consume_1$3.consume)(iterable, async (iterable) => {
|
|
5021
|
+
const result = [];
|
|
5310
5022
|
for await (const element of iterable) {
|
|
5311
|
-
|
|
5312
|
-
return true;
|
|
5313
|
-
index++;
|
|
5023
|
+
result.push(element);
|
|
5314
5024
|
}
|
|
5315
|
-
return
|
|
5316
|
-
}
|
|
5025
|
+
return result;
|
|
5026
|
+
});
|
|
5317
5027
|
}
|
|
5318
|
-
|
|
5028
|
+
toArrayAsync$1.toArrayAsync = toArrayAsync;
|
|
5319
5029
|
|
|
5320
|
-
var
|
|
5030
|
+
var toArray$3 = {};
|
|
5321
5031
|
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
if (predicate(element, index))
|
|
5327
|
-
return true;
|
|
5328
|
-
index++;
|
|
5329
|
-
}
|
|
5330
|
-
return false;
|
|
5032
|
+
toArray$3.toArray = void 0;
|
|
5033
|
+
const consume_1$2 = consume$1;
|
|
5034
|
+
function toArray$2(iterable) {
|
|
5035
|
+
return (0, consume_1$2.consume)(iterable, iterable => Array.from(iterable));
|
|
5331
5036
|
}
|
|
5332
|
-
|
|
5037
|
+
toArray$3.toArray = toArray$2;
|
|
5333
5038
|
|
|
5334
|
-
var
|
|
5039
|
+
var toSetAsync$1 = {};
|
|
5335
5040
|
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
let result;
|
|
5344
|
-
while ({ value, done } = await iterator.next(), !done) {
|
|
5345
|
-
result = value;
|
|
5041
|
+
toSetAsync$1.toSetAsync = void 0;
|
|
5042
|
+
const consume_1$1 = consume$1;
|
|
5043
|
+
function toSetAsync(iterable) {
|
|
5044
|
+
return (0, consume_1$1.consume)(iterable, async (iterable) => {
|
|
5045
|
+
const result = new Set();
|
|
5046
|
+
for await (const element of iterable) {
|
|
5047
|
+
result.add(element);
|
|
5346
5048
|
}
|
|
5347
5049
|
return result;
|
|
5050
|
+
});
|
|
5051
|
+
}
|
|
5052
|
+
toSetAsync$1.toSetAsync = toSetAsync;
|
|
5053
|
+
|
|
5054
|
+
var toSet$1 = {};
|
|
5055
|
+
|
|
5056
|
+
toSet$1.toSet = void 0;
|
|
5057
|
+
const consume_1 = consume$1;
|
|
5058
|
+
function toSet(iterable) {
|
|
5059
|
+
return (0, consume_1.consume)(iterable, iterable => new Set(iterable));
|
|
5060
|
+
}
|
|
5061
|
+
toSet$1.toSet = toSet;
|
|
5062
|
+
|
|
5063
|
+
var count$3 = {};
|
|
5064
|
+
|
|
5065
|
+
count$3.count = void 0;
|
|
5066
|
+
function count$2(iterable) {
|
|
5067
|
+
let count = 0;
|
|
5068
|
+
for (const _ of iterable) {
|
|
5069
|
+
count++;
|
|
5348
5070
|
}
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5071
|
+
return count;
|
|
5072
|
+
}
|
|
5073
|
+
count$3.count = count$2;
|
|
5074
|
+
|
|
5075
|
+
var countAsync$1 = {};
|
|
5076
|
+
|
|
5077
|
+
countAsync$1.countAsync = void 0;
|
|
5078
|
+
async function countAsync(iterable) {
|
|
5079
|
+
let count = 0;
|
|
5080
|
+
for await (const _ of iterable) {
|
|
5081
|
+
count++;
|
|
5352
5082
|
}
|
|
5083
|
+
return count;
|
|
5084
|
+
}
|
|
5085
|
+
countAsync$1.countAsync = countAsync;
|
|
5086
|
+
|
|
5087
|
+
(function (exports) {
|
|
5088
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5089
|
+
if (k2 === undefined) k2 = k;
|
|
5090
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5091
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5092
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
5093
|
+
}
|
|
5094
|
+
Object.defineProperty(o, k2, desc);
|
|
5095
|
+
}) : (function(o, m, k, k2) {
|
|
5096
|
+
if (k2 === undefined) k2 = k;
|
|
5097
|
+
o[k2] = m[k];
|
|
5098
|
+
}));
|
|
5099
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
5100
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
5101
|
+
};__exportStar(consume$1, exports);
|
|
5102
|
+
__exportStar(eachAsync$1, exports);
|
|
5103
|
+
__exportStar(each$1, exports);
|
|
5104
|
+
__exportStar(everyAsync$1, exports);
|
|
5105
|
+
__exportStar(every$3, exports);
|
|
5106
|
+
__exportStar(findAsync$1, exports);
|
|
5107
|
+
__exportStar(find$3, exports);
|
|
5108
|
+
__exportStar(firstAsync$1, exports);
|
|
5109
|
+
__exportStar(first$3, exports);
|
|
5110
|
+
__exportStar(includesAsync$1, exports);
|
|
5111
|
+
__exportStar(includes$1, exports);
|
|
5112
|
+
__exportStar(matchAsync$1, exports);
|
|
5113
|
+
__exportStar(match$1, exports);
|
|
5114
|
+
__exportStar(reduceAsync$1, exports);
|
|
5115
|
+
__exportStar(reduce$3, exports);
|
|
5116
|
+
__exportStar(someAsync$1, exports);
|
|
5117
|
+
__exportStar(some$1, exports);
|
|
5118
|
+
__exportStar(lastAsync$1, exports);
|
|
5119
|
+
__exportStar(last$4, exports);
|
|
5120
|
+
__exportStar(toArrayAsync$1, exports);
|
|
5121
|
+
__exportStar(toArray$3, exports);
|
|
5122
|
+
__exportStar(toSetAsync$1, exports);
|
|
5123
|
+
__exportStar(toSet$1, exports);
|
|
5124
|
+
__exportStar(count$3, exports);
|
|
5125
|
+
__exportStar(countAsync$1, exports);
|
|
5126
|
+
|
|
5127
|
+
} (output));
|
|
5128
|
+
|
|
5129
|
+
var hasRequiredEs2018$1;
|
|
5130
|
+
|
|
5131
|
+
function requireEs2018$1 () {
|
|
5132
|
+
if (hasRequiredEs2018$1) return es2018$8;
|
|
5133
|
+
hasRequiredEs2018$1 = 1;
|
|
5134
|
+
(function (exports) {
|
|
5135
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5136
|
+
if (k2 === undefined) k2 = k;
|
|
5137
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5138
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5139
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
5140
|
+
}
|
|
5141
|
+
Object.defineProperty(o, k2, desc);
|
|
5142
|
+
}) : (function(o, m, k, k2) {
|
|
5143
|
+
if (k2 === undefined) k2 = k;
|
|
5144
|
+
o[k2] = m[k];
|
|
5145
|
+
}));
|
|
5146
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
5147
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
5148
|
+
};__exportStar(requireMiddleware(), exports);
|
|
5149
|
+
__exportStar(output, exports);
|
|
5150
|
+
|
|
5151
|
+
} (es2018$8));
|
|
5152
|
+
return es2018$8;
|
|
5153
|
+
}
|
|
5154
|
+
|
|
5155
|
+
var getErrorNames$1 = {};
|
|
5156
|
+
|
|
5157
|
+
var es2018$5 = {};
|
|
5158
|
+
|
|
5159
|
+
var array$1 = {};
|
|
5160
|
+
|
|
5161
|
+
array$1.isntEmptyArray = array$1.isEmptyArray = array$1.isntArray = array$1.isArray = void 0;
|
|
5162
|
+
function isArray$4(val) {
|
|
5163
|
+
return Array.isArray(val);
|
|
5164
|
+
}
|
|
5165
|
+
array$1.isArray = isArray$4;
|
|
5166
|
+
function isntArray$1(val) {
|
|
5167
|
+
return !isArray$4(val);
|
|
5168
|
+
}
|
|
5169
|
+
array$1.isntArray = isntArray$1;
|
|
5170
|
+
function isEmptyArray$1(val) {
|
|
5171
|
+
return val.length === 0;
|
|
5172
|
+
}
|
|
5173
|
+
array$1.isEmptyArray = isEmptyArray$1;
|
|
5174
|
+
function isntEmptyArray$1(val) {
|
|
5175
|
+
return val.length !== 0;
|
|
5176
|
+
}
|
|
5177
|
+
array$1.isntEmptyArray = isntEmptyArray$1;
|
|
5178
|
+
|
|
5179
|
+
var asyncIterable$1 = {};
|
|
5180
|
+
|
|
5181
|
+
var _null$1 = {};
|
|
5182
|
+
|
|
5183
|
+
_null$1.isntNull = _null$1.isNull = void 0;
|
|
5184
|
+
function isNull$1(val) {
|
|
5185
|
+
return val === null;
|
|
5186
|
+
}
|
|
5187
|
+
_null$1.isNull = isNull$1;
|
|
5188
|
+
function isntNull$1(val) {
|
|
5189
|
+
return !isNull$1(val);
|
|
5190
|
+
}
|
|
5191
|
+
_null$1.isntNull = isntNull$1;
|
|
5192
|
+
|
|
5193
|
+
var _undefined$1 = {};
|
|
5194
|
+
|
|
5195
|
+
_undefined$1.isntUndefined = _undefined$1.isUndefined = void 0;
|
|
5196
|
+
function isUndefined$1(val) {
|
|
5197
|
+
return val === undefined;
|
|
5198
|
+
}
|
|
5199
|
+
_undefined$1.isUndefined = isUndefined$1;
|
|
5200
|
+
function isntUndefined$1(val) {
|
|
5201
|
+
return !isUndefined$1(val);
|
|
5202
|
+
}
|
|
5203
|
+
_undefined$1.isntUndefined = isntUndefined$1;
|
|
5204
|
+
|
|
5205
|
+
var _function$1 = {};
|
|
5206
|
+
|
|
5207
|
+
_function$1.isntFunction = _function$1.isFunction = void 0;
|
|
5208
|
+
function isFunction$3(val) {
|
|
5209
|
+
return typeof val === 'function';
|
|
5210
|
+
}
|
|
5211
|
+
_function$1.isFunction = isFunction$3;
|
|
5212
|
+
function isntFunction$1(val) {
|
|
5213
|
+
return !isFunction$3(val);
|
|
5214
|
+
}
|
|
5215
|
+
_function$1.isntFunction = isntFunction$1;
|
|
5216
|
+
|
|
5217
|
+
asyncIterable$1.isntAsyncIterable = asyncIterable$1.isAsyncIterable = void 0;
|
|
5218
|
+
const null_1$5 = _null$1;
|
|
5219
|
+
const undefined_1$3 = _undefined$1;
|
|
5220
|
+
const function_1$5 = _function$1;
|
|
5221
|
+
function isAsyncIterable$3(val) {
|
|
5222
|
+
return (0, null_1$5.isntNull)(val)
|
|
5223
|
+
&& (0, undefined_1$3.isntUndefined)(val)
|
|
5224
|
+
&& (0, function_1$5.isFunction)(val[Symbol.asyncIterator]);
|
|
5225
|
+
}
|
|
5226
|
+
asyncIterable$1.isAsyncIterable = isAsyncIterable$3;
|
|
5227
|
+
function isntAsyncIterable$1(val) {
|
|
5228
|
+
return !isAsyncIterable$3(val);
|
|
5229
|
+
}
|
|
5230
|
+
asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
|
|
5231
|
+
|
|
5232
|
+
var bigint$1 = {};
|
|
5233
|
+
|
|
5234
|
+
bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
|
|
5235
|
+
function isBigInt$1(val) {
|
|
5236
|
+
return typeof val === 'bigint';
|
|
5237
|
+
}
|
|
5238
|
+
bigint$1.isBigInt = isBigInt$1;
|
|
5239
|
+
function isntBigInt$1(val) {
|
|
5240
|
+
return !isBigInt$1(val);
|
|
5241
|
+
}
|
|
5242
|
+
bigint$1.isntBigInt = isntBigInt$1;
|
|
5243
|
+
|
|
5244
|
+
var boolean$1 = {};
|
|
5245
|
+
|
|
5246
|
+
boolean$1.isntBoolean = boolean$1.isBoolean = void 0;
|
|
5247
|
+
function isBoolean$1(val) {
|
|
5248
|
+
return typeof val === 'boolean';
|
|
5249
|
+
}
|
|
5250
|
+
boolean$1.isBoolean = isBoolean$1;
|
|
5251
|
+
function isntBoolean$1(val) {
|
|
5252
|
+
return !isBoolean$1(val);
|
|
5253
|
+
}
|
|
5254
|
+
boolean$1.isntBoolean = isntBoolean$1;
|
|
5255
|
+
|
|
5256
|
+
var char$1 = {};
|
|
5257
|
+
|
|
5258
|
+
var string$1 = {};
|
|
5259
|
+
|
|
5260
|
+
string$1.isntString = string$1.isString = void 0;
|
|
5261
|
+
function isString$1(val) {
|
|
5262
|
+
return typeof val === 'string';
|
|
5263
|
+
}
|
|
5264
|
+
string$1.isString = isString$1;
|
|
5265
|
+
function isntString$1(val) {
|
|
5266
|
+
return !isString$1(val);
|
|
5267
|
+
}
|
|
5268
|
+
string$1.isntString = isntString$1;
|
|
5269
|
+
|
|
5270
|
+
char$1.isntChar = char$1.isChar = void 0;
|
|
5271
|
+
const string_1$3 = string$1;
|
|
5272
|
+
function isChar$1(val) {
|
|
5273
|
+
return (0, string_1$3.isString)(val)
|
|
5274
|
+
&& val.length === 1;
|
|
5275
|
+
}
|
|
5276
|
+
char$1.isChar = isChar$1;
|
|
5277
|
+
function isntChar$1(val) {
|
|
5278
|
+
return !isChar$1(val);
|
|
5279
|
+
}
|
|
5280
|
+
char$1.isntChar = isntChar$1;
|
|
5281
|
+
|
|
5282
|
+
var date$1 = {};
|
|
5283
|
+
|
|
5284
|
+
date$1.isntDate = date$1.isDate = void 0;
|
|
5285
|
+
function isDate$2(val) {
|
|
5286
|
+
return val instanceof Date;
|
|
5287
|
+
}
|
|
5288
|
+
date$1.isDate = isDate$2;
|
|
5289
|
+
function isntDate$1(val) {
|
|
5290
|
+
return !isDate$2(val);
|
|
5291
|
+
}
|
|
5292
|
+
date$1.isntDate = isntDate$1;
|
|
5293
|
+
|
|
5294
|
+
var _enum$1 = {};
|
|
5295
|
+
|
|
5296
|
+
_enum$1.inEnum = void 0;
|
|
5297
|
+
function inEnum$1(val, _enum) {
|
|
5298
|
+
return Object.values(_enum).includes(val);
|
|
5299
|
+
}
|
|
5300
|
+
_enum$1.inEnum = inEnum$1;
|
|
5301
|
+
|
|
5302
|
+
var error$1 = {};
|
|
5303
|
+
|
|
5304
|
+
error$1.isntError = error$1.isError = void 0;
|
|
5305
|
+
function isError$1(val) {
|
|
5306
|
+
return val instanceof Error;
|
|
5307
|
+
}
|
|
5308
|
+
error$1.isError = isError$1;
|
|
5309
|
+
function isntError$1(val) {
|
|
5310
|
+
return !isError$1(val);
|
|
5311
|
+
}
|
|
5312
|
+
error$1.isntError = isntError$1;
|
|
5313
|
+
|
|
5314
|
+
var falsy$1 = {};
|
|
5315
|
+
|
|
5316
|
+
falsy$1.isntFalsy = falsy$1.isFalsy = void 0;
|
|
5317
|
+
function isFalsy$1(val) {
|
|
5318
|
+
return !val;
|
|
5319
|
+
}
|
|
5320
|
+
falsy$1.isFalsy = isFalsy$1;
|
|
5321
|
+
function isntFalsy$1(val) {
|
|
5322
|
+
return !isFalsy$1(val);
|
|
5323
|
+
}
|
|
5324
|
+
falsy$1.isntFalsy = isntFalsy$1;
|
|
5325
|
+
|
|
5326
|
+
var iterable$1 = {};
|
|
5327
|
+
|
|
5328
|
+
iterable$1.isntIterable = iterable$1.isIterable = void 0;
|
|
5329
|
+
const null_1$4 = _null$1;
|
|
5330
|
+
const undefined_1$2 = _undefined$1;
|
|
5331
|
+
const function_1$4 = _function$1;
|
|
5332
|
+
function isIterable$3(val) {
|
|
5333
|
+
return (0, null_1$4.isntNull)(val)
|
|
5334
|
+
&& (0, undefined_1$2.isntUndefined)(val)
|
|
5335
|
+
&& (0, function_1$4.isFunction)(val[Symbol.iterator]);
|
|
5336
|
+
}
|
|
5337
|
+
iterable$1.isIterable = isIterable$3;
|
|
5338
|
+
function isntIterable$1(val) {
|
|
5339
|
+
return !isIterable$3(val);
|
|
5340
|
+
}
|
|
5341
|
+
iterable$1.isntIterable = isntIterable$1;
|
|
5342
|
+
|
|
5343
|
+
var json$1 = {};
|
|
5344
|
+
|
|
5345
|
+
var number$1 = {};
|
|
5346
|
+
|
|
5347
|
+
number$1.isntNaN = number$1.isNaN = number$1.isNegativeInfinity = number$1.isPositiveInfinity = number$1.isFinite = number$1.isntNumber = number$1.isNumber = void 0;
|
|
5348
|
+
function isNumber$1(val) {
|
|
5349
|
+
return typeof val === 'number';
|
|
5350
|
+
}
|
|
5351
|
+
number$1.isNumber = isNumber$1;
|
|
5352
|
+
function isntNumber$1(val) {
|
|
5353
|
+
return !isNumber$1(val);
|
|
5354
|
+
}
|
|
5355
|
+
number$1.isntNumber = isntNumber$1;
|
|
5356
|
+
function isFinite$1(val) {
|
|
5357
|
+
return Number.isFinite(val);
|
|
5358
|
+
}
|
|
5359
|
+
number$1.isFinite = isFinite$1;
|
|
5360
|
+
function isPositiveInfinity$1(val) {
|
|
5361
|
+
return val === Infinity;
|
|
5362
|
+
}
|
|
5363
|
+
number$1.isPositiveInfinity = isPositiveInfinity$1;
|
|
5364
|
+
function isNegativeInfinity$1(val) {
|
|
5365
|
+
return val === -Infinity;
|
|
5366
|
+
}
|
|
5367
|
+
number$1.isNegativeInfinity = isNegativeInfinity$1;
|
|
5368
|
+
function isNaN$2(val) {
|
|
5369
|
+
return Number.isNaN(val);
|
|
5370
|
+
}
|
|
5371
|
+
number$1.isNaN = isNaN$2;
|
|
5372
|
+
function isntNaN$1(val) {
|
|
5373
|
+
return !isNaN$2(val);
|
|
5374
|
+
}
|
|
5375
|
+
number$1.isntNaN = isntNaN$1;
|
|
5376
|
+
|
|
5377
|
+
var object$1 = {};
|
|
5378
|
+
|
|
5379
|
+
var __importDefault$1 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
5380
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5381
|
+
};object$1.isntEmptyObject = object$1.isEmptyObject = object$1.isntPlainObject = object$1.isPlainObject = object$1.isntObject = object$1.isObject = void 0;
|
|
5382
|
+
const isPlainObject_1$1 = __importDefault$1(isPlainObject_1$3);
|
|
5383
|
+
function isObject$1(val) {
|
|
5384
|
+
return val !== null
|
|
5385
|
+
&& typeof val === 'object';
|
|
5386
|
+
}
|
|
5387
|
+
object$1.isObject = isObject$1;
|
|
5388
|
+
function isntObject$1(val) {
|
|
5389
|
+
return !isObject$1(val);
|
|
5390
|
+
}
|
|
5391
|
+
object$1.isntObject = isntObject$1;
|
|
5392
|
+
function isPlainObject$1(val) {
|
|
5393
|
+
return (0, isPlainObject_1$1.default)(val);
|
|
5394
|
+
}
|
|
5395
|
+
object$1.isPlainObject = isPlainObject$1;
|
|
5396
|
+
function isntPlainObject$1(val) {
|
|
5397
|
+
return !isPlainObject$1(val);
|
|
5398
|
+
}
|
|
5399
|
+
object$1.isntPlainObject = isntPlainObject$1;
|
|
5400
|
+
function isEmptyObject$1(val) {
|
|
5401
|
+
return Object.keys(val).length === 0;
|
|
5402
|
+
}
|
|
5403
|
+
object$1.isEmptyObject = isEmptyObject$1;
|
|
5404
|
+
function isntEmptyObject$1(val) {
|
|
5405
|
+
return Object.keys(val).length !== 0;
|
|
5353
5406
|
}
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
var last$4 = {};
|
|
5407
|
+
object$1.isntEmptyObject = isntEmptyObject$1;
|
|
5357
5408
|
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5409
|
+
json$1.isntJsonable = json$1.isJsonable = json$1.isntJson = json$1.isJson = void 0;
|
|
5410
|
+
const null_1$3 = _null$1;
|
|
5411
|
+
const boolean_1$1 = boolean$1;
|
|
5412
|
+
const string_1$2 = string$1;
|
|
5413
|
+
const number_1$1 = number$1;
|
|
5414
|
+
const array_1$1 = array$1;
|
|
5415
|
+
const object_1$3 = object$1;
|
|
5416
|
+
function isJson$1(val) {
|
|
5417
|
+
return (0, null_1$3.isNull)(val)
|
|
5418
|
+
|| (0, boolean_1$1.isBoolean)(val)
|
|
5419
|
+
|| (0, string_1$2.isString)(val)
|
|
5420
|
+
|| (0, number_1$1.isNumber)(val)
|
|
5421
|
+
|| ((0, array_1$1.isArray)(val) && val.every(isJson$1))
|
|
5422
|
+
|| ((0, object_1$3.isPlainObject)(val) && Object.values(val).every(isJson$1));
|
|
5423
|
+
}
|
|
5424
|
+
json$1.isJson = isJson$1;
|
|
5425
|
+
function isntJson$1(val) {
|
|
5426
|
+
return !isJson$1(val);
|
|
5427
|
+
}
|
|
5428
|
+
json$1.isntJson = isntJson$1;
|
|
5429
|
+
function isJsonable$1(val) {
|
|
5363
5430
|
try {
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
while ({ value, done } = iterator.next(), !done) {
|
|
5367
|
-
result = value;
|
|
5368
|
-
}
|
|
5369
|
-
return result;
|
|
5431
|
+
JSON.stringify(val);
|
|
5432
|
+
return true;
|
|
5370
5433
|
}
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
|
|
5434
|
+
catch (_a) {
|
|
5435
|
+
return false;
|
|
5374
5436
|
}
|
|
5375
5437
|
}
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
toArrayAsync$1.toArrayAsync = void 0;
|
|
5381
|
-
const consume_1$3 = consume$1;
|
|
5382
|
-
function toArrayAsync(iterable) {
|
|
5383
|
-
return (0, consume_1$3.consume)(iterable, async (iterable) => {
|
|
5384
|
-
const result = [];
|
|
5385
|
-
for await (const element of iterable) {
|
|
5386
|
-
result.push(element);
|
|
5387
|
-
}
|
|
5388
|
-
return result;
|
|
5389
|
-
});
|
|
5438
|
+
json$1.isJsonable = isJsonable$1;
|
|
5439
|
+
function isntJsonable$1(val) {
|
|
5440
|
+
return !isntJsonable$1();
|
|
5390
5441
|
}
|
|
5391
|
-
|
|
5442
|
+
json$1.isntJsonable = isntJsonable$1;
|
|
5392
5443
|
|
|
5393
|
-
var
|
|
5444
|
+
var promise$1 = {};
|
|
5394
5445
|
|
|
5395
|
-
|
|
5396
|
-
const
|
|
5397
|
-
|
|
5398
|
-
|
|
5446
|
+
promise$1.isPromiseLike = promise$1.isntPromiseLike = promise$1.isntPromise = promise$1.isPromise = void 0;
|
|
5447
|
+
const object_1$2 = object$1;
|
|
5448
|
+
const function_1$3 = _function$1;
|
|
5449
|
+
function isPromise$3(val) {
|
|
5450
|
+
return val instanceof Promise;
|
|
5399
5451
|
}
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
toSetAsync$1.toSetAsync = void 0;
|
|
5405
|
-
const consume_1$1 = consume$1;
|
|
5406
|
-
function toSetAsync(iterable) {
|
|
5407
|
-
return (0, consume_1$1.consume)(iterable, async (iterable) => {
|
|
5408
|
-
const result = new Set();
|
|
5409
|
-
for await (const element of iterable) {
|
|
5410
|
-
result.add(element);
|
|
5411
|
-
}
|
|
5412
|
-
return result;
|
|
5413
|
-
});
|
|
5452
|
+
promise$1.isPromise = isPromise$3;
|
|
5453
|
+
function isntPromise$1(val) {
|
|
5454
|
+
return !isPromise$3(val);
|
|
5414
5455
|
}
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
toSet$1.toSet = void 0;
|
|
5420
|
-
const consume_1 = consume$1;
|
|
5421
|
-
function toSet(iterable) {
|
|
5422
|
-
return (0, consume_1.consume)(iterable, iterable => new Set(iterable));
|
|
5456
|
+
promise$1.isntPromise = isntPromise$1;
|
|
5457
|
+
function isntPromiseLike$1(val) {
|
|
5458
|
+
return !isPromiseLike$1(val);
|
|
5423
5459
|
}
|
|
5424
|
-
|
|
5460
|
+
promise$1.isntPromiseLike = isntPromiseLike$1;
|
|
5461
|
+
function isPromiseLike$1(val) {
|
|
5462
|
+
return (0, object_1$2.isObject)(val)
|
|
5463
|
+
&& (0, function_1$3.isFunction)(val.then);
|
|
5464
|
+
}
|
|
5465
|
+
promise$1.isPromiseLike = isPromiseLike$1;
|
|
5425
5466
|
|
|
5426
|
-
var
|
|
5467
|
+
var url$1 = {};
|
|
5427
5468
|
|
|
5428
|
-
|
|
5429
|
-
function
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5469
|
+
url$1.isAbsoluteURL = void 0;
|
|
5470
|
+
function isAbsoluteURL$1(str) {
|
|
5471
|
+
try {
|
|
5472
|
+
new URL(str);
|
|
5473
|
+
return true;
|
|
5474
|
+
}
|
|
5475
|
+
catch (_a) {
|
|
5476
|
+
return false;
|
|
5433
5477
|
}
|
|
5434
|
-
return count;
|
|
5435
5478
|
}
|
|
5436
|
-
|
|
5479
|
+
url$1.isAbsoluteURL = isAbsoluteURL$1;
|
|
5437
5480
|
|
|
5438
|
-
var
|
|
5481
|
+
var regexp = {};
|
|
5439
5482
|
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
for await (const _ of iterable) {
|
|
5444
|
-
count++;
|
|
5445
|
-
}
|
|
5446
|
-
return count;
|
|
5483
|
+
regexp.isntRegExp = regexp.isRegExp = void 0;
|
|
5484
|
+
function isRegExp(val) {
|
|
5485
|
+
return val instanceof RegExp;
|
|
5447
5486
|
}
|
|
5448
|
-
|
|
5487
|
+
regexp.isRegExp = isRegExp;
|
|
5488
|
+
function isntRegExp(val) {
|
|
5489
|
+
return !isRegExp(val);
|
|
5490
|
+
}
|
|
5491
|
+
regexp.isntRegExp = isntRegExp;
|
|
5449
5492
|
|
|
5450
5493
|
(function (exports) {
|
|
5451
5494
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -5461,61 +5504,28 @@
|
|
|
5461
5504
|
}));
|
|
5462
5505
|
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
5463
5506
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
5464
|
-
};__exportStar(
|
|
5465
|
-
__exportStar(
|
|
5466
|
-
__exportStar(
|
|
5467
|
-
__exportStar(
|
|
5468
|
-
__exportStar(
|
|
5469
|
-
__exportStar(
|
|
5470
|
-
__exportStar(
|
|
5471
|
-
__exportStar(
|
|
5472
|
-
__exportStar(
|
|
5473
|
-
__exportStar(
|
|
5474
|
-
__exportStar(
|
|
5475
|
-
__exportStar(
|
|
5476
|
-
__exportStar(
|
|
5477
|
-
__exportStar(
|
|
5478
|
-
__exportStar(
|
|
5479
|
-
__exportStar(
|
|
5480
|
-
__exportStar(
|
|
5481
|
-
__exportStar(
|
|
5482
|
-
__exportStar(
|
|
5483
|
-
__exportStar(
|
|
5484
|
-
__exportStar(toArray$3, exports);
|
|
5485
|
-
__exportStar(toSetAsync$1, exports);
|
|
5486
|
-
__exportStar(toSet$1, exports);
|
|
5487
|
-
__exportStar(count$3, exports);
|
|
5488
|
-
__exportStar(countAsync$1, exports);
|
|
5507
|
+
};__exportStar(array$1, exports);
|
|
5508
|
+
__exportStar(asyncIterable$1, exports);
|
|
5509
|
+
__exportStar(bigint$1, exports);
|
|
5510
|
+
__exportStar(boolean$1, exports);
|
|
5511
|
+
__exportStar(char$1, exports);
|
|
5512
|
+
__exportStar(date$1, exports);
|
|
5513
|
+
__exportStar(_enum$1, exports);
|
|
5514
|
+
__exportStar(error$1, exports);
|
|
5515
|
+
__exportStar(falsy$1, exports);
|
|
5516
|
+
__exportStar(_function$1, exports);
|
|
5517
|
+
__exportStar(iterable$1, exports);
|
|
5518
|
+
__exportStar(json$1, exports);
|
|
5519
|
+
__exportStar(_null$1, exports);
|
|
5520
|
+
__exportStar(number$1, exports);
|
|
5521
|
+
__exportStar(object$1, exports);
|
|
5522
|
+
__exportStar(promise$1, exports);
|
|
5523
|
+
__exportStar(string$1, exports);
|
|
5524
|
+
__exportStar(_undefined$1, exports);
|
|
5525
|
+
__exportStar(url$1, exports);
|
|
5526
|
+
__exportStar(regexp, exports);
|
|
5489
5527
|
|
|
5490
|
-
} (
|
|
5491
|
-
|
|
5492
|
-
var hasRequiredEs2018$1;
|
|
5493
|
-
|
|
5494
|
-
function requireEs2018$1 () {
|
|
5495
|
-
if (hasRequiredEs2018$1) return es2018$7;
|
|
5496
|
-
hasRequiredEs2018$1 = 1;
|
|
5497
|
-
(function (exports) {
|
|
5498
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5499
|
-
if (k2 === undefined) k2 = k;
|
|
5500
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5501
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5502
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
5503
|
-
}
|
|
5504
|
-
Object.defineProperty(o, k2, desc);
|
|
5505
|
-
}) : (function(o, m, k, k2) {
|
|
5506
|
-
if (k2 === undefined) k2 = k;
|
|
5507
|
-
o[k2] = m[k];
|
|
5508
|
-
}));
|
|
5509
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
5510
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
5511
|
-
};__exportStar(requireMiddleware(), exports);
|
|
5512
|
-
__exportStar(output, exports);
|
|
5513
|
-
|
|
5514
|
-
} (es2018$7));
|
|
5515
|
-
return es2018$7;
|
|
5516
|
-
}
|
|
5517
|
-
|
|
5518
|
-
var getErrorNames$1 = {};
|
|
5528
|
+
} (es2018$5));
|
|
5519
5529
|
|
|
5520
5530
|
var traverseErrorPrototypeChain$1 = {};
|
|
5521
5531
|
|
|
@@ -5531,7 +5541,7 @@
|
|
|
5531
5541
|
traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = traverseErrorPrototypeChain;
|
|
5532
5542
|
|
|
5533
5543
|
getErrorNames$1.getErrorNames = void 0;
|
|
5534
|
-
const types_1$1 = es2018$
|
|
5544
|
+
const types_1$1 = es2018$5;
|
|
5535
5545
|
const traverse_error_prototype_chain_1 = traverseErrorPrototypeChain$1;
|
|
5536
5546
|
function* getErrorNames(err) {
|
|
5537
5547
|
var _a;
|
|
@@ -5552,7 +5562,7 @@
|
|
|
5552
5562
|
var serializableError = {};
|
|
5553
5563
|
|
|
5554
5564
|
serializableError.isSerializableError = void 0;
|
|
5555
|
-
const types_1 = es2018$
|
|
5565
|
+
const types_1 = es2018$5;
|
|
5556
5566
|
function isSerializableError(val) {
|
|
5557
5567
|
return (0, types_1.isObject)(val)
|
|
5558
5568
|
&& (0, types_1.isString)(val.name)
|
|
@@ -5570,7 +5580,7 @@
|
|
|
5570
5580
|
customError.CustomError = void 0;
|
|
5571
5581
|
const iterable_operator_1 = requireEs2018$1();
|
|
5572
5582
|
const get_error_names_1 = getErrorNames$1;
|
|
5573
|
-
const types_1 = es2018$
|
|
5583
|
+
const types_1 = es2018$5;
|
|
5574
5584
|
const serializable_error_1 = serializableError;
|
|
5575
5585
|
class CustomError extends Error {
|
|
5576
5586
|
get name() {
|
|
@@ -5709,7 +5719,7 @@
|
|
|
5709
5719
|
var hasRequiredEs2018;
|
|
5710
5720
|
|
|
5711
5721
|
function requireEs2018 () {
|
|
5712
|
-
if (hasRequiredEs2018) return es2018$
|
|
5722
|
+
if (hasRequiredEs2018) return es2018$9;
|
|
5713
5723
|
hasRequiredEs2018 = 1;
|
|
5714
5724
|
(function (exports) {
|
|
5715
5725
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -5734,69 +5744,106 @@
|
|
|
5734
5744
|
__exportStar(getErrorNames$1, exports);
|
|
5735
5745
|
__exportStar(traverseErrorPrototypeChain$1, exports);
|
|
5736
5746
|
|
|
5737
|
-
} (es2018$
|
|
5738
|
-
return es2018$
|
|
5747
|
+
} (es2018$9));
|
|
5748
|
+
return es2018$9;
|
|
5739
5749
|
}
|
|
5740
5750
|
|
|
5741
5751
|
var es2018Exports$1 = requireEs2018();
|
|
5742
5752
|
|
|
5743
|
-
function
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5753
|
+
function useIIFE(iife, deps) {
|
|
5754
|
+
const oldDeps = react.exports.useRef([]);
|
|
5755
|
+
const isFirstRender = useIsFirstRender();
|
|
5756
|
+
if (isFirstRender()) {
|
|
5757
|
+
iife();
|
|
5758
|
+
}
|
|
5759
|
+
else {
|
|
5760
|
+
if (deps.length === oldDeps.current.length) {
|
|
5761
|
+
if (deps.some((x, i) => x !== oldDeps.current[i])) {
|
|
5762
|
+
iife();
|
|
5763
|
+
}
|
|
5764
|
+
}
|
|
5765
|
+
else {
|
|
5766
|
+
iife();
|
|
5767
|
+
}
|
|
5747
5768
|
}
|
|
5769
|
+
oldDeps.current = Array.from(deps);
|
|
5770
|
+
}
|
|
5771
|
+
|
|
5772
|
+
function useSingleSelection(options, defaultSelectedIndex) {
|
|
5773
|
+
useIIFE(() => {
|
|
5774
|
+
es2018Exports$1.assert(defaultSelectedIndex >= 0 && defaultSelectedIndex < options.length, 'The parameter defaultSelectedIndex must be in the range of 0 to values.length');
|
|
5775
|
+
}, [defaultSelectedIndex]);
|
|
5748
5776
|
const [selectedIndex, setSelectedIndex] = react.exports.useState(defaultSelectedIndex);
|
|
5749
|
-
return
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5777
|
+
return {
|
|
5778
|
+
selectedIndex,
|
|
5779
|
+
optionStates: react.exports.useMemo(createOptionStates, [options, selectedIndex]),
|
|
5780
|
+
select: react.exports.useCallback(select, [])
|
|
5781
|
+
};
|
|
5782
|
+
function createOptionStates() {
|
|
5783
|
+
return options.map((_, index) => ({
|
|
5784
|
+
selected: index === selectedIndex
|
|
5785
|
+
}));
|
|
5786
|
+
}
|
|
5787
|
+
function select(index) {
|
|
5788
|
+
setSelectedIndex(index);
|
|
5789
|
+
}
|
|
5758
5790
|
}
|
|
5759
5791
|
|
|
5760
5792
|
var es2018Exports = requireEs2018$1();
|
|
5761
5793
|
|
|
5762
|
-
function useMultipleSelection(
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5794
|
+
function useMultipleSelection(options, defaultSelectedIndexes = []) {
|
|
5795
|
+
useIIFE(() => {
|
|
5796
|
+
for (const index of defaultSelectedIndexes) {
|
|
5797
|
+
es2018Exports$1.assert(index >= 0 && index < options.length, 'The index of parameter defaultSelectedIndexes must be in the range of 0 to values.length');
|
|
5798
|
+
}
|
|
5799
|
+
}, [defaultSelectedIndexes]);
|
|
5767
5800
|
const [selectedIndexes, setSelectedIndexes] = react.exports.useState(new Set(defaultSelectedIndexes));
|
|
5768
|
-
return
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
const
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
}
|
|
5791
|
-
}
|
|
5801
|
+
return {
|
|
5802
|
+
selectedIndexes: react.exports.useMemo(() => es2018Exports.toArray(selectedIndexes), [selectedIndexes]),
|
|
5803
|
+
optionStates: react.exports.useMemo(createOptionStates, [options, selectedIndexes]),
|
|
5804
|
+
toggle: react.exports.useCallback(toggle, []),
|
|
5805
|
+
select: react.exports.useCallback(select, []),
|
|
5806
|
+
unselect: react.exports.useCallback(unselect, [])
|
|
5807
|
+
};
|
|
5808
|
+
function createOptionStates() {
|
|
5809
|
+
return options.map((_, index) => {
|
|
5810
|
+
const selected = isSelected(index);
|
|
5811
|
+
return { selected };
|
|
5812
|
+
});
|
|
5813
|
+
}
|
|
5814
|
+
function isSelected(index) {
|
|
5815
|
+
return selectedIndexes.has(index);
|
|
5816
|
+
}
|
|
5817
|
+
function toggle(index) {
|
|
5818
|
+
if (isSelected(index)) {
|
|
5819
|
+
unselect(index);
|
|
5820
|
+
}
|
|
5821
|
+
else {
|
|
5822
|
+
select(index);
|
|
5823
|
+
}
|
|
5824
|
+
}
|
|
5825
|
+
function select(index) {
|
|
5826
|
+
setSelectedIndexes(selectedIndexes => {
|
|
5827
|
+
const result = new Set(selectedIndexes);
|
|
5828
|
+
result.add(index);
|
|
5829
|
+
return result;
|
|
5830
|
+
});
|
|
5831
|
+
}
|
|
5832
|
+
function unselect(index) {
|
|
5833
|
+
setSelectedIndexes(selectedIndexes => {
|
|
5834
|
+
const result = new Set(selectedIndexes);
|
|
5835
|
+
result.delete(index);
|
|
5836
|
+
return result;
|
|
5837
|
+
});
|
|
5838
|
+
}
|
|
5792
5839
|
}
|
|
5793
5840
|
|
|
5794
|
-
function useStateCycle(
|
|
5841
|
+
function useStateCycle(orderedStates, initialStateIndex = 0) {
|
|
5795
5842
|
const [index, setIndex] = react.exports.useState(initialStateIndex);
|
|
5796
|
-
return [
|
|
5843
|
+
return [orderedStates[index], react.exports.useCallback(next, [orderedStates])];
|
|
5797
5844
|
function next() {
|
|
5798
5845
|
setIndex(index => {
|
|
5799
|
-
if (index + 1 <
|
|
5846
|
+
if (index + 1 < orderedStates.length) {
|
|
5800
5847
|
return index + 1;
|
|
5801
5848
|
}
|
|
5802
5849
|
else {
|
|
@@ -5808,7 +5855,7 @@
|
|
|
5808
5855
|
|
|
5809
5856
|
function useToggle(initialState = false) {
|
|
5810
5857
|
const [state, setState] = react.exports.useState(initialState);
|
|
5811
|
-
return [state, toggle];
|
|
5858
|
+
return [state, react.exports.useCallback(toggle, [])];
|
|
5812
5859
|
function toggle() {
|
|
5813
5860
|
setState(state => !state);
|
|
5814
5861
|
}
|
|
@@ -5820,7 +5867,7 @@
|
|
|
5820
5867
|
const observer = new ResizeObserver(callback);
|
|
5821
5868
|
refs
|
|
5822
5869
|
.map(x => x.current)
|
|
5823
|
-
.filter(es2018$
|
|
5870
|
+
.filter(es2018$5.isntNull)
|
|
5824
5871
|
.forEach(x => observer.observe(x));
|
|
5825
5872
|
return () => observer.disconnect();
|
|
5826
5873
|
}, deps);
|
|
@@ -5828,7 +5875,7 @@
|
|
|
5828
5875
|
|
|
5829
5876
|
function useStep(steps, initialStepIndex = 0) {
|
|
5830
5877
|
const [index, setIndex] = react.exports.useState(initialStepIndex);
|
|
5831
|
-
return [steps[index], next, previous];
|
|
5878
|
+
return [steps[index], react.exports.useCallback(next, [steps]), react.exports.useCallback(previous, [])];
|
|
5832
5879
|
function next() {
|
|
5833
5880
|
setIndex(index => {
|
|
5834
5881
|
if (index === steps.length - 1) {
|
|
@@ -5853,7 +5900,10 @@
|
|
|
5853
5900
|
|
|
5854
5901
|
function useForceUpdate() {
|
|
5855
5902
|
const [, setState] = react.exports.useState({});
|
|
5856
|
-
return (
|
|
5903
|
+
return react.exports.useCallback(forceUpdate, []);
|
|
5904
|
+
function forceUpdate() {
|
|
5905
|
+
setState({});
|
|
5906
|
+
}
|
|
5857
5907
|
}
|
|
5858
5908
|
|
|
5859
5909
|
var es2018$3 = {};
|
|
@@ -14417,7 +14467,7 @@
|
|
|
14417
14467
|
|
|
14418
14468
|
function useFiniteStateMachine(schema, initialState) {
|
|
14419
14469
|
const forceUpdate = useForceUpdate();
|
|
14420
|
-
const fsm = react.exports.useMemo(() => new es2018$3.ObservableFiniteStateMachine(schema, initialState), [schema]);
|
|
14470
|
+
const fsm = react.exports.useMemo(() => new es2018$3.ObservableFiniteStateMachine(schema, initialState), [schema, initialState]);
|
|
14421
14471
|
react.exports.useEffect(() => {
|
|
14422
14472
|
const observable = fsm.observeStateChanges();
|
|
14423
14473
|
const subscription = observable.subscribe(() => forceUpdate());
|
|
@@ -14429,6 +14479,7 @@
|
|
|
14429
14479
|
exports.ObservableFiniteStateMachine = es2018$3.ObservableFiniteStateMachine;
|
|
14430
14480
|
exports.useFiniteStateMachine = useFiniteStateMachine;
|
|
14431
14481
|
exports.useForceUpdate = useForceUpdate;
|
|
14482
|
+
exports.useIIFE = useIIFE;
|
|
14432
14483
|
exports.useIncrement = useIncrement;
|
|
14433
14484
|
exports.useIsFirstRender = useIsFirstRender;
|
|
14434
14485
|
exports.useIsMounted = useIsMounted;
|
|
@@ -14440,6 +14491,7 @@
|
|
|
14440
14491
|
exports.useStateCycle = useStateCycle;
|
|
14441
14492
|
exports.useStep = useStep;
|
|
14442
14493
|
exports.useToggle = useToggle;
|
|
14494
|
+
exports.useUnmount = useUnmount;
|
|
14443
14495
|
exports.useUpdateEffect = useUpdateEffect;
|
|
14444
14496
|
|
|
14445
14497
|
Object.defineProperty(exports, '__esModule', { value: true });
|