woodenfish-bot 3.1.8 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/es/index.js +715 -690
  2. package/lib/index.js +715 -690
  3. package/package.json +13 -13
package/es/index.js CHANGED
@@ -365,8 +365,6 @@ function _asyncToGenerator(n) {
365
365
  };
366
366
  }
367
367
 
368
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
369
-
370
368
  function getDefaultExportFromCjs (x) {
371
369
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
372
370
  }
@@ -375,350 +373,369 @@ var regeneratorRuntime$1 = {exports: {}};
375
373
 
376
374
  var _typeof = {exports: {}};
377
375
 
378
- (function (module) {
379
- function _typeof(o) {
380
- "@babel/helpers - typeof";
376
+ var hasRequired_typeof;
377
+
378
+ function require_typeof () {
379
+ if (hasRequired_typeof) return _typeof.exports;
380
+ hasRequired_typeof = 1;
381
+ (function (module) {
382
+ function _typeof(o) {
383
+ "@babel/helpers - typeof";
384
+
385
+ return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
386
+ return typeof o;
387
+ } : function (o) {
388
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
389
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
390
+ }
391
+ module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
392
+ } (_typeof));
393
+ return _typeof.exports;
394
+ }
381
395
 
382
- return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
383
- return typeof o;
384
- } : function (o) {
385
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
386
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
387
- }
388
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
389
- } (_typeof));
390
-
391
- var _typeofExports = _typeof.exports;
392
-
393
- (function (module) {
394
- var _typeof = _typeofExports["default"];
395
- function _regeneratorRuntime() {
396
- module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
397
- return e;
398
- }, module.exports.__esModule = true, module.exports["default"] = module.exports;
399
- var t,
400
- e = {},
401
- r = Object.prototype,
402
- n = r.hasOwnProperty,
403
- o = Object.defineProperty || function (t, e, r) {
404
- t[e] = r.value;
405
- },
406
- i = "function" == typeof Symbol ? Symbol : {},
407
- a = i.iterator || "@@iterator",
408
- c = i.asyncIterator || "@@asyncIterator",
409
- u = i.toStringTag || "@@toStringTag";
410
- function define(t, e, r) {
411
- return Object.defineProperty(t, e, {
412
- value: r,
413
- enumerable: !0,
414
- configurable: !0,
415
- writable: !0
416
- }), t[e];
417
- }
418
- try {
419
- define({}, "");
420
- } catch (t) {
421
- define = function define(t, e, r) {
422
- return t[e] = r;
423
- };
424
- }
425
- function wrap(t, e, r, n) {
426
- var i = e && e.prototype instanceof Generator ? e : Generator,
427
- a = Object.create(i.prototype),
428
- c = new Context(n || []);
429
- return o(a, "_invoke", {
430
- value: makeInvokeMethod(t, r, c)
431
- }), a;
432
- }
433
- function tryCatch(t, e, r) {
434
- try {
435
- return {
436
- type: "normal",
437
- arg: t.call(e, r)
438
- };
439
- } catch (t) {
440
- return {
441
- type: "throw",
442
- arg: t
443
- };
444
- }
445
- }
446
- e.wrap = wrap;
447
- var h = "suspendedStart",
448
- l = "suspendedYield",
449
- f = "executing",
450
- s = "completed",
451
- y = {};
452
- function Generator() {}
453
- function GeneratorFunction() {}
454
- function GeneratorFunctionPrototype() {}
455
- var p = {};
456
- define(p, a, function () {
457
- return this;
458
- });
459
- var d = Object.getPrototypeOf,
460
- v = d && d(d(values([])));
461
- v && v !== r && n.call(v, a) && (p = v);
462
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
463
- function defineIteratorMethods(t) {
464
- ["next", "throw", "return"].forEach(function (e) {
465
- define(t, e, function (t) {
466
- return this._invoke(e, t);
467
- });
468
- });
469
- }
470
- function AsyncIterator(t, e) {
471
- function invoke(r, o, i, a) {
472
- var c = tryCatch(t[r], t, o);
473
- if ("throw" !== c.type) {
474
- var u = c.arg,
475
- h = u.value;
476
- return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
477
- invoke("next", t, i, a);
478
- }, function (t) {
479
- invoke("throw", t, i, a);
480
- }) : e.resolve(h).then(function (t) {
481
- u.value = t, i(u);
482
- }, function (t) {
483
- return invoke("throw", t, i, a);
484
- });
485
- }
486
- a(c.arg);
487
- }
488
- var r;
489
- o(this, "_invoke", {
490
- value: function value(t, n) {
491
- function callInvokeWithMethodAndArg() {
492
- return new e(function (e, r) {
493
- invoke(t, n, e, r);
494
- });
495
- }
496
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
497
- }
498
- });
499
- }
500
- function makeInvokeMethod(e, r, n) {
501
- var o = h;
502
- return function (i, a) {
503
- if (o === f) throw Error("Generator is already running");
504
- if (o === s) {
505
- if ("throw" === i) throw a;
506
- return {
507
- value: t,
508
- done: !0
509
- };
510
- }
511
- for (n.method = i, n.arg = a;;) {
512
- var c = n.delegate;
513
- if (c) {
514
- var u = maybeInvokeDelegate(c, n);
515
- if (u) {
516
- if (u === y) continue;
517
- return u;
518
- }
519
- }
520
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
521
- if (o === h) throw o = s, n.arg;
522
- n.dispatchException(n.arg);
523
- } else "return" === n.method && n.abrupt("return", n.arg);
524
- o = f;
525
- var p = tryCatch(e, r, n);
526
- if ("normal" === p.type) {
527
- if (o = n.done ? s : l, p.arg === y) continue;
528
- return {
529
- value: p.arg,
530
- done: n.done
531
- };
532
- }
533
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
534
- }
535
- };
536
- }
537
- function maybeInvokeDelegate(e, r) {
538
- var n = r.method,
539
- o = e.iterator[n];
540
- if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
541
- var i = tryCatch(o, e.iterator, r.arg);
542
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
543
- var a = i.arg;
544
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
545
- }
546
- function pushTryEntry(t) {
547
- var e = {
548
- tryLoc: t[0]
549
- };
550
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
551
- }
552
- function resetTryEntry(t) {
553
- var e = t.completion || {};
554
- e.type = "normal", delete e.arg, t.completion = e;
555
- }
556
- function Context(t) {
557
- this.tryEntries = [{
558
- tryLoc: "root"
559
- }], t.forEach(pushTryEntry, this), this.reset(!0);
560
- }
561
- function values(e) {
562
- if (e || "" === e) {
563
- var r = e[a];
564
- if (r) return r.call(e);
565
- if ("function" == typeof e.next) return e;
566
- if (!isNaN(e.length)) {
567
- var o = -1,
568
- i = function next() {
569
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
570
- return next.value = t, next.done = !0, next;
571
- };
572
- return i.next = i;
573
- }
574
- }
575
- throw new TypeError(_typeof(e) + " is not iterable");
396
+ var hasRequiredRegeneratorRuntime;
397
+
398
+ function requireRegeneratorRuntime () {
399
+ if (hasRequiredRegeneratorRuntime) return regeneratorRuntime$1.exports;
400
+ hasRequiredRegeneratorRuntime = 1;
401
+ (function (module) {
402
+ var _typeof = require_typeof()["default"];
403
+ function _regeneratorRuntime() {
404
+ module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
405
+ return e;
406
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
407
+ var t,
408
+ e = {},
409
+ r = Object.prototype,
410
+ n = r.hasOwnProperty,
411
+ o = Object.defineProperty || function (t, e, r) {
412
+ t[e] = r.value;
413
+ },
414
+ i = "function" == typeof Symbol ? Symbol : {},
415
+ a = i.iterator || "@@iterator",
416
+ c = i.asyncIterator || "@@asyncIterator",
417
+ u = i.toStringTag || "@@toStringTag";
418
+ function define(t, e, r) {
419
+ return Object.defineProperty(t, e, {
420
+ value: r,
421
+ enumerable: !0,
422
+ configurable: !0,
423
+ writable: !0
424
+ }), t[e];
425
+ }
426
+ try {
427
+ define({}, "");
428
+ } catch (t) {
429
+ define = function define(t, e, r) {
430
+ return t[e] = r;
431
+ };
432
+ }
433
+ function wrap(t, e, r, n) {
434
+ var i = e && e.prototype instanceof Generator ? e : Generator,
435
+ a = Object.create(i.prototype),
436
+ c = new Context(n || []);
437
+ return o(a, "_invoke", {
438
+ value: makeInvokeMethod(t, r, c)
439
+ }), a;
440
+ }
441
+ function tryCatch(t, e, r) {
442
+ try {
443
+ return {
444
+ type: "normal",
445
+ arg: t.call(e, r)
446
+ };
447
+ } catch (t) {
448
+ return {
449
+ type: "throw",
450
+ arg: t
451
+ };
452
+ }
453
+ }
454
+ e.wrap = wrap;
455
+ var h = "suspendedStart",
456
+ l = "suspendedYield",
457
+ f = "executing",
458
+ s = "completed",
459
+ y = {};
460
+ function Generator() {}
461
+ function GeneratorFunction() {}
462
+ function GeneratorFunctionPrototype() {}
463
+ var p = {};
464
+ define(p, a, function () {
465
+ return this;
466
+ });
467
+ var d = Object.getPrototypeOf,
468
+ v = d && d(d(values([])));
469
+ v && v !== r && n.call(v, a) && (p = v);
470
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
471
+ function defineIteratorMethods(t) {
472
+ ["next", "throw", "return"].forEach(function (e) {
473
+ define(t, e, function (t) {
474
+ return this._invoke(e, t);
475
+ });
476
+ });
477
+ }
478
+ function AsyncIterator(t, e) {
479
+ function invoke(r, o, i, a) {
480
+ var c = tryCatch(t[r], t, o);
481
+ if ("throw" !== c.type) {
482
+ var u = c.arg,
483
+ h = u.value;
484
+ return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
485
+ invoke("next", t, i, a);
486
+ }, function (t) {
487
+ invoke("throw", t, i, a);
488
+ }) : e.resolve(h).then(function (t) {
489
+ u.value = t, i(u);
490
+ }, function (t) {
491
+ return invoke("throw", t, i, a);
492
+ });
493
+ }
494
+ a(c.arg);
495
+ }
496
+ var r;
497
+ o(this, "_invoke", {
498
+ value: function value(t, n) {
499
+ function callInvokeWithMethodAndArg() {
500
+ return new e(function (e, r) {
501
+ invoke(t, n, e, r);
502
+ });
503
+ }
504
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
505
+ }
506
+ });
507
+ }
508
+ function makeInvokeMethod(e, r, n) {
509
+ var o = h;
510
+ return function (i, a) {
511
+ if (o === f) throw Error("Generator is already running");
512
+ if (o === s) {
513
+ if ("throw" === i) throw a;
514
+ return {
515
+ value: t,
516
+ done: !0
517
+ };
518
+ }
519
+ for (n.method = i, n.arg = a;;) {
520
+ var c = n.delegate;
521
+ if (c) {
522
+ var u = maybeInvokeDelegate(c, n);
523
+ if (u) {
524
+ if (u === y) continue;
525
+ return u;
526
+ }
527
+ }
528
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
529
+ if (o === h) throw o = s, n.arg;
530
+ n.dispatchException(n.arg);
531
+ } else "return" === n.method && n.abrupt("return", n.arg);
532
+ o = f;
533
+ var p = tryCatch(e, r, n);
534
+ if ("normal" === p.type) {
535
+ if (o = n.done ? s : l, p.arg === y) continue;
536
+ return {
537
+ value: p.arg,
538
+ done: n.done
539
+ };
540
+ }
541
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
542
+ }
543
+ };
544
+ }
545
+ function maybeInvokeDelegate(e, r) {
546
+ var n = r.method,
547
+ o = e.iterator[n];
548
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
549
+ var i = tryCatch(o, e.iterator, r.arg);
550
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
551
+ var a = i.arg;
552
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
553
+ }
554
+ function pushTryEntry(t) {
555
+ var e = {
556
+ tryLoc: t[0]
557
+ };
558
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
559
+ }
560
+ function resetTryEntry(t) {
561
+ var e = t.completion || {};
562
+ e.type = "normal", delete e.arg, t.completion = e;
563
+ }
564
+ function Context(t) {
565
+ this.tryEntries = [{
566
+ tryLoc: "root"
567
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
568
+ }
569
+ function values(e) {
570
+ if (e || "" === e) {
571
+ var r = e[a];
572
+ if (r) return r.call(e);
573
+ if ("function" == typeof e.next) return e;
574
+ if (!isNaN(e.length)) {
575
+ var o = -1,
576
+ i = function next() {
577
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
578
+ return next.value = t, next.done = !0, next;
579
+ };
580
+ return i.next = i;
581
+ }
582
+ }
583
+ throw new TypeError(_typeof(e) + " is not iterable");
584
+ }
585
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
586
+ value: GeneratorFunctionPrototype,
587
+ configurable: !0
588
+ }), o(GeneratorFunctionPrototype, "constructor", {
589
+ value: GeneratorFunction,
590
+ configurable: !0
591
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
592
+ var e = "function" == typeof t && t.constructor;
593
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
594
+ }, e.mark = function (t) {
595
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
596
+ }, e.awrap = function (t) {
597
+ return {
598
+ __await: t
599
+ };
600
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
601
+ return this;
602
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
603
+ void 0 === i && (i = Promise);
604
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
605
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
606
+ return t.done ? t.value : a.next();
607
+ });
608
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
609
+ return this;
610
+ }), define(g, "toString", function () {
611
+ return "[object Generator]";
612
+ }), e.keys = function (t) {
613
+ var e = Object(t),
614
+ r = [];
615
+ for (var n in e) r.push(n);
616
+ return r.reverse(), function next() {
617
+ for (; r.length;) {
618
+ var t = r.pop();
619
+ if (t in e) return next.value = t, next.done = !1, next;
620
+ }
621
+ return next.done = !0, next;
622
+ };
623
+ }, e.values = values, Context.prototype = {
624
+ constructor: Context,
625
+ reset: function reset(e) {
626
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
627
+ },
628
+ stop: function stop() {
629
+ this.done = !0;
630
+ var t = this.tryEntries[0].completion;
631
+ if ("throw" === t.type) throw t.arg;
632
+ return this.rval;
633
+ },
634
+ dispatchException: function dispatchException(e) {
635
+ if (this.done) throw e;
636
+ var r = this;
637
+ function handle(n, o) {
638
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
639
+ }
640
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
641
+ var i = this.tryEntries[o],
642
+ a = i.completion;
643
+ if ("root" === i.tryLoc) return handle("end");
644
+ if (i.tryLoc <= this.prev) {
645
+ var c = n.call(i, "catchLoc"),
646
+ u = n.call(i, "finallyLoc");
647
+ if (c && u) {
648
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
649
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
650
+ } else if (c) {
651
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
652
+ } else {
653
+ if (!u) throw Error("try statement without catch or finally");
654
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
655
+ }
656
+ }
657
+ }
658
+ },
659
+ abrupt: function abrupt(t, e) {
660
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
661
+ var o = this.tryEntries[r];
662
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
663
+ var i = o;
664
+ break;
665
+ }
666
+ }
667
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
668
+ var a = i ? i.completion : {};
669
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
670
+ },
671
+ complete: function complete(t, e) {
672
+ if ("throw" === t.type) throw t.arg;
673
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
674
+ },
675
+ finish: function finish(t) {
676
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
677
+ var r = this.tryEntries[e];
678
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
679
+ }
680
+ },
681
+ "catch": function _catch(t) {
682
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
683
+ var r = this.tryEntries[e];
684
+ if (r.tryLoc === t) {
685
+ var n = r.completion;
686
+ if ("throw" === n.type) {
687
+ var o = n.arg;
688
+ resetTryEntry(r);
689
+ }
690
+ return o;
691
+ }
692
+ }
693
+ throw Error("illegal catch attempt");
694
+ },
695
+ delegateYield: function delegateYield(e, r, n) {
696
+ return this.delegate = {
697
+ iterator: values(e),
698
+ resultName: r,
699
+ nextLoc: n
700
+ }, "next" === this.method && (this.arg = t), y;
701
+ }
702
+ }, e;
703
+ }
704
+ module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
705
+ } (regeneratorRuntime$1));
706
+ return regeneratorRuntime$1.exports;
707
+ }
708
+
709
+ var regenerator;
710
+ var hasRequiredRegenerator;
711
+
712
+ function requireRegenerator () {
713
+ if (hasRequiredRegenerator) return regenerator;
714
+ hasRequiredRegenerator = 1;
715
+ // TODO(Babel 8): Remove this file.
716
+
717
+ var runtime = requireRegeneratorRuntime()();
718
+ regenerator = runtime;
719
+
720
+ // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
721
+ try {
722
+ regeneratorRuntime = runtime;
723
+ } catch (accidentalStrictMode) {
724
+ if (typeof globalThis === "object") {
725
+ globalThis.regeneratorRuntime = runtime;
726
+ } else {
727
+ Function("r", "regeneratorRuntime = r")(runtime);
576
728
  }
577
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
578
- value: GeneratorFunctionPrototype,
579
- configurable: !0
580
- }), o(GeneratorFunctionPrototype, "constructor", {
581
- value: GeneratorFunction,
582
- configurable: !0
583
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
584
- var e = "function" == typeof t && t.constructor;
585
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
586
- }, e.mark = function (t) {
587
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
588
- }, e.awrap = function (t) {
589
- return {
590
- __await: t
591
- };
592
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
593
- return this;
594
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
595
- void 0 === i && (i = Promise);
596
- var a = new AsyncIterator(wrap(t, r, n, o), i);
597
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
598
- return t.done ? t.value : a.next();
599
- });
600
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
601
- return this;
602
- }), define(g, "toString", function () {
603
- return "[object Generator]";
604
- }), e.keys = function (t) {
605
- var e = Object(t),
606
- r = [];
607
- for (var n in e) r.push(n);
608
- return r.reverse(), function next() {
609
- for (; r.length;) {
610
- var t = r.pop();
611
- if (t in e) return next.value = t, next.done = !1, next;
612
- }
613
- return next.done = !0, next;
614
- };
615
- }, e.values = values, Context.prototype = {
616
- constructor: Context,
617
- reset: function reset(e) {
618
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
619
- },
620
- stop: function stop() {
621
- this.done = !0;
622
- var t = this.tryEntries[0].completion;
623
- if ("throw" === t.type) throw t.arg;
624
- return this.rval;
625
- },
626
- dispatchException: function dispatchException(e) {
627
- if (this.done) throw e;
628
- var r = this;
629
- function handle(n, o) {
630
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
631
- }
632
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
633
- var i = this.tryEntries[o],
634
- a = i.completion;
635
- if ("root" === i.tryLoc) return handle("end");
636
- if (i.tryLoc <= this.prev) {
637
- var c = n.call(i, "catchLoc"),
638
- u = n.call(i, "finallyLoc");
639
- if (c && u) {
640
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
641
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
642
- } else if (c) {
643
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
644
- } else {
645
- if (!u) throw Error("try statement without catch or finally");
646
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
647
- }
648
- }
649
- }
650
- },
651
- abrupt: function abrupt(t, e) {
652
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
653
- var o = this.tryEntries[r];
654
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
655
- var i = o;
656
- break;
657
- }
658
- }
659
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
660
- var a = i ? i.completion : {};
661
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
662
- },
663
- complete: function complete(t, e) {
664
- if ("throw" === t.type) throw t.arg;
665
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
666
- },
667
- finish: function finish(t) {
668
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
669
- var r = this.tryEntries[e];
670
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
671
- }
672
- },
673
- "catch": function _catch(t) {
674
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
675
- var r = this.tryEntries[e];
676
- if (r.tryLoc === t) {
677
- var n = r.completion;
678
- if ("throw" === n.type) {
679
- var o = n.arg;
680
- resetTryEntry(r);
681
- }
682
- return o;
683
- }
684
- }
685
- throw Error("illegal catch attempt");
686
- },
687
- delegateYield: function delegateYield(e, r, n) {
688
- return this.delegate = {
689
- iterator: values(e),
690
- resultName: r,
691
- nextLoc: n
692
- }, "next" === this.method && (this.arg = t), y;
693
- }
694
- }, e;
695
729
  }
696
- module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
697
- } (regeneratorRuntime$1));
698
-
699
- var regeneratorRuntimeExports = regeneratorRuntime$1.exports;
700
-
701
- // TODO(Babel 8): Remove this file.
702
-
703
- var runtime = regeneratorRuntimeExports();
704
- var regenerator = runtime;
705
-
706
- // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
707
- try {
708
- regeneratorRuntime = runtime;
709
- } catch (accidentalStrictMode) {
710
- if (typeof globalThis === "object") {
711
- globalThis.regeneratorRuntime = runtime;
712
- } else {
713
- Function("r", "regeneratorRuntime = r")(runtime);
714
- }
730
+ return regenerator;
715
731
  }
716
732
 
717
- var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regenerator);
733
+ var regeneratorExports = requireRegenerator();
734
+ var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regeneratorExports);
718
735
 
719
- var version = "3.1.8";
736
+ var version = "3.2.0";
720
737
 
721
- var loglevel = {exports: {}};
738
+ var loglevel$1 = {exports: {}};
722
739
 
723
740
  /*
724
741
  * loglevel - https://github.com/pimterry/loglevel
@@ -726,358 +743,366 @@ var loglevel = {exports: {}};
726
743
  * Copyright (c) 2013 Tim Perry
727
744
  * Licensed under the MIT license.
728
745
  */
746
+ var loglevel = loglevel$1.exports;
747
+
748
+ var hasRequiredLoglevel;
749
+
750
+ function requireLoglevel () {
751
+ if (hasRequiredLoglevel) return loglevel$1.exports;
752
+ hasRequiredLoglevel = 1;
753
+ (function (module) {
754
+ (function (root, definition) {
755
+ if (module.exports) {
756
+ module.exports = definition();
757
+ } else {
758
+ root.log = definition();
759
+ }
760
+ }(loglevel, function () {
761
+
762
+ // Slightly dubious tricks to cut down minimized file size
763
+ var noop = function() {};
764
+ var undefinedType = "undefined";
765
+ var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (
766
+ /Trident\/|MSIE /.test(window.navigator.userAgent)
767
+ );
768
+
769
+ var logMethods = [
770
+ "trace",
771
+ "debug",
772
+ "info",
773
+ "warn",
774
+ "error"
775
+ ];
776
+
777
+ var _loggersByName = {};
778
+ var defaultLogger = null;
779
+
780
+ // Cross-browser bind equivalent that works at least back to IE6
781
+ function bindMethod(obj, methodName) {
782
+ var method = obj[methodName];
783
+ if (typeof method.bind === 'function') {
784
+ return method.bind(obj);
785
+ } else {
786
+ try {
787
+ return Function.prototype.bind.call(method, obj);
788
+ } catch (e) {
789
+ // Missing bind shim or IE8 + Modernizr, fallback to wrapping
790
+ return function() {
791
+ return Function.prototype.apply.apply(method, [obj, arguments]);
792
+ };
793
+ }
794
+ }
795
+ }
796
+
797
+ // Trace() doesn't print the message in IE, so for that case we need to wrap it
798
+ function traceForIE() {
799
+ if (console.log) {
800
+ if (console.log.apply) {
801
+ console.log.apply(console, arguments);
802
+ } else {
803
+ // In old IE, native console methods themselves don't have apply().
804
+ Function.prototype.apply.apply(console.log, [console, arguments]);
805
+ }
806
+ }
807
+ if (console.trace) console.trace();
808
+ }
809
+
810
+ // Build the best logging method possible for this env
811
+ // Wherever possible we want to bind, not wrap, to preserve stack traces
812
+ function realMethod(methodName) {
813
+ if (methodName === 'debug') {
814
+ methodName = 'log';
815
+ }
816
+
817
+ if (typeof console === undefinedType) {
818
+ return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives
819
+ } else if (methodName === 'trace' && isIE) {
820
+ return traceForIE;
821
+ } else if (console[methodName] !== undefined) {
822
+ return bindMethod(console, methodName);
823
+ } else if (console.log !== undefined) {
824
+ return bindMethod(console, 'log');
825
+ } else {
826
+ return noop;
827
+ }
828
+ }
829
+
830
+ // These private functions always need `this` to be set properly
831
+
832
+ function replaceLoggingMethods() {
833
+ /*jshint validthis:true */
834
+ var level = this.getLevel();
835
+
836
+ // Replace the actual methods.
837
+ for (var i = 0; i < logMethods.length; i++) {
838
+ var methodName = logMethods[i];
839
+ this[methodName] = (i < level) ?
840
+ noop :
841
+ this.methodFactory(methodName, level, this.name);
842
+ }
843
+
844
+ // Define log.log as an alias for log.debug
845
+ this.log = this.debug;
846
+
847
+ // Return any important warnings.
848
+ if (typeof console === undefinedType && level < this.levels.SILENT) {
849
+ return "No console available for logging";
850
+ }
851
+ }
852
+
853
+ // In old IE versions, the console isn't present until you first open it.
854
+ // We build realMethod() replacements here that regenerate logging methods
855
+ function enableLoggingWhenConsoleArrives(methodName) {
856
+ return function () {
857
+ if (typeof console !== undefinedType) {
858
+ replaceLoggingMethods.call(this);
859
+ this[methodName].apply(this, arguments);
860
+ }
861
+ };
862
+ }
863
+
864
+ // By default, we use closely bound real methods wherever possible, and
865
+ // otherwise we wait for a console to appear, and then try again.
866
+ function defaultMethodFactory(methodName, _level, _loggerName) {
867
+ /*jshint validthis:true */
868
+ return realMethod(methodName) ||
869
+ enableLoggingWhenConsoleArrives.apply(this, arguments);
870
+ }
871
+
872
+ function Logger(name, factory) {
873
+ // Private instance variables.
874
+ var self = this;
875
+ /**
876
+ * The level inherited from a parent logger (or a global default). We
877
+ * cache this here rather than delegating to the parent so that it stays
878
+ * in sync with the actual logging methods that we have installed (the
879
+ * parent could change levels but we might not have rebuilt the loggers
880
+ * in this child yet).
881
+ * @type {number}
882
+ */
883
+ var inheritedLevel;
884
+ /**
885
+ * The default level for this logger, if any. If set, this overrides
886
+ * `inheritedLevel`.
887
+ * @type {number|null}
888
+ */
889
+ var defaultLevel;
890
+ /**
891
+ * A user-specific level for this logger. If set, this overrides
892
+ * `defaultLevel`.
893
+ * @type {number|null}
894
+ */
895
+ var userLevel;
896
+
897
+ var storageKey = "loglevel";
898
+ if (typeof name === "string") {
899
+ storageKey += ":" + name;
900
+ } else if (typeof name === "symbol") {
901
+ storageKey = undefined;
902
+ }
903
+
904
+ function persistLevelIfPossible(levelNum) {
905
+ var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
906
+
907
+ if (typeof window === undefinedType || !storageKey) return;
908
+
909
+ // Use localStorage if available
910
+ try {
911
+ window.localStorage[storageKey] = levelName;
912
+ return;
913
+ } catch (ignore) {}
914
+
915
+ // Use session cookie as fallback
916
+ try {
917
+ window.document.cookie =
918
+ encodeURIComponent(storageKey) + "=" + levelName + ";";
919
+ } catch (ignore) {}
920
+ }
921
+
922
+ function getPersistedLevel() {
923
+ var storedLevel;
924
+
925
+ if (typeof window === undefinedType || !storageKey) return;
926
+
927
+ try {
928
+ storedLevel = window.localStorage[storageKey];
929
+ } catch (ignore) {}
930
+
931
+ // Fallback to cookies if local storage gives us nothing
932
+ if (typeof storedLevel === undefinedType) {
933
+ try {
934
+ var cookie = window.document.cookie;
935
+ var cookieName = encodeURIComponent(storageKey);
936
+ var location = cookie.indexOf(cookieName + "=");
937
+ if (location !== -1) {
938
+ storedLevel = /^([^;]+)/.exec(
939
+ cookie.slice(location + cookieName.length + 1)
940
+ )[1];
941
+ }
942
+ } catch (ignore) {}
943
+ }
944
+
945
+ // If the stored level is not valid, treat it as if nothing was stored.
946
+ if (self.levels[storedLevel] === undefined) {
947
+ storedLevel = undefined;
948
+ }
949
+
950
+ return storedLevel;
951
+ }
952
+
953
+ function clearPersistedLevel() {
954
+ if (typeof window === undefinedType || !storageKey) return;
955
+
956
+ // Use localStorage if available
957
+ try {
958
+ window.localStorage.removeItem(storageKey);
959
+ } catch (ignore) {}
960
+
961
+ // Use session cookie as fallback
962
+ try {
963
+ window.document.cookie =
964
+ encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
965
+ } catch (ignore) {}
966
+ }
967
+
968
+ function normalizeLevel(input) {
969
+ var level = input;
970
+ if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
971
+ level = self.levels[level.toUpperCase()];
972
+ }
973
+ if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
974
+ return level;
975
+ } else {
976
+ throw new TypeError("log.setLevel() called with invalid level: " + input);
977
+ }
978
+ }
979
+
980
+ /*
981
+ *
982
+ * Public logger API - see https://github.com/pimterry/loglevel for details
983
+ *
984
+ */
985
+
986
+ self.name = name;
987
+
988
+ self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
989
+ "ERROR": 4, "SILENT": 5};
990
+
991
+ self.methodFactory = factory || defaultMethodFactory;
992
+
993
+ self.getLevel = function () {
994
+ if (userLevel != null) {
995
+ return userLevel;
996
+ } else if (defaultLevel != null) {
997
+ return defaultLevel;
998
+ } else {
999
+ return inheritedLevel;
1000
+ }
1001
+ };
1002
+
1003
+ self.setLevel = function (level, persist) {
1004
+ userLevel = normalizeLevel(level);
1005
+ if (persist !== false) { // defaults to true
1006
+ persistLevelIfPossible(userLevel);
1007
+ }
1008
+
1009
+ // NOTE: in v2, this should call rebuild(), which updates children.
1010
+ return replaceLoggingMethods.call(self);
1011
+ };
1012
+
1013
+ self.setDefaultLevel = function (level) {
1014
+ defaultLevel = normalizeLevel(level);
1015
+ if (!getPersistedLevel()) {
1016
+ self.setLevel(level, false);
1017
+ }
1018
+ };
1019
+
1020
+ self.resetLevel = function () {
1021
+ userLevel = null;
1022
+ clearPersistedLevel();
1023
+ replaceLoggingMethods.call(self);
1024
+ };
1025
+
1026
+ self.enableAll = function(persist) {
1027
+ self.setLevel(self.levels.TRACE, persist);
1028
+ };
1029
+
1030
+ self.disableAll = function(persist) {
1031
+ self.setLevel(self.levels.SILENT, persist);
1032
+ };
1033
+
1034
+ self.rebuild = function () {
1035
+ if (defaultLogger !== self) {
1036
+ inheritedLevel = normalizeLevel(defaultLogger.getLevel());
1037
+ }
1038
+ replaceLoggingMethods.call(self);
1039
+
1040
+ if (defaultLogger === self) {
1041
+ for (var childName in _loggersByName) {
1042
+ _loggersByName[childName].rebuild();
1043
+ }
1044
+ }
1045
+ };
1046
+
1047
+ // Initialize all the internal levels.
1048
+ inheritedLevel = normalizeLevel(
1049
+ defaultLogger ? defaultLogger.getLevel() : "WARN"
1050
+ );
1051
+ var initialLevel = getPersistedLevel();
1052
+ if (initialLevel != null) {
1053
+ userLevel = normalizeLevel(initialLevel);
1054
+ }
1055
+ replaceLoggingMethods.call(self);
1056
+ }
1057
+
1058
+ /*
1059
+ *
1060
+ * Top-level API
1061
+ *
1062
+ */
1063
+
1064
+ defaultLogger = new Logger();
1065
+
1066
+ defaultLogger.getLogger = function getLogger(name) {
1067
+ if ((typeof name !== "symbol" && typeof name !== "string") || name === "") {
1068
+ throw new TypeError("You must supply a name when creating a logger.");
1069
+ }
1070
+
1071
+ var logger = _loggersByName[name];
1072
+ if (!logger) {
1073
+ logger = _loggersByName[name] = new Logger(
1074
+ name,
1075
+ defaultLogger.methodFactory
1076
+ );
1077
+ }
1078
+ return logger;
1079
+ };
1080
+
1081
+ // Grab the current global log variable in case of overwrite
1082
+ var _log = (typeof window !== undefinedType) ? window.log : undefined;
1083
+ defaultLogger.noConflict = function() {
1084
+ if (typeof window !== undefinedType &&
1085
+ window.log === defaultLogger) {
1086
+ window.log = _log;
1087
+ }
1088
+
1089
+ return defaultLogger;
1090
+ };
1091
+
1092
+ defaultLogger.getLoggers = function getLoggers() {
1093
+ return _loggersByName;
1094
+ };
1095
+
1096
+ // ES6 default export, for compatibility
1097
+ defaultLogger['default'] = defaultLogger;
1098
+
1099
+ return defaultLogger;
1100
+ }));
1101
+ } (loglevel$1));
1102
+ return loglevel$1.exports;
1103
+ }
729
1104
 
730
- (function (module) {
731
- (function (root, definition) {
732
- if (module.exports) {
733
- module.exports = definition();
734
- } else {
735
- root.log = definition();
736
- }
737
- }(commonjsGlobal, function () {
738
-
739
- // Slightly dubious tricks to cut down minimized file size
740
- var noop = function() {};
741
- var undefinedType = "undefined";
742
- var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (
743
- /Trident\/|MSIE /.test(window.navigator.userAgent)
744
- );
745
-
746
- var logMethods = [
747
- "trace",
748
- "debug",
749
- "info",
750
- "warn",
751
- "error"
752
- ];
753
-
754
- var _loggersByName = {};
755
- var defaultLogger = null;
756
-
757
- // Cross-browser bind equivalent that works at least back to IE6
758
- function bindMethod(obj, methodName) {
759
- var method = obj[methodName];
760
- if (typeof method.bind === 'function') {
761
- return method.bind(obj);
762
- } else {
763
- try {
764
- return Function.prototype.bind.call(method, obj);
765
- } catch (e) {
766
- // Missing bind shim or IE8 + Modernizr, fallback to wrapping
767
- return function() {
768
- return Function.prototype.apply.apply(method, [obj, arguments]);
769
- };
770
- }
771
- }
772
- }
773
-
774
- // Trace() doesn't print the message in IE, so for that case we need to wrap it
775
- function traceForIE() {
776
- if (console.log) {
777
- if (console.log.apply) {
778
- console.log.apply(console, arguments);
779
- } else {
780
- // In old IE, native console methods themselves don't have apply().
781
- Function.prototype.apply.apply(console.log, [console, arguments]);
782
- }
783
- }
784
- if (console.trace) console.trace();
785
- }
786
-
787
- // Build the best logging method possible for this env
788
- // Wherever possible we want to bind, not wrap, to preserve stack traces
789
- function realMethod(methodName) {
790
- if (methodName === 'debug') {
791
- methodName = 'log';
792
- }
793
-
794
- if (typeof console === undefinedType) {
795
- return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives
796
- } else if (methodName === 'trace' && isIE) {
797
- return traceForIE;
798
- } else if (console[methodName] !== undefined) {
799
- return bindMethod(console, methodName);
800
- } else if (console.log !== undefined) {
801
- return bindMethod(console, 'log');
802
- } else {
803
- return noop;
804
- }
805
- }
806
-
807
- // These private functions always need `this` to be set properly
808
-
809
- function replaceLoggingMethods() {
810
- /*jshint validthis:true */
811
- var level = this.getLevel();
812
-
813
- // Replace the actual methods.
814
- for (var i = 0; i < logMethods.length; i++) {
815
- var methodName = logMethods[i];
816
- this[methodName] = (i < level) ?
817
- noop :
818
- this.methodFactory(methodName, level, this.name);
819
- }
820
-
821
- // Define log.log as an alias for log.debug
822
- this.log = this.debug;
823
-
824
- // Return any important warnings.
825
- if (typeof console === undefinedType && level < this.levels.SILENT) {
826
- return "No console available for logging";
827
- }
828
- }
829
-
830
- // In old IE versions, the console isn't present until you first open it.
831
- // We build realMethod() replacements here that regenerate logging methods
832
- function enableLoggingWhenConsoleArrives(methodName) {
833
- return function () {
834
- if (typeof console !== undefinedType) {
835
- replaceLoggingMethods.call(this);
836
- this[methodName].apply(this, arguments);
837
- }
838
- };
839
- }
840
-
841
- // By default, we use closely bound real methods wherever possible, and
842
- // otherwise we wait for a console to appear, and then try again.
843
- function defaultMethodFactory(methodName, _level, _loggerName) {
844
- /*jshint validthis:true */
845
- return realMethod(methodName) ||
846
- enableLoggingWhenConsoleArrives.apply(this, arguments);
847
- }
848
-
849
- function Logger(name, factory) {
850
- // Private instance variables.
851
- var self = this;
852
- /**
853
- * The level inherited from a parent logger (or a global default). We
854
- * cache this here rather than delegating to the parent so that it stays
855
- * in sync with the actual logging methods that we have installed (the
856
- * parent could change levels but we might not have rebuilt the loggers
857
- * in this child yet).
858
- * @type {number}
859
- */
860
- var inheritedLevel;
861
- /**
862
- * The default level for this logger, if any. If set, this overrides
863
- * `inheritedLevel`.
864
- * @type {number|null}
865
- */
866
- var defaultLevel;
867
- /**
868
- * A user-specific level for this logger. If set, this overrides
869
- * `defaultLevel`.
870
- * @type {number|null}
871
- */
872
- var userLevel;
873
-
874
- var storageKey = "loglevel";
875
- if (typeof name === "string") {
876
- storageKey += ":" + name;
877
- } else if (typeof name === "symbol") {
878
- storageKey = undefined;
879
- }
880
-
881
- function persistLevelIfPossible(levelNum) {
882
- var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
883
-
884
- if (typeof window === undefinedType || !storageKey) return;
885
-
886
- // Use localStorage if available
887
- try {
888
- window.localStorage[storageKey] = levelName;
889
- return;
890
- } catch (ignore) {}
891
-
892
- // Use session cookie as fallback
893
- try {
894
- window.document.cookie =
895
- encodeURIComponent(storageKey) + "=" + levelName + ";";
896
- } catch (ignore) {}
897
- }
898
-
899
- function getPersistedLevel() {
900
- var storedLevel;
901
-
902
- if (typeof window === undefinedType || !storageKey) return;
903
-
904
- try {
905
- storedLevel = window.localStorage[storageKey];
906
- } catch (ignore) {}
907
-
908
- // Fallback to cookies if local storage gives us nothing
909
- if (typeof storedLevel === undefinedType) {
910
- try {
911
- var cookie = window.document.cookie;
912
- var cookieName = encodeURIComponent(storageKey);
913
- var location = cookie.indexOf(cookieName + "=");
914
- if (location !== -1) {
915
- storedLevel = /^([^;]+)/.exec(
916
- cookie.slice(location + cookieName.length + 1)
917
- )[1];
918
- }
919
- } catch (ignore) {}
920
- }
921
-
922
- // If the stored level is not valid, treat it as if nothing was stored.
923
- if (self.levels[storedLevel] === undefined) {
924
- storedLevel = undefined;
925
- }
926
-
927
- return storedLevel;
928
- }
929
-
930
- function clearPersistedLevel() {
931
- if (typeof window === undefinedType || !storageKey) return;
932
-
933
- // Use localStorage if available
934
- try {
935
- window.localStorage.removeItem(storageKey);
936
- } catch (ignore) {}
937
-
938
- // Use session cookie as fallback
939
- try {
940
- window.document.cookie =
941
- encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
942
- } catch (ignore) {}
943
- }
944
-
945
- function normalizeLevel(input) {
946
- var level = input;
947
- if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
948
- level = self.levels[level.toUpperCase()];
949
- }
950
- if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
951
- return level;
952
- } else {
953
- throw new TypeError("log.setLevel() called with invalid level: " + input);
954
- }
955
- }
956
-
957
- /*
958
- *
959
- * Public logger API - see https://github.com/pimterry/loglevel for details
960
- *
961
- */
962
-
963
- self.name = name;
964
-
965
- self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
966
- "ERROR": 4, "SILENT": 5};
967
-
968
- self.methodFactory = factory || defaultMethodFactory;
969
-
970
- self.getLevel = function () {
971
- if (userLevel != null) {
972
- return userLevel;
973
- } else if (defaultLevel != null) {
974
- return defaultLevel;
975
- } else {
976
- return inheritedLevel;
977
- }
978
- };
979
-
980
- self.setLevel = function (level, persist) {
981
- userLevel = normalizeLevel(level);
982
- if (persist !== false) { // defaults to true
983
- persistLevelIfPossible(userLevel);
984
- }
985
-
986
- // NOTE: in v2, this should call rebuild(), which updates children.
987
- return replaceLoggingMethods.call(self);
988
- };
989
-
990
- self.setDefaultLevel = function (level) {
991
- defaultLevel = normalizeLevel(level);
992
- if (!getPersistedLevel()) {
993
- self.setLevel(level, false);
994
- }
995
- };
996
-
997
- self.resetLevel = function () {
998
- userLevel = null;
999
- clearPersistedLevel();
1000
- replaceLoggingMethods.call(self);
1001
- };
1002
-
1003
- self.enableAll = function(persist) {
1004
- self.setLevel(self.levels.TRACE, persist);
1005
- };
1006
-
1007
- self.disableAll = function(persist) {
1008
- self.setLevel(self.levels.SILENT, persist);
1009
- };
1010
-
1011
- self.rebuild = function () {
1012
- if (defaultLogger !== self) {
1013
- inheritedLevel = normalizeLevel(defaultLogger.getLevel());
1014
- }
1015
- replaceLoggingMethods.call(self);
1016
-
1017
- if (defaultLogger === self) {
1018
- for (var childName in _loggersByName) {
1019
- _loggersByName[childName].rebuild();
1020
- }
1021
- }
1022
- };
1023
-
1024
- // Initialize all the internal levels.
1025
- inheritedLevel = normalizeLevel(
1026
- defaultLogger ? defaultLogger.getLevel() : "WARN"
1027
- );
1028
- var initialLevel = getPersistedLevel();
1029
- if (initialLevel != null) {
1030
- userLevel = normalizeLevel(initialLevel);
1031
- }
1032
- replaceLoggingMethods.call(self);
1033
- }
1034
-
1035
- /*
1036
- *
1037
- * Top-level API
1038
- *
1039
- */
1040
-
1041
- defaultLogger = new Logger();
1042
-
1043
- defaultLogger.getLogger = function getLogger(name) {
1044
- if ((typeof name !== "symbol" && typeof name !== "string") || name === "") {
1045
- throw new TypeError("You must supply a name when creating a logger.");
1046
- }
1047
-
1048
- var logger = _loggersByName[name];
1049
- if (!logger) {
1050
- logger = _loggersByName[name] = new Logger(
1051
- name,
1052
- defaultLogger.methodFactory
1053
- );
1054
- }
1055
- return logger;
1056
- };
1057
-
1058
- // Grab the current global log variable in case of overwrite
1059
- var _log = (typeof window !== undefinedType) ? window.log : undefined;
1060
- defaultLogger.noConflict = function() {
1061
- if (typeof window !== undefinedType &&
1062
- window.log === defaultLogger) {
1063
- window.log = _log;
1064
- }
1065
-
1066
- return defaultLogger;
1067
- };
1068
-
1069
- defaultLogger.getLoggers = function getLoggers() {
1070
- return _loggersByName;
1071
- };
1072
-
1073
- // ES6 default export, for compatibility
1074
- defaultLogger['default'] = defaultLogger;
1075
-
1076
- return defaultLogger;
1077
- }));
1078
- } (loglevel));
1079
-
1080
- var loglevelExports = loglevel.exports;
1105
+ var loglevelExports = requireLoglevel();
1081
1106
  var log = /*@__PURE__*/getDefaultExportFromCjs(loglevelExports);
1082
1107
 
1083
1108
  log.setLevel('info');