storybook 10.1.0-alpha.2 → 10.1.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/_node-chunks/{builder-manager-XRIDLU42.js → builder-manager-GBWCUYRR.js} +12 -12
  2. package/dist/_node-chunks/camelcase-2N6MD2HZ.js +18 -0
  3. package/dist/_node-chunks/{chunk-2L3QAN3W.js → chunk-2JHIUWIN.js} +7 -7
  4. package/dist/_node-chunks/{chunk-3AR5SJTX.js → chunk-5KDXQR2J.js} +7 -7
  5. package/dist/_node-chunks/{chunk-D43KJFPO.js → chunk-5X7FGASE.js} +7 -7
  6. package/dist/_node-chunks/{chunk-LJPS53G5.js → chunk-6U2QTN2E.js} +7 -7
  7. package/dist/_node-chunks/{chunk-WHOPLOGE.js → chunk-APKZWRTX.js} +7 -7
  8. package/dist/_node-chunks/{chunk-QFET4WIW.js → chunk-AX2PCJZ2.js} +6 -6
  9. package/dist/_node-chunks/{chunk-S6RYOO4I.js → chunk-B63HGQAB.js} +9 -9
  10. package/dist/_node-chunks/{chunk-BAE27Z3H.js → chunk-BNO5FB6B.js} +8 -8
  11. package/dist/_node-chunks/{chunk-FWBIPR34.js → chunk-C4UVY6FF.js} +7 -7
  12. package/dist/_node-chunks/{chunk-HFHQNHRU.js → chunk-CKXP5RYA.js} +9 -9
  13. package/dist/_node-chunks/chunk-D3NGJQDZ.js +18 -0
  14. package/dist/_node-chunks/{chunk-6WXUZSNC.js → chunk-FJWQKOXX.js} +10 -10
  15. package/dist/_node-chunks/{chunk-ZN2EDLIJ.js → chunk-GMO24NTJ.js} +7 -7
  16. package/dist/_node-chunks/{chunk-L5J4RBU5.js → chunk-HH57J4TX.js} +8 -8
  17. package/dist/_node-chunks/{chunk-Q5JSLT56.js → chunk-JKWP2FKQ.js} +7 -7
  18. package/dist/_node-chunks/chunk-LPNJ7PJY.js +61 -0
  19. package/dist/_node-chunks/{chunk-FI6CLUVL.js → chunk-MDXYV4OF.js} +15 -15
  20. package/dist/_node-chunks/{chunk-EKPHXLN6.js → chunk-MPUDYIDW.js} +7 -7
  21. package/dist/_node-chunks/{chunk-RQKELEE4.js → chunk-N7XYNLCJ.js} +7 -7
  22. package/dist/_node-chunks/{chunk-GWSFLQQQ.js → chunk-NCHBSJG3.js} +1466 -148
  23. package/dist/_node-chunks/{chunk-6TX2TV3E.js → chunk-NTH76OZA.js} +12 -12
  24. package/dist/_node-chunks/{chunk-5RN3IJGF.js → chunk-NTX43F34.js} +7 -7
  25. package/dist/_node-chunks/{chunk-BB3ZKTWJ.js → chunk-NYXHMPY4.js} +7 -7
  26. package/dist/_node-chunks/{chunk-BYQZFXRF.js → chunk-RLMJDF6S.js} +8 -8
  27. package/dist/_node-chunks/{chunk-IK3K67LJ.js → chunk-S32G4TCP.js} +7 -7
  28. package/dist/_node-chunks/{chunk-OM4TBMP7.js → chunk-SQAKXWVV.js} +7 -7
  29. package/dist/_node-chunks/{chunk-RUJOX3JR.js → chunk-T7KB265F.js} +6 -6
  30. package/dist/_node-chunks/{chunk-QS5MMNF7.js → chunk-TDLKTACT.js} +7 -7
  31. package/dist/_node-chunks/{chunk-ZI3WVJBS.js → chunk-TSKLBMF3.js} +8 -8
  32. package/dist/_node-chunks/{chunk-XVXUF5GE.js → chunk-TZ7GUTJ4.js} +7 -7
  33. package/dist/_node-chunks/{chunk-RIPSSVT6.js → chunk-YFBIEJ33.js} +7 -7
  34. package/dist/_node-chunks/{chunk-VEZ6C62C.js → chunk-YJJWZPL7.js} +8 -8
  35. package/dist/_node-chunks/{chunk-ZTHTAFLY.js → chunk-ZQY3BNST.js} +12 -12
  36. package/dist/_node-chunks/{dist-Q25SOSXX.js → dist-SQENNWFY.js} +9 -9
  37. package/dist/_node-chunks/{globby-I54LIY47.js → globby-CVPDLQ5Z.js} +9 -9
  38. package/dist/_node-chunks/{lib-KQD2WJWJ.js → lib-4BTTMYE2.js} +7 -7
  39. package/dist/_node-chunks/{mdx-N42X6CFJ-CT3A7SBK.js → mdx-N42X6CFJ-ENVHI6CC.js} +8 -8
  40. package/dist/_node-chunks/{p-limit-2NBKFARM.js → p-limit-I2XW6GST.js} +7 -7
  41. package/dist/_node-chunks/{plugin-2CCCBGGB.js → plugin-4NIE24IO.js} +10 -10
  42. package/dist/_node-chunks/{plugin-RF5FICSG.js → plugin-O5PHZ367.js} +10 -10
  43. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-RY56E77L.js → webpack-inject-mocker-runtime-plugin-SVBN7WFH.js} +10 -10
  44. package/dist/_node-chunks/{webpack-mock-plugin-6VDFRSC4.js → webpack-mock-plugin-XBV3VXVD.js} +9 -9
  45. package/dist/babel/index.js +11 -11
  46. package/dist/bin/core.js +11 -11
  47. package/dist/bin/dispatcher.js +11 -11
  48. package/dist/bin/loader.js +9 -9
  49. package/dist/cli/index.js +21 -21
  50. package/dist/common/index.d.ts +190 -2
  51. package/dist/common/index.js +26 -20
  52. package/dist/core-server/index.js +712 -46
  53. package/dist/core-server/presets/common-override-preset.js +9 -9
  54. package/dist/core-server/presets/common-preset.js +23 -23
  55. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
  56. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
  57. package/dist/csf-tools/index.js +9 -9
  58. package/dist/manager/globals-runtime.js +1 -1
  59. package/dist/manager-api/index.d.ts +1 -1
  60. package/dist/manager-api/index.js +1 -1
  61. package/dist/node-logger/index.js +14 -14
  62. package/dist/server-errors.js +10 -10
  63. package/dist/telemetry/index.js +24 -24
  64. package/dist/types/index.d.ts +2 -0
  65. package/package.json +2 -1
  66. package/dist/_node-chunks/camelcase-3IIGGJ6N.js +0 -18
  67. package/dist/_node-chunks/chunk-N3ZE2FCS.js +0 -61
  68. package/dist/_node-chunks/chunk-U6VJQXTG.js +0 -18
@@ -1,20 +1,20 @@
1
- import CJS_COMPAT_NODE_URL_gimmxetvr7 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_gimmxetvr7 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_gimmxetvr7 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_bqgqh4d46dd from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_bqgqh4d46dd from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_bqgqh4d46dd from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_gimmxetvr7.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_gimmxetvr7.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_gimmxetvr7.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_bqgqh4d46dd.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_bqgqh4d46dd.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_bqgqh4d46dd.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  require_picomatch
14
- } from "./chunk-XVXUF5GE.js";
14
+ } from "./chunk-TZ7GUTJ4.js";
15
15
  import {
16
16
  versions_default
17
- } from "./chunk-N3ZE2FCS.js";
17
+ } from "./chunk-LPNJ7PJY.js";
18
18
  import {
19
19
  BUN_LOCKFILE,
20
20
  BUN_LOCKFILE_BINARY,
@@ -27,42 +27,42 @@ import {
27
27
  getProjectRoot,
28
28
  normalizeStoryPath,
29
29
  require_cross_spawn
30
- } from "./chunk-S6RYOO4I.js";
30
+ } from "./chunk-B63HGQAB.js";
31
31
  import {
32
32
  any,
33
33
  from,
34
34
  up2 as up
35
- } from "./chunk-3AR5SJTX.js";
35
+ } from "./chunk-5KDXQR2J.js";
36
36
  import {
37
37
  invariant
38
- } from "./chunk-D43KJFPO.js";
38
+ } from "./chunk-5X7FGASE.js";
39
39
  import {
40
40
  importModule,
41
41
  resolveModulePath,
42
42
  resolvePackageDir,
43
43
  safeResolveModule
44
- } from "./chunk-ZI3WVJBS.js";
44
+ } from "./chunk-TSKLBMF3.js";
45
45
  import {
46
46
  join,
47
47
  parse,
48
48
  resolve
49
- } from "./chunk-LJPS53G5.js";
49
+ } from "./chunk-6U2QTN2E.js";
50
50
  import {
51
51
  require_prompts
52
- } from "./chunk-BB3ZKTWJ.js";
52
+ } from "./chunk-NYXHMPY4.js";
53
53
  import {
54
54
  glob,
55
55
  globSync
56
- } from "./chunk-Q5JSLT56.js";
56
+ } from "./chunk-JKWP2FKQ.js";
57
57
  import {
58
58
  slash
59
- } from "./chunk-EKPHXLN6.js";
59
+ } from "./chunk-MPUDYIDW.js";
60
60
  import {
61
61
  require_dist
62
- } from "./chunk-IK3K67LJ.js";
62
+ } from "./chunk-S32G4TCP.js";
63
63
  import {
64
64
  require_picocolors
65
- } from "./chunk-2L3QAN3W.js";
65
+ } from "./chunk-2JHIUWIN.js";
66
66
  import {
67
67
  __commonJS,
68
68
  __esm,
@@ -71,7 +71,1275 @@ import {
71
71
  __require,
72
72
  __toCommonJS,
73
73
  __toESM
74
- } from "./chunk-RUJOX3JR.js";
74
+ } from "./chunk-T7KB265F.js";
75
+
76
+ // node_modules/resolve/lib/homedir.js
77
+ var require_homedir = __commonJS({
78
+ "node_modules/resolve/lib/homedir.js"(exports, module) {
79
+ "use strict";
80
+ var os2 = __require("os");
81
+ module.exports = os2.homedir || /* @__PURE__ */ __name(function homedir() {
82
+ var home = process.env.HOME;
83
+ var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
84
+ if (process.platform === "win32") {
85
+ return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null;
86
+ }
87
+ if (process.platform === "darwin") {
88
+ return home || (user ? "/Users/" + user : null);
89
+ }
90
+ if (process.platform === "linux") {
91
+ return home || (process.getuid() === 0 ? "/root" : user ? "/home/" + user : null);
92
+ }
93
+ return home || null;
94
+ }, "homedir");
95
+ }
96
+ });
97
+
98
+ // node_modules/resolve/lib/caller.js
99
+ var require_caller = __commonJS({
100
+ "node_modules/resolve/lib/caller.js"(exports, module) {
101
+ module.exports = function() {
102
+ var origPrepareStackTrace = Error.prepareStackTrace;
103
+ Error.prepareStackTrace = function(_, stack2) {
104
+ return stack2;
105
+ };
106
+ var stack = new Error().stack;
107
+ Error.prepareStackTrace = origPrepareStackTrace;
108
+ return stack[2].getFileName();
109
+ };
110
+ }
111
+ });
112
+
113
+ // ../node_modules/path-parse/index.js
114
+ var require_path_parse = __commonJS({
115
+ "../node_modules/path-parse/index.js"(exports, module) {
116
+ "use strict";
117
+ var isWindows = process.platform === "win32";
118
+ var splitWindowsRe = /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/;
119
+ var win32 = {};
120
+ function win32SplitPath(filename) {
121
+ return splitWindowsRe.exec(filename).slice(1);
122
+ }
123
+ __name(win32SplitPath, "win32SplitPath");
124
+ win32.parse = function(pathString) {
125
+ if (typeof pathString !== "string") {
126
+ throw new TypeError(
127
+ "Parameter 'pathString' must be a string, not " + typeof pathString
128
+ );
129
+ }
130
+ var allParts = win32SplitPath(pathString);
131
+ if (!allParts || allParts.length !== 5) {
132
+ throw new TypeError("Invalid path '" + pathString + "'");
133
+ }
134
+ return {
135
+ root: allParts[1],
136
+ dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1),
137
+ base: allParts[2],
138
+ ext: allParts[4],
139
+ name: allParts[3]
140
+ };
141
+ };
142
+ var splitPathRe = /^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/;
143
+ var posix4 = {};
144
+ function posixSplitPath(filename) {
145
+ return splitPathRe.exec(filename).slice(1);
146
+ }
147
+ __name(posixSplitPath, "posixSplitPath");
148
+ posix4.parse = function(pathString) {
149
+ if (typeof pathString !== "string") {
150
+ throw new TypeError(
151
+ "Parameter 'pathString' must be a string, not " + typeof pathString
152
+ );
153
+ }
154
+ var allParts = posixSplitPath(pathString);
155
+ if (!allParts || allParts.length !== 5) {
156
+ throw new TypeError("Invalid path '" + pathString + "'");
157
+ }
158
+ return {
159
+ root: allParts[1],
160
+ dir: allParts[0].slice(0, -1),
161
+ base: allParts[2],
162
+ ext: allParts[4],
163
+ name: allParts[3]
164
+ };
165
+ };
166
+ if (isWindows)
167
+ module.exports = win32.parse;
168
+ else
169
+ module.exports = posix4.parse;
170
+ module.exports.posix = posix4.parse;
171
+ module.exports.win32 = win32.parse;
172
+ }
173
+ });
174
+
175
+ // node_modules/resolve/lib/node-modules-paths.js
176
+ var require_node_modules_paths = __commonJS({
177
+ "node_modules/resolve/lib/node-modules-paths.js"(exports, module) {
178
+ var path = __require("path");
179
+ var parse4 = path.parse || require_path_parse();
180
+ var driveLetterRegex = /^([A-Za-z]:)/;
181
+ var uncPathRegex = /^\\\\/;
182
+ var getNodeModulesDirs = /* @__PURE__ */ __name(function getNodeModulesDirs2(absoluteStart, modules) {
183
+ var prefix = "/";
184
+ if (driveLetterRegex.test(absoluteStart)) {
185
+ prefix = "";
186
+ } else if (uncPathRegex.test(absoluteStart)) {
187
+ prefix = "\\\\";
188
+ }
189
+ var paths = [absoluteStart];
190
+ var parsed = parse4(absoluteStart);
191
+ while (parsed.dir !== paths[paths.length - 1]) {
192
+ paths.push(parsed.dir);
193
+ parsed = parse4(parsed.dir);
194
+ }
195
+ return paths.reduce(function(dirs, aPath) {
196
+ return dirs.concat(modules.map(function(moduleDir) {
197
+ return path.resolve(prefix, aPath, moduleDir);
198
+ }));
199
+ }, []);
200
+ }, "getNodeModulesDirs");
201
+ module.exports = /* @__PURE__ */ __name(function nodeModulesPaths(start, opts, request) {
202
+ var modules = opts && opts.moduleDirectory ? [].concat(opts.moduleDirectory) : ["node_modules"];
203
+ if (opts && typeof opts.paths === "function") {
204
+ return opts.paths(
205
+ request,
206
+ start,
207
+ function() {
208
+ return getNodeModulesDirs(start, modules);
209
+ },
210
+ opts
211
+ );
212
+ }
213
+ var dirs = getNodeModulesDirs(start, modules);
214
+ return opts && opts.paths ? dirs.concat(opts.paths) : dirs;
215
+ }, "nodeModulesPaths");
216
+ }
217
+ });
218
+
219
+ // node_modules/resolve/lib/normalize-options.js
220
+ var require_normalize_options = __commonJS({
221
+ "node_modules/resolve/lib/normalize-options.js"(exports, module) {
222
+ var path = __require("path");
223
+ module.exports = function(_, opts) {
224
+ opts = opts || {};
225
+ if (opts.forceNodeResolution || !process.versions.pnp)
226
+ return opts;
227
+ const { findPnpApi } = __require("module");
228
+ const runPnpResolution = /* @__PURE__ */ __name((request, basedir) => {
229
+ const parts = request.match(/^((?:@[^/]+\/)?[^/]+)(\/.*)?/);
230
+ if (!parts)
231
+ throw new Error(`Assertion failed: Expected the "resolve" package to call the "paths" callback with package names only (got "${request}")`);
232
+ if (basedir.charAt(basedir.length - 1) !== `/`)
233
+ basedir = path.join(basedir, `/`);
234
+ const api = findPnpApi(basedir);
235
+ if (api === null)
236
+ return void 0;
237
+ let manifestPath;
238
+ try {
239
+ manifestPath = api.resolveToUnqualified(`${parts[1]}/package.json`, basedir, { considerBuiltins: false });
240
+ } catch (err) {
241
+ return null;
242
+ }
243
+ if (manifestPath === null)
244
+ throw new Error(`Assertion failed: The resolution thinks that "${parts[1]}" is a Node builtin`);
245
+ const packagePath = path.dirname(manifestPath);
246
+ const unqualifiedPath = typeof parts[2] !== `undefined` ? path.join(packagePath, parts[2]) : packagePath;
247
+ return { packagePath, unqualifiedPath };
248
+ }, "runPnpResolution");
249
+ const runPnpResolutionOnArray = /* @__PURE__ */ __name((request, paths2) => {
250
+ for (let i = 0; i < paths2.length; i++) {
251
+ const resolution = runPnpResolution(request, paths2[i]);
252
+ if (resolution || i === paths2.length - 1) {
253
+ return resolution;
254
+ }
255
+ }
256
+ return null;
257
+ }, "runPnpResolutionOnArray");
258
+ const originalPaths = Array.isArray(opts.paths) ? opts.paths : [];
259
+ const packageIterator = /* @__PURE__ */ __name((request, basedir, getCandidates, opts2) => {
260
+ const pathsToTest = [basedir].concat(originalPaths);
261
+ const resolution = runPnpResolutionOnArray(request, pathsToTest);
262
+ if (resolution == null)
263
+ return getCandidates();
264
+ return [resolution.unqualifiedPath];
265
+ }, "packageIterator");
266
+ const paths = /* @__PURE__ */ __name((request, basedir, getNodeModulePaths, opts2) => {
267
+ const pathsToTest = [basedir].concat(originalPaths);
268
+ const resolution = runPnpResolutionOnArray(request, pathsToTest);
269
+ if (resolution == null)
270
+ return getNodeModulePaths().concat(originalPaths);
271
+ let nodeModules = path.dirname(resolution.packagePath);
272
+ if (request.match(/^@[^/]+\//))
273
+ nodeModules = path.dirname(nodeModules);
274
+ return [nodeModules];
275
+ }, "paths");
276
+ let isInsideIterator = false;
277
+ if (!opts.__skipPackageIterator) {
278
+ opts.packageIterator = function(request, basedir, getCandidates, opts2) {
279
+ isInsideIterator = true;
280
+ try {
281
+ return packageIterator(request, basedir, getCandidates, opts2);
282
+ } finally {
283
+ isInsideIterator = false;
284
+ }
285
+ };
286
+ }
287
+ opts.paths = function(request, basedir, getNodeModulePaths, opts2) {
288
+ if (isInsideIterator)
289
+ return getNodeModulePaths().concat(originalPaths);
290
+ return paths(request, basedir, getNodeModulePaths, opts2);
291
+ };
292
+ return opts;
293
+ };
294
+ }
295
+ });
296
+
297
+ // ../node_modules/function-bind/implementation.js
298
+ var require_implementation = __commonJS({
299
+ "../node_modules/function-bind/implementation.js"(exports, module) {
300
+ "use strict";
301
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
302
+ var toStr = Object.prototype.toString;
303
+ var max = Math.max;
304
+ var funcType = "[object Function]";
305
+ var concatty = /* @__PURE__ */ __name(function concatty2(a, b) {
306
+ var arr = [];
307
+ for (var i = 0; i < a.length; i += 1) {
308
+ arr[i] = a[i];
309
+ }
310
+ for (var j = 0; j < b.length; j += 1) {
311
+ arr[j + a.length] = b[j];
312
+ }
313
+ return arr;
314
+ }, "concatty");
315
+ var slicy = /* @__PURE__ */ __name(function slicy2(arrLike, offset) {
316
+ var arr = [];
317
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
318
+ arr[j] = arrLike[i];
319
+ }
320
+ return arr;
321
+ }, "slicy");
322
+ var joiny = /* @__PURE__ */ __name(function(arr, joiner) {
323
+ var str = "";
324
+ for (var i = 0; i < arr.length; i += 1) {
325
+ str += arr[i];
326
+ if (i + 1 < arr.length) {
327
+ str += joiner;
328
+ }
329
+ }
330
+ return str;
331
+ }, "joiny");
332
+ module.exports = /* @__PURE__ */ __name(function bind(that) {
333
+ var target = this;
334
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
335
+ throw new TypeError(ERROR_MESSAGE + target);
336
+ }
337
+ var args = slicy(arguments, 1);
338
+ var bound;
339
+ var binder = /* @__PURE__ */ __name(function() {
340
+ if (this instanceof bound) {
341
+ var result = target.apply(
342
+ this,
343
+ concatty(args, arguments)
344
+ );
345
+ if (Object(result) === result) {
346
+ return result;
347
+ }
348
+ return this;
349
+ }
350
+ return target.apply(
351
+ that,
352
+ concatty(args, arguments)
353
+ );
354
+ }, "binder");
355
+ var boundLength = max(0, target.length - args.length);
356
+ var boundArgs = [];
357
+ for (var i = 0; i < boundLength; i++) {
358
+ boundArgs[i] = "$" + i;
359
+ }
360
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
361
+ if (target.prototype) {
362
+ var Empty = /* @__PURE__ */ __name(function Empty2() {
363
+ }, "Empty");
364
+ Empty.prototype = target.prototype;
365
+ bound.prototype = new Empty();
366
+ Empty.prototype = null;
367
+ }
368
+ return bound;
369
+ }, "bind");
370
+ }
371
+ });
372
+
373
+ // ../node_modules/function-bind/index.js
374
+ var require_function_bind = __commonJS({
375
+ "../node_modules/function-bind/index.js"(exports, module) {
376
+ "use strict";
377
+ var implementation = require_implementation();
378
+ module.exports = Function.prototype.bind || implementation;
379
+ }
380
+ });
381
+
382
+ // ../node_modules/hasown/index.js
383
+ var require_hasown = __commonJS({
384
+ "../node_modules/hasown/index.js"(exports, module) {
385
+ "use strict";
386
+ var call = Function.prototype.call;
387
+ var $hasOwn = Object.prototype.hasOwnProperty;
388
+ var bind = require_function_bind();
389
+ module.exports = bind.call(call, $hasOwn);
390
+ }
391
+ });
392
+
393
+ // ../node_modules/is-core-module/core.json
394
+ var require_core = __commonJS({
395
+ "../node_modules/is-core-module/core.json"(exports, module) {
396
+ module.exports = {
397
+ assert: true,
398
+ "node:assert": [">= 14.18 && < 15", ">= 16"],
399
+ "assert/strict": ">= 15",
400
+ "node:assert/strict": ">= 16",
401
+ async_hooks: ">= 8",
402
+ "node:async_hooks": [">= 14.18 && < 15", ">= 16"],
403
+ buffer_ieee754: ">= 0.5 && < 0.9.7",
404
+ buffer: true,
405
+ "node:buffer": [">= 14.18 && < 15", ">= 16"],
406
+ child_process: true,
407
+ "node:child_process": [">= 14.18 && < 15", ">= 16"],
408
+ cluster: ">= 0.5",
409
+ "node:cluster": [">= 14.18 && < 15", ">= 16"],
410
+ console: true,
411
+ "node:console": [">= 14.18 && < 15", ">= 16"],
412
+ constants: true,
413
+ "node:constants": [">= 14.18 && < 15", ">= 16"],
414
+ crypto: true,
415
+ "node:crypto": [">= 14.18 && < 15", ">= 16"],
416
+ _debug_agent: ">= 1 && < 8",
417
+ _debugger: "< 8",
418
+ dgram: true,
419
+ "node:dgram": [">= 14.18 && < 15", ">= 16"],
420
+ diagnostics_channel: [">= 14.17 && < 15", ">= 15.1"],
421
+ "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
422
+ dns: true,
423
+ "node:dns": [">= 14.18 && < 15", ">= 16"],
424
+ "dns/promises": ">= 15",
425
+ "node:dns/promises": ">= 16",
426
+ domain: ">= 0.7.12",
427
+ "node:domain": [">= 14.18 && < 15", ">= 16"],
428
+ events: true,
429
+ "node:events": [">= 14.18 && < 15", ">= 16"],
430
+ freelist: "< 6",
431
+ fs: true,
432
+ "node:fs": [">= 14.18 && < 15", ">= 16"],
433
+ "fs/promises": [">= 10 && < 10.1", ">= 14"],
434
+ "node:fs/promises": [">= 14.18 && < 15", ">= 16"],
435
+ _http_agent: ">= 0.11.1",
436
+ "node:_http_agent": [">= 14.18 && < 15", ">= 16"],
437
+ _http_client: ">= 0.11.1",
438
+ "node:_http_client": [">= 14.18 && < 15", ">= 16"],
439
+ _http_common: ">= 0.11.1",
440
+ "node:_http_common": [">= 14.18 && < 15", ">= 16"],
441
+ _http_incoming: ">= 0.11.1",
442
+ "node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
443
+ _http_outgoing: ">= 0.11.1",
444
+ "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
445
+ _http_server: ">= 0.11.1",
446
+ "node:_http_server": [">= 14.18 && < 15", ">= 16"],
447
+ http: true,
448
+ "node:http": [">= 14.18 && < 15", ">= 16"],
449
+ http2: ">= 8.8",
450
+ "node:http2": [">= 14.18 && < 15", ">= 16"],
451
+ https: true,
452
+ "node:https": [">= 14.18 && < 15", ">= 16"],
453
+ inspector: ">= 8",
454
+ "node:inspector": [">= 14.18 && < 15", ">= 16"],
455
+ "inspector/promises": [">= 19"],
456
+ "node:inspector/promises": [">= 19"],
457
+ _linklist: "< 8",
458
+ module: true,
459
+ "node:module": [">= 14.18 && < 15", ">= 16"],
460
+ net: true,
461
+ "node:net": [">= 14.18 && < 15", ">= 16"],
462
+ "node-inspect/lib/_inspect": ">= 7.6 && < 12",
463
+ "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
464
+ "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
465
+ os: true,
466
+ "node:os": [">= 14.18 && < 15", ">= 16"],
467
+ path: true,
468
+ "node:path": [">= 14.18 && < 15", ">= 16"],
469
+ "path/posix": ">= 15.3",
470
+ "node:path/posix": ">= 16",
471
+ "path/win32": ">= 15.3",
472
+ "node:path/win32": ">= 16",
473
+ perf_hooks: ">= 8.5",
474
+ "node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
475
+ process: ">= 1",
476
+ "node:process": [">= 14.18 && < 15", ">= 16"],
477
+ punycode: ">= 0.5",
478
+ "node:punycode": [">= 14.18 && < 15", ">= 16"],
479
+ querystring: true,
480
+ "node:querystring": [">= 14.18 && < 15", ">= 16"],
481
+ readline: true,
482
+ "node:readline": [">= 14.18 && < 15", ">= 16"],
483
+ "readline/promises": ">= 17",
484
+ "node:readline/promises": ">= 17",
485
+ repl: true,
486
+ "node:repl": [">= 14.18 && < 15", ">= 16"],
487
+ "node:sea": [">= 20.12 && < 21", ">= 21.7"],
488
+ smalloc: ">= 0.11.5 && < 3",
489
+ "node:sqlite": [">= 22.13 && < 23", ">= 23.4"],
490
+ _stream_duplex: ">= 0.9.4",
491
+ "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
492
+ _stream_transform: ">= 0.9.4",
493
+ "node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
494
+ _stream_wrap: ">= 1.4.1",
495
+ "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
496
+ _stream_passthrough: ">= 0.9.4",
497
+ "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
498
+ _stream_readable: ">= 0.9.4",
499
+ "node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
500
+ _stream_writable: ">= 0.9.4",
501
+ "node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
502
+ stream: true,
503
+ "node:stream": [">= 14.18 && < 15", ">= 16"],
504
+ "stream/consumers": ">= 16.7",
505
+ "node:stream/consumers": ">= 16.7",
506
+ "stream/promises": ">= 15",
507
+ "node:stream/promises": ">= 16",
508
+ "stream/web": ">= 16.5",
509
+ "node:stream/web": ">= 16.5",
510
+ string_decoder: true,
511
+ "node:string_decoder": [">= 14.18 && < 15", ">= 16"],
512
+ sys: [">= 0.4 && < 0.7", ">= 0.8"],
513
+ "node:sys": [">= 14.18 && < 15", ">= 16"],
514
+ "test/reporters": ">= 19.9 && < 20.2",
515
+ "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"],
516
+ "test/mock_loader": ">= 22.3 && < 22.7",
517
+ "node:test/mock_loader": ">= 22.3 && < 22.7",
518
+ "node:test": [">= 16.17 && < 17", ">= 18"],
519
+ timers: true,
520
+ "node:timers": [">= 14.18 && < 15", ">= 16"],
521
+ "timers/promises": ">= 15",
522
+ "node:timers/promises": ">= 16",
523
+ _tls_common: ">= 0.11.13",
524
+ "node:_tls_common": [">= 14.18 && < 15", ">= 16"],
525
+ _tls_legacy: ">= 0.11.3 && < 10",
526
+ _tls_wrap: ">= 0.11.3",
527
+ "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
528
+ tls: true,
529
+ "node:tls": [">= 14.18 && < 15", ">= 16"],
530
+ trace_events: ">= 10",
531
+ "node:trace_events": [">= 14.18 && < 15", ">= 16"],
532
+ tty: true,
533
+ "node:tty": [">= 14.18 && < 15", ">= 16"],
534
+ url: true,
535
+ "node:url": [">= 14.18 && < 15", ">= 16"],
536
+ util: true,
537
+ "node:util": [">= 14.18 && < 15", ">= 16"],
538
+ "util/types": ">= 15.3",
539
+ "node:util/types": ">= 16",
540
+ "v8/tools/arguments": ">= 10 && < 12",
541
+ "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"],
542
+ "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"],
543
+ "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"],
544
+ "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"],
545
+ "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"],
546
+ "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"],
547
+ v8: ">= 1",
548
+ "node:v8": [">= 14.18 && < 15", ">= 16"],
549
+ vm: true,
550
+ "node:vm": [">= 14.18 && < 15", ">= 16"],
551
+ wasi: [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"],
552
+ "node:wasi": [">= 18.17 && < 19", ">= 20"],
553
+ worker_threads: ">= 11.7",
554
+ "node:worker_threads": [">= 14.18 && < 15", ">= 16"],
555
+ zlib: ">= 0.5",
556
+ "node:zlib": [">= 14.18 && < 15", ">= 16"]
557
+ };
558
+ }
559
+ });
560
+
561
+ // ../node_modules/is-core-module/index.js
562
+ var require_is_core_module = __commonJS({
563
+ "../node_modules/is-core-module/index.js"(exports, module) {
564
+ "use strict";
565
+ var hasOwn = require_hasown();
566
+ function specifierIncluded(current, specifier) {
567
+ var nodeParts = current.split(".");
568
+ var parts = specifier.split(" ");
569
+ var op = parts.length > 1 ? parts[0] : "=";
570
+ var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split(".");
571
+ for (var i = 0; i < 3; ++i) {
572
+ var cur = parseInt(nodeParts[i] || 0, 10);
573
+ var ver = parseInt(versionParts[i] || 0, 10);
574
+ if (cur === ver) {
575
+ continue;
576
+ }
577
+ if (op === "<") {
578
+ return cur < ver;
579
+ }
580
+ if (op === ">=") {
581
+ return cur >= ver;
582
+ }
583
+ return false;
584
+ }
585
+ return op === ">=";
586
+ }
587
+ __name(specifierIncluded, "specifierIncluded");
588
+ function matchesRange(current, range) {
589
+ var specifiers = range.split(/ ?&& ?/);
590
+ if (specifiers.length === 0) {
591
+ return false;
592
+ }
593
+ for (var i = 0; i < specifiers.length; ++i) {
594
+ if (!specifierIncluded(current, specifiers[i])) {
595
+ return false;
596
+ }
597
+ }
598
+ return true;
599
+ }
600
+ __name(matchesRange, "matchesRange");
601
+ function versionIncluded(nodeVersion, specifierValue) {
602
+ if (typeof specifierValue === "boolean") {
603
+ return specifierValue;
604
+ }
605
+ var current = typeof nodeVersion === "undefined" ? process.versions && process.versions.node : nodeVersion;
606
+ if (typeof current !== "string") {
607
+ throw new TypeError(typeof nodeVersion === "undefined" ? "Unable to determine current node version" : "If provided, a valid node version is required");
608
+ }
609
+ if (specifierValue && typeof specifierValue === "object") {
610
+ for (var i = 0; i < specifierValue.length; ++i) {
611
+ if (matchesRange(current, specifierValue[i])) {
612
+ return true;
613
+ }
614
+ }
615
+ return false;
616
+ }
617
+ return matchesRange(current, specifierValue);
618
+ }
619
+ __name(versionIncluded, "versionIncluded");
620
+ var data = require_core();
621
+ module.exports = /* @__PURE__ */ __name(function isCore(x, nodeVersion) {
622
+ return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]);
623
+ }, "isCore");
624
+ }
625
+ });
626
+
627
+ // node_modules/resolve/lib/async.js
628
+ var require_async = __commonJS({
629
+ "node_modules/resolve/lib/async.js"(exports, module) {
630
+ var fs = __require("fs");
631
+ var getHomedir = require_homedir();
632
+ var path = __require("path");
633
+ var caller = require_caller();
634
+ var nodeModulesPaths = require_node_modules_paths();
635
+ var normalizeOptions = require_normalize_options();
636
+ var isCore = require_is_core_module();
637
+ var realpathFS = process.platform !== "win32" && fs.realpath && typeof fs.realpath.native === "function" ? fs.realpath.native : fs.realpath;
638
+ var relativePathRegex = /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/;
639
+ var windowsDriveRegex = /^\w:[/\\]*$/;
640
+ var nodeModulesRegex = /[/\\]node_modules[/\\]*$/;
641
+ var homedir = getHomedir();
642
+ var defaultPaths = /* @__PURE__ */ __name(function() {
643
+ return [
644
+ path.join(homedir, ".node_modules"),
645
+ path.join(homedir, ".node_libraries")
646
+ ];
647
+ }, "defaultPaths");
648
+ var defaultIsFile = /* @__PURE__ */ __name(function isFile(file, cb) {
649
+ fs.stat(file, function(err, stat) {
650
+ if (!err) {
651
+ return cb(null, stat.isFile() || stat.isFIFO());
652
+ }
653
+ if (err.code === "ENOENT" || err.code === "ENOTDIR") return cb(null, false);
654
+ return cb(err);
655
+ });
656
+ }, "isFile");
657
+ var defaultIsDir = /* @__PURE__ */ __name(function isDirectory2(dir, cb) {
658
+ fs.stat(dir, function(err, stat) {
659
+ if (!err) {
660
+ return cb(null, stat.isDirectory());
661
+ }
662
+ if (err.code === "ENOENT" || err.code === "ENOTDIR") return cb(null, false);
663
+ return cb(err);
664
+ });
665
+ }, "isDirectory");
666
+ var defaultRealpath = /* @__PURE__ */ __name(function realpath2(x, cb) {
667
+ realpathFS(x, function(realpathErr, realPath) {
668
+ if (realpathErr && realpathErr.code !== "ENOENT") cb(realpathErr);
669
+ else cb(null, realpathErr ? x : realPath);
670
+ });
671
+ }, "realpath");
672
+ var maybeRealpath = /* @__PURE__ */ __name(function maybeRealpath2(realpath2, x, opts, cb) {
673
+ if (opts && opts.preserveSymlinks === false) {
674
+ realpath2(x, cb);
675
+ } else {
676
+ cb(null, x);
677
+ }
678
+ }, "maybeRealpath");
679
+ var defaultReadPackage = /* @__PURE__ */ __name(function defaultReadPackage2(readFile7, pkgfile, cb) {
680
+ readFile7(pkgfile, function(readFileErr, body) {
681
+ if (readFileErr) cb(readFileErr);
682
+ else {
683
+ try {
684
+ var pkg = JSON.parse(body);
685
+ cb(null, pkg);
686
+ } catch (jsonErr) {
687
+ cb(null);
688
+ }
689
+ }
690
+ });
691
+ }, "defaultReadPackage");
692
+ var getPackageCandidates = /* @__PURE__ */ __name(function getPackageCandidates2(x, start, opts) {
693
+ var dirs = nodeModulesPaths(start, opts, x);
694
+ for (var i = 0; i < dirs.length; i++) {
695
+ dirs[i] = path.join(dirs[i], x);
696
+ }
697
+ return dirs;
698
+ }, "getPackageCandidates");
699
+ module.exports = /* @__PURE__ */ __name(function resolve9(x, options, callback) {
700
+ var cb = callback;
701
+ var opts = options;
702
+ if (typeof options === "function") {
703
+ cb = opts;
704
+ opts = {};
705
+ }
706
+ if (typeof x !== "string") {
707
+ var err = new TypeError("Path must be a string.");
708
+ return process.nextTick(function() {
709
+ cb(err);
710
+ });
711
+ }
712
+ opts = normalizeOptions(x, opts);
713
+ var isFile = opts.isFile || defaultIsFile;
714
+ var isDirectory2 = opts.isDirectory || defaultIsDir;
715
+ var readFile7 = opts.readFile || fs.readFile;
716
+ var realpath2 = opts.realpath || defaultRealpath;
717
+ var readPackage = opts.readPackage || defaultReadPackage;
718
+ if (opts.readFile && opts.readPackage) {
719
+ var conflictErr = new TypeError("`readFile` and `readPackage` are mutually exclusive.");
720
+ return process.nextTick(function() {
721
+ cb(conflictErr);
722
+ });
723
+ }
724
+ var packageIterator = opts.packageIterator;
725
+ var extensions = opts.extensions || [".js"];
726
+ var includeCoreModules = opts.includeCoreModules !== false;
727
+ var basedir = opts.basedir || path.dirname(caller());
728
+ var parent = opts.filename || basedir;
729
+ opts.paths = opts.paths || defaultPaths();
730
+ var absoluteStart = path.resolve(basedir);
731
+ maybeRealpath(
732
+ realpath2,
733
+ absoluteStart,
734
+ opts,
735
+ function(err2, realStart) {
736
+ if (err2) cb(err2);
737
+ else init(realStart);
738
+ }
739
+ );
740
+ var res;
741
+ function init(basedir2) {
742
+ if (relativePathRegex.test(x)) {
743
+ res = path.resolve(basedir2, x);
744
+ if (x === "." || x === ".." || x.slice(-1) === "/") res += "/";
745
+ if (x.slice(-1) === "/" && res === basedir2) {
746
+ loadAsDirectory(res, opts.package, onfile);
747
+ } else loadAsFile(res, opts.package, onfile);
748
+ } else if (includeCoreModules && isCore(x)) {
749
+ return cb(null, x);
750
+ } else loadNodeModules(x, basedir2, function(err2, n, pkg) {
751
+ if (err2) cb(err2);
752
+ else if (n) {
753
+ return maybeRealpath(realpath2, n, opts, function(err3, realN) {
754
+ if (err3) {
755
+ cb(err3);
756
+ } else {
757
+ cb(null, realN, pkg);
758
+ }
759
+ });
760
+ } else {
761
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
762
+ moduleError.code = "MODULE_NOT_FOUND";
763
+ cb(moduleError);
764
+ }
765
+ });
766
+ }
767
+ __name(init, "init");
768
+ function onfile(err2, m, pkg) {
769
+ if (err2) cb(err2);
770
+ else if (m) cb(null, m, pkg);
771
+ else loadAsDirectory(res, function(err3, d, pkg2) {
772
+ if (err3) cb(err3);
773
+ else if (d) {
774
+ maybeRealpath(realpath2, d, opts, function(err4, realD) {
775
+ if (err4) {
776
+ cb(err4);
777
+ } else {
778
+ cb(null, realD, pkg2);
779
+ }
780
+ });
781
+ } else {
782
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
783
+ moduleError.code = "MODULE_NOT_FOUND";
784
+ cb(moduleError);
785
+ }
786
+ });
787
+ }
788
+ __name(onfile, "onfile");
789
+ function loadAsFile(x2, thePackage, callback2) {
790
+ var loadAsFilePackage = thePackage;
791
+ var cb2 = callback2;
792
+ if (typeof loadAsFilePackage === "function") {
793
+ cb2 = loadAsFilePackage;
794
+ loadAsFilePackage = void 0;
795
+ }
796
+ var exts = [""].concat(extensions);
797
+ load(exts, x2, loadAsFilePackage);
798
+ function load(exts2, x3, loadPackage) {
799
+ if (exts2.length === 0) return cb2(null, void 0, loadPackage);
800
+ var file = x3 + exts2[0];
801
+ var pkg = loadPackage;
802
+ if (pkg) onpkg(null, pkg);
803
+ else loadpkg(path.dirname(file), onpkg);
804
+ function onpkg(err2, pkg_, dir) {
805
+ pkg = pkg_;
806
+ if (err2) return cb2(err2);
807
+ if (dir && pkg && opts.pathFilter) {
808
+ var rfile = path.relative(dir, file);
809
+ var rel = rfile.slice(0, rfile.length - exts2[0].length);
810
+ var r = opts.pathFilter(pkg, x3, rel);
811
+ if (r) return load(
812
+ [""].concat(extensions.slice()),
813
+ path.resolve(dir, r),
814
+ pkg
815
+ );
816
+ }
817
+ isFile(file, onex);
818
+ }
819
+ __name(onpkg, "onpkg");
820
+ function onex(err2, ex) {
821
+ if (err2) return cb2(err2);
822
+ if (ex) return cb2(null, file, pkg);
823
+ load(exts2.slice(1), x3, pkg);
824
+ }
825
+ __name(onex, "onex");
826
+ }
827
+ __name(load, "load");
828
+ }
829
+ __name(loadAsFile, "loadAsFile");
830
+ function loadpkg(dir, cb2) {
831
+ if (dir === "" || dir === "/") return cb2(null);
832
+ if (process.platform === "win32" && windowsDriveRegex.test(dir)) {
833
+ return cb2(null);
834
+ }
835
+ if (nodeModulesRegex.test(dir)) return cb2(null);
836
+ maybeRealpath(realpath2, dir, opts, function(unwrapErr, pkgdir) {
837
+ if (unwrapErr) return loadpkg(path.dirname(dir), cb2);
838
+ var pkgfile = path.join(pkgdir, "package.json");
839
+ isFile(pkgfile, function(err2, ex) {
840
+ if (!ex) return loadpkg(path.dirname(dir), cb2);
841
+ readPackage(readFile7, pkgfile, function(err3, pkgParam) {
842
+ if (err3) cb2(err3);
843
+ var pkg = pkgParam;
844
+ if (pkg && opts.packageFilter) {
845
+ pkg = opts.packageFilter(pkg, pkgfile);
846
+ }
847
+ cb2(null, pkg, dir);
848
+ });
849
+ });
850
+ });
851
+ }
852
+ __name(loadpkg, "loadpkg");
853
+ function loadAsDirectory(x2, loadAsDirectoryPackage, callback2) {
854
+ var cb2 = callback2;
855
+ var fpkg = loadAsDirectoryPackage;
856
+ if (typeof fpkg === "function") {
857
+ cb2 = fpkg;
858
+ fpkg = opts.package;
859
+ }
860
+ maybeRealpath(realpath2, x2, opts, function(unwrapErr, pkgdir) {
861
+ if (unwrapErr) return cb2(unwrapErr);
862
+ var pkgfile = path.join(pkgdir, "package.json");
863
+ isFile(pkgfile, function(err2, ex) {
864
+ if (err2) return cb2(err2);
865
+ if (!ex) return loadAsFile(path.join(x2, "index"), fpkg, cb2);
866
+ readPackage(readFile7, pkgfile, function(err3, pkgParam) {
867
+ if (err3) return cb2(err3);
868
+ var pkg = pkgParam;
869
+ if (pkg && opts.packageFilter) {
870
+ pkg = opts.packageFilter(pkg, pkgfile);
871
+ }
872
+ if (pkg && pkg.main) {
873
+ if (typeof pkg.main !== "string") {
874
+ var mainError = new TypeError("package \u201C" + pkg.name + "\u201D `main` must be a string");
875
+ mainError.code = "INVALID_PACKAGE_MAIN";
876
+ return cb2(mainError);
877
+ }
878
+ if (pkg.main === "." || pkg.main === "./") {
879
+ pkg.main = "index";
880
+ }
881
+ loadAsFile(path.resolve(x2, pkg.main), pkg, function(err4, m, pkg2) {
882
+ if (err4) return cb2(err4);
883
+ if (m) return cb2(null, m, pkg2);
884
+ if (!pkg2) return loadAsFile(path.join(x2, "index"), pkg2, cb2);
885
+ var dir = path.resolve(x2, pkg2.main);
886
+ loadAsDirectory(dir, pkg2, function(err5, n, pkg3) {
887
+ if (err5) return cb2(err5);
888
+ if (n) return cb2(null, n, pkg3);
889
+ loadAsFile(path.join(x2, "index"), pkg3, cb2);
890
+ });
891
+ });
892
+ return;
893
+ }
894
+ loadAsFile(path.join(x2, "/index"), pkg, cb2);
895
+ });
896
+ });
897
+ });
898
+ }
899
+ __name(loadAsDirectory, "loadAsDirectory");
900
+ function processDirs(cb2, dirs) {
901
+ if (dirs.length === 0) return cb2(null, void 0);
902
+ var dir = dirs[0];
903
+ isDirectory2(path.dirname(dir), isdir);
904
+ function isdir(err2, isdir2) {
905
+ if (err2) return cb2(err2);
906
+ if (!isdir2) return processDirs(cb2, dirs.slice(1));
907
+ loadAsFile(dir, opts.package, onfile2);
908
+ }
909
+ __name(isdir, "isdir");
910
+ function onfile2(err2, m, pkg) {
911
+ if (err2) return cb2(err2);
912
+ if (m) return cb2(null, m, pkg);
913
+ loadAsDirectory(dir, opts.package, ondir);
914
+ }
915
+ __name(onfile2, "onfile");
916
+ function ondir(err2, n, pkg) {
917
+ if (err2) return cb2(err2);
918
+ if (n) return cb2(null, n, pkg);
919
+ processDirs(cb2, dirs.slice(1));
920
+ }
921
+ __name(ondir, "ondir");
922
+ }
923
+ __name(processDirs, "processDirs");
924
+ function loadNodeModules(x2, start, cb2) {
925
+ var thunk = /* @__PURE__ */ __name(function() {
926
+ return getPackageCandidates(x2, start, opts);
927
+ }, "thunk");
928
+ processDirs(
929
+ cb2,
930
+ packageIterator ? packageIterator(x2, start, thunk, opts) : thunk()
931
+ );
932
+ }
933
+ __name(loadNodeModules, "loadNodeModules");
934
+ }, "resolve");
935
+ }
936
+ });
937
+
938
+ // node_modules/resolve/lib/core.json
939
+ var require_core2 = __commonJS({
940
+ "node_modules/resolve/lib/core.json"(exports, module) {
941
+ module.exports = {
942
+ assert: true,
943
+ "node:assert": [">= 14.18 && < 15", ">= 16"],
944
+ "assert/strict": ">= 15",
945
+ "node:assert/strict": ">= 16",
946
+ async_hooks: ">= 8",
947
+ "node:async_hooks": [">= 14.18 && < 15", ">= 16"],
948
+ buffer_ieee754: ">= 0.5 && < 0.9.7",
949
+ buffer: true,
950
+ "node:buffer": [">= 14.18 && < 15", ">= 16"],
951
+ child_process: true,
952
+ "node:child_process": [">= 14.18 && < 15", ">= 16"],
953
+ cluster: ">= 0.5",
954
+ "node:cluster": [">= 14.18 && < 15", ">= 16"],
955
+ console: true,
956
+ "node:console": [">= 14.18 && < 15", ">= 16"],
957
+ constants: true,
958
+ "node:constants": [">= 14.18 && < 15", ">= 16"],
959
+ crypto: true,
960
+ "node:crypto": [">= 14.18 && < 15", ">= 16"],
961
+ _debug_agent: ">= 1 && < 8",
962
+ _debugger: "< 8",
963
+ dgram: true,
964
+ "node:dgram": [">= 14.18 && < 15", ">= 16"],
965
+ diagnostics_channel: [">= 14.17 && < 15", ">= 15.1"],
966
+ "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
967
+ dns: true,
968
+ "node:dns": [">= 14.18 && < 15", ">= 16"],
969
+ "dns/promises": ">= 15",
970
+ "node:dns/promises": ">= 16",
971
+ domain: ">= 0.7.12",
972
+ "node:domain": [">= 14.18 && < 15", ">= 16"],
973
+ events: true,
974
+ "node:events": [">= 14.18 && < 15", ">= 16"],
975
+ freelist: "< 6",
976
+ fs: true,
977
+ "node:fs": [">= 14.18 && < 15", ">= 16"],
978
+ "fs/promises": [">= 10 && < 10.1", ">= 14"],
979
+ "node:fs/promises": [">= 14.18 && < 15", ">= 16"],
980
+ _http_agent: ">= 0.11.1",
981
+ "node:_http_agent": [">= 14.18 && < 15", ">= 16"],
982
+ _http_client: ">= 0.11.1",
983
+ "node:_http_client": [">= 14.18 && < 15", ">= 16"],
984
+ _http_common: ">= 0.11.1",
985
+ "node:_http_common": [">= 14.18 && < 15", ">= 16"],
986
+ _http_incoming: ">= 0.11.1",
987
+ "node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
988
+ _http_outgoing: ">= 0.11.1",
989
+ "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
990
+ _http_server: ">= 0.11.1",
991
+ "node:_http_server": [">= 14.18 && < 15", ">= 16"],
992
+ http: true,
993
+ "node:http": [">= 14.18 && < 15", ">= 16"],
994
+ http2: ">= 8.8",
995
+ "node:http2": [">= 14.18 && < 15", ">= 16"],
996
+ https: true,
997
+ "node:https": [">= 14.18 && < 15", ">= 16"],
998
+ inspector: ">= 8",
999
+ "node:inspector": [">= 14.18 && < 15", ">= 16"],
1000
+ "inspector/promises": [">= 19"],
1001
+ "node:inspector/promises": [">= 19"],
1002
+ _linklist: "< 8",
1003
+ module: true,
1004
+ "node:module": [">= 14.18 && < 15", ">= 16"],
1005
+ net: true,
1006
+ "node:net": [">= 14.18 && < 15", ">= 16"],
1007
+ "node-inspect/lib/_inspect": ">= 7.6 && < 12",
1008
+ "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
1009
+ "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
1010
+ os: true,
1011
+ "node:os": [">= 14.18 && < 15", ">= 16"],
1012
+ path: true,
1013
+ "node:path": [">= 14.18 && < 15", ">= 16"],
1014
+ "path/posix": ">= 15.3",
1015
+ "node:path/posix": ">= 16",
1016
+ "path/win32": ">= 15.3",
1017
+ "node:path/win32": ">= 16",
1018
+ perf_hooks: ">= 8.5",
1019
+ "node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
1020
+ process: ">= 1",
1021
+ "node:process": [">= 14.18 && < 15", ">= 16"],
1022
+ punycode: ">= 0.5",
1023
+ "node:punycode": [">= 14.18 && < 15", ">= 16"],
1024
+ querystring: true,
1025
+ "node:querystring": [">= 14.18 && < 15", ">= 16"],
1026
+ readline: true,
1027
+ "node:readline": [">= 14.18 && < 15", ">= 16"],
1028
+ "readline/promises": ">= 17",
1029
+ "node:readline/promises": ">= 17",
1030
+ repl: true,
1031
+ "node:repl": [">= 14.18 && < 15", ">= 16"],
1032
+ "node:sea": [">= 20.12 && < 21", ">= 21.7"],
1033
+ smalloc: ">= 0.11.5 && < 3",
1034
+ "node:sqlite": [">= 22.13 && < 23", ">= 23.4"],
1035
+ _stream_duplex: ">= 0.9.4",
1036
+ "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
1037
+ _stream_transform: ">= 0.9.4",
1038
+ "node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
1039
+ _stream_wrap: ">= 1.4.1",
1040
+ "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
1041
+ _stream_passthrough: ">= 0.9.4",
1042
+ "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
1043
+ _stream_readable: ">= 0.9.4",
1044
+ "node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
1045
+ _stream_writable: ">= 0.9.4",
1046
+ "node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
1047
+ stream: true,
1048
+ "node:stream": [">= 14.18 && < 15", ">= 16"],
1049
+ "stream/consumers": ">= 16.7",
1050
+ "node:stream/consumers": ">= 16.7",
1051
+ "stream/promises": ">= 15",
1052
+ "node:stream/promises": ">= 16",
1053
+ "stream/web": ">= 16.5",
1054
+ "node:stream/web": ">= 16.5",
1055
+ string_decoder: true,
1056
+ "node:string_decoder": [">= 14.18 && < 15", ">= 16"],
1057
+ sys: [">= 0.4 && < 0.7", ">= 0.8"],
1058
+ "node:sys": [">= 14.18 && < 15", ">= 16"],
1059
+ "test/reporters": ">= 19.9 && < 20.2",
1060
+ "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"],
1061
+ "test/mock_loader": ">= 22.3 && < 22.7",
1062
+ "node:test/mock_loader": ">= 22.3 && < 22.7",
1063
+ "node:test": [">= 16.17 && < 17", ">= 18"],
1064
+ timers: true,
1065
+ "node:timers": [">= 14.18 && < 15", ">= 16"],
1066
+ "timers/promises": ">= 15",
1067
+ "node:timers/promises": ">= 16",
1068
+ _tls_common: ">= 0.11.13",
1069
+ "node:_tls_common": [">= 14.18 && < 15", ">= 16"],
1070
+ _tls_legacy: ">= 0.11.3 && < 10",
1071
+ _tls_wrap: ">= 0.11.3",
1072
+ "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
1073
+ tls: true,
1074
+ "node:tls": [">= 14.18 && < 15", ">= 16"],
1075
+ trace_events: ">= 10",
1076
+ "node:trace_events": [">= 14.18 && < 15", ">= 16"],
1077
+ tty: true,
1078
+ "node:tty": [">= 14.18 && < 15", ">= 16"],
1079
+ url: true,
1080
+ "node:url": [">= 14.18 && < 15", ">= 16"],
1081
+ util: true,
1082
+ "node:util": [">= 14.18 && < 15", ">= 16"],
1083
+ "util/types": ">= 15.3",
1084
+ "node:util/types": ">= 16",
1085
+ "v8/tools/arguments": ">= 10 && < 12",
1086
+ "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"],
1087
+ "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"],
1088
+ "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"],
1089
+ "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"],
1090
+ "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"],
1091
+ "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"],
1092
+ v8: ">= 1",
1093
+ "node:v8": [">= 14.18 && < 15", ">= 16"],
1094
+ vm: true,
1095
+ "node:vm": [">= 14.18 && < 15", ">= 16"],
1096
+ wasi: [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"],
1097
+ "node:wasi": [">= 18.17 && < 19", ">= 20"],
1098
+ worker_threads: ">= 11.7",
1099
+ "node:worker_threads": [">= 14.18 && < 15", ">= 16"],
1100
+ zlib: ">= 0.5",
1101
+ "node:zlib": [">= 14.18 && < 15", ">= 16"]
1102
+ };
1103
+ }
1104
+ });
1105
+
1106
+ // node_modules/resolve/lib/core.js
1107
+ var require_core3 = __commonJS({
1108
+ "node_modules/resolve/lib/core.js"(exports, module) {
1109
+ "use strict";
1110
+ var isCoreModule = require_is_core_module();
1111
+ var data = require_core2();
1112
+ var core = {};
1113
+ for (mod in data) {
1114
+ if (Object.prototype.hasOwnProperty.call(data, mod)) {
1115
+ core[mod] = isCoreModule(mod);
1116
+ }
1117
+ }
1118
+ var mod;
1119
+ module.exports = core;
1120
+ }
1121
+ });
1122
+
1123
+ // node_modules/resolve/lib/is-core.js
1124
+ var require_is_core = __commonJS({
1125
+ "node_modules/resolve/lib/is-core.js"(exports, module) {
1126
+ var isCoreModule = require_is_core_module();
1127
+ module.exports = /* @__PURE__ */ __name(function isCore(x) {
1128
+ return isCoreModule(x);
1129
+ }, "isCore");
1130
+ }
1131
+ });
1132
+
1133
+ // node_modules/resolve/lib/sync.js
1134
+ var require_sync = __commonJS({
1135
+ "node_modules/resolve/lib/sync.js"(exports, module) {
1136
+ var isCore = require_is_core_module();
1137
+ var fs = __require("fs");
1138
+ var path = __require("path");
1139
+ var getHomedir = require_homedir();
1140
+ var caller = require_caller();
1141
+ var nodeModulesPaths = require_node_modules_paths();
1142
+ var normalizeOptions = require_normalize_options();
1143
+ var realpathFS = process.platform !== "win32" && fs.realpathSync && typeof fs.realpathSync.native === "function" ? fs.realpathSync.native : fs.realpathSync;
1144
+ var relativePathRegex = /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/;
1145
+ var windowsDriveRegex = /^\w:[/\\]*$/;
1146
+ var nodeModulesRegex = /[/\\]node_modules[/\\]*$/;
1147
+ var homedir = getHomedir();
1148
+ var defaultPaths = /* @__PURE__ */ __name(function() {
1149
+ return [
1150
+ path.join(homedir, ".node_modules"),
1151
+ path.join(homedir, ".node_libraries")
1152
+ ];
1153
+ }, "defaultPaths");
1154
+ var defaultIsFile = /* @__PURE__ */ __name(function isFile(file) {
1155
+ try {
1156
+ var stat = fs.statSync(file, { throwIfNoEntry: false });
1157
+ } catch (e) {
1158
+ if (e && (e.code === "ENOENT" || e.code === "ENOTDIR")) return false;
1159
+ throw e;
1160
+ }
1161
+ return !!stat && (stat.isFile() || stat.isFIFO());
1162
+ }, "isFile");
1163
+ var defaultIsDir = /* @__PURE__ */ __name(function isDirectory2(dir) {
1164
+ try {
1165
+ var stat = fs.statSync(dir, { throwIfNoEntry: false });
1166
+ } catch (e) {
1167
+ if (e && (e.code === "ENOENT" || e.code === "ENOTDIR")) return false;
1168
+ throw e;
1169
+ }
1170
+ return !!stat && stat.isDirectory();
1171
+ }, "isDirectory");
1172
+ var defaultRealpathSync = /* @__PURE__ */ __name(function realpathSync(x) {
1173
+ try {
1174
+ return realpathFS(x);
1175
+ } catch (realpathErr) {
1176
+ if (realpathErr.code !== "ENOENT") {
1177
+ throw realpathErr;
1178
+ }
1179
+ }
1180
+ return x;
1181
+ }, "realpathSync");
1182
+ var maybeRealpathSync = /* @__PURE__ */ __name(function maybeRealpathSync2(realpathSync, x, opts) {
1183
+ if (opts && opts.preserveSymlinks === false) {
1184
+ return realpathSync(x);
1185
+ }
1186
+ return x;
1187
+ }, "maybeRealpathSync");
1188
+ var defaultReadPackageSync = /* @__PURE__ */ __name(function defaultReadPackageSync2(readFileSync10, pkgfile) {
1189
+ var body = readFileSync10(pkgfile);
1190
+ try {
1191
+ var pkg = JSON.parse(body);
1192
+ return pkg;
1193
+ } catch (jsonErr) {
1194
+ }
1195
+ }, "defaultReadPackageSync");
1196
+ var getPackageCandidates = /* @__PURE__ */ __name(function getPackageCandidates2(x, start, opts) {
1197
+ var dirs = nodeModulesPaths(start, opts, x);
1198
+ for (var i = 0; i < dirs.length; i++) {
1199
+ dirs[i] = path.join(dirs[i], x);
1200
+ }
1201
+ return dirs;
1202
+ }, "getPackageCandidates");
1203
+ module.exports = /* @__PURE__ */ __name(function resolveSync(x, options) {
1204
+ if (typeof x !== "string") {
1205
+ throw new TypeError("Path must be a string.");
1206
+ }
1207
+ var opts = normalizeOptions(x, options);
1208
+ var isFile = opts.isFile || defaultIsFile;
1209
+ var readFileSync10 = opts.readFileSync || fs.readFileSync;
1210
+ var isDirectory2 = opts.isDirectory || defaultIsDir;
1211
+ var realpathSync = opts.realpathSync || defaultRealpathSync;
1212
+ var readPackageSync = opts.readPackageSync || defaultReadPackageSync;
1213
+ if (opts.readFileSync && opts.readPackageSync) {
1214
+ throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");
1215
+ }
1216
+ var packageIterator = opts.packageIterator;
1217
+ var extensions = opts.extensions || [".js"];
1218
+ var includeCoreModules = opts.includeCoreModules !== false;
1219
+ var basedir = opts.basedir || path.dirname(caller());
1220
+ var parent = opts.filename || basedir;
1221
+ opts.paths = opts.paths || defaultPaths();
1222
+ var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts);
1223
+ if (relativePathRegex.test(x)) {
1224
+ var res = path.resolve(absoluteStart, x);
1225
+ if (x === "." || x === ".." || x.slice(-1) === "/") res += "/";
1226
+ var m = loadAsFileSync(res) || loadAsDirectorySync(res);
1227
+ if (m) return maybeRealpathSync(realpathSync, m, opts);
1228
+ } else if (includeCoreModules && isCore(x)) {
1229
+ return x;
1230
+ } else {
1231
+ var n = loadNodeModulesSync(x, absoluteStart);
1232
+ if (n) return maybeRealpathSync(realpathSync, n, opts);
1233
+ }
1234
+ var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
1235
+ err.code = "MODULE_NOT_FOUND";
1236
+ throw err;
1237
+ function loadAsFileSync(x2) {
1238
+ var pkg = loadpkg(path.dirname(x2));
1239
+ if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
1240
+ var rfile = path.relative(pkg.dir, x2);
1241
+ var r = opts.pathFilter(pkg.pkg, x2, rfile);
1242
+ if (r) {
1243
+ x2 = path.resolve(pkg.dir, r);
1244
+ }
1245
+ }
1246
+ if (isFile(x2)) {
1247
+ return x2;
1248
+ }
1249
+ for (var i = 0; i < extensions.length; i++) {
1250
+ var file = x2 + extensions[i];
1251
+ if (isFile(file)) {
1252
+ return file;
1253
+ }
1254
+ }
1255
+ }
1256
+ __name(loadAsFileSync, "loadAsFileSync");
1257
+ function loadpkg(dir) {
1258
+ if (dir === "" || dir === "/") return;
1259
+ if (process.platform === "win32" && windowsDriveRegex.test(dir)) {
1260
+ return;
1261
+ }
1262
+ if (nodeModulesRegex.test(dir)) return;
1263
+ var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), "package.json");
1264
+ if (!isFile(pkgfile)) {
1265
+ return loadpkg(path.dirname(dir));
1266
+ }
1267
+ var pkg = readPackageSync(readFileSync10, pkgfile);
1268
+ if (pkg && opts.packageFilter) {
1269
+ pkg = opts.packageFilter(
1270
+ pkg,
1271
+ /*pkgfile,*/
1272
+ dir
1273
+ );
1274
+ }
1275
+ return { pkg, dir };
1276
+ }
1277
+ __name(loadpkg, "loadpkg");
1278
+ function loadAsDirectorySync(x2) {
1279
+ var pkgfile = path.join(maybeRealpathSync(realpathSync, x2, opts), "/package.json");
1280
+ if (isFile(pkgfile)) {
1281
+ try {
1282
+ var pkg = readPackageSync(readFileSync10, pkgfile);
1283
+ } catch (e) {
1284
+ }
1285
+ if (pkg && opts.packageFilter) {
1286
+ pkg = opts.packageFilter(
1287
+ pkg,
1288
+ /*pkgfile,*/
1289
+ x2
1290
+ );
1291
+ }
1292
+ if (pkg && pkg.main) {
1293
+ if (typeof pkg.main !== "string") {
1294
+ var mainError = new TypeError("package \u201C" + pkg.name + "\u201D `main` must be a string");
1295
+ mainError.code = "INVALID_PACKAGE_MAIN";
1296
+ throw mainError;
1297
+ }
1298
+ if (pkg.main === "." || pkg.main === "./") {
1299
+ pkg.main = "index";
1300
+ }
1301
+ try {
1302
+ var m2 = loadAsFileSync(path.resolve(x2, pkg.main));
1303
+ if (m2) return m2;
1304
+ var n2 = loadAsDirectorySync(path.resolve(x2, pkg.main));
1305
+ if (n2) return n2;
1306
+ } catch (e) {
1307
+ }
1308
+ }
1309
+ }
1310
+ return loadAsFileSync(path.join(x2, "/index"));
1311
+ }
1312
+ __name(loadAsDirectorySync, "loadAsDirectorySync");
1313
+ function loadNodeModulesSync(x2, start) {
1314
+ var thunk = /* @__PURE__ */ __name(function() {
1315
+ return getPackageCandidates(x2, start, opts);
1316
+ }, "thunk");
1317
+ var dirs = packageIterator ? packageIterator(x2, start, thunk, opts) : thunk();
1318
+ for (var i = 0; i < dirs.length; i++) {
1319
+ var dir = dirs[i];
1320
+ if (isDirectory2(path.dirname(dir))) {
1321
+ var m2 = loadAsFileSync(dir);
1322
+ if (m2) return m2;
1323
+ var n2 = loadAsDirectorySync(dir);
1324
+ if (n2) return n2;
1325
+ }
1326
+ }
1327
+ }
1328
+ __name(loadNodeModulesSync, "loadNodeModulesSync");
1329
+ }, "resolveSync");
1330
+ }
1331
+ });
1332
+
1333
+ // node_modules/resolve/index.js
1334
+ var require_resolve = __commonJS({
1335
+ "node_modules/resolve/index.js"(exports, module) {
1336
+ var async = require_async();
1337
+ async.core = require_core3();
1338
+ async.isCore = require_is_core();
1339
+ async.sync = require_sync();
1340
+ module.exports = async;
1341
+ }
1342
+ });
75
1343
 
76
1344
  // ../node_modules/@yarnpkg/fslib/node_modules/tslib/tslib.es6.js
77
1345
  var tslib_es6_exports = {};
@@ -135,12 +1403,12 @@ function __metadata(metadataKey, metadataValue) {
135
1403
  }
136
1404
  function __awaiter(thisArg, _arguments, P, generator) {
137
1405
  function adopt(value) {
138
- return value instanceof P ? value : new P(function(resolve8) {
139
- resolve8(value);
1406
+ return value instanceof P ? value : new P(function(resolve9) {
1407
+ resolve9(value);
140
1408
  });
141
1409
  }
142
1410
  __name(adopt, "adopt");
143
- return new (P || (P = Promise))(function(resolve8, reject) {
1411
+ return new (P || (P = Promise))(function(resolve9, reject) {
144
1412
  function fulfilled(value) {
145
1413
  try {
146
1414
  step(generator.next(value));
@@ -158,7 +1426,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
158
1426
  }
159
1427
  __name(rejected, "rejected");
160
1428
  function step(result) {
161
- result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected);
1429
+ result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected);
162
1430
  }
163
1431
  __name(step, "step");
164
1432
  step((generator = generator.apply(thisArg, _arguments || [])).next());
@@ -346,15 +1614,15 @@ function __asyncValues(o) {
346
1614
  }, i);
347
1615
  function verb(n) {
348
1616
  i[n] = o[n] && function(v) {
349
- return new Promise(function(resolve8, reject) {
350
- v = o[n](v), settle(resolve8, reject, v.done, v.value);
1617
+ return new Promise(function(resolve9, reject) {
1618
+ v = o[n](v), settle(resolve9, reject, v.done, v.value);
351
1619
  });
352
1620
  };
353
1621
  }
354
1622
  __name(verb, "verb");
355
- function settle(resolve8, reject, d, v) {
1623
+ function settle(resolve9, reject, d, v) {
356
1624
  Promise.resolve(v).then(function(v2) {
357
- resolve8({ value: v2, done: d });
1625
+ resolve9({ value: v2, done: d });
358
1626
  }, reject);
359
1627
  }
360
1628
  __name(settle, "settle");
@@ -1210,7 +2478,7 @@ var require_FakeFS = __commonJS({
1210
2478
  if (error.code !== `EBUSY` && error.code !== `ENOTEMPTY`) {
1211
2479
  throw error;
1212
2480
  } else if (t2 < maxRetries) {
1213
- await new Promise((resolve8) => setTimeout(resolve8, t2 * 100));
2481
+ await new Promise((resolve9) => setTimeout(resolve9, t2 * 100));
1214
2482
  }
1215
2483
  }
1216
2484
  }
@@ -1444,7 +2712,7 @@ var require_FakeFS = __commonJS({
1444
2712
  }
1445
2713
  }
1446
2714
  if (Date.now() - startTime < 60 * 1e3) {
1447
- await new Promise((resolve8) => setTimeout(resolve8, interval));
2715
+ await new Promise((resolve9) => setTimeout(resolve9, interval));
1448
2716
  } else {
1449
2717
  throw new Error(`Couldn't acquire a lock in a reasonable time (via ${lockPath})`);
1450
2718
  }
@@ -1576,19 +2844,19 @@ var require_NodeFS = __commonJS({
1576
2844
  return path_1.ppath.resolve(p);
1577
2845
  }
1578
2846
  async openPromise(p, flags, mode) {
1579
- return await new Promise((resolve8, reject) => {
1580
- this.realFs.open(path_1.npath.fromPortablePath(p), flags, mode, this.makeCallback(resolve8, reject));
2847
+ return await new Promise((resolve9, reject) => {
2848
+ this.realFs.open(path_1.npath.fromPortablePath(p), flags, mode, this.makeCallback(resolve9, reject));
1581
2849
  });
1582
2850
  }
1583
2851
  openSync(p, flags, mode) {
1584
2852
  return this.realFs.openSync(path_1.npath.fromPortablePath(p), flags, mode);
1585
2853
  }
1586
2854
  async opendirPromise(p, opts) {
1587
- return await new Promise((resolve8, reject) => {
2855
+ return await new Promise((resolve9, reject) => {
1588
2856
  if (typeof opts !== `undefined`) {
1589
- this.realFs.opendir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve8, reject));
2857
+ this.realFs.opendir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve9, reject));
1590
2858
  } else {
1591
- this.realFs.opendir(path_1.npath.fromPortablePath(p), this.makeCallback(resolve8, reject));
2859
+ this.realFs.opendir(path_1.npath.fromPortablePath(p), this.makeCallback(resolve9, reject));
1592
2860
  }
1593
2861
  }).then((dir) => {
1594
2862
  return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true });
@@ -1599,12 +2867,12 @@ var require_NodeFS = __commonJS({
1599
2867
  return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true });
1600
2868
  }
1601
2869
  async readPromise(fd, buffer, offset = 0, length = 0, position = -1) {
1602
- return await new Promise((resolve8, reject) => {
2870
+ return await new Promise((resolve9, reject) => {
1603
2871
  this.realFs.read(fd, buffer, offset, length, position, (error, bytesRead) => {
1604
2872
  if (error) {
1605
2873
  reject(error);
1606
2874
  } else {
1607
- resolve8(bytesRead);
2875
+ resolve9(bytesRead);
1608
2876
  }
1609
2877
  });
1610
2878
  });
@@ -1613,11 +2881,11 @@ var require_NodeFS = __commonJS({
1613
2881
  return this.realFs.readSync(fd, buffer, offset, length, position);
1614
2882
  }
1615
2883
  async writePromise(fd, buffer, offset, length, position) {
1616
- return await new Promise((resolve8, reject) => {
2884
+ return await new Promise((resolve9, reject) => {
1617
2885
  if (typeof buffer === `string`) {
1618
- return this.realFs.write(fd, buffer, offset, this.makeCallback(resolve8, reject));
2886
+ return this.realFs.write(fd, buffer, offset, this.makeCallback(resolve9, reject));
1619
2887
  } else {
1620
- return this.realFs.write(fd, buffer, offset, length, position, this.makeCallback(resolve8, reject));
2888
+ return this.realFs.write(fd, buffer, offset, length, position, this.makeCallback(resolve9, reject));
1621
2889
  }
1622
2890
  });
1623
2891
  }
@@ -1629,8 +2897,8 @@ var require_NodeFS = __commonJS({
1629
2897
  }
1630
2898
  }
1631
2899
  async closePromise(fd) {
1632
- await new Promise((resolve8, reject) => {
1633
- this.realFs.close(fd, this.makeCallback(resolve8, reject));
2900
+ await new Promise((resolve9, reject) => {
2901
+ this.realFs.close(fd, this.makeCallback(resolve9, reject));
1634
2902
  });
1635
2903
  }
1636
2904
  closeSync(fd) {
@@ -1645,8 +2913,8 @@ var require_NodeFS = __commonJS({
1645
2913
  return this.realFs.createWriteStream(realPath, opts);
1646
2914
  }
1647
2915
  async realpathPromise(p) {
1648
- return await new Promise((resolve8, reject) => {
1649
- this.realFs.realpath(path_1.npath.fromPortablePath(p), {}, this.makeCallback(resolve8, reject));
2916
+ return await new Promise((resolve9, reject) => {
2917
+ this.realFs.realpath(path_1.npath.fromPortablePath(p), {}, this.makeCallback(resolve9, reject));
1650
2918
  }).then((path) => {
1651
2919
  return path_1.npath.toPortablePath(path);
1652
2920
  });
@@ -1655,27 +2923,27 @@ var require_NodeFS = __commonJS({
1655
2923
  return path_1.npath.toPortablePath(this.realFs.realpathSync(path_1.npath.fromPortablePath(p), {}));
1656
2924
  }
1657
2925
  async existsPromise(p) {
1658
- return await new Promise((resolve8) => {
1659
- this.realFs.exists(path_1.npath.fromPortablePath(p), resolve8);
2926
+ return await new Promise((resolve9) => {
2927
+ this.realFs.exists(path_1.npath.fromPortablePath(p), resolve9);
1660
2928
  });
1661
2929
  }
1662
2930
  accessSync(p, mode) {
1663
2931
  return this.realFs.accessSync(path_1.npath.fromPortablePath(p), mode);
1664
2932
  }
1665
2933
  async accessPromise(p, mode) {
1666
- return await new Promise((resolve8, reject) => {
1667
- this.realFs.access(path_1.npath.fromPortablePath(p), mode, this.makeCallback(resolve8, reject));
2934
+ return await new Promise((resolve9, reject) => {
2935
+ this.realFs.access(path_1.npath.fromPortablePath(p), mode, this.makeCallback(resolve9, reject));
1668
2936
  });
1669
2937
  }
1670
2938
  existsSync(p) {
1671
2939
  return this.realFs.existsSync(path_1.npath.fromPortablePath(p));
1672
2940
  }
1673
2941
  async statPromise(p, opts) {
1674
- return await new Promise((resolve8, reject) => {
2942
+ return await new Promise((resolve9, reject) => {
1675
2943
  if (opts) {
1676
- this.realFs.stat(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve8, reject));
2944
+ this.realFs.stat(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve9, reject));
1677
2945
  } else {
1678
- this.realFs.stat(path_1.npath.fromPortablePath(p), this.makeCallback(resolve8, reject));
2946
+ this.realFs.stat(path_1.npath.fromPortablePath(p), this.makeCallback(resolve9, reject));
1679
2947
  }
1680
2948
  });
1681
2949
  }
@@ -1687,11 +2955,11 @@ var require_NodeFS = __commonJS({
1687
2955
  }
1688
2956
  }
1689
2957
  async fstatPromise(fd, opts) {
1690
- return await new Promise((resolve8, reject) => {
2958
+ return await new Promise((resolve9, reject) => {
1691
2959
  if (opts) {
1692
- this.realFs.fstat(fd, opts, this.makeCallback(resolve8, reject));
2960
+ this.realFs.fstat(fd, opts, this.makeCallback(resolve9, reject));
1693
2961
  } else {
1694
- this.realFs.fstat(fd, this.makeCallback(resolve8, reject));
2962
+ this.realFs.fstat(fd, this.makeCallback(resolve9, reject));
1695
2963
  }
1696
2964
  });
1697
2965
  }
@@ -1703,11 +2971,11 @@ var require_NodeFS = __commonJS({
1703
2971
  }
1704
2972
  }
1705
2973
  async lstatPromise(p, opts) {
1706
- return await new Promise((resolve8, reject) => {
2974
+ return await new Promise((resolve9, reject) => {
1707
2975
  if (opts) {
1708
- this.realFs.lstat(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve8, reject));
2976
+ this.realFs.lstat(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve9, reject));
1709
2977
  } else {
1710
- this.realFs.lstat(path_1.npath.fromPortablePath(p), this.makeCallback(resolve8, reject));
2978
+ this.realFs.lstat(path_1.npath.fromPortablePath(p), this.makeCallback(resolve9, reject));
1711
2979
  }
1712
2980
  });
1713
2981
  }
@@ -1719,60 +2987,60 @@ var require_NodeFS = __commonJS({
1719
2987
  }
1720
2988
  }
1721
2989
  async fchmodPromise(fd, mask) {
1722
- return await new Promise((resolve8, reject) => {
1723
- this.realFs.fchmod(fd, mask, this.makeCallback(resolve8, reject));
2990
+ return await new Promise((resolve9, reject) => {
2991
+ this.realFs.fchmod(fd, mask, this.makeCallback(resolve9, reject));
1724
2992
  });
1725
2993
  }
1726
2994
  fchmodSync(fd, mask) {
1727
2995
  return this.realFs.fchmodSync(fd, mask);
1728
2996
  }
1729
2997
  async chmodPromise(p, mask) {
1730
- return await new Promise((resolve8, reject) => {
1731
- this.realFs.chmod(path_1.npath.fromPortablePath(p), mask, this.makeCallback(resolve8, reject));
2998
+ return await new Promise((resolve9, reject) => {
2999
+ this.realFs.chmod(path_1.npath.fromPortablePath(p), mask, this.makeCallback(resolve9, reject));
1732
3000
  });
1733
3001
  }
1734
3002
  chmodSync(p, mask) {
1735
3003
  return this.realFs.chmodSync(path_1.npath.fromPortablePath(p), mask);
1736
3004
  }
1737
3005
  async fchownPromise(fd, uid, gid) {
1738
- return await new Promise((resolve8, reject) => {
1739
- this.realFs.fchown(fd, uid, gid, this.makeCallback(resolve8, reject));
3006
+ return await new Promise((resolve9, reject) => {
3007
+ this.realFs.fchown(fd, uid, gid, this.makeCallback(resolve9, reject));
1740
3008
  });
1741
3009
  }
1742
3010
  fchownSync(fd, uid, gid) {
1743
3011
  return this.realFs.fchownSync(fd, uid, gid);
1744
3012
  }
1745
3013
  async chownPromise(p, uid, gid) {
1746
- return await new Promise((resolve8, reject) => {
1747
- this.realFs.chown(path_1.npath.fromPortablePath(p), uid, gid, this.makeCallback(resolve8, reject));
3014
+ return await new Promise((resolve9, reject) => {
3015
+ this.realFs.chown(path_1.npath.fromPortablePath(p), uid, gid, this.makeCallback(resolve9, reject));
1748
3016
  });
1749
3017
  }
1750
3018
  chownSync(p, uid, gid) {
1751
3019
  return this.realFs.chownSync(path_1.npath.fromPortablePath(p), uid, gid);
1752
3020
  }
1753
3021
  async renamePromise(oldP, newP) {
1754
- return await new Promise((resolve8, reject) => {
1755
- this.realFs.rename(path_1.npath.fromPortablePath(oldP), path_1.npath.fromPortablePath(newP), this.makeCallback(resolve8, reject));
3022
+ return await new Promise((resolve9, reject) => {
3023
+ this.realFs.rename(path_1.npath.fromPortablePath(oldP), path_1.npath.fromPortablePath(newP), this.makeCallback(resolve9, reject));
1756
3024
  });
1757
3025
  }
1758
3026
  renameSync(oldP, newP) {
1759
3027
  return this.realFs.renameSync(path_1.npath.fromPortablePath(oldP), path_1.npath.fromPortablePath(newP));
1760
3028
  }
1761
3029
  async copyFilePromise(sourceP, destP, flags = 0) {
1762
- return await new Promise((resolve8, reject) => {
1763
- this.realFs.copyFile(path_1.npath.fromPortablePath(sourceP), path_1.npath.fromPortablePath(destP), flags, this.makeCallback(resolve8, reject));
3030
+ return await new Promise((resolve9, reject) => {
3031
+ this.realFs.copyFile(path_1.npath.fromPortablePath(sourceP), path_1.npath.fromPortablePath(destP), flags, this.makeCallback(resolve9, reject));
1764
3032
  });
1765
3033
  }
1766
3034
  copyFileSync(sourceP, destP, flags = 0) {
1767
3035
  return this.realFs.copyFileSync(path_1.npath.fromPortablePath(sourceP), path_1.npath.fromPortablePath(destP), flags);
1768
3036
  }
1769
3037
  async appendFilePromise(p, content, opts) {
1770
- return await new Promise((resolve8, reject) => {
3038
+ return await new Promise((resolve9, reject) => {
1771
3039
  const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p;
1772
3040
  if (opts) {
1773
- this.realFs.appendFile(fsNativePath, content, opts, this.makeCallback(resolve8, reject));
3041
+ this.realFs.appendFile(fsNativePath, content, opts, this.makeCallback(resolve9, reject));
1774
3042
  } else {
1775
- this.realFs.appendFile(fsNativePath, content, this.makeCallback(resolve8, reject));
3043
+ this.realFs.appendFile(fsNativePath, content, this.makeCallback(resolve9, reject));
1776
3044
  }
1777
3045
  });
1778
3046
  }
@@ -1785,12 +3053,12 @@ var require_NodeFS = __commonJS({
1785
3053
  }
1786
3054
  }
1787
3055
  async writeFilePromise(p, content, opts) {
1788
- return await new Promise((resolve8, reject) => {
3056
+ return await new Promise((resolve9, reject) => {
1789
3057
  const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p;
1790
3058
  if (opts) {
1791
- this.realFs.writeFile(fsNativePath, content, opts, this.makeCallback(resolve8, reject));
3059
+ this.realFs.writeFile(fsNativePath, content, opts, this.makeCallback(resolve9, reject));
1792
3060
  } else {
1793
- this.realFs.writeFile(fsNativePath, content, this.makeCallback(resolve8, reject));
3061
+ this.realFs.writeFile(fsNativePath, content, this.makeCallback(resolve9, reject));
1794
3062
  }
1795
3063
  });
1796
3064
  }
@@ -1803,16 +3071,16 @@ var require_NodeFS = __commonJS({
1803
3071
  }
1804
3072
  }
1805
3073
  async unlinkPromise(p) {
1806
- return await new Promise((resolve8, reject) => {
1807
- this.realFs.unlink(path_1.npath.fromPortablePath(p), this.makeCallback(resolve8, reject));
3074
+ return await new Promise((resolve9, reject) => {
3075
+ this.realFs.unlink(path_1.npath.fromPortablePath(p), this.makeCallback(resolve9, reject));
1808
3076
  });
1809
3077
  }
1810
3078
  unlinkSync(p) {
1811
3079
  return this.realFs.unlinkSync(path_1.npath.fromPortablePath(p));
1812
3080
  }
1813
3081
  async utimesPromise(p, atime, mtime) {
1814
- return await new Promise((resolve8, reject) => {
1815
- this.realFs.utimes(path_1.npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve8, reject));
3082
+ return await new Promise((resolve9, reject) => {
3083
+ this.realFs.utimes(path_1.npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve9, reject));
1816
3084
  });
1817
3085
  }
1818
3086
  utimesSync(p, atime, mtime) {
@@ -1822,8 +3090,8 @@ var require_NodeFS = __commonJS({
1822
3090
  const lutimes = this.realFs.lutimes;
1823
3091
  if (typeof lutimes === `undefined`)
1824
3092
  throw (0, errors_1.ENOSYS)(`unavailable Node binding`, `lutimes '${p}'`);
1825
- return await new Promise((resolve8, reject) => {
1826
- lutimes.call(this.realFs, path_1.npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve8, reject));
3093
+ return await new Promise((resolve9, reject) => {
3094
+ lutimes.call(this.realFs, path_1.npath.fromPortablePath(p), atime, mtime, this.makeCallback(resolve9, reject));
1827
3095
  });
1828
3096
  }
1829
3097
  lutimesSyncImpl(p, atime, mtime) {
@@ -1833,19 +3101,19 @@ var require_NodeFS = __commonJS({
1833
3101
  lutimesSync.call(this.realFs, path_1.npath.fromPortablePath(p), atime, mtime);
1834
3102
  }
1835
3103
  async mkdirPromise(p, opts) {
1836
- return await new Promise((resolve8, reject) => {
1837
- this.realFs.mkdir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve8, reject));
3104
+ return await new Promise((resolve9, reject) => {
3105
+ this.realFs.mkdir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve9, reject));
1838
3106
  });
1839
3107
  }
1840
3108
  mkdirSync(p, opts) {
1841
3109
  return this.realFs.mkdirSync(path_1.npath.fromPortablePath(p), opts);
1842
3110
  }
1843
3111
  async rmdirPromise(p, opts) {
1844
- return await new Promise((resolve8, reject) => {
3112
+ return await new Promise((resolve9, reject) => {
1845
3113
  if (opts) {
1846
- this.realFs.rmdir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve8, reject));
3114
+ this.realFs.rmdir(path_1.npath.fromPortablePath(p), opts, this.makeCallback(resolve9, reject));
1847
3115
  } else {
1848
- this.realFs.rmdir(path_1.npath.fromPortablePath(p), this.makeCallback(resolve8, reject));
3116
+ this.realFs.rmdir(path_1.npath.fromPortablePath(p), this.makeCallback(resolve9, reject));
1849
3117
  }
1850
3118
  });
1851
3119
  }
@@ -1853,25 +3121,25 @@ var require_NodeFS = __commonJS({
1853
3121
  return this.realFs.rmdirSync(path_1.npath.fromPortablePath(p), opts);
1854
3122
  }
1855
3123
  async linkPromise(existingP, newP) {
1856
- return await new Promise((resolve8, reject) => {
1857
- this.realFs.link(path_1.npath.fromPortablePath(existingP), path_1.npath.fromPortablePath(newP), this.makeCallback(resolve8, reject));
3124
+ return await new Promise((resolve9, reject) => {
3125
+ this.realFs.link(path_1.npath.fromPortablePath(existingP), path_1.npath.fromPortablePath(newP), this.makeCallback(resolve9, reject));
1858
3126
  });
1859
3127
  }
1860
3128
  linkSync(existingP, newP) {
1861
3129
  return this.realFs.linkSync(path_1.npath.fromPortablePath(existingP), path_1.npath.fromPortablePath(newP));
1862
3130
  }
1863
3131
  async symlinkPromise(target, p, type) {
1864
- return await new Promise((resolve8, reject) => {
1865
- this.realFs.symlink(path_1.npath.fromPortablePath(target.replace(/\/+$/, ``)), path_1.npath.fromPortablePath(p), type, this.makeCallback(resolve8, reject));
3132
+ return await new Promise((resolve9, reject) => {
3133
+ this.realFs.symlink(path_1.npath.fromPortablePath(target.replace(/\/+$/, ``)), path_1.npath.fromPortablePath(p), type, this.makeCallback(resolve9, reject));
1866
3134
  });
1867
3135
  }
1868
3136
  symlinkSync(target, p, type) {
1869
3137
  return this.realFs.symlinkSync(path_1.npath.fromPortablePath(target.replace(/\/+$/, ``)), path_1.npath.fromPortablePath(p), type);
1870
3138
  }
1871
3139
  async readFilePromise(p, encoding) {
1872
- return await new Promise((resolve8, reject) => {
3140
+ return await new Promise((resolve9, reject) => {
1873
3141
  const fsNativePath = typeof p === `string` ? path_1.npath.fromPortablePath(p) : p;
1874
- this.realFs.readFile(fsNativePath, encoding, this.makeCallback(resolve8, reject));
3142
+ this.realFs.readFile(fsNativePath, encoding, this.makeCallback(resolve9, reject));
1875
3143
  });
1876
3144
  }
1877
3145
  readFileSync(p, encoding) {
@@ -1879,11 +3147,11 @@ var require_NodeFS = __commonJS({
1879
3147
  return this.realFs.readFileSync(fsNativePath, encoding);
1880
3148
  }
1881
3149
  async readdirPromise(p, opts) {
1882
- return await new Promise((resolve8, reject) => {
3150
+ return await new Promise((resolve9, reject) => {
1883
3151
  if (opts === null || opts === void 0 ? void 0 : opts.withFileTypes) {
1884
- this.realFs.readdir(path_1.npath.fromPortablePath(p), { withFileTypes: true }, this.makeCallback(resolve8, reject));
3152
+ this.realFs.readdir(path_1.npath.fromPortablePath(p), { withFileTypes: true }, this.makeCallback(resolve9, reject));
1885
3153
  } else {
1886
- this.realFs.readdir(path_1.npath.fromPortablePath(p), this.makeCallback((value) => resolve8(value), reject));
3154
+ this.realFs.readdir(path_1.npath.fromPortablePath(p), this.makeCallback((value) => resolve9(value), reject));
1887
3155
  }
1888
3156
  });
1889
3157
  }
@@ -1895,8 +3163,8 @@ var require_NodeFS = __commonJS({
1895
3163
  }
1896
3164
  }
1897
3165
  async readlinkPromise(p) {
1898
- return await new Promise((resolve8, reject) => {
1899
- this.realFs.readlink(path_1.npath.fromPortablePath(p), this.makeCallback(resolve8, reject));
3166
+ return await new Promise((resolve9, reject) => {
3167
+ this.realFs.readlink(path_1.npath.fromPortablePath(p), this.makeCallback(resolve9, reject));
1900
3168
  }).then((path) => {
1901
3169
  return path_1.npath.toPortablePath(path);
1902
3170
  });
@@ -1905,16 +3173,16 @@ var require_NodeFS = __commonJS({
1905
3173
  return path_1.npath.toPortablePath(this.realFs.readlinkSync(path_1.npath.fromPortablePath(p)));
1906
3174
  }
1907
3175
  async truncatePromise(p, len) {
1908
- return await new Promise((resolve8, reject) => {
1909
- this.realFs.truncate(path_1.npath.fromPortablePath(p), len, this.makeCallback(resolve8, reject));
3176
+ return await new Promise((resolve9, reject) => {
3177
+ this.realFs.truncate(path_1.npath.fromPortablePath(p), len, this.makeCallback(resolve9, reject));
1910
3178
  });
1911
3179
  }
1912
3180
  truncateSync(p, len) {
1913
3181
  return this.realFs.truncateSync(path_1.npath.fromPortablePath(p), len);
1914
3182
  }
1915
3183
  async ftruncatePromise(fd, len) {
1916
- return await new Promise((resolve8, reject) => {
1917
- this.realFs.ftruncate(fd, len, this.makeCallback(resolve8, reject));
3184
+ return await new Promise((resolve9, reject) => {
3185
+ this.realFs.ftruncate(fd, len, this.makeCallback(resolve9, reject));
1918
3186
  });
1919
3187
  }
1920
3188
  ftruncateSync(fd, len) {
@@ -1939,12 +3207,12 @@ var require_NodeFS = __commonJS({
1939
3207
  unwatchFile(p, cb) {
1940
3208
  return this.realFs.unwatchFile(path_1.npath.fromPortablePath(p), cb);
1941
3209
  }
1942
- makeCallback(resolve8, reject) {
3210
+ makeCallback(resolve9, reject) {
1943
3211
  return (err, result) => {
1944
3212
  if (err) {
1945
3213
  reject(err);
1946
3214
  } else {
1947
- resolve8(result);
3215
+ resolve9(result);
1948
3216
  }
1949
3217
  };
1950
3218
  }
@@ -2877,13 +4145,13 @@ var require_ZipFS = __commonJS({
2877
4145
  this.fileSources.set(index, data);
2878
4146
  return data;
2879
4147
  } else if (opts.asyncDecompress) {
2880
- return new Promise((resolve8, reject) => {
4148
+ return new Promise((resolve9, reject) => {
2881
4149
  zlib_1.default.inflateRaw(data, (error, result) => {
2882
4150
  if (error) {
2883
4151
  reject(error);
2884
4152
  } else {
2885
4153
  this.fileSources.set(index, result);
2886
- resolve8(result);
4154
+ resolve9(result);
2887
4155
  }
2888
4156
  });
2889
4157
  });
@@ -5203,8 +6471,8 @@ var require_FileHandle = __commonJS({
5203
6471
  this[kClosePromise] = void 0;
5204
6472
  });
5205
6473
  } else {
5206
- this[kClosePromise] = new Promise((resolve8, reject) => {
5207
- this[kCloseResolve] = resolve8;
6474
+ this[kClosePromise] = new Promise((resolve9, reject) => {
6475
+ this[kCloseResolve] = resolve9;
5208
6476
  this[kCloseReject] = reject;
5209
6477
  }).finally(() => {
5210
6478
  this[kClosePromise] = void 0;
@@ -5774,12 +7042,12 @@ function __metadata2(metadataKey, metadataValue) {
5774
7042
  }
5775
7043
  function __awaiter2(thisArg, _arguments, P, generator) {
5776
7044
  function adopt(value) {
5777
- return value instanceof P ? value : new P(function(resolve8) {
5778
- resolve8(value);
7045
+ return value instanceof P ? value : new P(function(resolve9) {
7046
+ resolve9(value);
5779
7047
  });
5780
7048
  }
5781
7049
  __name(adopt, "adopt");
5782
- return new (P || (P = Promise))(function(resolve8, reject) {
7050
+ return new (P || (P = Promise))(function(resolve9, reject) {
5783
7051
  function fulfilled(value) {
5784
7052
  try {
5785
7053
  step(generator.next(value));
@@ -5797,7 +7065,7 @@ function __awaiter2(thisArg, _arguments, P, generator) {
5797
7065
  }
5798
7066
  __name(rejected, "rejected");
5799
7067
  function step(result) {
5800
- result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected);
7068
+ result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected);
5801
7069
  }
5802
7070
  __name(step, "step");
5803
7071
  step((generator = generator.apply(thisArg, _arguments || [])).next());
@@ -5985,15 +7253,15 @@ function __asyncValues2(o) {
5985
7253
  }, i);
5986
7254
  function verb(n) {
5987
7255
  i[n] = o[n] && function(v) {
5988
- return new Promise(function(resolve8, reject) {
5989
- v = o[n](v), settle(resolve8, reject, v.done, v.value);
7256
+ return new Promise(function(resolve9, reject) {
7257
+ v = o[n](v), settle(resolve9, reject, v.done, v.value);
5990
7258
  });
5991
7259
  };
5992
7260
  }
5993
7261
  __name(verb, "verb");
5994
- function settle(resolve8, reject, d, v) {
7262
+ function settle(resolve9, reject, d, v) {
5995
7263
  Promise.resolve(v).then(function(v2) {
5996
- resolve8({ value: v2, done: d });
7264
+ resolve9({ value: v2, done: d });
5997
7265
  }, reject);
5998
7266
  }
5999
7267
  __name(settle, "settle");
@@ -6088,8 +7356,8 @@ var require_libzipSync = __commonJS({
6088
7356
  createModule2 = createModule2 || {};
6089
7357
  var Module = typeof createModule2 !== "undefined" ? createModule2 : {};
6090
7358
  var readyPromiseResolve, readyPromiseReject;
6091
- Module["ready"] = new Promise(function(resolve8, reject) {
6092
- readyPromiseResolve = resolve8;
7359
+ Module["ready"] = new Promise(function(resolve9, reject) {
7360
+ readyPromiseResolve = resolve9;
6093
7361
  readyPromiseReject = reject;
6094
7362
  });
6095
7363
  var moduleOverrides = {};
@@ -10536,7 +11804,7 @@ var require_makeInterface = __commonJS({
10536
11804
  });
10537
11805
 
10538
11806
  // ../node_modules/@yarnpkg/libzip/lib/sync.js
10539
- var require_sync = __commonJS({
11807
+ var require_sync2 = __commonJS({
10540
11808
  "../node_modules/@yarnpkg/libzip/lib/sync.js"(exports) {
10541
11809
  "use strict";
10542
11810
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -10566,21 +11834,48 @@ import { CriticalPresetLoadError } from "storybook/internal/server-errors";
10566
11834
  var import_ts_dedent2 = __toESM(require_dist(), 1);
10567
11835
 
10568
11836
  // src/common/utils/interpret-files.ts
11837
+ var import_resolve = __toESM(require_resolve(), 1);
10569
11838
  import { existsSync } from "node:fs";
11839
+ import { extname } from "node:path";
10570
11840
  var supportedExtensions = [
10571
11841
  ".js",
10572
- ".mjs",
10573
- ".cjs",
10574
- ".jsx",
10575
11842
  ".ts",
11843
+ ".jsx",
11844
+ ".tsx",
11845
+ ".mjs",
10576
11846
  ".mts",
11847
+ ".mtsx",
11848
+ ".cjs",
10577
11849
  ".cts",
10578
- ".tsx"
11850
+ ".ctsx"
10579
11851
  ];
10580
11852
  function getInterpretedFile(pathToFile) {
10581
11853
  return supportedExtensions.map((ext) => pathToFile.endsWith(ext) ? pathToFile : `${pathToFile}${ext}`).find((candidate) => existsSync(candidate));
10582
11854
  }
10583
11855
  __name(getInterpretedFile, "getInterpretedFile");
11856
+ function resolveImport(id, options) {
11857
+ const mergedOptions = {
11858
+ extensions: supportedExtensions,
11859
+ packageFilter(pkg) {
11860
+ if (pkg.module) {
11861
+ pkg.main = pkg.module;
11862
+ }
11863
+ return pkg;
11864
+ },
11865
+ ...options
11866
+ };
11867
+ try {
11868
+ return import_resolve.default.sync(id, { ...mergedOptions });
11869
+ } catch (error) {
11870
+ const ext = extname(id);
11871
+ const newId = [".js", ".mjs", ".cjs"].includes(ext) ? `${id.slice(0, -2)}ts` : ext === ".jsx" ? `${id.slice(0, -3)}tsx` : null;
11872
+ if (!newId) {
11873
+ throw error;
11874
+ }
11875
+ return import_resolve.default.sync(newId, { ...mergedOptions, extensions: [] });
11876
+ }
11877
+ }
11878
+ __name(resolveImport, "resolveImport");
10584
11879
 
10585
11880
  // src/common/utils/strip-abs-node-modules-path.ts
10586
11881
  import { posix, sep } from "node:path";
@@ -10595,19 +11890,19 @@ function stripAbsNodeModulesPath(absPath) {
10595
11890
  __name(stripAbsNodeModulesPath, "stripAbsNodeModulesPath");
10596
11891
 
10597
11892
  // src/common/utils/validate-configuration-files.ts
10598
- import { resolve as resolve2 } from "node:path";
11893
+ import { resolve as resolve3 } from "node:path";
10599
11894
  import { once } from "storybook/internal/node-logger";
10600
11895
  import { MainFileMissingError } from "storybook/internal/server-errors";
10601
11896
  var import_ts_dedent = __toESM(require_dist(), 1);
10602
11897
  async function validateConfigurationFiles(configDir, cwd) {
10603
11898
  const extensionsPattern = `{${Array.from(supportedExtensions).join(",")}}`;
10604
- const mainConfigMatches = await glob(slash(resolve2(configDir, `main${extensionsPattern}`)), {
11899
+ const mainConfigMatches = await glob(slash(resolve3(configDir, `main${extensionsPattern}`)), {
10605
11900
  cwd: cwd ?? process.cwd()
10606
11901
  });
10607
11902
  const [mainConfigPath] = mainConfigMatches;
10608
11903
  if (mainConfigMatches.length > 1) {
10609
11904
  once.warn(import_ts_dedent.dedent`
10610
- Multiple main files found in your configDir (${resolve2(configDir)}).
11905
+ Multiple main files found in your configDir (${resolve3(configDir)}).
10611
11906
  Storybook will use the first one found and ignore the others. Please remove the extra files.
10612
11907
  `);
10613
11908
  }
@@ -11169,7 +12464,7 @@ import { dirname as dirname3, join as join6 } from "node:path";
11169
12464
 
11170
12465
  // src/common/js-package-manager/JsPackageManager.ts
11171
12466
  import { readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "node:fs";
11172
- import { dirname as dirname2, isAbsolute, join as join5, resolve as resolve3 } from "node:path";
12467
+ import { dirname as dirname2, isAbsolute, join as join5, resolve as resolve4 } from "node:path";
11173
12468
  import { logger as logger2, prompt } from "storybook/internal/node-logger";
11174
12469
  var import_picocolors = __toESM(require_picocolors(), 1);
11175
12470
  import { gt, satisfies } from "semver";
@@ -11287,7 +12582,7 @@ var JsPackageManager = class _JsPackageManager {
11287
12582
  });
11288
12583
  const content = `${JSON.stringify(packageJsonToWrite, null, 2)}
11289
12584
  `;
11290
- writeFileSync2(resolve3(directory, "package.json"), content, "utf8");
12585
+ writeFileSync2(resolve4(directory, "package.json"), content, "utf8");
11291
12586
  }
11292
12587
  getAllDependencies() {
11293
12588
  const allDependencies = {};
@@ -11708,7 +13003,7 @@ var JsPackageManager = class _JsPackageManager {
11708
13003
  return packageJsonPath;
11709
13004
  }
11710
13005
  }
11711
- return this.packageJsonPaths[0] ?? resolve3(this.cwd, "package.json");
13006
+ return this.packageJsonPaths[0] ?? resolve4(this.cwd, "package.json");
11712
13007
  }
11713
13008
  /** List all package.json files starting from the given directory and stopping at the project root. */
11714
13009
  static listAllPackageJsonPaths(instanceDir, storiesPaths) {
@@ -11914,13 +13209,13 @@ var createLogStream = /* @__PURE__ */ __name(async (logFileName = "storybook.log
11914
13209
  const finalLogPath = join7(process.cwd(), logFileName);
11915
13210
  const temporaryLogPath = await temporaryFile({ name: logFileName });
11916
13211
  const logStream = createWriteStream(temporaryLogPath, { encoding: "utf8" });
11917
- return new Promise((resolve8, reject) => {
13212
+ return new Promise((resolve9, reject) => {
11918
13213
  logStream.once("open", () => {
11919
13214
  const clearLogFile = /* @__PURE__ */ __name(async () => writeFile2(temporaryLogPath, ""), "clearLogFile");
11920
13215
  const removeLogFile = /* @__PURE__ */ __name(async () => rm2(temporaryLogPath, { recursive: true, force: true }), "removeLogFile");
11921
13216
  const readLogFile = /* @__PURE__ */ __name(async () => readFile2(temporaryLogPath, { encoding: "utf8" }), "readLogFile");
11922
13217
  const moveLogFile = /* @__PURE__ */ __name(async () => copyFile(temporaryLogPath, finalLogPath).then(removeLogFile), "moveLogFile");
11923
- resolve8({ logStream, moveLogFile, clearLogFile, removeLogFile, readLogFile });
13218
+ resolve9({ logStream, moveLogFile, clearLogFile, removeLogFile, readLogFile });
11924
13219
  });
11925
13220
  logStream.once("error", reject);
11926
13221
  });
@@ -12209,7 +13504,7 @@ __name(serverRequire, "serverRequire");
12209
13504
  // src/common/utils/load-main-config.ts
12210
13505
  var import_ts_dedent4 = __toESM(require_dist(), 1);
12211
13506
  import { readFile as readFile4, rm as rm3, writeFile as writeFile3 } from "node:fs/promises";
12212
- import { join as join9, parse as parse2, relative, resolve as resolve4 } from "node:path";
13507
+ import { join as join9, parse as parse2, relative, resolve as resolve5 } from "node:path";
12213
13508
  import { logger as logger5 } from "storybook/internal/node-logger";
12214
13509
  import { MainFileEvaluationError } from "storybook/internal/server-errors";
12215
13510
  async function loadMainConfig({
@@ -12218,7 +13513,7 @@ async function loadMainConfig({
12218
13513
  skipCache
12219
13514
  }) {
12220
13515
  await validateConfigurationFiles(configDir, cwd);
12221
- const mainPath = getInterpretedFile(resolve4(configDir, "main"));
13516
+ const mainPath = getInterpretedFile(resolve5(configDir, "main"));
12222
13517
  try {
12223
13518
  const out = await importModule(mainPath, { skipCache });
12224
13519
  return out;
@@ -12264,17 +13559,17 @@ __name(loadMainConfig, "loadMainConfig");
12264
13559
 
12265
13560
  // src/common/utils/load-manager-or-addons-file.ts
12266
13561
  var import_ts_dedent5 = __toESM(require_dist(), 1);
12267
- import { resolve as resolve5 } from "node:path";
13562
+ import { resolve as resolve6 } from "node:path";
12268
13563
  import { logger as logger6 } from "storybook/internal/node-logger";
12269
13564
  function loadManagerOrAddonsFile({ configDir }) {
12270
- const storybookCustomAddonsPath = getInterpretedFile(resolve5(configDir, "addons"));
12271
- const storybookCustomManagerPath = getInterpretedFile(resolve5(configDir, "manager"));
13565
+ const storybookCustomAddonsPath = getInterpretedFile(resolve6(configDir, "addons"));
13566
+ const storybookCustomManagerPath = getInterpretedFile(resolve6(configDir, "manager"));
12272
13567
  if (storybookCustomAddonsPath || storybookCustomManagerPath) {
12273
13568
  logger6.info("=> Loading custom manager config");
12274
13569
  }
12275
13570
  if (storybookCustomAddonsPath && storybookCustomManagerPath) {
12276
13571
  throw new Error(import_ts_dedent5.dedent`
12277
- You have both a "addons.js" and a "manager.js", remove the "addons.js" file from your configDir (${resolve5(
13572
+ You have both a "addons.js" and a "manager.js", remove the "addons.js" file from your configDir (${resolve6(
12278
13573
  configDir,
12279
13574
  "addons"
12280
13575
  )})`);
@@ -12285,13 +13580,13 @@ __name(loadManagerOrAddonsFile, "loadManagerOrAddonsFile");
12285
13580
 
12286
13581
  // src/common/utils/load-preview-or-config-file.ts
12287
13582
  var import_ts_dedent6 = __toESM(require_dist(), 1);
12288
- import { resolve as resolve6 } from "node:path";
13583
+ import { resolve as resolve7 } from "node:path";
12289
13584
  function loadPreviewOrConfigFile({ configDir }) {
12290
- const storybookConfigPath = getInterpretedFile(resolve6(configDir, "config"));
12291
- const storybookPreviewPath = getInterpretedFile(resolve6(configDir, "preview"));
13585
+ const storybookConfigPath = getInterpretedFile(resolve7(configDir, "config"));
13586
+ const storybookPreviewPath = getInterpretedFile(resolve7(configDir, "preview"));
12292
13587
  if (storybookConfigPath && storybookPreviewPath) {
12293
13588
  throw new Error(import_ts_dedent6.dedent`
12294
- You have both a "config.js" and a "preview.js", remove the "config.js" file from your configDir (${resolve6(
13589
+ You have both a "config.js" and a "preview.js", remove the "config.js" file from your configDir (${resolve7(
12295
13590
  configDir,
12296
13591
  "config"
12297
13592
  )})`);
@@ -12363,13 +13658,13 @@ __name(logConfig, "logConfig");
12363
13658
  // src/common/utils/normalize-stories.ts
12364
13659
  var pico2 = __toESM(require_picomatch(), 1);
12365
13660
  import { lstatSync } from "node:fs";
12366
- import { basename, dirname as dirname5, relative as relative2, resolve as resolve7 } from "node:path";
13661
+ import { basename, dirname as dirname5, relative as relative2, resolve as resolve8 } from "node:path";
12367
13662
  import { InvalidStoriesEntryError } from "storybook/internal/server-errors";
12368
13663
  var DEFAULT_TITLE_PREFIX = "";
12369
13664
  var DEFAULT_FILES_PATTERN = "**/*.@(mdx|stories.@(js|jsx|mjs|ts|tsx))";
12370
13665
  var isDirectory = /* @__PURE__ */ __name((configDir, entry) => {
12371
13666
  try {
12372
- return lstatSync(resolve7(configDir, entry)).isDirectory();
13667
+ return lstatSync(resolve8(configDir, entry)).isDirectory();
12373
13668
  } catch (err) {
12374
13669
  return false;
12375
13670
  }
@@ -12379,7 +13674,7 @@ var getDirectoryFromWorkingDir = /* @__PURE__ */ __name(({
12379
13674
  workingDir,
12380
13675
  directory
12381
13676
  }) => {
12382
- const directoryFromConfig = resolve7(configDir, directory);
13677
+ const directoryFromConfig = resolve8(configDir, directory);
12383
13678
  const directoryFromWorking = relative2(workingDir, directoryFromConfig);
12384
13679
  return normalizeStoryPath(directoryFromWorking);
12385
13680
  }, "getDirectoryFromWorkingDir");
@@ -13704,7 +14999,7 @@ var Yarn1Proxy = class extends JsPackageManager {
13704
14999
 
13705
15000
  // src/common/js-package-manager/Yarn2Proxy.ts
13706
15001
  var import_fslib = __toESM(require_lib(), 1);
13707
- var import_libzip = __toESM(require_sync(), 1);
15002
+ var import_libzip = __toESM(require_sync2(), 1);
13708
15003
  import { readFileSync as readFileSync9 } from "node:fs";
13709
15004
  import { join as join14 } from "node:path";
13710
15005
  import { pathToFileURL as pathToFileURL2 } from "node:url";
@@ -14164,7 +15459,7 @@ async function scanAndTransformFiles({
14164
15459
  initial: defaultGlob
14165
15460
  });
14166
15461
  console.log("Scanning for affected files...");
14167
- const globby = (await import("./globby-I54LIY47.js")).globby;
15462
+ const globby = (await import("./globby-CVPDLQ5Z.js")).globby;
14168
15463
  const sourceFiles = await globby([glob2], {
14169
15464
  ...commonGlobOptions(""),
14170
15465
  ignore: ["**/node_modules/**"],
@@ -14194,7 +15489,7 @@ function transformImports(source, renamedImports) {
14194
15489
  __name(transformImports, "transformImports");
14195
15490
  var transformImportFiles = /* @__PURE__ */ __name(async (files, renamedImports, dryRun) => {
14196
15491
  const errors = [];
14197
- const { default: pLimit } = await import("./p-limit-2NBKFARM.js");
15492
+ const { default: pLimit } = await import("./p-limit-I2XW6GST.js");
14198
15493
  const limit = pLimit(10);
14199
15494
  await Promise.all(
14200
15495
  files.map(
@@ -14214,11 +15509,30 @@ var transformImportFiles = /* @__PURE__ */ __name(async (files, renamedImports,
14214
15509
  return errors;
14215
15510
  }, "transformImportFiles");
14216
15511
 
15512
+ // src/common/utils/utils.ts
15513
+ var groupBy = /* @__PURE__ */ __name((items, keySelector) => {
15514
+ return items.reduce(
15515
+ (acc, item, index) => {
15516
+ const key = keySelector(item, index);
15517
+ acc[key] ??= [];
15518
+ acc[key].push(item);
15519
+ return acc;
15520
+ },
15521
+ {}
15522
+ );
15523
+ }, "groupBy");
15524
+ function invariant2(condition, message) {
15525
+ if (condition) {
15526
+ return;
15527
+ }
15528
+ throw new Error((typeof message === "function" ? message() : message) ?? "Invariant failed");
15529
+ }
15530
+ __name(invariant2, "invariant");
15531
+
14217
15532
  export {
14218
- userOrAutoTitleFromSpecifier,
14219
- up2 as up,
14220
15533
  supportedExtensions,
14221
15534
  getInterpretedFile,
15535
+ resolveImport,
14222
15536
  validateConfigurationFiles,
14223
15537
  filterPresetsConfig,
14224
15538
  resolveAddonName,
@@ -14227,6 +15541,7 @@ export {
14227
15541
  loadAllPresets,
14228
15542
  FileSystemCache,
14229
15543
  createFileSystemCache,
15544
+ up2 as up,
14230
15545
  resolvePathInStorybookCache,
14231
15546
  cache2 as cache,
14232
15547
  HandledError,
@@ -14282,6 +15597,7 @@ export {
14282
15597
  satisfies2 as satisfies,
14283
15598
  getPrettier,
14284
15599
  formatFileContent,
15600
+ userOrAutoTitleFromSpecifier,
14285
15601
  posix3 as posix,
14286
15602
  getStoryId,
14287
15603
  getStoryTitle,
@@ -14290,5 +15606,7 @@ export {
14290
15606
  getSyncedStorybookAddons,
14291
15607
  JsPackageManagerFactory,
14292
15608
  scanAndTransformFiles,
14293
- transformImportFiles
15609
+ transformImportFiles,
15610
+ groupBy,
15611
+ invariant2 as invariant
14294
15612
  };