@blackglory/structures 0.2.8 → 0.3.3

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.
@@ -18,6 +18,61 @@
18
18
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
19
  PERFORMANCE OF THIS SOFTWARE.
20
20
  ***************************************************************************** */
21
+ /* global Reflect, Promise */
22
+
23
+ var extendStatics = function(d, b) {
24
+ extendStatics = Object.setPrototypeOf ||
25
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
27
+ return extendStatics(d, b);
28
+ };
29
+
30
+ function __extends(d, b) {
31
+ if (typeof b !== "function" && b !== null)
32
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
33
+ extendStatics(d, b);
34
+ function __() { this.constructor = d; }
35
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36
+ }
37
+
38
+ function __values(o) {
39
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
40
+ if (m) return m.call(o);
41
+ if (o && typeof o.length === "number") return {
42
+ next: function () {
43
+ if (o && i >= o.length) o = void 0;
44
+ return { value: o && o[i++], done: !o };
45
+ }
46
+ };
47
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
48
+ }
49
+
50
+ function __read(o, n) {
51
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
52
+ if (!m) return o;
53
+ var i = m.call(o), r, ar = [], e;
54
+ try {
55
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
56
+ }
57
+ catch (error) { e = { error: error }; }
58
+ finally {
59
+ try {
60
+ if (r && !r.done && (m = i["return"])) m.call(i);
61
+ }
62
+ finally { if (e) throw e.error; }
63
+ }
64
+ return ar;
65
+ }
66
+
67
+ function __spreadArray(to, from, pack) {
68
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
69
+ if (ar || !(i in from)) {
70
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
71
+ ar[i] = from[i];
72
+ }
73
+ }
74
+ return to.concat(ar || Array.prototype.slice.call(from));
75
+ }
21
76
 
22
77
  function __classPrivateFieldGet(receiver, state, kind, f) {
23
78
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
@@ -186,36 +241,70 @@
186
241
 
187
242
  var es2018$6 = {};
188
243
 
244
+ var customError$1 = {};
245
+
246
+ var es2018$5 = {};
247
+
248
+ var middleware = {};
249
+
250
+ var chunkAsync$1 = {};
251
+
252
+ var es2018$4 = {};
253
+
254
+ var go$1 = {};
255
+
256
+ go$1.go = void 0;
257
+ function go(fn) {
258
+ return fn();
259
+ }
260
+ go$1.go = go;
261
+
262
+ (function (exports) {
263
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
264
+ if (k2 === undefined) k2 = k;
265
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
266
+ }) : (function(o, m, k, k2) {
267
+ if (k2 === undefined) k2 = k;
268
+ o[k2] = m[k];
269
+ }));
270
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
271
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
272
+ };__exportStar(go$1, exports);
273
+
274
+ }(es2018$4));
275
+
276
+ var es2018$3 = {};
277
+
189
278
  var customError = {};
190
279
 
191
280
  customError.CustomError = void 0;
192
- class CustomError extends Error {
281
+ class CustomError$1 extends Error {
193
282
  get name() {
194
283
  return this.constructor.name;
195
284
  }
196
285
  }
197
- customError.CustomError = CustomError;
286
+ customError.CustomError = CustomError$1;
198
287
 
199
288
  var expectedError = {};
200
289
 
201
290
  expectedError.ExpectedError = void 0;
202
- const custom_error_1$1 = customError;
203
- class ExpectedError extends custom_error_1$1.CustomError {
291
+ const custom_error_1$2 = customError;
292
+ class ExpectedError extends custom_error_1$2.CustomError {
204
293
  }
205
294
  expectedError.ExpectedError = ExpectedError;
206
295
 
207
- var assertionError = {};
296
+ var assertionError$1 = {};
208
297
 
209
- assertionError.AssertionError = void 0;
210
- const custom_error_1 = customError;
211
- class AssertionError extends custom_error_1.CustomError {
298
+ assertionError$1.AssertionError = void 0;
299
+ const custom_error_1$1 = customError;
300
+ class AssertionError$1 extends custom_error_1$1.CustomError {
212
301
  }
213
- assertionError.AssertionError = AssertionError;
302
+ assertionError$1.AssertionError = AssertionError$1;
214
303
 
215
- var normalize$1 = {};
304
+ var normalize$3 = {};
216
305
 
217
- normalize$1.normalize = void 0;
218
- function normalize(err) {
306
+ normalize$3.normalize = void 0;
307
+ function normalize$2(err) {
219
308
  var _a;
220
309
  return {
221
310
  name: err.name,
@@ -223,7 +312,7 @@
223
312
  stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
224
313
  };
225
314
  }
226
- normalize$1.normalize = normalize;
315
+ normalize$3.normalize = normalize$2;
227
316
 
228
317
  var refute$1 = {};
229
318
 
@@ -235,15 +324,15 @@
235
324
  }
236
325
  refute$1.refute = refute;
237
326
 
238
- var assert$1 = {};
327
+ var assert$3 = {};
239
328
 
240
- assert$1.assert = void 0;
241
- const assertion_error_1 = assertionError;
242
- function assert(condition, message) {
329
+ assert$3.assert = void 0;
330
+ const assertion_error_1$1 = assertionError$1;
331
+ function assert$2(condition, message) {
243
332
  if (!condition)
244
- throw new assertion_error_1.AssertionError(message);
333
+ throw new assertion_error_1$1.AssertionError(message);
245
334
  }
246
- assert$1.assert = assert;
335
+ assert$3.assert = assert$2;
247
336
 
248
337
  (function (exports) {
249
338
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -257,46 +346,16 @@
257
346
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
258
347
  };__exportStar(customError, exports);
259
348
  __exportStar(expectedError, exports);
260
- __exportStar(assertionError, exports);
261
- __exportStar(normalize$1, exports);
349
+ __exportStar(assertionError$1, exports);
350
+ __exportStar(normalize$3, exports);
262
351
  __exportStar(refute$1, exports);
263
- __exportStar(assert$1, exports);
264
-
265
- }(es2018$6));
266
-
267
- var es2018$5 = {};
268
-
269
- var middleware = {};
270
-
271
- var chunkAsync$1 = {};
272
-
273
- var es2018$4 = {};
274
-
275
- var go$1 = {};
276
-
277
- go$1.go = void 0;
278
- function go(fn) {
279
- return fn();
280
- }
281
- go$1.go = go;
282
-
283
- (function (exports) {
284
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
285
- if (k2 === undefined) k2 = k;
286
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
287
- }) : (function(o, m, k, k2) {
288
- if (k2 === undefined) k2 = k;
289
- o[k2] = m[k];
290
- }));
291
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
292
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
293
- };__exportStar(go$1, exports);
352
+ __exportStar(assert$3, exports);
294
353
 
295
- }(es2018$4));
354
+ }(es2018$3));
296
355
 
297
356
  chunkAsync$1.chunkAsync = void 0;
298
357
  const go_1$f = es2018$4;
299
- const errors_1$f = es2018$6;
358
+ const errors_1$f = es2018$3;
300
359
  function chunkAsync(iterable, size) {
301
360
  (0, errors_1$f.assert)(Number.isInteger(size), 'The parameter size must be an integer');
302
361
  (0, errors_1$f.assert)(size > 0, 'The parameter size must be greater than 0');
@@ -317,298 +376,446 @@
317
376
 
318
377
  var chunkByAsync$1 = {};
319
378
 
320
- var es2018$3 = {};
379
+ var es2018$2 = {};
321
380
 
322
- var array$1 = {};
381
+ var array = {};
323
382
 
324
- array$1.isntEmptyArray = array$1.isEmptyArray = array$1.isntArray = array$1.isArray = void 0;
325
- function isArray$1(val) {
383
+ array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
384
+ function isArray(val) {
326
385
  return Array.isArray(val);
327
386
  }
328
- array$1.isArray = isArray$1;
329
- function isntArray$1(val) {
330
- return !isArray$1(val);
387
+ array.isArray = isArray;
388
+ function isntArray(val) {
389
+ return !isArray(val);
331
390
  }
332
- array$1.isntArray = isntArray$1;
333
- function isEmptyArray$1(val) {
391
+ array.isntArray = isntArray;
392
+ function isEmptyArray(val) {
334
393
  return val.length === 0;
335
394
  }
336
- array$1.isEmptyArray = isEmptyArray$1;
337
- function isntEmptyArray$1(val) {
395
+ array.isEmptyArray = isEmptyArray;
396
+ function isntEmptyArray(val) {
338
397
  return val.length !== 0;
339
398
  }
340
- array$1.isntEmptyArray = isntEmptyArray$1;
399
+ array.isntEmptyArray = isntEmptyArray;
341
400
 
342
- var asyncIterable$1 = {};
401
+ var asyncIterable = {};
343
402
 
344
- var _null$1 = {};
403
+ var _null = {};
345
404
 
346
- _null$1.isntNull = _null$1.isNull = void 0;
347
- function isNull$1(val) {
405
+ _null.isntNull = _null.isNull = void 0;
406
+ function isNull(val) {
348
407
  return val === null;
349
408
  }
350
- _null$1.isNull = isNull$1;
351
- function isntNull$1(val) {
352
- return !isNull$1(val);
409
+ _null.isNull = isNull;
410
+ function isntNull(val) {
411
+ return !isNull(val);
353
412
  }
354
- _null$1.isntNull = isntNull$1;
413
+ _null.isntNull = isntNull;
355
414
 
356
- var _undefined$1 = {};
415
+ var _undefined = {};
357
416
 
358
- _undefined$1.isntUndefined = _undefined$1.isUndefined = void 0;
359
- function isUndefined$1(val) {
417
+ _undefined.isntUndefined = _undefined.isUndefined = void 0;
418
+ function isUndefined(val) {
360
419
  return val === undefined;
361
420
  }
362
- _undefined$1.isUndefined = isUndefined$1;
363
- function isntUndefined$1(val) {
364
- return !isUndefined$1(val);
421
+ _undefined.isUndefined = isUndefined;
422
+ function isntUndefined(val) {
423
+ return !isUndefined(val);
365
424
  }
366
- _undefined$1.isntUndefined = isntUndefined$1;
425
+ _undefined.isntUndefined = isntUndefined;
367
426
 
368
- asyncIterable$1.isntAsyncIterable = asyncIterable$1.isAsyncIterable = void 0;
369
- const null_1$3 = _null$1;
370
- const undefined_1$5 = _undefined$1;
371
- function isAsyncIterable$1(val) {
372
- return (0, null_1$3.isntNull)(val)
373
- && (0, undefined_1$5.isntUndefined)(val)
427
+ asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
428
+ const null_1$1 = _null;
429
+ const undefined_1$2 = _undefined;
430
+ function isAsyncIterable(val) {
431
+ return (0, null_1$1.isntNull)(val)
432
+ && (0, undefined_1$2.isntUndefined)(val)
374
433
  && typeof val[Symbol.asyncIterator] === 'function';
375
434
  }
376
- asyncIterable$1.isAsyncIterable = isAsyncIterable$1;
377
- function isntAsyncIterable$1(val) {
378
- return !isAsyncIterable$1(val);
435
+ asyncIterable.isAsyncIterable = isAsyncIterable;
436
+ function isntAsyncIterable(val) {
437
+ return !isAsyncIterable(val);
379
438
  }
380
- asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
439
+ asyncIterable.isntAsyncIterable = isntAsyncIterable;
381
440
 
382
- var bigint$1 = {};
441
+ var bigint = {};
383
442
 
384
- bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
385
- function isBigInt$1(val) {
443
+ bigint.isntBigInt = bigint.isBigInt = void 0;
444
+ function isBigInt(val) {
386
445
  return typeof val === 'bigint';
387
446
  }
388
- bigint$1.isBigInt = isBigInt$1;
389
- function isntBigInt$1(val) {
390
- return !isBigInt$1(val);
447
+ bigint.isBigInt = isBigInt;
448
+ function isntBigInt(val) {
449
+ return !isBigInt(val);
391
450
  }
392
- bigint$1.isntBigInt = isntBigInt$1;
451
+ bigint.isntBigInt = isntBigInt;
393
452
 
394
- var boolean$1 = {};
453
+ var boolean = {};
395
454
 
396
- boolean$1.isntBoolean = boolean$1.isBoolean = void 0;
397
- function isBoolean$1(val) {
455
+ boolean.isntBoolean = boolean.isBoolean = void 0;
456
+ function isBoolean(val) {
398
457
  return typeof val === 'boolean';
399
458
  }
400
- boolean$1.isBoolean = isBoolean$1;
401
- function isntBoolean$1(val) {
402
- return !isBoolean$1(val);
459
+ boolean.isBoolean = isBoolean;
460
+ function isntBoolean(val) {
461
+ return !isBoolean(val);
403
462
  }
404
- boolean$1.isntBoolean = isntBoolean$1;
463
+ boolean.isntBoolean = isntBoolean;
405
464
 
406
- var char$1 = {};
465
+ var char = {};
407
466
 
408
- var string$1 = {};
467
+ var string = {};
409
468
 
410
- string$1.isntString = string$1.isString = void 0;
411
- function isString$1(val) {
469
+ string.isntString = string.isString = void 0;
470
+ function isString(val) {
412
471
  return typeof val === 'string';
413
472
  }
414
- string$1.isString = isString$1;
415
- function isntString$1(val) {
416
- return !isString$1(val);
473
+ string.isString = isString;
474
+ function isntString(val) {
475
+ return !isString(val);
417
476
  }
418
- string$1.isntString = isntString$1;
477
+ string.isntString = isntString;
419
478
 
420
- char$1.isntChar = char$1.isChar = void 0;
421
- const string_1$3 = string$1;
422
- function isChar$1(val) {
423
- return (0, string_1$3.isString)(val)
479
+ char.isntChar = char.isChar = void 0;
480
+ const string_1$1 = string;
481
+ function isChar(val) {
482
+ return (0, string_1$1.isString)(val)
424
483
  && val.length === 1;
425
484
  }
426
- char$1.isChar = isChar$1;
427
- function isntChar$1(val) {
428
- return !isChar$1(val);
485
+ char.isChar = isChar;
486
+ function isntChar(val) {
487
+ return !isChar(val);
429
488
  }
430
- char$1.isntChar = isntChar$1;
489
+ char.isntChar = isntChar;
431
490
 
432
- var date$1 = {};
491
+ var date = {};
433
492
 
434
- date$1.isntDate = date$1.isDate = void 0;
435
- function isDate$1(val) {
493
+ date.isntDate = date.isDate = void 0;
494
+ function isDate(val) {
436
495
  return val instanceof Date;
437
496
  }
438
- date$1.isDate = isDate$1;
439
- function isntDate$1(val) {
440
- return !isDate$1(val);
497
+ date.isDate = isDate;
498
+ function isntDate(val) {
499
+ return !isDate(val);
441
500
  }
442
- date$1.isntDate = isntDate$1;
501
+ date.isntDate = isntDate;
443
502
 
444
- var _enum$1 = {};
503
+ var _enum = {};
445
504
 
446
- _enum$1.inEnum = void 0;
447
- function inEnum$1(val, _enum) {
505
+ _enum.inEnum = void 0;
506
+ function inEnum(val, _enum) {
448
507
  return Object.values(_enum).includes(val);
449
508
  }
450
- _enum$1.inEnum = inEnum$1;
509
+ _enum.inEnum = inEnum;
451
510
 
452
- var error$1 = {};
511
+ var error = {};
453
512
 
454
- error$1.isntError = error$1.isError = void 0;
455
- function isError$1(val) {
513
+ error.isntError = error.isError = void 0;
514
+ function isError(val) {
456
515
  return val instanceof Error;
457
516
  }
458
- error$1.isError = isError$1;
459
- function isntError$1(val) {
460
- return !isError$1(val);
517
+ error.isError = isError;
518
+ function isntError(val) {
519
+ return !isError(val);
461
520
  }
462
- error$1.isntError = isntError$1;
521
+ error.isntError = isntError;
463
522
 
464
- var falsy$1 = {};
523
+ var falsy = {};
465
524
 
466
- falsy$1.isntFalsy = falsy$1.isFalsy = void 0;
467
- function isFalsy$1(val) {
525
+ falsy.isntFalsy = falsy.isFalsy = void 0;
526
+ function isFalsy(val) {
468
527
  return !val;
469
528
  }
470
- falsy$1.isFalsy = isFalsy$1;
471
- function isntFalsy$1(val) {
472
- return !isFalsy$1(val);
529
+ falsy.isFalsy = isFalsy;
530
+ function isntFalsy(val) {
531
+ return !isFalsy(val);
473
532
  }
474
- falsy$1.isntFalsy = isntFalsy$1;
533
+ falsy.isntFalsy = isntFalsy;
475
534
 
476
- var _function$1 = {};
535
+ var _function = {};
477
536
 
478
- _function$1.isntFunction = _function$1.isFunction = void 0;
479
- function isFunction$2(val) {
537
+ _function.isntFunction = _function.isFunction = void 0;
538
+ function isFunction$1(val) {
480
539
  return typeof val === 'function';
481
540
  }
482
- _function$1.isFunction = isFunction$2;
483
- function isntFunction$1(val) {
484
- return !isFunction$2(val);
541
+ _function.isFunction = isFunction$1;
542
+ function isntFunction(val) {
543
+ return !isFunction$1(val);
485
544
  }
486
- _function$1.isntFunction = isntFunction$1;
545
+ _function.isntFunction = isntFunction;
487
546
 
488
- var iterable$1 = {};
547
+ var iterable = {};
489
548
 
490
- iterable$1.isntIterable = iterable$1.isIterable = void 0;
491
- const null_1$2 = _null$1;
492
- const undefined_1$4 = _undefined$1;
493
- function isIterable$1(val) {
494
- return (0, null_1$2.isntNull)(val)
495
- && (0, undefined_1$4.isntUndefined)(val)
549
+ iterable.isntIterable = iterable.isIterable = void 0;
550
+ const null_1 = _null;
551
+ const undefined_1$1 = _undefined;
552
+ function isIterable(val) {
553
+ return (0, null_1.isntNull)(val)
554
+ && (0, undefined_1$1.isntUndefined)(val)
496
555
  && typeof val[Symbol.iterator] === 'function';
497
556
  }
498
- iterable$1.isIterable = isIterable$1;
499
- function isntIterable$1(val) {
500
- return !isIterable$1(val);
557
+ iterable.isIterable = isIterable;
558
+ function isntIterable(val) {
559
+ return !isIterable(val);
501
560
  }
502
- iterable$1.isntIterable = isntIterable$1;
561
+ iterable.isntIterable = isntIterable;
503
562
 
504
- var jsonRpc$1 = {};
563
+ var jsonRpc = {};
505
564
 
506
- var object$1 = {};
565
+ var object = {};
507
566
 
508
- object$1.isntEmptyObject = object$1.isEmptyObject = object$1.isRecord = object$1.isntObject = object$1.isObject = void 0;
509
- function isObject$1(val) {
510
- return val !== null && typeof val === 'object';
511
- }
512
- object$1.isObject = isObject$1;
513
- function isntObject$1(val) {
514
- return !isObject$1(val);
515
- }
516
- object$1.isntObject = isntObject$1;
517
- function isRecord$1(val) {
518
- return isObject$1(val);
519
- }
520
- object$1.isRecord = isRecord$1;
521
- function isEmptyObject$1(val) {
522
- return Object.keys(val).length === 0;
523
- }
524
- object$1.isEmptyObject = isEmptyObject$1;
525
- function isntEmptyObject$1(val) {
526
- return Object.keys(val).length !== 0;
527
- }
528
- object$1.isntEmptyObject = isntEmptyObject$1;
567
+ /**
568
+ * lodash (Custom Build) <https://lodash.com/>
569
+ * Build: `lodash modularize exports="npm" -o ./`
570
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
571
+ * Released under MIT license <https://lodash.com/license>
572
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
573
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
574
+ */
529
575
 
530
- var number$1 = {};
576
+ /** `Object#toString` result references. */
577
+ var objectTag = '[object Object]';
531
578
 
532
- number$1.isntNumber = number$1.isNumber = void 0;
533
- function isNumber$1(val) {
534
- return typeof val === 'number';
535
- }
536
- number$1.isNumber = isNumber$1;
537
- function isntNumber$1(val) {
538
- return !isNumber$1(val);
539
- }
540
- number$1.isntNumber = isntNumber$1;
541
-
542
- 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;
543
- const array_1$1 = array$1;
544
- const object_1$1 = object$1;
545
- const string_1$2 = string$1;
546
- const number_1$1 = number$1;
547
- const undefined_1$3 = _undefined$1;
548
- function isJsonRpcId$1(val) {
549
- return (0, string_1$2.isString)(val) || (0, number_1$1.isNumber)(val);
550
- }
551
- function isJsonRpcParams$1(val) {
552
- return (0, array_1$1.isArray)(val) || (0, object_1$1.isObject)(val);
553
- }
554
- function isJsonRpcNotification$1(val) {
555
- return (0, object_1$1.isRecord)(val)
556
- && (0, string_1$2.isString)(val.jsonrpc)
557
- && (0, string_1$2.isString)(val.method)
558
- && (0, undefined_1$3.isUndefined)(val.id)
559
- && isJsonRpcParams$1(val.params);
560
- }
561
- jsonRpc$1.isJsonRpcNotification = isJsonRpcNotification$1;
562
- function isntJsonRpcNotification$1(val) {
563
- return !isJsonRpcNotification$1(val);
564
- }
565
- jsonRpc$1.isntJsonRpcNotification = isntJsonRpcNotification$1;
566
- function isJsonRpcRequest$1(val) {
567
- return (0, object_1$1.isRecord)(val)
568
- && (0, string_1$2.isString)(val.jsonrpc)
569
- && (0, string_1$2.isString)(val.method)
570
- && isJsonRpcId$1(val.id)
571
- && isJsonRpcParams$1(val.params);
572
- }
573
- jsonRpc$1.isJsonRpcRequest = isJsonRpcRequest$1;
574
- function isntJsonRpcRequest$1(val) {
575
- return !isJsonRpcRequest$1(val);
576
- }
577
- jsonRpc$1.isntJsonRpcRequest = isntJsonRpcRequest$1;
578
- function isJsonRpcSuccess$1(val) {
579
- return (0, object_1$1.isRecord)(val)
580
- && (0, string_1$2.isString)(val.jsonrpc)
581
- && (0, string_1$2.isString)(val.id)
582
- && (0, undefined_1$3.isntUndefined)(val.result);
583
- }
584
- jsonRpc$1.isJsonRpcSuccess = isJsonRpcSuccess$1;
585
- function isntJsonRpcSuccess$1(val) {
586
- return !isJsonRpcSuccess$1(val);
587
- }
588
- jsonRpc$1.isntJsonRpcSuccess = isntJsonRpcSuccess$1;
589
- function isJsonRpcError$1(val) {
590
- return (0, object_1$1.isRecord)(val)
591
- && (0, string_1$2.isString)(val.jsonrpc)
592
- && isJsonRpcId$1(val.id)
593
- && isJsonRpcErrorObject$1(val.error);
594
- }
595
- jsonRpc$1.isJsonRpcError = isJsonRpcError$1;
596
- function isntJsonRpcError$1(val) {
597
- return !isJsonRpcError$1(val);
598
- }
599
- jsonRpc$1.isntJsonRpcError = isntJsonRpcError$1;
600
- function isJsonRpcErrorObject$1(val) {
601
- return (0, object_1$1.isRecord)(val)
602
- && (0, number_1$1.isNumber)(val.code)
603
- && (0, string_1$2.isString)(val.message)
604
- && ((0, undefined_1$3.isUndefined)(val.data) || (0, object_1$1.isObject)(val.data));
605
- }
606
-
607
- var json$1 = {};
608
-
609
- json$1.isntJson = json$1.isJson = void 0;
610
- function isJson$1(val) {
611
- try {
579
+ /**
580
+ * Checks if `value` is a host object in IE < 9.
581
+ *
582
+ * @private
583
+ * @param {*} value The value to check.
584
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
585
+ */
586
+ function isHostObject(value) {
587
+ // Many host objects are `Object` objects that can coerce to strings
588
+ // despite having improperly defined `toString` methods.
589
+ var result = false;
590
+ if (value != null && typeof value.toString != 'function') {
591
+ try {
592
+ result = !!(value + '');
593
+ } catch (e) {}
594
+ }
595
+ return result;
596
+ }
597
+
598
+ /**
599
+ * Creates a unary function that invokes `func` with its argument transformed.
600
+ *
601
+ * @private
602
+ * @param {Function} func The function to wrap.
603
+ * @param {Function} transform The argument transform.
604
+ * @returns {Function} Returns the new function.
605
+ */
606
+ function overArg(func, transform) {
607
+ return function(arg) {
608
+ return func(transform(arg));
609
+ };
610
+ }
611
+
612
+ /** Used for built-in method references. */
613
+ var funcProto = Function.prototype,
614
+ objectProto = Object.prototype;
615
+
616
+ /** Used to resolve the decompiled source of functions. */
617
+ var funcToString = funcProto.toString;
618
+
619
+ /** Used to check objects for own properties. */
620
+ var hasOwnProperty = objectProto.hasOwnProperty;
621
+
622
+ /** Used to infer the `Object` constructor. */
623
+ var objectCtorString = funcToString.call(Object);
624
+
625
+ /**
626
+ * Used to resolve the
627
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
628
+ * of values.
629
+ */
630
+ var objectToString = objectProto.toString;
631
+
632
+ /** Built-in value references. */
633
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
634
+
635
+ /**
636
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
637
+ * and has a `typeof` result of "object".
638
+ *
639
+ * @static
640
+ * @memberOf _
641
+ * @since 4.0.0
642
+ * @category Lang
643
+ * @param {*} value The value to check.
644
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
645
+ * @example
646
+ *
647
+ * _.isObjectLike({});
648
+ * // => true
649
+ *
650
+ * _.isObjectLike([1, 2, 3]);
651
+ * // => true
652
+ *
653
+ * _.isObjectLike(_.noop);
654
+ * // => false
655
+ *
656
+ * _.isObjectLike(null);
657
+ * // => false
658
+ */
659
+ function isObjectLike(value) {
660
+ return !!value && typeof value == 'object';
661
+ }
662
+
663
+ /**
664
+ * Checks if `value` is a plain object, that is, an object created by the
665
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
666
+ *
667
+ * @static
668
+ * @memberOf _
669
+ * @since 0.8.0
670
+ * @category Lang
671
+ * @param {*} value The value to check.
672
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
673
+ * @example
674
+ *
675
+ * function Foo() {
676
+ * this.a = 1;
677
+ * }
678
+ *
679
+ * _.isPlainObject(new Foo);
680
+ * // => false
681
+ *
682
+ * _.isPlainObject([1, 2, 3]);
683
+ * // => false
684
+ *
685
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
686
+ * // => true
687
+ *
688
+ * _.isPlainObject(Object.create(null));
689
+ * // => true
690
+ */
691
+ function isPlainObject$1(value) {
692
+ if (!isObjectLike(value) ||
693
+ objectToString.call(value) != objectTag || isHostObject(value)) {
694
+ return false;
695
+ }
696
+ var proto = getPrototype(value);
697
+ if (proto === null) {
698
+ return true;
699
+ }
700
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
701
+ return (typeof Ctor == 'function' &&
702
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
703
+ }
704
+
705
+ var lodash_isplainobject = isPlainObject$1;
706
+
707
+ var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
708
+ return (mod && mod.__esModule) ? mod : { "default": mod };
709
+ };object.isntEmptyObject = object.isEmptyObject = object.isntPlainObject = object.isPlainObject = object.isntObject = object.isObject = void 0;
710
+ const lodash_isplainobject_1 = __importDefault(lodash_isplainobject);
711
+ function isObject(val) {
712
+ return val !== null
713
+ && typeof val === 'object';
714
+ }
715
+ object.isObject = isObject;
716
+ function isntObject(val) {
717
+ return !isObject(val);
718
+ }
719
+ object.isntObject = isntObject;
720
+ function isPlainObject(val) {
721
+ return (0, lodash_isplainobject_1.default)(val);
722
+ }
723
+ object.isPlainObject = isPlainObject;
724
+ function isntPlainObject(val) {
725
+ return !isPlainObject(val);
726
+ }
727
+ object.isntPlainObject = isntPlainObject;
728
+ function isEmptyObject(val) {
729
+ return Object.keys(val).length === 0;
730
+ }
731
+ object.isEmptyObject = isEmptyObject;
732
+ function isntEmptyObject(val) {
733
+ return Object.keys(val).length !== 0;
734
+ }
735
+ object.isntEmptyObject = isntEmptyObject;
736
+
737
+ var number = {};
738
+
739
+ number.isntNumber = number.isNumber = void 0;
740
+ function isNumber(val) {
741
+ return typeof val === 'number';
742
+ }
743
+ number.isNumber = isNumber;
744
+ function isntNumber(val) {
745
+ return !isNumber(val);
746
+ }
747
+ number.isntNumber = isntNumber;
748
+
749
+ jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
750
+ const array_1 = array;
751
+ const object_1 = object;
752
+ const string_1 = string;
753
+ const number_1 = number;
754
+ const undefined_1 = _undefined;
755
+ function isJsonRpcId(val) {
756
+ return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
757
+ }
758
+ function isJsonRpcParams(val) {
759
+ return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
760
+ }
761
+ function isJsonRpcNotification(val) {
762
+ return (0, object_1.isPlainObject)(val)
763
+ && (0, string_1.isString)(val.jsonrpc)
764
+ && (0, string_1.isString)(val.method)
765
+ && (0, undefined_1.isUndefined)(val.id)
766
+ && isJsonRpcParams(val.params);
767
+ }
768
+ jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
769
+ function isntJsonRpcNotification(val) {
770
+ return !isJsonRpcNotification(val);
771
+ }
772
+ jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
773
+ function isJsonRpcRequest(val) {
774
+ return (0, object_1.isPlainObject)(val)
775
+ && (0, string_1.isString)(val.jsonrpc)
776
+ && (0, string_1.isString)(val.method)
777
+ && isJsonRpcId(val.id)
778
+ && isJsonRpcParams(val.params);
779
+ }
780
+ jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
781
+ function isntJsonRpcRequest(val) {
782
+ return !isJsonRpcRequest(val);
783
+ }
784
+ jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
785
+ function isJsonRpcSuccess(val) {
786
+ return (0, object_1.isPlainObject)(val)
787
+ && (0, string_1.isString)(val.jsonrpc)
788
+ && (0, string_1.isString)(val.id)
789
+ && 'result' in val;
790
+ }
791
+ jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
792
+ function isntJsonRpcSuccess(val) {
793
+ return !isJsonRpcSuccess(val);
794
+ }
795
+ jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
796
+ function isJsonRpcError(val) {
797
+ return (0, object_1.isPlainObject)(val)
798
+ && (0, string_1.isString)(val.jsonrpc)
799
+ && isJsonRpcId(val.id)
800
+ && isJsonRpcErrorObject(val.error);
801
+ }
802
+ jsonRpc.isJsonRpcError = isJsonRpcError;
803
+ function isntJsonRpcError(val) {
804
+ return !isJsonRpcError(val);
805
+ }
806
+ jsonRpc.isntJsonRpcError = isntJsonRpcError;
807
+ function isJsonRpcErrorObject(val) {
808
+ return (0, object_1.isPlainObject)(val)
809
+ && (0, number_1.isNumber)(val.code)
810
+ && (0, string_1.isString)(val.message)
811
+ && ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
812
+ }
813
+
814
+ var json = {};
815
+
816
+ json.isntJson = json.isJson = void 0;
817
+ function isJson(val) {
818
+ try {
612
819
  JSON.stringify(val);
613
820
  return true;
614
821
  }
@@ -616,16 +823,16 @@
616
823
  return false;
617
824
  }
618
825
  }
619
- json$1.isJson = isJson$1;
620
- function isntJson$1(val) {
621
- return !isntJson$1();
826
+ json.isJson = isJson;
827
+ function isntJson(val) {
828
+ return !isntJson();
622
829
  }
623
- json$1.isntJson = isntJson$1;
830
+ json.isntJson = isntJson;
624
831
 
625
- var url$1 = {};
832
+ var url = {};
626
833
 
627
- url$1.isAbsoluteURL = void 0;
628
- function isAbsoluteURL$1(str) {
834
+ url.isAbsoluteURL = void 0;
835
+ function isAbsoluteURL(str) {
629
836
  try {
630
837
  new URL(str);
631
838
  return true;
@@ -634,7 +841,7 @@
634
841
  return false;
635
842
  }
636
843
  }
637
- url$1.isAbsoluteURL = isAbsoluteURL$1;
844
+ url.isAbsoluteURL = isAbsoluteURL;
638
845
 
639
846
  (function (exports) {
640
847
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -646,32 +853,32 @@
646
853
  }));
647
854
  var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
648
855
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
649
- };__exportStar(array$1, exports);
650
- __exportStar(asyncIterable$1, exports);
651
- __exportStar(bigint$1, exports);
652
- __exportStar(boolean$1, exports);
653
- __exportStar(char$1, exports);
654
- __exportStar(date$1, exports);
655
- __exportStar(_enum$1, exports);
656
- __exportStar(error$1, exports);
657
- __exportStar(falsy$1, exports);
658
- __exportStar(_function$1, exports);
659
- __exportStar(iterable$1, exports);
660
- __exportStar(jsonRpc$1, exports);
661
- __exportStar(json$1, exports);
662
- __exportStar(_null$1, exports);
663
- __exportStar(number$1, exports);
664
- __exportStar(object$1, exports);
665
- __exportStar(string$1, exports);
666
- __exportStar(_undefined$1, exports);
667
- __exportStar(url$1, exports);
856
+ };__exportStar(array, exports);
857
+ __exportStar(asyncIterable, exports);
858
+ __exportStar(bigint, exports);
859
+ __exportStar(boolean, exports);
860
+ __exportStar(char, exports);
861
+ __exportStar(date, exports);
862
+ __exportStar(_enum, exports);
863
+ __exportStar(error, exports);
864
+ __exportStar(falsy, exports);
865
+ __exportStar(_function, exports);
866
+ __exportStar(iterable, exports);
867
+ __exportStar(jsonRpc, exports);
868
+ __exportStar(json, exports);
869
+ __exportStar(_null, exports);
870
+ __exportStar(number, exports);
871
+ __exportStar(object, exports);
872
+ __exportStar(string, exports);
873
+ __exportStar(_undefined, exports);
874
+ __exportStar(url, exports);
668
875
 
669
- }(es2018$3));
876
+ }(es2018$2));
670
877
 
671
878
  chunkByAsync$1.chunkByAsync = void 0;
672
- const types_1$h = es2018$3;
879
+ const types_1$k = es2018$2;
673
880
  function chunkByAsync(iterable, predicate) {
674
- if ((0, types_1$h.isAsyncIterable)(iterable)) {
881
+ if ((0, types_1$k.isAsyncIterable)(iterable)) {
675
882
  return chunkByAsyncIterable(iterable);
676
883
  }
677
884
  else {
@@ -731,7 +938,7 @@
731
938
 
732
939
  chunk$1.chunk = void 0;
733
940
  const go_1$e = es2018$4;
734
- const errors_1$e = es2018$6;
941
+ const errors_1$e = es2018$3;
735
942
  function chunk(iterable, size) {
736
943
  (0, errors_1$e.assert)(Number.isInteger(size), 'The parameter size must be an integer');
737
944
  (0, errors_1$e.assert)(size > 0, 'The parameter size must be greater than 0');
@@ -753,12 +960,12 @@
753
960
  var concatAsync$1 = {};
754
961
 
755
962
  concatAsync$1.concatAsync = void 0;
756
- const types_1$g = es2018$3;
963
+ const types_1$j = es2018$2;
757
964
  const go_1$d = es2018$4;
758
965
  function concatAsync(iterable, ...otherIterables) {
759
966
  return (0, go_1$d.go)(async function* () {
760
967
  for (const iter of [iterable, ...otherIterables]) {
761
- if ((0, types_1$g.isAsyncIterable)(iter)) {
968
+ if ((0, types_1$j.isAsyncIterable)(iter)) {
762
969
  for await (const element of iter) {
763
970
  yield element;
764
971
  }
@@ -807,7 +1014,7 @@
807
1014
  dropAsync$1.dropAsync = void 0;
808
1015
  const go_1$b = es2018$4;
809
1016
  const utils_1$3 = utils;
810
- const errors_1$d = es2018$6;
1017
+ const errors_1$d = es2018$3;
811
1018
  function dropAsync(iterable, count) {
812
1019
  (0, errors_1$d.assert)(Number.isInteger(count), 'The parameter count must be an integer');
813
1020
  (0, errors_1$d.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -842,7 +1049,7 @@
842
1049
  dropRightAsync$1.dropRightAsync = void 0;
843
1050
  const go_1$a = es2018$4;
844
1051
  const utils_1$2 = utils;
845
- const errors_1$c = es2018$6;
1052
+ const errors_1$c = es2018$3;
846
1053
  function dropRightAsync(iterable, count) {
847
1054
  (0, errors_1$c.assert)(Number.isInteger(count), 'The parameter count must be an integer');
848
1055
  (0, errors_1$c.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -870,7 +1077,7 @@
870
1077
  dropRight$1.dropRight = void 0;
871
1078
  const go_1$9 = es2018$4;
872
1079
  const utils_1$1 = utils;
873
- const errors_1$b = es2018$6;
1080
+ const errors_1$b = es2018$3;
874
1081
  function dropRight(iterable, count) {
875
1082
  (0, errors_1$b.assert)(Number.isInteger(count), 'The parameter count must be an integer');
876
1083
  (0, errors_1$b.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -886,9 +1093,9 @@
886
1093
  var dropUntilAsync$1 = {};
887
1094
 
888
1095
  dropUntilAsync$1.dropUntilAsync = void 0;
889
- const types_1$f = es2018$3;
1096
+ const types_1$i = es2018$2;
890
1097
  function dropUntilAsync(iterable, predicate) {
891
- if ((0, types_1$f.isAsyncIterable)(iterable)) {
1098
+ if ((0, types_1$i.isAsyncIterable)(iterable)) {
892
1099
  return dropUntilAsyncIterable(iterable);
893
1100
  }
894
1101
  else {
@@ -970,7 +1177,7 @@
970
1177
  drop$1.drop = void 0;
971
1178
  const go_1$8 = es2018$4;
972
1179
  const utils_1 = utils;
973
- const errors_1$a = es2018$6;
1180
+ const errors_1$a = es2018$3;
974
1181
  function drop(iterable, count) {
975
1182
  (0, errors_1$a.assert)(Number.isInteger(count), 'The parameter count must be an integer');
976
1183
  (0, errors_1$a.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1003,9 +1210,9 @@
1003
1210
  var filterAsync$1 = {};
1004
1211
 
1005
1212
  filterAsync$1.filterAsync = void 0;
1006
- const types_1$e = es2018$3;
1213
+ const types_1$h = es2018$2;
1007
1214
  function filterAsync(iterable, predicate) {
1008
- if ((0, types_1$e.isAsyncIterable)(iterable)) {
1215
+ if ((0, types_1$h.isAsyncIterable)(iterable)) {
1009
1216
  return filterAsyncIterable(iterable);
1010
1217
  }
1011
1218
  else {
@@ -1050,9 +1257,9 @@
1050
1257
  var flattenByAsync$1 = {};
1051
1258
 
1052
1259
  flattenByAsync$1.flattenByAsync = void 0;
1053
- const types_1$d = es2018$3;
1260
+ const types_1$g = es2018$2;
1054
1261
  function flattenByAsync(iterable, predicate) {
1055
- if ((0, types_1$d.isAsyncIterable)(iterable)) {
1262
+ if ((0, types_1$g.isAsyncIterable)(iterable)) {
1056
1263
  return flattenByAsyncIterable(iterable);
1057
1264
  }
1058
1265
  else {
@@ -1085,12 +1292,12 @@
1085
1292
  }
1086
1293
  flattenByAsync$1.flattenByAsync = flattenByAsync;
1087
1294
  function isFiniteIterable$1(val) {
1088
- return (0, types_1$d.isIterable)(val) && (0, types_1$d.isntChar)(val);
1295
+ return (0, types_1$g.isIterable)(val) && (0, types_1$g.isntChar)(val);
1089
1296
  }
1090
1297
 
1091
1298
  flattenDeepAsync$1.flattenDeepAsync = void 0;
1092
1299
  const flatten_by_async_1 = flattenByAsync$1;
1093
- const errors_1$9 = es2018$6;
1300
+ const errors_1$9 = es2018$3;
1094
1301
  function flattenDeepAsync(iterable, depth = Infinity) {
1095
1302
  (0, errors_1$9.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1096
1303
  (0, errors_1$9.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
@@ -1108,7 +1315,7 @@
1108
1315
  var flattenBy$1 = {};
1109
1316
 
1110
1317
  flattenBy$1.flattenBy = void 0;
1111
- const types_1$c = es2018$3;
1318
+ const types_1$f = es2018$2;
1112
1319
  function flattenBy(iterable, predicate) {
1113
1320
  return flatten(iterable, 1);
1114
1321
  function* flatten(iterable, level) {
@@ -1124,14 +1331,14 @@
1124
1331
  }
1125
1332
  flattenBy$1.flattenBy = flattenBy;
1126
1333
  function isFiniteIterable(val) {
1127
- return (0, types_1$c.isIterable)(val) && (0, types_1$c.isntChar)(val);
1334
+ return (0, types_1$f.isIterable)(val) && (0, types_1$f.isntChar)(val);
1128
1335
  }
1129
1336
 
1130
1337
  var flattenDeep$1 = {};
1131
1338
 
1132
1339
  flattenDeep$1.flattenDeep = void 0;
1133
1340
  const flatten_by_1 = flattenBy$1;
1134
- const errors_1$8 = es2018$6;
1341
+ const errors_1$8 = es2018$3;
1135
1342
  function flattenDeep(iterable, depth = Infinity) {
1136
1343
  (0, errors_1$8.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1137
1344
  (0, errors_1$8.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
@@ -1151,9 +1358,9 @@
1151
1358
  var mapAsync$1 = {};
1152
1359
 
1153
1360
  mapAsync$1.mapAsync = void 0;
1154
- const types_1$b = es2018$3;
1361
+ const types_1$e = es2018$2;
1155
1362
  function mapAsync(iterable, fn) {
1156
- if ((0, types_1$b.isAsyncIterable)(iterable)) {
1363
+ if ((0, types_1$e.isAsyncIterable)(iterable)) {
1157
1364
  return mapAsyncIterable(iterable);
1158
1365
  }
1159
1366
  else {
@@ -1192,7 +1399,7 @@
1192
1399
 
1193
1400
  repeatAsync$1.repeatAsync = void 0;
1194
1401
  const go_1$7 = es2018$4;
1195
- const errors_1$7 = es2018$6;
1402
+ const errors_1$7 = es2018$3;
1196
1403
  function repeatAsync(iterable, times) {
1197
1404
  (0, errors_1$7.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1198
1405
  (0, errors_1$7.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
@@ -1227,7 +1434,7 @@
1227
1434
 
1228
1435
  repeat$1.repeat = void 0;
1229
1436
  const go_1$6 = es2018$4;
1230
- const errors_1$6 = es2018$6;
1437
+ const errors_1$6 = es2018$3;
1231
1438
  function repeat(iterable, times) {
1232
1439
  (0, errors_1$6.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1233
1440
  (0, errors_1$6.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
@@ -1262,7 +1469,7 @@
1262
1469
 
1263
1470
  sliceAsync$1.sliceAsync = void 0;
1264
1471
  const go_1$5 = es2018$4;
1265
- const errors_1$5 = es2018$6;
1472
+ const errors_1$5 = es2018$3;
1266
1473
  function sliceAsync(iterable, start, end = Infinity) {
1267
1474
  (0, errors_1$5.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1268
1475
  (0, errors_1$5.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
@@ -1285,7 +1492,7 @@
1285
1492
 
1286
1493
  slice$1.slice = void 0;
1287
1494
  const go_1$4 = es2018$4;
1288
- const errors_1$4 = es2018$6;
1495
+ const errors_1$4 = es2018$3;
1289
1496
  function slice(iterable, start, end = Infinity) {
1290
1497
  (0, errors_1$4.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1291
1498
  (0, errors_1$4.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
@@ -1325,9 +1532,9 @@
1325
1532
  var splitByAsync$1 = {};
1326
1533
 
1327
1534
  splitByAsync$1.splitByAsync = void 0;
1328
- const types_1$a = es2018$3;
1535
+ const types_1$d = es2018$2;
1329
1536
  function splitByAsync(iterable, predicate) {
1330
- if ((0, types_1$a.isAsyncIterable)(iterable)) {
1537
+ if ((0, types_1$d.isAsyncIterable)(iterable)) {
1331
1538
  return splitByAsyncIterable(iterable);
1332
1539
  }
1333
1540
  else {
@@ -1408,7 +1615,7 @@
1408
1615
 
1409
1616
  takeAsync$1.takeAsync = void 0;
1410
1617
  const go_1$3 = es2018$4;
1411
- const errors_1$3 = es2018$6;
1618
+ const errors_1$3 = es2018$3;
1412
1619
  function takeAsync(iterable, count) {
1413
1620
  (0, errors_1$3.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1414
1621
  (0, errors_1$3.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1429,7 +1636,7 @@
1429
1636
 
1430
1637
  takeRightAsync$1.takeRightAsync = void 0;
1431
1638
  const go_1$2 = es2018$4;
1432
- const errors_1$2 = es2018$6;
1639
+ const errors_1$2 = es2018$3;
1433
1640
  function takeRightAsync(iterable, count) {
1434
1641
  (0, errors_1$2.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1435
1642
  (0, errors_1$2.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1459,7 +1666,7 @@
1459
1666
 
1460
1667
  takeRight$1.takeRight = void 0;
1461
1668
  const go_1$1 = es2018$4;
1462
- const errors_1$1 = es2018$6;
1669
+ const errors_1$1 = es2018$3;
1463
1670
  function takeRight(iterable, count) {
1464
1671
  (0, errors_1$1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1465
1672
  (0, errors_1$1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1488,9 +1695,9 @@
1488
1695
  var takeUntilAsync$1 = {};
1489
1696
 
1490
1697
  takeUntilAsync$1.takeUntilAsync = void 0;
1491
- const types_1$9 = es2018$3;
1698
+ const types_1$c = es2018$2;
1492
1699
  function takeUntilAsync(iterable, predicate) {
1493
- if ((0, types_1$9.isAsyncIterable)(iterable)) {
1700
+ if ((0, types_1$c.isAsyncIterable)(iterable)) {
1494
1701
  return takeUntilAsyncIterable(iterable);
1495
1702
  }
1496
1703
  else {
@@ -1535,7 +1742,7 @@
1535
1742
 
1536
1743
  take$1.take = void 0;
1537
1744
  const go_1 = es2018$4;
1538
- const errors_1 = es2018$6;
1745
+ const errors_1 = es2018$3;
1539
1746
  function take(iterable, count) {
1540
1747
  (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1541
1748
  (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
@@ -1555,9 +1762,9 @@
1555
1762
  var tapAsync$1 = {};
1556
1763
 
1557
1764
  tapAsync$1.tapAsync = void 0;
1558
- const types_1$8 = es2018$3;
1765
+ const types_1$b = es2018$2;
1559
1766
  function tapAsync(iterable, fn) {
1560
- if ((0, types_1$8.isAsyncIterable)(iterable)) {
1767
+ if ((0, types_1$b.isAsyncIterable)(iterable)) {
1561
1768
  return tapAsyncIterable(iterable);
1562
1769
  }
1563
1770
  else {
@@ -1638,9 +1845,9 @@
1638
1845
  var uniqByAsync$1 = {};
1639
1846
 
1640
1847
  uniqByAsync$1.uniqByAsync = void 0;
1641
- const types_1$7 = es2018$3;
1848
+ const types_1$a = es2018$2;
1642
1849
  function uniqByAsync(iterable, fn) {
1643
- if ((0, types_1$7.isAsyncIterable)(iterable)) {
1850
+ if ((0, types_1$a.isAsyncIterable)(iterable)) {
1644
1851
  return uniqByAsyncIterable(iterable);
1645
1852
  }
1646
1853
  else {
@@ -1707,7 +1914,7 @@
1707
1914
  var zipAsync$1 = {};
1708
1915
 
1709
1916
  zipAsync$1.zipAsync = void 0;
1710
- const types_1$6 = es2018$3;
1917
+ const types_1$9 = es2018$2;
1711
1918
  var Kind;
1712
1919
  (function (Kind) {
1713
1920
  Kind[Kind["Sync"] = 0] = "Sync";
@@ -1721,7 +1928,7 @@
1721
1928
  var _a, _b, _c, _d;
1722
1929
  const length = iterables.length;
1723
1930
  const iterators = iterables.map(iterable => {
1724
- if ((0, types_1$6.isAsyncIterable)(iterable)) {
1931
+ if ((0, types_1$9.isAsyncIterable)(iterable)) {
1725
1932
  return [Kind.Async, iterable[Symbol.asyncIterator]()];
1726
1933
  }
1727
1934
  else {
@@ -1867,9 +2074,9 @@
1867
2074
  var eachAsync$1 = {};
1868
2075
 
1869
2076
  eachAsync$1.eachAsync = void 0;
1870
- const types_1$5 = es2018$3;
2077
+ const types_1$8 = es2018$2;
1871
2078
  function eachAsync(iterable, fn) {
1872
- if ((0, types_1$5.isAsyncIterable)(iterable)) {
2079
+ if ((0, types_1$8.isAsyncIterable)(iterable)) {
1873
2080
  return eachAsyncIterable(iterable);
1874
2081
  }
1875
2082
  else {
@@ -1907,9 +2114,9 @@
1907
2114
  var everyAsync$1 = {};
1908
2115
 
1909
2116
  everyAsync$1.everyAsync = void 0;
1910
- const types_1$4 = es2018$3;
2117
+ const types_1$7 = es2018$2;
1911
2118
  function everyAsync(iterable, predicate) {
1912
- if ((0, types_1$4.isAsyncIterable)(iterable)) {
2119
+ if ((0, types_1$7.isAsyncIterable)(iterable)) {
1913
2120
  return everyAsyncIterable(iterable);
1914
2121
  }
1915
2122
  else {
@@ -1953,9 +2160,9 @@
1953
2160
  var findAsync$1 = {};
1954
2161
 
1955
2162
  findAsync$1.findAsync = void 0;
1956
- const types_1$3 = es2018$3;
2163
+ const types_1$6 = es2018$2;
1957
2164
  function findAsync(iterable, predicate) {
1958
- if ((0, types_1$3.isAsyncIterable)(iterable)) {
2165
+ if ((0, types_1$6.isAsyncIterable)(iterable)) {
1959
2166
  return findAsyncIterable(iterable);
1960
2167
  }
1961
2168
  else {
@@ -2077,9 +2284,9 @@
2077
2284
  var reduceAsync$1 = {};
2078
2285
 
2079
2286
  reduceAsync$1.reduceAsync = void 0;
2080
- const types_1$2 = es2018$3;
2287
+ const types_1$5 = es2018$2;
2081
2288
  function reduceAsync(iterable, fn, initialValue) {
2082
- if ((0, types_1$2.isUndefined)(initialValue)) {
2289
+ if ((0, types_1$5.isUndefined)(initialValue)) {
2083
2290
  return reduceAsyncWithoutInitialValue(iterable, fn);
2084
2291
  }
2085
2292
  else {
@@ -2088,7 +2295,7 @@
2088
2295
  }
2089
2296
  reduceAsync$1.reduceAsync = reduceAsync;
2090
2297
  function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
2091
- if ((0, types_1$2.isAsyncIterable)(iterable)) {
2298
+ if ((0, types_1$5.isAsyncIterable)(iterable)) {
2092
2299
  return reduceAsyncIterable(iterable);
2093
2300
  }
2094
2301
  else {
@@ -2110,7 +2317,7 @@
2110
2317
  }
2111
2318
  }
2112
2319
  function reduceAsyncWithoutInitialValue(iterable, fn) {
2113
- if ((0, types_1$2.isAsyncIterable)(iterable)) {
2320
+ if ((0, types_1$5.isAsyncIterable)(iterable)) {
2114
2321
  return reduceAsyncIterable(iterable);
2115
2322
  }
2116
2323
  else {
@@ -2173,9 +2380,9 @@
2173
2380
  var reduce$1 = {};
2174
2381
 
2175
2382
  reduce$1.reduce = void 0;
2176
- const types_1$1 = es2018$3;
2383
+ const types_1$4 = es2018$2;
2177
2384
  function reduce(iterable, fn, initialValue) {
2178
- if ((0, types_1$1.isUndefined)(initialValue)) {
2385
+ if ((0, types_1$4.isUndefined)(initialValue)) {
2179
2386
  return reduceWithoutInitialValue(iterable, fn);
2180
2387
  }
2181
2388
  else {
@@ -2220,9 +2427,9 @@
2220
2427
  var someAsync$1 = {};
2221
2428
 
2222
2429
  someAsync$1.someAsync = void 0;
2223
- const types_1 = es2018$3;
2430
+ const types_1$3 = es2018$2;
2224
2431
  function someAsync(iterable, predicate) {
2225
- if ((0, types_1.isAsyncIterable)(iterable)) {
2432
+ if ((0, types_1$3.isAsyncIterable)(iterable)) {
2226
2433
  return someAsyncIterable(iterable);
2227
2434
  }
2228
2435
  else {
@@ -2406,6 +2613,135 @@
2406
2613
 
2407
2614
  }(es2018$5));
2408
2615
 
2616
+ var getErrorNames$1 = {};
2617
+
2618
+ var traverseErrorPrototypeChain$1 = {};
2619
+
2620
+ traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = void 0;
2621
+ function* traverseErrorPrototypeChain(err) {
2622
+ let current = err;
2623
+ while ((current = Object.getPrototypeOf(current))) {
2624
+ yield current;
2625
+ if (current === Error.prototype)
2626
+ break;
2627
+ }
2628
+ }
2629
+ traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = traverseErrorPrototypeChain;
2630
+
2631
+ getErrorNames$1.getErrorNames = void 0;
2632
+ const types_1$2 = es2018$2;
2633
+ const traverse_error_prototype_chain_1 = traverseErrorPrototypeChain$1;
2634
+ function* getErrorNames(err) {
2635
+ var _a;
2636
+ if ((0, types_1$2.isError)(err)) {
2637
+ for (const prototype of (0, traverse_error_prototype_chain_1.traverseErrorPrototypeChain)(err)) {
2638
+ if ((_a = prototype.constructor) === null || _a === void 0 ? void 0 : _a.name) {
2639
+ yield prototype.constructor.name;
2640
+ }
2641
+ }
2642
+ }
2643
+ else {
2644
+ yield err.name;
2645
+ yield* err.ancestors;
2646
+ }
2647
+ }
2648
+ getErrorNames$1.getErrorNames = getErrorNames;
2649
+
2650
+ var serializableError = {};
2651
+
2652
+ serializableError.isSerializableError = void 0;
2653
+ const types_1$1 = es2018$2;
2654
+ function isSerializableError(val) {
2655
+ return (0, types_1$1.isObject)(val)
2656
+ && (0, types_1$1.isString)(val.name)
2657
+ && (0, types_1$1.isString)(val.message)
2658
+ && ((0, types_1$1.isString)(val.stack) || (0, types_1$1.isNull)(val.stack))
2659
+ && ((0, types_1$1.isArray)(val.ancestors) && val.ancestors.every(types_1$1.isString));
2660
+ }
2661
+ serializableError.isSerializableError = isSerializableError;
2662
+
2663
+ customError$1.CustomError = void 0;
2664
+ const iterable_operator_1$1 = es2018$5;
2665
+ const get_error_names_1$1 = getErrorNames$1;
2666
+ const types_1 = es2018$2;
2667
+ const serializable_error_1 = serializableError;
2668
+ class CustomError extends Error {
2669
+ get name() {
2670
+ var _a, _b;
2671
+ 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';
2672
+ }
2673
+ static [Symbol.hasInstance](instance) {
2674
+ var _a;
2675
+ if ((0, types_1.isError)(instance) || (0, serializable_error_1.isSerializableError)(instance)) {
2676
+ const reversedClassNames = [
2677
+ (_a = this.prototype.constructor.name) !== null && _a !== void 0 ? _a : this.name,
2678
+ ...(0, get_error_names_1$1.getErrorNames)(this.prototype)
2679
+ ].reverse();
2680
+ const reversedInstanceNames = (0, iterable_operator_1$1.toArray)((0, get_error_names_1$1.getErrorNames)(instance)).reverse();
2681
+ return reversedClassNames.every((x, i) => x === reversedInstanceNames[i]);
2682
+ }
2683
+ else {
2684
+ return false;
2685
+ }
2686
+ }
2687
+ }
2688
+ customError$1.CustomError = CustomError;
2689
+
2690
+ var assertionError = {};
2691
+
2692
+ assertionError.AssertionError = void 0;
2693
+ const custom_error_1 = customError$1;
2694
+ class AssertionError extends custom_error_1.CustomError {
2695
+ }
2696
+ assertionError.AssertionError = AssertionError;
2697
+
2698
+ var normalize$1 = {};
2699
+
2700
+ normalize$1.normalize = void 0;
2701
+ const get_error_names_1 = getErrorNames$1;
2702
+ const iterable_operator_1 = es2018$5;
2703
+ function normalize(err) {
2704
+ var _a;
2705
+ const [name, ...ancestors] = (0, iterable_operator_1.toArray)((0, get_error_names_1.getErrorNames)(err));
2706
+ return {
2707
+ name,
2708
+ ancestors,
2709
+ message: err.message,
2710
+ stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
2711
+ };
2712
+ }
2713
+ normalize$1.normalize = normalize;
2714
+
2715
+ var assert$1 = {};
2716
+
2717
+ assert$1.assert = void 0;
2718
+ const assertion_error_1 = assertionError;
2719
+ function assert(condition, message) {
2720
+ if (!condition)
2721
+ throw new assertion_error_1.AssertionError(message);
2722
+ }
2723
+ assert$1.assert = assert;
2724
+
2725
+ (function (exports) {
2726
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2727
+ if (k2 === undefined) k2 = k;
2728
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2729
+ }) : (function(o, m, k, k2) {
2730
+ if (k2 === undefined) k2 = k;
2731
+ o[k2] = m[k];
2732
+ }));
2733
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2734
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2735
+ };__exportStar(customError$1, exports);
2736
+ __exportStar(assertionError, exports);
2737
+ __exportStar(serializableError, exports);
2738
+ __exportStar(normalize$1, exports);
2739
+ __exportStar(assert$1, exports);
2740
+ __exportStar(getErrorNames$1, exports);
2741
+ __exportStar(traverseErrorPrototypeChain$1, exports);
2742
+
2743
+ }(es2018$6));
2744
+
2409
2745
  var _LRUMap_limit, _LRUMap_map;
2410
2746
  class LRUMap {
2411
2747
  constructor(limit) {
@@ -2464,11 +2800,11 @@
2464
2800
  }
2465
2801
  }
2466
2802
 
2467
- var es2018$2 = {};
2803
+ var es2018$1 = {};
2468
2804
 
2469
2805
  var exponentialBackoff = {};
2470
2806
 
2471
- var es2018$1 = {};
2807
+ var es2018 = {};
2472
2808
 
2473
2809
  var random$1 = {};
2474
2810
 
@@ -2512,10 +2848,10 @@
2512
2848
  __exportStar(randomInt$1, exports);
2513
2849
  __exportStar(randomIntInclusive$1, exports);
2514
2850
 
2515
- }(es2018$1));
2851
+ }(es2018));
2516
2852
 
2517
2853
  exponentialBackoff.calculateExponentialBackoffTimeout = void 0;
2518
- const extra_rand_1 = es2018$1;
2854
+ const extra_rand_1 = es2018;
2519
2855
  function calculateExponentialBackoffTimeout({ baseTimeout, retries, maxTimeout = Infinity, factor = 2, jitter = true }) {
2520
2856
  const timeout = Math.min(factor ** retries * baseTimeout, maxTimeout);
2521
2857
  if (jitter) {
@@ -2630,7 +2966,7 @@
2630
2966
  __exportStar(setTimeoutLoop$1, exports);
2631
2967
  __exportStar(setDynamicTimeoutLoop$1, exports);
2632
2968
 
2633
- }(es2018$2));
2969
+ }(es2018$1));
2634
2970
 
2635
2971
  var _ExpirableMap_map, _ExpirableMap_cancelClearTimeout;
2636
2972
  class ExpirableMap {
@@ -2720,7 +3056,7 @@
2720
3056
  if (this.itemMetadataSortedByExpirationTime.length > 0) {
2721
3057
  const item = this.itemMetadataSortedByExpirationTime[0];
2722
3058
  if (Number.isFinite(item.expirationTime)) {
2723
- const cancel = es2018$2.setSchedule(item.expirationTime, () => {
3059
+ const cancel = es2018$1.setSchedule(item.expirationTime, () => {
2724
3060
  this.clearExpiredItems(Date.now());
2725
3061
  this.rescheduleClearTimeout();
2726
3062
  });
@@ -2851,7 +3187,7 @@
2851
3187
  if (this.itemMetadataSortedByExpirationTime.length > 0) {
2852
3188
  const item = this.itemMetadataSortedByExpirationTime[0];
2853
3189
  if (Number.isFinite(item.expirationTime)) {
2854
- const cancel = es2018$2.setSchedule(item.expirationTime, () => {
3190
+ const cancel = es2018$1.setSchedule(item.expirationTime, () => {
2855
3191
  this.clearExpiredItems(Date.now());
2856
3192
  this.rescheduleClearTimeout();
2857
3193
  });
@@ -2976,73 +3312,7 @@
2976
3312
  }
2977
3313
  }
2978
3314
 
2979
- /*! *****************************************************************************
2980
- Copyright (c) Microsoft Corporation.
2981
-
2982
- Permission to use, copy, modify, and/or distribute this software for any
2983
- purpose with or without fee is hereby granted.
2984
-
2985
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2986
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2987
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2988
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2989
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2990
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2991
- PERFORMANCE OF THIS SOFTWARE.
2992
- ***************************************************************************** */
2993
- /* global Reflect, Promise */
2994
-
2995
- var extendStatics = function(d, b) {
2996
- extendStatics = Object.setPrototypeOf ||
2997
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2998
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2999
- return extendStatics(d, b);
3000
- };
3001
-
3002
- function __extends(d, b) {
3003
- if (typeof b !== "function" && b !== null)
3004
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3005
- extendStatics(d, b);
3006
- function __() { this.constructor = d; }
3007
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3008
- }
3009
-
3010
- function __values(o) {
3011
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
3012
- if (m) return m.call(o);
3013
- if (o && typeof o.length === "number") return {
3014
- next: function () {
3015
- if (o && i >= o.length) o = void 0;
3016
- return { value: o && o[i++], done: !o };
3017
- }
3018
- };
3019
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
3020
- }
3021
-
3022
- function __read(o, n) {
3023
- var m = typeof Symbol === "function" && o[Symbol.iterator];
3024
- if (!m) return o;
3025
- var i = m.call(o), r, ar = [], e;
3026
- try {
3027
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
3028
- }
3029
- catch (error) { e = { error: error }; }
3030
- finally {
3031
- try {
3032
- if (r && !r.done && (m = i["return"])) m.call(i);
3033
- }
3034
- finally { if (e) throw e.error; }
3035
- }
3036
- return ar;
3037
- }
3038
-
3039
- function __spreadArray(to, from) {
3040
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
3041
- to[j] = from[i];
3042
- return to;
3043
- }
3044
-
3045
- function isFunction$1(value) {
3315
+ function isFunction(value) {
3046
3316
  return typeof value === 'function';
3047
3317
  }
3048
3318
 
@@ -3110,7 +3380,7 @@
3110
3380
  }
3111
3381
  }
3112
3382
  var initialTeardown = this.initialTeardown;
3113
- if (isFunction$1(initialTeardown)) {
3383
+ if (isFunction(initialTeardown)) {
3114
3384
  try {
3115
3385
  initialTeardown();
3116
3386
  }
@@ -3202,10 +3472,10 @@
3202
3472
  var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
3203
3473
  function isSubscription(value) {
3204
3474
  return (value instanceof Subscription ||
3205
- (value && 'closed' in value && isFunction$1(value.remove) && isFunction$1(value.add) && isFunction$1(value.unsubscribe)));
3475
+ (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));
3206
3476
  }
3207
3477
  function execTeardown(teardown) {
3208
- if (isFunction$1(teardown)) {
3478
+ if (isFunction(teardown)) {
3209
3479
  teardown();
3210
3480
  }
3211
3481
  else {
@@ -3340,7 +3610,7 @@
3340
3610
  function SafeSubscriber(observerOrNext, error, complete) {
3341
3611
  var _this = _super.call(this) || this;
3342
3612
  var next;
3343
- if (isFunction$1(observerOrNext)) {
3613
+ if (isFunction(observerOrNext)) {
3344
3614
  next = observerOrNext;
3345
3615
  }
3346
3616
  else if (observerOrNext) {
@@ -3450,16 +3720,20 @@
3450
3720
  var _this = this;
3451
3721
  promiseCtor = getPromiseCtor(promiseCtor);
3452
3722
  return new promiseCtor(function (resolve, reject) {
3453
- var subscription;
3454
- subscription = _this.subscribe(function (value) {
3455
- try {
3456
- next(value);
3457
- }
3458
- catch (err) {
3459
- reject(err);
3460
- subscription === null || subscription === void 0 ? void 0 : subscription.unsubscribe();
3461
- }
3462
- }, reject, resolve);
3723
+ var subscriber = new SafeSubscriber({
3724
+ next: function (value) {
3725
+ try {
3726
+ next(value);
3727
+ }
3728
+ catch (err) {
3729
+ reject(err);
3730
+ subscriber.unsubscribe();
3731
+ }
3732
+ },
3733
+ error: reject,
3734
+ complete: resolve,
3735
+ });
3736
+ _this.subscribe(subscriber);
3463
3737
  });
3464
3738
  };
3465
3739
  Observable.prototype._subscribe = function (subscriber) {
@@ -3494,7 +3768,7 @@
3494
3768
  return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
3495
3769
  }
3496
3770
  function isObserver(value) {
3497
- return value && isFunction$1(value.next) && isFunction$1(value.error) && isFunction$1(value.complete);
3771
+ return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
3498
3772
  }
3499
3773
  function isSubscriber(value) {
3500
3774
  return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
@@ -3652,364 +3926,13 @@
3652
3926
  return AnonymousSubject;
3653
3927
  }(Subject));
3654
3928
 
3655
- var es2018 = {};
3656
-
3657
- var array = {};
3658
-
3659
- array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
3660
- function isArray(val) {
3661
- return Array.isArray(val);
3662
- }
3663
- array.isArray = isArray;
3664
- function isntArray(val) {
3665
- return !isArray(val);
3666
- }
3667
- array.isntArray = isntArray;
3668
- function isEmptyArray(val) {
3669
- return val.length === 0;
3670
- }
3671
- array.isEmptyArray = isEmptyArray;
3672
- function isntEmptyArray(val) {
3673
- return val.length !== 0;
3674
- }
3675
- array.isntEmptyArray = isntEmptyArray;
3676
-
3677
- var asyncIterable = {};
3678
-
3679
- var _null = {};
3680
-
3681
- _null.isntNull = _null.isNull = void 0;
3682
- function isNull(val) {
3683
- return val === null;
3684
- }
3685
- _null.isNull = isNull;
3686
- function isntNull(val) {
3687
- return !isNull(val);
3688
- }
3689
- _null.isntNull = isntNull;
3690
-
3691
- var _undefined = {};
3692
-
3693
- _undefined.isntUndefined = _undefined.isUndefined = void 0;
3694
- function isUndefined(val) {
3695
- return val === undefined;
3696
- }
3697
- _undefined.isUndefined = isUndefined;
3698
- function isntUndefined(val) {
3699
- return !isUndefined(val);
3700
- }
3701
- _undefined.isntUndefined = isntUndefined;
3702
-
3703
- asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
3704
- const null_1$1 = _null;
3705
- const undefined_1$2 = _undefined;
3706
- function isAsyncIterable(val) {
3707
- return (0, null_1$1.isntNull)(val)
3708
- && (0, undefined_1$2.isntUndefined)(val)
3709
- && typeof val[Symbol.asyncIterator] === 'function';
3710
- }
3711
- asyncIterable.isAsyncIterable = isAsyncIterable;
3712
- function isntAsyncIterable(val) {
3713
- return !isAsyncIterable(val);
3714
- }
3715
- asyncIterable.isntAsyncIterable = isntAsyncIterable;
3716
-
3717
- var bigint = {};
3718
-
3719
- bigint.isntBigInt = bigint.isBigInt = void 0;
3720
- function isBigInt(val) {
3721
- return typeof val === 'bigint';
3722
- }
3723
- bigint.isBigInt = isBigInt;
3724
- function isntBigInt(val) {
3725
- return !isBigInt(val);
3726
- }
3727
- bigint.isntBigInt = isntBigInt;
3728
-
3729
- var boolean = {};
3730
-
3731
- boolean.isntBoolean = boolean.isBoolean = void 0;
3732
- function isBoolean(val) {
3733
- return typeof val === 'boolean';
3734
- }
3735
- boolean.isBoolean = isBoolean;
3736
- function isntBoolean(val) {
3737
- return !isBoolean(val);
3738
- }
3739
- boolean.isntBoolean = isntBoolean;
3740
-
3741
- var char = {};
3742
-
3743
- var string = {};
3744
-
3745
- string.isntString = string.isString = void 0;
3746
- function isString(val) {
3747
- return typeof val === 'string';
3748
- }
3749
- string.isString = isString;
3750
- function isntString(val) {
3751
- return !isString(val);
3752
- }
3753
- string.isntString = isntString;
3754
-
3755
- char.isntChar = char.isChar = void 0;
3756
- const string_1$1 = string;
3757
- function isChar(val) {
3758
- return (0, string_1$1.isString)(val)
3759
- && val.length === 1;
3760
- }
3761
- char.isChar = isChar;
3762
- function isntChar(val) {
3763
- return !isChar(val);
3764
- }
3765
- char.isntChar = isntChar;
3766
-
3767
- var date = {};
3768
-
3769
- date.isntDate = date.isDate = void 0;
3770
- function isDate(val) {
3771
- return val instanceof Date;
3772
- }
3773
- date.isDate = isDate;
3774
- function isntDate(val) {
3775
- return !isDate(val);
3776
- }
3777
- date.isntDate = isntDate;
3778
-
3779
- var _enum = {};
3780
-
3781
- _enum.inEnum = void 0;
3782
- function inEnum(val, _enum) {
3783
- return Object.values(_enum).includes(val);
3784
- }
3785
- _enum.inEnum = inEnum;
3786
-
3787
- var error = {};
3788
-
3789
- error.isntError = error.isError = void 0;
3790
- function isError(val) {
3791
- return val instanceof Error;
3792
- }
3793
- error.isError = isError;
3794
- function isntError(val) {
3795
- return !isError(val);
3796
- }
3797
- error.isntError = isntError;
3798
-
3799
- var falsy = {};
3800
-
3801
- falsy.isntFalsy = falsy.isFalsy = void 0;
3802
- function isFalsy(val) {
3803
- return !val;
3804
- }
3805
- falsy.isFalsy = isFalsy;
3806
- function isntFalsy(val) {
3807
- return !isFalsy(val);
3808
- }
3809
- falsy.isntFalsy = isntFalsy;
3810
-
3811
- var _function = {};
3812
-
3813
- _function.isntFunction = _function.isFunction = void 0;
3814
- function isFunction(val) {
3815
- return typeof val === 'function';
3816
- }
3817
- _function.isFunction = isFunction;
3818
- function isntFunction(val) {
3819
- return !isFunction(val);
3820
- }
3821
- _function.isntFunction = isntFunction;
3822
-
3823
- var iterable = {};
3824
-
3825
- iterable.isntIterable = iterable.isIterable = void 0;
3826
- const null_1 = _null;
3827
- const undefined_1$1 = _undefined;
3828
- function isIterable(val) {
3829
- return (0, null_1.isntNull)(val)
3830
- && (0, undefined_1$1.isntUndefined)(val)
3831
- && typeof val[Symbol.iterator] === 'function';
3832
- }
3833
- iterable.isIterable = isIterable;
3834
- function isntIterable(val) {
3835
- return !isIterable(val);
3836
- }
3837
- iterable.isntIterable = isntIterable;
3838
-
3839
- var jsonRpc = {};
3840
-
3841
- var object = {};
3842
-
3843
- object.isntEmptyObject = object.isEmptyObject = object.isRecord = object.isntObject = object.isObject = void 0;
3844
- function isObject(val) {
3845
- return val !== null && typeof val === 'object';
3846
- }
3847
- object.isObject = isObject;
3848
- function isntObject(val) {
3849
- return !isObject(val);
3850
- }
3851
- object.isntObject = isntObject;
3852
- function isRecord(val) {
3853
- return isObject(val);
3854
- }
3855
- object.isRecord = isRecord;
3856
- function isEmptyObject(val) {
3857
- return Object.keys(val).length === 0;
3858
- }
3859
- object.isEmptyObject = isEmptyObject;
3860
- function isntEmptyObject(val) {
3861
- return Object.keys(val).length !== 0;
3862
- }
3863
- object.isntEmptyObject = isntEmptyObject;
3864
-
3865
- var number = {};
3866
-
3867
- number.isntNumber = number.isNumber = void 0;
3868
- function isNumber(val) {
3869
- return typeof val === 'number';
3870
- }
3871
- number.isNumber = isNumber;
3872
- function isntNumber(val) {
3873
- return !isNumber(val);
3874
- }
3875
- number.isntNumber = isntNumber;
3876
-
3877
- jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
3878
- const array_1 = array;
3879
- const object_1 = object;
3880
- const string_1 = string;
3881
- const number_1 = number;
3882
- const undefined_1 = _undefined;
3883
- function isJsonRpcId(val) {
3884
- return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
3885
- }
3886
- function isJsonRpcParams(val) {
3887
- return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
3888
- }
3889
- function isJsonRpcNotification(val) {
3890
- return (0, object_1.isRecord)(val)
3891
- && (0, string_1.isString)(val.jsonrpc)
3892
- && (0, string_1.isString)(val.method)
3893
- && (0, undefined_1.isUndefined)(val.id)
3894
- && isJsonRpcParams(val.params);
3895
- }
3896
- jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
3897
- function isntJsonRpcNotification(val) {
3898
- return !isJsonRpcNotification(val);
3899
- }
3900
- jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
3901
- function isJsonRpcRequest(val) {
3902
- return (0, object_1.isRecord)(val)
3903
- && (0, string_1.isString)(val.jsonrpc)
3904
- && (0, string_1.isString)(val.method)
3905
- && isJsonRpcId(val.id)
3906
- && isJsonRpcParams(val.params);
3907
- }
3908
- jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
3909
- function isntJsonRpcRequest(val) {
3910
- return !isJsonRpcRequest(val);
3911
- }
3912
- jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
3913
- function isJsonRpcSuccess(val) {
3914
- return (0, object_1.isRecord)(val)
3915
- && (0, string_1.isString)(val.jsonrpc)
3916
- && (0, string_1.isString)(val.id)
3917
- && 'result' in val;
3918
- }
3919
- jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
3920
- function isntJsonRpcSuccess(val) {
3921
- return !isJsonRpcSuccess(val);
3922
- }
3923
- jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
3924
- function isJsonRpcError(val) {
3925
- return (0, object_1.isRecord)(val)
3926
- && (0, string_1.isString)(val.jsonrpc)
3927
- && isJsonRpcId(val.id)
3928
- && isJsonRpcErrorObject(val.error);
3929
- }
3930
- jsonRpc.isJsonRpcError = isJsonRpcError;
3931
- function isntJsonRpcError(val) {
3932
- return !isJsonRpcError(val);
3933
- }
3934
- jsonRpc.isntJsonRpcError = isntJsonRpcError;
3935
- function isJsonRpcErrorObject(val) {
3936
- return (0, object_1.isRecord)(val)
3937
- && (0, number_1.isNumber)(val.code)
3938
- && (0, string_1.isString)(val.message)
3939
- && ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
3940
- }
3941
-
3942
- var json = {};
3943
-
3944
- json.isntJson = json.isJson = void 0;
3945
- function isJson(val) {
3946
- try {
3947
- JSON.stringify(val);
3948
- return true;
3949
- }
3950
- catch (_a) {
3951
- return false;
3952
- }
3953
- }
3954
- json.isJson = isJson;
3955
- function isntJson(val) {
3956
- return !isntJson();
3957
- }
3958
- json.isntJson = isntJson;
3959
-
3960
- var url = {};
3961
-
3962
- url.isAbsoluteURL = void 0;
3963
- function isAbsoluteURL(str) {
3964
- try {
3965
- new URL(str);
3966
- return true;
3967
- }
3968
- catch (_a) {
3969
- return false;
3970
- }
3971
- }
3972
- url.isAbsoluteURL = isAbsoluteURL;
3973
-
3974
- (function (exports) {
3975
- var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3976
- if (k2 === undefined) k2 = k;
3977
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3978
- }) : (function(o, m, k, k2) {
3979
- if (k2 === undefined) k2 = k;
3980
- o[k2] = m[k];
3981
- }));
3982
- var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
3983
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
3984
- };__exportStar(array, exports);
3985
- __exportStar(asyncIterable, exports);
3986
- __exportStar(bigint, exports);
3987
- __exportStar(boolean, exports);
3988
- __exportStar(char, exports);
3989
- __exportStar(date, exports);
3990
- __exportStar(_enum, exports);
3991
- __exportStar(error, exports);
3992
- __exportStar(falsy, exports);
3993
- __exportStar(_function, exports);
3994
- __exportStar(iterable, exports);
3995
- __exportStar(jsonRpc, exports);
3996
- __exportStar(json, exports);
3997
- __exportStar(_null, exports);
3998
- __exportStar(number, exports);
3999
- __exportStar(object, exports);
4000
- __exportStar(string, exports);
4001
- __exportStar(_undefined, exports);
4002
- __exportStar(url, exports);
4003
-
4004
- }(es2018));
4005
-
4006
3929
  class ObservableFiniteStateMachine extends FiniteStateMachine {
4007
3930
  constructor() {
4008
3931
  super(...arguments);
4009
- this.stateChanged = new Subject();
3932
+ this.stateChanges = new Subject();
4010
3933
  }
4011
- get stateChangedObservable() {
4012
- return this.stateChanged;
3934
+ observeStateChanges() {
3935
+ return this.stateChanges;
4013
3936
  }
4014
3937
  /**
4015
3938
  * @throws {BadEventError}
@@ -4018,9 +3941,9 @@
4018
3941
  const oldState = this.state;
4019
3942
  super.send(event);
4020
3943
  const newState = this.state;
4021
- this.stateChanged.next({ event, oldState, newState });
4022
- if (es2018.isEmptyObject(this.schema[newState])) {
4023
- this.stateChanged.complete();
3944
+ this.stateChanges.next({ event, oldState, newState });
3945
+ if (es2018$2.isEmptyObject(this.schema[newState])) {
3946
+ this.stateChanges.complete();
4024
3947
  }
4025
3948
  }
4026
3949
  }