storybook 9.0.0-alpha.7 → 9.0.0-alpha.8

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.
@@ -1,42 +1,42 @@
1
1
  "use strict";
2
- var Cs = Object.create;
3
- var Z = Object.defineProperty;
4
- var Os = Object.getOwnPropertyDescriptor;
5
- var As = Object.getOwnPropertyNames;
6
- var Rs = Object.getPrototypeOf, _s = Object.prototype.hasOwnProperty;
7
- var o = (e, t) => Z(e, "name", { value: t, configurable: !0 });
8
- var p = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), Gs = (e, t) => {
2
+ var Yo = Object.create;
3
+ var G = Object.defineProperty;
4
+ var Ko = Object.getOwnPropertyDescriptor;
5
+ var Xo = Object.getOwnPropertyNames;
6
+ var Qo = Object.getPrototypeOf, Zo = Object.prototype.hasOwnProperty;
7
+ var o = (e, t) => G(e, "name", { value: t, configurable: !0 });
8
+ var w = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), ei = (e, t) => {
9
9
  for (var r in t)
10
- Z(e, r, { get: t[r], enumerable: !0 });
11
- }, Ir = (e, t, r, n) => {
10
+ G(e, r, { get: t[r], enumerable: !0 });
11
+ }, Gt = (e, t, r, n) => {
12
12
  if (t && typeof t == "object" || typeof t == "function")
13
- for (let i of As(t))
14
- !_s.call(e, i) && i !== r && Z(e, i, { get: () => t[i], enumerable: !(n = Os(t, i)) || n.enumerable });
13
+ for (let i of Xo(t))
14
+ !Zo.call(e, i) && i !== r && G(e, i, { get: () => t[i], enumerable: !(n = Ko(t, i)) || n.enumerable });
15
15
  return e;
16
16
  };
17
- var b = (e, t, r) => (r = e != null ? Cs(Rs(e)) : {}, Ir(
17
+ var d = (e, t, r) => (r = e != null ? Yo(Qo(e)) : {}, Gt(
18
18
  // If the importer is in node compatibility mode or this is not an ESM
19
19
  // file that has been converted to a CommonJS file using a Babel-
20
20
  // compatible transform (i.e. "__esModule" has not been set), then set
21
21
  // "default" to the CommonJS "module.exports" for node compatibility.
22
- t || !e || !e.__esModule ? Z(r, "default", { value: e, enumerable: !0 }) : r,
22
+ t || !e || !e.__esModule ? G(r, "default", { value: e, enumerable: !0 }) : r,
23
23
  e
24
- )), js = (e) => Ir(Z({}, "__esModule", { value: !0 }), e);
24
+ )), ti = (e) => Gt(G({}, "__esModule", { value: !0 }), e);
25
25
 
26
26
  // ../node_modules/picocolors/picocolors.js
27
- var Ar = p((Ol, pt) => {
28
- var xe = process || {}, Cr = xe.argv || [], be = xe.env || {}, Ns = !(be.NO_COLOR || Cr.includes("--no-color")) && (!!be.FORCE_COLOR || Cr.
29
- includes("--color") || xe.platform === "win32" || (xe.stdout || {}).isTTY && be.TERM !== "dumb" || !!be.CI), Bs = /* @__PURE__ */ o((e, t, r = e) => (n) => {
27
+ var Wt = w((ka, De) => {
28
+ var ne = process || {}, Ut = ne.argv || [], re = ne.env || {}, ri = !(re.NO_COLOR || Ut.includes("--no-color")) && (!!re.FORCE_COLOR || Ut.
29
+ includes("--color") || ne.platform === "win32" || (ne.stdout || {}).isTTY && re.TERM !== "dumb" || !!re.CI), ni = /* @__PURE__ */ o((e, t, r = e) => (n) => {
30
30
  let i = "" + n, s = i.indexOf(t, e.length);
31
- return ~s ? e + Ds(i, t, r, s) + t : e + i + t;
32
- }, "formatter"), Ds = /* @__PURE__ */ o((e, t, r, n) => {
31
+ return ~s ? e + oi(i, t, r, s) + t : e + i + t;
32
+ }, "formatter"), oi = /* @__PURE__ */ o((e, t, r, n) => {
33
33
  let i = "", s = 0;
34
34
  do
35
35
  i += e.substring(s, n) + r, s = n + t.length, n = e.indexOf(t, s);
36
36
  while (~n);
37
37
  return i + e.substring(s);
38
- }, "replaceClose"), Or = /* @__PURE__ */ o((e = Ns) => {
39
- let t = e ? Bs : () => String;
38
+ }, "replaceClose"), $t = /* @__PURE__ */ o((e = ri) => {
39
+ let t = e ? ni : () => String;
40
40
  return {
41
41
  isColorSupported: e,
42
42
  reset: t("\x1B[0m", "\x1B[0m"),
@@ -82,16 +82,33 @@ var Ar = p((Ol, pt) => {
82
82
  bgWhiteBright: t("\x1B[107m", "\x1B[49m")
83
83
  };
84
84
  }, "createColors");
85
- pt.exports = Or();
86
- pt.exports.createColors = Or;
85
+ De.exports = $t();
86
+ De.exports.createColors = $t;
87
+ });
88
+
89
+ // ../node_modules/walk-up-path/dist/cjs/index.js
90
+ var zt = w((ie) => {
91
+ "use strict";
92
+ Object.defineProperty(ie, "__esModule", { value: !0 });
93
+ ie.walkUp = void 0;
94
+ var qt = require("path"), ii = /* @__PURE__ */ o(function* (e) {
95
+ for (e = (0, qt.resolve)(e); e; ) {
96
+ yield e;
97
+ let t = (0, qt.dirname)(e);
98
+ if (t === e)
99
+ break;
100
+ e = t;
101
+ }
102
+ }, "walkUp");
103
+ ie.walkUp = ii;
87
104
  });
88
105
 
89
106
  // ../node_modules/isexe/windows.js
90
- var Mr = p((Nl, Dr) => {
91
- Dr.exports = Br;
92
- Br.sync = Ls;
93
- var jr = require("fs");
94
- function Ms(e, t) {
107
+ var sr = w(($a, ir) => {
108
+ ir.exports = or;
109
+ or.sync = pi;
110
+ var rr = require("fs");
111
+ function li(e, t) {
95
112
  var r = t.pathExt !== void 0 ? t.pathExt : process.env.PATHEXT;
96
113
  if (!r || (r = r.split(";"), r.indexOf("") !== -1))
97
114
  return !0;
@@ -102,130 +119,130 @@ var Mr = p((Nl, Dr) => {
102
119
  }
103
120
  return !1;
104
121
  }
105
- o(Ms, "checkPathExt");
106
- function Nr(e, t, r) {
107
- return !e.isSymbolicLink() && !e.isFile() ? !1 : Ms(t, r);
122
+ o(li, "checkPathExt");
123
+ function nr(e, t, r) {
124
+ return !e.isSymbolicLink() && !e.isFile() ? !1 : li(t, r);
108
125
  }
109
- o(Nr, "checkStat");
110
- function Br(e, t, r) {
111
- jr.stat(e, function(n, i) {
112
- r(n, n ? !1 : Nr(i, e, t));
126
+ o(nr, "checkStat");
127
+ function or(e, t, r) {
128
+ rr.stat(e, function(n, i) {
129
+ r(n, n ? !1 : nr(i, e, t));
113
130
  });
114
131
  }
115
- o(Br, "isexe");
116
- function Ls(e, t) {
117
- return Nr(jr.statSync(e), e, t);
132
+ o(or, "isexe");
133
+ function pi(e, t) {
134
+ return nr(rr.statSync(e), e, t);
118
135
  }
119
- o(Ls, "sync");
136
+ o(pi, "sync");
120
137
  });
121
138
 
122
139
  // ../node_modules/isexe/mode.js
123
- var qr = p((Dl, $r) => {
124
- $r.exports = Fr;
125
- Fr.sync = Fs;
126
- var Lr = require("fs");
127
- function Fr(e, t, r) {
128
- Lr.stat(e, function(n, i) {
129
- r(n, n ? !1 : Ur(i, t));
140
+ var lr = w((Ha, fr) => {
141
+ fr.exports = cr;
142
+ cr.sync = mi;
143
+ var ar = require("fs");
144
+ function cr(e, t, r) {
145
+ ar.stat(e, function(n, i) {
146
+ r(n, n ? !1 : ur(i, t));
130
147
  });
131
148
  }
132
- o(Fr, "isexe");
133
- function Fs(e, t) {
134
- return Ur(Lr.statSync(e), t);
149
+ o(cr, "isexe");
150
+ function mi(e, t) {
151
+ return ur(ar.statSync(e), t);
135
152
  }
136
- o(Fs, "sync");
137
- function Ur(e, t) {
138
- return e.isFile() && Us(e, t);
153
+ o(mi, "sync");
154
+ function ur(e, t) {
155
+ return e.isFile() && di(e, t);
139
156
  }
140
- o(Ur, "checkStat");
141
- function Us(e, t) {
157
+ o(ur, "checkStat");
158
+ function di(e, t) {
142
159
  var r = e.mode, n = e.uid, i = e.gid, s = t.uid !== void 0 ? t.uid : process.getuid && process.getuid(), a = t.gid !== void 0 ? t.gid : process.
143
- getgid && process.getgid(), c = parseInt("100", 8), u = parseInt("010", 8), l = parseInt("001", 8), f = c | u, x = r & l || r & u && i ===
144
- a || r & c && n === s || r & f && s === 0;
145
- return x;
160
+ getgid && process.getgid(), c = parseInt("100", 8), u = parseInt("010", 8), f = parseInt("001", 8), l = c | u, y = r & f || r & u && i ===
161
+ a || r & c && n === s || r & l && s === 0;
162
+ return y;
146
163
  }
147
- o(Us, "checkMode");
164
+ o(di, "checkMode");
148
165
  });
149
166
 
150
167
  // ../node_modules/isexe/index.js
151
- var Hr = p((Fl, Wr) => {
152
- var Ll = require("fs"), we;
153
- process.platform === "win32" || global.TESTING_WINDOWS ? we = Mr() : we = qr();
154
- Wr.exports = yt;
155
- yt.sync = $s;
156
- function yt(e, t, r) {
168
+ var mr = w((qa, pr) => {
169
+ var Va = require("fs"), ae;
170
+ process.platform === "win32" || global.TESTING_WINDOWS ? ae = sr() : ae = lr();
171
+ pr.exports = He;
172
+ He.sync = yi;
173
+ function He(e, t, r) {
157
174
  if (typeof t == "function" && (r = t, t = {}), !r) {
158
175
  if (typeof Promise != "function")
159
176
  throw new TypeError("callback not provided");
160
177
  return new Promise(function(n, i) {
161
- yt(e, t || {}, function(s, a) {
178
+ He(e, t || {}, function(s, a) {
162
179
  s ? i(s) : n(a);
163
180
  });
164
181
  });
165
182
  }
166
- we(e, t || {}, function(n, i) {
183
+ ae(e, t || {}, function(n, i) {
167
184
  n && (n.code === "EACCES" || t && t.ignoreErrors) && (n = null, i = !1), r(n, i);
168
185
  });
169
186
  }
170
- o(yt, "isexe");
171
- function $s(e, t) {
187
+ o(He, "isexe");
188
+ function yi(e, t) {
172
189
  try {
173
- return we.sync(e, t || {});
190
+ return ae.sync(e, t || {});
174
191
  } catch (r) {
175
192
  if (t && t.ignoreErrors || r.code === "EACCES")
176
193
  return !1;
177
194
  throw r;
178
195
  }
179
196
  }
180
- o($s, "sync");
197
+ o(yi, "sync");
181
198
  });
182
199
 
183
200
  // ../node_modules/cross-spawn/node_modules/which/which.js
184
- var Qr = p(($l, Xr) => {
185
- var U = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Vr = require("path"), qs = U ? "\
186
- ;" : ":", zr = Hr(), Jr = /* @__PURE__ */ o((e) => Object.assign(new Error(`not found: ${e}`), { code: "ENOENT" }), "getNotFoundError"), Kr = /* @__PURE__ */ o(
201
+ var wr = w((Ya, xr) => {
202
+ var D = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", dr = require("path"), hi = D ? "\
203
+ ;" : ":", yr = mr(), hr = /* @__PURE__ */ o((e) => Object.assign(new Error(`not found: ${e}`), { code: "ENOENT" }), "getNotFoundError"), gr = /* @__PURE__ */ o(
187
204
  (e, t) => {
188
- let r = t.colon || qs, n = e.match(/\//) || U && e.match(/\\/) ? [""] : [
205
+ let r = t.colon || hi, n = e.match(/\//) || D && e.match(/\\/) ? [""] : [
189
206
  // windows always checks the cwd first
190
- ...U ? [process.cwd()] : [],
207
+ ...D ? [process.cwd()] : [],
191
208
  ...(t.path || process.env.PATH || /* istanbul ignore next: very unusual */
192
209
  "").split(r)
193
- ], i = U ? t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", s = U ? i.split(r) : [""];
194
- return U && e.indexOf(".") !== -1 && s[0] !== "" && s.unshift(""), {
210
+ ], i = D ? t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", s = D ? i.split(r) : [""];
211
+ return D && e.indexOf(".") !== -1 && s[0] !== "" && s.unshift(""), {
195
212
  pathEnv: n,
196
213
  pathExt: s,
197
214
  pathExtExe: i
198
215
  };
199
- }, "getPathInfo"), Yr = /* @__PURE__ */ o((e, t, r) => {
216
+ }, "getPathInfo"), br = /* @__PURE__ */ o((e, t, r) => {
200
217
  typeof t == "function" && (r = t, t = {}), t || (t = {});
201
- let { pathEnv: n, pathExt: i, pathExtExe: s } = Kr(e, t), a = [], c = /* @__PURE__ */ o((l) => new Promise((f, x) => {
202
- if (l === n.length)
203
- return t.all && a.length ? f(a) : x(Jr(e));
204
- let g = n[l], m = /^".*"$/.test(g) ? g.slice(1, -1) : g, y = Vr.join(m, e), h = !m && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + y : y;
205
- f(u(h, l, 0));
206
- }), "step"), u = /* @__PURE__ */ o((l, f, x) => new Promise((g, m) => {
207
- if (x === i.length)
208
- return g(c(f + 1));
209
- let y = i[x];
210
- zr(l + y, { pathExt: s }, (h, S) => {
211
- if (!h && S)
218
+ let { pathEnv: n, pathExt: i, pathExtExe: s } = gr(e, t), a = [], c = /* @__PURE__ */ o((f) => new Promise((l, y) => {
219
+ if (f === n.length)
220
+ return t.all && a.length ? l(a) : y(hr(e));
221
+ let g = n[f], h = /^".*"$/.test(g) ? g.slice(1, -1) : g, b = dr.join(h, e), m = !h && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + b : b;
222
+ l(u(m, f, 0));
223
+ }), "step"), u = /* @__PURE__ */ o((f, l, y) => new Promise((g, h) => {
224
+ if (y === i.length)
225
+ return g(c(l + 1));
226
+ let b = i[y];
227
+ yr(f + b, { pathExt: s }, (m, x) => {
228
+ if (!m && x)
212
229
  if (t.all)
213
- a.push(l + y);
230
+ a.push(f + b);
214
231
  else
215
- return g(l + y);
216
- return g(u(l, f, x + 1));
232
+ return g(f + b);
233
+ return g(u(f, l, y + 1));
217
234
  });
218
235
  }), "subStep");
219
- return r ? c(0).then((l) => r(null, l), r) : c(0);
220
- }, "which"), Ws = /* @__PURE__ */ o((e, t) => {
236
+ return r ? c(0).then((f) => r(null, f), r) : c(0);
237
+ }, "which"), gi = /* @__PURE__ */ o((e, t) => {
221
238
  t = t || {};
222
- let { pathEnv: r, pathExt: n, pathExtExe: i } = Kr(e, t), s = [];
239
+ let { pathEnv: r, pathExt: n, pathExtExe: i } = gr(e, t), s = [];
223
240
  for (let a = 0; a < r.length; a++) {
224
- let c = r[a], u = /^".*"$/.test(c) ? c.slice(1, -1) : c, l = Vr.join(u, e), f = !u && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + l : l;
225
- for (let x = 0; x < n.length; x++) {
226
- let g = f + n[x];
241
+ let c = r[a], u = /^".*"$/.test(c) ? c.slice(1, -1) : c, f = dr.join(u, e), l = !u && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + f : f;
242
+ for (let y = 0; y < n.length; y++) {
243
+ let g = l + n[y];
227
244
  try {
228
- if (zr.sync(g, { pathExt: i }))
245
+ if (yr.sync(g, { pathExt: i }))
229
246
  if (t.all)
230
247
  s.push(g);
231
248
  else
@@ -238,28 +255,28 @@ var Qr = p(($l, Xr) => {
238
255
  return s;
239
256
  if (t.nothrow)
240
257
  return null;
241
- throw Jr(e);
258
+ throw hr(e);
242
259
  }, "whichSync");
243
- Xr.exports = Yr;
244
- Yr.sync = Ws;
260
+ xr.exports = br;
261
+ br.sync = gi;
245
262
  });
246
263
 
247
264
  // ../node_modules/path-key/index.js
248
- var bt = p((Wl, gt) => {
265
+ var kr = w((Xa, Je) => {
249
266
  "use strict";
250
- var Zr = /* @__PURE__ */ o((e = {}) => {
267
+ var Sr = /* @__PURE__ */ o((e = {}) => {
251
268
  let t = e.env || process.env;
252
269
  return (e.platform || process.platform) !== "win32" ? "PATH" : Object.keys(t).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
253
270
  }, "pathKey");
254
- gt.exports = Zr;
255
- gt.exports.default = Zr;
271
+ Je.exports = Sr;
272
+ Je.exports.default = Sr;
256
273
  });
257
274
 
258
275
  // ../node_modules/cross-spawn/lib/util/resolveCommand.js
259
- var nn = p((Vl, rn) => {
276
+ var Tr = w((Za, vr) => {
260
277
  "use strict";
261
- var en = require("path"), Hs = Qr(), Vs = bt();
262
- function tn(e, t) {
278
+ var Er = require("path"), bi = wr(), xi = kr();
279
+ function Pr(e, t) {
263
280
  let r = e.options.env || process.env, n = process.cwd(), i = e.options.cwd != null, s = i && process.chdir !== void 0 && !process.chdir.
264
281
  disabled;
265
282
  if (s)
@@ -269,53 +286,53 @@ var nn = p((Vl, rn) => {
269
286
  }
270
287
  let a;
271
288
  try {
272
- a = Hs.sync(e.command, {
273
- path: r[Vs({ env: r })],
274
- pathExt: t ? en.delimiter : void 0
289
+ a = bi.sync(e.command, {
290
+ path: r[xi({ env: r })],
291
+ pathExt: t ? Er.delimiter : void 0
275
292
  });
276
293
  } catch {
277
294
  } finally {
278
295
  s && process.chdir(n);
279
296
  }
280
- return a && (a = en.resolve(i ? e.options.cwd : "", a)), a;
297
+ return a && (a = Er.resolve(i ? e.options.cwd : "", a)), a;
281
298
  }
282
- o(tn, "resolveCommandAttempt");
283
- function zs(e) {
284
- return tn(e) || tn(e, !0);
299
+ o(Pr, "resolveCommandAttempt");
300
+ function wi(e) {
301
+ return Pr(e) || Pr(e, !0);
285
302
  }
286
- o(zs, "resolveCommand");
287
- rn.exports = zs;
303
+ o(wi, "resolveCommand");
304
+ vr.exports = wi;
288
305
  });
289
306
 
290
307
  // ../node_modules/cross-spawn/lib/util/escape.js
291
- var on = p((Jl, St) => {
308
+ var Cr = w((tc, qe) => {
292
309
  "use strict";
293
- var xt = /([()\][%!^"`<>&|;, *?])/g;
294
- function Js(e) {
295
- return e = e.replace(xt, "^$1"), e;
296
- }
297
- o(Js, "escapeCommand");
298
- function Ks(e, t) {
299
- return e = `${e}`, e = e.replace(/(\\*)"/g, '$1$1\\"'), e = e.replace(/(\\*)$/, "$1$1"), e = `"${e}"`, e = e.replace(xt, "^$1"), t && (e =
300
- e.replace(xt, "^$1")), e;
301
- }
302
- o(Ks, "escapeArgument");
303
- St.exports.command = Js;
304
- St.exports.argument = Ks;
310
+ var Ve = /([()\][%!^"`<>&|;, *?])/g;
311
+ function Si(e) {
312
+ return e = e.replace(Ve, "^$1"), e;
313
+ }
314
+ o(Si, "escapeCommand");
315
+ function ki(e, t) {
316
+ return e = `${e}`, e = e.replace(/(\\*)"/g, '$1$1\\"'), e = e.replace(/(\\*)$/, "$1$1"), e = `"${e}"`, e = e.replace(Ve, "^$1"), t && (e =
317
+ e.replace(Ve, "^$1")), e;
318
+ }
319
+ o(ki, "escapeArgument");
320
+ qe.exports.command = Si;
321
+ qe.exports.argument = ki;
305
322
  });
306
323
 
307
324
  // ../node_modules/shebang-regex/index.js
308
- var an = p((Yl, sn) => {
325
+ var Ar = w((nc, Ir) => {
309
326
  "use strict";
310
- sn.exports = /^#!(.*)/;
327
+ Ir.exports = /^#!(.*)/;
311
328
  });
312
329
 
313
330
  // ../node_modules/shebang-command/index.js
314
- var un = p((Xl, cn) => {
331
+ var jr = w((oc, Or) => {
315
332
  "use strict";
316
- var Ys = an();
317
- cn.exports = (e = "") => {
318
- let t = e.match(Ys);
333
+ var Ei = Ar();
334
+ Or.exports = (e = "") => {
335
+ let t = e.match(Ei);
319
336
  if (!t)
320
337
  return null;
321
338
  let [r, n] = t[0].replace(/#! ?/, "").split(" "), i = r.split("/").pop();
@@ -324,45 +341,45 @@ var un = p((Xl, cn) => {
324
341
  });
325
342
 
326
343
  // ../node_modules/cross-spawn/lib/util/readShebang.js
327
- var fn = p((Ql, ln) => {
344
+ var Nr = w((ic, Rr) => {
328
345
  "use strict";
329
- var wt = require("fs"), Xs = un();
330
- function Qs(e) {
346
+ var ze = require("fs"), Pi = jr();
347
+ function vi(e) {
331
348
  let r = Buffer.alloc(150), n;
332
349
  try {
333
- n = wt.openSync(e, "r"), wt.readSync(n, r, 0, 150, 0), wt.closeSync(n);
350
+ n = ze.openSync(e, "r"), ze.readSync(n, r, 0, 150, 0), ze.closeSync(n);
334
351
  } catch {
335
352
  }
336
- return Xs(r.toString());
353
+ return Pi(r.toString());
337
354
  }
338
- o(Qs, "readShebang");
339
- ln.exports = Qs;
355
+ o(vi, "readShebang");
356
+ Rr.exports = vi;
340
357
  });
341
358
 
342
359
  // ../node_modules/cross-spawn/lib/parse.js
343
- var hn = p((ef, mn) => {
360
+ var Lr = w((ac, Mr) => {
344
361
  "use strict";
345
- var Zs = require("path"), pn = nn(), dn = on(), ea = fn(), ta = process.platform === "win32", ra = /\.(?:com|exe)$/i, na = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
346
- function oa(e) {
347
- e.file = pn(e);
348
- let t = e.file && ea(e.file);
349
- return t ? (e.args.unshift(e.file), e.command = t, pn(e)) : e.file;
350
- }
351
- o(oa, "detectShebang");
352
- function ia(e) {
353
- if (!ta)
362
+ var Ti = require("path"), Dr = Tr(), _r = Cr(), Ci = Nr(), Ii = process.platform === "win32", Ai = /\.(?:com|exe)$/i, Oi = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
363
+ function ji(e) {
364
+ e.file = Dr(e);
365
+ let t = e.file && Ci(e.file);
366
+ return t ? (e.args.unshift(e.file), e.command = t, Dr(e)) : e.file;
367
+ }
368
+ o(ji, "detectShebang");
369
+ function Ri(e) {
370
+ if (!Ii)
354
371
  return e;
355
- let t = oa(e), r = !ra.test(t);
372
+ let t = ji(e), r = !Ai.test(t);
356
373
  if (e.options.forceShell || r) {
357
- let n = na.test(t);
358
- e.command = Zs.normalize(e.command), e.command = dn.command(e.command), e.args = e.args.map((s) => dn.argument(s, n));
374
+ let n = Oi.test(t);
375
+ e.command = Ti.normalize(e.command), e.command = _r.command(e.command), e.args = e.args.map((s) => _r.argument(s, n));
359
376
  let i = [e.command].concat(e.args).join(" ");
360
377
  e.args = ["/d", "/s", "/c", `"${i}"`], e.command = process.env.comspec || "cmd.exe", e.options.windowsVerbatimArguments = !0;
361
378
  }
362
379
  return e;
363
380
  }
364
- o(ia, "parseNonShell");
365
- function sa(e, t, r) {
381
+ o(Ri, "parseNonShell");
382
+ function Ni(e, t, r) {
366
383
  t && !Array.isArray(t) && (r = t, t = null), t = t ? t.slice(0) : [], r = Object.assign({}, r);
367
384
  let n = {
368
385
  command: e,
@@ -374,17 +391,17 @@ var hn = p((ef, mn) => {
374
391
  args: t
375
392
  }
376
393
  };
377
- return r.shell ? n : ia(n);
394
+ return r.shell ? n : Ri(n);
378
395
  }
379
- o(sa, "parse");
380
- mn.exports = sa;
396
+ o(Ni, "parse");
397
+ Mr.exports = Ni;
381
398
  });
382
399
 
383
400
  // ../node_modules/cross-spawn/lib/enoent.js
384
- var bn = p((rf, gn) => {
401
+ var Gr = w((uc, Br) => {
385
402
  "use strict";
386
- var vt = process.platform === "win32";
387
- function Pt(e, t) {
403
+ var Ye = process.platform === "win32";
404
+ function Ke(e, t) {
388
405
  return Object.assign(new Error(`${t} ${e.command} ENOENT`), {
389
406
  code: "ENOENT",
390
407
  errno: "ENOENT",
@@ -393,781 +410,64 @@ var bn = p((rf, gn) => {
393
410
  spawnargs: e.args
394
411
  });
395
412
  }
396
- o(Pt, "notFoundError");
397
- function aa(e, t) {
398
- if (!vt)
413
+ o(Ke, "notFoundError");
414
+ function Di(e, t) {
415
+ if (!Ye)
399
416
  return;
400
417
  let r = e.emit;
401
418
  e.emit = function(n, i) {
402
419
  if (n === "exit") {
403
- let s = yn(i, t, "spawn");
420
+ let s = Fr(i, t, "spawn");
404
421
  if (s)
405
422
  return r.call(e, "error", s);
406
423
  }
407
424
  return r.apply(e, arguments);
408
425
  };
409
426
  }
410
- o(aa, "hookChildProcess");
411
- function yn(e, t) {
412
- return vt && e === 1 && !t.file ? Pt(t.original, "spawn") : null;
427
+ o(Di, "hookChildProcess");
428
+ function Fr(e, t) {
429
+ return Ye && e === 1 && !t.file ? Ke(t.original, "spawn") : null;
413
430
  }
414
- o(yn, "verifyENOENT");
415
- function ca(e, t) {
416
- return vt && e === 1 && !t.file ? Pt(t.original, "spawnSync") : null;
431
+ o(Fr, "verifyENOENT");
432
+ function _i(e, t) {
433
+ return Ye && e === 1 && !t.file ? Ke(t.original, "spawnSync") : null;
417
434
  }
418
- o(ca, "verifyENOENTSync");
419
- gn.exports = {
420
- hookChildProcess: aa,
421
- verifyENOENT: yn,
422
- verifyENOENTSync: ca,
423
- notFoundError: Pt
435
+ o(_i, "verifyENOENTSync");
436
+ Br.exports = {
437
+ hookChildProcess: Di,
438
+ verifyENOENT: Fr,
439
+ verifyENOENTSync: _i,
440
+ notFoundError: Ke
424
441
  };
425
442
  });
426
443
 
427
444
  // ../node_modules/cross-spawn/index.js
428
- var kt = p((of, $) => {
429
- "use strict";
430
- var xn = require("child_process"), Et = hn(), Tt = bn();
431
- function Sn(e, t, r) {
432
- let n = Et(e, t, r), i = xn.spawn(n.command, n.args, n.options);
433
- return Tt.hookChildProcess(i, n), i;
434
- }
435
- o(Sn, "spawn");
436
- function ua(e, t, r) {
437
- let n = Et(e, t, r), i = xn.spawnSync(n.command, n.args, n.options);
438
- return i.error = i.error || Tt.verifyENOENTSync(i.status, n), i;
439
- }
440
- o(ua, "spawnSync");
441
- $.exports = Sn;
442
- $.exports.spawn = Sn;
443
- $.exports.sync = ua;
444
- $.exports._parse = Et;
445
- $.exports._enoent = Tt;
446
- });
447
-
448
- // ../node_modules/execa/node_modules/strip-final-newline/index.js
449
- var vn = p((af, wn) => {
450
- "use strict";
451
- wn.exports = (e) => {
452
- let t = typeof e == "string" ? `
453
- ` : 10, r = typeof e == "string" ? "\r" : 13;
454
- return e[e.length - 1] === t && (e = e.slice(0, e.length - 1)), e[e.length - 1] === r && (e = e.slice(0, e.length - 1)), e;
455
- };
456
- });
457
-
458
- // ../node_modules/npm-run-path/index.js
459
- var Tn = p((cf, re) => {
460
- "use strict";
461
- var te = require("path"), Pn = bt(), En = /* @__PURE__ */ o((e) => {
462
- e = {
463
- cwd: process.cwd(),
464
- path: process.env[Pn()],
465
- execPath: process.execPath,
466
- ...e
467
- };
468
- let t, r = te.resolve(e.cwd), n = [];
469
- for (; t !== r; )
470
- n.push(te.join(r, "node_modules/.bin")), t = r, r = te.resolve(r, "..");
471
- let i = te.resolve(e.cwd, e.execPath, "..");
472
- return n.push(i), n.concat(e.path).join(te.delimiter);
473
- }, "npmRunPath");
474
- re.exports = En;
475
- re.exports.default = En;
476
- re.exports.env = (e) => {
477
- e = {
478
- env: process.env,
479
- ...e
480
- };
481
- let t = { ...e.env }, r = Pn({ env: t });
482
- return e.path = t[r], t[r] = re.exports(e), t;
483
- };
484
- });
485
-
486
- // ../node_modules/mimic-fn/index.js
487
- var In = p((lf, It) => {
488
- "use strict";
489
- var kn = /* @__PURE__ */ o((e, t) => {
490
- for (let r of Reflect.ownKeys(t))
491
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
492
- return e;
493
- }, "mimicFn");
494
- It.exports = kn;
495
- It.exports.default = kn;
496
- });
497
-
498
- // ../node_modules/onetime/index.js
499
- var On = p((pf, Pe) => {
500
- "use strict";
501
- var la = In(), ve = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ o((e, t = {}) => {
502
- if (typeof e != "function")
503
- throw new TypeError("Expected a function");
504
- let r, n = 0, i = e.displayName || e.name || "<anonymous>", s = /* @__PURE__ */ o(function(...a) {
505
- if (ve.set(s, ++n), n === 1)
506
- r = e.apply(this, a), e = null;
507
- else if (t.throw === !0)
508
- throw new Error(`Function \`${i}\` can only be called once`);
509
- return r;
510
- }, "onetime");
511
- return la(s, e), ve.set(s, n), s;
512
- }, "onetime");
513
- Pe.exports = Cn;
514
- Pe.exports.default = Cn;
515
- Pe.exports.callCount = (e) => {
516
- if (!ve.has(e))
517
- throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);
518
- return ve.get(e);
519
- };
520
- });
521
-
522
- // ../node_modules/execa/node_modules/human-signals/build/src/core.js
523
- var An = p((Ee) => {
524
- "use strict";
525
- Object.defineProperty(Ee, "__esModule", { value: !0 });
526
- Ee.SIGNALS = void 0;
527
- var fa = [
528
- {
529
- name: "SIGHUP",
530
- number: 1,
531
- action: "terminate",
532
- description: "Terminal closed",
533
- standard: "posix"
534
- },
535
- {
536
- name: "SIGINT",
537
- number: 2,
538
- action: "terminate",
539
- description: "User interruption with CTRL-C",
540
- standard: "ansi"
541
- },
542
- {
543
- name: "SIGQUIT",
544
- number: 3,
545
- action: "core",
546
- description: "User interruption with CTRL-\\",
547
- standard: "posix"
548
- },
549
- {
550
- name: "SIGILL",
551
- number: 4,
552
- action: "core",
553
- description: "Invalid machine instruction",
554
- standard: "ansi"
555
- },
556
- {
557
- name: "SIGTRAP",
558
- number: 5,
559
- action: "core",
560
- description: "Debugger breakpoint",
561
- standard: "posix"
562
- },
563
- {
564
- name: "SIGABRT",
565
- number: 6,
566
- action: "core",
567
- description: "Aborted",
568
- standard: "ansi"
569
- },
570
- {
571
- name: "SIGIOT",
572
- number: 6,
573
- action: "core",
574
- description: "Aborted",
575
- standard: "bsd"
576
- },
577
- {
578
- name: "SIGBUS",
579
- number: 7,
580
- action: "core",
581
- description: "Bus error due to misaligned, non-existing address or paging error",
582
- standard: "bsd"
583
- },
584
- {
585
- name: "SIGEMT",
586
- number: 7,
587
- action: "terminate",
588
- description: "Command should be emulated but is not implemented",
589
- standard: "other"
590
- },
591
- {
592
- name: "SIGFPE",
593
- number: 8,
594
- action: "core",
595
- description: "Floating point arithmetic error",
596
- standard: "ansi"
597
- },
598
- {
599
- name: "SIGKILL",
600
- number: 9,
601
- action: "terminate",
602
- description: "Forced termination",
603
- standard: "posix",
604
- forced: !0
605
- },
606
- {
607
- name: "SIGUSR1",
608
- number: 10,
609
- action: "terminate",
610
- description: "Application-specific signal",
611
- standard: "posix"
612
- },
613
- {
614
- name: "SIGSEGV",
615
- number: 11,
616
- action: "core",
617
- description: "Segmentation fault",
618
- standard: "ansi"
619
- },
620
- {
621
- name: "SIGUSR2",
622
- number: 12,
623
- action: "terminate",
624
- description: "Application-specific signal",
625
- standard: "posix"
626
- },
627
- {
628
- name: "SIGPIPE",
629
- number: 13,
630
- action: "terminate",
631
- description: "Broken pipe or socket",
632
- standard: "posix"
633
- },
634
- {
635
- name: "SIGALRM",
636
- number: 14,
637
- action: "terminate",
638
- description: "Timeout or timer",
639
- standard: "posix"
640
- },
641
- {
642
- name: "SIGTERM",
643
- number: 15,
644
- action: "terminate",
645
- description: "Termination",
646
- standard: "ansi"
647
- },
648
- {
649
- name: "SIGSTKFLT",
650
- number: 16,
651
- action: "terminate",
652
- description: "Stack is empty or overflowed",
653
- standard: "other"
654
- },
655
- {
656
- name: "SIGCHLD",
657
- number: 17,
658
- action: "ignore",
659
- description: "Child process terminated, paused or unpaused",
660
- standard: "posix"
661
- },
662
- {
663
- name: "SIGCLD",
664
- number: 17,
665
- action: "ignore",
666
- description: "Child process terminated, paused or unpaused",
667
- standard: "other"
668
- },
669
- {
670
- name: "SIGCONT",
671
- number: 18,
672
- action: "unpause",
673
- description: "Unpaused",
674
- standard: "posix",
675
- forced: !0
676
- },
677
- {
678
- name: "SIGSTOP",
679
- number: 19,
680
- action: "pause",
681
- description: "Paused",
682
- standard: "posix",
683
- forced: !0
684
- },
685
- {
686
- name: "SIGTSTP",
687
- number: 20,
688
- action: "pause",
689
- description: 'Paused using CTRL-Z or "suspend"',
690
- standard: "posix"
691
- },
692
- {
693
- name: "SIGTTIN",
694
- number: 21,
695
- action: "pause",
696
- description: "Background process cannot read terminal input",
697
- standard: "posix"
698
- },
699
- {
700
- name: "SIGBREAK",
701
- number: 21,
702
- action: "terminate",
703
- description: "User interruption with CTRL-BREAK",
704
- standard: "other"
705
- },
706
- {
707
- name: "SIGTTOU",
708
- number: 22,
709
- action: "pause",
710
- description: "Background process cannot write to terminal output",
711
- standard: "posix"
712
- },
713
- {
714
- name: "SIGURG",
715
- number: 23,
716
- action: "ignore",
717
- description: "Socket received out-of-band data",
718
- standard: "bsd"
719
- },
720
- {
721
- name: "SIGXCPU",
722
- number: 24,
723
- action: "core",
724
- description: "Process timed out",
725
- standard: "bsd"
726
- },
727
- {
728
- name: "SIGXFSZ",
729
- number: 25,
730
- action: "core",
731
- description: "File too big",
732
- standard: "bsd"
733
- },
734
- {
735
- name: "SIGVTALRM",
736
- number: 26,
737
- action: "terminate",
738
- description: "Timeout or timer",
739
- standard: "bsd"
740
- },
741
- {
742
- name: "SIGPROF",
743
- number: 27,
744
- action: "terminate",
745
- description: "Timeout or timer",
746
- standard: "bsd"
747
- },
748
- {
749
- name: "SIGWINCH",
750
- number: 28,
751
- action: "ignore",
752
- description: "Terminal window size changed",
753
- standard: "bsd"
754
- },
755
- {
756
- name: "SIGIO",
757
- number: 29,
758
- action: "terminate",
759
- description: "I/O is available",
760
- standard: "other"
761
- },
762
- {
763
- name: "SIGPOLL",
764
- number: 29,
765
- action: "terminate",
766
- description: "Watched event",
767
- standard: "other"
768
- },
769
- {
770
- name: "SIGINFO",
771
- number: 29,
772
- action: "ignore",
773
- description: "Request for process information",
774
- standard: "other"
775
- },
776
- {
777
- name: "SIGPWR",
778
- number: 30,
779
- action: "terminate",
780
- description: "Device running out of power",
781
- standard: "systemv"
782
- },
783
- {
784
- name: "SIGSYS",
785
- number: 31,
786
- action: "core",
787
- description: "Invalid system call",
788
- standard: "other"
789
- },
790
- {
791
- name: "SIGUNUSED",
792
- number: 31,
793
- action: "terminate",
794
- description: "Invalid system call",
795
- standard: "other"
796
- }
797
- ];
798
- Ee.SIGNALS = fa;
799
- });
800
-
801
- // ../node_modules/execa/node_modules/human-signals/build/src/realtime.js
802
- var Ct = p((q) => {
803
- "use strict";
804
- Object.defineProperty(q, "__esModule", { value: !0 });
805
- q.SIGRTMAX = q.getRealtimeSignals = void 0;
806
- var pa = /* @__PURE__ */ o(function() {
807
- let e = _n - Rn + 1;
808
- return Array.from({ length: e }, da);
809
- }, "getRealtimeSignals");
810
- q.getRealtimeSignals = pa;
811
- var da = /* @__PURE__ */ o(function(e, t) {
812
- return {
813
- name: `SIGRT${t + 1}`,
814
- number: Rn + t,
815
- action: "terminate",
816
- description: "Application-specific signal (realtime)",
817
- standard: "posix"
818
- };
819
- }, "getRealtimeSignal"), Rn = 34, _n = 64;
820
- q.SIGRTMAX = _n;
821
- });
822
-
823
- // ../node_modules/execa/node_modules/human-signals/build/src/signals.js
824
- var Gn = p((Te) => {
825
- "use strict";
826
- Object.defineProperty(Te, "__esModule", { value: !0 });
827
- Te.getSignals = void 0;
828
- var ma = require("os"), ha = An(), ya = Ct(), ga = /* @__PURE__ */ o(function() {
829
- let e = (0, ya.getRealtimeSignals)();
830
- return [...ha.SIGNALS, ...e].map(ba);
831
- }, "getSignals");
832
- Te.getSignals = ga;
833
- var ba = /* @__PURE__ */ o(function({
834
- name: e,
835
- number: t,
836
- description: r,
837
- action: n,
838
- forced: i = !1,
839
- standard: s
840
- }) {
841
- let {
842
- signals: { [e]: a }
843
- } = ma.constants, c = a !== void 0;
844
- return { name: e, number: c ? a : t, description: r, supported: c, action: n, forced: i, standard: s };
845
- }, "normalizeSignal");
846
- });
847
-
848
- // ../node_modules/execa/node_modules/human-signals/build/src/main.js
849
- var Nn = p((W) => {
850
- "use strict";
851
- Object.defineProperty(W, "__esModule", { value: !0 });
852
- W.signalsByNumber = W.signalsByName = void 0;
853
- var xa = require("os"), jn = Gn(), Sa = Ct(), wa = /* @__PURE__ */ o(function() {
854
- return (0, jn.getSignals)().reduce(va, {});
855
- }, "getSignalsByName"), va = /* @__PURE__ */ o(function(e, { name: t, number: r, description: n, supported: i, action: s, forced: a, standard: c }) {
856
- return {
857
- ...e,
858
- [t]: { name: t, number: r, description: n, supported: i, action: s, forced: a, standard: c }
859
- };
860
- }, "getSignalByName"), Pa = wa();
861
- W.signalsByName = Pa;
862
- var Ea = /* @__PURE__ */ o(function() {
863
- let e = (0, jn.getSignals)(), t = Sa.SIGRTMAX + 1, r = Array.from({ length: t }, (n, i) => Ta(i, e));
864
- return Object.assign({}, ...r);
865
- }, "getSignalsByNumber"), Ta = /* @__PURE__ */ o(function(e, t) {
866
- let r = ka(e, t);
867
- if (r === void 0)
868
- return {};
869
- let { name: n, description: i, supported: s, action: a, forced: c, standard: u } = r;
870
- return {
871
- [e]: {
872
- name: n,
873
- number: e,
874
- description: i,
875
- supported: s,
876
- action: a,
877
- forced: c,
878
- standard: u
879
- }
880
- };
881
- }, "getSignalByNumber"), ka = /* @__PURE__ */ o(function(e, t) {
882
- let r = t.find(({ name: n }) => xa.constants.signals[n] === e);
883
- return r !== void 0 ? r : t.find((n) => n.number === e);
884
- }, "findSignalByNumber"), Ia = Ea();
885
- W.signalsByNumber = Ia;
886
- });
887
-
888
- // ../node_modules/execa/lib/error.js
889
- var Dn = p((wf, Bn) => {
890
- "use strict";
891
- var { signalsByName: Ca } = Nn(), Oa = /* @__PURE__ */ o(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: s,
892
- isCanceled: a }) => e ? `timed out after ${t} milliseconds` : a ? "was canceled" : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was\
893
- killed with ${n} (${i})` : s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"), Aa = /* @__PURE__ */ o(({
894
- stdout: e,
895
- stderr: t,
896
- all: r,
897
- error: n,
898
- signal: i,
899
- exitCode: s,
900
- command: a,
901
- escapedCommand: c,
902
- timedOut: u,
903
- isCanceled: l,
904
- killed: f,
905
- parsed: { options: { timeout: x } }
906
- }) => {
907
- s = s === null ? void 0 : s, i = i === null ? void 0 : i;
908
- let g = i === void 0 ? void 0 : Ca[i].description, m = n && n.code, h = `Command ${Oa({ timedOut: u, timeout: x, errorCode: m, signal: i,
909
- signalDescription: g, exitCode: s, isCanceled: l })}: ${a}`, S = Object.prototype.toString.call(n) === "[object Error]", k = S ? `${h}
910
- ${n.message}` : h, E = [k, t, e].filter(Boolean).join(`
911
- `);
912
- return S ? (n.originalMessage = n.message, n.message = E) : n = new Error(E), n.shortMessage = k, n.command = a, n.escapedCommand = c, n.
913
- exitCode = s, n.signal = i, n.signalDescription = g, n.stdout = e, n.stderr = t, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.
914
- bufferedData, n.failed = !0, n.timedOut = !!u, n.isCanceled = l, n.killed = f && !u, n;
915
- }, "makeError");
916
- Bn.exports = Aa;
917
- });
918
-
919
- // ../node_modules/execa/lib/stdio.js
920
- var Ln = p((Pf, Ot) => {
921
- "use strict";
922
- var ke = ["stdin", "stdout", "stderr"], Ra = /* @__PURE__ */ o((e) => ke.some((t) => e[t] !== void 0), "hasAlias"), Mn = /* @__PURE__ */ o(
923
- (e) => {
924
- if (!e)
925
- return;
926
- let { stdio: t } = e;
927
- if (t === void 0)
928
- return ke.map((n) => e[n]);
929
- if (Ra(e))
930
- throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${ke.map((n) => `\`${n}\``).join(", ")}`);
931
- if (typeof t == "string")
932
- return t;
933
- if (!Array.isArray(t))
934
- throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);
935
- let r = Math.max(t.length, ke.length);
936
- return Array.from({ length: r }, (n, i) => t[i]);
937
- }, "normalizeStdio");
938
- Ot.exports = Mn;
939
- Ot.exports.node = (e) => {
940
- let t = Mn(e);
941
- return t === "ipc" ? "ipc" : t === void 0 || typeof t == "string" ? [t, t, t, "ipc"] : t.includes("ipc") ? t : [...t, "ipc"];
942
- };
943
- });
944
-
945
- // ../node_modules/signal-exit/signals.js
946
- var Fn = p((Tf, Ie) => {
947
- Ie.exports = [
948
- "SIGABRT",
949
- "SIGALRM",
950
- "SIGHUP",
951
- "SIGINT",
952
- "SIGTERM"
953
- ];
954
- process.platform !== "win32" && Ie.exports.push(
955
- "SIGVTALRM",
956
- "SIGXCPU",
957
- "SIGXFSZ",
958
- "SIGUSR2",
959
- "SIGTRAP",
960
- "SIGSYS",
961
- "SIGQUIT",
962
- "SIGIOT"
963
- // should detect profiler and enable/disable accordingly.
964
- // see #21
965
- // 'SIGPROF'
966
- );
967
- process.platform === "linux" && Ie.exports.push(
968
- "SIGIO",
969
- "SIGPOLL",
970
- "SIGPWR",
971
- "SIGSTKFLT",
972
- "SIGUNUSED"
973
- );
974
- });
975
-
976
- // ../node_modules/signal-exit/index.js
977
- var Hn = p((kf, z) => {
978
- var w = global.process, j = /* @__PURE__ */ o(function(e) {
979
- return e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.reallyExit == "func\
980
- tion" && typeof e.listeners == "function" && typeof e.kill == "function" && typeof e.pid == "number" && typeof e.on == "function";
981
- }, "processOk");
982
- j(w) ? (Un = require("assert"), H = Fn(), $n = /^win/i.test(w.platform), ne = require("events"), typeof ne != "function" && (ne = ne.EventEmitter),
983
- w.__signal_exit_emitter__ ? P = w.__signal_exit_emitter__ : (P = w.__signal_exit_emitter__ = new ne(), P.count = 0, P.emitted = {}), P.infinite ||
984
- (P.setMaxListeners(1 / 0), P.infinite = !0), z.exports = function(e, t) {
985
- if (!j(global.process))
986
- return function() {
987
- };
988
- Un.equal(typeof e, "function", "a callback must be provided for exit handler"), V === !1 && At();
989
- var r = "exit";
990
- t && t.alwaysLast && (r = "afterexit");
991
- var n = /* @__PURE__ */ o(function() {
992
- P.removeListener(r, e), P.listeners("exit").length === 0 && P.listeners("afterexit").length === 0 && Ce();
993
- }, "remove");
994
- return P.on(r, e), n;
995
- }, Ce = /* @__PURE__ */ o(function() {
996
- !V || !j(global.process) || (V = !1, H.forEach(function(t) {
997
- try {
998
- w.removeListener(t, Oe[t]);
999
- } catch {
1000
- }
1001
- }), w.emit = Ae, w.reallyExit = Rt, P.count -= 1);
1002
- }, "unload"), z.exports.unload = Ce, N = /* @__PURE__ */ o(function(t, r, n) {
1003
- P.emitted[t] || (P.emitted[t] = !0, P.emit(t, r, n));
1004
- }, "emit"), Oe = {}, H.forEach(function(e) {
1005
- Oe[e] = /* @__PURE__ */ o(function() {
1006
- if (j(global.process)) {
1007
- var r = w.listeners(e);
1008
- r.length === P.count && (Ce(), N("exit", null, e), N("afterexit", null, e), $n && e === "SIGHUP" && (e = "SIGINT"), w.kill(w.pid, e));
1009
- }
1010
- }, "listener");
1011
- }), z.exports.signals = function() {
1012
- return H;
1013
- }, V = !1, At = /* @__PURE__ */ o(function() {
1014
- V || !j(global.process) || (V = !0, P.count += 1, H = H.filter(function(t) {
1015
- try {
1016
- return w.on(t, Oe[t]), !0;
1017
- } catch {
1018
- return !1;
1019
- }
1020
- }), w.emit = Wn, w.reallyExit = qn);
1021
- }, "load"), z.exports.load = At, Rt = w.reallyExit, qn = /* @__PURE__ */ o(function(t) {
1022
- j(global.process) && (w.exitCode = t || /* istanbul ignore next */
1023
- 0, N("exit", w.exitCode, null), N("afterexit", w.exitCode, null), Rt.call(w, w.exitCode));
1024
- }, "processReallyExit"), Ae = w.emit, Wn = /* @__PURE__ */ o(function(t, r) {
1025
- if (t === "exit" && j(global.process)) {
1026
- r !== void 0 && (w.exitCode = r);
1027
- var n = Ae.apply(this, arguments);
1028
- return N("exit", w.exitCode, null), N("afterexit", w.exitCode, null), n;
1029
- } else
1030
- return Ae.apply(this, arguments);
1031
- }, "processEmit")) : z.exports = function() {
1032
- return function() {
1033
- };
1034
- };
1035
- var Un, H, $n, ne, P, Ce, N, Oe, V, At, Rt, qn, Ae, Wn;
1036
- });
1037
-
1038
- // ../node_modules/execa/lib/kill.js
1039
- var zn = p((Cf, Vn) => {
445
+ var Wr = w((lc, _) => {
1040
446
  "use strict";
1041
- var _a = require("os"), Ga = Hn(), ja = 1e3 * 5, Na = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
1042
- let n = e(t);
1043
- return Ba(e, t, r, n), n;
1044
- }, "spawnedKill"), Ba = /* @__PURE__ */ o((e, t, r, n) => {
1045
- if (!Da(t, r, n))
1046
- return;
1047
- let i = La(r), s = setTimeout(() => {
1048
- e("SIGKILL");
1049
- }, i);
1050
- s.unref && s.unref();
1051
- }, "setKillTimeout"), Da = /* @__PURE__ */ o((e, { forceKillAfterTimeout: t }, r) => Ma(e) && t !== !1 && r, "shouldForceKill"), Ma = /* @__PURE__ */ o(
1052
- (e) => e === _a.constants.signals.SIGTERM || typeof e == "string" && e.toUpperCase() === "SIGTERM", "isSigterm"), La = /* @__PURE__ */ o(({
1053
- forceKillAfterTimeout: e = !0 }) => {
1054
- if (e === !0)
1055
- return ja;
1056
- if (!Number.isFinite(e) || e < 0)
1057
- throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
1058
- return e;
1059
- }, "getForceKillAfterTimeout"), Fa = /* @__PURE__ */ o((e, t) => {
1060
- e.kill() && (t.isCanceled = !0);
1061
- }, "spawnedCancel"), Ua = /* @__PURE__ */ o((e, t, r) => {
1062
- e.kill(t), r(Object.assign(new Error("Timed out"), { timedOut: !0, signal: t }));
1063
- }, "timeoutKill"), $a = /* @__PURE__ */ o((e, { timeout: t, killSignal: r = "SIGTERM" }, n) => {
1064
- if (t === 0 || t === void 0)
1065
- return n;
1066
- let i, s = new Promise((c, u) => {
1067
- i = setTimeout(() => {
1068
- Ua(e, r, u);
1069
- }, t);
1070
- }), a = n.finally(() => {
1071
- clearTimeout(i);
1072
- });
1073
- return Promise.race([s, a]);
1074
- }, "setupTimeout"), qa = /* @__PURE__ */ o(({ timeout: e }) => {
1075
- if (e !== void 0 && (!Number.isFinite(e) || e < 0))
1076
- throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
1077
- }, "validateTimeout"), Wa = /* @__PURE__ */ o(async (e, { cleanup: t, detached: r }, n) => {
1078
- if (!t || r)
1079
- return n;
1080
- let i = Ga(() => {
1081
- e.kill();
1082
- });
1083
- return n.finally(() => {
1084
- i();
1085
- });
1086
- }, "setExitHandler");
1087
- Vn.exports = {
1088
- spawnedKill: Na,
1089
- spawnedCancel: Fa,
1090
- setupTimeout: $a,
1091
- validateTimeout: qa,
1092
- setExitHandler: Wa
1093
- };
1094
- });
1095
-
1096
- // ../node_modules/is-stream/index.js
1097
- var Kn = p((Af, Jn) => {
1098
- "use strict";
1099
- var C = /* @__PURE__ */ o((e) => e !== null && typeof e == "object" && typeof e.pipe == "function", "isStream");
1100
- C.writable = (e) => C(e) && e.writable !== !1 && typeof e._write == "function" && typeof e._writableState == "object";
1101
- C.readable = (e) => C(e) && e.readable !== !1 && typeof e._read == "function" && typeof e._readableState == "object";
1102
- C.duplex = (e) => C.writable(e) && C.readable(e);
1103
- C.transform = (e) => C.duplex(e) && typeof e._transform == "function";
1104
- Jn.exports = C;
1105
- });
1106
-
1107
- // ../node_modules/get-stream/buffer-stream.js
1108
- var Xn = p((_f, Yn) => {
1109
- "use strict";
1110
- var { PassThrough: Ha } = require("stream");
1111
- Yn.exports = (e) => {
1112
- e = { ...e };
1113
- let { array: t } = e, { encoding: r } = e, n = r === "buffer", i = !1;
1114
- t ? i = !(r || n) : r = r || "utf8", n && (r = null);
1115
- let s = new Ha({ objectMode: i });
1116
- r && s.setEncoding(r);
1117
- let a = 0, c = [];
1118
- return s.on("data", (u) => {
1119
- c.push(u), i ? a = c.length : a += u.length;
1120
- }), s.getBufferedValue = () => t ? c : n ? Buffer.concat(c, a) : c.join(""), s.getBufferedLength = () => a, s;
1121
- };
1122
- });
1123
-
1124
- // ../node_modules/get-stream/index.js
1125
- var Qn = p((Gf, oe) => {
1126
- "use strict";
1127
- var { constants: Va } = require("buffer"), za = require("stream"), { promisify: Ja } = require("util"), Ka = Xn(), Ya = Ja(za.pipeline), Re = class extends Error {
1128
- static {
1129
- o(this, "MaxBufferError");
1130
- }
1131
- constructor() {
1132
- super("maxBuffer exceeded"), this.name = "MaxBufferError";
1133
- }
1134
- };
1135
- async function _t(e, t) {
1136
- if (!e)
1137
- throw new Error("Expected a stream");
1138
- t = {
1139
- maxBuffer: 1 / 0,
1140
- ...t
1141
- };
1142
- let { maxBuffer: r } = t, n = Ka(t);
1143
- return await new Promise((i, s) => {
1144
- let a = /* @__PURE__ */ o((c) => {
1145
- c && n.getBufferedLength() <= Va.MAX_LENGTH && (c.bufferedData = n.getBufferedValue()), s(c);
1146
- }, "rejectPromise");
1147
- (async () => {
1148
- try {
1149
- await Ya(e, n), i();
1150
- } catch (c) {
1151
- a(c);
1152
- }
1153
- })(), n.on("data", () => {
1154
- n.getBufferedLength() > r && a(new Re());
1155
- });
1156
- }), n.getBufferedValue();
1157
- }
1158
- o(_t, "getStream");
1159
- oe.exports = _t;
1160
- oe.exports.buffer = (e, t) => _t(e, { ...t, encoding: "buffer" });
1161
- oe.exports.array = (e, t) => _t(e, { ...t, array: !0 });
1162
- oe.exports.MaxBufferError = Re;
447
+ var Ur = require("child_process"), Xe = Lr(), Qe = Gr();
448
+ function $r(e, t, r) {
449
+ let n = Xe(e, t, r), i = Ur.spawn(n.command, n.args, n.options);
450
+ return Qe.hookChildProcess(i, n), i;
451
+ }
452
+ o($r, "spawn");
453
+ function Mi(e, t, r) {
454
+ let n = Xe(e, t, r), i = Ur.spawnSync(n.command, n.args, n.options);
455
+ return i.error = i.error || Qe.verifyENOENTSync(i.status, n), i;
456
+ }
457
+ o(Mi, "spawnSync");
458
+ _.exports = $r;
459
+ _.exports.spawn = $r;
460
+ _.exports.sync = Mi;
461
+ _.exports._parse = Xe;
462
+ _.exports._enoent = Qe;
1163
463
  });
1164
464
 
1165
465
  // ../node_modules/merge-stream/index.js
1166
- var Gt = p((Nf, Zn) => {
466
+ var En = w((Iu, kn) => {
1167
467
  "use strict";
1168
- var { PassThrough: Xa } = require("stream");
1169
- Zn.exports = function() {
1170
- var e = [], t = new Xa({ objectMode: !0 });
468
+ var { PassThrough: Ts } = require("stream");
469
+ kn.exports = function() {
470
+ var e = [], t = new Ts({ objectMode: !0 });
1171
471
  return t.setMaxListeners(0), t.add = r, t.isEmpty = n, t.on("unpipe", i), Array.prototype.slice.call(arguments).forEach(r), t;
1172
472
  function r(s) {
1173
473
  return Array.isArray(s) ? (s.forEach(r), this) : (e.push(s), s.once("end", i.bind(null, s)), s.once("error", t.emit.bind(t, "error")),
@@ -1187,383 +487,24 @@ var Gt = p((Nf, Zn) => {
1187
487
  };
1188
488
  });
1189
489
 
1190
- // ../node_modules/execa/lib/stream.js
1191
- var no = p((Df, ro) => {
1192
- "use strict";
1193
- var to = Kn(), eo = Qn(), Qa = Gt(), Za = /* @__PURE__ */ o((e, t) => {
1194
- t === void 0 || e.stdin === void 0 || (to(t) ? t.pipe(e.stdin) : e.stdin.end(t));
1195
- }, "handleInput"), ec = /* @__PURE__ */ o((e, { all: t }) => {
1196
- if (!t || !e.stdout && !e.stderr)
1197
- return;
1198
- let r = Qa();
1199
- return e.stdout && r.add(e.stdout), e.stderr && r.add(e.stderr), r;
1200
- }, "makeAllStream"), jt = /* @__PURE__ */ o(async (e, t) => {
1201
- if (e) {
1202
- e.destroy();
1203
- try {
1204
- return await t;
1205
- } catch (r) {
1206
- return r.bufferedData;
1207
- }
1208
- }
1209
- }, "getBufferedData"), Nt = /* @__PURE__ */ o((e, { encoding: t, buffer: r, maxBuffer: n }) => {
1210
- if (!(!e || !r))
1211
- return t ? eo(e, { encoding: t, maxBuffer: n }) : eo.buffer(e, { maxBuffer: n });
1212
- }, "getStreamPromise"), tc = /* @__PURE__ */ o(async ({ stdout: e, stderr: t, all: r }, { encoding: n, buffer: i, maxBuffer: s }, a) => {
1213
- let c = Nt(e, { encoding: n, buffer: i, maxBuffer: s }), u = Nt(t, { encoding: n, buffer: i, maxBuffer: s }), l = Nt(r, { encoding: n, buffer: i,
1214
- maxBuffer: s * 2 });
1215
- try {
1216
- return await Promise.all([a, c, u, l]);
1217
- } catch (f) {
1218
- return Promise.all([
1219
- { error: f, signal: f.signal, timedOut: f.timedOut },
1220
- jt(e, c),
1221
- jt(t, u),
1222
- jt(r, l)
1223
- ]);
1224
- }
1225
- }, "getSpawnedResult"), rc = /* @__PURE__ */ o(({ input: e }) => {
1226
- if (to(e))
1227
- throw new TypeError("The `input` option cannot be a stream in sync mode");
1228
- }, "validateInputSync");
1229
- ro.exports = {
1230
- handleInput: Za,
1231
- makeAllStream: ec,
1232
- getSpawnedResult: tc,
1233
- validateInputSync: rc
1234
- };
1235
- });
1236
-
1237
- // ../node_modules/execa/lib/promise.js
1238
- var io = p((Lf, oo) => {
1239
- "use strict";
1240
- var nc = (async () => {
1241
- })().constructor.prototype, oc = ["then", "catch", "finally"].map((e) => [
1242
- e,
1243
- Reflect.getOwnPropertyDescriptor(nc, e)
1244
- ]), ic = /* @__PURE__ */ o((e, t) => {
1245
- for (let [r, n] of oc) {
1246
- let i = typeof t == "function" ? (...s) => Reflect.apply(n.value, t(), s) : n.value.bind(t);
1247
- Reflect.defineProperty(e, r, { ...n, value: i });
1248
- }
1249
- return e;
1250
- }, "mergePromise"), sc = /* @__PURE__ */ o((e) => new Promise((t, r) => {
1251
- e.on("exit", (n, i) => {
1252
- t({ exitCode: n, signal: i });
1253
- }), e.on("error", (n) => {
1254
- r(n);
1255
- }), e.stdin && e.stdin.on("error", (n) => {
1256
- r(n);
1257
- });
1258
- }), "getSpawnedPromise");
1259
- oo.exports = {
1260
- mergePromise: ic,
1261
- getSpawnedPromise: sc
1262
- };
1263
- });
1264
-
1265
- // ../node_modules/execa/lib/command.js
1266
- var co = p((Uf, ao) => {
1267
- "use strict";
1268
- var so = /* @__PURE__ */ o((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), ac = /^[\w.-]+$/, cc = /"/g, uc = /* @__PURE__ */ o(
1269
- (e) => typeof e != "string" || ac.test(e) ? e : `"${e.replace(cc, '\\"')}"`, "escapeArg"), lc = /* @__PURE__ */ o((e, t) => so(e, t).join(
1270
- " "), "joinCommand"), fc = /* @__PURE__ */ o((e, t) => so(e, t).map((r) => uc(r)).join(" "), "getEscapedCommand"), pc = / +/g, dc = /* @__PURE__ */ o(
1271
- (e) => {
1272
- let t = [];
1273
- for (let r of e.trim().split(pc)) {
1274
- let n = t[t.length - 1];
1275
- n && n.endsWith("\\") ? t[t.length - 1] = `${n.slice(0, -1)} ${r}` : t.push(r);
1276
- }
1277
- return t;
1278
- }, "parseCommand");
1279
- ao.exports = {
1280
- joinCommand: lc,
1281
- getEscapedCommand: fc,
1282
- parseCommand: dc
1283
- };
1284
- });
1285
-
1286
- // ../node_modules/execa/index.js
1287
- var yo = p((qf, J) => {
1288
- "use strict";
1289
- var mc = require("path"), Bt = require("child_process"), hc = kt(), yc = vn(), gc = Tn(), bc = On(), _e = Dn(), lo = Ln(), { spawnedKill: xc,
1290
- spawnedCancel: Sc, setupTimeout: wc, validateTimeout: vc, setExitHandler: Pc } = zn(), { handleInput: Ec, getSpawnedResult: Tc, makeAllStream: kc,
1291
- validateInputSync: Ic } = no(), { mergePromise: uo, getSpawnedPromise: Cc } = io(), { joinCommand: fo, parseCommand: po, getEscapedCommand: mo } = co(),
1292
- Oc = 1e3 * 1e3 * 100, Ac = /* @__PURE__ */ o(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
1293
- let s = t ? { ...process.env, ...e } : e;
1294
- return r ? gc.env({ env: s, cwd: n, execPath: i }) : s;
1295
- }, "getEnv"), ho = /* @__PURE__ */ o((e, t, r = {}) => {
1296
- let n = hc._parse(e, t, r);
1297
- return e = n.command, t = n.args, r = n.options, r = {
1298
- maxBuffer: Oc,
1299
- buffer: !0,
1300
- stripFinalNewline: !0,
1301
- extendEnv: !0,
1302
- preferLocal: !1,
1303
- localDir: r.cwd || process.cwd(),
1304
- execPath: process.execPath,
1305
- encoding: "utf8",
1306
- reject: !0,
1307
- cleanup: !0,
1308
- all: !1,
1309
- windowsHide: !0,
1310
- ...r
1311
- }, r.env = Ac(r), r.stdio = lo(r), process.platform === "win32" && mc.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e, args: t,
1312
- options: r, parsed: n };
1313
- }, "handleArguments"), ie = /* @__PURE__ */ o((e, t, r) => typeof t != "string" && !Buffer.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ?
1314
- yc(t) : t, "handleOutput"), Ge = /* @__PURE__ */ o((e, t, r) => {
1315
- let n = ho(e, t, r), i = fo(e, t), s = mo(e, t);
1316
- vc(n.options);
1317
- let a;
1318
- try {
1319
- a = Bt.spawn(n.file, n.args, n.options);
1320
- } catch (m) {
1321
- let y = new Bt.ChildProcess(), h = Promise.reject(_e({
1322
- error: m,
1323
- stdout: "",
1324
- stderr: "",
1325
- all: "",
1326
- command: i,
1327
- escapedCommand: s,
1328
- parsed: n,
1329
- timedOut: !1,
1330
- isCanceled: !1,
1331
- killed: !1
1332
- }));
1333
- return uo(y, h);
1334
- }
1335
- let c = Cc(a), u = wc(a, n.options, c), l = Pc(a, n.options, u), f = { isCanceled: !1 };
1336
- a.kill = xc.bind(null, a.kill.bind(a)), a.cancel = Sc.bind(null, a, f);
1337
- let g = bc(/* @__PURE__ */ o(async () => {
1338
- let [{ error: m, exitCode: y, signal: h, timedOut: S }, k, E, O] = await Tc(a, n.options, l), _ = ie(n.options, k), G = ie(n.options, E),
1339
- d = ie(n.options, O);
1340
- if (m || y !== 0 || h !== null) {
1341
- let v = _e({
1342
- error: m,
1343
- exitCode: y,
1344
- signal: h,
1345
- stdout: _,
1346
- stderr: G,
1347
- all: d,
1348
- command: i,
1349
- escapedCommand: s,
1350
- parsed: n,
1351
- timedOut: S,
1352
- isCanceled: f.isCanceled,
1353
- killed: a.killed
1354
- });
1355
- if (!n.options.reject)
1356
- return v;
1357
- throw v;
1358
- }
1359
- return {
1360
- command: i,
1361
- escapedCommand: s,
1362
- exitCode: 0,
1363
- stdout: _,
1364
- stderr: G,
1365
- all: d,
1366
- failed: !1,
1367
- timedOut: !1,
1368
- isCanceled: !1,
1369
- killed: !1
1370
- };
1371
- }, "handlePromise"));
1372
- return Ec(a, n.options.input), a.all = kc(a, n.options), uo(a, g);
1373
- }, "execa");
1374
- J.exports = Ge;
1375
- J.exports.sync = (e, t, r) => {
1376
- let n = ho(e, t, r), i = fo(e, t), s = mo(e, t);
1377
- Ic(n.options);
1378
- let a;
1379
- try {
1380
- a = Bt.spawnSync(n.file, n.args, n.options);
1381
- } catch (l) {
1382
- throw _e({
1383
- error: l,
1384
- stdout: "",
1385
- stderr: "",
1386
- all: "",
1387
- command: i,
1388
- escapedCommand: s,
1389
- parsed: n,
1390
- timedOut: !1,
1391
- isCanceled: !1,
1392
- killed: !1
1393
- });
1394
- }
1395
- let c = ie(n.options, a.stdout, a.error), u = ie(n.options, a.stderr, a.error);
1396
- if (a.error || a.status !== 0 || a.signal !== null) {
1397
- let l = _e({
1398
- stdout: c,
1399
- stderr: u,
1400
- error: a.error,
1401
- signal: a.signal,
1402
- exitCode: a.status,
1403
- command: i,
1404
- escapedCommand: s,
1405
- parsed: n,
1406
- timedOut: a.error && a.error.code === "ETIMEDOUT",
1407
- isCanceled: !1,
1408
- killed: a.signal !== null
1409
- });
1410
- if (!n.options.reject)
1411
- return l;
1412
- throw l;
1413
- }
1414
- return {
1415
- command: i,
1416
- escapedCommand: s,
1417
- exitCode: 0,
1418
- stdout: c,
1419
- stderr: u,
1420
- failed: !1,
1421
- timedOut: !1,
1422
- isCanceled: !1,
1423
- killed: !1
1424
- };
1425
- };
1426
- J.exports.command = (e, t) => {
1427
- let [r, ...n] = po(e);
1428
- return Ge(r, n, t);
1429
- };
1430
- J.exports.commandSync = (e, t) => {
1431
- let [r, ...n] = po(e);
1432
- return Ge.sync(r, n, t);
1433
- };
1434
- J.exports.node = (e, t, r = {}) => {
1435
- t && !Array.isArray(t) && typeof t == "object" && (r = t, t = []);
1436
- let n = lo.node(r), i = process.execArgv.filter((c) => !c.startsWith("--inspect")), {
1437
- nodePath: s = process.execPath,
1438
- nodeOptions: a = i
1439
- } = r;
1440
- return Ge(
1441
- s,
1442
- [
1443
- ...a,
1444
- e,
1445
- ...Array.isArray(t) ? t : []
1446
- ],
1447
- {
1448
- ...r,
1449
- stdin: void 0,
1450
- stdout: void 0,
1451
- stderr: void 0,
1452
- stdio: n,
1453
- shell: !1
1454
- }
1455
- );
1456
- };
1457
- });
1458
-
1459
- // ../node_modules/detect-package-manager/dist/index.js
1460
- var So = p((xo) => {
1461
- var Rc = Object.create, Be = Object.defineProperty, _c = Object.getOwnPropertyDescriptor, Gc = Object.getOwnPropertyNames, jc = Object.getPrototypeOf,
1462
- Nc = Object.prototype.hasOwnProperty, go = /* @__PURE__ */ o((e) => Be(e, "__esModule", { value: !0 }), "__markAsModule"), Bc = /* @__PURE__ */ o(
1463
- (e, t) => {
1464
- go(e);
1465
- for (var r in t)
1466
- Be(e, r, { get: t[r], enumerable: !0 });
1467
- }, "__export"), Dc = /* @__PURE__ */ o((e, t, r) => {
1468
- if (t && typeof t == "object" || typeof t == "function")
1469
- for (let n of Gc(t))
1470
- !Nc.call(e, n) && n !== "default" && Be(e, n, { get: /* @__PURE__ */ o(() => t[n], "get"), enumerable: !(r = _c(t, n)) || r.enumerable });
1471
- return e;
1472
- }, "__reExport"), Mt = /* @__PURE__ */ o((e) => Dc(go(Be(e != null ? Rc(jc(e)) : {}, "default", e && e.__esModule && "default" in e ? { get: /* @__PURE__ */ o(
1473
- () => e.default, "get"), enumerable: !0 } : { value: e, enumerable: !0 })), e), "__toModule");
1474
- Bc(xo, {
1475
- clearCache: /* @__PURE__ */ o(() => $c, "clearCache"),
1476
- detect: /* @__PURE__ */ o(() => Fc, "detect"),
1477
- getNpmVersion: /* @__PURE__ */ o(() => Uc, "getNpmVersion")
1478
- });
1479
- var Mc = Mt(require("fs")), je = Mt(require("path")), bo = Mt(yo());
1480
- async function Ne(e) {
1481
- try {
1482
- return await Mc.promises.access(e), !0;
1483
- } catch {
1484
- return !1;
1485
- }
1486
- }
1487
- o(Ne, "pathExists");
1488
- var B = /* @__PURE__ */ new Map();
1489
- function Dt(e) {
1490
- let t = `has_global_${e}`;
1491
- return B.has(t) ? Promise.resolve(B.get(t)) : (0, bo.default)(e, ["--version"]).then((r) => /^\d+.\d+.\d+$/.test(r.stdout)).then((r) => (B.
1492
- set(t, r), r)).catch(() => !1);
1493
- }
1494
- o(Dt, "hasGlobalInstallation");
1495
- function Lc(e = ".") {
1496
- let t = `lockfile_${e}`;
1497
- return B.has(t) ? Promise.resolve(B.get(t)) : Promise.all([
1498
- Ne((0, je.resolve)(e, "yarn.lock")),
1499
- Ne((0, je.resolve)(e, "package-lock.json")),
1500
- Ne((0, je.resolve)(e, "pnpm-lock.yaml")),
1501
- Ne((0, je.resolve)(e, "bun.lockb"))
1502
- ]).then(([r, n, i, s]) => {
1503
- let a = null;
1504
- return r ? a = "yarn" : i ? a = "pnpm" : s ? a = "bun" : n && (a = "npm"), B.set(t, a), a;
1505
- });
1506
- }
1507
- o(Lc, "getTypeofLockFile");
1508
- var Fc = /* @__PURE__ */ o(async ({
1509
- cwd: e,
1510
- includeGlobalBun: t
1511
- } = {}) => {
1512
- let r = await Lc(e);
1513
- if (r)
1514
- return r;
1515
- let [n, i, s] = await Promise.all([
1516
- Dt("yarn"),
1517
- Dt("pnpm"),
1518
- t && Dt("bun")
1519
- ]);
1520
- return n ? "yarn" : i ? "pnpm" : s ? "bun" : "npm";
1521
- }, "detect");
1522
- function Uc(e) {
1523
- return (0, bo.default)(e || "npm", ["--version"]).then((t) => t.stdout);
1524
- }
1525
- o(Uc, "getNpmVersion");
1526
- function $c() {
1527
- return B.clear();
1528
- }
1529
- o($c, "clearCache");
1530
- });
1531
-
1532
- // ../node_modules/walk-up-path/dist/cjs/index.js
1533
- var vo = p((De) => {
1534
- "use strict";
1535
- Object.defineProperty(De, "__esModule", { value: !0 });
1536
- De.walkUp = void 0;
1537
- var wo = require("path"), qc = /* @__PURE__ */ o(function* (e) {
1538
- for (e = (0, wo.resolve)(e); e; ) {
1539
- yield e;
1540
- let t = (0, wo.dirname)(e);
1541
- if (t === e)
1542
- break;
1543
- e = t;
1544
- }
1545
- }, "walkUp");
1546
- De.walkUp = qc;
1547
- });
1548
-
1549
490
  // ../node_modules/common-path-prefix/index.js
1550
- var Gi = p((Wd, _i) => {
491
+ var Zn = w((uf, Qn) => {
1551
492
  "use strict";
1552
- var { sep: zu } = require("path"), Ju = /* @__PURE__ */ o((e) => {
493
+ var { sep: Gs } = require("path"), Us = /* @__PURE__ */ o((e) => {
1553
494
  for (let t of e) {
1554
495
  let r = /(\/|\\)/.exec(t);
1555
496
  if (r !== null) return r[0];
1556
497
  }
1557
- return zu;
498
+ return Gs;
1558
499
  }, "determineSeparator");
1559
- _i.exports = /* @__PURE__ */ o(function(t, r = Ju(t)) {
500
+ Qn.exports = /* @__PURE__ */ o(function(t, r = Us(t)) {
1560
501
  let [n = "", ...i] = t;
1561
502
  if (n === "" || i.length === 0) return "";
1562
503
  let s = n.split(r), a = s.length;
1563
504
  for (let u of i) {
1564
- let l = u.split(r);
1565
- for (let f = 0; f < a; f++)
1566
- l[f] !== s[f] && (a = f);
505
+ let f = u.split(r);
506
+ for (let l = 0; l < a; l++)
507
+ f[l] !== s[l] && (a = l);
1567
508
  if (a === 0) return "";
1568
509
  }
1569
510
  let c = s.slice(0, a).join(r);
@@ -1572,19 +513,19 @@ var Gi = p((Wd, _i) => {
1572
513
  });
1573
514
 
1574
515
  // ../node_modules/fetch-retry/index.js
1575
- var ds = p((Wh, ps) => {
516
+ var Do = w((fp, No) => {
1576
517
  "use strict";
1577
- ps.exports = function(e, t) {
518
+ No.exports = function(e, t) {
1578
519
  if (t = t || {}, typeof e != "function")
1579
- throw new R("fetch must be a function");
520
+ throw new C("fetch must be a function");
1580
521
  if (typeof t != "object")
1581
- throw new R("defaults must be an object");
1582
- if (t.retries !== void 0 && !at(t.retries))
1583
- throw new R("retries must be a positive integer");
1584
- if (t.retryDelay !== void 0 && !at(t.retryDelay) && typeof t.retryDelay != "function")
1585
- throw new R("retryDelay must be a positive integer or a function returning a positive integer");
522
+ throw new C("defaults must be an object");
523
+ if (t.retries !== void 0 && !Ae(t.retries))
524
+ throw new C("retries must be a positive integer");
525
+ if (t.retryDelay !== void 0 && !Ae(t.retryDelay) && typeof t.retryDelay != "function")
526
+ throw new C("retryDelay must be a positive integer or a function returning a positive integer");
1586
527
  if (t.retryOn !== void 0 && !Array.isArray(t.retryOn) && typeof t.retryOn != "function")
1587
- throw new R("retryOn property expects an array or function");
528
+ throw new C("retryOn property expects an array or function");
1588
529
  var r = {
1589
530
  retries: 3,
1590
531
  retryDelay: 1e3,
@@ -1593,295 +534,418 @@ var ds = p((Wh, ps) => {
1593
534
  return t = Object.assign(r, t), /* @__PURE__ */ o(function(i, s) {
1594
535
  var a = t.retries, c = t.retryDelay, u = t.retryOn;
1595
536
  if (s && s.retries !== void 0)
1596
- if (at(s.retries))
537
+ if (Ae(s.retries))
1597
538
  a = s.retries;
1598
539
  else
1599
- throw new R("retries must be a positive integer");
540
+ throw new C("retries must be a positive integer");
1600
541
  if (s && s.retryDelay !== void 0)
1601
- if (at(s.retryDelay) || typeof s.retryDelay == "function")
542
+ if (Ae(s.retryDelay) || typeof s.retryDelay == "function")
1602
543
  c = s.retryDelay;
1603
544
  else
1604
- throw new R("retryDelay must be a positive integer or a function returning a positive integer");
545
+ throw new C("retryDelay must be a positive integer or a function returning a positive integer");
1605
546
  if (s && s.retryOn)
1606
547
  if (Array.isArray(s.retryOn) || typeof s.retryOn == "function")
1607
548
  u = s.retryOn;
1608
549
  else
1609
- throw new R("retryOn property expects an array or function");
1610
- return new Promise(function(l, f) {
1611
- var x = /* @__PURE__ */ o(function(m) {
1612
- var y = typeof Request < "u" && i instanceof Request ? i.clone() : i;
1613
- e(y, s).then(function(h) {
1614
- if (Array.isArray(u) && u.indexOf(h.status) === -1)
1615
- l(h);
550
+ throw new C("retryOn property expects an array or function");
551
+ return new Promise(function(f, l) {
552
+ var y = /* @__PURE__ */ o(function(h) {
553
+ var b = typeof Request < "u" && i instanceof Request ? i.clone() : i;
554
+ e(b, s).then(function(m) {
555
+ if (Array.isArray(u) && u.indexOf(m.status) === -1)
556
+ f(m);
1616
557
  else if (typeof u == "function")
1617
558
  try {
1618
- return Promise.resolve(u(m, null, h)).then(function(S) {
1619
- S ? g(m, null, h) : l(h);
1620
- }).catch(f);
1621
- } catch (S) {
1622
- f(S);
559
+ return Promise.resolve(u(h, null, m)).then(function(x) {
560
+ x ? g(h, null, m) : f(m);
561
+ }).catch(l);
562
+ } catch (x) {
563
+ l(x);
1623
564
  }
1624
565
  else
1625
- m < a ? g(m, null, h) : l(h);
1626
- }).catch(function(h) {
566
+ h < a ? g(h, null, m) : f(m);
567
+ }).catch(function(m) {
1627
568
  if (typeof u == "function")
1628
569
  try {
1629
- Promise.resolve(u(m, h, null)).then(function(S) {
1630
- S ? g(m, h, null) : f(h);
1631
- }).catch(function(S) {
1632
- f(S);
570
+ Promise.resolve(u(h, m, null)).then(function(x) {
571
+ x ? g(h, m, null) : l(m);
572
+ }).catch(function(x) {
573
+ l(x);
1633
574
  });
1634
- } catch (S) {
1635
- f(S);
575
+ } catch (x) {
576
+ l(x);
1636
577
  }
1637
- else m < a ? g(m, h, null) : f(h);
578
+ else h < a ? g(h, m, null) : l(m);
1638
579
  });
1639
580
  }, "wrappedFetch");
1640
- function g(m, y, h) {
1641
- var S = typeof c == "function" ? c(m, y, h) : c;
581
+ function g(h, b, m) {
582
+ var x = typeof c == "function" ? c(h, b, m) : c;
1642
583
  setTimeout(function() {
1643
- x(++m);
1644
- }, S);
584
+ y(++h);
585
+ }, x);
1645
586
  }
1646
- o(g, "retry"), x(0);
587
+ o(g, "retry"), y(0);
1647
588
  });
1648
589
  }, "fetchRetry");
1649
590
  };
1650
- function at(e) {
591
+ function Ae(e) {
1651
592
  return Number.isInteger(e) && e >= 0;
1652
593
  }
1653
- o(at, "isPositiveInteger");
1654
- function R(e) {
594
+ o(Ae, "isPositiveInteger");
595
+ function C(e) {
1655
596
  this.name = "ArgumentError", this.message = e;
1656
597
  }
1657
- o(R, "ArgumentError");
598
+ o(C, "ArgumentError");
1658
599
  });
1659
600
 
1660
601
  // src/telemetry/index.ts
1661
- var Il = {};
1662
- Gs(Il, {
1663
- addToGlobalContext: () => ks,
1664
- cleanPaths: () => F,
1665
- computeStorybookMetadata: () => fs,
1666
- getPrecedingUpgrade: () => vs,
1667
- getStorybookMetadata: () => Sr,
1668
- isExampleStoryId: () => Tl,
1669
- metaFrameworks: () => br,
1670
- oneWayHash: () => ct,
1671
- removeAnsiEscapeCodes: () => mt,
1672
- sanitizeAddonName: () => xr,
1673
- sanitizeError: () => ee,
1674
- telemetry: () => kl
602
+ var wa = {};
603
+ ei(wa, {
604
+ addToGlobalContext: () => qo,
605
+ cleanPaths: () => N,
606
+ computeStorybookMetadata: () => Ro,
607
+ getPrecedingUpgrade: () => Wo,
608
+ getStorybookMetadata: () => Nt,
609
+ isExampleStoryId: () => ba,
610
+ metaFrameworks: () => jt,
611
+ oneWayHash: () => Oe,
612
+ removeAnsiEscapeCodes: () => Me,
613
+ sanitizeAddonName: () => Rt,
614
+ sanitizeError: () => U,
615
+ telemetry: () => xa
1675
616
  });
1676
- module.exports = js(Il);
1677
- var kr = require("storybook/internal/node-logger");
617
+ module.exports = ti(wa);
618
+ var Bt = require("storybook/internal/node-logger");
1678
619
 
1679
620
  // src/telemetry/notify.ts
1680
- var dt = require("storybook/internal/common"), Se = b(Ar(), 1);
1681
- var Rr = "telemetry-notification-date", L = console, _r = /* @__PURE__ */ o(async () => {
1682
- await dt.cache.get(Rr, null) || (dt.cache.set(Rr, Date.now()), L.log(), L.log(
1683
- `${Se.default.magenta(
1684
- Se.default.bold("attention")
621
+ var _e = require("storybook/internal/common"), oe = d(Wt(), 1);
622
+ var Ht = "telemetry-notification-date", R = console, Jt = /* @__PURE__ */ o(async () => {
623
+ await _e.cache.get(Ht, null) || (_e.cache.set(Ht, Date.now()), R.log(), R.log(
624
+ `${oe.default.magenta(
625
+ oe.default.bold("attention")
1685
626
  )} => Storybook now collects completely anonymous telemetry regarding usage.`
1686
- ), L.log("This information is used to shape Storybook's roadmap and prioritize features."), L.log(
627
+ ), R.log("This information is used to shape Storybook's roadmap and prioritize features."), R.log(
1687
628
  "You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:"
1688
- ), L.log(Se.default.cyan("https://storybook.js.org/telemetry")), L.log());
629
+ ), R.log(oe.default.cyan("https://storybook.js.org/telemetry")), R.log());
1689
630
  }, "notify");
1690
631
 
1691
632
  // src/telemetry/sanitize.ts
1692
- var ht = b(require("node:path"), 1);
1693
- function Gr(e) {
633
+ var Le = d(require("node:path"), 1);
634
+ function Vt(e) {
1694
635
  return e.replace(/[-[/{}()*+?.\\^$|]/g, "\\$&");
1695
636
  }
1696
- o(Gr, "regexpEscape");
1697
- function mt(e = "") {
637
+ o(Vt, "regexpEscape");
638
+ function Me(e = "") {
1698
639
  return e.replace(/\u001B\[[0-9;]*m/g, "");
1699
640
  }
1700
- o(mt, "removeAnsiEscapeCodes");
1701
- function F(e, t = ht.default.sep) {
641
+ o(Me, "removeAnsiEscapeCodes");
642
+ function N(e, t = Le.default.sep) {
1702
643
  if (!e)
1703
644
  return e;
1704
645
  let r = process.cwd().split(t);
1705
646
  for (; r.length > 1; ) {
1706
- let n = r.join(t), i = new RegExp(Gr(n), "gi");
647
+ let n = r.join(t), i = new RegExp(Vt(n), "gi");
1707
648
  e = e.replace(i, "$SNIP");
1708
- let s = r.join(t + t), a = new RegExp(Gr(s), "gi");
649
+ let s = r.join(t + t), a = new RegExp(Vt(s), "gi");
1709
650
  e = e.replace(a, "$SNIP"), r.pop();
1710
651
  }
1711
652
  return e;
1712
653
  }
1713
- o(F, "cleanPaths");
1714
- function ee(e, t = ht.default.sep) {
654
+ o(N, "cleanPaths");
655
+ function U(e, t = Le.default.sep) {
1715
656
  try {
1716
657
  e = {
1717
658
  ...JSON.parse(JSON.stringify(e)),
1718
- message: mt(e.message),
1719
- stack: mt(e.stack),
659
+ message: Me(e.message),
660
+ stack: Me(e.stack),
1720
661
  cause: e.cause,
1721
662
  name: e.name
1722
663
  };
1723
- let r = F(JSON.stringify(e), t);
664
+ let r = N(JSON.stringify(e), t);
1724
665
  return JSON.parse(r);
1725
666
  } catch (r) {
1726
667
  return `Sanitization error: ${r?.message}`;
1727
668
  }
1728
669
  }
1729
- o(ee, "sanitizeError");
670
+ o(U, "sanitizeError");
1730
671
 
1731
672
  // src/telemetry/storybook-metadata.ts
1732
- var us = require("node:path"), A = require("storybook/internal/common"), ls = require("storybook/internal/csf-tools"), st = b(So(), 1);
673
+ var Oo = require("node:path"), P = require("storybook/internal/common"), jo = require("storybook/internal/csf-tools");
1733
674
 
1734
675
  // ../node_modules/fd-package-json/dist/esm/main.js
1735
- var Po = b(vo(), 1), Eo = require("node:path"), Me = require("node:fs/promises"), To = require("node:fs");
1736
- async function Wc(e) {
676
+ var Yt = d(zt(), 1), Kt = require("node:path"), se = require("node:fs/promises"), Xt = require("node:fs");
677
+ async function si(e) {
1737
678
  try {
1738
- return (await (0, Me.stat)(e)).isFile();
679
+ return (await (0, se.stat)(e)).isFile();
1739
680
  } catch {
1740
681
  return !1;
1741
682
  }
1742
683
  }
1743
- o(Wc, "fileExists");
1744
- async function Lt(e) {
1745
- for (let t of (0, Po.walkUp)(e)) {
1746
- let r = (0, Eo.resolve)(t, "package.json");
1747
- if (await Wc(r))
684
+ o(si, "fileExists");
685
+ async function Fe(e) {
686
+ for (let t of (0, Yt.walkUp)(e)) {
687
+ let r = (0, Kt.resolve)(t, "package.json");
688
+ if (await si(r))
1748
689
  return r;
1749
690
  }
1750
691
  return null;
1751
692
  }
1752
- o(Lt, "findPackagePath");
1753
- async function ko(e) {
1754
- let t = await Lt(e);
693
+ o(Fe, "findPackagePath");
694
+ async function Qt(e) {
695
+ let t = await Fe(e);
1755
696
  if (!t)
1756
697
  return null;
1757
698
  try {
1758
- let r = await (0, Me.readFile)(t, { encoding: "utf8" });
699
+ let r = await (0, se.readFile)(t, { encoding: "utf8" });
1759
700
  return JSON.parse(r);
1760
701
  } catch {
1761
702
  return null;
1762
703
  }
1763
704
  }
1764
- o(ko, "findPackage");
705
+ o(Qt, "findPackage");
706
+
707
+ // ../node_modules/package-manager-detector/dist/constants.mjs
708
+ var Zt = [
709
+ "npm",
710
+ "yarn",
711
+ "yarn@berry",
712
+ "pnpm",
713
+ "pnpm@6",
714
+ "bun",
715
+ "deno"
716
+ ], Be = {
717
+ "bun.lock": "bun",
718
+ "bun.lockb": "bun",
719
+ "deno.lock": "deno",
720
+ "pnpm-lock.yaml": "pnpm",
721
+ "yarn.lock": "yarn",
722
+ "package-lock.json": "npm",
723
+ "npm-shrinkwrap.json": "npm"
724
+ }, Ge = {
725
+ "node_modules/.deno/": "deno",
726
+ "node_modules/.pnpm/": "pnpm",
727
+ "node_modules/.yarn-state.yml": "yarn",
728
+ // yarn v2+ (node-modules)
729
+ "node_modules/.yarn_integrity": "yarn",
730
+ // yarn v1
731
+ "node_modules/.package-lock.json": "npm",
732
+ ".pnp.cjs": "yarn",
733
+ // yarn v3+ (pnp)
734
+ ".pnp.js": "yarn",
735
+ // yarn v2 (pnp)
736
+ "bun.lock": "bun",
737
+ "bun.lockb": "bun"
738
+ };
739
+
740
+ // ../node_modules/package-manager-detector/dist/detect.mjs
741
+ var $e = d(require("node:fs/promises"), 1), T = d(require("node:path"), 1), tr = d(require("node:process"), 1);
742
+ async function Ue(e, t) {
743
+ try {
744
+ let r = await $e.default.stat(e);
745
+ return t === "file" ? r.isFile() : r.isDirectory();
746
+ } catch {
747
+ return !1;
748
+ }
749
+ }
750
+ o(Ue, "pathExists");
751
+ function* ai(e = tr.default.cwd()) {
752
+ let t = T.default.resolve(e), { root: r } = T.default.parse(t);
753
+ for (; t && t !== r; )
754
+ yield t, t = T.default.dirname(t);
755
+ }
756
+ o(ai, "lookup");
757
+ async function er(e, t) {
758
+ return !e || !Ue(e, "file") ? null : await ui(e, t);
759
+ }
760
+ o(er, "parsePackageJson");
761
+ async function We(e = {}) {
762
+ let { cwd: t, strategies: r = ["lockfile", "packageManager-field", "devEngines-field"], onUnknown: n } = e;
763
+ for (let i of ai(t))
764
+ for (let s of r)
765
+ switch (s) {
766
+ case "lockfile": {
767
+ for (let a of Object.keys(Be))
768
+ if (await Ue(T.default.join(i, a), "file")) {
769
+ let c = Be[a], u = await er(T.default.join(i, "package.json"), n);
770
+ return u || { name: c, agent: c };
771
+ }
772
+ break;
773
+ }
774
+ case "packageManager-field":
775
+ case "devEngines-field": {
776
+ let a = await er(T.default.join(i, "package.json"), n);
777
+ if (a)
778
+ return a;
779
+ break;
780
+ }
781
+ case "install-metadata": {
782
+ for (let a of Object.keys(Ge)) {
783
+ let c = a.endsWith("/") ? "dir" : "file";
784
+ if (await Ue(T.default.join(i, a), c)) {
785
+ let u = Ge[a], f = u === "yarn" ? fi(a) ? "yarn" : "yarn@berry" : u;
786
+ return { name: u, agent: f };
787
+ }
788
+ }
789
+ break;
790
+ }
791
+ }
792
+ return null;
793
+ }
794
+ o(We, "detect");
795
+ function ci(e) {
796
+ let t = /* @__PURE__ */ o((r) => r?.match(/\d+(\.\d+){0,2}/)?.[0] ?? r, "handelVer");
797
+ if (typeof e.packageManager == "string") {
798
+ let [r, n] = e.packageManager.replace(/^\^/, "").split("@");
799
+ return { name: r, ver: t(n) };
800
+ }
801
+ if (typeof e.devEngines?.packageManager?.name == "string")
802
+ return {
803
+ name: e.devEngines.packageManager.name,
804
+ ver: t(e.devEngines.packageManager.version)
805
+ };
806
+ }
807
+ o(ci, "getNameAndVer");
808
+ async function ui(e, t) {
809
+ try {
810
+ let r = JSON.parse(await $e.default.readFile(e, "utf8")), n, i = ci(r);
811
+ if (i) {
812
+ let s = i.name, a = i.ver, c = a;
813
+ return s === "yarn" && a && Number.parseInt(a) > 1 ? (n = "yarn@berry", c = "berry", { name: s, agent: n, version: c }) : s === "pnpm" &&
814
+ a && Number.parseInt(a) < 7 ? (n = "pnpm@6", { name: s, agent: n, version: c }) : Zt.includes(s) ? (n = s, { name: s, agent: n, version: c }) :
815
+ t?.(r.packageManager) ?? null;
816
+ }
817
+ } catch {
818
+ }
819
+ return null;
820
+ }
821
+ o(ui, "handlePackageManager");
822
+ function fi(e) {
823
+ return e.endsWith(".yarn_integrity");
824
+ }
825
+ o(fi, "isMetadataYarnClassic");
826
+
827
+ // ../node_modules/package-manager-detector/dist/index.mjs
828
+ var La = require("node:fs/promises"), Fa = require("node:path"), Ba = require("node:process");
1765
829
 
1766
830
  // src/telemetry/get-application-file-count.ts
1767
- var Ki = require("node:path");
831
+ var ho = require("node:path");
1768
832
 
1769
833
  // src/telemetry/exec-command-count-lines.ts
1770
- var Ai = require("node:readline");
834
+ var Kn = require("node:readline");
1771
835
 
1772
- // node_modules/execa/index.js
1773
- var Pi = require("node:buffer"), Ei = b(require("node:path"), 1), Qe = b(require("node:child_process"), 1), ue = b(require("node:process"), 1),
1774
- Ti = b(kt(), 1);
836
+ // ../node_modules/execa/index.js
837
+ var Wn = require("node:buffer"), Hn = d(require("node:path"), 1), Se = d(require("node:child_process"), 1), J = d(require("node:process"), 1),
838
+ Jn = d(Wr(), 1);
1775
839
 
1776
840
  // ../node_modules/strip-final-newline/index.js
1777
- function Ft(e) {
841
+ function Ze(e) {
1778
842
  let t = typeof e == "string" ? `
1779
843
  ` : 10, r = typeof e == "string" ? "\r" : 13;
1780
844
  return e[e.length - 1] === t && (e = e.slice(0, -1)), e[e.length - 1] === r && (e = e.slice(0, -1)), e;
1781
845
  }
1782
- o(Ft, "stripFinalNewline");
846
+ o(Ze, "stripFinalNewline");
1783
847
 
1784
- // node_modules/npm-run-path/index.js
1785
- var se = b(require("node:process"), 1), K = b(require("node:path"), 1), Io = b(require("node:url"), 1);
848
+ // ../node_modules/execa/node_modules/npm-run-path/index.js
849
+ var $ = d(require("node:process"), 1), M = d(require("node:path"), 1), Hr = d(require("node:url"), 1);
1786
850
 
1787
- // node_modules/path-key/index.js
1788
- function Le(e = {}) {
851
+ // ../node_modules/execa/node_modules/path-key/index.js
852
+ function ce(e = {}) {
1789
853
  let {
1790
854
  env: t = process.env,
1791
855
  platform: r = process.platform
1792
856
  } = e;
1793
857
  return r !== "win32" ? "PATH" : Object.keys(t).reverse().find((n) => n.toUpperCase() === "PATH") || "Path";
1794
858
  }
1795
- o(Le, "pathKey");
859
+ o(ce, "pathKey");
1796
860
 
1797
- // node_modules/npm-run-path/index.js
1798
- function Hc(e = {}) {
861
+ // ../node_modules/execa/node_modules/npm-run-path/index.js
862
+ function Li(e = {}) {
1799
863
  let {
1800
- cwd: t = se.default.cwd(),
1801
- path: r = se.default.env[Le()],
1802
- execPath: n = se.default.execPath
1803
- } = e, i, s = t instanceof URL ? Io.default.fileURLToPath(t) : t, a = K.default.resolve(s), c = [];
864
+ cwd: t = $.default.cwd(),
865
+ path: r = $.default.env[ce()],
866
+ execPath: n = $.default.execPath
867
+ } = e, i, s = t instanceof URL ? Hr.default.fileURLToPath(t) : t, a = M.default.resolve(s), c = [];
1804
868
  for (; i !== a; )
1805
- c.push(K.default.join(a, "node_modules/.bin")), i = a, a = K.default.resolve(a, "..");
1806
- return c.push(K.default.resolve(s, n, "..")), [...c, r].join(K.default.delimiter);
869
+ c.push(M.default.join(a, "node_modules/.bin")), i = a, a = M.default.resolve(a, "..");
870
+ return c.push(M.default.resolve(s, n, "..")), [...c, r].join(M.default.delimiter);
1807
871
  }
1808
- o(Hc, "npmRunPath");
1809
- function Co({ env: e = se.default.env, ...t } = {}) {
872
+ o(Li, "npmRunPath");
873
+ function Jr({ env: e = $.default.env, ...t } = {}) {
1810
874
  e = { ...e };
1811
- let r = Le({ env: e });
1812
- return t.path = e[r], e[r] = Hc(t), e;
875
+ let r = ce({ env: e });
876
+ return t.path = e[r], e[r] = Li(t), e;
1813
877
  }
1814
- o(Co, "npmRunPathEnv");
878
+ o(Jr, "npmRunPathEnv");
1815
879
 
1816
- // node_modules/mimic-fn/index.js
1817
- var Vc = /* @__PURE__ */ o((e, t, r, n) => {
880
+ // ../node_modules/execa/node_modules/mimic-fn/index.js
881
+ var Fi = /* @__PURE__ */ o((e, t, r, n) => {
1818
882
  if (r === "length" || r === "prototype" || r === "arguments" || r === "caller")
1819
883
  return;
1820
884
  let i = Object.getOwnPropertyDescriptor(e, r), s = Object.getOwnPropertyDescriptor(t, r);
1821
- !zc(i, s) && n || Object.defineProperty(e, r, s);
1822
- }, "copyProperty"), zc = /* @__PURE__ */ o(function(e, t) {
885
+ !Bi(i, s) && n || Object.defineProperty(e, r, s);
886
+ }, "copyProperty"), Bi = /* @__PURE__ */ o(function(e, t) {
1823
887
  return e === void 0 || e.configurable || e.writable === t.writable && e.enumerable === t.enumerable && e.configurable === t.configurable &&
1824
888
  (e.writable || e.value === t.value);
1825
- }, "canCopyProperty"), Jc = /* @__PURE__ */ o((e, t) => {
889
+ }, "canCopyProperty"), Gi = /* @__PURE__ */ o((e, t) => {
1826
890
  let r = Object.getPrototypeOf(t);
1827
891
  r !== Object.getPrototypeOf(e) && Object.setPrototypeOf(e, r);
1828
- }, "changePrototype"), Kc = /* @__PURE__ */ o((e, t) => `/* Wrapped ${e}*/
1829
- ${t}`, "wrappedToString"), Yc = Object.getOwnPropertyDescriptor(Function.prototype, "toString"), Xc = Object.getOwnPropertyDescriptor(Function.
1830
- prototype.toString, "name"), Qc = /* @__PURE__ */ o((e, t, r) => {
1831
- let n = r === "" ? "" : `with ${r.trim()}() `, i = Kc.bind(null, n, t.toString());
1832
- Object.defineProperty(i, "name", Xc), Object.defineProperty(e, "toString", { ...Yc, value: i });
892
+ }, "changePrototype"), Ui = /* @__PURE__ */ o((e, t) => `/* Wrapped ${e}*/
893
+ ${t}`, "wrappedToString"), $i = Object.getOwnPropertyDescriptor(Function.prototype, "toString"), Wi = Object.getOwnPropertyDescriptor(Function.
894
+ prototype.toString, "name"), Hi = /* @__PURE__ */ o((e, t, r) => {
895
+ let n = r === "" ? "" : `with ${r.trim()}() `, i = Ui.bind(null, n, t.toString());
896
+ Object.defineProperty(i, "name", Wi), Object.defineProperty(e, "toString", { ...$i, value: i });
1833
897
  }, "changeToString");
1834
- function Ut(e, t, { ignoreNonConfigurable: r = !1 } = {}) {
898
+ function et(e, t, { ignoreNonConfigurable: r = !1 } = {}) {
1835
899
  let { name: n } = e;
1836
900
  for (let i of Reflect.ownKeys(t))
1837
- Vc(e, t, i, r);
1838
- return Jc(e, t), Qc(e, t, n), e;
901
+ Fi(e, t, i, r);
902
+ return Gi(e, t), Hi(e, t, n), e;
1839
903
  }
1840
- o(Ut, "mimicFunction");
904
+ o(et, "mimicFunction");
1841
905
 
1842
- // node_modules/onetime/index.js
1843
- var Fe = /* @__PURE__ */ new WeakMap(), Oo = /* @__PURE__ */ o((e, t = {}) => {
906
+ // ../node_modules/execa/node_modules/onetime/index.js
907
+ var ue = /* @__PURE__ */ new WeakMap(), Vr = /* @__PURE__ */ o((e, t = {}) => {
1844
908
  if (typeof e != "function")
1845
909
  throw new TypeError("Expected a function");
1846
910
  let r, n = 0, i = e.displayName || e.name || "<anonymous>", s = /* @__PURE__ */ o(function(...a) {
1847
- if (Fe.set(s, ++n), n === 1)
911
+ if (ue.set(s, ++n), n === 1)
1848
912
  r = e.apply(this, a), e = null;
1849
913
  else if (t.throw === !0)
1850
914
  throw new Error(`Function \`${i}\` can only be called once`);
1851
915
  return r;
1852
916
  }, "onetime");
1853
- return Ut(s, e), Fe.set(s, n), s;
917
+ return et(s, e), ue.set(s, n), s;
1854
918
  }, "onetime");
1855
- Oo.callCount = (e) => {
1856
- if (!Fe.has(e))
919
+ Vr.callCount = (e) => {
920
+ if (!ue.has(e))
1857
921
  throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);
1858
- return Fe.get(e);
922
+ return ue.get(e);
1859
923
  };
1860
- var Ao = Oo;
924
+ var qr = Vr;
1861
925
 
1862
- // node_modules/execa/lib/error.js
1863
- var Do = b(require("node:process"), 1);
926
+ // ../node_modules/execa/lib/error.js
927
+ var en = d(require("node:process"), 1);
1864
928
 
1865
- // node_modules/human-signals/build/src/main.js
1866
- var No = require("node:os");
929
+ // ../node_modules/execa/node_modules/human-signals/build/src/main.js
930
+ var Qr = require("node:os");
1867
931
 
1868
- // node_modules/human-signals/build/src/realtime.js
1869
- var Ro = /* @__PURE__ */ o(() => {
1870
- let e = $t - _o + 1;
1871
- return Array.from({ length: e }, Zc);
1872
- }, "getRealtimeSignals"), Zc = /* @__PURE__ */ o((e, t) => ({
932
+ // ../node_modules/execa/node_modules/human-signals/build/src/realtime.js
933
+ var zr = /* @__PURE__ */ o(() => {
934
+ let e = tt - Yr + 1;
935
+ return Array.from({ length: e }, Ji);
936
+ }, "getRealtimeSignals"), Ji = /* @__PURE__ */ o((e, t) => ({
1873
937
  name: `SIGRT${t + 1}`,
1874
- number: _o + t,
938
+ number: Yr + t,
1875
939
  action: "terminate",
1876
940
  description: "Application-specific signal (realtime)",
1877
941
  standard: "posix"
1878
- }), "getRealtimeSignal"), _o = 34, $t = 64;
942
+ }), "getRealtimeSignal"), Yr = 34, tt = 64;
1879
943
 
1880
- // node_modules/human-signals/build/src/signals.js
1881
- var jo = require("node:os");
944
+ // ../node_modules/execa/node_modules/human-signals/build/src/signals.js
945
+ var Xr = require("node:os");
1882
946
 
1883
- // node_modules/human-signals/build/src/core.js
1884
- var Go = [
947
+ // ../node_modules/execa/node_modules/human-signals/build/src/core.js
948
+ var Kr = [
1885
949
  {
1886
950
  name: "SIGHUP",
1887
951
  number: 1,
@@ -2153,11 +1217,11 @@ var Go = [
2153
1217
  }
2154
1218
  ];
2155
1219
 
2156
- // node_modules/human-signals/build/src/signals.js
2157
- var qt = /* @__PURE__ */ o(() => {
2158
- let e = Ro();
2159
- return [...Go, ...e].map(eu);
2160
- }, "getSignals"), eu = /* @__PURE__ */ o(({
1220
+ // ../node_modules/execa/node_modules/human-signals/build/src/signals.js
1221
+ var rt = /* @__PURE__ */ o(() => {
1222
+ let e = zr();
1223
+ return [...Kr, ...e].map(Vi);
1224
+ }, "getSignals"), Vi = /* @__PURE__ */ o(({
2161
1225
  name: e,
2162
1226
  number: t,
2163
1227
  description: r,
@@ -2167,15 +1231,15 @@ var qt = /* @__PURE__ */ o(() => {
2167
1231
  }) => {
2168
1232
  let {
2169
1233
  signals: { [e]: a }
2170
- } = jo.constants, c = a !== void 0;
1234
+ } = Xr.constants, c = a !== void 0;
2171
1235
  return { name: e, number: c ? a : t, description: r, supported: c, action: n, forced: i, standard: s };
2172
1236
  }, "normalizeSignal");
2173
1237
 
2174
- // node_modules/human-signals/build/src/main.js
2175
- var tu = /* @__PURE__ */ o(() => {
2176
- let e = qt();
2177
- return Object.fromEntries(e.map(ru));
2178
- }, "getSignalsByName"), ru = /* @__PURE__ */ o(({
1238
+ // ../node_modules/execa/node_modules/human-signals/build/src/main.js
1239
+ var qi = /* @__PURE__ */ o(() => {
1240
+ let e = rt();
1241
+ return Object.fromEntries(e.map(zi));
1242
+ }, "getSignalsByName"), zi = /* @__PURE__ */ o(({
2179
1243
  name: e,
2180
1244
  number: t,
2181
1245
  description: r,
@@ -2183,15 +1247,15 @@ var tu = /* @__PURE__ */ o(() => {
2183
1247
  action: i,
2184
1248
  forced: s,
2185
1249
  standard: a
2186
- }) => [e, { name: e, number: t, description: r, supported: n, action: i, forced: s, standard: a }], "getSignalByName"), Bo = tu(), nu = /* @__PURE__ */ o(
1250
+ }) => [e, { name: e, number: t, description: r, supported: n, action: i, forced: s, standard: a }], "getSignalByName"), Zr = qi(), Yi = /* @__PURE__ */ o(
2187
1251
  () => {
2188
- let e = qt(), t = $t + 1, r = Array.from(
1252
+ let e = rt(), t = tt + 1, r = Array.from(
2189
1253
  { length: t },
2190
- (n, i) => ou(i, e)
1254
+ (n, i) => Ki(i, e)
2191
1255
  );
2192
1256
  return Object.assign({}, ...r);
2193
- }, "getSignalsByNumber"), ou = /* @__PURE__ */ o((e, t) => {
2194
- let r = iu(e, t);
1257
+ }, "getSignalsByNumber"), Ki = /* @__PURE__ */ o((e, t) => {
1258
+ let r = Xi(e, t);
2195
1259
  if (r === void 0)
2196
1260
  return {};
2197
1261
  let { name: n, description: i, supported: s, action: a, forced: c, standard: u } = r;
@@ -2206,15 +1270,15 @@ var tu = /* @__PURE__ */ o(() => {
2206
1270
  standard: u
2207
1271
  }
2208
1272
  };
2209
- }, "getSignalByNumber"), iu = /* @__PURE__ */ o((e, t) => {
2210
- let r = t.find(({ name: n }) => No.constants.signals[n] === e);
1273
+ }, "getSignalByNumber"), Xi = /* @__PURE__ */ o((e, t) => {
1274
+ let r = t.find(({ name: n }) => Qr.constants.signals[n] === e);
2211
1275
  return r !== void 0 ? r : t.find((n) => n.number === e);
2212
- }, "findSignalByNumber"), bp = nu();
1276
+ }, "findSignalByNumber"), Dc = Yi();
2213
1277
 
2214
- // node_modules/execa/lib/error.js
2215
- var su = /* @__PURE__ */ o(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: s, isCanceled: a }) => e ? `\
1278
+ // ../node_modules/execa/lib/error.js
1279
+ var Qi = /* @__PURE__ */ o(({ timedOut: e, timeout: t, errorCode: r, signal: n, signalDescription: i, exitCode: s, isCanceled: a }) => e ? `\
2216
1280
  timed out after ${t} milliseconds` : a ? "was canceled" : r !== void 0 ? `failed with ${r}` : n !== void 0 ? `was killed with ${n} (${i})` :
2217
- s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"), ae = /* @__PURE__ */ o(({
1281
+ s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"), W = /* @__PURE__ */ o(({
2218
1282
  stdout: e,
2219
1283
  stderr: t,
2220
1284
  all: r,
@@ -2224,44 +1288,44 @@ s !== void 0 ? `failed with exit code ${s}` : "failed", "getErrorPrefix"), ae =
2224
1288
  command: a,
2225
1289
  escapedCommand: c,
2226
1290
  timedOut: u,
2227
- isCanceled: l,
2228
- killed: f,
2229
- parsed: { options: { timeout: x, cwd: g = Do.default.cwd() } }
1291
+ isCanceled: f,
1292
+ killed: l,
1293
+ parsed: { options: { timeout: y, cwd: g = en.default.cwd() } }
2230
1294
  }) => {
2231
1295
  s = s === null ? void 0 : s, i = i === null ? void 0 : i;
2232
- let m = i === void 0 ? void 0 : Bo[i].description, y = n && n.code, S = `Command ${su({ timedOut: u, timeout: x, errorCode: y, signal: i, signalDescription: m,
2233
- exitCode: s, isCanceled: l })}: ${a}`, k = Object.prototype.toString.call(n) === "[object Error]", E = k ? `${S}
2234
- ${n.message}` : S, O = [E, t, e].filter(Boolean).join(`
1296
+ let h = i === void 0 ? void 0 : Zr[i].description, b = n && n.code, x = `Command ${Qi({ timedOut: u, timeout: y, errorCode: b, signal: i, signalDescription: h,
1297
+ exitCode: s, isCanceled: f })}: ${a}`, O = Object.prototype.toString.call(n) === "[object Error]", v = O ? `${x}
1298
+ ${n.message}` : x, j = [v, t, e].filter(Boolean).join(`
2235
1299
  `);
2236
- return k ? (n.originalMessage = n.message, n.message = O) : n = new Error(O), n.shortMessage = E, n.command = a, n.escapedCommand = c, n.exitCode =
2237
- s, n.signal = i, n.signalDescription = m, n.stdout = e, n.stderr = t, n.cwd = g, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.
2238
- bufferedData, n.failed = !0, n.timedOut = !!u, n.isCanceled = l, n.killed = f && !u, n;
1300
+ return O ? (n.originalMessage = n.message, n.message = j) : n = new Error(j), n.shortMessage = v, n.command = a, n.escapedCommand = c, n.exitCode =
1301
+ s, n.signal = i, n.signalDescription = h, n.stdout = e, n.stderr = t, n.cwd = g, r !== void 0 && (n.all = r), "bufferedData" in n && delete n.
1302
+ bufferedData, n.failed = !0, n.timedOut = !!u, n.isCanceled = f, n.killed = l && !u, n;
2239
1303
  }, "makeError");
2240
1304
 
2241
- // node_modules/execa/lib/stdio.js
2242
- var Ue = ["stdin", "stdout", "stderr"], au = /* @__PURE__ */ o((e) => Ue.some((t) => e[t] !== void 0), "hasAlias"), Mo = /* @__PURE__ */ o((e) => {
1305
+ // ../node_modules/execa/lib/stdio.js
1306
+ var fe = ["stdin", "stdout", "stderr"], Zi = /* @__PURE__ */ o((e) => fe.some((t) => e[t] !== void 0), "hasAlias"), tn = /* @__PURE__ */ o((e) => {
2243
1307
  if (!e)
2244
1308
  return;
2245
1309
  let { stdio: t } = e;
2246
1310
  if (t === void 0)
2247
- return Ue.map((n) => e[n]);
2248
- if (au(e))
2249
- throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Ue.map((n) => `\`${n}\``).join(", ")}`);
1311
+ return fe.map((n) => e[n]);
1312
+ if (Zi(e))
1313
+ throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${fe.map((n) => `\`${n}\``).join(", ")}`);
2250
1314
  if (typeof t == "string")
2251
1315
  return t;
2252
1316
  if (!Array.isArray(t))
2253
1317
  throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);
2254
- let r = Math.max(t.length, Ue.length);
1318
+ let r = Math.max(t.length, fe.length);
2255
1319
  return Array.from({ length: r }, (n, i) => t[i]);
2256
1320
  }, "normalizeStdio");
2257
1321
 
2258
- // node_modules/execa/lib/kill.js
2259
- var Fo = b(require("node:os"), 1);
1322
+ // ../node_modules/execa/lib/kill.js
1323
+ var nn = d(require("node:os"), 1);
2260
1324
 
2261
- // node_modules/signal-exit/dist/mjs/signals.js
2262
- var D = [];
2263
- D.push("SIGHUP", "SIGINT", "SIGTERM");
2264
- process.platform !== "win32" && D.push(
1325
+ // ../node_modules/execa/node_modules/signal-exit/dist/mjs/signals.js
1326
+ var I = [];
1327
+ I.push("SIGHUP", "SIGINT", "SIGTERM");
1328
+ process.platform !== "win32" && I.push(
2265
1329
  "SIGALRM",
2266
1330
  "SIGABRT",
2267
1331
  "SIGVTALRM",
@@ -2276,12 +1340,12 @@ process.platform !== "win32" && D.push(
2276
1340
  // see #21
2277
1341
  // 'SIGPROF'
2278
1342
  );
2279
- process.platform === "linux" && D.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
1343
+ process.platform === "linux" && I.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
2280
1344
 
2281
- // node_modules/signal-exit/dist/mjs/index.js
2282
- var $e = /* @__PURE__ */ o((e) => !!e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.
1345
+ // ../node_modules/execa/node_modules/signal-exit/dist/mjs/index.js
1346
+ var le = /* @__PURE__ */ o((e) => !!e && typeof e == "object" && typeof e.removeListener == "function" && typeof e.emit == "function" && typeof e.
2283
1347
  reallyExit == "function" && typeof e.listeners == "function" && typeof e.kill == "function" && typeof e.pid == "number" && typeof e.on == "f\
2284
- unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis, cu = Object.defineProperty.bind(Object), Vt = class {
1348
+ unction", "processOk"), nt = Symbol.for("signal-exit emitter"), ot = globalThis, es = Object.defineProperty.bind(Object), it = class {
2285
1349
  static {
2286
1350
  o(this, "Emitter");
2287
1351
  }
@@ -2296,9 +1360,9 @@ unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis,
2296
1360
  count = 0;
2297
1361
  id = Math.random();
2298
1362
  constructor() {
2299
- if (Ht[Wt])
2300
- return Ht[Wt];
2301
- cu(Ht, Wt, {
1363
+ if (ot[nt])
1364
+ return ot[nt];
1365
+ es(ot, nt, {
2302
1366
  value: this,
2303
1367
  writable: !1,
2304
1368
  enumerable: !1,
@@ -2321,11 +1385,11 @@ unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis,
2321
1385
  i = s(r, n) === !0 || i;
2322
1386
  return t === "exit" && (i = this.emit("afterExit", r, n) || i), i;
2323
1387
  }
2324
- }, qe = class {
1388
+ }, pe = class {
2325
1389
  static {
2326
1390
  o(this, "SignalExitBase");
2327
1391
  }
2328
- }, uu = /* @__PURE__ */ o((e) => ({
1392
+ }, ts = /* @__PURE__ */ o((e) => ({
2329
1393
  onExit(t, r) {
2330
1394
  return e.onExit(t, r);
2331
1395
  },
@@ -2335,7 +1399,7 @@ unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis,
2335
1399
  unload() {
2336
1400
  return e.unload();
2337
1401
  }
2338
- }), "signalExitWrap"), zt = class extends qe {
1402
+ }), "signalExitWrap"), st = class extends pe {
2339
1403
  static {
2340
1404
  o(this, "SignalExitFallback");
2341
1405
  }
@@ -2347,16 +1411,16 @@ unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis,
2347
1411
  }
2348
1412
  unload() {
2349
1413
  }
2350
- }, Jt = class extends qe {
1414
+ }, at = class extends pe {
2351
1415
  static {
2352
1416
  o(this, "SignalExit");
2353
1417
  }
2354
1418
  // "SIGHUP" throws an `ENOSYS` error on Windows,
2355
1419
  // so use a supported signal instead
2356
1420
  /* c8 ignore start */
2357
- #s = Kt.platform === "win32" ? "SIGINT" : "SIGHUP";
1421
+ #s = ct.platform === "win32" ? "SIGINT" : "SIGHUP";
2358
1422
  /* c8 ignore stop */
2359
- #t = new Vt();
1423
+ #t = new it();
2360
1424
  #e;
2361
1425
  #o;
2362
1426
  #i;
@@ -2364,7 +1428,7 @@ unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis,
2364
1428
  #r = !1;
2365
1429
  constructor(t) {
2366
1430
  super(), this.#e = t, this.#n = {};
2367
- for (let r of D)
1431
+ for (let r of I)
2368
1432
  this.#n[r] = () => {
2369
1433
  let n = this.#e.listeners(r), { count: i } = this.#t, s = t;
2370
1434
  if (typeof s.__signal_exit_emitter__ == "object" && typeof s.__signal_exit_emitter__.count == "number" && (i += s.__signal_exit_emitter__.
@@ -2377,7 +1441,7 @@ unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis,
2377
1441
  this.#i = t.reallyExit, this.#o = t.emit;
2378
1442
  }
2379
1443
  onExit(t, r) {
2380
- if (!$e(this.#e))
1444
+ if (!le(this.#e))
2381
1445
  return () => {
2382
1446
  };
2383
1447
  this.#r === !1 && this.load();
@@ -2389,7 +1453,7 @@ unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis,
2389
1453
  load() {
2390
1454
  if (!this.#r) {
2391
1455
  this.#r = !0, this.#t.count += 1;
2392
- for (let t of D)
1456
+ for (let t of I)
2393
1457
  try {
2394
1458
  let r = this.#n[t];
2395
1459
  r && this.#e.on(t, r);
@@ -2399,7 +1463,7 @@ unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis,
2399
1463
  }
2400
1464
  }
2401
1465
  unload() {
2402
- this.#r && (this.#r = !1, D.forEach((t) => {
1466
+ this.#r && (this.#r = !1, I.forEach((t) => {
2403
1467
  let r = this.#n[t];
2404
1468
  if (!r)
2405
1469
  throw new Error("Listener not defined for signal: " + t);
@@ -2410,19 +1474,19 @@ unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis,
2410
1474
  }), this.#e.emit = this.#o, this.#e.reallyExit = this.#i, this.#t.count -= 1);
2411
1475
  }
2412
1476
  #a(t) {
2413
- return $e(this.#e) ? (this.#e.exitCode = t || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#i.call(this.#e, this.#e.exitCode)) :
1477
+ return le(this.#e) ? (this.#e.exitCode = t || 0, this.#t.emit("exit", this.#e.exitCode, null), this.#i.call(this.#e, this.#e.exitCode)) :
2414
1478
  0;
2415
1479
  }
2416
1480
  #c(t, ...r) {
2417
1481
  let n = this.#o;
2418
- if (t === "exit" && $e(this.#e)) {
1482
+ if (t === "exit" && le(this.#e)) {
2419
1483
  typeof r[0] == "number" && (this.#e.exitCode = r[0]);
2420
1484
  let i = n.call(this.#e, t, ...r);
2421
1485
  return this.#t.emit("exit", this.#e.exitCode, null), i;
2422
1486
  } else
2423
1487
  return n.call(this.#e, t, ...r);
2424
1488
  }
2425
- }, Kt = globalThis.process, {
1489
+ }, ct = globalThis.process, {
2426
1490
  /**
2427
1491
  * Called when the process is exiting, whether via signal, explicit
2428
1492
  * exit, or running out of stuff to do.
@@ -2432,7 +1496,7 @@ unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis,
2432
1496
  *
2433
1497
  * Returns a function that may be used to unload signal-exit.
2434
1498
  */
2435
- onExit: Lo,
1499
+ onExit: rn,
2436
1500
  /**
2437
1501
  * Load the listeners. Likely you never need to call this, unless
2438
1502
  * doing a rather deep integration with signal-exit functionality.
@@ -2440,7 +1504,7 @@ unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis,
2440
1504
  *
2441
1505
  * @internal
2442
1506
  */
2443
- load: Cp,
1507
+ load: Hc,
2444
1508
  /**
2445
1509
  * Unload the listeners. Likely you never need to call this, unless
2446
1510
  * doing a rather deep integration with signal-exit functionality.
@@ -2448,50 +1512,50 @@ unction", "processOk"), Wt = Symbol.for("signal-exit emitter"), Ht = globalThis,
2448
1512
  *
2449
1513
  * @internal
2450
1514
  */
2451
- unload: Op
2452
- } = uu($e(Kt) ? new Jt(Kt) : new zt());
1515
+ unload: Jc
1516
+ } = ts(le(ct) ? new at(ct) : new st());
2453
1517
 
2454
- // node_modules/execa/lib/kill.js
2455
- var lu = 1e3 * 5, Uo = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
1518
+ // ../node_modules/execa/lib/kill.js
1519
+ var rs = 1e3 * 5, on = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
2456
1520
  let n = e(t);
2457
- return fu(e, t, r, n), n;
2458
- }, "spawnedKill"), fu = /* @__PURE__ */ o((e, t, r, n) => {
2459
- if (!pu(t, r, n))
1521
+ return ns(e, t, r, n), n;
1522
+ }, "spawnedKill"), ns = /* @__PURE__ */ o((e, t, r, n) => {
1523
+ if (!os(t, r, n))
2460
1524
  return;
2461
- let i = mu(r), s = setTimeout(() => {
1525
+ let i = ss(r), s = setTimeout(() => {
2462
1526
  e("SIGKILL");
2463
1527
  }, i);
2464
1528
  s.unref && s.unref();
2465
- }, "setKillTimeout"), pu = /* @__PURE__ */ o((e, { forceKillAfterTimeout: t }, r) => du(e) && t !== !1 && r, "shouldForceKill"), du = /* @__PURE__ */ o(
2466
- (e) => e === Fo.default.constants.signals.SIGTERM || typeof e == "string" && e.toUpperCase() === "SIGTERM", "isSigterm"), mu = /* @__PURE__ */ o(
1529
+ }, "setKillTimeout"), os = /* @__PURE__ */ o((e, { forceKillAfterTimeout: t }, r) => is(e) && t !== !1 && r, "shouldForceKill"), is = /* @__PURE__ */ o(
1530
+ (e) => e === nn.default.constants.signals.SIGTERM || typeof e == "string" && e.toUpperCase() === "SIGTERM", "isSigterm"), ss = /* @__PURE__ */ o(
2467
1531
  ({ forceKillAfterTimeout: e = !0 }) => {
2468
1532
  if (e === !0)
2469
- return lu;
1533
+ return rs;
2470
1534
  if (!Number.isFinite(e) || e < 0)
2471
1535
  throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
2472
1536
  return e;
2473
- }, "getForceKillAfterTimeout"), $o = /* @__PURE__ */ o((e, t) => {
1537
+ }, "getForceKillAfterTimeout"), sn = /* @__PURE__ */ o((e, t) => {
2474
1538
  e.kill() && (t.isCanceled = !0);
2475
- }, "spawnedCancel"), hu = /* @__PURE__ */ o((e, t, r) => {
1539
+ }, "spawnedCancel"), as = /* @__PURE__ */ o((e, t, r) => {
2476
1540
  e.kill(t), r(Object.assign(new Error("Timed out"), { timedOut: !0, signal: t }));
2477
- }, "timeoutKill"), qo = /* @__PURE__ */ o((e, { timeout: t, killSignal: r = "SIGTERM" }, n) => {
1541
+ }, "timeoutKill"), an = /* @__PURE__ */ o((e, { timeout: t, killSignal: r = "SIGTERM" }, n) => {
2478
1542
  if (t === 0 || t === void 0)
2479
1543
  return n;
2480
1544
  let i, s = new Promise((c, u) => {
2481
1545
  i = setTimeout(() => {
2482
- hu(e, r, u);
1546
+ as(e, r, u);
2483
1547
  }, t);
2484
1548
  }), a = n.finally(() => {
2485
1549
  clearTimeout(i);
2486
1550
  });
2487
1551
  return Promise.race([s, a]);
2488
- }, "setupTimeout"), Wo = /* @__PURE__ */ o(({ timeout: e }) => {
1552
+ }, "setupTimeout"), cn = /* @__PURE__ */ o(({ timeout: e }) => {
2489
1553
  if (e !== void 0 && (!Number.isFinite(e) || e < 0))
2490
1554
  throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
2491
- }, "validateTimeout"), Ho = /* @__PURE__ */ o(async (e, { cleanup: t, detached: r }, n) => {
1555
+ }, "validateTimeout"), un = /* @__PURE__ */ o(async (e, { cleanup: t, detached: r }, n) => {
2492
1556
  if (!t || r)
2493
1557
  return n;
2494
- let i = Lo(() => {
1558
+ let i = rn(() => {
2495
1559
  e.kill();
2496
1560
  });
2497
1561
  return n.finally(() => {
@@ -2499,70 +1563,70 @@ var lu = 1e3 * 5, Uo = /* @__PURE__ */ o((e, t = "SIGTERM", r = {}) => {
2499
1563
  });
2500
1564
  }, "setExitHandler");
2501
1565
 
2502
- // node_modules/execa/lib/pipe.js
2503
- var Vo = require("node:fs"), zo = require("node:child_process");
1566
+ // ../node_modules/execa/lib/pipe.js
1567
+ var fn = require("node:fs"), ln = require("node:child_process");
2504
1568
 
2505
- // node_modules/is-stream/index.js
2506
- function We(e) {
1569
+ // ../node_modules/execa/node_modules/is-stream/index.js
1570
+ function me(e) {
2507
1571
  return e !== null && typeof e == "object" && typeof e.pipe == "function";
2508
1572
  }
2509
- o(We, "isStream");
2510
- function Yt(e) {
2511
- return We(e) && e.writable !== !1 && typeof e._write == "function" && typeof e._writableState == "object";
1573
+ o(me, "isStream");
1574
+ function ut(e) {
1575
+ return me(e) && e.writable !== !1 && typeof e._write == "function" && typeof e._writableState == "object";
2512
1576
  }
2513
- o(Yt, "isWritableStream");
1577
+ o(ut, "isWritableStream");
2514
1578
 
2515
- // node_modules/execa/lib/pipe.js
2516
- var yu = /* @__PURE__ */ o((e) => e instanceof zo.ChildProcess && typeof e.then == "function", "isExecaChildProcess"), Xt = /* @__PURE__ */ o(
1579
+ // ../node_modules/execa/lib/pipe.js
1580
+ var cs = /* @__PURE__ */ o((e) => e instanceof ln.ChildProcess && typeof e.then == "function", "isExecaChildProcess"), ft = /* @__PURE__ */ o(
2517
1581
  (e, t, r) => {
2518
1582
  if (typeof r == "string")
2519
- return e[t].pipe((0, Vo.createWriteStream)(r)), e;
2520
- if (Yt(r))
1583
+ return e[t].pipe((0, fn.createWriteStream)(r)), e;
1584
+ if (ut(r))
2521
1585
  return e[t].pipe(r), e;
2522
- if (!yu(r))
1586
+ if (!cs(r))
2523
1587
  throw new TypeError("The second argument must be a string, a stream or an Execa child process.");
2524
- if (!Yt(r.stdin))
1588
+ if (!ut(r.stdin))
2525
1589
  throw new TypeError("The target child process's stdin must be available.");
2526
1590
  return e[t].pipe(r.stdin), r;
2527
- }, "pipeToTarget"), Jo = /* @__PURE__ */ o((e) => {
2528
- e.stdout !== null && (e.pipeStdout = Xt.bind(void 0, e, "stdout")), e.stderr !== null && (e.pipeStderr = Xt.bind(void 0, e, "stderr")), e.
2529
- all !== void 0 && (e.pipeAll = Xt.bind(void 0, e, "all"));
1591
+ }, "pipeToTarget"), pn = /* @__PURE__ */ o((e) => {
1592
+ e.stdout !== null && (e.pipeStdout = ft.bind(void 0, e, "stdout")), e.stderr !== null && (e.pipeStderr = ft.bind(void 0, e, "stderr")), e.
1593
+ all !== void 0 && (e.pipeAll = ft.bind(void 0, e, "all"));
2530
1594
  }, "addPipeMethods");
2531
1595
 
2532
- // node_modules/execa/lib/stream.js
2533
- var Ye = require("node:fs"), oi = require("node:timers/promises");
1596
+ // ../node_modules/execa/lib/stream.js
1597
+ var xe = require("node:fs"), Pn = require("node:timers/promises");
2534
1598
 
2535
- // node_modules/get-stream/source/contents.js
2536
- var ce = /* @__PURE__ */ o(async (e, { init: t, convertChunk: r, getSize: n, truncateChunk: i, addChunk: s, getFinalChunk: a, finalize: c }, {
1599
+ // ../node_modules/execa/node_modules/get-stream/source/contents.js
1600
+ var H = /* @__PURE__ */ o(async (e, { init: t, convertChunk: r, getSize: n, truncateChunk: i, addChunk: s, getFinalChunk: a, finalize: c }, {
2537
1601
  maxBuffer: u = Number.POSITIVE_INFINITY } = {}) => {
2538
- if (!bu(e))
1602
+ if (!fs(e))
2539
1603
  throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
2540
- let l = t();
2541
- l.length = 0;
1604
+ let f = t();
1605
+ f.length = 0;
2542
1606
  try {
2543
- for await (let f of e) {
2544
- let x = xu(f), g = r[x](f, l);
2545
- Xo({ convertedChunk: g, state: l, getSize: n, truncateChunk: i, addChunk: s, maxBuffer: u });
1607
+ for await (let l of e) {
1608
+ let y = ls(l), g = r[y](l, f);
1609
+ yn({ convertedChunk: g, state: f, getSize: n, truncateChunk: i, addChunk: s, maxBuffer: u });
2546
1610
  }
2547
- return gu({ state: l, convertChunk: r, getSize: n, truncateChunk: i, addChunk: s, getFinalChunk: a, maxBuffer: u }), c(l);
2548
- } catch (f) {
2549
- throw f.bufferedData = c(l), f;
1611
+ return us({ state: f, convertChunk: r, getSize: n, truncateChunk: i, addChunk: s, getFinalChunk: a, maxBuffer: u }), c(f);
1612
+ } catch (l) {
1613
+ throw l.bufferedData = c(f), l;
2550
1614
  }
2551
- }, "getStreamContents"), gu = /* @__PURE__ */ o(({ state: e, getSize: t, truncateChunk: r, addChunk: n, getFinalChunk: i, maxBuffer: s }) => {
1615
+ }, "getStreamContents"), us = /* @__PURE__ */ o(({ state: e, getSize: t, truncateChunk: r, addChunk: n, getFinalChunk: i, maxBuffer: s }) => {
2552
1616
  let a = i(e);
2553
- a !== void 0 && Xo({ convertedChunk: a, state: e, getSize: t, truncateChunk: r, addChunk: n, maxBuffer: s });
2554
- }, "appendFinalChunk"), Xo = /* @__PURE__ */ o(({ convertedChunk: e, state: t, getSize: r, truncateChunk: n, addChunk: i, maxBuffer: s }) => {
1617
+ a !== void 0 && yn({ convertedChunk: a, state: e, getSize: t, truncateChunk: r, addChunk: n, maxBuffer: s });
1618
+ }, "appendFinalChunk"), yn = /* @__PURE__ */ o(({ convertedChunk: e, state: t, getSize: r, truncateChunk: n, addChunk: i, maxBuffer: s }) => {
2555
1619
  let a = r(e), c = t.length + a;
2556
1620
  if (c <= s) {
2557
- Ko(e, t, i, c);
1621
+ mn(e, t, i, c);
2558
1622
  return;
2559
1623
  }
2560
1624
  let u = n(e, s - t.length);
2561
- throw u !== void 0 && Ko(u, t, i, s), new He();
2562
- }, "appendChunk"), Ko = /* @__PURE__ */ o((e, t, r, n) => {
1625
+ throw u !== void 0 && mn(u, t, i, s), new de();
1626
+ }, "appendChunk"), mn = /* @__PURE__ */ o((e, t, r, n) => {
2563
1627
  t.contents = r(e, t, n), t.length = n;
2564
- }, "addNewChunk"), bu = /* @__PURE__ */ o((e) => typeof e == "object" && e !== null && typeof e[Symbol.asyncIterator] == "function", "isAsyn\
2565
- cIterable"), xu = /* @__PURE__ */ o((e) => {
1628
+ }, "addNewChunk"), fs = /* @__PURE__ */ o((e) => typeof e == "object" && e !== null && typeof e[Symbol.asyncIterator] == "function", "isAsyn\
1629
+ cIterable"), ls = /* @__PURE__ */ o((e) => {
2566
1630
  let t = typeof e;
2567
1631
  if (t === "string")
2568
1632
  return "string";
@@ -2570,10 +1634,10 @@ cIterable"), xu = /* @__PURE__ */ o((e) => {
2570
1634
  return "others";
2571
1635
  if (globalThis.Buffer?.isBuffer(e))
2572
1636
  return "buffer";
2573
- let r = Yo.call(e);
1637
+ let r = dn.call(e);
2574
1638
  return r === "[object ArrayBuffer]" ? "arrayBuffer" : r === "[object DataView]" ? "dataView" : Number.isInteger(e.byteLength) && Number.isInteger(
2575
- e.byteOffset) && Yo.call(e.buffer) === "[object ArrayBuffer]" ? "typedArray" : "others";
2576
- }, "getChunkType"), { toString: Yo } = Object.prototype, He = class extends Error {
1639
+ e.byteOffset) && dn.call(e.buffer) === "[object ArrayBuffer]" ? "typedArray" : "others";
1640
+ }, "getChunkType"), { toString: dn } = Object.prototype, de = class extends Error {
2577
1641
  static {
2578
1642
  o(this, "MaxBufferError");
2579
1643
  }
@@ -2583,151 +1647,151 @@ cIterable"), xu = /* @__PURE__ */ o((e) => {
2583
1647
  }
2584
1648
  };
2585
1649
 
2586
- // node_modules/get-stream/source/utils.js
2587
- var Qt = /* @__PURE__ */ o((e) => e, "identity"), Zt = /* @__PURE__ */ o(() => {
2588
- }, "noop"), er = /* @__PURE__ */ o(({ contents: e }) => e, "getContentsProp"), Ve = /* @__PURE__ */ o((e) => {
1650
+ // ../node_modules/execa/node_modules/get-stream/source/utils.js
1651
+ var lt = /* @__PURE__ */ o((e) => e, "identity"), pt = /* @__PURE__ */ o(() => {
1652
+ }, "noop"), mt = /* @__PURE__ */ o(({ contents: e }) => e, "getContentsProp"), ye = /* @__PURE__ */ o((e) => {
2589
1653
  throw new Error(`Streams in object mode are not supported: ${String(e)}`);
2590
- }, "throwObjectStream"), ze = /* @__PURE__ */ o((e) => e.length, "getLengthProp");
1654
+ }, "throwObjectStream"), he = /* @__PURE__ */ o((e) => e.length, "getLengthProp");
2591
1655
 
2592
- // node_modules/get-stream/source/array-buffer.js
2593
- async function tr(e, t) {
2594
- return ce(e, Cu, t);
1656
+ // ../node_modules/execa/node_modules/get-stream/source/array-buffer.js
1657
+ async function dt(e, t) {
1658
+ return H(e, ws, t);
2595
1659
  }
2596
- o(tr, "getStreamAsArrayBuffer");
2597
- var Su = /* @__PURE__ */ o(() => ({ contents: new ArrayBuffer(0) }), "initArrayBuffer"), wu = /* @__PURE__ */ o((e) => vu.encode(e), "useTex\
2598
- tEncoder"), vu = new TextEncoder(), Qo = /* @__PURE__ */ o((e) => new Uint8Array(e), "useUint8Array"), Zo = /* @__PURE__ */ o((e) => new Uint8Array(
2599
- e.buffer, e.byteOffset, e.byteLength), "useUint8ArrayWithOffset"), Pu = /* @__PURE__ */ o((e, t) => e.slice(0, t), "truncateArrayBufferChunk"),
2600
- Eu = /* @__PURE__ */ o((e, { contents: t, length: r }, n) => {
2601
- let i = ri() ? ku(t, n) : Tu(t, n);
1660
+ o(dt, "getStreamAsArrayBuffer");
1661
+ var ps = /* @__PURE__ */ o(() => ({ contents: new ArrayBuffer(0) }), "initArrayBuffer"), ms = /* @__PURE__ */ o((e) => ds.encode(e), "useTex\
1662
+ tEncoder"), ds = new TextEncoder(), hn = /* @__PURE__ */ o((e) => new Uint8Array(e), "useUint8Array"), gn = /* @__PURE__ */ o((e) => new Uint8Array(
1663
+ e.buffer, e.byteOffset, e.byteLength), "useUint8ArrayWithOffset"), ys = /* @__PURE__ */ o((e, t) => e.slice(0, t), "truncateArrayBufferChunk"),
1664
+ hs = /* @__PURE__ */ o((e, { contents: t, length: r }, n) => {
1665
+ let i = wn() ? bs(t, n) : gs(t, n);
2602
1666
  return new Uint8Array(i).set(e, r), i;
2603
- }, "addArrayBufferChunk"), Tu = /* @__PURE__ */ o((e, t) => {
1667
+ }, "addArrayBufferChunk"), gs = /* @__PURE__ */ o((e, t) => {
2604
1668
  if (t <= e.byteLength)
2605
1669
  return e;
2606
- let r = new ArrayBuffer(ti(t));
1670
+ let r = new ArrayBuffer(xn(t));
2607
1671
  return new Uint8Array(r).set(new Uint8Array(e), 0), r;
2608
- }, "resizeArrayBufferSlow"), ku = /* @__PURE__ */ o((e, t) => {
1672
+ }, "resizeArrayBufferSlow"), bs = /* @__PURE__ */ o((e, t) => {
2609
1673
  if (t <= e.maxByteLength)
2610
1674
  return e.resize(t), e;
2611
- let r = new ArrayBuffer(t, { maxByteLength: ti(t) });
1675
+ let r = new ArrayBuffer(t, { maxByteLength: xn(t) });
2612
1676
  return new Uint8Array(r).set(new Uint8Array(e), 0), r;
2613
- }, "resizeArrayBuffer"), ti = /* @__PURE__ */ o((e) => ei ** Math.ceil(Math.log(e) / Math.log(ei)), "getNewContentsLength"), ei = 2, Iu = /* @__PURE__ */ o(
2614
- ({ contents: e, length: t }) => ri() ? e : e.slice(0, t), "finalizeArrayBuffer"), ri = /* @__PURE__ */ o(() => "resize" in ArrayBuffer.prototype,
2615
- "hasArrayBufferResize"), Cu = {
2616
- init: Su,
1677
+ }, "resizeArrayBuffer"), xn = /* @__PURE__ */ o((e) => bn ** Math.ceil(Math.log(e) / Math.log(bn)), "getNewContentsLength"), bn = 2, xs = /* @__PURE__ */ o(
1678
+ ({ contents: e, length: t }) => wn() ? e : e.slice(0, t), "finalizeArrayBuffer"), wn = /* @__PURE__ */ o(() => "resize" in ArrayBuffer.prototype,
1679
+ "hasArrayBufferResize"), ws = {
1680
+ init: ps,
2617
1681
  convertChunk: {
2618
- string: wu,
2619
- buffer: Qo,
2620
- arrayBuffer: Qo,
2621
- dataView: Zo,
2622
- typedArray: Zo,
2623
- others: Ve
1682
+ string: ms,
1683
+ buffer: hn,
1684
+ arrayBuffer: hn,
1685
+ dataView: gn,
1686
+ typedArray: gn,
1687
+ others: ye
2624
1688
  },
2625
- getSize: ze,
2626
- truncateChunk: Pu,
2627
- addChunk: Eu,
2628
- getFinalChunk: Zt,
2629
- finalize: Iu
1689
+ getSize: he,
1690
+ truncateChunk: ys,
1691
+ addChunk: hs,
1692
+ getFinalChunk: pt,
1693
+ finalize: xs
2630
1694
  };
2631
1695
 
2632
- // node_modules/get-stream/source/buffer.js
2633
- async function Je(e, t) {
1696
+ // ../node_modules/execa/node_modules/get-stream/source/buffer.js
1697
+ async function ge(e, t) {
2634
1698
  if (!("Buffer" in globalThis))
2635
1699
  throw new Error("getStreamAsBuffer() is only supported in Node.js");
2636
1700
  try {
2637
- return ni(await tr(e, t));
1701
+ return Sn(await dt(e, t));
2638
1702
  } catch (r) {
2639
- throw r.bufferedData !== void 0 && (r.bufferedData = ni(r.bufferedData)), r;
1703
+ throw r.bufferedData !== void 0 && (r.bufferedData = Sn(r.bufferedData)), r;
2640
1704
  }
2641
1705
  }
2642
- o(Je, "getStreamAsBuffer");
2643
- var ni = /* @__PURE__ */ o((e) => globalThis.Buffer.from(e), "arrayBufferToNodeBuffer");
1706
+ o(ge, "getStreamAsBuffer");
1707
+ var Sn = /* @__PURE__ */ o((e) => globalThis.Buffer.from(e), "arrayBufferToNodeBuffer");
2644
1708
 
2645
- // node_modules/get-stream/source/string.js
2646
- async function rr(e, t) {
2647
- return ce(e, Gu, t);
1709
+ // ../node_modules/execa/node_modules/get-stream/source/string.js
1710
+ async function yt(e, t) {
1711
+ return H(e, vs, t);
2648
1712
  }
2649
- o(rr, "getStreamAsString");
2650
- var Ou = /* @__PURE__ */ o(() => ({ contents: "", textDecoder: new TextDecoder() }), "initString"), Ke = /* @__PURE__ */ o((e, { textDecoder: t }) => t.
2651
- decode(e, { stream: !0 }), "useTextDecoder"), Au = /* @__PURE__ */ o((e, { contents: t }) => t + e, "addStringChunk"), Ru = /* @__PURE__ */ o(
2652
- (e, t) => e.slice(0, t), "truncateStringChunk"), _u = /* @__PURE__ */ o(({ textDecoder: e }) => {
1713
+ o(yt, "getStreamAsString");
1714
+ var Ss = /* @__PURE__ */ o(() => ({ contents: "", textDecoder: new TextDecoder() }), "initString"), be = /* @__PURE__ */ o((e, { textDecoder: t }) => t.
1715
+ decode(e, { stream: !0 }), "useTextDecoder"), ks = /* @__PURE__ */ o((e, { contents: t }) => t + e, "addStringChunk"), Es = /* @__PURE__ */ o(
1716
+ (e, t) => e.slice(0, t), "truncateStringChunk"), Ps = /* @__PURE__ */ o(({ textDecoder: e }) => {
2653
1717
  let t = e.decode();
2654
1718
  return t === "" ? void 0 : t;
2655
- }, "getFinalStringChunk"), Gu = {
2656
- init: Ou,
1719
+ }, "getFinalStringChunk"), vs = {
1720
+ init: Ss,
2657
1721
  convertChunk: {
2658
- string: Qt,
2659
- buffer: Ke,
2660
- arrayBuffer: Ke,
2661
- dataView: Ke,
2662
- typedArray: Ke,
2663
- others: Ve
1722
+ string: lt,
1723
+ buffer: be,
1724
+ arrayBuffer: be,
1725
+ dataView: be,
1726
+ typedArray: be,
1727
+ others: ye
2664
1728
  },
2665
- getSize: ze,
2666
- truncateChunk: Ru,
2667
- addChunk: Au,
2668
- getFinalChunk: _u,
2669
- finalize: er
1729
+ getSize: he,
1730
+ truncateChunk: Es,
1731
+ addChunk: ks,
1732
+ getFinalChunk: Ps,
1733
+ finalize: mt
2670
1734
  };
2671
1735
 
2672
- // node_modules/execa/lib/stream.js
2673
- var ii = b(Gt(), 1);
2674
- var si = /* @__PURE__ */ o((e) => {
1736
+ // ../node_modules/execa/lib/stream.js
1737
+ var vn = d(En(), 1);
1738
+ var Tn = /* @__PURE__ */ o((e) => {
2675
1739
  if (e !== void 0)
2676
1740
  throw new TypeError("The `input` and `inputFile` options cannot be both set.");
2677
- }, "validateInputOptions"), ju = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (si(e), (0, Ye.readFileSync)(t)),
2678
- "getInputSync"), ai = /* @__PURE__ */ o((e) => {
2679
- let t = ju(e);
2680
- if (We(t))
1741
+ }, "validateInputOptions"), Cs = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (Tn(e), (0, xe.readFileSync)(t)),
1742
+ "getInputSync"), Cn = /* @__PURE__ */ o((e) => {
1743
+ let t = Cs(e);
1744
+ if (me(t))
2681
1745
  throw new TypeError("The `input` option cannot be a stream in sync mode");
2682
1746
  return t;
2683
- }, "handleInputSync"), Nu = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (si(e), (0, Ye.createReadStream)(t)),
2684
- "getInput"), ci = /* @__PURE__ */ o((e, t) => {
2685
- let r = Nu(t);
2686
- r !== void 0 && (We(r) ? r.pipe(e.stdin) : e.stdin.end(r));
2687
- }, "handleInput"), ui = /* @__PURE__ */ o((e, { all: t }) => {
1747
+ }, "handleInputSync"), Is = /* @__PURE__ */ o(({ input: e, inputFile: t }) => typeof t != "string" ? e : (Tn(e), (0, xe.createReadStream)(t)),
1748
+ "getInput"), In = /* @__PURE__ */ o((e, t) => {
1749
+ let r = Is(t);
1750
+ r !== void 0 && (me(r) ? r.pipe(e.stdin) : e.stdin.end(r));
1751
+ }, "handleInput"), An = /* @__PURE__ */ o((e, { all: t }) => {
2688
1752
  if (!t || !e.stdout && !e.stderr)
2689
1753
  return;
2690
- let r = (0, ii.default)();
1754
+ let r = (0, vn.default)();
2691
1755
  return e.stdout && r.add(e.stdout), e.stderr && r.add(e.stderr), r;
2692
- }, "makeAllStream"), nr = /* @__PURE__ */ o(async (e, t) => {
1756
+ }, "makeAllStream"), ht = /* @__PURE__ */ o(async (e, t) => {
2693
1757
  if (!(!e || t === void 0)) {
2694
- await (0, oi.setTimeout)(0), e.destroy();
1758
+ await (0, Pn.setTimeout)(0), e.destroy();
2695
1759
  try {
2696
1760
  return await t;
2697
1761
  } catch (r) {
2698
1762
  return r.bufferedData;
2699
1763
  }
2700
1764
  }
2701
- }, "getBufferedData"), or = /* @__PURE__ */ o((e, { encoding: t, buffer: r, maxBuffer: n }) => {
1765
+ }, "getBufferedData"), gt = /* @__PURE__ */ o((e, { encoding: t, buffer: r, maxBuffer: n }) => {
2702
1766
  if (!(!e || !r))
2703
- return t === "utf8" || t === "utf-8" ? rr(e, { maxBuffer: n }) : t === null || t === "buffer" ? Je(e, { maxBuffer: n }) : Bu(e, n, t);
2704
- }, "getStreamPromise"), Bu = /* @__PURE__ */ o(async (e, t, r) => (await Je(e, { maxBuffer: t })).toString(r), "applyEncoding"), li = /* @__PURE__ */ o(
1767
+ return t === "utf8" || t === "utf-8" ? yt(e, { maxBuffer: n }) : t === null || t === "buffer" ? ge(e, { maxBuffer: n }) : As(e, n, t);
1768
+ }, "getStreamPromise"), As = /* @__PURE__ */ o(async (e, t, r) => (await ge(e, { maxBuffer: t })).toString(r), "applyEncoding"), On = /* @__PURE__ */ o(
2705
1769
  async ({ stdout: e, stderr: t, all: r }, { encoding: n, buffer: i, maxBuffer: s }, a) => {
2706
- let c = or(e, { encoding: n, buffer: i, maxBuffer: s }), u = or(t, { encoding: n, buffer: i, maxBuffer: s }), l = or(r, { encoding: n, buffer: i,
1770
+ let c = gt(e, { encoding: n, buffer: i, maxBuffer: s }), u = gt(t, { encoding: n, buffer: i, maxBuffer: s }), f = gt(r, { encoding: n, buffer: i,
2707
1771
  maxBuffer: s * 2 });
2708
1772
  try {
2709
- return await Promise.all([a, c, u, l]);
2710
- } catch (f) {
1773
+ return await Promise.all([a, c, u, f]);
1774
+ } catch (l) {
2711
1775
  return Promise.all([
2712
- { error: f, signal: f.signal, timedOut: f.timedOut },
2713
- nr(e, c),
2714
- nr(t, u),
2715
- nr(r, l)
1776
+ { error: l, signal: l.signal, timedOut: l.timedOut },
1777
+ ht(e, c),
1778
+ ht(t, u),
1779
+ ht(r, f)
2716
1780
  ]);
2717
1781
  }
2718
1782
  }, "getSpawnedResult");
2719
1783
 
2720
- // node_modules/execa/lib/promise.js
2721
- var Du = (async () => {
2722
- })().constructor.prototype, Mu = ["then", "catch", "finally"].map((e) => [
1784
+ // ../node_modules/execa/lib/promise.js
1785
+ var Os = (async () => {
1786
+ })().constructor.prototype, js = ["then", "catch", "finally"].map((e) => [
2723
1787
  e,
2724
- Reflect.getOwnPropertyDescriptor(Du, e)
2725
- ]), ir = /* @__PURE__ */ o((e, t) => {
2726
- for (let [r, n] of Mu) {
1788
+ Reflect.getOwnPropertyDescriptor(Os, e)
1789
+ ]), bt = /* @__PURE__ */ o((e, t) => {
1790
+ for (let [r, n] of js) {
2727
1791
  let i = typeof t == "function" ? (...s) => Reflect.apply(n.value, t(), s) : n.value.bind(t);
2728
1792
  Reflect.defineProperty(e, r, { ...n, value: i });
2729
1793
  }
2730
- }, "mergePromise"), fi = /* @__PURE__ */ o((e) => new Promise((t, r) => {
1794
+ }, "mergePromise"), jn = /* @__PURE__ */ o((e) => new Promise((t, r) => {
2731
1795
  e.on("exit", (n, i) => {
2732
1796
  t({ exitCode: n, signal: i });
2733
1797
  }), e.on("error", (n) => {
@@ -2737,102 +1801,102 @@ var Du = (async () => {
2737
1801
  });
2738
1802
  }), "getSpawnedPromise");
2739
1803
 
2740
- // node_modules/execa/lib/command.js
2741
- var mi = require("node:buffer"), hi = require("node:child_process");
2742
- var yi = /* @__PURE__ */ o((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), Lu = /^[\w.-]+$/, Fu = /* @__PURE__ */ o((e) => typeof e !=
2743
- "string" || Lu.test(e) ? e : `"${e.replaceAll('"', '\\"')}"`, "escapeArg"), sr = /* @__PURE__ */ o((e, t) => yi(e, t).join(" "), "joinComman\
2744
- d"), ar = /* @__PURE__ */ o((e, t) => yi(e, t).map((r) => Fu(r)).join(" "), "getEscapedCommand"), gi = / +/g, bi = /* @__PURE__ */ o((e) => {
1804
+ // ../node_modules/execa/lib/command.js
1805
+ var Dn = require("node:buffer"), _n = require("node:child_process");
1806
+ var Mn = /* @__PURE__ */ o((e, t = []) => Array.isArray(t) ? [e, ...t] : [e], "normalizeArgs"), Rs = /^[\w.-]+$/, Ns = /* @__PURE__ */ o((e) => typeof e !=
1807
+ "string" || Rs.test(e) ? e : `"${e.replaceAll('"', '\\"')}"`, "escapeArg"), xt = /* @__PURE__ */ o((e, t) => Mn(e, t).join(" "), "joinComman\
1808
+ d"), wt = /* @__PURE__ */ o((e, t) => Mn(e, t).map((r) => Ns(r)).join(" "), "getEscapedCommand"), Ln = / +/g, Fn = /* @__PURE__ */ o((e) => {
2745
1809
  let t = [];
2746
- for (let r of e.trim().split(gi)) {
1810
+ for (let r of e.trim().split(Ln)) {
2747
1811
  let n = t.at(-1);
2748
1812
  n && n.endsWith("\\") ? t[t.length - 1] = `${n.slice(0, -1)} ${r}` : t.push(r);
2749
1813
  }
2750
1814
  return t;
2751
- }, "parseCommand"), pi = /* @__PURE__ */ o((e) => {
1815
+ }, "parseCommand"), Rn = /* @__PURE__ */ o((e) => {
2752
1816
  let t = typeof e;
2753
1817
  if (t === "string")
2754
1818
  return e;
2755
1819
  if (t === "number")
2756
1820
  return String(e);
2757
- if (t === "object" && e !== null && !(e instanceof hi.ChildProcess) && "stdout" in e) {
1821
+ if (t === "object" && e !== null && !(e instanceof _n.ChildProcess) && "stdout" in e) {
2758
1822
  let r = typeof e.stdout;
2759
1823
  if (r === "string")
2760
1824
  return e.stdout;
2761
- if (mi.Buffer.isBuffer(e.stdout))
1825
+ if (Dn.Buffer.isBuffer(e.stdout))
2762
1826
  return e.stdout.toString();
2763
1827
  throw new TypeError(`Unexpected "${r}" stdout in template expression`);
2764
1828
  }
2765
1829
  throw new TypeError(`Unexpected "${t}" in template expression`);
2766
- }, "parseExpression"), di = /* @__PURE__ */ o((e, t, r) => r || e.length === 0 || t.length === 0 ? [...e, ...t] : [
1830
+ }, "parseExpression"), Nn = /* @__PURE__ */ o((e, t, r) => r || e.length === 0 || t.length === 0 ? [...e, ...t] : [
2767
1831
  ...e.slice(0, -1),
2768
1832
  `${e.at(-1)}${t[0]}`,
2769
1833
  ...t.slice(1)
2770
- ], "concatTokens"), Uu = /* @__PURE__ */ o(({ templates: e, expressions: t, tokens: r, index: n, template: i }) => {
2771
- let s = i ?? e.raw[n], a = s.split(gi).filter(Boolean), c = di(
1834
+ ], "concatTokens"), Ds = /* @__PURE__ */ o(({ templates: e, expressions: t, tokens: r, index: n, template: i }) => {
1835
+ let s = i ?? e.raw[n], a = s.split(Ln).filter(Boolean), c = Nn(
2772
1836
  r,
2773
1837
  a,
2774
1838
  s.startsWith(" ")
2775
1839
  );
2776
1840
  if (n === t.length)
2777
1841
  return c;
2778
- let u = t[n], l = Array.isArray(u) ? u.map((f) => pi(f)) : [pi(u)];
2779
- return di(
1842
+ let u = t[n], f = Array.isArray(u) ? u.map((l) => Rn(l)) : [Rn(u)];
1843
+ return Nn(
2780
1844
  c,
2781
- l,
1845
+ f,
2782
1846
  s.endsWith(" ")
2783
1847
  );
2784
- }, "parseTemplate"), cr = /* @__PURE__ */ o((e, t) => {
1848
+ }, "parseTemplate"), St = /* @__PURE__ */ o((e, t) => {
2785
1849
  let r = [];
2786
1850
  for (let [n, i] of e.entries())
2787
- r = Uu({ templates: e, expressions: t, tokens: r, index: n, template: i });
1851
+ r = Ds({ templates: e, expressions: t, tokens: r, index: n, template: i });
2788
1852
  return r;
2789
1853
  }, "parseTemplates");
2790
1854
 
2791
- // node_modules/execa/lib/verbose.js
2792
- var xi = require("node:util"), Si = b(require("node:process"), 1);
2793
- var wi = (0, xi.debuglog)("execa").enabled, Xe = /* @__PURE__ */ o((e, t) => String(e).padStart(t, "0"), "padField"), $u = /* @__PURE__ */ o(
1855
+ // ../node_modules/execa/lib/verbose.js
1856
+ var Bn = require("node:util"), Gn = d(require("node:process"), 1);
1857
+ var Un = (0, Bn.debuglog)("execa").enabled, we = /* @__PURE__ */ o((e, t) => String(e).padStart(t, "0"), "padField"), _s = /* @__PURE__ */ o(
2794
1858
  () => {
2795
1859
  let e = /* @__PURE__ */ new Date();
2796
- return `${Xe(e.getHours(), 2)}:${Xe(e.getMinutes(), 2)}:${Xe(e.getSeconds(), 2)}.${Xe(e.getMilliseconds(), 3)}`;
2797
- }, "getTimestamp"), ur = /* @__PURE__ */ o((e, { verbose: t }) => {
2798
- t && Si.default.stderr.write(`[${$u()}] ${e}
1860
+ return `${we(e.getHours(), 2)}:${we(e.getMinutes(), 2)}:${we(e.getSeconds(), 2)}.${we(e.getMilliseconds(), 3)}`;
1861
+ }, "getTimestamp"), kt = /* @__PURE__ */ o((e, { verbose: t }) => {
1862
+ t && Gn.default.stderr.write(`[${_s()}] ${e}
2799
1863
  `);
2800
1864
  }, "logCommand");
2801
1865
 
2802
- // node_modules/execa/index.js
2803
- var qu = 1e3 * 1e3 * 100, Wu = /* @__PURE__ */ o(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
2804
- let s = t ? { ...ue.default.env, ...e } : e;
2805
- return r ? Co({ env: s, cwd: n, execPath: i }) : s;
2806
- }, "getEnv"), ki = /* @__PURE__ */ o((e, t, r = {}) => {
2807
- let n = Ti.default._parse(e, t, r);
1866
+ // ../node_modules/execa/index.js
1867
+ var Ms = 1e3 * 1e3 * 100, Ls = /* @__PURE__ */ o(({ env: e, extendEnv: t, preferLocal: r, localDir: n, execPath: i }) => {
1868
+ let s = t ? { ...J.default.env, ...e } : e;
1869
+ return r ? Jr({ env: s, cwd: n, execPath: i }) : s;
1870
+ }, "getEnv"), Vn = /* @__PURE__ */ o((e, t, r = {}) => {
1871
+ let n = Jn.default._parse(e, t, r);
2808
1872
  return e = n.command, t = n.args, r = n.options, r = {
2809
- maxBuffer: qu,
1873
+ maxBuffer: Ms,
2810
1874
  buffer: !0,
2811
1875
  stripFinalNewline: !0,
2812
1876
  extendEnv: !0,
2813
1877
  preferLocal: !1,
2814
- localDir: r.cwd || ue.default.cwd(),
2815
- execPath: ue.default.execPath,
1878
+ localDir: r.cwd || J.default.cwd(),
1879
+ execPath: J.default.execPath,
2816
1880
  encoding: "utf8",
2817
1881
  reject: !0,
2818
1882
  cleanup: !0,
2819
1883
  all: !1,
2820
1884
  windowsHide: !0,
2821
- verbose: wi,
1885
+ verbose: Un,
2822
1886
  ...r
2823
- }, r.env = Wu(r), r.stdio = Mo(r), ue.default.platform === "win32" && Ei.default.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e,
1887
+ }, r.env = Ls(r), r.stdio = tn(r), J.default.platform === "win32" && Hn.default.basename(e, ".exe") === "cmd" && t.unshift("/q"), { file: e,
2824
1888
  args: t, options: r, parsed: n };
2825
- }, "handleArguments"), le = /* @__PURE__ */ o((e, t, r) => typeof t != "string" && !Pi.Buffer.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ?
2826
- Ft(t) : t, "handleOutput");
2827
- function Ii(e, t, r) {
2828
- let n = ki(e, t, r), i = sr(e, t), s = ar(e, t);
2829
- ur(s, n.options), Wo(n.options);
1889
+ }, "handleArguments"), V = /* @__PURE__ */ o((e, t, r) => typeof t != "string" && !Wn.Buffer.isBuffer(t) ? r === void 0 ? void 0 : "" : e.stripFinalNewline ?
1890
+ Ze(t) : t, "handleOutput");
1891
+ function qn(e, t, r) {
1892
+ let n = Vn(e, t, r), i = xt(e, t), s = wt(e, t);
1893
+ kt(s, n.options), cn(n.options);
2830
1894
  let a;
2831
1895
  try {
2832
- a = Qe.default.spawn(n.file, n.args, n.options);
2833
- } catch (m) {
2834
- let y = new Qe.default.ChildProcess(), h = Promise.reject(ae({
2835
- error: m,
1896
+ a = Se.default.spawn(n.file, n.args, n.options);
1897
+ } catch (h) {
1898
+ let b = new Se.default.ChildProcess(), m = Promise.reject(W({
1899
+ error: h,
2836
1900
  stdout: "",
2837
1901
  stderr: "",
2838
1902
  all: "",
@@ -2843,57 +1907,57 @@ function Ii(e, t, r) {
2843
1907
  isCanceled: !1,
2844
1908
  killed: !1
2845
1909
  }));
2846
- return ir(y, h), y;
2847
- }
2848
- let c = fi(a), u = qo(a, n.options, c), l = Ho(a, n.options, u), f = { isCanceled: !1 };
2849
- a.kill = Uo.bind(null, a.kill.bind(a)), a.cancel = $o.bind(null, a, f);
2850
- let g = Ao(/* @__PURE__ */ o(async () => {
2851
- let [{ error: m, exitCode: y, signal: h, timedOut: S }, k, E, O] = await li(a, n.options, l), _ = le(n.options, k), G = le(n.options, E),
2852
- d = le(n.options, O);
2853
- if (m || y !== 0 || h !== null) {
2854
- let v = ae({
2855
- error: m,
2856
- exitCode: y,
2857
- signal: h,
2858
- stdout: _,
2859
- stderr: G,
2860
- all: d,
1910
+ return bt(b, m), b;
1911
+ }
1912
+ let c = jn(a), u = an(a, n.options, c), f = un(a, n.options, u), l = { isCanceled: !1 };
1913
+ a.kill = on.bind(null, a.kill.bind(a)), a.cancel = sn.bind(null, a, l);
1914
+ let g = qr(/* @__PURE__ */ o(async () => {
1915
+ let [{ error: h, exitCode: b, signal: m, timedOut: x }, O, v, j] = await On(a, n.options, f), Z = V(n.options, O), ee = V(n.options, v),
1916
+ p = V(n.options, j);
1917
+ if (h || b !== 0 || m !== null) {
1918
+ let S = W({
1919
+ error: h,
1920
+ exitCode: b,
1921
+ signal: m,
1922
+ stdout: Z,
1923
+ stderr: ee,
1924
+ all: p,
2861
1925
  command: i,
2862
1926
  escapedCommand: s,
2863
1927
  parsed: n,
2864
- timedOut: S,
2865
- isCanceled: f.isCanceled || (n.options.signal ? n.options.signal.aborted : !1),
1928
+ timedOut: x,
1929
+ isCanceled: l.isCanceled || (n.options.signal ? n.options.signal.aborted : !1),
2866
1930
  killed: a.killed
2867
1931
  });
2868
1932
  if (!n.options.reject)
2869
- return v;
2870
- throw v;
1933
+ return S;
1934
+ throw S;
2871
1935
  }
2872
1936
  return {
2873
1937
  command: i,
2874
1938
  escapedCommand: s,
2875
1939
  exitCode: 0,
2876
- stdout: _,
2877
- stderr: G,
2878
- all: d,
1940
+ stdout: Z,
1941
+ stderr: ee,
1942
+ all: p,
2879
1943
  failed: !1,
2880
1944
  timedOut: !1,
2881
1945
  isCanceled: !1,
2882
1946
  killed: !1
2883
1947
  };
2884
1948
  }, "handlePromise"));
2885
- return ci(a, n.options), a.all = ui(a, n.options), Jo(a), ir(a, g), a;
1949
+ return In(a, n.options), a.all = An(a, n.options), pn(a), bt(a, g), a;
2886
1950
  }
2887
- o(Ii, "execa");
2888
- function Hu(e, t, r) {
2889
- let n = ki(e, t, r), i = sr(e, t), s = ar(e, t);
2890
- ur(s, n.options);
2891
- let a = ai(n.options), c;
1951
+ o(qn, "execa");
1952
+ function Fs(e, t, r) {
1953
+ let n = Vn(e, t, r), i = xt(e, t), s = wt(e, t);
1954
+ kt(s, n.options);
1955
+ let a = Cn(n.options), c;
2892
1956
  try {
2893
- c = Qe.default.spawnSync(n.file, n.args, { ...n.options, input: a });
2894
- } catch (f) {
2895
- throw ae({
2896
- error: f,
1957
+ c = Se.default.spawnSync(n.file, n.args, { ...n.options, input: a });
1958
+ } catch (l) {
1959
+ throw W({
1960
+ error: l,
2897
1961
  stdout: "",
2898
1962
  stderr: "",
2899
1963
  all: "",
@@ -2905,11 +1969,11 @@ function Hu(e, t, r) {
2905
1969
  killed: !1
2906
1970
  });
2907
1971
  }
2908
- let u = le(n.options, c.stdout, c.error), l = le(n.options, c.stderr, c.error);
1972
+ let u = V(n.options, c.stdout, c.error), f = V(n.options, c.stderr, c.error);
2909
1973
  if (c.error || c.status !== 0 || c.signal !== null) {
2910
- let f = ae({
1974
+ let l = W({
2911
1975
  stdout: u,
2912
- stderr: l,
1976
+ stderr: f,
2913
1977
  error: c.error,
2914
1978
  signal: c.signal,
2915
1979
  exitCode: c.status,
@@ -2921,81 +1985,81 @@ function Hu(e, t, r) {
2921
1985
  killed: c.signal !== null
2922
1986
  });
2923
1987
  if (!n.options.reject)
2924
- return f;
2925
- throw f;
1988
+ return l;
1989
+ throw l;
2926
1990
  }
2927
1991
  return {
2928
1992
  command: i,
2929
1993
  escapedCommand: s,
2930
1994
  exitCode: 0,
2931
1995
  stdout: u,
2932
- stderr: l,
1996
+ stderr: f,
2933
1997
  failed: !1,
2934
1998
  timedOut: !1,
2935
1999
  isCanceled: !1,
2936
2000
  killed: !1
2937
2001
  };
2938
2002
  }
2939
- o(Hu, "execaSync");
2940
- var Vu = /* @__PURE__ */ o(({ input: e, inputFile: t, stdio: r }) => e === void 0 && t === void 0 && r === void 0 ? { stdin: "inherit" } : {},
2941
- "normalizeScriptStdin"), vi = /* @__PURE__ */ o((e = {}) => ({
2003
+ o(Fs, "execaSync");
2004
+ var Bs = /* @__PURE__ */ o(({ input: e, inputFile: t, stdio: r }) => e === void 0 && t === void 0 && r === void 0 ? { stdin: "inherit" } : {},
2005
+ "normalizeScriptStdin"), $n = /* @__PURE__ */ o((e = {}) => ({
2942
2006
  preferLocal: !0,
2943
- ...Vu(e),
2007
+ ...Bs(e),
2944
2008
  ...e
2945
2009
  }), "normalizeScriptOptions");
2946
- function Ci(e) {
2010
+ function zn(e) {
2947
2011
  function t(r, ...n) {
2948
2012
  if (!Array.isArray(r))
2949
- return Ci({ ...e, ...r });
2950
- let [i, ...s] = cr(r, n);
2951
- return Ii(i, s, vi(e));
2013
+ return zn({ ...e, ...r });
2014
+ let [i, ...s] = St(r, n);
2015
+ return qn(i, s, $n(e));
2952
2016
  }
2953
2017
  return o(t, "$"), t.sync = (r, ...n) => {
2954
2018
  if (!Array.isArray(r))
2955
2019
  throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");
2956
- let [i, ...s] = cr(r, n);
2957
- return Hu(i, s, vi(e));
2020
+ let [i, ...s] = St(r, n);
2021
+ return Fs(i, s, $n(e));
2958
2022
  }, t;
2959
2023
  }
2960
- o(Ci, "create$");
2961
- var jd = Ci();
2962
- function Oi(e, t) {
2963
- let [r, ...n] = bi(e);
2964
- return Ii(r, n, t);
2024
+ o(zn, "create$");
2025
+ var Qu = zn();
2026
+ function Yn(e, t) {
2027
+ let [r, ...n] = Fn(e);
2028
+ return qn(r, n, t);
2965
2029
  }
2966
- o(Oi, "execaCommand");
2030
+ o(Yn, "execaCommand");
2967
2031
 
2968
2032
  // src/telemetry/exec-command-count-lines.ts
2969
- async function Ze(e, t) {
2970
- let r = Oi(e, { shell: !0, buffer: !1, ...t });
2033
+ async function ke(e, t) {
2034
+ let r = Yn(e, { shell: !0, buffer: !1, ...t });
2971
2035
  if (!r.stdout)
2972
2036
  throw new Error("Unexpected missing stdout");
2973
- let n = 0, i = (0, Ai.createInterface)(r.stdout);
2037
+ let n = 0, i = (0, Kn.createInterface)(r.stdout);
2974
2038
  return i.on("line", () => {
2975
2039
  n += 1;
2976
2040
  }), await r, i.close(), n;
2977
2041
  }
2978
- o(Ze, "execCommandCountLines");
2042
+ o(ke, "execCommandCountLines");
2979
2043
 
2980
2044
  // ../node_modules/slash/index.js
2981
- function lr(e) {
2045
+ function Et(e) {
2982
2046
  return e.startsWith("\\\\?\\") ? e : e.replace(/\\/g, "/");
2983
2047
  }
2984
- o(lr, "slash");
2048
+ o(Et, "slash");
2985
2049
 
2986
2050
  // src/common/utils/file-cache.ts
2987
- var fe = require("node:crypto"), T = require("node:fs"), I = require("node:fs/promises"), Ri = require("node:os"), Y = require("node:path");
2988
- var et = class {
2051
+ var q = require("node:crypto"), k = require("node:fs"), E = require("node:fs/promises"), Xn = require("node:os"), L = require("node:path");
2052
+ var Ee = class {
2989
2053
  static {
2990
2054
  o(this, "FileSystemCache");
2991
2055
  }
2992
2056
  constructor(t = {}) {
2993
- this.prefix = (t.ns || t.prefix || "") + "-", this.hash_alg = t.hash_alg || "md5", this.cache_dir = t.basePath || (0, Y.join)((0, Ri.tmpdir)(),
2994
- (0, fe.randomBytes)(15).toString("base64").replace(/\//g, "-")), this.ttl = t.ttl || 0, (0, fe.createHash)(this.hash_alg), (0, T.mkdirSync)(
2057
+ this.prefix = (t.ns || t.prefix || "") + "-", this.hash_alg = t.hash_alg || "md5", this.cache_dir = t.basePath || (0, L.join)((0, Xn.tmpdir)(),
2058
+ (0, q.randomBytes)(15).toString("base64").replace(/\//g, "-")), this.ttl = t.ttl || 0, (0, q.createHash)(this.hash_alg), (0, k.mkdirSync)(
2995
2059
  this.cache_dir, { recursive: !0 });
2996
2060
  }
2997
2061
  generateHash(t) {
2998
- return (0, Y.join)(this.cache_dir, this.prefix + (0, fe.createHash)(this.hash_alg).update(t).digest("hex"));
2062
+ return (0, L.join)(this.cache_dir, this.prefix + (0, q.createHash)(this.hash_alg).update(t).digest("hex"));
2999
2063
  }
3000
2064
  isExpired(t, r) {
3001
2065
  return t.ttl != null && r > t.ttl;
@@ -3010,7 +2074,7 @@ var et = class {
3010
2074
  }
3011
2075
  async get(t, r) {
3012
2076
  try {
3013
- let n = await (0, I.readFile)(this.generateHash(t), "utf8");
2077
+ let n = await (0, E.readFile)(this.generateHash(t), "utf8");
3014
2078
  return this.parseCacheData(n, r);
3015
2079
  } catch {
3016
2080
  return r;
@@ -3018,7 +2082,7 @@ var et = class {
3018
2082
  }
3019
2083
  getSync(t, r) {
3020
2084
  try {
3021
- let n = (0, T.readFileSync)(this.generateHash(t), "utf8");
2085
+ let n = (0, k.readFileSync)(this.generateHash(t), "utf8");
3022
2086
  return this.parseCacheData(n, r);
3023
2087
  } catch {
3024
2088
  return r;
@@ -3026,13 +2090,13 @@ var et = class {
3026
2090
  }
3027
2091
  async set(t, r, n = {}) {
3028
2092
  let i = typeof n == "number" ? { ttl: n } : n;
3029
- (0, T.mkdirSync)(this.cache_dir, { recursive: !0 }), await (0, I.writeFile)(this.generateHash(t), this.parseSetData(t, r, i), {
2093
+ (0, k.mkdirSync)(this.cache_dir, { recursive: !0 }), await (0, E.writeFile)(this.generateHash(t), this.parseSetData(t, r, i), {
3030
2094
  encoding: i.encoding || "utf8"
3031
2095
  });
3032
2096
  }
3033
2097
  setSync(t, r, n = {}) {
3034
2098
  let i = typeof n == "number" ? { ttl: n } : n;
3035
- (0, T.mkdirSync)(this.cache_dir, { recursive: !0 }), (0, T.writeFileSync)(this.generateHash(t), this.parseSetData(t, r, i), {
2099
+ (0, k.mkdirSync)(this.cache_dir, { recursive: !0 }), (0, k.writeFileSync)(this.generateHash(t), this.parseSetData(t, r, i), {
3036
2100
  encoding: i.encoding || "utf8"
3037
2101
  });
3038
2102
  }
@@ -3043,25 +2107,25 @@ var et = class {
3043
2107
  t.forEach((n) => this.setSync(n.key, n.content ?? n.value, r));
3044
2108
  }
3045
2109
  async remove(t) {
3046
- await (0, I.rm)(this.generateHash(t), { force: !0 });
2110
+ await (0, E.rm)(this.generateHash(t), { force: !0 });
3047
2111
  }
3048
2112
  removeSync(t) {
3049
- (0, T.rmSync)(this.generateHash(t), { force: !0 });
2113
+ (0, k.rmSync)(this.generateHash(t), { force: !0 });
3050
2114
  }
3051
2115
  async clear() {
3052
- let t = await (0, I.readdir)(this.cache_dir);
2116
+ let t = await (0, E.readdir)(this.cache_dir);
3053
2117
  await Promise.all(
3054
- t.filter((r) => r.startsWith(this.prefix)).map((r) => (0, I.rm)((0, Y.join)(this.cache_dir, r), { force: !0 }))
2118
+ t.filter((r) => r.startsWith(this.prefix)).map((r) => (0, E.rm)((0, L.join)(this.cache_dir, r), { force: !0 }))
3055
2119
  );
3056
2120
  }
3057
2121
  clearSync() {
3058
- (0, T.readdirSync)(this.cache_dir).filter((t) => t.startsWith(this.prefix)).forEach((t) => (0, T.rmSync)((0, Y.join)(this.cache_dir, t),
2122
+ (0, k.readdirSync)(this.cache_dir).filter((t) => t.startsWith(this.prefix)).forEach((t) => (0, k.rmSync)((0, L.join)(this.cache_dir, t),
3059
2123
  { force: !0 }));
3060
2124
  }
3061
2125
  async getAll() {
3062
- let t = Date.now(), r = await (0, I.readdir)(this.cache_dir);
2126
+ let t = Date.now(), r = await (0, E.readdir)(this.cache_dir);
3063
2127
  return (await Promise.all(
3064
- r.filter((i) => i.startsWith(this.prefix)).map((i) => (0, I.readFile)((0, Y.join)(this.cache_dir, i), "utf8"))
2128
+ r.filter((i) => i.startsWith(this.prefix)).map((i) => (0, E.readFile)((0, L.join)(this.cache_dir, i), "utf8"))
3065
2129
  )).map((i) => JSON.parse(i)).filter((i) => i.content && !this.isExpired(i, t));
3066
2130
  }
3067
2131
  async load() {
@@ -3074,178 +2138,178 @@ var et = class {
3074
2138
  };
3075
2139
  }
3076
2140
  };
3077
- function fr(e) {
3078
- return new et(e);
2141
+ function Pt(e) {
2142
+ return new Ee(e);
3079
2143
  }
3080
- o(fr, "createFileSystemCache");
2144
+ o(Pt, "createFileSystemCache");
3081
2145
 
3082
2146
  // src/common/utils/resolve-path-in-sb-cache.ts
3083
- var hr = require("node:path");
2147
+ var It = require("node:path");
3084
2148
 
3085
2149
  // ../node_modules/find-cache-dir/index.js
3086
- var Hi = b(require("node:process"), 1), X = b(require("node:path"), 1), de = b(require("node:fs"), 1), Vi = b(Gi(), 1);
2150
+ var lo = d(require("node:process"), 1), F = d(require("node:path"), 1), Y = d(require("node:fs"), 1), po = d(Zn(), 1);
3087
2151
 
3088
2152
  // ../node_modules/pkg-dir/index.js
3089
- var Ui = b(require("node:path"), 1);
2153
+ var ao = d(require("node:path"), 1);
3090
2154
 
3091
2155
  // ../node_modules/pkg-dir/node_modules/find-up/index.js
3092
- var pe = b(require("node:path"), 1), Li = require("node:url");
2156
+ var z = d(require("node:path"), 1), io = require("node:url");
3093
2157
 
3094
2158
  // ../node_modules/locate-path/index.js
3095
- var ji = b(require("node:process"), 1), Ni = b(require("node:path"), 1), tt = b(require("node:fs"), 1), Bi = require("node:url");
3096
- var Di = {
2159
+ var eo = d(require("node:process"), 1), to = d(require("node:path"), 1), Pe = d(require("node:fs"), 1), ro = require("node:url");
2160
+ var no = {
3097
2161
  directory: "isDirectory",
3098
2162
  file: "isFile"
3099
2163
  };
3100
- function Ku(e) {
3101
- if (!Object.hasOwnProperty.call(Di, e))
2164
+ function $s(e) {
2165
+ if (!Object.hasOwnProperty.call(no, e))
3102
2166
  throw new Error(`Invalid type specified: ${e}`);
3103
2167
  }
3104
- o(Ku, "checkType");
3105
- var Yu = /* @__PURE__ */ o((e, t) => t[Di[e]](), "matchType"), Xu = /* @__PURE__ */ o((e) => e instanceof URL ? (0, Bi.fileURLToPath)(e) : e,
2168
+ o($s, "checkType");
2169
+ var Ws = /* @__PURE__ */ o((e, t) => t[no[e]](), "matchType"), Hs = /* @__PURE__ */ o((e) => e instanceof URL ? (0, ro.fileURLToPath)(e) : e,
3106
2170
  "toPath");
3107
- function pr(e, {
3108
- cwd: t = ji.default.cwd(),
2171
+ function vt(e, {
2172
+ cwd: t = eo.default.cwd(),
3109
2173
  type: r = "file",
3110
2174
  allowSymlinks: n = !0
3111
2175
  } = {}) {
3112
- Ku(r), t = Xu(t);
3113
- let i = n ? tt.default.statSync : tt.default.lstatSync;
2176
+ $s(r), t = Hs(t);
2177
+ let i = n ? Pe.default.statSync : Pe.default.lstatSync;
3114
2178
  for (let s of e)
3115
2179
  try {
3116
- let a = i(Ni.default.resolve(t, s), {
2180
+ let a = i(to.default.resolve(t, s), {
3117
2181
  throwIfNoEntry: !1
3118
2182
  });
3119
2183
  if (!a)
3120
2184
  continue;
3121
- if (Yu(r, a))
2185
+ if (Ws(r, a))
3122
2186
  return s;
3123
2187
  } catch {
3124
2188
  }
3125
2189
  }
3126
- o(pr, "locatePathSync");
2190
+ o(vt, "locatePathSync");
3127
2191
 
3128
2192
  // ../node_modules/pkg-dir/node_modules/path-exists/index.js
3129
- var Mi = b(require("node:fs"), 1);
2193
+ var oo = d(require("node:fs"), 1);
3130
2194
 
3131
2195
  // ../node_modules/pkg-dir/node_modules/find-up/index.js
3132
- var Qu = /* @__PURE__ */ o((e) => e instanceof URL ? (0, Li.fileURLToPath)(e) : e, "toPath"), Zu = Symbol("findUpStop");
3133
- function el(e, t = {}) {
3134
- let r = pe.default.resolve(Qu(t.cwd) || ""), { root: n } = pe.default.parse(r), i = t.stopAt || n, s = t.limit || Number.POSITIVE_INFINITY,
3135
- a = [e].flat(), c = /* @__PURE__ */ o((l) => {
2196
+ var Js = /* @__PURE__ */ o((e) => e instanceof URL ? (0, io.fileURLToPath)(e) : e, "toPath"), Vs = Symbol("findUpStop");
2197
+ function qs(e, t = {}) {
2198
+ let r = z.default.resolve(Js(t.cwd) || ""), { root: n } = z.default.parse(r), i = t.stopAt || n, s = t.limit || Number.POSITIVE_INFINITY, a = [
2199
+ e].flat(), c = /* @__PURE__ */ o((f) => {
3136
2200
  if (typeof e != "function")
3137
- return pr(a, l);
3138
- let f = e(l.cwd);
3139
- return typeof f == "string" ? pr([f], l) : f;
2201
+ return vt(a, f);
2202
+ let l = e(f.cwd);
2203
+ return typeof l == "string" ? vt([l], f) : l;
3140
2204
  }, "runMatcher"), u = [];
3141
2205
  for (; ; ) {
3142
- let l = c({ ...t, cwd: r });
3143
- if (l === Zu || (l && u.push(pe.default.resolve(r, l)), r === i || u.length >= s))
2206
+ let f = c({ ...t, cwd: r });
2207
+ if (f === Vs || (f && u.push(z.default.resolve(r, f)), r === i || u.length >= s))
3144
2208
  break;
3145
- r = pe.default.dirname(r);
2209
+ r = z.default.dirname(r);
3146
2210
  }
3147
2211
  return u;
3148
2212
  }
3149
- o(el, "findUpMultipleSync");
3150
- function Fi(e, t = {}) {
3151
- return el(e, { ...t, limit: 1 })[0];
2213
+ o(qs, "findUpMultipleSync");
2214
+ function so(e, t = {}) {
2215
+ return qs(e, { ...t, limit: 1 })[0];
3152
2216
  }
3153
- o(Fi, "findUpSync");
2217
+ o(so, "findUpSync");
3154
2218
 
3155
2219
  // ../node_modules/pkg-dir/index.js
3156
- function $i({ cwd: e } = {}) {
3157
- let t = Fi("package.json", { cwd: e });
3158
- return t && Ui.default.dirname(t);
2220
+ function co({ cwd: e } = {}) {
2221
+ let t = so("package.json", { cwd: e });
2222
+ return t && ao.default.dirname(t);
3159
2223
  }
3160
- o($i, "packageDirectorySync");
2224
+ o(co, "packageDirectorySync");
3161
2225
 
3162
2226
  // ../node_modules/find-cache-dir/index.js
3163
- var { env: dr, cwd: tl } = Hi.default, qi = /* @__PURE__ */ o((e) => {
2227
+ var { env: Tt, cwd: zs } = lo.default, uo = /* @__PURE__ */ o((e) => {
3164
2228
  try {
3165
- return de.default.accessSync(e, de.default.constants.W_OK), !0;
2229
+ return Y.default.accessSync(e, Y.default.constants.W_OK), !0;
3166
2230
  } catch {
3167
2231
  return !1;
3168
2232
  }
3169
2233
  }, "isWritable");
3170
- function Wi(e, t) {
3171
- return t.create && de.default.mkdirSync(e, { recursive: !0 }), e;
2234
+ function fo(e, t) {
2235
+ return t.create && Y.default.mkdirSync(e, { recursive: !0 }), e;
3172
2236
  }
3173
- o(Wi, "useDirectory");
3174
- function rl(e) {
3175
- let t = X.default.join(e, "node_modules");
3176
- if (!(!qi(t) && (de.default.existsSync(t) || !qi(X.default.join(e)))))
2237
+ o(fo, "useDirectory");
2238
+ function Ys(e) {
2239
+ let t = F.default.join(e, "node_modules");
2240
+ if (!(!uo(t) && (Y.default.existsSync(t) || !uo(F.default.join(e)))))
3177
2241
  return t;
3178
2242
  }
3179
- o(rl, "getNodeModuleDirectory");
3180
- function mr(e = {}) {
3181
- if (dr.CACHE_DIR && !["true", "false", "1", "0"].includes(dr.CACHE_DIR))
3182
- return Wi(X.default.join(dr.CACHE_DIR, e.name), e);
3183
- let { cwd: t = tl(), files: r } = e;
2243
+ o(Ys, "getNodeModuleDirectory");
2244
+ function Ct(e = {}) {
2245
+ if (Tt.CACHE_DIR && !["true", "false", "1", "0"].includes(Tt.CACHE_DIR))
2246
+ return fo(F.default.join(Tt.CACHE_DIR, e.name), e);
2247
+ let { cwd: t = zs(), files: r } = e;
3184
2248
  if (r) {
3185
2249
  if (!Array.isArray(r))
3186
2250
  throw new TypeError(`Expected \`files\` option to be an array, got \`${typeof r}\`.`);
3187
- t = (0, Vi.default)(r.map((i) => X.default.resolve(t, i)));
2251
+ t = (0, po.default)(r.map((i) => F.default.resolve(t, i)));
3188
2252
  }
3189
- if (t = $i({ cwd: t }), !(!t || !rl(t)))
3190
- return Wi(X.default.join(t, "node_modules", ".cache", e.name), e);
2253
+ if (t = co({ cwd: t }), !(!t || !Ys(t)))
2254
+ return fo(F.default.join(t, "node_modules", ".cache", e.name), e);
3191
2255
  }
3192
- o(mr, "findCacheDirectory");
2256
+ o(Ct, "findCacheDirectory");
3193
2257
 
3194
2258
  // src/common/utils/resolve-path-in-sb-cache.ts
3195
- function zi(e, t = "default") {
3196
- let r = mr({ name: "storybook" });
3197
- return r ||= (0, hr.join)(process.cwd(), "node_modules", ".cache", "storybook"), (0, hr.join)(r, t, e);
2259
+ function mo(e, t = "default") {
2260
+ let r = Ct({ name: "storybook" });
2261
+ return r ||= (0, It.join)(process.cwd(), "node_modules", ".cache", "storybook"), (0, It.join)(r, t, e);
3198
2262
  }
3199
- o(zi, "resolvePathInStorybookCache");
2263
+ o(mo, "resolvePathInStorybookCache");
3200
2264
 
3201
2265
  // src/telemetry/run-telemetry-operation.ts
3202
- var Ji = fr({
3203
- basePath: zi("telemetry"),
2266
+ var yo = Pt({
2267
+ basePath: mo("telemetry"),
3204
2268
  ns: "storybook",
3205
2269
  ttl: 24 * 60 * 60 * 1e3
3206
2270
  // 24h
3207
- }), rt = /* @__PURE__ */ o(async (e, t) => {
3208
- let r = await Ji.get(e);
3209
- return r === void 0 && (r = await t(), r !== void 0 && await Ji.set(e, r)), r;
2271
+ }), ve = /* @__PURE__ */ o(async (e, t) => {
2272
+ let r = await yo.get(e);
2273
+ return r === void 0 && (r = await t(), r !== void 0 && await yo.set(e, r)), r;
3210
2274
  }, "runTelemetryOperation");
3211
2275
 
3212
2276
  // src/telemetry/get-application-file-count.ts
3213
- var nl = ["page", "screen"], ol = ["js", "jsx", "ts", "tsx"], il = /* @__PURE__ */ o(async (e) => {
3214
- let r = nl.flatMap((n) => [
2277
+ var Ks = ["page", "screen"], Xs = ["js", "jsx", "ts", "tsx"], Qs = /* @__PURE__ */ o(async (e) => {
2278
+ let r = Ks.flatMap((n) => [
3215
2279
  n,
3216
2280
  [n[0].toUpperCase(), ...n.slice(1)].join("")
3217
2281
  ]).flatMap(
3218
- (n) => ol.map((i) => `"${e}${Ki.sep}*${n}*.${i}"`)
2282
+ (n) => Xs.map((i) => `"${e}${ho.sep}*${n}*.${i}"`)
3219
2283
  );
3220
2284
  try {
3221
2285
  let n = `git ls-files -- ${r.join(" ")}`;
3222
- return await Ze(n);
2286
+ return await ke(n);
3223
2287
  } catch {
3224
2288
  return;
3225
2289
  }
3226
- }, "getApplicationFilesCountUncached"), Yi = /* @__PURE__ */ o(async (e) => rt(
2290
+ }, "getApplicationFilesCountUncached"), go = /* @__PURE__ */ o(async (e) => ve(
3227
2291
  "applicationFiles",
3228
- async () => il(e)
2292
+ async () => Qs(e)
3229
2293
  ), "getApplicationFileCount");
3230
2294
 
3231
2295
  // src/telemetry/get-chromatic-version.ts
3232
- function Xi(e) {
2296
+ function bo(e) {
3233
2297
  let t = e.dependencies?.chromatic || e.devDependencies?.chromatic || e.peerDependencies?.chromatic;
3234
2298
  return t || (e.scripts && Object.values(e.scripts).find((r) => r?.match(/chromatic/)) ? "latest" : void 0);
3235
2299
  }
3236
- o(Xi, "getChromaticVersionSpecifier");
2300
+ o(bo, "getChromaticVersionSpecifier");
3237
2301
 
3238
2302
  // src/telemetry/get-framework-info.ts
3239
- var ts = require("node:path"), rs = require("storybook/internal/common");
2303
+ var ko = require("node:path"), Eo = require("storybook/internal/common");
3240
2304
 
3241
2305
  // src/telemetry/package-json.ts
3242
- var Qi = require("node:fs/promises"), Zi = require("node:path");
3243
- var yr = /* @__PURE__ */ o(async (e) => {
2306
+ var xo = require("node:fs/promises"), wo = require("node:path");
2307
+ var At = /* @__PURE__ */ o(async (e) => {
3244
2308
  let t = Object.keys(e);
3245
- return Promise.all(t.map(nt));
3246
- }, "getActualPackageVersions"), nt = /* @__PURE__ */ o(async (e) => {
2309
+ return Promise.all(t.map(Te));
2310
+ }, "getActualPackageVersions"), Te = /* @__PURE__ */ o(async (e) => {
3247
2311
  try {
3248
- let t = await gr(e);
2312
+ let t = await Ot(e);
3249
2313
  return {
3250
2314
  name: e,
3251
2315
  version: t.version
@@ -3253,15 +2317,15 @@ var yr = /* @__PURE__ */ o(async (e) => {
3253
2317
  } catch {
3254
2318
  return { name: e, version: null };
3255
2319
  }
3256
- }, "getActualPackageVersion"), gr = /* @__PURE__ */ o(async (e) => {
3257
- let t = require.resolve((0, Zi.join)(e, "package.json"), {
2320
+ }, "getActualPackageVersion"), Ot = /* @__PURE__ */ o(async (e) => {
2321
+ let t = require.resolve((0, wo.join)(e, "package.json"), {
3258
2322
  paths: [process.cwd()]
3259
2323
  });
3260
- return JSON.parse(await (0, Qi.readFile)(t, { encoding: "utf8" }));
2324
+ return JSON.parse(await (0, xo.readFile)(t, { encoding: "utf8" }));
3261
2325
  }, "getActualPackageJson");
3262
2326
 
3263
2327
  // src/telemetry/get-framework-info.ts
3264
- var sl = [
2328
+ var Zs = [
3265
2329
  "html",
3266
2330
  "react",
3267
2331
  "svelte",
@@ -3272,8 +2336,8 @@ var sl = [
3272
2336
  "web-components",
3273
2337
  "angular",
3274
2338
  "ember"
3275
- ], al = ["builder-webpack5", "builder-vite"];
3276
- function es(e, t) {
2339
+ ], ea = ["builder-webpack5", "builder-vite"];
2340
+ function So(e, t) {
3277
2341
  let { name: r = "", version: n, dependencies: i, devDependencies: s, peerDependencies: a } = e, c = {
3278
2342
  // We include the framework itself because it may be a renderer too (e.g. angular)
3279
2343
  [r]: n,
@@ -3283,21 +2347,21 @@ function es(e, t) {
3283
2347
  };
3284
2348
  return t.map((u) => `@storybook/${u}`).find((u) => c[u]);
3285
2349
  }
3286
- o(es, "findMatchingPackage");
3287
- var cl = /* @__PURE__ */ o((e) => {
3288
- let t = (0, ts.normalize)(e).replace(new RegExp(/\\/, "g"), "/");
3289
- return Object.keys(rs.frameworkPackages).find((n) => t.endsWith(n)) || F(e).replace(/.*node_modules[\\/]/, "");
2350
+ o(So, "findMatchingPackage");
2351
+ var ta = /* @__PURE__ */ o((e) => {
2352
+ let t = (0, ko.normalize)(e).replace(new RegExp(/\\/, "g"), "/");
2353
+ return Object.keys(Eo.frameworkPackages).find((n) => t.endsWith(n)) || N(e).replace(/.*node_modules[\\/]/, "");
3290
2354
  }, "getFrameworkPackageName");
3291
- async function ns(e) {
2355
+ async function Po(e) {
3292
2356
  if (!e?.framework)
3293
2357
  return {};
3294
2358
  let t = typeof e.framework == "string" ? e.framework : e.framework?.name;
3295
2359
  if (!t)
3296
2360
  return {};
3297
- let r = await gr(t);
2361
+ let r = await Ot(t);
3298
2362
  if (!r)
3299
2363
  return {};
3300
- let n = es(r, al), i = es(r, sl), s = cl(t), a = typeof e.framework == "object" ? e.framework.options : {};
2364
+ let n = So(r, ea), i = So(r, Zs), s = ta(t), a = typeof e.framework == "object" ? e.framework.options : {};
3301
2365
  return {
3302
2366
  framework: {
3303
2367
  name: s,
@@ -3307,10 +2371,10 @@ async function ns(e) {
3307
2371
  renderer: i
3308
2372
  };
3309
2373
  }
3310
- o(ns, "getFrameworkInfo");
2374
+ o(Po, "getFrameworkInfo");
3311
2375
 
3312
2376
  // src/telemetry/get-has-router-package.ts
3313
- var ul = /* @__PURE__ */ new Set([
2377
+ var ra = /* @__PURE__ */ new Set([
3314
2378
  "react-router",
3315
2379
  "react-router-dom",
3316
2380
  "remix",
@@ -3333,54 +2397,54 @@ var ul = /* @__PURE__ */ new Set([
3333
2397
  "nuxt",
3334
2398
  "@sveltejs/kit"
3335
2399
  ]);
3336
- function os(e) {
2400
+ function vo(e) {
3337
2401
  return Object.keys(e?.dependencies ?? {}).some(
3338
- (t) => ul.has(t)
2402
+ (t) => ra.has(t)
3339
2403
  );
3340
2404
  }
3341
- o(os, "getHasRouterPackage");
2405
+ o(vo, "getHasRouterPackage");
3342
2406
 
3343
2407
  // src/telemetry/get-monorepo-type.ts
3344
- var me = require("node:fs"), ot = require("node:path"), ss = require("storybook/internal/common");
3345
- var is = {
2408
+ var K = require("node:fs"), Ce = require("node:path"), Co = require("storybook/internal/common");
2409
+ var To = {
3346
2410
  Nx: "nx.json",
3347
2411
  Turborepo: "turbo.json",
3348
2412
  Lerna: "lerna.json",
3349
2413
  Rush: "rush.json",
3350
2414
  Lage: "lage.config.json"
3351
- }, as = /* @__PURE__ */ o(() => {
3352
- let e = (0, ss.getProjectRoot)();
2415
+ }, Io = /* @__PURE__ */ o(() => {
2416
+ let e = (0, Co.getProjectRoot)();
3353
2417
  if (!e)
3354
2418
  return;
3355
- let r = Object.keys(is).find((i) => {
3356
- let s = (0, ot.join)(e, is[i]);
3357
- return (0, me.existsSync)(s);
2419
+ let r = Object.keys(To).find((i) => {
2420
+ let s = (0, Ce.join)(e, To[i]);
2421
+ return (0, K.existsSync)(s);
3358
2422
  });
3359
2423
  if (r)
3360
2424
  return r;
3361
- if (!(0, me.existsSync)((0, ot.join)(e, "package.json")))
2425
+ if (!(0, K.existsSync)((0, Ce.join)(e, "package.json")))
3362
2426
  return;
3363
2427
  if (JSON.parse(
3364
- (0, me.readFileSync)((0, ot.join)(e, "package.json"), { encoding: "utf8" })
2428
+ (0, K.readFileSync)((0, Ce.join)(e, "package.json"), { encoding: "utf8" })
3365
2429
  )?.workspaces)
3366
2430
  return "Workspaces";
3367
2431
  }, "getMonorepoType");
3368
2432
 
3369
2433
  // src/telemetry/get-portable-stories-usage.ts
3370
- var ll = /* @__PURE__ */ o(async (e) => {
2434
+ var na = /* @__PURE__ */ o(async (e) => {
3371
2435
  try {
3372
2436
  let t = "git grep -l composeStor" + (e ? ` -- ${e}` : "");
3373
- return await Ze(t);
2437
+ return await ke(t);
3374
2438
  } catch (t) {
3375
2439
  return t.exitCode === 1 ? 0 : void 0;
3376
2440
  }
3377
- }, "getPortableStoriesFileCountUncached"), cs = /* @__PURE__ */ o(async (e) => rt(
2441
+ }, "getPortableStoriesFileCountUncached"), Ao = /* @__PURE__ */ o(async (e) => ve(
3378
2442
  "portableStories",
3379
- async () => ll(e)
2443
+ async () => na(e)
3380
2444
  ), "getPortableStoriesFileCount");
3381
2445
 
3382
2446
  // src/telemetry/storybook-metadata.ts
3383
- var br = {
2447
+ var jt = {
3384
2448
  next: "Next",
3385
2449
  "react-scripts": "CRA",
3386
2450
  gatsby: "Gatsby",
@@ -3388,8 +2452,8 @@ var br = {
3388
2452
  "@nrwl/storybook": "nx",
3389
2453
  "@vue/cli-service": "vue-cli",
3390
2454
  "@sveltejs/kit": "sveltekit"
3391
- }, xr = /* @__PURE__ */ o((e) => F(e).replace(/\/dist\/.*/, "").replace(/\.[mc]?[tj]?s[x]?$/, "").replace(/\/register$/, "").replace(/\/manager$/,
3392
- "").replace(/\/preset$/, ""), "sanitizeAddonName"), fs = /* @__PURE__ */ o(async ({
2455
+ }, Rt = /* @__PURE__ */ o((e) => N(e).replace(/\/dist\/.*/, "").replace(/\.[mc]?[tj]?s[x]?$/, "").replace(/\/register$/, "").replace(/\/manager$/,
2456
+ "").replace(/\/preset$/, ""), "sanitizeAddonName"), Ro = /* @__PURE__ */ o(async ({
3393
2457
  packageJsonPath: e,
3394
2458
  packageJson: t,
3395
2459
  mainConfig: r
@@ -3405,13 +2469,13 @@ var br = {
3405
2469
  ...t?.dependencies,
3406
2470
  ...t?.devDependencies,
3407
2471
  ...t?.peerDependencies
3408
- }, s = Object.keys(i).find((d) => !!br[d]);
2472
+ }, s = Object.keys(i).find((p) => !!jt[p]);
3409
2473
  if (s) {
3410
- let { version: d } = await nt(s);
2474
+ let { version: p } = await Te(s);
3411
2475
  n.metaFramework = {
3412
- name: br[s],
2476
+ name: jt[s],
3413
2477
  packageName: s,
3414
- version: d
2478
+ version: p
3415
2479
  };
3416
2480
  }
3417
2481
  let a = [
@@ -3433,159 +2497,168 @@ var br = {
3433
2497
  "miragejs",
3434
2498
  "sinon"
3435
2499
  ], c = Object.keys(i).filter(
3436
- (d) => a.find((v) => d.includes(v))
2500
+ (p) => a.find((S) => p.includes(S))
3437
2501
  );
3438
2502
  n.testPackages = Object.fromEntries(
3439
2503
  await Promise.all(
3440
- c.map(async (d) => [d, (await nt(d))?.version])
2504
+ c.map(async (p) => [p, (await Te(p))?.version])
3441
2505
  )
3442
- ), n.hasRouterPackage = os(t);
3443
- let u = as();
2506
+ ), n.hasRouterPackage = vo(t);
2507
+ let u = Io();
3444
2508
  u && (n.monorepo = u);
3445
2509
  try {
3446
- let d = await (0, st.detect)({ cwd: (0, A.getProjectRoot)() }), v = await (0, st.getNpmVersion)(d);
3447
- n.packageManager = {
3448
- type: d,
3449
- version: v
3450
- };
2510
+ let p = await We({ cwd: (0, P.getProjectRoot)() });
2511
+ p && (n.packageManager = {
2512
+ type: p.name,
2513
+ version: p.version,
2514
+ agent: p.agent
2515
+ });
3451
2516
  } catch {
3452
2517
  }
2518
+ let f = i.typescript ? "typescript" : "javascript";
2519
+ if (!r)
2520
+ return {
2521
+ ...n,
2522
+ storybookVersionSpecifier: P.versions.storybook,
2523
+ language: f
2524
+ };
3453
2525
  n.hasCustomBabel = !!r.babel, n.hasCustomWebpack = !!r.webpackFinal, n.hasStaticDirs = !!r.staticDirs, typeof r.typescript == "object" && (n.
3454
2526
  typescriptOptions = r.typescript);
3455
- let l = await ns(r);
2527
+ let l = await Po(r);
3456
2528
  typeof r.refs == "object" && (n.refCount = Object.keys(r.refs).length), typeof r.features == "object" && (n.features = r.features);
3457
- let f = {};
3458
- r.addons && r.addons.forEach((d) => {
3459
- let v, ge;
3460
- typeof d == "string" ? v = xr(d) : (d.name.includes("addon-essentials") && (ge = d.options), v = xr(d.name)), f[v] = {
3461
- options: ge,
2529
+ let y = {};
2530
+ r.addons && r.addons.forEach((p) => {
2531
+ let S, te;
2532
+ typeof p == "string" ? S = Rt(p) : (p.name.includes("addon-essentials") && (te = p.options), S = Rt(p.name)), y[S] = {
2533
+ options: te,
3462
2534
  version: void 0
3463
2535
  };
3464
2536
  });
3465
- let x = Xi(t);
3466
- x && (f.chromatic = {
2537
+ let g = bo(t);
2538
+ g && (y.chromatic = {
3467
2539
  version: void 0,
3468
- versionSpecifier: x,
2540
+ versionSpecifier: g,
3469
2541
  options: void 0
3470
- }), (await yr(f)).forEach(({ name: d, version: v }) => {
3471
- f[d].version = v;
2542
+ }), (await At(y)).forEach(({ name: p, version: S }) => {
2543
+ y[p].version = S;
3472
2544
  });
3473
- let m = Object.keys(f), y = Object.keys(i).filter((d) => d.includes("storybook") && !m.includes(d)).reduce((d, v) => ({
3474
- ...d,
3475
- [v]: { version: void 0 }
2545
+ let b = Object.keys(y), m = Object.keys(i).filter((p) => p.includes("storybook") && !b.includes(p)).reduce((p, S) => ({
2546
+ ...p,
2547
+ [S]: { version: void 0 }
3476
2548
  }), {});
3477
- (await yr(y)).forEach(({ name: d, version: v }) => {
3478
- y[d].version = v;
2549
+ (await At(m)).forEach(({ name: p, version: S }) => {
2550
+ m[p].version = S;
3479
2551
  });
3480
- let S = i.typescript ? "typescript" : "javascript", k = !!i["eslint-plugin-storybook"], E = (0, A.getStorybookInfo)(t);
2552
+ let O = !!i["eslint-plugin-storybook"], v = (0, P.getStorybookInfo)(t);
3481
2553
  try {
3482
- let { previewConfig: d } = E;
3483
- if (d) {
3484
- let v = await (0, ls.readConfig)(d), ge = !!(v.getFieldNode(["globals"]) || v.getFieldNode(["globalTypes"]));
3485
- n.preview = { ...n.preview, usesGlobals: ge };
2554
+ let { previewConfig: p } = v;
2555
+ if (p) {
2556
+ let S = await (0, jo.readConfig)(p), te = !!(S.getFieldNode(["globals"]) || S.getFieldNode(["globalTypes"]));
2557
+ n.preview = { ...n.preview, usesGlobals: te };
3486
2558
  }
3487
2559
  } catch {
3488
2560
  }
3489
- let O = y[E.frameworkPackage]?.version, _ = await cs(), G = await Yi((0, us.dirname)(e));
2561
+ let j = m[v.frameworkPackage]?.version, Z = await Ao(), ee = await go((0, Oo.dirname)(e));
3490
2562
  return {
3491
2563
  ...n,
3492
2564
  ...l,
3493
- portableStoriesFileCount: _,
3494
- applicationFileCount: G,
3495
- storybookVersion: O,
3496
- storybookVersionSpecifier: E.version,
3497
- language: S,
3498
- storybookPackages: y,
3499
- addons: f,
3500
- hasStorybookEslint: k
2565
+ portableStoriesFileCount: Z,
2566
+ applicationFileCount: ee,
2567
+ storybookVersion: j,
2568
+ storybookVersionSpecifier: v.version,
2569
+ language: f,
2570
+ storybookPackages: m,
2571
+ addons: y,
2572
+ hasStorybookEslint: O
3501
2573
  };
3502
2574
  }, "computeStorybookMetadata");
3503
- async function fl() {
3504
- let e = await Lt(process.cwd());
2575
+ async function oa() {
2576
+ let e = await Fe(process.cwd());
3505
2577
  return e ? {
3506
2578
  packageJsonPath: e,
3507
- packageJson: await ko(e) || {}
2579
+ packageJson: await Qt(e) || {}
3508
2580
  } : {
3509
2581
  packageJsonPath: process.cwd(),
3510
2582
  packageJson: {}
3511
2583
  };
3512
2584
  }
3513
- o(fl, "getPackageJsonDetails");
3514
- var it, Sr = /* @__PURE__ */ o(async (e) => {
3515
- if (it)
3516
- return it;
3517
- let { packageJson: t, packageJsonPath: r } = await fl(), n = (e || (0, A.getStorybookConfiguration)(
2585
+ o(oa, "getPackageJsonDetails");
2586
+ var Ie, Nt = /* @__PURE__ */ o(async (e) => {
2587
+ if (Ie)
2588
+ return Ie;
2589
+ let { packageJson: t, packageJsonPath: r } = await oa(), n = (e || (0, P.getStorybookConfiguration)(
3518
2590
  String(t?.scripts?.storybook || ""),
3519
2591
  "-c",
3520
2592
  "--config-dir"
3521
- )) ?? ".storybook", i = await (0, A.loadMainConfig)({ configDir: n });
3522
- return it = await fs({ mainConfig: i, packageJson: t, packageJsonPath: r }), it;
2593
+ )) ?? ".storybook", i = await (0, P.loadMainConfig)({ configDir: n }).catch(() => {
2594
+ });
2595
+ return Ie = await Ro({ mainConfig: i, packageJson: t, packageJsonPath: r }), Ie;
3523
2596
  }, "getStorybookMetadata");
3524
2597
 
3525
2598
  // src/telemetry/telemetry.ts
3526
- var Es = b(require("node:os"), 1), Ts = b(ds(), 1);
2599
+ var Jo = d(require("node:os"), 1), Vo = d(Do(), 1);
3527
2600
 
3528
2601
  // ../node_modules/nanoid/index.js
3529
- var wr = require("crypto");
2602
+ var Dt = require("crypto");
3530
2603
 
3531
2604
  // ../node_modules/nanoid/url-alphabet/index.js
3532
- var ms = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2605
+ var _o = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
3533
2606
 
3534
2607
  // ../node_modules/nanoid/index.js
3535
- var pl = 128, M, Q, dl = /* @__PURE__ */ o((e) => {
3536
- !M || M.length < e ? (M = Buffer.allocUnsafe(e * pl), (0, wr.randomFillSync)(M), Q = 0) : Q + e > M.length && ((0, wr.randomFillSync)(M), Q =
3537
- 0), Q += e;
2608
+ var ia = 128, A, B, sa = /* @__PURE__ */ o((e) => {
2609
+ !A || A.length < e ? (A = Buffer.allocUnsafe(e * ia), (0, Dt.randomFillSync)(A), B = 0) : B + e > A.length && ((0, Dt.randomFillSync)(A), B =
2610
+ 0), B += e;
3538
2611
  }, "fillPool");
3539
- var he = /* @__PURE__ */ o((e = 21) => {
3540
- dl(e -= 0);
2612
+ var X = /* @__PURE__ */ o((e = 21) => {
2613
+ sa(e -= 0);
3541
2614
  let t = "";
3542
- for (let r = Q - e; r < Q; r++)
3543
- t += ms[M[r] & 63];
2615
+ for (let r = B - e; r < B; r++)
2616
+ t += _o[A[r] & 63];
3544
2617
  return t;
3545
2618
  }, "nanoid");
3546
2619
 
3547
2620
  // src/telemetry/anonymous-id.ts
3548
- var ys = require("node:path"), gs = require("storybook/internal/common"), bs = require("child_process");
2621
+ var Lo = require("node:path"), Fo = require("storybook/internal/common"), Bo = require("child_process");
3549
2622
 
3550
2623
  // src/telemetry/one-way-hash.ts
3551
- var hs = require("crypto");
3552
- var ct = /* @__PURE__ */ o((e) => {
3553
- let t = (0, hs.createHash)("sha256");
2624
+ var Mo = require("crypto");
2625
+ var Oe = /* @__PURE__ */ o((e) => {
2626
+ let t = (0, Mo.createHash)("sha256");
3554
2627
  return t.update("storybook-telemetry-salt"), t.update(e), t.digest("hex");
3555
2628
  }, "oneWayHash");
3556
2629
 
3557
2630
  // src/telemetry/anonymous-id.ts
3558
- function ml(e) {
2631
+ function aa(e) {
3559
2632
  let n = e.trim().replace(/#.*$/, "").replace(/^.*@/, "").replace(/^.*\/\//, "");
3560
2633
  return (n.endsWith(".git") ? n : `${n}.git`).replace(":", "/");
3561
2634
  }
3562
- o(ml, "normalizeGitUrl");
3563
- function hl(e, t) {
3564
- return `${ml(e)}${lr(t)}`;
2635
+ o(aa, "normalizeGitUrl");
2636
+ function ca(e, t) {
2637
+ return `${aa(e)}${Et(t)}`;
3565
2638
  }
3566
- o(hl, "unhashedProjectId");
3567
- var ut, xs = /* @__PURE__ */ o(() => {
3568
- if (ut)
3569
- return ut;
2639
+ o(ca, "unhashedProjectId");
2640
+ var je, Go = /* @__PURE__ */ o(() => {
2641
+ if (je)
2642
+ return je;
3570
2643
  try {
3571
- let e = (0, gs.getProjectRoot)(), t = (0, ys.relative)(e, process.cwd()), r = (0, bs.execSync)("git config --local --get remote.origin.u\
2644
+ let e = (0, Fo.getProjectRoot)(), t = (0, Lo.relative)(e, process.cwd()), r = (0, Bo.execSync)("git config --local --get remote.origin.u\
3572
2645
  rl", {
3573
2646
  timeout: 1e3,
3574
2647
  stdio: "pipe"
3575
2648
  });
3576
- ut = ct(hl(String(r), t));
2649
+ je = Oe(ca(String(r), t));
3577
2650
  } catch {
3578
2651
  }
3579
- return ut;
2652
+ return je;
3580
2653
  }, "getAnonymousProjectId");
3581
2654
 
3582
2655
  // src/telemetry/event-cache.ts
3583
- var lt = require("storybook/internal/common");
3584
- var vr = Promise.resolve(), yl = /* @__PURE__ */ o(async (e, t) => {
3585
- let r = await lt.cache.get("lastEvents") || {};
3586
- r[e] = { body: t, timestamp: Date.now() }, await lt.cache.set("lastEvents", r);
3587
- }, "setHelper"), ws = /* @__PURE__ */ o(async (e, t) => (await vr, vr = yl(e, t), vr), "set");
3588
- var gl = /* @__PURE__ */ o((e) => {
2656
+ var Re = require("storybook/internal/common");
2657
+ var _t = Promise.resolve(), ua = /* @__PURE__ */ o(async (e, t) => {
2658
+ let r = await Re.cache.get("lastEvents") || {};
2659
+ r[e] = { body: t, timestamp: Date.now() }, await Re.cache.set("lastEvents", r);
2660
+ }, "setHelper"), $o = /* @__PURE__ */ o(async (e, t) => (await _t, _t = ua(e, t), _t), "set");
2661
+ var fa = /* @__PURE__ */ o((e) => {
3589
2662
  let { body: t, timestamp: r } = e;
3590
2663
  return {
3591
2664
  timestamp: r,
@@ -3593,91 +2666,91 @@ var gl = /* @__PURE__ */ o((e) => {
3593
2666
  eventId: t?.eventId,
3594
2667
  sessionId: t?.sessionId
3595
2668
  };
3596
- }, "upgradeFields"), bl = ["init", "upgrade"], xl = ["build", "dev", "error"], Ss = /* @__PURE__ */ o((e, t) => {
2669
+ }, "upgradeFields"), la = ["init", "upgrade"], pa = ["build", "dev", "error"], Uo = /* @__PURE__ */ o((e, t) => {
3597
2670
  let r = t.map((n) => e?.[n]).filter(Boolean).sort((n, i) => i.timestamp - n.timestamp);
3598
2671
  return r.length > 0 ? r[0] : void 0;
3599
- }, "lastEvent"), vs = /* @__PURE__ */ o(async (e = void 0) => {
3600
- let t = e || await lt.cache.get("lastEvents") || {}, r = Ss(t, bl), n = Ss(t, xl);
2672
+ }, "lastEvent"), Wo = /* @__PURE__ */ o(async (e = void 0) => {
2673
+ let t = e || await Re.cache.get("lastEvents") || {}, r = Uo(t, la), n = Uo(t, pa);
3601
2674
  if (r)
3602
- return !n?.timestamp || r.timestamp > n.timestamp ? gl(r) : void 0;
2675
+ return !n?.timestamp || r.timestamp > n.timestamp ? fa(r) : void 0;
3603
2676
  }, "getPrecedingUpgrade");
3604
2677
 
3605
2678
  // src/telemetry/fetch.ts
3606
- var Ps = global.fetch;
2679
+ var Ho = global.fetch;
3607
2680
 
3608
2681
  // src/telemetry/session-id.ts
3609
- var Pr = require("storybook/internal/common");
3610
- var Sl = 1e3 * 60 * 60 * 2, ye;
3611
- var Er = /* @__PURE__ */ o(async () => {
2682
+ var Mt = require("storybook/internal/common");
2683
+ var ma = 1e3 * 60 * 60 * 2, Q;
2684
+ var Lt = /* @__PURE__ */ o(async () => {
3612
2685
  let e = Date.now();
3613
- if (!ye) {
3614
- let t = await Pr.cache.get("session");
3615
- t && t.lastUsed >= e - Sl ? ye = t.id : ye = he();
2686
+ if (!Q) {
2687
+ let t = await Mt.cache.get("session");
2688
+ t && t.lastUsed >= e - ma ? Q = t.id : Q = X();
3616
2689
  }
3617
- return await Pr.cache.set("session", { id: ye, lastUsed: e }), ye;
2690
+ return await Mt.cache.set("session", { id: Q, lastUsed: e }), Q;
3618
2691
  }, "getSessionId");
3619
2692
 
3620
2693
  // src/telemetry/telemetry.ts
3621
- var wl = (0, Ts.default)(Ps), vl = process.env.STORYBOOK_TELEMETRY_URL || "https://storybook.js.org/event-log", ft = [], ks = /* @__PURE__ */ o(
2694
+ var da = (0, Vo.default)(Ho), ya = process.env.STORYBOOK_TELEMETRY_URL || "https://storybook.js.org/event-log", Ne = [], qo = /* @__PURE__ */ o(
3622
2695
  (e, t) => {
3623
- Tr[e] = t;
3624
- }, "addToGlobalContext"), Pl = /* @__PURE__ */ o(() => {
2696
+ Ft[e] = t;
2697
+ }, "addToGlobalContext"), ha = /* @__PURE__ */ o(() => {
3625
2698
  try {
3626
- let e = Es.platform();
2699
+ let e = Jo.platform();
3627
2700
  return e === "win32" ? "Windows" : e === "darwin" ? "macOS" : e === "linux" ? "Linux" : `Other: ${e}`;
3628
2701
  } catch {
3629
2702
  return "Unknown";
3630
2703
  }
3631
- }, "getOperatingSystem"), Tr = {
2704
+ }, "getOperatingSystem"), Ft = {
3632
2705
  inCI: !!process.env.CI,
3633
2706
  isTTY: process.stdout.isTTY,
3634
- platform: Pl(),
2707
+ platform: ha(),
3635
2708
  nodeVersion: process.versions.node
3636
- }, El = /* @__PURE__ */ o(async (e, t, r) => {
3637
- let { eventType: n, payload: i, metadata: s, ...a } = e, c = await Er(), u = he(), l = { ...a, eventType: n, eventId: u, sessionId: c, metadata: s,
2709
+ }, ga = /* @__PURE__ */ o(async (e, t, r) => {
2710
+ let { eventType: n, payload: i, metadata: s, ...a } = e, c = await Lt(), u = X(), f = { ...a, eventType: n, eventId: u, sessionId: c, metadata: s,
3638
2711
  payload: i, context: t };
3639
- return wl(vl, {
2712
+ return da(ya, {
3640
2713
  method: "post",
3641
- body: JSON.stringify(l),
2714
+ body: JSON.stringify(f),
3642
2715
  headers: { "Content-Type": "application/json" },
3643
2716
  retries: 3,
3644
2717
  retryOn: [503, 504],
3645
- retryDelay: /* @__PURE__ */ o((f) => 2 ** f * (typeof r?.retryDelay == "number" && !Number.isNaN(r?.retryDelay) ? r.retryDelay : 1e3), "\
2718
+ retryDelay: /* @__PURE__ */ o((l) => 2 ** l * (typeof r?.retryDelay == "number" && !Number.isNaN(r?.retryDelay) ? r.retryDelay : 1e3), "\
3646
2719
  retryDelay")
3647
2720
  });
3648
2721
  }, "prepareRequest");
3649
- async function Is(e, t = { retryDelay: 1e3, immediate: !1 }) {
3650
- let { eventType: r, payload: n, metadata: i, ...s } = e, a = t.stripMetadata ? Tr : {
3651
- ...Tr,
3652
- anonymousId: xs()
2722
+ async function zo(e, t = { retryDelay: 1e3, immediate: !1 }) {
2723
+ let { eventType: r, payload: n, metadata: i, ...s } = e, a = t.stripMetadata ? Ft : {
2724
+ ...Ft,
2725
+ anonymousId: Go()
3653
2726
  }, c;
3654
2727
  try {
3655
- c = El(e, a, t), ft.push(c), t.immediate ? await Promise.all(ft) : await c;
3656
- let u = await Er(), l = he(), f = { ...s, eventType: r, eventId: l, sessionId: u, metadata: i, payload: n, context: a };
3657
- await ws(r, f);
2728
+ c = ga(e, a, t), Ne.push(c), t.immediate ? await Promise.all(Ne) : await c;
2729
+ let u = await Lt(), f = X(), l = { ...s, eventType: r, eventId: f, sessionId: u, metadata: i, payload: n, context: a };
2730
+ await $o(r, l);
3658
2731
  } catch {
3659
2732
  } finally {
3660
- ft = ft.filter((u) => u !== c);
2733
+ Ne = Ne.filter((u) => u !== c);
3661
2734
  }
3662
2735
  }
3663
- o(Is, "sendTelemetry");
2736
+ o(zo, "sendTelemetry");
3664
2737
 
3665
2738
  // src/telemetry/index.ts
3666
- var Tl = /* @__PURE__ */ o((e) => e.startsWith("example-button--") || e.startsWith("example-header--") || e.startsWith("example-page--"), "i\
3667
- sExampleStoryId"), kl = /* @__PURE__ */ o(async (e, t = {}, r = {}) => {
3668
- e !== "boot" && r.notify !== !1 && await _r();
2739
+ var ba = /* @__PURE__ */ o((e) => e.startsWith("example-button--") || e.startsWith("example-header--") || e.startsWith("example-page--"), "i\
2740
+ sExampleStoryId"), xa = /* @__PURE__ */ o(async (e, t = {}, r = {}) => {
2741
+ e !== "boot" && r.notify !== !1 && await Jt();
3669
2742
  let n = {
3670
2743
  eventType: e,
3671
2744
  payload: t
3672
2745
  };
3673
2746
  try {
3674
- r?.stripMetadata || (n.metadata = await Sr(r?.configDir));
2747
+ r?.stripMetadata || (n.metadata = await Nt(r?.configDir));
3675
2748
  } catch (i) {
3676
- n.payload.metadataErrorMessage = ee(i).message, r?.enableCrashReports && (n.payload.metadataError = ee(i));
2749
+ n.payload.metadataErrorMessage = U(i).message, r?.enableCrashReports && (n.payload.metadataError = U(i));
3677
2750
  } finally {
3678
2751
  let { error: i } = n.payload;
3679
- i && (n.payload.error = ee(i)), (!n.payload.error || r?.enableCrashReports) && (process.env?.STORYBOOK_TELEMETRY_DEBUG && (kr.logger.info(
2752
+ i && (n.payload.error = U(i)), (!n.payload.error || r?.enableCrashReports) && (process.env?.STORYBOOK_TELEMETRY_DEBUG && (Bt.logger.info(
3680
2753
  `
3681
- [telemetry]`), kr.logger.info(JSON.stringify(n, null, 2))), await Is(n, r));
2754
+ [telemetry]`), Bt.logger.info(JSON.stringify(n, null, 2))), await zo(n, r));
3682
2755
  }
3683
2756
  }, "telemetry");