@voidzero-dev/vite-plus-core 0.2.9 → 0.3.1

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 (66) hide show
  1. package/dist/rolldown/cli.mjs +6 -6
  2. package/dist/rolldown/config.d.mts +1 -1
  3. package/dist/rolldown/config.mjs +2 -2
  4. package/dist/rolldown/experimental-index.d.mts +34 -5
  5. package/dist/rolldown/experimental-index.mjs +36 -9
  6. package/dist/rolldown/experimental-runtime-types.d.ts +2 -2
  7. package/dist/rolldown/experimental-runtime.d.ts +2 -2
  8. package/dist/rolldown/experimental-runtime.mjs +2 -2
  9. package/dist/rolldown/filter-index.d.mts +1 -1
  10. package/dist/rolldown/filter-index.mjs +1 -3
  11. package/dist/rolldown/index.d.mts +3 -3
  12. package/dist/rolldown/index.mjs +4 -4
  13. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  14. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  15. package/dist/rolldown/parse-ast-index.d.mts +1 -1
  16. package/dist/rolldown/parse-ast-index.mjs +1 -1
  17. package/dist/rolldown/plugins-index.d.mts +3 -3
  18. package/dist/rolldown/plugins-index.mjs +2 -2
  19. package/dist/rolldown/shared/{binding-CVtkJvyl.d.mts → binding-DZuNHVw4.d.mts} +88 -5
  20. package/dist/rolldown/shared/{binding-CKyeQZen.mjs → binding-DmImI4pj.mjs} +29 -27
  21. package/dist/rolldown/shared/{bindingify-input-options-44iPAymO.mjs → bindingify-input-options-BYClWKnj.mjs} +11 -9
  22. package/dist/rolldown/shared/{constructors-XaIbWpwJ.d.mts → constructors-BM20b11r.d.mts} +2 -2
  23. package/dist/rolldown/shared/{constructors-6Zc-JFd7.mjs → constructors-mRbcbLyX.mjs} +1 -1
  24. package/dist/rolldown/shared/{create-bundler-option-e1FU0w0P.mjs → create-bundler-option-CHTBktos.mjs} +49 -6
  25. package/dist/rolldown/shared/{define-config-DVsXPNaU.d.mts → define-config-DNX0WekP.d.mts} +46 -7
  26. package/dist/rolldown/shared/{error-BzLGqhSQ.mjs → error-BP8lJHle.mjs} +1 -1
  27. package/dist/rolldown/shared/{load-config-C6QXSnoS.mjs → load-config-Cx5fx_8Q.mjs} +1 -1
  28. package/dist/rolldown/shared/{normalize-string-or-regex-DYjJ67tj.mjs → normalize-string-or-regex-Dm69lpQ-.mjs} +1 -1
  29. package/dist/rolldown/shared/{parse-uDDyc1el.mjs → parse-8sr82jSR.mjs} +2 -2
  30. package/dist/rolldown/shared/{resolve-tsconfig-Bcd82vVT.mjs → resolve-tsconfig-BlNGaH3Y.mjs} +10 -6
  31. package/dist/rolldown/shared/{rolldown-CCbQNGZt.mjs → rolldown-CaX_Wmqc.mjs} +5 -4
  32. package/dist/rolldown/shared/{transform-WmU_cI8e.d.mts → transform-CVse9_mH.d.mts} +8 -4
  33. package/dist/rolldown/shared/{watch-vuOCmvFs.mjs → watch-YKfJgIxz.mjs} +4 -4
  34. package/dist/rolldown/utils-index.d.mts +3 -3
  35. package/dist/rolldown/utils-index.mjs +5 -5
  36. package/dist/tsdown/{build-D_enfyvD-Dg1eKRD4.js → build-JVmLFaZt-kqQJ2U7s.js} +1705 -239
  37. package/dist/tsdown/debug-CpC4hV25-tvH_Dsg5.js +247 -0
  38. package/dist/tsdown/{detect-DGhJGEqb-6CTf16BW.js → detect-Bg-d8iUV-KfbO7neP.js} +10 -12
  39. package/dist/tsdown/{dist-DyXLnzyh.js → dist-Cuw3Ngo4.js} +1226 -893
  40. package/dist/tsdown/index-types.d.ts +277 -355
  41. package/dist/tsdown/index.js +4 -4
  42. package/dist/tsdown/internal-D-JfB5uT.js +29 -0
  43. package/dist/tsdown/internal-lhH-5yya.js +62 -0
  44. package/dist/tsdown/{main-DiierkER.js → main-CyNcZUzu.js} +8 -214
  45. package/dist/tsdown/{resolver-cwLsPb2o-Dk4xdAGE.js → resolver-DE0_sy8o-ZQqHQjRu.js} +4 -4
  46. package/dist/tsdown/rolldown-runtime-B4iAMlE-.js +35 -0
  47. package/dist/tsdown/run.js +44 -8
  48. package/dist/tsdown/{src-drVPfX63.js → src-BWidcM5N.js} +5 -5
  49. package/dist/tsdown/{tsc-JnMl2z7d.js → tsc-ChjRhsoQ.js} +26 -20
  50. package/dist/tsdown/tsdown-css.js +17 -11
  51. package/dist/tsdown/tsdown-exe.js +16 -5
  52. package/dist/tsdown/version-CQ98ZBpL-Obdnv4J7.js +141 -0
  53. package/dist/vite/client/bundledDevClient.mjs +69 -19
  54. package/dist/vite/client/client.mjs +4 -4
  55. package/dist/vite/node/chunks/build.js +21 -21
  56. package/dist/vite/node/chunks/lib.js +2 -2
  57. package/dist/vite/node/chunks/node.js +159 -114
  58. package/dist/vite/node/chunks/postcss-import.js +13 -16
  59. package/dist/vite/node/index.d.ts +58 -55
  60. package/dist/vite/node/module-runner.d.ts +13 -13
  61. package/dist/vite/node/module-runner.js +3 -4
  62. package/package.json +30 -30
  63. package/dist/tsdown/debug-CKcBYQLP-C3NhYhrk.js +0 -157
  64. package/dist/tsdown/dist-CMKwGGNp.js +0 -1059
  65. package/dist/tsdown/internal-DKworeK4.js +0 -3
  66. package/dist/tsdown/target-Bab3CUeB-DQ0pKhCv.js +0 -582
@@ -248,7 +248,7 @@ var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
248
248
  module.exports.createColors = createColors;
249
249
  }));
250
250
  //#endregion
251
- //#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/constants.js
251
+ //#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/constants.js
252
252
  var require_constants$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
253
253
  const WIN_SLASH = "\\\\/";
254
254
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
@@ -417,7 +417,7 @@ var require_constants$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
417
417
  };
418
418
  }));
419
419
  //#endregion
420
- //#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/utils.js
420
+ //#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/utils.js
421
421
  var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
422
422
  const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$4();
423
423
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
@@ -465,7 +465,7 @@ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
465
465
  };
466
466
  }));
467
467
  //#endregion
468
- //#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/scan.js
468
+ //#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/scan.js
469
469
  var require_scan$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
470
470
  const utils = require_utils$2();
471
471
  const { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants$4();
@@ -494,7 +494,7 @@ var require_scan$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
494
494
  const scan = (input, options) => {
495
495
  const opts = options || {};
496
496
  const length = input.length - 1;
497
- const scanToEnd = opts.parts === true || opts.scanToEnd === true;
497
+ const scanToEnd = opts.parts === true || opts.tokens === true || opts.scanToEnd === true;
498
498
  const slashes = [];
499
499
  const tokens = [];
500
500
  const parts = [];
@@ -597,14 +597,18 @@ var require_scan$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
597
597
  finished = true;
598
598
  if (code === CHAR_EXCLAMATION_MARK && index === start) negatedExtglob = true;
599
599
  if (scanToEnd === true) {
600
+ let parens = 0;
600
601
  while (eos() !== true && (code = advance())) {
601
602
  if (code === CHAR_BACKWARD_SLASH) {
602
603
  backslashes = token.backslashes = true;
603
- code = advance();
604
+ advance();
604
605
  continue;
605
606
  }
606
- if (code === CHAR_RIGHT_PARENTHESES) {
607
- isGlob = token.isGlob = true;
607
+ if (code === CHAR_LEFT_PARENTHESES) {
608
+ parens++;
609
+ continue;
610
+ }
611
+ if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
608
612
  finished = true;
609
613
  break;
610
614
  }
@@ -652,13 +656,18 @@ var require_scan$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
652
656
  if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
653
657
  isGlob = token.isGlob = true;
654
658
  if (scanToEnd === true) {
659
+ let parens = 1;
655
660
  while (eos() !== true && (code = advance())) {
656
- if (code === CHAR_LEFT_PARENTHESES) {
661
+ if (code === CHAR_BACKWARD_SLASH) {
657
662
  backslashes = token.backslashes = true;
658
- code = advance();
663
+ advance();
659
664
  continue;
660
665
  }
661
- if (code === CHAR_RIGHT_PARENTHESES) {
666
+ if (code === CHAR_LEFT_PARENTHESES) {
667
+ parens++;
668
+ continue;
669
+ }
670
+ if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
662
671
  finished = true;
663
672
  break;
664
673
  }
@@ -721,7 +730,7 @@ var require_scan$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
721
730
  if (opts.parts === true || opts.tokens === true) {
722
731
  let prevIndex;
723
732
  for (let idx = 0; idx < slashes.length; idx++) {
724
- const n = prevIndex ? prevIndex + 1 : start;
733
+ const n = prevIndex !== void 0 ? prevIndex + 1 : start;
725
734
  const i = slashes[idx];
726
735
  const value = input.slice(n, i);
727
736
  if (opts.tokens) {
@@ -732,18 +741,19 @@ var require_scan$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
732
741
  depth(tokens[idx]);
733
742
  state.maxDepth += tokens[idx].depth;
734
743
  }
735
- if (idx !== 0 || value !== "") parts.push(value);
736
- prevIndex = i;
737
- }
738
- if (prevIndex && prevIndex + 1 < input.length) {
739
- const value = input.slice(prevIndex + 1);
740
- parts.push(value);
741
- if (opts.tokens) {
742
- tokens[tokens.length - 1].value = value;
743
- depth(tokens[tokens.length - 1]);
744
- state.maxDepth += tokens[tokens.length - 1].depth;
744
+ if (i >= start) {
745
+ parts.push(value);
746
+ prevIndex = i;
745
747
  }
746
748
  }
749
+ const n = prevIndex !== void 0 ? prevIndex + 1 : start;
750
+ const value = input.slice(n);
751
+ parts.push(value);
752
+ if (opts.tokens && prevIndex && prevIndex + 1 < input.length) {
753
+ tokens[tokens.length - 1].value = value;
754
+ depth(tokens[tokens.length - 1]);
755
+ state.maxDepth += tokens[tokens.length - 1].depth;
756
+ }
747
757
  state.slashes = slashes;
748
758
  state.parts = parts;
749
759
  }
@@ -752,7 +762,7 @@ var require_scan$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
752
762
  module.exports = scan;
753
763
  }));
754
764
  //#endregion
755
- //#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/parse.js
765
+ //#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/parse.js
756
766
  var require_parse$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
757
767
  const constants = require_constants$4();
758
768
  const utils = require_utils$2();
@@ -1650,6 +1660,7 @@ var require_parse$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1650
1660
  rest = rest.slice(3);
1651
1661
  consume("/**", 3);
1652
1662
  }
1663
+ const isEnd = eos() || state.parens > 0 && rest === ")".repeat(state.parens) && !extglobs.some((extglob) => extglob.type === "negate");
1653
1664
  if (prior.type === "bos" && eos()) {
1654
1665
  prev.type = "globstar";
1655
1666
  prev.value += value;
@@ -1659,7 +1670,7 @@ var require_parse$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1659
1670
  consume(value);
1660
1671
  continue;
1661
1672
  }
1662
- if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
1673
+ if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && isEnd) {
1663
1674
  state.output = state.output.slice(0, -(prior.output + prev.output).length);
1664
1675
  prior.output = `(?:${prior.output}`;
1665
1676
  prev.type = "globstar";
@@ -1824,7 +1835,7 @@ var require_parse$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1824
1835
  module.exports = parse;
1825
1836
  }));
1826
1837
  //#endregion
1827
- //#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/lib/picomatch.js
1838
+ //#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/picomatch.js
1828
1839
  var require_picomatch$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1829
1840
  const scan = require_scan$1();
1830
1841
  const parse = require_parse$4();
@@ -2133,7 +2144,7 @@ var require_picomatch$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2133
2144
  module.exports = picomatch;
2134
2145
  }));
2135
2146
  //#endregion
2136
- //#region ../../node_modules/.pnpm/picomatch@4.0.5/node_modules/picomatch/index.js
2147
+ //#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/index.js
2137
2148
  var require_picomatch$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2138
2149
  const pico = require_picomatch$3();
2139
2150
  const utils = require_utils$2();
@@ -2298,7 +2309,7 @@ function freshImport(specifier) {
2298
2309
  return importer?.collect(specifier);
2299
2310
  }
2300
2311
  //#endregion
2301
- //#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.5/node_modules/fdir/dist/index.mjs
2312
+ //#region ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.7/node_modules/fdir/dist/index.mjs
2302
2313
  var __require = /* @__PURE__ */ createRequire$1(import.meta.url);
2303
2314
  function cleanPath(path) {
2304
2315
  let normalized = normalize$1(path);
@@ -3224,7 +3235,7 @@ const importMetaResolveWithCustomHookString = `
3224
3235
  `;
3225
3236
  //#endregion
3226
3237
  //#region ../../vite/packages/vite/package.json
3227
- var version = "8.2.1";
3238
+ var version = "8.2.2";
3228
3239
  //#endregion
3229
3240
  //#region ../../vite/packages/vite/src/node/constants.ts
3230
3241
  const ROLLUP_HOOKS = [
@@ -4404,7 +4415,7 @@ var node_default = createDebug;
4404
4415
  createDebug.default = createDebug;
4405
4416
  createDebug.debug = createDebug;
4406
4417
  //#endregion
4407
- //#region ../../node_modules/.pnpm/@rollup+pluginutils@5.4.0_rollup@4.60.4/node_modules/@rollup/pluginutils/dist/es/index.js
4418
+ //#region ../../node_modules/.pnpm/@rollup+pluginutils@5.4.0_rollup@4.63.1/node_modules/@rollup/pluginutils/dist/es/index.js
4408
4419
  function isArray(arg) {
4409
4420
  return Array.isArray(arg);
4410
4421
  }
@@ -6894,7 +6905,7 @@ function warnDeprecatedShouldBeConvertedToPluginOptions(logger, name) {
6894
6905
  logger.warn(import_picocolors.default.yellow(`\`esbuild.${name}\` option was specified. But this option is deprecated and will be removed in future versions. This option can be achieved by using a plugin with transform hook, please use that instead.`));
6895
6906
  }
6896
6907
  //#endregion
6897
- //#region ../../node_modules/.pnpm/magic-string@1.1.0/node_modules/magic-string/dist/index.mjs
6908
+ //#region ../../node_modules/.pnpm/magic-string@1.2.1/node_modules/magic-string/dist/index.mjs
6898
6909
  var BitSet = class BitSet {
6899
6910
  constructor(arg) {
6900
6911
  this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
@@ -7032,12 +7043,24 @@ var Chunk = class Chunk {
7032
7043
  }
7033
7044
  }
7034
7045
  };
7046
+ /**
7047
+ * The single error type thrown by MagicString.
7048
+ *
7049
+ * Every message is prefixed with `[MagicString]` so its source is obvious at a
7050
+ * glance, and is kept short and consistent in tone.
7051
+ */
7052
+ var MagicStringError = class extends Error {
7053
+ name = "MagicStringError";
7054
+ constructor(message, options) {
7055
+ super(`[MagicString] ${message}`, options);
7056
+ }
7057
+ };
7035
7058
  function getBtoa() {
7036
7059
  if (typeof globalThis !== "undefined" && typeof globalThis.btoa === "function") return (str) => globalThis.btoa(unescape(encodeURIComponent(str)));
7037
7060
  const buffer = globalThis["Buffer"];
7038
7061
  if (buffer) return (str) => buffer.from(str, "utf-8").toString("base64");
7039
7062
  return () => {
7040
- throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
7063
+ throw new MagicStringError("unsupported environment: `btoa` or `Buffer` is required");
7041
7064
  };
7042
7065
  }
7043
7066
  const btoa$1 = /* #__PURE__ */ getBtoa();
@@ -7254,11 +7277,11 @@ var MagicString = class MagicString {
7254
7277
  },
7255
7278
  byStart: {
7256
7279
  writable: true,
7257
- value: {}
7280
+ value: /* @__PURE__ */ new Map([[0, chunk]])
7258
7281
  },
7259
7282
  byEnd: {
7260
7283
  writable: true,
7261
- value: {}
7284
+ value: /* @__PURE__ */ new Map([[string.length, chunk]])
7262
7285
  },
7263
7286
  filename: {
7264
7287
  writable: true,
@@ -7287,10 +7310,12 @@ var MagicString = class MagicString {
7287
7310
  offset: {
7288
7311
  writable: true,
7289
7312
  value: options.offset || 0
7313
+ },
7314
+ hasMovedChunks: {
7315
+ writable: true,
7316
+ value: false
7290
7317
  }
7291
7318
  });
7292
- this.byStart = /* @__PURE__ */ new Map([[0, chunk]]);
7293
- this.byEnd = /* @__PURE__ */ new Map([[string.length, chunk]]);
7294
7319
  }
7295
7320
  /**
7296
7321
  * Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is false.
@@ -7302,7 +7327,7 @@ var MagicString = class MagicString {
7302
7327
  * Appends the specified content to the end of the string.
7303
7328
  */
7304
7329
  append(content) {
7305
- if (typeof content !== "string") throw new TypeError("outro content must be a string");
7330
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7306
7331
  this.outro += content;
7307
7332
  return this;
7308
7333
  }
@@ -7313,7 +7338,7 @@ var MagicString = class MagicString {
7313
7338
  */
7314
7339
  appendLeft(index, content) {
7315
7340
  index = index + this.offset;
7316
- if (typeof content !== "string") throw new TypeError("inserted content must be a string");
7341
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7317
7342
  this._split(index);
7318
7343
  const chunk = this.byEnd.get(index);
7319
7344
  if (chunk) chunk.appendLeft(content);
@@ -7327,7 +7352,7 @@ var MagicString = class MagicString {
7327
7352
  */
7328
7353
  appendRight(index, content) {
7329
7354
  index = index + this.offset;
7330
- if (typeof content !== "string") throw new TypeError("inserted content must be a string");
7355
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7331
7356
  this._split(index);
7332
7357
  const chunk = this.byStart.get(index);
7333
7358
  if (chunk) chunk.appendRight(content);
@@ -7361,6 +7386,7 @@ var MagicString = class MagicString {
7361
7386
  cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
7362
7387
  cloned.intro = this.intro;
7363
7388
  cloned.outro = this.outro;
7389
+ cloned.hasMovedChunks = this.hasMovedChunks;
7364
7390
  return cloned;
7365
7391
  }
7366
7392
  /**
@@ -7489,7 +7515,7 @@ var MagicString = class MagicString {
7489
7515
  }
7490
7516
  /** @internal */
7491
7517
  insert() {
7492
- throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)");
7518
+ throw new MagicStringError("insert() is deprecated, use appendLeft() or prependRight()");
7493
7519
  }
7494
7520
  /** @internal */
7495
7521
  insertLeft(index, content) {
@@ -7515,12 +7541,19 @@ var MagicString = class MagicString {
7515
7541
  end = end + this.offset;
7516
7542
  index = index + this.offset;
7517
7543
  if (start === end) return this;
7518
- if (index >= start && index <= end) throw new Error("Cannot move a selection inside itself");
7544
+ if (index >= start && index <= end) throw new MagicStringError("cannot move a selection inside itself");
7519
7545
  this._split(start);
7520
7546
  this._split(end);
7521
7547
  this._split(index);
7522
7548
  const first = this.byStart.get(start);
7523
7549
  const last = this.byEnd.get(end);
7550
+ if (this.hasMovedChunks) {
7551
+ let cursor = first;
7552
+ while (cursor !== last) {
7553
+ cursor = cursor.next;
7554
+ if (!cursor || cursor.start < start || cursor.end > end) throw new MagicStringError(`cannot move ${start} to ${end} because an earlier move split that range`);
7555
+ }
7556
+ }
7524
7557
  const oldLeft = first.previous;
7525
7558
  const oldRight = last.next;
7526
7559
  const newRight = this.byStart.get(index);
@@ -7539,6 +7572,7 @@ var MagicString = class MagicString {
7539
7572
  last.next = newRight || null;
7540
7573
  if (!newLeft) this.firstChunk = first;
7541
7574
  if (!newRight) this.lastChunk = last;
7575
+ this.hasMovedChunks = true;
7542
7576
  return this;
7543
7577
  }
7544
7578
  /**
@@ -7568,13 +7602,15 @@ var MagicString = class MagicString {
7568
7602
  update(start, end, content, options) {
7569
7603
  start = start + this.offset;
7570
7604
  end = end + this.offset;
7571
- if (typeof content !== "string") throw new TypeError("replacement content must be a string");
7605
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7572
7606
  if (this.original.length !== 0) {
7573
7607
  while (start < 0) start += this.original.length;
7574
7608
  while (end < 0) end += this.original.length;
7575
7609
  }
7576
- if (end > this.original.length) throw new Error("end is out of bounds");
7577
- if (start === end) throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");
7610
+ if (start < 0) throw new MagicStringError(`start ${start} is out of bounds`);
7611
+ if (end > this.original.length) throw new MagicStringError(`end ${end} is out of bounds`);
7612
+ if (start === end) throw new MagicStringError(`cannot overwrite a zero-length range at ${start}, use appendLeft() or prependRight()`);
7613
+ if (start > end) throw new MagicStringError(`end must be greater than start (start: ${start}, end: ${end})`);
7578
7614
  this._split(start);
7579
7615
  this._split(end);
7580
7616
  if (options === true) {
@@ -7600,7 +7636,7 @@ var MagicString = class MagicString {
7600
7636
  if (first) {
7601
7637
  let chunk = first;
7602
7638
  while (chunk !== last) {
7603
- if (chunk.next !== this.byStart.get(chunk.end)) throw new Error("Cannot overwrite across a split point");
7639
+ if (chunk.next !== this.byStart.get(chunk.end)) throw new MagicStringError("cannot overwrite across a split point");
7604
7640
  chunk = chunk.next;
7605
7641
  chunk.edit("", false);
7606
7642
  }
@@ -7616,7 +7652,7 @@ var MagicString = class MagicString {
7616
7652
  * Prepends the string with the specified content.
7617
7653
  */
7618
7654
  prepend(content) {
7619
- if (typeof content !== "string") throw new TypeError("outro content must be a string");
7655
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7620
7656
  this.intro = content + this.intro;
7621
7657
  return this;
7622
7658
  }
@@ -7625,7 +7661,7 @@ var MagicString = class MagicString {
7625
7661
  */
7626
7662
  prependLeft(index, content) {
7627
7663
  index = index + this.offset;
7628
- if (typeof content !== "string") throw new TypeError("inserted content must be a string");
7664
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7629
7665
  this._split(index);
7630
7666
  const chunk = this.byEnd.get(index);
7631
7667
  if (chunk) chunk.prependLeft(content);
@@ -7637,7 +7673,7 @@ var MagicString = class MagicString {
7637
7673
  */
7638
7674
  prependRight(index, content) {
7639
7675
  index = index + this.offset;
7640
- if (typeof content !== "string") throw new TypeError("inserted content must be a string");
7676
+ if (typeof content !== "string") throw new MagicStringError(`content must be a string, got ${typeof content}`);
7641
7677
  this._split(index);
7642
7678
  const chunk = this.byStart.get(index);
7643
7679
  if (chunk) chunk.prependRight(content);
@@ -7656,8 +7692,8 @@ var MagicString = class MagicString {
7656
7692
  while (end < 0) end += this.original.length;
7657
7693
  }
7658
7694
  if (start === end) return this;
7659
- if (start < 0 || end > this.original.length) throw new Error("Character is out of bounds");
7660
- if (start > end) throw new Error("end must be greater than start");
7695
+ if (start < 0 || end > this.original.length) throw new MagicStringError(`range ${start}–${end} is out of bounds`);
7696
+ if (start > end) throw new MagicStringError(`end must be greater than start (start: ${start}, end: ${end})`);
7661
7697
  this._split(start);
7662
7698
  this._split(end);
7663
7699
  let chunk = this.byStart.get(start);
@@ -7680,8 +7716,8 @@ var MagicString = class MagicString {
7680
7716
  while (end < 0) end += this.original.length;
7681
7717
  }
7682
7718
  if (start === end) return this;
7683
- if (start < 0 || end > this.original.length) throw new Error("Character is out of bounds");
7684
- if (start > end) throw new Error("end must be greater than start");
7719
+ if (start < 0 || end > this.original.length) throw new MagicStringError(`range ${start}–${end} is out of bounds`);
7720
+ if (start > end) throw new MagicStringError(`end must be greater than start (start: ${start}, end: ${end})`);
7685
7721
  this._split(start);
7686
7722
  this._split(end);
7687
7723
  let chunk = this.byStart.get(start);
@@ -7747,12 +7783,12 @@ var MagicString = class MagicString {
7747
7783
  if (chunk.start < end && chunk.end >= end) return result;
7748
7784
  chunk = chunk.next;
7749
7785
  }
7750
- if (chunk && chunk.edited && chunk.start !== start) throw new Error(`Cannot use replaced character ${start} as slice start anchor.`);
7786
+ if (chunk && chunk.edited && chunk.start !== start) throw new MagicStringError(`cannot use edited character ${start} as slice start anchor`);
7751
7787
  const startChunk = chunk;
7752
7788
  while (chunk) {
7753
7789
  if (chunk.intro && (startChunk !== chunk || chunk.start === start)) result += chunk.intro;
7754
7790
  const containsEnd = chunk.start < end && chunk.end >= end;
7755
- if (containsEnd && chunk.edited && chunk.end !== end) throw new Error(`Cannot use replaced character ${end} as slice end anchor.`);
7791
+ if (containsEnd && chunk.edited && chunk.end !== end) throw new MagicStringError(`cannot use edited character ${end} as slice end anchor`);
7756
7792
  const sliceStart = startChunk === chunk ? start - chunk.start : 0;
7757
7793
  const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;
7758
7794
  result += chunk.content.slice(sliceStart, sliceEnd);
@@ -7788,7 +7824,7 @@ var MagicString = class MagicString {
7788
7824
  _splitChunk(chunk, index) {
7789
7825
  if (chunk.edited && chunk.content.length) {
7790
7826
  const loc = getLocator(this.original)(index);
7791
- throw new Error(`Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`);
7827
+ throw new MagicStringError(`cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`);
7792
7828
  }
7793
7829
  const newChunk = chunk.split(index);
7794
7830
  this.byEnd.set(index, chunk);
@@ -7970,12 +8006,12 @@ var MagicString = class MagicString {
7970
8006
  */
7971
8007
  replaceAll(searchValue, replacement) {
7972
8008
  if (typeof searchValue === "string") return this._replaceAllString(searchValue, replacement);
7973
- if (!searchValue.global) throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");
8009
+ if (!searchValue.global) throw new MagicStringError("replaceAll() requires a global RegExp");
7974
8010
  return this._replaceRegexp(searchValue, replacement);
7975
8011
  }
7976
8012
  };
7977
8013
  //#endregion
7978
- //#region ../../node_modules/.pnpm/@rollup+plugin-alias@6.0.0_rollup@4.60.4/node_modules/@rollup/plugin-alias/dist/index.js
8014
+ //#region ../../node_modules/.pnpm/@rollup+plugin-alias@6.0.0_rollup@4.63.1/node_modules/@rollup/plugin-alias/dist/index.js
7979
8015
  function matches$1(pattern, importee) {
7980
8016
  if (pattern instanceof RegExp) return pattern.test(importee);
7981
8017
  if (importee.length < pattern.length) return false;
@@ -8961,8 +8997,8 @@ var require_debug$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8961
8997
  * @api public
8962
8998
  */
8963
8999
  function enabled(name) {
8964
- var i, len;
8965
- for (i = 0, len = exports.skips.length; i < len; i++) if (exports.skips[i].test(name)) return false;
9000
+ var i = 0, len = exports.skips.length;
9001
+ for (; i < len; i++) if (exports.skips[i].test(name)) return false;
8966
9002
  for (i = 0, len = exports.names.length; i < len; i++) if (exports.names[i].test(name)) return true;
8967
9003
  return false;
8968
9004
  }
@@ -16298,7 +16334,7 @@ var require_launch_editor_middleware = /* @__PURE__ */ __commonJSMin(((exports,
16298
16334
  };
16299
16335
  }));
16300
16336
  //#endregion
16301
- //#region ../../node_modules/.pnpm/@vercel+detect-agent@1.2.3/node_modules/@vercel/detect-agent/dist/index.js
16337
+ //#region ../../node_modules/.pnpm/@vercel+detect-agent@1.2.5/node_modules/@vercel/detect-agent/dist/index.js
16302
16338
  var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16303
16339
  var __defProp = Object.defineProperty;
16304
16340
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -17230,19 +17266,7 @@ function walk(root, { onIdentifier, onImportMeta, onDynamicImport, onStatements
17230
17266
  if (parentScope) setScope(parentScope, node.id.name);
17231
17267
  }
17232
17268
  if (node.type === "FunctionExpression" && node.id) setScope(node, node.id.name);
17233
- node.params.forEach((p) => {
17234
- if (p.type === "ObjectPattern" || p.type === "ArrayPattern") {
17235
- handlePattern(p, node);
17236
- return;
17237
- }
17238
- walk$1(p.type === "AssignmentPattern" ? p.left : p, { enter(child, parent) {
17239
- if (parent?.type === "AssignmentPattern" && parent.right === child) return this.skip();
17240
- if (child.type !== "Identifier") return;
17241
- if (isStaticPropertyKey(child, parent)) return;
17242
- if (parent?.type === "TemplateLiteral" && parent.expressions.includes(child) || parent?.type === "CallExpression" && parent.callee === child) return;
17243
- setScope(node, child.name);
17244
- } });
17245
- });
17269
+ node.params.forEach((p) => handlePattern(p, node));
17246
17270
  } else if (node.type === "ClassDeclaration") {
17247
17271
  const parentScope = findParentScope(parentStack);
17248
17272
  if (parentScope) setScope(parentScope, node.id.name);
@@ -18438,7 +18462,7 @@ function checkPublicFile(url, config) {
18438
18462
  return tryStatSync(publicFile)?.isFile() ? publicFile : void 0;
18439
18463
  }
18440
18464
  //#endregion
18441
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/constants.js
18465
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/constants.js
18442
18466
  var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18443
18467
  const BINARY_TYPES = [
18444
18468
  "nodebuffer",
@@ -18461,7 +18485,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18461
18485
  };
18462
18486
  }));
18463
18487
  //#endregion
18464
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/buffer-util.js
18488
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/buffer-util.js
18465
18489
  var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18466
18490
  const { EMPTY_BUFFER } = require_constants();
18467
18491
  const FastBuffer = Buffer[Symbol.species];
@@ -18561,7 +18585,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18561
18585
  } catch (e) {}
18562
18586
  }));
18563
18587
  //#endregion
18564
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/limiter.js
18588
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/limiter.js
18565
18589
  var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18566
18590
  const kDone = Symbol("kDone");
18567
18591
  const kRun = Symbol("kRun");
@@ -18612,7 +18636,7 @@ var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18612
18636
  module.exports = Limiter;
18613
18637
  }));
18614
18638
  //#endregion
18615
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/permessage-deflate.js
18639
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/permessage-deflate.js
18616
18640
  var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18617
18641
  const zlib$1 = __require$1("zlib");
18618
18642
  const bufferUtil = require_buffer_util();
@@ -18732,7 +18756,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module
18732
18756
  acceptAsServer(offers) {
18733
18757
  const opts = this._options;
18734
18758
  const accepted = offers.find((params) => {
18735
- if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && !params.client_max_window_bits) return false;
18759
+ if (opts.serverNoContextTakeover === false && params.server_no_context_takeover || params.server_max_window_bits && (opts.serverMaxWindowBits === false || typeof opts.serverMaxWindowBits === "number" && opts.serverMaxWindowBits > params.server_max_window_bits) || typeof opts.clientMaxWindowBits === "number" && (typeof params.client_max_window_bits === "number" ? opts.clientMaxWindowBits > params.client_max_window_bits : !params.client_max_window_bits)) return false;
18736
18760
  return true;
18737
18761
  });
18738
18762
  if (!accepted) throw new Error("None of the extension offers can be accepted");
@@ -18948,7 +18972,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module
18948
18972
  }
18949
18973
  }));
18950
18974
  //#endregion
18951
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/validation.js
18975
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/validation.js
18952
18976
  var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18953
18977
  const { isUtf8 } = __require$1("buffer");
18954
18978
  const { hasBlob } = require_constants();
@@ -19144,7 +19168,7 @@ var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19144
19168
  } catch (e) {}
19145
19169
  }));
19146
19170
  //#endregion
19147
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/receiver.js
19171
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/receiver.js
19148
19172
  var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19149
19173
  const { Writable: Writable$1 } = __require$1("stream");
19150
19174
  const PerMessageDeflate = require_permessage_deflate();
@@ -19607,7 +19631,7 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19607
19631
  module.exports = Receiver;
19608
19632
  }));
19609
19633
  //#endregion
19610
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/sender.js
19634
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/sender.js
19611
19635
  var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
19612
19636
  const { Duplex: Duplex$3 } = __require$1("stream");
19613
19637
  const { randomFillSync } = __require$1("crypto");
@@ -20105,7 +20129,7 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20105
20129
  }
20106
20130
  }));
20107
20131
  //#endregion
20108
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/event-target.js
20132
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/event-target.js
20109
20133
  var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20110
20134
  const { kForOnEventAttribute, kListener } = require_constants();
20111
20135
  const kCode = Symbol("kCode");
@@ -20336,7 +20360,7 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20336
20360
  }
20337
20361
  }));
20338
20362
  //#endregion
20339
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/extension.js
20363
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/extension.js
20340
20364
  var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20341
20365
  const { tokenChars } = require_validation();
20342
20366
  /**
@@ -20482,7 +20506,7 @@ var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20482
20506
  };
20483
20507
  }));
20484
20508
  //#endregion
20485
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket.js
20509
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/websocket.js
20486
20510
  var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20487
20511
  const EventEmitter$2 = __require$1("events");
20488
20512
  const https$3 = __require$1("https");
@@ -21475,7 +21499,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21475
21499
  }
21476
21500
  }));
21477
21501
  //#endregion
21478
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/stream.js
21502
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/stream.js
21479
21503
  var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21480
21504
  require_websocket();
21481
21505
  const { Duplex: Duplex$1 } = __require$1("stream");
@@ -21591,7 +21615,7 @@ var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21591
21615
  module.exports = createWebSocketStream;
21592
21616
  }));
21593
21617
  //#endregion
21594
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/subprotocol.js
21618
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/subprotocol.js
21595
21619
  var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21596
21620
  const { tokenChars } = require_validation();
21597
21621
  /**
@@ -21630,7 +21654,7 @@ var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21630
21654
  module.exports = { parse };
21631
21655
  }));
21632
21656
  //#endregion
21633
- //#region ../../node_modules/.pnpm/ws@8.21.1/node_modules/ws/lib/websocket-server.js
21657
+ //#region ../../node_modules/.pnpm/ws@8.21.3/node_modules/ws/lib/websocket-server.js
21634
21658
  var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
21635
21659
  const EventEmitter$1 = __require$1("events");
21636
21660
  const http$4 = __require$1("http");
@@ -25827,13 +25851,20 @@ function isFileInTargetPath(targetPath, filePath) {
25827
25851
  return isSameFilePath(targetPath, filePath) || isParentDirectory(targetPath, filePath);
25828
25852
  }
25829
25853
  const windowsDriveRE = /^[A-Z]:/i;
25854
+ const windowsShortNameSegmentRE = /^[^~.]{1,6}~\d+(?:\.[^~.]{0,3})?$/;
25855
+ /**
25856
+ * Warning: parameters are not validated, only works with normalized absolute paths
25857
+ */
25858
+ function looksLikeWindowsShortNamePath(filePath) {
25859
+ return filePath.includes("~") && filePath.split("/").some((segment) => windowsShortNameSegmentRE.test(segment));
25860
+ }
25830
25861
  /**
25831
25862
  * Warning: parameters are not validated, only works with normalized absolute paths
25832
25863
  */
25833
25864
  function isFileLoadingAllowed(config, filePath) {
25834
25865
  const { fs } = config.server;
25835
25866
  if (!fs.strict) return true;
25836
- if (isWindows && filePath.includes("~")) return false;
25867
+ if (isWindows && looksLikeWindowsShortNamePath(filePath)) return false;
25837
25868
  if ((isWindows && windowsDriveRE.test(filePath) ? filePath.slice(2) : filePath).includes(":")) return false;
25838
25869
  const filePathWithoutTrailingSlash = filePath.endsWith("/") ? filePath.slice(0, -1) : filePath;
25839
25870
  if (config.fsDenyGlob(filePathWithoutTrailingSlash)) return false;
@@ -27275,7 +27306,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27275
27306
  };
27276
27307
  }));
27277
27308
  //#endregion
27278
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/req.js
27309
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/req.js
27279
27310
  var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27280
27311
  const { createRequire: createRequire$2 } = __require$1("node:module");
27281
27312
  const { fileURLToPath: fileURLToPath$2, pathToFileURL: pathToFileURL$1 } = __require$1("node:url");
@@ -27317,7 +27348,7 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27317
27348
  module.exports = req;
27318
27349
  }));
27319
27350
  //#endregion
27320
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/options.js
27351
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/options.js
27321
27352
  var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27322
27353
  const req = require_req();
27323
27354
  /**
@@ -27351,7 +27382,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27351
27382
  module.exports = options;
27352
27383
  }));
27353
27384
  //#endregion
27354
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/plugins.js
27385
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/plugins.js
27355
27386
  var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27356
27387
  const req = require_req();
27357
27388
  /**
@@ -27405,7 +27436,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27405
27436
  module.exports = plugins;
27406
27437
  }));
27407
27438
  //#endregion
27408
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.25_tsx@4.23.1_yaml@2.9.0/node_modules/postcss-load-config/src/index.js
27439
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.26_tsx@4.23.12_yaml@2.9.0/node_modules/postcss-load-config/src/index.js
27409
27440
  var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27410
27441
  const { resolve: resolve$3 } = __require$1("node:path");
27411
27442
  const config = require_src$1();
@@ -29450,8 +29481,9 @@ async function compileLightningCSS(environment, id, src, deps, workerController,
29450
29481
  };
29451
29482
  }
29452
29483
  function getLightningCssErrorMessageForIeSyntaxes(code) {
29453
- if (/[\s;{]\*[a-zA-Z-][\w-]+\s*:/.test(code)) return ".\nThis file contains star property hack (e.g. `*zoom`), which was used in the past to support old Internet Explorer versions. This is not a valid CSS syntax and will be ignored by modern browsers. \nWhile this is not supported by LightningCSS, you can set `css.lightningcss.errorRecovery: true` to strip these codes.";
29454
- if (/min-width:\s*0\\0/.test(code)) return ".\nThis file contains @media zero hack (e.g. `@media (min-width: 0\\0)`), which was used in the past to support old Internet Explorer versions. This is not a valid CSS syntax and will be ignored by modern browsers. \nWhile this is not supported by LightningCSS, you can set `css.lightningcss.errorRecovery: true` to strip these codes.";
29484
+ const commonIeMessage = ", which was used in the past to support old Internet Explorer versions. This is not a valid CSS syntax and will be ignored by modern browsers. \nWhile this is not supported by LightningCSS, you can set `css.lightningcss.errorRecovery: true` to strip these codes.";
29485
+ if (/[\s;{]\*[a-zA-Z-][\w-]+\s*:/.test(code)) return ".\nThis file contains star property hack (e.g. `*zoom`)" + commonIeMessage;
29486
+ if (/min-width:\s*0\\0/.test(code)) return ".\nThis file contains @media zero hack (e.g. `@media (min-width: 0\\0)`)" + commonIeMessage;
29455
29487
  }
29456
29488
  const map = {
29457
29489
  chrome: "chrome",
@@ -29559,9 +29591,8 @@ const esRE = /es(6|\d{4})/;
29559
29591
  const versionRE = /\d/;
29560
29592
  const convertTargetsCache = /* @__PURE__ */ new Map();
29561
29593
  const convertTargets = (esbuildTarget) => {
29562
- if (!esbuildTarget) return {};
29563
- const cached = convertTargetsCache.get(esbuildTarget);
29564
- if (cached) return cached;
29594
+ if (!esbuildTarget) return void 0;
29595
+ if (convertTargetsCache.has(esbuildTarget)) return convertTargetsCache.get(esbuildTarget);
29565
29596
  const targets = {};
29566
29597
  const entriesWithoutES = arraify(esbuildTarget).flatMap((e) => {
29567
29598
  const match = esRE.exec(e);
@@ -29587,8 +29618,9 @@ const convertTargets = (esbuildTarget) => {
29587
29618
  }
29588
29619
  throw new Error(`Unsupported target "${entry}"`);
29589
29620
  }
29590
- convertTargetsCache.set(esbuildTarget, targets);
29591
- return targets;
29621
+ const result = Object.keys(targets).length > 0 ? targets : void 0;
29622
+ convertTargetsCache.set(esbuildTarget, result);
29623
+ return result;
29592
29624
  };
29593
29625
  function resolveLibCssFilename(libOptions, root, packageCache) {
29594
29626
  if (typeof libOptions.cssFileName === "string") return `${libOptions.cssFileName}.css`;
@@ -30615,7 +30647,7 @@ If you intend to import that asset, put the file in the src directory, and use $
30615
30647
  //#region ../../vite/packages/vite/src/node/plugins/define.ts
30616
30648
  const nonJsRe = /\.json(?:$|\?)/;
30617
30649
  const isNonJsRequest = (request) => nonJsRe.test(request);
30618
- const escapedDotRE = /(?<!\\)\\./g;
30650
+ const escapedDotRE = /(?<!\\)\\\./g;
30619
30651
  function definePlugin(config) {
30620
30652
  const isBuild = config.command === "build";
30621
30653
  const isBuildLib = isBuild && config.build.lib;
@@ -31662,7 +31694,13 @@ function triggerLazyBundlingMiddleware(server) {
31662
31694
  }
31663
31695
  const moduleId = params.get("id");
31664
31696
  const clientId = params.get("clientId");
31665
- const result = await bundledDev.triggerLazyBundling(moduleId, clientId);
31697
+ let result;
31698
+ try {
31699
+ result = await bundledDev.triggerLazyBundling(moduleId, clientId);
31700
+ } catch (e) {
31701
+ server.config.logger.error(`Failed to trigger lazy bundling for ${moduleId} (clientId: ${clientId}):` + e, { error: e });
31702
+ return next(/* @__PURE__ */ new Error(`Failed to trigger lazy bundling`));
31703
+ }
31666
31704
  if (result == null) return next();
31667
31705
  res.setHeader("Content-Type", "application/javascript");
31668
31706
  res.on("finish", () => bundledDev.markPayloadDelivered(result.filename));
@@ -34616,7 +34654,7 @@ function getQueryDelimiterIndex(rawUrl) {
34616
34654
  return -1;
34617
34655
  }
34618
34656
  //#endregion
34619
- //#region ../../node_modules/.pnpm/@rollup+plugin-dynamic-import-vars@2.1.4_rollup@4.60.4/node_modules/@rollup/plugin-dynamic-import-vars/dist/es/index.js
34657
+ //#region ../../node_modules/.pnpm/@rollup+plugin-dynamic-import-vars@2.1.4_rollup@4.63.1/node_modules/@rollup/plugin-dynamic-import-vars/dist/es/index.js
34620
34658
  var VariableDynamicImportError = class extends Error {};
34621
34659
  const example = "For example: import(`./foo/${bar}.js`).";
34622
34660
  function sanitizeString(str) {
@@ -37891,7 +37929,7 @@ async function extractExportsData(environment, filePath) {
37891
37929
  };
37892
37930
  }
37893
37931
  });
37894
- const [, exports, , hasModuleSyntax] = parse$2((await (await rolldown({
37932
+ const build = await rolldown({
37895
37933
  ...remainingRolldownOptions,
37896
37934
  plugins,
37897
37935
  input: [filePath],
@@ -37899,15 +37937,20 @@ async function extractExportsData(environment, filePath) {
37899
37937
  ".css": "js",
37900
37938
  ...remainingRolldownOptions.moduleTypes
37901
37939
  }
37902
- })).generate({
37903
- ...rolldownOptions.output,
37904
- format: "esm",
37905
- sourcemap: false
37906
- })).output[0].code);
37907
- return {
37908
- hasModuleSyntax,
37909
- exports: exports.map((e) => e.n)
37910
- };
37940
+ });
37941
+ try {
37942
+ const [, exports, , hasModuleSyntax] = parse$2((await build.generate({
37943
+ ...rolldownOptions.output,
37944
+ format: "esm",
37945
+ sourcemap: false
37946
+ })).output[0].code);
37947
+ return {
37948
+ hasModuleSyntax,
37949
+ exports: exports.map((e) => e.n)
37950
+ };
37951
+ } finally {
37952
+ await build.close();
37953
+ }
37911
37954
  }
37912
37955
  let parseResult;
37913
37956
  let usedJsxLoader = false;
@@ -41430,6 +41473,7 @@ function idToPathAndNamespace(id) {
41430
41473
  //#endregion
41431
41474
  //#region ../../vite/packages/vite/src/node/config.ts
41432
41475
  var config_exports = /* @__PURE__ */ __exportAll({
41476
+ bundleConfigFile: () => bundleConfigFile,
41433
41477
  defineConfig: () => defineConfig,
41434
41478
  getDefaultEnvironmentOptions: () => getDefaultEnvironmentOptions,
41435
41479
  isResolvedConfig: () => isResolvedConfig,
@@ -41793,7 +41837,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
41793
41837
  if (tsconfigPathsPlugin) logger.warnOnce(import_picocolors.default.yellow(`The plugin ${JSON.stringify(tsconfigPathsPlugin.name)} is detected. Vite now supports tsconfig paths resolution natively via the ${import_picocolors.default.bold("resolve.tsconfigPaths")} option. You can remove the plugin and set ${import_picocolors.default.bold("resolve.tsconfigPaths: true")} in your Vite config instead.`));
41794
41838
  if (process.versions.pnp) logger.warnOnce(import_picocolors.default.yellow(`Using Yarn PnP with Vite is discouraged and PnP-specific bugs will no longer be actively worked on. Please switch to a different ${import_picocolors.default.bold("nodeLinker")} mode or to a different package manager.`));
41795
41839
  let nonNormalizedResolvedRoot = config.root ? path.resolve(config.root) : process.cwd();
41796
- try {
41840
+ if (!config.resolve?.preserveSymlinks) try {
41797
41841
  nonNormalizedResolvedRoot = safeRealpathSync(nonNormalizedResolvedRoot);
41798
41842
  } catch {}
41799
41843
  const resolvedRoot = normalizePath(nonNormalizedResolvedRoot);
@@ -42199,6 +42243,7 @@ async function bundleConfigFile(fileName, isESM) {
42199
42243
  const importMetaUrlVarName = "__vite_injected_original_import_meta_url";
42200
42244
  const importMetaResolveVarName = "__vite_injected_original_import_meta_resolve";
42201
42245
  const importMetaResolveRegex = /import\.meta\s*\.\s*resolve/;
42246
+ const configFileRegex = /\.[cm]?[jt]s$/;
42202
42247
  const nativeIncompatibilities = [];
42203
42248
  const bundle = await rolldown({
42204
42249
  input: fileName,
@@ -42257,7 +42302,7 @@ async function bundleConfigFile(fileName, isESM) {
42257
42302
  {
42258
42303
  name: "inject-file-scope-variables",
42259
42304
  transform: {
42260
- filter: { id: /\.[cm]?[jt]s$/ },
42305
+ filter: { id: configFileRegex },
42261
42306
  handler(code, id) {
42262
42307
  let injectValues = `const ${dirnameVarName} = ${JSON.stringify(path.dirname(id))};const ${filenameVarName} = ${JSON.stringify(id)};const ${importMetaUrlVarName} = ${JSON.stringify(pathToFileURL(id).href)};`;
42263
42308
  if (importMetaResolveRegex.test(code)) {
@@ -42287,8 +42332,8 @@ async function bundleConfigFile(fileName, isESM) {
42287
42332
  const result = await bundle.generate({
42288
42333
  format: isESM ? "esm" : "cjs",
42289
42334
  sourcemap: "inline",
42290
- sourcemapPathTransform(relative) {
42291
- return path.resolve(fileName, relative);
42335
+ sourcemapPathTransform(relative, sourcemapPath) {
42336
+ return path.resolve(path.dirname(sourcemapPath), relative);
42292
42337
  },
42293
42338
  codeSplitting: false
42294
42339
  });