genlayer 0.0.23 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ const _importMetaUrl=require('url').pathToFileURL(__filename)
2
3
  "use strict";
3
4
  var __create = Object.create;
4
5
  var __defProp = Object.defineProperty;
@@ -1050,10 +1051,10 @@ var require_command = __commonJS({
1050
1051
  "node_modules/commander/lib/command.js"(exports2) {
1051
1052
  "use strict";
1052
1053
  var EventEmitter = require("events").EventEmitter;
1053
- var childProcess = require("child_process");
1054
- var path2 = require("path");
1055
- var fs3 = require("fs");
1056
- var process4 = require("process");
1054
+ var childProcess2 = require("child_process");
1055
+ var path3 = require("path");
1056
+ var fs7 = require("fs");
1057
+ var process9 = require("process");
1057
1058
  var { Argument: Argument2, humanReadableArgName } = require_argument();
1058
1059
  var { CommanderError: CommanderError2 } = require_error();
1059
1060
  var { Help: Help2 } = require_help();
@@ -1099,10 +1100,10 @@ var require_command = __commonJS({
1099
1100
  this._showHelpAfterError = false;
1100
1101
  this._showSuggestionAfterError = true;
1101
1102
  this._outputConfiguration = {
1102
- writeOut: (str) => process4.stdout.write(str),
1103
- writeErr: (str) => process4.stderr.write(str),
1104
- getOutHelpWidth: () => process4.stdout.isTTY ? process4.stdout.columns : void 0,
1105
- getErrHelpWidth: () => process4.stderr.isTTY ? process4.stderr.columns : void 0,
1103
+ writeOut: (str) => process9.stdout.write(str),
1104
+ writeErr: (str) => process9.stderr.write(str),
1105
+ getOutHelpWidth: () => process9.stdout.isTTY ? process9.stdout.columns : void 0,
1106
+ getErrHelpWidth: () => process9.stderr.isTTY ? process9.stderr.columns : void 0,
1106
1107
  outputError: (str, write) => write(str)
1107
1108
  };
1108
1109
  this._hidden = false;
@@ -1487,7 +1488,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1487
1488
  if (this._exitCallback) {
1488
1489
  this._exitCallback(new CommanderError2(exitCode, code, message));
1489
1490
  }
1490
- process4.exit(exitCode);
1491
+ process9.exit(exitCode);
1491
1492
  }
1492
1493
  /**
1493
1494
  * Register callback `fn` for the command.
@@ -1862,8 +1863,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
1862
1863
  }
1863
1864
  parseOptions = parseOptions || {};
1864
1865
  if (argv === void 0) {
1865
- argv = process4.argv;
1866
- if (process4.versions && process4.versions.electron) {
1866
+ argv = process9.argv;
1867
+ if (process9.versions && process9.versions.electron) {
1867
1868
  parseOptions.from = "electron";
1868
1869
  }
1869
1870
  }
@@ -1876,7 +1877,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1876
1877
  userArgs = argv.slice(2);
1877
1878
  break;
1878
1879
  case "electron":
1879
- if (process4.defaultApp) {
1880
+ if (process9.defaultApp) {
1880
1881
  this._scriptPath = argv[1];
1881
1882
  userArgs = argv.slice(2);
1882
1883
  } else {
@@ -1950,12 +1951,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
1950
1951
  let launchWithNode = false;
1951
1952
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1952
1953
  function findFile(baseDir, baseName) {
1953
- const localBin = path2.resolve(baseDir, baseName);
1954
- if (fs3.existsSync(localBin))
1954
+ const localBin = path3.resolve(baseDir, baseName);
1955
+ if (fs7.existsSync(localBin))
1955
1956
  return localBin;
1956
- if (sourceExt.includes(path2.extname(baseName)))
1957
+ if (sourceExt.includes(path3.extname(baseName)))
1957
1958
  return void 0;
1958
- const foundExt = sourceExt.find((ext) => fs3.existsSync(`${localBin}${ext}`));
1959
+ const foundExt = sourceExt.find((ext) => fs7.existsSync(`${localBin}${ext}`));
1959
1960
  if (foundExt)
1960
1961
  return `${localBin}${foundExt}`;
1961
1962
  return void 0;
@@ -1967,41 +1968,41 @@ Expecting one of '${allowedValues.join("', '")}'`);
1967
1968
  if (this._scriptPath) {
1968
1969
  let resolvedScriptPath;
1969
1970
  try {
1970
- resolvedScriptPath = fs3.realpathSync(this._scriptPath);
1971
+ resolvedScriptPath = fs7.realpathSync(this._scriptPath);
1971
1972
  } catch (err) {
1972
1973
  resolvedScriptPath = this._scriptPath;
1973
1974
  }
1974
- executableDir = path2.resolve(path2.dirname(resolvedScriptPath), executableDir);
1975
+ executableDir = path3.resolve(path3.dirname(resolvedScriptPath), executableDir);
1975
1976
  }
1976
1977
  if (executableDir) {
1977
1978
  let localFile = findFile(executableDir, executableFile);
1978
1979
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
1979
- const legacyName = path2.basename(this._scriptPath, path2.extname(this._scriptPath));
1980
+ const legacyName = path3.basename(this._scriptPath, path3.extname(this._scriptPath));
1980
1981
  if (legacyName !== this._name) {
1981
1982
  localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
1982
1983
  }
1983
1984
  }
1984
1985
  executableFile = localFile || executableFile;
1985
1986
  }
1986
- launchWithNode = sourceExt.includes(path2.extname(executableFile));
1987
+ launchWithNode = sourceExt.includes(path3.extname(executableFile));
1987
1988
  let proc;
1988
- if (process4.platform !== "win32") {
1989
+ if (process9.platform !== "win32") {
1989
1990
  if (launchWithNode) {
1990
1991
  args.unshift(executableFile);
1991
- args = incrementNodeInspectorPort(process4.execArgv).concat(args);
1992
- proc = childProcess.spawn(process4.argv[0], args, { stdio: "inherit" });
1992
+ args = incrementNodeInspectorPort(process9.execArgv).concat(args);
1993
+ proc = childProcess2.spawn(process9.argv[0], args, { stdio: "inherit" });
1993
1994
  } else {
1994
- proc = childProcess.spawn(executableFile, args, { stdio: "inherit" });
1995
+ proc = childProcess2.spawn(executableFile, args, { stdio: "inherit" });
1995
1996
  }
1996
1997
  } else {
1997
1998
  args.unshift(executableFile);
1998
- args = incrementNodeInspectorPort(process4.execArgv).concat(args);
1999
- proc = childProcess.spawn(process4.execPath, args, { stdio: "inherit" });
1999
+ args = incrementNodeInspectorPort(process9.execArgv).concat(args);
2000
+ proc = childProcess2.spawn(process9.execPath, args, { stdio: "inherit" });
2000
2001
  }
2001
2002
  if (!proc.killed) {
2002
2003
  const signals = ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"];
2003
2004
  signals.forEach((signal) => {
2004
- process4.on(signal, () => {
2005
+ process9.on(signal, () => {
2005
2006
  if (proc.killed === false && proc.exitCode === null) {
2006
2007
  proc.kill(signal);
2007
2008
  }
@@ -2012,7 +2013,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2012
2013
  proc.on("close", (code, _signal) => {
2013
2014
  code = code != null ? code : 1;
2014
2015
  if (!exitCallback) {
2015
- process4.exit(code);
2016
+ process9.exit(code);
2016
2017
  } else {
2017
2018
  exitCallback(new CommanderError2(code, "commander.executeSubCommandAsync", "(close)"));
2018
2019
  }
@@ -2029,7 +2030,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2029
2030
  throw new Error(`'${executableFile}' not executable`);
2030
2031
  }
2031
2032
  if (!exitCallback) {
2032
- process4.exit(1);
2033
+ process9.exit(1);
2033
2034
  } else {
2034
2035
  const wrappedError = new CommanderError2(1, "commander.executeSubCommandAsync", "(error)");
2035
2036
  wrappedError.nestedError = err;
@@ -2504,11 +2505,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
2504
2505
  */
2505
2506
  _parseOptionsEnv() {
2506
2507
  this.options.forEach((option) => {
2507
- if (option.envVar && option.envVar in process4.env) {
2508
+ if (option.envVar && option.envVar in process9.env) {
2508
2509
  const optionKey = option.attributeName();
2509
2510
  if (this.getOptionValue(optionKey) === void 0 || ["default", "config", "env"].includes(this.getOptionValueSource(optionKey))) {
2510
2511
  if (option.required || option.optional) {
2511
- this.emit(`optionEnv:${option.name()}`, process4.env[option.envVar]);
2512
+ this.emit(`optionEnv:${option.name()}`, process9.env[option.envVar]);
2512
2513
  } else {
2513
2514
  this.emit(`optionEnv:${option.name()}`);
2514
2515
  }
@@ -2793,7 +2794,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2793
2794
  * @return {Command}
2794
2795
  */
2795
2796
  nameFromFilename(filename) {
2796
- this._name = path2.basename(filename, path2.extname(filename));
2797
+ this._name = path3.basename(filename, path3.extname(filename));
2797
2798
  return this;
2798
2799
  }
2799
2800
  /**
@@ -2807,10 +2808,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
2807
2808
  * @param {string} [path]
2808
2809
  * @return {(string|null|Command)}
2809
2810
  */
2810
- executableDir(path3) {
2811
- if (path3 === void 0)
2811
+ executableDir(path4) {
2812
+ if (path4 === void 0)
2812
2813
  return this._executableDir;
2813
- this._executableDir = path3;
2814
+ this._executableDir = path4;
2814
2815
  return this;
2815
2816
  }
2816
2817
  /**
@@ -2933,7 +2934,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2933
2934
  */
2934
2935
  help(contextOptions) {
2935
2936
  this.outputHelp(contextOptions);
2936
- let exitCode = process4.exitCode || 0;
2937
+ let exitCode = process9.exitCode || 0;
2937
2938
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) {
2938
2939
  exitCode = 1;
2939
2940
  }
@@ -3136,11 +3137,11 @@ var require_signals = __commonJS({
3136
3137
  var require_signal_exit = __commonJS({
3137
3138
  "node_modules/signal-exit/index.js"(exports2, module2) {
3138
3139
  "use strict";
3139
- var process4 = global.process;
3140
- var processOk = function(process5) {
3141
- return process5 && typeof process5 === "object" && typeof process5.removeListener === "function" && typeof process5.emit === "function" && typeof process5.reallyExit === "function" && typeof process5.listeners === "function" && typeof process5.kill === "function" && typeof process5.pid === "number" && typeof process5.on === "function";
3140
+ var process9 = global.process;
3141
+ var processOk = function(process10) {
3142
+ return process10 && typeof process10 === "object" && typeof process10.removeListener === "function" && typeof process10.emit === "function" && typeof process10.reallyExit === "function" && typeof process10.listeners === "function" && typeof process10.kill === "function" && typeof process10.pid === "number" && typeof process10.on === "function";
3142
3143
  };
3143
- if (!processOk(process4)) {
3144
+ if (!processOk(process9)) {
3144
3145
  module2.exports = function() {
3145
3146
  return function() {
3146
3147
  };
@@ -3148,15 +3149,15 @@ var require_signal_exit = __commonJS({
3148
3149
  } else {
3149
3150
  assert2 = require("assert");
3150
3151
  signals = require_signals();
3151
- isWin = /^win/i.test(process4.platform);
3152
+ isWin = /^win/i.test(process9.platform);
3152
3153
  EE = require("events");
3153
3154
  if (typeof EE !== "function") {
3154
3155
  EE = EE.EventEmitter;
3155
3156
  }
3156
- if (process4.__signal_exit_emitter__) {
3157
- emitter = process4.__signal_exit_emitter__;
3157
+ if (process9.__signal_exit_emitter__) {
3158
+ emitter = process9.__signal_exit_emitter__;
3158
3159
  } else {
3159
- emitter = process4.__signal_exit_emitter__ = new EE();
3160
+ emitter = process9.__signal_exit_emitter__ = new EE();
3160
3161
  emitter.count = 0;
3161
3162
  emitter.emitted = {};
3162
3163
  }
@@ -3193,12 +3194,12 @@ var require_signal_exit = __commonJS({
3193
3194
  loaded = false;
3194
3195
  signals.forEach(function(sig) {
3195
3196
  try {
3196
- process4.removeListener(sig, sigListeners[sig]);
3197
+ process9.removeListener(sig, sigListeners[sig]);
3197
3198
  } catch (er) {
3198
3199
  }
3199
3200
  });
3200
- process4.emit = originalProcessEmit;
3201
- process4.reallyExit = originalProcessReallyExit;
3201
+ process9.emit = originalProcessEmit;
3202
+ process9.reallyExit = originalProcessReallyExit;
3202
3203
  emitter.count -= 1;
3203
3204
  };
3204
3205
  module2.exports.unload = unload;
@@ -3215,7 +3216,7 @@ var require_signal_exit = __commonJS({
3215
3216
  if (!processOk(global.process)) {
3216
3217
  return;
3217
3218
  }
3218
- var listeners = process4.listeners(sig);
3219
+ var listeners = process9.listeners(sig);
3219
3220
  if (listeners.length === emitter.count) {
3220
3221
  unload();
3221
3222
  emit("exit", null, sig);
@@ -3223,7 +3224,7 @@ var require_signal_exit = __commonJS({
3223
3224
  if (isWin && sig === "SIGHUP") {
3224
3225
  sig = "SIGINT";
3225
3226
  }
3226
- process4.kill(process4.pid, sig);
3227
+ process9.kill(process9.pid, sig);
3227
3228
  }
3228
3229
  };
3229
3230
  });
@@ -3239,36 +3240,36 @@ var require_signal_exit = __commonJS({
3239
3240
  emitter.count += 1;
3240
3241
  signals = signals.filter(function(sig) {
3241
3242
  try {
3242
- process4.on(sig, sigListeners[sig]);
3243
+ process9.on(sig, sigListeners[sig]);
3243
3244
  return true;
3244
3245
  } catch (er) {
3245
3246
  return false;
3246
3247
  }
3247
3248
  });
3248
- process4.emit = processEmit;
3249
- process4.reallyExit = processReallyExit;
3249
+ process9.emit = processEmit;
3250
+ process9.reallyExit = processReallyExit;
3250
3251
  };
3251
3252
  module2.exports.load = load;
3252
- originalProcessReallyExit = process4.reallyExit;
3253
+ originalProcessReallyExit = process9.reallyExit;
3253
3254
  processReallyExit = function processReallyExit2(code) {
3254
3255
  if (!processOk(global.process)) {
3255
3256
  return;
3256
3257
  }
3257
- process4.exitCode = code || /* istanbul ignore next */
3258
+ process9.exitCode = code || /* istanbul ignore next */
3258
3259
  0;
3259
- emit("exit", process4.exitCode, null);
3260
- emit("afterexit", process4.exitCode, null);
3261
- originalProcessReallyExit.call(process4, process4.exitCode);
3260
+ emit("exit", process9.exitCode, null);
3261
+ emit("afterexit", process9.exitCode, null);
3262
+ originalProcessReallyExit.call(process9, process9.exitCode);
3262
3263
  };
3263
- originalProcessEmit = process4.emit;
3264
+ originalProcessEmit = process9.emit;
3264
3265
  processEmit = function processEmit2(ev, arg) {
3265
3266
  if (ev === "exit" && processOk(global.process)) {
3266
3267
  if (arg !== void 0) {
3267
- process4.exitCode = arg;
3268
+ process9.exitCode = arg;
3268
3269
  }
3269
3270
  var ret = originalProcessEmit.apply(this, arguments);
3270
- emit("exit", process4.exitCode, null);
3271
- emit("afterexit", process4.exitCode, null);
3271
+ emit("exit", process9.exitCode, null);
3272
+ emit("afterexit", process9.exitCode, null);
3272
3273
  return ret;
3273
3274
  } else {
3274
3275
  return originalProcessEmit.apply(this, arguments);
@@ -6599,7 +6600,7 @@ var require_innerFrom = __commonJS({
6599
6600
  exports2.fromIterable = fromIterable;
6600
6601
  function fromAsyncIterable(asyncIterable) {
6601
6602
  return new Observable_1.Observable(function(subscriber) {
6602
- process4(asyncIterable, subscriber).catch(function(err) {
6603
+ process9(asyncIterable, subscriber).catch(function(err) {
6603
6604
  return subscriber.error(err);
6604
6605
  });
6605
6606
  });
@@ -6609,7 +6610,7 @@ var require_innerFrom = __commonJS({
6609
6610
  return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream));
6610
6611
  }
6611
6612
  exports2.fromReadableStreamLike = fromReadableStreamLike;
6612
- function process4(asyncIterable, subscriber) {
6613
+ function process9(asyncIterable, subscriber) {
6613
6614
  var asyncIterable_1, asyncIterable_1_1;
6614
6615
  var e_2, _a4;
6615
6616
  return __awaiter(this, void 0, void 0, function() {
@@ -13590,8 +13591,8 @@ var require_isBuffer = __commonJS({
13590
13591
  var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2;
13591
13592
  var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
13592
13593
  var moduleExports = freeModule && freeModule.exports === freeExports;
13593
- var Buffer4 = moduleExports ? root.Buffer : void 0;
13594
- var nativeIsBuffer = Buffer4 ? Buffer4.isBuffer : void 0;
13594
+ var Buffer5 = moduleExports ? root.Buffer : void 0;
13595
+ var nativeIsBuffer = Buffer5 ? Buffer5.isBuffer : void 0;
13595
13596
  var isBuffer = nativeIsBuffer || stubFalse;
13596
13597
  module2.exports = isBuffer;
13597
13598
  }
@@ -14471,8 +14472,8 @@ var require_cloneBuffer = __commonJS({
14471
14472
  var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2;
14472
14473
  var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
14473
14474
  var moduleExports = freeModule && freeModule.exports === freeExports;
14474
- var Buffer4 = moduleExports ? root.Buffer : void 0;
14475
- var allocUnsafe = Buffer4 ? Buffer4.allocUnsafe : void 0;
14475
+ var Buffer5 = moduleExports ? root.Buffer : void 0;
14476
+ var allocUnsafe = Buffer5 ? Buffer5.allocUnsafe : void 0;
14476
14477
  function cloneBuffer(buffer, isDeep) {
14477
14478
  if (isDeep) {
14478
14479
  return buffer.slice();
@@ -15913,11 +15914,11 @@ var require_baseGet = __commonJS({
15913
15914
  "use strict";
15914
15915
  var castPath = require_castPath();
15915
15916
  var toKey = require_toKey();
15916
- function baseGet(object, path2) {
15917
- path2 = castPath(path2, object);
15918
- var index = 0, length = path2.length;
15917
+ function baseGet(object, path3) {
15918
+ path3 = castPath(path3, object);
15919
+ var index = 0, length = path3.length;
15919
15920
  while (object != null && index < length) {
15920
- object = object[toKey(path2[index++])];
15921
+ object = object[toKey(path3[index++])];
15921
15922
  }
15922
15923
  return index && index == length ? object : void 0;
15923
15924
  }
@@ -15930,8 +15931,8 @@ var require_get = __commonJS({
15930
15931
  "node_modules/lodash/get.js"(exports2, module2) {
15931
15932
  "use strict";
15932
15933
  var baseGet = require_baseGet();
15933
- function get2(object, path2, defaultValue) {
15934
- var result = object == null ? void 0 : baseGet(object, path2);
15934
+ function get2(object, path3, defaultValue) {
15935
+ var result = object == null ? void 0 : baseGet(object, path3);
15935
15936
  return result === void 0 ? defaultValue : result;
15936
15937
  }
15937
15938
  module2.exports = get2;
@@ -15959,11 +15960,11 @@ var require_hasPath = __commonJS({
15959
15960
  var isIndex = require_isIndex();
15960
15961
  var isLength = require_isLength();
15961
15962
  var toKey = require_toKey();
15962
- function hasPath(object, path2, hasFunc) {
15963
- path2 = castPath(path2, object);
15964
- var index = -1, length = path2.length, result = false;
15963
+ function hasPath(object, path3, hasFunc) {
15964
+ path3 = castPath(path3, object);
15965
+ var index = -1, length = path3.length, result = false;
15965
15966
  while (++index < length) {
15966
- var key = toKey(path2[index]);
15967
+ var key = toKey(path3[index]);
15967
15968
  if (!(result = object != null && hasFunc(object, key))) {
15968
15969
  break;
15969
15970
  }
@@ -15985,8 +15986,8 @@ var require_hasIn = __commonJS({
15985
15986
  "use strict";
15986
15987
  var baseHasIn = require_baseHasIn();
15987
15988
  var hasPath = require_hasPath();
15988
- function hasIn(object, path2) {
15989
- return object != null && hasPath(object, path2, baseHasIn);
15989
+ function hasIn(object, path3) {
15990
+ return object != null && hasPath(object, path3, baseHasIn);
15990
15991
  }
15991
15992
  module2.exports = hasIn;
15992
15993
  }
@@ -16005,13 +16006,13 @@ var require_baseMatchesProperty = __commonJS({
16005
16006
  var toKey = require_toKey();
16006
16007
  var COMPARE_PARTIAL_FLAG = 1;
16007
16008
  var COMPARE_UNORDERED_FLAG = 2;
16008
- function baseMatchesProperty(path2, srcValue) {
16009
- if (isKey(path2) && isStrictComparable(srcValue)) {
16010
- return matchesStrictComparable(toKey(path2), srcValue);
16009
+ function baseMatchesProperty(path3, srcValue) {
16010
+ if (isKey(path3) && isStrictComparable(srcValue)) {
16011
+ return matchesStrictComparable(toKey(path3), srcValue);
16011
16012
  }
16012
16013
  return function(object) {
16013
- var objValue = get2(object, path2);
16014
- return objValue === void 0 && objValue === srcValue ? hasIn(object, path2) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
16014
+ var objValue = get2(object, path3);
16015
+ return objValue === void 0 && objValue === srcValue ? hasIn(object, path3) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
16015
16016
  };
16016
16017
  }
16017
16018
  module2.exports = baseMatchesProperty;
@@ -16036,9 +16037,9 @@ var require_basePropertyDeep = __commonJS({
16036
16037
  "node_modules/lodash/_basePropertyDeep.js"(exports2, module2) {
16037
16038
  "use strict";
16038
16039
  var baseGet = require_baseGet();
16039
- function basePropertyDeep(path2) {
16040
+ function basePropertyDeep(path3) {
16040
16041
  return function(object) {
16041
- return baseGet(object, path2);
16042
+ return baseGet(object, path3);
16042
16043
  };
16043
16044
  }
16044
16045
  module2.exports = basePropertyDeep;
@@ -16053,8 +16054,8 @@ var require_property = __commonJS({
16053
16054
  var basePropertyDeep = require_basePropertyDeep();
16054
16055
  var isKey = require_isKey();
16055
16056
  var toKey = require_toKey();
16056
- function property(path2) {
16057
- return isKey(path2) ? baseProperty(toKey(path2)) : basePropertyDeep(path2);
16057
+ function property(path3) {
16058
+ return isKey(path3) ? baseProperty(toKey(path3)) : basePropertyDeep(path3);
16058
16059
  }
16059
16060
  module2.exports = property;
16060
16061
  }
@@ -17152,15 +17153,15 @@ var require_route = __commonJS({
17152
17153
  };
17153
17154
  }
17154
17155
  function wrapConversion(toModel, graph) {
17155
- const path2 = [graph[toModel].parent, toModel];
17156
+ const path3 = [graph[toModel].parent, toModel];
17156
17157
  let fn = conversions[graph[toModel].parent][toModel];
17157
17158
  let cur = graph[toModel].parent;
17158
17159
  while (graph[cur].parent) {
17159
- path2.unshift(graph[cur].parent);
17160
+ path3.unshift(graph[cur].parent);
17160
17161
  fn = link(conversions[graph[cur].parent][cur], fn);
17161
17162
  cur = graph[cur].parent;
17162
17163
  }
17163
- fn.conversion = path2;
17164
+ fn.conversion = path3;
17164
17165
  return fn;
17165
17166
  }
17166
17167
  module2.exports = function(fromModel) {
@@ -17534,7 +17535,7 @@ var require_has_flag = __commonJS({
17534
17535
  var require_supports_color = __commonJS({
17535
17536
  "node_modules/supports-color/index.js"(exports2, module2) {
17536
17537
  "use strict";
17537
- var os3 = require("os");
17538
+ var os4 = require("os");
17538
17539
  var tty2 = require("tty");
17539
17540
  var hasFlag2 = require_has_flag();
17540
17541
  var { env: env2 } = process;
@@ -17582,7 +17583,7 @@ var require_supports_color = __commonJS({
17582
17583
  return min;
17583
17584
  }
17584
17585
  if (process.platform === "win32") {
17585
- const osRelease = os3.release().split(".");
17586
+ const osRelease = os4.release().split(".");
17586
17587
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
17587
17588
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
17588
17589
  }
@@ -17882,18 +17883,18 @@ var require_source = __commonJS({
17882
17883
  }
17883
17884
  }
17884
17885
  }));
17885
- var createStyler2 = (open, close, parent) => {
17886
+ var createStyler2 = (open2, close, parent) => {
17886
17887
  let openAll;
17887
17888
  let closeAll;
17888
17889
  if (parent === void 0) {
17889
- openAll = open;
17890
+ openAll = open2;
17890
17891
  closeAll = close;
17891
17892
  } else {
17892
- openAll = parent.openAll + open;
17893
+ openAll = parent.openAll + open2;
17893
17894
  closeAll = close + parent.closeAll;
17894
17895
  }
17895
17896
  return {
17896
- open,
17897
+ open: open2,
17897
17898
  close,
17898
17899
  openAll,
17899
17900
  closeAll,
@@ -20098,12 +20099,12 @@ var require_buffer_list = __commonJS({
20098
20099
  return (hint === "string" ? String : Number)(input);
20099
20100
  }
20100
20101
  var _require = require("buffer");
20101
- var Buffer4 = _require.Buffer;
20102
+ var Buffer5 = _require.Buffer;
20102
20103
  var _require2 = require("util");
20103
20104
  var inspect = _require2.inspect;
20104
20105
  var custom = inspect && inspect.custom || "inspect";
20105
20106
  function copyBuffer(src, target, offset) {
20106
- Buffer4.prototype.copy.call(src, target, offset);
20107
+ Buffer5.prototype.copy.call(src, target, offset);
20107
20108
  }
20108
20109
  module2.exports = /* @__PURE__ */ function() {
20109
20110
  function BufferList() {
@@ -20172,8 +20173,8 @@ var require_buffer_list = __commonJS({
20172
20173
  key: "concat",
20173
20174
  value: function concat(n) {
20174
20175
  if (this.length === 0)
20175
- return Buffer4.alloc(0);
20176
- var ret = Buffer4.allocUnsafe(n >>> 0);
20176
+ return Buffer5.alloc(0);
20177
+ var ret = Buffer5.allocUnsafe(n >>> 0);
20177
20178
  var p = this.head;
20178
20179
  var i2 = 0;
20179
20180
  while (p) {
@@ -20241,7 +20242,7 @@ var require_buffer_list = __commonJS({
20241
20242
  }, {
20242
20243
  key: "_getBuffer",
20243
20244
  value: function _getBuffer(n) {
20244
- var ret = Buffer4.allocUnsafe(n);
20245
+ var ret = Buffer5.allocUnsafe(n);
20245
20246
  var p = this.head;
20246
20247
  var c = 1;
20247
20248
  p.data.copy(ret);
@@ -20580,14 +20581,14 @@ var require_stream_writable = __commonJS({
20580
20581
  deprecate: require_node()
20581
20582
  };
20582
20583
  var Stream3 = require_stream();
20583
- var Buffer4 = require("buffer").Buffer;
20584
+ var Buffer5 = require("buffer").Buffer;
20584
20585
  var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
20585
20586
  };
20586
20587
  function _uint8ArrayToBuffer(chunk) {
20587
- return Buffer4.from(chunk);
20588
+ return Buffer5.from(chunk);
20588
20589
  }
20589
20590
  function _isUint8Array(obj) {
20590
- return Buffer4.isBuffer(obj) || obj instanceof OurUint8Array;
20591
+ return Buffer5.isBuffer(obj) || obj instanceof OurUint8Array;
20591
20592
  }
20592
20593
  var destroyImpl = require_destroy();
20593
20594
  var _require = require_state();
@@ -20724,7 +20725,7 @@ var require_stream_writable = __commonJS({
20724
20725
  var state = this._writableState;
20725
20726
  var ret = false;
20726
20727
  var isBuf = !state.objectMode && _isUint8Array(chunk);
20727
- if (isBuf && !Buffer4.isBuffer(chunk)) {
20728
+ if (isBuf && !Buffer5.isBuffer(chunk)) {
20728
20729
  chunk = _uint8ArrayToBuffer(chunk);
20729
20730
  }
20730
20731
  if (typeof encoding === "function") {
@@ -20775,7 +20776,7 @@ var require_stream_writable = __commonJS({
20775
20776
  });
20776
20777
  function decodeChunk(state, chunk, encoding) {
20777
20778
  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") {
20778
- chunk = Buffer4.from(chunk, encoding);
20779
+ chunk = Buffer5.from(chunk, encoding);
20779
20780
  }
20780
20781
  return chunk;
20781
20782
  }
@@ -21165,34 +21166,34 @@ var require_safe_buffer = __commonJS({
21165
21166
  "node_modules/safe-buffer/index.js"(exports2, module2) {
21166
21167
  "use strict";
21167
21168
  var buffer = require("buffer");
21168
- var Buffer4 = buffer.Buffer;
21169
+ var Buffer5 = buffer.Buffer;
21169
21170
  function copyProps(src, dst) {
21170
21171
  for (var key in src) {
21171
21172
  dst[key] = src[key];
21172
21173
  }
21173
21174
  }
21174
- if (Buffer4.from && Buffer4.alloc && Buffer4.allocUnsafe && Buffer4.allocUnsafeSlow) {
21175
+ if (Buffer5.from && Buffer5.alloc && Buffer5.allocUnsafe && Buffer5.allocUnsafeSlow) {
21175
21176
  module2.exports = buffer;
21176
21177
  } else {
21177
21178
  copyProps(buffer, exports2);
21178
21179
  exports2.Buffer = SafeBuffer;
21179
21180
  }
21180
21181
  function SafeBuffer(arg, encodingOrOffset, length) {
21181
- return Buffer4(arg, encodingOrOffset, length);
21182
+ return Buffer5(arg, encodingOrOffset, length);
21182
21183
  }
21183
- SafeBuffer.prototype = Object.create(Buffer4.prototype);
21184
- copyProps(Buffer4, SafeBuffer);
21184
+ SafeBuffer.prototype = Object.create(Buffer5.prototype);
21185
+ copyProps(Buffer5, SafeBuffer);
21185
21186
  SafeBuffer.from = function(arg, encodingOrOffset, length) {
21186
21187
  if (typeof arg === "number") {
21187
21188
  throw new TypeError("Argument must not be a number");
21188
21189
  }
21189
- return Buffer4(arg, encodingOrOffset, length);
21190
+ return Buffer5(arg, encodingOrOffset, length);
21190
21191
  };
21191
21192
  SafeBuffer.alloc = function(size, fill, encoding) {
21192
21193
  if (typeof size !== "number") {
21193
21194
  throw new TypeError("Argument must be a number");
21194
21195
  }
21195
- var buf = Buffer4(size);
21196
+ var buf = Buffer5(size);
21196
21197
  if (fill !== void 0) {
21197
21198
  if (typeof encoding === "string") {
21198
21199
  buf.fill(fill, encoding);
@@ -21208,7 +21209,7 @@ var require_safe_buffer = __commonJS({
21208
21209
  if (typeof size !== "number") {
21209
21210
  throw new TypeError("Argument must be a number");
21210
21211
  }
21211
- return Buffer4(size);
21212
+ return Buffer5(size);
21212
21213
  };
21213
21214
  SafeBuffer.allocUnsafeSlow = function(size) {
21214
21215
  if (typeof size !== "number") {
@@ -21223,8 +21224,8 @@ var require_safe_buffer = __commonJS({
21223
21224
  var require_string_decoder = __commonJS({
21224
21225
  "node_modules/string_decoder/lib/string_decoder.js"(exports2) {
21225
21226
  "use strict";
21226
- var Buffer4 = require_safe_buffer().Buffer;
21227
- var isEncoding = Buffer4.isEncoding || function(encoding) {
21227
+ var Buffer5 = require_safe_buffer().Buffer;
21228
+ var isEncoding = Buffer5.isEncoding || function(encoding) {
21228
21229
  encoding = "" + encoding;
21229
21230
  switch (encoding && encoding.toLowerCase()) {
21230
21231
  case "hex":
@@ -21274,7 +21275,7 @@ var require_string_decoder = __commonJS({
21274
21275
  }
21275
21276
  function normalizeEncoding(enc) {
21276
21277
  var nenc = _normalizeEncoding(enc);
21277
- if (typeof nenc !== "string" && (Buffer4.isEncoding === isEncoding || !isEncoding(enc)))
21278
+ if (typeof nenc !== "string" && (Buffer5.isEncoding === isEncoding || !isEncoding(enc)))
21278
21279
  throw new Error("Unknown encoding: " + enc);
21279
21280
  return nenc || enc;
21280
21281
  }
@@ -21304,7 +21305,7 @@ var require_string_decoder = __commonJS({
21304
21305
  }
21305
21306
  this.lastNeed = 0;
21306
21307
  this.lastTotal = 0;
21307
- this.lastChar = Buffer4.allocUnsafe(nb);
21308
+ this.lastChar = Buffer5.allocUnsafe(nb);
21308
21309
  }
21309
21310
  StringDecoder.prototype.write = function(buf) {
21310
21311
  if (buf.length === 0)
@@ -21903,14 +21904,14 @@ var require_stream_readable = __commonJS({
21903
21904
  return emitter.listeners(type).length;
21904
21905
  };
21905
21906
  var Stream3 = require_stream();
21906
- var Buffer4 = require("buffer").Buffer;
21907
+ var Buffer5 = require("buffer").Buffer;
21907
21908
  var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
21908
21909
  };
21909
21910
  function _uint8ArrayToBuffer(chunk) {
21910
- return Buffer4.from(chunk);
21911
+ return Buffer5.from(chunk);
21911
21912
  }
21912
21913
  function _isUint8Array(obj) {
21913
- return Buffer4.isBuffer(obj) || obj instanceof OurUint8Array;
21914
+ return Buffer5.isBuffer(obj) || obj instanceof OurUint8Array;
21914
21915
  }
21915
21916
  var debugUtil = require("util");
21916
21917
  var debug;
@@ -22028,7 +22029,7 @@ var require_stream_readable = __commonJS({
22028
22029
  if (typeof chunk === "string") {
22029
22030
  encoding = encoding || state.defaultEncoding;
22030
22031
  if (encoding !== state.encoding) {
22031
- chunk = Buffer4.from(chunk, encoding);
22032
+ chunk = Buffer5.from(chunk, encoding);
22032
22033
  encoding = "";
22033
22034
  }
22034
22035
  skipChunkCheck = true;
@@ -22054,7 +22055,7 @@ var require_stream_readable = __commonJS({
22054
22055
  if (er) {
22055
22056
  errorOrDestroy(stream, er);
22056
22057
  } else if (state.objectMode || chunk && chunk.length > 0) {
22057
- if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer4.prototype) {
22058
+ if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer5.prototype) {
22058
22059
  chunk = _uint8ArrayToBuffer(chunk);
22059
22060
  }
22060
22061
  if (addToFront) {
@@ -22939,7 +22940,7 @@ var require_readable = __commonJS({
22939
22940
  var require_BufferList = __commonJS({
22940
22941
  "node_modules/bl/BufferList.js"(exports2, module2) {
22941
22942
  "use strict";
22942
- var { Buffer: Buffer4 } = require("buffer");
22943
+ var { Buffer: Buffer5 } = require("buffer");
22943
22944
  var symbol = Symbol.for("BufferList");
22944
22945
  function BufferList(buf) {
22945
22946
  if (!(this instanceof BufferList)) {
@@ -23003,10 +23004,10 @@ var require_BufferList = __commonJS({
23003
23004
  srcEnd = this.length;
23004
23005
  }
23005
23006
  if (srcStart >= this.length) {
23006
- return dst || Buffer4.alloc(0);
23007
+ return dst || Buffer5.alloc(0);
23007
23008
  }
23008
23009
  if (srcEnd <= 0) {
23009
- return dst || Buffer4.alloc(0);
23010
+ return dst || Buffer5.alloc(0);
23010
23011
  }
23011
23012
  const copy2 = !!dst;
23012
23013
  const off = this._offset(srcStart);
@@ -23016,7 +23017,7 @@ var require_BufferList = __commonJS({
23016
23017
  let start = off[1];
23017
23018
  if (srcStart === 0 && srcEnd === this.length) {
23018
23019
  if (!copy2) {
23019
- return this._bufs.length === 1 ? this._bufs[0] : Buffer4.concat(this._bufs, this.length);
23020
+ return this._bufs.length === 1 ? this._bufs[0] : Buffer5.concat(this._bufs, this.length);
23020
23021
  }
23021
23022
  for (let i2 = 0; i2 < this._bufs.length; i2++) {
23022
23023
  this._bufs[i2].copy(dst, bufoff);
@@ -23028,7 +23029,7 @@ var require_BufferList = __commonJS({
23028
23029
  return copy2 ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) : this._bufs[off[0]].slice(start, start + bytes);
23029
23030
  }
23030
23031
  if (!copy2) {
23031
- dst = Buffer4.allocUnsafe(len);
23032
+ dst = Buffer5.allocUnsafe(len);
23032
23033
  }
23033
23034
  for (let i2 = off[0]; i2 < this._bufs.length; i2++) {
23034
23035
  const l = this._bufs[i2].length - start;
@@ -23106,7 +23107,7 @@ var require_BufferList = __commonJS({
23106
23107
  return this;
23107
23108
  }
23108
23109
  if (buf.buffer) {
23109
- this._appendBuffer(Buffer4.from(buf.buffer, buf.byteOffset, buf.byteLength));
23110
+ this._appendBuffer(Buffer5.from(buf.buffer, buf.byteOffset, buf.byteLength));
23110
23111
  } else if (Array.isArray(buf)) {
23111
23112
  for (let i2 = 0; i2 < buf.length; i2++) {
23112
23113
  this.append(buf[i2]);
@@ -23119,7 +23120,7 @@ var require_BufferList = __commonJS({
23119
23120
  if (typeof buf === "number") {
23120
23121
  buf = buf.toString();
23121
23122
  }
23122
- this._appendBuffer(Buffer4.from(buf));
23123
+ this._appendBuffer(Buffer5.from(buf));
23123
23124
  }
23124
23125
  return this;
23125
23126
  };
@@ -23135,15 +23136,15 @@ var require_BufferList = __commonJS({
23135
23136
  if (typeof search === "function" || Array.isArray(search)) {
23136
23137
  throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');
23137
23138
  } else if (typeof search === "number") {
23138
- search = Buffer4.from([search]);
23139
+ search = Buffer5.from([search]);
23139
23140
  } else if (typeof search === "string") {
23140
- search = Buffer4.from(search, encoding);
23141
+ search = Buffer5.from(search, encoding);
23141
23142
  } else if (this._isBufferList(search)) {
23142
23143
  search = search.slice();
23143
23144
  } else if (Array.isArray(search.buffer)) {
23144
- search = Buffer4.from(search.buffer, search.byteOffset, search.byteLength);
23145
- } else if (!Buffer4.isBuffer(search)) {
23146
- search = Buffer4.from(search);
23145
+ search = Buffer5.from(search.buffer, search.byteOffset, search.byteLength);
23146
+ } else if (!Buffer5.isBuffer(search)) {
23147
+ search = Buffer5.from(search);
23147
23148
  }
23148
23149
  offset = Number(offset || 0);
23149
23150
  if (isNaN(offset)) {
@@ -29099,7 +29100,7 @@ var require_iso2022 = __commonJS({
29099
29100
  var require_chardet = __commonJS({
29100
29101
  "node_modules/chardet/index.js"(exports2, module2) {
29101
29102
  "use strict";
29102
- var fs3 = require("fs");
29103
+ var fs7 = require("fs");
29103
29104
  var utf8 = require_utf8();
29104
29105
  var unicode = require_unicode();
29105
29106
  var mbcs = require_mbcs();
@@ -29173,29 +29174,29 @@ var require_chardet = __commonJS({
29173
29174
  var fd;
29174
29175
  var handler = function(err, buffer) {
29175
29176
  if (fd) {
29176
- fs3.closeSync(fd);
29177
+ fs7.closeSync(fd);
29177
29178
  }
29178
29179
  if (err)
29179
29180
  return cb(err, null);
29180
29181
  cb(null, self2.detect(buffer, opts));
29181
29182
  };
29182
29183
  if (opts && opts.sampleSize) {
29183
- fd = fs3.openSync(filepath, "r"), sample = Buffer.allocUnsafe(opts.sampleSize);
29184
- fs3.read(fd, sample, 0, opts.sampleSize, null, function(err) {
29184
+ fd = fs7.openSync(filepath, "r"), sample = Buffer.allocUnsafe(opts.sampleSize);
29185
+ fs7.read(fd, sample, 0, opts.sampleSize, null, function(err) {
29185
29186
  handler(err, sample);
29186
29187
  });
29187
29188
  return;
29188
29189
  }
29189
- fs3.readFile(filepath, handler);
29190
+ fs7.readFile(filepath, handler);
29190
29191
  };
29191
29192
  module2.exports.detectFileSync = function(filepath, opts) {
29192
29193
  if (opts && opts.sampleSize) {
29193
- var fd = fs3.openSync(filepath, "r"), sample2 = Buffer.allocUnsafe(opts.sampleSize);
29194
- fs3.readSync(fd, sample2, 0, opts.sampleSize);
29195
- fs3.closeSync(fd);
29194
+ var fd = fs7.openSync(filepath, "r"), sample2 = Buffer.allocUnsafe(opts.sampleSize);
29195
+ fs7.readSync(fd, sample2, 0, opts.sampleSize);
29196
+ fs7.closeSync(fd);
29196
29197
  return self2.detect(sample2, opts);
29197
29198
  }
29198
- return self2.detect(fs3.readFileSync(filepath), opts);
29199
+ return self2.detect(fs7.readFileSync(filepath), opts);
29199
29200
  };
29200
29201
  module2.exports.detectAll = function(buffer, opts) {
29201
29202
  if (typeof opts !== "object") {
@@ -29230,7 +29231,7 @@ var require_safer = __commonJS({
29230
29231
  "node_modules/safer-buffer/safer.js"(exports2, module2) {
29231
29232
  "use strict";
29232
29233
  var buffer = require("buffer");
29233
- var Buffer4 = buffer.Buffer;
29234
+ var Buffer5 = buffer.Buffer;
29234
29235
  var safer = {};
29235
29236
  var key;
29236
29237
  for (key in buffer) {
@@ -29241,14 +29242,14 @@ var require_safer = __commonJS({
29241
29242
  safer[key] = buffer[key];
29242
29243
  }
29243
29244
  var Safer = safer.Buffer = {};
29244
- for (key in Buffer4) {
29245
- if (!Buffer4.hasOwnProperty(key))
29245
+ for (key in Buffer5) {
29246
+ if (!Buffer5.hasOwnProperty(key))
29246
29247
  continue;
29247
29248
  if (key === "allocUnsafe" || key === "allocUnsafeSlow")
29248
29249
  continue;
29249
- Safer[key] = Buffer4[key];
29250
+ Safer[key] = Buffer5[key];
29250
29251
  }
29251
- safer.Buffer.prototype = Buffer4.prototype;
29252
+ safer.Buffer.prototype = Buffer5.prototype;
29252
29253
  if (!Safer.from || Safer.from === Uint8Array.from) {
29253
29254
  Safer.from = function(value, encodingOrOffset, length) {
29254
29255
  if (typeof value === "number") {
@@ -29257,7 +29258,7 @@ var require_safer = __commonJS({
29257
29258
  if (value && typeof value.length === "undefined") {
29258
29259
  throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
29259
29260
  }
29260
- return Buffer4(value, encodingOrOffset, length);
29261
+ return Buffer5(value, encodingOrOffset, length);
29261
29262
  };
29262
29263
  }
29263
29264
  if (!Safer.alloc) {
@@ -29268,7 +29269,7 @@ var require_safer = __commonJS({
29268
29269
  if (size < 0 || size >= 2 * (1 << 30)) {
29269
29270
  throw new RangeError('The value "' + size + '" is invalid for option "size"');
29270
29271
  }
29271
- var buf = Buffer4(size);
29272
+ var buf = Buffer5(size);
29272
29273
  if (!fill || fill.length === 0) {
29273
29274
  buf.fill(0);
29274
29275
  } else if (typeof encoding === "string") {
@@ -29345,7 +29346,7 @@ var require_bom_handling = __commonJS({
29345
29346
  var require_internal = __commonJS({
29346
29347
  "node_modules/iconv-lite/encodings/internal.js"(exports2, module2) {
29347
29348
  "use strict";
29348
- var Buffer4 = require_safer().Buffer;
29349
+ var Buffer5 = require_safer().Buffer;
29349
29350
  module2.exports = {
29350
29351
  // Encodings
29351
29352
  utf8: { type: "_internal", bomAware: true },
@@ -29367,7 +29368,7 @@ var require_internal = __commonJS({
29367
29368
  else if (this.enc === "cesu8") {
29368
29369
  this.enc = "utf8";
29369
29370
  this.encoder = InternalEncoderCesu8;
29370
- if (Buffer4.from("eda0bdedb2a9", "hex").toString() !== "\u{1F4A9}") {
29371
+ if (Buffer5.from("eda0bdedb2a9", "hex").toString() !== "\u{1F4A9}") {
29371
29372
  this.decoder = InternalDecoderCesu8;
29372
29373
  this.defaultCharUnicode = iconv.defaultCharUnicode;
29373
29374
  }
@@ -29387,7 +29388,7 @@ var require_internal = __commonJS({
29387
29388
  this.enc = codec.enc;
29388
29389
  }
29389
29390
  InternalEncoder.prototype.write = function(str) {
29390
- return Buffer4.from(str, this.enc);
29391
+ return Buffer5.from(str, this.enc);
29391
29392
  };
29392
29393
  InternalEncoder.prototype.end = function() {
29393
29394
  };
@@ -29399,15 +29400,15 @@ var require_internal = __commonJS({
29399
29400
  var completeQuads = str.length - str.length % 4;
29400
29401
  this.prevStr = str.slice(completeQuads);
29401
29402
  str = str.slice(0, completeQuads);
29402
- return Buffer4.from(str, "base64");
29403
+ return Buffer5.from(str, "base64");
29403
29404
  };
29404
29405
  InternalEncoderBase64.prototype.end = function() {
29405
- return Buffer4.from(this.prevStr, "base64");
29406
+ return Buffer5.from(this.prevStr, "base64");
29406
29407
  };
29407
29408
  function InternalEncoderCesu8(options, codec) {
29408
29409
  }
29409
29410
  InternalEncoderCesu8.prototype.write = function(str) {
29410
- var buf = Buffer4.alloc(str.length * 3), bufIdx = 0;
29411
+ var buf = Buffer5.alloc(str.length * 3), bufIdx = 0;
29411
29412
  for (var i2 = 0; i2 < str.length; i2++) {
29412
29413
  var charCode = str.charCodeAt(i2);
29413
29414
  if (charCode < 128)
@@ -29489,7 +29490,7 @@ var require_internal = __commonJS({
29489
29490
  var require_utf16 = __commonJS({
29490
29491
  "node_modules/iconv-lite/encodings/utf16.js"(exports2) {
29491
29492
  "use strict";
29492
- var Buffer4 = require_safer().Buffer;
29493
+ var Buffer5 = require_safer().Buffer;
29493
29494
  exports2.utf16be = Utf16BECodec;
29494
29495
  function Utf16BECodec() {
29495
29496
  }
@@ -29499,7 +29500,7 @@ var require_utf16 = __commonJS({
29499
29500
  function Utf16BEEncoder() {
29500
29501
  }
29501
29502
  Utf16BEEncoder.prototype.write = function(str) {
29502
- var buf = Buffer4.from(str, "ucs2");
29503
+ var buf = Buffer5.from(str, "ucs2");
29503
29504
  for (var i2 = 0; i2 < buf.length; i2 += 2) {
29504
29505
  var tmp = buf[i2];
29505
29506
  buf[i2] = buf[i2 + 1];
@@ -29515,7 +29516,7 @@ var require_utf16 = __commonJS({
29515
29516
  Utf16BEDecoder.prototype.write = function(buf) {
29516
29517
  if (buf.length == 0)
29517
29518
  return "";
29518
- var buf2 = Buffer4.alloc(buf.length + 1), i2 = 0, j = 0;
29519
+ var buf2 = Buffer5.alloc(buf.length + 1), i2 = 0, j = 0;
29519
29520
  if (this.overflowByte !== -1) {
29520
29521
  buf2[0] = buf[0];
29521
29522
  buf2[1] = this.overflowByte;
@@ -29562,7 +29563,7 @@ var require_utf16 = __commonJS({
29562
29563
  this.initialBytesLen += buf.length;
29563
29564
  if (this.initialBytesLen < 16)
29564
29565
  return "";
29565
- var buf = Buffer4.concat(this.initialBytes), encoding = detectEncoding(buf, this.options.defaultEncoding);
29566
+ var buf = Buffer5.concat(this.initialBytes), encoding = detectEncoding(buf, this.options.defaultEncoding);
29566
29567
  this.decoder = this.iconv.getDecoder(encoding, this.options);
29567
29568
  this.initialBytes.length = this.initialBytesLen = 0;
29568
29569
  }
@@ -29570,7 +29571,7 @@ var require_utf16 = __commonJS({
29570
29571
  };
29571
29572
  Utf16Decoder.prototype.end = function() {
29572
29573
  if (!this.decoder) {
29573
- var buf = Buffer4.concat(this.initialBytes), encoding = detectEncoding(buf, this.options.defaultEncoding);
29574
+ var buf = Buffer5.concat(this.initialBytes), encoding = detectEncoding(buf, this.options.defaultEncoding);
29574
29575
  this.decoder = this.iconv.getDecoder(encoding, this.options);
29575
29576
  var res = this.decoder.write(buf), trail = this.decoder.end();
29576
29577
  return trail ? res + trail : res;
@@ -29607,7 +29608,7 @@ var require_utf16 = __commonJS({
29607
29608
  var require_utf7 = __commonJS({
29608
29609
  "node_modules/iconv-lite/encodings/utf7.js"(exports2) {
29609
29610
  "use strict";
29610
- var Buffer4 = require_safer().Buffer;
29611
+ var Buffer5 = require_safer().Buffer;
29611
29612
  exports2.utf7 = Utf7Codec;
29612
29613
  exports2.unicode11utf7 = "utf7";
29613
29614
  function Utf7Codec(codecOptions, iconv) {
@@ -29621,7 +29622,7 @@ var require_utf7 = __commonJS({
29621
29622
  this.iconv = codec.iconv;
29622
29623
  }
29623
29624
  Utf7Encoder.prototype.write = function(str) {
29624
- return Buffer4.from(str.replace(nonDirectChars, function(chunk) {
29625
+ return Buffer5.from(str.replace(nonDirectChars, function(chunk) {
29625
29626
  return "+" + (chunk === "+" ? "" : this.iconv.encode(chunk, "utf16-be").toString("base64").replace(/=+$/, "")) + "-";
29626
29627
  }.bind(this)));
29627
29628
  };
@@ -29655,7 +29656,7 @@ var require_utf7 = __commonJS({
29655
29656
  res += "+";
29656
29657
  } else {
29657
29658
  var b64str = base64Accum + buf.slice(lastI, i3).toString();
29658
- res += this.iconv.decode(Buffer4.from(b64str, "base64"), "utf16-be");
29659
+ res += this.iconv.decode(Buffer5.from(b64str, "base64"), "utf16-be");
29659
29660
  }
29660
29661
  if (buf[i3] != minusChar)
29661
29662
  i3--;
@@ -29672,7 +29673,7 @@ var require_utf7 = __commonJS({
29672
29673
  var canBeDecoded = b64str.length - b64str.length % 8;
29673
29674
  base64Accum = b64str.slice(canBeDecoded);
29674
29675
  b64str = b64str.slice(0, canBeDecoded);
29675
- res += this.iconv.decode(Buffer4.from(b64str, "base64"), "utf16-be");
29676
+ res += this.iconv.decode(Buffer5.from(b64str, "base64"), "utf16-be");
29676
29677
  }
29677
29678
  this.inBase64 = inBase64;
29678
29679
  this.base64Accum = base64Accum;
@@ -29681,7 +29682,7 @@ var require_utf7 = __commonJS({
29681
29682
  Utf7Decoder.prototype.end = function() {
29682
29683
  var res = "";
29683
29684
  if (this.inBase64 && this.base64Accum.length > 0)
29684
- res = this.iconv.decode(Buffer4.from(this.base64Accum, "base64"), "utf16-be");
29685
+ res = this.iconv.decode(Buffer5.from(this.base64Accum, "base64"), "utf16-be");
29685
29686
  this.inBase64 = false;
29686
29687
  this.base64Accum = "";
29687
29688
  return res;
@@ -29696,11 +29697,11 @@ var require_utf7 = __commonJS({
29696
29697
  function Utf7IMAPEncoder(options, codec) {
29697
29698
  this.iconv = codec.iconv;
29698
29699
  this.inBase64 = false;
29699
- this.base64Accum = Buffer4.alloc(6);
29700
+ this.base64Accum = Buffer5.alloc(6);
29700
29701
  this.base64AccumIdx = 0;
29701
29702
  }
29702
29703
  Utf7IMAPEncoder.prototype.write = function(str) {
29703
- var inBase64 = this.inBase64, base64Accum = this.base64Accum, base64AccumIdx = this.base64AccumIdx, buf = Buffer4.alloc(str.length * 5 + 10), bufIdx = 0;
29704
+ var inBase64 = this.inBase64, base64Accum = this.base64Accum, base64AccumIdx = this.base64AccumIdx, buf = Buffer5.alloc(str.length * 5 + 10), bufIdx = 0;
29704
29705
  for (var i3 = 0; i3 < str.length; i3++) {
29705
29706
  var uChar = str.charCodeAt(i3);
29706
29707
  if (32 <= uChar && uChar <= 126) {
@@ -29737,7 +29738,7 @@ var require_utf7 = __commonJS({
29737
29738
  return buf.slice(0, bufIdx);
29738
29739
  };
29739
29740
  Utf7IMAPEncoder.prototype.end = function() {
29740
- var buf = Buffer4.alloc(10), bufIdx = 0;
29741
+ var buf = Buffer5.alloc(10), bufIdx = 0;
29741
29742
  if (this.inBase64) {
29742
29743
  if (this.base64AccumIdx > 0) {
29743
29744
  bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), bufIdx);
@@ -29770,7 +29771,7 @@ var require_utf7 = __commonJS({
29770
29771
  res += "&";
29771
29772
  } else {
29772
29773
  var b64str = base64Accum + buf.slice(lastI, i3).toString().replace(/,/g, "/");
29773
- res += this.iconv.decode(Buffer4.from(b64str, "base64"), "utf16-be");
29774
+ res += this.iconv.decode(Buffer5.from(b64str, "base64"), "utf16-be");
29774
29775
  }
29775
29776
  if (buf[i3] != minusChar)
29776
29777
  i3--;
@@ -29787,7 +29788,7 @@ var require_utf7 = __commonJS({
29787
29788
  var canBeDecoded = b64str.length - b64str.length % 8;
29788
29789
  base64Accum = b64str.slice(canBeDecoded);
29789
29790
  b64str = b64str.slice(0, canBeDecoded);
29790
- res += this.iconv.decode(Buffer4.from(b64str, "base64"), "utf16-be");
29791
+ res += this.iconv.decode(Buffer5.from(b64str, "base64"), "utf16-be");
29791
29792
  }
29792
29793
  this.inBase64 = inBase64;
29793
29794
  this.base64Accum = base64Accum;
@@ -29796,7 +29797,7 @@ var require_utf7 = __commonJS({
29796
29797
  Utf7IMAPDecoder.prototype.end = function() {
29797
29798
  var res = "";
29798
29799
  if (this.inBase64 && this.base64Accum.length > 0)
29799
- res = this.iconv.decode(Buffer4.from(this.base64Accum, "base64"), "utf16-be");
29800
+ res = this.iconv.decode(Buffer5.from(this.base64Accum, "base64"), "utf16-be");
29800
29801
  this.inBase64 = false;
29801
29802
  this.base64Accum = "";
29802
29803
  return res;
@@ -29808,7 +29809,7 @@ var require_utf7 = __commonJS({
29808
29809
  var require_sbcs_codec = __commonJS({
29809
29810
  "node_modules/iconv-lite/encodings/sbcs-codec.js"(exports2) {
29810
29811
  "use strict";
29811
- var Buffer4 = require_safer().Buffer;
29812
+ var Buffer5 = require_safer().Buffer;
29812
29813
  exports2._sbcs = SBCSCodec;
29813
29814
  function SBCSCodec(codecOptions, iconv) {
29814
29815
  if (!codecOptions)
@@ -29821,8 +29822,8 @@ var require_sbcs_codec = __commonJS({
29821
29822
  asciiString += String.fromCharCode(i2);
29822
29823
  codecOptions.chars = asciiString + codecOptions.chars;
29823
29824
  }
29824
- this.decodeBuf = Buffer4.from(codecOptions.chars, "ucs2");
29825
- var encodeBuf = Buffer4.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));
29825
+ this.decodeBuf = Buffer5.from(codecOptions.chars, "ucs2");
29826
+ var encodeBuf = Buffer5.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));
29826
29827
  for (var i2 = 0; i2 < codecOptions.chars.length; i2++)
29827
29828
  encodeBuf[codecOptions.chars.charCodeAt(i2)] = i2;
29828
29829
  this.encodeBuf = encodeBuf;
@@ -29833,7 +29834,7 @@ var require_sbcs_codec = __commonJS({
29833
29834
  this.encodeBuf = codec.encodeBuf;
29834
29835
  }
29835
29836
  SBCSEncoder.prototype.write = function(str) {
29836
- var buf = Buffer4.alloc(str.length);
29837
+ var buf = Buffer5.alloc(str.length);
29837
29838
  for (var i2 = 0; i2 < str.length; i2++)
29838
29839
  buf[i2] = this.encodeBuf[str.charCodeAt(i2)];
29839
29840
  return buf;
@@ -29845,7 +29846,7 @@ var require_sbcs_codec = __commonJS({
29845
29846
  }
29846
29847
  SBCSDecoder.prototype.write = function(buf) {
29847
29848
  var decodeBuf = this.decodeBuf;
29848
- var newBuf = Buffer4.alloc(buf.length * 2);
29849
+ var newBuf = Buffer5.alloc(buf.length * 2);
29849
29850
  var idx1 = 0, idx2 = 0;
29850
29851
  for (var i2 = 0; i2 < buf.length; i2++) {
29851
29852
  idx1 = buf[i2] * 2;
@@ -30468,7 +30469,7 @@ var require_sbcs_data_generated = __commonJS({
30468
30469
  var require_dbcs_codec = __commonJS({
30469
30470
  "node_modules/iconv-lite/encodings/dbcs-codec.js"(exports2) {
30470
30471
  "use strict";
30471
- var Buffer4 = require_safer().Buffer;
30472
+ var Buffer5 = require_safer().Buffer;
30472
30473
  exports2._dbcs = DBCSCodec;
30473
30474
  var UNASSIGNED = -1;
30474
30475
  var GB18030_CODE = -2;
@@ -30654,7 +30655,7 @@ var require_dbcs_codec = __commonJS({
30654
30655
  this.gb18030 = codec.gb18030;
30655
30656
  }
30656
30657
  DBCSEncoder.prototype.write = function(str) {
30657
- var newBuf = Buffer4.alloc(str.length * (this.gb18030 ? 4 : 3)), leadSurrogate = this.leadSurrogate, seqObj = this.seqObj, nextChar = -1, i3 = 0, j = 0;
30658
+ var newBuf = Buffer5.alloc(str.length * (this.gb18030 ? 4 : 3)), leadSurrogate = this.leadSurrogate, seqObj = this.seqObj, nextChar = -1, i3 = 0, j = 0;
30658
30659
  while (true) {
30659
30660
  if (nextChar === -1) {
30660
30661
  if (i3 == str.length)
@@ -30746,7 +30747,7 @@ var require_dbcs_codec = __commonJS({
30746
30747
  DBCSEncoder.prototype.end = function() {
30747
30748
  if (this.leadSurrogate === -1 && this.seqObj === void 0)
30748
30749
  return;
30749
- var newBuf = Buffer4.alloc(10), j = 0;
30750
+ var newBuf = Buffer5.alloc(10), j = 0;
30750
30751
  if (this.seqObj) {
30751
30752
  var dbcsCode = this.seqObj[DEF_CHAR];
30752
30753
  if (dbcsCode !== void 0) {
@@ -30769,16 +30770,16 @@ var require_dbcs_codec = __commonJS({
30769
30770
  DBCSEncoder.prototype.findIdx = findIdx;
30770
30771
  function DBCSDecoder(options, codec) {
30771
30772
  this.nodeIdx = 0;
30772
- this.prevBuf = Buffer4.alloc(0);
30773
+ this.prevBuf = Buffer5.alloc(0);
30773
30774
  this.decodeTables = codec.decodeTables;
30774
30775
  this.decodeTableSeq = codec.decodeTableSeq;
30775
30776
  this.defaultCharUnicode = codec.defaultCharUnicode;
30776
30777
  this.gb18030 = codec.gb18030;
30777
30778
  }
30778
30779
  DBCSDecoder.prototype.write = function(buf) {
30779
- var newBuf = Buffer4.alloc(buf.length * 2), nodeIdx = this.nodeIdx, prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, seqStart = -this.prevBuf.length, uCode;
30780
+ var newBuf = Buffer5.alloc(buf.length * 2), nodeIdx = this.nodeIdx, prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, seqStart = -this.prevBuf.length, uCode;
30780
30781
  if (prevBufOffset > 0)
30781
- prevBuf = Buffer4.concat([prevBuf, buf.slice(0, 10)]);
30782
+ prevBuf = Buffer5.concat([prevBuf, buf.slice(0, 10)]);
30782
30783
  for (var i3 = 0, j = 0; i3 < buf.length; i3++) {
30783
30784
  var curByte = i3 >= 0 ? buf[i3] : prevBuf[i3 + prevBufOffset];
30784
30785
  var uCode = this.decodeTables[nodeIdx][curByte];
@@ -30825,7 +30826,7 @@ var require_dbcs_codec = __commonJS({
30825
30826
  while (this.prevBuf.length > 0) {
30826
30827
  ret += this.defaultCharUnicode;
30827
30828
  var buf = this.prevBuf.slice(1);
30828
- this.prevBuf = Buffer4.alloc(0);
30829
+ this.prevBuf = Buffer5.alloc(0);
30829
30830
  this.nodeIdx = 0;
30830
30831
  if (buf.length > 0)
30831
30832
  ret += this.write(buf);
@@ -32301,7 +32302,7 @@ var require_encodings = __commonJS({
32301
32302
  var require_streams = __commonJS({
32302
32303
  "node_modules/iconv-lite/lib/streams.js"(exports2, module2) {
32303
32304
  "use strict";
32304
- var Buffer4 = require("buffer").Buffer;
32305
+ var Buffer5 = require("buffer").Buffer;
32305
32306
  var Transform = require("stream").Transform;
32306
32307
  module2.exports = function(iconv) {
32307
32308
  iconv.encodeStream = function encodeStream(encoding, options) {
@@ -32353,7 +32354,7 @@ var require_streams = __commonJS({
32353
32354
  chunks.push(chunk);
32354
32355
  });
32355
32356
  this.on("end", function() {
32356
- cb(null, Buffer4.concat(chunks));
32357
+ cb(null, Buffer5.concat(chunks));
32357
32358
  });
32358
32359
  return this;
32359
32360
  };
@@ -32367,7 +32368,7 @@ var require_streams = __commonJS({
32367
32368
  constructor: { value: IconvLiteDecoderStream }
32368
32369
  });
32369
32370
  IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
32370
- if (!Buffer4.isBuffer(chunk))
32371
+ if (!Buffer5.isBuffer(chunk))
32371
32372
  return done(new Error("Iconv decoding stream needs buffers as its input."));
32372
32373
  try {
32373
32374
  var res = this.conv.write(chunk);
@@ -32406,10 +32407,10 @@ var require_streams = __commonJS({
32406
32407
  var require_extend_node = __commonJS({
32407
32408
  "node_modules/iconv-lite/lib/extend-node.js"(exports2, module2) {
32408
32409
  "use strict";
32409
- var Buffer4 = require("buffer").Buffer;
32410
+ var Buffer5 = require("buffer").Buffer;
32410
32411
  module2.exports = function(iconv) {
32411
32412
  var original = void 0;
32412
- iconv.supportsNodeEncodingsExtension = !(Buffer4.from || new Buffer4(0) instanceof Uint8Array);
32413
+ iconv.supportsNodeEncodingsExtension = !(Buffer5.from || new Buffer5(0) instanceof Uint8Array);
32413
32414
  iconv.extendNodeEncodings = function extendNodeEncodings() {
32414
32415
  if (original)
32415
32416
  return;
@@ -32431,14 +32432,14 @@ var require_extend_node = __commonJS({
32431
32432
  "utf16le": true,
32432
32433
  "utf-16le": true
32433
32434
  };
32434
- Buffer4.isNativeEncoding = function(enc) {
32435
+ Buffer5.isNativeEncoding = function(enc) {
32435
32436
  return enc && nodeNativeEncodings[enc.toLowerCase()];
32436
32437
  };
32437
32438
  var SlowBuffer = require("buffer").SlowBuffer;
32438
32439
  original.SlowBufferToString = SlowBuffer.prototype.toString;
32439
32440
  SlowBuffer.prototype.toString = function(encoding, start, end) {
32440
32441
  encoding = String(encoding || "utf8").toLowerCase();
32441
- if (Buffer4.isNativeEncoding(encoding))
32442
+ if (Buffer5.isNativeEncoding(encoding))
32442
32443
  return original.SlowBufferToString.call(this, encoding, start, end);
32443
32444
  if (typeof start == "undefined")
32444
32445
  start = 0;
@@ -32470,7 +32471,7 @@ var require_extend_node = __commonJS({
32470
32471
  }
32471
32472
  }
32472
32473
  encoding = String(encoding || "utf8").toLowerCase();
32473
- if (Buffer4.isNativeEncoding(encoding))
32474
+ if (Buffer5.isNativeEncoding(encoding))
32474
32475
  return original.SlowBufferWrite.call(this, string, offset, length, encoding);
32475
32476
  if (string.length > 0 && (length < 0 || offset < 0))
32476
32477
  throw new RangeError("attempt to write beyond buffer bounds");
@@ -32480,21 +32481,21 @@ var require_extend_node = __commonJS({
32480
32481
  buf.copy(this, offset, 0, length);
32481
32482
  return length;
32482
32483
  };
32483
- original.BufferIsEncoding = Buffer4.isEncoding;
32484
- Buffer4.isEncoding = function(encoding) {
32485
- return Buffer4.isNativeEncoding(encoding) || iconv.encodingExists(encoding);
32484
+ original.BufferIsEncoding = Buffer5.isEncoding;
32485
+ Buffer5.isEncoding = function(encoding) {
32486
+ return Buffer5.isNativeEncoding(encoding) || iconv.encodingExists(encoding);
32486
32487
  };
32487
- original.BufferByteLength = Buffer4.byteLength;
32488
- Buffer4.byteLength = SlowBuffer.byteLength = function(str, encoding) {
32488
+ original.BufferByteLength = Buffer5.byteLength;
32489
+ Buffer5.byteLength = SlowBuffer.byteLength = function(str, encoding) {
32489
32490
  encoding = String(encoding || "utf8").toLowerCase();
32490
- if (Buffer4.isNativeEncoding(encoding))
32491
+ if (Buffer5.isNativeEncoding(encoding))
32491
32492
  return original.BufferByteLength.call(this, str, encoding);
32492
32493
  return iconv.encode(str, encoding).length;
32493
32494
  };
32494
- original.BufferToString = Buffer4.prototype.toString;
32495
- Buffer4.prototype.toString = function(encoding, start, end) {
32495
+ original.BufferToString = Buffer5.prototype.toString;
32496
+ Buffer5.prototype.toString = function(encoding, start, end) {
32496
32497
  encoding = String(encoding || "utf8").toLowerCase();
32497
- if (Buffer4.isNativeEncoding(encoding))
32498
+ if (Buffer5.isNativeEncoding(encoding))
32498
32499
  return original.BufferToString.call(this, encoding, start, end);
32499
32500
  if (typeof start == "undefined")
32500
32501
  start = 0;
@@ -32502,8 +32503,8 @@ var require_extend_node = __commonJS({
32502
32503
  end = this.length;
32503
32504
  return iconv.decode(this.slice(start, end), encoding);
32504
32505
  };
32505
- original.BufferWrite = Buffer4.prototype.write;
32506
- Buffer4.prototype.write = function(string, offset, length, encoding) {
32506
+ original.BufferWrite = Buffer5.prototype.write;
32507
+ Buffer5.prototype.write = function(string, offset, length, encoding) {
32507
32508
  var _offset = offset, _length = length, _encoding = encoding;
32508
32509
  if (isFinite(offset)) {
32509
32510
  if (!isFinite(length)) {
@@ -32517,7 +32518,7 @@ var require_extend_node = __commonJS({
32517
32518
  length = swap;
32518
32519
  }
32519
32520
  encoding = String(encoding || "utf8").toLowerCase();
32520
- if (Buffer4.isNativeEncoding(encoding))
32521
+ if (Buffer5.isNativeEncoding(encoding))
32521
32522
  return original.BufferWrite.call(this, string, _offset, _length, _encoding);
32522
32523
  offset = +offset || 0;
32523
32524
  var remaining = this.length - offset;
@@ -32552,14 +32553,14 @@ var require_extend_node = __commonJS({
32552
32553
  return;
32553
32554
  if (!original)
32554
32555
  throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.");
32555
- delete Buffer4.isNativeEncoding;
32556
+ delete Buffer5.isNativeEncoding;
32556
32557
  var SlowBuffer = require("buffer").SlowBuffer;
32557
32558
  SlowBuffer.prototype.toString = original.SlowBufferToString;
32558
32559
  SlowBuffer.prototype.write = original.SlowBufferWrite;
32559
- Buffer4.isEncoding = original.BufferIsEncoding;
32560
- Buffer4.byteLength = original.BufferByteLength;
32561
- Buffer4.prototype.toString = original.BufferToString;
32562
- Buffer4.prototype.write = original.BufferWrite;
32560
+ Buffer5.isEncoding = original.BufferIsEncoding;
32561
+ Buffer5.byteLength = original.BufferByteLength;
32562
+ Buffer5.prototype.toString = original.BufferToString;
32563
+ Buffer5.prototype.write = original.BufferWrite;
32563
32564
  if (iconv.supportsStreams) {
32564
32565
  var Readable = require("stream").Readable;
32565
32566
  Readable.prototype.setEncoding = original.ReadableSetEncoding;
@@ -32575,7 +32576,7 @@ var require_extend_node = __commonJS({
32575
32576
  var require_lib = __commonJS({
32576
32577
  "node_modules/iconv-lite/lib/index.js"(exports2, module2) {
32577
32578
  "use strict";
32578
- var Buffer4 = require_safer().Buffer;
32579
+ var Buffer5 = require_safer().Buffer;
32579
32580
  var bomHandling = require_bom_handling();
32580
32581
  var iconv = module2.exports;
32581
32582
  iconv.encodings = null;
@@ -32586,7 +32587,7 @@ var require_lib = __commonJS({
32586
32587
  var encoder = iconv.getEncoder(encoding, options);
32587
32588
  var res = encoder.write(str);
32588
32589
  var trail = encoder.end();
32589
- return trail && trail.length > 0 ? Buffer4.concat([res, trail]) : res;
32590
+ return trail && trail.length > 0 ? Buffer5.concat([res, trail]) : res;
32590
32591
  };
32591
32592
  iconv.decode = function decode(buf, encoding, options) {
32592
32593
  if (typeof buf === "string") {
@@ -32594,7 +32595,7 @@ var require_lib = __commonJS({
32594
32595
  console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding");
32595
32596
  iconv.skipDecodeWarning = true;
32596
32597
  }
32597
- buf = Buffer4.from("" + (buf || ""), "binary");
32598
+ buf = Buffer5.from("" + (buf || ""), "binary");
32598
32599
  }
32599
32600
  var decoder = iconv.getDecoder(encoding, options);
32600
32601
  var res = decoder.write(buf);
@@ -32681,16 +32682,16 @@ var require_os_tmpdir = __commonJS({
32681
32682
  var isWindows = process.platform === "win32";
32682
32683
  var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/;
32683
32684
  module2.exports = function() {
32684
- var path2;
32685
+ var path3;
32685
32686
  if (isWindows) {
32686
- path2 = process.env.TEMP || process.env.TMP || (process.env.SystemRoot || process.env.windir) + "\\temp";
32687
+ path3 = process.env.TEMP || process.env.TMP || (process.env.SystemRoot || process.env.windir) + "\\temp";
32687
32688
  } else {
32688
- path2 = process.env.TMPDIR || process.env.TMP || process.env.TEMP || "/tmp";
32689
+ path3 = process.env.TMPDIR || process.env.TMP || process.env.TEMP || "/tmp";
32689
32690
  }
32690
- if (trailingSlashRe.test(path2)) {
32691
- path2 = path2.slice(0, -1);
32691
+ if (trailingSlashRe.test(path3)) {
32692
+ path3 = path3.slice(0, -1);
32692
32693
  }
32693
- return path2;
32694
+ return path3;
32694
32695
  };
32695
32696
  }
32696
32697
  });
@@ -32699,8 +32700,8 @@ var require_os_tmpdir = __commonJS({
32699
32700
  var require_tmp = __commonJS({
32700
32701
  "node_modules/tmp/lib/tmp.js"(exports2, module2) {
32701
32702
  "use strict";
32702
- var fs3 = require("fs");
32703
- var path2 = require("path");
32703
+ var fs7 = require("fs");
32704
+ var path3 = require("path");
32704
32705
  var crypto3 = require("crypto");
32705
32706
  var osTmpDir = require_os_tmpdir();
32706
32707
  var _c = process.binding("constants");
@@ -32742,7 +32743,7 @@ var require_tmp = __commonJS({
32742
32743
  }
32743
32744
  function _generateTmpName(opts) {
32744
32745
  if (opts.name) {
32745
- return path2.join(opts.dir || tmpDir, opts.name);
32746
+ return path3.join(opts.dir || tmpDir, opts.name);
32746
32747
  }
32747
32748
  if (opts.template) {
32748
32749
  return opts.template.replace(TEMPLATE_PATTERN, _randomChars(6));
@@ -32753,7 +32754,7 @@ var require_tmp = __commonJS({
32753
32754
  _randomChars(12),
32754
32755
  opts.postfix || ""
32755
32756
  ].join("");
32756
- return path2.join(opts.dir || tmpDir, name);
32757
+ return path3.join(opts.dir || tmpDir, name);
32757
32758
  }
32758
32759
  function tmpName(options, callback) {
32759
32760
  var args = _parseArguments(options, callback), opts = args[0], cb = args[1], tries = opts.name ? 1 : opts.tries || DEFAULT_TRIES;
@@ -32763,7 +32764,7 @@ var require_tmp = __commonJS({
32763
32764
  return cb(new Error("Invalid template provided"));
32764
32765
  (function _getUniqueName() {
32765
32766
  const name = _generateTmpName(opts);
32766
- fs3.stat(name, function(err) {
32767
+ fs7.stat(name, function(err) {
32767
32768
  if (!err) {
32768
32769
  if (tries-- > 0)
32769
32770
  return _getUniqueName();
@@ -32782,7 +32783,7 @@ var require_tmp = __commonJS({
32782
32783
  do {
32783
32784
  const name = _generateTmpName(opts);
32784
32785
  try {
32785
- fs3.statSync(name);
32786
+ fs7.statSync(name);
32786
32787
  } catch (e2) {
32787
32788
  return name;
32788
32789
  }
@@ -32795,14 +32796,14 @@ var require_tmp = __commonJS({
32795
32796
  tmpName(opts, function _tmpNameCreated(err, name) {
32796
32797
  if (err)
32797
32798
  return cb(err);
32798
- fs3.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) {
32799
+ fs7.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) {
32799
32800
  if (err2)
32800
32801
  return cb(err2);
32801
32802
  if (opts.discardDescriptor) {
32802
- return fs3.close(fd, function _discardCallback(err3) {
32803
+ return fs7.close(fd, function _discardCallback(err3) {
32803
32804
  if (err3) {
32804
32805
  try {
32805
- fs3.unlinkSync(name);
32806
+ fs7.unlinkSync(name);
32806
32807
  } catch (e2) {
32807
32808
  if (!isENOENT(e2)) {
32808
32809
  err3 = e2;
@@ -32825,9 +32826,9 @@ var require_tmp = __commonJS({
32825
32826
  opts.postfix = opts.postfix || ".tmp";
32826
32827
  const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
32827
32828
  const name = tmpNameSync(opts);
32828
- var fd = fs3.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
32829
+ var fd = fs7.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
32829
32830
  if (opts.discardDescriptor) {
32830
- fs3.closeSync(fd);
32831
+ fs7.closeSync(fd);
32831
32832
  fd = void 0;
32832
32833
  }
32833
32834
  return {
@@ -32839,9 +32840,9 @@ var require_tmp = __commonJS({
32839
32840
  function _rmdirRecursiveSync(root) {
32840
32841
  const dirs = [root];
32841
32842
  do {
32842
- var dir2 = dirs.pop(), deferred = false, files = fs3.readdirSync(dir2);
32843
+ var dir2 = dirs.pop(), deferred = false, files = fs7.readdirSync(dir2);
32843
32844
  for (var i2 = 0, length = files.length; i2 < length; i2++) {
32844
- var file2 = path2.join(dir2, files[i2]), stat2 = fs3.lstatSync(file2);
32845
+ var file2 = path3.join(dir2, files[i2]), stat2 = fs7.lstatSync(file2);
32845
32846
  if (stat2.isDirectory()) {
32846
32847
  if (!deferred) {
32847
32848
  deferred = true;
@@ -32849,11 +32850,11 @@ var require_tmp = __commonJS({
32849
32850
  }
32850
32851
  dirs.push(file2);
32851
32852
  } else {
32852
- fs3.unlinkSync(file2);
32853
+ fs7.unlinkSync(file2);
32853
32854
  }
32854
32855
  }
32855
32856
  if (!deferred) {
32856
- fs3.rmdirSync(dir2);
32857
+ fs7.rmdirSync(dir2);
32857
32858
  }
32858
32859
  } while (dirs.length !== 0);
32859
32860
  }
@@ -32862,7 +32863,7 @@ var require_tmp = __commonJS({
32862
32863
  tmpName(opts, function _tmpNameCreated(err, name) {
32863
32864
  if (err)
32864
32865
  return cb(err);
32865
- fs3.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) {
32866
+ fs7.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) {
32866
32867
  if (err2)
32867
32868
  return cb(err2);
32868
32869
  cb(null, name, _prepareTmpDirRemoveCallback(name, opts));
@@ -32872,7 +32873,7 @@ var require_tmp = __commonJS({
32872
32873
  function dirSync(options) {
32873
32874
  var args = _parseArguments(options), opts = args[0];
32874
32875
  const name = tmpNameSync(opts);
32875
- fs3.mkdirSync(name, opts.mode || DIR_MODE);
32876
+ fs7.mkdirSync(name, opts.mode || DIR_MODE);
32876
32877
  return {
32877
32878
  name,
32878
32879
  removeCallback: _prepareTmpDirRemoveCallback(name, opts)
@@ -32882,7 +32883,7 @@ var require_tmp = __commonJS({
32882
32883
  const removeCallback = _prepareRemoveCallback(function _removeCallback(fdPath) {
32883
32884
  try {
32884
32885
  if (0 <= fdPath[0]) {
32885
- fs3.closeSync(fdPath[0]);
32886
+ fs7.closeSync(fdPath[0]);
32886
32887
  }
32887
32888
  } catch (e2) {
32888
32889
  if (!isEBADF(e2) && !isENOENT(e2)) {
@@ -32890,7 +32891,7 @@ var require_tmp = __commonJS({
32890
32891
  }
32891
32892
  }
32892
32893
  try {
32893
- fs3.unlinkSync(fdPath[1]);
32894
+ fs7.unlinkSync(fdPath[1]);
32894
32895
  } catch (e2) {
32895
32896
  if (!isENOENT(e2)) {
32896
32897
  throw e2;
@@ -32903,7 +32904,7 @@ var require_tmp = __commonJS({
32903
32904
  return removeCallback;
32904
32905
  }
32905
32906
  function _prepareTmpDirRemoveCallback(name, opts) {
32906
- const removeFunction = opts.unsafeCleanup ? _rmdirRecursiveSync : fs3.rmdirSync.bind(fs3);
32907
+ const removeFunction = opts.unsafeCleanup ? _rmdirRecursiveSync : fs7.rmdirSync.bind(fs7);
32907
32908
  const removeCallback = _prepareRemoveCallback(removeFunction, name);
32908
32909
  if (!opts.keep) {
32909
32910
  _removeObjects.unshift(removeCallback);
@@ -34377,14 +34378,14 @@ var require_baseSet = __commonJS({
34377
34378
  var isIndex = require_isIndex();
34378
34379
  var isObject = require_isObject();
34379
34380
  var toKey = require_toKey();
34380
- function baseSet(object, path2, value, customizer) {
34381
+ function baseSet(object, path3, value, customizer) {
34381
34382
  if (!isObject(object)) {
34382
34383
  return object;
34383
34384
  }
34384
- path2 = castPath(path2, object);
34385
- var index = -1, length = path2.length, lastIndex = length - 1, nested = object;
34385
+ path3 = castPath(path3, object);
34386
+ var index = -1, length = path3.length, lastIndex = length - 1, nested = object;
34386
34387
  while (nested != null && ++index < length) {
34387
- var key = toKey(path2[index]), newValue = value;
34388
+ var key = toKey(path3[index]), newValue = value;
34388
34389
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
34389
34390
  return object;
34390
34391
  }
@@ -34392,7 +34393,7 @@ var require_baseSet = __commonJS({
34392
34393
  var objValue = nested[key];
34393
34394
  newValue = customizer ? customizer(objValue, key, nested) : void 0;
34394
34395
  if (newValue === void 0) {
34395
- newValue = isObject(objValue) ? objValue : isIndex(path2[index + 1]) ? [] : {};
34396
+ newValue = isObject(objValue) ? objValue : isIndex(path3[index + 1]) ? [] : {};
34396
34397
  }
34397
34398
  }
34398
34399
  assignValue(nested, key, newValue);
@@ -34409,8 +34410,8 @@ var require_set = __commonJS({
34409
34410
  "node_modules/lodash/set.js"(exports2, module2) {
34410
34411
  "use strict";
34411
34412
  var baseSet = require_baseSet();
34412
- function set2(object, path2, value) {
34413
- return object == null ? object : baseSet(object, path2, value);
34413
+ function set2(object, path3, value) {
34414
+ return object == null ? object : baseSet(object, path3, value);
34414
34415
  }
34415
34416
  module2.exports = set2;
34416
34417
  }
@@ -34491,9 +34492,9 @@ var require_package = __commonJS({
34491
34492
  var require_main2 = __commonJS({
34492
34493
  "node_modules/dotenv/lib/main.js"(exports2, module2) {
34493
34494
  "use strict";
34494
- var fs3 = require("fs");
34495
- var path2 = require("path");
34496
- var os3 = require("os");
34495
+ var fs7 = require("fs");
34496
+ var path3 = require("path");
34497
+ var os4 = require("os");
34497
34498
  var crypto3 = require("crypto");
34498
34499
  var packageJson = require_package();
34499
34500
  var version2 = packageJson.version;
@@ -34598,7 +34599,7 @@ var require_main2 = __commonJS({
34598
34599
  if (options && options.path && options.path.length > 0) {
34599
34600
  if (Array.isArray(options.path)) {
34600
34601
  for (const filepath of options.path) {
34601
- if (fs3.existsSync(filepath)) {
34602
+ if (fs7.existsSync(filepath)) {
34602
34603
  possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
34603
34604
  }
34604
34605
  }
@@ -34606,15 +34607,15 @@ var require_main2 = __commonJS({
34606
34607
  possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
34607
34608
  }
34608
34609
  } else {
34609
- possibleVaultPath = path2.resolve(process.cwd(), ".env.vault");
34610
+ possibleVaultPath = path3.resolve(process.cwd(), ".env.vault");
34610
34611
  }
34611
- if (fs3.existsSync(possibleVaultPath)) {
34612
+ if (fs7.existsSync(possibleVaultPath)) {
34612
34613
  return possibleVaultPath;
34613
34614
  }
34614
34615
  return null;
34615
34616
  }
34616
34617
  function _resolveHome(envPath) {
34617
- return envPath[0] === "~" ? path2.join(os3.homedir(), envPath.slice(1)) : envPath;
34618
+ return envPath[0] === "~" ? path3.join(os4.homedir(), envPath.slice(1)) : envPath;
34618
34619
  }
34619
34620
  function _configVault(options) {
34620
34621
  _log("Loading env from encrypted .env.vault");
@@ -34627,7 +34628,7 @@ var require_main2 = __commonJS({
34627
34628
  return { parsed };
34628
34629
  }
34629
34630
  function configDotenv(options) {
34630
- const dotenvPath = path2.resolve(process.cwd(), ".env");
34631
+ const dotenvPath = path3.resolve(process.cwd(), ".env");
34631
34632
  let encoding = "utf8";
34632
34633
  const debug = Boolean(options && options.debug);
34633
34634
  if (options && options.encoding) {
@@ -34650,13 +34651,13 @@ var require_main2 = __commonJS({
34650
34651
  }
34651
34652
  let lastError;
34652
34653
  const parsedAll = {};
34653
- for (const path3 of optionPaths) {
34654
+ for (const path4 of optionPaths) {
34654
34655
  try {
34655
- const parsed = DotenvModule.parse(fs3.readFileSync(path3, { encoding }));
34656
+ const parsed = DotenvModule.parse(fs7.readFileSync(path4, { encoding }));
34656
34657
  DotenvModule.populate(parsedAll, parsed, options);
34657
34658
  } catch (e2) {
34658
34659
  if (debug) {
34659
- _debug(`Failed to load ${path3} ${e2.message}`);
34660
+ _debug(`Failed to load ${path4} ${e2.message}`);
34660
34661
  }
34661
34662
  lastError = e2;
34662
34663
  }
@@ -39042,15 +39043,15 @@ var require_streams2 = __commonJS({
39042
39043
  var POOL_SIZE2 = 65536;
39043
39044
  if (!globalThis.ReadableStream) {
39044
39045
  try {
39045
- const process4 = require("process");
39046
- const { emitWarning } = process4;
39046
+ const process9 = require("process");
39047
+ const { emitWarning } = process9;
39047
39048
  try {
39048
- process4.emitWarning = () => {
39049
+ process9.emitWarning = () => {
39049
39050
  };
39050
39051
  Object.assign(globalThis, require("stream/web"));
39051
- process4.emitWarning = emitWarning;
39052
+ process9.emitWarning = emitWarning;
39052
39053
  } catch (error) {
39053
- process4.emitWarning = emitWarning;
39054
+ process9.emitWarning = emitWarning;
39054
39055
  throw error;
39055
39056
  }
39056
39057
  } catch (error) {
@@ -39895,7 +39896,7 @@ var {
39895
39896
  } = import_index.default;
39896
39897
 
39897
39898
  // package.json
39898
- var version = "0.0.23";
39899
+ var version = "0.0.24";
39899
39900
 
39900
39901
  // src/lib/config/text.ts
39901
39902
  var CLI_DESCRIPTION = "GenLayer CLI is a development environment for the GenLayer ecosystem. It allows developers to interact with the protocol by creating accounts, sending transactions, and working with Intelligent Contracts by testing, debugging, and deploying them.";
@@ -40335,18 +40336,18 @@ var proto = Object.defineProperties(() => {
40335
40336
  }
40336
40337
  }
40337
40338
  }));
40338
- var createStyler = (open, close, parent) => {
40339
+ var createStyler = (open2, close, parent) => {
40339
40340
  let openAll;
40340
40341
  let closeAll;
40341
40342
  if (parent === void 0) {
40342
- openAll = open;
40343
+ openAll = open2;
40343
40344
  closeAll = close;
40344
40345
  } else {
40345
- openAll = parent.openAll + open;
40346
+ openAll = parent.openAll + open2;
40346
40347
  closeAll = close + parent.closeAll;
40347
40348
  }
40348
40349
  return {
40349
- open,
40350
+ open: open2,
40350
40351
  close,
40351
40352
  openAll,
40352
40353
  closeAll,
@@ -42509,9 +42510,9 @@ var AI_PROVIDERS_CONFIG = {
42509
42510
  };
42510
42511
 
42511
42512
  // src/lib/services/simulator.ts
42512
- var fs2 = __toESM(require("fs"));
42513
+ var fs6 = __toESM(require("fs"));
42513
42514
  var dotenv = __toESM(require_main2());
42514
- var path = __toESM(require("path"));
42515
+ var path2 = __toESM(require("path"));
42515
42516
 
42516
42517
  // node_modules/node-fetch/src/index.js
42517
42518
  var import_node_http2 = __toESM(require("http"), 1);
@@ -43899,10 +43900,458 @@ var JsonRpcClient = class {
43899
43900
  var rpcClient = new JsonRpcClient(DEFAULT_JSON_RPC_URL);
43900
43901
 
43901
43902
  // src/lib/clients/system.ts
43902
- var import_node_util4 = __toESM(require("util"));
43903
+ var import_node_util8 = __toESM(require("util"));
43903
43904
  var import_child_process = require("child_process");
43904
43905
  var import_os = __toESM(require("os"));
43905
43906
 
43907
+ // node_modules/open/index.js
43908
+ var import_node_process7 = __toESM(require("process"), 1);
43909
+ var import_node_buffer3 = require("buffer");
43910
+ var import_node_path = __toESM(require("path"), 1);
43911
+ var import_node_url2 = require("url");
43912
+ var import_node_child_process5 = __toESM(require("child_process"), 1);
43913
+ var import_promises = __toESM(require("fs/promises"), 1);
43914
+
43915
+ // node_modules/is-wsl/index.js
43916
+ var import_node_process3 = __toESM(require("process"), 1);
43917
+ var import_node_os2 = __toESM(require("os"), 1);
43918
+ var import_node_fs4 = __toESM(require("fs"), 1);
43919
+
43920
+ // node_modules/is-inside-container/index.js
43921
+ var import_node_fs3 = __toESM(require("fs"), 1);
43922
+
43923
+ // node_modules/is-docker/index.js
43924
+ var import_node_fs2 = __toESM(require("fs"), 1);
43925
+ var isDockerCached;
43926
+ function hasDockerEnv() {
43927
+ try {
43928
+ import_node_fs2.default.statSync("/.dockerenv");
43929
+ return true;
43930
+ } catch (e2) {
43931
+ return false;
43932
+ }
43933
+ }
43934
+ function hasDockerCGroup() {
43935
+ try {
43936
+ return import_node_fs2.default.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
43937
+ } catch (e2) {
43938
+ return false;
43939
+ }
43940
+ }
43941
+ function isDocker() {
43942
+ if (isDockerCached === void 0) {
43943
+ isDockerCached = hasDockerEnv() || hasDockerCGroup();
43944
+ }
43945
+ return isDockerCached;
43946
+ }
43947
+
43948
+ // node_modules/is-inside-container/index.js
43949
+ var cachedResult;
43950
+ var hasContainerEnv = () => {
43951
+ try {
43952
+ import_node_fs3.default.statSync("/run/.containerenv");
43953
+ return true;
43954
+ } catch (e2) {
43955
+ return false;
43956
+ }
43957
+ };
43958
+ function isInsideContainer() {
43959
+ if (cachedResult === void 0) {
43960
+ cachedResult = hasContainerEnv() || isDocker();
43961
+ }
43962
+ return cachedResult;
43963
+ }
43964
+
43965
+ // node_modules/is-wsl/index.js
43966
+ var isWsl = () => {
43967
+ if (import_node_process3.default.platform !== "linux") {
43968
+ return false;
43969
+ }
43970
+ if (import_node_os2.default.release().toLowerCase().includes("microsoft")) {
43971
+ if (isInsideContainer()) {
43972
+ return false;
43973
+ }
43974
+ return true;
43975
+ }
43976
+ try {
43977
+ return import_node_fs4.default.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
43978
+ } catch (e2) {
43979
+ return false;
43980
+ }
43981
+ };
43982
+ var is_wsl_default = import_node_process3.default.env.__IS_WSL_TEST__ ? isWsl : isWsl();
43983
+
43984
+ // node_modules/define-lazy-prop/index.js
43985
+ function defineLazyProperty(object, propertyName, valueGetter) {
43986
+ const define2 = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true });
43987
+ Object.defineProperty(object, propertyName, {
43988
+ configurable: true,
43989
+ enumerable: true,
43990
+ get() {
43991
+ const result = valueGetter();
43992
+ define2(result);
43993
+ return result;
43994
+ },
43995
+ set(value) {
43996
+ define2(value);
43997
+ }
43998
+ });
43999
+ return object;
44000
+ }
44001
+
44002
+ // node_modules/default-browser/index.js
44003
+ var import_node_util7 = require("util");
44004
+ var import_node_process6 = __toESM(require("process"), 1);
44005
+ var import_node_child_process4 = require("child_process");
44006
+
44007
+ // node_modules/default-browser-id/index.js
44008
+ var import_node_util4 = require("util");
44009
+ var import_node_process4 = __toESM(require("process"), 1);
44010
+ var import_node_child_process = require("child_process");
44011
+ var execFileAsync = (0, import_node_util4.promisify)(import_node_child_process.execFile);
44012
+ function defaultBrowserId() {
44013
+ return __async(this, null, function* () {
44014
+ var _a4;
44015
+ if (import_node_process4.default.platform !== "darwin") {
44016
+ throw new Error("macOS only");
44017
+ }
44018
+ const { stdout } = yield execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
44019
+ const match = new RegExp('LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\\s+?LSHandlerURLScheme = (?:http|https);').exec(stdout);
44020
+ return (_a4 = match == null ? void 0 : match.groups.id) != null ? _a4 : "com.apple.Safari";
44021
+ });
44022
+ }
44023
+
44024
+ // node_modules/run-applescript/index.js
44025
+ var import_node_process5 = __toESM(require("process"), 1);
44026
+ var import_node_util5 = require("util");
44027
+ var import_node_child_process2 = require("child_process");
44028
+ var execFileAsync2 = (0, import_node_util5.promisify)(import_node_child_process2.execFile);
44029
+ function runAppleScript(_0) {
44030
+ return __async(this, arguments, function* (script, { humanReadableOutput = true } = {}) {
44031
+ if (import_node_process5.default.platform !== "darwin") {
44032
+ throw new Error("macOS only");
44033
+ }
44034
+ const outputArguments = humanReadableOutput ? [] : ["-ss"];
44035
+ const { stdout } = yield execFileAsync2("osascript", ["-e", script, outputArguments]);
44036
+ return stdout.trim();
44037
+ });
44038
+ }
44039
+
44040
+ // node_modules/bundle-name/index.js
44041
+ function bundleName(bundleId) {
44042
+ return __async(this, null, function* () {
44043
+ return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
44044
+ tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
44045
+ });
44046
+ }
44047
+
44048
+ // node_modules/default-browser/windows.js
44049
+ var import_node_util6 = require("util");
44050
+ var import_node_child_process3 = require("child_process");
44051
+ var execFileAsync3 = (0, import_node_util6.promisify)(import_node_child_process3.execFile);
44052
+ var windowsBrowserProgIds = {
44053
+ AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
44054
+ MSEdgeDHTML: { name: "Edge", id: "com.microsoft.edge" },
44055
+ // On macOS, it's "com.microsoft.edgemac"
44056
+ MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
44057
+ // Newer Edge/Win10 releases
44058
+ "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" },
44059
+ FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
44060
+ ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
44061
+ BraveHTML: { name: "Brave", id: "com.brave.Browser" },
44062
+ BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
44063
+ BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" }
44064
+ };
44065
+ var UnknownBrowserError = class extends Error {
44066
+ };
44067
+ function defaultBrowser() {
44068
+ return __async(this, arguments, function* (_execFileAsync = execFileAsync3) {
44069
+ const { stdout } = yield _execFileAsync("reg", [
44070
+ "QUERY",
44071
+ " HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
44072
+ "/v",
44073
+ "ProgId"
44074
+ ]);
44075
+ const match = new RegExp("ProgId\\s*REG_SZ\\s*(?<id>\\S+)").exec(stdout);
44076
+ if (!match) {
44077
+ throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
44078
+ }
44079
+ const { id } = match.groups;
44080
+ const browser = windowsBrowserProgIds[id];
44081
+ if (!browser) {
44082
+ throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
44083
+ }
44084
+ return browser;
44085
+ });
44086
+ }
44087
+
44088
+ // node_modules/default-browser/index.js
44089
+ var execFileAsync4 = (0, import_node_util7.promisify)(import_node_child_process4.execFile);
44090
+ var titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x2) => x2.toUpperCase());
44091
+ function defaultBrowser2() {
44092
+ return __async(this, null, function* () {
44093
+ if (import_node_process6.default.platform === "darwin") {
44094
+ const id = yield defaultBrowserId();
44095
+ const name = yield bundleName(id);
44096
+ return { name, id };
44097
+ }
44098
+ if (import_node_process6.default.platform === "linux") {
44099
+ const { stdout } = yield execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
44100
+ const id = stdout.trim();
44101
+ const name = titleize(id.replace(/.desktop$/, "").replace("-", " "));
44102
+ return { name, id };
44103
+ }
44104
+ if (import_node_process6.default.platform === "win32") {
44105
+ return defaultBrowser();
44106
+ }
44107
+ throw new Error("Only macOS, Linux, and Windows are supported");
44108
+ });
44109
+ }
44110
+
44111
+ // node_modules/open/index.js
44112
+ var __dirname = import_node_path.default.dirname((0, import_node_url2.fileURLToPath)(_importMetaUrl));
44113
+ var localXdgOpenPath = import_node_path.default.join(__dirname, "xdg-open");
44114
+ var { platform, arch } = import_node_process7.default;
44115
+ var getWslDrivesMountPoint = /* @__PURE__ */ (() => {
44116
+ const defaultMountPoint = "/mnt/";
44117
+ let mountPoint;
44118
+ return function() {
44119
+ return __async(this, null, function* () {
44120
+ if (mountPoint) {
44121
+ return mountPoint;
44122
+ }
44123
+ const configFilePath = "/etc/wsl.conf";
44124
+ let isConfigFileExists = false;
44125
+ try {
44126
+ yield import_promises.default.access(configFilePath, import_promises.constants.F_OK);
44127
+ isConfigFileExists = true;
44128
+ } catch (e2) {
44129
+ }
44130
+ if (!isConfigFileExists) {
44131
+ return defaultMountPoint;
44132
+ }
44133
+ const configContent = yield import_promises.default.readFile(configFilePath, { encoding: "utf8" });
44134
+ const configMountPoint = new RegExp("(?<!#.*)root\\s*=\\s*(?<mountPoint>.*)", "g").exec(configContent);
44135
+ if (!configMountPoint) {
44136
+ return defaultMountPoint;
44137
+ }
44138
+ mountPoint = configMountPoint.groups.mountPoint.trim();
44139
+ mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
44140
+ return mountPoint;
44141
+ });
44142
+ };
44143
+ })();
44144
+ var pTryEach = (array, mapper) => __async(void 0, null, function* () {
44145
+ let latestError;
44146
+ for (const item of array) {
44147
+ try {
44148
+ return yield mapper(item);
44149
+ } catch (error) {
44150
+ latestError = error;
44151
+ }
44152
+ }
44153
+ throw latestError;
44154
+ });
44155
+ var baseOpen = (options) => __async(void 0, null, function* () {
44156
+ var _a4, _b;
44157
+ options = __spreadValues({
44158
+ wait: false,
44159
+ background: false,
44160
+ newInstance: false,
44161
+ allowNonzeroExitCode: false
44162
+ }, options);
44163
+ if (Array.isArray(options.app)) {
44164
+ return pTryEach(options.app, (singleApp) => baseOpen(__spreadProps(__spreadValues({}, options), {
44165
+ app: singleApp
44166
+ })));
44167
+ }
44168
+ let { name: app, arguments: appArguments = [] } = (_a4 = options.app) != null ? _a4 : {};
44169
+ appArguments = [...appArguments];
44170
+ if (Array.isArray(app)) {
44171
+ return pTryEach(app, (appName) => baseOpen(__spreadProps(__spreadValues({}, options), {
44172
+ app: {
44173
+ name: appName,
44174
+ arguments: appArguments
44175
+ }
44176
+ })));
44177
+ }
44178
+ if (app === "browser" || app === "browserPrivate") {
44179
+ const ids = {
44180
+ "com.google.chrome": "chrome",
44181
+ "google-chrome.desktop": "chrome",
44182
+ "org.mozilla.firefox": "firefox",
44183
+ "firefox.desktop": "firefox",
44184
+ "com.microsoft.msedge": "edge",
44185
+ "com.microsoft.edge": "edge",
44186
+ "microsoft-edge.desktop": "edge"
44187
+ };
44188
+ const flags = {
44189
+ chrome: "--incognito",
44190
+ firefox: "--private-window",
44191
+ edge: "--inPrivate"
44192
+ };
44193
+ const browser = yield defaultBrowser2();
44194
+ if (browser.id in ids) {
44195
+ const browserName = ids[browser.id];
44196
+ if (app === "browserPrivate") {
44197
+ appArguments.push(flags[browserName]);
44198
+ }
44199
+ return baseOpen(__spreadProps(__spreadValues({}, options), {
44200
+ app: {
44201
+ name: apps[browserName],
44202
+ arguments: appArguments
44203
+ }
44204
+ }));
44205
+ }
44206
+ throw new Error(`${browser.name} is not supported as a default browser`);
44207
+ }
44208
+ let command;
44209
+ const cliArguments = [];
44210
+ const childProcessOptions = {};
44211
+ if (platform === "darwin") {
44212
+ command = "open";
44213
+ if (options.wait) {
44214
+ cliArguments.push("--wait-apps");
44215
+ }
44216
+ if (options.background) {
44217
+ cliArguments.push("--background");
44218
+ }
44219
+ if (options.newInstance) {
44220
+ cliArguments.push("--new");
44221
+ }
44222
+ if (app) {
44223
+ cliArguments.push("-a", app);
44224
+ }
44225
+ } else if (platform === "win32" || is_wsl_default && !isInsideContainer() && !app) {
44226
+ const mountPoint = yield getWslDrivesMountPoint();
44227
+ command = is_wsl_default ? `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe` : `${import_node_process7.default.env.SYSTEMROOT || import_node_process7.default.env.windir || "C:\\Windows"}\\System32\\WindowsPowerShell\\v1.0\\powershell`;
44228
+ cliArguments.push(
44229
+ "-NoProfile",
44230
+ "-NonInteractive",
44231
+ "-ExecutionPolicy",
44232
+ "Bypass",
44233
+ "-EncodedCommand"
44234
+ );
44235
+ if (!is_wsl_default) {
44236
+ childProcessOptions.windowsVerbatimArguments = true;
44237
+ }
44238
+ const encodedArguments = ["Start"];
44239
+ if (options.wait) {
44240
+ encodedArguments.push("-Wait");
44241
+ }
44242
+ if (app) {
44243
+ encodedArguments.push(`"\`"${app}\`""`);
44244
+ if (options.target) {
44245
+ appArguments.push(options.target);
44246
+ }
44247
+ } else if (options.target) {
44248
+ encodedArguments.push(`"${options.target}"`);
44249
+ }
44250
+ if (appArguments.length > 0) {
44251
+ appArguments = appArguments.map((argument) => `"\`"${argument}\`""`);
44252
+ encodedArguments.push("-ArgumentList", appArguments.join(","));
44253
+ }
44254
+ options.target = import_node_buffer3.Buffer.from(encodedArguments.join(" "), "utf16le").toString("base64");
44255
+ } else {
44256
+ if (app) {
44257
+ command = app;
44258
+ } else {
44259
+ const isBundled = !__dirname || __dirname === "/";
44260
+ let exeLocalXdgOpen = false;
44261
+ try {
44262
+ yield import_promises.default.access(localXdgOpenPath, import_promises.constants.X_OK);
44263
+ exeLocalXdgOpen = true;
44264
+ } catch (e2) {
44265
+ }
44266
+ const useSystemXdgOpen = (_b = import_node_process7.default.versions.electron) != null ? _b : platform === "android" || isBundled || !exeLocalXdgOpen;
44267
+ command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
44268
+ }
44269
+ if (appArguments.length > 0) {
44270
+ cliArguments.push(...appArguments);
44271
+ }
44272
+ if (!options.wait) {
44273
+ childProcessOptions.stdio = "ignore";
44274
+ childProcessOptions.detached = true;
44275
+ }
44276
+ }
44277
+ if (platform === "darwin" && appArguments.length > 0) {
44278
+ cliArguments.push("--args", ...appArguments);
44279
+ }
44280
+ if (options.target) {
44281
+ cliArguments.push(options.target);
44282
+ }
44283
+ const subprocess = import_node_child_process5.default.spawn(command, cliArguments, childProcessOptions);
44284
+ if (options.wait) {
44285
+ return new Promise((resolve, reject) => {
44286
+ subprocess.once("error", reject);
44287
+ subprocess.once("close", (exitCode) => {
44288
+ if (!options.allowNonzeroExitCode && exitCode > 0) {
44289
+ reject(new Error(`Exited with code ${exitCode}`));
44290
+ return;
44291
+ }
44292
+ resolve(subprocess);
44293
+ });
44294
+ });
44295
+ }
44296
+ subprocess.unref();
44297
+ return subprocess;
44298
+ });
44299
+ var open = (target, options) => {
44300
+ if (typeof target !== "string") {
44301
+ throw new TypeError("Expected a `target`");
44302
+ }
44303
+ return baseOpen(__spreadProps(__spreadValues({}, options), {
44304
+ target
44305
+ }));
44306
+ };
44307
+ function detectArchBinary(binary) {
44308
+ if (typeof binary === "string" || Array.isArray(binary)) {
44309
+ return binary;
44310
+ }
44311
+ const { [arch]: archBinary } = binary;
44312
+ if (!archBinary) {
44313
+ throw new Error(`${arch} is not supported`);
44314
+ }
44315
+ return archBinary;
44316
+ }
44317
+ function detectPlatformBinary({ [platform]: platformBinary }, { wsl }) {
44318
+ if (wsl && is_wsl_default) {
44319
+ return detectArchBinary(wsl);
44320
+ }
44321
+ if (!platformBinary) {
44322
+ throw new Error(`${platform} is not supported`);
44323
+ }
44324
+ return detectArchBinary(platformBinary);
44325
+ }
44326
+ var apps = {};
44327
+ defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
44328
+ darwin: "google chrome",
44329
+ win32: "chrome",
44330
+ linux: ["google-chrome", "google-chrome-stable", "chromium"]
44331
+ }, {
44332
+ wsl: {
44333
+ ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
44334
+ x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
44335
+ }
44336
+ }));
44337
+ defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
44338
+ darwin: "firefox",
44339
+ win32: "C:\\Program Files\\Mozilla Firefox\\firefox.exe",
44340
+ linux: "firefox"
44341
+ }, {
44342
+ wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
44343
+ }));
44344
+ defineLazyProperty(apps, "edge", () => detectPlatformBinary({
44345
+ darwin: "microsoft edge",
44346
+ win32: "msedge",
44347
+ linux: ["microsoft-edge", "microsoft-edge-dev"]
44348
+ }, {
44349
+ wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
44350
+ }));
44351
+ defineLazyProperty(apps, "browser", () => "browser");
44352
+ defineLazyProperty(apps, "browserPrivate", () => "browserPrivate");
44353
+ var open_default = open;
44354
+
43906
44355
  // src/lib/errors/missingRequirement.ts
43907
44356
  var MissingRequirementError = class extends Error {
43908
44357
  constructor(requirement) {
@@ -43913,7 +44362,7 @@ var MissingRequirementError = class extends Error {
43913
44362
  };
43914
44363
 
43915
44364
  // src/lib/clients/system.ts
43916
- var asyncExec = import_node_util4.default.promisify(import_child_process.exec);
44365
+ var asyncExec = import_node_util8.default.promisify(import_child_process.exec);
43917
44366
  function checkCommand(command, toolName) {
43918
44367
  return __async(this, null, function* () {
43919
44368
  const { stderr } = yield asyncExec(command);
@@ -43951,15 +44400,18 @@ function getPlatform() {
43951
44400
  }
43952
44401
  return currentPlatform;
43953
44402
  }
44403
+ function openUrl(url) {
44404
+ return open_default(url);
44405
+ }
43954
44406
 
43955
44407
  // src/lib/services/simulator.ts
43956
44408
  function getSimulatorLocation() {
43957
- return path.join(getHomeDirectory(), "genlayer-simulator");
44409
+ return path2.join(getHomeDirectory(), "genlayer-simulator");
43958
44410
  }
43959
44411
  function readEnvConfigValue(key) {
43960
44412
  const simulatorLocation = getSimulatorLocation();
43961
- const envFilePath = path.join(simulatorLocation, ".env");
43962
- const envConfig = dotenv.parse(fs2.readFileSync(envFilePath, "utf8"));
44413
+ const envFilePath = path2.join(simulatorLocation, ".env");
44414
+ const envConfig = dotenv.parse(fs6.readFileSync(envFilePath, "utf8"));
43963
44415
  return envConfig[key];
43964
44416
  }
43965
44417
  function sleep(millliseconds) {
@@ -43967,16 +44419,16 @@ function sleep(millliseconds) {
43967
44419
  }
43968
44420
  function addConfigToEnvFile(newConfig) {
43969
44421
  const simulatorLocation = getSimulatorLocation();
43970
- const envFilePath = path.join(simulatorLocation, ".env");
43971
- fs2.writeFileSync(`${envFilePath}.bak`, fs2.readFileSync(envFilePath));
43972
- const envConfig = dotenv.parse(fs2.readFileSync(envFilePath, "utf8"));
44422
+ const envFilePath = path2.join(simulatorLocation, ".env");
44423
+ fs6.writeFileSync(`${envFilePath}.bak`, fs6.readFileSync(envFilePath));
44424
+ const envConfig = dotenv.parse(fs6.readFileSync(envFilePath, "utf8"));
43973
44425
  Object.keys(newConfig).forEach((key) => {
43974
44426
  envConfig[key] = newConfig[key];
43975
44427
  });
43976
44428
  const updatedConfig = Object.keys(envConfig).map((key) => {
43977
44429
  return `${key}=${envConfig[key]}`;
43978
44430
  }).join("\n");
43979
- fs2.writeFileSync(envFilePath, updatedConfig);
44431
+ fs6.writeFileSync(envFilePath, updatedConfig);
43980
44432
  }
43981
44433
  function checkRequirements() {
43982
44434
  return __async(this, null, function* () {
@@ -44011,7 +44463,7 @@ function downloadSimulator() {
44011
44463
  const cmdsByPlatform = { darwin: gitCommand, win32: gitCommand, linux: gitCommand };
44012
44464
  yield executeCommand(cmdsByPlatform, "git");
44013
44465
  } catch (error) {
44014
- const simulatorLocationExists = fs2.existsSync(simulatorLocation);
44466
+ const simulatorLocationExists = fs6.existsSync(simulatorLocation);
44015
44467
  if (simulatorLocationExists) {
44016
44468
  return { wasInstalled: true };
44017
44469
  }
@@ -44040,9 +44492,9 @@ function pullOllamaModel() {
44040
44492
  function configSimulator(newConfig) {
44041
44493
  return __async(this, null, function* () {
44042
44494
  const simulatorLocation = getSimulatorLocation();
44043
- const envExample = path.join(simulatorLocation, ".env.example");
44044
- const envFilePath = path.join(simulatorLocation, ".env");
44045
- fs2.copyFileSync(envExample, envFilePath);
44495
+ const envExample = path2.join(simulatorLocation, ".env.example");
44496
+ const envFilePath = path2.join(simulatorLocation, ".env");
44497
+ fs6.copyFileSync(envExample, envFilePath);
44046
44498
  addConfigToEnvFile(newConfig);
44047
44499
  return true;
44048
44500
  });
@@ -44095,6 +44547,16 @@ function getAiProvidersOptions() {
44095
44547
  return { name: providerConfig.name, value: providerConfig.cliOptionValue };
44096
44548
  });
44097
44549
  }
44550
+ function getFrontendUrl() {
44551
+ const frontendPort = readEnvConfigValue("FRONTEND_PORT");
44552
+ return `http://localhost:${frontendPort}`;
44553
+ }
44554
+ function openFrontend() {
44555
+ return __async(this, null, function* () {
44556
+ yield openUrl(getFrontendUrl());
44557
+ return true;
44558
+ });
44559
+ }
44098
44560
 
44099
44561
  // src/commands/general/init.ts
44100
44562
  function getRequirementsErrorMessage({ git, docker }) {
@@ -44168,7 +44630,7 @@ function initAction(options) {
44168
44630
  const providerConfig = AI_PROVIDERS_CONFIG[provider];
44169
44631
  const questions2 = [
44170
44632
  {
44171
- type: "password",
44633
+ type: "input",
44172
44634
  name: providerConfig.cliOptionValue,
44173
44635
  message: `Please enter your ${providerConfig.name} API Key:`,
44174
44636
  validate: function(value) {
@@ -44238,14 +44700,91 @@ function initAction(options) {
44238
44700
  console.error(error);
44239
44701
  return;
44240
44702
  }
44241
- const frontendPort = readEnvConfigValue("FRONTEND_PORT");
44242
- console.log(`GenLayer simulator initialized successfully! Go to http://localhost:${frontendPort} in your browser to access it.`);
44703
+ console.log(
44704
+ `GenLayer simulator initialized successfully! Go to ${getFrontendUrl()} in your browser to access it.`
44705
+ );
44706
+ try {
44707
+ openFrontend();
44708
+ } catch (error) {
44709
+ console.error(error);
44710
+ }
44711
+ });
44712
+ }
44713
+
44714
+ // src/commands/general/start.ts
44715
+ function startAction(options) {
44716
+ return __async(this, null, function* () {
44717
+ const restartHintText = options.restart ? "restarting the database and validators" : "keeping the database and validators previous configuration";
44718
+ console.log(`Starting GenLayer simulator ${restartHintText}`);
44719
+ console.log(`Updating GenLayer Simulator...`);
44720
+ try {
44721
+ yield updateSimulator();
44722
+ } catch (error) {
44723
+ console.error(error);
44724
+ return;
44725
+ }
44726
+ console.log("Running the GenLayer Simulator...");
44727
+ try {
44728
+ runSimulator();
44729
+ } catch (error) {
44730
+ console.error(error);
44731
+ return;
44732
+ }
44733
+ try {
44734
+ const { initialized, error } = yield waitForSimulatorToBeReady();
44735
+ if (!initialized && error === "ERROR") {
44736
+ console.error("Unable to initialize the GenLayer simulator. Please try again.");
44737
+ return;
44738
+ }
44739
+ if (!initialized && error === "TIMEOUT") {
44740
+ console.error(
44741
+ "The simulator is taking too long to initialize. Please try again after the simulator is ready."
44742
+ );
44743
+ return;
44744
+ }
44745
+ console.log("Simulator is running!");
44746
+ } catch (error) {
44747
+ console.error(error);
44748
+ return;
44749
+ }
44750
+ if (options.restart) {
44751
+ console.log("Initializing the database...");
44752
+ try {
44753
+ yield clearDatabaseTables();
44754
+ const { createResponse, tablesResponse } = yield initializeDatabase();
44755
+ if (!createResponse || !tablesResponse) {
44756
+ console.error("Unable to initialize the database. Please try again.");
44757
+ return;
44758
+ }
44759
+ } catch (error) {
44760
+ console.error(error);
44761
+ return;
44762
+ }
44763
+ console.log("Initializing validators...");
44764
+ try {
44765
+ yield deleteAllValidators();
44766
+ yield createRandomValidators();
44767
+ } catch (error) {
44768
+ console.error("Unable to initialize the validators.");
44769
+ console.error(error);
44770
+ return;
44771
+ }
44772
+ }
44773
+ console.log(
44774
+ `GenLayer simulator initialized successfully! Go to ${getFrontendUrl()} in your browser to access it.`
44775
+ );
44776
+ try {
44777
+ openFrontend();
44778
+ } catch (error) {
44779
+ console.error(error);
44780
+ }
44243
44781
  });
44244
44782
  }
44245
44783
 
44246
44784
  // src/commands/general/index.ts
44247
44785
  function initializeGeneralCommands(program2) {
44248
44786
  program2.command("init").description("Initialize the GenLayer Environment").option("-n, --numValidators <numValidators>", "Number of validators", "5").action(initAction);
44787
+ program2.command("up").description("Starts GenLayer's simulator").option("-nr, --no-restart", "Don't restart the database and validators", true).action(startAction);
44249
44788
  return program2;
44250
44789
  }
44251
44790