@skaldapp/monaco-sfc 1.1.51 → 1.1.52

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 (2) hide show
  1. package/dist/vue.worker.js +858 -828
  2. package/package.json +9 -9
@@ -6,7 +6,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
9
+ var __esmMin = (fn, res, err) => () => {
10
+ if (err) throw err[0];
11
+ try {
12
+ return fn && (res = fn(fn = 0)), res;
13
+ } catch (e) {
14
+ throw err = [e], e;
15
+ }
16
+ };
10
17
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
11
18
  var __exportAll = (all, no_symbols) => {
12
19
  let target = {};
@@ -1571,8 +1578,8 @@ var require_jsdelivr = /* @__PURE__ */ __commonJSMin(((exports) => {
1571
1578
  if (k2 === void 0) k2 = k;
1572
1579
  o[k2] = m[k];
1573
1580
  }));
1574
- var __exportStar = exports && exports.__exportStar || function(m, exports$12) {
1575
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$12, p)) __createBinding(exports$12, m, p);
1581
+ var __exportStar = exports && exports.__exportStar || function(m, exports$11) {
1582
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$11, p)) __createBinding(exports$11, m, p);
1576
1583
  };
1577
1584
  Object.defineProperty(exports, "__esModule", { value: true });
1578
1585
  __exportStar(require_npm(), exports);
@@ -1761,8 +1768,8 @@ var require_source_map = /* @__PURE__ */ __commonJSMin(((exports) => {
1761
1768
  if (k2 === void 0) k2 = k;
1762
1769
  o[k2] = m[k];
1763
1770
  }));
1764
- var __exportStar = exports && exports.__exportStar || function(m, exports$11) {
1765
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$11, p)) __createBinding(exports$11, m, p);
1771
+ var __exportStar = exports && exports.__exportStar || function(m, exports$10) {
1772
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$10, p)) __createBinding(exports$10, m, p);
1766
1773
  };
1767
1774
  Object.defineProperty(exports, "__esModule", { value: true });
1768
1775
  __exportStar(require_sourceMap(), exports);
@@ -2003,8 +2010,8 @@ var require_language_core$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2003
2010
  if (k2 === void 0) k2 = k;
2004
2011
  o[k2] = m[k];
2005
2012
  }));
2006
- var __exportStar = exports && exports.__exportStar || function(m, exports$10) {
2007
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$10, p)) __createBinding(exports$10, m, p);
2013
+ var __exportStar = exports && exports.__exportStar || function(m, exports$9) {
2014
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$9, p)) __createBinding(exports$9, m, p);
2008
2015
  };
2009
2016
  Object.defineProperty(exports, "__esModule", { value: true });
2010
2017
  exports.defaultMapperFactory = exports.SourceMap = void 0;
@@ -5932,8 +5939,8 @@ var require_language_service$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5932
5939
  if (k2 === void 0) k2 = k;
5933
5940
  o[k2] = m[k];
5934
5941
  }));
5935
- var __exportStar = exports && exports.__exportStar || function(m, exports$9) {
5936
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$9, p)) __createBinding(exports$9, m, p);
5942
+ var __exportStar = exports && exports.__exportStar || function(m, exports$8) {
5943
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$8, p)) __createBinding(exports$8, m, p);
5937
5944
  };
5938
5945
  Object.defineProperty(exports, "__esModule", { value: true });
5939
5946
  exports.mergeWorkspaceEdits = void 0;
@@ -6436,14 +6443,16 @@ var require_decorateProgram = /* @__PURE__ */ __commonJSMin(((exports) => {
6436
6443
  if (!sourceFile) return getSyntacticDiagnostics(void 0, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d);
6437
6444
  else {
6438
6445
  const [serviceScript, targetScript, sourceScript] = (0, utils_1.getServiceScript)(language, sourceFile.fileName);
6439
- return getSyntacticDiagnostics(targetScript ? program.getSourceFile(targetScript.id) : sourceFile, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d).filter((d) => !serviceScript || !d.file || language.scripts.get(d.file.fileName) === sourceScript);
6446
+ const actualSourceFile = targetScript ? program.getSourceFile(targetScript.id) : sourceFile;
6447
+ return getSyntacticDiagnostics(actualSourceFile, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d).filter((d) => !serviceScript || !d.file || language.scripts.get(d.file.fileName) === sourceScript);
6440
6448
  }
6441
6449
  };
6442
6450
  program.getSemanticDiagnostics = (sourceFile, cancellationToken) => {
6443
6451
  if (!sourceFile) return getSemanticDiagnostics(void 0, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d);
6444
6452
  else {
6445
6453
  const [serviceScript, targetScript, sourceScript] = (0, utils_1.getServiceScript)(language, sourceFile.fileName);
6446
- return getSemanticDiagnostics(targetScript ? program.getSourceFile(targetScript.id) : sourceFile, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d).filter((d) => !serviceScript || !d.file || language.scripts.get(d.file.fileName) === sourceScript);
6454
+ const actualSourceFile = targetScript ? program.getSourceFile(targetScript.id) : sourceFile;
6455
+ return getSemanticDiagnostics(actualSourceFile, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d).filter((d) => !serviceScript || !d.file || language.scripts.get(d.file.fileName) === sourceScript);
6447
6456
  }
6448
6457
  };
6449
6458
  program.getGlobalDiagnostics = (cancellationToken) => {
@@ -6453,7 +6462,8 @@ var require_decorateProgram = /* @__PURE__ */ __commonJSMin(((exports) => {
6453
6462
  if (!sourceFile) return getBindAndCheckDiagnostics(void 0, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d);
6454
6463
  else {
6455
6464
  const [serviceScript, targetScript, sourceScript] = (0, utils_1.getServiceScript)(language, sourceFile.fileName);
6456
- return getBindAndCheckDiagnostics(targetScript ? program.getSourceFile(targetScript.id) : sourceFile, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d).filter((d) => !serviceScript || language.scripts.get(d.file.fileName) === sourceScript);
6465
+ const actualSourceFile = targetScript ? program.getSourceFile(targetScript.id) : sourceFile;
6466
+ return getBindAndCheckDiagnostics(actualSourceFile, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d).filter((d) => !serviceScript || language.scripts.get(d.file.fileName) === sourceScript);
6457
6467
  }
6458
6468
  };
6459
6469
  program.getSourceFileByPath = (path) => {
@@ -6855,8 +6865,8 @@ var require_proxyLanguageService = /* @__PURE__ */ __commonJSMin(((exports) => {
6855
6865
  combine.displayParts = combine.displayParts?.slice();
6856
6866
  combine.documentation = combine.documentation?.slice();
6857
6867
  combine.tags = combine.tags?.slice();
6858
- const displayPartsStrs = new Set([displayPartsToString(infos[0].displayParts)]);
6859
- const documentationStrs = new Set([displayPartsToString(infos[0].documentation)]);
6868
+ const displayPartsStrs = /* @__PURE__ */ new Set([displayPartsToString(infos[0].displayParts)]);
6869
+ const documentationStrs = /* @__PURE__ */ new Set([displayPartsToString(infos[0].documentation)]);
6860
6870
  const tagsStrs = /* @__PURE__ */ new Set();
6861
6871
  for (const tag of infos[0].tags ?? []) tagsStrs.add(tag.name + "__volar__" + displayPartsToString(tag.text));
6862
6872
  for (let i = 1; i < infos.length; i++) {
@@ -8872,8 +8882,8 @@ var require_typescript$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
8872
8882
  if (k2 === void 0) k2 = k;
8873
8883
  o[k2] = m[k];
8874
8884
  }));
8875
- var __exportStar = exports && exports.__exportStar || function(m, exports$8) {
8876
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$8, p)) __createBinding(exports$8, m, p);
8885
+ var __exportStar = exports && exports.__exportStar || function(m, exports$7) {
8886
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$7, p)) __createBinding(exports$7, m, p);
8877
8887
  };
8878
8888
  Object.defineProperty(exports, "__esModule", { value: true });
8879
8889
  __exportStar(require_common$3(), exports);
@@ -9515,58 +9525,97 @@ var WorkerLanguageService = class {
9515
9525
  //#region node_modules/@vue/language-core/lib/codegen/codeFeatures.js
9516
9526
  var require_codeFeatures = /* @__PURE__ */ __commonJSMin(((exports) => {
9517
9527
  Object.defineProperty(exports, "__esModule", { value: true });
9518
- exports.codeFeatures = void 0;
9519
- exports.codeFeatures = {
9528
+ exports.allCodeFeatures = exports.codeFeatures = void 0;
9529
+ exports.codeFeatures = defineCodeFeatures({
9530
+ full: {
9531
+ verification: true,
9532
+ completion: true,
9533
+ semantic: true,
9534
+ navigation: true,
9535
+ structure: true,
9536
+ format: true
9537
+ },
9538
+ /** @internal */
9520
9539
  all: {
9521
9540
  verification: true,
9522
9541
  completion: true,
9523
9542
  semantic: true,
9524
9543
  navigation: true
9525
9544
  },
9545
+ /** @internal */
9526
9546
  importCompletionOnly: { __importCompletion: true },
9547
+ /** @internal */
9527
9548
  verification: { verification: true },
9549
+ /** @internal */
9528
9550
  completion: { completion: true },
9551
+ /** @internal */
9529
9552
  withoutCompletion: {
9530
9553
  verification: true,
9531
9554
  semantic: true,
9532
9555
  navigation: true
9533
9556
  },
9557
+ /** @internal */
9534
9558
  navigation: { navigation: true },
9559
+ /** @internal */
9535
9560
  navigationWithoutRename: { navigation: { shouldRename: () => false } },
9561
+ /** @internal */
9536
9562
  navigationAndCompletion: {
9537
9563
  navigation: true,
9538
9564
  completion: true
9539
9565
  },
9566
+ /** @internal */
9540
9567
  navigationAndVerification: {
9541
9568
  navigation: true,
9542
9569
  verification: true
9543
9570
  },
9571
+ /** @internal */
9544
9572
  withoutNavigation: {
9545
9573
  verification: true,
9546
9574
  completion: true,
9547
9575
  semantic: true
9548
9576
  },
9577
+ /** @internal */
9549
9578
  semanticWithoutHighlight: { semantic: { shouldHighlight: () => false } },
9579
+ /** @internal */
9550
9580
  withoutHighlight: {
9551
9581
  semantic: { shouldHighlight: () => false },
9552
9582
  verification: true,
9553
9583
  navigation: true,
9554
9584
  completion: true
9555
9585
  },
9586
+ /** @internal */
9556
9587
  withoutHighlightAndCompletion: {
9557
9588
  semantic: { shouldHighlight: () => false },
9558
9589
  verification: true,
9559
9590
  navigation: true
9560
9591
  },
9592
+ /** @internal */
9561
9593
  withoutSemantic: {
9562
9594
  verification: true,
9563
9595
  navigation: true,
9564
9596
  completion: true
9565
9597
  },
9598
+ /** @internal */
9599
+ structure: { structure: true },
9600
+ /** @internal */
9601
+ structureAndFormat: {
9602
+ structure: true,
9603
+ format: true
9604
+ },
9605
+ /** @internal */
9606
+ format: { format: true },
9607
+ /** @internal */
9566
9608
  doNotReportTs2339AndTs2551: { verification: { shouldReport: (_source, code) => String(code) !== "2339" && String(code) !== "2551" } },
9609
+ /** @internal */
9567
9610
  doNotReportTs2353AndTs2561: { verification: { shouldReport: (_source, code) => String(code) !== "2353" && String(code) !== "2561" } },
9611
+ /** @internal */
9568
9612
  doNotReportTs6133: { verification: { shouldReport: (_source, code) => String(code) !== "6133" } }
9569
- };
9613
+ });
9614
+ /** @deprecated use `codeFeatures.full` instead */
9615
+ exports.allCodeFeatures = exports.codeFeatures.full;
9616
+ function defineCodeFeatures(features) {
9617
+ return features;
9618
+ }
9570
9619
  }));
9571
9620
  //#endregion
9572
9621
  //#region node_modules/@vue/language-core/lib/codegen/names.js
@@ -9625,13 +9674,11 @@ var require_names = /* @__PURE__ */ __commonJSMin(((exports) => {
9625
9674
  ConstructorOverloads: "",
9626
9675
  Elements: "",
9627
9676
  EmitsToProps: "",
9628
- FunctionalComponent0: "",
9629
- FunctionalComponent1: "",
9630
- FunctionalComponentCtx: "",
9631
- FunctionalComponentProps: "",
9677
+ ExtractComponentContext: "",
9678
+ ExtractComponentProps: "",
9679
+ FunctionalComponent: "",
9632
9680
  IsAny: "",
9633
9681
  IsFunction: "",
9634
- NormalizeComponentEvent: "",
9635
9682
  NormalizeEmits: "",
9636
9683
  OverloadUnion: "",
9637
9684
  OverloadUnionInner: "",
@@ -9639,6 +9686,7 @@ var require_names = /* @__PURE__ */ __commonJSMin(((exports) => {
9639
9686
  PrettifyGlobal: "",
9640
9687
  ResolveDirectives: "",
9641
9688
  ResolveEmits: "",
9689
+ ResolveEvent: "",
9642
9690
  ShortEmits: "",
9643
9691
  ShortEmitsToObject: "",
9644
9692
  SpreadMerge: "",
@@ -9650,15 +9698,15 @@ var require_names = /* @__PURE__ */ __commonJSMin(((exports) => {
9650
9698
  //#region node_modules/@vue/language-core/lib/codegen/utils/index.js
9651
9699
  var require_utils$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
9652
9700
  Object.defineProperty(exports, "__esModule", { value: true });
9653
- exports.identifierRegex = exports.endOfLine = exports.newLine = void 0;
9701
+ exports.identifierRE = exports.endOfLine = exports.newLine = void 0;
9654
9702
  exports.getTypeScriptAST = getTypeScriptAST;
9655
9703
  exports.generateSfcBlockSection = generateSfcBlockSection;
9656
9704
  exports.forEachNode = forEachNode;
9657
9705
  var codeFeatures_1 = require_codeFeatures();
9658
9706
  exports.newLine = `\n`;
9659
9707
  exports.endOfLine = `;${exports.newLine}`;
9660
- exports.identifierRegex = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
9661
- var cacheMaps = /* @__PURE__ */ new Map();
9708
+ exports.identifierRE = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
9709
+ var cacheMaps = /* @__PURE__ */ new WeakMap();
9662
9710
  function getTypeScriptAST(ts, block, text) {
9663
9711
  if (!cacheMaps.has(block)) cacheMaps.set(block, [block.content, /* @__PURE__ */ new Map()]);
9664
9712
  const cacheMap = cacheMaps.get(block);
@@ -9715,29 +9763,34 @@ var require_utils$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
9715
9763
  //#region node_modules/@vue/language-core/lib/codegen/utils/boundary.js
9716
9764
  var require_boundary = /* @__PURE__ */ __commonJSMin(((exports) => {
9717
9765
  Object.defineProperty(exports, "__esModule", { value: true });
9718
- exports.startBoundary = startBoundary;
9719
- exports.endBoundary = endBoundary;
9720
- function* startBoundary(source, startOffset, features) {
9721
- const token = Symbol(source);
9722
- yield [
9723
- "",
9724
- source,
9725
- startOffset,
9726
- {
9766
+ exports.Boundary = void 0;
9767
+ exports.Boundary = class Boundary {
9768
+ constructor(source, features) {
9769
+ this.source = source;
9770
+ this.features = features;
9771
+ }
9772
+ static *start(source, offset, features) {
9773
+ features = {
9727
9774
  ...features,
9728
- __combineToken: token
9729
- }
9730
- ];
9731
- return token;
9732
- }
9733
- function endBoundary(token, endOffset) {
9734
- return [
9735
- "",
9736
- token.description,
9737
- endOffset,
9738
- { __combineToken: token }
9739
- ];
9740
- }
9775
+ __combineToken: Symbol()
9776
+ };
9777
+ yield [
9778
+ ``,
9779
+ source,
9780
+ offset,
9781
+ features
9782
+ ];
9783
+ return new Boundary(source, features);
9784
+ }
9785
+ end(offset) {
9786
+ return [
9787
+ ``,
9788
+ this.source,
9789
+ offset,
9790
+ this.features
9791
+ ];
9792
+ }
9793
+ };
9741
9794
  }));
9742
9795
  //#endregion
9743
9796
  //#region node_modules/@vue/shared/dist/shared.esm-bundler.js
@@ -9817,7 +9870,7 @@ var shared_esm_bundler_exports = /* @__PURE__ */ __exportAll({
9817
9870
  toTypeString: () => toTypeString
9818
9871
  });
9819
9872
  /**
9820
- * @vue/shared v3.5.35
9873
+ * @vue/shared v3.5.39
9821
9874
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
9822
9875
  * @license MIT
9823
9876
  **/
@@ -10232,7 +10285,7 @@ var init_shared_esm_bundler = __esmMin((() => {
10232
10285
  //#endregion
10233
10286
  //#region node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js
10234
10287
  /**
10235
- * @vue/compiler-core v3.5.35
10288
+ * @vue/compiler-core v3.5.39
10236
10289
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
10237
10290
  * @license MIT
10238
10291
  **/
@@ -11219,6 +11272,7 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
11219
11272
  imports: [],
11220
11273
  cached: [],
11221
11274
  constantCache: /* @__PURE__ */ new WeakMap(),
11275
+ vForMemoKeyedNodes: /* @__PURE__ */ new WeakSet(),
11222
11276
  temps: 0,
11223
11277
  identifiers: /* @__PURE__ */ Object.create(null),
11224
11278
  scopes: {
@@ -12381,7 +12435,7 @@ function rewriteFilter(node, context) {
12381
12435
  const child = node.children[i];
12382
12436
  if (typeof child !== "object") continue;
12383
12437
  if (child.type === 4) parseFilter(child, context);
12384
- else if (child.type === 8) rewriteFilter(node, context);
12438
+ else if (child.type === 8) rewriteFilter(child, context);
12385
12439
  else if (child.type === 5) rewriteFilter(child.content, context);
12386
12440
  }
12387
12441
  }
@@ -13916,7 +13970,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13916
13970
  }
13917
13971
  },
13918
13972
  oncdata(start, end) {
13919
- if (stack[0].ns !== 0) onText(getSlice(start, end), start, end);
13973
+ if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) onText(getSlice(start, end), start, end);
13920
13974
  else emitError(1, start - 9);
13921
13975
  },
13922
13976
  onprocessinginstruction(start) {
@@ -13952,7 +14006,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13952
14006
  if (dir.type === 7 && dir.name !== "for") {
13953
14007
  const exp = dir.exp;
13954
14008
  const arg = dir.arg;
13955
- if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
14009
+ if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && context.vForMemoKeyedNodes.has(node) && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
13956
14010
  if (arg && arg.type === 4 && !arg.isStatic) dir.arg = processExpression(arg, context);
13957
14011
  }
13958
14012
  }
@@ -14538,7 +14592,7 @@ var compiler_dom_esm_bundler_exports = /* @__PURE__ */ __exportAll({
14538
14592
  warnDeprecation: () => warnDeprecation
14539
14593
  });
14540
14594
  /**
14541
- * @vue/compiler-dom v3.5.35
14595
+ * @vue/compiler-dom v3.5.39
14542
14596
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
14543
14597
  * @license MIT
14544
14598
  **/
@@ -15071,238 +15125,111 @@ var require_context$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
15071
15125
  })();
15072
15126
  Object.defineProperty(exports, "__esModule", { value: true });
15073
15127
  exports.createTemplateCodegenContext = createTemplateCodegenContext;
15128
+ var language_core_1 = require_language_core$1();
15074
15129
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
15075
15130
  var codeFeatures_1 = require_codeFeatures();
15076
15131
  var utils_1 = require_utils$5();
15077
15132
  var boundary_1 = require_boundary();
15078
- var commentDirectiveRegex = /^<!--\s*@vue-(?<name>[-\w]+)\b(?<content>[\s\S]*)-->$/;
15079
- /**
15080
- * Creates and returns a Context object used for generating type-checkable TS code
15081
- * from the template section of a .vue file.
15082
- *
15083
- * ## Implementation Notes for supporting `@vue-ignore`, `@vue-expect-error`, and `@vue-skip` directives.
15084
- *
15085
- * Vue language tooling supports a number of directives for suppressing diagnostics within
15086
- * Vue templates (https://github.com/vuejs/language-tools/pull/3215)
15087
- *
15088
- * Here is an overview for how support for how @vue-expect-error is implemented within this file
15089
- * (@vue-expect-error is the most complicated directive to support due to its behavior of raising
15090
- * a diagnostic when it is annotating a piece of code that doesn't actually have any errors/warning/diagnostics).
15091
- *
15092
- * Given .vue code:
15093
- *
15094
- * ```vue
15095
- * <script setup lang="ts">
15096
- * defineProps<{
15097
- * knownProp1: string;
15098
- * knownProp2: string;
15099
- * knownProp3: string;
15100
- * knownProp4_will_trigger_unused_expect_error: string;
15101
- * }>();
15102
- * <\/script>
15103
- *
15104
- * <template>
15105
- * {{ knownProp1 }}
15106
- * {{ error_unknownProp }} <!-- ERROR: Property 'error_unknownProp' does not exist on type [...] -->
15107
- * {{ knownProp2 }}
15108
- * <!-- @vue-expect-error This suppresses an Unknown Property Error -->
15109
- * {{ suppressed_error_unknownProp }}
15110
- * {{ knownProp3 }}
15111
- * <!-- @vue-expect-error This will trigger Unused '@ts-expect-error' directive.ts(2578) -->
15112
- * {{ knownProp4_will_trigger_unused_expect_error }}
15113
- * </template>
15114
- * ```
15115
- *
15116
- * The above code should raise two diagnostics:
15117
- *
15118
- * 1. Property 'error_unknownProp' does not exist on type [...]
15119
- * 2. Unused '@ts-expect-error' directive.ts(2578) -- this is the bottom `@vue-expect-error` directive
15120
- * that covers code that doesn't actually raise an error -- note that all `@vue-...` directives
15121
- * will ultimately translate into `@ts-...` diagnostics.
15122
- *
15123
- * The above code will produce the following type-checkable TS code (note: omitting asterisks
15124
- * to prevent VSCode syntax double-greying out double-commented code).
15125
- *
15126
- * ```ts
15127
- * ( __VLS_ctx.knownProp1 );
15128
- * ( __VLS_ctx.error_unknownProp ); // ERROR: Property 'error_unknownProp' does not exist on type [...]
15129
- * ( __VLS_ctx.knownProp2 );
15130
- * // @vue-expect-error start
15131
- * ( __VLS_ctx.suppressed_error_unknownProp );
15132
- * // @ts-expect-error __VLS_TS_EXPECT_ERROR
15133
- * ;
15134
- * // @vue-expect-error end of INTERPOLATION
15135
- * ( __VLS_ctx.knownProp3 );
15136
- * // @vue-expect-error start
15137
- * ( __VLS_ctx.knownProp4_will_trigger_unused_expect_error );
15138
- * // @ts-expect-error __VLS_TS_EXPECT_ERROR
15139
- * ;
15140
- * // @vue-expect-error end of INTERPOLATION
15141
- * ```
15142
- *
15143
- * In the generated code, there are actually 3 diagnostic errors that'll be raised in the first
15144
- * pass on this generated code (but through cleverness described below, not all of them will be
15145
- * propagated back to the original .vue file):
15146
- *
15147
- * 1. Property 'error_unknownProp' does not exist on type [...]
15148
- * 2. Unused '@ts-expect-error' directive.ts(2578) from the 1st `@ts-expect-error __VLS_TS_EXPECT_ERROR`
15149
- * 3. Unused '@ts-expect-error' directive.ts(2578) from the 2nd `@ts-expect-error __VLS_TS_EXPECT_ERROR`
15150
- *
15151
- * Be sure to pay careful attention to the mixture of `@vue-expect-error` and `@ts-expect-error`;
15152
- * Within the TS file, the only "real" directives recognized by TS are going to be prefixed with `@ts-`;
15153
- * any `@vue-` prefixed directives in the comments are only for debugging purposes.
15154
- *
15155
- * As mentioned above, there are 3 diagnostics errors that'll be generated for the above code, but
15156
- * only 2 should be propagated back to the original .vue file.
15157
- *
15158
- * (The reason we structure things this way is somewhat complicated, but in short it allows us
15159
- * to lean on TS as much as possible to generate actual `unused @ts-expect-error directive` errors
15160
- * while covering a number of edge cases.)
15161
- *
15162
- * So, we need a way to dynamically decide whether each of the `@ts-expect-error __VLS_TS_EXPECT_ERROR`
15163
- * directives should be reported as an unused directive or not.
15164
- *
15165
- * To do this, we'll make use of the `shouldReport` callback that'll optionally be provided to the
15166
- * `verification` property of the `CodeInformation` object attached to the mapping between source .vue
15167
- * and generated .ts code. The `verification` property determines whether "verification" (which includes
15168
- * semantic diagnostics) should be performed on the generated .ts code, and `shouldReport`, if provided,
15169
- * can be used to determine whether a given diagnostic should be reported back "upwards" to the original
15170
- * .vue file or not.
15171
- *
15172
- * See the comments in the code below for how and where we use this hook to keep track of whether
15173
- * an error/diagnostic was encountered for a region of code covered by a `@vue-expect-error` directive,
15174
- * and additionally how we use that to determine whether to propagate diagnostics back upward.
15175
- */
15133
+ var directiveCommentRE = /^<!--\s*@vue-(?<name>[-\w]+)\b(?<content>[\s\S]*)-->$/;
15176
15134
  function createTemplateCodegenContext() {
15177
- let variableId = 0;
15178
- const scopes = [];
15179
- const components = [];
15180
- const hoistVars = /* @__PURE__ */ new Map();
15181
- const dollarVars = /* @__PURE__ */ new Set();
15182
- const componentAccessMap = /* @__PURE__ */ new Map();
15183
- const slots = [];
15184
- const dynamicSlots = [];
15185
- const blockConditions = [];
15186
- const inlayHints = [];
15187
- const inheritedAttrVars = /* @__PURE__ */ new Set();
15188
- const templateRefs = /* @__PURE__ */ new Map();
15189
15135
  const stack = [];
15190
15136
  const commentBuffer = [];
15191
- return {
15192
- generatedTypes: /* @__PURE__ */ new Set(),
15193
- get currentInfo() {
15194
- return stack[stack.length - 1];
15195
- },
15196
- resolveCodeFeatures,
15197
- inVFor: false,
15198
- slots,
15199
- dynamicSlots,
15200
- dollarVars,
15201
- componentAccessMap,
15202
- blockConditions,
15203
- inlayHints,
15204
- inheritedAttrVars,
15205
- templateRefs,
15206
- singleRootElTypes: /* @__PURE__ */ new Set(),
15207
- singleRootNodes: /* @__PURE__ */ new Set(),
15208
- addTemplateRef(name, typeExp, offset) {
15209
- let refs = templateRefs.get(name);
15210
- if (!refs) templateRefs.set(name, refs = []);
15211
- refs.push({
15212
- typeExp,
15213
- offset
15214
- });
15215
- },
15216
- recordComponentAccess(source, name, offset) {
15217
- let map = componentAccessMap.get(name);
15218
- if (!map) componentAccessMap.set(name, map = /* @__PURE__ */ new Map());
15219
- let arr = map.get(source);
15220
- if (!arr) map.set(source, arr = /* @__PURE__ */ new Set());
15221
- if (offset !== void 0) arr.add(offset);
15222
- },
15223
- scopes,
15224
- components,
15225
- declare(...varNames) {
15226
- const scope = scopes.at(-1);
15227
- for (const varName of varNames) scope.add(varName);
15228
- },
15229
- startScope() {
15230
- const scope = /* @__PURE__ */ new Set();
15231
- scopes.push(scope);
15232
- return () => {
15233
- scopes.pop();
15234
- return generateAutoImport();
15235
- };
15236
- },
15237
- getInternalVariable() {
15238
- return `__VLS_${variableId++}`;
15239
- },
15240
- getHoistVariable(originalVar) {
15241
- let name = hoistVars.get(originalVar);
15242
- if (name === void 0) hoistVars.set(originalVar, name = `__VLS_${variableId++}`);
15243
- return name;
15244
- },
15245
- *generateHoistVariables() {
15246
- if (hoistVars.size) {
15247
- yield `// @ts-ignore${utils_1.newLine}`;
15248
- yield `var `;
15249
- for (const [originalVar, hoistVar] of hoistVars) yield `${hoistVar} = ${originalVar}, `;
15250
- yield utils_1.endOfLine;
15251
- }
15252
- },
15253
- *generateConditionGuards() {
15254
- for (const condition of blockConditions) yield `if (!${condition}) return${utils_1.endOfLine}`;
15255
- },
15256
- enter(node) {
15257
- if (node.type === CompilerDOM.NodeTypes.COMMENT) {
15258
- commentBuffer.push(node);
15259
- return false;
15260
- }
15261
- const data = {};
15262
- const comments = [...commentBuffer];
15263
- commentBuffer.length = 0;
15264
- for (const comment of comments) {
15265
- const match = comment.loc.source.match(commentDirectiveRegex);
15266
- if (match) {
15267
- const { name, content } = match.groups;
15268
- switch (name) {
15269
- case "skip": return false;
15270
- case "ignore":
15271
- data.ignoreError = true;
15272
- break;
15273
- case "expect-error":
15274
- data.expectError = {
15275
- token: 0,
15276
- node: comment
15277
- };
15278
- break;
15279
- case "generic": {
15280
- const text = content.trim();
15281
- if (text.startsWith("{") && text.endsWith("}")) data.generic = {
15282
- content: text.slice(1, -1),
15283
- offset: comment.loc.start.offset + comment.loc.source.indexOf("{") + 1
15284
- };
15285
- break;
15286
- }
15137
+ function getCommentInfo() {
15138
+ return stack[stack.length - 1];
15139
+ }
15140
+ function enter(node) {
15141
+ if (node.type === CompilerDOM.NodeTypes.COMMENT) {
15142
+ commentBuffer.push(node);
15143
+ return false;
15144
+ }
15145
+ const info = {};
15146
+ const comments = [...commentBuffer];
15147
+ commentBuffer.length = 0;
15148
+ for (const comment of comments) {
15149
+ const match = comment.loc.source.match(directiveCommentRE);
15150
+ if (match) {
15151
+ const { name, content } = match.groups;
15152
+ switch (name) {
15153
+ case "skip": return false;
15154
+ case "ignore":
15155
+ info.ignoreError = true;
15156
+ break;
15157
+ case "expect-error":
15158
+ info.expectError = {
15159
+ token: 0,
15160
+ node: comment
15161
+ };
15162
+ break;
15163
+ case "generic": {
15164
+ const text = content.trim();
15165
+ if (text.startsWith("{") && text.endsWith("}")) info.generic = {
15166
+ content: text.slice(1, -1),
15167
+ offset: comment.loc.start.offset + comment.loc.source.indexOf("{") + 1
15168
+ };
15169
+ break;
15287
15170
  }
15288
15171
  }
15289
15172
  }
15290
- stack.push(data);
15291
- return true;
15292
- },
15293
- *exit() {
15294
- const data = stack.pop();
15295
- commentBuffer.length = 0;
15296
- if (data.expectError !== void 0) {
15297
- const token = yield* (0, boundary_1.startBoundary)("template", data.expectError.node.loc.start.offset, { verification: { shouldReport: () => data.expectError.token === 0 } });
15298
- yield `// @ts-expect-error`;
15299
- yield (0, boundary_1.endBoundary)(token, data.expectError.node.loc.end.offset);
15300
- yield `${utils_1.newLine}${utils_1.endOfLine}`;
15301
- }
15302
15173
  }
15303
- };
15174
+ stack.push(info);
15175
+ return true;
15176
+ }
15177
+ function* exit() {
15178
+ const info = stack.pop();
15179
+ commentBuffer.length = 0;
15180
+ if (info.expectError !== void 0) {
15181
+ const boundary = yield* boundary_1.Boundary.start("template", info.expectError.node.loc.start.offset, { verification: { shouldReport: () => info.expectError.token === 0 } });
15182
+ yield `// @ts-expect-error`;
15183
+ yield boundary.end(info.expectError.node.loc.end.offset);
15184
+ yield `${utils_1.newLine}${utils_1.endOfLine}`;
15185
+ }
15186
+ }
15187
+ function resolveCodeFeatures(features) {
15188
+ if (features.verification && stack.length) {
15189
+ const data = stack[stack.length - 1];
15190
+ if (data.ignoreError) return {
15191
+ ...features,
15192
+ verification: false
15193
+ };
15194
+ if (data.expectError !== void 0) return {
15195
+ ...features,
15196
+ verification: { shouldReport: (source, code) => {
15197
+ if ((0, language_core_1.shouldReportDiagnostics)(features, source, code)) data.expectError.token++;
15198
+ return false;
15199
+ } }
15200
+ };
15201
+ }
15202
+ return features;
15203
+ }
15204
+ let variableId = 0;
15205
+ function getInternalVariable() {
15206
+ return `__VLS_${variableId++}`;
15207
+ }
15208
+ class Scope extends Set {
15209
+ declare(...variables) {
15210
+ for (const name of variables) this.add(name);
15211
+ }
15212
+ end() {
15213
+ scopes.pop();
15214
+ return generateAutoImport();
15215
+ }
15216
+ }
15217
+ const scopes = [];
15218
+ function scope() {
15219
+ const scope = new Scope();
15220
+ scopes.push(scope);
15221
+ return scope;
15222
+ }
15223
+ const contextAccesses = /* @__PURE__ */ new Map();
15224
+ function accessVariable(source, name, offset) {
15225
+ let map = contextAccesses.get(name);
15226
+ if (!map) contextAccesses.set(name, map = /* @__PURE__ */ new Map());
15227
+ let arr = map.get(source);
15228
+ if (!arr) map.set(source, arr = /* @__PURE__ */ new Set());
15229
+ if (offset !== void 0) arr.add(offset);
15230
+ }
15304
15231
  function* generateAutoImport() {
15305
- const all = [...componentAccessMap.entries()];
15232
+ const all = [...contextAccesses.entries()];
15306
15233
  if (!all.some(([, offsets]) => offsets.size)) return;
15307
15234
  yield `// @ts-ignore${utils_1.newLine}`;
15308
15235
  yield `[`;
@@ -15320,23 +15247,62 @@ var require_context$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
15320
15247
  }
15321
15248
  yield `]${utils_1.endOfLine}`;
15322
15249
  }
15323
- function resolveCodeFeatures(features) {
15324
- if (features.verification && stack.length) {
15325
- const data = stack[stack.length - 1];
15326
- if (data.ignoreError) return {
15327
- ...features,
15328
- verification: false
15329
- };
15330
- if (data.expectError !== void 0) return {
15331
- ...features,
15332
- verification: { shouldReport: (source, code) => {
15333
- if (typeof features.verification !== "object" || !features.verification.shouldReport || features.verification.shouldReport(source, code) === true) data.expectError.token++;
15334
- return false;
15335
- } }
15336
- };
15250
+ const conditions = [];
15251
+ function* generateConditionGuards() {
15252
+ for (const condition of conditions) yield `if (!${condition}) throw 0${utils_1.endOfLine}`;
15253
+ }
15254
+ const hoistVars = /* @__PURE__ */ new Map();
15255
+ function getHoistVariable(originalVar) {
15256
+ let name = hoistVars.get(originalVar);
15257
+ if (name === void 0) hoistVars.set(originalVar, name = `__VLS_${variableId++}`);
15258
+ return name;
15259
+ }
15260
+ function* generateHoistVariables() {
15261
+ if (hoistVars.size) {
15262
+ yield `// @ts-ignore${utils_1.newLine}`;
15263
+ yield `var `;
15264
+ for (const [originalVar, hoistVar] of hoistVars) yield `${hoistVar} = ${originalVar}, `;
15265
+ yield utils_1.endOfLine;
15337
15266
  }
15338
- return features;
15339
15267
  }
15268
+ const templateRefs = /* @__PURE__ */ new Map();
15269
+ function addTemplateRef(name, typeExp, offset) {
15270
+ let refs = templateRefs.get(name);
15271
+ if (!refs) templateRefs.set(name, refs = []);
15272
+ refs.push({
15273
+ typeExp,
15274
+ offset
15275
+ });
15276
+ }
15277
+ return {
15278
+ getCommentInfo,
15279
+ enter,
15280
+ exit,
15281
+ resolveCodeFeatures,
15282
+ getInternalVariable,
15283
+ scopes,
15284
+ scope,
15285
+ contextAccesses,
15286
+ accessVariable,
15287
+ generateAutoImport,
15288
+ conditions,
15289
+ generateConditionGuards,
15290
+ hoistVars,
15291
+ getHoistVariable,
15292
+ generateHoistVariables,
15293
+ templateRefs,
15294
+ addTemplateRef,
15295
+ components: [],
15296
+ dollarVars: /* @__PURE__ */ new Set(),
15297
+ inlayHints: [],
15298
+ generatedTypes: /* @__PURE__ */ new Set(),
15299
+ inheritedAttrVars: /* @__PURE__ */ new Set(),
15300
+ singleRootElTypes: /* @__PURE__ */ new Set(),
15301
+ singleRootNodes: /* @__PURE__ */ new Set(),
15302
+ slots: [],
15303
+ dynamicSlots: [],
15304
+ inVFor: false
15305
+ };
15340
15306
  }
15341
15307
  }));
15342
15308
  //#endregion
@@ -15347,23 +15313,23 @@ var require_camelized = /* @__PURE__ */ __commonJSMin(((exports) => {
15347
15313
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
15348
15314
  function* generateCamelized(code, source, offset, features) {
15349
15315
  const parts = code.split("-");
15350
- const combineToken = features.__combineToken ?? Symbol();
15316
+ if (!features.__combineToken) features = {
15317
+ ...features,
15318
+ __combineToken: Symbol()
15319
+ };
15351
15320
  for (let i = 0; i < parts.length; i++) {
15352
15321
  const part = parts[i];
15353
15322
  if (part !== "") if (i === 0) yield [
15354
15323
  part,
15355
15324
  source,
15356
15325
  offset,
15357
- {
15358
- ...features,
15359
- __combineToken: combineToken
15360
- }
15326
+ features
15361
15327
  ];
15362
15328
  else yield [
15363
15329
  (0, shared_1.capitalize)(part),
15364
15330
  source,
15365
15331
  offset,
15366
- { __combineToken: combineToken }
15332
+ features
15367
15333
  ];
15368
15334
  offset += part.length + 1;
15369
15335
  }
@@ -15378,22 +15344,22 @@ var require_stringLiteralKey = /* @__PURE__ */ __commonJSMin(((exports) => {
15378
15344
  function* generateStringLiteralKey(code, offset, info) {
15379
15345
  if (offset === void 0 || !info) yield `'${code}'`;
15380
15346
  else {
15381
- const token = yield* (0, boundary_1.startBoundary)("template", offset, info);
15347
+ const boundary = yield* boundary_1.Boundary.start("template", offset, info);
15382
15348
  yield `'`;
15383
15349
  yield [
15384
15350
  code,
15385
15351
  "template",
15386
15352
  offset,
15387
- { __combineToken: token }
15353
+ boundary.features
15388
15354
  ];
15389
15355
  yield `'`;
15390
- yield (0, boundary_1.endBoundary)(token, offset + code.length);
15356
+ yield boundary.end(offset + code.length);
15391
15357
  }
15392
15358
  }
15393
15359
  }));
15394
15360
  //#endregion
15395
15361
  //#region node_modules/@vue/language-core/lib/utils/shared.js
15396
- var require_shared$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
15362
+ var require_shared$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
15397
15363
  Object.defineProperty(exports, "__esModule", { value: true });
15398
15364
  exports.hyphenateTag = void 0;
15399
15365
  exports.hyphenateAttr = hyphenateAttr;
@@ -15446,7 +15412,7 @@ var require_collectBindings = /* @__PURE__ */ __commonJSMin(((exports) => {
15446
15412
  exports.collectBindingNames = collectBindingNames;
15447
15413
  exports.collectBindingRanges = collectBindingRanges;
15448
15414
  exports.collectBindingIdentifiers = collectBindingIdentifiers;
15449
- var shared_1 = require_shared$2();
15415
+ var shared_1 = require_shared$1();
15450
15416
  function collectBindingNames(ts, node, ast) {
15451
15417
  return collectBindingIdentifiers(ts, node).map(({ id }) => (0, shared_1.getNodeText)(ts, id, ast));
15452
15418
  }
@@ -15473,7 +15439,7 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15473
15439
  exports.shouldIdentifierSkipped = shouldIdentifierSkipped;
15474
15440
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
15475
15441
  var collectBindings_1 = require_collectBindings();
15476
- var shared_2 = require_shared$2();
15442
+ var shared_2 = require_shared$1();
15477
15443
  var codeFeatures_1 = require_codeFeatures();
15478
15444
  var names_1 = require_names();
15479
15445
  var utils_1 = require_utils$5();
@@ -15506,10 +15472,10 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15506
15472
  ];
15507
15473
  yield `.value`;
15508
15474
  } else {
15509
- const token = yield* (0, boundary_1.startBoundary)(block.name, start + offset, codeFeatures_1.codeFeatures.verification);
15475
+ const boundary = yield* boundary_1.Boundary.start(block.name, start + offset, codeFeatures_1.codeFeatures.verification);
15510
15476
  if (ctx.dollarVars.has(name)) yield names_1.names.dollars;
15511
15477
  else {
15512
- ctx.recordComponentAccess(block.name, name, start + offset);
15478
+ ctx.accessVariable(block.name, name, start + offset);
15513
15479
  yield names_1.names.ctx;
15514
15480
  }
15515
15481
  yield `.`;
@@ -15522,7 +15488,7 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15522
15488
  __shorthandExpression: "js"
15523
15489
  } : data
15524
15490
  ];
15525
- yield (0, boundary_1.endBoundary)(token, start + offset + name.length);
15491
+ yield boundary.end(start + offset + name.length);
15526
15492
  }
15527
15493
  prevEnd = offset + name.length;
15528
15494
  }
@@ -15535,7 +15501,7 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15535
15501
  if (suffix) yield suffix;
15536
15502
  }
15537
15503
  function* forEachIdentifiers(ts, ctx, block, code, prefix, suffix) {
15538
- if (utils_1.identifierRegex.test(code) && !shouldIdentifierSkipped(ctx, code)) {
15504
+ if (utils_1.identifierRE.test(code) && !shouldIdentifierSkipped(ctx, code)) {
15539
15505
  yield [
15540
15506
  code,
15541
15507
  0,
@@ -15543,9 +15509,9 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15543
15509
  ];
15544
15510
  return;
15545
15511
  }
15546
- const endScope = ctx.startScope();
15512
+ const scope = ctx.scope();
15547
15513
  const ast = (0, utils_1.getTypeScriptAST)(ts, block, prefix + code + suffix);
15548
- for (const [id, isShorthand] of forEachDeclarations(ts, ast, ast, ctx)) {
15514
+ for (const [id, isShorthand] of forEachDeclarations(ts, ast, ast, ctx, scope)) {
15549
15515
  const text = (0, shared_2.getNodeText)(ts, id, ast);
15550
15516
  if (shouldIdentifierSkipped(ctx, text)) continue;
15551
15517
  yield [
@@ -15554,45 +15520,45 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15554
15520
  isShorthand
15555
15521
  ];
15556
15522
  }
15557
- endScope();
15523
+ scope.end();
15558
15524
  }
15559
- function* forEachDeclarations(ts, node, ast, ctx) {
15525
+ function* forEachDeclarations(ts, node, ast, ctx, scope) {
15560
15526
  if (ts.isIdentifier(node)) yield [node, false];
15561
15527
  else if (ts.isShorthandPropertyAssignment(node)) yield [node.name, true];
15562
- else if (ts.isPropertyAccessExpression(node)) yield* forEachDeclarations(ts, node.expression, ast, ctx);
15528
+ else if (ts.isPropertyAccessExpression(node)) yield* forEachDeclarations(ts, node.expression, ast, ctx, scope);
15563
15529
  else if (ts.isVariableDeclaration(node)) {
15564
- ctx.declare(...(0, collectBindings_1.collectBindingNames)(ts, node.name, ast));
15565
- yield* forEachDeclarationsInBinding(ts, node, ast, ctx);
15530
+ scope.declare(...(0, collectBindings_1.collectBindingNames)(ts, node.name, ast));
15531
+ yield* forEachDeclarationsInBinding(ts, node, ast, ctx, scope);
15566
15532
  } else if (ts.isArrayBindingPattern(node) || ts.isObjectBindingPattern(node)) {
15567
- for (const element of node.elements) if (ts.isBindingElement(element)) yield* forEachDeclarationsInBinding(ts, element, ast, ctx);
15533
+ for (const element of node.elements) if (ts.isBindingElement(element)) yield* forEachDeclarationsInBinding(ts, element, ast, ctx, scope);
15568
15534
  } else if (ts.isArrowFunction(node) || ts.isFunctionExpression(node)) yield* forEachDeclarationsInFunction(ts, node, ast, ctx);
15569
15535
  else if (ts.isObjectLiteralExpression(node)) {
15570
15536
  for (const prop of node.properties) if (ts.isPropertyAssignment(prop)) {
15571
- if (ts.isComputedPropertyName(prop.name)) yield* forEachDeclarations(ts, prop.name.expression, ast, ctx);
15572
- yield* forEachDeclarations(ts, prop.initializer, ast, ctx);
15573
- } else if (ts.isShorthandPropertyAssignment(prop)) yield* forEachDeclarations(ts, prop, ast, ctx);
15574
- else if (ts.isSpreadAssignment(prop)) yield* forEachDeclarations(ts, prop.expression, ast, ctx);
15537
+ if (ts.isComputedPropertyName(prop.name)) yield* forEachDeclarations(ts, prop.name.expression, ast, ctx, scope);
15538
+ yield* forEachDeclarations(ts, prop.initializer, ast, ctx, scope);
15539
+ } else if (ts.isShorthandPropertyAssignment(prop)) yield* forEachDeclarations(ts, prop, ast, ctx, scope);
15540
+ else if (ts.isSpreadAssignment(prop)) yield* forEachDeclarations(ts, prop.expression, ast, ctx, scope);
15575
15541
  else if (ts.isFunctionLike(prop) && prop.body) yield* forEachDeclarationsInFunction(ts, prop, ast, ctx);
15576
15542
  } else if (ts.isTypeNode(node)) yield* forEachDeclarationsInTypeNode(ts, node);
15577
15543
  else if (ts.isBlock(node)) {
15578
- const endScope = ctx.startScope();
15579
- for (const child of (0, utils_1.forEachNode)(ts, node)) yield* forEachDeclarations(ts, child, ast, ctx);
15580
- endScope();
15581
- } else for (const child of (0, utils_1.forEachNode)(ts, node)) yield* forEachDeclarations(ts, child, ast, ctx);
15544
+ const scope = ctx.scope();
15545
+ for (const child of (0, utils_1.forEachNode)(ts, node)) yield* forEachDeclarations(ts, child, ast, ctx, scope);
15546
+ scope.end();
15547
+ } else for (const child of (0, utils_1.forEachNode)(ts, node)) yield* forEachDeclarations(ts, child, ast, ctx, scope);
15582
15548
  }
15583
- function* forEachDeclarationsInBinding(ts, node, ast, ctx) {
15549
+ function* forEachDeclarationsInBinding(ts, node, ast, ctx, scope) {
15584
15550
  if ("type" in node && node.type) yield* forEachDeclarationsInTypeNode(ts, node.type);
15585
- if (!ts.isIdentifier(node.name)) yield* forEachDeclarations(ts, node.name, ast, ctx);
15586
- if (node.initializer) yield* forEachDeclarations(ts, node.initializer, ast, ctx);
15551
+ if (!ts.isIdentifier(node.name)) yield* forEachDeclarations(ts, node.name, ast, ctx, scope);
15552
+ if (node.initializer) yield* forEachDeclarations(ts, node.initializer, ast, ctx, scope);
15587
15553
  }
15588
15554
  function* forEachDeclarationsInFunction(ts, node, ast, ctx) {
15589
- const endScope = ctx.startScope();
15555
+ const scope = ctx.scope();
15590
15556
  for (const param of node.parameters) {
15591
- ctx.declare(...(0, collectBindings_1.collectBindingNames)(ts, param.name, ast));
15592
- yield* forEachDeclarationsInBinding(ts, param, ast, ctx);
15557
+ scope.declare(...(0, collectBindings_1.collectBindingNames)(ts, param.name, ast));
15558
+ yield* forEachDeclarationsInBinding(ts, param, ast, ctx, scope);
15593
15559
  }
15594
- if (node.body) yield* forEachDeclarations(ts, node.body, ast, ctx);
15595
- endScope();
15560
+ if (node.body) yield* forEachDeclarations(ts, node.body, ast, ctx, scope);
15561
+ scope.end();
15596
15562
  }
15597
15563
  function* forEachDeclarationsInTypeNode(ts, node) {
15598
15564
  if (ts.isTypeQueryNode(node)) {
@@ -15620,15 +15586,15 @@ var require_objectProperty = /* @__PURE__ */ __commonJSMin(((exports) => {
15620
15586
  function* generateObjectProperty(options, ctx, code, offset, features, shouldCamelize = false, shouldBeConstant = false) {
15621
15587
  if (code.startsWith("[") && code.endsWith("]")) if (shouldBeConstant) yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, features, code.slice(1, -1), offset + 1, `[${names_1.names.tryAsConstant}(`, `)]`);
15622
15588
  else yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, features, code, offset);
15623
- else if (shouldCamelize) if (utils_1.identifierRegex.test((0, shared_1.camelize)(code))) yield* (0, camelized_1.generateCamelized)(code, "template", offset, features);
15589
+ else if (shouldCamelize) if (utils_1.identifierRE.test((0, shared_1.camelize)(code))) yield* (0, camelized_1.generateCamelized)(code, "template", offset, features);
15624
15590
  else {
15625
- const token = yield* (0, boundary_1.startBoundary)("template", offset, features);
15591
+ const boundary = yield* boundary_1.Boundary.start("template", offset, features);
15626
15592
  yield `'`;
15627
- yield* (0, camelized_1.generateCamelized)(code, "template", offset, { __combineToken: token });
15593
+ yield* (0, camelized_1.generateCamelized)(code, "template", offset, boundary.features);
15628
15594
  yield `'`;
15629
- yield (0, boundary_1.endBoundary)(token, offset + code.length);
15595
+ yield boundary.end(offset + code.length);
15630
15596
  }
15631
- else if (utils_1.identifierRegex.test(code)) yield [
15597
+ else if (utils_1.identifierRE.test(code)) yield [
15632
15598
  code,
15633
15599
  "template",
15634
15600
  offset,
@@ -15803,8 +15769,8 @@ var require_out$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
15803
15769
  if (k2 === void 0) k2 = k;
15804
15770
  o[k2] = m[k];
15805
15771
  }));
15806
- var __exportStar = exports && exports.__exportStar || function(m, exports$7) {
15807
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$7, p)) __createBinding(exports$7, m, p);
15772
+ var __exportStar = exports && exports.__exportStar || function(m, exports$6) {
15773
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$6, p)) __createBinding(exports$6, m, p);
15808
15774
  };
15809
15775
  Object.defineProperty(exports, "__esModule", { value: true });
15810
15776
  exports.replaceRange = exports.replaceSourceRange = exports.replaceAll = exports.replace = exports.create = exports.toString = exports.getLength = void 0;
@@ -16610,7 +16576,10 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16610
16576
  }
16611
16577
  }
16612
16578
  };
16613
- var getStarExtglobSequenceOutput = (pattern) => {
16579
+ var buildCharClassStar = (chars) => {
16580
+ return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`;
16581
+ };
16582
+ var getStarExtglobSequenceChars = (pattern) => {
16614
16583
  let index = 0;
16615
16584
  const chars = [];
16616
16585
  while (index < pattern.length) {
@@ -16624,7 +16593,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16624
16593
  index += match.end + 1;
16625
16594
  }
16626
16595
  if (chars.length < 1) return;
16627
- return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`;
16596
+ return chars;
16628
16597
  };
16629
16598
  var repeatedExtglobRecursion = (pattern) => {
16630
16599
  let depth = 0;
@@ -16644,14 +16613,28 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16644
16613
  if (branches.length > 1) {
16645
16614
  if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return { risky: true };
16646
16615
  }
16616
+ const safeChars = [];
16617
+ let sawStarSequence = false;
16618
+ let combinable = true;
16647
16619
  for (const branch of branches) {
16648
- const safeOutput = getStarExtglobSequenceOutput(branch);
16649
- if (safeOutput) return {
16650
- risky: true,
16651
- safeOutput
16652
- };
16620
+ const chars = getStarExtglobSequenceChars(branch);
16621
+ if (chars) {
16622
+ sawStarSequence = true;
16623
+ safeChars.push(...chars);
16624
+ continue;
16625
+ }
16626
+ const literal = normalizeSimpleBranch(branch);
16627
+ if (literal && literal.length === 1) {
16628
+ safeChars.push(literal);
16629
+ continue;
16630
+ }
16631
+ combinable = false;
16653
16632
  if (repeatedExtglobRecursion(branch) > max) return { risky: true };
16654
16633
  }
16634
+ if (sawStarSequence) return combinable ? {
16635
+ risky: true,
16636
+ safeOutput: buildCharClassStar([...new Set(safeChars)])
16637
+ } : { risky: true };
16655
16638
  return { risky: false };
16656
16639
  };
16657
16640
  /**
@@ -17531,6 +17514,18 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17531
17514
  * const isMatch = picomatch('*.!(*a)');
17532
17515
  * console.log(isMatch('a.a')); //=> false
17533
17516
  * console.log(isMatch('a.b')); //=> true
17517
+ *
17518
+ * // For environments without `node.js`, `picomatch/posix` provides you a dependency-free matcher, without automatic OS detection.
17519
+ * const picomatch = require('picomatch/posix');
17520
+ * // the same API, defaulting to posix paths
17521
+ * const isMatch = picomatch('a/*');
17522
+ * console.log(isMatch('a\\b')); //=> false
17523
+ * console.log(isMatch('a/b')); //=> true
17524
+ *
17525
+ * // you can still configure the matcher function to accept windows paths
17526
+ * const isMatch = picomatch('a/*', { options: windows });
17527
+ * console.log(isMatch('a\\b')); //=> true
17528
+ * console.log(isMatch('a/b')); //=> true
17534
17529
  * ```
17535
17530
  * @name picomatch
17536
17531
  * @param {String|Array} `globs` One or more glob patterns.
@@ -17649,8 +17644,8 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17649
17644
  * @return {Boolean}
17650
17645
  * @api public
17651
17646
  */
17652
- picomatch.matchBase = (input, glob, options) => {
17653
- return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input));
17647
+ picomatch.matchBase = (input, glob, options, posix = options && options.windows) => {
17648
+ return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input, { windows: posix }));
17654
17649
  };
17655
17650
  /**
17656
17651
  * Returns true if **any** of the given glob `patterns` match the specified `string`.
@@ -17830,16 +17825,16 @@ var require_unicode = /* @__PURE__ */ __commonJSMin(((exports) => {
17830
17825
  Object.defineProperty(exports, "__esModule", { value: true });
17831
17826
  exports.generateUnicode = generateUnicode;
17832
17827
  var boundary_1 = require_boundary();
17833
- function* generateUnicode(code, offset, info) {
17828
+ function* generateUnicode(code, offset, features) {
17834
17829
  if (needToUnicode(code)) {
17835
- const token = yield* (0, boundary_1.startBoundary)("template", offset, info);
17830
+ const boundary = yield* boundary_1.Boundary.start("template", offset, features);
17836
17831
  yield toUnicode(code);
17837
- yield (0, boundary_1.endBoundary)(token, offset + code.length);
17832
+ yield boundary.end(offset + code.length);
17838
17833
  } else yield [
17839
17834
  code,
17840
17835
  "template",
17841
17836
  offset,
17842
- info
17837
+ features
17843
17838
  ];
17844
17839
  }
17845
17840
  function needToUnicode(str) {
@@ -17854,6 +17849,71 @@ var require_unicode = /* @__PURE__ */ __commonJSMin(((exports) => {
17854
17849
  }
17855
17850
  }));
17856
17851
  //#endregion
17852
+ //#region node_modules/@vue/language-core/lib/parsers/utils.js
17853
+ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
17854
+ Object.defineProperty(exports, "__esModule", { value: true });
17855
+ exports.parseBindingRanges = parseBindingRanges;
17856
+ exports.getClosestMultiLineCommentRange = getClosestMultiLineCommentRange;
17857
+ exports.getUnwrappedExpression = getUnwrappedExpression;
17858
+ var collectBindings_1 = require_collectBindings();
17859
+ var shared_1 = require_shared$1();
17860
+ function parseBindingRanges(ts, ast, componentExtsensions) {
17861
+ const bindings = [];
17862
+ const components = [];
17863
+ ts.forEachChild(ast, (node) => {
17864
+ if (ts.isVariableStatement(node)) for (const decl of node.declarationList.declarations) {
17865
+ const ranges = (0, collectBindings_1.collectBindingRanges)(ts, decl.name, ast);
17866
+ bindings.push(...ranges);
17867
+ }
17868
+ else if (ts.isFunctionDeclaration(node)) {
17869
+ if (node.name && ts.isIdentifier(node.name)) bindings.push(_getStartEnd(node.name));
17870
+ } else if (ts.isClassDeclaration(node)) {
17871
+ if (node.name) bindings.push(_getStartEnd(node.name));
17872
+ } else if (ts.isEnumDeclaration(node)) bindings.push(_getStartEnd(node.name));
17873
+ if (ts.isImportDeclaration(node)) {
17874
+ const moduleName = _getNodeText(node.moduleSpecifier).slice(1, -1);
17875
+ if (node.importClause && !node.importClause.isTypeOnly) {
17876
+ const { name, namedBindings } = node.importClause;
17877
+ if (name) if (componentExtsensions.some((ext) => moduleName.endsWith(ext))) components.push(_getStartEnd(name));
17878
+ else bindings.push(_getStartEnd(name));
17879
+ if (namedBindings) if (ts.isNamedImports(namedBindings)) for (const element of namedBindings.elements) {
17880
+ if (element.isTypeOnly) continue;
17881
+ if (element.propertyName && _getNodeText(element.propertyName) === "default" && componentExtsensions.some((ext) => moduleName.endsWith(ext))) components.push(_getStartEnd(element.name));
17882
+ else bindings.push(_getStartEnd(element.name));
17883
+ }
17884
+ else bindings.push(_getStartEnd(namedBindings.name));
17885
+ }
17886
+ }
17887
+ });
17888
+ return {
17889
+ bindings,
17890
+ components
17891
+ };
17892
+ function _getStartEnd(node) {
17893
+ return (0, shared_1.getStartEnd)(ts, node, ast);
17894
+ }
17895
+ function _getNodeText(node) {
17896
+ return (0, shared_1.getNodeText)(ts, node, ast);
17897
+ }
17898
+ }
17899
+ function getClosestMultiLineCommentRange(ts, node, parents, ast) {
17900
+ for (let i = parents.length - 1; i >= 0; i--) {
17901
+ if (ts.isStatement(node)) break;
17902
+ node = parents[i];
17903
+ }
17904
+ const comment = ts.getLeadingCommentRanges(ast.text, node.pos)?.reverse().find((range) => range.kind === 3);
17905
+ if (comment) return {
17906
+ node,
17907
+ start: comment.pos,
17908
+ end: comment.end
17909
+ };
17910
+ }
17911
+ function getUnwrappedExpression(ts, node) {
17912
+ while (ts.isParenthesizedExpression(node) || ts.isAssertionExpression(node) || ts.isNonNullExpression(node) || ts.isSatisfiesExpression(node)) node = node.expression;
17913
+ return node;
17914
+ }
17915
+ }));
17916
+ //#endregion
17857
17917
  //#region node_modules/@vue/language-core/lib/codegen/template/elementEvents.js
17858
17918
  var require_elementEvents = /* @__PURE__ */ __commonJSMin(((exports) => {
17859
17919
  var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
@@ -17905,14 +17965,15 @@ var require_elementEvents = /* @__PURE__ */ __commonJSMin(((exports) => {
17905
17965
  exports.isCompoundExpression = isCompoundExpression;
17906
17966
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
17907
17967
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
17968
+ var utils_1 = require_utils$3();
17908
17969
  var codeFeatures_1 = require_codeFeatures();
17909
17970
  var names_1 = require_names();
17910
- var utils_1 = require_utils$5();
17971
+ var utils_2 = require_utils$5();
17911
17972
  var boundary_1 = require_boundary();
17912
17973
  var camelized_1 = require_camelized();
17913
17974
  var interpolation_1 = require_interpolation();
17914
17975
  function* generateElementEvents(options, ctx, node, componentOriginalVar, getCtxVar, getPropsVar) {
17915
- const definitions = [];
17976
+ const definitions = {};
17916
17977
  for (const prop of node.props) if (prop.type === CompilerDOM.NodeTypes.DIRECTIVE && (prop.name === "on" && prop.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && prop.arg.isStatic || options.vueCompilerOptions.strictVModel && prop.name === "model" && (!prop.arg || prop.arg.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && prop.arg.isStatic))) {
17917
17978
  let source = prop.arg?.loc.source ?? "model-value";
17918
17979
  let offset = prop.arg?.loc.start.offset;
@@ -17929,43 +17990,47 @@ var require_elementEvents = /* @__PURE__ */ __commonJSMin(((exports) => {
17929
17990
  }
17930
17991
  const propName = (0, shared_1.camelize)(propPrefix + source);
17931
17992
  const emitName = emitPrefix + source;
17932
- definitions.push({
17933
- prop,
17934
- source,
17935
- offset,
17936
- emitPrefix,
17993
+ const key = [
17994
+ prop.name,
17995
+ propName,
17996
+ ...prop.modifiers.map((modifier) => modifier.content)
17997
+ ].join("+");
17998
+ definitions[key] ??= {
17937
17999
  propPrefix,
18000
+ emitPrefix,
17938
18001
  propName,
17939
- emitName
18002
+ emitName,
18003
+ items: []
18004
+ };
18005
+ definitions[key].items.push({
18006
+ prop,
18007
+ source,
18008
+ offset
17940
18009
  });
17941
18010
  }
17942
- if (!definitions.length) return;
18011
+ if (!Object.keys(definitions).length) return;
17943
18012
  const emitsVar = ctx.getInternalVariable();
17944
- yield `let ${emitsVar}!: ${names_1.names.ResolveEmits}<typeof ${componentOriginalVar}, typeof ${getCtxVar()}.emit>${utils_1.endOfLine}`;
17945
- yield `const ${ctx.getInternalVariable()}: `;
17946
- for (let i = 0; i < definitions.length; i++) {
17947
- const { propName, emitName } = definitions[i];
17948
- if (i > 0) yield ` & `;
17949
- yield `${names_1.names.NormalizeComponentEvent}<typeof ${getPropsVar()}, typeof ${emitsVar}, '${propName}', '${emitName}', '${(0, shared_1.camelize)(emitName)}'>`;
17950
- }
17951
- yield ` = {${utils_1.newLine}`;
17952
- for (const { prop, source, offset, emitPrefix, propPrefix, propName } of definitions) {
17953
- if (prop.name === "on") {
17954
- yield `...{ `;
17955
- yield* generateEventArg(options, source, offset, emitPrefix.slice(0, -1), codeFeatures_1.codeFeatures.navigation);
17956
- yield `: {} as any } as typeof ${emitsVar},${utils_1.newLine}`;
17957
- }
17958
- if (prop.name === "on") {
17959
- yield* generateEventArg(options, source, offset, propPrefix.slice(0, -1));
17960
- yield `: `;
17961
- yield* generateEventExpression(options, ctx, prop);
17962
- } else {
17963
- yield `'${propName}': `;
17964
- yield* generateModelEventExpression(options, ctx, prop);
18013
+ yield `let ${emitsVar}!: ${names_1.names.ResolveEmits}<typeof ${componentOriginalVar}, typeof ${getCtxVar()}.emit>${utils_2.endOfLine}`;
18014
+ for (const { propPrefix, emitPrefix, propName, emitName, items } of Object.values(definitions)) {
18015
+ yield `const ${ctx.getInternalVariable()}: ${names_1.names.ResolveEvent}<typeof ${getPropsVar()}, typeof ${emitsVar}, '${propName}', '${emitName}', '${(0, shared_1.camelize)(emitName)}'> = {${utils_2.newLine}`;
18016
+ for (const { prop, source, offset } of items) {
18017
+ if (prop.name === "on") {
18018
+ yield `/** @type {typeof ${emitsVar}.`;
18019
+ yield* generateEventArg(options, source, offset, emitPrefix.slice(0, -1), codeFeatures_1.codeFeatures.navigation);
18020
+ yield `} */${utils_2.newLine}`;
18021
+ }
18022
+ if (prop.name === "on") {
18023
+ yield* generateEventArg(options, source, offset, propPrefix.slice(0, -1));
18024
+ yield `: `;
18025
+ yield* generateEventExpression(options, ctx, prop);
18026
+ } else {
18027
+ yield `'${propName}': `;
18028
+ yield* generateModelEventExpression(options, ctx, prop);
18029
+ }
18030
+ yield `,${utils_2.newLine}`;
17965
18031
  }
17966
- yield `,${utils_1.newLine}`;
18032
+ yield `}${utils_2.endOfLine}`;
17967
18033
  }
17968
- yield `}${utils_1.endOfLine}`;
17969
18034
  }
17970
18035
  function* generateEventArg(options, name, start, directive = "on", features) {
17971
18036
  features ??= {
@@ -17974,32 +18039,33 @@ var require_elementEvents = /* @__PURE__ */ __commonJSMin(((exports) => {
17974
18039
  ...options.vueCompilerOptions.checkUnknownEvents ? codeFeatures_1.codeFeatures.verification : codeFeatures_1.codeFeatures.doNotReportTs2353AndTs2561
17975
18040
  };
17976
18041
  if (directive.length) name = (0, shared_1.capitalize)(name);
17977
- if (utils_1.identifierRegex.test((0, shared_1.camelize)(name))) {
17978
- const token = yield* (0, boundary_1.startBoundary)("template", start, features);
18042
+ if (utils_2.identifierRE.test((0, shared_1.camelize)(name))) {
18043
+ const boundary = yield* boundary_1.Boundary.start("template", start, features);
17979
18044
  yield directive;
17980
- yield* (0, camelized_1.generateCamelized)(name, "template", start, { __combineToken: token });
18045
+ yield* (0, camelized_1.generateCamelized)(name, "template", start, boundary.features);
17981
18046
  } else {
17982
- const token = yield* (0, boundary_1.startBoundary)("template", start, features);
18047
+ const boundary = yield* boundary_1.Boundary.start("template", start, features);
17983
18048
  yield `'`;
17984
18049
  yield directive;
17985
- yield* (0, camelized_1.generateCamelized)(name, "template", start, { __combineToken: token });
18050
+ yield* (0, camelized_1.generateCamelized)(name, "template", start, boundary.features);
17986
18051
  yield `'`;
17987
- yield (0, boundary_1.endBoundary)(token, start + name.length);
18052
+ yield boundary.end(start + name.length);
17988
18053
  }
17989
18054
  }
17990
18055
  function* generateEventExpression(options, ctx, prop) {
17991
18056
  if (prop.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
17992
- const ast = (0, utils_1.getTypeScriptAST)(options.typescript, options.template, prop.exp.content);
18057
+ const ast = (0, utils_2.getTypeScriptAST)(options.typescript, options.template, prop.exp.content);
17993
18058
  const isCompound = isCompoundExpression(options.typescript, ast);
17994
18059
  const interpolation = (0, interpolation_1.generateInterpolation)(options, ctx, options.template, codeFeatures_1.codeFeatures.all, prop.exp.content, prop.exp.loc.start.offset, isCompound ? `` : `(`, isCompound ? `` : `)`);
17995
18060
  if (isCompound) {
17996
- yield `(...[$event]) => {${utils_1.newLine}`;
17997
- const endScope = ctx.startScope();
17998
- ctx.declare("$event");
18061
+ yield `(...[$event]) => {${utils_2.newLine}`;
18062
+ const scope = ctx.scope();
18063
+ scope.declare("$event");
17999
18064
  yield* ctx.generateConditionGuards();
18065
+ if (isSingleExpression(options.typescript, ast)) yield `return `;
18000
18066
  yield* interpolation;
18001
- yield utils_1.endOfLine;
18002
- yield* endScope();
18067
+ yield utils_2.endOfLine;
18068
+ yield* scope.end();
18003
18069
  yield `}`;
18004
18070
  ctx.inlayHints.push({
18005
18071
  blockName: "template",
@@ -18018,28 +18084,29 @@ var require_elementEvents = /* @__PURE__ */ __commonJSMin(((exports) => {
18018
18084
  }
18019
18085
  function* generateModelEventExpression(options, ctx, prop) {
18020
18086
  if (prop.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
18021
- yield `(...[$event]) => {${utils_1.newLine}`;
18087
+ yield `(...[$event]) => {${utils_2.newLine}`;
18022
18088
  yield* ctx.generateConditionGuards();
18023
18089
  yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, codeFeatures_1.codeFeatures.verification, prop.exp.content, prop.exp.loc.start.offset);
18024
- yield ` = $event${utils_1.endOfLine}`;
18090
+ yield ` = $event${utils_2.endOfLine}`;
18025
18091
  yield `}`;
18026
18092
  } else yield `() => {}`;
18027
18093
  }
18028
18094
  function isCompoundExpression(ts, ast) {
18029
- let result = true;
18030
- if (ast.statements.length === 0) result = false;
18031
- else if (ast.statements.length === 1) ts.forEachChild(ast, (child_1) => {
18032
- if (ts.isExpressionStatement(child_1)) ts.forEachChild(child_1, (child_2) => {
18033
- if (ts.isArrowFunction(child_2)) result = false;
18034
- else if (isPropertyAccessOrId(ts, child_2)) result = false;
18035
- });
18036
- else if (ts.isFunctionDeclaration(child_1)) result = false;
18037
- });
18038
- return result;
18095
+ if (ast.statements.length === 0) return false;
18096
+ if (ast.statements.length === 1 && ast.text[ast.endOfFileToken.pos - 1] !== ";") {
18097
+ const statement = ast.statements[0];
18098
+ if (ts.isExpressionStatement(statement)) {
18099
+ const node = (0, utils_1.getUnwrappedExpression)(ts, statement.expression);
18100
+ if (ts.isArrowFunction(node) || ts.isIdentifier(node) || ts.isElementAccessExpression(node) || ts.isPropertyAccessExpression(node)) return false;
18101
+ } else if (ts.isFunctionDeclaration(statement)) return false;
18102
+ }
18103
+ return true;
18039
18104
  }
18040
- function isPropertyAccessOrId(ts, node) {
18041
- if (ts.isIdentifier(node)) return true;
18042
- if (ts.isPropertyAccessExpression(node)) return isPropertyAccessOrId(ts, node.expression);
18105
+ function isSingleExpression(ts, ast) {
18106
+ if (ast.statements.length === 1 && ast.text[ast.endOfFileToken.pos - 1] !== ";") {
18107
+ const statement = ast.statements[0];
18108
+ if (ts.isExpressionStatement(statement)) return true;
18109
+ }
18043
18110
  return false;
18044
18111
  }
18045
18112
  }));
@@ -18093,7 +18160,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18093
18160
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
18094
18161
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
18095
18162
  var picomatch_1 = require_picomatch();
18096
- var shared_2 = require_shared$2();
18163
+ var shared_2 = require_shared$1();
18097
18164
  var codeFeatures_1 = require_codeFeatures();
18098
18165
  var inlayHints_1 = require_inlayHints();
18099
18166
  var names_1 = require_names();
@@ -18151,19 +18218,19 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18151
18218
  const shouldCamelize = getShouldCamelize(options, node, prop, propName);
18152
18219
  const features = getPropsCodeFeatures(checkUnknownProps);
18153
18220
  if (shouldSpread) yield `...{ `;
18154
- const token = yield* (0, boundary_1.startBoundary)("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18221
+ const boundary = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18155
18222
  if (prop.arg) yield* (0, objectProperty_1.generateObjectProperty)(options, ctx, propName, prop.arg.loc.start.offset, features, shouldCamelize);
18156
18223
  else {
18157
- const token2 = yield* (0, boundary_1.startBoundary)("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
18224
+ const boundary2 = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
18158
18225
  yield propName;
18159
- yield (0, boundary_1.endBoundary)(token2, prop.loc.start.offset + 7);
18226
+ yield boundary2.end(prop.loc.start.offset + 7);
18160
18227
  }
18161
18228
  yield `: `;
18162
18229
  const argLoc = prop.arg?.loc ?? prop.loc;
18163
- const token3 = yield* (0, boundary_1.startBoundary)("template", argLoc.start.offset, codeFeatures_1.codeFeatures.verification);
18230
+ const boundary3 = yield* boundary_1.Boundary.start("template", argLoc.start.offset, codeFeatures_1.codeFeatures.verification);
18164
18231
  yield* generatePropExp(options, ctx, prop, prop.exp);
18165
- yield (0, boundary_1.endBoundary)(token3, argLoc.end.offset);
18166
- yield (0, boundary_1.endBoundary)(token, prop.loc.end.offset);
18232
+ yield boundary3.end(argLoc.end.offset);
18233
+ yield boundary.end(prop.loc.end.offset);
18167
18234
  if (shouldSpread) yield ` }`;
18168
18235
  yield `,${utils_1.newLine}`;
18169
18236
  if (isComponent && prop.name === "model" && prop.modifiers.length) {
@@ -18177,7 +18244,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18177
18244
  const shouldCamelize = getShouldCamelize(options, node, prop, prop.name);
18178
18245
  const features = getPropsCodeFeatures(checkUnknownProps);
18179
18246
  if (shouldSpread) yield `...{ `;
18180
- const token = yield* (0, boundary_1.startBoundary)("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18247
+ const boundary = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18181
18248
  const prefix = options.template.content.slice(prop.loc.start.offset, prop.loc.start.offset + 1);
18182
18249
  if (prefix === "." || prefix === "#") for (const char of prop.name) yield [
18183
18250
  char,
@@ -18190,7 +18257,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18190
18257
  if (prop.name === "style") yield `{}`;
18191
18258
  else if (prop.value) yield* generateAttrValue(prop.value, codeFeatures_1.codeFeatures.withoutNavigation);
18192
18259
  else yield `true`;
18193
- yield (0, boundary_1.endBoundary)(token, prop.loc.end.offset);
18260
+ yield boundary.end(prop.loc.end.offset);
18194
18261
  if (shouldSpread) yield ` }`;
18195
18262
  yield `,${utils_1.newLine}`;
18196
18263
  } else if (prop.name === "bind" && !prop.arg && prop.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) if (prop.exp.loc.source === "$attrs") failedPropExps?.push({
@@ -18199,10 +18266,10 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18199
18266
  suffix: `)`
18200
18267
  });
18201
18268
  else {
18202
- const token = yield* (0, boundary_1.startBoundary)("template", prop.exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18269
+ const boundary = yield* boundary_1.Boundary.start("template", prop.exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18203
18270
  yield `...`;
18204
18271
  yield* generatePropExp(options, ctx, prop, prop.exp);
18205
- yield (0, boundary_1.endBoundary)(token, prop.exp.loc.end.offset);
18272
+ yield boundary.end(prop.exp.loc.end.offset);
18206
18273
  yield `,${utils_1.newLine}`;
18207
18274
  }
18208
18275
  }
@@ -18211,7 +18278,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18211
18278
  else if (prop.arg?.loc.start.offset !== prop.exp?.loc.start.offset) yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, codeFeatures_1.codeFeatures.all, exp.loc.source, exp.loc.start.offset, `(`, `)`);
18212
18279
  else {
18213
18280
  const propVariableName = (0, shared_1.camelize)(exp.loc.source);
18214
- if (utils_1.identifierRegex.test(propVariableName)) {
18281
+ if (utils_1.identifierRE.test(propVariableName)) {
18215
18282
  const codes = (0, camelized_1.generateCamelized)(exp.loc.source, "template", exp.loc.start.offset, {
18216
18283
  ...codeFeatures_1.codeFeatures.withoutHighlightAndCompletion,
18217
18284
  __shorthandExpression: "html"
@@ -18221,7 +18288,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18221
18288
  yield* codes;
18222
18289
  yield `.value`;
18223
18290
  } else {
18224
- ctx.recordComponentAccess("template", propVariableName, exp.loc.start.offset);
18291
+ ctx.accessVariable("template", propVariableName, exp.loc.start.offset);
18225
18292
  yield names_1.names.ctx;
18226
18293
  yield `.`;
18227
18294
  yield* codes;
@@ -18338,7 +18405,7 @@ var require_elementDirectives = /* @__PURE__ */ __commonJSMin(((exports) => {
18338
18405
  function* generateElementDirectives(options, ctx, node) {
18339
18406
  for (const prop of node.props) {
18340
18407
  if (prop.type !== CompilerDOM.NodeTypes.DIRECTIVE || prop.name === "slot" || prop.name === "on" || prop.name === "model" || prop.name === "bind") continue;
18341
- const token = yield* (0, boundary_1.startBoundary)("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18408
+ const boundary = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18342
18409
  yield `${names_1.names.asFunctionalDirective}(`;
18343
18410
  yield* generateIdentifier(options, ctx, prop);
18344
18411
  yield `, {} as import('${options.vueCompilerOptions.lib}').ObjectDirective)(null!, { ...${names_1.names.directiveBindingRestFields}, `;
@@ -18346,30 +18413,30 @@ var require_elementDirectives = /* @__PURE__ */ __commonJSMin(((exports) => {
18346
18413
  yield* generateModifiers(options, ctx, prop);
18347
18414
  yield* generateValue(options, ctx, prop);
18348
18415
  yield ` }, null!, null!)`;
18349
- yield (0, boundary_1.endBoundary)(token, prop.loc.end.offset);
18416
+ yield boundary.end(prop.loc.end.offset);
18350
18417
  yield utils_1.endOfLine;
18351
18418
  }
18352
18419
  }
18353
18420
  function* generateIdentifier(options, ctx, prop) {
18354
18421
  const rawName = "v-" + prop.name;
18355
18422
  const startOffset = prop.loc.start.offset;
18356
- const token = yield* (0, boundary_1.startBoundary)("template", startOffset, codeFeatures_1.codeFeatures.verification);
18423
+ const boundary = yield* boundary_1.Boundary.start("template", startOffset, codeFeatures_1.codeFeatures.verification);
18357
18424
  yield names_1.names.directives;
18358
18425
  yield `.`;
18359
18426
  yield* (0, camelized_1.generateCamelized)(rawName, "template", prop.loc.start.offset, {
18360
18427
  ...codeFeatures_1.codeFeatures.withoutHighlightAndCompletion,
18361
18428
  verification: options.vueCompilerOptions.checkUnknownDirectives && !(0, shared_1.isBuiltInDirective)(prop.name)
18362
18429
  });
18363
- if (!(0, shared_1.isBuiltInDirective)(prop.name)) ctx.recordComponentAccess("template", (0, shared_1.camelize)(rawName), prop.loc.start.offset);
18364
- yield (0, boundary_1.endBoundary)(token, startOffset + rawName.length);
18430
+ if (!(0, shared_1.isBuiltInDirective)(prop.name)) ctx.accessVariable("template", (0, shared_1.camelize)(rawName), prop.loc.start.offset);
18431
+ yield boundary.end(startOffset + rawName.length);
18365
18432
  }
18366
18433
  function* generateArg(options, ctx, prop) {
18367
18434
  const { arg } = prop;
18368
18435
  if (arg?.type !== CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) return;
18369
18436
  const startOffset = arg.loc.start.offset + arg.loc.source.indexOf(arg.content);
18370
- const token = yield* (0, boundary_1.startBoundary)("template", startOffset, codeFeatures_1.codeFeatures.verification);
18437
+ const boundary = yield* boundary_1.Boundary.start("template", startOffset, codeFeatures_1.codeFeatures.verification);
18371
18438
  yield `arg`;
18372
- yield (0, boundary_1.endBoundary)(token, startOffset + arg.content.length);
18439
+ yield boundary.end(startOffset + arg.content.length);
18373
18440
  yield `: `;
18374
18441
  if (arg.isStatic) yield* (0, stringLiteralKey_1.generateStringLiteralKey)(arg.content, startOffset, codeFeatures_1.codeFeatures.all);
18375
18442
  else yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, codeFeatures_1.codeFeatures.all, arg.content, startOffset, `(`, `)`);
@@ -18380,9 +18447,9 @@ var require_elementDirectives = /* @__PURE__ */ __commonJSMin(((exports) => {
18380
18447
  if (!modifiers.length) return;
18381
18448
  const startOffset = modifiers[0].loc.start.offset - 1;
18382
18449
  const endOffset = modifiers.at(-1).loc.end.offset;
18383
- const token = yield* (0, boundary_1.startBoundary)("template", startOffset, codeFeatures_1.codeFeatures.verification);
18450
+ const boundary = yield* boundary_1.Boundary.start("template", startOffset, codeFeatures_1.codeFeatures.verification);
18384
18451
  yield propertyName;
18385
- yield (0, boundary_1.endBoundary)(token, endOffset);
18452
+ yield boundary.end(endOffset);
18386
18453
  yield `: { `;
18387
18454
  for (const mod of modifiers) {
18388
18455
  yield* (0, objectProperty_1.generateObjectProperty)(options, ctx, mod.content, mod.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlight);
@@ -18393,9 +18460,9 @@ var require_elementDirectives = /* @__PURE__ */ __commonJSMin(((exports) => {
18393
18460
  function* generateValue(options, ctx, prop) {
18394
18461
  const { exp } = prop;
18395
18462
  if (exp?.type !== CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) return;
18396
- const token = yield* (0, boundary_1.startBoundary)("template", exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18463
+ const boundary = yield* boundary_1.Boundary.start("template", exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18397
18464
  yield `value`;
18398
- yield (0, boundary_1.endBoundary)(token, exp.loc.end.offset);
18465
+ yield boundary.end(exp.loc.end.offset);
18399
18466
  yield `: `;
18400
18467
  yield* (0, elementProps_1.generatePropExp)(options, ctx, prop, exp);
18401
18468
  }
@@ -18410,7 +18477,7 @@ var require_propertyAccess = /* @__PURE__ */ __commonJSMin(((exports) => {
18410
18477
  var interpolation_1 = require_interpolation();
18411
18478
  function* generatePropertyAccess(options, ctx, code, offset, features) {
18412
18479
  if (code.startsWith("[") && code.endsWith("]")) yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, features, code, offset);
18413
- else if (utils_1.identifierRegex.test(code)) {
18480
+ else if (utils_1.identifierRE.test(code)) {
18414
18481
  yield `.`;
18415
18482
  yield [
18416
18483
  code,
@@ -18432,7 +18499,10 @@ var require_escaped = /* @__PURE__ */ __commonJSMin(((exports) => {
18432
18499
  exports.generateEscaped = generateEscaped;
18433
18500
  function* generateEscaped(text, source, offset, features, escapeTarget) {
18434
18501
  const parts = text.split(escapeTarget);
18435
- const combineToken = features.__combineToken ?? Symbol();
18502
+ if (!features.__combineToken) features = {
18503
+ ...features,
18504
+ __combineToken: Symbol()
18505
+ };
18436
18506
  let isEscapeTarget = false;
18437
18507
  for (let i = 0; i < parts.length; i++) {
18438
18508
  const part = parts[i];
@@ -18441,10 +18511,7 @@ var require_escaped = /* @__PURE__ */ __commonJSMin(((exports) => {
18441
18511
  part,
18442
18512
  source,
18443
18513
  offset,
18444
- i === 0 ? {
18445
- ...features,
18446
- __combineToken: combineToken
18447
- } : { __combineToken: combineToken }
18514
+ features
18448
18515
  ];
18449
18516
  offset += part.length;
18450
18517
  isEscapeTarget = !isEscapeTarget;
@@ -18462,7 +18529,7 @@ var require_styleScopedClasses = /* @__PURE__ */ __commonJSMin(((exports) => {
18462
18529
  var utils_1 = require_utils$5();
18463
18530
  var boundary_1 = require_boundary();
18464
18531
  var escaped_1 = require_escaped();
18465
- var classNameEscapeRegex = /([\\'])/;
18532
+ var classNameEscapeRE = /([\\'])/;
18466
18533
  exports.references = /* @__PURE__ */ new WeakMap();
18467
18534
  function* generateStyleScopedClassReference(block, className, offset, fullStart = offset) {
18468
18535
  if (!className) {
@@ -18483,11 +18550,11 @@ var require_styleScopedClasses = /* @__PURE__ */ __commonJSMin(((exports) => {
18483
18550
  arr.push([className, offset]);
18484
18551
  } else cache[1].push([className, offset]);
18485
18552
  yield `/** @type {${names_1.names.StyleScopedClasses}[`;
18486
- const token = yield* (0, boundary_1.startBoundary)(block.name, fullStart, codeFeatures_1.codeFeatures.navigation);
18553
+ const boundary = yield* boundary_1.Boundary.start(block.name, fullStart, codeFeatures_1.codeFeatures.navigationAndCompletion);
18487
18554
  yield `'`;
18488
- yield* (0, escaped_1.generateEscaped)(className, block.name, offset, codeFeatures_1.codeFeatures.navigationAndCompletion, classNameEscapeRegex);
18555
+ yield* (0, escaped_1.generateEscaped)(className, block.name, offset, boundary.features, classNameEscapeRE);
18489
18556
  yield `'`;
18490
- yield (0, boundary_1.endBoundary)(token, offset + className.length);
18557
+ yield boundary.end(offset + className.length);
18491
18558
  yield `]} */${utils_1.endOfLine}`;
18492
18559
  }
18493
18560
  }));
@@ -18554,25 +18621,25 @@ var require_vSlot = /* @__PURE__ */ __commonJSMin(((exports) => {
18554
18621
  yield `const { `;
18555
18622
  if (slotDir.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && slotDir.arg.content) yield* (0, objectProperty_1.generateObjectProperty)(options, ctx, slotDir.arg.loc.source, slotDir.arg.loc.start.offset, slotDir.arg.isStatic ? codeFeatures_1.codeFeatures.withoutHighlight : codeFeatures_1.codeFeatures.all, false, true);
18556
18623
  else {
18557
- const token = yield* (0, boundary_1.startBoundary)("template", slotDir.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
18624
+ const boundary = yield* boundary_1.Boundary.start("template", slotDir.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
18558
18625
  yield `default`;
18559
- yield (0, boundary_1.endBoundary)(token, slotDir.loc.start.offset + (slotDir.rawName?.length ?? 0));
18626
+ yield boundary.end(slotDir.loc.start.offset + (slotDir.rawName?.length ?? 0));
18560
18627
  }
18561
18628
  } else {
18562
18629
  yield `const { `;
18563
- const token = yield* (0, boundary_1.startBoundary)("template", node.loc.start.offset, codeFeatures_1.codeFeatures.navigation);
18630
+ const boundary = yield* boundary_1.Boundary.start("template", node.loc.start.offset, codeFeatures_1.codeFeatures.navigation);
18564
18631
  yield `default`;
18565
- yield (0, boundary_1.endBoundary)(token, node.loc.end.offset);
18632
+ yield boundary.end(node.loc.end.offset);
18566
18633
  }
18567
18634
  yield `: ${slotVar} } = ${ctxVar}.slots!${utils_1.endOfLine}`;
18568
- const endScope = ctx.startScope();
18635
+ const scope = ctx.scope();
18569
18636
  if (slotDir?.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
18570
18637
  const slotAst = (0, utils_1.getTypeScriptAST)(options.typescript, options.template, `(${slotDir.exp.content}) => {}`);
18571
18638
  yield* generateSlotParameters(options, ctx, slotAst, slotDir.exp, slotVar);
18572
- ctx.declare(...(0, collectBindings_1.collectBindingNames)(options.typescript, slotAst, slotAst));
18639
+ scope.declare(...(0, collectBindings_1.collectBindingNames)(options.typescript, slotAst, slotAst));
18573
18640
  }
18574
18641
  for (const child of node.children) yield* (0, templateChild_1.generateTemplateChild)(options, ctx, child);
18575
- yield* endScope();
18642
+ yield* scope.end();
18576
18643
  if (slotDir) {
18577
18644
  let isStatic = true;
18578
18645
  if (slotDir.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) isStatic = slotDir.arg.isStatic;
@@ -18613,7 +18680,7 @@ var require_vSlot = /* @__PURE__ */ __commonJSMin(((exports) => {
18613
18680
  yield `] = ${names_1.names.vSlot}(${slotVar}!`;
18614
18681
  if (types.some((t) => t)) {
18615
18682
  yield `, `;
18616
- const token = yield* (0, boundary_1.startBoundary)("template", exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18683
+ const boundary = yield* boundary_1.Boundary.start("template", exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18617
18684
  yield `(`;
18618
18685
  yield* types.flatMap((type) => type ? [
18619
18686
  `_`,
@@ -18621,7 +18688,7 @@ var require_vSlot = /* @__PURE__ */ __commonJSMin(((exports) => {
18621
18688
  `, `
18622
18689
  ] : `_, `);
18623
18690
  yield `) => [] as any`;
18624
- yield (0, boundary_1.endBoundary)(token, exp.loc.end.offset);
18691
+ yield boundary.end(exp.loc.end.offset);
18625
18692
  }
18626
18693
  yield `)${utils_1.endOfLine}`;
18627
18694
  }
@@ -18677,7 +18744,7 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18677
18744
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
18678
18745
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
18679
18746
  var muggle_string_1 = require_out$1();
18680
- var shared_2 = require_shared$2();
18747
+ var shared_2 = require_shared$1();
18681
18748
  var codeFeatures_1 = require_codeFeatures();
18682
18749
  var inlayHints_1 = require_inlayHints();
18683
18750
  var names_1 = require_names();
@@ -18721,7 +18788,7 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18721
18788
  }
18722
18789
  yield `${utils_1.endOfLine}`;
18723
18790
  } else {
18724
- const originalNames = new Set([
18791
+ const originalNames = /* @__PURE__ */ new Set([
18725
18792
  (0, shared_1.capitalize)((0, shared_1.camelize)(tag)),
18726
18793
  (0, shared_1.camelize)(tag),
18727
18794
  tag
@@ -18748,7 +18815,7 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18748
18815
  ...options.vueCompilerOptions.checkUnknownComponents ? codeFeatures_1.codeFeatures.verification : codeFeatures_1.codeFeatures.doNotReportTs2339AndTs2551
18749
18816
  });
18750
18817
  yield `]${utils_1.endOfLine}`;
18751
- if (utils_1.identifierRegex.test((0, shared_1.camelize)(tag))) {
18818
+ if (utils_1.identifierRE.test((0, shared_1.camelize)(tag))) {
18752
18819
  yield `/** @ts-ignore @type {`;
18753
18820
  for (const offset of [startTagOffset, endTagOffset]) {
18754
18821
  if (offset === void 0) continue;
@@ -18787,13 +18854,14 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18787
18854
  yield propsStr;
18788
18855
  yield `}))${utils_1.endOfLine}`;
18789
18856
  yield `const `;
18790
- const token = yield* (0, boundary_1.startBoundary)("template", node.loc.start.offset, codeFeatures_1.codeFeatures.doNotReportTs6133);
18857
+ const boundary = yield* boundary_1.Boundary.start("template", node.loc.start.offset, codeFeatures_1.codeFeatures.doNotReportTs6133);
18791
18858
  yield vnodeVar;
18792
- yield (0, boundary_1.endBoundary)(token, node.loc.end.offset);
18859
+ yield boundary.end(node.loc.end.offset);
18793
18860
  yield ` = ${functionalVar}`;
18794
- if (ctx.currentInfo.generic) {
18795
- const { content, offset } = ctx.currentInfo.generic;
18796
- const token = yield* (0, boundary_1.startBoundary)("template", offset, codeFeatures_1.codeFeatures.verification);
18861
+ const commentInfo = ctx.getCommentInfo();
18862
+ if (commentInfo.generic) {
18863
+ const { content, offset } = commentInfo.generic;
18864
+ const boundary = yield* boundary_1.Boundary.start("template", offset, codeFeatures_1.codeFeatures.verification);
18797
18865
  yield `<`;
18798
18866
  yield [
18799
18867
  content,
@@ -18802,11 +18870,11 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18802
18870
  codeFeatures_1.codeFeatures.all
18803
18871
  ];
18804
18872
  yield `>`;
18805
- yield (0, boundary_1.endBoundary)(token, offset + content.length);
18873
+ yield boundary.end(offset + content.length);
18806
18874
  }
18807
18875
  const shouldInheritAttrs = hasVBindAttrs(options, ctx, node);
18808
18876
  yield `(`;
18809
- const token2 = yield* (0, boundary_1.startBoundary)("template", startTagOffset, shouldInheritAttrs && options.vueCompilerOptions.checkRequiredFallthroughAttributes ? {} : codeFeatures_1.codeFeatures.verification);
18877
+ const boundary2 = yield* boundary_1.Boundary.start("template", startTagOffset, shouldInheritAttrs && options.vueCompilerOptions.checkRequiredFallthroughAttributes ? {} : codeFeatures_1.codeFeatures.verification);
18810
18878
  yield `{`;
18811
18879
  yield [
18812
18880
  ``,
@@ -18817,7 +18885,7 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18817
18885
  yield utils_1.newLine;
18818
18886
  yield* propCodes;
18819
18887
  yield `}`;
18820
- yield (0, boundary_1.endBoundary)(token2, startTagOffset + tag.length);
18888
+ yield boundary2.end(startTagOffset + tag.length);
18821
18889
  yield `, ...${names_1.names.functionalComponentArgsRest}(${functionalVar}))${utils_1.endOfLine}`;
18822
18890
  yield* generateFailedExpressions(options, ctx, failedPropExps);
18823
18891
  yield* (0, elementEvents_1.generateElementEvents)(options, ctx, node, componentVar, getCtxVar, getPropsVar);
@@ -18843,8 +18911,8 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18843
18911
  yield* generateStyleScopedClassReferences(options, node);
18844
18912
  const slotDir = node.props.find(CompilerDOM.isVSlot);
18845
18913
  if (slotDir || node.children.length) yield* (0, vSlot_1.generateVSlot)(options, ctx, node, slotDir, getCtxVar());
18846
- if (isCtxVarUsed) yield `var ${ctxVar}!: ${names_1.names.FunctionalComponentCtx}<typeof ${componentVar}, typeof ${vnodeVar}>${utils_1.endOfLine}`;
18847
- if (isPropsVarUsed) yield `var ${propsVar}!: ${names_1.names.FunctionalComponentProps}<typeof ${componentVar}, typeof ${vnodeVar}>${utils_1.endOfLine}`;
18914
+ if (isCtxVarUsed) yield `var ${ctxVar}!: ${names_1.names.ExtractComponentContext}<typeof ${componentVar}, typeof ${vnodeVar}>${utils_1.endOfLine}`;
18915
+ if (isPropsVarUsed) yield `var ${propsVar}!: ${names_1.names.ExtractComponentProps}<typeof ${componentVar}, typeof ${vnodeVar}>${utils_1.endOfLine}`;
18848
18916
  ctx.components.pop();
18849
18917
  }
18850
18918
  function* generateElement(options, ctx, node) {
@@ -18858,11 +18926,11 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18858
18926
  yield* (0, propertyAccess_1.generatePropertyAccess)(options, ctx, node.tag, endTagOffset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
18859
18927
  }
18860
18928
  yield `)(`;
18861
- const token = yield* (0, boundary_1.startBoundary)("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
18929
+ const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
18862
18930
  yield `{${utils_1.newLine}`;
18863
18931
  yield* (0, elementProps_1.generateElementProps)(options, ctx, node, node.props, options.vueCompilerOptions.checkUnknownProps, failedPropExps);
18864
18932
  yield `}`;
18865
- yield (0, boundary_1.endBoundary)(token, startTagOffset + node.tag.length);
18933
+ yield boundary.end(startTagOffset + node.tag.length);
18866
18934
  yield `)${utils_1.endOfLine}`;
18867
18935
  yield* generateFailedExpressions(options, ctx, failedPropExps);
18868
18936
  yield* (0, elementDirectives_1.generateElementDirectives)(options, ctx, node);
@@ -18881,11 +18949,11 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18881
18949
  const [startTagOffset] = (0, shared_2.getElementTagOffsets)(node, options.template);
18882
18950
  if (node.props.length) {
18883
18951
  yield `__VLS_asFunctionalElement(__VLS_intrinsics.template)(`;
18884
- const token = yield* (0, boundary_1.startBoundary)("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
18952
+ const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
18885
18953
  yield `{${utils_1.newLine}`;
18886
18954
  yield* (0, elementProps_1.generateElementProps)(options, ctx, node, node.props, options.vueCompilerOptions.checkUnknownProps);
18887
18955
  yield `}`;
18888
- yield (0, boundary_1.endBoundary)(token, startTagOffset + node.tag.length);
18956
+ yield boundary.end(startTagOffset + node.tag.length);
18889
18957
  yield `)${utils_1.endOfLine}`;
18890
18958
  }
18891
18959
  for (const child of node.children) yield* (0, templateChild_1.generateTemplateChild)(options, ctx, child);
@@ -19001,7 +19069,7 @@ var require_slotOutlet = /* @__PURE__ */ __commonJSMin(((exports) => {
19001
19069
  Object.defineProperty(exports, "__esModule", { value: true });
19002
19070
  exports.generateSlotOutlet = generateSlotOutlet;
19003
19071
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
19004
- var shared_1 = require_shared$2();
19072
+ var shared_1 = require_shared$1();
19005
19073
  var codeFeatures_1 = require_codeFeatures();
19006
19074
  var inlayHints_1 = require_inlayHints();
19007
19075
  var names_1 = require_names();
@@ -19032,25 +19100,25 @@ var require_slotOutlet = /* @__PURE__ */ __commonJSMin(((exports) => {
19032
19100
  `]`
19033
19101
  ];
19034
19102
  else codes = [`['default']`];
19035
- const token = yield* (0, boundary_1.startBoundary)("template", nameProp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
19103
+ const boundary = yield* boundary_1.Boundary.start("template", nameProp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
19036
19104
  yield options.slotsAssignName ?? names_1.names.slots;
19037
19105
  yield* codes;
19038
- yield (0, boundary_1.endBoundary)(token, nameProp.loc.end.offset);
19106
+ yield boundary.end(nameProp.loc.end.offset);
19039
19107
  } else {
19040
- const token = yield* (0, boundary_1.startBoundary)("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19108
+ const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19041
19109
  yield `${options.slotsAssignName ?? names_1.names.slots}[`;
19042
- const token2 = yield* (0, boundary_1.startBoundary)("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19110
+ const boundary2 = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19043
19111
  yield `'default'`;
19044
- yield (0, boundary_1.endBoundary)(token2, startTagEndOffset);
19112
+ yield boundary2.end(startTagEndOffset);
19045
19113
  yield `]`;
19046
- yield (0, boundary_1.endBoundary)(token, startTagEndOffset);
19114
+ yield boundary.end(startTagEndOffset);
19047
19115
  }
19048
19116
  yield `)(`;
19049
- const token = yield* (0, boundary_1.startBoundary)("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19117
+ const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19050
19118
  yield `{${utils_1.newLine}`;
19051
19119
  yield* (0, elementProps_1.generateElementProps)(options, ctx, node, node.props.filter((prop) => prop !== nameProp), true);
19052
19120
  yield `}`;
19053
- yield (0, boundary_1.endBoundary)(token, startTagEndOffset);
19121
+ yield boundary.end(startTagEndOffset);
19054
19122
  yield `)${utils_1.endOfLine}`;
19055
19123
  } else {
19056
19124
  yield `var ${propsVar} = {${utils_1.newLine}`;
@@ -19060,7 +19128,6 @@ var require_slotOutlet = /* @__PURE__ */ __commonJSMin(((exports) => {
19060
19128
  name: nameProp.value.content,
19061
19129
  offset: nameProp.loc.start.offset + nameProp.loc.source.indexOf(nameProp.value.content, nameProp.name.length),
19062
19130
  tagRange: [startTagOffset, startTagOffset + node.tag.length],
19063
- nodeLoc: node.loc,
19064
19131
  propsVar: ctx.getHoistVariable(propsVar)
19065
19132
  });
19066
19133
  else if (nameProp?.type === CompilerDOM.NodeTypes.DIRECTIVE && nameProp.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
@@ -19077,7 +19144,6 @@ var require_slotOutlet = /* @__PURE__ */ __commonJSMin(((exports) => {
19077
19144
  } else ctx.slots.push({
19078
19145
  name: "default",
19079
19146
  tagRange: [startTagOffset, startTagEndOffset],
19080
- nodeLoc: node.loc,
19081
19147
  propsVar: ctx.getHoistVariable(propsVar)
19082
19148
  });
19083
19149
  }
@@ -19141,11 +19207,11 @@ var require_vFor$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19141
19207
  function* generateVFor(options, ctx, node) {
19142
19208
  const { source } = node.parseResult;
19143
19209
  const { leftExpressionRange, leftExpressionText } = parseVForNode(node);
19144
- const endScope = ctx.startScope();
19210
+ const scope = ctx.scope();
19145
19211
  yield `for (const [`;
19146
19212
  if (leftExpressionRange && leftExpressionText) {
19147
19213
  const collectAst = (0, utils_1.getTypeScriptAST)(options.typescript, options.template, `const [${leftExpressionText}]`);
19148
- ctx.declare(...(0, collectBindings_1.collectBindingNames)(options.typescript, collectAst, collectAst));
19214
+ scope.declare(...(0, collectBindings_1.collectBindingNames)(options.typescript, collectAst, collectAst));
19149
19215
  yield [
19150
19216
  leftExpressionText,
19151
19217
  "template",
@@ -19164,7 +19230,7 @@ var require_vFor$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19164
19230
  ctx.inVFor = true;
19165
19231
  for (const child of node.children) yield* (0, templateChild_1.generateTemplateChild)(options, ctx, child, false, true);
19166
19232
  ctx.inVFor = inVFor;
19167
- yield* endScope();
19233
+ yield* scope.end();
19168
19234
  yield `}${utils_1.newLine}`;
19169
19235
  }
19170
19236
  function parseVForNode(node) {
@@ -19232,7 +19298,7 @@ var require_vIf$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19232
19298
  var interpolation_1 = require_interpolation();
19233
19299
  var templateChild_1 = require_templateChild();
19234
19300
  function* generateVIf(options, ctx, node) {
19235
- const originalBlockConditionsLength = ctx.blockConditions.length;
19301
+ const originalBlockConditionsLength = ctx.conditions.length;
19236
19302
  for (let i = 0; i < node.branches.length; i++) {
19237
19303
  const branch = node.branches[i];
19238
19304
  if (i === 0) yield `if `;
@@ -19242,16 +19308,16 @@ var require_vIf$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19242
19308
  if (branch.condition?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
19243
19309
  const codes = [...(0, interpolation_1.generateInterpolation)(options, ctx, options.template, codeFeatures_1.codeFeatures.all, branch.condition.content, branch.condition.loc.start.offset, `(`, `)`)];
19244
19310
  yield* codes;
19245
- ctx.blockConditions.push((0, muggle_string_1.toString)(codes));
19311
+ ctx.conditions.push((0, muggle_string_1.toString)(codes));
19246
19312
  addedBlockCondition = true;
19247
19313
  yield ` `;
19248
19314
  }
19249
19315
  yield `{${utils_1.newLine}`;
19250
19316
  for (const child of branch.children) yield* (0, templateChild_1.generateTemplateChild)(options, ctx, child, i !== 0, true);
19251
19317
  yield `}${utils_1.newLine}`;
19252
- if (addedBlockCondition) ctx.blockConditions[ctx.blockConditions.length - 1] = `!${ctx.blockConditions[ctx.blockConditions.length - 1]}`;
19318
+ if (addedBlockCondition) ctx.conditions[ctx.conditions.length - 1] = `!${ctx.conditions[ctx.conditions.length - 1]}`;
19253
19319
  }
19254
- ctx.blockConditions.length = originalBlockConditionsLength;
19320
+ ctx.conditions.length = originalBlockConditionsLength;
19255
19321
  }
19256
19322
  }));
19257
19323
  //#endregion
@@ -19302,7 +19368,7 @@ var require_templateChild = /* @__PURE__ */ __commonJSMin(((exports) => {
19302
19368
  exports.generateTemplateChild = generateTemplateChild;
19303
19369
  exports.parseInterpolationNode = parseInterpolationNode;
19304
19370
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
19305
- var shared_1 = require_shared$2();
19371
+ var shared_1 = require_shared$1();
19306
19372
  var codeFeatures_1 = require_codeFeatures();
19307
19373
  var utils_1 = require_utils$5();
19308
19374
  var element_1 = require_element();
@@ -19388,11 +19454,11 @@ var require_template$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19388
19454
  };
19389
19455
  }
19390
19456
  function* generateWorker(options, ctx) {
19391
- const endScope = ctx.startScope();
19392
- ctx.declare(...options.setupConsts);
19457
+ const scope = ctx.scope();
19458
+ scope.declare(...options.setupConsts);
19393
19459
  const { slotsAssignName, propsAssignName, vueCompilerOptions, template } = options;
19394
- if (slotsAssignName) ctx.declare(slotsAssignName);
19395
- if (propsAssignName) ctx.declare(propsAssignName);
19460
+ if (slotsAssignName) scope.declare(slotsAssignName);
19461
+ if (propsAssignName) scope.declare(propsAssignName);
19396
19462
  if (vueCompilerOptions.inferTemplateDollarSlots) ctx.dollarVars.add("$slots");
19397
19463
  if (vueCompilerOptions.inferTemplateDollarAttrs) ctx.dollarVars.add("$attrs");
19398
19464
  if (vueCompilerOptions.inferTemplateDollarRefs) ctx.dollarVars.add("$refs");
@@ -19415,7 +19481,7 @@ var require_template$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19415
19481
  if (ctx.dollarVars.has("$el")) yield `$el: ${ctx.generatedTypes.has(names_1.names.RootEl) ? names_1.names.RootEl : `any`}${utils_1.endOfLine}`;
19416
19482
  yield `} & { [K in keyof import('${vueCompilerOptions.lib}').ComponentPublicInstance]: unknown }${utils_1.endOfLine}`;
19417
19483
  }
19418
- yield* endScope();
19484
+ yield* scope.end();
19419
19485
  }
19420
19486
  function* generateSlotsType(options, ctx) {
19421
19487
  if (options.hasDefineSlots) {
@@ -19430,9 +19496,9 @@ var require_template$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19430
19496
  yield `${utils_1.newLine}& { `;
19431
19497
  if (slot.name && slot.offset !== void 0) yield* (0, objectProperty_1.generateObjectProperty)(options, ctx, slot.name, slot.offset, codeFeatures_1.codeFeatures.navigation);
19432
19498
  else {
19433
- const token = yield* (0, boundary_1.startBoundary)("template", slot.tagRange[0], codeFeatures_1.codeFeatures.navigation);
19499
+ const boundary = yield* boundary_1.Boundary.start("template", slot.tagRange[0], codeFeatures_1.codeFeatures.navigation);
19434
19500
  yield `default`;
19435
- yield (0, boundary_1.endBoundary)(token, slot.tagRange[1]);
19501
+ yield boundary.end(slot.tagRange[1]);
19436
19502
  }
19437
19503
  yield `?: (props: typeof ${slot.propsVar}) => any }`;
19438
19504
  }
@@ -19481,7 +19547,7 @@ var require_compilerOptions = /* @__PURE__ */ __commonJSMin(((exports) => {
19481
19547
  exports.getDefaultCompilerOptions = getDefaultCompilerOptions;
19482
19548
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
19483
19549
  var path_browserify_1 = require_path_browserify();
19484
- var shared_2 = require_shared$2();
19550
+ var shared_2 = require_shared$1();
19485
19551
  function createParsedCommandLineByJson(ts, host, rootDir, json, configFileName) {
19486
19552
  const extendedPaths = /* @__PURE__ */ new Set();
19487
19553
  const proxyHost = {
@@ -19683,8 +19749,8 @@ var require_compilerOptions = /* @__PURE__ */ __commonJSMin(((exports) => {
19683
19749
  //#region node_modules/@vue/language-core/lib/plugins/file-html.js
19684
19750
  var require_file_html = /* @__PURE__ */ __commonJSMin(((exports) => {
19685
19751
  Object.defineProperty(exports, "__esModule", { value: true });
19686
- var sfcBlockReg = /<(script|style)\b([\s\S]*?)>([\s\S]*?)<\/\1>/g;
19687
- var langReg = /\blang\s*=\s*(['"]?)(\S*)\b\1/;
19752
+ var sfcBlockRE = /<(script|style)\b([\s\S]*?)>([\s\S]*?)<\/\1>/g;
19753
+ var langRE = /\blang\s*=\s*(['"]?)(\S*)\b\1/;
19688
19754
  var plugin = ({ vueCompilerOptions }) => {
19689
19755
  return {
19690
19756
  version: 2.2,
@@ -19713,11 +19779,11 @@ var require_file_html = /* @__PURE__ */ __commonJSMin(((exports) => {
19713
19779
  errors: []
19714
19780
  };
19715
19781
  let templateContent = content;
19716
- for (const match of content.matchAll(sfcBlockReg)) {
19782
+ for (const match of content.matchAll(sfcBlockRE)) {
19717
19783
  const matchText = match[0];
19718
19784
  const tag = match[1];
19719
19785
  const attrs = match[2];
19720
- const lang = attrs.match(langReg)?.[2];
19786
+ const lang = attrs.match(langRE)?.[2];
19721
19787
  const content = match[3];
19722
19788
  const contentStart = match.index + matchText.indexOf(content);
19723
19789
  if (tag === "style") sfc.descriptor.styles.push({
@@ -19856,7 +19922,7 @@ var require_parseSfc = /* @__PURE__ */ __commonJSMin(((exports) => {
19856
19922
  Object.defineProperty(exports, "__esModule", { value: true });
19857
19923
  exports.parse = parse;
19858
19924
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
19859
- var shared_1 = require_shared$2();
19925
+ var shared_1 = require_shared$1();
19860
19926
  function parse(source) {
19861
19927
  const errors = [];
19862
19928
  const ast = CompilerDOM.parse(source, {
@@ -19987,14 +20053,14 @@ var require_file_md = /* @__PURE__ */ __commonJSMin(((exports) => {
19987
20053
  var muggle_string_1 = require_out$1();
19988
20054
  var buildMappings_1 = require_buildMappings();
19989
20055
  var parseSfc_1 = require_parseSfc();
19990
- var frontmatterReg = /^---[\s\S]*?\n---(?:\r?\n|$)/;
19991
- var codeblockReg = /(`{3}|\${2})[\s\S]+?\1/g;
19992
- var codeSnippetImportReg = /^\s*<<<\s*.+/gm;
19993
- var sfcBlockReg = /<(script|style)\b[^>]*>([\s\S]*?)<\/\1>/g;
19994
- var htmlTagReg = /(?<=<\/?)([a-z][a-z0-9-]*)\b[^>]*(?=>)/gi;
19995
- var interpolationReg = /(?<=\{\{)[\s\S]*?(?=\}\})/g;
19996
- var inlineCodeReg = /(`{1,2})[^`]+\1/g;
19997
- var angleBracketReg = /<[^\s:]*:\S*>/g;
20056
+ var frontmatterRE = /^---[\s\S]*?\n---(?:\r?\n|$)/;
20057
+ var codeblockRE = /(`{3}|\${2})[\s\S]+?\1/g;
20058
+ var codeSnippetImportRE = /^\s*<<<\s*.+/gm;
20059
+ var sfcBlockRE = /<(script|style)\b[^>]*>([\s\S]*?)<\/\1>/g;
20060
+ var htmlTagRE = /(?<=<\/?)([a-z][a-z0-9-]*)\b[^>]*(?=>)/gi;
20061
+ var interpolationRE = /(?<=\{\{)[\s\S]*?(?=\}\})/g;
20062
+ var inlineCodeRE = /(`{1,2})[^`]+\1/g;
20063
+ var angleBracketRE = /<[^\s:]*:\S*>/g;
19998
20064
  var plugin = ({ vueCompilerOptions }) => {
19999
20065
  return {
20000
20066
  version: 2.2,
@@ -20006,13 +20072,13 @@ var require_file_md = /* @__PURE__ */ __commonJSMin(((exports) => {
20006
20072
  },
20007
20073
  parseSFC2(_fileName, languageId, content) {
20008
20074
  if (languageId !== "markdown") return;
20009
- for (const reg of [
20010
- frontmatterReg,
20011
- codeblockReg,
20012
- codeSnippetImportReg
20013
- ]) content = content.replace(reg, (match) => " ".repeat(match.length));
20075
+ for (const pattern of [
20076
+ frontmatterRE,
20077
+ codeblockRE,
20078
+ codeSnippetImportRE
20079
+ ]) content = content.replace(pattern, (match) => " ".repeat(match.length));
20014
20080
  const codes = [];
20015
- for (const { 0: text, index } of content.matchAll(sfcBlockReg)) {
20081
+ for (const { 0: text, index } of content.matchAll(sfcBlockRE)) {
20016
20082
  codes.push([
20017
20083
  text,
20018
20084
  void 0,
@@ -20022,8 +20088,8 @@ var require_file_md = /* @__PURE__ */ __commonJSMin(((exports) => {
20022
20088
  content = content.slice(0, index) + " ".repeat(text.length) + content.slice(index + text.length);
20023
20089
  }
20024
20090
  const ranges = [];
20025
- for (const reg of [htmlTagReg, interpolationReg]) for (const { 0: text, index } of content.matchAll(reg)) ranges.push([index, index + text.length]);
20026
- for (const reg of [inlineCodeReg, angleBracketReg]) for (const { 0: text, index } of content.matchAll(reg)) {
20091
+ for (const pattern of [htmlTagRE, interpolationRE]) for (const { 0: text, index } of content.matchAll(pattern)) ranges.push([index, index + text.length]);
20092
+ for (const pattern of [inlineCodeRE, angleBracketRE]) for (const { 0: text, index } of content.matchAll(pattern)) {
20027
20093
  if (ranges.some(([start, end]) => index >= start && index < end)) continue;
20028
20094
  content = content.slice(0, index) + " ".repeat(text.length) + content.slice(index + text.length);
20029
20095
  }
@@ -20106,8 +20172,8 @@ var require_file_vue = /* @__PURE__ */ __commonJSMin(((exports) => {
20106
20172
  if (!hitBlock) return;
20107
20173
  const oldContent = hitBlock.content;
20108
20174
  const newContent = hitBlock.content = hitBlock.content.slice(0, change.start - hitBlock.loc.start.offset) + change.newText + hitBlock.content.slice(change.end - hitBlock.loc.start.offset);
20109
- const endTagRegex = new RegExp(`</\\s*${hitBlock.type}\\s*>`);
20110
- if (endTagRegex.test(oldContent) !== endTagRegex.test(newContent)) return;
20175
+ const endTagRE = new RegExp(`</\\s*${hitBlock.type}\\s*>`);
20176
+ if (endTagRE.test(oldContent) !== endTagRE.test(newContent)) return;
20111
20177
  const lengthDiff = change.newText.length - (change.end - change.start);
20112
20178
  for (const block of blocks) {
20113
20179
  if (block.loc.start.offset > change.end) block.loc.start.offset += lengthDiff;
@@ -20120,25 +20186,11 @@ var require_file_vue = /* @__PURE__ */ __commonJSMin(((exports) => {
20120
20186
  exports.default = plugin;
20121
20187
  }));
20122
20188
  //#endregion
20123
- //#region node_modules/@vue/language-core/lib/plugins/shared.js
20124
- var require_shared$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
20125
- Object.defineProperty(exports, "__esModule", { value: true });
20126
- exports.allCodeFeatures = void 0;
20127
- exports.allCodeFeatures = {
20128
- verification: true,
20129
- completion: true,
20130
- semantic: true,
20131
- navigation: true,
20132
- structure: true,
20133
- format: true
20134
- };
20135
- }));
20136
- //#endregion
20137
20189
  //#region node_modules/@vue/language-core/lib/plugins/vue-root-tags.js
20138
20190
  var require_vue_root_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
20139
20191
  Object.defineProperty(exports, "__esModule", { value: true });
20140
20192
  var muggle_string_1 = require_out$1();
20141
- var shared_1 = require_shared$1();
20193
+ var codeFeatures_1 = require_codeFeatures();
20142
20194
  var plugin = () => {
20143
20195
  return {
20144
20196
  version: 2.2,
@@ -20154,7 +20206,7 @@ var require_vue_root_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
20154
20206
  ir.content,
20155
20207
  void 0,
20156
20208
  0,
20157
- shared_1.allCodeFeatures
20209
+ codeFeatures_1.codeFeatures.full
20158
20210
  ]);
20159
20211
  for (const block of [
20160
20212
  ir.template,
@@ -20169,7 +20221,7 @@ var require_vue_root_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
20169
20221
  "",
20170
20222
  void 0,
20171
20223
  block.startTagEnd + offset,
20172
- { structure: true }
20224
+ codeFeatures_1.codeFeatures.structure
20173
20225
  ], ir.content.slice(block.startTagEnd + offset, block.endTagStart));
20174
20226
  }
20175
20227
  } else embeddedFile.parentCodeId ??= "root_tags";
@@ -20196,7 +20248,7 @@ var require_vue_script_js = /* @__PURE__ */ __commonJSMin(((exports) => {
20196
20248
  //#region node_modules/@vue/language-core/lib/plugins/vue-sfc-customblocks.js
20197
20249
  var require_vue_sfc_customblocks = /* @__PURE__ */ __commonJSMin(((exports) => {
20198
20250
  Object.defineProperty(exports, "__esModule", { value: true });
20199
- var shared_1 = require_shared$1();
20251
+ var codeFeatures_1 = require_codeFeatures();
20200
20252
  var plugin = () => {
20201
20253
  return {
20202
20254
  version: 2.2,
@@ -20214,7 +20266,7 @@ var require_vue_sfc_customblocks = /* @__PURE__ */ __commonJSMin(((exports) => {
20214
20266
  customBlock.content,
20215
20267
  customBlock.name,
20216
20268
  0,
20217
- shared_1.allCodeFeatures
20269
+ codeFeatures_1.codeFeatures.full
20218
20270
  ]);
20219
20271
  }
20220
20272
  }
@@ -20226,6 +20278,7 @@ var require_vue_sfc_customblocks = /* @__PURE__ */ __commonJSMin(((exports) => {
20226
20278
  //#region node_modules/@vue/language-core/lib/plugins/vue-sfc-scripts.js
20227
20279
  var require_vue_sfc_scripts = /* @__PURE__ */ __commonJSMin(((exports) => {
20228
20280
  Object.defineProperty(exports, "__esModule", { value: true });
20281
+ var codeFeatures_1 = require_codeFeatures();
20229
20282
  var plugin = () => {
20230
20283
  return {
20231
20284
  version: 2.2,
@@ -20247,10 +20300,7 @@ var require_vue_sfc_scripts = /* @__PURE__ */ __commonJSMin(((exports) => {
20247
20300
  script.content,
20248
20301
  script.name,
20249
20302
  0,
20250
- {
20251
- structure: true,
20252
- format: true
20253
- }
20303
+ codeFeatures_1.codeFeatures.structureAndFormat
20254
20304
  ]);
20255
20305
  }
20256
20306
  };
@@ -20261,7 +20311,7 @@ var require_vue_sfc_scripts = /* @__PURE__ */ __commonJSMin(((exports) => {
20261
20311
  //#region node_modules/@vue/language-core/lib/plugins/vue-sfc-styles.js
20262
20312
  var require_vue_sfc_styles = /* @__PURE__ */ __commonJSMin(((exports) => {
20263
20313
  Object.defineProperty(exports, "__esModule", { value: true });
20264
- var shared_1 = require_shared$1();
20314
+ var codeFeatures_1 = require_codeFeatures();
20265
20315
  var plugin = () => {
20266
20316
  return {
20267
20317
  version: 2.2,
@@ -20292,13 +20342,13 @@ var require_vue_sfc_styles = /* @__PURE__ */ __commonJSMin(((exports) => {
20292
20342
  binding.text,
20293
20343
  style.name,
20294
20344
  binding.offset,
20295
- shared_1.allCodeFeatures
20345
+ codeFeatures_1.codeFeatures.full
20296
20346
  ], ");\n");
20297
20347
  } else embeddedFile.content.push([
20298
20348
  style.content,
20299
20349
  style.name,
20300
20350
  0,
20301
- shared_1.allCodeFeatures
20351
+ codeFeatures_1.codeFeatures.full
20302
20352
  ]);
20303
20353
  }
20304
20354
  }
@@ -20310,7 +20360,7 @@ var require_vue_sfc_styles = /* @__PURE__ */ __commonJSMin(((exports) => {
20310
20360
  //#region node_modules/@vue/language-core/lib/plugins/vue-sfc-template.js
20311
20361
  var require_vue_sfc_template = /* @__PURE__ */ __commonJSMin(((exports) => {
20312
20362
  Object.defineProperty(exports, "__esModule", { value: true });
20313
- var shared_1 = require_shared$1();
20363
+ var codeFeatures_1 = require_codeFeatures();
20314
20364
  var plugin = () => {
20315
20365
  return {
20316
20366
  version: 2.2,
@@ -20326,7 +20376,7 @@ var require_vue_sfc_template = /* @__PURE__ */ __commonJSMin(((exports) => {
20326
20376
  ir.template.content,
20327
20377
  ir.template.name,
20328
20378
  0,
20329
- shared_1.allCodeFeatures
20379
+ codeFeatures_1.codeFeatures.full
20330
20380
  ]);
20331
20381
  }
20332
20382
  };
@@ -20350,52 +20400,78 @@ var require_vue_style_css = /* @__PURE__ */ __commonJSMin(((exports) => {
20350
20400
  };
20351
20401
  };
20352
20402
  exports.default = plugin;
20353
- var cssImportReg = /(?<=@import\s+url\()(["']?).*?\1(?=\))|(?<=@import\b\s*)(["']).*?\2/g;
20354
- var cssBindingReg = /\bv-bind\(\s*(?:'([^']+)'|"([^"]+)"|([a-z_]\w*))\s*\)/gi;
20355
- var cssClassNameReg = /(?=(\.[a-z_][-\w]*)[\s.,+~>:#)[{])/gi;
20356
- var commentReg = /(?<=\/\*)[\s\S]*?(?=\*\/)|(?<=\/\/)[\s\S]*?(?=\n)/g;
20357
- var fragmentReg = /(?<={)[^{]*(?=(?<!\\);)/g;
20403
+ var cssImportRE = /(?<=@import\s+url\()(["']?).*?\1(?=\))|(?<=@import\b\s*)(["']).*?\2/g;
20404
+ var cssBindingRE = /\bv-bind\s*\(/g;
20405
+ var cssClassNameRE = /\.[a-z_][-\w]*(?=[\s.,+~>:#)[{])/gi;
20406
+ var commentRE = /(?<=\/\*)[\s\S]*?(?=\*\/)|(?<=\/\/)[\s\S]*?(?=\n)/g;
20407
+ var fragmentRE = /(?<={)[^{]*(?=(?<!\\);)/g;
20358
20408
  function* parseCssImports(css) {
20359
- const matches = css.matchAll(cssImportReg);
20360
- for (const match of matches) {
20361
- let text = match[0];
20362
- let offset = match.index;
20363
- if (text.startsWith("'") || text.startsWith("\"")) {
20364
- text = text.slice(1, -1);
20365
- offset += 1;
20366
- }
20367
- if (text) yield {
20368
- text,
20369
- offset
20370
- };
20371
- }
20409
+ for (const match of css.matchAll(cssImportRE)) yield trimQuotes(match[0], match.index);
20372
20410
  }
20373
20411
  function* parseCssBindings(css) {
20374
- css = fillBlank(css, commentReg);
20375
- const matchs = css.matchAll(cssBindingReg);
20376
- for (const match of matchs) {
20377
- const matchText = match.slice(1).find((t) => t);
20378
- if (matchText) yield {
20379
- offset: match.index + css.slice(match.index).indexOf(matchText),
20380
- text: matchText
20381
- };
20412
+ css = fillBlank(css, commentRE);
20413
+ for (const match of css.matchAll(cssBindingRE)) {
20414
+ const start = match.index + match[0].length;
20415
+ const end = lexBinding(css, start);
20416
+ if (end !== null) yield trimQuotes(css.slice(start, end), start, false);
20417
+ }
20418
+ }
20419
+ var LexerState;
20420
+ (function(LexerState) {
20421
+ LexerState[LexerState["inParens"] = 0] = "inParens";
20422
+ LexerState[LexerState["inSingleQuoteString"] = 1] = "inSingleQuoteString";
20423
+ LexerState[LexerState["inDoubleQuoteString"] = 2] = "inDoubleQuoteString";
20424
+ })(LexerState || (LexerState = {}));
20425
+ function lexBinding(content, start) {
20426
+ let state = LexerState.inParens;
20427
+ let parenDepth = 0;
20428
+ for (let i = start; i < content.length; i++) {
20429
+ const char = content.charAt(i);
20430
+ switch (state) {
20431
+ case LexerState.inParens:
20432
+ if (char === `'`) state = LexerState.inSingleQuoteString;
20433
+ else if (char === `"`) state = LexerState.inDoubleQuoteString;
20434
+ else if (char === `(`) parenDepth++;
20435
+ else if (char === `)`) if (parenDepth > 0) parenDepth--;
20436
+ else return i;
20437
+ break;
20438
+ case LexerState.inSingleQuoteString:
20439
+ if (char === `'`) state = LexerState.inParens;
20440
+ break;
20441
+ case LexerState.inDoubleQuoteString:
20442
+ if (char === `"`) state = LexerState.inParens;
20443
+ break;
20444
+ }
20382
20445
  }
20446
+ return null;
20383
20447
  }
20384
20448
  function* parseCssClassNames(css) {
20385
- css = fillBlank(css, commentReg, fragmentReg);
20386
- const matches = css.matchAll(cssClassNameReg);
20387
- for (const match of matches) {
20388
- const matchText = match[1];
20389
- if (matchText) yield {
20390
- offset: match.index,
20391
- text: matchText
20392
- };
20393
- }
20449
+ css = fillBlank(css, commentRE, fragmentRE);
20450
+ for (const match of css.matchAll(cssClassNameRE)) yield {
20451
+ text: match[0],
20452
+ offset: match.index
20453
+ };
20394
20454
  }
20395
- function fillBlank(css, ...regs) {
20396
- for (const reg of regs) css = css.replace(reg, (match) => " ".repeat(match.length));
20455
+ function fillBlank(css, ...patterns) {
20456
+ for (const pattern of patterns) css = css.replace(pattern, (match) => " ".repeat(match.length));
20397
20457
  return css;
20398
20458
  }
20459
+ function trimQuotes(text, offset, trim = true) {
20460
+ let start = 0;
20461
+ let end = text.length;
20462
+ if (trim || text.includes("\"") || text.includes("'")) {
20463
+ while (start < text.length && !text[start]?.trim()) start++;
20464
+ while (end >= 0 && !text[end - 1]?.trim()) end--;
20465
+ }
20466
+ if (text[start] === "\"" && text[end - 1] === "\"" || text[start] === "'" && text[end - 1] === "'") {
20467
+ start++;
20468
+ end--;
20469
+ }
20470
+ return {
20471
+ text: text.slice(start, end),
20472
+ offset: offset + start
20473
+ };
20474
+ }
20399
20475
  }));
20400
20476
  //#endregion
20401
20477
  //#region node_modules/@vue/language-core/lib/template/transforms/transformElement.js
@@ -20494,7 +20570,7 @@ var require_transformText = /* @__PURE__ */ __commonJSMin(((exports) => {
20494
20570
  }));
20495
20571
  //#endregion
20496
20572
  //#region node_modules/@vue/language-core/lib/template/utils.js
20497
- var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
20573
+ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
20498
20574
  Object.defineProperty(exports, "__esModule", { value: true });
20499
20575
  exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform;
20500
20576
  exports.cloneLoc = cloneLoc;
@@ -20533,7 +20609,7 @@ var require_vFor = /* @__PURE__ */ __commonJSMin(((exports) => {
20533
20609
  Object.defineProperty(exports, "__esModule", { value: true });
20534
20610
  exports.transformFor = void 0;
20535
20611
  var compiler_dom_1 = (init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports));
20536
- exports.transformFor = (0, require_utils$3().createStructuralDirectiveTransform)("for", (node, dir, context) => {
20612
+ exports.transformFor = (0, require_utils$2().createStructuralDirectiveTransform)("for", (node, dir, context) => {
20537
20613
  if (!dir.exp) {
20538
20614
  context.onError((0, compiler_dom_1.createCompilerError)(compiler_dom_1.ErrorCodes.X_V_FOR_NO_EXPRESSION, dir.loc));
20539
20615
  return;
@@ -20574,7 +20650,7 @@ var require_vIf = /* @__PURE__ */ __commonJSMin(((exports) => {
20574
20650
  Object.defineProperty(exports, "__esModule", { value: true });
20575
20651
  exports.transformIf = void 0;
20576
20652
  var compiler_dom_1 = (init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports));
20577
- var utils_1 = require_utils$3();
20653
+ var utils_1 = require_utils$2();
20578
20654
  exports.transformIf = (0, utils_1.createStructuralDirectiveTransform)(/^(?:if|else-if|else)$/, (node, dir, context) => {
20579
20655
  if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) context.onError((0, compiler_dom_1.createCompilerError)(compiler_dom_1.ErrorCodes.X_V_IF_NO_EXPRESSION, dir.loc));
20580
20656
  if (dir.name === "if") {
@@ -20717,14 +20793,14 @@ var require_vue_template_html = /* @__PURE__ */ __commonJSMin(((exports) => {
20717
20793
  Object.defineProperty(exports, "__esModule", { value: true });
20718
20794
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
20719
20795
  var compile_1 = require_compile();
20720
- var shouldAddSuffix = /(?<=<[^>/]+)$/;
20796
+ var shouldAddSuffixRE = /(?<=<[^>/]+)$/;
20721
20797
  var plugin = () => {
20722
20798
  return {
20723
20799
  version: 2.2,
20724
20800
  compileSFCTemplate(lang, template, options) {
20725
20801
  if (lang === "html" || lang === "md") {
20726
20802
  let addedSuffix = false;
20727
- if (shouldAddSuffix.test(template)) {
20803
+ if (shouldAddSuffixRE.test(template)) {
20728
20804
  template += ">";
20729
20805
  addedSuffix = true;
20730
20806
  }
@@ -20740,7 +20816,7 @@ var require_vue_template_html = /* @__PURE__ */ __commonJSMin(((exports) => {
20740
20816
  const newSource = oldResult.ast.source.slice(0, change.start) + change.newText + oldResult.ast.source.slice(change.end);
20741
20817
  if (oldResult.__addedSuffix) {
20742
20818
  const originalTemplate = newSource.slice(0, -1);
20743
- if (!shouldAddSuffix.test(originalTemplate)) return;
20819
+ if (!shouldAddSuffixRE.test(originalTemplate)) return;
20744
20820
  }
20745
20821
  const lengthDiff = change.newText.length - (change.end - change.start);
20746
20822
  let hitNodes = [];
@@ -20882,21 +20958,36 @@ var require_forEachTemplateNode = /* @__PURE__ */ __commonJSMin(((exports) => {
20882
20958
  exports.forEachInterpolationNode = forEachInterpolationNode;
20883
20959
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
20884
20960
  function* forEachElementNode(node) {
20885
- if (node.type === CompilerDOM.NodeTypes.ROOT) for (const child of node.children) yield* forEachElementNode(child);
20886
- else if (node.type === CompilerDOM.NodeTypes.ELEMENT) {
20887
- yield node;
20888
- for (const child of node.children) yield* forEachElementNode(child);
20889
- } else if (node.type === CompilerDOM.NodeTypes.IF) for (const branch of node.branches) for (const childNode of branch.children) yield* forEachElementNode(childNode);
20890
- else if (node.type === CompilerDOM.NodeTypes.FOR) for (const child of node.children) yield* forEachElementNode(child);
20961
+ switch (node.type) {
20962
+ case CompilerDOM.NodeTypes.ELEMENT: yield node;
20963
+ case CompilerDOM.NodeTypes.IF_BRANCH:
20964
+ case CompilerDOM.NodeTypes.FOR:
20965
+ case CompilerDOM.NodeTypes.ROOT:
20966
+ for (const child of node.children) yield* forEachElementNode(child);
20967
+ break;
20968
+ case CompilerDOM.NodeTypes.IF:
20969
+ for (const branch of node.branches) yield* forEachElementNode(branch);
20970
+ break;
20971
+ }
20891
20972
  }
20892
20973
  function* forEachInterpolationNode(node) {
20893
- if (node.type === CompilerDOM.NodeTypes.ROOT) for (const child of node.children) yield* forEachInterpolationNode(child);
20894
- else if (node.type === CompilerDOM.NodeTypes.ELEMENT) for (const child of node.children) yield* forEachInterpolationNode(child);
20895
- else if (node.type === CompilerDOM.NodeTypes.COMPOUND_EXPRESSION) {
20896
- for (const child of node.children) if (typeof child === "object") yield* forEachInterpolationNode(child);
20897
- } else if (node.type === CompilerDOM.NodeTypes.INTERPOLATION) yield node;
20898
- else if (node.type === CompilerDOM.NodeTypes.IF) for (const branch of node.branches) for (const childNode of branch.children) yield* forEachInterpolationNode(childNode);
20899
- else if (node.type === CompilerDOM.NodeTypes.FOR) for (const child of node.children) yield* forEachInterpolationNode(child);
20974
+ switch (node.type) {
20975
+ case CompilerDOM.NodeTypes.ELEMENT:
20976
+ case CompilerDOM.NodeTypes.IF_BRANCH:
20977
+ case CompilerDOM.NodeTypes.FOR:
20978
+ case CompilerDOM.NodeTypes.ROOT:
20979
+ for (const child of node.children) yield* forEachInterpolationNode(child);
20980
+ break;
20981
+ case CompilerDOM.NodeTypes.IF:
20982
+ for (const branch of node.branches) yield* forEachInterpolationNode(branch);
20983
+ break;
20984
+ case CompilerDOM.NodeTypes.COMPOUND_EXPRESSION:
20985
+ for (const child of node.children) if (typeof child === "object") yield* forEachInterpolationNode(child);
20986
+ break;
20987
+ case CompilerDOM.NodeTypes.INTERPOLATION:
20988
+ yield node;
20989
+ break;
20990
+ }
20900
20991
  }
20901
20992
  }));
20902
20993
  //#endregion
@@ -20945,13 +21036,9 @@ var require_vue_template_inline_css = /* @__PURE__ */ __commonJSMin(((exports) =
20945
21036
  })();
20946
21037
  Object.defineProperty(exports, "__esModule", { value: true });
20947
21038
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
21039
+ var codeFeatures_1 = require_codeFeatures();
20948
21040
  var forEachTemplateNode_1 = require_forEachTemplateNode();
20949
- var shared_1 = require_shared$2();
20950
- var codeFeatures = {
20951
- ...require_shared$1().allCodeFeatures,
20952
- format: false,
20953
- structure: false
20954
- };
21041
+ var shared_1 = require_shared$1();
20955
21042
  var plugin = () => {
20956
21043
  return {
20957
21044
  version: 2.2,
@@ -20978,7 +21065,7 @@ var require_vue_template_inline_css = /* @__PURE__ */ __commonJSMin(((exports) =
20978
21065
  content,
20979
21066
  "template",
20980
21067
  offset,
20981
- codeFeatures
21068
+ codeFeatures_1.codeFeatures.all
20982
21069
  ];
20983
21070
  yield ` }\n`;
20984
21071
  }
@@ -21030,11 +21117,11 @@ var require_vue_template_inline_ts = /* @__PURE__ */ __commonJSMin(((exports) =>
21030
21117
  })();
21031
21118
  Object.defineProperty(exports, "__esModule", { value: true });
21032
21119
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
21120
+ var codeFeatures_1 = require_codeFeatures();
21033
21121
  var elementEvents_1 = require_elementEvents();
21034
21122
  var templateChild_1 = require_templateChild();
21035
21123
  var vFor_1 = require_vFor$1();
21036
21124
  var utils_1 = require_utils$5();
21037
- var codeFeatures = { format: true };
21038
21125
  var formatBrackets = {
21039
21126
  normal: ["`${", "}`;"],
21040
21127
  if: ["if (", ") { }"],
@@ -21044,6 +21131,7 @@ var require_vue_template_inline_ts = /* @__PURE__ */ __commonJSMin(((exports) =>
21044
21131
  event: ["() => ", ";"],
21045
21132
  generic: ["<", ">() => {};"]
21046
21133
  };
21134
+ var genericCommentRE = /^<!--\s*@vue-generic\s*\{(?<content>[\s\S]*)\}\s*-->$/;
21047
21135
  var plugin = ({ modules: { typescript: ts } }) => {
21048
21136
  const parseds = /* @__PURE__ */ new WeakMap();
21049
21137
  return {
@@ -21081,7 +21169,7 @@ var require_vue_template_inline_ts = /* @__PURE__ */ __commonJSMin(((exports) =>
21081
21169
  return result;
21082
21170
  function visit(node) {
21083
21171
  if (node.type === CompilerDOM.NodeTypes.COMMENT) {
21084
- const match = node.loc.source.match(/^<!--\s*@vue-generic\s*\{(?<content>[\s\S]*)\}\s*-->$/);
21172
+ const match = node.loc.source.match(genericCommentRE);
21085
21173
  if (match) {
21086
21174
  const { content } = match.groups;
21087
21175
  addFormatCodes(content, node.loc.start.offset + node.loc.source.indexOf("{") + 1, formatBrackets.generic);
@@ -21142,7 +21230,7 @@ var require_vue_template_inline_ts = /* @__PURE__ */ __commonJSMin(((exports) =>
21142
21230
  code,
21143
21231
  "template",
21144
21232
  offset,
21145
- codeFeatures
21233
+ codeFeatures_1.codeFeatures.format
21146
21234
  ],
21147
21235
  wrapper[1]
21148
21236
  ]);
@@ -21966,7 +22054,7 @@ var require_scriptSetup$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
21966
22054
  yield ` emit: ${emitTypes.length ? emitTypes.join(` & `) : `{}`}${utils_1.endOfLine}`;
21967
22055
  yield `}${utils_1.endOfLine}`;
21968
22056
  yield `})(),${utils_1.newLine}`;
21969
- yield `) => ({} as import('${vueCompilerOptions.lib}').VNode & { __ctx?: Awaited<typeof ${names_1.names.setup}> }))${utils_1.endOfLine}`;
22057
+ yield `) => ({} as import('${vueCompilerOptions.lib}').VNode & { __ctx?: NonNullable<Awaited<typeof ${names_1.names.setup}>> }))${utils_1.endOfLine}`;
21970
22058
  }
21971
22059
  function* generateSetupFunction(options, ctx, scriptSetup, scriptSetupRanges, body, output) {
21972
22060
  const transforms = [];
@@ -22022,9 +22110,9 @@ var require_scriptSetup$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
22022
22110
  }));
22023
22111
  else transforms.push((0, transform_1.insert)(callExp.end, function* () {
22024
22112
  yield ` as ${type}[`;
22025
- const token = yield* (0, boundary_1.startBoundary)(scriptSetup.name, exp.start, codeFeatures_1.codeFeatures.verification);
22113
+ const boundary = yield* boundary_1.Boundary.start(scriptSetup.name, exp.start, codeFeatures_1.codeFeatures.verification);
22026
22114
  yield `'$style'`;
22027
- yield (0, boundary_1.endBoundary)(token, exp.end);
22115
+ yield boundary.end(exp.end);
22028
22116
  yield `])`;
22029
22117
  }));
22030
22118
  }
@@ -22107,7 +22195,7 @@ var require_scriptSetup$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
22107
22195
  yield* (0, utils_1.generateSfcBlockSection)(scriptSetup, statement.start, callExp.start, codeFeatures_1.codeFeatures.all);
22108
22196
  yield defaultName;
22109
22197
  });
22110
- else if (!utils_1.identifierRegex.test(name)) {
22198
+ else if (!utils_1.identifierRE.test(name)) {
22111
22199
  yield (0, transform_1.replace)(statement.start, callExp.start, function* () {
22112
22200
  yield `const ${defaultName} = `;
22113
22201
  });
@@ -22353,7 +22441,7 @@ var require_script = /* @__PURE__ */ __commonJSMin(((exports) => {
22353
22441
  if (src.endsWith(".ts") && !src.endsWith(".d.ts")) src = src.slice(0, -3) + ".js";
22354
22442
  else if (src.endsWith(".tsx")) src = src.slice(0, -4) + ".jsx";
22355
22443
  yield `import ${names_1.names.src} from `;
22356
- const token = yield* (0, boundary_1.startBoundary)("main", script.src.offset, {
22444
+ const boundary = yield* boundary_1.Boundary.start("main", script.src.offset, {
22357
22445
  ...codeFeatures_1.codeFeatures.all,
22358
22446
  ...src !== script.src.text ? codeFeatures_1.codeFeatures.navigationWithoutRename : {}
22359
22447
  });
@@ -22362,11 +22450,11 @@ var require_script = /* @__PURE__ */ __commonJSMin(((exports) => {
22362
22450
  src.slice(0, script.src.text.length),
22363
22451
  "main",
22364
22452
  script.src.offset,
22365
- { __combineToken: token }
22453
+ boundary.features
22366
22454
  ];
22367
22455
  yield src.slice(script.src.text.length);
22368
22456
  yield `'`;
22369
- yield (0, boundary_1.endBoundary)(token, script.src.offset + script.src.text.length);
22457
+ yield boundary.end(script.src.offset + script.src.text.length);
22370
22458
  yield utils_1.endOfLine;
22371
22459
  yield `export default ${names_1.names.src}${utils_1.endOfLine}`;
22372
22460
  yield* (0, template_1.generateTemplate)(options, ctx, names_1.names.src);
@@ -22452,9 +22540,9 @@ var require_script = /* @__PURE__ */ __commonJSMin(((exports) => {
22452
22540
  }
22453
22541
  function* generateExportDeclareEqual(block, name) {
22454
22542
  yield `const `;
22455
- const token = yield* (0, boundary_1.startBoundary)(block.name, 0, codeFeatures_1.codeFeatures.doNotReportTs6133);
22543
+ const boundary = yield* boundary_1.Boundary.start(block.name, 0, codeFeatures_1.codeFeatures.doNotReportTs6133);
22456
22544
  yield name;
22457
- yield (0, boundary_1.endBoundary)(token, block.content.length);
22545
+ yield boundary.end(block.content.length);
22458
22546
  yield ` = `;
22459
22547
  }
22460
22548
  }));
@@ -22469,36 +22557,32 @@ var require_common$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
22469
22557
  var boundary_1 = require_boundary();
22470
22558
  function* generateClassProperty(source, classNameWithDot, offset, propertyType) {
22471
22559
  yield `${utils_1.newLine} & { `;
22472
- const token = yield* (0, boundary_1.startBoundary)(source, offset, codeFeatures_1.codeFeatures.navigation);
22560
+ const boundary = yield* boundary_1.Boundary.start(source, offset, codeFeatures_1.codeFeatures.navigation);
22473
22561
  yield `'`;
22474
22562
  yield [
22475
22563
  classNameWithDot.slice(1),
22476
22564
  source,
22477
22565
  offset + 1,
22478
- { __combineToken: token }
22566
+ boundary.features
22479
22567
  ];
22480
22568
  yield `'`;
22481
- yield (0, boundary_1.endBoundary)(token, offset + classNameWithDot.length);
22569
+ yield boundary.end(offset + classNameWithDot.length);
22482
22570
  yield `: ${propertyType}`;
22483
22571
  yield ` }`;
22484
22572
  }
22485
22573
  function* generateStyleImports(style) {
22486
- const features = {
22487
- navigation: true,
22488
- verification: true
22489
- };
22490
22574
  if (typeof style.src === "object") {
22491
22575
  yield `${utils_1.newLine} & typeof import(`;
22492
- const token = yield* (0, boundary_1.startBoundary)("main", style.src.offset, features);
22576
+ const boundary = yield* boundary_1.Boundary.start("main", style.src.offset, codeFeatures_1.codeFeatures.navigationAndVerification);
22493
22577
  yield `'`;
22494
22578
  yield [
22495
22579
  style.src.text,
22496
22580
  "main",
22497
22581
  style.src.offset,
22498
- { __combineToken: token }
22582
+ boundary.features
22499
22583
  ];
22500
22584
  yield `'`;
22501
- yield (0, boundary_1.endBoundary)(token, style.src.offset + style.src.text.length);
22585
+ yield boundary.end(style.src.offset + style.src.text.length);
22502
22586
  yield `).default`;
22503
22587
  }
22504
22588
  for (const { text, offset } of style.imports) {
@@ -22507,7 +22591,7 @@ var require_common$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
22507
22591
  text,
22508
22592
  style.name,
22509
22593
  offset,
22510
- features
22594
+ codeFeatures_1.codeFeatures.navigationAndVerification
22511
22595
  ];
22512
22596
  yield `').default`;
22513
22597
  }
@@ -22601,12 +22685,12 @@ var require_style = /* @__PURE__ */ __commonJSMin(((exports) => {
22601
22685
  };
22602
22686
  }
22603
22687
  function* generateWorker(options, ctx) {
22604
- const endScope = ctx.startScope();
22605
- ctx.declare(...options.setupConsts);
22688
+ const scope = ctx.scope();
22689
+ scope.declare(...options.setupConsts);
22606
22690
  yield* (0, scopedClasses_1.generateStyleScopedClasses)(options);
22607
22691
  yield* (0, modules_1.generateStyleModules)(options, ctx);
22608
22692
  yield* generateCssVars(options, ctx);
22609
- yield* endScope();
22693
+ yield* scope.end();
22610
22694
  }
22611
22695
  function* generateCssVars(options, ctx) {
22612
22696
  for (const style of options.styles) for (const binding of style.bindings) {
@@ -22616,76 +22700,15 @@ var require_style = /* @__PURE__ */ __commonJSMin(((exports) => {
22616
22700
  }
22617
22701
  }));
22618
22702
  //#endregion
22619
- //#region node_modules/@vue/language-core/lib/parsers/utils.js
22620
- var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
22621
- Object.defineProperty(exports, "__esModule", { value: true });
22622
- exports.parseBindingRanges = parseBindingRanges;
22623
- exports.getClosestMultiLineCommentRange = getClosestMultiLineCommentRange;
22624
- var collectBindings_1 = require_collectBindings();
22625
- var shared_1 = require_shared$2();
22626
- function parseBindingRanges(ts, ast, componentExtsensions) {
22627
- const bindings = [];
22628
- const components = [];
22629
- ts.forEachChild(ast, (node) => {
22630
- if (ts.isVariableStatement(node)) for (const decl of node.declarationList.declarations) {
22631
- const ranges = (0, collectBindings_1.collectBindingRanges)(ts, decl.name, ast);
22632
- bindings.push(...ranges);
22633
- }
22634
- else if (ts.isFunctionDeclaration(node)) {
22635
- if (node.name && ts.isIdentifier(node.name)) bindings.push(_getStartEnd(node.name));
22636
- } else if (ts.isClassDeclaration(node)) {
22637
- if (node.name) bindings.push(_getStartEnd(node.name));
22638
- } else if (ts.isEnumDeclaration(node)) bindings.push(_getStartEnd(node.name));
22639
- if (ts.isImportDeclaration(node)) {
22640
- const moduleName = _getNodeText(node.moduleSpecifier).slice(1, -1);
22641
- if (node.importClause && !node.importClause.isTypeOnly) {
22642
- const { name, namedBindings } = node.importClause;
22643
- if (name) if (componentExtsensions.some((ext) => moduleName.endsWith(ext))) components.push(_getStartEnd(name));
22644
- else bindings.push(_getStartEnd(name));
22645
- if (namedBindings) if (ts.isNamedImports(namedBindings)) for (const element of namedBindings.elements) {
22646
- if (element.isTypeOnly) continue;
22647
- if (element.propertyName && _getNodeText(element.propertyName) === "default" && componentExtsensions.some((ext) => moduleName.endsWith(ext))) components.push(_getStartEnd(element.name));
22648
- else bindings.push(_getStartEnd(element.name));
22649
- }
22650
- else bindings.push(_getStartEnd(namedBindings.name));
22651
- }
22652
- }
22653
- });
22654
- return {
22655
- bindings,
22656
- components
22657
- };
22658
- function _getStartEnd(node) {
22659
- return (0, shared_1.getStartEnd)(ts, node, ast);
22660
- }
22661
- function _getNodeText(node) {
22662
- return (0, shared_1.getNodeText)(ts, node, ast);
22663
- }
22664
- }
22665
- function getClosestMultiLineCommentRange(ts, node, parents, ast) {
22666
- for (let i = parents.length - 1; i >= 0; i--) {
22667
- if (ts.isStatement(node)) break;
22668
- node = parents[i];
22669
- }
22670
- const comment = ts.getLeadingCommentRanges(ast.text, node.pos)?.reverse().find((range) => range.kind === 3);
22671
- if (comment) return {
22672
- node,
22673
- start: comment.pos,
22674
- end: comment.end
22675
- };
22676
- }
22677
- }));
22678
- //#endregion
22679
22703
  //#region node_modules/@vue/language-core/lib/parsers/scriptRanges.js
22680
22704
  var require_scriptRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22681
22705
  Object.defineProperty(exports, "__esModule", { value: true });
22682
22706
  exports.parseScriptRanges = parseScriptRanges;
22683
22707
  exports.parseOptionsFromExtression = parseOptionsFromExtression;
22684
- var shared_1 = require_shared$2();
22685
- var utils_1 = require_utils$2();
22708
+ var shared_1 = require_shared$1();
22709
+ var utils_1 = require_utils$3();
22686
22710
  function parseScriptRanges(ts, sourceFile, vueCompilerOptions) {
22687
22711
  let exportDefault;
22688
- const { bindings, components } = (0, utils_1.parseBindingRanges)(ts, sourceFile, vueCompilerOptions.extensions);
22689
22712
  ts.forEachChild(sourceFile, (child) => {
22690
22713
  if (ts.isExportAssignment(child)) {
22691
22714
  exportDefault = {
@@ -22699,14 +22722,13 @@ var require_scriptRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22699
22722
  }
22700
22723
  });
22701
22724
  return {
22702
- exportDefault,
22703
- bindings,
22704
- components
22725
+ ...(0, utils_1.parseBindingRanges)(ts, sourceFile, vueCompilerOptions.extensions),
22726
+ exportDefault
22705
22727
  };
22706
22728
  }
22707
22729
  function parseOptionsFromExtression(ts, exp, sourceFile) {
22708
22730
  let obj;
22709
- while (isAsExpression(ts, exp) || ts.isParenthesizedExpression(exp)) exp = exp.expression;
22731
+ exp = (0, utils_1.getUnwrappedExpression)(ts, exp);
22710
22732
  if (ts.isObjectLiteralExpression(exp)) obj = exp;
22711
22733
  else if (ts.isCallExpression(exp) && exp.arguments.length) {
22712
22734
  const arg0 = exp.arguments[0];
@@ -22746,9 +22768,6 @@ var require_scriptRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22746
22768
  return (0, shared_1.getNodeText)(ts, node, sourceFile);
22747
22769
  }
22748
22770
  }
22749
- function isAsExpression(ts, node) {
22750
- return node.kind === ts.SyntaxKind.AsExpression;
22751
- }
22752
22771
  }));
22753
22772
  //#endregion
22754
22773
  //#region node_modules/@vue/language-core/lib/parsers/scriptSetupRanges.js
@@ -22756,9 +22775,9 @@ var require_scriptSetupRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22756
22775
  Object.defineProperty(exports, "__esModule", { value: true });
22757
22776
  exports.parseScriptSetupRanges = parseScriptSetupRanges;
22758
22777
  var collectBindings_1 = require_collectBindings();
22759
- var shared_1 = require_shared$2();
22760
- var utils_1 = require_utils$2();
22761
- var tsCheckReg = /^\/\/\s*@ts-(?:no)?check(?:$|\s)/;
22778
+ var shared_1 = require_shared$1();
22779
+ var utils_1 = require_utils$3();
22780
+ var tsCheckRE = /^\/\/\s*@ts-(?:no)?check(?:$|\s)/;
22762
22781
  function parseScriptSetupRanges(ts, sourceFile, vueCompilerOptions) {
22763
22782
  const defineModel = [];
22764
22783
  let defineProps;
@@ -22772,8 +22791,7 @@ var require_scriptSetupRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22772
22791
  const useSlots = [];
22773
22792
  const useTemplateRef = [];
22774
22793
  const text = sourceFile.text;
22775
- const leadingCommentEndOffset = (ts.getLeadingCommentRanges(text, 0)?.reverse() ?? []).find((range) => tsCheckReg.test(text.slice(range.pos, range.end)))?.end ?? 0;
22776
- let { bindings, components } = (0, utils_1.parseBindingRanges)(ts, sourceFile, vueCompilerOptions.extensions);
22794
+ const leadingCommentEndOffset = (ts.getLeadingCommentRanges(text, 0)?.reverse() ?? []).find((range) => tsCheckRE.test(text.slice(range.pos, range.end)))?.end ?? 0;
22777
22795
  let foundNonImportExportNode = false;
22778
22796
  let importSectionEndOffset = 0;
22779
22797
  ts.forEachChild(sourceFile, (node) => {
@@ -22785,16 +22803,10 @@ var require_scriptSetupRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22785
22803
  foundNonImportExportNode = true;
22786
22804
  });
22787
22805
  ts.forEachChild(sourceFile, (node) => visitNode(node, [sourceFile]));
22788
- const templateRefNames = new Set(useTemplateRef.map((ref) => ref.name));
22789
- bindings = bindings.filter((range) => {
22790
- const name = text.slice(range.start, range.end);
22791
- return !templateRefNames.has(name);
22792
- });
22793
22806
  return {
22807
+ ...(0, utils_1.parseBindingRanges)(ts, sourceFile, vueCompilerOptions.extensions),
22794
22808
  leadingCommentEndOffset,
22795
22809
  importSectionEndOffset,
22796
- bindings,
22797
- components,
22798
22810
  defineModel,
22799
22811
  defineProps,
22800
22812
  withDefaults,
@@ -22956,11 +22968,11 @@ var require_scriptSetupRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22956
22968
  var require_vueCompilerOptions = /* @__PURE__ */ __commonJSMin(((exports) => {
22957
22969
  Object.defineProperty(exports, "__esModule", { value: true });
22958
22970
  exports.parseVueCompilerOptions = parseVueCompilerOptions;
22959
- var syntaxReg = /^\s*@(?<key>.+?)\s+(?<value>.+?)\s*$/m;
22971
+ var syntaxRE = /^\s*@(?<key>.+?)\s+(?<value>.+?)\s*$/m;
22960
22972
  function parseVueCompilerOptions(comments) {
22961
22973
  const entries = comments.map((text) => {
22962
22974
  try {
22963
- const match = text.match(syntaxReg);
22975
+ const match = text.match(syntaxRE);
22964
22976
  if (match) {
22965
22977
  const { key, value } = match.groups ?? {};
22966
22978
  return [key, JSON.parse(value)];
@@ -23072,7 +23084,7 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
23072
23084
  };
23073
23085
  })();
23074
23086
  Object.defineProperty(exports, "__esModule", { value: true });
23075
- exports.tsCodegen = void 0;
23087
+ exports.tsCodegen = exports.serviceScriptRE = void 0;
23076
23088
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
23077
23089
  var alien_signals_1 = require_cjs();
23078
23090
  var path = __importStar(require_path_browserify());
@@ -23084,8 +23096,9 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
23084
23096
  var scriptSetupRanges_1 = require_scriptSetupRanges();
23085
23097
  var vueCompilerOptions_1 = require_vueCompilerOptions();
23086
23098
  var signals_1 = require_signals();
23099
+ exports.serviceScriptRE = /^script_(?:js|jsx|ts|tsx)$/;
23087
23100
  exports.tsCodegen = /* @__PURE__ */ new WeakMap();
23088
- var validLangs = new Set([
23101
+ var validLangs = /* @__PURE__ */ new Set([
23089
23102
  "js",
23090
23103
  "jsx",
23091
23104
  "ts",
@@ -23102,7 +23115,7 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
23102
23115
  }];
23103
23116
  },
23104
23117
  resolveEmbeddedCode(fileName, ir, embeddedFile) {
23105
- if (/script_(js|jsx|ts|tsx)/.test(embeddedFile.id)) {
23118
+ if (exports.serviceScriptRE.test(embeddedFile.id)) {
23106
23119
  let codegen = exports.tsCodegen.get(ir);
23107
23120
  if (!codegen) exports.tsCodegen.set(ir, codegen = useCodegen(ts, vueCompilerOptions, fileName, ir));
23108
23121
  embeddedFile.content = [...codegen.getGeneratedScript().codes];
@@ -23140,9 +23153,19 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
23140
23153
  }
23141
23154
  return names;
23142
23155
  });
23156
+ const getSetupBindings = (0, signals_1.computedSet)(() => {
23157
+ const names = /* @__PURE__ */ new Set();
23158
+ const scriptSetupRanges = getScriptSetupRanges();
23159
+ if (ir.scriptSetup && scriptSetupRanges) {
23160
+ for (const range of scriptSetupRanges.bindings) names.add(ir.scriptSetup.content.slice(range.start, range.end));
23161
+ const scriptRanges = getScriptRanges();
23162
+ if (ir.script && scriptRanges) for (const range of scriptRanges.bindings) names.add(ir.script.content.slice(range.start, range.end));
23163
+ }
23164
+ return names;
23165
+ });
23143
23166
  const getSetupConsts = (0, signals_1.computedSet)(() => {
23144
23167
  const scriptSetupRanges = getScriptSetupRanges();
23145
- const names = new Set([...scriptSetupRanges?.defineProps?.destructured?.keys() ?? [], ...getImportedComponents()]);
23168
+ const names = /* @__PURE__ */ new Set([...scriptSetupRanges?.defineProps?.destructured?.keys() ?? [], ...getImportedComponents()]);
23146
23169
  const rest = scriptSetupRanges?.defineProps?.destructuredRest;
23147
23170
  if (rest) names.add(rest);
23148
23171
  return names;
@@ -23196,24 +23219,13 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
23196
23219
  });
23197
23220
  });
23198
23221
  const getSetupExposed = (0, signals_1.computedSet)(() => {
23199
- const allVars = /* @__PURE__ */ new Set();
23200
- const scriptSetupRanges = getScriptSetupRanges();
23201
- if (!ir.scriptSetup || !scriptSetupRanges) return allVars;
23202
- for (const range of scriptSetupRanges.bindings) {
23203
- const name = ir.scriptSetup.content.slice(range.start, range.end);
23204
- allVars.add(name);
23205
- }
23206
- const scriptRanges = getScriptRanges();
23207
- if (ir.script && scriptRanges) for (const range of scriptRanges.bindings) {
23208
- const name = ir.script.content.slice(range.start, range.end);
23209
- allVars.add(name);
23210
- }
23211
- if (!allVars.size) return allVars;
23222
+ const bindings = getSetupBindings();
23223
+ if (!bindings.size) return bindings;
23212
23224
  return new Set([
23213
- ...getGeneratedTemplate()?.componentAccessMap.keys() ?? [],
23214
- ...getGeneratedStyle()?.componentAccessMap.keys() ?? [],
23225
+ ...getGeneratedTemplate()?.contextAccesses.keys() ?? [],
23226
+ ...getGeneratedStyle()?.contextAccesses.keys() ?? [],
23215
23227
  ...ir.template?.ast?.components.flatMap((name) => [(0, shared_1.camelize)(name), (0, shared_1.capitalize)((0, shared_1.camelize)(name))]) ?? []
23216
- ].filter((name) => allVars.has(name)));
23228
+ ].filter((name) => bindings.has(name)));
23217
23229
  });
23218
23230
  return {
23219
23231
  getScriptRanges,
@@ -23227,12 +23239,13 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
23227
23239
  exposed: getSetupExposed(),
23228
23240
  scriptRanges: getScriptRanges(),
23229
23241
  scriptSetupRanges: getScriptSetupRanges(),
23230
- templateAndStyleTypes: new Set([...getGeneratedTemplate()?.generatedTypes ?? [], ...getGeneratedStyle()?.generatedTypes ?? []]),
23242
+ templateAndStyleTypes: /* @__PURE__ */ new Set([...getGeneratedTemplate()?.generatedTypes ?? [], ...getGeneratedStyle()?.generatedTypes ?? []]),
23231
23243
  templateAndStyleCodes: [...getGeneratedStyle()?.codes ?? [], ...getGeneratedTemplate()?.codes ?? []]
23232
23244
  });
23233
23245
  }),
23234
23246
  getGeneratedTemplate,
23235
23247
  getImportedComponents,
23248
+ getSetupBindings,
23236
23249
  getSetupExposed
23237
23250
  };
23238
23251
  }
@@ -23251,23 +23264,6 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
23251
23264
  //#endregion
23252
23265
  //#region node_modules/@vue/language-core/lib/plugins.js
23253
23266
  var require_plugins = /* @__PURE__ */ __commonJSMin(((exports) => {
23254
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
23255
- if (k2 === void 0) k2 = k;
23256
- var desc = Object.getOwnPropertyDescriptor(m, k);
23257
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
23258
- enumerable: true,
23259
- get: function() {
23260
- return m[k];
23261
- }
23262
- };
23263
- Object.defineProperty(o, k2, desc);
23264
- }) : (function(o, m, k, k2) {
23265
- if (k2 === void 0) k2 = k;
23266
- o[k2] = m[k];
23267
- }));
23268
- var __exportStar = exports && exports.__exportStar || function(m, exports$6) {
23269
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$6, p)) __createBinding(exports$6, m, p);
23270
- };
23271
23267
  var __importDefault = exports && exports.__importDefault || function(mod) {
23272
23268
  return mod && mod.__esModule ? mod : { "default": mod };
23273
23269
  };
@@ -23288,7 +23284,6 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports) => {
23288
23284
  var vue_template_inline_ts_1 = __importDefault(require_vue_template_inline_ts());
23289
23285
  var vue_tsx_1 = __importDefault(require_vue_tsx());
23290
23286
  var types_1 = require_types();
23291
- __exportStar(require_shared$1(), exports);
23292
23287
  function createPlugins(pluginContext) {
23293
23288
  return [
23294
23289
  file_vue_1.default,
@@ -23805,7 +23800,7 @@ var require_virtualCode = /* @__PURE__ */ __commonJSMin(((exports) => {
23805
23800
  Object.defineProperty(exports, "__esModule", { value: true });
23806
23801
  exports.VueVirtualCode = void 0;
23807
23802
  var alien_signals_1 = require_cjs();
23808
- var plugins_1 = require_plugins();
23803
+ var codeFeatures_1 = require_codeFeatures();
23809
23804
  var embeddedCodes_1 = require_embeddedCodes();
23810
23805
  var ir_1 = require_ir();
23811
23806
  var VueVirtualCode = class {
@@ -23843,7 +23838,7 @@ var require_virtualCode = /* @__PURE__ */ __commonJSMin(((exports) => {
23843
23838
  sourceOffsets: [0],
23844
23839
  generatedOffsets: [0],
23845
23840
  lengths: [this._snapshot().getLength()],
23846
- data: plugins_1.allCodeFeatures
23841
+ data: codeFeatures_1.codeFeatures.full
23847
23842
  }];
23848
23843
  });
23849
23844
  }
@@ -23933,6 +23928,7 @@ var require_languagePlugin = /* @__PURE__ */ __commonJSMin(((exports) => {
23933
23928
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
23934
23929
  var LanguageCore = __importStar(require_language_core());
23935
23930
  var plugins_1 = require_plugins();
23931
+ var vue_tsx_1 = require_vue_tsx();
23936
23932
  var virtualCode_1 = require_virtualCode();
23937
23933
  var fileRegistries = {};
23938
23934
  function getVueFileRegistry(compilerOptions, vueCompilerOptions, plugins) {
@@ -23992,7 +23988,7 @@ var require_languagePlugin = /* @__PURE__ */ __commonJSMin(((exports) => {
23992
23988
  scriptKind: 7
23993
23989
  })),
23994
23990
  getServiceScript(root) {
23995
- for (const code of (0, language_core_1.forEachEmbeddedCode)(root)) if (/script_(js|jsx|ts|tsx)/.test(code.id)) {
23991
+ for (const code of (0, language_core_1.forEachEmbeddedCode)(root)) if (vue_tsx_1.serviceScriptRE.test(code.id)) {
23996
23992
  const lang = code.id.slice(7);
23997
23993
  return {
23998
23994
  code,
@@ -24034,6 +24030,7 @@ var require_language_core = /* @__PURE__ */ __commonJSMin(((exports) => {
24034
24030
  };
24035
24031
  Object.defineProperty(exports, "__esModule", { value: true });
24036
24032
  exports.tsCodegen = exports.names = void 0;
24033
+ __exportStar(require_codeFeatures(), exports);
24037
24034
  __exportStar(require_template$1(), exports);
24038
24035
  __exportStar(require_compilerOptions(), exports);
24039
24036
  __exportStar(require_languagePlugin(), exports);
@@ -24045,7 +24042,7 @@ var require_language_core = /* @__PURE__ */ __commonJSMin(((exports) => {
24045
24042
  __exportStar(require_collectBindings(), exports);
24046
24043
  __exportStar(require_forEachTemplateNode(), exports);
24047
24044
  __exportStar(require_parseSfc(), exports);
24048
- __exportStar(require_shared$2(), exports);
24045
+ __exportStar(require_shared$1(), exports);
24049
24046
  __exportStar(require_virtualCode(), exports);
24050
24047
  var names_1 = require_names();
24051
24048
  Object.defineProperty(exports, "names", {
@@ -28419,7 +28416,8 @@ var init_jsonParser = __esmMin((() => {
28419
28416
  getMatchingSchemas(schema, focusOffset = -1, exclude) {
28420
28417
  if (this.root && schema) {
28421
28418
  const matchingSchemas = new SchemaCollector(focusOffset, exclude);
28422
- const context = new EvaluationContext(getSchemaDraft(schema));
28419
+ const schemaDraft = getSchemaDraft(schema);
28420
+ const context = new EvaluationContext(schemaDraft);
28423
28421
  validate(this.root, schema, new ValidationResult(), matchingSchemas, context);
28424
28422
  return matchingSchemas.schemas;
28425
28423
  }
@@ -30708,7 +30706,10 @@ var init_jsonSchemaService = __esmMin((() => {
30708
30706
  return this.promise.resolve(new UnresolvedSchema({}, [toDiagnostic(errorMessage, ErrorCode.SchemaResolveError, url)]));
30709
30707
  }
30710
30708
  return this.requestService(url).then((content) => {
30711
- if (!content) return new UnresolvedSchema({}, [toDiagnostic(t("Unable to load schema from '{0}': No content.", toDisplayString(url)), ErrorCode.SchemaResolveError, url)]);
30709
+ if (!content) {
30710
+ const errorMessage = t("Unable to load schema from '{0}': No content.", toDisplayString(url));
30711
+ return new UnresolvedSchema({}, [toDiagnostic(errorMessage, ErrorCode.SchemaResolveError, url)]);
30712
+ }
30712
30713
  const errors = [];
30713
30714
  if (content.charCodeAt(0) === 65279) {
30714
30715
  errors.push(toDiagnostic(t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.", toDisplayString(url)), ErrorCode.SchemaResolveError, url));
@@ -30730,7 +30731,8 @@ var init_jsonSchemaService = __esmMin((() => {
30730
30731
  }
30731
30732
  let errorCode = ErrorCode.SchemaResolveError;
30732
30733
  if (typeof code === "number" && code < 65536) errorCode += code;
30733
- return new UnresolvedSchema({}, [toDiagnostic(t("Unable to load schema from '{0}': {1}.", toDisplayString(url), message), errorCode, url)]);
30734
+ const errorMessage = t("Unable to load schema from '{0}': {1}.", toDisplayString(url), message);
30735
+ return new UnresolvedSchema({}, [toDiagnostic(errorMessage, errorCode, url)]);
30734
30736
  });
30735
30737
  }
30736
30738
  resolveSchemaContent(schemaToResolve, handle) {
@@ -32823,17 +32825,19 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32823
32825
  return comp;
32824
32826
  };
32825
32827
  var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
32828
+ var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
32826
32829
  var replaceTildes = (comp, options) => {
32827
32830
  return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
32828
32831
  };
32829
32832
  var replaceTilde = (comp, options) => {
32830
32833
  const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
32834
+ const z = options.includePrerelease ? "-0" : "";
32831
32835
  return comp.replace(r, (_, M, m, p, pr) => {
32832
32836
  debug("tilde", comp, _, M, m, p, pr);
32833
32837
  let ret;
32834
32838
  if (isX(M)) ret = "";
32835
- else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
32836
- else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
32839
+ else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
32840
+ else if (isX(p)) ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
32837
32841
  else if (pr) {
32838
32842
  debug("replaceTilde pr", pr);
32839
32843
  ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
@@ -32863,8 +32867,8 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32863
32867
  else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
32864
32868
  } else {
32865
32869
  debug("no pr");
32866
- if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
32867
- else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
32870
+ if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
32871
+ else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
32868
32872
  else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
32869
32873
  }
32870
32874
  debug("caret return", ret);
@@ -32880,6 +32884,7 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32880
32884
  const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
32881
32885
  return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
32882
32886
  debug("xRange", comp, ret, gtlt, M, m, p, pr);
32887
+ if (invalidXRangeOrder(M, m, p)) return comp;
32883
32888
  const xM = isX(M);
32884
32889
  const xm = xM || isX(m);
32885
32890
  const xp = xm || isX(p);
@@ -34883,7 +34888,8 @@ var init_cssScanner = __esmMin((() => {
34883
34888
  content = [this.stream.substring(offset, pos)];
34884
34889
  if (this.stream.advanceIfChar(_PRC)) return this.finishToken(offset, TokenType$1.Percentage);
34885
34890
  else if (this.ident(content)) {
34886
- const tokenType = staticUnitTable[this.stream.substring(pos).toLowerCase()];
34891
+ const dim = this.stream.substring(pos).toLowerCase();
34892
+ const tokenType = staticUnitTable[dim];
34887
34893
  if (typeof tokenType !== "undefined") return this.finishToken(offset, tokenType, content.join(""));
34888
34894
  else return this.finishToken(offset, TokenType$1.Dimension, content.join(""));
34889
34895
  }
@@ -41177,7 +41183,8 @@ function collectValues(styleSheet, declaration) {
41177
41183
  return true;
41178
41184
  }
41179
41185
  function matchesProperty(decl) {
41180
- return fullPropertyName === decl.getFullPropertyName();
41186
+ const propertyName = decl.getFullPropertyName();
41187
+ return fullPropertyName === propertyName;
41181
41188
  }
41182
41189
  function vistNode(node) {
41183
41190
  if (node instanceof Declaration && node !== declaration) {
@@ -86849,13 +86856,13 @@ var require_vue_autoinsert_dotvalue = /* @__PURE__ */ __commonJSMin(((exports) =
86849
86856
  }
86850
86857
  };
86851
86858
  }
86852
- var charReg = /\w/;
86859
+ var charRE = /\w/;
86853
86860
  function isCharacterTyping(document, change) {
86854
86861
  const lastCharacter = change.text[change.text.length - 1];
86855
86862
  const nextCharacter = document.getText().slice(change.rangeOffset + change.text.length, change.rangeOffset + change.text.length + 1);
86856
86863
  if (lastCharacter === void 0) return false;
86857
86864
  if (change.text.includes("\n")) return false;
86858
- return charReg.test(lastCharacter) && !charReg.test(nextCharacter);
86865
+ return charRE.test(lastCharacter) && !charRE.test(nextCharacter);
86859
86866
  }
86860
86867
  function shouldSkip(ts, node, pos, allowAccessDotValue) {
86861
86868
  if (ts.isVariableDeclaration(node) && pos >= node.name.getFullStart() && pos <= node.name.getEnd()) return true;
@@ -86975,7 +86982,7 @@ var require_vue_component_semantic_tokens = /* @__PURE__ */ __commonJSMin(((expo
86975
86982
  const end = document.offsetAt(range.end);
86976
86983
  const validComponentNames = await getComponentNames(info.root.fileName) ?? [];
86977
86984
  const elements = new Set(await getElementNames(info.root.fileName) ?? []);
86978
- const components = new Set([...validComponentNames, ...validComponentNames.map(language_core_1.hyphenateTag)]);
86985
+ const components = /* @__PURE__ */ new Set([...validComponentNames, ...validComponentNames.map(language_core_1.hyphenateTag)]);
86979
86986
  for (const node of (0, language_core_1.forEachElementNode)(template.ast)) {
86980
86987
  if (node.loc.end.offset <= start || node.loc.start.offset >= end) continue;
86981
86988
  if (components.has(node.tag) && !elements.has(node.tag)) {
@@ -87020,7 +87027,7 @@ var require_vue_directive_comments = /* @__PURE__ */ __commonJSMin(((exports) =>
87020
87027
  ["vue-expect-error"],
87021
87028
  ["vue-generic", "vue-generic {$1}"]
87022
87029
  ];
87023
- var directiveCommentReg = /<!--\s*@/;
87030
+ var directiveCommentRE = /<!--\s*@/;
87024
87031
  /**
87025
87032
  * A language service plugin that provides completion for Vue directive comments,
87026
87033
  * e.g. if user is writing `<!-- |` in they'll be provided completions for `@vue-expect-error`, `@vue-generic`, etc.
@@ -87039,7 +87046,7 @@ var require_vue_directive_comments = /* @__PURE__ */ __commonJSMin(((exports) =>
87039
87046
  },
87040
87047
  end: position
87041
87048
  });
87042
- const cmdStart = line.match(directiveCommentReg);
87049
+ const cmdStart = line.match(directiveCommentRE);
87043
87050
  if (!cmdStart) return;
87044
87051
  const startIndex = cmdStart.index + cmdStart[0].length;
87045
87052
  const remainText = line.slice(startIndex);
@@ -87165,7 +87172,7 @@ var require_vue_extract_file = /* @__PURE__ */ __commonJSMin(((exports) => {
87165
87172
  var language_core_1 = require_language_core();
87166
87173
  var vscode_uri_1 = require_umd();
87167
87174
  var utils_1 = require_utils$1();
87168
- var unicodeReg = /\\u/g;
87175
+ var unicodeRE = /\\u/g;
87169
87176
  function create(ts, { collectExtractProps }) {
87170
87177
  return {
87171
87178
  name: "vue-extract-file",
@@ -87349,7 +87356,7 @@ var require_vue_extract_file = /* @__PURE__ */ __commonJSMin(((exports) => {
87349
87356
  const printText = printer.printNode(ts.EmitHint.Expression, newNode, ast);
87350
87357
  return {
87351
87358
  range: componentOptions.components,
87352
- newText: unescape(printText.replace(unicodeReg, "%u"))
87359
+ newText: unescape(printText.replace(unicodeRE, "%u"))
87353
87360
  };
87354
87361
  } else {
87355
87362
  const newNode = {
@@ -87359,7 +87366,7 @@ var require_vue_extract_file = /* @__PURE__ */ __commonJSMin(((exports) => {
87359
87366
  const printText = printer.printNode(ts.EmitHint.Expression, newNode, ast);
87360
87367
  return {
87361
87368
  range: componentOptions.args,
87362
- newText: unescape(printText.replace(unicodeReg, "%u"))
87369
+ newText: unescape(printText.replace(unicodeRE, "%u"))
87363
87370
  };
87364
87371
  }
87365
87372
  }
@@ -114473,7 +114480,7 @@ var require_vue_template = /* @__PURE__ */ __commonJSMin(((exports) => {
114473
114480
  const info = (0, utils_1.resolveEmbeddedCode)(context, document.uri);
114474
114481
  const codegen = info && language_core_1.tsCodegen.get(info.root.ir);
114475
114482
  if (codegen) {
114476
- const componentNames = new Set([...codegen.getImportedComponents(), ...codegen.getSetupExposed()]);
114483
+ const componentNames = /* @__PURE__ */ new Set([...codegen.getImportedComponents(), ...codegen.getSetupExposed()]);
114477
114484
  voidElements = defaultDataProvider.provideTags().filter((tag) => tag.void).map((tag) => tag.name).filter((tag) => !componentNames.has(tag) && !componentNames.has((0, shared_1.capitalize)(tag)));
114478
114485
  }
114479
114486
  return (0, htmlFormatter_1.format)(document, range, options, voidElements);
@@ -114789,7 +114796,7 @@ var require_vue_template = /* @__PURE__ */ __commonJSMin(((exports) => {
114789
114796
  });
114790
114797
  }
114791
114798
  for (const [propName, propInfo] of [...props.map((prop) => [prop.name, prop]), ...attrs.map((attr) => [attr.name, attr])]) {
114792
- if (propName.match(EVENT_PROP_REGEX)) {
114799
+ if (EVENT_PROP_REGEX.test(propName)) {
114793
114800
  let labelName = propName.slice(2);
114794
114801
  labelName = labelName.charAt(0).toLowerCase() + labelName.slice(1);
114795
114802
  if (attrNameCasing === 0) labelName = (0, language_core_1.hyphenateAttr)(labelName);
@@ -115006,8 +115013,8 @@ var require_vue_twoslash_queries = /* @__PURE__ */ __commonJSMin(((exports) => {
115006
115013
  Object.defineProperty(exports, "__esModule", { value: true });
115007
115014
  exports.create = create;
115008
115015
  var utils_1 = require_utils$1();
115009
- var twoslashTemplateReg = /<!--\s*\^\?\s*-->/g;
115010
- var twoslashScriptReg = /(?<=^|\n)\s*\/\/\s*\^\?/g;
115016
+ var twoslashTemplateRE = /<!--\s*\^\?\s*-->/g;
115017
+ var twoslashScriptRE = /(?<=^|\n)\s*\/\/\s*\^\?/g;
115011
115018
  function create({ getQuickInfoAtPosition }) {
115012
115019
  return {
115013
115020
  name: "vue-twoslash-queries",
@@ -115018,9 +115025,9 @@ var require_vue_twoslash_queries = /* @__PURE__ */ __commonJSMin(((exports) => {
115018
115025
  if (info?.code.id !== "template" && !info?.code.id.startsWith("script_")) return;
115019
115026
  const hoverOffsets = [];
115020
115027
  const inlayHints = [];
115021
- const twoslashReg = info.code.id === "template" ? twoslashTemplateReg : twoslashScriptReg;
115028
+ const twoslashRE = info.code.id === "template" ? twoslashTemplateRE : twoslashScriptRE;
115022
115029
  const sourceDocument = context.documents.get(info.script.id, info.script.languageId, info.script.snapshot);
115023
- for (const pointer of document.getText(range).matchAll(twoslashReg)) {
115030
+ for (const pointer of document.getText(range).matchAll(twoslashRE)) {
115024
115031
  const offset = pointer.index + pointer[0].indexOf("^?") + document.offsetAt(range.start);
115025
115032
  const position = document.positionAt(offset);
115026
115033
  hoverOffsets.push([position, document.offsetAt({
@@ -115191,7 +115198,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
115191
115198
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
115192
115199
  var path = __importStar(require_path_browserify());
115193
115200
  function getComponentType(ts, checker, sourceFile, { fileName, ir }, tag) {
115194
- const testNames = new Set([
115201
+ const testNames = /* @__PURE__ */ new Set([
115195
115202
  tag,
115196
115203
  (0, shared_1.camelize)(tag),
115197
115204
  (0, shared_1.capitalize)((0, shared_1.camelize)(tag))
@@ -115254,7 +115261,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
115254
115261
  else node.forEachChild(walk);
115255
115262
  }
115256
115263
  }
115257
- exports.booleanExceptionProps = new Set(["class", "style"]);
115264
+ exports.booleanExceptionProps = /* @__PURE__ */ new Set(["class", "style"]);
115258
115265
  function hasBooleanType(ts, type) {
115259
115266
  if (type.flags & ts.TypeFlags.BooleanLike) return true;
115260
115267
  if (type.isUnionOrIntersection()) return type.types.some((type) => hasBooleanType(ts, type));
@@ -115293,7 +115300,7 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports) => {
115293
115300
  var language_core_1 = require_language_core();
115294
115301
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
115295
115302
  var utils_2 = require_utils();
115296
- var windowsPathReg = /\\/g;
115303
+ var windowsPathRE = /\\/g;
115297
115304
  function postprocessLanguageService(ts, language, languageService, vueOptions, asScriptId) {
115298
115305
  const proxyCache = /* @__PURE__ */ new Map();
115299
115306
  const getProxyMethod = (target, p) => {
@@ -115332,7 +115339,7 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports) => {
115332
115339
  }
115333
115340
  function getCompletionsAtPosition(getCompletionsAtPosition) {
115334
115341
  return (filePath, position, ...rests) => {
115335
- const fileName = filePath.replace(windowsPathReg, "/");
115342
+ const fileName = filePath.replace(windowsPathRE, "/");
115336
115343
  const result = getCompletionsAtPosition(fileName, position, ...rests);
115337
115344
  if (result) resolveCompletionResult(ts, language, asScriptId, vueOptions, fileName, position, result);
115338
115345
  return result;
@@ -115398,13 +115405,13 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports) => {
115398
115405
  const root = language.scripts.get(asScriptId(fileName))?.generated?.root;
115399
115406
  if (root instanceof language_core_1.VueVirtualCode) {
115400
115407
  if ([root.ir.template, ...root.ir.styles].filter(Boolean).map((block) => [block.startTagEnd, block.endTagStart]).some(([start, end]) => position >= start && position <= end)) {
115401
- const globalKinds = new Set([
115408
+ const globalKinds = /* @__PURE__ */ new Set([
115402
115409
  "var",
115403
115410
  "function",
115404
115411
  "module"
115405
115412
  ]);
115406
115413
  const globalsOrKeywords = ts.Completions.SortText.GlobalsOrKeywords;
115407
- const sortTexts = new Set([
115414
+ const sortTexts = /* @__PURE__ */ new Set([
115408
115415
  globalsOrKeywords,
115409
115416
  "z" + globalsOrKeywords,
115410
115417
  globalsOrKeywords + "1"
@@ -115505,13 +115512,14 @@ var require_getComponentDirectives = /* @__PURE__ */ __commonJSMin(((exports) =>
115505
115512
  exports.getComponentDirectives = getComponentDirectives;
115506
115513
  var language_core_1 = require_language_core();
115507
115514
  var utils_1 = require_utils();
115515
+ var directiveRE = /^v[A-Z]/;
115508
115516
  function getComponentDirectives(ts, program, fileName) {
115509
115517
  const sourceFile = program.getSourceFile(fileName);
115510
115518
  if (!sourceFile) return [];
115511
115519
  const checker = program.getTypeChecker();
115512
115520
  const directives = (0, utils_1.getVariableType)(ts, checker, sourceFile, language_core_1.names.directives);
115513
115521
  if (!directives) return [];
115514
- return directives.type.getProperties().map(({ name }) => name).filter((name) => name.match(/^v[A-Z]/));
115522
+ return directives.type.getProperties().map(({ name }) => name).filter((name) => directiveRE.test(name));
115515
115523
  }
115516
115524
  }));
115517
115525
  //#endregion
@@ -115710,7 +115718,7 @@ var require_schemaResolvers = /* @__PURE__ */ __commonJSMin(((exports) => {
115710
115718
  Object.defineProperty(exports, "__esModule", { value: true });
115711
115719
  exports.createSchemaResolvers = createSchemaResolvers;
115712
115720
  var scriptSetup_1 = require_scriptSetup();
115713
- var publicPropsInterfaces = new Set([
115721
+ var publicPropsInterfaces = /* @__PURE__ */ new Set([
115714
115722
  "PublicProps",
115715
115723
  "VNodeProps",
115716
115724
  "AllowedComponentProps",
@@ -116032,6 +116040,7 @@ var require_componentMeta = /* @__PURE__ */ __commonJSMin(((exports) => {
116032
116040
  var helpers_1 = require_helpers();
116033
116041
  var schemaResolvers_1 = require_schemaResolvers();
116034
116042
  var scriptSetup_1 = require_scriptSetup();
116043
+ var vnodeEventRE = /^onVnode[A-Z]/;
116035
116044
  function getComponentMeta(ts, typeChecker, printer, language, getSourceScript, componentNode, componentType, options, deprecatedOptions = {
116036
116045
  noDeclarations: true,
116037
116046
  rawType: false
@@ -116092,7 +116101,7 @@ var require_componentMeta = /* @__PURE__ */ __commonJSMin(((exports) => {
116092
116101
  }).filter((prop) => !!prop && !eventProps.has(prop.name));
116093
116102
  const defaults = (0, scriptSetup_1.getDefaultsFromScriptSetup)(ts, printer, getSourceScript(componentFile.fileName));
116094
116103
  for (const prop of result) {
116095
- if (prop.name.match(/^onVnode[A-Z]/)) prop.name = "onVue:" + prop.name[7]?.toLowerCase() + prop.name.slice(8);
116104
+ if (vnodeEventRE.test(prop.name)) prop.name = "onVue:" + prop.name[7]?.toLowerCase() + prop.name.slice(8);
116096
116105
  prop.default ??= defaults?.get(prop.name);
116097
116106
  }
116098
116107
  return result;
@@ -116170,8 +116179,8 @@ var require_getComponentNames = /* @__PURE__ */ __commonJSMin(((exports) => {
116170
116179
  if (!sourceFile) return [];
116171
116180
  const checker = program.getTypeChecker();
116172
116181
  const componentNames = (0, utils_1.getVariableType)(ts, checker, sourceFile, language_core_1.names.components)?.type.getProperties().map((c) => c.name).filter((entry) => !entry.includes("$") && !entry.startsWith("_")) ?? [];
116173
- componentNames.push((0, utils_1.getSelfComponentName)(virtualCode.fileName));
116174
- componentNames.push(...language_core_1.tsCodegen.get(virtualCode.ir)?.getImportedComponents() ?? []);
116182
+ const codegen = language_core_1.tsCodegen.get(virtualCode.ir);
116183
+ componentNames.push((0, utils_1.getSelfComponentName)(virtualCode.fileName), ...codegen?.getImportedComponents() ?? [], ...codegen?.getSetupBindings() ?? []);
116175
116184
  return [...new Set(componentNames)];
116176
116185
  }
116177
116186
  }));
@@ -157811,7 +157820,8 @@ ${lanes.join("\n")}
157811
157820
  directoryToModuleNameMap.update(options2);
157812
157821
  }
157813
157822
  function getOrCreateCacheForDirectory(directoryName, redirectedReference) {
157814
- return getOrCreateCache(directoryToModuleNameMap, redirectedReference, toPath(directoryName, currentDirectory, getCanonicalFileName), () => createModeAwareCache());
157823
+ const path = toPath(directoryName, currentDirectory, getCanonicalFileName);
157824
+ return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path, () => createModeAwareCache());
157815
157825
  }
157816
157826
  function getFromDirectoryCache(name, mode, directoryName, redirectedReference) {
157817
157827
  var _a, _b;
@@ -166402,10 +166412,11 @@ ${lanes.join("\n")}
166402
166412
  if (!specifier) {
166403
166413
  const isBundle2 = !!compilerOptions.outFile;
166404
166414
  const { moduleResolverHost } = context.tracker;
166405
- specifier = first(getModuleSpecifiers(symbol, checker, isBundle2 ? {
166415
+ const specifierCompilerOptions = isBundle2 ? {
166406
166416
  ...compilerOptions,
166407
166417
  baseUrl: moduleResolverHost.getCommonSourceDirectory()
166408
- } : compilerOptions, contextFile, moduleResolverHost, {
166418
+ } : compilerOptions;
166419
+ specifier = first(getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, {
166409
166420
  importModuleSpecifierPreference: isBundle2 ? "non-relative" : "project-relative",
166410
166421
  importModuleSpecifierEnding: isBundle2 ? "minimal" : resolutionMode === 99 ? "js" : void 0
166411
166422
  }, { overrideImportMode }));
@@ -167088,7 +167099,8 @@ ${lanes.join("\n")}
167088
167099
  if (some(symbol.declarations, isPartOfParameterDeclaration)) return;
167089
167100
  Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]);
167090
167101
  getUnusedName(unescapeLeadingUnderscores(symbol.escapedName), symbol);
167091
- deferredPrivatesStack[!!(symbol.flags & 2097152) && !some(symbol.declarations, (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference)) ? 0 : deferredPrivatesStack.length - 1].set(getSymbolId(symbol), symbol);
167102
+ const isExternalImportAlias = !!(symbol.flags & 2097152) && !some(symbol.declarations, (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference));
167103
+ deferredPrivatesStack[isExternalImportAlias ? 0 : deferredPrivatesStack.length - 1].set(getSymbolId(symbol), symbol);
167092
167104
  }
167093
167105
  function isExportingScope(enclosingDeclaration2) {
167094
167106
  return isSourceFile(enclosingDeclaration2) && (isExternalOrCommonJsModule(enclosingDeclaration2) || isJsonSourceFile(enclosingDeclaration2)) || isAmbientModule(enclosingDeclaration2) && !isGlobalScopeAugmentation(enclosingDeclaration2);
@@ -182937,7 +182949,8 @@ ${lanes.join("\n")}
182937
182949
  const exprType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(links.assertionExpressionType));
182938
182950
  const targetType = getTypeFromTypeNode(type);
182939
182951
  if (!isErrorType(targetType)) addLazyDiagnostic(() => {
182940
- if (!isTypeComparableTo(targetType, getWidenedType(exprType))) checkTypeComparableTo(exprType, targetType, errNode, Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first);
182952
+ const widenedType = getWidenedType(exprType);
182953
+ if (!isTypeComparableTo(targetType, widenedType)) checkTypeComparableTo(exprType, targetType, errNode, Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first);
182941
182954
  });
182942
182955
  }
182943
182956
  function checkNonNullChain(node) {
@@ -194685,7 +194698,8 @@ ${lanes.join("\n")}
194685
194698
  setOriginalNode(getter, node);
194686
194699
  setCommentRange(getter, commentRange);
194687
194700
  setSourceMapRange(getter, sourceMapRange);
194688
- const setter = createAccessorPropertySetRedirector(factory2, node, factory2.createModifiersFromModifierFlags(modifiersToFlags(modifiers)), setterName, receiver);
194701
+ const setterModifiers = factory2.createModifiersFromModifierFlags(modifiersToFlags(modifiers));
194702
+ const setter = createAccessorPropertySetRedirector(factory2, node, setterModifiers, setterName, receiver);
194689
194703
  setOriginalNode(setter, node);
194690
194704
  setEmitFlags(setter, 3072);
194691
194705
  setSourceMapRange(setter, sourceMapRange);
@@ -199128,7 +199142,8 @@ ${lanes.join("\n")}
199128
199142
  const tagName = getTagName(node);
199129
199143
  const attrs = node.attributes.properties;
199130
199144
  const objectProperties = length(attrs) ? transformJsxAttributesToObjectProps(attrs) : factory2.createNull();
199131
- const element = createExpressionForJsxElement(factory2, currentFileState.importSpecifier === void 0 ? createJsxFactoryExpression(factory2, context.getEmitResolver().getJsxFactoryEntity(currentSourceFile), compilerOptions.reactNamespace, node) : getImplicitImportForName("createElement"), tagName, objectProperties, mapDefined(children, transformJsxChildToExpression), location);
199145
+ const callee = currentFileState.importSpecifier === void 0 ? createJsxFactoryExpression(factory2, context.getEmitResolver().getJsxFactoryEntity(currentSourceFile), compilerOptions.reactNamespace, node) : getImplicitImportForName("createElement");
199146
+ const element = createExpressionForJsxElement(factory2, callee, tagName, objectProperties, mapDefined(children, transformJsxChildToExpression), location);
199132
199147
  if (isChild) startOnNewLine(element);
199133
199148
  return element;
199134
199149
  }
@@ -215724,7 +215739,8 @@ ${lanes.join("\n")}
215724
215739
  }
215725
215740
  function scheduleInvalidateResolutionsOfFailedLookupLocations() {
215726
215741
  if (!host.setTimeout || !host.clearTimeout) return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
215727
- writeLog(`Scheduling invalidateFailedLookup${clearInvalidateResolutionsOfFailedLookupLocations() ? ", Cancelled earlier one" : ""}`);
215742
+ const pending = clearInvalidateResolutionsOfFailedLookupLocations();
215743
+ writeLog(`Scheduling invalidateFailedLookup${pending ? ", Cancelled earlier one" : ""}`);
215728
215744
  timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250, "timerToInvalidateFailedLookupResolutions");
215729
215745
  }
215730
215746
  function invalidateResolutionsOfFailedLookup() {
@@ -231415,7 +231431,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
231415
231431
  const { sourceFile } = context;
231416
231432
  const fixedDeclarations = /* @__PURE__ */ new Set();
231417
231433
  return codeFixAll(context, errorCodes2, (t, diagnostic) => {
231418
- const decl = getFixableErrorSpanDeclaration(sourceFile, diagnostic.relatedInformation && find(diagnostic.relatedInformation, (r) => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code));
231434
+ const span = diagnostic.relatedInformation && find(diagnostic.relatedInformation, (r) => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code);
231435
+ const decl = getFixableErrorSpanDeclaration(sourceFile, span);
231419
231436
  if (!decl) return;
231420
231437
  const trackChanges = (cb) => (cb(t), []);
231421
231438
  return getFix(context, decl, trackChanges, fixedDeclarations);
@@ -234000,7 +234017,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
234000
234017
  return createModuleSpecifierResolutionHost(isFromPackageJson ? host.getPackageJsonAutoImportProvider() : program, host);
234001
234018
  });
234002
234019
  function addSymbol(moduleSymbol, toFile, exportedSymbol, exportKind, program2, isFromPackageJson) {
234003
- if (isImportable(program2, fromFile, toFile, moduleSymbol, preferences, packageJsonFilter, getModuleSpecifierResolutionHost(isFromPackageJson), moduleSpecifierCache)) {
234020
+ const moduleSpecifierResolutionHost = getModuleSpecifierResolutionHost(isFromPackageJson);
234021
+ if (isImportable(program2, fromFile, toFile, moduleSymbol, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache)) {
234004
234022
  const checker = program2.getTypeChecker();
234005
234023
  originalSymbolToExportInfos.add(getUniqueSymbolId(exportedSymbol, checker).toString(), {
234006
234024
  symbol: exportedSymbol,
@@ -234977,7 +234995,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
234977
234995
  eachDiagnostic(context, errorCodes28, (diag2) => {
234978
234996
  const info = getInfo10(diag2.file, diag2.start, diag2.code, checker, context.program);
234979
234997
  if (info === void 0) return;
234980
- if (!addToSeen(seen, getNodeId(info.parentDeclaration) + "#" + (info.kind === 3 ? info.identifier || getNodeId(info.token) : info.token.text))) return;
234998
+ const nodeId = getNodeId(info.parentDeclaration) + "#" + (info.kind === 3 ? info.identifier || getNodeId(info.token) : info.token.text);
234999
+ if (!addToSeen(seen, nodeId)) return;
234981
235000
  if (fixId56 === fixMissingFunctionDeclaration && (info.kind === 2 || info.kind === 5)) addFunctionDeclaration(changes, context, info);
234982
235001
  else if (fixId56 === fixMissingProperties && info.kind === 3) addObjectLiteralProperties(changes, context, info);
234983
235002
  else if (fixId56 === fixMissingAttributes && info.kind === 4) addJsxAttributes(changes, context, info);
@@ -236360,7 +236379,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
236360
236379
  const info = getInfo15(err.file, err.start, checker);
236361
236380
  if (!info) return;
236362
236381
  const { typeNode, type } = info;
236363
- doChange29(changes, sourceFile, typeNode, typeNode.kind === 315 && fixId56 === fixIdNullable ? checker.getNullableType(type, 4) : type, checker);
236382
+ const fixedType = typeNode.kind === 315 && fixId56 === fixIdNullable ? checker.getNullableType(type, 4) : type;
236383
+ doChange29(changes, sourceFile, typeNode, fixedType, checker);
236364
236384
  });
236365
236385
  }
236366
236386
  });
@@ -240760,15 +240780,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
240760
240780
  symbol: firstAccessibleSymbol,
240761
240781
  targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags
240762
240782
  }], position, isValidTypeOnlyAliasUseSite(location)) || {};
240763
- if (moduleSpecifier) symbolToOriginInfoMap[index] = {
240764
- kind: getNullableSymbolOriginInfoKind(34),
240765
- moduleSymbol,
240766
- isDefaultExport: false,
240767
- symbolName: firstAccessibleSymbol.name,
240768
- exportName: firstAccessibleSymbol.name,
240769
- fileName,
240770
- moduleSpecifier
240771
- };
240783
+ if (moduleSpecifier) {
240784
+ const origin = {
240785
+ kind: getNullableSymbolOriginInfoKind(34),
240786
+ moduleSymbol,
240787
+ isDefaultExport: false,
240788
+ symbolName: firstAccessibleSymbol.name,
240789
+ exportName: firstAccessibleSymbol.name,
240790
+ fileName,
240791
+ moduleSpecifier
240792
+ };
240793
+ symbolToOriginInfoMap[index] = origin;
240794
+ }
240772
240795
  }
240773
240796
  } else if (preferences.includeCompletionsWithInsertText) {
240774
240797
  if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) return;
@@ -241289,10 +241312,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
241289
241312
  symbols = concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags));
241290
241313
  forEach(symbols, (symbol, index) => {
241291
241314
  const declaration = symbol == null ? void 0 : symbol.valueDeclaration;
241292
- if (declaration && isClassElement(declaration) && declaration.name && isComputedPropertyName(declaration.name)) symbolToOriginInfoMap[index] = {
241293
- kind: 512,
241294
- symbolName: typeChecker.symbolToString(symbol)
241295
- };
241315
+ if (declaration && isClassElement(declaration) && declaration.name && isComputedPropertyName(declaration.name)) {
241316
+ const origin = {
241317
+ kind: 512,
241318
+ symbolName: typeChecker.symbolToString(symbol)
241319
+ };
241320
+ symbolToOriginInfoMap[index] = origin;
241321
+ }
241296
241322
  });
241297
241323
  }
241298
241324
  return 1;
@@ -248201,7 +248227,7 @@ ${content}
248201
248227
  if (symbolWasExpanded) return true;
248202
248228
  if (canExpandSymbol(symbol2, typeWriterOut)) {
248203
248229
  const symbolMeaning = semanticToSymbolMeaning(meaning);
248204
- addRange(displayParts, mapToDisplayParts((writer) => {
248230
+ const expandedDisplayParts = mapToDisplayParts((writer) => {
248205
248231
  const nodes = typeChecker.getEmitResolver().symbolToDeclarations(symbol2, symbolMeaning, 17408, maximumLength, verbosityLevel !== void 0 ? verbosityLevel - 1 : void 0, typeWriterOut);
248206
248232
  const printer = getPrinter();
248207
248233
  const sourceFile2 = symbol2.valueDeclaration && getSourceFileOfNode(symbol2.valueDeclaration);
@@ -248209,7 +248235,8 @@ ${content}
248209
248235
  if (i > 0) writer.writeLine();
248210
248236
  printer.writeNode(4, node, sourceFile2, writer);
248211
248237
  });
248212
- }, maximumLength));
248238
+ }, maximumLength);
248239
+ addRange(displayParts, expandedDisplayParts);
248213
248240
  symbolWasExpanded = true;
248214
248241
  return true;
248215
248242
  }
@@ -248283,10 +248310,11 @@ ${content}
248283
248310
  }
248284
248311
  }
248285
248312
  function writeTypeParametersOfSymbol(symbol2, enclosingDeclaration2) {
248286
- addRange(displayParts, mapToDisplayParts((writer) => {
248313
+ const typeParameterParts = mapToDisplayParts((writer) => {
248287
248314
  const params = typeChecker.symbolToTypeParameterDeclarations(symbol2, enclosingDeclaration2, symbolDisplayNodeBuilderFlags);
248288
248315
  getPrinter().writeList(53776, params, getSourceFileOfNode(getParseTreeNode(enclosingDeclaration2)), writer);
248289
- }));
248316
+ });
248317
+ addRange(displayParts, typeParameterParts);
248290
248318
  }
248291
248319
  }
248292
248320
  function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias, maximumLength, verbosityLevel) {
@@ -254318,12 +254346,13 @@ ${options.prefix}` : "\n" : options.prefix
254318
254346
  if (this.installTypingHost.fileExists(combinePaths(directory, "package.json"))) return directory;
254319
254347
  }) || projectRootPath;
254320
254348
  if (cwd) this.installWorker(-1, [packageName], cwd, (success) => {
254349
+ const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
254321
254350
  const response = {
254322
254351
  kind: ActionPackageInstalled,
254323
254352
  projectName,
254324
254353
  id,
254325
254354
  success,
254326
- message: success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`
254355
+ message
254327
254356
  };
254328
254357
  this.sendResponse(response);
254329
254358
  });
@@ -265298,7 +265327,7 @@ var require_codeAction = /* @__PURE__ */ __commonJSMin(((exports) => {
265298
265327
  var fixNames = require_fixNames();
265299
265328
  var lspConverters_1 = require_lspConverters();
265300
265329
  var codeActionResolve_1 = require_codeActionResolve();
265301
- var renameCommandRefactors = new Set([
265330
+ var renameCommandRefactors = /* @__PURE__ */ new Set([
265302
265331
  "refactor.rewrite.property.generateAccessors",
265303
265332
  "refactor.extract.type",
265304
265333
  "refactor.extract.interface",
@@ -270138,6 +270167,7 @@ var require_protocol_diagnostic = /* @__PURE__ */ __commonJSMin(((exports) => {
270138
270167
  /**
270139
270168
  * The document diagnostic request definition.
270140
270169
  *
270170
+ *
270141
270171
  * @since 3.17.0
270142
270172
  */
270143
270173
  var DocumentDiagnosticRequest;