@blackglory/structures 0.2.7 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -0
- package/dist/es2015/index.min.mjs +1 -1
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +1532 -310
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +1534 -309
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +1 -1
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +1 -1
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +1532 -310
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +1534 -309
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +1 -1
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/finite-state-machine.d.ts +13 -0
- package/lib/es2015/finite-state-machine.js +46 -0
- package/lib/es2015/finite-state-machine.js.map +1 -0
- package/lib/es2015/index.d.ts +2 -0
- package/lib/es2015/index.js +2 -0
- package/lib/es2015/index.js.map +1 -1
- package/lib/es2015/observable-finite-state-machine.d.ts +13 -0
- package/lib/es2015/observable-finite-state-machine.js +28 -0
- package/lib/es2015/observable-finite-state-machine.js.map +1 -0
- package/lib/es2018/finite-state-machine.d.ts +13 -0
- package/lib/es2018/finite-state-machine.js +46 -0
- package/lib/es2018/finite-state-machine.js.map +1 -0
- package/lib/es2018/index.d.ts +2 -0
- package/lib/es2018/index.js +2 -0
- package/lib/es2018/index.js.map +1 -1
- package/lib/es2018/observable-finite-state-machine.d.ts +13 -0
- package/lib/es2018/observable-finite-state-machine.js +28 -0
- package/lib/es2018/observable-finite-state-machine.js.map +1 -0
- package/package.json +20 -17
- package/CHANGELOG.md +0 -148
package/dist/es2015/index.mjs
CHANGED
|
@@ -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,7 +233,7 @@ 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
|
|
|
181
|
-
var es2018$
|
|
236
|
+
var es2018$6 = {};
|
|
182
237
|
|
|
183
238
|
var customError = {};
|
|
184
239
|
|
|
@@ -256,15 +311,15 @@ __exportStar(normalize$1, exports);
|
|
|
256
311
|
__exportStar(refute$1, exports);
|
|
257
312
|
__exportStar(assert$1, exports);
|
|
258
313
|
|
|
259
|
-
}(es2018$
|
|
314
|
+
}(es2018$6));
|
|
260
315
|
|
|
261
|
-
var es2018$
|
|
316
|
+
var es2018$5 = {};
|
|
262
317
|
|
|
263
318
|
var middleware = {};
|
|
264
319
|
|
|
265
320
|
var chunkAsync$1 = {};
|
|
266
321
|
|
|
267
|
-
var es2018$
|
|
322
|
+
var es2018$4 = {};
|
|
268
323
|
|
|
269
324
|
var go$1 = {};
|
|
270
325
|
|
|
@@ -286,11 +341,11 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
|
|
|
286
341
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
287
342
|
};__exportStar(go$1, exports);
|
|
288
343
|
|
|
289
|
-
}(es2018$
|
|
344
|
+
}(es2018$4));
|
|
290
345
|
|
|
291
346
|
chunkAsync$1.chunkAsync = void 0;
|
|
292
|
-
const go_1$f = es2018$
|
|
293
|
-
const errors_1$f = es2018$
|
|
347
|
+
const go_1$f = es2018$4;
|
|
348
|
+
const errors_1$f = es2018$6;
|
|
294
349
|
function chunkAsync(iterable, size) {
|
|
295
350
|
(0, errors_1$f.assert)(Number.isInteger(size), 'The parameter size must be an integer');
|
|
296
351
|
(0, errors_1$f.assert)(size > 0, 'The parameter size must be greater than 0');
|
|
@@ -311,297 +366,297 @@ chunkAsync$1.chunkAsync = chunkAsync;
|
|
|
311
366
|
|
|
312
367
|
var chunkByAsync$1 = {};
|
|
313
368
|
|
|
314
|
-
var es2018$
|
|
369
|
+
var es2018$3 = {};
|
|
315
370
|
|
|
316
|
-
var array = {};
|
|
371
|
+
var array$1 = {};
|
|
317
372
|
|
|
318
|
-
array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
|
|
319
|
-
function isArray(val) {
|
|
373
|
+
array$1.isntEmptyArray = array$1.isEmptyArray = array$1.isntArray = array$1.isArray = void 0;
|
|
374
|
+
function isArray$1(val) {
|
|
320
375
|
return Array.isArray(val);
|
|
321
376
|
}
|
|
322
|
-
array.isArray = isArray;
|
|
323
|
-
function isntArray(val) {
|
|
324
|
-
return !isArray(val);
|
|
377
|
+
array$1.isArray = isArray$1;
|
|
378
|
+
function isntArray$1(val) {
|
|
379
|
+
return !isArray$1(val);
|
|
325
380
|
}
|
|
326
|
-
array.isntArray = isntArray;
|
|
327
|
-
function isEmptyArray(val) {
|
|
381
|
+
array$1.isntArray = isntArray$1;
|
|
382
|
+
function isEmptyArray$1(val) {
|
|
328
383
|
return val.length === 0;
|
|
329
384
|
}
|
|
330
|
-
array.isEmptyArray = isEmptyArray;
|
|
331
|
-
function isntEmptyArray(val) {
|
|
385
|
+
array$1.isEmptyArray = isEmptyArray$1;
|
|
386
|
+
function isntEmptyArray$1(val) {
|
|
332
387
|
return val.length !== 0;
|
|
333
388
|
}
|
|
334
|
-
array.isntEmptyArray = isntEmptyArray;
|
|
389
|
+
array$1.isntEmptyArray = isntEmptyArray$1;
|
|
335
390
|
|
|
336
|
-
var asyncIterable = {};
|
|
391
|
+
var asyncIterable$1 = {};
|
|
337
392
|
|
|
338
|
-
var _null = {};
|
|
393
|
+
var _null$1 = {};
|
|
339
394
|
|
|
340
|
-
_null.isntNull = _null.isNull = void 0;
|
|
341
|
-
function isNull(val) {
|
|
395
|
+
_null$1.isntNull = _null$1.isNull = void 0;
|
|
396
|
+
function isNull$1(val) {
|
|
342
397
|
return val === null;
|
|
343
398
|
}
|
|
344
|
-
_null.isNull = isNull;
|
|
345
|
-
function isntNull(val) {
|
|
346
|
-
return !isNull(val);
|
|
399
|
+
_null$1.isNull = isNull$1;
|
|
400
|
+
function isntNull$1(val) {
|
|
401
|
+
return !isNull$1(val);
|
|
347
402
|
}
|
|
348
|
-
_null.isntNull = isntNull;
|
|
403
|
+
_null$1.isntNull = isntNull$1;
|
|
349
404
|
|
|
350
|
-
var _undefined = {};
|
|
405
|
+
var _undefined$1 = {};
|
|
351
406
|
|
|
352
|
-
_undefined.isntUndefined = _undefined.isUndefined = void 0;
|
|
353
|
-
function isUndefined(val) {
|
|
407
|
+
_undefined$1.isntUndefined = _undefined$1.isUndefined = void 0;
|
|
408
|
+
function isUndefined$1(val) {
|
|
354
409
|
return val === undefined;
|
|
355
410
|
}
|
|
356
|
-
_undefined.isUndefined = isUndefined;
|
|
357
|
-
function isntUndefined(val) {
|
|
358
|
-
return !isUndefined(val);
|
|
411
|
+
_undefined$1.isUndefined = isUndefined$1;
|
|
412
|
+
function isntUndefined$1(val) {
|
|
413
|
+
return !isUndefined$1(val);
|
|
359
414
|
}
|
|
360
|
-
_undefined.isntUndefined = isntUndefined;
|
|
415
|
+
_undefined$1.isntUndefined = isntUndefined$1;
|
|
361
416
|
|
|
362
|
-
asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
|
|
363
|
-
const null_1$
|
|
364
|
-
const undefined_1$
|
|
365
|
-
function isAsyncIterable(val) {
|
|
366
|
-
return (0, null_1$
|
|
367
|
-
&& (0, undefined_1$
|
|
417
|
+
asyncIterable$1.isntAsyncIterable = asyncIterable$1.isAsyncIterable = void 0;
|
|
418
|
+
const null_1$3 = _null$1;
|
|
419
|
+
const undefined_1$5 = _undefined$1;
|
|
420
|
+
function isAsyncIterable$1(val) {
|
|
421
|
+
return (0, null_1$3.isntNull)(val)
|
|
422
|
+
&& (0, undefined_1$5.isntUndefined)(val)
|
|
368
423
|
&& typeof val[Symbol.asyncIterator] === 'function';
|
|
369
424
|
}
|
|
370
|
-
asyncIterable.isAsyncIterable = isAsyncIterable;
|
|
371
|
-
function isntAsyncIterable(val) {
|
|
372
|
-
return !isAsyncIterable(val);
|
|
425
|
+
asyncIterable$1.isAsyncIterable = isAsyncIterable$1;
|
|
426
|
+
function isntAsyncIterable$1(val) {
|
|
427
|
+
return !isAsyncIterable$1(val);
|
|
373
428
|
}
|
|
374
|
-
asyncIterable.isntAsyncIterable = isntAsyncIterable;
|
|
429
|
+
asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
|
|
375
430
|
|
|
376
|
-
var bigint = {};
|
|
431
|
+
var bigint$1 = {};
|
|
377
432
|
|
|
378
|
-
bigint.isntBigInt = bigint.isBigInt = void 0;
|
|
379
|
-
function isBigInt(val) {
|
|
433
|
+
bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
|
|
434
|
+
function isBigInt$1(val) {
|
|
380
435
|
return typeof val === 'bigint';
|
|
381
436
|
}
|
|
382
|
-
bigint.isBigInt = isBigInt;
|
|
383
|
-
function isntBigInt(val) {
|
|
384
|
-
return !isBigInt(val);
|
|
437
|
+
bigint$1.isBigInt = isBigInt$1;
|
|
438
|
+
function isntBigInt$1(val) {
|
|
439
|
+
return !isBigInt$1(val);
|
|
385
440
|
}
|
|
386
|
-
bigint.isntBigInt = isntBigInt;
|
|
441
|
+
bigint$1.isntBigInt = isntBigInt$1;
|
|
387
442
|
|
|
388
|
-
var boolean = {};
|
|
443
|
+
var boolean$1 = {};
|
|
389
444
|
|
|
390
|
-
boolean.isntBoolean = boolean.isBoolean = void 0;
|
|
391
|
-
function isBoolean(val) {
|
|
445
|
+
boolean$1.isntBoolean = boolean$1.isBoolean = void 0;
|
|
446
|
+
function isBoolean$1(val) {
|
|
392
447
|
return typeof val === 'boolean';
|
|
393
448
|
}
|
|
394
|
-
boolean.isBoolean = isBoolean;
|
|
395
|
-
function isntBoolean(val) {
|
|
396
|
-
return !isBoolean(val);
|
|
449
|
+
boolean$1.isBoolean = isBoolean$1;
|
|
450
|
+
function isntBoolean$1(val) {
|
|
451
|
+
return !isBoolean$1(val);
|
|
397
452
|
}
|
|
398
|
-
boolean.isntBoolean = isntBoolean;
|
|
453
|
+
boolean$1.isntBoolean = isntBoolean$1;
|
|
399
454
|
|
|
400
|
-
var char = {};
|
|
455
|
+
var char$1 = {};
|
|
401
456
|
|
|
402
|
-
var string = {};
|
|
457
|
+
var string$1 = {};
|
|
403
458
|
|
|
404
|
-
string.isntString = string.isString = void 0;
|
|
405
|
-
function isString(val) {
|
|
459
|
+
string$1.isntString = string$1.isString = void 0;
|
|
460
|
+
function isString$1(val) {
|
|
406
461
|
return typeof val === 'string';
|
|
407
462
|
}
|
|
408
|
-
string.isString = isString;
|
|
409
|
-
function isntString(val) {
|
|
410
|
-
return !isString(val);
|
|
463
|
+
string$1.isString = isString$1;
|
|
464
|
+
function isntString$1(val) {
|
|
465
|
+
return !isString$1(val);
|
|
411
466
|
}
|
|
412
|
-
string.isntString = isntString;
|
|
467
|
+
string$1.isntString = isntString$1;
|
|
413
468
|
|
|
414
|
-
char.isntChar = char.isChar = void 0;
|
|
415
|
-
const string_1$
|
|
416
|
-
function isChar(val) {
|
|
417
|
-
return (0, string_1$
|
|
469
|
+
char$1.isntChar = char$1.isChar = void 0;
|
|
470
|
+
const string_1$3 = string$1;
|
|
471
|
+
function isChar$1(val) {
|
|
472
|
+
return (0, string_1$3.isString)(val)
|
|
418
473
|
&& val.length === 1;
|
|
419
474
|
}
|
|
420
|
-
char.isChar = isChar;
|
|
421
|
-
function isntChar(val) {
|
|
422
|
-
return !isChar(val);
|
|
475
|
+
char$1.isChar = isChar$1;
|
|
476
|
+
function isntChar$1(val) {
|
|
477
|
+
return !isChar$1(val);
|
|
423
478
|
}
|
|
424
|
-
char.isntChar = isntChar;
|
|
479
|
+
char$1.isntChar = isntChar$1;
|
|
425
480
|
|
|
426
|
-
var date = {};
|
|
481
|
+
var date$1 = {};
|
|
427
482
|
|
|
428
|
-
date.isntDate = date.isDate = void 0;
|
|
429
|
-
function isDate(val) {
|
|
483
|
+
date$1.isntDate = date$1.isDate = void 0;
|
|
484
|
+
function isDate$1(val) {
|
|
430
485
|
return val instanceof Date;
|
|
431
486
|
}
|
|
432
|
-
date.isDate = isDate;
|
|
433
|
-
function isntDate(val) {
|
|
434
|
-
return !isDate(val);
|
|
487
|
+
date$1.isDate = isDate$1;
|
|
488
|
+
function isntDate$1(val) {
|
|
489
|
+
return !isDate$1(val);
|
|
435
490
|
}
|
|
436
|
-
date.isntDate = isntDate;
|
|
491
|
+
date$1.isntDate = isntDate$1;
|
|
437
492
|
|
|
438
|
-
var _enum = {};
|
|
493
|
+
var _enum$1 = {};
|
|
439
494
|
|
|
440
|
-
_enum.inEnum = void 0;
|
|
441
|
-
function inEnum(val, _enum) {
|
|
495
|
+
_enum$1.inEnum = void 0;
|
|
496
|
+
function inEnum$1(val, _enum) {
|
|
442
497
|
return Object.values(_enum).includes(val);
|
|
443
498
|
}
|
|
444
|
-
_enum.inEnum = inEnum;
|
|
499
|
+
_enum$1.inEnum = inEnum$1;
|
|
445
500
|
|
|
446
|
-
var error = {};
|
|
501
|
+
var error$1 = {};
|
|
447
502
|
|
|
448
|
-
error.isntError = error.isError = void 0;
|
|
449
|
-
function isError(val) {
|
|
503
|
+
error$1.isntError = error$1.isError = void 0;
|
|
504
|
+
function isError$1(val) {
|
|
450
505
|
return val instanceof Error;
|
|
451
506
|
}
|
|
452
|
-
error.isError = isError;
|
|
453
|
-
function isntError(val) {
|
|
454
|
-
return !isError(val);
|
|
507
|
+
error$1.isError = isError$1;
|
|
508
|
+
function isntError$1(val) {
|
|
509
|
+
return !isError$1(val);
|
|
455
510
|
}
|
|
456
|
-
error.isntError = isntError;
|
|
511
|
+
error$1.isntError = isntError$1;
|
|
457
512
|
|
|
458
|
-
var falsy = {};
|
|
513
|
+
var falsy$1 = {};
|
|
459
514
|
|
|
460
|
-
falsy.isntFalsy = falsy.isFalsy = void 0;
|
|
461
|
-
function isFalsy(val) {
|
|
515
|
+
falsy$1.isntFalsy = falsy$1.isFalsy = void 0;
|
|
516
|
+
function isFalsy$1(val) {
|
|
462
517
|
return !val;
|
|
463
518
|
}
|
|
464
|
-
falsy.isFalsy = isFalsy;
|
|
465
|
-
function isntFalsy(val) {
|
|
466
|
-
return !isFalsy(val);
|
|
519
|
+
falsy$1.isFalsy = isFalsy$1;
|
|
520
|
+
function isntFalsy$1(val) {
|
|
521
|
+
return !isFalsy$1(val);
|
|
467
522
|
}
|
|
468
|
-
falsy.isntFalsy = isntFalsy;
|
|
523
|
+
falsy$1.isntFalsy = isntFalsy$1;
|
|
469
524
|
|
|
470
|
-
var _function = {};
|
|
525
|
+
var _function$1 = {};
|
|
471
526
|
|
|
472
|
-
_function.isntFunction = _function.isFunction = void 0;
|
|
473
|
-
function isFunction(val) {
|
|
527
|
+
_function$1.isntFunction = _function$1.isFunction = void 0;
|
|
528
|
+
function isFunction$2(val) {
|
|
474
529
|
return typeof val === 'function';
|
|
475
530
|
}
|
|
476
|
-
_function.isFunction = isFunction;
|
|
477
|
-
function isntFunction(val) {
|
|
478
|
-
return !isFunction(val);
|
|
531
|
+
_function$1.isFunction = isFunction$2;
|
|
532
|
+
function isntFunction$1(val) {
|
|
533
|
+
return !isFunction$2(val);
|
|
479
534
|
}
|
|
480
|
-
_function.isntFunction = isntFunction;
|
|
535
|
+
_function$1.isntFunction = isntFunction$1;
|
|
481
536
|
|
|
482
|
-
var iterable = {};
|
|
537
|
+
var iterable$1 = {};
|
|
483
538
|
|
|
484
|
-
iterable.isntIterable = iterable.isIterable = void 0;
|
|
485
|
-
const null_1 = _null;
|
|
486
|
-
const undefined_1$
|
|
487
|
-
function isIterable(val) {
|
|
488
|
-
return (0, null_1.isntNull)(val)
|
|
489
|
-
&& (0, undefined_1$
|
|
539
|
+
iterable$1.isntIterable = iterable$1.isIterable = void 0;
|
|
540
|
+
const null_1$2 = _null$1;
|
|
541
|
+
const undefined_1$4 = _undefined$1;
|
|
542
|
+
function isIterable$1(val) {
|
|
543
|
+
return (0, null_1$2.isntNull)(val)
|
|
544
|
+
&& (0, undefined_1$4.isntUndefined)(val)
|
|
490
545
|
&& typeof val[Symbol.iterator] === 'function';
|
|
491
546
|
}
|
|
492
|
-
iterable.isIterable = isIterable;
|
|
493
|
-
function isntIterable(val) {
|
|
494
|
-
return !isIterable(val);
|
|
547
|
+
iterable$1.isIterable = isIterable$1;
|
|
548
|
+
function isntIterable$1(val) {
|
|
549
|
+
return !isIterable$1(val);
|
|
495
550
|
}
|
|
496
|
-
iterable.isntIterable = isntIterable;
|
|
551
|
+
iterable$1.isntIterable = isntIterable$1;
|
|
497
552
|
|
|
498
|
-
var jsonRpc = {};
|
|
553
|
+
var jsonRpc$1 = {};
|
|
499
554
|
|
|
500
|
-
var object = {};
|
|
555
|
+
var object$1 = {};
|
|
501
556
|
|
|
502
|
-
object.isntEmptyObject = object.isEmptyObject = object.isRecord = object.isntObject = object.isObject = void 0;
|
|
503
|
-
function isObject(val) {
|
|
557
|
+
object$1.isntEmptyObject = object$1.isEmptyObject = object$1.isRecord = object$1.isntObject = object$1.isObject = void 0;
|
|
558
|
+
function isObject$1(val) {
|
|
504
559
|
return val !== null && typeof val === 'object';
|
|
505
560
|
}
|
|
506
|
-
object.isObject = isObject;
|
|
507
|
-
function isntObject(val) {
|
|
508
|
-
return !isObject(val);
|
|
561
|
+
object$1.isObject = isObject$1;
|
|
562
|
+
function isntObject$1(val) {
|
|
563
|
+
return !isObject$1(val);
|
|
509
564
|
}
|
|
510
|
-
object.isntObject = isntObject;
|
|
565
|
+
object$1.isntObject = isntObject$1;
|
|
511
566
|
function isRecord(val) {
|
|
512
|
-
return isObject(val);
|
|
567
|
+
return isObject$1(val);
|
|
513
568
|
}
|
|
514
|
-
object.isRecord = isRecord;
|
|
515
|
-
function isEmptyObject(val) {
|
|
569
|
+
object$1.isRecord = isRecord;
|
|
570
|
+
function isEmptyObject$1(val) {
|
|
516
571
|
return Object.keys(val).length === 0;
|
|
517
572
|
}
|
|
518
|
-
object.isEmptyObject = isEmptyObject;
|
|
519
|
-
function isntEmptyObject(val) {
|
|
573
|
+
object$1.isEmptyObject = isEmptyObject$1;
|
|
574
|
+
function isntEmptyObject$1(val) {
|
|
520
575
|
return Object.keys(val).length !== 0;
|
|
521
576
|
}
|
|
522
|
-
object.isntEmptyObject = isntEmptyObject;
|
|
577
|
+
object$1.isntEmptyObject = isntEmptyObject$1;
|
|
523
578
|
|
|
524
|
-
var number = {};
|
|
579
|
+
var number$1 = {};
|
|
525
580
|
|
|
526
|
-
number.isntNumber = number.isNumber = void 0;
|
|
527
|
-
function isNumber(val) {
|
|
581
|
+
number$1.isntNumber = number$1.isNumber = void 0;
|
|
582
|
+
function isNumber$1(val) {
|
|
528
583
|
return typeof val === 'number';
|
|
529
584
|
}
|
|
530
|
-
number.isNumber = isNumber;
|
|
531
|
-
function isntNumber(val) {
|
|
532
|
-
return !isNumber(val);
|
|
533
|
-
}
|
|
534
|
-
number.isntNumber = isntNumber;
|
|
535
|
-
|
|
536
|
-
jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
|
|
537
|
-
const array_1 = array;
|
|
538
|
-
const object_1 = object;
|
|
539
|
-
const string_1 = string;
|
|
540
|
-
const number_1 = number;
|
|
541
|
-
const undefined_1 = _undefined;
|
|
542
|
-
function isJsonRpcId(val) {
|
|
543
|
-
return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
|
|
544
|
-
}
|
|
545
|
-
function isJsonRpcParams(val) {
|
|
546
|
-
return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
|
|
547
|
-
}
|
|
548
|
-
function isJsonRpcNotification(val) {
|
|
549
|
-
return (0, object_1.isRecord)(val)
|
|
550
|
-
&& (0, string_1.isString)(val.jsonrpc)
|
|
551
|
-
&& (0, string_1.isString)(val.method)
|
|
552
|
-
&& (0, undefined_1.isUndefined)(val.id)
|
|
553
|
-
&& isJsonRpcParams(val.params);
|
|
554
|
-
}
|
|
555
|
-
jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
|
|
556
|
-
function isntJsonRpcNotification(val) {
|
|
557
|
-
return !isJsonRpcNotification(val);
|
|
558
|
-
}
|
|
559
|
-
jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
|
|
560
|
-
function isJsonRpcRequest(val) {
|
|
561
|
-
return (0, object_1.isRecord)(val)
|
|
562
|
-
&& (0, string_1.isString)(val.jsonrpc)
|
|
563
|
-
&& (0, string_1.isString)(val.method)
|
|
564
|
-
&& isJsonRpcId(val.id)
|
|
565
|
-
&& isJsonRpcParams(val.params);
|
|
566
|
-
}
|
|
567
|
-
jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
|
|
568
|
-
function isntJsonRpcRequest(val) {
|
|
569
|
-
return !isJsonRpcRequest(val);
|
|
570
|
-
}
|
|
571
|
-
jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
|
|
572
|
-
function isJsonRpcSuccess(val) {
|
|
573
|
-
return (0, object_1.isRecord)(val)
|
|
574
|
-
&& (0, string_1.isString)(val.jsonrpc)
|
|
575
|
-
&& (0, string_1.isString)(val.id)
|
|
576
|
-
&& (0, undefined_1.isntUndefined)(val.result);
|
|
577
|
-
}
|
|
578
|
-
jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
|
|
579
|
-
function isntJsonRpcSuccess(val) {
|
|
580
|
-
return !isJsonRpcSuccess(val);
|
|
581
|
-
}
|
|
582
|
-
jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
|
|
583
|
-
function isJsonRpcError(val) {
|
|
584
|
-
return (0, object_1.isRecord)(val)
|
|
585
|
-
&& (0, string_1.isString)(val.jsonrpc)
|
|
586
|
-
&& isJsonRpcId(val.id)
|
|
587
|
-
&& isJsonRpcErrorObject(val.error);
|
|
588
|
-
}
|
|
589
|
-
jsonRpc.isJsonRpcError = isJsonRpcError;
|
|
590
|
-
function isntJsonRpcError(val) {
|
|
591
|
-
return !isJsonRpcError(val);
|
|
592
|
-
}
|
|
593
|
-
jsonRpc.isntJsonRpcError = isntJsonRpcError;
|
|
594
|
-
function isJsonRpcErrorObject(val) {
|
|
595
|
-
return (0, object_1.isRecord)(val)
|
|
596
|
-
&& (0, number_1.isNumber)(val.code)
|
|
597
|
-
&& (0, string_1.isString)(val.message)
|
|
598
|
-
&& ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
var json = {};
|
|
602
|
-
|
|
603
|
-
json.isntJson = json.isJson = void 0;
|
|
604
|
-
function isJson(val) {
|
|
585
|
+
number$1.isNumber = isNumber$1;
|
|
586
|
+
function isntNumber$1(val) {
|
|
587
|
+
return !isNumber$1(val);
|
|
588
|
+
}
|
|
589
|
+
number$1.isntNumber = isntNumber$1;
|
|
590
|
+
|
|
591
|
+
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;
|
|
592
|
+
const array_1$1 = array$1;
|
|
593
|
+
const object_1$1 = object$1;
|
|
594
|
+
const string_1$2 = string$1;
|
|
595
|
+
const number_1$1 = number$1;
|
|
596
|
+
const undefined_1$3 = _undefined$1;
|
|
597
|
+
function isJsonRpcId$1(val) {
|
|
598
|
+
return (0, string_1$2.isString)(val) || (0, number_1$1.isNumber)(val);
|
|
599
|
+
}
|
|
600
|
+
function isJsonRpcParams$1(val) {
|
|
601
|
+
return (0, array_1$1.isArray)(val) || (0, object_1$1.isObject)(val);
|
|
602
|
+
}
|
|
603
|
+
function isJsonRpcNotification$1(val) {
|
|
604
|
+
return (0, object_1$1.isRecord)(val)
|
|
605
|
+
&& (0, string_1$2.isString)(val.jsonrpc)
|
|
606
|
+
&& (0, string_1$2.isString)(val.method)
|
|
607
|
+
&& (0, undefined_1$3.isUndefined)(val.id)
|
|
608
|
+
&& isJsonRpcParams$1(val.params);
|
|
609
|
+
}
|
|
610
|
+
jsonRpc$1.isJsonRpcNotification = isJsonRpcNotification$1;
|
|
611
|
+
function isntJsonRpcNotification$1(val) {
|
|
612
|
+
return !isJsonRpcNotification$1(val);
|
|
613
|
+
}
|
|
614
|
+
jsonRpc$1.isntJsonRpcNotification = isntJsonRpcNotification$1;
|
|
615
|
+
function isJsonRpcRequest$1(val) {
|
|
616
|
+
return (0, object_1$1.isRecord)(val)
|
|
617
|
+
&& (0, string_1$2.isString)(val.jsonrpc)
|
|
618
|
+
&& (0, string_1$2.isString)(val.method)
|
|
619
|
+
&& isJsonRpcId$1(val.id)
|
|
620
|
+
&& isJsonRpcParams$1(val.params);
|
|
621
|
+
}
|
|
622
|
+
jsonRpc$1.isJsonRpcRequest = isJsonRpcRequest$1;
|
|
623
|
+
function isntJsonRpcRequest$1(val) {
|
|
624
|
+
return !isJsonRpcRequest$1(val);
|
|
625
|
+
}
|
|
626
|
+
jsonRpc$1.isntJsonRpcRequest = isntJsonRpcRequest$1;
|
|
627
|
+
function isJsonRpcSuccess$1(val) {
|
|
628
|
+
return (0, object_1$1.isRecord)(val)
|
|
629
|
+
&& (0, string_1$2.isString)(val.jsonrpc)
|
|
630
|
+
&& (0, string_1$2.isString)(val.id)
|
|
631
|
+
&& (0, undefined_1$3.isntUndefined)(val.result);
|
|
632
|
+
}
|
|
633
|
+
jsonRpc$1.isJsonRpcSuccess = isJsonRpcSuccess$1;
|
|
634
|
+
function isntJsonRpcSuccess$1(val) {
|
|
635
|
+
return !isJsonRpcSuccess$1(val);
|
|
636
|
+
}
|
|
637
|
+
jsonRpc$1.isntJsonRpcSuccess = isntJsonRpcSuccess$1;
|
|
638
|
+
function isJsonRpcError$1(val) {
|
|
639
|
+
return (0, object_1$1.isRecord)(val)
|
|
640
|
+
&& (0, string_1$2.isString)(val.jsonrpc)
|
|
641
|
+
&& isJsonRpcId$1(val.id)
|
|
642
|
+
&& isJsonRpcErrorObject$1(val.error);
|
|
643
|
+
}
|
|
644
|
+
jsonRpc$1.isJsonRpcError = isJsonRpcError$1;
|
|
645
|
+
function isntJsonRpcError$1(val) {
|
|
646
|
+
return !isJsonRpcError$1(val);
|
|
647
|
+
}
|
|
648
|
+
jsonRpc$1.isntJsonRpcError = isntJsonRpcError$1;
|
|
649
|
+
function isJsonRpcErrorObject$1(val) {
|
|
650
|
+
return (0, object_1$1.isRecord)(val)
|
|
651
|
+
&& (0, number_1$1.isNumber)(val.code)
|
|
652
|
+
&& (0, string_1$2.isString)(val.message)
|
|
653
|
+
&& ((0, undefined_1$3.isUndefined)(val.data) || (0, object_1$1.isObject)(val.data));
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
var json$1 = {};
|
|
657
|
+
|
|
658
|
+
json$1.isntJson = json$1.isJson = void 0;
|
|
659
|
+
function isJson$1(val) {
|
|
605
660
|
try {
|
|
606
661
|
JSON.stringify(val);
|
|
607
662
|
return true;
|
|
@@ -610,16 +665,16 @@ function isJson(val) {
|
|
|
610
665
|
return false;
|
|
611
666
|
}
|
|
612
667
|
}
|
|
613
|
-
json.isJson = isJson;
|
|
614
|
-
function isntJson(val) {
|
|
615
|
-
return !isntJson();
|
|
668
|
+
json$1.isJson = isJson$1;
|
|
669
|
+
function isntJson$1(val) {
|
|
670
|
+
return !isntJson$1();
|
|
616
671
|
}
|
|
617
|
-
json.isntJson = isntJson;
|
|
672
|
+
json$1.isntJson = isntJson$1;
|
|
618
673
|
|
|
619
|
-
var url = {};
|
|
674
|
+
var url$1 = {};
|
|
620
675
|
|
|
621
|
-
url.isAbsoluteURL = void 0;
|
|
622
|
-
function isAbsoluteURL(str) {
|
|
676
|
+
url$1.isAbsoluteURL = void 0;
|
|
677
|
+
function isAbsoluteURL$1(str) {
|
|
623
678
|
try {
|
|
624
679
|
new URL(str);
|
|
625
680
|
return true;
|
|
@@ -628,7 +683,7 @@ function isAbsoluteURL(str) {
|
|
|
628
683
|
return false;
|
|
629
684
|
}
|
|
630
685
|
}
|
|
631
|
-
url.isAbsoluteURL = isAbsoluteURL;
|
|
686
|
+
url$1.isAbsoluteURL = isAbsoluteURL$1;
|
|
632
687
|
|
|
633
688
|
(function (exports) {
|
|
634
689
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -640,30 +695,30 @@ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Obj
|
|
|
640
695
|
}));
|
|
641
696
|
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
642
697
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
643
|
-
};__exportStar(array, exports);
|
|
644
|
-
__exportStar(asyncIterable, exports);
|
|
645
|
-
__exportStar(bigint, exports);
|
|
646
|
-
__exportStar(boolean, exports);
|
|
647
|
-
__exportStar(char, exports);
|
|
648
|
-
__exportStar(date, exports);
|
|
649
|
-
__exportStar(_enum, exports);
|
|
650
|
-
__exportStar(error, exports);
|
|
651
|
-
__exportStar(falsy, exports);
|
|
652
|
-
__exportStar(_function, exports);
|
|
653
|
-
__exportStar(iterable, exports);
|
|
654
|
-
__exportStar(jsonRpc, exports);
|
|
655
|
-
__exportStar(json, exports);
|
|
656
|
-
__exportStar(_null, exports);
|
|
657
|
-
__exportStar(number, exports);
|
|
658
|
-
__exportStar(object, exports);
|
|
659
|
-
__exportStar(string, exports);
|
|
660
|
-
__exportStar(_undefined, exports);
|
|
661
|
-
__exportStar(url, exports);
|
|
698
|
+
};__exportStar(array$1, exports);
|
|
699
|
+
__exportStar(asyncIterable$1, exports);
|
|
700
|
+
__exportStar(bigint$1, exports);
|
|
701
|
+
__exportStar(boolean$1, exports);
|
|
702
|
+
__exportStar(char$1, exports);
|
|
703
|
+
__exportStar(date$1, exports);
|
|
704
|
+
__exportStar(_enum$1, exports);
|
|
705
|
+
__exportStar(error$1, exports);
|
|
706
|
+
__exportStar(falsy$1, exports);
|
|
707
|
+
__exportStar(_function$1, exports);
|
|
708
|
+
__exportStar(iterable$1, exports);
|
|
709
|
+
__exportStar(jsonRpc$1, exports);
|
|
710
|
+
__exportStar(json$1, exports);
|
|
711
|
+
__exportStar(_null$1, exports);
|
|
712
|
+
__exportStar(number$1, exports);
|
|
713
|
+
__exportStar(object$1, exports);
|
|
714
|
+
__exportStar(string$1, exports);
|
|
715
|
+
__exportStar(_undefined$1, exports);
|
|
716
|
+
__exportStar(url$1, exports);
|
|
662
717
|
|
|
663
|
-
}(es2018$
|
|
718
|
+
}(es2018$3));
|
|
664
719
|
|
|
665
720
|
chunkByAsync$1.chunkByAsync = void 0;
|
|
666
|
-
const types_1$h = es2018$
|
|
721
|
+
const types_1$h = es2018$3;
|
|
667
722
|
function chunkByAsync(iterable, predicate) {
|
|
668
723
|
if ((0, types_1$h.isAsyncIterable)(iterable)) {
|
|
669
724
|
return chunkByAsyncIterable(iterable);
|
|
@@ -724,8 +779,8 @@ chunkBy$1.chunkBy = chunkBy;
|
|
|
724
779
|
var chunk$1 = {};
|
|
725
780
|
|
|
726
781
|
chunk$1.chunk = void 0;
|
|
727
|
-
const go_1$e = es2018$
|
|
728
|
-
const errors_1$e = es2018$
|
|
782
|
+
const go_1$e = es2018$4;
|
|
783
|
+
const errors_1$e = es2018$6;
|
|
729
784
|
function chunk(iterable, size) {
|
|
730
785
|
(0, errors_1$e.assert)(Number.isInteger(size), 'The parameter size must be an integer');
|
|
731
786
|
(0, errors_1$e.assert)(size > 0, 'The parameter size must be greater than 0');
|
|
@@ -747,8 +802,8 @@ chunk$1.chunk = chunk;
|
|
|
747
802
|
var concatAsync$1 = {};
|
|
748
803
|
|
|
749
804
|
concatAsync$1.concatAsync = void 0;
|
|
750
|
-
const types_1$g = es2018$
|
|
751
|
-
const go_1$d = es2018$
|
|
805
|
+
const types_1$g = es2018$3;
|
|
806
|
+
const go_1$d = es2018$4;
|
|
752
807
|
function concatAsync(iterable, ...otherIterables) {
|
|
753
808
|
return (0, go_1$d.go)(async function* () {
|
|
754
809
|
for (const iter of [iterable, ...otherIterables]) {
|
|
@@ -770,7 +825,7 @@ concatAsync$1.concatAsync = concatAsync;
|
|
|
770
825
|
var concat$1 = {};
|
|
771
826
|
|
|
772
827
|
concat$1.concat = void 0;
|
|
773
|
-
const go_1$c = es2018$
|
|
828
|
+
const go_1$c = es2018$4;
|
|
774
829
|
function concat(iterable, ...otherIterables) {
|
|
775
830
|
return (0, go_1$c.go)(function* () {
|
|
776
831
|
for (const iter of [iterable, ...otherIterables]) {
|
|
@@ -799,9 +854,9 @@ function* copyIterable(iterable) {
|
|
|
799
854
|
utils.copyIterable = copyIterable;
|
|
800
855
|
|
|
801
856
|
dropAsync$1.dropAsync = void 0;
|
|
802
|
-
const go_1$b = es2018$
|
|
857
|
+
const go_1$b = es2018$4;
|
|
803
858
|
const utils_1$3 = utils;
|
|
804
|
-
const errors_1$d = es2018$
|
|
859
|
+
const errors_1$d = es2018$6;
|
|
805
860
|
function dropAsync(iterable, count) {
|
|
806
861
|
(0, errors_1$d.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
807
862
|
(0, errors_1$d.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -834,9 +889,9 @@ dropAsync$1.dropAsync = dropAsync;
|
|
|
834
889
|
var dropRightAsync$1 = {};
|
|
835
890
|
|
|
836
891
|
dropRightAsync$1.dropRightAsync = void 0;
|
|
837
|
-
const go_1$a = es2018$
|
|
892
|
+
const go_1$a = es2018$4;
|
|
838
893
|
const utils_1$2 = utils;
|
|
839
|
-
const errors_1$c = es2018$
|
|
894
|
+
const errors_1$c = es2018$6;
|
|
840
895
|
function dropRightAsync(iterable, count) {
|
|
841
896
|
(0, errors_1$c.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
842
897
|
(0, errors_1$c.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -862,9 +917,9 @@ async function toArrayAsync$2(iterable) {
|
|
|
862
917
|
var dropRight$1 = {};
|
|
863
918
|
|
|
864
919
|
dropRight$1.dropRight = void 0;
|
|
865
|
-
const go_1$9 = es2018$
|
|
920
|
+
const go_1$9 = es2018$4;
|
|
866
921
|
const utils_1$1 = utils;
|
|
867
|
-
const errors_1$b = es2018$
|
|
922
|
+
const errors_1$b = es2018$6;
|
|
868
923
|
function dropRight(iterable, count) {
|
|
869
924
|
(0, errors_1$b.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
870
925
|
(0, errors_1$b.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -880,7 +935,7 @@ dropRight$1.dropRight = dropRight;
|
|
|
880
935
|
var dropUntilAsync$1 = {};
|
|
881
936
|
|
|
882
937
|
dropUntilAsync$1.dropUntilAsync = void 0;
|
|
883
|
-
const types_1$f = es2018$
|
|
938
|
+
const types_1$f = es2018$3;
|
|
884
939
|
function dropUntilAsync(iterable, predicate) {
|
|
885
940
|
if ((0, types_1$f.isAsyncIterable)(iterable)) {
|
|
886
941
|
return dropUntilAsyncIterable(iterable);
|
|
@@ -962,9 +1017,9 @@ dropUntil$1.dropUntil = dropUntil;
|
|
|
962
1017
|
var drop$1 = {};
|
|
963
1018
|
|
|
964
1019
|
drop$1.drop = void 0;
|
|
965
|
-
const go_1$8 = es2018$
|
|
1020
|
+
const go_1$8 = es2018$4;
|
|
966
1021
|
const utils_1 = utils;
|
|
967
|
-
const errors_1$a = es2018$
|
|
1022
|
+
const errors_1$a = es2018$6;
|
|
968
1023
|
function drop(iterable, count) {
|
|
969
1024
|
(0, errors_1$a.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
970
1025
|
(0, errors_1$a.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -997,7 +1052,7 @@ drop$1.drop = drop;
|
|
|
997
1052
|
var filterAsync$1 = {};
|
|
998
1053
|
|
|
999
1054
|
filterAsync$1.filterAsync = void 0;
|
|
1000
|
-
const types_1$e = es2018$
|
|
1055
|
+
const types_1$e = es2018$3;
|
|
1001
1056
|
function filterAsync(iterable, predicate) {
|
|
1002
1057
|
if ((0, types_1$e.isAsyncIterable)(iterable)) {
|
|
1003
1058
|
return filterAsyncIterable(iterable);
|
|
@@ -1044,7 +1099,7 @@ var flattenDeepAsync$1 = {};
|
|
|
1044
1099
|
var flattenByAsync$1 = {};
|
|
1045
1100
|
|
|
1046
1101
|
flattenByAsync$1.flattenByAsync = void 0;
|
|
1047
|
-
const types_1$d = es2018$
|
|
1102
|
+
const types_1$d = es2018$3;
|
|
1048
1103
|
function flattenByAsync(iterable, predicate) {
|
|
1049
1104
|
if ((0, types_1$d.isAsyncIterable)(iterable)) {
|
|
1050
1105
|
return flattenByAsyncIterable(iterable);
|
|
@@ -1084,7 +1139,7 @@ function isFiniteIterable$1(val) {
|
|
|
1084
1139
|
|
|
1085
1140
|
flattenDeepAsync$1.flattenDeepAsync = void 0;
|
|
1086
1141
|
const flatten_by_async_1 = flattenByAsync$1;
|
|
1087
|
-
const errors_1$9 = es2018$
|
|
1142
|
+
const errors_1$9 = es2018$6;
|
|
1088
1143
|
function flattenDeepAsync(iterable, depth = Infinity) {
|
|
1089
1144
|
(0, errors_1$9.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
1090
1145
|
(0, errors_1$9.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
@@ -1102,7 +1157,7 @@ flattenAsync$1.flattenAsync = flattenAsync;
|
|
|
1102
1157
|
var flattenBy$1 = {};
|
|
1103
1158
|
|
|
1104
1159
|
flattenBy$1.flattenBy = void 0;
|
|
1105
|
-
const types_1$c = es2018$
|
|
1160
|
+
const types_1$c = es2018$3;
|
|
1106
1161
|
function flattenBy(iterable, predicate) {
|
|
1107
1162
|
return flatten(iterable, 1);
|
|
1108
1163
|
function* flatten(iterable, level) {
|
|
@@ -1125,7 +1180,7 @@ var flattenDeep$1 = {};
|
|
|
1125
1180
|
|
|
1126
1181
|
flattenDeep$1.flattenDeep = void 0;
|
|
1127
1182
|
const flatten_by_1 = flattenBy$1;
|
|
1128
|
-
const errors_1$8 = es2018$
|
|
1183
|
+
const errors_1$8 = es2018$6;
|
|
1129
1184
|
function flattenDeep(iterable, depth = Infinity) {
|
|
1130
1185
|
(0, errors_1$8.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
|
|
1131
1186
|
(0, errors_1$8.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
|
|
@@ -1145,7 +1200,7 @@ flatten$1.flatten = flatten;
|
|
|
1145
1200
|
var mapAsync$1 = {};
|
|
1146
1201
|
|
|
1147
1202
|
mapAsync$1.mapAsync = void 0;
|
|
1148
|
-
const types_1$b = es2018$
|
|
1203
|
+
const types_1$b = es2018$3;
|
|
1149
1204
|
function mapAsync(iterable, fn) {
|
|
1150
1205
|
if ((0, types_1$b.isAsyncIterable)(iterable)) {
|
|
1151
1206
|
return mapAsyncIterable(iterable);
|
|
@@ -1185,8 +1240,8 @@ map$1.map = map;
|
|
|
1185
1240
|
var repeatAsync$1 = {};
|
|
1186
1241
|
|
|
1187
1242
|
repeatAsync$1.repeatAsync = void 0;
|
|
1188
|
-
const go_1$7 = es2018$
|
|
1189
|
-
const errors_1$7 = es2018$
|
|
1243
|
+
const go_1$7 = es2018$4;
|
|
1244
|
+
const errors_1$7 = es2018$6;
|
|
1190
1245
|
function repeatAsync(iterable, times) {
|
|
1191
1246
|
(0, errors_1$7.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
1192
1247
|
(0, errors_1$7.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
@@ -1220,8 +1275,8 @@ function isProduction$1() {
|
|
|
1220
1275
|
var repeat$1 = {};
|
|
1221
1276
|
|
|
1222
1277
|
repeat$1.repeat = void 0;
|
|
1223
|
-
const go_1$6 = es2018$
|
|
1224
|
-
const errors_1$6 = es2018$
|
|
1278
|
+
const go_1$6 = es2018$4;
|
|
1279
|
+
const errors_1$6 = es2018$6;
|
|
1225
1280
|
function repeat(iterable, times) {
|
|
1226
1281
|
(0, errors_1$6.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
|
|
1227
1282
|
(0, errors_1$6.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
|
|
@@ -1255,8 +1310,8 @@ function isProduction() {
|
|
|
1255
1310
|
var sliceAsync$1 = {};
|
|
1256
1311
|
|
|
1257
1312
|
sliceAsync$1.sliceAsync = void 0;
|
|
1258
|
-
const go_1$5 = es2018$
|
|
1259
|
-
const errors_1$5 = es2018$
|
|
1313
|
+
const go_1$5 = es2018$4;
|
|
1314
|
+
const errors_1$5 = es2018$6;
|
|
1260
1315
|
function sliceAsync(iterable, start, end = Infinity) {
|
|
1261
1316
|
(0, errors_1$5.assert)(Number.isInteger(start), 'The parameter start must be an integer');
|
|
1262
1317
|
(0, errors_1$5.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
@@ -1278,8 +1333,8 @@ sliceAsync$1.sliceAsync = sliceAsync;
|
|
|
1278
1333
|
var slice$1 = {};
|
|
1279
1334
|
|
|
1280
1335
|
slice$1.slice = void 0;
|
|
1281
|
-
const go_1$4 = es2018$
|
|
1282
|
-
const errors_1$4 = es2018$
|
|
1336
|
+
const go_1$4 = es2018$4;
|
|
1337
|
+
const errors_1$4 = es2018$6;
|
|
1283
1338
|
function slice(iterable, start, end = Infinity) {
|
|
1284
1339
|
(0, errors_1$4.assert)(Number.isInteger(start), 'The parameter start must be an integer');
|
|
1285
1340
|
(0, errors_1$4.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
|
|
@@ -1319,7 +1374,7 @@ splitAsync$1.splitAsync = splitAsync;
|
|
|
1319
1374
|
var splitByAsync$1 = {};
|
|
1320
1375
|
|
|
1321
1376
|
splitByAsync$1.splitByAsync = void 0;
|
|
1322
|
-
const types_1$a = es2018$
|
|
1377
|
+
const types_1$a = es2018$3;
|
|
1323
1378
|
function splitByAsync(iterable, predicate) {
|
|
1324
1379
|
if ((0, types_1$a.isAsyncIterable)(iterable)) {
|
|
1325
1380
|
return splitByAsyncIterable(iterable);
|
|
@@ -1401,8 +1456,8 @@ split$1.split = split;
|
|
|
1401
1456
|
var takeAsync$1 = {};
|
|
1402
1457
|
|
|
1403
1458
|
takeAsync$1.takeAsync = void 0;
|
|
1404
|
-
const go_1$3 = es2018$
|
|
1405
|
-
const errors_1$3 = es2018$
|
|
1459
|
+
const go_1$3 = es2018$4;
|
|
1460
|
+
const errors_1$3 = es2018$6;
|
|
1406
1461
|
function takeAsync(iterable, count) {
|
|
1407
1462
|
(0, errors_1$3.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1408
1463
|
(0, errors_1$3.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -1422,8 +1477,8 @@ takeAsync$1.takeAsync = takeAsync;
|
|
|
1422
1477
|
var takeRightAsync$1 = {};
|
|
1423
1478
|
|
|
1424
1479
|
takeRightAsync$1.takeRightAsync = void 0;
|
|
1425
|
-
const go_1$2 = es2018$
|
|
1426
|
-
const errors_1$2 = es2018$
|
|
1480
|
+
const go_1$2 = es2018$4;
|
|
1481
|
+
const errors_1$2 = es2018$6;
|
|
1427
1482
|
function takeRightAsync(iterable, count) {
|
|
1428
1483
|
(0, errors_1$2.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1429
1484
|
(0, errors_1$2.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -1452,8 +1507,8 @@ takeRightAsync$1.takeRightAsync = takeRightAsync;
|
|
|
1452
1507
|
var takeRight$1 = {};
|
|
1453
1508
|
|
|
1454
1509
|
takeRight$1.takeRight = void 0;
|
|
1455
|
-
const go_1$1 = es2018$
|
|
1456
|
-
const errors_1$1 = es2018$
|
|
1510
|
+
const go_1$1 = es2018$4;
|
|
1511
|
+
const errors_1$1 = es2018$6;
|
|
1457
1512
|
function takeRight(iterable, count) {
|
|
1458
1513
|
(0, errors_1$1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1459
1514
|
(0, errors_1$1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -1482,7 +1537,7 @@ takeRight$1.takeRight = takeRight;
|
|
|
1482
1537
|
var takeUntilAsync$1 = {};
|
|
1483
1538
|
|
|
1484
1539
|
takeUntilAsync$1.takeUntilAsync = void 0;
|
|
1485
|
-
const types_1$9 = es2018$
|
|
1540
|
+
const types_1$9 = es2018$3;
|
|
1486
1541
|
function takeUntilAsync(iterable, predicate) {
|
|
1487
1542
|
if ((0, types_1$9.isAsyncIterable)(iterable)) {
|
|
1488
1543
|
return takeUntilAsyncIterable(iterable);
|
|
@@ -1528,8 +1583,8 @@ takeUntil$1.takeUntil = takeUntil;
|
|
|
1528
1583
|
var take$1 = {};
|
|
1529
1584
|
|
|
1530
1585
|
take$1.take = void 0;
|
|
1531
|
-
const go_1 = es2018$
|
|
1532
|
-
const errors_1 = es2018$
|
|
1586
|
+
const go_1 = es2018$4;
|
|
1587
|
+
const errors_1 = es2018$6;
|
|
1533
1588
|
function take(iterable, count) {
|
|
1534
1589
|
(0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
|
|
1535
1590
|
(0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
|
|
@@ -1549,7 +1604,7 @@ take$1.take = take;
|
|
|
1549
1604
|
var tapAsync$1 = {};
|
|
1550
1605
|
|
|
1551
1606
|
tapAsync$1.tapAsync = void 0;
|
|
1552
|
-
const types_1$8 = es2018$
|
|
1607
|
+
const types_1$8 = es2018$3;
|
|
1553
1608
|
function tapAsync(iterable, fn) {
|
|
1554
1609
|
if ((0, types_1$8.isAsyncIterable)(iterable)) {
|
|
1555
1610
|
return tapAsyncIterable(iterable);
|
|
@@ -1632,7 +1687,7 @@ uniqAsync$1.uniqAsync = uniqAsync;
|
|
|
1632
1687
|
var uniqByAsync$1 = {};
|
|
1633
1688
|
|
|
1634
1689
|
uniqByAsync$1.uniqByAsync = void 0;
|
|
1635
|
-
const types_1$7 = es2018$
|
|
1690
|
+
const types_1$7 = es2018$3;
|
|
1636
1691
|
function uniqByAsync(iterable, fn) {
|
|
1637
1692
|
if ((0, types_1$7.isAsyncIterable)(iterable)) {
|
|
1638
1693
|
return uniqByAsyncIterable(iterable);
|
|
@@ -1701,7 +1756,7 @@ uniq$1.uniq = uniq;
|
|
|
1701
1756
|
var zipAsync$1 = {};
|
|
1702
1757
|
|
|
1703
1758
|
zipAsync$1.zipAsync = void 0;
|
|
1704
|
-
const types_1$6 = es2018$
|
|
1759
|
+
const types_1$6 = es2018$3;
|
|
1705
1760
|
var Kind;
|
|
1706
1761
|
(function (Kind) {
|
|
1707
1762
|
Kind[Kind["Sync"] = 0] = "Sync";
|
|
@@ -1861,7 +1916,7 @@ consume$1.consume = consume;
|
|
|
1861
1916
|
var eachAsync$1 = {};
|
|
1862
1917
|
|
|
1863
1918
|
eachAsync$1.eachAsync = void 0;
|
|
1864
|
-
const types_1$5 = es2018$
|
|
1919
|
+
const types_1$5 = es2018$3;
|
|
1865
1920
|
function eachAsync(iterable, fn) {
|
|
1866
1921
|
if ((0, types_1$5.isAsyncIterable)(iterable)) {
|
|
1867
1922
|
return eachAsyncIterable(iterable);
|
|
@@ -1901,7 +1956,7 @@ each$1.each = each;
|
|
|
1901
1956
|
var everyAsync$1 = {};
|
|
1902
1957
|
|
|
1903
1958
|
everyAsync$1.everyAsync = void 0;
|
|
1904
|
-
const types_1$4 = es2018$
|
|
1959
|
+
const types_1$4 = es2018$3;
|
|
1905
1960
|
function everyAsync(iterable, predicate) {
|
|
1906
1961
|
if ((0, types_1$4.isAsyncIterable)(iterable)) {
|
|
1907
1962
|
return everyAsyncIterable(iterable);
|
|
@@ -1947,7 +2002,7 @@ every$1.every = every;
|
|
|
1947
2002
|
var findAsync$1 = {};
|
|
1948
2003
|
|
|
1949
2004
|
findAsync$1.findAsync = void 0;
|
|
1950
|
-
const types_1$3 = es2018$
|
|
2005
|
+
const types_1$3 = es2018$3;
|
|
1951
2006
|
function findAsync(iterable, predicate) {
|
|
1952
2007
|
if ((0, types_1$3.isAsyncIterable)(iterable)) {
|
|
1953
2008
|
return findAsyncIterable(iterable);
|
|
@@ -2071,7 +2126,7 @@ match$1.match = match;
|
|
|
2071
2126
|
var reduceAsync$1 = {};
|
|
2072
2127
|
|
|
2073
2128
|
reduceAsync$1.reduceAsync = void 0;
|
|
2074
|
-
const types_1$2 = es2018$
|
|
2129
|
+
const types_1$2 = es2018$3;
|
|
2075
2130
|
function reduceAsync(iterable, fn, initialValue) {
|
|
2076
2131
|
if ((0, types_1$2.isUndefined)(initialValue)) {
|
|
2077
2132
|
return reduceAsyncWithoutInitialValue(iterable, fn);
|
|
@@ -2167,7 +2222,7 @@ function reduceAsyncWithoutInitialValue(iterable, fn) {
|
|
|
2167
2222
|
var reduce$1 = {};
|
|
2168
2223
|
|
|
2169
2224
|
reduce$1.reduce = void 0;
|
|
2170
|
-
const types_1$1 = es2018$
|
|
2225
|
+
const types_1$1 = es2018$3;
|
|
2171
2226
|
function reduce(iterable, fn, initialValue) {
|
|
2172
2227
|
if ((0, types_1$1.isUndefined)(initialValue)) {
|
|
2173
2228
|
return reduceWithoutInitialValue(iterable, fn);
|
|
@@ -2214,7 +2269,7 @@ function reduceWithoutInitialValue(iterable, fn) {
|
|
|
2214
2269
|
var someAsync$1 = {};
|
|
2215
2270
|
|
|
2216
2271
|
someAsync$1.someAsync = void 0;
|
|
2217
|
-
const types_1 = es2018$
|
|
2272
|
+
const types_1 = es2018$3;
|
|
2218
2273
|
function someAsync(iterable, predicate) {
|
|
2219
2274
|
if ((0, types_1.isAsyncIterable)(iterable)) {
|
|
2220
2275
|
return someAsyncIterable(iterable);
|
|
@@ -2398,15 +2453,15 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
|
|
|
2398
2453
|
};__exportStar(middleware, exports);
|
|
2399
2454
|
__exportStar(output, exports);
|
|
2400
2455
|
|
|
2401
|
-
}(es2018$
|
|
2456
|
+
}(es2018$5));
|
|
2402
2457
|
|
|
2403
2458
|
var _LRUMap_limit, _LRUMap_map;
|
|
2404
2459
|
class LRUMap {
|
|
2405
2460
|
constructor(limit) {
|
|
2406
2461
|
_LRUMap_limit.set(this, void 0);
|
|
2407
2462
|
_LRUMap_map.set(this, new Map());
|
|
2408
|
-
es2018$
|
|
2409
|
-
es2018$
|
|
2463
|
+
es2018$6.assert(Number.isInteger(limit), 'The parameter limit must be an integer');
|
|
2464
|
+
es2018$6.assert(limit > 0, 'The parameter limit must be a positive value');
|
|
2410
2465
|
__classPrivateFieldSet(this, _LRUMap_limit, limit, "f");
|
|
2411
2466
|
}
|
|
2412
2467
|
get [(_LRUMap_limit = new WeakMap(), _LRUMap_map = new WeakMap(), Symbol.toStringTag)]() {
|
|
@@ -2454,15 +2509,15 @@ class LRUMap {
|
|
|
2454
2509
|
* Return the earliest key inserted in the Map
|
|
2455
2510
|
*/
|
|
2456
2511
|
getColdestKey() {
|
|
2457
|
-
return es2018$
|
|
2512
|
+
return es2018$5.first(__classPrivateFieldGet(this, _LRUMap_map, "f").keys());
|
|
2458
2513
|
}
|
|
2459
2514
|
}
|
|
2460
2515
|
|
|
2461
|
-
var es2018$
|
|
2516
|
+
var es2018$2 = {};
|
|
2462
2517
|
|
|
2463
2518
|
var exponentialBackoff = {};
|
|
2464
2519
|
|
|
2465
|
-
var es2018 = {};
|
|
2520
|
+
var es2018$1 = {};
|
|
2466
2521
|
|
|
2467
2522
|
var random$1 = {};
|
|
2468
2523
|
|
|
@@ -2506,10 +2561,10 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
|
|
|
2506
2561
|
__exportStar(randomInt$1, exports);
|
|
2507
2562
|
__exportStar(randomIntInclusive$1, exports);
|
|
2508
2563
|
|
|
2509
|
-
}(es2018));
|
|
2564
|
+
}(es2018$1));
|
|
2510
2565
|
|
|
2511
2566
|
exponentialBackoff.calculateExponentialBackoffTimeout = void 0;
|
|
2512
|
-
const extra_rand_1 = es2018;
|
|
2567
|
+
const extra_rand_1 = es2018$1;
|
|
2513
2568
|
function calculateExponentialBackoffTimeout({ baseTimeout, retries, maxTimeout = Infinity, factor = 2, jitter = true }) {
|
|
2514
2569
|
const timeout = Math.min(factor ** retries * baseTimeout, maxTimeout);
|
|
2515
2570
|
if (jitter) {
|
|
@@ -2521,19 +2576,19 @@ function calculateExponentialBackoffTimeout({ baseTimeout, retries, maxTimeout =
|
|
|
2521
2576
|
}
|
|
2522
2577
|
exponentialBackoff.calculateExponentialBackoffTimeout = calculateExponentialBackoffTimeout;
|
|
2523
2578
|
|
|
2524
|
-
var setTimeout$
|
|
2579
|
+
var setTimeout$2 = {};
|
|
2525
2580
|
|
|
2526
|
-
setTimeout$
|
|
2527
|
-
function setTimeout(timeout, cb) {
|
|
2581
|
+
setTimeout$2.setTimeout = void 0;
|
|
2582
|
+
function setTimeout$1(timeout, cb) {
|
|
2528
2583
|
const timer = globalThis.setTimeout(cb, timeout);
|
|
2529
2584
|
return () => clearTimeout(timer);
|
|
2530
2585
|
}
|
|
2531
|
-
setTimeout$
|
|
2586
|
+
setTimeout$2.setTimeout = setTimeout$1;
|
|
2532
2587
|
|
|
2533
2588
|
var setSchedule$1 = {};
|
|
2534
2589
|
|
|
2535
2590
|
setSchedule$1.setSchedule = void 0;
|
|
2536
|
-
const set_timeout_1$3 = setTimeout$
|
|
2591
|
+
const set_timeout_1$3 = setTimeout$2;
|
|
2537
2592
|
function setSchedule(timestamp, cb) {
|
|
2538
2593
|
const timeout = timestamp - Date.now();
|
|
2539
2594
|
return (0, set_timeout_1$3.setTimeout)(timeout, cb);
|
|
@@ -2552,7 +2607,7 @@ setInterval$1.setInterval = setInterval;
|
|
|
2552
2607
|
var setImmediate$1 = {};
|
|
2553
2608
|
|
|
2554
2609
|
setImmediate$1.setImmediate = void 0;
|
|
2555
|
-
const set_timeout_1$2 = setTimeout$
|
|
2610
|
+
const set_timeout_1$2 = setTimeout$2;
|
|
2556
2611
|
function setImmediate(cb) {
|
|
2557
2612
|
if (globalThis.setImmediate) {
|
|
2558
2613
|
const timer = globalThis.setImmediate(cb);
|
|
@@ -2567,7 +2622,7 @@ setImmediate$1.setImmediate = setImmediate;
|
|
|
2567
2622
|
var setTimeoutLoop$1 = {};
|
|
2568
2623
|
|
|
2569
2624
|
setTimeoutLoop$1.setTimeoutLoop = void 0;
|
|
2570
|
-
const set_timeout_1$1 = setTimeout$
|
|
2625
|
+
const set_timeout_1$1 = setTimeout$2;
|
|
2571
2626
|
function setTimeoutLoop(timeout, cb) {
|
|
2572
2627
|
let isCancelled = false;
|
|
2573
2628
|
let cancel = (0, set_timeout_1$1.setTimeout)(timeout, loop);
|
|
@@ -2587,7 +2642,7 @@ setTimeoutLoop$1.setTimeoutLoop = setTimeoutLoop;
|
|
|
2587
2642
|
var setDynamicTimeoutLoop$1 = {};
|
|
2588
2643
|
|
|
2589
2644
|
setDynamicTimeoutLoop$1.setDynamicTimeoutLoop = void 0;
|
|
2590
|
-
const set_timeout_1 = setTimeout$
|
|
2645
|
+
const set_timeout_1 = setTimeout$2;
|
|
2591
2646
|
function setDynamicTimeoutLoop(timeout, cb) {
|
|
2592
2647
|
let isCancelled = false;
|
|
2593
2648
|
let cancel = (0, set_timeout_1.setTimeout)(timeout, loop);
|
|
@@ -2617,14 +2672,14 @@ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Obj
|
|
|
2617
2672
|
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
2618
2673
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2619
2674
|
};__exportStar(exponentialBackoff, exports);
|
|
2620
|
-
__exportStar(setTimeout$
|
|
2675
|
+
__exportStar(setTimeout$2, exports);
|
|
2621
2676
|
__exportStar(setSchedule$1, exports);
|
|
2622
2677
|
__exportStar(setInterval$1, exports);
|
|
2623
2678
|
__exportStar(setImmediate$1, exports);
|
|
2624
2679
|
__exportStar(setTimeoutLoop$1, exports);
|
|
2625
2680
|
__exportStar(setDynamicTimeoutLoop$1, exports);
|
|
2626
2681
|
|
|
2627
|
-
}(es2018$
|
|
2682
|
+
}(es2018$2));
|
|
2628
2683
|
|
|
2629
2684
|
var _ExpirableMap_map, _ExpirableMap_cancelClearTimeout;
|
|
2630
2685
|
class ExpirableMap {
|
|
@@ -2714,7 +2769,7 @@ class ExpirableMap {
|
|
|
2714
2769
|
if (this.itemMetadataSortedByExpirationTime.length > 0) {
|
|
2715
2770
|
const item = this.itemMetadataSortedByExpirationTime[0];
|
|
2716
2771
|
if (Number.isFinite(item.expirationTime)) {
|
|
2717
|
-
const cancel = es2018$
|
|
2772
|
+
const cancel = es2018$2.setSchedule(item.expirationTime, () => {
|
|
2718
2773
|
this.clearExpiredItems(Date.now());
|
|
2719
2774
|
this.rescheduleClearTimeout();
|
|
2720
2775
|
});
|
|
@@ -2740,8 +2795,8 @@ class TLRUMap {
|
|
|
2740
2795
|
* 按过期时间升序排列所有项目的元数据
|
|
2741
2796
|
*/
|
|
2742
2797
|
this.itemMetadataSortedByExpirationTime = [];
|
|
2743
|
-
es2018$
|
|
2744
|
-
es2018$
|
|
2798
|
+
es2018$6.assert(Number.isInteger(limit), 'The parameter limit must be an integer');
|
|
2799
|
+
es2018$6.assert(limit > 0, 'The parameter limit must be a positive value');
|
|
2745
2800
|
__classPrivateFieldSet(this, _TLRUMap_limit, limit, "f");
|
|
2746
2801
|
}
|
|
2747
2802
|
get [(_TLRUMap_limit = new WeakMap(), _TLRUMap_map = new WeakMap(), _TLRUMap_cancelClearTimeout = new WeakMap(), Symbol.toStringTag)]() {
|
|
@@ -2845,7 +2900,7 @@ class TLRUMap {
|
|
|
2845
2900
|
if (this.itemMetadataSortedByExpirationTime.length > 0) {
|
|
2846
2901
|
const item = this.itemMetadataSortedByExpirationTime[0];
|
|
2847
2902
|
if (Number.isFinite(item.expirationTime)) {
|
|
2848
|
-
const cancel = es2018$
|
|
2903
|
+
const cancel = es2018$2.setSchedule(item.expirationTime, () => {
|
|
2849
2904
|
this.clearExpiredItems(Date.now());
|
|
2850
2905
|
this.rescheduleClearTimeout();
|
|
2851
2906
|
});
|
|
@@ -2860,7 +2915,7 @@ class TLRUMap {
|
|
|
2860
2915
|
* Return the earliest key inserted in the Map
|
|
2861
2916
|
*/
|
|
2862
2917
|
getColdestKey() {
|
|
2863
|
-
return es2018$
|
|
2918
|
+
return es2018$5.first(__classPrivateFieldGet(this, _TLRUMap_map, "f").keys());
|
|
2864
2919
|
}
|
|
2865
2920
|
}
|
|
2866
2921
|
|
|
@@ -2928,7 +2983,7 @@ class TrieMap {
|
|
|
2928
2983
|
delete node.value;
|
|
2929
2984
|
// 如果节点没有后缀, 则代表这是末端节点, 往前删除其前缀
|
|
2930
2985
|
if (node.children.size === 0) {
|
|
2931
|
-
for (const [part, parentNode] of es2018$
|
|
2986
|
+
for (const [part, parentNode] of es2018$5.toArray(es2018$5.zip(key, parentNodes)).reverse()) {
|
|
2932
2987
|
parentNode.children.delete(part);
|
|
2933
2988
|
if (parentNode.children.size !== 0)
|
|
2934
2989
|
break;
|
|
@@ -2938,5 +2993,1172 @@ class TrieMap {
|
|
|
2938
2993
|
}
|
|
2939
2994
|
}
|
|
2940
2995
|
|
|
2941
|
-
|
|
2996
|
+
var _FiniteStateMachine_state;
|
|
2997
|
+
class FiniteStateMachine {
|
|
2998
|
+
constructor(schema, initialState) {
|
|
2999
|
+
this.schema = schema;
|
|
3000
|
+
_FiniteStateMachine_state.set(this, void 0);
|
|
3001
|
+
__classPrivateFieldSet(this, _FiniteStateMachine_state, initialState, "f");
|
|
3002
|
+
}
|
|
3003
|
+
get state() {
|
|
3004
|
+
return __classPrivateFieldGet(this, _FiniteStateMachine_state, "f");
|
|
3005
|
+
}
|
|
3006
|
+
matches(state) {
|
|
3007
|
+
return __classPrivateFieldGet(this, _FiniteStateMachine_state, "f") === state;
|
|
3008
|
+
}
|
|
3009
|
+
/**
|
|
3010
|
+
* @throws {BadEventError}
|
|
3011
|
+
*/
|
|
3012
|
+
send(event) {
|
|
3013
|
+
if (event in this.schema[this.state]) {
|
|
3014
|
+
__classPrivateFieldSet(this, _FiniteStateMachine_state, this.schema[this.state][event], "f");
|
|
3015
|
+
}
|
|
3016
|
+
else {
|
|
3017
|
+
throw new BadEventError(this.state, event);
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
_FiniteStateMachine_state = new WeakMap();
|
|
3022
|
+
class BadEventError extends es2018$6.CustomError {
|
|
3023
|
+
constructor(state, event) {
|
|
3024
|
+
super(`State ${state} cannot react to event ${event}`);
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
|
|
3028
|
+
function isFunction$1(value) {
|
|
3029
|
+
return typeof value === 'function';
|
|
3030
|
+
}
|
|
3031
|
+
|
|
3032
|
+
function createErrorClass(createImpl) {
|
|
3033
|
+
var _super = function (instance) {
|
|
3034
|
+
Error.call(instance);
|
|
3035
|
+
instance.stack = new Error().stack;
|
|
3036
|
+
};
|
|
3037
|
+
var ctorFunc = createImpl(_super);
|
|
3038
|
+
ctorFunc.prototype = Object.create(Error.prototype);
|
|
3039
|
+
ctorFunc.prototype.constructor = ctorFunc;
|
|
3040
|
+
return ctorFunc;
|
|
3041
|
+
}
|
|
3042
|
+
|
|
3043
|
+
var UnsubscriptionError = createErrorClass(function (_super) {
|
|
3044
|
+
return function UnsubscriptionErrorImpl(errors) {
|
|
3045
|
+
_super(this);
|
|
3046
|
+
this.message = errors
|
|
3047
|
+
? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ')
|
|
3048
|
+
: '';
|
|
3049
|
+
this.name = 'UnsubscriptionError';
|
|
3050
|
+
this.errors = errors;
|
|
3051
|
+
};
|
|
3052
|
+
});
|
|
3053
|
+
|
|
3054
|
+
function arrRemove(arr, item) {
|
|
3055
|
+
if (arr) {
|
|
3056
|
+
var index = arr.indexOf(item);
|
|
3057
|
+
0 <= index && arr.splice(index, 1);
|
|
3058
|
+
}
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
var Subscription = (function () {
|
|
3062
|
+
function Subscription(initialTeardown) {
|
|
3063
|
+
this.initialTeardown = initialTeardown;
|
|
3064
|
+
this.closed = false;
|
|
3065
|
+
this._parentage = null;
|
|
3066
|
+
this._teardowns = null;
|
|
3067
|
+
}
|
|
3068
|
+
Subscription.prototype.unsubscribe = function () {
|
|
3069
|
+
var e_1, _a, e_2, _b;
|
|
3070
|
+
var errors;
|
|
3071
|
+
if (!this.closed) {
|
|
3072
|
+
this.closed = true;
|
|
3073
|
+
var _parentage = this._parentage;
|
|
3074
|
+
if (_parentage) {
|
|
3075
|
+
this._parentage = null;
|
|
3076
|
+
if (Array.isArray(_parentage)) {
|
|
3077
|
+
try {
|
|
3078
|
+
for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
|
|
3079
|
+
var parent_1 = _parentage_1_1.value;
|
|
3080
|
+
parent_1.remove(this);
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3084
|
+
finally {
|
|
3085
|
+
try {
|
|
3086
|
+
if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);
|
|
3087
|
+
}
|
|
3088
|
+
finally { if (e_1) throw e_1.error; }
|
|
3089
|
+
}
|
|
3090
|
+
}
|
|
3091
|
+
else {
|
|
3092
|
+
_parentage.remove(this);
|
|
3093
|
+
}
|
|
3094
|
+
}
|
|
3095
|
+
var initialTeardown = this.initialTeardown;
|
|
3096
|
+
if (isFunction$1(initialTeardown)) {
|
|
3097
|
+
try {
|
|
3098
|
+
initialTeardown();
|
|
3099
|
+
}
|
|
3100
|
+
catch (e) {
|
|
3101
|
+
errors = e instanceof UnsubscriptionError ? e.errors : [e];
|
|
3102
|
+
}
|
|
3103
|
+
}
|
|
3104
|
+
var _teardowns = this._teardowns;
|
|
3105
|
+
if (_teardowns) {
|
|
3106
|
+
this._teardowns = null;
|
|
3107
|
+
try {
|
|
3108
|
+
for (var _teardowns_1 = __values(_teardowns), _teardowns_1_1 = _teardowns_1.next(); !_teardowns_1_1.done; _teardowns_1_1 = _teardowns_1.next()) {
|
|
3109
|
+
var teardown_1 = _teardowns_1_1.value;
|
|
3110
|
+
try {
|
|
3111
|
+
execTeardown(teardown_1);
|
|
3112
|
+
}
|
|
3113
|
+
catch (err) {
|
|
3114
|
+
errors = errors !== null && errors !== void 0 ? errors : [];
|
|
3115
|
+
if (err instanceof UnsubscriptionError) {
|
|
3116
|
+
errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));
|
|
3117
|
+
}
|
|
3118
|
+
else {
|
|
3119
|
+
errors.push(err);
|
|
3120
|
+
}
|
|
3121
|
+
}
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
3125
|
+
finally {
|
|
3126
|
+
try {
|
|
3127
|
+
if (_teardowns_1_1 && !_teardowns_1_1.done && (_b = _teardowns_1.return)) _b.call(_teardowns_1);
|
|
3128
|
+
}
|
|
3129
|
+
finally { if (e_2) throw e_2.error; }
|
|
3130
|
+
}
|
|
3131
|
+
}
|
|
3132
|
+
if (errors) {
|
|
3133
|
+
throw new UnsubscriptionError(errors);
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
};
|
|
3137
|
+
Subscription.prototype.add = function (teardown) {
|
|
3138
|
+
var _a;
|
|
3139
|
+
if (teardown && teardown !== this) {
|
|
3140
|
+
if (this.closed) {
|
|
3141
|
+
execTeardown(teardown);
|
|
3142
|
+
}
|
|
3143
|
+
else {
|
|
3144
|
+
if (teardown instanceof Subscription) {
|
|
3145
|
+
if (teardown.closed || teardown._hasParent(this)) {
|
|
3146
|
+
return;
|
|
3147
|
+
}
|
|
3148
|
+
teardown._addParent(this);
|
|
3149
|
+
}
|
|
3150
|
+
(this._teardowns = (_a = this._teardowns) !== null && _a !== void 0 ? _a : []).push(teardown);
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
3153
|
+
};
|
|
3154
|
+
Subscription.prototype._hasParent = function (parent) {
|
|
3155
|
+
var _parentage = this._parentage;
|
|
3156
|
+
return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
|
|
3157
|
+
};
|
|
3158
|
+
Subscription.prototype._addParent = function (parent) {
|
|
3159
|
+
var _parentage = this._parentage;
|
|
3160
|
+
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
|
|
3161
|
+
};
|
|
3162
|
+
Subscription.prototype._removeParent = function (parent) {
|
|
3163
|
+
var _parentage = this._parentage;
|
|
3164
|
+
if (_parentage === parent) {
|
|
3165
|
+
this._parentage = null;
|
|
3166
|
+
}
|
|
3167
|
+
else if (Array.isArray(_parentage)) {
|
|
3168
|
+
arrRemove(_parentage, parent);
|
|
3169
|
+
}
|
|
3170
|
+
};
|
|
3171
|
+
Subscription.prototype.remove = function (teardown) {
|
|
3172
|
+
var _teardowns = this._teardowns;
|
|
3173
|
+
_teardowns && arrRemove(_teardowns, teardown);
|
|
3174
|
+
if (teardown instanceof Subscription) {
|
|
3175
|
+
teardown._removeParent(this);
|
|
3176
|
+
}
|
|
3177
|
+
};
|
|
3178
|
+
Subscription.EMPTY = (function () {
|
|
3179
|
+
var empty = new Subscription();
|
|
3180
|
+
empty.closed = true;
|
|
3181
|
+
return empty;
|
|
3182
|
+
})();
|
|
3183
|
+
return Subscription;
|
|
3184
|
+
}());
|
|
3185
|
+
var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
|
|
3186
|
+
function isSubscription(value) {
|
|
3187
|
+
return (value instanceof Subscription ||
|
|
3188
|
+
(value && 'closed' in value && isFunction$1(value.remove) && isFunction$1(value.add) && isFunction$1(value.unsubscribe)));
|
|
3189
|
+
}
|
|
3190
|
+
function execTeardown(teardown) {
|
|
3191
|
+
if (isFunction$1(teardown)) {
|
|
3192
|
+
teardown();
|
|
3193
|
+
}
|
|
3194
|
+
else {
|
|
3195
|
+
teardown.unsubscribe();
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
|
|
3199
|
+
var config = {
|
|
3200
|
+
onUnhandledError: null,
|
|
3201
|
+
onStoppedNotification: null,
|
|
3202
|
+
Promise: undefined,
|
|
3203
|
+
useDeprecatedSynchronousErrorHandling: false,
|
|
3204
|
+
useDeprecatedNextContext: false,
|
|
3205
|
+
};
|
|
3206
|
+
|
|
3207
|
+
var timeoutProvider = {
|
|
3208
|
+
setTimeout: function () {
|
|
3209
|
+
var args = [];
|
|
3210
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3211
|
+
args[_i] = arguments[_i];
|
|
3212
|
+
}
|
|
3213
|
+
var delegate = timeoutProvider.delegate;
|
|
3214
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) || setTimeout).apply(void 0, __spreadArray([], __read(args)));
|
|
3215
|
+
},
|
|
3216
|
+
clearTimeout: function (handle) {
|
|
3217
|
+
var delegate = timeoutProvider.delegate;
|
|
3218
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
|
|
3219
|
+
},
|
|
3220
|
+
delegate: undefined,
|
|
3221
|
+
};
|
|
3222
|
+
|
|
3223
|
+
function reportUnhandledError(err) {
|
|
3224
|
+
timeoutProvider.setTimeout(function () {
|
|
3225
|
+
{
|
|
3226
|
+
throw err;
|
|
3227
|
+
}
|
|
3228
|
+
});
|
|
3229
|
+
}
|
|
3230
|
+
|
|
3231
|
+
function noop() { }
|
|
3232
|
+
|
|
3233
|
+
var context = null;
|
|
3234
|
+
function errorContext(cb) {
|
|
3235
|
+
if (config.useDeprecatedSynchronousErrorHandling) {
|
|
3236
|
+
var isRoot = !context;
|
|
3237
|
+
if (isRoot) {
|
|
3238
|
+
context = { errorThrown: false, error: null };
|
|
3239
|
+
}
|
|
3240
|
+
cb();
|
|
3241
|
+
if (isRoot) {
|
|
3242
|
+
var _a = context, errorThrown = _a.errorThrown, error = _a.error;
|
|
3243
|
+
context = null;
|
|
3244
|
+
if (errorThrown) {
|
|
3245
|
+
throw error;
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
}
|
|
3249
|
+
else {
|
|
3250
|
+
cb();
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3253
|
+
|
|
3254
|
+
var Subscriber = (function (_super) {
|
|
3255
|
+
__extends(Subscriber, _super);
|
|
3256
|
+
function Subscriber(destination) {
|
|
3257
|
+
var _this = _super.call(this) || this;
|
|
3258
|
+
_this.isStopped = false;
|
|
3259
|
+
if (destination) {
|
|
3260
|
+
_this.destination = destination;
|
|
3261
|
+
if (isSubscription(destination)) {
|
|
3262
|
+
destination.add(_this);
|
|
3263
|
+
}
|
|
3264
|
+
}
|
|
3265
|
+
else {
|
|
3266
|
+
_this.destination = EMPTY_OBSERVER;
|
|
3267
|
+
}
|
|
3268
|
+
return _this;
|
|
3269
|
+
}
|
|
3270
|
+
Subscriber.create = function (next, error, complete) {
|
|
3271
|
+
return new SafeSubscriber(next, error, complete);
|
|
3272
|
+
};
|
|
3273
|
+
Subscriber.prototype.next = function (value) {
|
|
3274
|
+
if (this.isStopped) ;
|
|
3275
|
+
else {
|
|
3276
|
+
this._next(value);
|
|
3277
|
+
}
|
|
3278
|
+
};
|
|
3279
|
+
Subscriber.prototype.error = function (err) {
|
|
3280
|
+
if (this.isStopped) ;
|
|
3281
|
+
else {
|
|
3282
|
+
this.isStopped = true;
|
|
3283
|
+
this._error(err);
|
|
3284
|
+
}
|
|
3285
|
+
};
|
|
3286
|
+
Subscriber.prototype.complete = function () {
|
|
3287
|
+
if (this.isStopped) ;
|
|
3288
|
+
else {
|
|
3289
|
+
this.isStopped = true;
|
|
3290
|
+
this._complete();
|
|
3291
|
+
}
|
|
3292
|
+
};
|
|
3293
|
+
Subscriber.prototype.unsubscribe = function () {
|
|
3294
|
+
if (!this.closed) {
|
|
3295
|
+
this.isStopped = true;
|
|
3296
|
+
_super.prototype.unsubscribe.call(this);
|
|
3297
|
+
this.destination = null;
|
|
3298
|
+
}
|
|
3299
|
+
};
|
|
3300
|
+
Subscriber.prototype._next = function (value) {
|
|
3301
|
+
this.destination.next(value);
|
|
3302
|
+
};
|
|
3303
|
+
Subscriber.prototype._error = function (err) {
|
|
3304
|
+
try {
|
|
3305
|
+
this.destination.error(err);
|
|
3306
|
+
}
|
|
3307
|
+
finally {
|
|
3308
|
+
this.unsubscribe();
|
|
3309
|
+
}
|
|
3310
|
+
};
|
|
3311
|
+
Subscriber.prototype._complete = function () {
|
|
3312
|
+
try {
|
|
3313
|
+
this.destination.complete();
|
|
3314
|
+
}
|
|
3315
|
+
finally {
|
|
3316
|
+
this.unsubscribe();
|
|
3317
|
+
}
|
|
3318
|
+
};
|
|
3319
|
+
return Subscriber;
|
|
3320
|
+
}(Subscription));
|
|
3321
|
+
var SafeSubscriber = (function (_super) {
|
|
3322
|
+
__extends(SafeSubscriber, _super);
|
|
3323
|
+
function SafeSubscriber(observerOrNext, error, complete) {
|
|
3324
|
+
var _this = _super.call(this) || this;
|
|
3325
|
+
var next;
|
|
3326
|
+
if (isFunction$1(observerOrNext)) {
|
|
3327
|
+
next = observerOrNext;
|
|
3328
|
+
}
|
|
3329
|
+
else if (observerOrNext) {
|
|
3330
|
+
(next = observerOrNext.next, error = observerOrNext.error, complete = observerOrNext.complete);
|
|
3331
|
+
var context_1;
|
|
3332
|
+
if (_this && config.useDeprecatedNextContext) {
|
|
3333
|
+
context_1 = Object.create(observerOrNext);
|
|
3334
|
+
context_1.unsubscribe = function () { return _this.unsubscribe(); };
|
|
3335
|
+
}
|
|
3336
|
+
else {
|
|
3337
|
+
context_1 = observerOrNext;
|
|
3338
|
+
}
|
|
3339
|
+
next = next === null || next === void 0 ? void 0 : next.bind(context_1);
|
|
3340
|
+
error = error === null || error === void 0 ? void 0 : error.bind(context_1);
|
|
3341
|
+
complete = complete === null || complete === void 0 ? void 0 : complete.bind(context_1);
|
|
3342
|
+
}
|
|
3343
|
+
_this.destination = {
|
|
3344
|
+
next: next ? wrapForErrorHandling(next) : noop,
|
|
3345
|
+
error: wrapForErrorHandling(error !== null && error !== void 0 ? error : defaultErrorHandler),
|
|
3346
|
+
complete: complete ? wrapForErrorHandling(complete) : noop,
|
|
3347
|
+
};
|
|
3348
|
+
return _this;
|
|
3349
|
+
}
|
|
3350
|
+
return SafeSubscriber;
|
|
3351
|
+
}(Subscriber));
|
|
3352
|
+
function wrapForErrorHandling(handler, instance) {
|
|
3353
|
+
return function () {
|
|
3354
|
+
var args = [];
|
|
3355
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3356
|
+
args[_i] = arguments[_i];
|
|
3357
|
+
}
|
|
3358
|
+
try {
|
|
3359
|
+
handler.apply(void 0, __spreadArray([], __read(args)));
|
|
3360
|
+
}
|
|
3361
|
+
catch (err) {
|
|
3362
|
+
{
|
|
3363
|
+
reportUnhandledError(err);
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3366
|
+
};
|
|
3367
|
+
}
|
|
3368
|
+
function defaultErrorHandler(err) {
|
|
3369
|
+
throw err;
|
|
3370
|
+
}
|
|
3371
|
+
var EMPTY_OBSERVER = {
|
|
3372
|
+
closed: true,
|
|
3373
|
+
next: noop,
|
|
3374
|
+
error: defaultErrorHandler,
|
|
3375
|
+
complete: noop,
|
|
3376
|
+
};
|
|
3377
|
+
|
|
3378
|
+
var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();
|
|
3379
|
+
|
|
3380
|
+
function identity(x) {
|
|
3381
|
+
return x;
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3384
|
+
function pipeFromArray(fns) {
|
|
3385
|
+
if (fns.length === 0) {
|
|
3386
|
+
return identity;
|
|
3387
|
+
}
|
|
3388
|
+
if (fns.length === 1) {
|
|
3389
|
+
return fns[0];
|
|
3390
|
+
}
|
|
3391
|
+
return function piped(input) {
|
|
3392
|
+
return fns.reduce(function (prev, fn) { return fn(prev); }, input);
|
|
3393
|
+
};
|
|
3394
|
+
}
|
|
3395
|
+
|
|
3396
|
+
var Observable = (function () {
|
|
3397
|
+
function Observable(subscribe) {
|
|
3398
|
+
if (subscribe) {
|
|
3399
|
+
this._subscribe = subscribe;
|
|
3400
|
+
}
|
|
3401
|
+
}
|
|
3402
|
+
Observable.prototype.lift = function (operator) {
|
|
3403
|
+
var observable = new Observable();
|
|
3404
|
+
observable.source = this;
|
|
3405
|
+
observable.operator = operator;
|
|
3406
|
+
return observable;
|
|
3407
|
+
};
|
|
3408
|
+
Observable.prototype.subscribe = function (observerOrNext, error, complete) {
|
|
3409
|
+
var _this = this;
|
|
3410
|
+
var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
|
|
3411
|
+
errorContext(function () {
|
|
3412
|
+
var _a = _this, operator = _a.operator, source = _a.source;
|
|
3413
|
+
subscriber.add(operator
|
|
3414
|
+
?
|
|
3415
|
+
operator.call(subscriber, source)
|
|
3416
|
+
: source
|
|
3417
|
+
?
|
|
3418
|
+
_this._subscribe(subscriber)
|
|
3419
|
+
:
|
|
3420
|
+
_this._trySubscribe(subscriber));
|
|
3421
|
+
});
|
|
3422
|
+
return subscriber;
|
|
3423
|
+
};
|
|
3424
|
+
Observable.prototype._trySubscribe = function (sink) {
|
|
3425
|
+
try {
|
|
3426
|
+
return this._subscribe(sink);
|
|
3427
|
+
}
|
|
3428
|
+
catch (err) {
|
|
3429
|
+
sink.error(err);
|
|
3430
|
+
}
|
|
3431
|
+
};
|
|
3432
|
+
Observable.prototype.forEach = function (next, promiseCtor) {
|
|
3433
|
+
var _this = this;
|
|
3434
|
+
promiseCtor = getPromiseCtor(promiseCtor);
|
|
3435
|
+
return new promiseCtor(function (resolve, reject) {
|
|
3436
|
+
var subscriber = new SafeSubscriber({
|
|
3437
|
+
next: function (value) {
|
|
3438
|
+
try {
|
|
3439
|
+
next(value);
|
|
3440
|
+
}
|
|
3441
|
+
catch (err) {
|
|
3442
|
+
reject(err);
|
|
3443
|
+
subscriber.unsubscribe();
|
|
3444
|
+
}
|
|
3445
|
+
},
|
|
3446
|
+
error: reject,
|
|
3447
|
+
complete: resolve,
|
|
3448
|
+
});
|
|
3449
|
+
_this.subscribe(subscriber);
|
|
3450
|
+
});
|
|
3451
|
+
};
|
|
3452
|
+
Observable.prototype._subscribe = function (subscriber) {
|
|
3453
|
+
var _a;
|
|
3454
|
+
return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
|
|
3455
|
+
};
|
|
3456
|
+
Observable.prototype[observable] = function () {
|
|
3457
|
+
return this;
|
|
3458
|
+
};
|
|
3459
|
+
Observable.prototype.pipe = function () {
|
|
3460
|
+
var operations = [];
|
|
3461
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
3462
|
+
operations[_i] = arguments[_i];
|
|
3463
|
+
}
|
|
3464
|
+
return pipeFromArray(operations)(this);
|
|
3465
|
+
};
|
|
3466
|
+
Observable.prototype.toPromise = function (promiseCtor) {
|
|
3467
|
+
var _this = this;
|
|
3468
|
+
promiseCtor = getPromiseCtor(promiseCtor);
|
|
3469
|
+
return new promiseCtor(function (resolve, reject) {
|
|
3470
|
+
var value;
|
|
3471
|
+
_this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });
|
|
3472
|
+
});
|
|
3473
|
+
};
|
|
3474
|
+
Observable.create = function (subscribe) {
|
|
3475
|
+
return new Observable(subscribe);
|
|
3476
|
+
};
|
|
3477
|
+
return Observable;
|
|
3478
|
+
}());
|
|
3479
|
+
function getPromiseCtor(promiseCtor) {
|
|
3480
|
+
var _a;
|
|
3481
|
+
return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
|
|
3482
|
+
}
|
|
3483
|
+
function isObserver(value) {
|
|
3484
|
+
return value && isFunction$1(value.next) && isFunction$1(value.error) && isFunction$1(value.complete);
|
|
3485
|
+
}
|
|
3486
|
+
function isSubscriber(value) {
|
|
3487
|
+
return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3490
|
+
var ObjectUnsubscribedError = createErrorClass(function (_super) {
|
|
3491
|
+
return function ObjectUnsubscribedErrorImpl() {
|
|
3492
|
+
_super(this);
|
|
3493
|
+
this.name = 'ObjectUnsubscribedError';
|
|
3494
|
+
this.message = 'object unsubscribed';
|
|
3495
|
+
};
|
|
3496
|
+
});
|
|
3497
|
+
|
|
3498
|
+
var Subject = (function (_super) {
|
|
3499
|
+
__extends(Subject, _super);
|
|
3500
|
+
function Subject() {
|
|
3501
|
+
var _this = _super.call(this) || this;
|
|
3502
|
+
_this.closed = false;
|
|
3503
|
+
_this.observers = [];
|
|
3504
|
+
_this.isStopped = false;
|
|
3505
|
+
_this.hasError = false;
|
|
3506
|
+
_this.thrownError = null;
|
|
3507
|
+
return _this;
|
|
3508
|
+
}
|
|
3509
|
+
Subject.prototype.lift = function (operator) {
|
|
3510
|
+
var subject = new AnonymousSubject(this, this);
|
|
3511
|
+
subject.operator = operator;
|
|
3512
|
+
return subject;
|
|
3513
|
+
};
|
|
3514
|
+
Subject.prototype._throwIfClosed = function () {
|
|
3515
|
+
if (this.closed) {
|
|
3516
|
+
throw new ObjectUnsubscribedError();
|
|
3517
|
+
}
|
|
3518
|
+
};
|
|
3519
|
+
Subject.prototype.next = function (value) {
|
|
3520
|
+
var _this = this;
|
|
3521
|
+
errorContext(function () {
|
|
3522
|
+
var e_1, _a;
|
|
3523
|
+
_this._throwIfClosed();
|
|
3524
|
+
if (!_this.isStopped) {
|
|
3525
|
+
var copy = _this.observers.slice();
|
|
3526
|
+
try {
|
|
3527
|
+
for (var copy_1 = __values(copy), copy_1_1 = copy_1.next(); !copy_1_1.done; copy_1_1 = copy_1.next()) {
|
|
3528
|
+
var observer = copy_1_1.value;
|
|
3529
|
+
observer.next(value);
|
|
3530
|
+
}
|
|
3531
|
+
}
|
|
3532
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3533
|
+
finally {
|
|
3534
|
+
try {
|
|
3535
|
+
if (copy_1_1 && !copy_1_1.done && (_a = copy_1.return)) _a.call(copy_1);
|
|
3536
|
+
}
|
|
3537
|
+
finally { if (e_1) throw e_1.error; }
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3540
|
+
});
|
|
3541
|
+
};
|
|
3542
|
+
Subject.prototype.error = function (err) {
|
|
3543
|
+
var _this = this;
|
|
3544
|
+
errorContext(function () {
|
|
3545
|
+
_this._throwIfClosed();
|
|
3546
|
+
if (!_this.isStopped) {
|
|
3547
|
+
_this.hasError = _this.isStopped = true;
|
|
3548
|
+
_this.thrownError = err;
|
|
3549
|
+
var observers = _this.observers;
|
|
3550
|
+
while (observers.length) {
|
|
3551
|
+
observers.shift().error(err);
|
|
3552
|
+
}
|
|
3553
|
+
}
|
|
3554
|
+
});
|
|
3555
|
+
};
|
|
3556
|
+
Subject.prototype.complete = function () {
|
|
3557
|
+
var _this = this;
|
|
3558
|
+
errorContext(function () {
|
|
3559
|
+
_this._throwIfClosed();
|
|
3560
|
+
if (!_this.isStopped) {
|
|
3561
|
+
_this.isStopped = true;
|
|
3562
|
+
var observers = _this.observers;
|
|
3563
|
+
while (observers.length) {
|
|
3564
|
+
observers.shift().complete();
|
|
3565
|
+
}
|
|
3566
|
+
}
|
|
3567
|
+
});
|
|
3568
|
+
};
|
|
3569
|
+
Subject.prototype.unsubscribe = function () {
|
|
3570
|
+
this.isStopped = this.closed = true;
|
|
3571
|
+
this.observers = null;
|
|
3572
|
+
};
|
|
3573
|
+
Object.defineProperty(Subject.prototype, "observed", {
|
|
3574
|
+
get: function () {
|
|
3575
|
+
var _a;
|
|
3576
|
+
return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
3577
|
+
},
|
|
3578
|
+
enumerable: false,
|
|
3579
|
+
configurable: true
|
|
3580
|
+
});
|
|
3581
|
+
Subject.prototype._trySubscribe = function (subscriber) {
|
|
3582
|
+
this._throwIfClosed();
|
|
3583
|
+
return _super.prototype._trySubscribe.call(this, subscriber);
|
|
3584
|
+
};
|
|
3585
|
+
Subject.prototype._subscribe = function (subscriber) {
|
|
3586
|
+
this._throwIfClosed();
|
|
3587
|
+
this._checkFinalizedStatuses(subscriber);
|
|
3588
|
+
return this._innerSubscribe(subscriber);
|
|
3589
|
+
};
|
|
3590
|
+
Subject.prototype._innerSubscribe = function (subscriber) {
|
|
3591
|
+
var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;
|
|
3592
|
+
return hasError || isStopped
|
|
3593
|
+
? EMPTY_SUBSCRIPTION
|
|
3594
|
+
: (observers.push(subscriber), new Subscription(function () { return arrRemove(observers, subscriber); }));
|
|
3595
|
+
};
|
|
3596
|
+
Subject.prototype._checkFinalizedStatuses = function (subscriber) {
|
|
3597
|
+
var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;
|
|
3598
|
+
if (hasError) {
|
|
3599
|
+
subscriber.error(thrownError);
|
|
3600
|
+
}
|
|
3601
|
+
else if (isStopped) {
|
|
3602
|
+
subscriber.complete();
|
|
3603
|
+
}
|
|
3604
|
+
};
|
|
3605
|
+
Subject.prototype.asObservable = function () {
|
|
3606
|
+
var observable = new Observable();
|
|
3607
|
+
observable.source = this;
|
|
3608
|
+
return observable;
|
|
3609
|
+
};
|
|
3610
|
+
Subject.create = function (destination, source) {
|
|
3611
|
+
return new AnonymousSubject(destination, source);
|
|
3612
|
+
};
|
|
3613
|
+
return Subject;
|
|
3614
|
+
}(Observable));
|
|
3615
|
+
var AnonymousSubject = (function (_super) {
|
|
3616
|
+
__extends(AnonymousSubject, _super);
|
|
3617
|
+
function AnonymousSubject(destination, source) {
|
|
3618
|
+
var _this = _super.call(this) || this;
|
|
3619
|
+
_this.destination = destination;
|
|
3620
|
+
_this.source = source;
|
|
3621
|
+
return _this;
|
|
3622
|
+
}
|
|
3623
|
+
AnonymousSubject.prototype.next = function (value) {
|
|
3624
|
+
var _a, _b;
|
|
3625
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
3626
|
+
};
|
|
3627
|
+
AnonymousSubject.prototype.error = function (err) {
|
|
3628
|
+
var _a, _b;
|
|
3629
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);
|
|
3630
|
+
};
|
|
3631
|
+
AnonymousSubject.prototype.complete = function () {
|
|
3632
|
+
var _a, _b;
|
|
3633
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
3634
|
+
};
|
|
3635
|
+
AnonymousSubject.prototype._subscribe = function (subscriber) {
|
|
3636
|
+
var _a, _b;
|
|
3637
|
+
return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
|
|
3638
|
+
};
|
|
3639
|
+
return AnonymousSubject;
|
|
3640
|
+
}(Subject));
|
|
3641
|
+
|
|
3642
|
+
var es2018 = {};
|
|
3643
|
+
|
|
3644
|
+
var array = {};
|
|
3645
|
+
|
|
3646
|
+
array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
|
|
3647
|
+
function isArray(val) {
|
|
3648
|
+
return Array.isArray(val);
|
|
3649
|
+
}
|
|
3650
|
+
array.isArray = isArray;
|
|
3651
|
+
function isntArray(val) {
|
|
3652
|
+
return !isArray(val);
|
|
3653
|
+
}
|
|
3654
|
+
array.isntArray = isntArray;
|
|
3655
|
+
function isEmptyArray(val) {
|
|
3656
|
+
return val.length === 0;
|
|
3657
|
+
}
|
|
3658
|
+
array.isEmptyArray = isEmptyArray;
|
|
3659
|
+
function isntEmptyArray(val) {
|
|
3660
|
+
return val.length !== 0;
|
|
3661
|
+
}
|
|
3662
|
+
array.isntEmptyArray = isntEmptyArray;
|
|
3663
|
+
|
|
3664
|
+
var asyncIterable = {};
|
|
3665
|
+
|
|
3666
|
+
var _null = {};
|
|
3667
|
+
|
|
3668
|
+
_null.isntNull = _null.isNull = void 0;
|
|
3669
|
+
function isNull(val) {
|
|
3670
|
+
return val === null;
|
|
3671
|
+
}
|
|
3672
|
+
_null.isNull = isNull;
|
|
3673
|
+
function isntNull(val) {
|
|
3674
|
+
return !isNull(val);
|
|
3675
|
+
}
|
|
3676
|
+
_null.isntNull = isntNull;
|
|
3677
|
+
|
|
3678
|
+
var _undefined = {};
|
|
3679
|
+
|
|
3680
|
+
_undefined.isntUndefined = _undefined.isUndefined = void 0;
|
|
3681
|
+
function isUndefined(val) {
|
|
3682
|
+
return val === undefined;
|
|
3683
|
+
}
|
|
3684
|
+
_undefined.isUndefined = isUndefined;
|
|
3685
|
+
function isntUndefined(val) {
|
|
3686
|
+
return !isUndefined(val);
|
|
3687
|
+
}
|
|
3688
|
+
_undefined.isntUndefined = isntUndefined;
|
|
3689
|
+
|
|
3690
|
+
asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
|
|
3691
|
+
const null_1$1 = _null;
|
|
3692
|
+
const undefined_1$2 = _undefined;
|
|
3693
|
+
function isAsyncIterable(val) {
|
|
3694
|
+
return (0, null_1$1.isntNull)(val)
|
|
3695
|
+
&& (0, undefined_1$2.isntUndefined)(val)
|
|
3696
|
+
&& typeof val[Symbol.asyncIterator] === 'function';
|
|
3697
|
+
}
|
|
3698
|
+
asyncIterable.isAsyncIterable = isAsyncIterable;
|
|
3699
|
+
function isntAsyncIterable(val) {
|
|
3700
|
+
return !isAsyncIterable(val);
|
|
3701
|
+
}
|
|
3702
|
+
asyncIterable.isntAsyncIterable = isntAsyncIterable;
|
|
3703
|
+
|
|
3704
|
+
var bigint = {};
|
|
3705
|
+
|
|
3706
|
+
bigint.isntBigInt = bigint.isBigInt = void 0;
|
|
3707
|
+
function isBigInt(val) {
|
|
3708
|
+
return typeof val === 'bigint';
|
|
3709
|
+
}
|
|
3710
|
+
bigint.isBigInt = isBigInt;
|
|
3711
|
+
function isntBigInt(val) {
|
|
3712
|
+
return !isBigInt(val);
|
|
3713
|
+
}
|
|
3714
|
+
bigint.isntBigInt = isntBigInt;
|
|
3715
|
+
|
|
3716
|
+
var boolean = {};
|
|
3717
|
+
|
|
3718
|
+
boolean.isntBoolean = boolean.isBoolean = void 0;
|
|
3719
|
+
function isBoolean(val) {
|
|
3720
|
+
return typeof val === 'boolean';
|
|
3721
|
+
}
|
|
3722
|
+
boolean.isBoolean = isBoolean;
|
|
3723
|
+
function isntBoolean(val) {
|
|
3724
|
+
return !isBoolean(val);
|
|
3725
|
+
}
|
|
3726
|
+
boolean.isntBoolean = isntBoolean;
|
|
3727
|
+
|
|
3728
|
+
var char = {};
|
|
3729
|
+
|
|
3730
|
+
var string = {};
|
|
3731
|
+
|
|
3732
|
+
string.isntString = string.isString = void 0;
|
|
3733
|
+
function isString(val) {
|
|
3734
|
+
return typeof val === 'string';
|
|
3735
|
+
}
|
|
3736
|
+
string.isString = isString;
|
|
3737
|
+
function isntString(val) {
|
|
3738
|
+
return !isString(val);
|
|
3739
|
+
}
|
|
3740
|
+
string.isntString = isntString;
|
|
3741
|
+
|
|
3742
|
+
char.isntChar = char.isChar = void 0;
|
|
3743
|
+
const string_1$1 = string;
|
|
3744
|
+
function isChar(val) {
|
|
3745
|
+
return (0, string_1$1.isString)(val)
|
|
3746
|
+
&& val.length === 1;
|
|
3747
|
+
}
|
|
3748
|
+
char.isChar = isChar;
|
|
3749
|
+
function isntChar(val) {
|
|
3750
|
+
return !isChar(val);
|
|
3751
|
+
}
|
|
3752
|
+
char.isntChar = isntChar;
|
|
3753
|
+
|
|
3754
|
+
var date = {};
|
|
3755
|
+
|
|
3756
|
+
date.isntDate = date.isDate = void 0;
|
|
3757
|
+
function isDate(val) {
|
|
3758
|
+
return val instanceof Date;
|
|
3759
|
+
}
|
|
3760
|
+
date.isDate = isDate;
|
|
3761
|
+
function isntDate(val) {
|
|
3762
|
+
return !isDate(val);
|
|
3763
|
+
}
|
|
3764
|
+
date.isntDate = isntDate;
|
|
3765
|
+
|
|
3766
|
+
var _enum = {};
|
|
3767
|
+
|
|
3768
|
+
_enum.inEnum = void 0;
|
|
3769
|
+
function inEnum(val, _enum) {
|
|
3770
|
+
return Object.values(_enum).includes(val);
|
|
3771
|
+
}
|
|
3772
|
+
_enum.inEnum = inEnum;
|
|
3773
|
+
|
|
3774
|
+
var error = {};
|
|
3775
|
+
|
|
3776
|
+
error.isntError = error.isError = void 0;
|
|
3777
|
+
function isError(val) {
|
|
3778
|
+
return val instanceof Error;
|
|
3779
|
+
}
|
|
3780
|
+
error.isError = isError;
|
|
3781
|
+
function isntError(val) {
|
|
3782
|
+
return !isError(val);
|
|
3783
|
+
}
|
|
3784
|
+
error.isntError = isntError;
|
|
3785
|
+
|
|
3786
|
+
var falsy = {};
|
|
3787
|
+
|
|
3788
|
+
falsy.isntFalsy = falsy.isFalsy = void 0;
|
|
3789
|
+
function isFalsy(val) {
|
|
3790
|
+
return !val;
|
|
3791
|
+
}
|
|
3792
|
+
falsy.isFalsy = isFalsy;
|
|
3793
|
+
function isntFalsy(val) {
|
|
3794
|
+
return !isFalsy(val);
|
|
3795
|
+
}
|
|
3796
|
+
falsy.isntFalsy = isntFalsy;
|
|
3797
|
+
|
|
3798
|
+
var _function = {};
|
|
3799
|
+
|
|
3800
|
+
_function.isntFunction = _function.isFunction = void 0;
|
|
3801
|
+
function isFunction(val) {
|
|
3802
|
+
return typeof val === 'function';
|
|
3803
|
+
}
|
|
3804
|
+
_function.isFunction = isFunction;
|
|
3805
|
+
function isntFunction(val) {
|
|
3806
|
+
return !isFunction(val);
|
|
3807
|
+
}
|
|
3808
|
+
_function.isntFunction = isntFunction;
|
|
3809
|
+
|
|
3810
|
+
var iterable = {};
|
|
3811
|
+
|
|
3812
|
+
iterable.isntIterable = iterable.isIterable = void 0;
|
|
3813
|
+
const null_1 = _null;
|
|
3814
|
+
const undefined_1$1 = _undefined;
|
|
3815
|
+
function isIterable(val) {
|
|
3816
|
+
return (0, null_1.isntNull)(val)
|
|
3817
|
+
&& (0, undefined_1$1.isntUndefined)(val)
|
|
3818
|
+
&& typeof val[Symbol.iterator] === 'function';
|
|
3819
|
+
}
|
|
3820
|
+
iterable.isIterable = isIterable;
|
|
3821
|
+
function isntIterable(val) {
|
|
3822
|
+
return !isIterable(val);
|
|
3823
|
+
}
|
|
3824
|
+
iterable.isntIterable = isntIterable;
|
|
3825
|
+
|
|
3826
|
+
var jsonRpc = {};
|
|
3827
|
+
|
|
3828
|
+
var object = {};
|
|
3829
|
+
|
|
3830
|
+
/**
|
|
3831
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
3832
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
3833
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
3834
|
+
* Released under MIT license <https://lodash.com/license>
|
|
3835
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
3836
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
3837
|
+
*/
|
|
3838
|
+
|
|
3839
|
+
/** `Object#toString` result references. */
|
|
3840
|
+
var objectTag = '[object Object]';
|
|
3841
|
+
|
|
3842
|
+
/**
|
|
3843
|
+
* Checks if `value` is a host object in IE < 9.
|
|
3844
|
+
*
|
|
3845
|
+
* @private
|
|
3846
|
+
* @param {*} value The value to check.
|
|
3847
|
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
3848
|
+
*/
|
|
3849
|
+
function isHostObject(value) {
|
|
3850
|
+
// Many host objects are `Object` objects that can coerce to strings
|
|
3851
|
+
// despite having improperly defined `toString` methods.
|
|
3852
|
+
var result = false;
|
|
3853
|
+
if (value != null && typeof value.toString != 'function') {
|
|
3854
|
+
try {
|
|
3855
|
+
result = !!(value + '');
|
|
3856
|
+
} catch (e) {}
|
|
3857
|
+
}
|
|
3858
|
+
return result;
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3861
|
+
/**
|
|
3862
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
3863
|
+
*
|
|
3864
|
+
* @private
|
|
3865
|
+
* @param {Function} func The function to wrap.
|
|
3866
|
+
* @param {Function} transform The argument transform.
|
|
3867
|
+
* @returns {Function} Returns the new function.
|
|
3868
|
+
*/
|
|
3869
|
+
function overArg(func, transform) {
|
|
3870
|
+
return function(arg) {
|
|
3871
|
+
return func(transform(arg));
|
|
3872
|
+
};
|
|
3873
|
+
}
|
|
3874
|
+
|
|
3875
|
+
/** Used for built-in method references. */
|
|
3876
|
+
var funcProto = Function.prototype,
|
|
3877
|
+
objectProto = Object.prototype;
|
|
3878
|
+
|
|
3879
|
+
/** Used to resolve the decompiled source of functions. */
|
|
3880
|
+
var funcToString = funcProto.toString;
|
|
3881
|
+
|
|
3882
|
+
/** Used to check objects for own properties. */
|
|
3883
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
3884
|
+
|
|
3885
|
+
/** Used to infer the `Object` constructor. */
|
|
3886
|
+
var objectCtorString = funcToString.call(Object);
|
|
3887
|
+
|
|
3888
|
+
/**
|
|
3889
|
+
* Used to resolve the
|
|
3890
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
3891
|
+
* of values.
|
|
3892
|
+
*/
|
|
3893
|
+
var objectToString = objectProto.toString;
|
|
3894
|
+
|
|
3895
|
+
/** Built-in value references. */
|
|
3896
|
+
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
3897
|
+
|
|
3898
|
+
/**
|
|
3899
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
3900
|
+
* and has a `typeof` result of "object".
|
|
3901
|
+
*
|
|
3902
|
+
* @static
|
|
3903
|
+
* @memberOf _
|
|
3904
|
+
* @since 4.0.0
|
|
3905
|
+
* @category Lang
|
|
3906
|
+
* @param {*} value The value to check.
|
|
3907
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
3908
|
+
* @example
|
|
3909
|
+
*
|
|
3910
|
+
* _.isObjectLike({});
|
|
3911
|
+
* // => true
|
|
3912
|
+
*
|
|
3913
|
+
* _.isObjectLike([1, 2, 3]);
|
|
3914
|
+
* // => true
|
|
3915
|
+
*
|
|
3916
|
+
* _.isObjectLike(_.noop);
|
|
3917
|
+
* // => false
|
|
3918
|
+
*
|
|
3919
|
+
* _.isObjectLike(null);
|
|
3920
|
+
* // => false
|
|
3921
|
+
*/
|
|
3922
|
+
function isObjectLike(value) {
|
|
3923
|
+
return !!value && typeof value == 'object';
|
|
3924
|
+
}
|
|
3925
|
+
|
|
3926
|
+
/**
|
|
3927
|
+
* Checks if `value` is a plain object, that is, an object created by the
|
|
3928
|
+
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
3929
|
+
*
|
|
3930
|
+
* @static
|
|
3931
|
+
* @memberOf _
|
|
3932
|
+
* @since 0.8.0
|
|
3933
|
+
* @category Lang
|
|
3934
|
+
* @param {*} value The value to check.
|
|
3935
|
+
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
3936
|
+
* @example
|
|
3937
|
+
*
|
|
3938
|
+
* function Foo() {
|
|
3939
|
+
* this.a = 1;
|
|
3940
|
+
* }
|
|
3941
|
+
*
|
|
3942
|
+
* _.isPlainObject(new Foo);
|
|
3943
|
+
* // => false
|
|
3944
|
+
*
|
|
3945
|
+
* _.isPlainObject([1, 2, 3]);
|
|
3946
|
+
* // => false
|
|
3947
|
+
*
|
|
3948
|
+
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
3949
|
+
* // => true
|
|
3950
|
+
*
|
|
3951
|
+
* _.isPlainObject(Object.create(null));
|
|
3952
|
+
* // => true
|
|
3953
|
+
*/
|
|
3954
|
+
function isPlainObject$1(value) {
|
|
3955
|
+
if (!isObjectLike(value) ||
|
|
3956
|
+
objectToString.call(value) != objectTag || isHostObject(value)) {
|
|
3957
|
+
return false;
|
|
3958
|
+
}
|
|
3959
|
+
var proto = getPrototype(value);
|
|
3960
|
+
if (proto === null) {
|
|
3961
|
+
return true;
|
|
3962
|
+
}
|
|
3963
|
+
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
3964
|
+
return (typeof Ctor == 'function' &&
|
|
3965
|
+
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
|
|
3966
|
+
}
|
|
3967
|
+
|
|
3968
|
+
var lodash_isplainobject = isPlainObject$1;
|
|
3969
|
+
|
|
3970
|
+
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
3971
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
3972
|
+
};object.isntEmptyObject = object.isEmptyObject = object.isntPlainObject = object.isPlainObject = object.isntObject = object.isObject = void 0;
|
|
3973
|
+
const lodash_isplainobject_1 = __importDefault(lodash_isplainobject);
|
|
3974
|
+
function isObject(val) {
|
|
3975
|
+
return val !== null
|
|
3976
|
+
&& typeof val === 'object';
|
|
3977
|
+
}
|
|
3978
|
+
object.isObject = isObject;
|
|
3979
|
+
function isntObject(val) {
|
|
3980
|
+
return !isObject(val);
|
|
3981
|
+
}
|
|
3982
|
+
object.isntObject = isntObject;
|
|
3983
|
+
function isPlainObject(val) {
|
|
3984
|
+
return (0, lodash_isplainobject_1.default)(val);
|
|
3985
|
+
}
|
|
3986
|
+
object.isPlainObject = isPlainObject;
|
|
3987
|
+
function isntPlainObject(val) {
|
|
3988
|
+
return !isPlainObject(val);
|
|
3989
|
+
}
|
|
3990
|
+
object.isntPlainObject = isntPlainObject;
|
|
3991
|
+
function isEmptyObject(val) {
|
|
3992
|
+
return Object.keys(val).length === 0;
|
|
3993
|
+
}
|
|
3994
|
+
object.isEmptyObject = isEmptyObject;
|
|
3995
|
+
function isntEmptyObject(val) {
|
|
3996
|
+
return Object.keys(val).length !== 0;
|
|
3997
|
+
}
|
|
3998
|
+
object.isntEmptyObject = isntEmptyObject;
|
|
3999
|
+
|
|
4000
|
+
var number = {};
|
|
4001
|
+
|
|
4002
|
+
number.isntNumber = number.isNumber = void 0;
|
|
4003
|
+
function isNumber(val) {
|
|
4004
|
+
return typeof val === 'number';
|
|
4005
|
+
}
|
|
4006
|
+
number.isNumber = isNumber;
|
|
4007
|
+
function isntNumber(val) {
|
|
4008
|
+
return !isNumber(val);
|
|
4009
|
+
}
|
|
4010
|
+
number.isntNumber = isntNumber;
|
|
4011
|
+
|
|
4012
|
+
jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
|
|
4013
|
+
const array_1 = array;
|
|
4014
|
+
const object_1 = object;
|
|
4015
|
+
const string_1 = string;
|
|
4016
|
+
const number_1 = number;
|
|
4017
|
+
const undefined_1 = _undefined;
|
|
4018
|
+
function isJsonRpcId(val) {
|
|
4019
|
+
return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
|
|
4020
|
+
}
|
|
4021
|
+
function isJsonRpcParams(val) {
|
|
4022
|
+
return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
|
|
4023
|
+
}
|
|
4024
|
+
function isJsonRpcNotification(val) {
|
|
4025
|
+
return (0, object_1.isPlainObject)(val)
|
|
4026
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
4027
|
+
&& (0, string_1.isString)(val.method)
|
|
4028
|
+
&& (0, undefined_1.isUndefined)(val.id)
|
|
4029
|
+
&& isJsonRpcParams(val.params);
|
|
4030
|
+
}
|
|
4031
|
+
jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
|
|
4032
|
+
function isntJsonRpcNotification(val) {
|
|
4033
|
+
return !isJsonRpcNotification(val);
|
|
4034
|
+
}
|
|
4035
|
+
jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
|
|
4036
|
+
function isJsonRpcRequest(val) {
|
|
4037
|
+
return (0, object_1.isPlainObject)(val)
|
|
4038
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
4039
|
+
&& (0, string_1.isString)(val.method)
|
|
4040
|
+
&& isJsonRpcId(val.id)
|
|
4041
|
+
&& isJsonRpcParams(val.params);
|
|
4042
|
+
}
|
|
4043
|
+
jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
|
|
4044
|
+
function isntJsonRpcRequest(val) {
|
|
4045
|
+
return !isJsonRpcRequest(val);
|
|
4046
|
+
}
|
|
4047
|
+
jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
|
|
4048
|
+
function isJsonRpcSuccess(val) {
|
|
4049
|
+
return (0, object_1.isPlainObject)(val)
|
|
4050
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
4051
|
+
&& (0, string_1.isString)(val.id)
|
|
4052
|
+
&& 'result' in val;
|
|
4053
|
+
}
|
|
4054
|
+
jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
|
|
4055
|
+
function isntJsonRpcSuccess(val) {
|
|
4056
|
+
return !isJsonRpcSuccess(val);
|
|
4057
|
+
}
|
|
4058
|
+
jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
|
|
4059
|
+
function isJsonRpcError(val) {
|
|
4060
|
+
return (0, object_1.isPlainObject)(val)
|
|
4061
|
+
&& (0, string_1.isString)(val.jsonrpc)
|
|
4062
|
+
&& isJsonRpcId(val.id)
|
|
4063
|
+
&& isJsonRpcErrorObject(val.error);
|
|
4064
|
+
}
|
|
4065
|
+
jsonRpc.isJsonRpcError = isJsonRpcError;
|
|
4066
|
+
function isntJsonRpcError(val) {
|
|
4067
|
+
return !isJsonRpcError(val);
|
|
4068
|
+
}
|
|
4069
|
+
jsonRpc.isntJsonRpcError = isntJsonRpcError;
|
|
4070
|
+
function isJsonRpcErrorObject(val) {
|
|
4071
|
+
return (0, object_1.isPlainObject)(val)
|
|
4072
|
+
&& (0, number_1.isNumber)(val.code)
|
|
4073
|
+
&& (0, string_1.isString)(val.message)
|
|
4074
|
+
&& ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
|
|
4075
|
+
}
|
|
4076
|
+
|
|
4077
|
+
var json = {};
|
|
4078
|
+
|
|
4079
|
+
json.isntJson = json.isJson = void 0;
|
|
4080
|
+
function isJson(val) {
|
|
4081
|
+
try {
|
|
4082
|
+
JSON.stringify(val);
|
|
4083
|
+
return true;
|
|
4084
|
+
}
|
|
4085
|
+
catch (_a) {
|
|
4086
|
+
return false;
|
|
4087
|
+
}
|
|
4088
|
+
}
|
|
4089
|
+
json.isJson = isJson;
|
|
4090
|
+
function isntJson(val) {
|
|
4091
|
+
return !isntJson();
|
|
4092
|
+
}
|
|
4093
|
+
json.isntJson = isntJson;
|
|
4094
|
+
|
|
4095
|
+
var url = {};
|
|
4096
|
+
|
|
4097
|
+
url.isAbsoluteURL = void 0;
|
|
4098
|
+
function isAbsoluteURL(str) {
|
|
4099
|
+
try {
|
|
4100
|
+
new URL(str);
|
|
4101
|
+
return true;
|
|
4102
|
+
}
|
|
4103
|
+
catch (_a) {
|
|
4104
|
+
return false;
|
|
4105
|
+
}
|
|
4106
|
+
}
|
|
4107
|
+
url.isAbsoluteURL = isAbsoluteURL;
|
|
4108
|
+
|
|
4109
|
+
(function (exports) {
|
|
4110
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4111
|
+
if (k2 === undefined) k2 = k;
|
|
4112
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
4113
|
+
}) : (function(o, m, k, k2) {
|
|
4114
|
+
if (k2 === undefined) k2 = k;
|
|
4115
|
+
o[k2] = m[k];
|
|
4116
|
+
}));
|
|
4117
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
4118
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
4119
|
+
};__exportStar(array, exports);
|
|
4120
|
+
__exportStar(asyncIterable, exports);
|
|
4121
|
+
__exportStar(bigint, exports);
|
|
4122
|
+
__exportStar(boolean, exports);
|
|
4123
|
+
__exportStar(char, exports);
|
|
4124
|
+
__exportStar(date, exports);
|
|
4125
|
+
__exportStar(_enum, exports);
|
|
4126
|
+
__exportStar(error, exports);
|
|
4127
|
+
__exportStar(falsy, exports);
|
|
4128
|
+
__exportStar(_function, exports);
|
|
4129
|
+
__exportStar(iterable, exports);
|
|
4130
|
+
__exportStar(jsonRpc, exports);
|
|
4131
|
+
__exportStar(json, exports);
|
|
4132
|
+
__exportStar(_null, exports);
|
|
4133
|
+
__exportStar(number, exports);
|
|
4134
|
+
__exportStar(object, exports);
|
|
4135
|
+
__exportStar(string, exports);
|
|
4136
|
+
__exportStar(_undefined, exports);
|
|
4137
|
+
__exportStar(url, exports);
|
|
4138
|
+
|
|
4139
|
+
}(es2018));
|
|
4140
|
+
|
|
4141
|
+
class ObservableFiniteStateMachine extends FiniteStateMachine {
|
|
4142
|
+
constructor() {
|
|
4143
|
+
super(...arguments);
|
|
4144
|
+
this.stateChanges = new Subject();
|
|
4145
|
+
}
|
|
4146
|
+
observeStateChanges() {
|
|
4147
|
+
return this.stateChanges;
|
|
4148
|
+
}
|
|
4149
|
+
/**
|
|
4150
|
+
* @throws {BadEventError}
|
|
4151
|
+
*/
|
|
4152
|
+
send(event) {
|
|
4153
|
+
const oldState = this.state;
|
|
4154
|
+
super.send(event);
|
|
4155
|
+
const newState = this.state;
|
|
4156
|
+
this.stateChanges.next({ event, oldState, newState });
|
|
4157
|
+
if (es2018.isEmptyObject(this.schema[newState])) {
|
|
4158
|
+
this.stateChanges.complete();
|
|
4159
|
+
}
|
|
4160
|
+
}
|
|
4161
|
+
}
|
|
4162
|
+
|
|
4163
|
+
export { BadEventError, Box, Emitter, ExpirableMap, FiniteStateMachine, HashMap, HashSet, LRUMap, ObservableFiniteStateMachine, Queue, TLRUMap, TrieMap, convertArrayToCons, convertConsToArray };
|
|
2942
4164
|
//# sourceMappingURL=index.mjs.map
|