@blackglory/structures 0.3.0 → 0.3.4

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.
@@ -12,6 +12,61 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
12
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
13
  PERFORMANCE OF THIS SOFTWARE.
14
14
  ***************************************************************************** */
15
+ /* global Reflect, Promise */
16
+
17
+ var extendStatics = function(d, b) {
18
+ extendStatics = Object.setPrototypeOf ||
19
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
21
+ return extendStatics(d, b);
22
+ };
23
+
24
+ function __extends(d, b) {
25
+ if (typeof b !== "function" && b !== null)
26
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
27
+ extendStatics(d, b);
28
+ function __() { this.constructor = d; }
29
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30
+ }
31
+
32
+ function __values(o) {
33
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
34
+ if (m) return m.call(o);
35
+ if (o && typeof o.length === "number") return {
36
+ next: function () {
37
+ if (o && i >= o.length) o = void 0;
38
+ return { value: o && o[i++], done: !o };
39
+ }
40
+ };
41
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
42
+ }
43
+
44
+ function __read(o, n) {
45
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
46
+ if (!m) return o;
47
+ var i = m.call(o), r, ar = [], e;
48
+ try {
49
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
50
+ }
51
+ catch (error) { e = { error: error }; }
52
+ finally {
53
+ try {
54
+ if (r && !r.done && (m = i["return"])) m.call(i);
55
+ }
56
+ finally { if (e) throw e.error; }
57
+ }
58
+ return ar;
59
+ }
60
+
61
+ function __spreadArray(to, from, pack) {
62
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
63
+ if (ar || !(i in from)) {
64
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
65
+ ar[i] = from[i];
66
+ }
67
+ }
68
+ return to.concat(ar || Array.prototype.slice.call(from));
69
+ }
15
70
 
16
71
  function __classPrivateFieldGet(receiver, state, kind, f) {
17
72
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
@@ -178,38 +233,72 @@ class Queue {
178
233
 
179
234
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
180
235
 
236
+ var es2018$7 = {};
237
+
238
+ var customError$1 = {};
239
+
181
240
  var es2018$6 = {};
182
241
 
242
+ var middleware = {};
243
+
244
+ var chunkAsync$1 = {};
245
+
246
+ var es2018$5 = {};
247
+
248
+ var go$1 = {};
249
+
250
+ go$1.go = void 0;
251
+ function go(fn) {
252
+ return fn();
253
+ }
254
+ go$1.go = go;
255
+
256
+ (function (exports) {
257
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
258
+ if (k2 === undefined) k2 = k;
259
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
260
+ }) : (function(o, m, k, k2) {
261
+ if (k2 === undefined) k2 = k;
262
+ o[k2] = m[k];
263
+ }));
264
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
265
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
266
+ };__exportStar(go$1, exports);
267
+
268
+ }(es2018$5));
269
+
270
+ var es2018$4 = {};
271
+
183
272
  var customError = {};
184
273
 
185
274
  customError.CustomError = void 0;
186
- class CustomError extends Error {
275
+ class CustomError$1 extends Error {
187
276
  get name() {
188
277
  return this.constructor.name;
189
278
  }
190
279
  }
191
- customError.CustomError = CustomError;
280
+ customError.CustomError = CustomError$1;
192
281
 
193
282
  var expectedError = {};
194
283
 
195
284
  expectedError.ExpectedError = void 0;
196
- const custom_error_1$1 = customError;
197
- class ExpectedError extends custom_error_1$1.CustomError {
285
+ const custom_error_1$2 = customError;
286
+ class ExpectedError extends custom_error_1$2.CustomError {
198
287
  }
199
288
  expectedError.ExpectedError = ExpectedError;
200
289
 
201
- var assertionError = {};
290
+ var assertionError$1 = {};
202
291
 
203
- assertionError.AssertionError = void 0;
204
- const custom_error_1 = customError;
205
- class AssertionError extends custom_error_1.CustomError {
292
+ assertionError$1.AssertionError = void 0;
293
+ const custom_error_1$1 = customError;
294
+ class AssertionError$1 extends custom_error_1$1.CustomError {
206
295
  }
207
- assertionError.AssertionError = AssertionError;
296
+ assertionError$1.AssertionError = AssertionError$1;
208
297
 
209
- var normalize$1 = {};
298
+ var normalize$3 = {};
210
299
 
211
- normalize$1.normalize = void 0;
212
- function normalize(err) {
300
+ normalize$3.normalize = void 0;
301
+ function normalize$2(err) {
213
302
  var _a;
214
303
  return {
215
304
  name: err.name,
@@ -217,7 +306,7 @@ function normalize(err) {
217
306
  stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
218
307
  };
219
308
  }
220
- normalize$1.normalize = normalize;
309
+ normalize$3.normalize = normalize$2;
221
310
 
222
311
  var refute$1 = {};
223
312
 
@@ -229,15 +318,15 @@ function refute(condition, message) {
229
318
  }
230
319
  refute$1.refute = refute;
231
320
 
232
- var assert$1 = {};
321
+ var assert$3 = {};
233
322
 
234
- assert$1.assert = void 0;
235
- const assertion_error_1 = assertionError;
236
- function assert(condition, message) {
323
+ assert$3.assert = void 0;
324
+ const assertion_error_1$1 = assertionError$1;
325
+ function assert$2(condition, message) {
237
326
  if (!condition)
238
- throw new assertion_error_1.AssertionError(message);
327
+ throw new assertion_error_1$1.AssertionError(message);
239
328
  }
240
- assert$1.assert = assert;
329
+ assert$3.assert = assert$2;
241
330
 
242
331
  (function (exports) {
243
332
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -251,46 +340,16 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
251
340
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
252
341
  };__exportStar(customError, exports);
253
342
  __exportStar(expectedError, exports);
254
- __exportStar(assertionError, exports);
255
- __exportStar(normalize$1, exports);
343
+ __exportStar(assertionError$1, exports);
344
+ __exportStar(normalize$3, exports);
256
345
  __exportStar(refute$1, exports);
257
- __exportStar(assert$1, exports);
258
-
259
- }(es2018$6));
260
-
261
- var es2018$5 = {};
262
-
263
- var middleware = {};
264
-
265
- var chunkAsync$1 = {};
266
-
267
- var es2018$4 = {};
268
-
269
- var go$1 = {};
270
-
271
- go$1.go = void 0;
272
- function go(fn) {
273
- return fn();
274
- }
275
- go$1.go = go;
276
-
277
- (function (exports) {
278
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
279
- if (k2 === undefined) k2 = k;
280
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
281
- }) : (function(o, m, k, k2) {
282
- if (k2 === undefined) k2 = k;
283
- o[k2] = m[k];
284
- }));
285
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
286
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
287
- };__exportStar(go$1, exports);
346
+ __exportStar(assert$3, exports);
288
347
 
289
348
  }(es2018$4));
290
349
 
291
350
  chunkAsync$1.chunkAsync = void 0;
292
- const go_1$f = es2018$4;
293
- const errors_1$f = es2018$6;
351
+ const go_1$f = es2018$5;
352
+ const errors_1$f = es2018$4;
294
353
  function chunkAsync(iterable, size) {
295
354
  (0, errors_1$f.assert)(Number.isInteger(size), 'The parameter size must be an integer');
296
355
  (0, errors_1$f.assert)(size > 0, 'The parameter size must be greater than 0');
@@ -313,295 +372,443 @@ var chunkByAsync$1 = {};
313
372
 
314
373
  var es2018$3 = {};
315
374
 
316
- var array$1 = {};
375
+ var array = {};
317
376
 
318
- array$1.isntEmptyArray = array$1.isEmptyArray = array$1.isntArray = array$1.isArray = void 0;
319
- function isArray$1(val) {
377
+ array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
378
+ function isArray(val) {
320
379
  return Array.isArray(val);
321
380
  }
322
- array$1.isArray = isArray$1;
323
- function isntArray$1(val) {
324
- return !isArray$1(val);
381
+ array.isArray = isArray;
382
+ function isntArray(val) {
383
+ return !isArray(val);
325
384
  }
326
- array$1.isntArray = isntArray$1;
327
- function isEmptyArray$1(val) {
385
+ array.isntArray = isntArray;
386
+ function isEmptyArray(val) {
328
387
  return val.length === 0;
329
388
  }
330
- array$1.isEmptyArray = isEmptyArray$1;
331
- function isntEmptyArray$1(val) {
389
+ array.isEmptyArray = isEmptyArray;
390
+ function isntEmptyArray(val) {
332
391
  return val.length !== 0;
333
392
  }
334
- array$1.isntEmptyArray = isntEmptyArray$1;
393
+ array.isntEmptyArray = isntEmptyArray;
335
394
 
336
- var asyncIterable$1 = {};
395
+ var asyncIterable = {};
337
396
 
338
- var _null$1 = {};
397
+ var _null = {};
339
398
 
340
- _null$1.isntNull = _null$1.isNull = void 0;
341
- function isNull$1(val) {
399
+ _null.isntNull = _null.isNull = void 0;
400
+ function isNull(val) {
342
401
  return val === null;
343
402
  }
344
- _null$1.isNull = isNull$1;
345
- function isntNull$1(val) {
346
- return !isNull$1(val);
403
+ _null.isNull = isNull;
404
+ function isntNull(val) {
405
+ return !isNull(val);
347
406
  }
348
- _null$1.isntNull = isntNull$1;
407
+ _null.isntNull = isntNull;
349
408
 
350
- var _undefined$1 = {};
409
+ var _undefined = {};
351
410
 
352
- _undefined$1.isntUndefined = _undefined$1.isUndefined = void 0;
353
- function isUndefined$1(val) {
411
+ _undefined.isntUndefined = _undefined.isUndefined = void 0;
412
+ function isUndefined(val) {
354
413
  return val === undefined;
355
414
  }
356
- _undefined$1.isUndefined = isUndefined$1;
357
- function isntUndefined$1(val) {
358
- return !isUndefined$1(val);
415
+ _undefined.isUndefined = isUndefined;
416
+ function isntUndefined(val) {
417
+ return !isUndefined(val);
359
418
  }
360
- _undefined$1.isntUndefined = isntUndefined$1;
419
+ _undefined.isntUndefined = isntUndefined;
361
420
 
362
- asyncIterable$1.isntAsyncIterable = asyncIterable$1.isAsyncIterable = void 0;
363
- const null_1$3 = _null$1;
364
- const undefined_1$5 = _undefined$1;
365
- function isAsyncIterable$1(val) {
366
- return (0, null_1$3.isntNull)(val)
367
- && (0, undefined_1$5.isntUndefined)(val)
421
+ asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
422
+ const null_1$1 = _null;
423
+ const undefined_1$2 = _undefined;
424
+ function isAsyncIterable(val) {
425
+ return (0, null_1$1.isntNull)(val)
426
+ && (0, undefined_1$2.isntUndefined)(val)
368
427
  && typeof val[Symbol.asyncIterator] === 'function';
369
428
  }
370
- asyncIterable$1.isAsyncIterable = isAsyncIterable$1;
371
- function isntAsyncIterable$1(val) {
372
- return !isAsyncIterable$1(val);
429
+ asyncIterable.isAsyncIterable = isAsyncIterable;
430
+ function isntAsyncIterable(val) {
431
+ return !isAsyncIterable(val);
373
432
  }
374
- asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
433
+ asyncIterable.isntAsyncIterable = isntAsyncIterable;
375
434
 
376
- var bigint$1 = {};
435
+ var bigint = {};
377
436
 
378
- bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
379
- function isBigInt$1(val) {
437
+ bigint.isntBigInt = bigint.isBigInt = void 0;
438
+ function isBigInt(val) {
380
439
  return typeof val === 'bigint';
381
440
  }
382
- bigint$1.isBigInt = isBigInt$1;
383
- function isntBigInt$1(val) {
384
- return !isBigInt$1(val);
441
+ bigint.isBigInt = isBigInt;
442
+ function isntBigInt(val) {
443
+ return !isBigInt(val);
385
444
  }
386
- bigint$1.isntBigInt = isntBigInt$1;
445
+ bigint.isntBigInt = isntBigInt;
387
446
 
388
- var boolean$1 = {};
447
+ var boolean = {};
389
448
 
390
- boolean$1.isntBoolean = boolean$1.isBoolean = void 0;
391
- function isBoolean$1(val) {
449
+ boolean.isntBoolean = boolean.isBoolean = void 0;
450
+ function isBoolean(val) {
392
451
  return typeof val === 'boolean';
393
452
  }
394
- boolean$1.isBoolean = isBoolean$1;
395
- function isntBoolean$1(val) {
396
- return !isBoolean$1(val);
453
+ boolean.isBoolean = isBoolean;
454
+ function isntBoolean(val) {
455
+ return !isBoolean(val);
397
456
  }
398
- boolean$1.isntBoolean = isntBoolean$1;
457
+ boolean.isntBoolean = isntBoolean;
399
458
 
400
- var char$1 = {};
459
+ var char = {};
401
460
 
402
- var string$1 = {};
461
+ var string = {};
403
462
 
404
- string$1.isntString = string$1.isString = void 0;
405
- function isString$1(val) {
463
+ string.isntString = string.isString = void 0;
464
+ function isString(val) {
406
465
  return typeof val === 'string';
407
466
  }
408
- string$1.isString = isString$1;
409
- function isntString$1(val) {
410
- return !isString$1(val);
467
+ string.isString = isString;
468
+ function isntString(val) {
469
+ return !isString(val);
411
470
  }
412
- string$1.isntString = isntString$1;
471
+ string.isntString = isntString;
413
472
 
414
- char$1.isntChar = char$1.isChar = void 0;
415
- const string_1$3 = string$1;
416
- function isChar$1(val) {
417
- return (0, string_1$3.isString)(val)
473
+ char.isntChar = char.isChar = void 0;
474
+ const string_1$1 = string;
475
+ function isChar(val) {
476
+ return (0, string_1$1.isString)(val)
418
477
  && val.length === 1;
419
478
  }
420
- char$1.isChar = isChar$1;
421
- function isntChar$1(val) {
422
- return !isChar$1(val);
479
+ char.isChar = isChar;
480
+ function isntChar(val) {
481
+ return !isChar(val);
423
482
  }
424
- char$1.isntChar = isntChar$1;
483
+ char.isntChar = isntChar;
425
484
 
426
- var date$1 = {};
485
+ var date = {};
427
486
 
428
- date$1.isntDate = date$1.isDate = void 0;
429
- function isDate$1(val) {
487
+ date.isntDate = date.isDate = void 0;
488
+ function isDate(val) {
430
489
  return val instanceof Date;
431
490
  }
432
- date$1.isDate = isDate$1;
433
- function isntDate$1(val) {
434
- return !isDate$1(val);
491
+ date.isDate = isDate;
492
+ function isntDate(val) {
493
+ return !isDate(val);
435
494
  }
436
- date$1.isntDate = isntDate$1;
495
+ date.isntDate = isntDate;
437
496
 
438
- var _enum$1 = {};
497
+ var _enum = {};
439
498
 
440
- _enum$1.inEnum = void 0;
441
- function inEnum$1(val, _enum) {
499
+ _enum.inEnum = void 0;
500
+ function inEnum(val, _enum) {
442
501
  return Object.values(_enum).includes(val);
443
502
  }
444
- _enum$1.inEnum = inEnum$1;
503
+ _enum.inEnum = inEnum;
445
504
 
446
- var error$1 = {};
505
+ var error = {};
447
506
 
448
- error$1.isntError = error$1.isError = void 0;
449
- function isError$1(val) {
507
+ error.isntError = error.isError = void 0;
508
+ function isError(val) {
450
509
  return val instanceof Error;
451
510
  }
452
- error$1.isError = isError$1;
453
- function isntError$1(val) {
454
- return !isError$1(val);
511
+ error.isError = isError;
512
+ function isntError(val) {
513
+ return !isError(val);
455
514
  }
456
- error$1.isntError = isntError$1;
515
+ error.isntError = isntError;
457
516
 
458
- var falsy$1 = {};
517
+ var falsy = {};
459
518
 
460
- falsy$1.isntFalsy = falsy$1.isFalsy = void 0;
461
- function isFalsy$1(val) {
519
+ falsy.isntFalsy = falsy.isFalsy = void 0;
520
+ function isFalsy(val) {
462
521
  return !val;
463
522
  }
464
- falsy$1.isFalsy = isFalsy$1;
465
- function isntFalsy$1(val) {
466
- return !isFalsy$1(val);
523
+ falsy.isFalsy = isFalsy;
524
+ function isntFalsy(val) {
525
+ return !isFalsy(val);
467
526
  }
468
- falsy$1.isntFalsy = isntFalsy$1;
527
+ falsy.isntFalsy = isntFalsy;
469
528
 
470
- var _function$1 = {};
529
+ var _function = {};
471
530
 
472
- _function$1.isntFunction = _function$1.isFunction = void 0;
473
- function isFunction$2(val) {
531
+ _function.isntFunction = _function.isFunction = void 0;
532
+ function isFunction$1(val) {
474
533
  return typeof val === 'function';
475
534
  }
476
- _function$1.isFunction = isFunction$2;
477
- function isntFunction$1(val) {
478
- return !isFunction$2(val);
535
+ _function.isFunction = isFunction$1;
536
+ function isntFunction(val) {
537
+ return !isFunction$1(val);
479
538
  }
480
- _function$1.isntFunction = isntFunction$1;
539
+ _function.isntFunction = isntFunction;
481
540
 
482
- var iterable$1 = {};
541
+ var iterable = {};
483
542
 
484
- iterable$1.isntIterable = iterable$1.isIterable = void 0;
485
- const null_1$2 = _null$1;
486
- const undefined_1$4 = _undefined$1;
487
- function isIterable$1(val) {
488
- return (0, null_1$2.isntNull)(val)
489
- && (0, undefined_1$4.isntUndefined)(val)
543
+ iterable.isntIterable = iterable.isIterable = void 0;
544
+ const null_1 = _null;
545
+ const undefined_1$1 = _undefined;
546
+ function isIterable(val) {
547
+ return (0, null_1.isntNull)(val)
548
+ && (0, undefined_1$1.isntUndefined)(val)
490
549
  && typeof val[Symbol.iterator] === 'function';
491
550
  }
492
- iterable$1.isIterable = isIterable$1;
493
- function isntIterable$1(val) {
494
- return !isIterable$1(val);
551
+ iterable.isIterable = isIterable;
552
+ function isntIterable(val) {
553
+ return !isIterable(val);
495
554
  }
496
- iterable$1.isntIterable = isntIterable$1;
555
+ iterable.isntIterable = isntIterable;
497
556
 
498
- var jsonRpc$1 = {};
557
+ var jsonRpc = {};
499
558
 
500
- var object$1 = {};
559
+ var object = {};
501
560
 
502
- object$1.isntEmptyObject = object$1.isEmptyObject = object$1.isRecord = object$1.isntObject = object$1.isObject = void 0;
503
- function isObject$1(val) {
504
- return val !== null && typeof val === 'object';
505
- }
506
- object$1.isObject = isObject$1;
507
- function isntObject$1(val) {
508
- return !isObject$1(val);
509
- }
510
- object$1.isntObject = isntObject$1;
511
- function isRecord$1(val) {
512
- return isObject$1(val);
513
- }
514
- object$1.isRecord = isRecord$1;
515
- function isEmptyObject$1(val) {
516
- return Object.keys(val).length === 0;
561
+ /**
562
+ * lodash (Custom Build) <https://lodash.com/>
563
+ * Build: `lodash modularize exports="npm" -o ./`
564
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
565
+ * Released under MIT license <https://lodash.com/license>
566
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
567
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
568
+ */
569
+
570
+ /** `Object#toString` result references. */
571
+ var objectTag = '[object Object]';
572
+
573
+ /**
574
+ * Checks if `value` is a host object in IE < 9.
575
+ *
576
+ * @private
577
+ * @param {*} value The value to check.
578
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
579
+ */
580
+ function isHostObject(value) {
581
+ // Many host objects are `Object` objects that can coerce to strings
582
+ // despite having improperly defined `toString` methods.
583
+ var result = false;
584
+ if (value != null && typeof value.toString != 'function') {
585
+ try {
586
+ result = !!(value + '');
587
+ } catch (e) {}
588
+ }
589
+ return result;
517
590
  }
518
- object$1.isEmptyObject = isEmptyObject$1;
519
- function isntEmptyObject$1(val) {
520
- return Object.keys(val).length !== 0;
591
+
592
+ /**
593
+ * Creates a unary function that invokes `func` with its argument transformed.
594
+ *
595
+ * @private
596
+ * @param {Function} func The function to wrap.
597
+ * @param {Function} transform The argument transform.
598
+ * @returns {Function} Returns the new function.
599
+ */
600
+ function overArg(func, transform) {
601
+ return function(arg) {
602
+ return func(transform(arg));
603
+ };
521
604
  }
522
- object$1.isntEmptyObject = isntEmptyObject$1;
523
605
 
524
- var number$1 = {};
606
+ /** Used for built-in method references. */
607
+ var funcProto = Function.prototype,
608
+ objectProto = Object.prototype;
525
609
 
526
- number$1.isntNumber = number$1.isNumber = void 0;
527
- function isNumber$1(val) {
528
- return typeof val === 'number';
529
- }
530
- number$1.isNumber = isNumber$1;
531
- function isntNumber$1(val) {
532
- return !isNumber$1(val);
533
- }
534
- number$1.isntNumber = isntNumber$1;
535
-
536
- jsonRpc$1.isntJsonRpcError = jsonRpc$1.isJsonRpcError = jsonRpc$1.isntJsonRpcSuccess = jsonRpc$1.isJsonRpcSuccess = jsonRpc$1.isntJsonRpcRequest = jsonRpc$1.isJsonRpcRequest = jsonRpc$1.isntJsonRpcNotification = jsonRpc$1.isJsonRpcNotification = void 0;
537
- const array_1$1 = array$1;
538
- const object_1$1 = object$1;
539
- const string_1$2 = string$1;
540
- const number_1$1 = number$1;
541
- const undefined_1$3 = _undefined$1;
542
- function isJsonRpcId$1(val) {
543
- return (0, string_1$2.isString)(val) || (0, number_1$1.isNumber)(val);
544
- }
545
- function isJsonRpcParams$1(val) {
546
- return (0, array_1$1.isArray)(val) || (0, object_1$1.isObject)(val);
547
- }
548
- function isJsonRpcNotification$1(val) {
549
- return (0, object_1$1.isRecord)(val)
550
- && (0, string_1$2.isString)(val.jsonrpc)
551
- && (0, string_1$2.isString)(val.method)
552
- && (0, undefined_1$3.isUndefined)(val.id)
553
- && isJsonRpcParams$1(val.params);
554
- }
555
- jsonRpc$1.isJsonRpcNotification = isJsonRpcNotification$1;
556
- function isntJsonRpcNotification$1(val) {
557
- return !isJsonRpcNotification$1(val);
558
- }
559
- jsonRpc$1.isntJsonRpcNotification = isntJsonRpcNotification$1;
560
- function isJsonRpcRequest$1(val) {
561
- return (0, object_1$1.isRecord)(val)
562
- && (0, string_1$2.isString)(val.jsonrpc)
563
- && (0, string_1$2.isString)(val.method)
564
- && isJsonRpcId$1(val.id)
565
- && isJsonRpcParams$1(val.params);
566
- }
567
- jsonRpc$1.isJsonRpcRequest = isJsonRpcRequest$1;
568
- function isntJsonRpcRequest$1(val) {
569
- return !isJsonRpcRequest$1(val);
570
- }
571
- jsonRpc$1.isntJsonRpcRequest = isntJsonRpcRequest$1;
572
- function isJsonRpcSuccess$1(val) {
573
- return (0, object_1$1.isRecord)(val)
574
- && (0, string_1$2.isString)(val.jsonrpc)
575
- && (0, string_1$2.isString)(val.id)
576
- && (0, undefined_1$3.isntUndefined)(val.result);
577
- }
578
- jsonRpc$1.isJsonRpcSuccess = isJsonRpcSuccess$1;
579
- function isntJsonRpcSuccess$1(val) {
580
- return !isJsonRpcSuccess$1(val);
581
- }
582
- jsonRpc$1.isntJsonRpcSuccess = isntJsonRpcSuccess$1;
583
- function isJsonRpcError$1(val) {
584
- return (0, object_1$1.isRecord)(val)
585
- && (0, string_1$2.isString)(val.jsonrpc)
586
- && isJsonRpcId$1(val.id)
587
- && isJsonRpcErrorObject$1(val.error);
588
- }
589
- jsonRpc$1.isJsonRpcError = isJsonRpcError$1;
590
- function isntJsonRpcError$1(val) {
591
- return !isJsonRpcError$1(val);
592
- }
593
- jsonRpc$1.isntJsonRpcError = isntJsonRpcError$1;
594
- function isJsonRpcErrorObject$1(val) {
595
- return (0, object_1$1.isRecord)(val)
596
- && (0, number_1$1.isNumber)(val.code)
597
- && (0, string_1$2.isString)(val.message)
598
- && ((0, undefined_1$3.isUndefined)(val.data) || (0, object_1$1.isObject)(val.data));
599
- }
600
-
601
- var json$1 = {};
602
-
603
- json$1.isntJson = json$1.isJson = void 0;
604
- function isJson$1(val) {
610
+ /** Used to resolve the decompiled source of functions. */
611
+ var funcToString = funcProto.toString;
612
+
613
+ /** Used to check objects for own properties. */
614
+ var hasOwnProperty = objectProto.hasOwnProperty;
615
+
616
+ /** Used to infer the `Object` constructor. */
617
+ var objectCtorString = funcToString.call(Object);
618
+
619
+ /**
620
+ * Used to resolve the
621
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
622
+ * of values.
623
+ */
624
+ var objectToString = objectProto.toString;
625
+
626
+ /** Built-in value references. */
627
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
628
+
629
+ /**
630
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
631
+ * and has a `typeof` result of "object".
632
+ *
633
+ * @static
634
+ * @memberOf _
635
+ * @since 4.0.0
636
+ * @category Lang
637
+ * @param {*} value The value to check.
638
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
639
+ * @example
640
+ *
641
+ * _.isObjectLike({});
642
+ * // => true
643
+ *
644
+ * _.isObjectLike([1, 2, 3]);
645
+ * // => true
646
+ *
647
+ * _.isObjectLike(_.noop);
648
+ * // => false
649
+ *
650
+ * _.isObjectLike(null);
651
+ * // => false
652
+ */
653
+ function isObjectLike(value) {
654
+ return !!value && typeof value == 'object';
655
+ }
656
+
657
+ /**
658
+ * Checks if `value` is a plain object, that is, an object created by the
659
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
660
+ *
661
+ * @static
662
+ * @memberOf _
663
+ * @since 0.8.0
664
+ * @category Lang
665
+ * @param {*} value The value to check.
666
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
667
+ * @example
668
+ *
669
+ * function Foo() {
670
+ * this.a = 1;
671
+ * }
672
+ *
673
+ * _.isPlainObject(new Foo);
674
+ * // => false
675
+ *
676
+ * _.isPlainObject([1, 2, 3]);
677
+ * // => false
678
+ *
679
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
680
+ * // => true
681
+ *
682
+ * _.isPlainObject(Object.create(null));
683
+ * // => true
684
+ */
685
+ function isPlainObject$1(value) {
686
+ if (!isObjectLike(value) ||
687
+ objectToString.call(value) != objectTag || isHostObject(value)) {
688
+ return false;
689
+ }
690
+ var proto = getPrototype(value);
691
+ if (proto === null) {
692
+ return true;
693
+ }
694
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
695
+ return (typeof Ctor == 'function' &&
696
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
697
+ }
698
+
699
+ var lodash_isplainobject = isPlainObject$1;
700
+
701
+ var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
702
+ return (mod && mod.__esModule) ? mod : { "default": mod };
703
+ };object.isntEmptyObject = object.isEmptyObject = object.isntPlainObject = object.isPlainObject = object.isntObject = object.isObject = void 0;
704
+ const lodash_isplainobject_1 = __importDefault(lodash_isplainobject);
705
+ function isObject(val) {
706
+ return val !== null
707
+ && typeof val === 'object';
708
+ }
709
+ object.isObject = isObject;
710
+ function isntObject(val) {
711
+ return !isObject(val);
712
+ }
713
+ object.isntObject = isntObject;
714
+ function isPlainObject(val) {
715
+ return (0, lodash_isplainobject_1.default)(val);
716
+ }
717
+ object.isPlainObject = isPlainObject;
718
+ function isntPlainObject(val) {
719
+ return !isPlainObject(val);
720
+ }
721
+ object.isntPlainObject = isntPlainObject;
722
+ function isEmptyObject(val) {
723
+ return Object.keys(val).length === 0;
724
+ }
725
+ object.isEmptyObject = isEmptyObject;
726
+ function isntEmptyObject(val) {
727
+ return Object.keys(val).length !== 0;
728
+ }
729
+ object.isntEmptyObject = isntEmptyObject;
730
+
731
+ var number = {};
732
+
733
+ number.isntNumber = number.isNumber = void 0;
734
+ function isNumber(val) {
735
+ return typeof val === 'number';
736
+ }
737
+ number.isNumber = isNumber;
738
+ function isntNumber(val) {
739
+ return !isNumber(val);
740
+ }
741
+ number.isntNumber = isntNumber;
742
+
743
+ jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
744
+ const array_1 = array;
745
+ const object_1 = object;
746
+ const string_1 = string;
747
+ const number_1 = number;
748
+ const undefined_1 = _undefined;
749
+ function isJsonRpcId(val) {
750
+ return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
751
+ }
752
+ function isJsonRpcParams(val) {
753
+ return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
754
+ }
755
+ function isJsonRpcNotification(val) {
756
+ return (0, object_1.isPlainObject)(val)
757
+ && (0, string_1.isString)(val.jsonrpc)
758
+ && (0, string_1.isString)(val.method)
759
+ && (0, undefined_1.isUndefined)(val.id)
760
+ && isJsonRpcParams(val.params);
761
+ }
762
+ jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
763
+ function isntJsonRpcNotification(val) {
764
+ return !isJsonRpcNotification(val);
765
+ }
766
+ jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
767
+ function isJsonRpcRequest(val) {
768
+ return (0, object_1.isPlainObject)(val)
769
+ && (0, string_1.isString)(val.jsonrpc)
770
+ && (0, string_1.isString)(val.method)
771
+ && isJsonRpcId(val.id)
772
+ && isJsonRpcParams(val.params);
773
+ }
774
+ jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
775
+ function isntJsonRpcRequest(val) {
776
+ return !isJsonRpcRequest(val);
777
+ }
778
+ jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
779
+ function isJsonRpcSuccess(val) {
780
+ return (0, object_1.isPlainObject)(val)
781
+ && (0, string_1.isString)(val.jsonrpc)
782
+ && (0, string_1.isString)(val.id)
783
+ && 'result' in val;
784
+ }
785
+ jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
786
+ function isntJsonRpcSuccess(val) {
787
+ return !isJsonRpcSuccess(val);
788
+ }
789
+ jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
790
+ function isJsonRpcError(val) {
791
+ return (0, object_1.isPlainObject)(val)
792
+ && (0, string_1.isString)(val.jsonrpc)
793
+ && isJsonRpcId(val.id)
794
+ && isJsonRpcErrorObject(val.error);
795
+ }
796
+ jsonRpc.isJsonRpcError = isJsonRpcError;
797
+ function isntJsonRpcError(val) {
798
+ return !isJsonRpcError(val);
799
+ }
800
+ jsonRpc.isntJsonRpcError = isntJsonRpcError;
801
+ function isJsonRpcErrorObject(val) {
802
+ return (0, object_1.isPlainObject)(val)
803
+ && (0, number_1.isNumber)(val.code)
804
+ && (0, string_1.isString)(val.message)
805
+ && ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
806
+ }
807
+
808
+ var json = {};
809
+
810
+ json.isntJson = json.isJson = void 0;
811
+ function isJson(val) {
605
812
  try {
606
813
  JSON.stringify(val);
607
814
  return true;
@@ -610,16 +817,16 @@ function isJson$1(val) {
610
817
  return false;
611
818
  }
612
819
  }
613
- json$1.isJson = isJson$1;
614
- function isntJson$1(val) {
615
- return !isntJson$1();
820
+ json.isJson = isJson;
821
+ function isntJson(val) {
822
+ return !isntJson();
616
823
  }
617
- json$1.isntJson = isntJson$1;
824
+ json.isntJson = isntJson;
618
825
 
619
- var url$1 = {};
826
+ var url = {};
620
827
 
621
- url$1.isAbsoluteURL = void 0;
622
- function isAbsoluteURL$1(str) {
828
+ url.isAbsoluteURL = void 0;
829
+ function isAbsoluteURL(str) {
623
830
  try {
624
831
  new URL(str);
625
832
  return true;
@@ -628,7 +835,7 @@ function isAbsoluteURL$1(str) {
628
835
  return false;
629
836
  }
630
837
  }
631
- url$1.isAbsoluteURL = isAbsoluteURL$1;
838
+ url.isAbsoluteURL = isAbsoluteURL;
632
839
 
633
840
  (function (exports) {
634
841
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -640,32 +847,32 @@ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Obj
640
847
  }));
641
848
  var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
642
849
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
643
- };__exportStar(array$1, exports);
644
- __exportStar(asyncIterable$1, exports);
645
- __exportStar(bigint$1, exports);
646
- __exportStar(boolean$1, exports);
647
- __exportStar(char$1, exports);
648
- __exportStar(date$1, exports);
649
- __exportStar(_enum$1, exports);
650
- __exportStar(error$1, exports);
651
- __exportStar(falsy$1, exports);
652
- __exportStar(_function$1, exports);
653
- __exportStar(iterable$1, exports);
654
- __exportStar(jsonRpc$1, exports);
655
- __exportStar(json$1, exports);
656
- __exportStar(_null$1, exports);
657
- __exportStar(number$1, exports);
658
- __exportStar(object$1, exports);
659
- __exportStar(string$1, exports);
660
- __exportStar(_undefined$1, exports);
661
- __exportStar(url$1, exports);
850
+ };__exportStar(array, exports);
851
+ __exportStar(asyncIterable, exports);
852
+ __exportStar(bigint, exports);
853
+ __exportStar(boolean, exports);
854
+ __exportStar(char, exports);
855
+ __exportStar(date, exports);
856
+ __exportStar(_enum, exports);
857
+ __exportStar(error, exports);
858
+ __exportStar(falsy, exports);
859
+ __exportStar(_function, exports);
860
+ __exportStar(iterable, exports);
861
+ __exportStar(jsonRpc, exports);
862
+ __exportStar(json, exports);
863
+ __exportStar(_null, exports);
864
+ __exportStar(number, exports);
865
+ __exportStar(object, exports);
866
+ __exportStar(string, exports);
867
+ __exportStar(_undefined, exports);
868
+ __exportStar(url, exports);
662
869
 
663
870
  }(es2018$3));
664
871
 
665
872
  chunkByAsync$1.chunkByAsync = void 0;
666
- const types_1$h = es2018$3;
873
+ const types_1$k = es2018$3;
667
874
  function chunkByAsync(iterable, predicate) {
668
- if ((0, types_1$h.isAsyncIterable)(iterable)) {
875
+ if ((0, types_1$k.isAsyncIterable)(iterable)) {
669
876
  return chunkByAsyncIterable(iterable);
670
877
  }
671
878
  else {
@@ -724,8 +931,8 @@ chunkBy$1.chunkBy = chunkBy;
724
931
  var chunk$1 = {};
725
932
 
726
933
  chunk$1.chunk = void 0;
727
- const go_1$e = es2018$4;
728
- const errors_1$e = es2018$6;
934
+ const go_1$e = es2018$5;
935
+ const errors_1$e = es2018$4;
729
936
  function chunk(iterable, size) {
730
937
  (0, errors_1$e.assert)(Number.isInteger(size), 'The parameter size must be an integer');
731
938
  (0, errors_1$e.assert)(size > 0, 'The parameter size must be greater than 0');
@@ -747,12 +954,12 @@ chunk$1.chunk = chunk;
747
954
  var concatAsync$1 = {};
748
955
 
749
956
  concatAsync$1.concatAsync = void 0;
750
- const types_1$g = es2018$3;
751
- const go_1$d = es2018$4;
957
+ const types_1$j = es2018$3;
958
+ const go_1$d = es2018$5;
752
959
  function concatAsync(iterable, ...otherIterables) {
753
960
  return (0, go_1$d.go)(async function* () {
754
961
  for (const iter of [iterable, ...otherIterables]) {
755
- if ((0, types_1$g.isAsyncIterable)(iter)) {
962
+ if ((0, types_1$j.isAsyncIterable)(iter)) {
756
963
  for await (const element of iter) {
757
964
  yield element;
758
965
  }
@@ -770,7 +977,7 @@ concatAsync$1.concatAsync = concatAsync;
770
977
  var concat$1 = {};
771
978
 
772
979
  concat$1.concat = void 0;
773
- const go_1$c = es2018$4;
980
+ const go_1$c = es2018$5;
774
981
  function concat(iterable, ...otherIterables) {
775
982
  return (0, go_1$c.go)(function* () {
776
983
  for (const iter of [iterable, ...otherIterables]) {
@@ -799,9 +1006,9 @@ function* copyIterable(iterable) {
799
1006
  utils.copyIterable = copyIterable;
800
1007
 
801
1008
  dropAsync$1.dropAsync = void 0;
802
- const go_1$b = es2018$4;
1009
+ const go_1$b = es2018$5;
803
1010
  const utils_1$3 = utils;
804
- const errors_1$d = es2018$6;
1011
+ const errors_1$d = es2018$4;
805
1012
  function dropAsync(iterable, count) {
806
1013
  (0, errors_1$d.assert)(Number.isInteger(count), 'The parameter count must be an integer');
807
1014
  (0, errors_1$d.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -834,9 +1041,9 @@ dropAsync$1.dropAsync = dropAsync;
834
1041
  var dropRightAsync$1 = {};
835
1042
 
836
1043
  dropRightAsync$1.dropRightAsync = void 0;
837
- const go_1$a = es2018$4;
1044
+ const go_1$a = es2018$5;
838
1045
  const utils_1$2 = utils;
839
- const errors_1$c = es2018$6;
1046
+ const errors_1$c = es2018$4;
840
1047
  function dropRightAsync(iterable, count) {
841
1048
  (0, errors_1$c.assert)(Number.isInteger(count), 'The parameter count must be an integer');
842
1049
  (0, errors_1$c.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -862,9 +1069,9 @@ async function toArrayAsync$2(iterable) {
862
1069
  var dropRight$1 = {};
863
1070
 
864
1071
  dropRight$1.dropRight = void 0;
865
- const go_1$9 = es2018$4;
1072
+ const go_1$9 = es2018$5;
866
1073
  const utils_1$1 = utils;
867
- const errors_1$b = es2018$6;
1074
+ const errors_1$b = es2018$4;
868
1075
  function dropRight(iterable, count) {
869
1076
  (0, errors_1$b.assert)(Number.isInteger(count), 'The parameter count must be an integer');
870
1077
  (0, errors_1$b.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -880,9 +1087,9 @@ dropRight$1.dropRight = dropRight;
880
1087
  var dropUntilAsync$1 = {};
881
1088
 
882
1089
  dropUntilAsync$1.dropUntilAsync = void 0;
883
- const types_1$f = es2018$3;
1090
+ const types_1$i = es2018$3;
884
1091
  function dropUntilAsync(iterable, predicate) {
885
- if ((0, types_1$f.isAsyncIterable)(iterable)) {
1092
+ if ((0, types_1$i.isAsyncIterable)(iterable)) {
886
1093
  return dropUntilAsyncIterable(iterable);
887
1094
  }
888
1095
  else {
@@ -962,9 +1169,9 @@ dropUntil$1.dropUntil = dropUntil;
962
1169
  var drop$1 = {};
963
1170
 
964
1171
  drop$1.drop = void 0;
965
- const go_1$8 = es2018$4;
1172
+ const go_1$8 = es2018$5;
966
1173
  const utils_1 = utils;
967
- const errors_1$a = es2018$6;
1174
+ const errors_1$a = es2018$4;
968
1175
  function drop(iterable, count) {
969
1176
  (0, errors_1$a.assert)(Number.isInteger(count), 'The parameter count must be an integer');
970
1177
  (0, errors_1$a.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -997,9 +1204,9 @@ drop$1.drop = drop;
997
1204
  var filterAsync$1 = {};
998
1205
 
999
1206
  filterAsync$1.filterAsync = void 0;
1000
- const types_1$e = es2018$3;
1207
+ const types_1$h = es2018$3;
1001
1208
  function filterAsync(iterable, predicate) {
1002
- if ((0, types_1$e.isAsyncIterable)(iterable)) {
1209
+ if ((0, types_1$h.isAsyncIterable)(iterable)) {
1003
1210
  return filterAsyncIterable(iterable);
1004
1211
  }
1005
1212
  else {
@@ -1044,9 +1251,9 @@ var flattenDeepAsync$1 = {};
1044
1251
  var flattenByAsync$1 = {};
1045
1252
 
1046
1253
  flattenByAsync$1.flattenByAsync = void 0;
1047
- const types_1$d = es2018$3;
1254
+ const types_1$g = es2018$3;
1048
1255
  function flattenByAsync(iterable, predicate) {
1049
- if ((0, types_1$d.isAsyncIterable)(iterable)) {
1256
+ if ((0, types_1$g.isAsyncIterable)(iterable)) {
1050
1257
  return flattenByAsyncIterable(iterable);
1051
1258
  }
1052
1259
  else {
@@ -1079,12 +1286,12 @@ function flattenByAsync(iterable, predicate) {
1079
1286
  }
1080
1287
  flattenByAsync$1.flattenByAsync = flattenByAsync;
1081
1288
  function isFiniteIterable$1(val) {
1082
- return (0, types_1$d.isIterable)(val) && (0, types_1$d.isntChar)(val);
1289
+ return (0, types_1$g.isIterable)(val) && (0, types_1$g.isntChar)(val);
1083
1290
  }
1084
1291
 
1085
1292
  flattenDeepAsync$1.flattenDeepAsync = void 0;
1086
1293
  const flatten_by_async_1 = flattenByAsync$1;
1087
- const errors_1$9 = es2018$6;
1294
+ const errors_1$9 = es2018$4;
1088
1295
  function flattenDeepAsync(iterable, depth = Infinity) {
1089
1296
  (0, errors_1$9.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1090
1297
  (0, errors_1$9.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
@@ -1102,7 +1309,7 @@ flattenAsync$1.flattenAsync = flattenAsync;
1102
1309
  var flattenBy$1 = {};
1103
1310
 
1104
1311
  flattenBy$1.flattenBy = void 0;
1105
- const types_1$c = es2018$3;
1312
+ const types_1$f = es2018$3;
1106
1313
  function flattenBy(iterable, predicate) {
1107
1314
  return flatten(iterable, 1);
1108
1315
  function* flatten(iterable, level) {
@@ -1118,14 +1325,14 @@ function flattenBy(iterable, predicate) {
1118
1325
  }
1119
1326
  flattenBy$1.flattenBy = flattenBy;
1120
1327
  function isFiniteIterable(val) {
1121
- return (0, types_1$c.isIterable)(val) && (0, types_1$c.isntChar)(val);
1328
+ return (0, types_1$f.isIterable)(val) && (0, types_1$f.isntChar)(val);
1122
1329
  }
1123
1330
 
1124
1331
  var flattenDeep$1 = {};
1125
1332
 
1126
1333
  flattenDeep$1.flattenDeep = void 0;
1127
1334
  const flatten_by_1 = flattenBy$1;
1128
- const errors_1$8 = es2018$6;
1335
+ const errors_1$8 = es2018$4;
1129
1336
  function flattenDeep(iterable, depth = Infinity) {
1130
1337
  (0, errors_1$8.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1131
1338
  (0, errors_1$8.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
@@ -1145,9 +1352,9 @@ flatten$1.flatten = flatten;
1145
1352
  var mapAsync$1 = {};
1146
1353
 
1147
1354
  mapAsync$1.mapAsync = void 0;
1148
- const types_1$b = es2018$3;
1355
+ const types_1$e = es2018$3;
1149
1356
  function mapAsync(iterable, fn) {
1150
- if ((0, types_1$b.isAsyncIterable)(iterable)) {
1357
+ if ((0, types_1$e.isAsyncIterable)(iterable)) {
1151
1358
  return mapAsyncIterable(iterable);
1152
1359
  }
1153
1360
  else {
@@ -1185,8 +1392,8 @@ map$1.map = map;
1185
1392
  var repeatAsync$1 = {};
1186
1393
 
1187
1394
  repeatAsync$1.repeatAsync = void 0;
1188
- const go_1$7 = es2018$4;
1189
- const errors_1$7 = es2018$6;
1395
+ const go_1$7 = es2018$5;
1396
+ const errors_1$7 = es2018$4;
1190
1397
  function repeatAsync(iterable, times) {
1191
1398
  (0, errors_1$7.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1192
1399
  (0, errors_1$7.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
@@ -1220,8 +1427,8 @@ function isProduction$1() {
1220
1427
  var repeat$1 = {};
1221
1428
 
1222
1429
  repeat$1.repeat = void 0;
1223
- const go_1$6 = es2018$4;
1224
- const errors_1$6 = es2018$6;
1430
+ const go_1$6 = es2018$5;
1431
+ const errors_1$6 = es2018$4;
1225
1432
  function repeat(iterable, times) {
1226
1433
  (0, errors_1$6.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1227
1434
  (0, errors_1$6.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
@@ -1255,8 +1462,8 @@ function isProduction() {
1255
1462
  var sliceAsync$1 = {};
1256
1463
 
1257
1464
  sliceAsync$1.sliceAsync = void 0;
1258
- const go_1$5 = es2018$4;
1259
- const errors_1$5 = es2018$6;
1465
+ const go_1$5 = es2018$5;
1466
+ const errors_1$5 = es2018$4;
1260
1467
  function sliceAsync(iterable, start, end = Infinity) {
1261
1468
  (0, errors_1$5.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1262
1469
  (0, errors_1$5.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
@@ -1278,8 +1485,8 @@ sliceAsync$1.sliceAsync = sliceAsync;
1278
1485
  var slice$1 = {};
1279
1486
 
1280
1487
  slice$1.slice = void 0;
1281
- const go_1$4 = es2018$4;
1282
- const errors_1$4 = es2018$6;
1488
+ const go_1$4 = es2018$5;
1489
+ const errors_1$4 = es2018$4;
1283
1490
  function slice(iterable, start, end = Infinity) {
1284
1491
  (0, errors_1$4.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1285
1492
  (0, errors_1$4.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
@@ -1319,9 +1526,9 @@ splitAsync$1.splitAsync = splitAsync;
1319
1526
  var splitByAsync$1 = {};
1320
1527
 
1321
1528
  splitByAsync$1.splitByAsync = void 0;
1322
- const types_1$a = es2018$3;
1529
+ const types_1$d = es2018$3;
1323
1530
  function splitByAsync(iterable, predicate) {
1324
- if ((0, types_1$a.isAsyncIterable)(iterable)) {
1531
+ if ((0, types_1$d.isAsyncIterable)(iterable)) {
1325
1532
  return splitByAsyncIterable(iterable);
1326
1533
  }
1327
1534
  else {
@@ -1401,8 +1608,8 @@ split$1.split = split;
1401
1608
  var takeAsync$1 = {};
1402
1609
 
1403
1610
  takeAsync$1.takeAsync = void 0;
1404
- const go_1$3 = es2018$4;
1405
- const errors_1$3 = es2018$6;
1611
+ const go_1$3 = es2018$5;
1612
+ const errors_1$3 = es2018$4;
1406
1613
  function takeAsync(iterable, count) {
1407
1614
  (0, errors_1$3.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1408
1615
  (0, errors_1$3.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1422,8 +1629,8 @@ takeAsync$1.takeAsync = takeAsync;
1422
1629
  var takeRightAsync$1 = {};
1423
1630
 
1424
1631
  takeRightAsync$1.takeRightAsync = void 0;
1425
- const go_1$2 = es2018$4;
1426
- const errors_1$2 = es2018$6;
1632
+ const go_1$2 = es2018$5;
1633
+ const errors_1$2 = es2018$4;
1427
1634
  function takeRightAsync(iterable, count) {
1428
1635
  (0, errors_1$2.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1429
1636
  (0, errors_1$2.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1452,8 +1659,8 @@ takeRightAsync$1.takeRightAsync = takeRightAsync;
1452
1659
  var takeRight$1 = {};
1453
1660
 
1454
1661
  takeRight$1.takeRight = void 0;
1455
- const go_1$1 = es2018$4;
1456
- const errors_1$1 = es2018$6;
1662
+ const go_1$1 = es2018$5;
1663
+ const errors_1$1 = es2018$4;
1457
1664
  function takeRight(iterable, count) {
1458
1665
  (0, errors_1$1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1459
1666
  (0, errors_1$1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1482,9 +1689,9 @@ takeRight$1.takeRight = takeRight;
1482
1689
  var takeUntilAsync$1 = {};
1483
1690
 
1484
1691
  takeUntilAsync$1.takeUntilAsync = void 0;
1485
- const types_1$9 = es2018$3;
1692
+ const types_1$c = es2018$3;
1486
1693
  function takeUntilAsync(iterable, predicate) {
1487
- if ((0, types_1$9.isAsyncIterable)(iterable)) {
1694
+ if ((0, types_1$c.isAsyncIterable)(iterable)) {
1488
1695
  return takeUntilAsyncIterable(iterable);
1489
1696
  }
1490
1697
  else {
@@ -1528,8 +1735,8 @@ takeUntil$1.takeUntil = takeUntil;
1528
1735
  var take$1 = {};
1529
1736
 
1530
1737
  take$1.take = void 0;
1531
- const go_1 = es2018$4;
1532
- const errors_1 = es2018$6;
1738
+ const go_1 = es2018$5;
1739
+ const errors_1 = es2018$4;
1533
1740
  function take(iterable, count) {
1534
1741
  (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1535
1742
  (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1549,9 +1756,9 @@ take$1.take = take;
1549
1756
  var tapAsync$1 = {};
1550
1757
 
1551
1758
  tapAsync$1.tapAsync = void 0;
1552
- const types_1$8 = es2018$3;
1759
+ const types_1$b = es2018$3;
1553
1760
  function tapAsync(iterable, fn) {
1554
- if ((0, types_1$8.isAsyncIterable)(iterable)) {
1761
+ if ((0, types_1$b.isAsyncIterable)(iterable)) {
1555
1762
  return tapAsyncIterable(iterable);
1556
1763
  }
1557
1764
  else {
@@ -1632,9 +1839,9 @@ uniqAsync$1.uniqAsync = uniqAsync;
1632
1839
  var uniqByAsync$1 = {};
1633
1840
 
1634
1841
  uniqByAsync$1.uniqByAsync = void 0;
1635
- const types_1$7 = es2018$3;
1842
+ const types_1$a = es2018$3;
1636
1843
  function uniqByAsync(iterable, fn) {
1637
- if ((0, types_1$7.isAsyncIterable)(iterable)) {
1844
+ if ((0, types_1$a.isAsyncIterable)(iterable)) {
1638
1845
  return uniqByAsyncIterable(iterable);
1639
1846
  }
1640
1847
  else {
@@ -1701,7 +1908,7 @@ uniq$1.uniq = uniq;
1701
1908
  var zipAsync$1 = {};
1702
1909
 
1703
1910
  zipAsync$1.zipAsync = void 0;
1704
- const types_1$6 = es2018$3;
1911
+ const types_1$9 = es2018$3;
1705
1912
  var Kind;
1706
1913
  (function (Kind) {
1707
1914
  Kind[Kind["Sync"] = 0] = "Sync";
@@ -1715,7 +1922,7 @@ async function* zipWithSize$1(...iterables) {
1715
1922
  var _a, _b, _c, _d;
1716
1923
  const length = iterables.length;
1717
1924
  const iterators = iterables.map(iterable => {
1718
- if ((0, types_1$6.isAsyncIterable)(iterable)) {
1925
+ if ((0, types_1$9.isAsyncIterable)(iterable)) {
1719
1926
  return [Kind.Async, iterable[Symbol.asyncIterator]()];
1720
1927
  }
1721
1928
  else {
@@ -1861,9 +2068,9 @@ consume$1.consume = consume;
1861
2068
  var eachAsync$1 = {};
1862
2069
 
1863
2070
  eachAsync$1.eachAsync = void 0;
1864
- const types_1$5 = es2018$3;
2071
+ const types_1$8 = es2018$3;
1865
2072
  function eachAsync(iterable, fn) {
1866
- if ((0, types_1$5.isAsyncIterable)(iterable)) {
2073
+ if ((0, types_1$8.isAsyncIterable)(iterable)) {
1867
2074
  return eachAsyncIterable(iterable);
1868
2075
  }
1869
2076
  else {
@@ -1901,9 +2108,9 @@ each$1.each = each;
1901
2108
  var everyAsync$1 = {};
1902
2109
 
1903
2110
  everyAsync$1.everyAsync = void 0;
1904
- const types_1$4 = es2018$3;
2111
+ const types_1$7 = es2018$3;
1905
2112
  function everyAsync(iterable, predicate) {
1906
- if ((0, types_1$4.isAsyncIterable)(iterable)) {
2113
+ if ((0, types_1$7.isAsyncIterable)(iterable)) {
1907
2114
  return everyAsyncIterable(iterable);
1908
2115
  }
1909
2116
  else {
@@ -1947,9 +2154,9 @@ every$1.every = every;
1947
2154
  var findAsync$1 = {};
1948
2155
 
1949
2156
  findAsync$1.findAsync = void 0;
1950
- const types_1$3 = es2018$3;
2157
+ const types_1$6 = es2018$3;
1951
2158
  function findAsync(iterable, predicate) {
1952
- if ((0, types_1$3.isAsyncIterable)(iterable)) {
2159
+ if ((0, types_1$6.isAsyncIterable)(iterable)) {
1953
2160
  return findAsyncIterable(iterable);
1954
2161
  }
1955
2162
  else {
@@ -2071,9 +2278,9 @@ match$1.match = match;
2071
2278
  var reduceAsync$1 = {};
2072
2279
 
2073
2280
  reduceAsync$1.reduceAsync = void 0;
2074
- const types_1$2 = es2018$3;
2281
+ const types_1$5 = es2018$3;
2075
2282
  function reduceAsync(iterable, fn, initialValue) {
2076
- if ((0, types_1$2.isUndefined)(initialValue)) {
2283
+ if ((0, types_1$5.isUndefined)(initialValue)) {
2077
2284
  return reduceAsyncWithoutInitialValue(iterable, fn);
2078
2285
  }
2079
2286
  else {
@@ -2082,7 +2289,7 @@ function reduceAsync(iterable, fn, initialValue) {
2082
2289
  }
2083
2290
  reduceAsync$1.reduceAsync = reduceAsync;
2084
2291
  function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
2085
- if ((0, types_1$2.isAsyncIterable)(iterable)) {
2292
+ if ((0, types_1$5.isAsyncIterable)(iterable)) {
2086
2293
  return reduceAsyncIterable(iterable);
2087
2294
  }
2088
2295
  else {
@@ -2104,7 +2311,7 @@ function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
2104
2311
  }
2105
2312
  }
2106
2313
  function reduceAsyncWithoutInitialValue(iterable, fn) {
2107
- if ((0, types_1$2.isAsyncIterable)(iterable)) {
2314
+ if ((0, types_1$5.isAsyncIterable)(iterable)) {
2108
2315
  return reduceAsyncIterable(iterable);
2109
2316
  }
2110
2317
  else {
@@ -2167,9 +2374,9 @@ function reduceAsyncWithoutInitialValue(iterable, fn) {
2167
2374
  var reduce$1 = {};
2168
2375
 
2169
2376
  reduce$1.reduce = void 0;
2170
- const types_1$1 = es2018$3;
2377
+ const types_1$4 = es2018$3;
2171
2378
  function reduce(iterable, fn, initialValue) {
2172
- if ((0, types_1$1.isUndefined)(initialValue)) {
2379
+ if ((0, types_1$4.isUndefined)(initialValue)) {
2173
2380
  return reduceWithoutInitialValue(iterable, fn);
2174
2381
  }
2175
2382
  else {
@@ -2214,9 +2421,9 @@ function reduceWithoutInitialValue(iterable, fn) {
2214
2421
  var someAsync$1 = {};
2215
2422
 
2216
2423
  someAsync$1.someAsync = void 0;
2217
- const types_1 = es2018$3;
2424
+ const types_1$3 = es2018$3;
2218
2425
  function someAsync(iterable, predicate) {
2219
- if ((0, types_1.isAsyncIterable)(iterable)) {
2426
+ if ((0, types_1$3.isAsyncIterable)(iterable)) {
2220
2427
  return someAsyncIterable(iterable);
2221
2428
  }
2222
2429
  else {
@@ -2398,73 +2605,253 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
2398
2605
  };__exportStar(middleware, exports);
2399
2606
  __exportStar(output, exports);
2400
2607
 
2401
- }(es2018$5));
2608
+ }(es2018$6));
2402
2609
 
2403
- var _LRUMap_limit, _LRUMap_map;
2404
- class LRUMap {
2405
- constructor(limit) {
2406
- _LRUMap_limit.set(this, void 0);
2407
- _LRUMap_map.set(this, new Map());
2408
- es2018$6.assert(Number.isInteger(limit), 'The parameter limit must be an integer');
2409
- es2018$6.assert(limit > 0, 'The parameter limit must be a positive value');
2410
- __classPrivateFieldSet(this, _LRUMap_limit, limit, "f");
2411
- }
2412
- get [(_LRUMap_limit = new WeakMap(), _LRUMap_map = new WeakMap(), Symbol.toStringTag)]() {
2413
- return this.constructor.name;
2414
- }
2415
- get size() {
2416
- return __classPrivateFieldGet(this, _LRUMap_map, "f").size;
2610
+ var getErrorNames$1 = {};
2611
+
2612
+ var traverseErrorPrototypeChain$1 = {};
2613
+
2614
+ traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = void 0;
2615
+ function* traverseErrorPrototypeChain(err) {
2616
+ let current = err;
2617
+ while ((current = Object.getPrototypeOf(current))) {
2618
+ yield current;
2619
+ if (current === Error.prototype)
2620
+ break;
2417
2621
  }
2418
- set(key, value) {
2419
- if (__classPrivateFieldGet(this, _LRUMap_map, "f").has(key)) {
2420
- this.updateItem(key, value);
2421
- }
2422
- else {
2423
- if (__classPrivateFieldGet(this, _LRUMap_map, "f").size === __classPrivateFieldGet(this, _LRUMap_limit, "f")) {
2424
- __classPrivateFieldGet(this, _LRUMap_map, "f").delete(this.getColdestKey());
2622
+ }
2623
+ traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = traverseErrorPrototypeChain;
2624
+
2625
+ getErrorNames$1.getErrorNames = void 0;
2626
+ const types_1$2 = es2018$3;
2627
+ const traverse_error_prototype_chain_1 = traverseErrorPrototypeChain$1;
2628
+ function* getErrorNames(err) {
2629
+ var _a;
2630
+ if ((0, types_1$2.isError)(err)) {
2631
+ for (const prototype of (0, traverse_error_prototype_chain_1.traverseErrorPrototypeChain)(err)) {
2632
+ if ((_a = prototype.constructor) === null || _a === void 0 ? void 0 : _a.name) {
2633
+ yield prototype.constructor.name;
2425
2634
  }
2426
- __classPrivateFieldGet(this, _LRUMap_map, "f").set(key, value);
2427
2635
  }
2428
- return this;
2429
- }
2430
- has(key) {
2431
- return __classPrivateFieldGet(this, _LRUMap_map, "f").has(key);
2432
2636
  }
2433
- get(key) {
2434
- if (!this.has(key))
2435
- return undefined;
2436
- const value = __classPrivateFieldGet(this, _LRUMap_map, "f").get(key);
2437
- this.updateItem(key, value);
2438
- return value;
2439
- }
2440
- delete(key) {
2441
- return __classPrivateFieldGet(this, _LRUMap_map, "f").delete(key);
2442
- }
2443
- clear() {
2444
- __classPrivateFieldGet(this, _LRUMap_map, "f").clear();
2445
- }
2446
- /**
2447
- * Reinsert the item.
2448
- */
2449
- updateItem(key, value) {
2450
- __classPrivateFieldGet(this, _LRUMap_map, "f").delete(key);
2451
- __classPrivateFieldGet(this, _LRUMap_map, "f").set(key, value);
2452
- }
2453
- /**
2454
- * Return the earliest key inserted in the Map
2455
- */
2456
- getColdestKey() {
2457
- return es2018$5.first(__classPrivateFieldGet(this, _LRUMap_map, "f").keys());
2637
+ else {
2638
+ yield err.name;
2639
+ yield* err.ancestors;
2458
2640
  }
2459
2641
  }
2642
+ getErrorNames$1.getErrorNames = getErrorNames;
2460
2643
 
2461
- var es2018$2 = {};
2462
-
2463
- var exponentialBackoff = {};
2464
-
2465
- var es2018$1 = {};
2466
-
2467
- var random$1 = {};
2644
+ var serializableError = {};
2645
+
2646
+ serializableError.isSerializableError = void 0;
2647
+ const types_1$1 = es2018$3;
2648
+ function isSerializableError(val) {
2649
+ return (0, types_1$1.isObject)(val)
2650
+ && (0, types_1$1.isString)(val.name)
2651
+ && (0, types_1$1.isString)(val.message)
2652
+ && ((0, types_1$1.isString)(val.stack) || (0, types_1$1.isNull)(val.stack))
2653
+ && ((0, types_1$1.isArray)(val.ancestors) && val.ancestors.every(types_1$1.isString));
2654
+ }
2655
+ serializableError.isSerializableError = isSerializableError;
2656
+
2657
+ customError$1.CustomError = void 0;
2658
+ const iterable_operator_1$1 = es2018$6;
2659
+ const get_error_names_1$1 = getErrorNames$1;
2660
+ const types_1 = es2018$3;
2661
+ const serializable_error_1 = serializableError;
2662
+ class CustomError extends Error {
2663
+ get name() {
2664
+ var _a, _b;
2665
+ return (_b = (_a = (0, iterable_operator_1$1.first)((0, get_error_names_1$1.getErrorNames)(this))) !== null && _a !== void 0 ? _a : CustomError.name) !== null && _b !== void 0 ? _b : 'CustomError';
2666
+ }
2667
+ static [Symbol.hasInstance](instance) {
2668
+ var _a;
2669
+ if ((0, types_1.isError)(instance) || (0, serializable_error_1.isSerializableError)(instance)) {
2670
+ const reversedClassNames = [
2671
+ (_a = this.prototype.constructor.name) !== null && _a !== void 0 ? _a : this.name,
2672
+ ...(0, get_error_names_1$1.getErrorNames)(this.prototype)
2673
+ ].reverse();
2674
+ const reversedInstanceNames = (0, iterable_operator_1$1.toArray)((0, get_error_names_1$1.getErrorNames)(instance)).reverse();
2675
+ return reversedClassNames.every((x, i) => x === reversedInstanceNames[i]);
2676
+ }
2677
+ else {
2678
+ return false;
2679
+ }
2680
+ }
2681
+ }
2682
+ customError$1.CustomError = CustomError;
2683
+
2684
+ var assertionError = {};
2685
+
2686
+ assertionError.AssertionError = void 0;
2687
+ const custom_error_1 = customError$1;
2688
+ class AssertionError extends custom_error_1.CustomError {
2689
+ }
2690
+ assertionError.AssertionError = AssertionError;
2691
+
2692
+ var normalize$1 = {};
2693
+
2694
+ normalize$1.normalize = void 0;
2695
+ const get_error_names_1 = getErrorNames$1;
2696
+ const iterable_operator_1 = es2018$6;
2697
+ function normalize(err) {
2698
+ var _a;
2699
+ const [name, ...ancestors] = (0, iterable_operator_1.toArray)((0, get_error_names_1.getErrorNames)(err));
2700
+ return {
2701
+ name,
2702
+ ancestors,
2703
+ message: err.message,
2704
+ stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
2705
+ };
2706
+ }
2707
+ normalize$1.normalize = normalize;
2708
+
2709
+ var hydrate$1 = {};
2710
+
2711
+ var es2018$2 = {};
2712
+
2713
+ var pass$1 = {};
2714
+
2715
+ pass$1.pass = void 0;
2716
+ function pass() { }
2717
+ pass$1.pass = pass;
2718
+
2719
+ (function (exports) {
2720
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2721
+ if (k2 === undefined) k2 = k;
2722
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2723
+ }) : (function(o, m, k, k2) {
2724
+ if (k2 === undefined) k2 = k;
2725
+ o[k2] = m[k];
2726
+ }));
2727
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2728
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2729
+ };__exportStar(pass$1, exports);
2730
+
2731
+ }(es2018$2));
2732
+
2733
+ hydrate$1.hydrate = void 0;
2734
+ const pass_1 = es2018$2;
2735
+ function hydrate(err) {
2736
+ var _a;
2737
+ const errorNames = [err.name, ...err.ancestors]
2738
+ .slice(0, -1)
2739
+ .reverse();
2740
+ let errorConstructor = Error;
2741
+ for (const name of errorNames) {
2742
+ errorConstructor = createChildErrorConstructor(errorConstructor, name);
2743
+ }
2744
+ const result = new errorConstructor();
2745
+ result.name = err.name;
2746
+ result.message = err.message;
2747
+ result.stack = (_a = err.stack) !== null && _a !== void 0 ? _a : undefined;
2748
+ return result;
2749
+ }
2750
+ hydrate$1.hydrate = hydrate;
2751
+ function createChildErrorConstructor(parentErrorConstructor, name) {
2752
+ const constructor = function () { (0, pass_1.pass)(); };
2753
+ constructor.prototype = Object.create(parentErrorConstructor.prototype);
2754
+ constructor.prototype.constructor = constructor;
2755
+ Object.defineProperty(constructor, 'name', { value: name });
2756
+ return constructor;
2757
+ }
2758
+
2759
+ var assert$1 = {};
2760
+
2761
+ assert$1.assert = void 0;
2762
+ const assertion_error_1 = assertionError;
2763
+ function assert(condition, message) {
2764
+ if (!condition)
2765
+ throw new assertion_error_1.AssertionError(message);
2766
+ }
2767
+ assert$1.assert = assert;
2768
+
2769
+ (function (exports) {
2770
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2771
+ if (k2 === undefined) k2 = k;
2772
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2773
+ }) : (function(o, m, k, k2) {
2774
+ if (k2 === undefined) k2 = k;
2775
+ o[k2] = m[k];
2776
+ }));
2777
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2778
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2779
+ };__exportStar(customError$1, exports);
2780
+ __exportStar(assertionError, exports);
2781
+ __exportStar(serializableError, exports);
2782
+ __exportStar(normalize$1, exports);
2783
+ __exportStar(hydrate$1, exports);
2784
+ __exportStar(assert$1, exports);
2785
+ __exportStar(getErrorNames$1, exports);
2786
+ __exportStar(traverseErrorPrototypeChain$1, exports);
2787
+
2788
+ }(es2018$7));
2789
+
2790
+ var _LRUMap_limit, _LRUMap_map;
2791
+ class LRUMap {
2792
+ constructor(limit) {
2793
+ _LRUMap_limit.set(this, void 0);
2794
+ _LRUMap_map.set(this, new Map());
2795
+ es2018$7.assert(Number.isInteger(limit), 'The parameter limit must be an integer');
2796
+ es2018$7.assert(limit > 0, 'The parameter limit must be a positive value');
2797
+ __classPrivateFieldSet(this, _LRUMap_limit, limit, "f");
2798
+ }
2799
+ get [(_LRUMap_limit = new WeakMap(), _LRUMap_map = new WeakMap(), Symbol.toStringTag)]() {
2800
+ return this.constructor.name;
2801
+ }
2802
+ get size() {
2803
+ return __classPrivateFieldGet(this, _LRUMap_map, "f").size;
2804
+ }
2805
+ set(key, value) {
2806
+ if (__classPrivateFieldGet(this, _LRUMap_map, "f").has(key)) {
2807
+ this.updateItem(key, value);
2808
+ }
2809
+ else {
2810
+ if (__classPrivateFieldGet(this, _LRUMap_map, "f").size === __classPrivateFieldGet(this, _LRUMap_limit, "f")) {
2811
+ __classPrivateFieldGet(this, _LRUMap_map, "f").delete(this.getColdestKey());
2812
+ }
2813
+ __classPrivateFieldGet(this, _LRUMap_map, "f").set(key, value);
2814
+ }
2815
+ return this;
2816
+ }
2817
+ has(key) {
2818
+ return __classPrivateFieldGet(this, _LRUMap_map, "f").has(key);
2819
+ }
2820
+ get(key) {
2821
+ if (!this.has(key))
2822
+ return undefined;
2823
+ const value = __classPrivateFieldGet(this, _LRUMap_map, "f").get(key);
2824
+ this.updateItem(key, value);
2825
+ return value;
2826
+ }
2827
+ delete(key) {
2828
+ return __classPrivateFieldGet(this, _LRUMap_map, "f").delete(key);
2829
+ }
2830
+ clear() {
2831
+ __classPrivateFieldGet(this, _LRUMap_map, "f").clear();
2832
+ }
2833
+ /**
2834
+ * Reinsert the item.
2835
+ */
2836
+ updateItem(key, value) {
2837
+ __classPrivateFieldGet(this, _LRUMap_map, "f").delete(key);
2838
+ __classPrivateFieldGet(this, _LRUMap_map, "f").set(key, value);
2839
+ }
2840
+ /**
2841
+ * Return the earliest key inserted in the Map
2842
+ */
2843
+ getColdestKey() {
2844
+ return es2018$6.first(__classPrivateFieldGet(this, _LRUMap_map, "f").keys());
2845
+ }
2846
+ }
2847
+
2848
+ var es2018$1 = {};
2849
+
2850
+ var exponentialBackoff = {};
2851
+
2852
+ var es2018 = {};
2853
+
2854
+ var random$1 = {};
2468
2855
 
2469
2856
  random$1.random = void 0;
2470
2857
  function random(min, max) {
@@ -2506,10 +2893,10 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
2506
2893
  __exportStar(randomInt$1, exports);
2507
2894
  __exportStar(randomIntInclusive$1, exports);
2508
2895
 
2509
- }(es2018$1));
2896
+ }(es2018));
2510
2897
 
2511
2898
  exponentialBackoff.calculateExponentialBackoffTimeout = void 0;
2512
- const extra_rand_1 = es2018$1;
2899
+ const extra_rand_1 = es2018;
2513
2900
  function calculateExponentialBackoffTimeout({ baseTimeout, retries, maxTimeout = Infinity, factor = 2, jitter = true }) {
2514
2901
  const timeout = Math.min(factor ** retries * baseTimeout, maxTimeout);
2515
2902
  if (jitter) {
@@ -2624,7 +3011,7 @@ __exportStar(setImmediate$1, exports);
2624
3011
  __exportStar(setTimeoutLoop$1, exports);
2625
3012
  __exportStar(setDynamicTimeoutLoop$1, exports);
2626
3013
 
2627
- }(es2018$2));
3014
+ }(es2018$1));
2628
3015
 
2629
3016
  var _ExpirableMap_map, _ExpirableMap_cancelClearTimeout;
2630
3017
  class ExpirableMap {
@@ -2714,7 +3101,7 @@ class ExpirableMap {
2714
3101
  if (this.itemMetadataSortedByExpirationTime.length > 0) {
2715
3102
  const item = this.itemMetadataSortedByExpirationTime[0];
2716
3103
  if (Number.isFinite(item.expirationTime)) {
2717
- const cancel = es2018$2.setSchedule(item.expirationTime, () => {
3104
+ const cancel = es2018$1.setSchedule(item.expirationTime, () => {
2718
3105
  this.clearExpiredItems(Date.now());
2719
3106
  this.rescheduleClearTimeout();
2720
3107
  });
@@ -2740,8 +3127,8 @@ class TLRUMap {
2740
3127
  * 按过期时间升序排列所有项目的元数据
2741
3128
  */
2742
3129
  this.itemMetadataSortedByExpirationTime = [];
2743
- es2018$6.assert(Number.isInteger(limit), 'The parameter limit must be an integer');
2744
- es2018$6.assert(limit > 0, 'The parameter limit must be a positive value');
3130
+ es2018$7.assert(Number.isInteger(limit), 'The parameter limit must be an integer');
3131
+ es2018$7.assert(limit > 0, 'The parameter limit must be a positive value');
2745
3132
  __classPrivateFieldSet(this, _TLRUMap_limit, limit, "f");
2746
3133
  }
2747
3134
  get [(_TLRUMap_limit = new WeakMap(), _TLRUMap_map = new WeakMap(), _TLRUMap_cancelClearTimeout = new WeakMap(), Symbol.toStringTag)]() {
@@ -2845,7 +3232,7 @@ class TLRUMap {
2845
3232
  if (this.itemMetadataSortedByExpirationTime.length > 0) {
2846
3233
  const item = this.itemMetadataSortedByExpirationTime[0];
2847
3234
  if (Number.isFinite(item.expirationTime)) {
2848
- const cancel = es2018$2.setSchedule(item.expirationTime, () => {
3235
+ const cancel = es2018$1.setSchedule(item.expirationTime, () => {
2849
3236
  this.clearExpiredItems(Date.now());
2850
3237
  this.rescheduleClearTimeout();
2851
3238
  });
@@ -2860,7 +3247,7 @@ class TLRUMap {
2860
3247
  * Return the earliest key inserted in the Map
2861
3248
  */
2862
3249
  getColdestKey() {
2863
- return es2018$5.first(__classPrivateFieldGet(this, _TLRUMap_map, "f").keys());
3250
+ return es2018$6.first(__classPrivateFieldGet(this, _TLRUMap_map, "f").keys());
2864
3251
  }
2865
3252
  }
2866
3253
 
@@ -2928,7 +3315,7 @@ class TrieMap {
2928
3315
  delete node.value;
2929
3316
  // 如果节点没有后缀, 则代表这是末端节点, 往前删除其前缀
2930
3317
  if (node.children.size === 0) {
2931
- for (const [part, parentNode] of es2018$5.toArray(es2018$5.zip(key, parentNodes)).reverse()) {
3318
+ for (const [part, parentNode] of es2018$6.toArray(es2018$6.zip(key, parentNodes)).reverse()) {
2932
3319
  parentNode.children.delete(part);
2933
3320
  if (parentNode.children.size !== 0)
2934
3321
  break;
@@ -2951,11 +3338,14 @@ class FiniteStateMachine {
2951
3338
  matches(state) {
2952
3339
  return __classPrivateFieldGet(this, _FiniteStateMachine_state, "f") === state;
2953
3340
  }
3341
+ can(event) {
3342
+ return event in this.schema[this.state];
3343
+ }
2954
3344
  /**
2955
3345
  * @throws {BadEventError}
2956
3346
  */
2957
3347
  send(event) {
2958
- if (event in this.schema[this.state]) {
3348
+ if (this.can(event)) {
2959
3349
  __classPrivateFieldSet(this, _FiniteStateMachine_state, this.schema[this.state][event], "f");
2960
3350
  }
2961
3351
  else {
@@ -2964,79 +3354,13 @@ class FiniteStateMachine {
2964
3354
  }
2965
3355
  }
2966
3356
  _FiniteStateMachine_state = new WeakMap();
2967
- class BadEventError extends es2018$6.CustomError {
3357
+ class BadEventError extends es2018$7.CustomError {
2968
3358
  constructor(state, event) {
2969
3359
  super(`State ${state} cannot react to event ${event}`);
2970
3360
  }
2971
3361
  }
2972
3362
 
2973
- /*! *****************************************************************************
2974
- Copyright (c) Microsoft Corporation.
2975
-
2976
- Permission to use, copy, modify, and/or distribute this software for any
2977
- purpose with or without fee is hereby granted.
2978
-
2979
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2980
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2981
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2982
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2983
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2984
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2985
- PERFORMANCE OF THIS SOFTWARE.
2986
- ***************************************************************************** */
2987
- /* global Reflect, Promise */
2988
-
2989
- var extendStatics = function(d, b) {
2990
- extendStatics = Object.setPrototypeOf ||
2991
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2992
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2993
- return extendStatics(d, b);
2994
- };
2995
-
2996
- function __extends(d, b) {
2997
- if (typeof b !== "function" && b !== null)
2998
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2999
- extendStatics(d, b);
3000
- function __() { this.constructor = d; }
3001
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3002
- }
3003
-
3004
- function __values(o) {
3005
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
3006
- if (m) return m.call(o);
3007
- if (o && typeof o.length === "number") return {
3008
- next: function () {
3009
- if (o && i >= o.length) o = void 0;
3010
- return { value: o && o[i++], done: !o };
3011
- }
3012
- };
3013
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
3014
- }
3015
-
3016
- function __read(o, n) {
3017
- var m = typeof Symbol === "function" && o[Symbol.iterator];
3018
- if (!m) return o;
3019
- var i = m.call(o), r, ar = [], e;
3020
- try {
3021
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
3022
- }
3023
- catch (error) { e = { error: error }; }
3024
- finally {
3025
- try {
3026
- if (r && !r.done && (m = i["return"])) m.call(i);
3027
- }
3028
- finally { if (e) throw e.error; }
3029
- }
3030
- return ar;
3031
- }
3032
-
3033
- function __spreadArray(to, from) {
3034
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
3035
- to[j] = from[i];
3036
- return to;
3037
- }
3038
-
3039
- function isFunction$1(value) {
3363
+ function isFunction(value) {
3040
3364
  return typeof value === 'function';
3041
3365
  }
3042
3366
 
@@ -3104,7 +3428,7 @@ var Subscription = (function () {
3104
3428
  }
3105
3429
  }
3106
3430
  var initialTeardown = this.initialTeardown;
3107
- if (isFunction$1(initialTeardown)) {
3431
+ if (isFunction(initialTeardown)) {
3108
3432
  try {
3109
3433
  initialTeardown();
3110
3434
  }
@@ -3196,10 +3520,10 @@ var Subscription = (function () {
3196
3520
  var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
3197
3521
  function isSubscription(value) {
3198
3522
  return (value instanceof Subscription ||
3199
- (value && 'closed' in value && isFunction$1(value.remove) && isFunction$1(value.add) && isFunction$1(value.unsubscribe)));
3523
+ (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));
3200
3524
  }
3201
3525
  function execTeardown(teardown) {
3202
- if (isFunction$1(teardown)) {
3526
+ if (isFunction(teardown)) {
3203
3527
  teardown();
3204
3528
  }
3205
3529
  else {
@@ -3329,52 +3653,88 @@ var Subscriber = (function (_super) {
3329
3653
  };
3330
3654
  return Subscriber;
3331
3655
  }(Subscription));
3656
+ var _bind = Function.prototype.bind;
3657
+ function bind(fn, thisArg) {
3658
+ return _bind.call(fn, thisArg);
3659
+ }
3660
+ var ConsumerObserver = (function () {
3661
+ function ConsumerObserver(partialObserver) {
3662
+ this.partialObserver = partialObserver;
3663
+ }
3664
+ ConsumerObserver.prototype.next = function (value) {
3665
+ var partialObserver = this.partialObserver;
3666
+ if (partialObserver.next) {
3667
+ try {
3668
+ partialObserver.next(value);
3669
+ }
3670
+ catch (error) {
3671
+ handleUnhandledError(error);
3672
+ }
3673
+ }
3674
+ };
3675
+ ConsumerObserver.prototype.error = function (err) {
3676
+ var partialObserver = this.partialObserver;
3677
+ if (partialObserver.error) {
3678
+ try {
3679
+ partialObserver.error(err);
3680
+ }
3681
+ catch (error) {
3682
+ handleUnhandledError(error);
3683
+ }
3684
+ }
3685
+ else {
3686
+ handleUnhandledError(err);
3687
+ }
3688
+ };
3689
+ ConsumerObserver.prototype.complete = function () {
3690
+ var partialObserver = this.partialObserver;
3691
+ if (partialObserver.complete) {
3692
+ try {
3693
+ partialObserver.complete();
3694
+ }
3695
+ catch (error) {
3696
+ handleUnhandledError(error);
3697
+ }
3698
+ }
3699
+ };
3700
+ return ConsumerObserver;
3701
+ }());
3332
3702
  var SafeSubscriber = (function (_super) {
3333
3703
  __extends(SafeSubscriber, _super);
3334
3704
  function SafeSubscriber(observerOrNext, error, complete) {
3335
3705
  var _this = _super.call(this) || this;
3336
- var next;
3337
- if (isFunction$1(observerOrNext)) {
3338
- next = observerOrNext;
3706
+ var partialObserver;
3707
+ if (isFunction(observerOrNext) || !observerOrNext) {
3708
+ partialObserver = {
3709
+ next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined,
3710
+ error: error !== null && error !== void 0 ? error : undefined,
3711
+ complete: complete !== null && complete !== void 0 ? complete : undefined,
3712
+ };
3339
3713
  }
3340
- else if (observerOrNext) {
3341
- (next = observerOrNext.next, error = observerOrNext.error, complete = observerOrNext.complete);
3714
+ else {
3342
3715
  var context_1;
3343
3716
  if (_this && config.useDeprecatedNextContext) {
3344
3717
  context_1 = Object.create(observerOrNext);
3345
3718
  context_1.unsubscribe = function () { return _this.unsubscribe(); };
3719
+ partialObserver = {
3720
+ next: observerOrNext.next && bind(observerOrNext.next, context_1),
3721
+ error: observerOrNext.error && bind(observerOrNext.error, context_1),
3722
+ complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),
3723
+ };
3346
3724
  }
3347
3725
  else {
3348
- context_1 = observerOrNext;
3726
+ partialObserver = observerOrNext;
3349
3727
  }
3350
- next = next === null || next === void 0 ? void 0 : next.bind(context_1);
3351
- error = error === null || error === void 0 ? void 0 : error.bind(context_1);
3352
- complete = complete === null || complete === void 0 ? void 0 : complete.bind(context_1);
3353
3728
  }
3354
- _this.destination = {
3355
- next: next ? wrapForErrorHandling(next) : noop,
3356
- error: wrapForErrorHandling(error !== null && error !== void 0 ? error : defaultErrorHandler),
3357
- complete: complete ? wrapForErrorHandling(complete) : noop,
3358
- };
3729
+ _this.destination = new ConsumerObserver(partialObserver);
3359
3730
  return _this;
3360
3731
  }
3361
3732
  return SafeSubscriber;
3362
3733
  }(Subscriber));
3363
- function wrapForErrorHandling(handler, instance) {
3364
- return function () {
3365
- var args = [];
3366
- for (var _i = 0; _i < arguments.length; _i++) {
3367
- args[_i] = arguments[_i];
3368
- }
3369
- try {
3370
- handler.apply(void 0, __spreadArray([], __read(args)));
3371
- }
3372
- catch (err) {
3373
- {
3374
- reportUnhandledError(err);
3375
- }
3376
- }
3377
- };
3734
+ function handleUnhandledError(error) {
3735
+ {
3736
+ reportUnhandledError(error);
3737
+ }
3378
3738
  }
3379
3739
  function defaultErrorHandler(err) {
3380
3740
  throw err;
@@ -3444,16 +3804,20 @@ var Observable = (function () {
3444
3804
  var _this = this;
3445
3805
  promiseCtor = getPromiseCtor(promiseCtor);
3446
3806
  return new promiseCtor(function (resolve, reject) {
3447
- var subscription;
3448
- subscription = _this.subscribe(function (value) {
3449
- try {
3450
- next(value);
3451
- }
3452
- catch (err) {
3453
- reject(err);
3454
- subscription === null || subscription === void 0 ? void 0 : subscription.unsubscribe();
3455
- }
3456
- }, reject, resolve);
3807
+ var subscriber = new SafeSubscriber({
3808
+ next: function (value) {
3809
+ try {
3810
+ next(value);
3811
+ }
3812
+ catch (err) {
3813
+ reject(err);
3814
+ subscriber.unsubscribe();
3815
+ }
3816
+ },
3817
+ error: reject,
3818
+ complete: resolve,
3819
+ });
3820
+ _this.subscribe(subscriber);
3457
3821
  });
3458
3822
  };
3459
3823
  Observable.prototype._subscribe = function (subscriber) {
@@ -3488,7 +3852,7 @@ function getPromiseCtor(promiseCtor) {
3488
3852
  return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
3489
3853
  }
3490
3854
  function isObserver(value) {
3491
- return value && isFunction$1(value.next) && isFunction$1(value.error) && isFunction$1(value.complete);
3855
+ return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
3492
3856
  }
3493
3857
  function isSubscriber(value) {
3494
3858
  return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
@@ -3646,357 +4010,6 @@ var AnonymousSubject = (function (_super) {
3646
4010
  return AnonymousSubject;
3647
4011
  }(Subject));
3648
4012
 
3649
- var es2018 = {};
3650
-
3651
- var array = {};
3652
-
3653
- array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
3654
- function isArray(val) {
3655
- return Array.isArray(val);
3656
- }
3657
- array.isArray = isArray;
3658
- function isntArray(val) {
3659
- return !isArray(val);
3660
- }
3661
- array.isntArray = isntArray;
3662
- function isEmptyArray(val) {
3663
- return val.length === 0;
3664
- }
3665
- array.isEmptyArray = isEmptyArray;
3666
- function isntEmptyArray(val) {
3667
- return val.length !== 0;
3668
- }
3669
- array.isntEmptyArray = isntEmptyArray;
3670
-
3671
- var asyncIterable = {};
3672
-
3673
- var _null = {};
3674
-
3675
- _null.isntNull = _null.isNull = void 0;
3676
- function isNull(val) {
3677
- return val === null;
3678
- }
3679
- _null.isNull = isNull;
3680
- function isntNull(val) {
3681
- return !isNull(val);
3682
- }
3683
- _null.isntNull = isntNull;
3684
-
3685
- var _undefined = {};
3686
-
3687
- _undefined.isntUndefined = _undefined.isUndefined = void 0;
3688
- function isUndefined(val) {
3689
- return val === undefined;
3690
- }
3691
- _undefined.isUndefined = isUndefined;
3692
- function isntUndefined(val) {
3693
- return !isUndefined(val);
3694
- }
3695
- _undefined.isntUndefined = isntUndefined;
3696
-
3697
- asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
3698
- const null_1$1 = _null;
3699
- const undefined_1$2 = _undefined;
3700
- function isAsyncIterable(val) {
3701
- return (0, null_1$1.isntNull)(val)
3702
- && (0, undefined_1$2.isntUndefined)(val)
3703
- && typeof val[Symbol.asyncIterator] === 'function';
3704
- }
3705
- asyncIterable.isAsyncIterable = isAsyncIterable;
3706
- function isntAsyncIterable(val) {
3707
- return !isAsyncIterable(val);
3708
- }
3709
- asyncIterable.isntAsyncIterable = isntAsyncIterable;
3710
-
3711
- var bigint = {};
3712
-
3713
- bigint.isntBigInt = bigint.isBigInt = void 0;
3714
- function isBigInt(val) {
3715
- return typeof val === 'bigint';
3716
- }
3717
- bigint.isBigInt = isBigInt;
3718
- function isntBigInt(val) {
3719
- return !isBigInt(val);
3720
- }
3721
- bigint.isntBigInt = isntBigInt;
3722
-
3723
- var boolean = {};
3724
-
3725
- boolean.isntBoolean = boolean.isBoolean = void 0;
3726
- function isBoolean(val) {
3727
- return typeof val === 'boolean';
3728
- }
3729
- boolean.isBoolean = isBoolean;
3730
- function isntBoolean(val) {
3731
- return !isBoolean(val);
3732
- }
3733
- boolean.isntBoolean = isntBoolean;
3734
-
3735
- var char = {};
3736
-
3737
- var string = {};
3738
-
3739
- string.isntString = string.isString = void 0;
3740
- function isString(val) {
3741
- return typeof val === 'string';
3742
- }
3743
- string.isString = isString;
3744
- function isntString(val) {
3745
- return !isString(val);
3746
- }
3747
- string.isntString = isntString;
3748
-
3749
- char.isntChar = char.isChar = void 0;
3750
- const string_1$1 = string;
3751
- function isChar(val) {
3752
- return (0, string_1$1.isString)(val)
3753
- && val.length === 1;
3754
- }
3755
- char.isChar = isChar;
3756
- function isntChar(val) {
3757
- return !isChar(val);
3758
- }
3759
- char.isntChar = isntChar;
3760
-
3761
- var date = {};
3762
-
3763
- date.isntDate = date.isDate = void 0;
3764
- function isDate(val) {
3765
- return val instanceof Date;
3766
- }
3767
- date.isDate = isDate;
3768
- function isntDate(val) {
3769
- return !isDate(val);
3770
- }
3771
- date.isntDate = isntDate;
3772
-
3773
- var _enum = {};
3774
-
3775
- _enum.inEnum = void 0;
3776
- function inEnum(val, _enum) {
3777
- return Object.values(_enum).includes(val);
3778
- }
3779
- _enum.inEnum = inEnum;
3780
-
3781
- var error = {};
3782
-
3783
- error.isntError = error.isError = void 0;
3784
- function isError(val) {
3785
- return val instanceof Error;
3786
- }
3787
- error.isError = isError;
3788
- function isntError(val) {
3789
- return !isError(val);
3790
- }
3791
- error.isntError = isntError;
3792
-
3793
- var falsy = {};
3794
-
3795
- falsy.isntFalsy = falsy.isFalsy = void 0;
3796
- function isFalsy(val) {
3797
- return !val;
3798
- }
3799
- falsy.isFalsy = isFalsy;
3800
- function isntFalsy(val) {
3801
- return !isFalsy(val);
3802
- }
3803
- falsy.isntFalsy = isntFalsy;
3804
-
3805
- var _function = {};
3806
-
3807
- _function.isntFunction = _function.isFunction = void 0;
3808
- function isFunction(val) {
3809
- return typeof val === 'function';
3810
- }
3811
- _function.isFunction = isFunction;
3812
- function isntFunction(val) {
3813
- return !isFunction(val);
3814
- }
3815
- _function.isntFunction = isntFunction;
3816
-
3817
- var iterable = {};
3818
-
3819
- iterable.isntIterable = iterable.isIterable = void 0;
3820
- const null_1 = _null;
3821
- const undefined_1$1 = _undefined;
3822
- function isIterable(val) {
3823
- return (0, null_1.isntNull)(val)
3824
- && (0, undefined_1$1.isntUndefined)(val)
3825
- && typeof val[Symbol.iterator] === 'function';
3826
- }
3827
- iterable.isIterable = isIterable;
3828
- function isntIterable(val) {
3829
- return !isIterable(val);
3830
- }
3831
- iterable.isntIterable = isntIterable;
3832
-
3833
- var jsonRpc = {};
3834
-
3835
- var object = {};
3836
-
3837
- object.isntEmptyObject = object.isEmptyObject = object.isRecord = object.isntObject = object.isObject = void 0;
3838
- function isObject(val) {
3839
- return val !== null && typeof val === 'object';
3840
- }
3841
- object.isObject = isObject;
3842
- function isntObject(val) {
3843
- return !isObject(val);
3844
- }
3845
- object.isntObject = isntObject;
3846
- function isRecord(val) {
3847
- return isObject(val);
3848
- }
3849
- object.isRecord = isRecord;
3850
- function isEmptyObject(val) {
3851
- return Object.keys(val).length === 0;
3852
- }
3853
- object.isEmptyObject = isEmptyObject;
3854
- function isntEmptyObject(val) {
3855
- return Object.keys(val).length !== 0;
3856
- }
3857
- object.isntEmptyObject = isntEmptyObject;
3858
-
3859
- var number = {};
3860
-
3861
- number.isntNumber = number.isNumber = void 0;
3862
- function isNumber(val) {
3863
- return typeof val === 'number';
3864
- }
3865
- number.isNumber = isNumber;
3866
- function isntNumber(val) {
3867
- return !isNumber(val);
3868
- }
3869
- number.isntNumber = isntNumber;
3870
-
3871
- jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
3872
- const array_1 = array;
3873
- const object_1 = object;
3874
- const string_1 = string;
3875
- const number_1 = number;
3876
- const undefined_1 = _undefined;
3877
- function isJsonRpcId(val) {
3878
- return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
3879
- }
3880
- function isJsonRpcParams(val) {
3881
- return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
3882
- }
3883
- function isJsonRpcNotification(val) {
3884
- return (0, object_1.isRecord)(val)
3885
- && (0, string_1.isString)(val.jsonrpc)
3886
- && (0, string_1.isString)(val.method)
3887
- && (0, undefined_1.isUndefined)(val.id)
3888
- && isJsonRpcParams(val.params);
3889
- }
3890
- jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
3891
- function isntJsonRpcNotification(val) {
3892
- return !isJsonRpcNotification(val);
3893
- }
3894
- jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
3895
- function isJsonRpcRequest(val) {
3896
- return (0, object_1.isRecord)(val)
3897
- && (0, string_1.isString)(val.jsonrpc)
3898
- && (0, string_1.isString)(val.method)
3899
- && isJsonRpcId(val.id)
3900
- && isJsonRpcParams(val.params);
3901
- }
3902
- jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
3903
- function isntJsonRpcRequest(val) {
3904
- return !isJsonRpcRequest(val);
3905
- }
3906
- jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
3907
- function isJsonRpcSuccess(val) {
3908
- return (0, object_1.isRecord)(val)
3909
- && (0, string_1.isString)(val.jsonrpc)
3910
- && (0, string_1.isString)(val.id)
3911
- && 'result' in val;
3912
- }
3913
- jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
3914
- function isntJsonRpcSuccess(val) {
3915
- return !isJsonRpcSuccess(val);
3916
- }
3917
- jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
3918
- function isJsonRpcError(val) {
3919
- return (0, object_1.isRecord)(val)
3920
- && (0, string_1.isString)(val.jsonrpc)
3921
- && isJsonRpcId(val.id)
3922
- && isJsonRpcErrorObject(val.error);
3923
- }
3924
- jsonRpc.isJsonRpcError = isJsonRpcError;
3925
- function isntJsonRpcError(val) {
3926
- return !isJsonRpcError(val);
3927
- }
3928
- jsonRpc.isntJsonRpcError = isntJsonRpcError;
3929
- function isJsonRpcErrorObject(val) {
3930
- return (0, object_1.isRecord)(val)
3931
- && (0, number_1.isNumber)(val.code)
3932
- && (0, string_1.isString)(val.message)
3933
- && ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
3934
- }
3935
-
3936
- var json = {};
3937
-
3938
- json.isntJson = json.isJson = void 0;
3939
- function isJson(val) {
3940
- try {
3941
- JSON.stringify(val);
3942
- return true;
3943
- }
3944
- catch (_a) {
3945
- return false;
3946
- }
3947
- }
3948
- json.isJson = isJson;
3949
- function isntJson(val) {
3950
- return !isntJson();
3951
- }
3952
- json.isntJson = isntJson;
3953
-
3954
- var url = {};
3955
-
3956
- url.isAbsoluteURL = void 0;
3957
- function isAbsoluteURL(str) {
3958
- try {
3959
- new URL(str);
3960
- return true;
3961
- }
3962
- catch (_a) {
3963
- return false;
3964
- }
3965
- }
3966
- url.isAbsoluteURL = isAbsoluteURL;
3967
-
3968
- (function (exports) {
3969
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3970
- if (k2 === undefined) k2 = k;
3971
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3972
- }) : (function(o, m, k, k2) {
3973
- if (k2 === undefined) k2 = k;
3974
- o[k2] = m[k];
3975
- }));
3976
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
3977
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
3978
- };__exportStar(array, exports);
3979
- __exportStar(asyncIterable, exports);
3980
- __exportStar(bigint, exports);
3981
- __exportStar(boolean, exports);
3982
- __exportStar(char, exports);
3983
- __exportStar(date, exports);
3984
- __exportStar(_enum, exports);
3985
- __exportStar(error, exports);
3986
- __exportStar(falsy, exports);
3987
- __exportStar(_function, exports);
3988
- __exportStar(iterable, exports);
3989
- __exportStar(jsonRpc, exports);
3990
- __exportStar(json, exports);
3991
- __exportStar(_null, exports);
3992
- __exportStar(number, exports);
3993
- __exportStar(object, exports);
3994
- __exportStar(string, exports);
3995
- __exportStar(_undefined, exports);
3996
- __exportStar(url, exports);
3997
-
3998
- }(es2018));
3999
-
4000
4013
  class ObservableFiniteStateMachine extends FiniteStateMachine {
4001
4014
  constructor() {
4002
4015
  super(...arguments);
@@ -4013,7 +4026,7 @@ class ObservableFiniteStateMachine extends FiniteStateMachine {
4013
4026
  super.send(event);
4014
4027
  const newState = this.state;
4015
4028
  this.stateChanges.next({ event, oldState, newState });
4016
- if (es2018.isEmptyObject(this.schema[newState])) {
4029
+ if (es2018$3.isEmptyObject(this.schema[newState])) {
4017
4030
  this.stateChanges.complete();
4018
4031
  }
4019
4032
  }