@vue/compiler-core 3.5.25 → 3.5.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-core v3.5.25
2
+ * @vue/compiler-core v3.5.26
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -8,86 +8,86 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  var shared = require('@vue/shared');
11
- var decode_js = require('entities/lib/decode.js');
11
+ var decode = require('entities/decode');
12
12
  var parser = require('@babel/parser');
13
13
  var estreeWalker = require('estree-walker');
14
14
  var sourceMapJs = require('source-map-js');
15
15
 
16
- const FRAGMENT = Symbol(`Fragment` );
17
- const TELEPORT = Symbol(`Teleport` );
18
- const SUSPENSE = Symbol(`Suspense` );
19
- const KEEP_ALIVE = Symbol(`KeepAlive` );
20
- const BASE_TRANSITION = Symbol(
16
+ const FRAGMENT = /* @__PURE__ */ Symbol(`Fragment` );
17
+ const TELEPORT = /* @__PURE__ */ Symbol(`Teleport` );
18
+ const SUSPENSE = /* @__PURE__ */ Symbol(`Suspense` );
19
+ const KEEP_ALIVE = /* @__PURE__ */ Symbol(`KeepAlive` );
20
+ const BASE_TRANSITION = /* @__PURE__ */ Symbol(
21
21
  `BaseTransition`
22
22
  );
23
- const OPEN_BLOCK = Symbol(`openBlock` );
24
- const CREATE_BLOCK = Symbol(`createBlock` );
25
- const CREATE_ELEMENT_BLOCK = Symbol(
23
+ const OPEN_BLOCK = /* @__PURE__ */ Symbol(`openBlock` );
24
+ const CREATE_BLOCK = /* @__PURE__ */ Symbol(`createBlock` );
25
+ const CREATE_ELEMENT_BLOCK = /* @__PURE__ */ Symbol(
26
26
  `createElementBlock`
27
27
  );
28
- const CREATE_VNODE = Symbol(`createVNode` );
29
- const CREATE_ELEMENT_VNODE = Symbol(
28
+ const CREATE_VNODE = /* @__PURE__ */ Symbol(`createVNode` );
29
+ const CREATE_ELEMENT_VNODE = /* @__PURE__ */ Symbol(
30
30
  `createElementVNode`
31
31
  );
32
- const CREATE_COMMENT = Symbol(
32
+ const CREATE_COMMENT = /* @__PURE__ */ Symbol(
33
33
  `createCommentVNode`
34
34
  );
35
- const CREATE_TEXT = Symbol(
35
+ const CREATE_TEXT = /* @__PURE__ */ Symbol(
36
36
  `createTextVNode`
37
37
  );
38
- const CREATE_STATIC = Symbol(
38
+ const CREATE_STATIC = /* @__PURE__ */ Symbol(
39
39
  `createStaticVNode`
40
40
  );
41
- const RESOLVE_COMPONENT = Symbol(
41
+ const RESOLVE_COMPONENT = /* @__PURE__ */ Symbol(
42
42
  `resolveComponent`
43
43
  );
44
- const RESOLVE_DYNAMIC_COMPONENT = Symbol(
44
+ const RESOLVE_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol(
45
45
  `resolveDynamicComponent`
46
46
  );
47
- const RESOLVE_DIRECTIVE = Symbol(
47
+ const RESOLVE_DIRECTIVE = /* @__PURE__ */ Symbol(
48
48
  `resolveDirective`
49
49
  );
50
- const RESOLVE_FILTER = Symbol(
50
+ const RESOLVE_FILTER = /* @__PURE__ */ Symbol(
51
51
  `resolveFilter`
52
52
  );
53
- const WITH_DIRECTIVES = Symbol(
53
+ const WITH_DIRECTIVES = /* @__PURE__ */ Symbol(
54
54
  `withDirectives`
55
55
  );
56
- const RENDER_LIST = Symbol(`renderList` );
57
- const RENDER_SLOT = Symbol(`renderSlot` );
58
- const CREATE_SLOTS = Symbol(`createSlots` );
59
- const TO_DISPLAY_STRING = Symbol(
56
+ const RENDER_LIST = /* @__PURE__ */ Symbol(`renderList` );
57
+ const RENDER_SLOT = /* @__PURE__ */ Symbol(`renderSlot` );
58
+ const CREATE_SLOTS = /* @__PURE__ */ Symbol(`createSlots` );
59
+ const TO_DISPLAY_STRING = /* @__PURE__ */ Symbol(
60
60
  `toDisplayString`
61
61
  );
62
- const MERGE_PROPS = Symbol(`mergeProps` );
63
- const NORMALIZE_CLASS = Symbol(
62
+ const MERGE_PROPS = /* @__PURE__ */ Symbol(`mergeProps` );
63
+ const NORMALIZE_CLASS = /* @__PURE__ */ Symbol(
64
64
  `normalizeClass`
65
65
  );
66
- const NORMALIZE_STYLE = Symbol(
66
+ const NORMALIZE_STYLE = /* @__PURE__ */ Symbol(
67
67
  `normalizeStyle`
68
68
  );
69
- const NORMALIZE_PROPS = Symbol(
69
+ const NORMALIZE_PROPS = /* @__PURE__ */ Symbol(
70
70
  `normalizeProps`
71
71
  );
72
- const GUARD_REACTIVE_PROPS = Symbol(
72
+ const GUARD_REACTIVE_PROPS = /* @__PURE__ */ Symbol(
73
73
  `guardReactiveProps`
74
74
  );
75
- const TO_HANDLERS = Symbol(`toHandlers` );
76
- const CAMELIZE = Symbol(`camelize` );
77
- const CAPITALIZE = Symbol(`capitalize` );
78
- const TO_HANDLER_KEY = Symbol(
75
+ const TO_HANDLERS = /* @__PURE__ */ Symbol(`toHandlers` );
76
+ const CAMELIZE = /* @__PURE__ */ Symbol(`camelize` );
77
+ const CAPITALIZE = /* @__PURE__ */ Symbol(`capitalize` );
78
+ const TO_HANDLER_KEY = /* @__PURE__ */ Symbol(
79
79
  `toHandlerKey`
80
80
  );
81
- const SET_BLOCK_TRACKING = Symbol(
81
+ const SET_BLOCK_TRACKING = /* @__PURE__ */ Symbol(
82
82
  `setBlockTracking`
83
83
  );
84
- const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
85
- const POP_SCOPE_ID = Symbol(`popScopeId` );
86
- const WITH_CTX = Symbol(`withCtx` );
87
- const UNREF = Symbol(`unref` );
88
- const IS_REF = Symbol(`isRef` );
89
- const WITH_MEMO = Symbol(`withMemo` );
90
- const IS_MEMO_SAME = Symbol(`isMemoSame` );
84
+ const PUSH_SCOPE_ID = /* @__PURE__ */ Symbol(`pushScopeId` );
85
+ const POP_SCOPE_ID = /* @__PURE__ */ Symbol(`popScopeId` );
86
+ const WITH_CTX = /* @__PURE__ */ Symbol(`withCtx` );
87
+ const UNREF = /* @__PURE__ */ Symbol(`unref` );
88
+ const IS_REF = /* @__PURE__ */ Symbol(`isRef` );
89
+ const WITH_MEMO = /* @__PURE__ */ Symbol(`withMemo` );
90
+ const IS_MEMO_SAME = /* @__PURE__ */ Symbol(`isMemoSame` );
91
91
  const helperNameMap = {
92
92
  [FRAGMENT]: `Fragment`,
93
93
  [TELEPORT]: `Teleport`,
@@ -486,8 +486,8 @@ class Tokenizer {
486
486
  this.currentSequence = void 0;
487
487
  this.sequenceIndex = 0;
488
488
  {
489
- this.entityDecoder = new decode_js.EntityDecoder(
490
- decode_js.htmlDecodeTree,
489
+ this.entityDecoder = new decode.EntityDecoder(
490
+ decode.htmlDecodeTree,
491
491
  (cp, consumed) => this.emitCodePoint(cp, consumed)
492
492
  );
493
493
  }
@@ -517,14 +517,28 @@ class Tokenizer {
517
517
  getPos(index) {
518
518
  let line = 1;
519
519
  let column = index + 1;
520
- for (let i = this.newlines.length - 1; i >= 0; i--) {
521
- const newlineIndex = this.newlines[i];
522
- if (index > newlineIndex) {
523
- line = i + 2;
524
- column = index - newlineIndex;
525
- break;
520
+ const length = this.newlines.length;
521
+ let j = -1;
522
+ if (length > 100) {
523
+ let l = -1;
524
+ let r = length;
525
+ while (l + 1 < r) {
526
+ const m = l + r >>> 1;
527
+ this.newlines[m] < index ? l = m : r = m;
528
+ }
529
+ j = l;
530
+ } else {
531
+ for (let i = length - 1; i >= 0; i--) {
532
+ if (index > this.newlines[i]) {
533
+ j = i;
534
+ break;
535
+ }
526
536
  }
527
537
  }
538
+ if (j >= 0) {
539
+ line = j + 2;
540
+ column = index - this.newlines[j];
541
+ }
528
542
  return {
529
543
  column,
530
544
  line,
@@ -1037,7 +1051,7 @@ class Tokenizer {
1037
1051
  this.state = 33;
1038
1052
  this.entityStart = this.index;
1039
1053
  this.entityDecoder.startEntity(
1040
- this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute
1054
+ this.baseState === 1 || this.baseState === 32 ? decode.DecodingMode.Legacy : decode.DecodingMode.Attribute
1041
1055
  );
1042
1056
  }
1043
1057
  }
@@ -1256,7 +1270,7 @@ class Tokenizer {
1256
1270
  this.sectionStart = this.entityStart + consumed;
1257
1271
  this.index = this.sectionStart - 1;
1258
1272
  this.cbs.onattribentity(
1259
- decode_js.fromCodePoint(cp),
1273
+ decode.fromCodePoint(cp),
1260
1274
  this.entityStart,
1261
1275
  this.sectionStart
1262
1276
  );
@@ -1267,7 +1281,7 @@ class Tokenizer {
1267
1281
  this.sectionStart = this.entityStart + consumed;
1268
1282
  this.index = this.sectionStart - 1;
1269
1283
  this.cbs.ontextentity(
1270
- decode_js.fromCodePoint(cp),
1284
+ decode.fromCodePoint(cp),
1271
1285
  this.entityStart,
1272
1286
  this.sectionStart
1273
1287
  );
@@ -1457,24 +1471,26 @@ const ErrorCodes = {
1457
1471
  "43": "X_V_MODEL_ON_SCOPE_VARIABLE",
1458
1472
  "X_V_MODEL_ON_PROPS": 44,
1459
1473
  "44": "X_V_MODEL_ON_PROPS",
1460
- "X_INVALID_EXPRESSION": 45,
1461
- "45": "X_INVALID_EXPRESSION",
1462
- "X_KEEP_ALIVE_INVALID_CHILDREN": 46,
1463
- "46": "X_KEEP_ALIVE_INVALID_CHILDREN",
1464
- "X_PREFIX_ID_NOT_SUPPORTED": 47,
1465
- "47": "X_PREFIX_ID_NOT_SUPPORTED",
1466
- "X_MODULE_MODE_NOT_SUPPORTED": 48,
1467
- "48": "X_MODULE_MODE_NOT_SUPPORTED",
1468
- "X_CACHE_HANDLER_NOT_SUPPORTED": 49,
1469
- "49": "X_CACHE_HANDLER_NOT_SUPPORTED",
1470
- "X_SCOPE_ID_NOT_SUPPORTED": 50,
1471
- "50": "X_SCOPE_ID_NOT_SUPPORTED",
1472
- "X_VNODE_HOOKS": 51,
1473
- "51": "X_VNODE_HOOKS",
1474
- "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52,
1475
- "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
1476
- "__EXTEND_POINT__": 53,
1477
- "53": "__EXTEND_POINT__"
1474
+ "X_V_MODEL_ON_CONST": 45,
1475
+ "45": "X_V_MODEL_ON_CONST",
1476
+ "X_INVALID_EXPRESSION": 46,
1477
+ "46": "X_INVALID_EXPRESSION",
1478
+ "X_KEEP_ALIVE_INVALID_CHILDREN": 47,
1479
+ "47": "X_KEEP_ALIVE_INVALID_CHILDREN",
1480
+ "X_PREFIX_ID_NOT_SUPPORTED": 48,
1481
+ "48": "X_PREFIX_ID_NOT_SUPPORTED",
1482
+ "X_MODULE_MODE_NOT_SUPPORTED": 49,
1483
+ "49": "X_MODULE_MODE_NOT_SUPPORTED",
1484
+ "X_CACHE_HANDLER_NOT_SUPPORTED": 50,
1485
+ "50": "X_CACHE_HANDLER_NOT_SUPPORTED",
1486
+ "X_SCOPE_ID_NOT_SUPPORTED": 51,
1487
+ "51": "X_SCOPE_ID_NOT_SUPPORTED",
1488
+ "X_VNODE_HOOKS": 52,
1489
+ "52": "X_VNODE_HOOKS",
1490
+ "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 53,
1491
+ "53": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
1492
+ "__EXTEND_POINT__": 54,
1493
+ "54": "__EXTEND_POINT__"
1478
1494
  };
1479
1495
  const errorMessages = {
1480
1496
  // parse errors
@@ -1515,7 +1531,7 @@ const errorMessages = {
1515
1531
  [32]: `v-for has invalid expression.`,
1516
1532
  [33]: `<template v-for> key should be placed on the <template> tag.`,
1517
1533
  [34]: `v-bind is missing expression.`,
1518
- [52]: `v-bind with same-name shorthand only allows static argument.`,
1534
+ [53]: `v-bind with same-name shorthand only allows static argument.`,
1519
1535
  [35]: `v-on is missing expression.`,
1520
1536
  [36]: `Unexpected custom directive on <slot> outlet.`,
1521
1537
  [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
@@ -1527,16 +1543,17 @@ const errorMessages = {
1527
1543
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
1528
1544
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
1529
1545
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
1530
- [45]: `Error parsing JavaScript expression: `,
1531
- [46]: `<KeepAlive> expects exactly one child component.`,
1532
- [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
1546
+ [45]: `v-model cannot be used on a const binding because it is not writable.`,
1547
+ [46]: `Error parsing JavaScript expression: `,
1548
+ [47]: `<KeepAlive> expects exactly one child component.`,
1549
+ [52]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
1533
1550
  // generic errors
1534
- [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
1535
- [48]: `ES module mode is not supported in this build of compiler.`,
1536
- [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
1537
- [50]: `"scopeId" option is only supported in module mode.`,
1551
+ [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
1552
+ [49]: `ES module mode is not supported in this build of compiler.`,
1553
+ [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
1554
+ [51]: `"scopeId" option is only supported in module mode.`,
1538
1555
  // just to fulfill types
1539
- [53]: ``
1556
+ [54]: ``
1540
1557
  };
1541
1558
 
1542
1559
  function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {
@@ -2326,7 +2343,7 @@ const tokenizer = new Tokenizer(stack, {
2326
2343
  let exp = getSlice(innerStart, innerEnd);
2327
2344
  if (exp.includes("&")) {
2328
2345
  {
2329
- exp = decode_js.decodeHTML(exp);
2346
+ exp = decode.decodeHTML(exp);
2330
2347
  }
2331
2348
  }
2332
2349
  addNode({
@@ -2987,7 +3004,7 @@ function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0
2987
3004
  }
2988
3005
  } catch (e) {
2989
3006
  exp.ast = false;
2990
- emitError(45, loc.start.offset, e.message);
3007
+ emitError(46, loc.start.offset, e.message);
2991
3008
  }
2992
3009
  }
2993
3010
  return exp;
@@ -4560,7 +4577,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
4560
4577
  } catch (e) {
4561
4578
  context.onError(
4562
4579
  createCompilerError(
4563
- 45,
4580
+ 46,
4564
4581
  node.loc,
4565
4582
  void 0,
4566
4583
  e.message
@@ -5444,7 +5461,7 @@ const transformElement = (node, context) => {
5444
5461
  patchFlag |= 1024;
5445
5462
  if (node.children.length > 1) {
5446
5463
  context.onError(
5447
- createCompilerError(46, {
5464
+ createCompilerError(47, {
5448
5465
  start: node.children[0].loc.start,
5449
5466
  end: node.children[node.children.length - 1].loc.end,
5450
5467
  source: ""
@@ -6107,7 +6124,7 @@ const transformOn = (dir, node, context, augmentor) => {
6107
6124
  if (arg.isStatic) {
6108
6125
  let rawName = arg.content;
6109
6126
  if (rawName.startsWith("vnode")) {
6110
- context.onError(createCompilerError(51, arg.loc));
6127
+ context.onError(createCompilerError(52, arg.loc));
6111
6128
  }
6112
6129
  if (rawName.startsWith("vue:")) {
6113
6130
  rawName = `vnode-${rawName.slice(4)}`;
@@ -6369,6 +6386,10 @@ const transformModel = (dir, node, context) => {
6369
6386
  context.onError(createCompilerError(44, exp.loc));
6370
6387
  return createTransformProps();
6371
6388
  }
6389
+ if (bindingType === "literal-const" || bindingType === "setup-const") {
6390
+ context.onError(createCompilerError(45, exp.loc));
6391
+ return createTransformProps();
6392
+ }
6372
6393
  const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref");
6373
6394
  if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) {
6374
6395
  context.onError(
@@ -6622,7 +6643,7 @@ const transformVBindShorthand = (node, context) => {
6622
6643
  if (arg.type !== 4 || !arg.isStatic) {
6623
6644
  context.onError(
6624
6645
  createCompilerError(
6625
- 52,
6646
+ 53,
6626
6647
  arg.loc
6627
6648
  )
6628
6649
  );
@@ -6670,10 +6691,10 @@ function baseCompile(source, options = {}) {
6670
6691
  const isModuleMode = options.mode === "module";
6671
6692
  const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode;
6672
6693
  if (!prefixIdentifiers && options.cacheHandlers) {
6673
- onError(createCompilerError(49));
6694
+ onError(createCompilerError(50));
6674
6695
  }
6675
6696
  if (options.scopeId && !isModuleMode) {
6676
- onError(createCompilerError(50));
6697
+ onError(createCompilerError(51));
6677
6698
  }
6678
6699
  const resolvedOptions = shared.extend({}, options, {
6679
6700
  prefixIdentifiers
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-core v3.5.25
2
+ * @vue/compiler-core v3.5.26
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -8,86 +8,86 @@
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
10
  var shared = require('@vue/shared');
11
- var decode_js = require('entities/lib/decode.js');
11
+ var decode = require('entities/decode');
12
12
  var parser = require('@babel/parser');
13
13
  var estreeWalker = require('estree-walker');
14
14
  var sourceMapJs = require('source-map-js');
15
15
 
16
- const FRAGMENT = Symbol(``);
17
- const TELEPORT = Symbol(``);
18
- const SUSPENSE = Symbol(``);
19
- const KEEP_ALIVE = Symbol(``);
20
- const BASE_TRANSITION = Symbol(
16
+ const FRAGMENT = /* @__PURE__ */ Symbol(``);
17
+ const TELEPORT = /* @__PURE__ */ Symbol(``);
18
+ const SUSPENSE = /* @__PURE__ */ Symbol(``);
19
+ const KEEP_ALIVE = /* @__PURE__ */ Symbol(``);
20
+ const BASE_TRANSITION = /* @__PURE__ */ Symbol(
21
21
  ``
22
22
  );
23
- const OPEN_BLOCK = Symbol(``);
24
- const CREATE_BLOCK = Symbol(``);
25
- const CREATE_ELEMENT_BLOCK = Symbol(
23
+ const OPEN_BLOCK = /* @__PURE__ */ Symbol(``);
24
+ const CREATE_BLOCK = /* @__PURE__ */ Symbol(``);
25
+ const CREATE_ELEMENT_BLOCK = /* @__PURE__ */ Symbol(
26
26
  ``
27
27
  );
28
- const CREATE_VNODE = Symbol(``);
29
- const CREATE_ELEMENT_VNODE = Symbol(
28
+ const CREATE_VNODE = /* @__PURE__ */ Symbol(``);
29
+ const CREATE_ELEMENT_VNODE = /* @__PURE__ */ Symbol(
30
30
  ``
31
31
  );
32
- const CREATE_COMMENT = Symbol(
32
+ const CREATE_COMMENT = /* @__PURE__ */ Symbol(
33
33
  ``
34
34
  );
35
- const CREATE_TEXT = Symbol(
35
+ const CREATE_TEXT = /* @__PURE__ */ Symbol(
36
36
  ``
37
37
  );
38
- const CREATE_STATIC = Symbol(
38
+ const CREATE_STATIC = /* @__PURE__ */ Symbol(
39
39
  ``
40
40
  );
41
- const RESOLVE_COMPONENT = Symbol(
41
+ const RESOLVE_COMPONENT = /* @__PURE__ */ Symbol(
42
42
  ``
43
43
  );
44
- const RESOLVE_DYNAMIC_COMPONENT = Symbol(
44
+ const RESOLVE_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol(
45
45
  ``
46
46
  );
47
- const RESOLVE_DIRECTIVE = Symbol(
47
+ const RESOLVE_DIRECTIVE = /* @__PURE__ */ Symbol(
48
48
  ``
49
49
  );
50
- const RESOLVE_FILTER = Symbol(
50
+ const RESOLVE_FILTER = /* @__PURE__ */ Symbol(
51
51
  ``
52
52
  );
53
- const WITH_DIRECTIVES = Symbol(
53
+ const WITH_DIRECTIVES = /* @__PURE__ */ Symbol(
54
54
  ``
55
55
  );
56
- const RENDER_LIST = Symbol(``);
57
- const RENDER_SLOT = Symbol(``);
58
- const CREATE_SLOTS = Symbol(``);
59
- const TO_DISPLAY_STRING = Symbol(
56
+ const RENDER_LIST = /* @__PURE__ */ Symbol(``);
57
+ const RENDER_SLOT = /* @__PURE__ */ Symbol(``);
58
+ const CREATE_SLOTS = /* @__PURE__ */ Symbol(``);
59
+ const TO_DISPLAY_STRING = /* @__PURE__ */ Symbol(
60
60
  ``
61
61
  );
62
- const MERGE_PROPS = Symbol(``);
63
- const NORMALIZE_CLASS = Symbol(
62
+ const MERGE_PROPS = /* @__PURE__ */ Symbol(``);
63
+ const NORMALIZE_CLASS = /* @__PURE__ */ Symbol(
64
64
  ``
65
65
  );
66
- const NORMALIZE_STYLE = Symbol(
66
+ const NORMALIZE_STYLE = /* @__PURE__ */ Symbol(
67
67
  ``
68
68
  );
69
- const NORMALIZE_PROPS = Symbol(
69
+ const NORMALIZE_PROPS = /* @__PURE__ */ Symbol(
70
70
  ``
71
71
  );
72
- const GUARD_REACTIVE_PROPS = Symbol(
72
+ const GUARD_REACTIVE_PROPS = /* @__PURE__ */ Symbol(
73
73
  ``
74
74
  );
75
- const TO_HANDLERS = Symbol(``);
76
- const CAMELIZE = Symbol(``);
77
- const CAPITALIZE = Symbol(``);
78
- const TO_HANDLER_KEY = Symbol(
75
+ const TO_HANDLERS = /* @__PURE__ */ Symbol(``);
76
+ const CAMELIZE = /* @__PURE__ */ Symbol(``);
77
+ const CAPITALIZE = /* @__PURE__ */ Symbol(``);
78
+ const TO_HANDLER_KEY = /* @__PURE__ */ Symbol(
79
79
  ``
80
80
  );
81
- const SET_BLOCK_TRACKING = Symbol(
81
+ const SET_BLOCK_TRACKING = /* @__PURE__ */ Symbol(
82
82
  ``
83
83
  );
84
- const PUSH_SCOPE_ID = Symbol(``);
85
- const POP_SCOPE_ID = Symbol(``);
86
- const WITH_CTX = Symbol(``);
87
- const UNREF = Symbol(``);
88
- const IS_REF = Symbol(``);
89
- const WITH_MEMO = Symbol(``);
90
- const IS_MEMO_SAME = Symbol(``);
84
+ const PUSH_SCOPE_ID = /* @__PURE__ */ Symbol(``);
85
+ const POP_SCOPE_ID = /* @__PURE__ */ Symbol(``);
86
+ const WITH_CTX = /* @__PURE__ */ Symbol(``);
87
+ const UNREF = /* @__PURE__ */ Symbol(``);
88
+ const IS_REF = /* @__PURE__ */ Symbol(``);
89
+ const WITH_MEMO = /* @__PURE__ */ Symbol(``);
90
+ const IS_MEMO_SAME = /* @__PURE__ */ Symbol(``);
91
91
  const helperNameMap = {
92
92
  [FRAGMENT]: `Fragment`,
93
93
  [TELEPORT]: `Teleport`,
@@ -486,8 +486,8 @@ class Tokenizer {
486
486
  this.currentSequence = void 0;
487
487
  this.sequenceIndex = 0;
488
488
  {
489
- this.entityDecoder = new decode_js.EntityDecoder(
490
- decode_js.htmlDecodeTree,
489
+ this.entityDecoder = new decode.EntityDecoder(
490
+ decode.htmlDecodeTree,
491
491
  (cp, consumed) => this.emitCodePoint(cp, consumed)
492
492
  );
493
493
  }
@@ -517,14 +517,28 @@ class Tokenizer {
517
517
  getPos(index) {
518
518
  let line = 1;
519
519
  let column = index + 1;
520
- for (let i = this.newlines.length - 1; i >= 0; i--) {
521
- const newlineIndex = this.newlines[i];
522
- if (index > newlineIndex) {
523
- line = i + 2;
524
- column = index - newlineIndex;
525
- break;
520
+ const length = this.newlines.length;
521
+ let j = -1;
522
+ if (length > 100) {
523
+ let l = -1;
524
+ let r = length;
525
+ while (l + 1 < r) {
526
+ const m = l + r >>> 1;
527
+ this.newlines[m] < index ? l = m : r = m;
528
+ }
529
+ j = l;
530
+ } else {
531
+ for (let i = length - 1; i >= 0; i--) {
532
+ if (index > this.newlines[i]) {
533
+ j = i;
534
+ break;
535
+ }
526
536
  }
527
537
  }
538
+ if (j >= 0) {
539
+ line = j + 2;
540
+ column = index - this.newlines[j];
541
+ }
528
542
  return {
529
543
  column,
530
544
  line,
@@ -1037,7 +1051,7 @@ class Tokenizer {
1037
1051
  this.state = 33;
1038
1052
  this.entityStart = this.index;
1039
1053
  this.entityDecoder.startEntity(
1040
- this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute
1054
+ this.baseState === 1 || this.baseState === 32 ? decode.DecodingMode.Legacy : decode.DecodingMode.Attribute
1041
1055
  );
1042
1056
  }
1043
1057
  }
@@ -1256,7 +1270,7 @@ class Tokenizer {
1256
1270
  this.sectionStart = this.entityStart + consumed;
1257
1271
  this.index = this.sectionStart - 1;
1258
1272
  this.cbs.onattribentity(
1259
- decode_js.fromCodePoint(cp),
1273
+ decode.fromCodePoint(cp),
1260
1274
  this.entityStart,
1261
1275
  this.sectionStart
1262
1276
  );
@@ -1267,7 +1281,7 @@ class Tokenizer {
1267
1281
  this.sectionStart = this.entityStart + consumed;
1268
1282
  this.index = this.sectionStart - 1;
1269
1283
  this.cbs.ontextentity(
1270
- decode_js.fromCodePoint(cp),
1284
+ decode.fromCodePoint(cp),
1271
1285
  this.entityStart,
1272
1286
  this.sectionStart
1273
1287
  );
@@ -1453,24 +1467,26 @@ const ErrorCodes = {
1453
1467
  "43": "X_V_MODEL_ON_SCOPE_VARIABLE",
1454
1468
  "X_V_MODEL_ON_PROPS": 44,
1455
1469
  "44": "X_V_MODEL_ON_PROPS",
1456
- "X_INVALID_EXPRESSION": 45,
1457
- "45": "X_INVALID_EXPRESSION",
1458
- "X_KEEP_ALIVE_INVALID_CHILDREN": 46,
1459
- "46": "X_KEEP_ALIVE_INVALID_CHILDREN",
1460
- "X_PREFIX_ID_NOT_SUPPORTED": 47,
1461
- "47": "X_PREFIX_ID_NOT_SUPPORTED",
1462
- "X_MODULE_MODE_NOT_SUPPORTED": 48,
1463
- "48": "X_MODULE_MODE_NOT_SUPPORTED",
1464
- "X_CACHE_HANDLER_NOT_SUPPORTED": 49,
1465
- "49": "X_CACHE_HANDLER_NOT_SUPPORTED",
1466
- "X_SCOPE_ID_NOT_SUPPORTED": 50,
1467
- "50": "X_SCOPE_ID_NOT_SUPPORTED",
1468
- "X_VNODE_HOOKS": 51,
1469
- "51": "X_VNODE_HOOKS",
1470
- "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52,
1471
- "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
1472
- "__EXTEND_POINT__": 53,
1473
- "53": "__EXTEND_POINT__"
1470
+ "X_V_MODEL_ON_CONST": 45,
1471
+ "45": "X_V_MODEL_ON_CONST",
1472
+ "X_INVALID_EXPRESSION": 46,
1473
+ "46": "X_INVALID_EXPRESSION",
1474
+ "X_KEEP_ALIVE_INVALID_CHILDREN": 47,
1475
+ "47": "X_KEEP_ALIVE_INVALID_CHILDREN",
1476
+ "X_PREFIX_ID_NOT_SUPPORTED": 48,
1477
+ "48": "X_PREFIX_ID_NOT_SUPPORTED",
1478
+ "X_MODULE_MODE_NOT_SUPPORTED": 49,
1479
+ "49": "X_MODULE_MODE_NOT_SUPPORTED",
1480
+ "X_CACHE_HANDLER_NOT_SUPPORTED": 50,
1481
+ "50": "X_CACHE_HANDLER_NOT_SUPPORTED",
1482
+ "X_SCOPE_ID_NOT_SUPPORTED": 51,
1483
+ "51": "X_SCOPE_ID_NOT_SUPPORTED",
1484
+ "X_VNODE_HOOKS": 52,
1485
+ "52": "X_VNODE_HOOKS",
1486
+ "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 53,
1487
+ "53": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
1488
+ "__EXTEND_POINT__": 54,
1489
+ "54": "__EXTEND_POINT__"
1474
1490
  };
1475
1491
  const errorMessages = {
1476
1492
  // parse errors
@@ -1511,7 +1527,7 @@ const errorMessages = {
1511
1527
  [32]: `v-for has invalid expression.`,
1512
1528
  [33]: `<template v-for> key should be placed on the <template> tag.`,
1513
1529
  [34]: `v-bind is missing expression.`,
1514
- [52]: `v-bind with same-name shorthand only allows static argument.`,
1530
+ [53]: `v-bind with same-name shorthand only allows static argument.`,
1515
1531
  [35]: `v-on is missing expression.`,
1516
1532
  [36]: `Unexpected custom directive on <slot> outlet.`,
1517
1533
  [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
@@ -1523,16 +1539,17 @@ const errorMessages = {
1523
1539
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
1524
1540
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
1525
1541
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
1526
- [45]: `Error parsing JavaScript expression: `,
1527
- [46]: `<KeepAlive> expects exactly one child component.`,
1528
- [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
1542
+ [45]: `v-model cannot be used on a const binding because it is not writable.`,
1543
+ [46]: `Error parsing JavaScript expression: `,
1544
+ [47]: `<KeepAlive> expects exactly one child component.`,
1545
+ [52]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
1529
1546
  // generic errors
1530
- [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
1531
- [48]: `ES module mode is not supported in this build of compiler.`,
1532
- [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
1533
- [50]: `"scopeId" option is only supported in module mode.`,
1547
+ [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
1548
+ [49]: `ES module mode is not supported in this build of compiler.`,
1549
+ [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
1550
+ [51]: `"scopeId" option is only supported in module mode.`,
1534
1551
  // just to fulfill types
1535
- [53]: ``
1552
+ [54]: ``
1536
1553
  };
1537
1554
 
1538
1555
  function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {
@@ -2322,7 +2339,7 @@ const tokenizer = new Tokenizer(stack, {
2322
2339
  let exp = getSlice(innerStart, innerEnd);
2323
2340
  if (exp.includes("&")) {
2324
2341
  {
2325
- exp = decode_js.decodeHTML(exp);
2342
+ exp = decode.decodeHTML(exp);
2326
2343
  }
2327
2344
  }
2328
2345
  addNode({
@@ -2953,7 +2970,7 @@ function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0
2953
2970
  }
2954
2971
  } catch (e) {
2955
2972
  exp.ast = false;
2956
- emitError(45, loc.start.offset, e.message);
2973
+ emitError(46, loc.start.offset, e.message);
2957
2974
  }
2958
2975
  }
2959
2976
  return exp;
@@ -4484,7 +4501,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
4484
4501
  } catch (e) {
4485
4502
  context.onError(
4486
4503
  createCompilerError(
4487
- 45,
4504
+ 46,
4488
4505
  node.loc,
4489
4506
  void 0,
4490
4507
  e.message
@@ -6249,6 +6266,10 @@ const transformModel = (dir, node, context) => {
6249
6266
  context.onError(createCompilerError(44, exp.loc));
6250
6267
  return createTransformProps();
6251
6268
  }
6269
+ if (bindingType === "literal-const" || bindingType === "setup-const") {
6270
+ context.onError(createCompilerError(45, exp.loc));
6271
+ return createTransformProps();
6272
+ }
6252
6273
  const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref");
6253
6274
  if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) {
6254
6275
  context.onError(
@@ -6497,7 +6518,7 @@ const transformVBindShorthand = (node, context) => {
6497
6518
  if (arg.type !== 4 || !arg.isStatic) {
6498
6519
  context.onError(
6499
6520
  createCompilerError(
6500
- 52,
6521
+ 53,
6501
6522
  arg.loc
6502
6523
  )
6503
6524
  );
@@ -6545,10 +6566,10 @@ function baseCompile(source, options = {}) {
6545
6566
  const isModuleMode = options.mode === "module";
6546
6567
  const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode;
6547
6568
  if (!prefixIdentifiers && options.cacheHandlers) {
6548
- onError(createCompilerError(49));
6569
+ onError(createCompilerError(50));
6549
6570
  }
6550
6571
  if (options.scopeId && !isModuleMode) {
6551
- onError(createCompilerError(50));
6572
+ onError(createCompilerError(51));
6552
6573
  }
6553
6574
  const resolvedOptions = shared.extend({}, options, {
6554
6575
  prefixIdentifiers
@@ -615,15 +615,16 @@ export declare enum ErrorCodes {
615
615
  X_V_MODEL_MALFORMED_EXPRESSION = 42,
616
616
  X_V_MODEL_ON_SCOPE_VARIABLE = 43,
617
617
  X_V_MODEL_ON_PROPS = 44,
618
- X_INVALID_EXPRESSION = 45,
619
- X_KEEP_ALIVE_INVALID_CHILDREN = 46,
620
- X_PREFIX_ID_NOT_SUPPORTED = 47,
621
- X_MODULE_MODE_NOT_SUPPORTED = 48,
622
- X_CACHE_HANDLER_NOT_SUPPORTED = 49,
623
- X_SCOPE_ID_NOT_SUPPORTED = 50,
624
- X_VNODE_HOOKS = 51,
625
- X_V_BIND_INVALID_SAME_NAME_ARGUMENT = 52,
626
- __EXTEND_POINT__ = 53
618
+ X_V_MODEL_ON_CONST = 45,
619
+ X_INVALID_EXPRESSION = 46,
620
+ X_KEEP_ALIVE_INVALID_CHILDREN = 47,
621
+ X_PREFIX_ID_NOT_SUPPORTED = 48,
622
+ X_MODULE_MODE_NOT_SUPPORTED = 49,
623
+ X_CACHE_HANDLER_NOT_SUPPORTED = 50,
624
+ X_SCOPE_ID_NOT_SUPPORTED = 51,
625
+ X_VNODE_HOOKS = 52,
626
+ X_V_BIND_INVALID_SAME_NAME_ARGUMENT = 53,
627
+ __EXTEND_POINT__ = 54
627
628
  }
628
629
  export declare const errorMessages: Record<ErrorCodes, string>;
629
630
 
@@ -1,86 +1,86 @@
1
1
  /**
2
- * @vue/compiler-core v3.5.25
2
+ * @vue/compiler-core v3.5.26
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
6
  import { isString, NOOP, isObject, extend, NO, isSymbol, PatchFlagNames, isArray, capitalize, camelize, EMPTY_OBJ, slotFlagsText, isOn, isBuiltInDirective, isReservedProp, toHandlerKey } from '@vue/shared';
7
7
  export { generateCodeFrame } from '@vue/shared';
8
8
 
9
- const FRAGMENT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Fragment` : ``);
10
- const TELEPORT = Symbol(!!(process.env.NODE_ENV !== "production") ? `Teleport` : ``);
11
- const SUSPENSE = Symbol(!!(process.env.NODE_ENV !== "production") ? `Suspense` : ``);
12
- const KEEP_ALIVE = Symbol(!!(process.env.NODE_ENV !== "production") ? `KeepAlive` : ``);
13
- const BASE_TRANSITION = Symbol(
9
+ const FRAGMENT = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `Fragment` : ``);
10
+ const TELEPORT = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `Teleport` : ``);
11
+ const SUSPENSE = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `Suspense` : ``);
12
+ const KEEP_ALIVE = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `KeepAlive` : ``);
13
+ const BASE_TRANSITION = /* @__PURE__ */ Symbol(
14
14
  !!(process.env.NODE_ENV !== "production") ? `BaseTransition` : ``
15
15
  );
16
- const OPEN_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `openBlock` : ``);
17
- const CREATE_BLOCK = Symbol(!!(process.env.NODE_ENV !== "production") ? `createBlock` : ``);
18
- const CREATE_ELEMENT_BLOCK = Symbol(
16
+ const OPEN_BLOCK = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `openBlock` : ``);
17
+ const CREATE_BLOCK = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `createBlock` : ``);
18
+ const CREATE_ELEMENT_BLOCK = /* @__PURE__ */ Symbol(
19
19
  !!(process.env.NODE_ENV !== "production") ? `createElementBlock` : ``
20
20
  );
21
- const CREATE_VNODE = Symbol(!!(process.env.NODE_ENV !== "production") ? `createVNode` : ``);
22
- const CREATE_ELEMENT_VNODE = Symbol(
21
+ const CREATE_VNODE = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `createVNode` : ``);
22
+ const CREATE_ELEMENT_VNODE = /* @__PURE__ */ Symbol(
23
23
  !!(process.env.NODE_ENV !== "production") ? `createElementVNode` : ``
24
24
  );
25
- const CREATE_COMMENT = Symbol(
25
+ const CREATE_COMMENT = /* @__PURE__ */ Symbol(
26
26
  !!(process.env.NODE_ENV !== "production") ? `createCommentVNode` : ``
27
27
  );
28
- const CREATE_TEXT = Symbol(
28
+ const CREATE_TEXT = /* @__PURE__ */ Symbol(
29
29
  !!(process.env.NODE_ENV !== "production") ? `createTextVNode` : ``
30
30
  );
31
- const CREATE_STATIC = Symbol(
31
+ const CREATE_STATIC = /* @__PURE__ */ Symbol(
32
32
  !!(process.env.NODE_ENV !== "production") ? `createStaticVNode` : ``
33
33
  );
34
- const RESOLVE_COMPONENT = Symbol(
34
+ const RESOLVE_COMPONENT = /* @__PURE__ */ Symbol(
35
35
  !!(process.env.NODE_ENV !== "production") ? `resolveComponent` : ``
36
36
  );
37
- const RESOLVE_DYNAMIC_COMPONENT = Symbol(
37
+ const RESOLVE_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol(
38
38
  !!(process.env.NODE_ENV !== "production") ? `resolveDynamicComponent` : ``
39
39
  );
40
- const RESOLVE_DIRECTIVE = Symbol(
40
+ const RESOLVE_DIRECTIVE = /* @__PURE__ */ Symbol(
41
41
  !!(process.env.NODE_ENV !== "production") ? `resolveDirective` : ``
42
42
  );
43
- const RESOLVE_FILTER = Symbol(
43
+ const RESOLVE_FILTER = /* @__PURE__ */ Symbol(
44
44
  !!(process.env.NODE_ENV !== "production") ? `resolveFilter` : ``
45
45
  );
46
- const WITH_DIRECTIVES = Symbol(
46
+ const WITH_DIRECTIVES = /* @__PURE__ */ Symbol(
47
47
  !!(process.env.NODE_ENV !== "production") ? `withDirectives` : ``
48
48
  );
49
- const RENDER_LIST = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderList` : ``);
50
- const RENDER_SLOT = Symbol(!!(process.env.NODE_ENV !== "production") ? `renderSlot` : ``);
51
- const CREATE_SLOTS = Symbol(!!(process.env.NODE_ENV !== "production") ? `createSlots` : ``);
52
- const TO_DISPLAY_STRING = Symbol(
49
+ const RENDER_LIST = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `renderList` : ``);
50
+ const RENDER_SLOT = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `renderSlot` : ``);
51
+ const CREATE_SLOTS = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `createSlots` : ``);
52
+ const TO_DISPLAY_STRING = /* @__PURE__ */ Symbol(
53
53
  !!(process.env.NODE_ENV !== "production") ? `toDisplayString` : ``
54
54
  );
55
- const MERGE_PROPS = Symbol(!!(process.env.NODE_ENV !== "production") ? `mergeProps` : ``);
56
- const NORMALIZE_CLASS = Symbol(
55
+ const MERGE_PROPS = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `mergeProps` : ``);
56
+ const NORMALIZE_CLASS = /* @__PURE__ */ Symbol(
57
57
  !!(process.env.NODE_ENV !== "production") ? `normalizeClass` : ``
58
58
  );
59
- const NORMALIZE_STYLE = Symbol(
59
+ const NORMALIZE_STYLE = /* @__PURE__ */ Symbol(
60
60
  !!(process.env.NODE_ENV !== "production") ? `normalizeStyle` : ``
61
61
  );
62
- const NORMALIZE_PROPS = Symbol(
62
+ const NORMALIZE_PROPS = /* @__PURE__ */ Symbol(
63
63
  !!(process.env.NODE_ENV !== "production") ? `normalizeProps` : ``
64
64
  );
65
- const GUARD_REACTIVE_PROPS = Symbol(
65
+ const GUARD_REACTIVE_PROPS = /* @__PURE__ */ Symbol(
66
66
  !!(process.env.NODE_ENV !== "production") ? `guardReactiveProps` : ``
67
67
  );
68
- const TO_HANDLERS = Symbol(!!(process.env.NODE_ENV !== "production") ? `toHandlers` : ``);
69
- const CAMELIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `camelize` : ``);
70
- const CAPITALIZE = Symbol(!!(process.env.NODE_ENV !== "production") ? `capitalize` : ``);
71
- const TO_HANDLER_KEY = Symbol(
68
+ const TO_HANDLERS = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `toHandlers` : ``);
69
+ const CAMELIZE = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `camelize` : ``);
70
+ const CAPITALIZE = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `capitalize` : ``);
71
+ const TO_HANDLER_KEY = /* @__PURE__ */ Symbol(
72
72
  !!(process.env.NODE_ENV !== "production") ? `toHandlerKey` : ``
73
73
  );
74
- const SET_BLOCK_TRACKING = Symbol(
74
+ const SET_BLOCK_TRACKING = /* @__PURE__ */ Symbol(
75
75
  !!(process.env.NODE_ENV !== "production") ? `setBlockTracking` : ``
76
76
  );
77
- const PUSH_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `pushScopeId` : ``);
78
- const POP_SCOPE_ID = Symbol(!!(process.env.NODE_ENV !== "production") ? `popScopeId` : ``);
79
- const WITH_CTX = Symbol(!!(process.env.NODE_ENV !== "production") ? `withCtx` : ``);
80
- const UNREF = Symbol(!!(process.env.NODE_ENV !== "production") ? `unref` : ``);
81
- const IS_REF = Symbol(!!(process.env.NODE_ENV !== "production") ? `isRef` : ``);
82
- const WITH_MEMO = Symbol(!!(process.env.NODE_ENV !== "production") ? `withMemo` : ``);
83
- const IS_MEMO_SAME = Symbol(!!(process.env.NODE_ENV !== "production") ? `isMemoSame` : ``);
77
+ const PUSH_SCOPE_ID = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `pushScopeId` : ``);
78
+ const POP_SCOPE_ID = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `popScopeId` : ``);
79
+ const WITH_CTX = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `withCtx` : ``);
80
+ const UNREF = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `unref` : ``);
81
+ const IS_REF = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `isRef` : ``);
82
+ const WITH_MEMO = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `withMemo` : ``);
83
+ const IS_MEMO_SAME = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `isMemoSame` : ``);
84
84
  const helperNameMap = {
85
85
  [FRAGMENT]: `Fragment`,
86
86
  [TELEPORT]: `Teleport`,
@@ -504,14 +504,28 @@ class Tokenizer {
504
504
  getPos(index) {
505
505
  let line = 1;
506
506
  let column = index + 1;
507
- for (let i = this.newlines.length - 1; i >= 0; i--) {
508
- const newlineIndex = this.newlines[i];
509
- if (index > newlineIndex) {
510
- line = i + 2;
511
- column = index - newlineIndex;
512
- break;
507
+ const length = this.newlines.length;
508
+ let j = -1;
509
+ if (length > 100) {
510
+ let l = -1;
511
+ let r = length;
512
+ while (l + 1 < r) {
513
+ const m = l + r >>> 1;
514
+ this.newlines[m] < index ? l = m : r = m;
515
+ }
516
+ j = l;
517
+ } else {
518
+ for (let i = length - 1; i >= 0; i--) {
519
+ if (index > this.newlines[i]) {
520
+ j = i;
521
+ break;
522
+ }
513
523
  }
514
524
  }
525
+ if (j >= 0) {
526
+ line = j + 2;
527
+ column = index - this.newlines[j];
528
+ }
515
529
  return {
516
530
  column,
517
531
  line,
@@ -1388,24 +1402,26 @@ const ErrorCodes = {
1388
1402
  "43": "X_V_MODEL_ON_SCOPE_VARIABLE",
1389
1403
  "X_V_MODEL_ON_PROPS": 44,
1390
1404
  "44": "X_V_MODEL_ON_PROPS",
1391
- "X_INVALID_EXPRESSION": 45,
1392
- "45": "X_INVALID_EXPRESSION",
1393
- "X_KEEP_ALIVE_INVALID_CHILDREN": 46,
1394
- "46": "X_KEEP_ALIVE_INVALID_CHILDREN",
1395
- "X_PREFIX_ID_NOT_SUPPORTED": 47,
1396
- "47": "X_PREFIX_ID_NOT_SUPPORTED",
1397
- "X_MODULE_MODE_NOT_SUPPORTED": 48,
1398
- "48": "X_MODULE_MODE_NOT_SUPPORTED",
1399
- "X_CACHE_HANDLER_NOT_SUPPORTED": 49,
1400
- "49": "X_CACHE_HANDLER_NOT_SUPPORTED",
1401
- "X_SCOPE_ID_NOT_SUPPORTED": 50,
1402
- "50": "X_SCOPE_ID_NOT_SUPPORTED",
1403
- "X_VNODE_HOOKS": 51,
1404
- "51": "X_VNODE_HOOKS",
1405
- "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52,
1406
- "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
1407
- "__EXTEND_POINT__": 53,
1408
- "53": "__EXTEND_POINT__"
1405
+ "X_V_MODEL_ON_CONST": 45,
1406
+ "45": "X_V_MODEL_ON_CONST",
1407
+ "X_INVALID_EXPRESSION": 46,
1408
+ "46": "X_INVALID_EXPRESSION",
1409
+ "X_KEEP_ALIVE_INVALID_CHILDREN": 47,
1410
+ "47": "X_KEEP_ALIVE_INVALID_CHILDREN",
1411
+ "X_PREFIX_ID_NOT_SUPPORTED": 48,
1412
+ "48": "X_PREFIX_ID_NOT_SUPPORTED",
1413
+ "X_MODULE_MODE_NOT_SUPPORTED": 49,
1414
+ "49": "X_MODULE_MODE_NOT_SUPPORTED",
1415
+ "X_CACHE_HANDLER_NOT_SUPPORTED": 50,
1416
+ "50": "X_CACHE_HANDLER_NOT_SUPPORTED",
1417
+ "X_SCOPE_ID_NOT_SUPPORTED": 51,
1418
+ "51": "X_SCOPE_ID_NOT_SUPPORTED",
1419
+ "X_VNODE_HOOKS": 52,
1420
+ "52": "X_VNODE_HOOKS",
1421
+ "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 53,
1422
+ "53": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
1423
+ "__EXTEND_POINT__": 54,
1424
+ "54": "__EXTEND_POINT__"
1409
1425
  };
1410
1426
  const errorMessages = {
1411
1427
  // parse errors
@@ -1446,7 +1462,7 @@ const errorMessages = {
1446
1462
  [32]: `v-for has invalid expression.`,
1447
1463
  [33]: `<template v-for> key should be placed on the <template> tag.`,
1448
1464
  [34]: `v-bind is missing expression.`,
1449
- [52]: `v-bind with same-name shorthand only allows static argument.`,
1465
+ [53]: `v-bind with same-name shorthand only allows static argument.`,
1450
1466
  [35]: `v-on is missing expression.`,
1451
1467
  [36]: `Unexpected custom directive on <slot> outlet.`,
1452
1468
  [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
@@ -1458,16 +1474,17 @@ const errorMessages = {
1458
1474
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
1459
1475
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
1460
1476
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
1461
- [45]: `Error parsing JavaScript expression: `,
1462
- [46]: `<KeepAlive> expects exactly one child component.`,
1463
- [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
1477
+ [45]: `v-model cannot be used on a const binding because it is not writable.`,
1478
+ [46]: `Error parsing JavaScript expression: `,
1479
+ [47]: `<KeepAlive> expects exactly one child component.`,
1480
+ [52]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
1464
1481
  // generic errors
1465
- [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
1466
- [48]: `ES module mode is not supported in this build of compiler.`,
1467
- [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
1468
- [50]: `"scopeId" option is only supported in module mode.`,
1482
+ [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
1483
+ [49]: `ES module mode is not supported in this build of compiler.`,
1484
+ [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
1485
+ [51]: `"scopeId" option is only supported in module mode.`,
1469
1486
  // just to fulfill types
1470
- [53]: ``
1487
+ [54]: ``
1471
1488
  };
1472
1489
 
1473
1490
  function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {
@@ -3874,7 +3891,7 @@ function validateBrowserExpression(node, context, asParams = false, asRawStateme
3874
3891
  }
3875
3892
  context.onError(
3876
3893
  createCompilerError(
3877
- 45,
3894
+ 46,
3878
3895
  node.loc,
3879
3896
  void 0,
3880
3897
  message
@@ -4668,7 +4685,7 @@ const transformElement = (node, context) => {
4668
4685
  patchFlag |= 1024;
4669
4686
  if (!!(process.env.NODE_ENV !== "production") && node.children.length > 1) {
4670
4687
  context.onError(
4671
- createCompilerError(46, {
4688
+ createCompilerError(47, {
4672
4689
  start: node.children[0].loc.start,
4673
4690
  end: node.children[node.children.length - 1].loc.end,
4674
4691
  source: ""
@@ -5255,7 +5272,7 @@ const transformOn = (dir, node, context, augmentor) => {
5255
5272
  if (arg.isStatic) {
5256
5273
  let rawName = arg.content;
5257
5274
  if (!!(process.env.NODE_ENV !== "production") && rawName.startsWith("vnode")) {
5258
- context.onError(createCompilerError(51, arg.loc));
5275
+ context.onError(createCompilerError(52, arg.loc));
5259
5276
  }
5260
5277
  if (rawName.startsWith("vue:")) {
5261
5278
  rawName = `vnode-${rawName.slice(4)}`;
@@ -5488,6 +5505,10 @@ const transformModel = (dir, node, context) => {
5488
5505
  context.onError(createCompilerError(44, exp.loc));
5489
5506
  return createTransformProps();
5490
5507
  }
5508
+ if (bindingType === "literal-const" || bindingType === "setup-const") {
5509
+ context.onError(createCompilerError(45, exp.loc));
5510
+ return createTransformProps();
5511
+ }
5491
5512
  if (!expString.trim() || !isMemberExpression(exp) && true) {
5492
5513
  context.onError(
5493
5514
  createCompilerError(42, exp.loc)
@@ -5716,7 +5737,7 @@ const transformVBindShorthand = (node, context) => {
5716
5737
  if (arg.type !== 4 || !arg.isStatic) {
5717
5738
  context.onError(
5718
5739
  createCompilerError(
5719
- 52,
5740
+ 53,
5720
5741
  arg.loc
5721
5742
  )
5722
5743
  );
@@ -5760,17 +5781,17 @@ function baseCompile(source, options = {}) {
5760
5781
  const isModuleMode = options.mode === "module";
5761
5782
  {
5762
5783
  if (options.prefixIdentifiers === true) {
5763
- onError(createCompilerError(47));
5764
- } else if (isModuleMode) {
5765
5784
  onError(createCompilerError(48));
5785
+ } else if (isModuleMode) {
5786
+ onError(createCompilerError(49));
5766
5787
  }
5767
5788
  }
5768
5789
  const prefixIdentifiers = false;
5769
5790
  if (options.cacheHandlers) {
5770
- onError(createCompilerError(49));
5791
+ onError(createCompilerError(50));
5771
5792
  }
5772
5793
  if (options.scopeId && !isModuleMode) {
5773
- onError(createCompilerError(50));
5794
+ onError(createCompilerError(51));
5774
5795
  }
5775
5796
  const resolvedOptions = extend({}, options, {
5776
5797
  prefixIdentifiers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-core",
3
- "version": "3.5.25",
3
+ "version": "3.5.26",
4
4
  "description": "@vue/compiler-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/compiler-core.esm-bundler.js",
@@ -47,10 +47,10 @@
47
47
  "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
48
48
  "dependencies": {
49
49
  "@babel/parser": "^7.28.5",
50
- "entities": "^4.5.0",
50
+ "entities": "^7.0.0",
51
51
  "estree-walker": "^2.0.2",
52
52
  "source-map-js": "^1.2.1",
53
- "@vue/shared": "3.5.25"
53
+ "@vue/shared": "3.5.26"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@babel/types": "^7.28.5"