wxt 0.17.12 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
36
+ // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
37
37
  var require_windows = __commonJS({
38
- "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module2) {
38
+ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) {
39
39
  "use strict";
40
40
  module2.exports = isexe;
41
41
  isexe.sync = sync;
@@ -50,8 +50,8 @@ var require_windows = __commonJS({
50
50
  return true;
51
51
  }
52
52
  for (var i = 0; i < pathext.length; i++) {
53
- var p = pathext[i].toLowerCase();
54
- if (p && path13.substr(-p.length).toLowerCase() === p) {
53
+ var p2 = pathext[i].toLowerCase();
54
+ if (p2 && path13.substr(-p2.length).toLowerCase() === p2) {
55
55
  return true;
56
56
  }
57
57
  }
@@ -74,9 +74,9 @@ var require_windows = __commonJS({
74
74
  }
75
75
  });
76
76
 
77
- // node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
77
+ // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
78
78
  var require_mode = __commonJS({
79
- "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module2) {
79
+ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) {
80
80
  "use strict";
81
81
  module2.exports = isexe;
82
82
  isexe.sync = sync;
@@ -99,18 +99,18 @@ var require_mode = __commonJS({
99
99
  var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
100
100
  var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
101
101
  var u = parseInt("100", 8);
102
- var g = parseInt("010", 8);
102
+ var g2 = parseInt("010", 8);
103
103
  var o = parseInt("001", 8);
104
- var ug = u | g;
105
- var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
104
+ var ug = u | g2;
105
+ var ret = mod & o || mod & g2 && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
106
106
  return ret;
107
107
  }
108
108
  }
109
109
  });
110
110
 
111
- // node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
111
+ // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
112
112
  var require_isexe = __commonJS({
113
- "node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module2) {
113
+ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
114
114
  "use strict";
115
115
  var fs17 = require("fs");
116
116
  var core;
@@ -130,12 +130,12 @@ var require_isexe = __commonJS({
130
130
  if (typeof Promise !== "function") {
131
131
  throw new TypeError("callback not provided");
132
132
  }
133
- return new Promise(function(resolve13, reject) {
133
+ return new Promise(function(resolve14, reject) {
134
134
  isexe(path13, options || {}, function(er, is) {
135
135
  if (er) {
136
136
  reject(er);
137
137
  } else {
138
- resolve13(is);
138
+ resolve14(is);
139
139
  }
140
140
  });
141
141
  });
@@ -164,26 +164,26 @@ var require_isexe = __commonJS({
164
164
  }
165
165
  });
166
166
 
167
- // node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
167
+ // ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
168
168
  var require_which = __commonJS({
169
- "node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module2) {
169
+ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
170
170
  "use strict";
171
- var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
171
+ var isWindows2 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
172
172
  var path13 = require("path");
173
- var COLON = isWindows ? ";" : ":";
173
+ var COLON = isWindows2 ? ";" : ":";
174
174
  var isexe = require_isexe();
175
175
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
176
176
  var getPathInfo = (cmd, opt) => {
177
177
  const colon = opt.colon || COLON;
178
- const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
178
+ const pathEnv = cmd.match(/\//) || isWindows2 && cmd.match(/\\/) ? [""] : [
179
179
  // windows always checks the cwd first
180
- ...isWindows ? [process.cwd()] : [],
180
+ ...isWindows2 ? [process.cwd()] : [],
181
181
  ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
182
182
  "").split(colon)
183
183
  ];
184
- const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
185
- const pathExt = isWindows ? pathExtExe.split(colon) : [""];
186
- if (isWindows) {
184
+ const pathExtExe = isWindows2 ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
185
+ const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
186
+ if (isWindows2) {
187
187
  if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
188
188
  pathExt.unshift("");
189
189
  }
@@ -202,27 +202,27 @@ var require_which = __commonJS({
202
202
  opt = {};
203
203
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
204
204
  const found = [];
205
- const step = (i) => new Promise((resolve13, reject) => {
205
+ const step = (i) => new Promise((resolve14, reject) => {
206
206
  if (i === pathEnv.length)
207
- return opt.all && found.length ? resolve13(found) : reject(getNotFoundError(cmd));
207
+ return opt.all && found.length ? resolve14(found) : reject(getNotFoundError(cmd));
208
208
  const ppRaw = pathEnv[i];
209
209
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
210
210
  const pCmd = path13.join(pathPart, cmd);
211
- const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
212
- resolve13(subStep(p, i, 0));
211
+ const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
212
+ resolve14(subStep(p2, i, 0));
213
213
  });
214
- const subStep = (p, i, ii) => new Promise((resolve13, reject) => {
214
+ const subStep = (p2, i, ii) => new Promise((resolve14, reject) => {
215
215
  if (ii === pathExt.length)
216
- return resolve13(step(i + 1));
216
+ return resolve14(step(i + 1));
217
217
  const ext = pathExt[ii];
218
- isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
218
+ isexe(p2 + ext, { pathExt: pathExtExe }, (er, is) => {
219
219
  if (!er && is) {
220
220
  if (opt.all)
221
- found.push(p + ext);
221
+ found.push(p2 + ext);
222
222
  else
223
- return resolve13(p + ext);
223
+ return resolve14(p2 + ext);
224
224
  }
225
- return resolve13(subStep(p, i, ii + 1));
225
+ return resolve14(subStep(p2, i, ii + 1));
226
226
  });
227
227
  });
228
228
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -235,9 +235,9 @@ var require_which = __commonJS({
235
235
  const ppRaw = pathEnv[i];
236
236
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
237
237
  const pCmd = path13.join(pathPart, cmd);
238
- const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
239
- for (let j = 0; j < pathExt.length; j++) {
240
- const cur = p + pathExt[j];
238
+ const p2 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
239
+ for (let j2 = 0; j2 < pathExt.length; j2++) {
240
+ const cur = p2 + pathExt[j2];
241
241
  try {
242
242
  const is = isexe.sync(cur, { pathExt: pathExtExe });
243
243
  if (is) {
@@ -261,14 +261,14 @@ var require_which = __commonJS({
261
261
  }
262
262
  });
263
263
 
264
- // node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
264
+ // ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
265
265
  var require_path_key = __commonJS({
266
- "node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module2) {
266
+ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) {
267
267
  "use strict";
268
268
  var pathKey2 = (options = {}) => {
269
269
  const environment = options.env || process.env;
270
- const platform = options.platform || process.platform;
271
- if (platform !== "win32") {
270
+ const platform2 = options.platform || process.platform;
271
+ if (platform2 !== "win32") {
272
272
  return "PATH";
273
273
  }
274
274
  return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
@@ -278,15 +278,15 @@ var require_path_key = __commonJS({
278
278
  }
279
279
  });
280
280
 
281
- // node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js
281
+ // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js
282
282
  var require_resolveCommand = __commonJS({
283
- "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) {
283
+ "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
284
284
  "use strict";
285
285
  var path13 = require("path");
286
286
  var which = require_which();
287
287
  var getPathKey = require_path_key();
288
288
  function resolveCommandAttempt(parsed, withoutPathExt) {
289
- const env = parsed.options.env || process.env;
289
+ const env2 = parsed.options.env || process.env;
290
290
  const cwd = process.cwd();
291
291
  const hasCustomCwd = parsed.options.cwd != null;
292
292
  const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
@@ -299,7 +299,7 @@ var require_resolveCommand = __commonJS({
299
299
  let resolved;
300
300
  try {
301
301
  resolved = which.sync(parsed.command, {
302
- path: env[getPathKey({ env })],
302
+ path: env2[getPathKey({ env: env2 })],
303
303
  pathExt: withoutPathExt ? path13.delimiter : void 0
304
304
  });
305
305
  } catch (e) {
@@ -320,9 +320,9 @@ var require_resolveCommand = __commonJS({
320
320
  }
321
321
  });
322
322
 
323
- // node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js
323
+ // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js
324
324
  var require_escape = __commonJS({
325
- "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports, module2) {
325
+ "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
326
326
  "use strict";
327
327
  var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
328
328
  function escapeCommand(arg) {
@@ -345,17 +345,17 @@ var require_escape = __commonJS({
345
345
  }
346
346
  });
347
347
 
348
- // node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
348
+ // ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
349
349
  var require_shebang_regex = __commonJS({
350
- "node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module2) {
350
+ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) {
351
351
  "use strict";
352
352
  module2.exports = /^#!(.*)/;
353
353
  }
354
354
  });
355
355
 
356
- // node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
356
+ // ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
357
357
  var require_shebang_command = __commonJS({
358
- "node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module2) {
358
+ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) {
359
359
  "use strict";
360
360
  var shebangRegex = require_shebang_regex();
361
361
  module2.exports = (string = "") => {
@@ -373,9 +373,9 @@ var require_shebang_command = __commonJS({
373
373
  }
374
374
  });
375
375
 
376
- // node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js
376
+ // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js
377
377
  var require_readShebang = __commonJS({
378
- "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) {
378
+ "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
379
379
  "use strict";
380
380
  var fs17 = require("fs");
381
381
  var shebangCommand = require_shebang_command();
@@ -395,9 +395,9 @@ var require_readShebang = __commonJS({
395
395
  }
396
396
  });
397
397
 
398
- // node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js
398
+ // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js
399
399
  var require_parse = __commonJS({
400
- "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports, module2) {
400
+ "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
401
401
  "use strict";
402
402
  var path13 = require("path");
403
403
  var resolveCommand = require_resolveCommand();
@@ -457,9 +457,9 @@ var require_parse = __commonJS({
457
457
  }
458
458
  });
459
459
 
460
- // node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js
460
+ // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js
461
461
  var require_enoent = __commonJS({
462
- "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports, module2) {
462
+ "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
463
463
  "use strict";
464
464
  var isWin = process.platform === "win32";
465
465
  function notFoundError(original, syscall) {
@@ -507,9 +507,9 @@ var require_enoent = __commonJS({
507
507
  }
508
508
  });
509
509
 
510
- // node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js
510
+ // ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js
511
511
  var require_cross_spawn = __commonJS({
512
- "node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports, module2) {
512
+ "../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports2, module2) {
513
513
  "use strict";
514
514
  var cp = require("child_process");
515
515
  var parse = require_parse();
@@ -534,7 +534,7 @@ var require_cross_spawn = __commonJS({
534
534
  }
535
535
  });
536
536
 
537
- // node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js
537
+ // ../../node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js
538
538
  function stripFinalNewline(input) {
539
539
  const LF = typeof input === "string" ? "\n" : "\n".charCodeAt();
540
540
  const CR = typeof input === "string" ? "\r" : "\r".charCodeAt();
@@ -547,29 +547,29 @@ function stripFinalNewline(input) {
547
547
  return input;
548
548
  }
549
549
  var init_strip_final_newline = __esm({
550
- "node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js"() {
550
+ "../../node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js"() {
551
551
  "use strict";
552
552
  }
553
553
  });
554
554
 
555
- // node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
555
+ // ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
556
556
  function pathKey(options = {}) {
557
557
  const {
558
- env = process.env,
559
- platform = process.platform
558
+ env: env2 = process.env,
559
+ platform: platform2 = process.platform
560
560
  } = options;
561
- if (platform !== "win32") {
561
+ if (platform2 !== "win32") {
562
562
  return "PATH";
563
563
  }
564
- return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
564
+ return Object.keys(env2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
565
565
  }
566
566
  var init_path_key = __esm({
567
- "node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js"() {
567
+ "../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js"() {
568
568
  "use strict";
569
569
  }
570
570
  });
571
571
 
572
- // node_modules/.pnpm/npm-run-path@5.1.0/node_modules/npm-run-path/index.js
572
+ // ../../node_modules/.pnpm/npm-run-path@5.1.0/node_modules/npm-run-path/index.js
573
573
  function npmRunPath(options = {}) {
574
574
  const {
575
575
  cwd = import_node_process.default.cwd(),
@@ -588,16 +588,16 @@ function npmRunPath(options = {}) {
588
588
  result.push(import_node_path2.default.resolve(cwdString, execPath, ".."));
589
589
  return [...result, path_].join(import_node_path2.default.delimiter);
590
590
  }
591
- function npmRunPathEnv({ env = import_node_process.default.env, ...options } = {}) {
592
- env = { ...env };
593
- const path13 = pathKey({ env });
594
- options.path = env[path13];
595
- env[path13] = npmRunPath(options);
596
- return env;
591
+ function npmRunPathEnv({ env: env2 = import_node_process.default.env, ...options } = {}) {
592
+ env2 = { ...env2 };
593
+ const path13 = pathKey({ env: env2 });
594
+ options.path = env2[path13];
595
+ env2[path13] = npmRunPath(options);
596
+ return env2;
597
597
  }
598
598
  var import_node_process, import_node_path2, import_node_url;
599
599
  var init_npm_run_path = __esm({
600
- "node_modules/.pnpm/npm-run-path@5.1.0/node_modules/npm-run-path/index.js"() {
600
+ "../../node_modules/.pnpm/npm-run-path@5.1.0/node_modules/npm-run-path/index.js"() {
601
601
  "use strict";
602
602
  import_node_process = __toESM(require("process"), 1);
603
603
  import_node_path2 = __toESM(require("path"), 1);
@@ -606,7 +606,7 @@ var init_npm_run_path = __esm({
606
606
  }
607
607
  });
608
608
 
609
- // node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js
609
+ // ../../node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js
610
610
  function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
611
611
  const { name } = to;
612
612
  for (const property of Reflect.ownKeys(from)) {
@@ -618,7 +618,7 @@ function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
618
618
  }
619
619
  var copyProperty, canCopyProperty, changePrototype, wrappedToString, toStringDescriptor, toStringName, changeToString;
620
620
  var init_mimic_fn = __esm({
621
- "node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js"() {
621
+ "../../node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js"() {
622
622
  "use strict";
623
623
  copyProperty = (to, from, property, ignoreNonConfigurable) => {
624
624
  if (property === "length" || property === "prototype") {
@@ -657,10 +657,10 @@ ${fromBody}`;
657
657
  }
658
658
  });
659
659
 
660
- // node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js
660
+ // ../../node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js
661
661
  var calledFunctions, onetime, onetime_default;
662
662
  var init_onetime = __esm({
663
- "node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js"() {
663
+ "../../node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js"() {
664
664
  "use strict";
665
665
  init_mimic_fn();
666
666
  calledFunctions = /* @__PURE__ */ new WeakMap();
@@ -695,10 +695,10 @@ var init_onetime = __esm({
695
695
  }
696
696
  });
697
697
 
698
- // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/realtime.js
698
+ // ../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/realtime.js
699
699
  var getRealtimeSignals, getRealtimeSignal, SIGRTMIN, SIGRTMAX;
700
700
  var init_realtime = __esm({
701
- "node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/realtime.js"() {
701
+ "../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/realtime.js"() {
702
702
  "use strict";
703
703
  getRealtimeSignals = () => {
704
704
  const length = SIGRTMAX - SIGRTMIN + 1;
@@ -716,10 +716,10 @@ var init_realtime = __esm({
716
716
  }
717
717
  });
718
718
 
719
- // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/core.js
719
+ // ../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/core.js
720
720
  var SIGNALS;
721
721
  var init_core = __esm({
722
- "node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/core.js"() {
722
+ "../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/core.js"() {
723
723
  "use strict";
724
724
  SIGNALS = [
725
725
  {
@@ -995,10 +995,10 @@ var init_core = __esm({
995
995
  }
996
996
  });
997
997
 
998
- // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/signals.js
998
+ // ../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/signals.js
999
999
  var import_node_os, getSignals, normalizeSignal;
1000
1000
  var init_signals = __esm({
1001
- "node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/signals.js"() {
1001
+ "../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/signals.js"() {
1002
1002
  "use strict";
1003
1003
  import_node_os = require("os");
1004
1004
  init_core();
@@ -1026,10 +1026,10 @@ var init_signals = __esm({
1026
1026
  }
1027
1027
  });
1028
1028
 
1029
- // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/main.js
1029
+ // ../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/main.js
1030
1030
  var import_node_os2, getSignalsByName, getSignalByName, signalsByName, getSignalsByNumber, getSignalByNumber, findSignalByNumber, signalsByNumber;
1031
1031
  var init_main = __esm({
1032
- "node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/main.js"() {
1032
+ "../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/main.js"() {
1033
1033
  "use strict";
1034
1034
  import_node_os2 = require("os");
1035
1035
  init_realtime();
@@ -1086,10 +1086,10 @@ var init_main = __esm({
1086
1086
  }
1087
1087
  });
1088
1088
 
1089
- // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/error.js
1089
+ // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/error.js
1090
1090
  var import_node_process2, getErrorPrefix, makeError;
1091
1091
  var init_error = __esm({
1092
- "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/error.js"() {
1092
+ "../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/error.js"() {
1093
1093
  "use strict";
1094
1094
  import_node_process2 = __toESM(require("process"), 1);
1095
1095
  init_main();
@@ -1112,7 +1112,7 @@ var init_error = __esm({
1112
1112
  return "failed";
1113
1113
  };
1114
1114
  makeError = ({
1115
- stdout,
1115
+ stdout: stdout2,
1116
1116
  stderr,
1117
1117
  all,
1118
1118
  error,
@@ -1134,7 +1134,7 @@ var init_error = __esm({
1134
1134
  const isError = Object.prototype.toString.call(error) === "[object Error]";
1135
1135
  const shortMessage = isError ? `${execaMessage}
1136
1136
  ${error.message}` : execaMessage;
1137
- const message = [shortMessage, stderr, stdout].filter(Boolean).join("\n");
1137
+ const message = [shortMessage, stderr, stdout2].filter(Boolean).join("\n");
1138
1138
  if (isError) {
1139
1139
  error.originalMessage = error.message;
1140
1140
  error.message = message;
@@ -1147,7 +1147,7 @@ ${error.message}` : execaMessage;
1147
1147
  error.exitCode = exitCode;
1148
1148
  error.signal = signal;
1149
1149
  error.signalDescription = signalDescription;
1150
- error.stdout = stdout;
1150
+ error.stdout = stdout2;
1151
1151
  error.stderr = stderr;
1152
1152
  error.cwd = cwd;
1153
1153
  if (all !== void 0) {
@@ -1165,10 +1165,10 @@ ${error.message}` : execaMessage;
1165
1165
  }
1166
1166
  });
1167
1167
 
1168
- // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stdio.js
1168
+ // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stdio.js
1169
1169
  var aliases, hasAlias, normalizeStdio, normalizeStdioNode;
1170
1170
  var init_stdio = __esm({
1171
- "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stdio.js"() {
1171
+ "../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stdio.js"() {
1172
1172
  "use strict";
1173
1173
  aliases = ["stdin", "stdout", "stderr"];
1174
1174
  hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0);
@@ -1208,10 +1208,10 @@ var init_stdio = __esm({
1208
1208
  }
1209
1209
  });
1210
1210
 
1211
- // node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
1211
+ // ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
1212
1212
  var signals;
1213
1213
  var init_signals2 = __esm({
1214
- "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js"() {
1214
+ "../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js"() {
1215
1215
  "use strict";
1216
1216
  signals = [];
1217
1217
  signals.push("SIGHUP", "SIGINT", "SIGTERM");
@@ -1238,10 +1238,10 @@ var init_signals2 = __esm({
1238
1238
  }
1239
1239
  });
1240
1240
 
1241
- // node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
1241
+ // ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
1242
1242
  var processOk, kExitEmitter, global2, ObjectDefineProperty, Emitter, SignalExitBase, signalExitWrap, SignalExitFallback, SignalExit, process4, onExit, load, unload;
1243
1243
  var init_mjs = __esm({
1244
- "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js"() {
1244
+ "../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js"() {
1245
1245
  "use strict";
1246
1246
  init_signals2();
1247
1247
  processOk = (process7) => !!process7 && typeof process7 === "object" && typeof process7.removeListener === "function" && typeof process7.emit === "function" && typeof process7.reallyExit === "function" && typeof process7.listeners === "function" && typeof process7.kill === "function" && typeof process7.pid === "number" && typeof process7.on === "function";
@@ -1345,16 +1345,16 @@ var init_mjs = __esm({
1345
1345
  this.#sigListeners[sig] = () => {
1346
1346
  const listeners = this.#process.listeners(sig);
1347
1347
  let { count } = this.#emitter;
1348
- const p = process7;
1349
- if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
1350
- count += p.__signal_exit_emitter__.count;
1348
+ const p2 = process7;
1349
+ if (typeof p2.__signal_exit_emitter__ === "object" && typeof p2.__signal_exit_emitter__.count === "number") {
1350
+ count += p2.__signal_exit_emitter__.count;
1351
1351
  }
1352
1352
  if (listeners.length === count) {
1353
1353
  this.unload();
1354
1354
  const ret = this.#emitter.emit("exit", null, sig);
1355
- const s = sig === "SIGHUP" ? this.#hupSig : sig;
1355
+ const s3 = sig === "SIGHUP" ? this.#hupSig : sig;
1356
1356
  if (!ret)
1357
- process7.kill(process7.pid, s);
1357
+ process7.kill(process7.pid, s3);
1358
1358
  }
1359
1359
  };
1360
1360
  }
@@ -1389,7 +1389,7 @@ var init_mjs = __esm({
1389
1389
  const fn = this.#sigListeners[sig];
1390
1390
  if (fn)
1391
1391
  this.#process.on(sig, fn);
1392
- } catch (_) {
1392
+ } catch (_2) {
1393
1393
  }
1394
1394
  }
1395
1395
  this.#process.emit = (ev, ...a) => {
@@ -1411,7 +1411,7 @@ var init_mjs = __esm({
1411
1411
  }
1412
1412
  try {
1413
1413
  this.#process.removeListener(sig, listener);
1414
- } catch (_) {
1414
+ } catch (_2) {
1415
1415
  }
1416
1416
  });
1417
1417
  this.#process.emit = this.#originalProcessEmit;
@@ -1478,10 +1478,10 @@ var init_mjs = __esm({
1478
1478
  }
1479
1479
  });
1480
1480
 
1481
- // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/kill.js
1481
+ // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/kill.js
1482
1482
  var import_node_os3, DEFAULT_FORCE_KILL_TIMEOUT, spawnedKill, setKillTimeout, shouldForceKill, isSigterm, getForceKillAfterTimeout, spawnedCancel, timeoutKill, setupTimeout, validateTimeout, setExitHandler;
1483
1483
  var init_kill = __esm({
1484
- "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/kill.js"() {
1484
+ "../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/kill.js"() {
1485
1485
  "use strict";
1486
1486
  import_node_os3 = __toESM(require("os"), 1);
1487
1487
  init_mjs();
@@ -1529,7 +1529,7 @@ var init_kill = __esm({
1529
1529
  return spawnedPromise;
1530
1530
  }
1531
1531
  let timeoutId;
1532
- const timeoutPromise = new Promise((resolve13, reject) => {
1532
+ const timeoutPromise = new Promise((resolve14, reject) => {
1533
1533
  timeoutId = setTimeout(() => {
1534
1534
  timeoutKill(spawned, killSignal, reject);
1535
1535
  }, timeout);
@@ -1558,7 +1558,7 @@ var init_kill = __esm({
1558
1558
  }
1559
1559
  });
1560
1560
 
1561
- // node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js
1561
+ // ../../node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js
1562
1562
  function isStream(stream) {
1563
1563
  return stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
1564
1564
  }
@@ -1566,15 +1566,15 @@ function isWritableStream(stream) {
1566
1566
  return isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
1567
1567
  }
1568
1568
  var init_is_stream = __esm({
1569
- "node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js"() {
1569
+ "../../node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js"() {
1570
1570
  "use strict";
1571
1571
  }
1572
1572
  });
1573
1573
 
1574
- // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/pipe.js
1574
+ // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/pipe.js
1575
1575
  var import_node_fs, import_node_child_process, isExecaChildProcess, pipeToTarget, addPipeMethods;
1576
1576
  var init_pipe = __esm({
1577
- "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/pipe.js"() {
1577
+ "../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/pipe.js"() {
1578
1578
  "use strict";
1579
1579
  import_node_fs = require("fs");
1580
1580
  import_node_child_process = require("child_process");
@@ -1612,16 +1612,16 @@ var init_pipe = __esm({
1612
1612
  }
1613
1613
  });
1614
1614
 
1615
- // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.js
1615
+ // ../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.js
1616
1616
  var getStreamContents, appendFinalChunk, appendChunk, addNewChunk, isAsyncIterable, getChunkType, objectToString, MaxBufferError;
1617
1617
  var init_contents = __esm({
1618
- "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.js"() {
1618
+ "../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.js"() {
1619
1619
  "use strict";
1620
- getStreamContents = async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
1620
+ getStreamContents = async (stream, { init: init2, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
1621
1621
  if (!isAsyncIterable(stream)) {
1622
1622
  throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
1623
1623
  }
1624
- const state = init();
1624
+ const state = init2();
1625
1625
  state.length = 0;
1626
1626
  try {
1627
1627
  for await (const chunk of stream) {
@@ -1693,10 +1693,10 @@ var init_contents = __esm({
1693
1693
  }
1694
1694
  });
1695
1695
 
1696
- // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.js
1696
+ // ../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.js
1697
1697
  var identity, noop, getContentsProp, throwObjectStream, getLengthProp;
1698
1698
  var init_utils = __esm({
1699
- "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.js"() {
1699
+ "../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.js"() {
1700
1700
  "use strict";
1701
1701
  identity = (value) => value;
1702
1702
  noop = () => void 0;
@@ -1708,22 +1708,22 @@ var init_utils = __esm({
1708
1708
  }
1709
1709
  });
1710
1710
 
1711
- // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array.js
1711
+ // ../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array.js
1712
1712
  var init_array = __esm({
1713
- "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array.js"() {
1713
+ "../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array.js"() {
1714
1714
  "use strict";
1715
1715
  init_contents();
1716
1716
  init_utils();
1717
1717
  }
1718
1718
  });
1719
1719
 
1720
- // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.js
1720
+ // ../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.js
1721
1721
  async function getStreamAsArrayBuffer(stream, options) {
1722
1722
  return getStreamContents(stream, arrayBufferMethods, options);
1723
1723
  }
1724
1724
  var initArrayBuffer, useTextEncoder, textEncoder, useUint8Array, useUint8ArrayWithOffset, truncateArrayBufferChunk, addArrayBufferChunk, resizeArrayBufferSlow, resizeArrayBuffer, getNewContentsLength, SCALE_FACTOR, finalizeArrayBuffer, hasArrayBufferResize, arrayBufferMethods;
1725
1725
  var init_array_buffer = __esm({
1726
- "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.js"() {
1726
+ "../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.js"() {
1727
1727
  "use strict";
1728
1728
  init_contents();
1729
1729
  init_utils();
@@ -1778,7 +1778,7 @@ var init_array_buffer = __esm({
1778
1778
  }
1779
1779
  });
1780
1780
 
1781
- // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.js
1781
+ // ../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.js
1782
1782
  async function getStreamAsBuffer(stream, options) {
1783
1783
  if (!("Buffer" in globalThis)) {
1784
1784
  throw new Error("getStreamAsBuffer() is only supported in Node.js");
@@ -1794,20 +1794,20 @@ async function getStreamAsBuffer(stream, options) {
1794
1794
  }
1795
1795
  var arrayBufferToNodeBuffer;
1796
1796
  var init_buffer = __esm({
1797
- "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.js"() {
1797
+ "../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.js"() {
1798
1798
  "use strict";
1799
1799
  init_array_buffer();
1800
1800
  arrayBufferToNodeBuffer = (arrayBuffer) => globalThis.Buffer.from(arrayBuffer);
1801
1801
  }
1802
1802
  });
1803
1803
 
1804
- // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.js
1804
+ // ../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.js
1805
1805
  async function getStreamAsString(stream, options) {
1806
1806
  return getStreamContents(stream, stringMethods, options);
1807
1807
  }
1808
1808
  var initString, useTextDecoder, addStringChunk, truncateStringChunk, getFinalStringChunk, stringMethods;
1809
1809
  var init_string = __esm({
1810
- "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.js"() {
1810
+ "../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.js"() {
1811
1811
  "use strict";
1812
1812
  init_contents();
1813
1813
  init_utils();
@@ -1838,9 +1838,9 @@ var init_string = __esm({
1838
1838
  }
1839
1839
  });
1840
1840
 
1841
- // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/index.js
1841
+ // ../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/index.js
1842
1842
  var init_source = __esm({
1843
- "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/index.js"() {
1843
+ "../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/index.js"() {
1844
1844
  "use strict";
1845
1845
  init_array();
1846
1846
  init_array_buffer();
@@ -1850,9 +1850,9 @@ var init_source = __esm({
1850
1850
  }
1851
1851
  });
1852
1852
 
1853
- // node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js
1853
+ // ../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js
1854
1854
  var require_merge_stream = __commonJS({
1855
- "node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports, module2) {
1855
+ "../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports2, module2) {
1856
1856
  "use strict";
1857
1857
  var { PassThrough } = require("stream");
1858
1858
  module2.exports = function() {
@@ -1890,10 +1890,10 @@ var require_merge_stream = __commonJS({
1890
1890
  }
1891
1891
  });
1892
1892
 
1893
- // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stream.js
1893
+ // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stream.js
1894
1894
  var import_node_fs2, import_promises, import_merge_stream, validateInputOptions, getInputSync, handleInputSync, getInput, handleInput, makeAllStream, getBufferedData, getStreamPromise, applyEncoding, getSpawnedResult;
1895
1895
  var init_stream = __esm({
1896
- "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stream.js"() {
1896
+ "../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stream.js"() {
1897
1897
  "use strict";
1898
1898
  import_node_fs2 = require("fs");
1899
1899
  import_promises = require("timers/promises");
@@ -1978,8 +1978,8 @@ var init_stream = __esm({
1978
1978
  const buffer = await getStreamAsBuffer(stream, { maxBuffer });
1979
1979
  return buffer.toString(encoding);
1980
1980
  };
1981
- getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
1982
- const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer });
1981
+ getSpawnedResult = async ({ stdout: stdout2, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
1982
+ const stdoutPromise = getStreamPromise(stdout2, { encoding, buffer, maxBuffer });
1983
1983
  const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer });
1984
1984
  const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 });
1985
1985
  try {
@@ -1987,7 +1987,7 @@ var init_stream = __esm({
1987
1987
  } catch (error) {
1988
1988
  return Promise.all([
1989
1989
  { error, signal: error.signal, timedOut: error.timedOut },
1990
- getBufferedData(stdout, stdoutPromise),
1990
+ getBufferedData(stdout2, stdoutPromise),
1991
1991
  getBufferedData(stderr, stderrPromise),
1992
1992
  getBufferedData(all, allPromise)
1993
1993
  ]);
@@ -1996,10 +1996,10 @@ var init_stream = __esm({
1996
1996
  }
1997
1997
  });
1998
1998
 
1999
- // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/promise.js
1999
+ // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/promise.js
2000
2000
  var nativePromisePrototype, descriptors, mergePromise, getSpawnedPromise;
2001
2001
  var init_promise = __esm({
2002
- "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/promise.js"() {
2002
+ "../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/promise.js"() {
2003
2003
  "use strict";
2004
2004
  nativePromisePrototype = (async () => {
2005
2005
  })().constructor.prototype;
@@ -2013,9 +2013,9 @@ var init_promise = __esm({
2013
2013
  Reflect.defineProperty(spawned, property, { ...descriptor, value });
2014
2014
  }
2015
2015
  };
2016
- getSpawnedPromise = (spawned) => new Promise((resolve13, reject) => {
2016
+ getSpawnedPromise = (spawned) => new Promise((resolve14, reject) => {
2017
2017
  spawned.on("exit", (exitCode, signal) => {
2018
- resolve13({ exitCode, signal });
2018
+ resolve14({ exitCode, signal });
2019
2019
  });
2020
2020
  spawned.on("error", (error) => {
2021
2021
  reject(error);
@@ -2029,10 +2029,10 @@ var init_promise = __esm({
2029
2029
  }
2030
2030
  });
2031
2031
 
2032
- // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/command.js
2032
+ // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/command.js
2033
2033
  var import_node_buffer, import_node_child_process2, normalizeArgs, NO_ESCAPE_REGEXP, escapeArg, joinCommand, getEscapedCommand, SPACES_REGEXP, parseCommand, parseExpression, concatTokens, parseTemplate, parseTemplates;
2034
2034
  var init_command = __esm({
2035
- "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/command.js"() {
2035
+ "../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/command.js"() {
2036
2036
  "use strict";
2037
2037
  import_node_buffer = require("buffer");
2038
2038
  import_node_child_process2 = require("child_process");
@@ -2118,10 +2118,10 @@ var init_command = __esm({
2118
2118
  }
2119
2119
  });
2120
2120
 
2121
- // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/verbose.js
2121
+ // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/verbose.js
2122
2122
  var import_node_util, import_node_process3, verboseDefault, padField, getTimestamp, logCommand;
2123
2123
  var init_verbose = __esm({
2124
- "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/verbose.js"() {
2124
+ "../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/verbose.js"() {
2125
2125
  "use strict";
2126
2126
  import_node_util = require("util");
2127
2127
  import_node_process3 = __toESM(require("process"), 1);
@@ -2141,7 +2141,7 @@ var init_verbose = __esm({
2141
2141
  }
2142
2142
  });
2143
2143
 
2144
- // node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js
2144
+ // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js
2145
2145
  var execa_exports = {};
2146
2146
  __export(execa_exports, {
2147
2147
  $: () => $,
@@ -2185,7 +2185,7 @@ function execa(file, args, options) {
2185
2185
  spawned.cancel = spawnedCancel.bind(null, spawned, context);
2186
2186
  const handlePromise = async () => {
2187
2187
  const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
2188
- const stdout = handleOutput(parsed.options, stdoutResult);
2188
+ const stdout2 = handleOutput(parsed.options, stdoutResult);
2189
2189
  const stderr = handleOutput(parsed.options, stderrResult);
2190
2190
  const all = handleOutput(parsed.options, allResult);
2191
2191
  if (error || exitCode !== 0 || signal !== null) {
@@ -2193,7 +2193,7 @@ function execa(file, args, options) {
2193
2193
  error,
2194
2194
  exitCode,
2195
2195
  signal,
2196
- stdout,
2196
+ stdout: stdout2,
2197
2197
  stderr,
2198
2198
  all,
2199
2199
  command,
@@ -2212,7 +2212,7 @@ function execa(file, args, options) {
2212
2212
  command,
2213
2213
  escapedCommand,
2214
2214
  exitCode: 0,
2215
- stdout,
2215
+ stdout: stdout2,
2216
2216
  stderr,
2217
2217
  all,
2218
2218
  failed: false,
@@ -2251,11 +2251,11 @@ function execaSync(file, args, options) {
2251
2251
  killed: false
2252
2252
  });
2253
2253
  }
2254
- const stdout = handleOutput(parsed.options, result.stdout, result.error);
2254
+ const stdout2 = handleOutput(parsed.options, result.stdout, result.error);
2255
2255
  const stderr = handleOutput(parsed.options, result.stderr, result.error);
2256
2256
  if (result.error || result.status !== 0 || result.signal !== null) {
2257
2257
  const error = makeError({
2258
- stdout,
2258
+ stdout: stdout2,
2259
2259
  stderr,
2260
2260
  error: result.error,
2261
2261
  signal: result.signal,
@@ -2276,7 +2276,7 @@ function execaSync(file, args, options) {
2276
2276
  command,
2277
2277
  escapedCommand,
2278
2278
  exitCode: 0,
2279
- stdout,
2279
+ stdout: stdout2,
2280
2280
  stderr,
2281
2281
  failed: false,
2282
2282
  timedOut: false,
@@ -2285,21 +2285,21 @@ function execaSync(file, args, options) {
2285
2285
  };
2286
2286
  }
2287
2287
  function create$(options) {
2288
- function $2(templatesOrOptions, ...expressions) {
2288
+ function $3(templatesOrOptions, ...expressions) {
2289
2289
  if (!Array.isArray(templatesOrOptions)) {
2290
2290
  return create$({ ...options, ...templatesOrOptions });
2291
2291
  }
2292
2292
  const [file, ...args] = parseTemplates(templatesOrOptions, expressions);
2293
2293
  return execa(file, args, normalizeScriptOptions(options));
2294
2294
  }
2295
- $2.sync = (templates, ...expressions) => {
2295
+ $3.sync = (templates, ...expressions) => {
2296
2296
  if (!Array.isArray(templates)) {
2297
2297
  throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");
2298
2298
  }
2299
2299
  const [file, ...args] = parseTemplates(templates, expressions);
2300
2300
  return execaSync(file, args, normalizeScriptOptions(options));
2301
2301
  };
2302
- return $2;
2302
+ return $3;
2303
2303
  }
2304
2304
  function execaCommand(command, options) {
2305
2305
  const [file, ...args] = parseCommand(command);
@@ -2339,7 +2339,7 @@ function execaNode(scriptPath, args, options = {}) {
2339
2339
  }
2340
2340
  var import_node_buffer2, import_node_path3, import_node_child_process3, import_node_process4, import_cross_spawn, DEFAULT_MAX_BUFFER, getEnv, handleArguments, handleOutput, normalizeScriptStdin, normalizeScriptOptions, $;
2341
2341
  var init_execa = __esm({
2342
- "node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js"() {
2342
+ "../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js"() {
2343
2343
  "use strict";
2344
2344
  import_node_buffer2 = require("buffer");
2345
2345
  import_node_path3 = __toESM(require("path"), 1);
@@ -2359,11 +2359,11 @@ var init_execa = __esm({
2359
2359
  init_verbose();
2360
2360
  DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
2361
2361
  getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
2362
- const env = extendEnv ? { ...import_node_process4.default.env, ...envOption } : envOption;
2362
+ const env2 = extendEnv ? { ...import_node_process4.default.env, ...envOption } : envOption;
2363
2363
  if (preferLocal) {
2364
- return npmRunPathEnv({ env, cwd: localDir, execPath });
2364
+ return npmRunPathEnv({ env: env2, cwd: localDir, execPath });
2365
2365
  }
2366
- return env;
2366
+ return env2;
2367
2367
  };
2368
2368
  handleArguments = (file, args, options = {}) => {
2369
2369
  const parsed = import_cross_spawn.default._parse(file, args, options);
@@ -2412,6 +2412,1877 @@ var init_execa = __esm({
2412
2412
  }
2413
2413
  });
2414
2414
 
2415
+ // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/core.mjs
2416
+ function isObject(value) {
2417
+ return value !== null && typeof value === "object";
2418
+ }
2419
+ function _defu(baseObject, defaults, namespace = ".", merger) {
2420
+ if (!isObject(defaults)) {
2421
+ return _defu(baseObject, {}, namespace, merger);
2422
+ }
2423
+ const object = Object.assign({}, defaults);
2424
+ for (const key in baseObject) {
2425
+ if (key === "__proto__" || key === "constructor") {
2426
+ continue;
2427
+ }
2428
+ const value = baseObject[key];
2429
+ if (value === null || value === void 0) {
2430
+ continue;
2431
+ }
2432
+ if (merger && merger(object, key, value, namespace)) {
2433
+ continue;
2434
+ }
2435
+ if (Array.isArray(value) && Array.isArray(object[key])) {
2436
+ object[key] = [...value, ...object[key]];
2437
+ } else if (isObject(value) && isObject(object[key])) {
2438
+ object[key] = _defu(
2439
+ value,
2440
+ object[key],
2441
+ (namespace ? `${namespace}.` : "") + key.toString(),
2442
+ merger
2443
+ );
2444
+ } else {
2445
+ object[key] = value;
2446
+ }
2447
+ }
2448
+ return object;
2449
+ }
2450
+ function createDefu(merger) {
2451
+ return (...arguments_) => (
2452
+ // eslint-disable-next-line unicorn/no-array-reduce
2453
+ arguments_.reduce((p2, c2) => _defu(p2, c2, "", merger), {})
2454
+ );
2455
+ }
2456
+ function isPlainObject(obj) {
2457
+ return Object.prototype.toString.call(obj) === "[object Object]";
2458
+ }
2459
+ function isLogObj(arg) {
2460
+ if (!isPlainObject(arg)) {
2461
+ return false;
2462
+ }
2463
+ if (!arg.message && !arg.args) {
2464
+ return false;
2465
+ }
2466
+ if (arg.stack) {
2467
+ return false;
2468
+ }
2469
+ return true;
2470
+ }
2471
+ function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
2472
+ if (input === void 0) {
2473
+ return defaultLevel;
2474
+ }
2475
+ if (typeof input === "number") {
2476
+ return input;
2477
+ }
2478
+ if (types[input] && types[input].level !== void 0) {
2479
+ return types[input].level;
2480
+ }
2481
+ return defaultLevel;
2482
+ }
2483
+ function createConsola(options = {}) {
2484
+ return new Consola(options);
2485
+ }
2486
+ var LogLevels, LogTypes, defu, paused, queue, Consola;
2487
+ var init_core2 = __esm({
2488
+ "../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/core.mjs"() {
2489
+ "use strict";
2490
+ LogLevels = {
2491
+ silent: Number.NEGATIVE_INFINITY,
2492
+ fatal: 0,
2493
+ error: 0,
2494
+ warn: 1,
2495
+ log: 2,
2496
+ info: 3,
2497
+ success: 3,
2498
+ fail: 3,
2499
+ ready: 3,
2500
+ start: 3,
2501
+ box: 3,
2502
+ debug: 4,
2503
+ trace: 5,
2504
+ verbose: Number.POSITIVE_INFINITY
2505
+ };
2506
+ LogTypes = {
2507
+ // Silent
2508
+ silent: {
2509
+ level: -1
2510
+ },
2511
+ // Level 0
2512
+ fatal: {
2513
+ level: LogLevels.fatal
2514
+ },
2515
+ error: {
2516
+ level: LogLevels.error
2517
+ },
2518
+ // Level 1
2519
+ warn: {
2520
+ level: LogLevels.warn
2521
+ },
2522
+ // Level 2
2523
+ log: {
2524
+ level: LogLevels.log
2525
+ },
2526
+ // Level 3
2527
+ info: {
2528
+ level: LogLevels.info
2529
+ },
2530
+ success: {
2531
+ level: LogLevels.success
2532
+ },
2533
+ fail: {
2534
+ level: LogLevels.fail
2535
+ },
2536
+ ready: {
2537
+ level: LogLevels.info
2538
+ },
2539
+ start: {
2540
+ level: LogLevels.info
2541
+ },
2542
+ box: {
2543
+ level: LogLevels.info
2544
+ },
2545
+ // Level 4
2546
+ debug: {
2547
+ level: LogLevels.debug
2548
+ },
2549
+ // Level 5
2550
+ trace: {
2551
+ level: LogLevels.trace
2552
+ },
2553
+ // Verbose
2554
+ verbose: {
2555
+ level: LogLevels.verbose
2556
+ }
2557
+ };
2558
+ defu = createDefu();
2559
+ paused = false;
2560
+ queue = [];
2561
+ Consola = class _Consola {
2562
+ constructor(options = {}) {
2563
+ const types = options.types || LogTypes;
2564
+ this.options = defu(
2565
+ {
2566
+ ...options,
2567
+ defaults: { ...options.defaults },
2568
+ level: _normalizeLogLevel(options.level, types),
2569
+ reporters: [...options.reporters || []]
2570
+ },
2571
+ {
2572
+ types: LogTypes,
2573
+ throttle: 1e3,
2574
+ throttleMin: 5,
2575
+ formatOptions: {
2576
+ date: true,
2577
+ colors: false,
2578
+ compact: true
2579
+ }
2580
+ }
2581
+ );
2582
+ for (const type in types) {
2583
+ const defaults = {
2584
+ type,
2585
+ ...this.options.defaults,
2586
+ ...types[type]
2587
+ };
2588
+ this[type] = this._wrapLogFn(defaults);
2589
+ this[type].raw = this._wrapLogFn(
2590
+ defaults,
2591
+ true
2592
+ );
2593
+ }
2594
+ if (this.options.mockFn) {
2595
+ this.mockTypes();
2596
+ }
2597
+ this._lastLog = {};
2598
+ }
2599
+ get level() {
2600
+ return this.options.level;
2601
+ }
2602
+ set level(level) {
2603
+ this.options.level = _normalizeLogLevel(
2604
+ level,
2605
+ this.options.types,
2606
+ this.options.level
2607
+ );
2608
+ }
2609
+ prompt(message, opts) {
2610
+ if (!this.options.prompt) {
2611
+ throw new Error("prompt is not supported!");
2612
+ }
2613
+ return this.options.prompt(message, opts);
2614
+ }
2615
+ create(options) {
2616
+ const instance = new _Consola({
2617
+ ...this.options,
2618
+ ...options
2619
+ });
2620
+ if (this._mockFn) {
2621
+ instance.mockTypes(this._mockFn);
2622
+ }
2623
+ return instance;
2624
+ }
2625
+ withDefaults(defaults) {
2626
+ return this.create({
2627
+ ...this.options,
2628
+ defaults: {
2629
+ ...this.options.defaults,
2630
+ ...defaults
2631
+ }
2632
+ });
2633
+ }
2634
+ withTag(tag) {
2635
+ return this.withDefaults({
2636
+ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag
2637
+ });
2638
+ }
2639
+ addReporter(reporter) {
2640
+ this.options.reporters.push(reporter);
2641
+ return this;
2642
+ }
2643
+ removeReporter(reporter) {
2644
+ if (reporter) {
2645
+ const i = this.options.reporters.indexOf(reporter);
2646
+ if (i >= 0) {
2647
+ return this.options.reporters.splice(i, 1);
2648
+ }
2649
+ } else {
2650
+ this.options.reporters.splice(0);
2651
+ }
2652
+ return this;
2653
+ }
2654
+ setReporters(reporters) {
2655
+ this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
2656
+ return this;
2657
+ }
2658
+ wrapAll() {
2659
+ this.wrapConsole();
2660
+ this.wrapStd();
2661
+ }
2662
+ restoreAll() {
2663
+ this.restoreConsole();
2664
+ this.restoreStd();
2665
+ }
2666
+ wrapConsole() {
2667
+ for (const type in this.options.types) {
2668
+ if (!console["__" + type]) {
2669
+ console["__" + type] = console[type];
2670
+ }
2671
+ console[type] = this[type].raw;
2672
+ }
2673
+ }
2674
+ restoreConsole() {
2675
+ for (const type in this.options.types) {
2676
+ if (console["__" + type]) {
2677
+ console[type] = console["__" + type];
2678
+ delete console["__" + type];
2679
+ }
2680
+ }
2681
+ }
2682
+ wrapStd() {
2683
+ this._wrapStream(this.options.stdout, "log");
2684
+ this._wrapStream(this.options.stderr, "log");
2685
+ }
2686
+ _wrapStream(stream, type) {
2687
+ if (!stream) {
2688
+ return;
2689
+ }
2690
+ if (!stream.__write) {
2691
+ stream.__write = stream.write;
2692
+ }
2693
+ stream.write = (data) => {
2694
+ this[type].raw(String(data).trim());
2695
+ };
2696
+ }
2697
+ restoreStd() {
2698
+ this._restoreStream(this.options.stdout);
2699
+ this._restoreStream(this.options.stderr);
2700
+ }
2701
+ _restoreStream(stream) {
2702
+ if (!stream) {
2703
+ return;
2704
+ }
2705
+ if (stream.__write) {
2706
+ stream.write = stream.__write;
2707
+ delete stream.__write;
2708
+ }
2709
+ }
2710
+ pauseLogs() {
2711
+ paused = true;
2712
+ }
2713
+ resumeLogs() {
2714
+ paused = false;
2715
+ const _queue = queue.splice(0);
2716
+ for (const item of _queue) {
2717
+ item[0]._logFn(item[1], item[2]);
2718
+ }
2719
+ }
2720
+ mockTypes(mockFn) {
2721
+ const _mockFn = mockFn || this.options.mockFn;
2722
+ this._mockFn = _mockFn;
2723
+ if (typeof _mockFn !== "function") {
2724
+ return;
2725
+ }
2726
+ for (const type in this.options.types) {
2727
+ this[type] = _mockFn(type, this.options.types[type]) || this[type];
2728
+ this[type].raw = this[type];
2729
+ }
2730
+ }
2731
+ _wrapLogFn(defaults, isRaw) {
2732
+ return (...args) => {
2733
+ if (paused) {
2734
+ queue.push([this, defaults, args, isRaw]);
2735
+ return;
2736
+ }
2737
+ return this._logFn(defaults, args, isRaw);
2738
+ };
2739
+ }
2740
+ _logFn(defaults, args, isRaw) {
2741
+ if ((defaults.level || 0) > this.level) {
2742
+ return false;
2743
+ }
2744
+ const logObj = {
2745
+ date: /* @__PURE__ */ new Date(),
2746
+ args: [],
2747
+ ...defaults,
2748
+ level: _normalizeLogLevel(defaults.level, this.options.types)
2749
+ };
2750
+ if (!isRaw && args.length === 1 && isLogObj(args[0])) {
2751
+ Object.assign(logObj, args[0]);
2752
+ } else {
2753
+ logObj.args = [...args];
2754
+ }
2755
+ if (logObj.message) {
2756
+ logObj.args.unshift(logObj.message);
2757
+ delete logObj.message;
2758
+ }
2759
+ if (logObj.additional) {
2760
+ if (!Array.isArray(logObj.additional)) {
2761
+ logObj.additional = logObj.additional.split("\n");
2762
+ }
2763
+ logObj.args.push("\n" + logObj.additional.join("\n"));
2764
+ delete logObj.additional;
2765
+ }
2766
+ logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
2767
+ logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
2768
+ const resolveLog = (newLog = false) => {
2769
+ const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
2770
+ if (this._lastLog.object && repeated > 0) {
2771
+ const args2 = [...this._lastLog.object.args];
2772
+ if (repeated > 1) {
2773
+ args2.push(`(repeated ${repeated} times)`);
2774
+ }
2775
+ this._log({ ...this._lastLog.object, args: args2 });
2776
+ this._lastLog.count = 1;
2777
+ }
2778
+ if (newLog) {
2779
+ this._lastLog.object = logObj;
2780
+ this._log(logObj);
2781
+ }
2782
+ };
2783
+ clearTimeout(this._lastLog.timeout);
2784
+ const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
2785
+ this._lastLog.time = logObj.date;
2786
+ if (diffTime < this.options.throttle) {
2787
+ try {
2788
+ const serializedLog = JSON.stringify([
2789
+ logObj.type,
2790
+ logObj.tag,
2791
+ logObj.args
2792
+ ]);
2793
+ const isSameLog = this._lastLog.serialized === serializedLog;
2794
+ this._lastLog.serialized = serializedLog;
2795
+ if (isSameLog) {
2796
+ this._lastLog.count = (this._lastLog.count || 0) + 1;
2797
+ if (this._lastLog.count > this.options.throttleMin) {
2798
+ this._lastLog.timeout = setTimeout(
2799
+ resolveLog,
2800
+ this.options.throttle
2801
+ );
2802
+ return;
2803
+ }
2804
+ }
2805
+ } catch {
2806
+ }
2807
+ }
2808
+ resolveLog(true);
2809
+ }
2810
+ _log(logObj) {
2811
+ for (const reporter of this.options.reporters) {
2812
+ reporter.log(logObj, {
2813
+ options: this.options
2814
+ });
2815
+ }
2816
+ }
2817
+ };
2818
+ Consola.prototype.add = Consola.prototype.addReporter;
2819
+ Consola.prototype.remove = Consola.prototype.removeReporter;
2820
+ Consola.prototype.clear = Consola.prototype.removeReporter;
2821
+ Consola.prototype.withScope = Consola.prototype.withTag;
2822
+ Consola.prototype.mock = Consola.prototype.mockTypes;
2823
+ Consola.prototype.pause = Consola.prototype.pauseLogs;
2824
+ Consola.prototype.resume = Consola.prototype.resumeLogs;
2825
+ }
2826
+ });
2827
+
2828
+ // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.06ad8a64.mjs
2829
+ function parseStack(stack) {
2830
+ const cwd = process.cwd() + import_node_path13.sep;
2831
+ const lines = stack.split("\n").splice(1).map((l2) => l2.trim().replace("file://", "").replace(cwd, ""));
2832
+ return lines;
2833
+ }
2834
+ function writeStream(data, stream) {
2835
+ const write = stream.__write || stream.write;
2836
+ return write.call(stream, data);
2837
+ }
2838
+ var import_node_util2, import_node_path13, bracket, BasicReporter;
2839
+ var init_consola_06ad8a64 = __esm({
2840
+ "../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.06ad8a64.mjs"() {
2841
+ "use strict";
2842
+ import_node_util2 = require("util");
2843
+ import_node_path13 = require("path");
2844
+ bracket = (x) => x ? `[${x}]` : "";
2845
+ BasicReporter = class {
2846
+ formatStack(stack, opts) {
2847
+ return " " + parseStack(stack).join("\n ");
2848
+ }
2849
+ formatArgs(args, opts) {
2850
+ const _args = args.map((arg) => {
2851
+ if (arg && typeof arg.stack === "string") {
2852
+ return arg.message + "\n" + this.formatStack(arg.stack, opts);
2853
+ }
2854
+ return arg;
2855
+ });
2856
+ return (0, import_node_util2.formatWithOptions)(opts, ..._args);
2857
+ }
2858
+ formatDate(date, opts) {
2859
+ return opts.date ? date.toLocaleTimeString() : "";
2860
+ }
2861
+ filterAndJoin(arr) {
2862
+ return arr.filter(Boolean).join(" ");
2863
+ }
2864
+ formatLogObj(logObj, opts) {
2865
+ const message = this.formatArgs(logObj.args, opts);
2866
+ if (logObj.type === "box") {
2867
+ return "\n" + [
2868
+ bracket(logObj.tag),
2869
+ logObj.title && logObj.title,
2870
+ ...message.split("\n")
2871
+ ].filter(Boolean).map((l2) => " > " + l2).join("\n") + "\n";
2872
+ }
2873
+ return this.filterAndJoin([
2874
+ bracket(logObj.type),
2875
+ bracket(logObj.tag),
2876
+ message
2877
+ ]);
2878
+ }
2879
+ log(logObj, ctx) {
2880
+ const line = this.formatLogObj(logObj, {
2881
+ columns: ctx.options.stdout.columns || 0,
2882
+ ...ctx.options.formatOptions
2883
+ });
2884
+ return writeStream(
2885
+ line + "\n",
2886
+ logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout
2887
+ );
2888
+ }
2889
+ };
2890
+ }
2891
+ });
2892
+
2893
+ // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/utils.mjs
2894
+ function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
2895
+ return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
2896
+ }
2897
+ function clearBleed(index, string, open, close, replace) {
2898
+ return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
2899
+ }
2900
+ function filterEmpty(open, close, replace = open, at = open.length + 1) {
2901
+ return (string) => string || !(string === "" || string === void 0) ? clearBleed(
2902
+ ("" + string).indexOf(close, at),
2903
+ string,
2904
+ open,
2905
+ close,
2906
+ replace
2907
+ ) : "";
2908
+ }
2909
+ function init(open, close, replace) {
2910
+ return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
2911
+ }
2912
+ function createColors(useColor = isColorSupported) {
2913
+ return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
2914
+ }
2915
+ function getColor(color, fallback = "reset") {
2916
+ return colors[color] || colors[fallback];
2917
+ }
2918
+ function stripAnsi(text2) {
2919
+ return text2.replace(new RegExp(ansiRegex, "g"), "");
2920
+ }
2921
+ function box(text2, _opts = {}) {
2922
+ const opts = {
2923
+ ..._opts,
2924
+ style: {
2925
+ ...defaultStyle,
2926
+ ..._opts.style
2927
+ }
2928
+ };
2929
+ const textLines = text2.split("\n");
2930
+ const boxLines = [];
2931
+ const _color = getColor(opts.style.borderColor);
2932
+ const borderStyle = {
2933
+ ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle
2934
+ };
2935
+ if (_color) {
2936
+ for (const key in borderStyle) {
2937
+ borderStyle[key] = _color(
2938
+ borderStyle[key]
2939
+ );
2940
+ }
2941
+ }
2942
+ const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
2943
+ const height = textLines.length + paddingOffset;
2944
+ const width = Math.max(...textLines.map((line) => line.length)) + paddingOffset;
2945
+ const widthOffset = width + paddingOffset;
2946
+ const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
2947
+ if (opts.style.marginTop > 0) {
2948
+ boxLines.push("".repeat(opts.style.marginTop));
2949
+ }
2950
+ if (opts.title) {
2951
+ const left = borderStyle.h.repeat(
2952
+ Math.floor((width - stripAnsi(opts.title).length) / 2)
2953
+ );
2954
+ const right = borderStyle.h.repeat(
2955
+ width - stripAnsi(opts.title).length - stripAnsi(left).length + paddingOffset
2956
+ );
2957
+ boxLines.push(
2958
+ `${leftSpace}${borderStyle.tl}${left}${opts.title}${right}${borderStyle.tr}`
2959
+ );
2960
+ } else {
2961
+ boxLines.push(
2962
+ `${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`
2963
+ );
2964
+ }
2965
+ const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
2966
+ for (let i = 0; i < height; i++) {
2967
+ if (i < valignOffset || i >= valignOffset + textLines.length) {
2968
+ boxLines.push(
2969
+ `${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`
2970
+ );
2971
+ } else {
2972
+ const line = textLines[i - valignOffset];
2973
+ const left = " ".repeat(paddingOffset);
2974
+ const right = " ".repeat(width - stripAnsi(line).length);
2975
+ boxLines.push(
2976
+ `${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`
2977
+ );
2978
+ }
2979
+ }
2980
+ boxLines.push(
2981
+ `${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`
2982
+ );
2983
+ if (opts.style.marginBottom > 0) {
2984
+ boxLines.push("".repeat(opts.style.marginBottom));
2985
+ }
2986
+ return boxLines.join("\n");
2987
+ }
2988
+ var tty, env, argv, platform, isDisabled, isForced, isWindows, isDumbTerminal, isCompatibleTerminal, isCI, isColorSupported, colorDefs, colors, ansiRegex, boxStylePresets, defaultStyle;
2989
+ var init_utils2 = __esm({
2990
+ "../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/utils.mjs"() {
2991
+ "use strict";
2992
+ tty = __toESM(require("tty"), 1);
2993
+ ({
2994
+ env = {},
2995
+ argv = [],
2996
+ platform = ""
2997
+ } = typeof process === "undefined" ? {} : process);
2998
+ isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
2999
+ isForced = "FORCE_COLOR" in env || argv.includes("--color");
3000
+ isWindows = platform === "win32";
3001
+ isDumbTerminal = env.TERM === "dumb";
3002
+ isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
3003
+ isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
3004
+ isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
3005
+ colorDefs = {
3006
+ reset: init(0, 0),
3007
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
3008
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
3009
+ italic: init(3, 23),
3010
+ underline: init(4, 24),
3011
+ inverse: init(7, 27),
3012
+ hidden: init(8, 28),
3013
+ strikethrough: init(9, 29),
3014
+ black: init(30, 39),
3015
+ red: init(31, 39),
3016
+ green: init(32, 39),
3017
+ yellow: init(33, 39),
3018
+ blue: init(34, 39),
3019
+ magenta: init(35, 39),
3020
+ cyan: init(36, 39),
3021
+ white: init(37, 39),
3022
+ gray: init(90, 39),
3023
+ bgBlack: init(40, 49),
3024
+ bgRed: init(41, 49),
3025
+ bgGreen: init(42, 49),
3026
+ bgYellow: init(43, 49),
3027
+ bgBlue: init(44, 49),
3028
+ bgMagenta: init(45, 49),
3029
+ bgCyan: init(46, 49),
3030
+ bgWhite: init(47, 49),
3031
+ blackBright: init(90, 39),
3032
+ redBright: init(91, 39),
3033
+ greenBright: init(92, 39),
3034
+ yellowBright: init(93, 39),
3035
+ blueBright: init(94, 39),
3036
+ magentaBright: init(95, 39),
3037
+ cyanBright: init(96, 39),
3038
+ whiteBright: init(97, 39),
3039
+ bgBlackBright: init(100, 49),
3040
+ bgRedBright: init(101, 49),
3041
+ bgGreenBright: init(102, 49),
3042
+ bgYellowBright: init(103, 49),
3043
+ bgBlueBright: init(104, 49),
3044
+ bgMagentaBright: init(105, 49),
3045
+ bgCyanBright: init(106, 49),
3046
+ bgWhiteBright: init(107, 49)
3047
+ };
3048
+ colors = createColors();
3049
+ ansiRegex = [
3050
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
3051
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
3052
+ ].join("|");
3053
+ boxStylePresets = {
3054
+ solid: {
3055
+ tl: "\u250C",
3056
+ tr: "\u2510",
3057
+ bl: "\u2514",
3058
+ br: "\u2518",
3059
+ h: "\u2500",
3060
+ v: "\u2502"
3061
+ },
3062
+ double: {
3063
+ tl: "\u2554",
3064
+ tr: "\u2557",
3065
+ bl: "\u255A",
3066
+ br: "\u255D",
3067
+ h: "\u2550",
3068
+ v: "\u2551"
3069
+ },
3070
+ doubleSingle: {
3071
+ tl: "\u2553",
3072
+ tr: "\u2556",
3073
+ bl: "\u2559",
3074
+ br: "\u255C",
3075
+ h: "\u2500",
3076
+ v: "\u2551"
3077
+ },
3078
+ doubleSingleRounded: {
3079
+ tl: "\u256D",
3080
+ tr: "\u256E",
3081
+ bl: "\u2570",
3082
+ br: "\u256F",
3083
+ h: "\u2500",
3084
+ v: "\u2551"
3085
+ },
3086
+ singleThick: {
3087
+ tl: "\u250F",
3088
+ tr: "\u2513",
3089
+ bl: "\u2517",
3090
+ br: "\u251B",
3091
+ h: "\u2501",
3092
+ v: "\u2503"
3093
+ },
3094
+ singleDouble: {
3095
+ tl: "\u2552",
3096
+ tr: "\u2555",
3097
+ bl: "\u2558",
3098
+ br: "\u255B",
3099
+ h: "\u2550",
3100
+ v: "\u2502"
3101
+ },
3102
+ singleDoubleRounded: {
3103
+ tl: "\u256D",
3104
+ tr: "\u256E",
3105
+ bl: "\u2570",
3106
+ br: "\u256F",
3107
+ h: "\u2550",
3108
+ v: "\u2502"
3109
+ },
3110
+ rounded: {
3111
+ tl: "\u256D",
3112
+ tr: "\u256E",
3113
+ bl: "\u2570",
3114
+ br: "\u256F",
3115
+ h: "\u2500",
3116
+ v: "\u2502"
3117
+ }
3118
+ };
3119
+ defaultStyle = {
3120
+ borderColor: "white",
3121
+ borderStyle: "rounded",
3122
+ valign: "center",
3123
+ padding: 2,
3124
+ marginLeft: 1,
3125
+ marginTop: 1,
3126
+ marginBottom: 1
3127
+ };
3128
+ }
3129
+ });
3130
+
3131
+ // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/chunks/prompt.mjs
3132
+ var prompt_exports = {};
3133
+ __export(prompt_exports, {
3134
+ prompt: () => prompt
3135
+ });
3136
+ function z({ onlyFirst: t = false } = {}) {
3137
+ const u = ["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");
3138
+ return new RegExp(u, t ? void 0 : "g");
3139
+ }
3140
+ function $2(t) {
3141
+ if (typeof t != "string")
3142
+ throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);
3143
+ return t.replace(z(), "");
3144
+ }
3145
+ function c(t, u = {}) {
3146
+ if (typeof t != "string" || t.length === 0 || (u = { ambiguousIsNarrow: true, ...u }, t = $2(t), t.length === 0))
3147
+ return 0;
3148
+ t = t.replace(Y(), " ");
3149
+ const F = u.ambiguousIsNarrow ? 1 : 2;
3150
+ let e = 0;
3151
+ for (const s3 of t) {
3152
+ const C = s3.codePointAt(0);
3153
+ if (C <= 31 || C >= 127 && C <= 159 || C >= 768 && C <= 879)
3154
+ continue;
3155
+ switch (K.eastAsianWidth(s3)) {
3156
+ case "F":
3157
+ case "W":
3158
+ e += 2;
3159
+ break;
3160
+ case "A":
3161
+ e += F;
3162
+ break;
3163
+ default:
3164
+ e += 1;
3165
+ }
3166
+ }
3167
+ return e;
3168
+ }
3169
+ function U() {
3170
+ const t = /* @__PURE__ */ new Map();
3171
+ for (const [u, F] of Object.entries(r)) {
3172
+ for (const [e, s3] of Object.entries(F))
3173
+ r[e] = { open: `\x1B[${s3[0]}m`, close: `\x1B[${s3[1]}m` }, F[e] = r[e], t.set(s3[0], s3[1]);
3174
+ Object.defineProperty(r, u, { value: F, enumerable: false });
3175
+ }
3176
+ return Object.defineProperty(r, "codes", { value: t, enumerable: false }), r.color.close = "\x1B[39m", r.bgColor.close = "\x1B[49m", r.color.ansi = L(), r.color.ansi256 = M(), r.color.ansi16m = T(), r.bgColor.ansi = L(v), r.bgColor.ansi256 = M(v), r.bgColor.ansi16m = T(v), Object.defineProperties(r, { rgbToAnsi256: { value: (u, F, e) => u === F && F === e ? u < 8 ? 16 : u > 248 ? 231 : Math.round((u - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(u / 255 * 5) + 6 * Math.round(F / 255 * 5) + Math.round(e / 255 * 5), enumerable: false }, hexToRgb: { value: (u) => {
3177
+ const F = /[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));
3178
+ if (!F)
3179
+ return [0, 0, 0];
3180
+ let [e] = F;
3181
+ e.length === 3 && (e = [...e].map((C) => C + C).join(""));
3182
+ const s3 = Number.parseInt(e, 16);
3183
+ return [s3 >> 16 & 255, s3 >> 8 & 255, s3 & 255];
3184
+ }, enumerable: false }, hexToAnsi256: { value: (u) => r.rgbToAnsi256(...r.hexToRgb(u)), enumerable: false }, ansi256ToAnsi: { value: (u) => {
3185
+ if (u < 8)
3186
+ return 30 + u;
3187
+ if (u < 16)
3188
+ return 90 + (u - 8);
3189
+ let F, e, s3;
3190
+ if (u >= 232)
3191
+ F = ((u - 232) * 10 + 8) / 255, e = F, s3 = F;
3192
+ else {
3193
+ u -= 16;
3194
+ const i = u % 36;
3195
+ F = Math.floor(u / 36) / 5, e = Math.floor(i / 6) / 5, s3 = i % 6 / 5;
3196
+ }
3197
+ const C = Math.max(F, e, s3) * 2;
3198
+ if (C === 0)
3199
+ return 30;
3200
+ let D = 30 + (Math.round(s3) << 2 | Math.round(e) << 1 | Math.round(F));
3201
+ return C === 2 && (D += 60), D;
3202
+ }, enumerable: false }, rgbToAnsi: { value: (u, F, e) => r.ansi256ToAnsi(r.rgbToAnsi256(u, F, e)), enumerable: false }, hexToAnsi: { value: (u) => r.ansi256ToAnsi(r.hexToAnsi256(u)), enumerable: false } }), r;
3203
+ }
3204
+ function P(t, u, F) {
3205
+ return String(t).normalize().replace(/\r\n/g, `
3206
+ `).split(`
3207
+ `).map((e) => uD(e, u, F)).join(`
3208
+ `);
3209
+ }
3210
+ function FD(t, u) {
3211
+ if (t === u)
3212
+ return;
3213
+ const F = t.split(`
3214
+ `), e = u.split(`
3215
+ `), s3 = [];
3216
+ for (let C = 0; C < Math.max(F.length, e.length); C++)
3217
+ F[C] !== e[C] && s3.push(C);
3218
+ return s3;
3219
+ }
3220
+ function g(t, u) {
3221
+ t.isTTY && t.setRawMode(u);
3222
+ }
3223
+ async function prompt(message, opts = {}) {
3224
+ if (!opts.type || opts.type === "text") {
3225
+ return await text({
3226
+ message,
3227
+ defaultValue: opts.default,
3228
+ placeholder: opts.placeholder,
3229
+ initialValue: opts.initial
3230
+ });
3231
+ }
3232
+ if (opts.type === "confirm") {
3233
+ return await confirm({
3234
+ message,
3235
+ initialValue: opts.initial
3236
+ });
3237
+ }
3238
+ if (opts.type === "select") {
3239
+ return await select({
3240
+ message,
3241
+ options: opts.options.map(
3242
+ (o) => typeof o === "string" ? { value: o, label: o } : o
3243
+ )
3244
+ });
3245
+ }
3246
+ if (opts.type === "multiselect") {
3247
+ return await multiselect({
3248
+ message,
3249
+ options: opts.options.map(
3250
+ (o) => typeof o === "string" ? { value: o, label: o } : o
3251
+ ),
3252
+ required: opts.required
3253
+ });
3254
+ }
3255
+ throw new Error(`Unknown prompt type: ${opts.type}`);
3256
+ }
3257
+ var import_node_process5, import_node_readline, import_node_tty, import_tty, import_node_util3, import_node_path14, ESC, CSI, beep, cursor, scroll, erase, src, picocolors, tty2, isColorSupported2, formatter, replaceClose2, createColors2, picocolorsExports, l, m, G, K, Y, v, L, M, T, r, Z, H, q, p, J, b, W, Q, I, w, N, j, X, _, DD, uD, R, V, tD, h, sD, iD, ED, oD, unicode, s, S_STEP_ACTIVE, S_STEP_CANCEL, S_STEP_ERROR, S_STEP_SUBMIT, S_BAR, S_BAR_END, S_RADIO_ACTIVE, S_RADIO_INACTIVE, S_CHECKBOX_ACTIVE, S_CHECKBOX_SELECTED, S_CHECKBOX_INACTIVE, symbol, text, confirm, select, multiselect;
3258
+ var init_prompt = __esm({
3259
+ "../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/chunks/prompt.mjs"() {
3260
+ "use strict";
3261
+ import_node_process5 = require("process");
3262
+ import_node_readline = __toESM(require("readline"), 1);
3263
+ import_node_tty = require("tty");
3264
+ init_consola_36c0034f();
3265
+ import_tty = __toESM(require("tty"), 1);
3266
+ init_utils2();
3267
+ init_core2();
3268
+ init_consola_06ad8a64();
3269
+ import_node_util3 = require("util");
3270
+ import_node_path14 = require("path");
3271
+ ESC = "\x1B";
3272
+ CSI = `${ESC}[`;
3273
+ beep = "\x07";
3274
+ cursor = {
3275
+ to(x, y) {
3276
+ if (!y)
3277
+ return `${CSI}${x + 1}G`;
3278
+ return `${CSI}${y + 1};${x + 1}H`;
3279
+ },
3280
+ move(x, y) {
3281
+ let ret = "";
3282
+ if (x < 0)
3283
+ ret += `${CSI}${-x}D`;
3284
+ else if (x > 0)
3285
+ ret += `${CSI}${x}C`;
3286
+ if (y < 0)
3287
+ ret += `${CSI}${-y}A`;
3288
+ else if (y > 0)
3289
+ ret += `${CSI}${y}B`;
3290
+ return ret;
3291
+ },
3292
+ up: (count = 1) => `${CSI}${count}A`,
3293
+ down: (count = 1) => `${CSI}${count}B`,
3294
+ forward: (count = 1) => `${CSI}${count}C`,
3295
+ backward: (count = 1) => `${CSI}${count}D`,
3296
+ nextLine: (count = 1) => `${CSI}E`.repeat(count),
3297
+ prevLine: (count = 1) => `${CSI}F`.repeat(count),
3298
+ left: `${CSI}G`,
3299
+ hide: `${CSI}?25l`,
3300
+ show: `${CSI}?25h`,
3301
+ save: `${ESC}7`,
3302
+ restore: `${ESC}8`
3303
+ };
3304
+ scroll = {
3305
+ up: (count = 1) => `${CSI}S`.repeat(count),
3306
+ down: (count = 1) => `${CSI}T`.repeat(count)
3307
+ };
3308
+ erase = {
3309
+ screen: `${CSI}2J`,
3310
+ up: (count = 1) => `${CSI}1J`.repeat(count),
3311
+ down: (count = 1) => `${CSI}J`.repeat(count),
3312
+ line: `${CSI}2K`,
3313
+ lineEnd: `${CSI}K`,
3314
+ lineStart: `${CSI}1K`,
3315
+ lines(count) {
3316
+ let clear = "";
3317
+ for (let i = 0; i < count; i++)
3318
+ clear += this.line + (i < count - 1 ? cursor.up() : "");
3319
+ if (count)
3320
+ clear += cursor.left;
3321
+ return clear;
3322
+ }
3323
+ };
3324
+ src = { cursor, scroll, erase, beep };
3325
+ picocolors = { exports: {} };
3326
+ tty2 = import_tty.default;
3327
+ isColorSupported2 = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" || tty2.isatty(1) && process.env.TERM !== "dumb" || "CI" in process.env);
3328
+ formatter = (open, close, replace = open) => (input) => {
3329
+ let string = "" + input;
3330
+ let index = string.indexOf(close, open.length);
3331
+ return ~index ? open + replaceClose2(string, close, replace, index) + close : open + string + close;
3332
+ };
3333
+ replaceClose2 = (string, close, replace, index) => {
3334
+ let start = string.substring(0, index) + replace;
3335
+ let end = string.substring(index + close.length);
3336
+ let nextIndex = end.indexOf(close);
3337
+ return ~nextIndex ? start + replaceClose2(end, close, replace, nextIndex) : start + end;
3338
+ };
3339
+ createColors2 = (enabled = isColorSupported2) => ({
3340
+ isColorSupported: enabled,
3341
+ reset: enabled ? (s3) => `\x1B[0m${s3}\x1B[0m` : String,
3342
+ bold: enabled ? formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m") : String,
3343
+ dim: enabled ? formatter("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m") : String,
3344
+ italic: enabled ? formatter("\x1B[3m", "\x1B[23m") : String,
3345
+ underline: enabled ? formatter("\x1B[4m", "\x1B[24m") : String,
3346
+ inverse: enabled ? formatter("\x1B[7m", "\x1B[27m") : String,
3347
+ hidden: enabled ? formatter("\x1B[8m", "\x1B[28m") : String,
3348
+ strikethrough: enabled ? formatter("\x1B[9m", "\x1B[29m") : String,
3349
+ black: enabled ? formatter("\x1B[30m", "\x1B[39m") : String,
3350
+ red: enabled ? formatter("\x1B[31m", "\x1B[39m") : String,
3351
+ green: enabled ? formatter("\x1B[32m", "\x1B[39m") : String,
3352
+ yellow: enabled ? formatter("\x1B[33m", "\x1B[39m") : String,
3353
+ blue: enabled ? formatter("\x1B[34m", "\x1B[39m") : String,
3354
+ magenta: enabled ? formatter("\x1B[35m", "\x1B[39m") : String,
3355
+ cyan: enabled ? formatter("\x1B[36m", "\x1B[39m") : String,
3356
+ white: enabled ? formatter("\x1B[37m", "\x1B[39m") : String,
3357
+ gray: enabled ? formatter("\x1B[90m", "\x1B[39m") : String,
3358
+ bgBlack: enabled ? formatter("\x1B[40m", "\x1B[49m") : String,
3359
+ bgRed: enabled ? formatter("\x1B[41m", "\x1B[49m") : String,
3360
+ bgGreen: enabled ? formatter("\x1B[42m", "\x1B[49m") : String,
3361
+ bgYellow: enabled ? formatter("\x1B[43m", "\x1B[49m") : String,
3362
+ bgBlue: enabled ? formatter("\x1B[44m", "\x1B[49m") : String,
3363
+ bgMagenta: enabled ? formatter("\x1B[45m", "\x1B[49m") : String,
3364
+ bgCyan: enabled ? formatter("\x1B[46m", "\x1B[49m") : String,
3365
+ bgWhite: enabled ? formatter("\x1B[47m", "\x1B[49m") : String
3366
+ });
3367
+ picocolors.exports = createColors2();
3368
+ picocolors.exports.createColors = createColors2;
3369
+ picocolorsExports = picocolors.exports;
3370
+ l = /* @__PURE__ */ getDefaultExportFromCjs(picocolorsExports);
3371
+ m = {};
3372
+ G = { get exports() {
3373
+ return m;
3374
+ }, set exports(t) {
3375
+ m = t;
3376
+ } };
3377
+ (function(t) {
3378
+ var u = {};
3379
+ t.exports = u, u.eastAsianWidth = function(e) {
3380
+ var s3 = e.charCodeAt(0), C = e.length == 2 ? e.charCodeAt(1) : 0, D = s3;
3381
+ return 55296 <= s3 && s3 <= 56319 && 56320 <= C && C <= 57343 && (s3 &= 1023, C &= 1023, D = s3 << 10 | C, D += 65536), D == 12288 || 65281 <= D && D <= 65376 || 65504 <= D && D <= 65510 ? "F" : D == 8361 || 65377 <= D && D <= 65470 || 65474 <= D && D <= 65479 || 65482 <= D && D <= 65487 || 65490 <= D && D <= 65495 || 65498 <= D && D <= 65500 || 65512 <= D && D <= 65518 ? "H" : 4352 <= D && D <= 4447 || 4515 <= D && D <= 4519 || 4602 <= D && D <= 4607 || 9001 <= D && D <= 9002 || 11904 <= D && D <= 11929 || 11931 <= D && D <= 12019 || 12032 <= D && D <= 12245 || 12272 <= D && D <= 12283 || 12289 <= D && D <= 12350 || 12353 <= D && D <= 12438 || 12441 <= D && D <= 12543 || 12549 <= D && D <= 12589 || 12593 <= D && D <= 12686 || 12688 <= D && D <= 12730 || 12736 <= D && D <= 12771 || 12784 <= D && D <= 12830 || 12832 <= D && D <= 12871 || 12880 <= D && D <= 13054 || 13056 <= D && D <= 19903 || 19968 <= D && D <= 42124 || 42128 <= D && D <= 42182 || 43360 <= D && D <= 43388 || 44032 <= D && D <= 55203 || 55216 <= D && D <= 55238 || 55243 <= D && D <= 55291 || 63744 <= D && D <= 64255 || 65040 <= D && D <= 65049 || 65072 <= D && D <= 65106 || 65108 <= D && D <= 65126 || 65128 <= D && D <= 65131 || 110592 <= D && D <= 110593 || 127488 <= D && D <= 127490 || 127504 <= D && D <= 127546 || 127552 <= D && D <= 127560 || 127568 <= D && D <= 127569 || 131072 <= D && D <= 194367 || 177984 <= D && D <= 196605 || 196608 <= D && D <= 262141 ? "W" : 32 <= D && D <= 126 || 162 <= D && D <= 163 || 165 <= D && D <= 166 || D == 172 || D == 175 || 10214 <= D && D <= 10221 || 10629 <= D && D <= 10630 ? "Na" : D == 161 || D == 164 || 167 <= D && D <= 168 || D == 170 || 173 <= D && D <= 174 || 176 <= D && D <= 180 || 182 <= D && D <= 186 || 188 <= D && D <= 191 || D == 198 || D == 208 || 215 <= D && D <= 216 || 222 <= D && D <= 225 || D == 230 || 232 <= D && D <= 234 || 236 <= D && D <= 237 || D == 240 || 242 <= D && D <= 243 || 247 <= D && D <= 250 || D == 252 || D == 254 || D == 257 || D == 273 || D == 275 || D == 283 || 294 <= D && D <= 295 || D == 299 || 305 <= D && D <= 307 || D == 312 || 319 <= D && D <= 322 || D == 324 || 328 <= D && D <= 331 || D == 333 || 338 <= D && D <= 339 || 358 <= D && D <= 359 || D == 363 || D == 462 || D == 464 || D == 466 || D == 468 || D == 470 || D == 472 || D == 474 || D == 476 || D == 593 || D == 609 || D == 708 || D == 711 || 713 <= D && D <= 715 || D == 717 || D == 720 || 728 <= D && D <= 731 || D == 733 || D == 735 || 768 <= D && D <= 879 || 913 <= D && D <= 929 || 931 <= D && D <= 937 || 945 <= D && D <= 961 || 963 <= D && D <= 969 || D == 1025 || 1040 <= D && D <= 1103 || D == 1105 || D == 8208 || 8211 <= D && D <= 8214 || 8216 <= D && D <= 8217 || 8220 <= D && D <= 8221 || 8224 <= D && D <= 8226 || 8228 <= D && D <= 8231 || D == 8240 || 8242 <= D && D <= 8243 || D == 8245 || D == 8251 || D == 8254 || D == 8308 || D == 8319 || 8321 <= D && D <= 8324 || D == 8364 || D == 8451 || D == 8453 || D == 8457 || D == 8467 || D == 8470 || 8481 <= D && D <= 8482 || D == 8486 || D == 8491 || 8531 <= D && D <= 8532 || 8539 <= D && D <= 8542 || 8544 <= D && D <= 8555 || 8560 <= D && D <= 8569 || D == 8585 || 8592 <= D && D <= 8601 || 8632 <= D && D <= 8633 || D == 8658 || D == 8660 || D == 8679 || D == 8704 || 8706 <= D && D <= 8707 || 8711 <= D && D <= 8712 || D == 8715 || D == 8719 || D == 8721 || D == 8725 || D == 8730 || 8733 <= D && D <= 8736 || D == 8739 || D == 8741 || 8743 <= D && D <= 8748 || D == 8750 || 8756 <= D && D <= 8759 || 8764 <= D && D <= 8765 || D == 8776 || D == 8780 || D == 8786 || 8800 <= D && D <= 8801 || 8804 <= D && D <= 8807 || 8810 <= D && D <= 8811 || 8814 <= D && D <= 8815 || 8834 <= D && D <= 8835 || 8838 <= D && D <= 8839 || D == 8853 || D == 8857 || D == 8869 || D == 8895 || D == 8978 || 9312 <= D && D <= 9449 || 9451 <= D && D <= 9547 || 9552 <= D && D <= 9587 || 9600 <= D && D <= 9615 || 9618 <= D && D <= 9621 || 9632 <= D && D <= 9633 || 9635 <= D && D <= 9641 || 9650 <= D && D <= 9651 || 9654 <= D && D <= 9655 || 9660 <= D && D <= 9661 || 9664 <= D && D <= 9665 || 9670 <= D && D <= 9672 || D == 9675 || 9678 <= D && D <= 9681 || 9698 <= D && D <= 9701 || D == 9711 || 9733 <= D && D <= 9734 || D == 9737 || 9742 <= D && D <= 9743 || 9748 <= D && D <= 9749 || D == 9756 || D == 9758 || D == 9792 || D == 9794 || 9824 <= D && D <= 9825 || 9827 <= D && D <= 9829 || 9831 <= D && D <= 9834 || 9836 <= D && D <= 9837 || D == 9839 || 9886 <= D && D <= 9887 || 9918 <= D && D <= 9919 || 9924 <= D && D <= 9933 || 9935 <= D && D <= 9953 || D == 9955 || 9960 <= D && D <= 9983 || D == 10045 || D == 10071 || 10102 <= D && D <= 10111 || 11093 <= D && D <= 11097 || 12872 <= D && D <= 12879 || 57344 <= D && D <= 63743 || 65024 <= D && D <= 65039 || D == 65533 || 127232 <= D && D <= 127242 || 127248 <= D && D <= 127277 || 127280 <= D && D <= 127337 || 127344 <= D && D <= 127386 || 917760 <= D && D <= 917999 || 983040 <= D && D <= 1048573 || 1048576 <= D && D <= 1114109 ? "A" : "N";
3382
+ }, u.characterLength = function(e) {
3383
+ var s3 = this.eastAsianWidth(e);
3384
+ return s3 == "F" || s3 == "W" || s3 == "A" ? 2 : 1;
3385
+ };
3386
+ function F(e) {
3387
+ return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
3388
+ }
3389
+ u.length = function(e) {
3390
+ for (var s3 = F(e), C = 0, D = 0; D < s3.length; D++)
3391
+ C = C + this.characterLength(s3[D]);
3392
+ return C;
3393
+ }, u.slice = function(e, s3, C) {
3394
+ textLen = u.length(e), s3 = s3 || 0, C = C || 1, s3 < 0 && (s3 = textLen + s3), C < 0 && (C = textLen + C);
3395
+ for (var D = "", i = 0, o = F(e), E = 0; E < o.length; E++) {
3396
+ var a = o[E], n = u.length(a);
3397
+ if (i >= s3 - (n == 2 ? 1 : 0))
3398
+ if (i + n <= C)
3399
+ D += a;
3400
+ else
3401
+ break;
3402
+ i += n;
3403
+ }
3404
+ return D;
3405
+ };
3406
+ })(G);
3407
+ K = m;
3408
+ Y = function() {
3409
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
3410
+ };
3411
+ v = 10;
3412
+ L = (t = 0) => (u) => `\x1B[${u + t}m`;
3413
+ M = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`;
3414
+ T = (t = 0) => (u, F, e) => `\x1B[${38 + t};2;${u};${F};${e}m`;
3415
+ r = { modifier: { reset: [0, 0], bold: [1, 22], dim: [2, 22], italic: [3, 23], underline: [4, 24], overline: [53, 55], inverse: [7, 27], hidden: [8, 28], strikethrough: [9, 29] }, color: { black: [30, 39], red: [31, 39], green: [32, 39], yellow: [33, 39], blue: [34, 39], magenta: [35, 39], cyan: [36, 39], white: [37, 39], blackBright: [90, 39], gray: [90, 39], grey: [90, 39], redBright: [91, 39], greenBright: [92, 39], yellowBright: [93, 39], blueBright: [94, 39], magentaBright: [95, 39], cyanBright: [96, 39], whiteBright: [97, 39] }, bgColor: { bgBlack: [40, 49], bgRed: [41, 49], bgGreen: [42, 49], bgYellow: [43, 49], bgBlue: [44, 49], bgMagenta: [45, 49], bgCyan: [46, 49], bgWhite: [47, 49], bgBlackBright: [100, 49], bgGray: [100, 49], bgGrey: [100, 49], bgRedBright: [101, 49], bgGreenBright: [102, 49], bgYellowBright: [103, 49], bgBlueBright: [104, 49], bgMagentaBright: [105, 49], bgCyanBright: [106, 49], bgWhiteBright: [107, 49] } };
3416
+ Object.keys(r.modifier);
3417
+ Z = Object.keys(r.color);
3418
+ H = Object.keys(r.bgColor);
3419
+ [...Z, ...H];
3420
+ q = U();
3421
+ p = /* @__PURE__ */ new Set(["\x1B", "\x9B"]);
3422
+ J = 39;
3423
+ b = "\x07";
3424
+ W = "[";
3425
+ Q = "]";
3426
+ I = "m";
3427
+ w = `${Q}8;;`;
3428
+ N = (t) => `${p.values().next().value}${W}${t}${I}`;
3429
+ j = (t) => `${p.values().next().value}${w}${t}${b}`;
3430
+ X = (t) => t.split(" ").map((u) => c(u));
3431
+ _ = (t, u, F) => {
3432
+ const e = [...u];
3433
+ let s3 = false, C = false, D = c($2(t[t.length - 1]));
3434
+ for (const [i, o] of e.entries()) {
3435
+ const E = c(o);
3436
+ if (D + E <= F ? t[t.length - 1] += o : (t.push(o), D = 0), p.has(o) && (s3 = true, C = e.slice(i + 1).join("").startsWith(w)), s3) {
3437
+ C ? o === b && (s3 = false, C = false) : o === I && (s3 = false);
3438
+ continue;
3439
+ }
3440
+ D += E, D === F && i < e.length - 1 && (t.push(""), D = 0);
3441
+ }
3442
+ !D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
3443
+ };
3444
+ DD = (t) => {
3445
+ const u = t.split(" ");
3446
+ let F = u.length;
3447
+ for (; F > 0 && !(c(u[F - 1]) > 0); )
3448
+ F--;
3449
+ return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
3450
+ };
3451
+ uD = (t, u, F = {}) => {
3452
+ if (F.trim !== false && t.trim() === "")
3453
+ return "";
3454
+ let e = "", s3, C;
3455
+ const D = X(t);
3456
+ let i = [""];
3457
+ for (const [E, a] of t.split(" ").entries()) {
3458
+ F.trim !== false && (i[i.length - 1] = i[i.length - 1].trimStart());
3459
+ let n = c(i[i.length - 1]);
3460
+ if (E !== 0 && (n >= u && (F.wordWrap === false || F.trim === false) && (i.push(""), n = 0), (n > 0 || F.trim === false) && (i[i.length - 1] += " ", n++)), F.hard && D[E] > u) {
3461
+ const B = u - n, A = 1 + Math.floor((D[E] - B - 1) / u);
3462
+ Math.floor((D[E] - 1) / u) < A && i.push(""), _(i, a, u);
3463
+ continue;
3464
+ }
3465
+ if (n + D[E] > u && n > 0 && D[E] > 0) {
3466
+ if (F.wordWrap === false && n < u) {
3467
+ _(i, a, u);
3468
+ continue;
3469
+ }
3470
+ i.push("");
3471
+ }
3472
+ if (n + D[E] > u && F.wordWrap === false) {
3473
+ _(i, a, u);
3474
+ continue;
3475
+ }
3476
+ i[i.length - 1] += a;
3477
+ }
3478
+ F.trim !== false && (i = i.map((E) => DD(E)));
3479
+ const o = [...i.join(`
3480
+ `)];
3481
+ for (const [E, a] of o.entries()) {
3482
+ if (e += a, p.has(a)) {
3483
+ const { groups: B } = new RegExp(`(?:\\${W}(?<code>\\d+)m|\\${w}(?<uri>.*)${b})`).exec(o.slice(E).join("")) || { groups: {} };
3484
+ if (B.code !== void 0) {
3485
+ const A = Number.parseFloat(B.code);
3486
+ s3 = A === J ? void 0 : A;
3487
+ } else
3488
+ B.uri !== void 0 && (C = B.uri.length === 0 ? void 0 : B.uri);
3489
+ }
3490
+ const n = q.codes.get(Number(s3));
3491
+ o[E + 1] === `
3492
+ ` ? (C && (e += j("")), s3 && n && (e += N(n))) : a === `
3493
+ ` && (s3 && n && (e += N(s3)), C && (e += j(C)));
3494
+ }
3495
+ return e;
3496
+ };
3497
+ R = Symbol("clack:cancel");
3498
+ V = /* @__PURE__ */ new Map([["k", "up"], ["j", "down"], ["h", "left"], ["l", "right"]]);
3499
+ tD = /* @__PURE__ */ new Set(["up", "down", "left", "right", "space", "enter"]);
3500
+ h = class {
3501
+ constructor({ render: u, input: F = import_node_process5.stdin, output: e = import_node_process5.stdout, ...s3 }, C = true) {
3502
+ this._track = false, this._cursor = 0, this.state = "initial", this.error = "", this.subscribers = /* @__PURE__ */ new Map(), this._prevFrame = "", this.opts = s3, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = u.bind(this), this._track = C, this.input = F, this.output = e;
3503
+ }
3504
+ prompt() {
3505
+ const u = new import_node_tty.WriteStream(0);
3506
+ return u._write = (F, e, s3) => {
3507
+ this._track && (this.value = this.rl.line.replace(/\t/g, ""), this._cursor = this.rl.cursor, this.emit("value", this.value)), s3();
3508
+ }, this.input.pipe(u), this.rl = import_node_readline.default.createInterface({ input: this.input, output: u, tabSize: 2, prompt: "", escapeCodeTimeout: 50 }), import_node_readline.default.emitKeypressEvents(this.input, this.rl), this.rl.prompt(), this.opts.initialValue !== void 0 && this._track && this.rl.write(this.opts.initialValue), this.input.on("keypress", this.onKeypress), g(this.input, true), this.output.on("resize", this.render), this.render(), new Promise((F, e) => {
3509
+ this.once("submit", () => {
3510
+ this.output.write(src.cursor.show), this.output.off("resize", this.render), g(this.input, false), F(this.value);
3511
+ }), this.once("cancel", () => {
3512
+ this.output.write(src.cursor.show), this.output.off("resize", this.render), g(this.input, false), F(R);
3513
+ });
3514
+ });
3515
+ }
3516
+ on(u, F) {
3517
+ const e = this.subscribers.get(u) ?? [];
3518
+ e.push({ cb: F }), this.subscribers.set(u, e);
3519
+ }
3520
+ once(u, F) {
3521
+ const e = this.subscribers.get(u) ?? [];
3522
+ e.push({ cb: F, once: true }), this.subscribers.set(u, e);
3523
+ }
3524
+ emit(u, ...F) {
3525
+ const e = this.subscribers.get(u) ?? [], s3 = [];
3526
+ for (const C of e)
3527
+ C.cb(...F), C.once && s3.push(() => e.splice(e.indexOf(C), 1));
3528
+ for (const C of s3)
3529
+ C();
3530
+ }
3531
+ unsubscribe() {
3532
+ this.subscribers.clear();
3533
+ }
3534
+ onKeypress(u, F) {
3535
+ if (this.state === "error" && (this.state = "active"), F?.name && !this._track && V.has(F.name) && this.emit("cursor", V.get(F.name)), F?.name && tD.has(F.name) && this.emit("cursor", F.name), u && (u.toLowerCase() === "y" || u.toLowerCase() === "n") && this.emit("confirm", u.toLowerCase() === "y"), u && this.emit("key", u.toLowerCase()), F?.name === "return") {
3536
+ if (this.opts.validate) {
3537
+ const e = this.opts.validate(this.value);
3538
+ e && (this.error = e, this.state = "error", this.rl.write(this.value));
3539
+ }
3540
+ this.state !== "error" && (this.state = "submit");
3541
+ }
3542
+ u === "" && (this.state = "cancel"), (this.state === "submit" || this.state === "cancel") && this.emit("finalize"), this.render(), (this.state === "submit" || this.state === "cancel") && this.close();
3543
+ }
3544
+ close() {
3545
+ this.input.unpipe(), this.input.removeListener("keypress", this.onKeypress), this.output.write(`
3546
+ `), g(this.input, false), this.rl.close(), this.emit(`${this.state}`, this.value), this.unsubscribe();
3547
+ }
3548
+ restoreCursor() {
3549
+ const u = P(this._prevFrame, process.stdout.columns, { hard: true }).split(`
3550
+ `).length - 1;
3551
+ this.output.write(src.cursor.move(-999, u * -1));
3552
+ }
3553
+ render() {
3554
+ const u = P(this._render(this) ?? "", process.stdout.columns, { hard: true });
3555
+ if (u !== this._prevFrame) {
3556
+ if (this.state === "initial")
3557
+ this.output.write(src.cursor.hide);
3558
+ else {
3559
+ const F = FD(this._prevFrame, u);
3560
+ if (this.restoreCursor(), F && F?.length === 1) {
3561
+ const e = F[0];
3562
+ this.output.write(src.cursor.move(0, e)), this.output.write(src.erase.lines(1));
3563
+ const s3 = u.split(`
3564
+ `);
3565
+ this.output.write(s3[e]), this._prevFrame = u, this.output.write(src.cursor.move(0, s3.length - e - 1));
3566
+ return;
3567
+ } else if (F && F?.length > 1) {
3568
+ const e = F[0];
3569
+ this.output.write(src.cursor.move(0, e)), this.output.write(src.erase.down());
3570
+ const C = u.split(`
3571
+ `).slice(e);
3572
+ this.output.write(C.join(`
3573
+ `)), this._prevFrame = u;
3574
+ return;
3575
+ }
3576
+ this.output.write(src.erase.down());
3577
+ }
3578
+ this.output.write(u), this.state === "initial" && (this.state = "active"), this._prevFrame = u;
3579
+ }
3580
+ }
3581
+ };
3582
+ sD = class extends h {
3583
+ get cursor() {
3584
+ return this.value ? 0 : 1;
3585
+ }
3586
+ get _value() {
3587
+ return this.cursor === 0;
3588
+ }
3589
+ constructor(u) {
3590
+ super(u, false), this.value = !!u.initialValue, this.on("value", () => {
3591
+ this.value = this._value;
3592
+ }), this.on("confirm", (F) => {
3593
+ this.output.write(src.cursor.move(0, -1)), this.value = F, this.state = "submit", this.close();
3594
+ }), this.on("cursor", () => {
3595
+ this.value = !this.value;
3596
+ });
3597
+ }
3598
+ };
3599
+ iD = class extends h {
3600
+ constructor(u) {
3601
+ super(u, false), this.cursor = 0, this.options = u.options, this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F }) => F === u.cursorAt), 0), this.on("key", (F) => {
3602
+ F === "a" && this.toggleAll();
3603
+ }), this.on("cursor", (F) => {
3604
+ switch (F) {
3605
+ case "left":
3606
+ case "up":
3607
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
3608
+ break;
3609
+ case "down":
3610
+ case "right":
3611
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
3612
+ break;
3613
+ case "space":
3614
+ this.toggleValue();
3615
+ break;
3616
+ }
3617
+ });
3618
+ }
3619
+ get _value() {
3620
+ return this.options[this.cursor].value;
3621
+ }
3622
+ toggleAll() {
3623
+ const u = this.value.length === this.options.length;
3624
+ this.value = u ? [] : this.options.map((F) => F.value);
3625
+ }
3626
+ toggleValue() {
3627
+ const u = this.value.includes(this._value);
3628
+ this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
3629
+ }
3630
+ };
3631
+ ED = class extends h {
3632
+ constructor(u) {
3633
+ super(u, false), this.cursor = 0, this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
3634
+ switch (F) {
3635
+ case "left":
3636
+ case "up":
3637
+ this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
3638
+ break;
3639
+ case "down":
3640
+ case "right":
3641
+ this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
3642
+ break;
3643
+ }
3644
+ this.changeValue();
3645
+ });
3646
+ }
3647
+ get _value() {
3648
+ return this.options[this.cursor];
3649
+ }
3650
+ changeValue() {
3651
+ this.value = this._value.value;
3652
+ }
3653
+ };
3654
+ oD = class extends h {
3655
+ constructor(u) {
3656
+ super(u), this.valueWithCursor = "", this.on("finalize", () => {
3657
+ this.value || (this.value = u.defaultValue), this.valueWithCursor = this.value;
3658
+ }), this.on("value", () => {
3659
+ if (this.cursor >= this.value.length)
3660
+ this.valueWithCursor = `${this.value}${l.inverse(l.hidden("_"))}`;
3661
+ else {
3662
+ const F = this.value.slice(0, this.cursor), e = this.value.slice(this.cursor);
3663
+ this.valueWithCursor = `${F}${l.inverse(e[0])}${e.slice(1)}`;
3664
+ }
3665
+ });
3666
+ }
3667
+ get cursor() {
3668
+ return this._cursor;
3669
+ }
3670
+ };
3671
+ unicode = isUnicodeSupported();
3672
+ s = (c2, fallback) => unicode ? c2 : fallback;
3673
+ S_STEP_ACTIVE = s("\u276F", ">");
3674
+ S_STEP_CANCEL = s("\u25A0", "x");
3675
+ S_STEP_ERROR = s("\u25B2", "x");
3676
+ S_STEP_SUBMIT = s("\u2714", "\u221A");
3677
+ S_BAR = "";
3678
+ S_BAR_END = "";
3679
+ S_RADIO_ACTIVE = s("\u25CF", ">");
3680
+ S_RADIO_INACTIVE = s("\u25CB", " ");
3681
+ S_CHECKBOX_ACTIVE = s("\u25FB", "[\u2022]");
3682
+ S_CHECKBOX_SELECTED = s("\u25FC", "[+]");
3683
+ S_CHECKBOX_INACTIVE = s("\u25FB", "[ ]");
3684
+ symbol = (state) => {
3685
+ switch (state) {
3686
+ case "initial":
3687
+ case "active": {
3688
+ return colors.cyan(S_STEP_ACTIVE);
3689
+ }
3690
+ case "cancel": {
3691
+ return colors.red(S_STEP_CANCEL);
3692
+ }
3693
+ case "error": {
3694
+ return colors.yellow(S_STEP_ERROR);
3695
+ }
3696
+ case "submit": {
3697
+ return colors.green(S_STEP_SUBMIT);
3698
+ }
3699
+ }
3700
+ };
3701
+ text = (opts) => {
3702
+ return new oD({
3703
+ validate: opts.validate,
3704
+ placeholder: opts.placeholder,
3705
+ defaultValue: opts.defaultValue,
3706
+ initialValue: opts.initialValue,
3707
+ render() {
3708
+ const title = `${colors.gray(S_BAR)}
3709
+ ${symbol(this.state)} ${opts.message}
3710
+ `;
3711
+ const placeholder = opts.placeholder ? colors.inverse(opts.placeholder[0]) + colors.dim(opts.placeholder.slice(1)) : colors.inverse(colors.hidden("_"));
3712
+ const value = this.value ? this.valueWithCursor : placeholder;
3713
+ switch (this.state) {
3714
+ case "error": {
3715
+ return `${title.trim()}
3716
+ ${colors.yellow(
3717
+ S_BAR
3718
+ )} ${value}
3719
+ ${colors.yellow(S_BAR_END)} ${colors.yellow(
3720
+ this.error
3721
+ )}
3722
+ `;
3723
+ }
3724
+ case "submit": {
3725
+ return `${title}${colors.gray(S_BAR)} ${colors.dim(
3726
+ this.value || opts.placeholder
3727
+ )}`;
3728
+ }
3729
+ case "cancel": {
3730
+ return `${title}${colors.gray(S_BAR)} ${colors.strikethrough(
3731
+ colors.dim(this.value ?? "")
3732
+ )}${this.value?.trim() ? "\n" + colors.gray(S_BAR) : ""}`;
3733
+ }
3734
+ default: {
3735
+ return `${title}${colors.cyan(S_BAR)} ${value}
3736
+ ${colors.cyan(
3737
+ S_BAR_END
3738
+ )}
3739
+ `;
3740
+ }
3741
+ }
3742
+ }
3743
+ }).prompt();
3744
+ };
3745
+ confirm = (opts) => {
3746
+ const active = opts.active ?? "Yes";
3747
+ const inactive = opts.inactive ?? "No";
3748
+ return new sD({
3749
+ active,
3750
+ inactive,
3751
+ initialValue: opts.initialValue ?? true,
3752
+ render() {
3753
+ const title = `${colors.gray(S_BAR)}
3754
+ ${symbol(this.state)} ${opts.message}
3755
+ `;
3756
+ const value = this.value ? active : inactive;
3757
+ switch (this.state) {
3758
+ case "submit": {
3759
+ return `${title}${colors.gray(S_BAR)} ${colors.dim(value)}`;
3760
+ }
3761
+ case "cancel": {
3762
+ return `${title}${colors.gray(S_BAR)} ${colors.strikethrough(
3763
+ colors.dim(value)
3764
+ )}
3765
+ ${colors.gray(S_BAR)}`;
3766
+ }
3767
+ default: {
3768
+ return `${title}${colors.cyan(S_BAR)} ${this.value ? `${colors.green(S_RADIO_ACTIVE)} ${active}` : `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(active)}`} ${colors.dim("/")} ${this.value ? `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(inactive)}` : `${colors.green(S_RADIO_ACTIVE)} ${inactive}`}
3769
+ ${colors.cyan(S_BAR_END)}
3770
+ `;
3771
+ }
3772
+ }
3773
+ }
3774
+ }).prompt();
3775
+ };
3776
+ select = (opts) => {
3777
+ const opt = (option, state) => {
3778
+ const label = option.label ?? String(option.value);
3779
+ switch (state) {
3780
+ case "active": {
3781
+ return `${colors.green(S_RADIO_ACTIVE)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
3782
+ }
3783
+ case "selected": {
3784
+ return `${colors.dim(label)}`;
3785
+ }
3786
+ case "cancelled": {
3787
+ return `${colors.strikethrough(colors.dim(label))}`;
3788
+ }
3789
+ }
3790
+ return `${colors.dim(S_RADIO_INACTIVE)} ${colors.dim(label)}`;
3791
+ };
3792
+ return new ED({
3793
+ options: opts.options,
3794
+ initialValue: opts.initialValue,
3795
+ render() {
3796
+ const title = `${colors.gray(S_BAR)}
3797
+ ${symbol(this.state)} ${opts.message}
3798
+ `;
3799
+ switch (this.state) {
3800
+ case "submit": {
3801
+ return `${title}${colors.gray(S_BAR)} ${opt(
3802
+ this.options[this.cursor],
3803
+ "selected"
3804
+ )}`;
3805
+ }
3806
+ case "cancel": {
3807
+ return `${title}${colors.gray(S_BAR)} ${opt(
3808
+ this.options[this.cursor],
3809
+ "cancelled"
3810
+ )}
3811
+ ${colors.gray(S_BAR)}`;
3812
+ }
3813
+ default: {
3814
+ return `${title}${colors.cyan(S_BAR)} ${this.options.map(
3815
+ (option, i) => opt(option, i === this.cursor ? "active" : "inactive")
3816
+ ).join(`
3817
+ ${colors.cyan(S_BAR)} `)}
3818
+ ${colors.cyan(S_BAR_END)}
3819
+ `;
3820
+ }
3821
+ }
3822
+ }
3823
+ }).prompt();
3824
+ };
3825
+ multiselect = (opts) => {
3826
+ const opt = (option, state) => {
3827
+ const label = option.label ?? String(option.value);
3828
+ switch (state) {
3829
+ case "active": {
3830
+ return `${colors.cyan(S_CHECKBOX_ACTIVE)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
3831
+ }
3832
+ case "selected": {
3833
+ return `${colors.green(S_CHECKBOX_SELECTED)} ${colors.dim(label)}`;
3834
+ }
3835
+ case "cancelled": {
3836
+ return `${colors.strikethrough(colors.dim(label))}`;
3837
+ }
3838
+ case "active-selected": {
3839
+ return `${colors.green(S_CHECKBOX_SELECTED)} ${label} ${option.hint ? colors.dim(`(${option.hint})`) : ""}`;
3840
+ }
3841
+ case "submitted": {
3842
+ return `${colors.dim(label)}`;
3843
+ }
3844
+ }
3845
+ return `${colors.dim(S_CHECKBOX_INACTIVE)} ${colors.dim(label)}`;
3846
+ };
3847
+ return new iD({
3848
+ options: opts.options,
3849
+ initialValues: opts.initialValues,
3850
+ required: opts.required ?? true,
3851
+ cursorAt: opts.cursorAt,
3852
+ validate(selected) {
3853
+ if (this.required && selected.length === 0) {
3854
+ return `Please select at least one option.
3855
+ ${colors.reset(
3856
+ colors.dim(
3857
+ `Press ${colors.gray(
3858
+ colors.bgWhite(colors.inverse(" space "))
3859
+ )} to select, ${colors.gray(
3860
+ colors.bgWhite(colors.inverse(" enter "))
3861
+ )} to submit`
3862
+ )
3863
+ )}`;
3864
+ }
3865
+ },
3866
+ render() {
3867
+ const title = `${colors.gray(S_BAR)}
3868
+ ${symbol(this.state)} ${opts.message}
3869
+ `;
3870
+ switch (this.state) {
3871
+ case "submit": {
3872
+ return `${title}${colors.gray(S_BAR)} ${this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "submitted")).join(colors.dim(", ")) || colors.dim("none")}`;
3873
+ }
3874
+ case "cancel": {
3875
+ const label = this.options.filter(({ value }) => this.value.includes(value)).map((option) => opt(option, "cancelled")).join(colors.dim(", "));
3876
+ return `${title}${colors.gray(S_BAR)} ${label.trim() ? `${label}
3877
+ ${colors.gray(S_BAR)}` : ""}`;
3878
+ }
3879
+ case "error": {
3880
+ const footer = this.error.split("\n").map(
3881
+ (ln, i) => i === 0 ? `${colors.yellow(S_BAR_END)} ${colors.yellow(ln)}` : ` ${ln}`
3882
+ ).join("\n");
3883
+ return title + colors.yellow(S_BAR) + " " + this.options.map((option, i) => {
3884
+ const selected = this.value.includes(option.value);
3885
+ const active = i === this.cursor;
3886
+ if (active && selected) {
3887
+ return opt(option, "active-selected");
3888
+ }
3889
+ if (selected) {
3890
+ return opt(option, "selected");
3891
+ }
3892
+ return opt(option, active ? "active" : "inactive");
3893
+ }).join(`
3894
+ ${colors.yellow(S_BAR)} `) + "\n" + footer + "\n";
3895
+ }
3896
+ default: {
3897
+ return `${title}${colors.cyan(S_BAR)} ${this.options.map((option, i) => {
3898
+ const selected = this.value.includes(option.value);
3899
+ const active = i === this.cursor;
3900
+ if (active && selected) {
3901
+ return opt(option, "active-selected");
3902
+ }
3903
+ if (selected) {
3904
+ return opt(option, "selected");
3905
+ }
3906
+ return opt(option, active ? "active" : "inactive");
3907
+ }).join(`
3908
+ ${colors.cyan(S_BAR)} `)}
3909
+ ${colors.cyan(S_BAR_END)}
3910
+ `;
3911
+ }
3912
+ }
3913
+ }
3914
+ }).prompt();
3915
+ };
3916
+ }
3917
+ });
3918
+
3919
+ // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.36c0034f.mjs
3920
+ function detectProvider(env2) {
3921
+ for (const provider of providers) {
3922
+ const envName = provider[1] || provider[0];
3923
+ if (env2[envName]) {
3924
+ return {
3925
+ name: provider[0].toLowerCase(),
3926
+ ...provider[2]
3927
+ };
3928
+ }
3929
+ }
3930
+ if (env2.SHELL && env2.SHELL === "/bin/jsh") {
3931
+ return {
3932
+ name: "stackblitz",
3933
+ ci: false
3934
+ };
3935
+ }
3936
+ return {
3937
+ name: "",
3938
+ ci: false
3939
+ };
3940
+ }
3941
+ function toBoolean(val) {
3942
+ return val ? val !== "false" : false;
3943
+ }
3944
+ function ansiRegex2({ onlyFirst = false } = {}) {
3945
+ const pattern = [
3946
+ "[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
3947
+ "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
3948
+ ].join("|");
3949
+ return new RegExp(pattern, onlyFirst ? void 0 : "g");
3950
+ }
3951
+ function stripAnsi2(string) {
3952
+ if (typeof string !== "string") {
3953
+ throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
3954
+ }
3955
+ return string.replace(regex, "");
3956
+ }
3957
+ function getDefaultExportFromCjs(x) {
3958
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
3959
+ }
3960
+ function stringWidth$1(string, options) {
3961
+ if (typeof string !== "string" || string.length === 0) {
3962
+ return 0;
3963
+ }
3964
+ options = {
3965
+ ambiguousIsNarrow: true,
3966
+ countAnsiEscapeCodes: false,
3967
+ ...options
3968
+ };
3969
+ if (!options.countAnsiEscapeCodes) {
3970
+ string = stripAnsi2(string);
3971
+ }
3972
+ if (string.length === 0) {
3973
+ return 0;
3974
+ }
3975
+ const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
3976
+ let width = 0;
3977
+ for (const { segment: character } of new Intl.Segmenter().segment(string)) {
3978
+ const codePoint = character.codePointAt(0);
3979
+ if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
3980
+ continue;
3981
+ }
3982
+ if (codePoint >= 768 && codePoint <= 879) {
3983
+ continue;
3984
+ }
3985
+ if (emojiRegex().test(character)) {
3986
+ width += 2;
3987
+ continue;
3988
+ }
3989
+ const code = eastAsianWidth.eastAsianWidth(character);
3990
+ switch (code) {
3991
+ case "F":
3992
+ case "W": {
3993
+ width += 2;
3994
+ break;
3995
+ }
3996
+ case "A": {
3997
+ width += ambiguousCharacterWidth;
3998
+ break;
3999
+ }
4000
+ default: {
4001
+ width += 1;
4002
+ }
4003
+ }
4004
+ }
4005
+ return width;
4006
+ }
4007
+ function isUnicodeSupported() {
4008
+ if (import_node_process6.default.platform !== "win32") {
4009
+ return import_node_process6.default.env.TERM !== "linux";
4010
+ }
4011
+ return Boolean(import_node_process6.default.env.CI) || Boolean(import_node_process6.default.env.WT_SESSION) || Boolean(import_node_process6.default.env.TERMINUS_SUBLIME) || import_node_process6.default.env.ConEmuTask === "{cmd::Cmder}" || import_node_process6.default.env.TERM_PROGRAM === "Terminus-Sublime" || import_node_process6.default.env.TERM_PROGRAM === "vscode" || import_node_process6.default.env.TERM === "xterm-256color" || import_node_process6.default.env.TERM === "alacritty" || import_node_process6.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
4012
+ }
4013
+ function stringWidth(str) {
4014
+ if (!Intl.Segmenter) {
4015
+ return stripAnsi(str).length;
4016
+ }
4017
+ return stringWidth$1(str);
4018
+ }
4019
+ function characterFormat(str) {
4020
+ return str.replace(/`([^`]+)`/gm, (_2, m2) => colors.cyan(m2)).replace(/\s+_([^_]+)_\s+/gm, (_2, m2) => ` ${colors.underline(m2)} `);
4021
+ }
4022
+ function getColor2(color = "white") {
4023
+ return colors[color] || colors.white;
4024
+ }
4025
+ function getBgColor(color = "bgWhite") {
4026
+ return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
4027
+ }
4028
+ function createConsola2(options = {}) {
4029
+ let level = _getDefaultLogLevel();
4030
+ if (process.env.CONSOLA_LEVEL) {
4031
+ level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
4032
+ }
4033
+ const consola2 = createConsola({
4034
+ level,
4035
+ defaults: { level },
4036
+ stdout: process.stdout,
4037
+ stderr: process.stderr,
4038
+ prompt: (...args) => Promise.resolve().then(() => (init_prompt(), prompt_exports)).then((m2) => m2.prompt(...args)),
4039
+ reporters: options.reporters || [
4040
+ options.fancy ?? !(isCI2 || isTest) ? new FancyReporter() : new BasicReporter()
4041
+ ],
4042
+ ...options
4043
+ });
4044
+ return consola2;
4045
+ }
4046
+ function _getDefaultLogLevel() {
4047
+ if (isDebug) {
4048
+ return LogLevels.debug;
4049
+ }
4050
+ if (isTest) {
4051
+ return LogLevels.warn;
4052
+ }
4053
+ return LogLevels.info;
4054
+ }
4055
+ var import_node_process6, providers, processShim, envShim, providerInfo, nodeENV, isCI2, hasTTY, isDebug, isTest, regex, eastasianwidth, eastasianwidthExports, eastAsianWidth, emojiRegex, TYPE_COLOR_MAP, LEVEL_COLOR_MAP, unicode2, s2, TYPE_ICONS, FancyReporter, consola;
4056
+ var init_consola_36c0034f = __esm({
4057
+ "../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.36c0034f.mjs"() {
4058
+ "use strict";
4059
+ init_core2();
4060
+ init_consola_06ad8a64();
4061
+ import_node_process6 = __toESM(require("process"), 1);
4062
+ init_utils2();
4063
+ providers = [
4064
+ ["APPVEYOR"],
4065
+ ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
4066
+ ["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
4067
+ ["APPCIRCLE", "AC_APPCIRCLE"],
4068
+ ["BAMBOO", "bamboo_planKey"],
4069
+ ["BITBUCKET", "BITBUCKET_COMMIT"],
4070
+ ["BITRISE", "BITRISE_IO"],
4071
+ ["BUDDY", "BUDDY_WORKSPACE_ID"],
4072
+ ["BUILDKITE"],
4073
+ ["CIRCLE", "CIRCLECI"],
4074
+ ["CIRRUS", "CIRRUS_CI"],
4075
+ ["CLOUDFLARE_PAGES", "CF_PAGES", { ci: true }],
4076
+ ["CODEBUILD", "CODEBUILD_BUILD_ARN"],
4077
+ ["CODEFRESH", "CF_BUILD_ID"],
4078
+ ["DRONE"],
4079
+ ["DRONE", "DRONE_BUILD_EVENT"],
4080
+ ["DSARI"],
4081
+ ["GITHUB_ACTIONS"],
4082
+ ["GITLAB", "GITLAB_CI"],
4083
+ ["GITLAB", "CI_MERGE_REQUEST_ID"],
4084
+ ["GOCD", "GO_PIPELINE_LABEL"],
4085
+ ["LAYERCI"],
4086
+ ["HUDSON", "HUDSON_URL"],
4087
+ ["JENKINS", "JENKINS_URL"],
4088
+ ["MAGNUM"],
4089
+ ["NETLIFY"],
4090
+ ["NETLIFY", "NETLIFY_LOCAL", { ci: false }],
4091
+ ["NEVERCODE"],
4092
+ ["RENDER"],
4093
+ ["SAIL", "SAILCI"],
4094
+ ["SEMAPHORE"],
4095
+ ["SCREWDRIVER"],
4096
+ ["SHIPPABLE"],
4097
+ ["SOLANO", "TDDIUM"],
4098
+ ["STRIDER"],
4099
+ ["TEAMCITY", "TEAMCITY_VERSION"],
4100
+ ["TRAVIS"],
4101
+ ["VERCEL", "NOW_BUILDER"],
4102
+ ["APPCENTER", "APPCENTER_BUILD_ID"],
4103
+ ["CODESANDBOX", "CODESANDBOX_SSE", { ci: false }],
4104
+ ["STACKBLITZ"],
4105
+ ["STORMKIT"],
4106
+ ["CLEAVR"]
4107
+ ];
4108
+ processShim = typeof process !== "undefined" ? process : {};
4109
+ envShim = processShim.env || {};
4110
+ providerInfo = detectProvider(envShim);
4111
+ nodeENV = typeof process !== "undefined" && process.env && process.env.NODE_ENV || "";
4112
+ processShim.platform;
4113
+ providerInfo.name;
4114
+ isCI2 = toBoolean(envShim.CI) || providerInfo.ci !== false;
4115
+ hasTTY = toBoolean(processShim.stdout && processShim.stdout.isTTY);
4116
+ isDebug = toBoolean(envShim.DEBUG);
4117
+ isTest = nodeENV === "test" || toBoolean(envShim.TEST);
4118
+ toBoolean(envShim.MINIMAL) || isCI2 || isTest || !hasTTY;
4119
+ regex = ansiRegex2();
4120
+ eastasianwidth = { exports: {} };
4121
+ (function(module2) {
4122
+ var eaw = {};
4123
+ {
4124
+ module2.exports = eaw;
4125
+ }
4126
+ eaw.eastAsianWidth = function(character) {
4127
+ var x = character.charCodeAt(0);
4128
+ var y = character.length == 2 ? character.charCodeAt(1) : 0;
4129
+ var codePoint = x;
4130
+ if (55296 <= x && x <= 56319 && (56320 <= y && y <= 57343)) {
4131
+ x &= 1023;
4132
+ y &= 1023;
4133
+ codePoint = x << 10 | y;
4134
+ codePoint += 65536;
4135
+ }
4136
+ if (12288 == codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) {
4137
+ return "F";
4138
+ }
4139
+ if (8361 == codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518) {
4140
+ return "H";
4141
+ }
4142
+ if (4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141) {
4143
+ return "W";
4144
+ }
4145
+ if (32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 == codePoint || 175 == codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630) {
4146
+ return "Na";
4147
+ }
4148
+ if (161 == codePoint || 164 == codePoint || 167 <= codePoint && codePoint <= 168 || 170 == codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 == codePoint || 208 == codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 == codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 == codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 == codePoint || 254 == codePoint || 257 == codePoint || 273 == codePoint || 275 == codePoint || 283 == codePoint || 294 <= codePoint && codePoint <= 295 || 299 == codePoint || 305 <= codePoint && codePoint <= 307 || 312 == codePoint || 319 <= codePoint && codePoint <= 322 || 324 == codePoint || 328 <= codePoint && codePoint <= 331 || 333 == codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 == codePoint || 462 == codePoint || 464 == codePoint || 466 == codePoint || 468 == codePoint || 470 == codePoint || 472 == codePoint || 474 == codePoint || 476 == codePoint || 593 == codePoint || 609 == codePoint || 708 == codePoint || 711 == codePoint || 713 <= codePoint && codePoint <= 715 || 717 == codePoint || 720 == codePoint || 728 <= codePoint && codePoint <= 731 || 733 == codePoint || 735 == codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 == codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 == codePoint || 8208 == codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 == codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 == codePoint || 8251 == codePoint || 8254 == codePoint || 8308 == codePoint || 8319 == codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 == codePoint || 8451 == codePoint || 8453 == codePoint || 8457 == codePoint || 8467 == codePoint || 8470 == codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 == codePoint || 8491 == codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 == codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 == codePoint || 8660 == codePoint || 8679 == codePoint || 8704 == codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 == codePoint || 8719 == codePoint || 8721 == codePoint || 8725 == codePoint || 8730 == codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 == codePoint || 8741 == codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 == codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 == codePoint || 8780 == codePoint || 8786 == codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 == codePoint || 8857 == codePoint || 8869 == codePoint || 8895 == codePoint || 8978 == codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 == codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 == codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 == codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 == codePoint || 9758 == codePoint || 9792 == codePoint || 9794 == codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 == codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 == codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 == codePoint || 10071 == codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 == codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109) {
4149
+ return "A";
4150
+ }
4151
+ return "N";
4152
+ };
4153
+ eaw.characterLength = function(character) {
4154
+ var code = this.eastAsianWidth(character);
4155
+ if (code == "F" || code == "W" || code == "A") {
4156
+ return 2;
4157
+ } else {
4158
+ return 1;
4159
+ }
4160
+ };
4161
+ function stringToArray(string) {
4162
+ return string.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g) || [];
4163
+ }
4164
+ eaw.length = function(string) {
4165
+ var characters = stringToArray(string);
4166
+ var len = 0;
4167
+ for (var i = 0; i < characters.length; i++) {
4168
+ len = len + this.characterLength(characters[i]);
4169
+ }
4170
+ return len;
4171
+ };
4172
+ eaw.slice = function(text2, start, end) {
4173
+ textLen = eaw.length(text2);
4174
+ start = start ? start : 0;
4175
+ end = end ? end : 1;
4176
+ if (start < 0) {
4177
+ start = textLen + start;
4178
+ }
4179
+ if (end < 0) {
4180
+ end = textLen + end;
4181
+ }
4182
+ var result = "";
4183
+ var eawLen = 0;
4184
+ var chars = stringToArray(text2);
4185
+ for (var i = 0; i < chars.length; i++) {
4186
+ var char = chars[i];
4187
+ var charLen = eaw.length(char);
4188
+ if (eawLen >= start - (charLen == 2 ? 1 : 0)) {
4189
+ if (eawLen + charLen <= end) {
4190
+ result += char;
4191
+ } else {
4192
+ break;
4193
+ }
4194
+ }
4195
+ eawLen += charLen;
4196
+ }
4197
+ return result;
4198
+ };
4199
+ })(eastasianwidth);
4200
+ eastasianwidthExports = eastasianwidth.exports;
4201
+ eastAsianWidth = /* @__PURE__ */ getDefaultExportFromCjs(eastasianwidthExports);
4202
+ emojiRegex = () => {
4203
+ return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
4204
+ };
4205
+ TYPE_COLOR_MAP = {
4206
+ info: "cyan",
4207
+ fail: "red",
4208
+ success: "green",
4209
+ ready: "green",
4210
+ start: "magenta"
4211
+ };
4212
+ LEVEL_COLOR_MAP = {
4213
+ 0: "red",
4214
+ 1: "yellow"
4215
+ };
4216
+ unicode2 = isUnicodeSupported();
4217
+ s2 = (c2, fallback) => unicode2 ? c2 : fallback;
4218
+ TYPE_ICONS = {
4219
+ error: s2("\u2716", "\xD7"),
4220
+ fatal: s2("\u2716", "\xD7"),
4221
+ ready: s2("\u2714", "\u221A"),
4222
+ warn: s2("\u26A0", "\u203C"),
4223
+ info: s2("\u2139", "i"),
4224
+ success: s2("\u2714", "\u221A"),
4225
+ debug: s2("\u2699", "D"),
4226
+ trace: s2("\u2192", "\u2192"),
4227
+ fail: s2("\u2716", "\xD7"),
4228
+ start: s2("\u25D0", "o"),
4229
+ log: ""
4230
+ };
4231
+ FancyReporter = class extends BasicReporter {
4232
+ formatStack(stack) {
4233
+ return "\n" + parseStack(stack).map(
4234
+ (line) => " " + line.replace(/^at +/, (m2) => colors.gray(m2)).replace(/\((.+)\)/, (_2, m2) => `(${colors.cyan(m2)})`)
4235
+ ).join("\n");
4236
+ }
4237
+ formatType(logObj, isBadge, opts) {
4238
+ const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
4239
+ if (isBadge) {
4240
+ return getBgColor(typeColor)(
4241
+ colors.black(` ${logObj.type.toUpperCase()} `)
4242
+ );
4243
+ }
4244
+ const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
4245
+ return _type ? getColor2(typeColor)(_type) : "";
4246
+ }
4247
+ formatLogObj(logObj, opts) {
4248
+ const [message, ...additional] = this.formatArgs(logObj.args, opts).split(
4249
+ "\n"
4250
+ );
4251
+ if (logObj.type === "box") {
4252
+ return box(
4253
+ characterFormat(
4254
+ message + (additional.length > 0 ? "\n" + additional.join("\n") : "")
4255
+ ),
4256
+ {
4257
+ title: logObj.title ? characterFormat(logObj.title) : void 0,
4258
+ style: logObj.style
4259
+ }
4260
+ );
4261
+ }
4262
+ const date = this.formatDate(logObj.date, opts);
4263
+ const coloredDate = date && colors.gray(date);
4264
+ const isBadge = logObj.badge ?? logObj.level < 2;
4265
+ const type = this.formatType(logObj, isBadge, opts);
4266
+ const tag = logObj.tag ? colors.gray(logObj.tag) : "";
4267
+ let line;
4268
+ const left = this.filterAndJoin([type, characterFormat(message)]);
4269
+ const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
4270
+ const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
4271
+ line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
4272
+ line += characterFormat(
4273
+ additional.length > 0 ? "\n" + additional.join("\n") : ""
4274
+ );
4275
+ if (logObj.type === "trace") {
4276
+ const _err = new Error("Trace: " + logObj.message);
4277
+ line += this.formatStack(_err.stack || "");
4278
+ }
4279
+ return isBadge ? "\n" + line + "\n" : line;
4280
+ }
4281
+ };
4282
+ consola = createConsola2();
4283
+ }
4284
+ });
4285
+
2415
4286
  // src/index.ts
2416
4287
  var src_exports = {};
2417
4288
  __export(src_exports, {
@@ -2475,7 +4346,7 @@ var npm = {
2475
4346
  }
2476
4347
  };
2477
4348
  function flattenNpmListOutput(projects) {
2478
- const queue = projects.flatMap(
4349
+ const queue2 = projects.flatMap(
2479
4350
  (project) => {
2480
4351
  const acc = [];
2481
4352
  if (project.dependencies)
@@ -2486,16 +4357,16 @@ function flattenNpmListOutput(projects) {
2486
4357
  }
2487
4358
  );
2488
4359
  const dependencies = [];
2489
- while (queue.length > 0) {
2490
- Object.entries(queue.pop()).forEach(([name, meta]) => {
4360
+ while (queue2.length > 0) {
4361
+ Object.entries(queue2.pop()).forEach(([name, meta]) => {
2491
4362
  dependencies.push({
2492
4363
  name,
2493
4364
  version: meta.version
2494
4365
  });
2495
4366
  if (meta.dependencies)
2496
- queue.push(meta.dependencies);
4367
+ queue2.push(meta.dependencies);
2497
4368
  if (meta.devDependencies)
2498
- queue.push(meta.devDependencies);
4369
+ queue2.push(meta.devDependencies);
2499
4370
  });
2500
4371
  }
2501
4372
  return dedupeDependencies(dependencies);
@@ -2528,7 +4399,7 @@ var bun = {
2528
4399
  const { execa: execa2 } = await Promise.resolve().then(() => (init_execa(), execa_exports));
2529
4400
  const res = await execa2("bun", args, { cwd: options?.cwd });
2530
4401
  return dedupeDependencies(
2531
- res.stdout.split("\n").slice(1).map((line) => line.trim()).map((line) => /.* (@?\S+)@(\S+)$/.exec(line)).filter((match) => !!match).map(([_, name, version2]) => ({ name, version: version2 }))
4402
+ res.stdout.split("\n").slice(1).map((line) => line.trim()).map((line) => /.* (@?\S+)@(\S+)$/.exec(line)).filter((match) => !!match).map(([_2, name, version2]) => ({ name, version: version2 }))
2532
4403
  );
2533
4404
  }
2534
4405
  };
@@ -2549,17 +4420,17 @@ var yarn = {
2549
4420
  const tree = res.stdout.split("\n").map((line) => JSON.parse(line)).find((line) => line.type === "tree")?.data;
2550
4421
  if (tree == null)
2551
4422
  throw Error("'yarn list --json' did not output a tree");
2552
- const queue = [...tree.trees];
4423
+ const queue2 = [...tree.trees];
2553
4424
  const dependencies = [];
2554
- while (queue.length > 0) {
2555
- const { name: treeName, children } = queue.pop();
4425
+ while (queue2.length > 0) {
4426
+ const { name: treeName, children } = queue2.pop();
2556
4427
  const match = /(@?\S+)@(\S+)$/.exec(treeName);
2557
4428
  if (match) {
2558
- const [_, name, version2] = match;
4429
+ const [_2, name, version2] = match;
2559
4430
  dependencies.push({ name, version: version2 });
2560
4431
  }
2561
4432
  if (children != null) {
2562
- queue.push(...children);
4433
+ queue2.push(...children);
2563
4434
  }
2564
4435
  }
2565
4436
  return dedupeDependencies(dependencies);
@@ -2776,21 +4647,21 @@ function devHtmlPrerender(config, server) {
2776
4647
  }
2777
4648
  function pointToDevServer(config, server, id, document, querySelector, attr) {
2778
4649
  document.querySelectorAll(querySelector).forEach((element) => {
2779
- const src = element.getAttribute(attr);
2780
- if (!src || isUrl(src))
4650
+ const src2 = element.getAttribute(attr);
4651
+ if (!src2 || isUrl(src2))
2781
4652
  return;
2782
4653
  let resolvedAbsolutePath;
2783
4654
  const matchingAlias = Object.entries(config.alias).find(
2784
- ([key]) => src.startsWith(key)
4655
+ ([key]) => src2.startsWith(key)
2785
4656
  );
2786
4657
  if (matchingAlias) {
2787
4658
  const [alias, replacement] = matchingAlias;
2788
4659
  resolvedAbsolutePath = (0, import_node_path6.resolve)(
2789
4660
  config.root,
2790
- src.replace(alias, replacement)
4661
+ src2.replace(alias, replacement)
2791
4662
  );
2792
4663
  } else {
2793
- resolvedAbsolutePath = (0, import_node_path6.resolve)((0, import_node_path6.dirname)(id), src);
4664
+ resolvedAbsolutePath = (0, import_node_path6.resolve)((0, import_node_path6.dirname)(id), src2);
2794
4665
  }
2795
4666
  if (resolvedAbsolutePath) {
2796
4667
  const relativePath = normalizePath(
@@ -2919,7 +4790,7 @@ var import_fs_extra2 = __toESM(require("fs-extra"), 1);
2919
4790
  function multipageMove(entrypoints, config) {
2920
4791
  return {
2921
4792
  name: "wxt:multipage-move",
2922
- async writeBundle(_, bundle) {
4793
+ async writeBundle(_2, bundle) {
2923
4794
  for (const oldBundlePath in bundle) {
2924
4795
  const entrypoint = entrypoints.find(
2925
4796
  (entry) => !!normalizePath(entry.inputPath).endsWith(oldBundlePath)
@@ -3104,7 +4975,7 @@ function cssEntrypoints(entrypoint, config) {
3104
4975
  }
3105
4976
  };
3106
4977
  },
3107
- generateBundle(_, bundle) {
4978
+ generateBundle(_2, bundle) {
3108
4979
  Object.keys(bundle).forEach((file) => {
3109
4980
  if (file.endsWith(".js"))
3110
4981
  delete bundle[file];
@@ -3200,6 +5071,28 @@ function globals(config) {
3200
5071
 
3201
5072
  // src/core/builders/vite/plugins/webextensionPolyfillMock.ts
3202
5073
  var import_node_path9 = __toESM(require("path"), 1);
5074
+ function webextensionPolyfillMock(config) {
5075
+ return {
5076
+ name: "wxt:testing-inline-deps",
5077
+ config() {
5078
+ return {
5079
+ resolve: {
5080
+ alias: {
5081
+ // Alias to use a mocked version of the polyfill
5082
+ "webextension-polyfill": import_node_path9.default.resolve(
5083
+ config.wxtModuleDir,
5084
+ "dist/virtual/mock-browser"
5085
+ )
5086
+ }
5087
+ },
5088
+ ssr: {
5089
+ // Inline all WXT modules
5090
+ noExternal: ["wxt"]
5091
+ }
5092
+ };
5093
+ }
5094
+ };
5095
+ }
3203
5096
 
3204
5097
  // src/core/builders/vite/plugins/excludeBrowserPolyfill.ts
3205
5098
  function excludeBrowserPolyfill(config) {
@@ -3257,6 +5150,38 @@ function defineImportMeta() {
3257
5150
  };
3258
5151
  }
3259
5152
 
5153
+ // src/core/utils/transform.ts
5154
+ var import_magicast = require("magicast");
5155
+ function removeMainFunctionCode(code) {
5156
+ const mod = (0, import_magicast.parseModule)(code);
5157
+ emptyMainFunction(mod);
5158
+ return mod.generate();
5159
+ }
5160
+ function emptyMainFunction(mod) {
5161
+ if (mod.exports?.default?.$type === "function-call") {
5162
+ if (mod.exports.default.$ast?.arguments?.[0]?.body) {
5163
+ mod.exports.default.$ast.arguments[0].body.body = [];
5164
+ } else if (mod.exports.default.$ast?.arguments?.[0]?.properties) {
5165
+ mod.exports.default.$ast.arguments[0].properties = mod.exports.default.$ast.arguments[0].properties.filter(
5166
+ (prop) => prop.key.name !== "main"
5167
+ );
5168
+ }
5169
+ }
5170
+ }
5171
+
5172
+ // src/core/builders/vite/plugins/removeEntrypointMainFunction.ts
5173
+ var import_node_path10 = require("path");
5174
+ function removeEntrypointMainFunction(config, path13) {
5175
+ const absPath = normalizePath((0, import_node_path10.resolve)(config.root, path13));
5176
+ return {
5177
+ name: "wxt:remove-entrypoint-main-function",
5178
+ transform(code, id) {
5179
+ if (id === absPath)
5180
+ return removeMainFunctionCode(code);
5181
+ }
5182
+ };
5183
+ }
5184
+
3260
5185
  // src/core/utils/arrays.ts
3261
5186
  function every(array, predicate) {
3262
5187
  for (let i = 0; i < array.length; i++)
@@ -3274,13 +5199,31 @@ function toArray(a) {
3274
5199
  return Array.isArray(a) ? a : [a];
3275
5200
  }
3276
5201
 
5202
+ // src/core/utils/strings.ts
5203
+ function kebabCaseAlphanumeric(str) {
5204
+ return str.toLowerCase().replace(/[^a-z0-9-\s]/g, "").replace(/\s+/g, "-");
5205
+ }
5206
+ function safeVarName(str) {
5207
+ return "_" + kebabCaseAlphanumeric(str.trim()).replace("-", "_");
5208
+ }
5209
+ function removeImportStatements(text2) {
5210
+ return text2.replace(
5211
+ /(import\s?[{\w][\s\S]*?from\s?["'][\s\S]*?["'];?|import\s?["'][\s\S]*?["'];?)/gm,
5212
+ ""
5213
+ );
5214
+ }
5215
+ function removeProjectImportStatements(text2) {
5216
+ const noImports = removeImportStatements(text2);
5217
+ return `import { defineUnlistedScript, defineContentScript, defineBackground } from 'wxt/sandbox';
5218
+
5219
+ ${noImports}`;
5220
+ }
5221
+
3277
5222
  // src/core/builders/vite/index.ts
3278
5223
  async function createViteBuilder(wxtConfig, hooks, server) {
3279
5224
  const vite = await import("vite");
3280
5225
  const getBaseConfig = async () => {
3281
- const config = await wxtConfig.vite({
3282
- ...wxtConfig.env
3283
- });
5226
+ const config = await wxtConfig.vite(wxtConfig.env);
3284
5227
  config.root = wxtConfig.root;
3285
5228
  config.configFile = false;
3286
5229
  config.logLevel = "warn";
@@ -3322,14 +5265,22 @@ async function createViteBuilder(wxtConfig, hooks, server) {
3322
5265
  if (entrypoint.type === "content-script-style" || entrypoint.type === "unlisted-style") {
3323
5266
  plugins.push(cssEntrypoints(entrypoint, wxtConfig));
3324
5267
  }
5268
+ const iifeReturnValueName = safeVarName(entrypoint.name);
3325
5269
  const libMode = {
3326
5270
  mode: wxtConfig.mode,
3327
5271
  plugins,
5272
+ esbuild: {
5273
+ // Add a footer with the returned value so it can return values to `scripting.executeScript`
5274
+ // Footer is added apart of esbuild to make sure it's not minified. It
5275
+ // get's removed if added to `build.rollupOptions.output.footer`
5276
+ // See https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/scripting/executeScript#return_value
5277
+ footer: iifeReturnValueName + ";"
5278
+ },
3328
5279
  build: {
3329
5280
  lib: {
3330
5281
  entry,
3331
5282
  formats: ["iife"],
3332
- name: "_",
5283
+ name: iifeReturnValueName,
3333
5284
  fileName: entrypoint.name
3334
5285
  },
3335
5286
  rollupOptions: {
@@ -3416,6 +5367,22 @@ async function createViteBuilder(wxtConfig, hooks, server) {
3416
5367
  return {
3417
5368
  name: "Vite",
3418
5369
  version: vite.version,
5370
+ async importEntrypoint(url2) {
5371
+ const baseConfig = await getBaseConfig();
5372
+ const envConfig = {
5373
+ plugins: [
5374
+ webextensionPolyfillMock(wxtConfig),
5375
+ removeEntrypointMainFunction(wxtConfig, url2)
5376
+ ]
5377
+ };
5378
+ const config = vite.mergeConfig(baseConfig, envConfig);
5379
+ const server2 = await vite.createServer(config);
5380
+ await server2.listen();
5381
+ const runtime = await vite.createViteRuntime(server2, { hmr: false });
5382
+ const module2 = await runtime.executeUrl(url2);
5383
+ await server2.close();
5384
+ return module2.default;
5385
+ },
3419
5386
  async build(group) {
3420
5387
  let entryConfig;
3421
5388
  if (Array.isArray(group))
@@ -3673,13 +5640,107 @@ function findEffectedSteps(changedFile, currentOutput) {
3673
5640
 
3674
5641
  // src/core/utils/building/find-entrypoints.ts
3675
5642
  var import_path4 = require("path");
3676
- var import_fs_extra6 = __toESM(require("fs-extra"), 1);
5643
+ var import_fs_extra7 = __toESM(require("fs-extra"), 1);
3677
5644
  var import_minimatch = require("minimatch");
3678
5645
  var import_linkedom2 = require("linkedom");
3679
5646
  var import_json5 = __toESM(require("json5"), 1);
3680
5647
  var import_fast_glob2 = __toESM(require("fast-glob"), 1);
3681
5648
  var import_picocolors2 = __toESM(require("picocolors"), 1);
5649
+
5650
+ // src/core/utils/building/import-entrypoint.ts
5651
+ var import_jiti = __toESM(require("jiti"), 1);
5652
+ var import_unimport2 = require("unimport");
5653
+ var import_fs_extra6 = __toESM(require("fs-extra"), 1);
5654
+ var import_node_path11 = require("path");
5655
+ var import_esbuild = require("esbuild");
5656
+ var import_node_url2 = require("url");
5657
+ var import_meta = {};
5658
+ async function importEntrypointFile(path13) {
5659
+ wxt.logger.debug("Loading file metadata:", path13);
5660
+ const normalPath = normalizePath(path13);
5661
+ const unimport2 = (0, import_unimport2.createUnimport)({
5662
+ ...wxt.config.imports,
5663
+ // Only allow specific imports, not all from the project
5664
+ dirs: []
5665
+ });
5666
+ await unimport2.init();
5667
+ const text2 = await import_fs_extra6.default.readFile(path13, "utf-8");
5668
+ const textNoImports = removeProjectImportStatements(text2);
5669
+ const { code } = await unimport2.injectImports(textNoImports);
5670
+ wxt.logger.debug(
5671
+ ["Text:", text2, "No imports:", textNoImports, "Code:", code].join("\n")
5672
+ );
5673
+ const jiti = (0, import_jiti.default)(
5674
+ typeof __filename !== "undefined" ? __filename : (0, import_node_url2.fileURLToPath)(import_meta.url),
5675
+ {
5676
+ cache: false,
5677
+ debug: wxt.config.debug,
5678
+ esmResolve: true,
5679
+ alias: {
5680
+ "webextension-polyfill": (0, import_node_path11.resolve)(
5681
+ wxt.config.wxtModuleDir,
5682
+ "dist/virtual/mock-browser.js"
5683
+ )
5684
+ },
5685
+ // Continue using node to load TS files even if `bun run --bun` is detected. Jiti does not
5686
+ // respect the custom transform function when using it's native bun option.
5687
+ experimentalBun: false,
5688
+ // List of extensions to transform with esbuild
5689
+ extensions: [
5690
+ ".ts",
5691
+ ".cts",
5692
+ ".mts",
5693
+ ".tsx",
5694
+ ".js",
5695
+ ".cjs",
5696
+ ".mjs",
5697
+ ".jsx"
5698
+ ],
5699
+ transform(opts) {
5700
+ const isEntrypoint = opts.filename === normalPath;
5701
+ return (0, import_esbuild.transformSync)(
5702
+ // Use modified source code for entrypoints
5703
+ isEntrypoint ? code : opts.source,
5704
+ getEsbuildOptions(opts)
5705
+ );
5706
+ }
5707
+ }
5708
+ );
5709
+ try {
5710
+ const res = await jiti(path13);
5711
+ return res.default;
5712
+ } catch (err) {
5713
+ const filePath = (0, import_node_path11.relative)(wxt.config.root, path13);
5714
+ if (err instanceof ReferenceError) {
5715
+ const variableName = err.message.replace(" is not defined", "");
5716
+ throw Error(
5717
+ `${filePath}: Cannot use imported variable "${variableName}" outside the main function. See https://wxt.dev/guide/entrypoints.html#side-effects`,
5718
+ { cause: err }
5719
+ );
5720
+ } else {
5721
+ wxt.logger.error(err);
5722
+ throw Error(`Failed to load entrypoint: ${filePath}`, { cause: err });
5723
+ }
5724
+ }
5725
+ }
5726
+ function getEsbuildOptions(opts) {
5727
+ const isJsx = opts.filename?.endsWith("x");
5728
+ return {
5729
+ format: "cjs",
5730
+ loader: isJsx ? "tsx" : "ts",
5731
+ ...isJsx ? {
5732
+ // `h` and `Fragment` are undefined, but that's OK because JSX is never evaluated while
5733
+ // grabbing the entrypoint's options.
5734
+ jsxFactory: "h",
5735
+ jsxFragment: "Fragment"
5736
+ } : void 0
5737
+ };
5738
+ }
5739
+
5740
+ // src/core/utils/building/find-entrypoints.ts
3682
5741
  async function findEntrypoints() {
5742
+ await import_fs_extra7.default.mkdir(wxt.config.wxtDir, { recursive: true });
5743
+ await import_fs_extra7.default.writeJson((0, import_path4.resolve)(wxt.config.wxtDir, "tsconfig.json"), {});
3683
5744
  const relativePaths = await (0, import_fast_glob2.default)(Object.keys(PATH_GLOB_TO_TYPE_MAP), {
3684
5745
  cwd: wxt.config.entrypointsDir
3685
5746
  });
@@ -3890,13 +5951,13 @@ async function getUnlistedScriptEntrypoint({
3890
5951
  name,
3891
5952
  skipped
3892
5953
  }) {
3893
- const defaultExport = await importEntrypointFile(inputPath);
5954
+ const defaultExport = await importEntrypoint(inputPath);
3894
5955
  if (defaultExport == null) {
3895
5956
  throw Error(
3896
5957
  `${name}: Default export not found, did you forget to call "export default defineUnlistedScript(...)"?`
3897
5958
  );
3898
5959
  }
3899
- const { main: _, ...options } = defaultExport;
5960
+ const { main: _2, ...options } = defaultExport;
3900
5961
  return {
3901
5962
  type: "unlisted-script",
3902
5963
  name,
@@ -3913,13 +5974,13 @@ async function getBackgroundEntrypoint({
3913
5974
  }) {
3914
5975
  let options = {};
3915
5976
  if (inputPath !== VIRTUAL_NOOP_BACKGROUND_MODULE_ID) {
3916
- const defaultExport = await importEntrypointFile(inputPath);
5977
+ const defaultExport = await importEntrypoint(inputPath);
3917
5978
  if (defaultExport == null) {
3918
5979
  throw Error(
3919
5980
  `${name}: Default export not found, did you forget to call "export default defineBackground(...)"?`
3920
5981
  );
3921
5982
  }
3922
- const { main: _, ...moduleOptions } = defaultExport;
5983
+ const { main: _2, ...moduleOptions } = defaultExport;
3923
5984
  options = moduleOptions;
3924
5985
  }
3925
5986
  if (wxt.config.manifestVersion !== 3) {
@@ -3939,7 +6000,7 @@ async function getContentScriptEntrypoint({
3939
6000
  name,
3940
6001
  skipped
3941
6002
  }) {
3942
- const { main: _, ...options } = await importEntrypointFile(inputPath);
6003
+ const { main: _2, ...options } = await importEntrypoint(inputPath);
3943
6004
  if (options == null) {
3944
6005
  throw Error(
3945
6006
  `${name}: Default export not found, did you forget to call "export default defineContentScript(...)"?`
@@ -3982,7 +6043,7 @@ async function getSidepanelEntrypoint(info) {
3982
6043
  };
3983
6044
  }
3984
6045
  async function getHtmlEntrypointOptions(info, keyMap, queries, parsers) {
3985
- const content = await import_fs_extra6.default.readFile(info.inputPath, "utf-8");
6046
+ const content = await import_fs_extra7.default.readFile(info.inputPath, "utf-8");
3986
6047
  const { document } = (0, import_linkedom2.parseHTML)(content);
3987
6048
  const options = {};
3988
6049
  const defaultQuery = (manifestKey) => document.querySelector(`meta[name='manifest.${manifestKey}']`)?.getAttribute("content");
@@ -4042,12 +6103,15 @@ var PATH_GLOB_TO_TYPE_MAP = {
4042
6103
  [`*/index.${CSS_EXTENSIONS_PATTERN}`]: "unlisted-style"
4043
6104
  };
4044
6105
  var CONTENT_SCRIPT_OUT_DIR = "content-scripts";
6106
+ function importEntrypoint(path13) {
6107
+ return wxt.config.experimental.viteRuntime ? wxt.builder.importEntrypoint(path13) : importEntrypointFile(path13);
6108
+ }
4045
6109
 
4046
6110
  // src/core/utils/building/generate-wxt-dir.ts
4047
- var import_unimport2 = require("unimport");
4048
- var import_fs_extra7 = __toESM(require("fs-extra"), 1);
6111
+ var import_unimport3 = require("unimport");
6112
+ var import_fs_extra8 = __toESM(require("fs-extra"), 1);
4049
6113
  var import_path5 = require("path");
4050
- var import_node_path10 = __toESM(require("path"), 1);
6114
+ var import_node_path12 = __toESM(require("path"), 1);
4051
6115
 
4052
6116
  // src/core/utils/i18n.ts
4053
6117
  var predefinedMessages = {
@@ -4088,10 +6152,10 @@ function parseI18nMessages(messagesJson) {
4088
6152
 
4089
6153
  // src/core/utils/building/generate-wxt-dir.ts
4090
6154
  async function generateTypesDir(entrypoints) {
4091
- await import_fs_extra7.default.ensureDir(wxt.config.typesDir);
6155
+ await import_fs_extra8.default.ensureDir(wxt.config.typesDir);
4092
6156
  const references = [];
4093
6157
  if (wxt.config.imports !== false) {
4094
- const unimport2 = (0, import_unimport2.createUnimport)(wxt.config.imports);
6158
+ const unimport2 = (0, import_unimport3.createUnimport)(wxt.config.imports);
4095
6159
  references.push(await writeImportsDeclarationFile(unimport2));
4096
6160
  if (wxt.config.imports.eslintrc.enabled) {
4097
6161
  await writeImportsEslintFile(unimport2, wxt.config.imports);
@@ -4120,7 +6184,7 @@ async function writeImportsEslintFile(unimport2, options) {
4120
6184
  (await unimport2.getImports()).map((i) => i.as ?? i.name).filter(Boolean).sort().forEach((name) => {
4121
6185
  eslintrc.globals[name] = options.eslintrc.globalsPropValue;
4122
6186
  });
4123
- await import_fs_extra7.default.writeJson(options.eslintrc.filePath, eslintrc, { spaces: 2 });
6187
+ await import_fs_extra8.default.writeJson(options.eslintrc.filePath, eslintrc, { spaces: 2 });
4124
6188
  }
4125
6189
  async function writePathsDeclarationFile(entrypoints) {
4126
6190
  const filePath = (0, import_path5.resolve)(wxt.config.typesDir, "paths.d.ts");
@@ -4174,13 +6238,13 @@ declare module "wxt/browser" {
4174
6238
  `;
4175
6239
  let messages;
4176
6240
  if (defaultLocale) {
4177
- const defaultLocalePath = import_node_path10.default.resolve(
6241
+ const defaultLocalePath = import_node_path12.default.resolve(
4178
6242
  wxt.config.publicDir,
4179
6243
  "_locales",
4180
6244
  defaultLocale,
4181
6245
  "messages.json"
4182
6246
  );
4183
- const content = JSON.parse(await import_fs_extra7.default.readFile(defaultLocalePath, "utf-8"));
6247
+ const content = JSON.parse(await import_fs_extra8.default.readFile(defaultLocalePath, "utf-8"));
4184
6248
  messages = parseI18nMessages(content);
4185
6249
  } else {
4186
6250
  messages = parseI18nMessages({});
@@ -4274,23 +6338,23 @@ ${paths}
4274
6338
 
4275
6339
  // src/core/utils/building/resolve-config.ts
4276
6340
  var import_c12 = require("c12");
4277
- var import_node_path12 = __toESM(require("path"), 1);
6341
+ var import_node_path17 = __toESM(require("path"), 1);
4278
6342
 
4279
6343
  // src/core/utils/cache.ts
4280
- var import_fs_extra8 = __toESM(require("fs-extra"), 1);
6344
+ var import_fs_extra9 = __toESM(require("fs-extra"), 1);
4281
6345
  var import_path6 = require("path");
4282
6346
  function createFsCache(wxtDir) {
4283
6347
  const getPath = (key) => (0, import_path6.resolve)(wxtDir, "cache", encodeURIComponent(key));
4284
6348
  return {
4285
6349
  async set(key, value) {
4286
6350
  const path13 = getPath(key);
4287
- await (0, import_fs_extra8.ensureDir)((0, import_path6.dirname)(path13));
6351
+ await (0, import_fs_extra9.ensureDir)((0, import_path6.dirname)(path13));
4288
6352
  await writeFileIfDifferent(path13, value);
4289
6353
  },
4290
6354
  async get(key) {
4291
6355
  const path13 = getPath(key);
4292
6356
  try {
4293
- return await import_fs_extra8.default.readFile(path13, "utf-8");
6357
+ return await import_fs_extra9.default.readFile(path13, "utf-8");
4294
6358
  } catch {
4295
6359
  return void 0;
4296
6360
  }
@@ -4298,17 +6362,26 @@ function createFsCache(wxtDir) {
4298
6362
  };
4299
6363
  }
4300
6364
 
6365
+ // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/index.mjs
6366
+ init_consola_36c0034f();
6367
+ init_core2();
6368
+ init_consola_06ad8a64();
6369
+ var import_node_process7 = require("process");
6370
+ init_utils2();
6371
+ var import_node_tty2 = require("tty");
6372
+ var import_node_util4 = require("util");
6373
+ var import_node_path15 = require("path");
6374
+
4301
6375
  // src/core/utils/building/resolve-config.ts
4302
- var import_consola = __toESM(require("consola"), 1);
4303
6376
  var import_defu = __toESM(require("defu"), 1);
4304
6377
 
4305
6378
  // src/core/utils/package.ts
4306
- var import_node_path11 = require("path");
4307
- var import_fs_extra9 = __toESM(require("fs-extra"), 1);
6379
+ var import_node_path16 = require("path");
6380
+ var import_fs_extra10 = __toESM(require("fs-extra"), 1);
4308
6381
  async function getPackageJson() {
4309
- const file = (0, import_node_path11.resolve)(wxt.config.root, "package.json");
6382
+ const file = (0, import_node_path16.resolve)(wxt.config.root, "package.json");
4310
6383
  try {
4311
- return await import_fs_extra9.default.readJson(file);
6384
+ return await import_fs_extra10.default.readJson(file);
4312
6385
  } catch (err) {
4313
6386
  wxt.logger.debug(
4314
6387
  `Failed to read package.json at: ${file}. Returning undefined.`
@@ -4317,12 +6390,15 @@ async function getPackageJson() {
4317
6390
  }
4318
6391
  }
4319
6392
  function isModuleInstalled(name) {
4320
- return import(name).then(() => true).catch(() => false);
6393
+ return import(
6394
+ /* @vite-ignore */
6395
+ name
6396
+ ).then(() => true).catch(() => false);
4321
6397
  }
4322
6398
 
4323
6399
  // src/core/utils/building/resolve-config.ts
4324
- var import_fs_extra10 = __toESM(require("fs-extra"), 1);
4325
- var import_meta = {};
6400
+ var import_fs_extra11 = __toESM(require("fs-extra"), 1);
6401
+ var import_meta2 = {};
4326
6402
  async function resolveConfig(inlineConfig, command) {
4327
6403
  let userConfig = {};
4328
6404
  let userConfigMetadata;
@@ -4341,20 +6417,20 @@ async function resolveConfig(inlineConfig, command) {
4341
6417
  }
4342
6418
  const mergedConfig = await mergeInlineConfig(inlineConfig, userConfig);
4343
6419
  const debug = mergedConfig.debug ?? false;
4344
- const logger = mergedConfig.logger ?? import_consola.default;
6420
+ const logger = mergedConfig.logger ?? consola;
4345
6421
  if (debug)
4346
- logger.level = import_consola.LogLevels.debug;
6422
+ logger.level = LogLevels.debug;
4347
6423
  const browser = mergedConfig.browser ?? "chrome";
4348
6424
  const manifestVersion = mergedConfig.manifestVersion ?? (browser === "firefox" || browser === "safari" ? 2 : 3);
4349
6425
  const mode = mergedConfig.mode ?? COMMAND_MODES[command];
4350
- const env = { browser, command, manifestVersion, mode };
4351
- const root = import_node_path12.default.resolve(
6426
+ const env2 = { browser, command, manifestVersion, mode };
6427
+ const root = import_node_path17.default.resolve(
4352
6428
  inlineConfig.root ?? userConfig.root ?? process.cwd()
4353
6429
  );
4354
- const wxtDir = import_node_path12.default.resolve(root, ".wxt");
6430
+ const wxtDir = import_node_path17.default.resolve(root, ".wxt");
4355
6431
  const wxtModuleDir = await resolveWxtModuleDir();
4356
- const srcDir = import_node_path12.default.resolve(root, mergedConfig.srcDir ?? root);
4357
- const entrypointsDir = import_node_path12.default.resolve(
6432
+ const srcDir = import_node_path17.default.resolve(root, mergedConfig.srcDir ?? root);
6433
+ const entrypointsDir = import_node_path17.default.resolve(
4358
6434
  srcDir,
4359
6435
  mergedConfig.entrypointsDir ?? "entrypoints"
4360
6436
  );
@@ -4362,13 +6438,13 @@ async function resolveConfig(inlineConfig, command) {
4362
6438
  logMissingDir(logger, "Entrypoints", entrypointsDir);
4363
6439
  }
4364
6440
  const filterEntrypoints = !!mergedConfig.filterEntrypoints?.length ? new Set(mergedConfig.filterEntrypoints) : void 0;
4365
- const publicDir = import_node_path12.default.resolve(srcDir, mergedConfig.publicDir ?? "public");
6441
+ const publicDir = import_node_path17.default.resolve(srcDir, mergedConfig.publicDir ?? "public");
4366
6442
  if (await isDirMissing(publicDir)) {
4367
6443
  logMissingDir(logger, "Public", publicDir);
4368
6444
  }
4369
- const typesDir = import_node_path12.default.resolve(wxtDir, "types");
4370
- const outBaseDir = import_node_path12.default.resolve(root, mergedConfig.outDir ?? ".output");
4371
- const outDir = import_node_path12.default.resolve(outBaseDir, `${browser}-mv${manifestVersion}`);
6445
+ const typesDir = import_node_path17.default.resolve(wxtDir, "types");
6446
+ const outBaseDir = import_node_path17.default.resolve(root, mergedConfig.outDir ?? ".output");
6447
+ const outDir = import_node_path17.default.resolve(outBaseDir, `${browser}-mv${manifestVersion}`);
4372
6448
  const reloadCommand = mergedConfig.dev?.reloadCommand ?? "Alt+R";
4373
6449
  const runnerConfig = await (0, import_c12.loadConfig)({
4374
6450
  name: "web-ext",
@@ -4385,7 +6461,7 @@ async function resolveConfig(inlineConfig, command) {
4385
6461
  "~": srcDir,
4386
6462
  "@@": root,
4387
6463
  "~~": root
4388
- }).map(([key, value]) => [key, import_node_path12.default.resolve(root, value)])
6464
+ }).map(([key, value]) => [key, import_node_path17.default.resolve(root, value)])
4389
6465
  );
4390
6466
  let devServerConfig;
4391
6467
  if (command === "serve") {
@@ -4405,11 +6481,11 @@ async function resolveConfig(inlineConfig, command) {
4405
6481
  debug,
4406
6482
  entrypointsDir,
4407
6483
  filterEntrypoints,
4408
- env,
6484
+ env: env2,
4409
6485
  fsCache: createFsCache(wxtDir),
4410
6486
  imports: await getUnimportOptions(wxtDir, logger, mergedConfig),
4411
6487
  logger,
4412
- manifest: await resolveManifestConfig(env, mergedConfig.manifest),
6488
+ manifest: await resolveManifestConfig(env2, mergedConfig.manifest),
4413
6489
  manifestVersion,
4414
6490
  mode,
4415
6491
  outBaseDir,
@@ -4427,7 +6503,8 @@ async function resolveConfig(inlineConfig, command) {
4427
6503
  userConfigMetadata: userConfigMetadata ?? {},
4428
6504
  alias,
4429
6505
  experimental: (0, import_defu.default)(mergedConfig.experimental, {
4430
- includeBrowserPolyfill: true
6506
+ includeBrowserPolyfill: true,
6507
+ viteRuntime: false
4431
6508
  }),
4432
6509
  dev: {
4433
6510
  server: devServerConfig,
@@ -4437,14 +6514,14 @@ async function resolveConfig(inlineConfig, command) {
4437
6514
  vite: mergedConfig.vite ?? (() => ({}))
4438
6515
  };
4439
6516
  }
4440
- async function resolveManifestConfig(env, manifest) {
4441
- return await (typeof manifest === "function" ? manifest(env) : manifest ?? {});
6517
+ async function resolveManifestConfig(env2, manifest) {
6518
+ return await (typeof manifest === "function" ? manifest(env2) : manifest ?? {});
4442
6519
  }
4443
6520
  async function mergeInlineConfig(inlineConfig, userConfig) {
4444
6521
  const imports = inlineConfig.imports === false || userConfig.imports === false ? false : userConfig.imports == null && inlineConfig.imports == null ? void 0 : (0, import_defu.default)(inlineConfig.imports ?? {}, userConfig.imports ?? {});
4445
- const manifest = async (env) => {
4446
- const user = await resolveManifestConfig(env, userConfig.manifest);
4447
- const inline = await resolveManifestConfig(env, inlineConfig.manifest);
6522
+ const manifest = async (env2) => {
6523
+ const user = await resolveManifestConfig(env2, userConfig.manifest);
6524
+ const inline = await resolveManifestConfig(env2, inlineConfig.manifest);
4448
6525
  return (0, import_defu.default)(inline, user);
4449
6526
  };
4450
6527
  const transformManifest = (manifest2) => {
@@ -4462,13 +6539,14 @@ async function mergeInlineConfig(inlineConfig, userConfig) {
4462
6539
  };
4463
6540
  }
4464
6541
  function resolveZipConfig(root, mergedConfig) {
4465
- const downloadedPackagesDir = import_node_path12.default.resolve(root, ".wxt/local_modules");
6542
+ const downloadedPackagesDir = import_node_path17.default.resolve(root, ".wxt/local_modules");
4466
6543
  return {
4467
6544
  name: void 0,
4468
6545
  sourcesTemplate: "{{name}}-{{version}}-sources.zip",
4469
6546
  artifactTemplate: "{{name}}-{{version}}-{{browser}}.zip",
4470
6547
  sourcesRoot: root,
4471
6548
  includeSources: [],
6549
+ compressionLevel: 9,
4472
6550
  ...mergedConfig.zip,
4473
6551
  excludeSources: [
4474
6552
  "**/node_modules",
@@ -4487,12 +6565,12 @@ function resolveZipConfig(root, mergedConfig) {
4487
6565
  };
4488
6566
  }
4489
6567
  function resolveAnalysisConfig(root, mergedConfig) {
4490
- const analysisOutputFile = import_node_path12.default.resolve(
6568
+ const analysisOutputFile = import_node_path17.default.resolve(
4491
6569
  root,
4492
6570
  mergedConfig.analysis?.outputFile ?? "stats.html"
4493
6571
  );
4494
- const analysisOutputDir = import_node_path12.default.dirname(analysisOutputFile);
4495
- const analysisOutputName = import_node_path12.default.parse(analysisOutputFile).name;
6572
+ const analysisOutputDir = import_node_path17.default.dirname(analysisOutputFile);
6573
+ const analysisOutputName = import_node_path17.default.parse(analysisOutputFile).name;
4496
6574
  return {
4497
6575
  enabled: mergedConfig.analysis?.enabled ?? false,
4498
6576
  open: mergedConfig.analysis?.open ?? false,
@@ -4532,7 +6610,7 @@ async function getUnimportOptions(wxtDir, logger, config) {
4532
6610
  dirs: ["components", "composables", "hooks", "utils"],
4533
6611
  eslintrc: {
4534
6612
  enabled,
4535
- filePath: import_node_path12.default.resolve(wxtDir, "eslintrc-auto-import.json"),
6613
+ filePath: import_node_path17.default.resolve(wxtDir, "eslintrc-auto-import.json"),
4536
6614
  globalsPropValue: true
4537
6615
  }
4538
6616
  };
@@ -4542,16 +6620,16 @@ async function getUnimportOptions(wxtDir, logger, config) {
4542
6620
  );
4543
6621
  }
4544
6622
  async function resolveWxtModuleDir() {
4545
- const requireResolve = require?.resolve ?? (await import("module")).default.createRequire(import_meta.url).resolve;
4546
- return import_node_path12.default.resolve(requireResolve("wxt"), "../..");
6623
+ const requireResolve = require?.resolve ?? (await import("module")).default.createRequire(import_meta2.url).resolve;
6624
+ return import_node_path17.default.resolve(requireResolve("wxt"), "../..");
4547
6625
  }
4548
6626
  async function isDirMissing(dir) {
4549
- return !await import_fs_extra10.default.exists(dir);
6627
+ return !await import_fs_extra11.default.exists(dir);
4550
6628
  }
4551
6629
  function logMissingDir(logger, name, expected) {
4552
6630
  logger.warn(
4553
6631
  `${name} directory not found: ./${normalizePath(
4554
- import_node_path12.default.relative(process.cwd(), expected)
6632
+ import_node_path17.default.relative(process.cwd(), expected)
4555
6633
  )}`
4556
6634
  );
4557
6635
  }
@@ -4563,9 +6641,9 @@ async function mergeBuilderConfig(inlineConfig, userConfig) {
4563
6641
  const vite = await import("vite").catch(() => void 0);
4564
6642
  if (vite) {
4565
6643
  return {
4566
- vite: async (env) => {
4567
- const resolvedInlineConfig = await inlineConfig.vite?.(env) ?? {};
4568
- const resolvedUserConfig = await userConfig.vite?.(env) ?? {};
6644
+ vite: async (env2) => {
6645
+ const resolvedInlineConfig = await inlineConfig.vite?.(env2) ?? {};
6646
+ const resolvedUserConfig = await userConfig.vite?.(env2) ?? {};
4569
6647
  return vite.mergeConfig(resolvedUserConfig, resolvedInlineConfig);
4570
6648
  }
4571
6649
  };
@@ -4612,115 +6690,6 @@ var ENTRY_TYPE_TO_GROUP_MAP = {
4612
6690
  "content-script-style": "individual"
4613
6691
  };
4614
6692
 
4615
- // src/core/utils/building/import-entrypoint.ts
4616
- var import_jiti = __toESM(require("jiti"), 1);
4617
- var import_unimport3 = require("unimport");
4618
- var import_fs_extra11 = __toESM(require("fs-extra"), 1);
4619
- var import_node_path13 = require("path");
4620
-
4621
- // src/core/utils/strings.ts
4622
- function kebabCaseAlphanumeric(str) {
4623
- return str.toLowerCase().replace(/[^a-z0-9-\s]/g, "").replace(/\s+/g, "-");
4624
- }
4625
- function removeImportStatements(text) {
4626
- return text.replace(
4627
- /(import\s?[{\w][\s\S]*?from\s?["'][\s\S]*?["'];?|import\s?["'][\s\S]*?["'];?)/gm,
4628
- ""
4629
- );
4630
- }
4631
- function removeProjectImportStatements(text) {
4632
- const noImports = removeImportStatements(text);
4633
- return `import { defineUnlistedScript, defineContentScript, defineBackground } from 'wxt/sandbox';
4634
-
4635
- ${noImports}`;
4636
- }
4637
-
4638
- // src/core/utils/building/import-entrypoint.ts
4639
- var import_esbuild = require("esbuild");
4640
- var import_node_url2 = require("url");
4641
- var import_meta2 = {};
4642
- async function importEntrypointFile(path13) {
4643
- wxt.logger.debug("Loading file metadata:", path13);
4644
- const normalPath = normalizePath(path13);
4645
- const unimport2 = (0, import_unimport3.createUnimport)({
4646
- ...wxt.config.imports,
4647
- // Only allow specific imports, not all from the project
4648
- dirs: []
4649
- });
4650
- await unimport2.init();
4651
- const text = await import_fs_extra11.default.readFile(path13, "utf-8");
4652
- const textNoImports = removeProjectImportStatements(text);
4653
- const { code } = await unimport2.injectImports(textNoImports);
4654
- wxt.logger.debug(
4655
- ["Text:", text, "No imports:", textNoImports, "Code:", code].join("\n")
4656
- );
4657
- const jiti = (0, import_jiti.default)(
4658
- typeof __filename !== "undefined" ? __filename : (0, import_node_url2.fileURLToPath)(import_meta2.url),
4659
- {
4660
- cache: false,
4661
- debug: wxt.config.debug,
4662
- esmResolve: true,
4663
- alias: {
4664
- "webextension-polyfill": (0, import_node_path13.resolve)(
4665
- wxt.config.wxtModuleDir,
4666
- "dist/virtual/mock-browser.js"
4667
- )
4668
- },
4669
- // Continue using node to load TS files even if `bun run --bun` is detected. Jiti does not
4670
- // respect the custom transform function when using it's native bun option.
4671
- experimentalBun: false,
4672
- // List of extensions to transform with esbuild
4673
- extensions: [
4674
- ".ts",
4675
- ".cts",
4676
- ".mts",
4677
- ".tsx",
4678
- ".js",
4679
- ".cjs",
4680
- ".mjs",
4681
- ".jsx"
4682
- ],
4683
- transform(opts) {
4684
- const isEntrypoint = opts.filename === normalPath;
4685
- return (0, import_esbuild.transformSync)(
4686
- // Use modified source code for entrypoints
4687
- isEntrypoint ? code : opts.source,
4688
- getEsbuildOptions(opts)
4689
- );
4690
- }
4691
- }
4692
- );
4693
- try {
4694
- const res = await jiti(path13);
4695
- return res.default;
4696
- } catch (err) {
4697
- const filePath = (0, import_node_path13.relative)(wxt.config.root, path13);
4698
- if (err instanceof ReferenceError) {
4699
- const variableName = err.message.replace(" is not defined", "");
4700
- throw Error(
4701
- `${filePath}: Cannot use imported variable "${variableName}" outside the main function. See https://wxt.dev/guide/entrypoints.html#side-effects`,
4702
- { cause: err }
4703
- );
4704
- } else {
4705
- wxt.logger.error(err);
4706
- throw Error(`Failed to load entrypoint: ${filePath}`, { cause: err });
4707
- }
4708
- }
4709
- }
4710
- function getEsbuildOptions(opts) {
4711
- const isJsx = opts.filename?.endsWith("x");
4712
- return {
4713
- format: "cjs",
4714
- loader: isJsx ? "tsx" : "ts",
4715
- ...isJsx ? {
4716
- // `h` and `Fragment` are undefined, but that's OK because JSX is never evaluated while
4717
- // grabbing the entrypoint's options.
4718
- jsxFactory: "h",
4719
- jsxFragment: "Fragment"
4720
- } : void 0
4721
- };
4722
- }
4723
-
4724
6693
  // src/core/utils/building/internal-build.ts
4725
6694
  var import_picocolors5 = __toESM(require("picocolors"), 1);
4726
6695
  var import_fs_extra14 = __toESM(require("fs-extra"), 1);
@@ -4729,7 +6698,7 @@ var import_fs_extra14 = __toESM(require("fs-extra"), 1);
4729
6698
  var import_path7 = require("path");
4730
6699
 
4731
6700
  // src/core/utils/log/printFileList.ts
4732
- var import_node_path14 = __toESM(require("path"), 1);
6701
+ var import_node_path18 = __toESM(require("path"), 1);
4733
6702
  var import_picocolors3 = __toESM(require("picocolors"), 1);
4734
6703
  var import_fs_extra12 = __toESM(require("fs-extra"), 1);
4735
6704
  var import_filesize = require("filesize");
@@ -4749,9 +6718,9 @@ function printTable(log, header, rows, gap = 2) {
4749
6718
  );
4750
6719
  let str = "";
4751
6720
  rows.forEach((row, i) => {
4752
- row.forEach((col, j) => {
4753
- str += col.padEnd(columnWidths[j], " ");
4754
- if (j !== row.length - 1)
6721
+ row.forEach((col, j2) => {
6722
+ str += col.padEnd(columnWidths[j2], " ");
6723
+ if (j2 !== row.length - 1)
4755
6724
  str += "".padEnd(gap, " ");
4756
6725
  });
4757
6726
  if (i !== rows.length - 1)
@@ -4767,8 +6736,8 @@ async function printFileList(log, header, baseDir, files) {
4767
6736
  const fileRows = await Promise.all(
4768
6737
  files.map(async (file, i) => {
4769
6738
  const parts = [
4770
- import_node_path14.default.relative(process.cwd(), baseDir) + import_node_path14.default.sep,
4771
- import_node_path14.default.relative(baseDir, file)
6739
+ import_node_path18.default.relative(process.cwd(), baseDir) + import_node_path18.default.sep,
6740
+ import_node_path18.default.relative(baseDir, file)
4772
6741
  ];
4773
6742
  const prefix = i === files.length - 1 ? " \u2514\u2500" : " \u251C\u2500";
4774
6743
  const color = getChunkColor(file);
@@ -4805,13 +6774,13 @@ async function printBuildSummary(log, header, output) {
4805
6774
  const chunks = [
4806
6775
  ...output.steps.flatMap((step) => step.chunks),
4807
6776
  ...output.publicAssets
4808
- ].sort((l, r) => {
4809
- const lWeight = getChunkSortWeight(l.fileName);
4810
- const rWeight = getChunkSortWeight(r.fileName);
6777
+ ].sort((l2, r2) => {
6778
+ const lWeight = getChunkSortWeight(l2.fileName);
6779
+ const rWeight = getChunkSortWeight(r2.fileName);
4811
6780
  const diff = lWeight - rWeight;
4812
6781
  if (diff !== 0)
4813
6782
  return diff;
4814
- return l.fileName.localeCompare(r.fileName);
6783
+ return l2.fileName.localeCompare(r2.fileName);
4815
6784
  });
4816
6785
  const files = chunks.map(
4817
6786
  (chunk) => (0, import_path7.resolve)(wxt.config.outDir, chunk.fileName)
@@ -4838,9 +6807,6 @@ var import_picocolors4 = __toESM(require("picocolors"), 1);
4838
6807
  // package.json
4839
6808
  var version = "0.17.12";
4840
6809
 
4841
- // src/core/utils/log/printHeader.ts
4842
- var import_consola2 = require("consola");
4843
-
4844
6810
  // src/core/utils/building/internal-build.ts
4845
6811
  var import_fast_glob3 = __toESM(require("fast-glob"), 1);
4846
6812
 
@@ -4882,9 +6848,9 @@ var ContentSecurityPolicy = class _ContentSecurityPolicy {
4882
6848
  return this;
4883
6849
  }
4884
6850
  toString() {
4885
- const directives = Object.entries(this.data).sort(([l], [r]) => {
4886
- const lo = _ContentSecurityPolicy.DIRECTIVE_ORDER[l] ?? 2;
4887
- const ro = _ContentSecurityPolicy.DIRECTIVE_ORDER[r] ?? 2;
6851
+ const directives = Object.entries(this.data).sort(([l2], [r2]) => {
6852
+ const lo = _ContentSecurityPolicy.DIRECTIVE_ORDER[l2] ?? 2;
6853
+ const ro = _ContentSecurityPolicy.DIRECTIVE_ORDER[r2] ?? 2;
4888
6854
  return lo - ro;
4889
6855
  });
4890
6856
  return directives.map((entry) => entry.flat().join(" ")).join("; ") + ";";
@@ -4920,7 +6886,7 @@ function hashContentScriptOptions(options) {
4920
6886
  return [key, value.sort()];
4921
6887
  else
4922
6888
  return [key, value];
4923
- }).sort((l, r) => l[0].localeCompare(r[0]))
6889
+ }).sort((l2, r2) => l2[0].localeCompare(r2[0]))
4924
6890
  );
4925
6891
  }
4926
6892
  function mapWxtOptionsToContentScript(options, js, css) {
@@ -5018,6 +6984,7 @@ async function generateManifest(entrypoints, buildOutput) {
5018
6984
  if (wxt.config.manifestVersion === 2) {
5019
6985
  convertWebAccessibleResourcesToMv2(manifest);
5020
6986
  convertActionToMv2(manifest);
6987
+ moveHostPermissionsToPermissions(manifest);
5021
6988
  }
5022
6989
  if (wxt.config.manifestVersion === 3) {
5023
6990
  validateMv3WebAccessbileResources(manifest);
@@ -5280,8 +7247,8 @@ function discoverIcons(buildOutput) {
5280
7247
  ];
5281
7248
  buildOutput.publicAssets.forEach((asset) => {
5282
7249
  let size;
5283
- for (const regex of iconRegex) {
5284
- const match = asset.fileName.match(regex);
7250
+ for (const regex2 of iconRegex) {
7251
+ const match = asset.fileName.match(regex2);
5285
7252
  if (match?.[1] != null) {
5286
7253
  size = match[1];
5287
7254
  break;
@@ -5398,6 +7365,14 @@ function convertWebAccessibleResourcesToMv2(manifest) {
5398
7365
  )
5399
7366
  );
5400
7367
  }
7368
+ function moveHostPermissionsToPermissions(manifest) {
7369
+ if (!manifest.host_permissions?.length)
7370
+ return;
7371
+ manifest.host_permissions.forEach(
7372
+ (permission) => addPermission(manifest, permission)
7373
+ );
7374
+ delete manifest.host_permissions;
7375
+ }
5401
7376
  function convertActionToMv2(manifest) {
5402
7377
  if (manifest.action == null || manifest.browser_action != null || manifest.page_action != null)
5403
7378
  return;
@@ -5497,7 +7472,7 @@ async function rebuild(allEntrypoints, entrypointGroups, existingOutput = {
5497
7472
  }
5498
7473
 
5499
7474
  // src/core/utils/building/internal-build.ts
5500
- var import_node_path15 = require("path");
7475
+ var import_node_path19 = require("path");
5501
7476
 
5502
7477
  // src/core/utils/validation.ts
5503
7478
  function validateEntrypoints(entrypoints) {
@@ -5559,7 +7534,6 @@ var ValidationError = class extends Error {
5559
7534
  };
5560
7535
 
5561
7536
  // src/core/utils/building/internal-build.ts
5562
- var import_consola3 = __toESM(require("consola"), 1);
5563
7537
  var import_rollup_plugin_visualizer2 = require("@aklinker1/rollup-plugin-visualizer");
5564
7538
  var import_ci_info = require("ci-info");
5565
7539
  async function internalBuild() {
@@ -5599,7 +7573,7 @@ async function internalBuild() {
5599
7573
  }
5600
7574
  if (wxt.config.analysis.enabled) {
5601
7575
  await combineAnalysisStats();
5602
- const statsPath = (0, import_node_path15.relative)(wxt.config.root, wxt.config.analysis.outputFile);
7576
+ const statsPath = (0, import_node_path19.relative)(wxt.config.root, wxt.config.analysis.outputFile);
5603
7577
  wxt.logger.info(
5604
7578
  `Analysis complete:
5605
7579
  ${import_picocolors5.default.gray("\u2514\u2500")} ${import_picocolors5.default.yellow(statsPath)}`
@@ -5647,12 +7621,12 @@ function printValidationResults({
5647
7621
  return map;
5648
7622
  }, /* @__PURE__ */ new Map());
5649
7623
  Array.from(entrypointErrors.entries()).forEach(([entrypoint, errors2]) => {
5650
- import_consola3.default.log((0, import_node_path15.relative)(cwd, entrypoint.inputPath));
7624
+ consola.log((0, import_node_path19.relative)(cwd, entrypoint.inputPath));
5651
7625
  console.log();
5652
7626
  errors2.forEach((err) => {
5653
7627
  const type = err.type === "error" ? import_picocolors5.default.red("ERROR") : import_picocolors5.default.yellow("WARN");
5654
7628
  const recieved = import_picocolors5.default.dim(`(recieved: ${JSON.stringify(err.value)})`);
5655
- import_consola3.default.log(` - ${type} ${err.message} ${recieved}`);
7629
+ consola.log(` - ${type} ${err.message} ${recieved}`);
5656
7630
  });
5657
7631
  console.log();
5658
7632
  });
@@ -5665,37 +7639,36 @@ async function build(config) {
5665
7639
  }
5666
7640
 
5667
7641
  // src/core/clean.ts
5668
- var import_node_path16 = __toESM(require("path"), 1);
7642
+ var import_node_path20 = __toESM(require("path"), 1);
5669
7643
  var import_fast_glob4 = __toESM(require("fast-glob"), 1);
5670
7644
  var import_fs_extra15 = __toESM(require("fs-extra"), 1);
5671
- var import_consola4 = require("consola");
5672
7645
  var import_picocolors6 = __toESM(require("picocolors"), 1);
5673
7646
  async function clean(root = process.cwd()) {
5674
- import_consola4.consola.info("Cleaning Project");
7647
+ consola.info("Cleaning Project");
5675
7648
  const tempDirs = [
5676
7649
  "node_modules/.vite",
5677
7650
  "node_modules/.cache",
5678
7651
  "**/.wxt",
5679
7652
  ".output/*"
5680
7653
  ];
5681
- import_consola4.consola.debug("Looking for:", tempDirs.map(import_picocolors6.default.cyan).join(", "));
7654
+ consola.debug("Looking for:", tempDirs.map(import_picocolors6.default.cyan).join(", "));
5682
7655
  const directories = await (0, import_fast_glob4.default)(tempDirs, {
5683
- cwd: import_node_path16.default.resolve(root),
7656
+ cwd: import_node_path20.default.resolve(root),
5684
7657
  absolute: true,
5685
7658
  onlyDirectories: true,
5686
7659
  deep: 2
5687
7660
  });
5688
7661
  if (directories.length === 0) {
5689
- import_consola4.consola.debug("No generated files found.");
7662
+ consola.debug("No generated files found.");
5690
7663
  return;
5691
7664
  }
5692
- import_consola4.consola.debug(
7665
+ consola.debug(
5693
7666
  "Found:",
5694
- directories.map((dir) => import_picocolors6.default.cyan(import_node_path16.default.relative(root, dir))).join(", ")
7667
+ directories.map((dir) => import_picocolors6.default.cyan(import_node_path20.default.relative(root, dir))).join(", ")
5695
7668
  );
5696
7669
  for (const directory of directories) {
5697
7670
  await import_fs_extra15.default.rm(directory, { force: true, recursive: true });
5698
- import_consola4.consola.debug("Deleted " + import_picocolors6.default.cyan(import_node_path16.default.relative(root, directory)));
7671
+ consola.debug("Deleted " + import_picocolors6.default.cyan(import_node_path20.default.relative(root, directory)));
5699
7672
  }
5700
7673
  }
5701
7674
 
@@ -5710,12 +7683,12 @@ function defineRunnerConfig(config) {
5710
7683
  }
5711
7684
 
5712
7685
  // src/core/runners/wsl.ts
5713
- var import_node_path17 = require("path");
7686
+ var import_node_path21 = require("path");
5714
7687
  function createWslRunner() {
5715
7688
  return {
5716
7689
  async openBrowser() {
5717
7690
  wxt.logger.warn(
5718
- `Cannot open browser when using WSL. Load "${(0, import_node_path17.relative)(
7691
+ `Cannot open browser when using WSL. Load "${(0, import_node_path21.relative)(
5719
7692
  process.cwd(),
5720
7693
  wxt.config.outDir
5721
7694
  )}" as an unpacked extension manually`
@@ -5803,12 +7776,12 @@ var DEFAULT_CHROMIUM_PREFS = {
5803
7776
  };
5804
7777
 
5805
7778
  // src/core/runners/safari.ts
5806
- var import_node_path18 = require("path");
7779
+ var import_node_path22 = require("path");
5807
7780
  function createSafariRunner() {
5808
7781
  return {
5809
7782
  async openBrowser() {
5810
7783
  wxt.logger.warn(
5811
- `Cannot Safari using web-ext. Load "${(0, import_node_path18.relative)(
7784
+ `Cannot Safari using web-ext. Load "${(0, import_node_path22.relative)(
5812
7785
  process.cwd(),
5813
7786
  wxt.config.outDir
5814
7787
  )}" as an unpacked extension manually`
@@ -5820,12 +7793,12 @@ function createSafariRunner() {
5820
7793
  }
5821
7794
 
5822
7795
  // src/core/runners/manual.ts
5823
- var import_node_path19 = require("path");
7796
+ var import_node_path23 = require("path");
5824
7797
  function createManualRunner() {
5825
7798
  return {
5826
7799
  async openBrowser() {
5827
7800
  wxt.logger.info(
5828
- `Load "${(0, import_node_path19.relative)(
7801
+ `Load "${(0, import_node_path23.relative)(
5829
7802
  process.cwd(),
5830
7803
  wxt.config.outDir
5831
7804
  )}" as an unpacked extension manually`
@@ -5854,10 +7827,9 @@ async function createExtensionRunner() {
5854
7827
  }
5855
7828
 
5856
7829
  // src/core/create-server.ts
5857
- var import_consola5 = require("consola");
5858
7830
  var import_async_mutex = require("async-mutex");
5859
7831
  var import_picocolors7 = __toESM(require("picocolors"), 1);
5860
- var import_node_path20 = require("path");
7832
+ var import_node_path24 = require("path");
5861
7833
  async function createServer(inlineConfig) {
5862
7834
  await registerWxt("serve", inlineConfig, async (config) => {
5863
7835
  const { port, hostname } = config.dev.server;
@@ -5946,7 +7918,7 @@ function createFileReloader(server) {
5946
7918
  await fileChangedMutex.runExclusive(async () => {
5947
7919
  if (server.currentOutput == null)
5948
7920
  return;
5949
- const fileChanges = changeQueue.splice(0, changeQueue.length).map(([_, file]) => file);
7921
+ const fileChanges = changeQueue.splice(0, changeQueue.length).map(([_2, file]) => file);
5950
7922
  if (fileChanges.length === 0)
5951
7923
  return;
5952
7924
  const changes = detectDevChanges(fileChanges, server.currentOutput);
@@ -5963,7 +7935,7 @@ function createFileReloader(server) {
5963
7935
  return;
5964
7936
  }
5965
7937
  wxt.logger.info(
5966
- `Changed: ${Array.from(new Set(fileChanges)).map((file) => import_picocolors7.default.dim((0, import_node_path20.relative)(wxt.config.root, file))).join(", ")}`
7938
+ `Changed: ${Array.from(new Set(fileChanges)).map((file) => import_picocolors7.default.dim((0, import_node_path24.relative)(wxt.config.root, file))).join(", ")}`
5967
7939
  );
5968
7940
  const allEntrypoints = await findEntrypoints();
5969
7941
  try {
@@ -5977,19 +7949,19 @@ function createFileReloader(server) {
5977
7949
  switch (changes.type) {
5978
7950
  case "extension-reload":
5979
7951
  server.reloadExtension();
5980
- import_consola5.consola.success(`Reloaded extension`);
7952
+ consola.success(`Reloaded extension`);
5981
7953
  break;
5982
7954
  case "html-reload":
5983
7955
  const { reloadedNames } = reloadHtmlPages(
5984
7956
  changes.rebuildGroups,
5985
7957
  server
5986
7958
  );
5987
- import_consola5.consola.success(`Reloaded: ${getFilenameList(reloadedNames)}`);
7959
+ consola.success(`Reloaded: ${getFilenameList(reloadedNames)}`);
5988
7960
  break;
5989
7961
  case "content-script-reload":
5990
7962
  reloadContentScripts(changes.changedSteps, server);
5991
7963
  const rebuiltNames = changes.rebuildGroups.flat().map((entry) => entry.name);
5992
- import_consola5.consola.success(`Reloaded: ${getFilenameList(rebuiltNames)}`);
7964
+ consola.success(`Reloaded: ${getFilenameList(rebuiltNames)}`);
5993
7965
  break;
5994
7966
  }
5995
7967
  } catch (err) {
@@ -6053,13 +8025,12 @@ function getExternalOutputDependencies(server) {
6053
8025
 
6054
8026
  // src/core/initialize.ts
6055
8027
  var import_prompts = __toESM(require("prompts"), 1);
6056
- var import_consola6 = require("consola");
6057
8028
  var import_giget = require("giget");
6058
8029
  var import_fs_extra16 = __toESM(require("fs-extra"), 1);
6059
- var import_node_path21 = __toESM(require("path"), 1);
8030
+ var import_node_path25 = __toESM(require("path"), 1);
6060
8031
  var import_picocolors8 = __toESM(require("picocolors"), 1);
6061
8032
  async function initialize(options) {
6062
- import_consola6.consola.info("Initalizing new project");
8033
+ consola.info("Initalizing new project");
6063
8034
  const templates = await listTemplates();
6064
8035
  const defaultTemplate = templates.find(
6065
8036
  (template) => template.name === options.template?.toLowerCase().trim()
@@ -6107,24 +8078,24 @@ async function initialize(options) {
6107
8078
  if (isExists) {
6108
8079
  const isEmpty = (await import_fs_extra16.default.readdir(input.directory)).length === 0;
6109
8080
  if (!isEmpty) {
6110
- import_consola6.consola.error(
6111
- `The directory ${import_node_path21.default.resolve(input.directory)} is not empty. Aborted.`
8081
+ consola.error(
8082
+ `The directory ${import_node_path25.default.resolve(input.directory)} is not empty. Aborted.`
6112
8083
  );
6113
8084
  process.exit(1);
6114
8085
  }
6115
8086
  }
6116
8087
  await cloneProject(input);
6117
- const cdPath = import_node_path21.default.relative(process.cwd(), import_node_path21.default.resolve(input.directory));
8088
+ const cdPath = import_node_path25.default.relative(process.cwd(), import_node_path25.default.resolve(input.directory));
6118
8089
  console.log();
6119
- import_consola6.consola.log(
8090
+ consola.log(
6120
8091
  `\u2728 WXT project created with the ${TEMPLATE_COLORS[input.template.name]?.(input.template.name) ?? input.template.name} template.`
6121
8092
  );
6122
8093
  console.log();
6123
- import_consola6.consola.log("Next steps:");
8094
+ consola.log("Next steps:");
6124
8095
  let step = 0;
6125
8096
  if (cdPath !== "")
6126
- import_consola6.consola.log(` ${++step}.`, import_picocolors8.default.cyan(`cd ${cdPath}`));
6127
- import_consola6.consola.log(` ${++step}.`, import_picocolors8.default.cyan(`${input.packageManager} install`));
8097
+ consola.log(` ${++step}.`, import_picocolors8.default.cyan(`cd ${cdPath}`));
8098
+ consola.log(` ${++step}.`, import_picocolors8.default.cyan(`${input.packageManager} install`));
6128
8099
  console.log();
6129
8100
  }
6130
8101
  async function listTemplates() {
@@ -6133,16 +8104,16 @@ async function listTemplates() {
6133
8104
  if (res.status >= 300)
6134
8105
  throw Error(`Request failed with status ${res.status} ${res.statusText}`);
6135
8106
  const data = await res.json();
6136
- return data.files.map((item) => item.path.match(/templates\/(.+)\/package\.json/)?.[1]).filter((name) => name != null).map((name) => ({ name, path: `templates/${name}` })).sort((l, r) => {
6137
- const lWeight = TEMPLATE_SORT_WEIGHT[l.name] ?? Number.MAX_SAFE_INTEGER;
6138
- const rWeight = TEMPLATE_SORT_WEIGHT[r.name] ?? Number.MAX_SAFE_INTEGER;
8107
+ return data.files.map((item) => item.path.match(/templates\/(.+)\/package\.json/)?.[1]).filter((name) => name != null).map((name) => ({ name, path: `templates/${name}` })).sort((l2, r2) => {
8108
+ const lWeight = TEMPLATE_SORT_WEIGHT[l2.name] ?? Number.MAX_SAFE_INTEGER;
8109
+ const rWeight = TEMPLATE_SORT_WEIGHT[r2.name] ?? Number.MAX_SAFE_INTEGER;
6139
8110
  const diff = lWeight - rWeight;
6140
8111
  if (diff !== 0)
6141
8112
  return diff;
6142
- return l.name.localeCompare(r.name);
8113
+ return l2.name.localeCompare(r2.name);
6143
8114
  });
6144
8115
  } catch (err) {
6145
- import_consola6.consola.error(err);
8116
+ consola.error(err);
6146
8117
  throw Error(`Failed to load templates`);
6147
8118
  }
6148
8119
  }
@@ -6159,10 +8130,10 @@ async function cloneProject({
6159
8130
  force: true
6160
8131
  });
6161
8132
  await import_fs_extra16.default.move(
6162
- import_node_path21.default.join(directory, "_gitignore"),
6163
- import_node_path21.default.join(directory, ".gitignore")
8133
+ import_node_path25.default.join(directory, "_gitignore"),
8134
+ import_node_path25.default.join(directory, ".gitignore")
6164
8135
  ).catch(
6165
- (err) => import_consola6.consola.warn("Failed to move _gitignore to .gitignore:", err)
8136
+ (err) => consola.warn("Failed to move _gitignore to .gitignore:", err)
6166
8137
  );
6167
8138
  spinner.succeed();
6168
8139
  } catch (err) {
@@ -6192,7 +8163,7 @@ async function prepare(config) {
6192
8163
  }
6193
8164
 
6194
8165
  // src/core/zip.ts
6195
- var import_node_path22 = __toESM(require("path"), 1);
8166
+ var import_node_path26 = __toESM(require("path"), 1);
6196
8167
  var import_fs_extra17 = __toESM(require("fs-extra"), 1);
6197
8168
  var import_minimatch2 = require("minimatch");
6198
8169
  var import_jszip = __toESM(require("jszip"), 1);
@@ -6204,7 +8175,7 @@ async function zip(config) {
6204
8175
  wxt.logger.info("Zipping extension...");
6205
8176
  const zipFiles = [];
6206
8177
  const projectName = wxt.config.zip.name ?? kebabCaseAlphanumeric(
6207
- (await getPackageJson())?.name || import_node_path22.default.dirname(process.cwd())
8178
+ (await getPackageJson())?.name || import_node_path26.default.dirname(process.cwd())
6208
8179
  );
6209
8180
  const applyTemplate = (template) => template.replaceAll("{{name}}", projectName).replaceAll("{{browser}}", wxt.config.browser).replaceAll(
6210
8181
  "{{version}}",
@@ -6212,13 +8183,13 @@ async function zip(config) {
6212
8183
  ).replaceAll("{{mode}}", wxt.config.mode).replaceAll("{{manifestVersion}}", `mv${wxt.config.manifestVersion}`);
6213
8184
  await import_fs_extra17.default.ensureDir(wxt.config.outBaseDir);
6214
8185
  const outZipFilename = applyTemplate(wxt.config.zip.artifactTemplate);
6215
- const outZipPath = import_node_path22.default.resolve(wxt.config.outBaseDir, outZipFilename);
8186
+ const outZipPath = import_node_path26.default.resolve(wxt.config.outBaseDir, outZipFilename);
6216
8187
  await zipDir(wxt.config.outDir, outZipPath);
6217
8188
  zipFiles.push(outZipPath);
6218
8189
  if (wxt.config.browser === "firefox") {
6219
8190
  const { overrides, files: downloadedPackages } = await downloadPrivatePackages();
6220
8191
  const sourcesZipFilename = applyTemplate(wxt.config.zip.sourcesTemplate);
6221
- const sourcesZipPath = import_node_path22.default.resolve(
8192
+ const sourcesZipPath = import_node_path26.default.resolve(
6222
8193
  wxt.config.outBaseDir,
6223
8194
  sourcesZipFilename
6224
8195
  );
@@ -6259,11 +8230,11 @@ async function zipDir(directory, outputPath, options) {
6259
8230
  const filesToZip = [
6260
8231
  ...files,
6261
8232
  ...(options?.additionalFiles ?? []).map(
6262
- (file) => import_node_path22.default.relative(directory, file)
8233
+ (file) => import_node_path26.default.relative(directory, file)
6263
8234
  )
6264
8235
  ];
6265
8236
  for (const file of filesToZip) {
6266
- const absolutePath = import_node_path22.default.resolve(directory, file);
8237
+ const absolutePath = import_node_path26.default.resolve(directory, file);
6267
8238
  if (file.endsWith(".json")) {
6268
8239
  const content = await import_fs_extra17.default.readFile(absolutePath, "utf-8");
6269
8240
  archive.file(
@@ -6276,7 +8247,13 @@ async function zipDir(directory, outputPath, options) {
6276
8247
  }
6277
8248
  }
6278
8249
  await options?.additionalWork?.(archive);
6279
- const buffer = await archive.generateAsync({ type: "base64" });
8250
+ const buffer = await archive.generateAsync({
8251
+ type: "base64",
8252
+ ...wxt.config.zip.compressionLevel === 0 ? { compression: "STORE" } : {
8253
+ compression: "DEFLATE",
8254
+ compressionOptions: { level: wxt.config.zip.compressionLevel }
8255
+ }
8256
+ });
6280
8257
  await import_fs_extra17.default.writeFile(outputPath, buffer, "base64");
6281
8258
  }
6282
8259
  async function downloadPrivatePackages() {
@@ -6307,14 +8284,14 @@ async function downloadPrivatePackages() {
6307
8284
  function addOverridesToPackageJson(absolutePackageJsonPath, content, overrides) {
6308
8285
  if (Object.keys(overrides).length === 0)
6309
8286
  return content;
6310
- const packageJsonDir = import_node_path22.default.dirname(absolutePackageJsonPath);
8287
+ const packageJsonDir = import_node_path26.default.dirname(absolutePackageJsonPath);
6311
8288
  const oldPackage = JSON.parse(content);
6312
8289
  const newPackage = {
6313
8290
  ...oldPackage,
6314
8291
  [wxt.pm.overridesKey]: { ...oldPackage[wxt.pm.overridesKey] }
6315
8292
  };
6316
8293
  Object.entries(overrides).forEach(([key, absolutePath]) => {
6317
- newPackage[wxt.pm.overridesKey][key] = "file://./" + normalizePath(import_node_path22.default.relative(packageJsonDir, absolutePath));
8294
+ newPackage[wxt.pm.overridesKey][key] = "file://./" + normalizePath(import_node_path26.default.relative(packageJsonDir, absolutePath));
6318
8295
  });
6319
8296
  return JSON.stringify(newPackage, null, 2);
6320
8297
  }