@builderbot/provider-sherpa 1.4.3-y.2 → 1.4.3-y.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.cjs +3813 -217
  2. package/dist/index.mjs +3827 -231
  3. package/package.json +3 -3
package/dist/index.cjs CHANGED
@@ -22,15 +22,17 @@ var require$$7 = require('url');
22
22
  var require$$0$a = require('buffer');
23
23
  var require$$4$1 = require('http');
24
24
  var require$$5$1 = require('https');
25
- var require$$1$1 = require('tty');
26
- var require$$1$2 = require('crypto');
27
- var require$$0$g = require('sharp');
28
- var require$$0$f = require('fluent-ffmpeg');
25
+ var require$$0$f = require('tty');
26
+ var require$$1$1 = require('crypto');
27
+ var require$$0$h = require('sharp');
28
+ var require$$0$g = require('fluent-ffmpeg');
29
29
  var require$$8 = require('qrcode-terminal');
30
- var require$$1$4 = require('child_process');
31
- var require$$1$3 = require('string_decoder');
30
+ var require$$1$3 = require('child_process');
31
+ var require$$1$2 = require('string_decoder');
32
32
  var require$$4$2 = require('timers');
33
33
  var require$$3$1 = require('readline');
34
+ var require$$2$4 = require('node:stream');
35
+ var require$$0$i = require('node:worker_threads');
34
36
  var require$$3$2 = require('net');
35
37
  var require$$4$3 = require('tls');
36
38
  var require$$5$2 = require('@adiwajshing/keyed-db');
@@ -1241,18 +1243,18 @@ function requireFs$1 () {
1241
1243
 
1242
1244
  var makeDir$1 = {};
1243
1245
 
1244
- var utils$5 = {};
1246
+ var utils$6 = {};
1245
1247
 
1246
- var hasRequiredUtils$7;
1248
+ var hasRequiredUtils$8;
1247
1249
 
1248
- function requireUtils$7 () {
1249
- if (hasRequiredUtils$7) return utils$5;
1250
- hasRequiredUtils$7 = 1;
1250
+ function requireUtils$8 () {
1251
+ if (hasRequiredUtils$8) return utils$6;
1252
+ hasRequiredUtils$8 = 1;
1251
1253
  const path = require$$1;
1252
1254
 
1253
1255
  // https://github.com/nodejs/node/issues/8987
1254
1256
  // https://github.com/libuv/libuv/pull/1088
1255
- utils$5.checkPath = function checkPath (pth) {
1257
+ utils$6.checkPath = function checkPath (pth) {
1256
1258
  if (process.platform === 'win32') {
1257
1259
  const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''));
1258
1260
 
@@ -1263,7 +1265,7 @@ function requireUtils$7 () {
1263
1265
  }
1264
1266
  }
1265
1267
  };
1266
- return utils$5;
1268
+ return utils$6;
1267
1269
  }
1268
1270
 
1269
1271
  var hasRequiredMakeDir$1;
@@ -1272,7 +1274,7 @@ function requireMakeDir$1 () {
1272
1274
  if (hasRequiredMakeDir$1) return makeDir$1;
1273
1275
  hasRequiredMakeDir$1 = 1;
1274
1276
  const fs = /*@__PURE__*/ requireFs$1();
1275
- const { checkPath } = /*@__PURE__*/ requireUtils$7();
1277
+ const { checkPath } = /*@__PURE__*/ requireUtils$8();
1276
1278
 
1277
1279
  const getMode = options => {
1278
1280
  const defaults = { mode: 0o777 };
@@ -2442,12 +2444,12 @@ function requireEnsure$1 () {
2442
2444
  return ensure$1;
2443
2445
  }
2444
2446
 
2445
- var utils$4;
2446
- var hasRequiredUtils$6;
2447
+ var utils$5;
2448
+ var hasRequiredUtils$7;
2447
2449
 
2448
- function requireUtils$6 () {
2449
- if (hasRequiredUtils$6) return utils$4;
2450
- hasRequiredUtils$6 = 1;
2450
+ function requireUtils$7 () {
2451
+ if (hasRequiredUtils$7) return utils$5;
2452
+ hasRequiredUtils$7 = 1;
2451
2453
  function stringify (obj, { EOL = '\n', finalEOL = true, replacer = null, spaces } = {}) {
2452
2454
  const EOF = finalEOL ? EOL : '';
2453
2455
  const str = JSON.stringify(obj, replacer, spaces);
@@ -2461,8 +2463,8 @@ function requireUtils$6 () {
2461
2463
  return content.replace(/^\uFEFF/, '')
2462
2464
  }
2463
2465
 
2464
- utils$4 = { stringify, stripBom };
2465
- return utils$4;
2466
+ utils$5 = { stringify, stripBom };
2467
+ return utils$5;
2466
2468
  }
2467
2469
 
2468
2470
  var jsonfile$2;
@@ -2478,7 +2480,7 @@ function requireJsonfile$2 () {
2478
2480
  _fs = require$$0$7;
2479
2481
  }
2480
2482
  const universalify = requireUniversalify();
2481
- const { stringify, stripBom } = requireUtils$6();
2483
+ const { stringify, stripBom } = requireUtils$7();
2482
2484
 
2483
2485
  async function _readFile (file, options = {}) {
2484
2486
  if (typeof options === 'string') {
@@ -2627,7 +2629,7 @@ function requireOutputJson$1 () {
2627
2629
  if (hasRequiredOutputJson$1) return outputJson_1$1;
2628
2630
  hasRequiredOutputJson$1 = 1;
2629
2631
 
2630
- const { stringify } = requireUtils$6();
2632
+ const { stringify } = requireUtils$7();
2631
2633
  const { outputFile } = /*@__PURE__*/ requireOutputFile$1();
2632
2634
 
2633
2635
  async function outputJson (file, data, options = {}) {
@@ -2647,7 +2649,7 @@ function requireOutputJsonSync$1 () {
2647
2649
  if (hasRequiredOutputJsonSync$1) return outputJsonSync_1$1;
2648
2650
  hasRequiredOutputJsonSync$1 = 1;
2649
2651
 
2650
- const { stringify } = requireUtils$6();
2652
+ const { stringify } = requireUtils$7();
2651
2653
  const { outputFileSync } = /*@__PURE__*/ requireOutputFile$1();
2652
2654
 
2653
2655
  function outputJsonSync (file, data, options) {
@@ -20968,12 +20970,12 @@ function requireTools$1 () {
20968
20970
  * @enum {number}
20969
20971
  */
20970
20972
 
20971
- var constants$7;
20972
- var hasRequiredConstants$7;
20973
+ var constants$8;
20974
+ var hasRequiredConstants$8;
20973
20975
 
20974
- function requireConstants$7 () {
20975
- if (hasRequiredConstants$7) return constants$7;
20976
- hasRequiredConstants$7 = 1;
20976
+ function requireConstants$8 () {
20977
+ if (hasRequiredConstants$8) return constants$8;
20978
+ hasRequiredConstants$8 = 1;
20977
20979
  const DEFAULT_LEVELS = {
20978
20980
  trace: 10,
20979
20981
  debug: 20,
@@ -20993,11 +20995,11 @@ function requireConstants$7 () {
20993
20995
  DESC: 'DESC'
20994
20996
  };
20995
20997
 
20996
- constants$7 = {
20998
+ constants$8 = {
20997
20999
  DEFAULT_LEVELS,
20998
21000
  SORTING_ORDER
20999
21001
  };
21000
- return constants$7;
21002
+ return constants$8;
21001
21003
  }
21002
21004
 
21003
21005
  var levels;
@@ -21017,7 +21019,7 @@ function requireLevels$1 () {
21017
21019
  levelCompSym
21018
21020
  } = requireSymbols$1();
21019
21021
  const { noop, genLog } = requireTools$1();
21020
- const { DEFAULT_LEVELS, SORTING_ORDER } = requireConstants$7();
21022
+ const { DEFAULT_LEVELS, SORTING_ORDER } = requireConstants$8();
21021
21023
 
21022
21024
  const levelMethods = {
21023
21025
  fatal: (hook) => {
@@ -22168,7 +22170,7 @@ function requireMultistream$1 () {
22168
22170
  hasRequiredMultistream$1 = 1;
22169
22171
 
22170
22172
  const metadata = Symbol.for('pino.metadata');
22171
- const { DEFAULT_LEVELS } = requireConstants$7();
22173
+ const { DEFAULT_LEVELS } = requireConstants$8();
22172
22174
 
22173
22175
  const DEFAULT_INFO_LEVEL = DEFAULT_LEVELS.info;
22174
22176
 
@@ -22386,7 +22388,7 @@ function requirePino$1 () {
22386
22388
  const symbols = requireSymbols$1();
22387
22389
  const { configure } = requireSafeStableStringify();
22388
22390
  const { assertDefaultLevelFound, mappings, genLsCache, genLevelComparison, assertLevelComparison } = requireLevels$1();
22389
- const { DEFAULT_LEVELS, SORTING_ORDER } = requireConstants$7();
22391
+ const { DEFAULT_LEVELS, SORTING_ORDER } = requireConstants$8();
22390
22392
  const {
22391
22393
  createArgsNormalizer,
22392
22394
  asChindings,
@@ -22760,18 +22762,18 @@ function requireFs () {
22760
22762
 
22761
22763
  var makeDir = {};
22762
22764
 
22763
- var utils$3 = {};
22765
+ var utils$4 = {};
22764
22766
 
22765
- var hasRequiredUtils$5;
22767
+ var hasRequiredUtils$6;
22766
22768
 
22767
- function requireUtils$5 () {
22768
- if (hasRequiredUtils$5) return utils$3;
22769
- hasRequiredUtils$5 = 1;
22769
+ function requireUtils$6 () {
22770
+ if (hasRequiredUtils$6) return utils$4;
22771
+ hasRequiredUtils$6 = 1;
22770
22772
  const path = require$$1;
22771
22773
 
22772
22774
  // https://github.com/nodejs/node/issues/8987
22773
22775
  // https://github.com/libuv/libuv/pull/1088
22774
- utils$3.checkPath = function checkPath (pth) {
22776
+ utils$4.checkPath = function checkPath (pth) {
22775
22777
  if (process.platform === 'win32') {
22776
22778
  const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''));
22777
22779
 
@@ -22782,7 +22784,7 @@ function requireUtils$5 () {
22782
22784
  }
22783
22785
  }
22784
22786
  };
22785
- return utils$3;
22787
+ return utils$4;
22786
22788
  }
22787
22789
 
22788
22790
  var hasRequiredMakeDir;
@@ -22791,7 +22793,7 @@ function requireMakeDir () {
22791
22793
  if (hasRequiredMakeDir) return makeDir;
22792
22794
  hasRequiredMakeDir = 1;
22793
22795
  const fs = /*@__PURE__*/ requireFs();
22794
- const { checkPath } = /*@__PURE__*/ requireUtils$5();
22796
+ const { checkPath } = /*@__PURE__*/ requireUtils$6();
22795
22797
 
22796
22798
  const getMode = options => {
22797
22799
  const defaults = { mode: 0o777 };
@@ -24369,7 +24371,7 @@ function requireOutputJson () {
24369
24371
  if (hasRequiredOutputJson) return outputJson_1;
24370
24372
  hasRequiredOutputJson = 1;
24371
24373
 
24372
- const { stringify } = requireUtils$6();
24374
+ const { stringify } = requireUtils$7();
24373
24375
  const { outputFile } = /*@__PURE__*/ requireOutputFile();
24374
24376
 
24375
24377
  async function outputJson (file, data, options = {}) {
@@ -24389,7 +24391,7 @@ function requireOutputJsonSync () {
24389
24391
  if (hasRequiredOutputJsonSync) return outputJsonSync_1;
24390
24392
  hasRequiredOutputJsonSync = 1;
24391
24393
 
24392
- const { stringify } = requireUtils$6();
24394
+ const { stringify } = requireUtils$7();
24393
24395
  const { outputFileSync } = /*@__PURE__*/ requireOutputFile();
24394
24396
 
24395
24397
  function outputJsonSync (file, data, options) {
@@ -24631,12 +24633,12 @@ function requireBind$1 () {
24631
24633
  return bind$1;
24632
24634
  }
24633
24635
 
24634
- var utils$2;
24635
- var hasRequiredUtils$4;
24636
+ var utils$3;
24637
+ var hasRequiredUtils$5;
24636
24638
 
24637
- function requireUtils$4 () {
24638
- if (hasRequiredUtils$4) return utils$2;
24639
- hasRequiredUtils$4 = 1;
24639
+ function requireUtils$5 () {
24640
+ if (hasRequiredUtils$5) return utils$3;
24641
+ hasRequiredUtils$5 = 1;
24640
24642
 
24641
24643
  var bind = requireBind$1();
24642
24644
 
@@ -24961,7 +24963,7 @@ function requireUtils$4 () {
24961
24963
  return content;
24962
24964
  }
24963
24965
 
24964
- utils$2 = {
24966
+ utils$3 = {
24965
24967
  isArray: isArray,
24966
24968
  isArrayBuffer: isArrayBuffer,
24967
24969
  isBuffer: isBuffer,
@@ -24985,7 +24987,7 @@ function requireUtils$4 () {
24985
24987
  trim: trim,
24986
24988
  stripBOM: stripBOM
24987
24989
  };
24988
- return utils$2;
24990
+ return utils$3;
24989
24991
  }
24990
24992
 
24991
24993
  var buildURL$1;
@@ -24995,7 +24997,7 @@ function requireBuildURL$1 () {
24995
24997
  if (hasRequiredBuildURL$1) return buildURL$1;
24996
24998
  hasRequiredBuildURL$1 = 1;
24997
24999
 
24998
- var utils = requireUtils$4();
25000
+ var utils = requireUtils$5();
24999
25001
 
25000
25002
  function encode(val) {
25001
25003
  return encodeURIComponent(val).
@@ -25073,7 +25075,7 @@ function requireInterceptorManager$1 () {
25073
25075
  if (hasRequiredInterceptorManager$1) return InterceptorManager_1$1;
25074
25076
  hasRequiredInterceptorManager$1 = 1;
25075
25077
 
25076
- var utils = requireUtils$4();
25078
+ var utils = requireUtils$5();
25077
25079
 
25078
25080
  function InterceptorManager() {
25079
25081
  this.handlers = [];
@@ -25135,7 +25137,7 @@ function requireNormalizeHeaderName$1 () {
25135
25137
  if (hasRequiredNormalizeHeaderName$1) return normalizeHeaderName$1;
25136
25138
  hasRequiredNormalizeHeaderName$1 = 1;
25137
25139
 
25138
- var utils = requireUtils$4();
25140
+ var utils = requireUtils$5();
25139
25141
 
25140
25142
  normalizeHeaderName$1 = function normalizeHeaderName(headers, normalizedName) {
25141
25143
  utils.forEach(headers, function processHeader(value, name) {
@@ -25264,7 +25266,7 @@ function requireCookies$1 () {
25264
25266
  if (hasRequiredCookies$1) return cookies$1;
25265
25267
  hasRequiredCookies$1 = 1;
25266
25268
 
25267
- var utils = requireUtils$4();
25269
+ var utils = requireUtils$5();
25268
25270
 
25269
25271
  cookies$1 = (
25270
25272
  utils.isStandardBrowserEnv() ?
@@ -25397,7 +25399,7 @@ function requireParseHeaders$1 () {
25397
25399
  if (hasRequiredParseHeaders$1) return parseHeaders$1;
25398
25400
  hasRequiredParseHeaders$1 = 1;
25399
25401
 
25400
- var utils = requireUtils$4();
25402
+ var utils = requireUtils$5();
25401
25403
 
25402
25404
  // Headers whose duplicates are ignored by node
25403
25405
  // c.f. https://nodejs.org/api/http.html#http_message_headers
@@ -25458,7 +25460,7 @@ function requireIsURLSameOrigin$1 () {
25458
25460
  if (hasRequiredIsURLSameOrigin$1) return isURLSameOrigin$1;
25459
25461
  hasRequiredIsURLSameOrigin$1 = 1;
25460
25462
 
25461
- var utils = requireUtils$4();
25463
+ var utils = requireUtils$5();
25462
25464
 
25463
25465
  isURLSameOrigin$1 = (
25464
25466
  utils.isStandardBrowserEnv() ?
@@ -25534,7 +25536,7 @@ function requireXhr$1 () {
25534
25536
  if (hasRequiredXhr$1) return xhr$1;
25535
25537
  hasRequiredXhr$1 = 1;
25536
25538
 
25537
- var utils = requireUtils$4();
25539
+ var utils = requireUtils$5();
25538
25540
  var settle = requireSettle$1();
25539
25541
  var cookies = requireCookies$1();
25540
25542
  var buildURL = requireBuildURL$1();
@@ -26508,7 +26510,7 @@ function requireSupportsColor () {
26508
26510
  if (hasRequiredSupportsColor) return supportsColor_1;
26509
26511
  hasRequiredSupportsColor = 1;
26510
26512
  const os = require$$2$2;
26511
- const tty = require$$1$1;
26513
+ const tty = require$$0$f;
26512
26514
  const hasFlag = requireHasFlag();
26513
26515
 
26514
26516
  const {env} = process;
@@ -26654,7 +26656,7 @@ function requireNode () {
26654
26656
  if (hasRequiredNode) return node.exports;
26655
26657
  hasRequiredNode = 1;
26656
26658
  (function (module, exports$1) {
26657
- const tty = require$$1$1;
26659
+ const tty = require$$0$f;
26658
26660
  const util = require$$0$6;
26659
26661
 
26660
26662
  /**
@@ -27664,7 +27666,7 @@ function requireHttp$1 () {
27664
27666
  if (hasRequiredHttp$1) return http_1$1;
27665
27667
  hasRequiredHttp$1 = 1;
27666
27668
 
27667
- var utils = requireUtils$4();
27669
+ var utils = requireUtils$5();
27668
27670
  var settle = requireSettle$1();
27669
27671
  var buildFullPath = requireBuildFullPath$1();
27670
27672
  var buildURL = requireBuildURL$1();
@@ -28001,7 +28003,7 @@ function requireDefaults$3 () {
28001
28003
  if (hasRequiredDefaults$3) return defaults_1$1;
28002
28004
  hasRequiredDefaults$3 = 1;
28003
28005
 
28004
- var utils = requireUtils$4();
28006
+ var utils = requireUtils$5();
28005
28007
  var normalizeHeaderName = requireNormalizeHeaderName$1();
28006
28008
  var enhanceError = requireEnhanceError$1();
28007
28009
 
@@ -28143,7 +28145,7 @@ function requireTransformData$1 () {
28143
28145
  if (hasRequiredTransformData$1) return transformData$1;
28144
28146
  hasRequiredTransformData$1 = 1;
28145
28147
 
28146
- var utils = requireUtils$4();
28148
+ var utils = requireUtils$5();
28147
28149
  var defaults = requireDefaults$3();
28148
28150
 
28149
28151
  /**
@@ -28186,7 +28188,7 @@ function requireDispatchRequest$1 () {
28186
28188
  if (hasRequiredDispatchRequest$1) return dispatchRequest$1;
28187
28189
  hasRequiredDispatchRequest$1 = 1;
28188
28190
 
28189
- var utils = requireUtils$4();
28191
+ var utils = requireUtils$5();
28190
28192
  var transformData = requireTransformData$1();
28191
28193
  var isCancel = requireIsCancel$1();
28192
28194
  var defaults = requireDefaults$3();
@@ -28276,7 +28278,7 @@ function requireMergeConfig$1 () {
28276
28278
  if (hasRequiredMergeConfig$1) return mergeConfig$1;
28277
28279
  hasRequiredMergeConfig$1 = 1;
28278
28280
 
28279
- var utils = requireUtils$4();
28281
+ var utils = requireUtils$5();
28280
28282
 
28281
28283
  /**
28282
28284
  * Config-specific merge-function which creates a new config-object
@@ -28484,7 +28486,7 @@ function requireAxios$5 () {
28484
28486
  if (hasRequiredAxios$5) return Axios_1$1;
28485
28487
  hasRequiredAxios$5 = 1;
28486
28488
 
28487
- var utils = requireUtils$4();
28489
+ var utils = requireUtils$5();
28488
28490
  var buildURL = requireBuildURL$1();
28489
28491
  var InterceptorManager = requireInterceptorManager$1();
28490
28492
  var dispatchRequest = requireDispatchRequest$1();
@@ -28785,7 +28787,7 @@ function requireAxios$4 () {
28785
28787
  if (hasRequiredAxios$4) return axios$3.exports;
28786
28788
  hasRequiredAxios$4 = 1;
28787
28789
 
28788
- var utils = requireUtils$4();
28790
+ var utils = requireUtils$5();
28789
28791
  var bind = requireBind$1();
28790
28792
  var Axios = requireAxios$5();
28791
28793
  var mergeConfig = requireMergeConfig$1();
@@ -28854,14 +28856,14 @@ function requireAxios$3 () {
28854
28856
 
28855
28857
  var Utils$1 = {};
28856
28858
 
28857
- var hasRequiredUtils$3;
28859
+ var hasRequiredUtils$4;
28858
28860
 
28859
- function requireUtils$3 () {
28860
- if (hasRequiredUtils$3) return Utils$1;
28861
- hasRequiredUtils$3 = 1;
28861
+ function requireUtils$4 () {
28862
+ if (hasRequiredUtils$4) return Utils$1;
28863
+ hasRequiredUtils$4 = 1;
28862
28864
  Object.defineProperty(Utils$1, "__esModule", { value: true });
28863
28865
  Utils$1.defaultBg = void 0;
28864
- const crypto_1 = require$$1$2;
28866
+ const crypto_1 = require$$1$1;
28865
28867
  class Utils {
28866
28868
  }
28867
28869
  Utils$1.default = Utils;
@@ -32032,7 +32034,7 @@ function requireVideoToGif () {
32032
32034
  return (mod && mod.__esModule) ? mod : { "default": mod };
32033
32035
  };
32034
32036
  Object.defineProperty(videoToGif, "__esModule", { value: true });
32035
- const fluent_ffmpeg_1 = __importDefault(require$$0$f);
32037
+ const fluent_ffmpeg_1 = __importDefault(require$$0$g);
32036
32038
  const fs_extra_1 = /*@__PURE__*/ requireLib$a();
32037
32039
  const os_1 = require$$2$2;
32038
32040
  /** https://stackoverflow.com/questions/52156713/fluent-ffmpeg-h264-to-gif-throwing-error-1 */
@@ -32071,7 +32073,7 @@ function requireCrop () {
32071
32073
  return (mod && mod.__esModule) ? mod : { "default": mod };
32072
32074
  };
32073
32075
  Object.defineProperty(crop, "__esModule", { value: true });
32074
- const fluent_ffmpeg_1 = __importDefault(require$$0$f);
32076
+ const fluent_ffmpeg_1 = __importDefault(require$$0$g);
32075
32077
  const fs_extra_1 = /*@__PURE__*/ requireLib$a();
32076
32078
  const os_1 = require$$2$2;
32077
32079
  const crop$1 = (filename) => __awaiter(void 0, void 0, void 0, function* () {
@@ -32162,13 +32164,13 @@ function requireConvert () {
32162
32164
  return (mod && mod.__esModule) ? mod : { "default": mod };
32163
32165
  };
32164
32166
  Object.defineProperty(convert, "__esModule", { value: true });
32165
- const sharp_1 = __importStar(require$$0$g);
32167
+ const sharp_1 = __importStar(require$$0$h);
32166
32168
  const videoToGif_1 = __importDefault(requireVideoToGif());
32167
32169
  const fs_extra_1 = /*@__PURE__*/ requireLib$a();
32168
32170
  const os_1 = require$$2$2;
32169
32171
  const crop_1 = __importDefault(requireCrop());
32170
32172
  const StickerTypes_1 = requireStickerTypes();
32171
- const Utils_1 = requireUtils$3();
32173
+ const Utils_1 = requireUtils$4();
32172
32174
  const convert$1 = (data, mime, { quality = 100, background = Utils_1.defaultBg, type = StickerTypes_1.StickerTypes.DEFAULT }) => __awaiter(void 0, void 0, void 0, function* () {
32173
32175
  const isVideo = mime.startsWith('video');
32174
32176
  let image = isVideo ? yield (0, videoToGif_1.default)(data) : data;
@@ -33265,7 +33267,7 @@ function requireRawMetadata () {
33265
33267
  return (mod && mod.__esModule) ? mod : { "default": mod };
33266
33268
  };
33267
33269
  Object.defineProperty(RawMetadata, "__esModule", { value: true });
33268
- const Utils_1 = __importDefault(requireUtils$3());
33270
+ const Utils_1 = __importDefault(requireUtils$4());
33269
33271
  let RawMetadata$1 = class RawMetadata {
33270
33272
  constructor(options) {
33271
33273
  this['sticker-pack-id'] = options.id || Utils_1.default.generateStickerID();
@@ -33374,7 +33376,7 @@ function requireSticker () {
33374
33376
  Sticker.createSticker = Sticker.Sticker = void 0;
33375
33377
  const fs_extra_1 = /*@__PURE__*/ requireLib$a();
33376
33378
  const axios_1 = __importDefault(requireAxios$3());
33377
- const Utils_1 = __importStar(requireUtils$3());
33379
+ const Utils_1 = __importStar(requireUtils$4());
33378
33380
  const file_type_1 = requireFileType();
33379
33381
  const convert_1 = __importDefault(requireConvert());
33380
33382
  const Exif_1 = __importDefault(requireExif$1());
@@ -33625,7 +33627,7 @@ function requireStickerMetadata () {
33625
33627
  return (mod && mod.__esModule) ? mod : { "default": mod };
33626
33628
  };
33627
33629
  Object.defineProperty(StickerMetadata, "__esModule", { value: true });
33628
- const Utils_1 = __importDefault(requireUtils$3());
33630
+ const Utils_1 = __importDefault(requireUtils$4());
33629
33631
  let StickerMetadata$1 = class StickerMetadata {
33630
33632
  constructor(pack = '', author = '', categories = [], id = Utils_1.default.generateStickerID()) {
33631
33633
  this.pack = pack;
@@ -208872,20 +208874,20 @@ function requireTypes$6 () {
208872
208874
  return types$5.exports;
208873
208875
  }
208874
208876
 
208875
- var utils$1 = {};
208877
+ var utils$2 = {};
208876
208878
 
208877
- var hasRequiredUtils$2;
208879
+ var hasRequiredUtils$3;
208878
208880
 
208879
- function requireUtils$2 () {
208880
- if (hasRequiredUtils$2) return utils$1;
208881
- hasRequiredUtils$2 = 1;
208881
+ function requireUtils$3 () {
208882
+ if (hasRequiredUtils$3) return utils$2;
208883
+ hasRequiredUtils$3 = 1;
208882
208884
 
208883
208885
 
208884
- utils$1.keys = function (obj, options = {}) {
208886
+ utils$2.keys = function (obj, options = {}) {
208885
208887
 
208886
208888
  return options.symbols !== false ? Reflect.ownKeys(obj) : Object.getOwnPropertyNames(obj); // Defaults to true
208887
208889
  };
208888
- return utils$1;
208890
+ return utils$2;
208889
208891
  }
208890
208892
 
208891
208893
  var clone;
@@ -208897,7 +208899,7 @@ function requireClone () {
208897
208899
 
208898
208900
  const Reach = requireReach();
208899
208901
  const Types = requireTypes$6();
208900
- const Utils = requireUtils$2();
208902
+ const Utils = requireUtils$3();
208901
208903
 
208902
208904
 
208903
208905
  const internals = {
@@ -209081,7 +209083,7 @@ function requireMerge () {
209081
209083
 
209082
209084
  const Assert = requireAssert();
209083
209085
  const Clone = requireClone();
209084
- const Utils = requireUtils$2();
209086
+ const Utils = requireUtils$3();
209085
209087
 
209086
209088
 
209087
209089
  const internals = {};
@@ -209686,7 +209688,7 @@ function requireContain () {
209686
209688
  const Assert = requireAssert();
209687
209689
  const DeepEqual = requireDeepEqual();
209688
209690
  const EscapeRegex = requireEscapeRegex();
209689
- const Utils = requireUtils$2();
209691
+ const Utils = requireUtils$3();
209690
209692
 
209691
209693
 
209692
209694
  const internals = {};
@@ -210235,19 +210237,19 @@ function requireIsPromise () {
210235
210237
  return isPromise;
210236
210238
  }
210237
210239
 
210238
- var once;
210239
- var hasRequiredOnce;
210240
+ var once$1;
210241
+ var hasRequiredOnce$1;
210240
210242
 
210241
- function requireOnce () {
210242
- if (hasRequiredOnce) return once;
210243
- hasRequiredOnce = 1;
210243
+ function requireOnce$1 () {
210244
+ if (hasRequiredOnce$1) return once$1;
210245
+ hasRequiredOnce$1 = 1;
210244
210246
 
210245
210247
  const internals = {
210246
210248
  wrapped: Symbol('wrapped')
210247
210249
  };
210248
210250
 
210249
210251
 
210250
- once = function (method) {
210252
+ once$1 = function (method) {
210251
210253
 
210252
210254
  if (method[internals.wrapped]) {
210253
210255
  return method;
@@ -210265,7 +210267,7 @@ function requireOnce () {
210265
210267
  wrappedFn[internals.wrapped] = true;
210266
210268
  return wrappedFn;
210267
210269
  };
210268
- return once;
210270
+ return once$1;
210269
210271
  }
210270
210272
 
210271
210273
  var reachTemplate;
@@ -210374,7 +210376,7 @@ function requireLib$6 () {
210374
210376
 
210375
210377
  lib$4.merge = requireMerge();
210376
210378
 
210377
- lib$4.once = requireOnce();
210379
+ lib$4.once = requireOnce$1();
210378
210380
 
210379
210381
  lib$4.reach = requireReach();
210380
210382
 
@@ -210885,12 +210887,12 @@ function requireBind () {
210885
210887
  return bind;
210886
210888
  }
210887
210889
 
210888
- var utils;
210889
- var hasRequiredUtils$1;
210890
+ var utils$1;
210891
+ var hasRequiredUtils$2;
210890
210892
 
210891
- function requireUtils$1 () {
210892
- if (hasRequiredUtils$1) return utils;
210893
- hasRequiredUtils$1 = 1;
210893
+ function requireUtils$2 () {
210894
+ if (hasRequiredUtils$2) return utils$1;
210895
+ hasRequiredUtils$2 = 1;
210894
210896
 
210895
210897
  var bind = requireBind();
210896
210898
 
@@ -211215,7 +211217,7 @@ function requireUtils$1 () {
211215
211217
  return content;
211216
211218
  }
211217
211219
 
211218
- utils = {
211220
+ utils$1 = {
211219
211221
  isArray: isArray,
211220
211222
  isArrayBuffer: isArrayBuffer,
211221
211223
  isBuffer: isBuffer,
@@ -211239,7 +211241,7 @@ function requireUtils$1 () {
211239
211241
  trim: trim,
211240
211242
  stripBOM: stripBOM
211241
211243
  };
211242
- return utils;
211244
+ return utils$1;
211243
211245
  }
211244
211246
 
211245
211247
  var buildURL;
@@ -211249,7 +211251,7 @@ function requireBuildURL () {
211249
211251
  if (hasRequiredBuildURL) return buildURL;
211250
211252
  hasRequiredBuildURL = 1;
211251
211253
 
211252
- var utils = requireUtils$1();
211254
+ var utils = requireUtils$2();
211253
211255
 
211254
211256
  function encode(val) {
211255
211257
  return encodeURIComponent(val).
@@ -211327,7 +211329,7 @@ function requireInterceptorManager () {
211327
211329
  if (hasRequiredInterceptorManager) return InterceptorManager_1;
211328
211330
  hasRequiredInterceptorManager = 1;
211329
211331
 
211330
- var utils = requireUtils$1();
211332
+ var utils = requireUtils$2();
211331
211333
 
211332
211334
  function InterceptorManager() {
211333
211335
  this.handlers = [];
@@ -211389,7 +211391,7 @@ function requireNormalizeHeaderName () {
211389
211391
  if (hasRequiredNormalizeHeaderName) return normalizeHeaderName;
211390
211392
  hasRequiredNormalizeHeaderName = 1;
211391
211393
 
211392
- var utils = requireUtils$1();
211394
+ var utils = requireUtils$2();
211393
211395
 
211394
211396
  normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) {
211395
211397
  utils.forEach(headers, function processHeader(value, name) {
@@ -211519,7 +211521,7 @@ function requireCookies () {
211519
211521
  if (hasRequiredCookies) return cookies;
211520
211522
  hasRequiredCookies = 1;
211521
211523
 
211522
- var utils = requireUtils$1();
211524
+ var utils = requireUtils$2();
211523
211525
 
211524
211526
  cookies = (
211525
211527
  utils.isStandardBrowserEnv() ?
@@ -211652,7 +211654,7 @@ function requireParseHeaders () {
211652
211654
  if (hasRequiredParseHeaders) return parseHeaders;
211653
211655
  hasRequiredParseHeaders = 1;
211654
211656
 
211655
- var utils = requireUtils$1();
211657
+ var utils = requireUtils$2();
211656
211658
 
211657
211659
  // Headers whose duplicates are ignored by node
211658
211660
  // c.f. https://nodejs.org/api/http.html#http_message_headers
@@ -211713,7 +211715,7 @@ function requireIsURLSameOrigin () {
211713
211715
  if (hasRequiredIsURLSameOrigin) return isURLSameOrigin;
211714
211716
  hasRequiredIsURLSameOrigin = 1;
211715
211717
 
211716
- var utils = requireUtils$1();
211718
+ var utils = requireUtils$2();
211717
211719
 
211718
211720
  isURLSameOrigin = (
211719
211721
  utils.isStandardBrowserEnv() ?
@@ -211816,7 +211818,7 @@ function requireXhr () {
211816
211818
  if (hasRequiredXhr) return xhr;
211817
211819
  hasRequiredXhr = 1;
211818
211820
 
211819
- var utils = requireUtils$1();
211821
+ var utils = requireUtils$2();
211820
211822
  var settle = requireSettle();
211821
211823
  var cookies = requireCookies();
211822
211824
  var buildURL = requireBuildURL();
@@ -212048,7 +212050,7 @@ function requireHttp () {
212048
212050
  if (hasRequiredHttp) return http_1;
212049
212051
  hasRequiredHttp = 1;
212050
212052
 
212051
- var utils = requireUtils$1();
212053
+ var utils = requireUtils$2();
212052
212054
  var settle = requireSettle();
212053
212055
  var buildFullPath = requireBuildFullPath();
212054
212056
  var buildURL = requireBuildURL();
@@ -212417,7 +212419,7 @@ function requireDefaults$2 () {
212417
212419
  if (hasRequiredDefaults$2) return defaults_1;
212418
212420
  hasRequiredDefaults$2 = 1;
212419
212421
 
212420
- var utils = requireUtils$1();
212422
+ var utils = requireUtils$2();
212421
212423
  var normalizeHeaderName = requireNormalizeHeaderName();
212422
212424
  var enhanceError = requireEnhanceError();
212423
212425
 
@@ -212559,7 +212561,7 @@ function requireTransformData () {
212559
212561
  if (hasRequiredTransformData) return transformData;
212560
212562
  hasRequiredTransformData = 1;
212561
212563
 
212562
- var utils = requireUtils$1();
212564
+ var utils = requireUtils$2();
212563
212565
  var defaults = requireDefaults$2();
212564
212566
 
212565
212567
  /**
@@ -212602,7 +212604,7 @@ function requireDispatchRequest () {
212602
212604
  if (hasRequiredDispatchRequest) return dispatchRequest;
212603
212605
  hasRequiredDispatchRequest = 1;
212604
212606
 
212605
- var utils = requireUtils$1();
212607
+ var utils = requireUtils$2();
212606
212608
  var transformData = requireTransformData();
212607
212609
  var isCancel = requireIsCancel();
212608
212610
  var defaults = requireDefaults$2();
@@ -212697,7 +212699,7 @@ function requireMergeConfig () {
212697
212699
  if (hasRequiredMergeConfig) return mergeConfig;
212698
212700
  hasRequiredMergeConfig = 1;
212699
212701
 
212700
- var utils = requireUtils$1();
212702
+ var utils = requireUtils$2();
212701
212703
 
212702
212704
  /**
212703
212705
  * Config-specific merge-function which creates a new config-object
@@ -212894,7 +212896,7 @@ function requireAxios$2 () {
212894
212896
  if (hasRequiredAxios$2) return Axios_1;
212895
212897
  hasRequiredAxios$2 = 1;
212896
212898
 
212897
- var utils = requireUtils$1();
212899
+ var utils = requireUtils$2();
212898
212900
  var buildURL = requireBuildURL();
212899
212901
  var InterceptorManager = requireInterceptorManager();
212900
212902
  var dispatchRequest = requireDispatchRequest();
@@ -213230,7 +213232,7 @@ function requireAxios$1 () {
213230
213232
  if (hasRequiredAxios$1) return axios$1.exports;
213231
213233
  hasRequiredAxios$1 = 1;
213232
213234
 
213233
- var utils = requireUtils$1();
213235
+ var utils = requireUtils$2();
213234
213236
  var bind = requireBind();
213235
213237
  var Axios = requireAxios$2();
213236
213238
  var mergeConfig = requireMergeConfig();
@@ -213488,13 +213490,13 @@ var WABinary = {};
213488
213490
 
213489
213491
  var encode = {};
213490
213492
 
213491
- var constants$6 = {};
213493
+ var constants$7 = {};
213492
213494
 
213493
- var hasRequiredConstants$6;
213495
+ var hasRequiredConstants$7;
213494
213496
 
213495
- function requireConstants$6 () {
213496
- if (hasRequiredConstants$6) return constants$6;
213497
- hasRequiredConstants$6 = 1;
213497
+ function requireConstants$7 () {
213498
+ if (hasRequiredConstants$7) return constants$7;
213499
+ hasRequiredConstants$7 = 1;
213498
213500
  (function (exports$1) {
213499
213501
  Object.defineProperty(exports$1, "__esModule", { value: true });
213500
213502
  exports$1.TOKEN_MAP = exports$1.SINGLE_BYTE_TOKENS = exports$1.DOUBLE_BYTE_TOKENS = exports$1.TAGS = void 0;
@@ -214798,8 +214800,8 @@ function requireConstants$6 () {
214798
214800
  exports$1.TOKEN_MAP[element] = { dict: i, index: j };
214799
214801
  }
214800
214802
  }
214801
- } (constants$6));
214802
- return constants$6;
214803
+ } (constants$7));
214804
+ return constants$7;
214803
214805
  }
214804
214806
 
214805
214807
  var jidUtils = {};
@@ -214906,7 +214908,7 @@ function requireEncode () {
214906
214908
  };
214907
214909
  Object.defineProperty(exports$1, "__esModule", { value: true });
214908
214910
  exports$1.encodeBinaryNodeInner = exports$1.encodeBinaryNode = void 0;
214909
- const constants = __importStar(requireConstants$6());
214911
+ const constants = __importStar(requireConstants$7());
214910
214912
  const jid_utils_1 = requireJidUtils();
214911
214913
  const encodeBinaryNode = (node, opts = constants, buffer = [0]) => {
214912
214914
  const encoded = (0, exports$1.encodeBinaryNodeInner)(node, opts, buffer);
@@ -215148,7 +215150,7 @@ function requireDecode () {
215148
215150
  Object.defineProperty(exports$1, "__esModule", { value: true });
215149
215151
  exports$1.decodeBinaryNode = exports$1.decodeDecompressedBinaryNode = exports$1.decompressingIfRequired = void 0;
215150
215152
  const zlib_1 = require$$0$8;
215151
- const constants = __importStar(requireConstants$6());
215153
+ const constants = __importStar(requireConstants$7());
215152
215154
  const jid_utils_1 = requireJidUtils();
215153
215155
  const util_1 = require$$0$6;
215154
215156
  const inflatePromise = (0, util_1.promisify)(zlib_1.inflate);
@@ -215559,7 +215561,7 @@ function requireGenerics () {
215559
215561
  exports$1.bytesToCrockford = exports$1.trimUndefineds = exports$1.isWABusinessPlatform = exports$1.getCodeFromWSError = exports$1.getCallStatusFromNode = exports$1.getErrorCodeFromStreamError = exports$1.getStatusFromReceiptType = exports$1.generateMdTagPrefix = exports$1.fetchLatestWaWebVersion = exports$1.fetchLatestBaileysVersion = exports$1.printQRIfNecessaryListener = exports$1.bindWaitForConnectionUpdate = exports$1.bindWaitForEvent = exports$1.generateMessageID = exports$1.generateMessageIDV2 = exports$1.promiseTimeout = exports$1.delayCancellable = exports$1.delay = exports$1.debouncedTimeout = exports$1.unixTimestampSeconds = exports$1.toNumber = exports$1.encodeBigEndian = exports$1.generateRegistrationId = exports$1.encodeWAMessage = exports$1.unpadRandomMax16 = exports$1.writeRandomPadMax16 = exports$1.BufferJSON = exports$1.Browsers = void 0;
215560
215562
  const boom_1 = requireLib$5();
215561
215563
  const axios_1 = __importDefault(requireAxios());
215562
- const crypto_1 = require$$1$2;
215564
+ const crypto_1 = require$$1$1;
215563
215565
  const os_1 = require$$2$2;
215564
215566
  const WAProto_1 = requireWAProto();
215565
215567
  const baileys_version_json_1 = require$$4;
@@ -215982,7 +215984,7 @@ function requireCrypto$1 () {
215982
215984
  if (hasRequiredCrypto$1) return crypto$1;
215983
215985
  hasRequiredCrypto$1 = 1;
215984
215986
 
215985
- const nodeCrypto = require$$1$2;
215987
+ const nodeCrypto = require$$1$1;
215986
215988
  const assert = require$$5;
215987
215989
 
215988
215990
 
@@ -217764,7 +217766,7 @@ function requireCurve () {
217764
217766
  hasRequiredCurve = 1;
217765
217767
 
217766
217768
  const curveJs = requireLib$4();
217767
- const nodeCrypto = require$$1$2;
217769
+ const nodeCrypto = require$$1$1;
217768
217770
  // from: https://github.com/digitalbazaar/x25519-key-agreement-key-2019/blob/master/lib/crypto.js
217769
217771
  const PUBLIC_KEY_DER_PREFIX = Buffer.from([
217770
217772
  48, 42, 48, 5, 6, 3, 43, 101, 110, 3, 33, 0
@@ -217893,7 +217895,7 @@ function requireKeyhelper$1 () {
217893
217895
  // vim: ts=4:sw=4:expandtab
217894
217896
 
217895
217897
  const curve = requireCurve();
217896
- const nodeCrypto = require$$1$2;
217898
+ const nodeCrypto = require$$1$1;
217897
217899
 
217898
217900
  function isNonNegativeInteger(n) {
217899
217901
  return (typeof n === 'number' && (n % 1) === 0 && n >= 0);
@@ -241182,7 +241184,7 @@ function requireKeyhelper () {
241182
241184
  if (hasRequiredKeyhelper) return keyhelper;
241183
241185
  hasRequiredKeyhelper = 1;
241184
241186
  const curve = requireCurve();
241185
- const nodeCrypto = require$$1$2;
241187
+ const nodeCrypto = require$$1$1;
241186
241188
 
241187
241189
  keyhelper.generateSenderKey = function() {
241188
241190
  return nodeCrypto.randomBytes(32);
@@ -241905,7 +241907,7 @@ function requireHkdf () {
241905
241907
  */
241906
241908
 
241907
241909
  const { Buffer } = require$$0$a;
241908
- const { createHash, createHmac } = require$$1$2;
241910
+ const { createHash, createHmac } = require$$1$1;
241909
241911
 
241910
241912
  const g_digestLenCache = {};
241911
241913
 
@@ -242095,7 +242097,7 @@ function requireCrypto () {
242095
242097
  };
242096
242098
  Object.defineProperty(exports$1, "__esModule", { value: true });
242097
242099
  exports$1.aesDecryptCTR = exports$1.aesEncryptCTR = exports$1.derivePairingCodeKey = exports$1.hkdf = exports$1.sha256 = exports$1.hmacSign = exports$1.aesEncrypWithIV = exports$1.aesEncrypt = exports$1.aesDecryptWithIV = exports$1.aesDecrypt = exports$1.aesDecryptGCM = exports$1.aesEncryptGCM = exports$1.signedKeyPair = exports$1.Curve = exports$1.generateSignalPubKey = void 0;
242098
- const crypto_1 = require$$1$2;
242100
+ const crypto_1 = require$$1$1;
242099
242101
  const futoin_hkdf_1 = __importDefault(requireHkdf());
242100
242102
  const libsignal = __importStar(requireLibsignal());
242101
242103
  const Defaults_1 = requireDefaults();
@@ -252732,14 +252734,14 @@ function requireFilterParseAsync () {
252732
252734
 
252733
252735
  var parser$2 = {exports: {}};
252734
252736
 
252735
- var constants$5;
252736
- var hasRequiredConstants$5;
252737
+ var constants$6;
252738
+ var hasRequiredConstants$6;
252737
252739
 
252738
- function requireConstants$5 () {
252739
- if (hasRequiredConstants$5) return constants$5;
252740
- hasRequiredConstants$5 = 1;
252740
+ function requireConstants$6 () {
252741
+ if (hasRequiredConstants$6) return constants$6;
252742
+ hasRequiredConstants$6 = 1;
252741
252743
 
252742
- constants$5 = {
252744
+ constants$6 = {
252743
252745
  PNG_SIGNATURE: [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a],
252744
252746
 
252745
252747
  TYPE_IHDR: 0x49484452,
@@ -252769,7 +252771,7 @@ function requireConstants$5 () {
252769
252771
 
252770
252772
  GAMMA_DIVISION: 100000,
252771
252773
  };
252772
- return constants$5;
252774
+ return constants$6;
252773
252775
  }
252774
252776
 
252775
252777
  var crc = {exports: {}};
@@ -252827,7 +252829,7 @@ function requireParser$2 () {
252827
252829
  if (hasRequiredParser$2) return parser$2.exports;
252828
252830
  hasRequiredParser$2 = 1;
252829
252831
 
252830
- let constants = requireConstants$5();
252832
+ let constants = requireConstants$6();
252831
252833
  let CrcCalculator = requireCrc();
252832
252834
 
252833
252835
  let Parser = (parser$2.exports = function (options, dependencies) {
@@ -253682,7 +253684,7 @@ function requireBitpacker () {
253682
253684
  if (hasRequiredBitpacker) return bitpacker;
253683
253685
  hasRequiredBitpacker = 1;
253684
253686
 
253685
- let constants = requireConstants$5();
253687
+ let constants = requireConstants$6();
253686
253688
 
253687
253689
  bitpacker = function (dataIn, width, height, options) {
253688
253690
  let outHasAlpha =
@@ -254026,7 +254028,7 @@ function requirePacker () {
254026
254028
  if (hasRequiredPacker) return packer.exports;
254027
254029
  hasRequiredPacker = 1;
254028
254030
 
254029
- let constants = requireConstants$5();
254031
+ let constants = requireConstants$6();
254030
254032
  let CrcStream = requireCrc();
254031
254033
  let bitPacker = requireBitpacker();
254032
254034
  let filter = requireFilterPack();
@@ -254164,7 +254166,7 @@ function requirePackerAsync () {
254164
254166
 
254165
254167
  let util = require$$0$6;
254166
254168
  let Stream = require$$0$5;
254167
- let constants = requireConstants$5();
254169
+ let constants = requireConstants$6();
254168
254170
  let Packer = requirePacker();
254169
254171
 
254170
254172
  let PackerAsync = (packerAsync.exports = function (opt) {
@@ -254607,7 +254609,7 @@ function requirePackerSync () {
254607
254609
  if (!zlib.deflateSync) {
254608
254610
  hasSyncZlib = false;
254609
254611
  }
254610
- let constants = requireConstants$5();
254612
+ let constants = requireConstants$6();
254611
254613
  let Packer = requirePacker();
254612
254614
 
254613
254615
  packerSync = function (metaData, opt) {
@@ -254879,15 +254881,15 @@ function requirePng () {
254879
254881
  return png;
254880
254882
  }
254881
254883
 
254882
- var constants$4 = {};
254884
+ var constants$5 = {};
254883
254885
 
254884
- var hasRequiredConstants$4;
254886
+ var hasRequiredConstants$5;
254885
254887
 
254886
- function requireConstants$4 () {
254887
- if (hasRequiredConstants$4) return constants$4;
254888
- hasRequiredConstants$4 = 1;
254889
- Object.defineProperty(constants$4, "__esModule", { value: true });
254890
- constants$4.PNGColorType = constants$4.PNGFilterType = void 0;
254888
+ function requireConstants$5 () {
254889
+ if (hasRequiredConstants$5) return constants$5;
254890
+ hasRequiredConstants$5 = 1;
254891
+ Object.defineProperty(constants$5, "__esModule", { value: true });
254892
+ constants$5.PNGColorType = constants$5.PNGFilterType = void 0;
254891
254893
  /**
254892
254894
  * Filter method is a single-byte integer that indicates the preprocessing method applied to the image data before compression.
254893
254895
  */
@@ -254904,7 +254906,7 @@ function requireConstants$4 () {
254904
254906
  PNGFilterType[PNGFilterType["AVERAGE"] = 3] = "AVERAGE";
254905
254907
  /** computes a simple linear function of the three neighboring pixels (left, above, upper left), then chooses as predictor the neighboring pixel closest to the computed value. */
254906
254908
  PNGFilterType[PNGFilterType["PATH"] = 4] = "PATH";
254907
- })(PNGFilterType || (constants$4.PNGFilterType = PNGFilterType = {}));
254909
+ })(PNGFilterType || (constants$5.PNGFilterType = PNGFilterType = {}));
254908
254910
  /**
254909
254911
  * Color type is a single-byte integer that describes the interpretation of the image data.
254910
254912
  * Color type codes represent sums of the following values:
@@ -254917,9 +254919,9 @@ function requireConstants$4 () {
254917
254919
  PNGColorType[PNGColorType["COLOR"] = 2] = "COLOR";
254918
254920
  PNGColorType[PNGColorType["GRAYSCALE_ALPHA"] = 4] = "GRAYSCALE_ALPHA";
254919
254921
  PNGColorType[PNGColorType["COLOR_ALPHA"] = 6] = "COLOR_ALPHA";
254920
- })(PNGColorType || (constants$4.PNGColorType = PNGColorType = {}));
254922
+ })(PNGColorType || (constants$5.PNGColorType = PNGColorType = {}));
254921
254923
 
254922
- return constants$4;
254924
+ return constants$5;
254923
254925
  }
254924
254926
 
254925
254927
  var hasRequiredCommonjs$o;
@@ -254945,8 +254947,8 @@ function requireCommonjs$o () {
254945
254947
  Object.defineProperty(exports$1, "__esModule", { value: true });
254946
254948
  exports$1.default = png;
254947
254949
  const pngjs_1 = requirePng();
254948
- const constants_js_1 = requireConstants$4();
254949
- __exportStar(requireConstants$4(), exports$1);
254950
+ const constants_js_1 = requireConstants$5();
254951
+ __exportStar(requireConstants$5(), exports$1);
254950
254952
  function png() {
254951
254953
  return {
254952
254954
  mime: "image/png",
@@ -261312,12 +261314,12 @@ function requireInflate$1 () {
261312
261314
  return inflate;
261313
261315
  }
261314
261316
 
261315
- var constants$3;
261316
- var hasRequiredConstants$3;
261317
+ var constants$4;
261318
+ var hasRequiredConstants$4;
261317
261319
 
261318
- function requireConstants$3 () {
261319
- if (hasRequiredConstants$3) return constants$3;
261320
- hasRequiredConstants$3 = 1;
261320
+ function requireConstants$4 () {
261321
+ if (hasRequiredConstants$4) return constants$4;
261322
+ hasRequiredConstants$4 = 1;
261321
261323
 
261322
261324
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
261323
261325
  // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
@@ -261338,7 +261340,7 @@ function requireConstants$3 () {
261338
261340
  // misrepresented as being the original software.
261339
261341
  // 3. This notice may not be removed or altered from any source distribution.
261340
261342
 
261341
- constants$3 = {
261343
+ constants$4 = {
261342
261344
 
261343
261345
  /* Allowed flush values; see deflate() and inflate() below for details */
261344
261346
  Z_NO_FLUSH: 0,
@@ -261385,7 +261387,7 @@ function requireConstants$3 () {
261385
261387
  Z_DEFLATED: 8
261386
261388
  //Z_NULL: null // Use -1 or null inline, depending on var type
261387
261389
  };
261388
- return constants$3;
261390
+ return constants$4;
261389
261391
  }
261390
261392
 
261391
261393
  var gzheader;
@@ -261464,7 +261466,7 @@ function requireInflate () {
261464
261466
  var zlib_inflate = requireInflate$1();
261465
261467
  var utils = requireCommon();
261466
261468
  var strings = requireStrings();
261467
- var c = requireConstants$3();
261469
+ var c = requireConstants$4();
261468
261470
  var msg = requireMessages$1();
261469
261471
  var ZStream = requireZstream();
261470
261472
  var GZheader = requireGzheader();
@@ -261895,7 +261897,7 @@ function requirePako () {
261895
261897
 
261896
261898
  var deflate = requireDeflate();
261897
261899
  var inflate = requireInflate();
261898
- var constants = requireConstants$3();
261900
+ var constants = requireConstants$4();
261899
261901
 
261900
261902
  var pako = {};
261901
261903
 
@@ -269422,29 +269424,29 @@ function requireLite () {
269422
269424
 
269423
269425
  var composite = {};
269424
269426
 
269425
- var constants$2 = {};
269427
+ var constants$3 = {};
269426
269428
 
269427
- var hasRequiredConstants$2;
269429
+ var hasRequiredConstants$3;
269428
269430
 
269429
- function requireConstants$2 () {
269430
- if (hasRequiredConstants$2) return constants$2;
269431
- hasRequiredConstants$2 = 1;
269432
- Object.defineProperty(constants$2, "__esModule", { value: true });
269433
- constants$2.BlendMode = constants$2.VerticalAlign = constants$2.HorizontalAlign = void 0;
269431
+ function requireConstants$3 () {
269432
+ if (hasRequiredConstants$3) return constants$3;
269433
+ hasRequiredConstants$3 = 1;
269434
+ Object.defineProperty(constants$3, "__esModule", { value: true });
269435
+ constants$3.BlendMode = constants$3.VerticalAlign = constants$3.HorizontalAlign = void 0;
269434
269436
  /* Horizontal align modes for cover, contain, bit masks */
269435
269437
  var HorizontalAlign;
269436
269438
  (function (HorizontalAlign) {
269437
269439
  HorizontalAlign[HorizontalAlign["LEFT"] = 1] = "LEFT";
269438
269440
  HorizontalAlign[HorizontalAlign["CENTER"] = 2] = "CENTER";
269439
269441
  HorizontalAlign[HorizontalAlign["RIGHT"] = 4] = "RIGHT";
269440
- })(HorizontalAlign || (constants$2.HorizontalAlign = HorizontalAlign = {}));
269442
+ })(HorizontalAlign || (constants$3.HorizontalAlign = HorizontalAlign = {}));
269441
269443
  /* Vertical align modes for cover, contain, bit masks */
269442
269444
  var VerticalAlign;
269443
269445
  (function (VerticalAlign) {
269444
269446
  VerticalAlign[VerticalAlign["TOP"] = 8] = "TOP";
269445
269447
  VerticalAlign[VerticalAlign["MIDDLE"] = 16] = "MIDDLE";
269446
269448
  VerticalAlign[VerticalAlign["BOTTOM"] = 32] = "BOTTOM";
269447
- })(VerticalAlign || (constants$2.VerticalAlign = VerticalAlign = {}));
269449
+ })(VerticalAlign || (constants$3.VerticalAlign = VerticalAlign = {}));
269448
269450
  /**
269449
269451
  * How to blend two images together
269450
269452
  */
@@ -269519,9 +269521,9 @@ function requireConstants$2 () {
269519
269521
  * The effect is similar to difference but softer.
269520
269522
  */
269521
269523
  BlendMode["EXCLUSION"] = "exclusion";
269522
- })(BlendMode || (constants$2.BlendMode = BlendMode = {}));
269524
+ })(BlendMode || (constants$3.BlendMode = BlendMode = {}));
269523
269525
 
269524
- return constants$2;
269526
+ return constants$3;
269525
269527
  }
269526
269528
 
269527
269529
  var compositeModes = {};
@@ -269800,7 +269802,7 @@ function requireComposite () {
269800
269802
  Object.defineProperty(composite, "__esModule", { value: true });
269801
269803
  composite.composite = composite$1;
269802
269804
  const types_1 = /*@__PURE__*/ requireCommonjs$m();
269803
- const constants_js_1 = requireConstants$2();
269805
+ const constants_js_1 = requireConstants$3();
269804
269806
  const compositeModes = __importStar(requireCompositeModes());
269805
269807
  const utils_1 = /*@__PURE__*/ requireCommonjs$s();
269806
269808
  function composite$1(baseImage, src, x = 0, y = 0, options = {}) {
@@ -271399,7 +271401,7 @@ function requireCommonjs$g () {
271399
271401
  Object.defineProperty(exports$1, "getExifOrientation", { enumerable: true, get: function () { return image_bitmap_js_2.getExifOrientation; } });
271400
271402
  var composite_js_2 = requireComposite();
271401
271403
  Object.defineProperty(exports$1, "composite", { enumerable: true, get: function () { return composite_js_2.composite; } });
271402
- __exportStar(requireConstants$2(), exports$1);
271404
+ __exportStar(requireConstants$3(), exports$1);
271403
271405
  /**
271404
271406
  * Create a Jimp class that support the given image formats and methods
271405
271407
  */
@@ -271885,15 +271887,15 @@ function requireCommonjs$g () {
271885
271887
 
271886
271888
  var commonjs$d = {};
271887
271889
 
271888
- var constants$1 = {};
271890
+ var constants$2 = {};
271889
271891
 
271890
- var hasRequiredConstants$1;
271892
+ var hasRequiredConstants$2;
271891
271893
 
271892
- function requireConstants$1 () {
271893
- if (hasRequiredConstants$1) return constants$1;
271894
- hasRequiredConstants$1 = 1;
271895
- Object.defineProperty(constants$1, "__esModule", { value: true });
271896
- constants$1.ResizeStrategy = void 0;
271894
+ function requireConstants$2 () {
271895
+ if (hasRequiredConstants$2) return constants$2;
271896
+ hasRequiredConstants$2 = 1;
271897
+ Object.defineProperty(constants$2, "__esModule", { value: true });
271898
+ constants$2.ResizeStrategy = void 0;
271897
271899
  /**
271898
271900
  * What resizing algorithm to use.
271899
271901
  */
@@ -271920,9 +271922,9 @@ function requireConstants$1 () {
271920
271922
  */
271921
271923
  ResizeStrategy["HERMITE"] = "hermiteInterpolation";
271922
271924
  ResizeStrategy["BEZIER"] = "bezierInterpolation";
271923
- })(ResizeStrategy || (constants$1.ResizeStrategy = ResizeStrategy = {}));
271925
+ })(ResizeStrategy || (constants$2.ResizeStrategy = ResizeStrategy = {}));
271924
271926
 
271925
- return constants$1;
271927
+ return constants$2;
271926
271928
  }
271927
271929
 
271928
271930
  var resize = {};
@@ -272631,11 +272633,11 @@ function requireCommonjs$f () {
272631
272633
  };
272632
272634
  Object.defineProperty(exports$1, "__esModule", { value: true });
272633
272635
  exports$1.methods = void 0;
272634
- const constants_js_1 = requireConstants$1();
272636
+ const constants_js_1 = requireConstants$2();
272635
272637
  const zod_1 = /*@__PURE__*/ requireZod();
272636
272638
  const resize_js_1 = __importDefault(requireResize());
272637
272639
  const resize2_js_1 = requireResize2();
272638
- __exportStar(requireConstants$1(), exports$1);
272640
+ __exportStar(requireConstants$2(), exports$1);
272639
272641
  const ResizeOptionsSchema = zod_1.z.union([
272640
272642
  zod_1.z.object({
272641
272643
  /** the width to resize the image to */
@@ -279499,7 +279501,7 @@ function requireSax () {
279499
279501
  Buffer.isBuffer(data)
279500
279502
  ) {
279501
279503
  if (!this._decoder) {
279502
- var SD = require$$1$3.StringDecoder;
279504
+ var SD = require$$1$2.StringDecoder;
279503
279505
  this._decoder = new SD('utf8');
279504
279506
  }
279505
279507
  data = this._decoder.write(data);
@@ -291558,8 +291560,8 @@ function requireMessagesMedia () {
291558
291560
  Object.defineProperty(exports$1, "__esModule", { value: true });
291559
291561
  exports$1.getStatusCodeForMediaRetry = exports$1.decryptMediaRetryData = exports$1.decodeMediaRetryNode = exports$1.encryptMediaRetryRequest = exports$1.getWAUploadToServer = exports$1.extensionForMediaMessage = exports$1.downloadEncryptedContent = exports$1.downloadContentFromMessage = exports$1.getUrlFromDirectPath = exports$1.encryptedStream = exports$1.getHttpStream = exports$1.generateThumbnail = exports$1.getStream = exports$1.toBuffer = exports$1.toReadable = exports$1.getAudioDuration = exports$1.mediaMessageSHA256B64 = exports$1.generateProfilePicture = exports$1.encodeBase64EncodedStringForUpload = exports$1.extractImageThumb = exports$1.getMediaKeys = exports$1.hkdfInfoKey = void 0;
291560
291562
  const boom_1 = requireLib$5();
291561
- const child_process_1 = require$$1$4;
291562
- const Crypto = __importStar(require$$1$2);
291563
+ const child_process_1 = require$$1$3;
291564
+ const Crypto = __importStar(require$$1$1);
291563
291565
  const events_1 = require$$0$9;
291564
291566
  const fs_1 = require$$0$7;
291565
291567
  const os_1 = require$$2$2;
@@ -291578,7 +291580,7 @@ function requireMessagesMedia () {
291578
291580
  return jimp;
291579
291581
  })(),
291580
291582
  (async () => {
291581
- const sharp = await Promise.resolve().then(() => __importStar(require$$0$g)).catch(() => { });
291583
+ const sharp = await Promise.resolve().then(() => __importStar(require$$0$h)).catch(() => { });
291582
291584
  return sharp;
291583
291585
  })()
291584
291586
  ]);
@@ -292890,7 +292892,7 @@ function requireValidateConnection () {
292890
292892
  Object.defineProperty(exports$1, "__esModule", { value: true });
292891
292893
  exports$1.encodeSignedDeviceIdentity = exports$1.configureSuccessfulPairing = exports$1.generateRegistrationNode = exports$1.generateLoginNode = void 0;
292892
292894
  const boom_1 = requireLib$5();
292893
- const crypto_1 = require$$1$2;
292895
+ const crypto_1 = require$$1$1;
292894
292896
  const WAProto_1 = requireWAProto();
292895
292897
  const Defaults_1 = requireDefaults();
292896
292898
  const WABinary_1 = requireWABinary();
@@ -294093,7 +294095,7 @@ function requireAuthUtils () {
294093
294095
  };
294094
294096
  Object.defineProperty(authUtils, "__esModule", { value: true });
294095
294097
  authUtils.initAuthCreds = authUtils.addTransactionCapability = authUtils.makeCacheableSignalKeyStore = void 0;
294096
- const crypto_1 = require$$1$2;
294098
+ const crypto_1 = require$$1$1;
294097
294099
  const node_cache_1 = __importDefault(requireNodeCache());
294098
294100
  const crypto_2 = requireCrypto();
294099
294101
  const generics_1 = requireGenerics();
@@ -294609,7 +294611,7 @@ function requireProcessMessage () {
294609
294611
  exports$1.shouldIncrementChatUnread = exports$1.isRealMessage = exports$1.cleanMessage = void 0;
294610
294612
  const WAProto_1 = requireWAProto();
294611
294613
  const Types_1 = requireTypes$5();
294612
- const Utils_1 = requireUtils();
294614
+ const Utils_1 = requireUtils$1();
294613
294615
  const WABinary_1 = requireWABinary();
294614
294616
  const MSG_MISSED_CALL_TYPES = new Set([
294615
294617
  Types_1.WAMessageStubType.CALL_MISSED_GROUP_VIDEO,
@@ -295438,11 +295440,11 @@ function requireEventBuffer () {
295438
295440
  return eventBuffer;
295439
295441
  }
295440
295442
 
295441
- var hasRequiredUtils;
295443
+ var hasRequiredUtils$1;
295442
295444
 
295443
- function requireUtils () {
295444
- if (hasRequiredUtils) return Utils;
295445
- hasRequiredUtils = 1;
295445
+ function requireUtils$1 () {
295446
+ if (hasRequiredUtils$1) return Utils;
295447
+ hasRequiredUtils$1 = 1;
295446
295448
  (function (exports$1) {
295447
295449
  var __createBinding = (Utils && Utils.__createBinding) || (Object.create ? (function(o, m, k, k2) {
295448
295450
  if (k2 === undefined) k2 = k;
@@ -298073,6 +298075,3600 @@ function requireTransport () {
298073
298075
  return transport_1;
298074
298076
  }
298075
298077
 
298078
+ var pinoPretty = {exports: {}};
298079
+
298080
+ var colorette = {};
298081
+
298082
+ var hasRequiredColorette;
298083
+
298084
+ function requireColorette () {
298085
+ if (hasRequiredColorette) return colorette;
298086
+ hasRequiredColorette = 1;
298087
+
298088
+ Object.defineProperty(colorette, '__esModule', { value: true });
298089
+
298090
+ var tty = require$$0$f;
298091
+
298092
+ function _interopNamespace(e) {
298093
+ if (e && e.__esModule) return e;
298094
+ var n = Object.create(null);
298095
+ if (e) {
298096
+ Object.keys(e).forEach(function (k) {
298097
+ if (k !== 'default') {
298098
+ var d = Object.getOwnPropertyDescriptor(e, k);
298099
+ Object.defineProperty(n, k, d.get ? d : {
298100
+ enumerable: true,
298101
+ get: function () { return e[k]; }
298102
+ });
298103
+ }
298104
+ });
298105
+ }
298106
+ n["default"] = e;
298107
+ return Object.freeze(n);
298108
+ }
298109
+
298110
+ var tty__namespace = /*#__PURE__*/_interopNamespace(tty);
298111
+
298112
+ const {
298113
+ env = {},
298114
+ argv = [],
298115
+ platform = "",
298116
+ } = typeof process === "undefined" ? {} : process;
298117
+
298118
+ const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
298119
+ const isForced = "FORCE_COLOR" in env || argv.includes("--color");
298120
+ const isWindows = platform === "win32";
298121
+ const isDumbTerminal = env.TERM === "dumb";
298122
+
298123
+ const isCompatibleTerminal =
298124
+ tty__namespace && tty__namespace.isatty && tty__namespace.isatty(1) && env.TERM && !isDumbTerminal;
298125
+
298126
+ const isCI =
298127
+ "CI" in env &&
298128
+ ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
298129
+
298130
+ const isColorSupported =
298131
+ !isDisabled &&
298132
+ (isForced || (isWindows && !isDumbTerminal) || isCompatibleTerminal || isCI);
298133
+
298134
+ const replaceClose = (
298135
+ index,
298136
+ string,
298137
+ close,
298138
+ replace,
298139
+ head = string.substring(0, index) + replace,
298140
+ tail = string.substring(index + close.length),
298141
+ next = tail.indexOf(close)
298142
+ ) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
298143
+
298144
+ const clearBleed = (index, string, open, close, replace) =>
298145
+ index < 0
298146
+ ? open + string + close
298147
+ : open + replaceClose(index, string, close, replace) + close;
298148
+
298149
+ const filterEmpty =
298150
+ (open, close, replace = open, at = open.length + 1) =>
298151
+ (string) =>
298152
+ string || !(string === "" || string === undefined)
298153
+ ? clearBleed(
298154
+ ("" + string).indexOf(close, at),
298155
+ string,
298156
+ open,
298157
+ close,
298158
+ replace
298159
+ )
298160
+ : "";
298161
+
298162
+ const init = (open, close, replace) =>
298163
+ filterEmpty(`\x1b[${open}m`, `\x1b[${close}m`, replace);
298164
+
298165
+ const colors = {
298166
+ reset: init(0, 0),
298167
+ bold: init(1, 22, "\x1b[22m\x1b[1m"),
298168
+ dim: init(2, 22, "\x1b[22m\x1b[2m"),
298169
+ italic: init(3, 23),
298170
+ underline: init(4, 24),
298171
+ inverse: init(7, 27),
298172
+ hidden: init(8, 28),
298173
+ strikethrough: init(9, 29),
298174
+ black: init(30, 39),
298175
+ red: init(31, 39),
298176
+ green: init(32, 39),
298177
+ yellow: init(33, 39),
298178
+ blue: init(34, 39),
298179
+ magenta: init(35, 39),
298180
+ cyan: init(36, 39),
298181
+ white: init(37, 39),
298182
+ gray: init(90, 39),
298183
+ bgBlack: init(40, 49),
298184
+ bgRed: init(41, 49),
298185
+ bgGreen: init(42, 49),
298186
+ bgYellow: init(43, 49),
298187
+ bgBlue: init(44, 49),
298188
+ bgMagenta: init(45, 49),
298189
+ bgCyan: init(46, 49),
298190
+ bgWhite: init(47, 49),
298191
+ blackBright: init(90, 39),
298192
+ redBright: init(91, 39),
298193
+ greenBright: init(92, 39),
298194
+ yellowBright: init(93, 39),
298195
+ blueBright: init(94, 39),
298196
+ magentaBright: init(95, 39),
298197
+ cyanBright: init(96, 39),
298198
+ whiteBright: init(97, 39),
298199
+ bgBlackBright: init(100, 49),
298200
+ bgRedBright: init(101, 49),
298201
+ bgGreenBright: init(102, 49),
298202
+ bgYellowBright: init(103, 49),
298203
+ bgBlueBright: init(104, 49),
298204
+ bgMagentaBright: init(105, 49),
298205
+ bgCyanBright: init(106, 49),
298206
+ bgWhiteBright: init(107, 49),
298207
+ };
298208
+
298209
+ const createColors = ({ useColor = isColorSupported } = {}) =>
298210
+ useColor
298211
+ ? colors
298212
+ : Object.keys(colors).reduce(
298213
+ (colors, key) => ({ ...colors, [key]: String }),
298214
+ {}
298215
+ );
298216
+
298217
+ const {
298218
+ reset,
298219
+ bold,
298220
+ dim,
298221
+ italic,
298222
+ underline,
298223
+ inverse,
298224
+ hidden,
298225
+ strikethrough,
298226
+ black,
298227
+ red,
298228
+ green,
298229
+ yellow,
298230
+ blue,
298231
+ magenta,
298232
+ cyan,
298233
+ white,
298234
+ gray,
298235
+ bgBlack,
298236
+ bgRed,
298237
+ bgGreen,
298238
+ bgYellow,
298239
+ bgBlue,
298240
+ bgMagenta,
298241
+ bgCyan,
298242
+ bgWhite,
298243
+ blackBright,
298244
+ redBright,
298245
+ greenBright,
298246
+ yellowBright,
298247
+ blueBright,
298248
+ magentaBright,
298249
+ cyanBright,
298250
+ whiteBright,
298251
+ bgBlackBright,
298252
+ bgRedBright,
298253
+ bgGreenBright,
298254
+ bgYellowBright,
298255
+ bgBlueBright,
298256
+ bgMagentaBright,
298257
+ bgCyanBright,
298258
+ bgWhiteBright,
298259
+ } = createColors();
298260
+
298261
+ colorette.bgBlack = bgBlack;
298262
+ colorette.bgBlackBright = bgBlackBright;
298263
+ colorette.bgBlue = bgBlue;
298264
+ colorette.bgBlueBright = bgBlueBright;
298265
+ colorette.bgCyan = bgCyan;
298266
+ colorette.bgCyanBright = bgCyanBright;
298267
+ colorette.bgGreen = bgGreen;
298268
+ colorette.bgGreenBright = bgGreenBright;
298269
+ colorette.bgMagenta = bgMagenta;
298270
+ colorette.bgMagentaBright = bgMagentaBright;
298271
+ colorette.bgRed = bgRed;
298272
+ colorette.bgRedBright = bgRedBright;
298273
+ colorette.bgWhite = bgWhite;
298274
+ colorette.bgWhiteBright = bgWhiteBright;
298275
+ colorette.bgYellow = bgYellow;
298276
+ colorette.bgYellowBright = bgYellowBright;
298277
+ colorette.black = black;
298278
+ colorette.blackBright = blackBright;
298279
+ colorette.blue = blue;
298280
+ colorette.blueBright = blueBright;
298281
+ colorette.bold = bold;
298282
+ colorette.createColors = createColors;
298283
+ colorette.cyan = cyan;
298284
+ colorette.cyanBright = cyanBright;
298285
+ colorette.dim = dim;
298286
+ colorette.gray = gray;
298287
+ colorette.green = green;
298288
+ colorette.greenBright = greenBright;
298289
+ colorette.hidden = hidden;
298290
+ colorette.inverse = inverse;
298291
+ colorette.isColorSupported = isColorSupported;
298292
+ colorette.italic = italic;
298293
+ colorette.magenta = magenta;
298294
+ colorette.magentaBright = magentaBright;
298295
+ colorette.red = red;
298296
+ colorette.redBright = redBright;
298297
+ colorette.reset = reset;
298298
+ colorette.strikethrough = strikethrough;
298299
+ colorette.underline = underline;
298300
+ colorette.white = white;
298301
+ colorette.whiteBright = whiteBright;
298302
+ colorette.yellow = yellow;
298303
+ colorette.yellowBright = yellowBright;
298304
+ return colorette;
298305
+ }
298306
+
298307
+ var once = {exports: {}};
298308
+
298309
+ var wrappy_1;
298310
+ var hasRequiredWrappy;
298311
+
298312
+ function requireWrappy () {
298313
+ if (hasRequiredWrappy) return wrappy_1;
298314
+ hasRequiredWrappy = 1;
298315
+ // Returns a wrapper function that returns a wrapped callback
298316
+ // The wrapper function should do some stuff, and return a
298317
+ // presumably different callback function.
298318
+ // This makes sure that own properties are retained, so that
298319
+ // decorations and such are not lost along the way.
298320
+ wrappy_1 = wrappy;
298321
+ function wrappy (fn, cb) {
298322
+ if (fn && cb) return wrappy(fn)(cb)
298323
+
298324
+ if (typeof fn !== 'function')
298325
+ throw new TypeError('need wrapper function')
298326
+
298327
+ Object.keys(fn).forEach(function (k) {
298328
+ wrapper[k] = fn[k];
298329
+ });
298330
+
298331
+ return wrapper
298332
+
298333
+ function wrapper() {
298334
+ var args = new Array(arguments.length);
298335
+ for (var i = 0; i < args.length; i++) {
298336
+ args[i] = arguments[i];
298337
+ }
298338
+ var ret = fn.apply(this, args);
298339
+ var cb = args[args.length-1];
298340
+ if (typeof ret === 'function' && ret !== cb) {
298341
+ Object.keys(cb).forEach(function (k) {
298342
+ ret[k] = cb[k];
298343
+ });
298344
+ }
298345
+ return ret
298346
+ }
298347
+ }
298348
+ return wrappy_1;
298349
+ }
298350
+
298351
+ var hasRequiredOnce;
298352
+
298353
+ function requireOnce () {
298354
+ if (hasRequiredOnce) return once.exports;
298355
+ hasRequiredOnce = 1;
298356
+ var wrappy = requireWrappy();
298357
+ once.exports = wrappy(once$1);
298358
+ once.exports.strict = wrappy(onceStrict);
298359
+
298360
+ once$1.proto = once$1(function () {
298361
+ Object.defineProperty(Function.prototype, 'once', {
298362
+ value: function () {
298363
+ return once$1(this)
298364
+ },
298365
+ configurable: true
298366
+ });
298367
+
298368
+ Object.defineProperty(Function.prototype, 'onceStrict', {
298369
+ value: function () {
298370
+ return onceStrict(this)
298371
+ },
298372
+ configurable: true
298373
+ });
298374
+ });
298375
+
298376
+ function once$1 (fn) {
298377
+ var f = function () {
298378
+ if (f.called) return f.value
298379
+ f.called = true;
298380
+ return f.value = fn.apply(this, arguments)
298381
+ };
298382
+ f.called = false;
298383
+ return f
298384
+ }
298385
+
298386
+ function onceStrict (fn) {
298387
+ var f = function () {
298388
+ if (f.called)
298389
+ throw new Error(f.onceError)
298390
+ f.called = true;
298391
+ return f.value = fn.apply(this, arguments)
298392
+ };
298393
+ var name = fn.name || 'Function wrapped with `once`';
298394
+ f.onceError = name + " shouldn't be called more than once";
298395
+ f.called = false;
298396
+ return f
298397
+ }
298398
+ return once.exports;
298399
+ }
298400
+
298401
+ var endOfStream;
298402
+ var hasRequiredEndOfStream;
298403
+
298404
+ function requireEndOfStream () {
298405
+ if (hasRequiredEndOfStream) return endOfStream;
298406
+ hasRequiredEndOfStream = 1;
298407
+ var once = requireOnce();
298408
+
298409
+ var noop = function() {};
298410
+
298411
+ var qnt = commonjsGlobal.Bare ? queueMicrotask : process.nextTick.bind(process);
298412
+
298413
+ var isRequest = function(stream) {
298414
+ return stream.setHeader && typeof stream.abort === 'function';
298415
+ };
298416
+
298417
+ var isChildProcess = function(stream) {
298418
+ return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
298419
+ };
298420
+
298421
+ var eos = function(stream, opts, callback) {
298422
+ if (typeof opts === 'function') return eos(stream, null, opts);
298423
+ if (!opts) opts = {};
298424
+
298425
+ callback = once(callback || noop);
298426
+
298427
+ var ws = stream._writableState;
298428
+ var rs = stream._readableState;
298429
+ var readable = opts.readable || (opts.readable !== false && stream.readable);
298430
+ var writable = opts.writable || (opts.writable !== false && stream.writable);
298431
+ var cancelled = false;
298432
+
298433
+ var onlegacyfinish = function() {
298434
+ if (!stream.writable) onfinish();
298435
+ };
298436
+
298437
+ var onfinish = function() {
298438
+ writable = false;
298439
+ if (!readable) callback.call(stream);
298440
+ };
298441
+
298442
+ var onend = function() {
298443
+ readable = false;
298444
+ if (!writable) callback.call(stream);
298445
+ };
298446
+
298447
+ var onexit = function(exitCode) {
298448
+ callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
298449
+ };
298450
+
298451
+ var onerror = function(err) {
298452
+ callback.call(stream, err);
298453
+ };
298454
+
298455
+ var onclose = function() {
298456
+ qnt(onclosenexttick);
298457
+ };
298458
+
298459
+ var onclosenexttick = function() {
298460
+ if (cancelled) return;
298461
+ if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close'));
298462
+ if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close'));
298463
+ };
298464
+
298465
+ var onrequest = function() {
298466
+ stream.req.on('finish', onfinish);
298467
+ };
298468
+
298469
+ if (isRequest(stream)) {
298470
+ stream.on('complete', onfinish);
298471
+ stream.on('abort', onclose);
298472
+ if (stream.req) onrequest();
298473
+ else stream.on('request', onrequest);
298474
+ } else if (writable && !ws) { // legacy streams
298475
+ stream.on('end', onlegacyfinish);
298476
+ stream.on('close', onlegacyfinish);
298477
+ }
298478
+
298479
+ if (isChildProcess(stream)) stream.on('exit', onexit);
298480
+
298481
+ stream.on('end', onend);
298482
+ stream.on('finish', onfinish);
298483
+ if (opts.error !== false) stream.on('error', onerror);
298484
+ stream.on('close', onclose);
298485
+
298486
+ return function() {
298487
+ cancelled = true;
298488
+ stream.removeListener('complete', onfinish);
298489
+ stream.removeListener('abort', onclose);
298490
+ stream.removeListener('request', onrequest);
298491
+ if (stream.req) stream.req.removeListener('finish', onfinish);
298492
+ stream.removeListener('end', onlegacyfinish);
298493
+ stream.removeListener('close', onlegacyfinish);
298494
+ stream.removeListener('finish', onfinish);
298495
+ stream.removeListener('exit', onexit);
298496
+ stream.removeListener('end', onend);
298497
+ stream.removeListener('error', onerror);
298498
+ stream.removeListener('close', onclose);
298499
+ };
298500
+ };
298501
+
298502
+ endOfStream = eos;
298503
+ return endOfStream;
298504
+ }
298505
+
298506
+ var pump_1;
298507
+ var hasRequiredPump;
298508
+
298509
+ function requirePump () {
298510
+ if (hasRequiredPump) return pump_1;
298511
+ hasRequiredPump = 1;
298512
+ var once = requireOnce();
298513
+ var eos = requireEndOfStream();
298514
+ var fs;
298515
+
298516
+ try {
298517
+ fs = require('fs'); // we only need fs to get the ReadStream and WriteStream prototypes
298518
+ } catch (e) {}
298519
+
298520
+ var noop = function () {};
298521
+ var ancient = typeof process === 'undefined' ? false : /^v?\.0/.test(process.version);
298522
+
298523
+ var isFn = function (fn) {
298524
+ return typeof fn === 'function'
298525
+ };
298526
+
298527
+ var isFS = function (stream) {
298528
+ if (!ancient) return false // newer node version do not need to care about fs is a special way
298529
+ if (!fs) return false // browser
298530
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
298531
+ };
298532
+
298533
+ var isRequest = function (stream) {
298534
+ return stream.setHeader && isFn(stream.abort)
298535
+ };
298536
+
298537
+ var destroyer = function (stream, reading, writing, callback) {
298538
+ callback = once(callback);
298539
+
298540
+ var closed = false;
298541
+ stream.on('close', function () {
298542
+ closed = true;
298543
+ });
298544
+
298545
+ eos(stream, {readable: reading, writable: writing}, function (err) {
298546
+ if (err) return callback(err)
298547
+ closed = true;
298548
+ callback();
298549
+ });
298550
+
298551
+ var destroyed = false;
298552
+ return function (err) {
298553
+ if (closed) return
298554
+ if (destroyed) return
298555
+ destroyed = true;
298556
+
298557
+ if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
298558
+ if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
298559
+
298560
+ if (isFn(stream.destroy)) return stream.destroy()
298561
+
298562
+ callback(err || new Error('stream was destroyed'));
298563
+ }
298564
+ };
298565
+
298566
+ var call = function (fn) {
298567
+ fn();
298568
+ };
298569
+
298570
+ var pipe = function (from, to) {
298571
+ return from.pipe(to)
298572
+ };
298573
+
298574
+ var pump = function () {
298575
+ var streams = Array.prototype.slice.call(arguments);
298576
+ var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop;
298577
+
298578
+ if (Array.isArray(streams[0])) streams = streams[0];
298579
+ if (streams.length < 2) throw new Error('pump requires two streams per minimum')
298580
+
298581
+ var error;
298582
+ var destroys = streams.map(function (stream, i) {
298583
+ var reading = i < streams.length - 1;
298584
+ var writing = i > 0;
298585
+ return destroyer(stream, reading, writing, function (err) {
298586
+ if (!error) error = err;
298587
+ if (err) destroys.forEach(call);
298588
+ if (reading) return
298589
+ destroys.forEach(call);
298590
+ callback(error);
298591
+ })
298592
+ });
298593
+
298594
+ return streams.reduce(pipe)
298595
+ };
298596
+
298597
+ pump_1 = pump;
298598
+ return pump_1;
298599
+ }
298600
+
298601
+ /*
298602
+ Copyright (c) 2014-2021, Matteo Collina <hello@matteocollina.com>
298603
+
298604
+ Permission to use, copy, modify, and/or distribute this software for any
298605
+ purpose with or without fee is hereby granted, provided that the above
298606
+ copyright notice and this permission notice appear in all copies.
298607
+
298608
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
298609
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
298610
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
298611
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
298612
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
298613
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
298614
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
298615
+ */
298616
+
298617
+ var split2;
298618
+ var hasRequiredSplit2;
298619
+
298620
+ function requireSplit2 () {
298621
+ if (hasRequiredSplit2) return split2;
298622
+ hasRequiredSplit2 = 1;
298623
+
298624
+ const { Transform } = require$$0$5;
298625
+ const { StringDecoder } = require$$1$2;
298626
+ const kLast = Symbol('last');
298627
+ const kDecoder = Symbol('decoder');
298628
+
298629
+ function transform (chunk, enc, cb) {
298630
+ let list;
298631
+ if (this.overflow) { // Line buffer is full. Skip to start of next line.
298632
+ const buf = this[kDecoder].write(chunk);
298633
+ list = buf.split(this.matcher);
298634
+
298635
+ if (list.length === 1) return cb() // Line ending not found. Discard entire chunk.
298636
+
298637
+ // Line ending found. Discard trailing fragment of previous line and reset overflow state.
298638
+ list.shift();
298639
+ this.overflow = false;
298640
+ } else {
298641
+ this[kLast] += this[kDecoder].write(chunk);
298642
+ list = this[kLast].split(this.matcher);
298643
+ }
298644
+
298645
+ this[kLast] = list.pop();
298646
+
298647
+ for (let i = 0; i < list.length; i++) {
298648
+ try {
298649
+ push(this, this.mapper(list[i]));
298650
+ } catch (error) {
298651
+ return cb(error)
298652
+ }
298653
+ }
298654
+
298655
+ this.overflow = this[kLast].length > this.maxLength;
298656
+ if (this.overflow && !this.skipOverflow) {
298657
+ cb(new Error('maximum buffer reached'));
298658
+ return
298659
+ }
298660
+
298661
+ cb();
298662
+ }
298663
+
298664
+ function flush (cb) {
298665
+ // forward any gibberish left in there
298666
+ this[kLast] += this[kDecoder].end();
298667
+
298668
+ if (this[kLast]) {
298669
+ try {
298670
+ push(this, this.mapper(this[kLast]));
298671
+ } catch (error) {
298672
+ return cb(error)
298673
+ }
298674
+ }
298675
+
298676
+ cb();
298677
+ }
298678
+
298679
+ function push (self, val) {
298680
+ if (val !== undefined) {
298681
+ self.push(val);
298682
+ }
298683
+ }
298684
+
298685
+ function noop (incoming) {
298686
+ return incoming
298687
+ }
298688
+
298689
+ function split (matcher, mapper, options) {
298690
+ // Set defaults for any arguments not supplied.
298691
+ matcher = matcher || /\r?\n/;
298692
+ mapper = mapper || noop;
298693
+ options = options || {};
298694
+
298695
+ // Test arguments explicitly.
298696
+ switch (arguments.length) {
298697
+ case 1:
298698
+ // If mapper is only argument.
298699
+ if (typeof matcher === 'function') {
298700
+ mapper = matcher;
298701
+ matcher = /\r?\n/;
298702
+ // If options is only argument.
298703
+ } else if (typeof matcher === 'object' && !(matcher instanceof RegExp) && !matcher[Symbol.split]) {
298704
+ options = matcher;
298705
+ matcher = /\r?\n/;
298706
+ }
298707
+ break
298708
+
298709
+ case 2:
298710
+ // If mapper and options are arguments.
298711
+ if (typeof matcher === 'function') {
298712
+ options = mapper;
298713
+ mapper = matcher;
298714
+ matcher = /\r?\n/;
298715
+ // If matcher and options are arguments.
298716
+ } else if (typeof mapper === 'object') {
298717
+ options = mapper;
298718
+ mapper = noop;
298719
+ }
298720
+ }
298721
+
298722
+ options = Object.assign({}, options);
298723
+ options.autoDestroy = true;
298724
+ options.transform = transform;
298725
+ options.flush = flush;
298726
+ options.readableObjectMode = true;
298727
+
298728
+ const stream = new Transform(options);
298729
+
298730
+ stream[kLast] = '';
298731
+ stream[kDecoder] = new StringDecoder('utf8');
298732
+ stream.matcher = matcher;
298733
+ stream.mapper = mapper;
298734
+ stream.maxLength = options.maxLength;
298735
+ stream.skipOverflow = options.skipOverflow || false;
298736
+ stream.overflow = false;
298737
+ stream._destroy = function (err, cb) {
298738
+ // Weird Node v12 bug that we need to work around
298739
+ this._writableState.errorEmitted = false;
298740
+ cb(err);
298741
+ };
298742
+
298743
+ return stream
298744
+ }
298745
+
298746
+ split2 = split;
298747
+ return split2;
298748
+ }
298749
+
298750
+ var pinoAbstractTransport;
298751
+ var hasRequiredPinoAbstractTransport;
298752
+
298753
+ function requirePinoAbstractTransport () {
298754
+ if (hasRequiredPinoAbstractTransport) return pinoAbstractTransport;
298755
+ hasRequiredPinoAbstractTransport = 1;
298756
+
298757
+ const metadata = Symbol.for('pino.metadata');
298758
+ const split = requireSplit2();
298759
+ const { Duplex } = require$$0$5;
298760
+ const { parentPort, workerData } = require$$2;
298761
+
298762
+ function createDeferred () {
298763
+ let resolve;
298764
+ let reject;
298765
+ const promise = new Promise((_resolve, _reject) => {
298766
+ resolve = _resolve;
298767
+ reject = _reject;
298768
+ });
298769
+ promise.resolve = resolve;
298770
+ promise.reject = reject;
298771
+ return promise
298772
+ }
298773
+
298774
+ pinoAbstractTransport = function build (fn, opts = {}) {
298775
+ const waitForConfig = opts.expectPinoConfig === true && workerData?.workerData?.pinoWillSendConfig === true;
298776
+ const parseLines = opts.parse === 'lines';
298777
+ const parseLine = typeof opts.parseLine === 'function' ? opts.parseLine : JSON.parse;
298778
+ const close = opts.close || defaultClose;
298779
+ const stream = split(function (line) {
298780
+ let value;
298781
+
298782
+ try {
298783
+ value = parseLine(line);
298784
+ } catch (error) {
298785
+ this.emit('unknown', line, error);
298786
+ return
298787
+ }
298788
+
298789
+ if (value === null) {
298790
+ this.emit('unknown', line, 'Null value ignored');
298791
+ return
298792
+ }
298793
+
298794
+ if (typeof value !== 'object') {
298795
+ value = {
298796
+ data: value,
298797
+ time: Date.now()
298798
+ };
298799
+ }
298800
+
298801
+ if (stream[metadata]) {
298802
+ stream.lastTime = value.time;
298803
+ stream.lastLevel = value.level;
298804
+ stream.lastObj = value;
298805
+ }
298806
+
298807
+ if (parseLines) {
298808
+ return line
298809
+ }
298810
+
298811
+ return value
298812
+ }, { autoDestroy: true });
298813
+
298814
+ stream._destroy = function (err, cb) {
298815
+ const promise = close(err, cb);
298816
+ if (promise && typeof promise.then === 'function') {
298817
+ promise.then(cb, cb);
298818
+ }
298819
+ };
298820
+
298821
+ if (opts.expectPinoConfig === true && workerData?.workerData?.pinoWillSendConfig !== true) {
298822
+ setImmediate(() => {
298823
+ stream.emit('error', new Error('This transport is not compatible with the current version of pino. Please upgrade pino to the latest version.'));
298824
+ });
298825
+ }
298826
+
298827
+ if (opts.metadata !== false) {
298828
+ stream[metadata] = true;
298829
+ stream.lastTime = 0;
298830
+ stream.lastLevel = 0;
298831
+ stream.lastObj = null;
298832
+ }
298833
+
298834
+ if (waitForConfig) {
298835
+ let pinoConfig = {};
298836
+ const configReceived = createDeferred();
298837
+ parentPort.on('message', function handleMessage (message) {
298838
+ if (message.code === 'PINO_CONFIG') {
298839
+ pinoConfig = message.config;
298840
+ configReceived.resolve();
298841
+ parentPort.off('message', handleMessage);
298842
+ }
298843
+ });
298844
+
298845
+ Object.defineProperties(stream, {
298846
+ levels: {
298847
+ get () { return pinoConfig.levels }
298848
+ },
298849
+ messageKey: {
298850
+ get () { return pinoConfig.messageKey }
298851
+ },
298852
+ errorKey: {
298853
+ get () { return pinoConfig.errorKey }
298854
+ }
298855
+ });
298856
+
298857
+ return configReceived.then(finish)
298858
+ }
298859
+
298860
+ return finish()
298861
+
298862
+ function finish () {
298863
+ let res = fn(stream);
298864
+
298865
+ if (res && typeof res.catch === 'function') {
298866
+ res.catch((err) => {
298867
+ stream.destroy(err);
298868
+ });
298869
+
298870
+ // set it to null to not retain a reference to the promise
298871
+ res = null;
298872
+ } else if (opts.enablePipelining && res) {
298873
+ return Duplex.from({ writable: stream, readable: res })
298874
+ }
298875
+
298876
+ return stream
298877
+ }
298878
+ };
298879
+
298880
+ function defaultClose (err, cb) {
298881
+ process.nextTick(cb, err);
298882
+ }
298883
+ return pinoAbstractTransport;
298884
+ }
298885
+
298886
+ var constants$1;
298887
+ var hasRequiredConstants$1;
298888
+
298889
+ function requireConstants$1 () {
298890
+ if (hasRequiredConstants$1) return constants$1;
298891
+ hasRequiredConstants$1 = 1;
298892
+
298893
+ /**
298894
+ * A set of property names that indicate the value represents an error object.
298895
+ *
298896
+ * @typedef {string[]} K_ERROR_LIKE_KEYS
298897
+ */
298898
+
298899
+ constants$1 = {
298900
+ DATE_FORMAT: 'yyyy-mm-dd HH:MM:ss.l o',
298901
+ DATE_FORMAT_SIMPLE: 'HH:MM:ss.l',
298902
+
298903
+ /**
298904
+ * @type {K_ERROR_LIKE_KEYS}
298905
+ */
298906
+ ERROR_LIKE_KEYS: ['err', 'error'],
298907
+
298908
+ MESSAGE_KEY: 'msg',
298909
+
298910
+ LEVEL_KEY: 'level',
298911
+
298912
+ LEVEL_LABEL: 'levelLabel',
298913
+
298914
+ TIMESTAMP_KEY: 'time',
298915
+
298916
+ LEVELS: {
298917
+ default: 'USERLVL',
298918
+ 60: 'FATAL',
298919
+ 50: 'ERROR',
298920
+ 40: 'WARN',
298921
+ 30: 'INFO',
298922
+ 20: 'DEBUG',
298923
+ 10: 'TRACE'
298924
+ },
298925
+
298926
+ LEVEL_NAMES: {
298927
+ fatal: 60,
298928
+ error: 50,
298929
+ warn: 40,
298930
+ info: 30,
298931
+ debug: 20,
298932
+ trace: 10
298933
+ },
298934
+
298935
+ // Object keys that probably came from a logger like Pino or Bunyan.
298936
+ LOGGER_KEYS: [
298937
+ 'pid',
298938
+ 'hostname',
298939
+ 'name',
298940
+ 'level',
298941
+ 'time',
298942
+ 'timestamp',
298943
+ 'caller'
298944
+ ]
298945
+ };
298946
+ return constants$1;
298947
+ }
298948
+
298949
+ var getLevelLabelData_1;
298950
+ var hasRequiredGetLevelLabelData;
298951
+
298952
+ function requireGetLevelLabelData () {
298953
+ if (hasRequiredGetLevelLabelData) return getLevelLabelData_1;
298954
+ hasRequiredGetLevelLabelData = 1;
298955
+
298956
+ getLevelLabelData_1 = getLevelLabelData;
298957
+ const { LEVELS, LEVEL_NAMES } = requireConstants$1();
298958
+
298959
+ /**
298960
+ * Given initial settings for custom levels/names and use of only custom props
298961
+ * get the level label that corresponds with a given level number
298962
+ *
298963
+ * @param {boolean} useOnlyCustomProps
298964
+ * @param {object} customLevels
298965
+ * @param {object} customLevelNames
298966
+ *
298967
+ * @returns {function} A function that takes a number level and returns the level's label string
298968
+ */
298969
+ function getLevelLabelData (useOnlyCustomProps, customLevels, customLevelNames) {
298970
+ const levels = useOnlyCustomProps ? customLevels || LEVELS : Object.assign({}, LEVELS, customLevels);
298971
+ const levelNames = useOnlyCustomProps ? customLevelNames || LEVEL_NAMES : Object.assign({}, LEVEL_NAMES, customLevelNames);
298972
+ return function (level) {
298973
+ let levelNum = 'default';
298974
+ if (Number.isInteger(+level)) {
298975
+ levelNum = Object.prototype.hasOwnProperty.call(levels, level) ? level : levelNum;
298976
+ } else {
298977
+ levelNum = Object.prototype.hasOwnProperty.call(levelNames, level.toLowerCase()) ? levelNames[level.toLowerCase()] : levelNum;
298978
+ }
298979
+
298980
+ return [levels[levelNum], levelNum]
298981
+ }
298982
+ }
298983
+ return getLevelLabelData_1;
298984
+ }
298985
+
298986
+ var colors;
298987
+ var hasRequiredColors;
298988
+
298989
+ function requireColors () {
298990
+ if (hasRequiredColors) return colors;
298991
+ hasRequiredColors = 1;
298992
+
298993
+ const nocolor = input => input;
298994
+ const plain = {
298995
+ default: nocolor,
298996
+ 60: nocolor,
298997
+ 50: nocolor,
298998
+ 40: nocolor,
298999
+ 30: nocolor,
299000
+ 20: nocolor,
299001
+ 10: nocolor,
299002
+ message: nocolor,
299003
+ greyMessage: nocolor,
299004
+ property: nocolor
299005
+ };
299006
+
299007
+ const { createColors } = requireColorette();
299008
+ const getLevelLabelData = requireGetLevelLabelData();
299009
+ const availableColors = createColors({ useColor: true });
299010
+ const { white, bgRed, red, yellow, green, blue, gray, cyan, magenta } = availableColors;
299011
+
299012
+ const colored = {
299013
+ default: white,
299014
+ 60: bgRed,
299015
+ 50: red,
299016
+ 40: yellow,
299017
+ 30: green,
299018
+ 20: blue,
299019
+ 10: gray,
299020
+ message: cyan,
299021
+ greyMessage: gray,
299022
+ property: magenta
299023
+ };
299024
+
299025
+ function resolveCustomColoredColorizer (customColors) {
299026
+ return customColors.reduce(
299027
+ function (agg, [level, color]) {
299028
+ agg[level] = typeof availableColors[color] === 'function' ? availableColors[color] : white;
299029
+
299030
+ return agg
299031
+ },
299032
+ { default: white, message: cyan, greyMessage: gray, property: magenta }
299033
+ )
299034
+ }
299035
+
299036
+ function colorizeLevel (useOnlyCustomProps) {
299037
+ return function (level, colorizer, { customLevels, customLevelNames } = {}) {
299038
+ const [levelStr, levelNum] = getLevelLabelData(useOnlyCustomProps, customLevels, customLevelNames)(level);
299039
+
299040
+ return Object.prototype.hasOwnProperty.call(colorizer, levelNum) ? colorizer[levelNum](levelStr) : colorizer.default(levelStr)
299041
+ }
299042
+ }
299043
+
299044
+ function plainColorizer (useOnlyCustomProps) {
299045
+ const newPlainColorizer = colorizeLevel(useOnlyCustomProps);
299046
+ const customColoredColorizer = function (level, opts) {
299047
+ return newPlainColorizer(level, plain, opts)
299048
+ };
299049
+ customColoredColorizer.message = plain.message;
299050
+ customColoredColorizer.greyMessage = plain.greyMessage;
299051
+ customColoredColorizer.property = plain.property;
299052
+ customColoredColorizer.colors = createColors({ useColor: false });
299053
+ return customColoredColorizer
299054
+ }
299055
+
299056
+ function coloredColorizer (useOnlyCustomProps) {
299057
+ const newColoredColorizer = colorizeLevel(useOnlyCustomProps);
299058
+ const customColoredColorizer = function (level, opts) {
299059
+ return newColoredColorizer(level, colored, opts)
299060
+ };
299061
+ customColoredColorizer.message = colored.message;
299062
+ customColoredColorizer.property = colored.property;
299063
+ customColoredColorizer.greyMessage = colored.greyMessage;
299064
+ customColoredColorizer.colors = availableColors;
299065
+ return customColoredColorizer
299066
+ }
299067
+
299068
+ function customColoredColorizerFactory (customColors, useOnlyCustomProps) {
299069
+ const onlyCustomColored = resolveCustomColoredColorizer(customColors);
299070
+ const customColored = useOnlyCustomProps ? onlyCustomColored : Object.assign({}, colored, onlyCustomColored);
299071
+ const colorizeLevelCustom = colorizeLevel(useOnlyCustomProps);
299072
+
299073
+ const customColoredColorizer = function (level, opts) {
299074
+ return colorizeLevelCustom(level, customColored, opts)
299075
+ };
299076
+ customColoredColorizer.colors = availableColors;
299077
+ customColoredColorizer.message = customColoredColorizer.message || customColored.message;
299078
+ customColoredColorizer.property = customColoredColorizer.property || customColored.property;
299079
+ customColoredColorizer.greyMessage = customColoredColorizer.greyMessage || customColored.greyMessage;
299080
+
299081
+ return customColoredColorizer
299082
+ }
299083
+
299084
+ /**
299085
+ * Applies colorization, if possible, to a string representing the passed in
299086
+ * `level`. For example, the default colorizer will return a "green" colored
299087
+ * string for the "info" level.
299088
+ *
299089
+ * @typedef {function} ColorizerFunc
299090
+ * @param {string|number} level In either case, the input will map to a color
299091
+ * for the specified level or to the color for `USERLVL` if the level is not
299092
+ * recognized.
299093
+ * @property {function} message Accepts one string parameter that will be
299094
+ * colorized to a predefined color.
299095
+ * @property {Colorette.Colorette} colors Available color functions based on `useColor` (or `colorize`) context
299096
+ */
299097
+
299098
+ /**
299099
+ * Factory function get a function to colorized levels. The returned function
299100
+ * also includes a `.message(str)` method to colorize strings.
299101
+ *
299102
+ * @param {boolean} [useColors=false] When `true` a function that applies standard
299103
+ * terminal colors is returned.
299104
+ * @param {array[]} [customColors] Tuple where first item of each array is the
299105
+ * level index and the second item is the color
299106
+ * @param {boolean} [useOnlyCustomProps] When `true`, only use the provided
299107
+ * custom colors provided and not fallback to default
299108
+ *
299109
+ * @returns {ColorizerFunc} `function (level) {}` has a `.message(str)` method to
299110
+ * apply colorization to a string. The core function accepts either an integer
299111
+ * `level` or a `string` level. The integer level will map to a known level
299112
+ * string or to `USERLVL` if not known. The string `level` will map to the same
299113
+ * colors as the integer `level` and will also default to `USERLVL` if the given
299114
+ * string is not a recognized level name.
299115
+ */
299116
+ colors = function getColorizer (useColors = false, customColors, useOnlyCustomProps) {
299117
+ if (useColors && customColors !== undefined) {
299118
+ return customColoredColorizerFactory(customColors, useOnlyCustomProps)
299119
+ } else if (useColors) {
299120
+ return coloredColorizer(useOnlyCustomProps)
299121
+ }
299122
+
299123
+ return plainColorizer(useOnlyCustomProps)
299124
+ };
299125
+ return colors;
299126
+ }
299127
+
299128
+ var noop;
299129
+ var hasRequiredNoop;
299130
+
299131
+ function requireNoop () {
299132
+ if (hasRequiredNoop) return noop;
299133
+ hasRequiredNoop = 1;
299134
+
299135
+ noop = function noop () {};
299136
+ return noop;
299137
+ }
299138
+
299139
+ var buildSafeSonicBoom_1;
299140
+ var hasRequiredBuildSafeSonicBoom;
299141
+
299142
+ function requireBuildSafeSonicBoom () {
299143
+ if (hasRequiredBuildSafeSonicBoom) return buildSafeSonicBoom_1;
299144
+ hasRequiredBuildSafeSonicBoom = 1;
299145
+
299146
+ buildSafeSonicBoom_1 = buildSafeSonicBoom;
299147
+
299148
+ const { isMainThread } = require$$0$i;
299149
+ const SonicBoom = requireSonicBoom$1();
299150
+ const noop = requireNoop();
299151
+
299152
+ /**
299153
+ * Creates a safe SonicBoom instance
299154
+ *
299155
+ * @param {object} opts Options for SonicBoom
299156
+ *
299157
+ * @returns {object} A new SonicBoom stream
299158
+ */
299159
+ function buildSafeSonicBoom (opts) {
299160
+ const stream = new SonicBoom(opts);
299161
+ stream.on('error', filterBrokenPipe);
299162
+ // if we are sync: false, we must flush on exit
299163
+ if (!opts.sync && isMainThread) {
299164
+ setupOnExit(stream);
299165
+ }
299166
+ return stream
299167
+
299168
+ function filterBrokenPipe (err) {
299169
+ if (err.code === 'EPIPE') {
299170
+ stream.write = noop;
299171
+ stream.end = noop;
299172
+ stream.flushSync = noop;
299173
+ stream.destroy = noop;
299174
+ return
299175
+ }
299176
+ stream.removeListener('error', filterBrokenPipe);
299177
+ }
299178
+ }
299179
+
299180
+ function setupOnExit (stream) {
299181
+ /* istanbul ignore next */
299182
+ if (commonjsGlobal.WeakRef && commonjsGlobal.WeakMap && commonjsGlobal.FinalizationRegistry) {
299183
+ // This is leak free, it does not leave event handlers
299184
+ const onExit = requireOnExitLeakFree$1();
299185
+
299186
+ onExit.register(stream, autoEnd);
299187
+
299188
+ stream.on('close', function () {
299189
+ onExit.unregister(stream);
299190
+ });
299191
+ }
299192
+ }
299193
+
299194
+ /* istanbul ignore next */
299195
+ function autoEnd (stream, eventName) {
299196
+ // This check is needed only on some platforms
299197
+
299198
+ if (stream.destroyed) {
299199
+ return
299200
+ }
299201
+
299202
+ if (eventName === 'beforeExit') {
299203
+ // We still have an event loop, let's use it
299204
+ stream.flush();
299205
+ stream.on('drain', function () {
299206
+ stream.end();
299207
+ });
299208
+ } else {
299209
+ // We do not have an event loop, so flush synchronously
299210
+ stream.flushSync();
299211
+ }
299212
+ }
299213
+ return buildSafeSonicBoom_1;
299214
+ }
299215
+
299216
+ var isValidDate_1;
299217
+ var hasRequiredIsValidDate;
299218
+
299219
+ function requireIsValidDate () {
299220
+ if (hasRequiredIsValidDate) return isValidDate_1;
299221
+ hasRequiredIsValidDate = 1;
299222
+
299223
+ isValidDate_1 = isValidDate;
299224
+
299225
+ /**
299226
+ * Checks if the argument is a JS Date and not 'Invalid Date'.
299227
+ *
299228
+ * @param {Date} date The date to check.
299229
+ *
299230
+ * @returns {boolean} true if the argument is a JS Date and not 'Invalid Date'.
299231
+ */
299232
+ function isValidDate (date) {
299233
+ return date instanceof Date && !Number.isNaN(date.getTime())
299234
+ }
299235
+ return isValidDate_1;
299236
+ }
299237
+
299238
+ var createDate_1;
299239
+ var hasRequiredCreateDate;
299240
+
299241
+ function requireCreateDate () {
299242
+ if (hasRequiredCreateDate) return createDate_1;
299243
+ hasRequiredCreateDate = 1;
299244
+
299245
+ createDate_1 = createDate;
299246
+
299247
+ const isValidDate = requireIsValidDate();
299248
+
299249
+ /**
299250
+ * Constructs a JS Date from a number or string. Accepts any single number
299251
+ * or single string argument that is valid for the Date() constructor,
299252
+ * or an epoch as a string.
299253
+ *
299254
+ * @param {string|number} epoch The representation of the Date.
299255
+ *
299256
+ * @returns {Date} The constructed Date.
299257
+ */
299258
+ function createDate (epoch) {
299259
+ // If epoch is already a valid argument, return the valid Date
299260
+ let date = new Date(epoch);
299261
+ if (isValidDate(date)) {
299262
+ return date
299263
+ }
299264
+
299265
+ // Convert to a number to permit epoch as a string
299266
+ date = new Date(+epoch);
299267
+ return date
299268
+ }
299269
+ return createDate_1;
299270
+ }
299271
+
299272
+ var splitPropertyKey_1;
299273
+ var hasRequiredSplitPropertyKey;
299274
+
299275
+ function requireSplitPropertyKey () {
299276
+ if (hasRequiredSplitPropertyKey) return splitPropertyKey_1;
299277
+ hasRequiredSplitPropertyKey = 1;
299278
+
299279
+ splitPropertyKey_1 = splitPropertyKey;
299280
+
299281
+ /**
299282
+ * Splits the property key delimited by a dot character but not when it is preceded
299283
+ * by a backslash.
299284
+ *
299285
+ * @param {string} key A string identifying the property.
299286
+ *
299287
+ * @returns {string[]} Returns a list of string containing each delimited property.
299288
+ * e.g. `'prop2\.domain\.corp.prop2'` should return [ 'prop2.domain.com', 'prop2' ]
299289
+ */
299290
+ function splitPropertyKey (key) {
299291
+ const result = [];
299292
+ let backslash = false;
299293
+ let segment = '';
299294
+
299295
+ for (let i = 0; i < key.length; i++) {
299296
+ const c = key.charAt(i);
299297
+
299298
+ if (c === '\\') {
299299
+ backslash = true;
299300
+ continue
299301
+ }
299302
+
299303
+ if (backslash) {
299304
+ backslash = false;
299305
+ segment += c;
299306
+ continue
299307
+ }
299308
+
299309
+ /* Non-escaped dot, push to result */
299310
+ if (c === '.') {
299311
+ result.push(segment);
299312
+ segment = '';
299313
+ continue
299314
+ }
299315
+
299316
+ segment += c;
299317
+ }
299318
+
299319
+ /* Push last entry to result */
299320
+ if (segment.length) {
299321
+ result.push(segment);
299322
+ }
299323
+
299324
+ return result
299325
+ }
299326
+ return splitPropertyKey_1;
299327
+ }
299328
+
299329
+ var getPropertyValue_1;
299330
+ var hasRequiredGetPropertyValue;
299331
+
299332
+ function requireGetPropertyValue () {
299333
+ if (hasRequiredGetPropertyValue) return getPropertyValue_1;
299334
+ hasRequiredGetPropertyValue = 1;
299335
+
299336
+ getPropertyValue_1 = getPropertyValue;
299337
+
299338
+ const splitPropertyKey = requireSplitPropertyKey();
299339
+
299340
+ /**
299341
+ * Gets a specified property from an object if it exists.
299342
+ *
299343
+ * @param {object} obj The object to be searched.
299344
+ * @param {string|string[]} property A string, or an array of strings, identifying
299345
+ * the property to be retrieved from the object.
299346
+ * Accepts nested properties delimited by a `.`.
299347
+ * Delimiter can be escaped to preserve property names that contain the delimiter.
299348
+ * e.g. `'prop1.prop2'` or `'prop2\.domain\.corp.prop2'`.
299349
+ *
299350
+ * @returns {*}
299351
+ */
299352
+ function getPropertyValue (obj, property) {
299353
+ const props = Array.isArray(property) ? property : splitPropertyKey(property);
299354
+
299355
+ for (const prop of props) {
299356
+ if (!Object.prototype.hasOwnProperty.call(obj, prop)) {
299357
+ return
299358
+ }
299359
+ obj = obj[prop];
299360
+ }
299361
+
299362
+ return obj
299363
+ }
299364
+ return getPropertyValue_1;
299365
+ }
299366
+
299367
+ var deleteLogProperty_1;
299368
+ var hasRequiredDeleteLogProperty;
299369
+
299370
+ function requireDeleteLogProperty () {
299371
+ if (hasRequiredDeleteLogProperty) return deleteLogProperty_1;
299372
+ hasRequiredDeleteLogProperty = 1;
299373
+
299374
+ deleteLogProperty_1 = deleteLogProperty;
299375
+
299376
+ const getPropertyValue = requireGetPropertyValue();
299377
+ const splitPropertyKey = requireSplitPropertyKey();
299378
+
299379
+ /**
299380
+ * Deletes a specified property from a log object if it exists.
299381
+ * This function mutates the passed in `log` object.
299382
+ *
299383
+ * @param {object} log The log object to be modified.
299384
+ * @param {string} property A string identifying the property to be deleted from
299385
+ * the log object. Accepts nested properties delimited by a `.`
299386
+ * Delimiter can be escaped to preserve property names that contain the delimiter.
299387
+ * e.g. `'prop1.prop2'` or `'prop2\.domain\.corp.prop2'`
299388
+ */
299389
+ function deleteLogProperty (log, property) {
299390
+ const props = splitPropertyKey(property);
299391
+ const propToDelete = props.pop();
299392
+
299393
+ log = getPropertyValue(log, props);
299394
+
299395
+ /* istanbul ignore else */
299396
+ if (log !== null && typeof log === 'object' && Object.prototype.hasOwnProperty.call(log, propToDelete)) {
299397
+ delete log[propToDelete];
299398
+ }
299399
+ }
299400
+ return deleteLogProperty_1;
299401
+ }
299402
+
299403
+ var cjs = {};
299404
+
299405
+ var hasRequiredCjs;
299406
+
299407
+ function requireCjs () {
299408
+ if (hasRequiredCjs) return cjs;
299409
+ hasRequiredCjs = 1;
299410
+
299411
+ // eslint-disable-next-line @typescript-eslint/unbound-method
299412
+ const toStringFunction = Function.prototype.toString;
299413
+ // eslint-disable-next-line @typescript-eslint/unbound-method
299414
+ const toStringObject = Object.prototype.toString;
299415
+ /**
299416
+ * Get an empty version of the object with the same prototype it has.
299417
+ */
299418
+ function getCleanClone(prototype) {
299419
+ if (!prototype) {
299420
+ return Object.create(null);
299421
+ }
299422
+ const Constructor = prototype.constructor;
299423
+ if (Constructor === Object) {
299424
+ return prototype === Object.prototype ? {} : Object.create(prototype);
299425
+ }
299426
+ if (Constructor && ~toStringFunction.call(Constructor).indexOf('[native code]')) {
299427
+ try {
299428
+ return new Constructor();
299429
+ }
299430
+ catch (_a) {
299431
+ // Ignore
299432
+ }
299433
+ }
299434
+ return Object.create(prototype);
299435
+ }
299436
+ /**
299437
+ * Get the tag of the value passed, so that the correct copier can be used.
299438
+ */
299439
+ function getTag(value) {
299440
+ const stringTag = value[Symbol.toStringTag];
299441
+ if (stringTag) {
299442
+ return stringTag;
299443
+ }
299444
+ const type = toStringObject.call(value);
299445
+ return type.substring(8, type.length - 1);
299446
+ }
299447
+
299448
+ // eslint-disable-next-line @typescript-eslint/unbound-method
299449
+ const { hasOwnProperty, propertyIsEnumerable } = Object.prototype;
299450
+ function copyOwnDescriptor(original, clone, property, state) {
299451
+ const ownDescriptor = Object.getOwnPropertyDescriptor(original, property) || {
299452
+ configurable: true,
299453
+ enumerable: true,
299454
+ value: original[property],
299455
+ writable: true,
299456
+ };
299457
+ const descriptor = ownDescriptor.get || ownDescriptor.set
299458
+ ? ownDescriptor
299459
+ : {
299460
+ configurable: ownDescriptor.configurable,
299461
+ enumerable: ownDescriptor.enumerable,
299462
+ value: state.copier(ownDescriptor.value, state),
299463
+ writable: ownDescriptor.writable,
299464
+ };
299465
+ try {
299466
+ Object.defineProperty(clone, property, descriptor);
299467
+ }
299468
+ catch (_a) {
299469
+ // The above can fail on node in extreme edge cases, so fall back to the loose assignment.
299470
+ clone[property] = descriptor.get ? descriptor.get() : descriptor.value;
299471
+ }
299472
+ }
299473
+ /**
299474
+ * Striclty copy all properties contained on the object.
299475
+ */
299476
+ function copyOwnPropertiesStrict(value, clone, state) {
299477
+ const names = Object.getOwnPropertyNames(value);
299478
+ for (let index = 0; index < names.length; ++index) {
299479
+ copyOwnDescriptor(value, clone, names[index], state);
299480
+ }
299481
+ const symbols = Object.getOwnPropertySymbols(value);
299482
+ for (let index = 0; index < symbols.length; ++index) {
299483
+ copyOwnDescriptor(value, clone, symbols[index], state);
299484
+ }
299485
+ return clone;
299486
+ }
299487
+ /**
299488
+ * Deeply copy the indexed values in the array.
299489
+ */
299490
+ function copyArrayLoose(array, state) {
299491
+ const clone = new state.Constructor();
299492
+ // set in the cache immediately to be able to reuse the object recursively
299493
+ state.cache.set(array, clone);
299494
+ for (let index = 0; index < array.length; ++index) {
299495
+ clone[index] = state.copier(array[index], state);
299496
+ }
299497
+ return clone;
299498
+ }
299499
+ /**
299500
+ * Deeply copy the indexed values in the array, as well as any custom properties.
299501
+ */
299502
+ function copyArrayStrict(array, state) {
299503
+ const clone = new state.Constructor();
299504
+ // set in the cache immediately to be able to reuse the object recursively
299505
+ state.cache.set(array, clone);
299506
+ return copyOwnPropertiesStrict(array, clone, state);
299507
+ }
299508
+ /**
299509
+ * Copy the contents of the ArrayBuffer.
299510
+ */
299511
+ function copyArrayBuffer(arrayBuffer, _state) {
299512
+ return arrayBuffer.slice(0);
299513
+ }
299514
+ /**
299515
+ * Create a new Blob with the contents of the original.
299516
+ */
299517
+ function copyBlob(blob, _state) {
299518
+ return blob.slice(0, blob.size, blob.type);
299519
+ }
299520
+ /**
299521
+ * Create a new DataView with the contents of the original.
299522
+ */
299523
+ function copyDataView(dataView, state) {
299524
+ return new state.Constructor(copyArrayBuffer(dataView.buffer));
299525
+ }
299526
+ /**
299527
+ * Create a new Date based on the time of the original.
299528
+ */
299529
+ function copyDate(date, state) {
299530
+ return new state.Constructor(date.getTime());
299531
+ }
299532
+ /**
299533
+ * Deeply copy the keys and values of the original.
299534
+ */
299535
+ function copyMapLoose(map, state) {
299536
+ const clone = new state.Constructor();
299537
+ // set in the cache immediately to be able to reuse the object recursively
299538
+ state.cache.set(map, clone);
299539
+ map.forEach((value, key) => {
299540
+ clone.set(key, state.copier(value, state));
299541
+ });
299542
+ return clone;
299543
+ }
299544
+ /**
299545
+ * Deeply copy the keys and values of the original, as well as any custom properties.
299546
+ */
299547
+ function copyMapStrict(map, state) {
299548
+ return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);
299549
+ }
299550
+ /**
299551
+ * Deeply copy the properties (keys and symbols) and values of the original.
299552
+ */
299553
+ function copyObjectLoose(object, state) {
299554
+ const clone = getCleanClone(state.prototype);
299555
+ // set in the cache immediately to be able to reuse the object recursively
299556
+ state.cache.set(object, clone);
299557
+ for (const key in object) {
299558
+ if (hasOwnProperty.call(object, key)) {
299559
+ clone[key] = state.copier(object[key], state);
299560
+ }
299561
+ }
299562
+ const symbols = Object.getOwnPropertySymbols(object);
299563
+ for (let index = 0; index < symbols.length; ++index) {
299564
+ const symbol = symbols[index];
299565
+ if (propertyIsEnumerable.call(object, symbol)) {
299566
+ clone[symbol] = state.copier(object[symbol], state);
299567
+ }
299568
+ }
299569
+ return clone;
299570
+ }
299571
+ /**
299572
+ * Deeply copy the properties (keys and symbols) and values of the original, as well
299573
+ * as any hidden or non-enumerable properties.
299574
+ */
299575
+ function copyObjectStrict(object, state) {
299576
+ const clone = getCleanClone(state.prototype);
299577
+ // set in the cache immediately to be able to reuse the object recursively
299578
+ state.cache.set(object, clone);
299579
+ return copyOwnPropertiesStrict(object, clone, state);
299580
+ }
299581
+ /**
299582
+ * Create a new primitive wrapper from the value of the original.
299583
+ */
299584
+ function copyPrimitiveWrapper(primitiveObject, state) {
299585
+ return new state.Constructor(primitiveObject.valueOf());
299586
+ }
299587
+ /**
299588
+ * Create a new RegExp based on the value and flags of the original.
299589
+ */
299590
+ function copyRegExp(regExp, state) {
299591
+ const clone = new state.Constructor(regExp.source, regExp.flags);
299592
+ clone.lastIndex = regExp.lastIndex;
299593
+ return clone;
299594
+ }
299595
+ /**
299596
+ * Return the original value (an identity function).
299597
+ *
299598
+ * @note
299599
+ * THis is used for objects that cannot be copied, such as WeakMap.
299600
+ */
299601
+ function copySelf(value, _state) {
299602
+ return value;
299603
+ }
299604
+ /**
299605
+ * Deeply copy the values of the original.
299606
+ */
299607
+ function copySetLoose(set, state) {
299608
+ const clone = new state.Constructor();
299609
+ // set in the cache immediately to be able to reuse the object recursively
299610
+ state.cache.set(set, clone);
299611
+ set.forEach((value) => {
299612
+ clone.add(state.copier(value, state));
299613
+ });
299614
+ return clone;
299615
+ }
299616
+ /**
299617
+ * Deeply copy the values of the original, as well as any custom properties.
299618
+ */
299619
+ function copySetStrict(set, state) {
299620
+ return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
299621
+ }
299622
+
299623
+ function createDefaultCache() {
299624
+ return new WeakMap();
299625
+ }
299626
+ function getOptions({ createCache: createCacheOverride, methods: methodsOverride, strict, }) {
299627
+ const defaultMethods = {
299628
+ array: strict ? copyArrayStrict : copyArrayLoose,
299629
+ arrayBuffer: copyArrayBuffer,
299630
+ asyncGenerator: copySelf,
299631
+ blob: copyBlob,
299632
+ dataView: copyDataView,
299633
+ date: copyDate,
299634
+ error: copySelf,
299635
+ generator: copySelf,
299636
+ map: strict ? copyMapStrict : copyMapLoose,
299637
+ object: strict ? copyObjectStrict : copyObjectLoose,
299638
+ regExp: copyRegExp,
299639
+ set: strict ? copySetStrict : copySetLoose,
299640
+ };
299641
+ const methods = methodsOverride ? Object.assign(defaultMethods, methodsOverride) : defaultMethods;
299642
+ const copiers = getTagSpecificCopiers(methods);
299643
+ const createCache = createCacheOverride || createDefaultCache;
299644
+ // Extra safety check to ensure that object and array copiers are always provided,
299645
+ // avoiding runtime errors.
299646
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
299647
+ if (!copiers.Object || !copiers.Array) {
299648
+ throw new Error('An object and array copier must be provided.');
299649
+ }
299650
+ return { createCache, copiers, methods, strict: Boolean(strict) };
299651
+ }
299652
+ /**
299653
+ * Get the copiers used for each specific object tag.
299654
+ */
299655
+ function getTagSpecificCopiers(methods) {
299656
+ return {
299657
+ Arguments: methods.object,
299658
+ Array: methods.array,
299659
+ ArrayBuffer: methods.arrayBuffer,
299660
+ AsyncGenerator: methods.asyncGenerator,
299661
+ BigInt64Array: methods.arrayBuffer,
299662
+ BigUint64Array: methods.arrayBuffer,
299663
+ Blob: methods.blob,
299664
+ Boolean: copyPrimitiveWrapper,
299665
+ DataView: methods.dataView,
299666
+ Date: methods.date,
299667
+ Error: methods.error,
299668
+ Float32Array: methods.arrayBuffer,
299669
+ Float64Array: methods.arrayBuffer,
299670
+ Generator: methods.generator,
299671
+ Int8Array: methods.arrayBuffer,
299672
+ Int16Array: methods.arrayBuffer,
299673
+ Int32Array: methods.arrayBuffer,
299674
+ Map: methods.map,
299675
+ Number: copyPrimitiveWrapper,
299676
+ Object: methods.object,
299677
+ Promise: copySelf,
299678
+ RegExp: methods.regExp,
299679
+ Set: methods.set,
299680
+ String: copyPrimitiveWrapper,
299681
+ WeakMap: copySelf,
299682
+ WeakSet: copySelf,
299683
+ Uint8Array: methods.arrayBuffer,
299684
+ Uint8ClampedArray: methods.arrayBuffer,
299685
+ Uint16Array: methods.arrayBuffer,
299686
+ Uint32Array: methods.arrayBuffer,
299687
+ };
299688
+ }
299689
+
299690
+ /**
299691
+ * Create a custom copier based on custom options for any of the following:
299692
+ * - `createCache` method to create a cache for copied objects
299693
+ * - custom copier `methods` for specific object types
299694
+ * - `strict` mode to copy all properties with their descriptors
299695
+ */
299696
+ function createCopier(options = {}) {
299697
+ const { createCache, copiers } = getOptions(options);
299698
+ const { Array: copyArray, Object: copyObject } = copiers;
299699
+ function copier(value, state) {
299700
+ state.prototype = state.Constructor = undefined;
299701
+ if (!value || typeof value !== 'object') {
299702
+ return value;
299703
+ }
299704
+ if (state.cache.has(value)) {
299705
+ return state.cache.get(value);
299706
+ }
299707
+ state.prototype = Object.getPrototypeOf(value);
299708
+ // Using logical AND for speed, since optional chaining transforms to
299709
+ // a local variable usage.
299710
+ // eslint-disable-next-line @typescript-eslint/prefer-optional-chain
299711
+ state.Constructor = state.prototype && state.prototype.constructor;
299712
+ // plain objects
299713
+ if (!state.Constructor || state.Constructor === Object) {
299714
+ return copyObject(value, state);
299715
+ }
299716
+ // arrays
299717
+ if (Array.isArray(value)) {
299718
+ return copyArray(value, state);
299719
+ }
299720
+ const tagSpecificCopier = copiers[getTag(value)];
299721
+ if (tagSpecificCopier) {
299722
+ return tagSpecificCopier(value, state);
299723
+ }
299724
+ return typeof value.then === 'function' ? value : copyObject(value, state);
299725
+ }
299726
+ return function copy(value) {
299727
+ return copier(value, {
299728
+ Constructor: undefined,
299729
+ cache: createCache(),
299730
+ copier,
299731
+ prototype: undefined,
299732
+ });
299733
+ };
299734
+ }
299735
+ /**
299736
+ * Copy an value deeply as much as possible, where strict recreation of object properties
299737
+ * are maintained. All properties (including non-enumerable ones) are copied with their
299738
+ * original property descriptors on both objects and arrays.
299739
+ */
299740
+ const copyStrict = createCopier({ strict: true });
299741
+ /**
299742
+ * Copy an value deeply as much as possible.
299743
+ */
299744
+ const copy = createCopier();
299745
+
299746
+ cjs.copy = copy;
299747
+ cjs.copyStrict = copyStrict;
299748
+ cjs.createCopier = createCopier;
299749
+
299750
+ return cjs;
299751
+ }
299752
+
299753
+ var filterLog_1;
299754
+ var hasRequiredFilterLog;
299755
+
299756
+ function requireFilterLog () {
299757
+ if (hasRequiredFilterLog) return filterLog_1;
299758
+ hasRequiredFilterLog = 1;
299759
+
299760
+ filterLog_1 = filterLog;
299761
+
299762
+ const { createCopier } = /*@__PURE__*/ requireCjs();
299763
+ const fastCopy = createCopier({});
299764
+
299765
+ const deleteLogProperty = requireDeleteLogProperty();
299766
+
299767
+ /**
299768
+ * @typedef {object} FilterLogParams
299769
+ * @property {object} log The log object to be modified.
299770
+ * @property {PrettyContext} context The context object built from parsing
299771
+ * the options.
299772
+ */
299773
+
299774
+ /**
299775
+ * Filter a log object by removing or including keys accordingly.
299776
+ * When `includeKeys` is passed, `ignoredKeys` will be ignored.
299777
+ * One of ignoreKeys or includeKeys must be pass in.
299778
+ *
299779
+ * @param {FilterLogParams} input
299780
+ *
299781
+ * @returns {object} A new `log` object instance that
299782
+ * either only includes the keys in ignoreKeys
299783
+ * or does not include those in ignoredKeys.
299784
+ */
299785
+ function filterLog ({ log, context }) {
299786
+ const { ignoreKeys, includeKeys } = context;
299787
+ const logCopy = fastCopy(log);
299788
+
299789
+ if (includeKeys) {
299790
+ const logIncluded = {};
299791
+
299792
+ includeKeys.forEach((key) => {
299793
+ logIncluded[key] = logCopy[key];
299794
+ });
299795
+ return logIncluded
299796
+ }
299797
+
299798
+ ignoreKeys.forEach((ignoreKey) => {
299799
+ deleteLogProperty(logCopy, ignoreKey);
299800
+ });
299801
+ return logCopy
299802
+ }
299803
+ return filterLog_1;
299804
+ }
299805
+
299806
+ var dateformat = {exports: {}};
299807
+
299808
+ var hasRequiredDateformat;
299809
+
299810
+ function requireDateformat () {
299811
+ if (hasRequiredDateformat) return dateformat.exports;
299812
+ hasRequiredDateformat = 1;
299813
+ (function (module, exports$1) {
299814
+ function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj};}else {_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};}return _typeof(obj)}(function(global){var _arguments=arguments;var dateFormat=function(){var token=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g;var timezone=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g;var timezoneClip=/[^-+\dA-Z]/g;return function(date,mask,utc,gmt){if(_arguments.length===1&&kindOf(date)==="string"&&!/\d/.test(date)){mask=date;date=undefined;}date=date||date===0?date:new Date;if(!(date instanceof Date)){date=new Date(date);}if(isNaN(date)){throw TypeError("Invalid date")}mask=String(dateFormat.masks[mask]||mask||dateFormat.masks["default"]);var maskSlice=mask.slice(0,4);if(maskSlice==="UTC:"||maskSlice==="GMT:"){mask=mask.slice(4);utc=true;if(maskSlice==="GMT:"){gmt=true;}}var _=function _(){return utc?"getUTC":"get"};var _d=function d(){return date[_()+"Date"]()};var D=function D(){return date[_()+"Day"]()};var _m=function m(){return date[_()+"Month"]()};var y=function y(){return date[_()+"FullYear"]()};var _H=function H(){return date[_()+"Hours"]()};var _M=function M(){return date[_()+"Minutes"]()};var _s=function s(){return date[_()+"Seconds"]()};var _L=function L(){return date[_()+"Milliseconds"]()};var _o=function o(){return utc?0:date.getTimezoneOffset()};var _W=function W(){return getWeek(date)};var _N=function N(){return getDayOfWeek(date)};var flags={d:function d(){return _d()},dd:function dd(){return pad(_d())},ddd:function ddd(){return dateFormat.i18n.dayNames[D()]},DDD:function DDD(){return getDayName({y:y(),m:_m(),d:_d(),_:_(),dayName:dateFormat.i18n.dayNames[D()],short:true})},dddd:function dddd(){return dateFormat.i18n.dayNames[D()+7]},DDDD:function DDDD(){return getDayName({y:y(),m:_m(),d:_d(),_:_(),dayName:dateFormat.i18n.dayNames[D()+7]})},m:function m(){return _m()+1},mm:function mm(){return pad(_m()+1)},mmm:function mmm(){return dateFormat.i18n.monthNames[_m()]},mmmm:function mmmm(){return dateFormat.i18n.monthNames[_m()+12]},yy:function yy(){return String(y()).slice(2)},yyyy:function yyyy(){return pad(y(),4)},h:function h(){return _H()%12||12},hh:function hh(){return pad(_H()%12||12)},H:function H(){return _H()},HH:function HH(){return pad(_H())},M:function M(){return _M()},MM:function MM(){return pad(_M())},s:function s(){return _s()},ss:function ss(){return pad(_s())},l:function l(){return pad(_L(),3)},L:function L(){return pad(Math.floor(_L()/10))},t:function t(){return _H()<12?dateFormat.i18n.timeNames[0]:dateFormat.i18n.timeNames[1]},tt:function tt(){return _H()<12?dateFormat.i18n.timeNames[2]:dateFormat.i18n.timeNames[3]},T:function T(){return _H()<12?dateFormat.i18n.timeNames[4]:dateFormat.i18n.timeNames[5]},TT:function TT(){return _H()<12?dateFormat.i18n.timeNames[6]:dateFormat.i18n.timeNames[7]},Z:function Z(){return gmt?"GMT":utc?"UTC":(String(date).match(timezone)||[""]).pop().replace(timezoneClip,"").replace(/GMT\+0000/g,"UTC")},o:function o(){return (_o()>0?"-":"+")+pad(Math.floor(Math.abs(_o())/60)*100+Math.abs(_o())%60,4)},p:function p(){return (_o()>0?"-":"+")+pad(Math.floor(Math.abs(_o())/60),2)+":"+pad(Math.floor(Math.abs(_o())%60),2)},S:function S(){return ["th","st","nd","rd"][_d()%10>3?0:(_d()%100-_d()%10!=10)*_d()%10]},W:function W(){return _W()},WW:function WW(){return pad(_W())},N:function N(){return _N()}};return mask.replace(token,function(match){if(match in flags){return flags[match]()}return match.slice(1,match.length-1)})}}();dateFormat.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"};dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var pad=function pad(val,len){val=String(val);len=len||2;while(val.length<len){val="0"+val;}return val};var getDayName=function getDayName(_ref){var y=_ref.y,m=_ref.m,d=_ref.d,_=_ref._,dayName=_ref.dayName,_ref$short=_ref["short"],_short=_ref$short===void 0?false:_ref$short;var today=new Date;var yesterday=new Date;yesterday.setDate(yesterday[_+"Date"]()-1);var tomorrow=new Date;tomorrow.setDate(tomorrow[_+"Date"]()+1);var today_d=function today_d(){return today[_+"Date"]()};var today_m=function today_m(){return today[_+"Month"]()};var today_y=function today_y(){return today[_+"FullYear"]()};var yesterday_d=function yesterday_d(){return yesterday[_+"Date"]()};var yesterday_m=function yesterday_m(){return yesterday[_+"Month"]()};var yesterday_y=function yesterday_y(){return yesterday[_+"FullYear"]()};var tomorrow_d=function tomorrow_d(){return tomorrow[_+"Date"]()};var tomorrow_m=function tomorrow_m(){return tomorrow[_+"Month"]()};var tomorrow_y=function tomorrow_y(){return tomorrow[_+"FullYear"]()};if(today_y()===y&&today_m()===m&&today_d()===d){return _short?"Tdy":"Today"}else if(yesterday_y()===y&&yesterday_m()===m&&yesterday_d()===d){return _short?"Ysd":"Yesterday"}else if(tomorrow_y()===y&&tomorrow_m()===m&&tomorrow_d()===d){return _short?"Tmw":"Tomorrow"}return dayName};var getWeek=function getWeek(date){var targetThursday=new Date(date.getFullYear(),date.getMonth(),date.getDate());targetThursday.setDate(targetThursday.getDate()-(targetThursday.getDay()+6)%7+3);var firstThursday=new Date(targetThursday.getFullYear(),0,4);firstThursday.setDate(firstThursday.getDate()-(firstThursday.getDay()+6)%7+3);var ds=targetThursday.getTimezoneOffset()-firstThursday.getTimezoneOffset();targetThursday.setHours(targetThursday.getHours()-ds);var weekDiff=(targetThursday-firstThursday)/(864e5*7);return 1+Math.floor(weekDiff)};var getDayOfWeek=function getDayOfWeek(date){var dow=date.getDay();if(dow===0){dow=7;}return dow};var kindOf=function kindOf(val){if(val===null){return "null"}if(val===undefined){return "undefined"}if(_typeof(val)!=="object"){return _typeof(val)}if(Array.isArray(val)){return "array"}return {}.toString.call(val).slice(8,-1).toLowerCase()};if((_typeof(exports$1))==="object"){module.exports=dateFormat;}else {global.dateFormat=dateFormat;}})(void 0);
299815
+ } (dateformat, dateformat.exports));
299816
+ return dateformat.exports;
299817
+ }
299818
+
299819
+ var formatTime_1;
299820
+ var hasRequiredFormatTime;
299821
+
299822
+ function requireFormatTime () {
299823
+ if (hasRequiredFormatTime) return formatTime_1;
299824
+ hasRequiredFormatTime = 1;
299825
+
299826
+ formatTime_1 = formatTime;
299827
+
299828
+ const {
299829
+ DATE_FORMAT,
299830
+ DATE_FORMAT_SIMPLE
299831
+ } = requireConstants$1();
299832
+
299833
+ const dateformat = requireDateformat();
299834
+ const createDate = requireCreateDate();
299835
+ const isValidDate = requireIsValidDate();
299836
+
299837
+ /**
299838
+ * Converts a given `epoch` to a desired display format.
299839
+ *
299840
+ * @param {number|string} epoch The time to convert. May be any value that is
299841
+ * valid for `new Date()`.
299842
+ * @param {boolean|string} [translateTime=false] When `false`, the given `epoch`
299843
+ * will simply be returned. When `true`, the given `epoch` will be converted
299844
+ * to a string at UTC using the `DATE_FORMAT_SIMPLE` constant. If `translateTime` is
299845
+ * a string, the following rules are available:
299846
+ *
299847
+ * - `<format string>`: The string is a literal format string. This format
299848
+ * string will be used to interpret the `epoch` and return a display string
299849
+ * at UTC.
299850
+ * - `SYS:STANDARD`: The returned display string will follow the `DATE_FORMAT`
299851
+ * constant at the system's local timezone.
299852
+ * - `SYS:<format string>`: The returned display string will follow the given
299853
+ * `<format string>` at the system's local timezone.
299854
+ * - `UTC:<format string>`: The returned display string will follow the given
299855
+ * `<format string>` at UTC.
299856
+ *
299857
+ * @returns {number|string} The formatted time.
299858
+ */
299859
+ function formatTime (epoch, translateTime = false) {
299860
+ if (translateTime === false) {
299861
+ return epoch
299862
+ }
299863
+
299864
+ const instant = createDate(epoch);
299865
+
299866
+ // If the Date is invalid, do not attempt to format
299867
+ if (!isValidDate(instant)) {
299868
+ return epoch
299869
+ }
299870
+
299871
+ if (translateTime === true) {
299872
+ return dateformat(instant, DATE_FORMAT_SIMPLE)
299873
+ }
299874
+
299875
+ const upperFormat = translateTime.toUpperCase();
299876
+ if (upperFormat === 'SYS:STANDARD') {
299877
+ return dateformat(instant, DATE_FORMAT)
299878
+ }
299879
+
299880
+ const prefix = upperFormat.substr(0, 4);
299881
+ if (prefix === 'SYS:' || prefix === 'UTC:') {
299882
+ if (prefix === 'UTC:') {
299883
+ return dateformat(instant, translateTime)
299884
+ }
299885
+ return dateformat(instant, translateTime.slice(4))
299886
+ }
299887
+
299888
+ return dateformat(instant, `UTC:${translateTime}`)
299889
+ }
299890
+ return formatTime_1;
299891
+ }
299892
+
299893
+ var handleCustomLevelsNamesOpts_1;
299894
+ var hasRequiredHandleCustomLevelsNamesOpts;
299895
+
299896
+ function requireHandleCustomLevelsNamesOpts () {
299897
+ if (hasRequiredHandleCustomLevelsNamesOpts) return handleCustomLevelsNamesOpts_1;
299898
+ hasRequiredHandleCustomLevelsNamesOpts = 1;
299899
+
299900
+ handleCustomLevelsNamesOpts_1 = handleCustomLevelsNamesOpts;
299901
+
299902
+ /**
299903
+ * Parse a CSV string or options object that maps level
299904
+ * labels to level values.
299905
+ *
299906
+ * @param {string|object} cLevels An object mapping level
299907
+ * names to level values, e.g. `{ info: 30, debug: 65 }`, or a
299908
+ * CSV string in the format `level_name:level_value`, e.g.
299909
+ * `info:30,debug:65`.
299910
+ *
299911
+ * @returns {object} An object mapping levels names to level values
299912
+ * e.g. `{ info: 30, debug: 65 }`.
299913
+ */
299914
+ function handleCustomLevelsNamesOpts (cLevels) {
299915
+ if (!cLevels) return {}
299916
+
299917
+ if (typeof cLevels === 'string') {
299918
+ return cLevels
299919
+ .split(',')
299920
+ .reduce((agg, value, idx) => {
299921
+ const [levelName, levelNum = idx] = value.split(':');
299922
+ agg[levelName.toLowerCase()] = levelNum;
299923
+ return agg
299924
+ }, {})
299925
+ } else if (Object.prototype.toString.call(cLevels) === '[object Object]') {
299926
+ return Object
299927
+ .keys(cLevels)
299928
+ .reduce((agg, levelName) => {
299929
+ agg[levelName.toLowerCase()] = cLevels[levelName];
299930
+ return agg
299931
+ }, {})
299932
+ } else {
299933
+ return {}
299934
+ }
299935
+ }
299936
+ return handleCustomLevelsNamesOpts_1;
299937
+ }
299938
+
299939
+ var handleCustomLevelsOpts_1;
299940
+ var hasRequiredHandleCustomLevelsOpts;
299941
+
299942
+ function requireHandleCustomLevelsOpts () {
299943
+ if (hasRequiredHandleCustomLevelsOpts) return handleCustomLevelsOpts_1;
299944
+ hasRequiredHandleCustomLevelsOpts = 1;
299945
+
299946
+ handleCustomLevelsOpts_1 = handleCustomLevelsOpts;
299947
+
299948
+ /**
299949
+ * Parse a CSV string or options object that specifies
299950
+ * configuration for custom levels.
299951
+ *
299952
+ * @param {string|object} cLevels An object mapping level
299953
+ * names to values, e.g. `{ info: 30, debug: 65 }`, or a
299954
+ * CSV string in the format `level_name:level_value`, e.g.
299955
+ * `info:30,debug:65`.
299956
+ *
299957
+ * @returns {object} An object mapping levels to labels that
299958
+ * appear in logs, e.g. `{ '30': 'INFO', '65': 'DEBUG' }`.
299959
+ */
299960
+ function handleCustomLevelsOpts (cLevels) {
299961
+ if (!cLevels) return {}
299962
+
299963
+ if (typeof cLevels === 'string') {
299964
+ return cLevels
299965
+ .split(',')
299966
+ .reduce((agg, value, idx) => {
299967
+ const [levelName, levelNum = idx] = value.split(':');
299968
+ agg[levelNum] = levelName.toUpperCase();
299969
+ return agg
299970
+ },
299971
+ { default: 'USERLVL' })
299972
+ } else if (Object.prototype.toString.call(cLevels) === '[object Object]') {
299973
+ return Object
299974
+ .keys(cLevels)
299975
+ .reduce((agg, levelName) => {
299976
+ agg[cLevels[levelName]] = levelName.toUpperCase();
299977
+ return agg
299978
+ }, { default: 'USERLVL' })
299979
+ } else {
299980
+ return {}
299981
+ }
299982
+ }
299983
+ return handleCustomLevelsOpts_1;
299984
+ }
299985
+
299986
+ var interpretConditionals_1;
299987
+ var hasRequiredInterpretConditionals;
299988
+
299989
+ function requireInterpretConditionals () {
299990
+ if (hasRequiredInterpretConditionals) return interpretConditionals_1;
299991
+ hasRequiredInterpretConditionals = 1;
299992
+
299993
+ interpretConditionals_1 = interpretConditionals;
299994
+
299995
+ const getPropertyValue = requireGetPropertyValue();
299996
+
299997
+ /**
299998
+ * Translates all conditional blocks from within the messageFormat. Translates
299999
+ * any matching {if key}{key}{end} statements and returns everything between
300000
+ * if and else blocks if the key provided was found in log.
300001
+ *
300002
+ * @param {MessageFormatString|MessageFormatFunction} messageFormat A format
300003
+ * string or function that defines how the logged message should be
300004
+ * conditionally formatted.
300005
+ * @param {object} log The log object to be modified.
300006
+ *
300007
+ * @returns {string} The parsed messageFormat.
300008
+ */
300009
+ function interpretConditionals (messageFormat, log) {
300010
+ messageFormat = messageFormat.replace(/{if (.*?)}(.*?){end}/g, replacer);
300011
+
300012
+ // Remove non-terminated if blocks
300013
+ messageFormat = messageFormat.replace(/{if (.*?)}/g, '');
300014
+ // Remove floating end blocks
300015
+ messageFormat = messageFormat.replace(/{end}/g, '');
300016
+
300017
+ return messageFormat.replace(/\s+/g, ' ').trim()
300018
+
300019
+ function replacer (_, key, value) {
300020
+ const propertyValue = getPropertyValue(log, key);
300021
+ if (propertyValue && value.includes(key)) {
300022
+ return value.replace(new RegExp('{' + key + '}', 'g'), propertyValue)
300023
+ } else {
300024
+ return ''
300025
+ }
300026
+ }
300027
+ }
300028
+ return interpretConditionals_1;
300029
+ }
300030
+
300031
+ var isObject_1;
300032
+ var hasRequiredIsObject;
300033
+
300034
+ function requireIsObject () {
300035
+ if (hasRequiredIsObject) return isObject_1;
300036
+ hasRequiredIsObject = 1;
300037
+
300038
+ isObject_1 = isObject;
300039
+
300040
+ function isObject (input) {
300041
+ return Object.prototype.toString.apply(input) === '[object Object]'
300042
+ }
300043
+ return isObject_1;
300044
+ }
300045
+
300046
+ var joinLinesWithIndentation_1;
300047
+ var hasRequiredJoinLinesWithIndentation;
300048
+
300049
+ function requireJoinLinesWithIndentation () {
300050
+ if (hasRequiredJoinLinesWithIndentation) return joinLinesWithIndentation_1;
300051
+ hasRequiredJoinLinesWithIndentation = 1;
300052
+
300053
+ joinLinesWithIndentation_1 = joinLinesWithIndentation;
300054
+
300055
+ /**
300056
+ * @typedef {object} JoinLinesWithIndentationParams
300057
+ * @property {string} input The string to split and reformat.
300058
+ * @property {string} [ident] The indentation string. Default: ` ` (4 spaces).
300059
+ * @property {string} [eol] The end of line sequence to use when rejoining
300060
+ * the lines. Default: `'\n'`.
300061
+ */
300062
+
300063
+ /**
300064
+ * Given a string with line separators, either `\r\n` or `\n`, add indentation
300065
+ * to all lines subsequent to the first line and rejoin the lines using an
300066
+ * end of line sequence.
300067
+ *
300068
+ * @param {JoinLinesWithIndentationParams} input
300069
+ *
300070
+ * @returns {string} A string with lines subsequent to the first indented
300071
+ * with the given indentation sequence.
300072
+ */
300073
+ function joinLinesWithIndentation ({ input, ident = ' ', eol = '\n' }) {
300074
+ const lines = input.split(/\r?\n/);
300075
+ for (let i = 1; i < lines.length; i += 1) {
300076
+ lines[i] = ident + lines[i];
300077
+ }
300078
+ return lines.join(eol)
300079
+ }
300080
+ return joinLinesWithIndentation_1;
300081
+ }
300082
+
300083
+ var parseFactoryOptions_1;
300084
+ var hasRequiredParseFactoryOptions;
300085
+
300086
+ function requireParseFactoryOptions () {
300087
+ if (hasRequiredParseFactoryOptions) return parseFactoryOptions_1;
300088
+ hasRequiredParseFactoryOptions = 1;
300089
+
300090
+ parseFactoryOptions_1 = parseFactoryOptions;
300091
+
300092
+ const {
300093
+ LEVEL_NAMES
300094
+ } = requireConstants$1();
300095
+ const colors = requireColors();
300096
+ const handleCustomLevelsOpts = requireHandleCustomLevelsOpts();
300097
+ const handleCustomLevelsNamesOpts = requireHandleCustomLevelsNamesOpts();
300098
+ const handleLevelLabelData = requireGetLevelLabelData();
300099
+
300100
+ /**
300101
+ * A `PrettyContext` is an object to be used by the various functions that
300102
+ * process log data. It is derived from the provided {@link PinoPrettyOptions}.
300103
+ * It may be used as a `this` context.
300104
+ *
300105
+ * @typedef {object} PrettyContext
300106
+ * @property {string} EOL The escape sequence chosen as the line terminator.
300107
+ * @property {string} IDENT The string to use as the indentation sequence.
300108
+ * @property {ColorizerFunc} colorizer A configured colorizer function.
300109
+ * @property {Array[Array<number, string>]} customColors A set of custom color
300110
+ * names associated with level numbers.
300111
+ * @property {object} customLevelNames A hash of level numbers to level names,
300112
+ * e.g. `{ 30: "info" }`.
300113
+ * @property {object} customLevels A hash of level names to level numbers,
300114
+ * e.g. `{ info: 30 }`.
300115
+ * @property {CustomPrettifiers} customPrettifiers A hash of custom prettifier
300116
+ * functions.
300117
+ * @property {object} customProperties Comprised of `customLevels` and
300118
+ * `customLevelNames` if such options are provided.
300119
+ * @property {string[]} errorLikeObjectKeys The key names in the log data that
300120
+ * should be considered as holding error objects.
300121
+ * @property {string[]} errorProps A list of error object keys that should be
300122
+ * included in the output.
300123
+ * @property {function} getLevelLabelData Pass a numeric level to return [levelLabelString,levelNum]
300124
+ * @property {boolean} hideObject Indicates the prettifier should omit objects
300125
+ * in the output.
300126
+ * @property {string[]} ignoreKeys Set of log data keys to omit.
300127
+ * @property {string[]} includeKeys Opposite of `ignoreKeys`.
300128
+ * @property {boolean} levelFirst Indicates the level should be printed first.
300129
+ * @property {string} levelKey Name of the key in the log data that contains
300130
+ * the message.
300131
+ * @property {string} levelLabel Format token to represent the position of the
300132
+ * level name in the output string.
300133
+ * @property {MessageFormatString|MessageFormatFunction} messageFormat
300134
+ * @property {string} messageKey Name of the key in the log data that contains
300135
+ * the message.
300136
+ * @property {string|number} minimumLevel The minimum log level to process
300137
+ * and output.
300138
+ * @property {ColorizerFunc} objectColorizer
300139
+ * @property {boolean} singleLine Indicates objects should be printed on a
300140
+ * single output line.
300141
+ * @property {string} timestampKey The name of the key in the log data that
300142
+ * contains the log timestamp.
300143
+ * @property {boolean} translateTime Indicates if timestamps should be
300144
+ * translated to a human-readable string.
300145
+ * @property {boolean} useOnlyCustomProps
300146
+ */
300147
+
300148
+ /**
300149
+ * @param {PinoPrettyOptions} options The user supplied object of options.
300150
+ *
300151
+ * @returns {PrettyContext}
300152
+ */
300153
+ function parseFactoryOptions (options) {
300154
+ const EOL = options.crlf ? '\r\n' : '\n';
300155
+ const IDENT = ' ';
300156
+ const {
300157
+ customPrettifiers,
300158
+ errorLikeObjectKeys,
300159
+ hideObject,
300160
+ levelFirst,
300161
+ levelKey,
300162
+ levelLabel,
300163
+ messageFormat,
300164
+ messageKey,
300165
+ minimumLevel,
300166
+ singleLine,
300167
+ timestampKey,
300168
+ translateTime
300169
+ } = options;
300170
+ const errorProps = options.errorProps.split(',');
300171
+ const useOnlyCustomProps = typeof options.useOnlyCustomProps === 'boolean'
300172
+ ? options.useOnlyCustomProps
300173
+ : (options.useOnlyCustomProps === 'true');
300174
+ const customLevels = handleCustomLevelsOpts(options.customLevels);
300175
+ const customLevelNames = handleCustomLevelsNamesOpts(options.customLevels);
300176
+ const getLevelLabelData = handleLevelLabelData(useOnlyCustomProps, customLevels, customLevelNames);
300177
+
300178
+ let customColors;
300179
+ if (options.customColors) {
300180
+ if (typeof options.customColors === 'string') {
300181
+ customColors = options.customColors.split(',').reduce((agg, value) => {
300182
+ const [level, color] = value.split(':');
300183
+ const condition = useOnlyCustomProps
300184
+ ? options.customLevels
300185
+ : customLevelNames[level] !== undefined;
300186
+ const levelNum = condition
300187
+ ? customLevelNames[level]
300188
+ : LEVEL_NAMES[level];
300189
+ const colorIdx = levelNum !== undefined
300190
+ ? levelNum
300191
+ : level;
300192
+ agg.push([colorIdx, color]);
300193
+ return agg
300194
+ }, []);
300195
+ } else if (typeof options.customColors === 'object') {
300196
+ customColors = Object.keys(options.customColors).reduce((agg, value) => {
300197
+ const [level, color] = [value, options.customColors[value]];
300198
+ const condition = useOnlyCustomProps
300199
+ ? options.customLevels
300200
+ : customLevelNames[level] !== undefined;
300201
+ const levelNum = condition
300202
+ ? customLevelNames[level]
300203
+ : LEVEL_NAMES[level];
300204
+ const colorIdx = levelNum !== undefined
300205
+ ? levelNum
300206
+ : level;
300207
+ agg.push([colorIdx, color]);
300208
+ return agg
300209
+ }, []);
300210
+ } else {
300211
+ throw new Error('options.customColors must be of type string or object.')
300212
+ }
300213
+ }
300214
+
300215
+ const customProperties = { customLevels, customLevelNames };
300216
+ if (useOnlyCustomProps === true && !options.customLevels) {
300217
+ customProperties.customLevels = undefined;
300218
+ customProperties.customLevelNames = undefined;
300219
+ }
300220
+
300221
+ const includeKeys = options.include !== undefined
300222
+ ? new Set(options.include.split(','))
300223
+ : undefined;
300224
+ const ignoreKeys = (!includeKeys && options.ignore)
300225
+ ? new Set(options.ignore.split(','))
300226
+ : undefined;
300227
+
300228
+ const colorizer = colors(options.colorize, customColors, useOnlyCustomProps);
300229
+ const objectColorizer = options.colorizeObjects
300230
+ ? colorizer
300231
+ : colors(false, [], false);
300232
+
300233
+ return {
300234
+ EOL,
300235
+ IDENT,
300236
+ colorizer,
300237
+ customColors,
300238
+ customLevelNames,
300239
+ customLevels,
300240
+ customPrettifiers,
300241
+ customProperties,
300242
+ errorLikeObjectKeys,
300243
+ errorProps,
300244
+ getLevelLabelData,
300245
+ hideObject,
300246
+ ignoreKeys,
300247
+ includeKeys,
300248
+ levelFirst,
300249
+ levelKey,
300250
+ levelLabel,
300251
+ messageFormat,
300252
+ messageKey,
300253
+ minimumLevel,
300254
+ objectColorizer,
300255
+ singleLine,
300256
+ timestampKey,
300257
+ translateTime,
300258
+ useOnlyCustomProps
300259
+ }
300260
+ }
300261
+ return parseFactoryOptions_1;
300262
+ }
300263
+
300264
+ var fastSafeStringify;
300265
+ var hasRequiredFastSafeStringify;
300266
+
300267
+ function requireFastSafeStringify () {
300268
+ if (hasRequiredFastSafeStringify) return fastSafeStringify;
300269
+ hasRequiredFastSafeStringify = 1;
300270
+ fastSafeStringify = stringify;
300271
+ stringify.default = stringify;
300272
+ stringify.stable = deterministicStringify;
300273
+ stringify.stableStringify = deterministicStringify;
300274
+
300275
+ var LIMIT_REPLACE_NODE = '[...]';
300276
+ var CIRCULAR_REPLACE_NODE = '[Circular]';
300277
+
300278
+ var arr = [];
300279
+ var replacerStack = [];
300280
+
300281
+ function defaultOptions () {
300282
+ return {
300283
+ depthLimit: Number.MAX_SAFE_INTEGER,
300284
+ edgesLimit: Number.MAX_SAFE_INTEGER
300285
+ }
300286
+ }
300287
+
300288
+ // Regular stringify
300289
+ function stringify (obj, replacer, spacer, options) {
300290
+ if (typeof options === 'undefined') {
300291
+ options = defaultOptions();
300292
+ }
300293
+
300294
+ decirc(obj, '', 0, [], undefined, 0, options);
300295
+ var res;
300296
+ try {
300297
+ if (replacerStack.length === 0) {
300298
+ res = JSON.stringify(obj, replacer, spacer);
300299
+ } else {
300300
+ res = JSON.stringify(obj, replaceGetterValues(replacer), spacer);
300301
+ }
300302
+ } catch (_) {
300303
+ return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]')
300304
+ } finally {
300305
+ while (arr.length !== 0) {
300306
+ var part = arr.pop();
300307
+ if (part.length === 4) {
300308
+ Object.defineProperty(part[0], part[1], part[3]);
300309
+ } else {
300310
+ part[0][part[1]] = part[2];
300311
+ }
300312
+ }
300313
+ }
300314
+ return res
300315
+ }
300316
+
300317
+ function setReplace (replace, val, k, parent) {
300318
+ var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k);
300319
+ if (propertyDescriptor.get !== undefined) {
300320
+ if (propertyDescriptor.configurable) {
300321
+ Object.defineProperty(parent, k, { value: replace });
300322
+ arr.push([parent, k, val, propertyDescriptor]);
300323
+ } else {
300324
+ replacerStack.push([val, k, replace]);
300325
+ }
300326
+ } else {
300327
+ parent[k] = replace;
300328
+ arr.push([parent, k, val]);
300329
+ }
300330
+ }
300331
+
300332
+ function decirc (val, k, edgeIndex, stack, parent, depth, options) {
300333
+ depth += 1;
300334
+ var i;
300335
+ if (typeof val === 'object' && val !== null) {
300336
+ for (i = 0; i < stack.length; i++) {
300337
+ if (stack[i] === val) {
300338
+ setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
300339
+ return
300340
+ }
300341
+ }
300342
+
300343
+ if (
300344
+ typeof options.depthLimit !== 'undefined' &&
300345
+ depth > options.depthLimit
300346
+ ) {
300347
+ setReplace(LIMIT_REPLACE_NODE, val, k, parent);
300348
+ return
300349
+ }
300350
+
300351
+ if (
300352
+ typeof options.edgesLimit !== 'undefined' &&
300353
+ edgeIndex + 1 > options.edgesLimit
300354
+ ) {
300355
+ setReplace(LIMIT_REPLACE_NODE, val, k, parent);
300356
+ return
300357
+ }
300358
+
300359
+ stack.push(val);
300360
+ // Optimize for Arrays. Big arrays could kill the performance otherwise!
300361
+ if (Array.isArray(val)) {
300362
+ for (i = 0; i < val.length; i++) {
300363
+ decirc(val[i], i, i, stack, val, depth, options);
300364
+ }
300365
+ } else {
300366
+ var keys = Object.keys(val);
300367
+ for (i = 0; i < keys.length; i++) {
300368
+ var key = keys[i];
300369
+ decirc(val[key], key, i, stack, val, depth, options);
300370
+ }
300371
+ }
300372
+ stack.pop();
300373
+ }
300374
+ }
300375
+
300376
+ // Stable-stringify
300377
+ function compareFunction (a, b) {
300378
+ if (a < b) {
300379
+ return -1
300380
+ }
300381
+ if (a > b) {
300382
+ return 1
300383
+ }
300384
+ return 0
300385
+ }
300386
+
300387
+ function deterministicStringify (obj, replacer, spacer, options) {
300388
+ if (typeof options === 'undefined') {
300389
+ options = defaultOptions();
300390
+ }
300391
+
300392
+ var tmp = deterministicDecirc(obj, '', 0, [], undefined, 0, options) || obj;
300393
+ var res;
300394
+ try {
300395
+ if (replacerStack.length === 0) {
300396
+ res = JSON.stringify(tmp, replacer, spacer);
300397
+ } else {
300398
+ res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer);
300399
+ }
300400
+ } catch (_) {
300401
+ return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]')
300402
+ } finally {
300403
+ // Ensure that we restore the object as it was.
300404
+ while (arr.length !== 0) {
300405
+ var part = arr.pop();
300406
+ if (part.length === 4) {
300407
+ Object.defineProperty(part[0], part[1], part[3]);
300408
+ } else {
300409
+ part[0][part[1]] = part[2];
300410
+ }
300411
+ }
300412
+ }
300413
+ return res
300414
+ }
300415
+
300416
+ function deterministicDecirc (val, k, edgeIndex, stack, parent, depth, options) {
300417
+ depth += 1;
300418
+ var i;
300419
+ if (typeof val === 'object' && val !== null) {
300420
+ for (i = 0; i < stack.length; i++) {
300421
+ if (stack[i] === val) {
300422
+ setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
300423
+ return
300424
+ }
300425
+ }
300426
+ try {
300427
+ if (typeof val.toJSON === 'function') {
300428
+ return
300429
+ }
300430
+ } catch (_) {
300431
+ return
300432
+ }
300433
+
300434
+ if (
300435
+ typeof options.depthLimit !== 'undefined' &&
300436
+ depth > options.depthLimit
300437
+ ) {
300438
+ setReplace(LIMIT_REPLACE_NODE, val, k, parent);
300439
+ return
300440
+ }
300441
+
300442
+ if (
300443
+ typeof options.edgesLimit !== 'undefined' &&
300444
+ edgeIndex + 1 > options.edgesLimit
300445
+ ) {
300446
+ setReplace(LIMIT_REPLACE_NODE, val, k, parent);
300447
+ return
300448
+ }
300449
+
300450
+ stack.push(val);
300451
+ // Optimize for Arrays. Big arrays could kill the performance otherwise!
300452
+ if (Array.isArray(val)) {
300453
+ for (i = 0; i < val.length; i++) {
300454
+ deterministicDecirc(val[i], i, i, stack, val, depth, options);
300455
+ }
300456
+ } else {
300457
+ // Create a temporary object in the required way
300458
+ var tmp = {};
300459
+ var keys = Object.keys(val).sort(compareFunction);
300460
+ for (i = 0; i < keys.length; i++) {
300461
+ var key = keys[i];
300462
+ deterministicDecirc(val[key], key, i, stack, val, depth, options);
300463
+ tmp[key] = val[key];
300464
+ }
300465
+ if (typeof parent !== 'undefined') {
300466
+ arr.push([parent, k, val]);
300467
+ parent[k] = tmp;
300468
+ } else {
300469
+ return tmp
300470
+ }
300471
+ }
300472
+ stack.pop();
300473
+ }
300474
+ }
300475
+
300476
+ // wraps replacer function to handle values we couldn't replace
300477
+ // and mark them as replaced value
300478
+ function replaceGetterValues (replacer) {
300479
+ replacer =
300480
+ typeof replacer !== 'undefined'
300481
+ ? replacer
300482
+ : function (k, v) {
300483
+ return v
300484
+ };
300485
+ return function (key, val) {
300486
+ if (replacerStack.length > 0) {
300487
+ for (var i = 0; i < replacerStack.length; i++) {
300488
+ var part = replacerStack[i];
300489
+ if (part[1] === key && part[0] === val) {
300490
+ val = part[2];
300491
+ replacerStack.splice(i, 1);
300492
+ break
300493
+ }
300494
+ }
300495
+ }
300496
+ return replacer.call(this, key, val)
300497
+ }
300498
+ }
300499
+ return fastSafeStringify;
300500
+ }
300501
+
300502
+ var prettifyError_1;
300503
+ var hasRequiredPrettifyError;
300504
+
300505
+ function requirePrettifyError () {
300506
+ if (hasRequiredPrettifyError) return prettifyError_1;
300507
+ hasRequiredPrettifyError = 1;
300508
+
300509
+ prettifyError_1 = prettifyError;
300510
+
300511
+ const joinLinesWithIndentation = requireJoinLinesWithIndentation();
300512
+
300513
+ /**
300514
+ * @typedef {object} PrettifyErrorParams
300515
+ * @property {string} keyName The key assigned to this error in the log object.
300516
+ * @property {string} lines The STRINGIFIED error. If the error field has a
300517
+ * custom prettifier, that should be pre-applied as well.
300518
+ * @property {string} ident The indentation sequence to use.
300519
+ * @property {string} eol The EOL sequence to use.
300520
+ */
300521
+
300522
+ /**
300523
+ * Prettifies an error string into a multi-line format.
300524
+ *
300525
+ * @param {PrettifyErrorParams} input
300526
+ *
300527
+ * @returns {string}
300528
+ */
300529
+ function prettifyError ({ keyName, lines, eol, ident }) {
300530
+ let result = '';
300531
+ const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol });
300532
+ const splitLines = `${ident}${keyName}: ${joinedLines}${eol}`.split(eol);
300533
+
300534
+ for (let j = 0; j < splitLines.length; j += 1) {
300535
+ if (j !== 0) result += eol;
300536
+
300537
+ const line = splitLines[j];
300538
+ if (/^\s*"stack"/.test(line)) {
300539
+ const matches = /^(\s*"stack":)\s*(".*"),?$/.exec(line);
300540
+ /* istanbul ignore else */
300541
+ if (matches && matches.length === 3) {
300542
+ const indentSize = /^\s*/.exec(line)[0].length + 4;
300543
+ const indentation = ' '.repeat(indentSize);
300544
+ const stackMessage = matches[2];
300545
+ result += matches[1] + eol + indentation + JSON.parse(stackMessage).replace(/\n/g, eol + indentation);
300546
+ } else {
300547
+ result += line;
300548
+ }
300549
+ } else {
300550
+ result += line;
300551
+ }
300552
+ }
300553
+
300554
+ return result
300555
+ }
300556
+ return prettifyError_1;
300557
+ }
300558
+
300559
+ var prettifyObject_1;
300560
+ var hasRequiredPrettifyObject;
300561
+
300562
+ function requirePrettifyObject () {
300563
+ if (hasRequiredPrettifyObject) return prettifyObject_1;
300564
+ hasRequiredPrettifyObject = 1;
300565
+
300566
+ prettifyObject_1 = prettifyObject;
300567
+
300568
+ const {
300569
+ LOGGER_KEYS
300570
+ } = requireConstants$1();
300571
+
300572
+ const stringifySafe = requireFastSafeStringify();
300573
+ const joinLinesWithIndentation = requireJoinLinesWithIndentation();
300574
+ const prettifyError = requirePrettifyError();
300575
+
300576
+ /**
300577
+ * @typedef {object} PrettifyObjectParams
300578
+ * @property {object} log The object to prettify.
300579
+ * @property {boolean} [excludeLoggerKeys] Indicates if known logger specific
300580
+ * keys should be excluded from prettification. Default: `true`.
300581
+ * @property {string[]} [skipKeys] A set of object keys to exclude from the
300582
+ * * prettified result. Default: `[]`.
300583
+ * @property {PrettyContext} context The context object built from parsing
300584
+ * the options.
300585
+ */
300586
+
300587
+ /**
300588
+ * Prettifies a standard object. Special care is taken when processing the object
300589
+ * to handle child objects that are attached to keys known to contain error
300590
+ * objects.
300591
+ *
300592
+ * @param {PrettifyObjectParams} input
300593
+ *
300594
+ * @returns {string} The prettified string. This can be as little as `''` if
300595
+ * there was nothing to prettify.
300596
+ */
300597
+ function prettifyObject ({
300598
+ log,
300599
+ excludeLoggerKeys = true,
300600
+ skipKeys = [],
300601
+ context
300602
+ }) {
300603
+ const {
300604
+ EOL: eol,
300605
+ IDENT: ident,
300606
+ customPrettifiers,
300607
+ errorLikeObjectKeys: errorLikeKeys,
300608
+ objectColorizer,
300609
+ singleLine,
300610
+ colorizer
300611
+ } = context;
300612
+ const keysToIgnore = [].concat(skipKeys);
300613
+
300614
+ /* istanbul ignore else */
300615
+ if (excludeLoggerKeys === true) Array.prototype.push.apply(keysToIgnore, LOGGER_KEYS);
300616
+
300617
+ let result = '';
300618
+
300619
+ // Split object keys into two categories: error and non-error
300620
+ const { plain, errors } = Object.entries(log).reduce(({ plain, errors }, [k, v]) => {
300621
+ if (keysToIgnore.includes(k) === false) {
300622
+ // Pre-apply custom prettifiers, because all 3 cases below will need this
300623
+ const pretty = typeof customPrettifiers[k] === 'function'
300624
+ ? customPrettifiers[k](v, k, log, { colors: colorizer.colors })
300625
+ : v;
300626
+ if (errorLikeKeys.includes(k)) {
300627
+ errors[k] = pretty;
300628
+ } else {
300629
+ plain[k] = pretty;
300630
+ }
300631
+ }
300632
+ return { plain, errors }
300633
+ }, { plain: {}, errors: {} });
300634
+
300635
+ if (singleLine) {
300636
+ // Stringify the entire object as a single JSON line
300637
+ /* istanbul ignore else */
300638
+ if (Object.keys(plain).length > 0) {
300639
+ result += objectColorizer.greyMessage(stringifySafe(plain));
300640
+ }
300641
+ result += eol;
300642
+ // Avoid printing the escape character on escaped backslashes.
300643
+ result = result.replace(/\\\\/gi, '\\');
300644
+ } else {
300645
+ // Put each object entry on its own line
300646
+ Object.entries(plain).forEach(([keyName, keyValue]) => {
300647
+ // custom prettifiers are already applied above, so we can skip it now
300648
+ let lines = typeof customPrettifiers[keyName] === 'function'
300649
+ ? keyValue
300650
+ : stringifySafe(keyValue, null, 2);
300651
+
300652
+ if (lines === undefined) return
300653
+
300654
+ // Avoid printing the escape character on escaped backslashes.
300655
+ lines = lines.replace(/\\\\/gi, '\\');
300656
+
300657
+ const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol });
300658
+ result += `${ident}${objectColorizer.property(keyName)}:${joinedLines.startsWith(eol) ? '' : ' '}${joinedLines}${eol}`;
300659
+ });
300660
+ }
300661
+
300662
+ // Errors
300663
+ Object.entries(errors).forEach(([keyName, keyValue]) => {
300664
+ // custom prettifiers are already applied above, so we can skip it now
300665
+ const lines = typeof customPrettifiers[keyName] === 'function'
300666
+ ? keyValue
300667
+ : stringifySafe(keyValue, null, 2);
300668
+
300669
+ if (lines === undefined) return
300670
+
300671
+ result += prettifyError({ keyName, lines, eol, ident });
300672
+ });
300673
+
300674
+ return result
300675
+ }
300676
+ return prettifyObject_1;
300677
+ }
300678
+
300679
+ var prettifyErrorLog_1;
300680
+ var hasRequiredPrettifyErrorLog;
300681
+
300682
+ function requirePrettifyErrorLog () {
300683
+ if (hasRequiredPrettifyErrorLog) return prettifyErrorLog_1;
300684
+ hasRequiredPrettifyErrorLog = 1;
300685
+
300686
+ prettifyErrorLog_1 = prettifyErrorLog;
300687
+
300688
+ const {
300689
+ LOGGER_KEYS
300690
+ } = requireConstants$1();
300691
+
300692
+ const isObject = requireIsObject();
300693
+ const joinLinesWithIndentation = requireJoinLinesWithIndentation();
300694
+ const prettifyObject = requirePrettifyObject();
300695
+
300696
+ /**
300697
+ * @typedef {object} PrettifyErrorLogParams
300698
+ * @property {object} log The error log to prettify.
300699
+ * @property {PrettyContext} context The context object built from parsing
300700
+ * the options.
300701
+ */
300702
+
300703
+ /**
300704
+ * Given a log object that has a `type: 'Error'` key, prettify the object and
300705
+ * return the result. In other
300706
+ *
300707
+ * @param {PrettifyErrorLogParams} input
300708
+ *
300709
+ * @returns {string} A string that represents the prettified error log.
300710
+ */
300711
+ function prettifyErrorLog ({ log, context }) {
300712
+ const {
300713
+ EOL: eol,
300714
+ IDENT: ident,
300715
+ errorProps: errorProperties,
300716
+ messageKey
300717
+ } = context;
300718
+ const stack = log.stack;
300719
+ const joinedLines = joinLinesWithIndentation({ input: stack, ident, eol });
300720
+ let result = `${ident}${joinedLines}${eol}`;
300721
+
300722
+ if (errorProperties.length > 0) {
300723
+ const excludeProperties = LOGGER_KEYS.concat(messageKey, 'type', 'stack');
300724
+ let propertiesToPrint;
300725
+ if (errorProperties[0] === '*') {
300726
+ // Print all sibling properties except for the standard exclusions.
300727
+ propertiesToPrint = Object.keys(log).filter(k => excludeProperties.includes(k) === false);
300728
+ } else {
300729
+ // Print only specified properties unless the property is a standard exclusion.
300730
+ propertiesToPrint = errorProperties.filter(k => excludeProperties.includes(k) === false);
300731
+ }
300732
+
300733
+ for (let i = 0; i < propertiesToPrint.length; i += 1) {
300734
+ const key = propertiesToPrint[i];
300735
+ if (key in log === false) continue
300736
+ if (isObject(log[key])) {
300737
+ // The nested object may have "logger" type keys but since they are not
300738
+ // at the root level of the object being processed, we want to print them.
300739
+ // Thus, we invoke with `excludeLoggerKeys: false`.
300740
+ const prettifiedObject = prettifyObject({
300741
+ log: log[key],
300742
+ excludeLoggerKeys: false,
300743
+ context: {
300744
+ ...context,
300745
+ IDENT: ident + ident
300746
+ }
300747
+ });
300748
+ result = `${result}${ident}${key}: {${eol}${prettifiedObject}${ident}}${eol}`;
300749
+ continue
300750
+ }
300751
+ result = `${result}${ident}${key}: ${log[key]}${eol}`;
300752
+ }
300753
+ }
300754
+
300755
+ return result
300756
+ }
300757
+ return prettifyErrorLog_1;
300758
+ }
300759
+
300760
+ var prettifyLevel_1;
300761
+ var hasRequiredPrettifyLevel;
300762
+
300763
+ function requirePrettifyLevel () {
300764
+ if (hasRequiredPrettifyLevel) return prettifyLevel_1;
300765
+ hasRequiredPrettifyLevel = 1;
300766
+
300767
+ prettifyLevel_1 = prettifyLevel;
300768
+
300769
+ const getPropertyValue = requireGetPropertyValue();
300770
+
300771
+ /**
300772
+ * @typedef {object} PrettifyLevelParams
300773
+ * @property {object} log The log object.
300774
+ * @property {PrettyContext} context The context object built from parsing
300775
+ * the options.
300776
+ */
300777
+
300778
+ /**
300779
+ * Checks if the passed in log has a `level` value and returns a prettified
300780
+ * string for that level if so.
300781
+ *
300782
+ * @param {PrettifyLevelParams} input
300783
+ *
300784
+ * @returns {undefined|string} If `log` does not have a `level` property then
300785
+ * `undefined` will be returned. Otherwise, a string from the specified
300786
+ * `colorizer` is returned.
300787
+ */
300788
+ function prettifyLevel ({ log, context }) {
300789
+ const {
300790
+ colorizer,
300791
+ customLevels,
300792
+ customLevelNames,
300793
+ levelKey,
300794
+ getLevelLabelData
300795
+ } = context;
300796
+ const prettifier = context.customPrettifiers?.level;
300797
+ const output = getPropertyValue(log, levelKey);
300798
+ if (output === undefined) return undefined
300799
+ const labelColorized = colorizer(output, { customLevels, customLevelNames });
300800
+ if (prettifier) {
300801
+ const [label] = getLevelLabelData(output);
300802
+ return prettifier(output, levelKey, log, { label, labelColorized, colors: colorizer.colors })
300803
+ }
300804
+ return labelColorized
300805
+ }
300806
+ return prettifyLevel_1;
300807
+ }
300808
+
300809
+ var prettifyMessage_1;
300810
+ var hasRequiredPrettifyMessage;
300811
+
300812
+ function requirePrettifyMessage () {
300813
+ if (hasRequiredPrettifyMessage) return prettifyMessage_1;
300814
+ hasRequiredPrettifyMessage = 1;
300815
+
300816
+ prettifyMessage_1 = prettifyMessage;
300817
+
300818
+ const {
300819
+ LEVELS
300820
+ } = requireConstants$1();
300821
+
300822
+ const getPropertyValue = requireGetPropertyValue();
300823
+ const interpretConditionals = requireInterpretConditionals();
300824
+
300825
+ /**
300826
+ * @typedef {object} PrettifyMessageParams
300827
+ * @property {object} log The log object with the message to colorize.
300828
+ * @property {PrettyContext} context The context object built from parsing
300829
+ * the options.
300830
+ */
300831
+
300832
+ /**
300833
+ * Prettifies a message string if the given `log` has a message property.
300834
+ *
300835
+ * @param {PrettifyMessageParams} input
300836
+ *
300837
+ * @returns {undefined|string} If the message key is not found, or the message
300838
+ * key is not a string, then `undefined` will be returned. Otherwise, a string
300839
+ * that is the prettified message.
300840
+ */
300841
+ function prettifyMessage ({ log, context }) {
300842
+ const {
300843
+ colorizer,
300844
+ customLevels,
300845
+ levelKey,
300846
+ levelLabel,
300847
+ messageFormat,
300848
+ messageKey,
300849
+ useOnlyCustomProps
300850
+ } = context;
300851
+ if (messageFormat && typeof messageFormat === 'string') {
300852
+ const parsedMessageFormat = interpretConditionals(messageFormat, log);
300853
+
300854
+ const message = String(parsedMessageFormat).replace(
300855
+ /{([^{}]+)}/g,
300856
+ function (match, p1) {
300857
+ // return log level as string instead of int
300858
+ let level;
300859
+ if (p1 === levelLabel && (level = getPropertyValue(log, levelKey)) !== undefined) {
300860
+ const condition = useOnlyCustomProps ? customLevels === undefined : customLevels[level] === undefined;
300861
+ return condition ? LEVELS[level] : customLevels[level]
300862
+ }
300863
+
300864
+ // Parse nested key access, e.g. `{keyA.subKeyB}`.
300865
+ const value = getPropertyValue(log, p1);
300866
+ return value !== undefined ? value : ''
300867
+ });
300868
+ return colorizer.message(message)
300869
+ }
300870
+ if (messageFormat && typeof messageFormat === 'function') {
300871
+ const msg = messageFormat(log, messageKey, levelLabel, { colors: colorizer.colors });
300872
+ return colorizer.message(msg)
300873
+ }
300874
+ if (messageKey in log === false) return undefined
300875
+ if (typeof log[messageKey] !== 'string' && typeof log[messageKey] !== 'number' && typeof log[messageKey] !== 'boolean') return undefined
300876
+ return colorizer.message(log[messageKey])
300877
+ }
300878
+ return prettifyMessage_1;
300879
+ }
300880
+
300881
+ var prettifyMetadata_1;
300882
+ var hasRequiredPrettifyMetadata;
300883
+
300884
+ function requirePrettifyMetadata () {
300885
+ if (hasRequiredPrettifyMetadata) return prettifyMetadata_1;
300886
+ hasRequiredPrettifyMetadata = 1;
300887
+
300888
+ prettifyMetadata_1 = prettifyMetadata;
300889
+
300890
+ /**
300891
+ * @typedef {object} PrettifyMetadataParams
300892
+ * @property {object} log The log that may or may not contain metadata to
300893
+ * be prettified.
300894
+ * @property {PrettyContext} context The context object built from parsing
300895
+ * the options.
300896
+ */
300897
+
300898
+ /**
300899
+ * Prettifies metadata that is usually present in a Pino log line. It looks for
300900
+ * fields `name`, `pid`, `hostname`, and `caller` and returns a formatted string using
300901
+ * the fields it finds.
300902
+ *
300903
+ * @param {PrettifyMetadataParams} input
300904
+ *
300905
+ * @returns {undefined|string} If no metadata is found then `undefined` is
300906
+ * returned. Otherwise, a string of prettified metadata is returned.
300907
+ */
300908
+ function prettifyMetadata ({ log, context }) {
300909
+ const { customPrettifiers: prettifiers, colorizer } = context;
300910
+ let line = '';
300911
+
300912
+ if (log.name || log.pid || log.hostname) {
300913
+ line += '(';
300914
+
300915
+ if (log.name) {
300916
+ line += prettifiers.name
300917
+ ? prettifiers.name(log.name, 'name', log, { colors: colorizer.colors })
300918
+ : log.name;
300919
+ }
300920
+
300921
+ if (log.pid) {
300922
+ const prettyPid = prettifiers.pid
300923
+ ? prettifiers.pid(log.pid, 'pid', log, { colors: colorizer.colors })
300924
+ : log.pid;
300925
+ if (log.name && log.pid) {
300926
+ line += '/' + prettyPid;
300927
+ } else {
300928
+ line += prettyPid;
300929
+ }
300930
+ }
300931
+
300932
+ if (log.hostname) {
300933
+ // If `pid` and `name` were in the ignore keys list then we don't need
300934
+ // the leading space.
300935
+ const prettyHostname = prettifiers.hostname
300936
+ ? prettifiers.hostname(log.hostname, 'hostname', log, { colors: colorizer.colors })
300937
+ : log.hostname;
300938
+
300939
+ line += `${line === '(' ? 'on' : ' on'} ${prettyHostname}`;
300940
+ }
300941
+
300942
+ line += ')';
300943
+ }
300944
+
300945
+ if (log.caller) {
300946
+ const prettyCaller = prettifiers.caller
300947
+ ? prettifiers.caller(log.caller, 'caller', log, { colors: colorizer.colors })
300948
+ : log.caller;
300949
+
300950
+ line += `${line === '' ? '' : ' '}<${prettyCaller}>`;
300951
+ }
300952
+
300953
+ if (line === '') {
300954
+ return undefined
300955
+ } else {
300956
+ return line
300957
+ }
300958
+ }
300959
+ return prettifyMetadata_1;
300960
+ }
300961
+
300962
+ var prettifyTime_1;
300963
+ var hasRequiredPrettifyTime;
300964
+
300965
+ function requirePrettifyTime () {
300966
+ if (hasRequiredPrettifyTime) return prettifyTime_1;
300967
+ hasRequiredPrettifyTime = 1;
300968
+
300969
+ prettifyTime_1 = prettifyTime;
300970
+
300971
+ const formatTime = requireFormatTime();
300972
+
300973
+ /**
300974
+ * @typedef {object} PrettifyTimeParams
300975
+ * @property {object} log The log object with the timestamp to be prettified.
300976
+ * @property {PrettyContext} context The context object built from parsing
300977
+ * the options.
300978
+ */
300979
+
300980
+ /**
300981
+ * Prettifies a timestamp if the given `log` has either `time`, `timestamp` or custom specified timestamp
300982
+ * property.
300983
+ *
300984
+ * @param {PrettifyTimeParams} input
300985
+ *
300986
+ * @returns {undefined|string} If a timestamp property cannot be found then
300987
+ * `undefined` is returned. Otherwise, the prettified time is returned as a
300988
+ * string.
300989
+ */
300990
+ function prettifyTime ({ log, context }) {
300991
+ const {
300992
+ timestampKey,
300993
+ translateTime: translateFormat
300994
+ } = context;
300995
+ const prettifier = context.customPrettifiers?.time;
300996
+ let time = null;
300997
+
300998
+ if (timestampKey in log) {
300999
+ time = log[timestampKey];
301000
+ } else if ('timestamp' in log) {
301001
+ time = log.timestamp;
301002
+ }
301003
+
301004
+ if (time === null) return undefined
301005
+ const output = translateFormat ? formatTime(time, translateFormat) : time;
301006
+
301007
+ return prettifier ? prettifier(output) : `[${output}]`
301008
+ }
301009
+ return prettifyTime_1;
301010
+ }
301011
+
301012
+ var utils;
301013
+ var hasRequiredUtils;
301014
+
301015
+ function requireUtils () {
301016
+ if (hasRequiredUtils) return utils;
301017
+ hasRequiredUtils = 1;
301018
+
301019
+ utils = {
301020
+ buildSafeSonicBoom: requireBuildSafeSonicBoom(),
301021
+ createDate: requireCreateDate(),
301022
+ deleteLogProperty: requireDeleteLogProperty(),
301023
+ filterLog: requireFilterLog(),
301024
+ formatTime: requireFormatTime(),
301025
+ getPropertyValue: requireGetPropertyValue(),
301026
+ handleCustomLevelsNamesOpts: requireHandleCustomLevelsNamesOpts(),
301027
+ handleCustomLevelsOpts: requireHandleCustomLevelsOpts(),
301028
+ interpretConditionals: requireInterpretConditionals(),
301029
+ isObject: requireIsObject(),
301030
+ isValidDate: requireIsValidDate(),
301031
+ joinLinesWithIndentation: requireJoinLinesWithIndentation(),
301032
+ noop: requireNoop(),
301033
+ parseFactoryOptions: requireParseFactoryOptions(),
301034
+ prettifyErrorLog: requirePrettifyErrorLog(),
301035
+ prettifyError: requirePrettifyError(),
301036
+ prettifyLevel: requirePrettifyLevel(),
301037
+ prettifyMessage: requirePrettifyMessage(),
301038
+ prettifyMetadata: requirePrettifyMetadata(),
301039
+ prettifyObject: requirePrettifyObject(),
301040
+ prettifyTime: requirePrettifyTime(),
301041
+ splitPropertyKey: requireSplitPropertyKey(),
301042
+ getLevelLabelData: requireGetLevelLabelData()
301043
+ };
301044
+
301045
+ // The remainder of this file consists of jsdoc blocks that are difficult to
301046
+ // determine a more appropriate "home" for. As an example, the blocks associated
301047
+ // with custom prettifiers could live in either the `prettify-level`,
301048
+ // `prettify-metadata`, or `prettify-time` files since they are the primary
301049
+ // files where such code is used. But we want a central place to define common
301050
+ // doc blocks, so we are picking this file as the answer.
301051
+
301052
+ /**
301053
+ * A hash of log property names mapped to prettifier functions. When the
301054
+ * incoming log data is being processed for prettification, any key on the log
301055
+ * that matches a key in a custom prettifiers hash will be prettified using
301056
+ * that matching custom prettifier. The value passed to the custom prettifier
301057
+ * will the value associated with the corresponding log key.
301058
+ *
301059
+ * The hash may contain any arbitrary keys for arbitrary log properties, but it
301060
+ * may also contain a set of predefined key names that map to well-known log
301061
+ * properties. These keys are:
301062
+ *
301063
+ * + `time` (for the timestamp field)
301064
+ * + `level` (for the level label field; value may be a level number instead
301065
+ * of a level label)
301066
+ * + `hostname`
301067
+ * + `pid`
301068
+ * + `name`
301069
+ * + `caller`
301070
+ *
301071
+ * @typedef {Object.<string, CustomPrettifierFunc>} CustomPrettifiers
301072
+ */
301073
+
301074
+ /**
301075
+ * A synchronous function to be used for prettifying a log property. It must
301076
+ * return a string.
301077
+ *
301078
+ * @typedef {function} CustomPrettifierFunc
301079
+ * @param {any} value The value to be prettified for the key associated with
301080
+ * the prettifier.
301081
+ * @returns {string}
301082
+ */
301083
+
301084
+ /**
301085
+ * A tokenized string that indicates how the prettified log line should be
301086
+ * formatted. Tokens are either log properties enclosed in curly braces, e.g.
301087
+ * `{levelLabel}`, `{pid}`, or `{req.url}`, or conditional directives in curly
301088
+ * braces. The only conditional directives supported are `if` and `end`, e.g.
301089
+ * `{if pid}{pid}{end}`; every `if` must have a matching `end`. Nested
301090
+ * conditions are not supported.
301091
+ *
301092
+ * @typedef {string} MessageFormatString
301093
+ *
301094
+ * @example
301095
+ * `{levelLabel} - {if pid}{pid} - {end}url:{req.url}`
301096
+ */
301097
+
301098
+ /**
301099
+ * @typedef {object} PrettifyMessageExtras
301100
+ * @property {object} colors Available color functions based on `useColor` (or `colorize`) context
301101
+ * the options.
301102
+ */
301103
+
301104
+ /**
301105
+ * A function that accepts a log object, name of the message key, and name of
301106
+ * the level label key and returns a formatted log line.
301107
+ *
301108
+ * Note: this function must be synchronous.
301109
+ *
301110
+ * @typedef {function} MessageFormatFunction
301111
+ * @param {object} log The log object to be processed.
301112
+ * @param {string} messageKey The name of the key in the `log` object that
301113
+ * contains the log message.
301114
+ * @param {string} levelLabel The name of the key in the `log` object that
301115
+ * contains the log level name.
301116
+ * @param {PrettifyMessageExtras} extras Additional data available for message context
301117
+ * @returns {string}
301118
+ *
301119
+ * @example
301120
+ * function (log, messageKey, levelLabel) {
301121
+ * return `${log[levelLabel]} - ${log[messageKey]}`
301122
+ * }
301123
+ */
301124
+ return utils;
301125
+ }
301126
+
301127
+ var secureJsonParse = {exports: {}};
301128
+
301129
+ var hasRequiredSecureJsonParse;
301130
+
301131
+ function requireSecureJsonParse () {
301132
+ if (hasRequiredSecureJsonParse) return secureJsonParse.exports;
301133
+ hasRequiredSecureJsonParse = 1;
301134
+
301135
+ const hasBuffer = typeof Buffer !== 'undefined';
301136
+ const suspectProtoRx = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/;
301137
+ const suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
301138
+
301139
+ /**
301140
+ * @description Internal parse function that parses JSON text with security checks.
301141
+ * @private
301142
+ * @param {string|Buffer} text - The JSON text string or Buffer to parse.
301143
+ * @param {Function} [reviver] - The JSON.parse() optional reviver argument.
301144
+ * @param {import('./types').ParseOptions} [options] - Optional configuration object.
301145
+ * @returns {*} The parsed object.
301146
+ * @throws {SyntaxError} If a forbidden prototype property is found and `options.protoAction` or
301147
+ * `options.constructorAction` is `'error'`.
301148
+ */
301149
+ function _parse (text, reviver, options) {
301150
+ // Normalize arguments
301151
+ if (options == null) {
301152
+ if (reviver !== null && typeof reviver === 'object') {
301153
+ options = reviver;
301154
+ reviver = undefined;
301155
+ }
301156
+ }
301157
+
301158
+ if (hasBuffer && Buffer.isBuffer(text)) {
301159
+ text = text.toString();
301160
+ }
301161
+
301162
+ // BOM checker
301163
+ if (text && text.charCodeAt(0) === 0xFEFF) {
301164
+ text = text.slice(1);
301165
+ }
301166
+
301167
+ // Parse normally, allowing exceptions
301168
+ const obj = JSON.parse(text, reviver);
301169
+
301170
+ // Ignore null and non-objects
301171
+ if (obj === null || typeof obj !== 'object') {
301172
+ return obj
301173
+ }
301174
+
301175
+ const protoAction = (options && options.protoAction) || 'error';
301176
+ const constructorAction = (options && options.constructorAction) || 'error';
301177
+
301178
+ // options: 'error' (default) / 'remove' / 'ignore'
301179
+ if (protoAction === 'ignore' && constructorAction === 'ignore') {
301180
+ return obj
301181
+ }
301182
+
301183
+ if (protoAction !== 'ignore' && constructorAction !== 'ignore') {
301184
+ if (suspectProtoRx.test(text) === false && suspectConstructorRx.test(text) === false) {
301185
+ return obj
301186
+ }
301187
+ } else if (protoAction !== 'ignore' && constructorAction === 'ignore') {
301188
+ if (suspectProtoRx.test(text) === false) {
301189
+ return obj
301190
+ }
301191
+ } else {
301192
+ if (suspectConstructorRx.test(text) === false) {
301193
+ return obj
301194
+ }
301195
+ }
301196
+
301197
+ // Scan result for proto keys
301198
+ return filter(obj, { protoAction, constructorAction, safe: options && options.safe })
301199
+ }
301200
+
301201
+ /**
301202
+ * @description Scans and filters an object for forbidden prototype properties.
301203
+ * @param {Object} obj - The object being scanned.
301204
+ * @param {import('./types').ParseOptions} [options] - Optional configuration object.
301205
+ * @returns {Object|null} The filtered object, or `null` if safe mode is enabled and issues are found.
301206
+ * @throws {SyntaxError} If a forbidden prototype property is found and `options.protoAction` or
301207
+ * `options.constructorAction` is `'error'`.
301208
+ */
301209
+ function filter (obj, { protoAction = 'error', constructorAction = 'error', safe } = {}) {
301210
+ let next = [obj];
301211
+
301212
+ while (next.length) {
301213
+ const nodes = next;
301214
+ next = [];
301215
+
301216
+ for (const node of nodes) {
301217
+ if (protoAction !== 'ignore' && Object.prototype.hasOwnProperty.call(node, '__proto__')) { // Avoid calling node.hasOwnProperty directly
301218
+ if (safe === true) {
301219
+ return null
301220
+ } else if (protoAction === 'error') {
301221
+ throw new SyntaxError('Object contains forbidden prototype property')
301222
+ }
301223
+
301224
+ delete node.__proto__; // eslint-disable-line no-proto
301225
+ }
301226
+
301227
+ if (constructorAction !== 'ignore' &&
301228
+ Object.prototype.hasOwnProperty.call(node, 'constructor') &&
301229
+ node.constructor !== null &&
301230
+ typeof node.constructor === 'object' &&
301231
+ Object.prototype.hasOwnProperty.call(node.constructor, 'prototype')) { // Avoid calling node.hasOwnProperty directly
301232
+ if (safe === true) {
301233
+ return null
301234
+ } else if (constructorAction === 'error') {
301235
+ throw new SyntaxError('Object contains forbidden prototype property')
301236
+ }
301237
+
301238
+ delete node.constructor;
301239
+ }
301240
+
301241
+ for (const key in node) {
301242
+ const value = node[key];
301243
+ if (value && typeof value === 'object') {
301244
+ next.push(value);
301245
+ }
301246
+ }
301247
+ }
301248
+ }
301249
+ return obj
301250
+ }
301251
+
301252
+ /**
301253
+ * @description Parses a given JSON-formatted text into an object.
301254
+ * @param {string|Buffer} text - The JSON text string or Buffer to parse.
301255
+ * @param {Function} [reviver] - The `JSON.parse()` optional reviver argument, or options object.
301256
+ * @param {import('./types').ParseOptions} [options] - Optional configuration object.
301257
+ * @returns {*} The parsed object.
301258
+ * @throws {SyntaxError} If the JSON text is malformed or contains forbidden prototype properties
301259
+ * when `options.protoAction` or `options.constructorAction` is `'error'`.
301260
+ */
301261
+ function parse (text, reviver, options) {
301262
+ const { stackTraceLimit } = Error;
301263
+ Error.stackTraceLimit = 0;
301264
+ try {
301265
+ return _parse(text, reviver, options)
301266
+ } finally {
301267
+ Error.stackTraceLimit = stackTraceLimit;
301268
+ }
301269
+ }
301270
+
301271
+ /**
301272
+ * @description Safely parses a given JSON-formatted text into an object.
301273
+ * @param {string|Buffer} text - The JSON text string or Buffer to parse.
301274
+ * @param {Function} [reviver] - The `JSON.parse()` optional reviver argument.
301275
+ * @returns {*|null|undefined} The parsed object, `null` if security issues found, or `undefined` on parse error.
301276
+ */
301277
+ function safeParse (text, reviver) {
301278
+ const { stackTraceLimit } = Error;
301279
+ Error.stackTraceLimit = 0;
301280
+ try {
301281
+ return _parse(text, reviver, { safe: true })
301282
+ } catch {
301283
+ return undefined
301284
+ } finally {
301285
+ Error.stackTraceLimit = stackTraceLimit;
301286
+ }
301287
+ }
301288
+
301289
+ secureJsonParse.exports = parse;
301290
+ secureJsonParse.exports.default = parse;
301291
+ secureJsonParse.exports.parse = parse;
301292
+ secureJsonParse.exports.safeParse = safeParse;
301293
+ secureJsonParse.exports.scan = filter;
301294
+ return secureJsonParse.exports;
301295
+ }
301296
+
301297
+ var pretty_1;
301298
+ var hasRequiredPretty;
301299
+
301300
+ function requirePretty () {
301301
+ if (hasRequiredPretty) return pretty_1;
301302
+ hasRequiredPretty = 1;
301303
+
301304
+ pretty_1 = pretty;
301305
+
301306
+ const sjs = requireSecureJsonParse();
301307
+
301308
+ const isObject = requireIsObject();
301309
+ const prettifyErrorLog = requirePrettifyErrorLog();
301310
+ const prettifyLevel = requirePrettifyLevel();
301311
+ const prettifyMessage = requirePrettifyMessage();
301312
+ const prettifyMetadata = requirePrettifyMetadata();
301313
+ const prettifyObject = requirePrettifyObject();
301314
+ const prettifyTime = requirePrettifyTime();
301315
+ const filterLog = requireFilterLog();
301316
+
301317
+ const {
301318
+ LEVELS,
301319
+ LEVEL_KEY,
301320
+ LEVEL_NAMES
301321
+ } = requireConstants$1();
301322
+
301323
+ const jsonParser = input => {
301324
+ try {
301325
+ return { value: sjs.parse(input, { protoAction: 'remove' }) }
301326
+ } catch (err) {
301327
+ return { err }
301328
+ }
301329
+ };
301330
+
301331
+ /**
301332
+ * Orchestrates processing the received log data according to the provided
301333
+ * configuration and returns a prettified log string.
301334
+ *
301335
+ * @typedef {function} LogPrettifierFunc
301336
+ * @param {string|object} inputData A log string or a log-like object.
301337
+ * @returns {string} A string that represents the prettified log data.
301338
+ */
301339
+ function pretty (inputData) {
301340
+ let log;
301341
+ if (!isObject(inputData)) {
301342
+ const parsed = jsonParser(inputData);
301343
+ if (parsed.err || !isObject(parsed.value)) {
301344
+ // pass through
301345
+ return inputData + this.EOL
301346
+ }
301347
+ log = parsed.value;
301348
+ } else {
301349
+ log = inputData;
301350
+ }
301351
+
301352
+ if (this.minimumLevel) {
301353
+ // We need to figure out if the custom levels has the desired minimum
301354
+ // level & use that one if found. If not, determine if the level exists
301355
+ // in the standard levels. In both cases, make sure we have the level
301356
+ // number instead of the level name.
301357
+ let condition;
301358
+ if (this.useOnlyCustomProps) {
301359
+ condition = this.customLevels;
301360
+ } else {
301361
+ condition = this.customLevelNames[this.minimumLevel] !== undefined;
301362
+ }
301363
+ let minimum;
301364
+ if (condition) {
301365
+ minimum = this.customLevelNames[this.minimumLevel];
301366
+ } else {
301367
+ minimum = LEVEL_NAMES[this.minimumLevel];
301368
+ }
301369
+ if (!minimum) {
301370
+ minimum = typeof this.minimumLevel === 'string'
301371
+ ? LEVEL_NAMES[this.minimumLevel]
301372
+ : LEVEL_NAMES[LEVELS[this.minimumLevel].toLowerCase()];
301373
+ }
301374
+
301375
+ const level = log[this.levelKey === undefined ? LEVEL_KEY : this.levelKey];
301376
+ if (level < minimum) return
301377
+ }
301378
+
301379
+ const prettifiedMessage = prettifyMessage({ log, context: this.context });
301380
+
301381
+ if (this.ignoreKeys || this.includeKeys) {
301382
+ log = filterLog({ log, context: this.context });
301383
+ }
301384
+
301385
+ const prettifiedLevel = prettifyLevel({
301386
+ log,
301387
+ context: {
301388
+ ...this.context,
301389
+ // This is odd. The colorizer ends up relying on the value of
301390
+ // `customProperties` instead of the original `customLevels` and
301391
+ // `customLevelNames`.
301392
+ ...this.context.customProperties
301393
+ }
301394
+ });
301395
+ const prettifiedMetadata = prettifyMetadata({ log, context: this.context });
301396
+ const prettifiedTime = prettifyTime({ log, context: this.context });
301397
+
301398
+ let line = '';
301399
+ if (this.levelFirst && prettifiedLevel) {
301400
+ line = `${prettifiedLevel}`;
301401
+ }
301402
+
301403
+ if (prettifiedTime && line === '') {
301404
+ line = `${prettifiedTime}`;
301405
+ } else if (prettifiedTime) {
301406
+ line = `${line} ${prettifiedTime}`;
301407
+ }
301408
+
301409
+ if (!this.levelFirst && prettifiedLevel) {
301410
+ if (line.length > 0) {
301411
+ line = `${line} ${prettifiedLevel}`;
301412
+ } else {
301413
+ line = prettifiedLevel;
301414
+ }
301415
+ }
301416
+
301417
+ if (prettifiedMetadata) {
301418
+ if (line.length > 0) {
301419
+ line = `${line} ${prettifiedMetadata}:`;
301420
+ } else {
301421
+ line = prettifiedMetadata;
301422
+ }
301423
+ }
301424
+
301425
+ if (line.endsWith(':') === false && line !== '') {
301426
+ line += ':';
301427
+ }
301428
+
301429
+ if (prettifiedMessage !== undefined) {
301430
+ if (line.length > 0) {
301431
+ line = `${line} ${prettifiedMessage}`;
301432
+ } else {
301433
+ line = prettifiedMessage;
301434
+ }
301435
+ }
301436
+
301437
+ if (line.length > 0 && !this.singleLine) {
301438
+ line += this.EOL;
301439
+ }
301440
+
301441
+ // pino@7+ does not log this anymore
301442
+ if (log.type === 'Error' && typeof log.stack === 'string') {
301443
+ const prettifiedErrorLog = prettifyErrorLog({ log, context: this.context });
301444
+ if (this.singleLine) line += this.EOL;
301445
+ line += prettifiedErrorLog;
301446
+ } else if (this.hideObject === false) {
301447
+ const skipKeys = [
301448
+ this.messageKey,
301449
+ this.levelKey,
301450
+ this.timestampKey
301451
+ ]
301452
+ .map((key) => key.replaceAll(/\\/g, ''))
301453
+ .filter(key => {
301454
+ return typeof log[key] === 'string' ||
301455
+ typeof log[key] === 'number' ||
301456
+ typeof log[key] === 'boolean'
301457
+ });
301458
+ const prettifiedObject = prettifyObject({
301459
+ log,
301460
+ skipKeys,
301461
+ context: this.context
301462
+ });
301463
+
301464
+ // In single line mode, include a space only if prettified version isn't empty
301465
+ if (this.singleLine && !/^\s$/.test(prettifiedObject)) {
301466
+ line += ' ';
301467
+ }
301468
+ line += prettifiedObject;
301469
+ }
301470
+
301471
+ return line
301472
+ }
301473
+ return pretty_1;
301474
+ }
301475
+
301476
+ var hasRequiredPinoPretty;
301477
+
301478
+ function requirePinoPretty () {
301479
+ if (hasRequiredPinoPretty) return pinoPretty.exports;
301480
+ hasRequiredPinoPretty = 1;
301481
+
301482
+ const { isColorSupported } = requireColorette();
301483
+ const pump = requirePump();
301484
+ const { Transform } = require$$2$4;
301485
+ const abstractTransport = requirePinoAbstractTransport();
301486
+ const colors = requireColors();
301487
+ const {
301488
+ ERROR_LIKE_KEYS,
301489
+ LEVEL_KEY,
301490
+ LEVEL_LABEL,
301491
+ MESSAGE_KEY,
301492
+ TIMESTAMP_KEY
301493
+ } = requireConstants$1();
301494
+ const {
301495
+ buildSafeSonicBoom,
301496
+ parseFactoryOptions
301497
+ } = requireUtils();
301498
+ const pretty = requirePretty();
301499
+
301500
+ /**
301501
+ * @typedef {object} PinoPrettyOptions
301502
+ * @property {boolean} [colorize] Indicates if colors should be used when
301503
+ * prettifying. The default will be determined by the terminal capabilities at
301504
+ * run time.
301505
+ * @property {boolean} [colorizeObjects=true] Apply coloring to rendered objects
301506
+ * when coloring is enabled.
301507
+ * @property {boolean} [crlf=false] End lines with `\r\n` instead of `\n`.
301508
+ * @property {string|null} [customColors=null] A comma separated list of colors
301509
+ * to use for specific level labels, e.g. `err:red,info:blue`.
301510
+ * @property {string|null} [customLevels=null] A comma separated list of user
301511
+ * defined level names and numbers, e.g. `err:99,info:1`.
301512
+ * @property {CustomPrettifiers} [customPrettifiers={}] A set of prettifier
301513
+ * functions to apply to keys defined in this object.
301514
+ * @property {K_ERROR_LIKE_KEYS} [errorLikeObjectKeys] A list of string property
301515
+ * names to consider as error objects.
301516
+ * @property {string} [errorProps=''] A comma separated list of properties on
301517
+ * error objects to include in the output.
301518
+ * @property {boolean} [hideObject=false] When `true`, data objects will be
301519
+ * omitted from the output (except for error objects).
301520
+ * @property {string} [ignore='hostname'] A comma separated list of log keys
301521
+ * to omit when outputting the prettified log information.
301522
+ * @property {undefined|string} [include=undefined] A comma separated list of
301523
+ * log keys to include in the prettified log information. Only the keys in this
301524
+ * list will be included in the output.
301525
+ * @property {boolean} [levelFirst=false] When true, the log level will be the
301526
+ * first field in the prettified output.
301527
+ * @property {string} [levelKey='level'] The key name in the log data that
301528
+ * contains the level value for the log.
301529
+ * @property {string} [levelLabel='levelLabel'] Token name to use in
301530
+ * `messageFormat` to represent the name of the logged level.
301531
+ * @property {null|MessageFormatString|MessageFormatFunction} [messageFormat=null]
301532
+ * When a string, defines how the prettified line should be formatted according
301533
+ * to defined tokens. When a function, a synchronous function that returns a
301534
+ * formatted string.
301535
+ * @property {string} [messageKey='msg'] Defines the key in incoming logs that
301536
+ * contains the message of the log, if present.
301537
+ * @property {undefined|string|number} [minimumLevel=undefined] The minimum
301538
+ * level for logs that should be processed. Any logs below this level will
301539
+ * be omitted.
301540
+ * @property {object} [outputStream=process.stdout] The stream to write
301541
+ * prettified log lines to.
301542
+ * @property {boolean} [singleLine=false] When `true` any objects, except error
301543
+ * objects, in the log data will be printed as a single line instead as multiple
301544
+ * lines.
301545
+ * @property {string} [timestampKey='time'] Defines the key in incoming logs
301546
+ * that contains the timestamp of the log, if present.
301547
+ * @property {boolean|string} [translateTime=true] When true, will translate a
301548
+ * JavaScript date integer into a human-readable string. If set to a string,
301549
+ * it must be a format string.
301550
+ * @property {boolean} [useOnlyCustomProps=true] When true, only custom levels
301551
+ * and colors will be used if they have been provided.
301552
+ */
301553
+
301554
+ /**
301555
+ * The default options that will be used when prettifying log lines.
301556
+ *
301557
+ * @type {PinoPrettyOptions}
301558
+ */
301559
+ const defaultOptions = {
301560
+ colorize: isColorSupported,
301561
+ colorizeObjects: true,
301562
+ crlf: false,
301563
+ customColors: null,
301564
+ customLevels: null,
301565
+ customPrettifiers: {},
301566
+ errorLikeObjectKeys: ERROR_LIKE_KEYS,
301567
+ errorProps: '',
301568
+ hideObject: false,
301569
+ ignore: 'hostname',
301570
+ include: undefined,
301571
+ levelFirst: false,
301572
+ levelKey: LEVEL_KEY,
301573
+ levelLabel: LEVEL_LABEL,
301574
+ messageFormat: null,
301575
+ messageKey: MESSAGE_KEY,
301576
+ minimumLevel: undefined,
301577
+ outputStream: process.stdout,
301578
+ singleLine: false,
301579
+ timestampKey: TIMESTAMP_KEY,
301580
+ translateTime: true,
301581
+ useOnlyCustomProps: true
301582
+ };
301583
+
301584
+ /**
301585
+ * Processes the supplied options and returns a function that accepts log data
301586
+ * and produces a prettified log string.
301587
+ *
301588
+ * @param {PinoPrettyOptions} options Configuration for the prettifier.
301589
+ * @returns {LogPrettifierFunc}
301590
+ */
301591
+ function prettyFactory (options) {
301592
+ const context = parseFactoryOptions(Object.assign({}, defaultOptions, options));
301593
+ return pretty.bind({ ...context, context })
301594
+ }
301595
+
301596
+ /**
301597
+ * @typedef {PinoPrettyOptions} BuildStreamOpts
301598
+ * @property {object|number|string} [destination] A destination stream, file
301599
+ * descriptor, or target path to a file.
301600
+ * @property {boolean} [append]
301601
+ * @property {boolean} [mkdir]
301602
+ * @property {boolean} [sync=false]
301603
+ */
301604
+
301605
+ /**
301606
+ * Constructs a {@link LogPrettifierFunc} and a stream to which the produced
301607
+ * prettified log data will be written.
301608
+ *
301609
+ * @param {BuildStreamOpts} opts
301610
+ * @returns {Transform | (Transform & OnUnknown)}
301611
+ */
301612
+ function build (opts = {}) {
301613
+ let pretty = prettyFactory(opts);
301614
+ let destination;
301615
+ return abstractTransport(function (source) {
301616
+ source.on('message', function pinoConfigListener (message) {
301617
+ if (!message || message.code !== 'PINO_CONFIG') return
301618
+ Object.assign(opts, {
301619
+ messageKey: message.config.messageKey,
301620
+ errorLikeObjectKeys: Array.from(new Set([...(opts.errorLikeObjectKeys || ERROR_LIKE_KEYS), message.config.errorKey])),
301621
+ customLevels: message.config.levels.values
301622
+ });
301623
+ pretty = prettyFactory(opts);
301624
+ source.off('message', pinoConfigListener);
301625
+ });
301626
+ const stream = new Transform({
301627
+ objectMode: true,
301628
+ autoDestroy: true,
301629
+ transform (chunk, enc, cb) {
301630
+ const line = pretty(chunk);
301631
+ cb(null, line);
301632
+ }
301633
+ });
301634
+
301635
+ if (typeof opts.destination === 'object' && typeof opts.destination.write === 'function') {
301636
+ destination = opts.destination;
301637
+ } else {
301638
+ destination = buildSafeSonicBoom({
301639
+ dest: opts.destination || 1,
301640
+ append: opts.append,
301641
+ mkdir: opts.mkdir,
301642
+ sync: opts.sync // by default sonic will be async
301643
+ });
301644
+ }
301645
+
301646
+ source.on('unknown', function (line) {
301647
+ destination.write(line + '\n');
301648
+ });
301649
+
301650
+ pump(source, stream, destination);
301651
+ return stream
301652
+ }, {
301653
+ parse: 'lines',
301654
+ close (err, cb) {
301655
+ destination.on('close', () => {
301656
+ cb(err);
301657
+ });
301658
+ }
301659
+ })
301660
+ }
301661
+
301662
+ pinoPretty.exports = build;
301663
+ pinoPretty.exports.build = build;
301664
+ pinoPretty.exports.PinoPretty = build;
301665
+ pinoPretty.exports.prettyFactory = prettyFactory;
301666
+ pinoPretty.exports.colorizerFactory = colors;
301667
+ pinoPretty.exports.isColorSupported = isColorSupported;
301668
+ pinoPretty.exports.default = build;
301669
+ return pinoPretty.exports;
301670
+ }
301671
+
298076
301672
  var tools;
298077
301673
  var hasRequiredTools;
298078
301674
 
@@ -298296,7 +301892,7 @@ function requireTools () {
298296
301892
  return prettifierMetaWrapper(prettifier(opts), dest, opts)
298297
301893
  }
298298
301894
  try {
298299
- const prettyFactory = require('pino-pretty').prettyFactory;
301895
+ const prettyFactory = requirePinoPretty().prettyFactory;
298300
301896
  prettyFactory.asMetaWrapper = prettifierMetaWrapper;
298301
301897
  return prettifierMetaWrapper(prettyFactory(opts), dest, opts)
298302
301898
  } catch (e) {
@@ -299492,7 +303088,7 @@ function requireDefaults () {
299492
303088
  exports$1.INITIAL_PREKEY_COUNT = exports$1.MIN_PREKEY_COUNT = exports$1.MEDIA_KEYS = exports$1.MEDIA_HKDF_KEY_MAPPING = exports$1.MEDIA_PATH_MAP = exports$1.DEFAULT_CONNECTION_CONFIG = exports$1.PROCESSABLE_HISTORY_TYPES = exports$1.WA_CERT_DETAILS = exports$1.URL_EXCLUDE_REGEX = exports$1.URL_REGEX = exports$1.WA_ADV_HOSTED_DEVICE_SIG_PREFIX = exports$1.WA_ADV_HOSTED_ACCOUNT_SIG_PREFIX = exports$1.WA_ADV_DEVICE_SIG_PREFIX = exports$1.WA_ADV_ACCOUNT_SIG_PREFIX = exports$1.NOISE_WA_HEADER = exports$1.KEY_BUNDLE_TYPE = exports$1.DICT_VERSION = exports$1.NOISE_MODE = exports$1.DEFAULT_CACHE_TTLS = exports$1.WA_DEFAULT_EPHEMERAL = exports$1.PHONE_CONNECTION_CB = exports$1.DEF_TAG_PREFIX = exports$1.DEF_CALLBACK_PREFIX = exports$1.DEFAULT_ORIGIN = exports$1.UNAUTHORIZED_CODES = void 0;
299493
303089
  const node_cache_1 = __importDefault(requireNodeCache());
299494
303090
  const WAProto_1 = requireWAProto();
299495
- const Utils_1 = requireUtils();
303091
+ const Utils_1 = requireUtils$1();
299496
303092
  const logger_1 = __importDefault(requireLogger());
299497
303093
  const baileys_version_json_1 = require$$4;
299498
303094
  exports$1.UNAUTHORIZED_CODES = [401, 403, 419];
@@ -299608,7 +303204,7 @@ function requireBusiness$1 () {
299608
303204
  Object.defineProperty(exports$1, "__esModule", { value: true });
299609
303205
  exports$1.uploadingNecessaryImages = exports$1.uploadingNecessaryImagesOfProduct = exports$1.parseProductNode = exports$1.toProductNode = exports$1.parseOrderDetailsNode = exports$1.parseCollectionsNode = exports$1.parseCatalogNode = void 0;
299610
303206
  const boom_1 = requireLib$5();
299611
- const crypto_1 = require$$1$2;
303207
+ const crypto_1 = require$$1$1;
299612
303208
  const os_1 = require$$2$2;
299613
303209
  const path_1 = require$$1;
299614
303210
  const fs_1 = require$$0$7;
@@ -301882,7 +305478,7 @@ function requireSender () {
301882
305478
  hasRequiredSender = 1;
301883
305479
 
301884
305480
  const { Duplex } = require$$0$5;
301885
- const { randomFillSync } = require$$1$2;
305481
+ const { randomFillSync } = require$$1$1;
301886
305482
 
301887
305483
  const PerMessageDeflate = requirePermessageDeflate();
301888
305484
  const { EMPTY_BUFFER, kWebSocket, NOOP } = requireConstants();
@@ -303007,7 +306603,7 @@ function requireWebsocket () {
303007
306603
  const http = require$$4$1;
303008
306604
  const net = require$$3$2;
303009
306605
  const tls = require$$4$3;
303010
- const { randomBytes, createHash } = require$$1$2;
306606
+ const { randomBytes, createHash } = require$$1$1;
303011
306607
  const { Duplex, Readable } = require$$0$5;
303012
306608
  const { URL } = require$$7;
303013
306609
 
@@ -304641,7 +308237,7 @@ function requireWebsocketServer () {
304641
308237
  const EventEmitter = require$$0$9;
304642
308238
  const http = require$$4$1;
304643
308239
  const { Duplex } = require$$0$5;
304644
- const { createHash } = require$$1$2;
308240
+ const { createHash } = require$$1$1;
304645
308241
 
304646
308242
  const extension = requireExtension();
304647
308243
  const PerMessageDeflate = requirePermessageDeflate();
@@ -305224,10 +308820,10 @@ function requireSocket$1 () {
305224
308820
  const WAProto_1 = requireWAProto();
305225
308821
  const Defaults_1 = requireDefaults();
305226
308822
  const Types_1 = requireTypes$5();
305227
- const Utils_1 = requireUtils();
308823
+ const Utils_1 = requireUtils$1();
305228
308824
  const event_buffer_1 = requireEventBuffer();
305229
308825
  const WABinary_1 = requireWABinary();
305230
- const crypto_1 = require$$1$2;
308826
+ const crypto_1 = require$$1$1;
305231
308827
  /**
305232
308828
  * Connects to WA servers and performs:
305233
308829
  * - simple queries (no retry mechanism, wait for connection establishment)
@@ -305811,7 +309407,7 @@ function requireChats () {
305811
309407
  const WAProto_1 = requireWAProto();
305812
309408
  const Defaults_1 = requireDefaults();
305813
309409
  const Types_1 = requireTypes$5();
305814
- const Utils_1 = requireUtils();
309410
+ const Utils_1 = requireUtils$1();
305815
309411
  const make_mutex_1 = requireMakeMutex();
305816
309412
  const process_message_1 = __importDefault(requireProcessMessage());
305817
309413
  const WABinary_1 = requireWABinary();
@@ -306568,7 +310164,7 @@ function requireGroups () {
306568
310164
  exports$1.extractGroupMetadata = exports$1.makeGroupsSocket = void 0;
306569
310165
  const WAProto_1 = requireWAProto();
306570
310166
  const Types_1 = requireTypes$5();
306571
- const Utils_1 = requireUtils();
310167
+ const Utils_1 = requireUtils$1();
306572
310168
  const WABinary_1 = requireWABinary();
306573
310169
  const chats_1 = requireChats();
306574
310170
  const makeGroupsSocket = (config) => {
@@ -306860,7 +310456,7 @@ function requireMessagesSend () {
306860
310456
  const node_cache_1 = __importDefault(requireNodeCache());
306861
310457
  const WAProto_1 = requireWAProto();
306862
310458
  const Defaults_1 = requireDefaults();
306863
- const Utils_1 = requireUtils();
310459
+ const Utils_1 = requireUtils$1();
306864
310460
  const link_preview_1 = requireLinkPreview();
306865
310461
  const WABinary_1 = requireWABinary();
306866
310462
  const groups_1 = requireGroups();
@@ -307541,13 +311137,13 @@ function requireMessagesRecv () {
307541
311137
  const WAProto_1 = requireWAProto();
307542
311138
  const Defaults_1 = requireDefaults();
307543
311139
  const Types_1 = requireTypes$5();
307544
- const Utils_1 = requireUtils();
311140
+ const Utils_1 = requireUtils$1();
307545
311141
  const make_mutex_1 = requireMakeMutex();
307546
311142
  const process_message_1 = requireProcessMessage();
307547
311143
  const WABinary_1 = requireWABinary();
307548
311144
  const groups_1 = requireGroups();
307549
311145
  const messages_send_1 = requireMessagesSend();
307550
- const crypto_1 = require$$1$2;
311146
+ const crypto_1 = require$$1$1;
307551
311147
  const makeMessagesRecvSocket = (config) => {
307552
311148
  const { logger, retryRequestDelayMs, getMessage, sentMessagesCache, shouldIgnoreJid } = config;
307553
311149
  const sock = (0, messages_send_1.makeMessagesSocket)(config);
@@ -308662,7 +312258,7 @@ function requireMakeInMemoryStore () {
308662
312258
  exports$1.waMessageID = exports$1.waChatKey = void 0;
308663
312259
  const WAProto_1 = requireWAProto();
308664
312260
  const Defaults_1 = requireDefaults();
308665
- const Utils_1 = requireUtils();
312261
+ const Utils_1 = requireUtils$1();
308666
312262
  const WABinary_1 = requireWABinary();
308667
312263
  const make_ordered_dictionary_1 = __importDefault(requireMakeOrderedDictionary());
308668
312264
  const waChatKey = (pin) => ({
@@ -309026,7 +312622,7 @@ function requireLib () {
309026
312622
  Object.defineProperty(exports$1, "__esModule", { value: true });
309027
312623
  const Socket_1 = __importDefault(requireSocket());
309028
312624
  __exportStar(requireWAProto(), exports$1);
309029
- __exportStar(requireUtils(), exports$1);
312625
+ __exportStar(requireUtils$1(), exports$1);
309030
312626
  __exportStar(requireTypes$5(), exports$1);
309031
312627
  __exportStar(requireStore(), exports$1);
309032
312628
  __exportStar(requireDefaults(), exports$1);