@vue/compat 3.5.25 → 3.5.27

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.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.25
2
+ * @vue/compat v3.5.27
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -7,7 +7,7 @@
7
7
 
8
8
  var parser = require('@babel/parser');
9
9
  var estreeWalker = require('estree-walker');
10
- var decode_js = require('entities/lib/decode.js');
10
+ var decode = require('entities/decode');
11
11
  var sourceMapJs = require('source-map-js');
12
12
 
13
13
  // @__NO_SIDE_EFFECTS__
@@ -1055,13 +1055,13 @@ function addSub(link) {
1055
1055
  }
1056
1056
  }
1057
1057
  const targetMap = /* @__PURE__ */ new WeakMap();
1058
- const ITERATE_KEY = Symbol(
1058
+ const ITERATE_KEY = /* @__PURE__ */ Symbol(
1059
1059
  "Object iterate"
1060
1060
  );
1061
- const MAP_KEY_ITERATE_KEY = Symbol(
1061
+ const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
1062
1062
  "Map keys iterate"
1063
1063
  );
1064
- const ARRAY_ITERATE_KEY = Symbol(
1064
+ const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
1065
1065
  "Array iterate"
1066
1066
  );
1067
1067
  function track(target, type, key) {
@@ -1544,20 +1544,20 @@ function createIterableMethod(method, isReadonly2, isShallow2) {
1544
1544
  "iterate",
1545
1545
  isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
1546
1546
  );
1547
- return {
1548
- // iterator protocol
1549
- next() {
1550
- const { value, done } = innerIterator.next();
1551
- return done ? { value, done } : {
1552
- value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
1553
- done
1554
- };
1555
- },
1556
- // iterable protocol
1557
- [Symbol.iterator]() {
1558
- return this;
1547
+ return extend(
1548
+ // inheriting all iterator properties
1549
+ Object.create(innerIterator),
1550
+ {
1551
+ // iterator protocol
1552
+ next() {
1553
+ const { value, done } = innerIterator.next();
1554
+ return done ? { value, done } : {
1555
+ value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
1556
+ done
1557
+ };
1558
+ }
1559
1559
  }
1560
- };
1560
+ );
1561
1561
  };
1562
1562
  }
1563
1563
  function createReadonlyMethod(type) {
@@ -1771,8 +1771,9 @@ function targetTypeMap(rawType) {
1771
1771
  function getTargetType(value) {
1772
1772
  return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
1773
1773
  }
1774
+ // @__NO_SIDE_EFFECTS__
1774
1775
  function reactive(target) {
1775
- if (isReadonly(target)) {
1776
+ if (/* @__PURE__ */ isReadonly(target)) {
1776
1777
  return target;
1777
1778
  }
1778
1779
  return createReactiveObject(
@@ -1783,6 +1784,7 @@ function reactive(target) {
1783
1784
  reactiveMap
1784
1785
  );
1785
1786
  }
1787
+ // @__NO_SIDE_EFFECTS__
1786
1788
  function shallowReactive(target) {
1787
1789
  return createReactiveObject(
1788
1790
  target,
@@ -1792,6 +1794,7 @@ function shallowReactive(target) {
1792
1794
  shallowReactiveMap
1793
1795
  );
1794
1796
  }
1797
+ // @__NO_SIDE_EFFECTS__
1795
1798
  function readonly(target) {
1796
1799
  return createReactiveObject(
1797
1800
  target,
@@ -1801,6 +1804,7 @@ function readonly(target) {
1801
1804
  readonlyMap
1802
1805
  );
1803
1806
  }
1807
+ // @__NO_SIDE_EFFECTS__
1804
1808
  function shallowReadonly(target) {
1805
1809
  return createReactiveObject(
1806
1810
  target,
@@ -1839,24 +1843,29 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
1839
1843
  proxyMap.set(target, proxy);
1840
1844
  return proxy;
1841
1845
  }
1846
+ // @__NO_SIDE_EFFECTS__
1842
1847
  function isReactive(value) {
1843
- if (isReadonly(value)) {
1844
- return isReactive(value["__v_raw"]);
1848
+ if (/* @__PURE__ */ isReadonly(value)) {
1849
+ return /* @__PURE__ */ isReactive(value["__v_raw"]);
1845
1850
  }
1846
1851
  return !!(value && value["__v_isReactive"]);
1847
1852
  }
1853
+ // @__NO_SIDE_EFFECTS__
1848
1854
  function isReadonly(value) {
1849
1855
  return !!(value && value["__v_isReadonly"]);
1850
1856
  }
1857
+ // @__NO_SIDE_EFFECTS__
1851
1858
  function isShallow(value) {
1852
1859
  return !!(value && value["__v_isShallow"]);
1853
1860
  }
1861
+ // @__NO_SIDE_EFFECTS__
1854
1862
  function isProxy(value) {
1855
1863
  return value ? !!value["__v_raw"] : false;
1856
1864
  }
1865
+ // @__NO_SIDE_EFFECTS__
1857
1866
  function toRaw(observed) {
1858
1867
  const raw = observed && observed["__v_raw"];
1859
- return raw ? toRaw(raw) : observed;
1868
+ return raw ? /* @__PURE__ */ toRaw(raw) : observed;
1860
1869
  }
1861
1870
  function markRaw(value) {
1862
1871
  if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
@@ -1864,20 +1873,23 @@ function markRaw(value) {
1864
1873
  }
1865
1874
  return value;
1866
1875
  }
1867
- const toReactive = (value) => isObject(value) ? reactive(value) : value;
1868
- const toReadonly = (value) => isObject(value) ? readonly(value) : value;
1876
+ const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value) : value;
1877
+ const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
1869
1878
 
1879
+ // @__NO_SIDE_EFFECTS__
1870
1880
  function isRef(r) {
1871
1881
  return r ? r["__v_isRef"] === true : false;
1872
1882
  }
1883
+ // @__NO_SIDE_EFFECTS__
1873
1884
  function ref(value) {
1874
1885
  return createRef(value, false);
1875
1886
  }
1887
+ // @__NO_SIDE_EFFECTS__
1876
1888
  function shallowRef(value) {
1877
1889
  return createRef(value, true);
1878
1890
  }
1879
1891
  function createRef(rawValue, shallow) {
1880
- if (isRef(rawValue)) {
1892
+ if (/* @__PURE__ */ isRef(rawValue)) {
1881
1893
  return rawValue;
1882
1894
  }
1883
1895
  return new RefImpl(rawValue, shallow);
@@ -1933,7 +1945,7 @@ function triggerRef(ref2) {
1933
1945
  }
1934
1946
  }
1935
1947
  function unref(ref2) {
1936
- return isRef(ref2) ? ref2.value : ref2;
1948
+ return /* @__PURE__ */ isRef(ref2) ? ref2.value : ref2;
1937
1949
  }
1938
1950
  function toValue(source) {
1939
1951
  return isFunction(source) ? source() : unref(source);
@@ -1942,7 +1954,7 @@ const shallowUnwrapHandlers = {
1942
1954
  get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
1943
1955
  set: (target, key, value, receiver) => {
1944
1956
  const oldValue = target[key];
1945
- if (isRef(oldValue) && !isRef(value)) {
1957
+ if (/* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
1946
1958
  oldValue.value = value;
1947
1959
  return true;
1948
1960
  } else {
@@ -1972,6 +1984,7 @@ class CustomRefImpl {
1972
1984
  function customRef(factory) {
1973
1985
  return new CustomRefImpl(factory);
1974
1986
  }
1987
+ // @__NO_SIDE_EFFECTS__
1975
1988
  function toRefs(object) {
1976
1989
  if (!isProxy(object)) {
1977
1990
  warn$2(`toRefs() expects a reactive object but received a plain one.`);
@@ -2007,9 +2020,9 @@ class ObjectRefImpl {
2007
2020
  return this._value = val === void 0 ? this._defaultValue : val;
2008
2021
  }
2009
2022
  set value(newVal) {
2010
- if (this._shallow && isRef(this._raw[this._key])) {
2023
+ if (this._shallow && /* @__PURE__ */ isRef(this._raw[this._key])) {
2011
2024
  const nestedRef = this._object[this._key];
2012
- if (isRef(nestedRef)) {
2025
+ if (/* @__PURE__ */ isRef(nestedRef)) {
2013
2026
  nestedRef.value = newVal;
2014
2027
  return;
2015
2028
  }
@@ -2031,15 +2044,16 @@ class GetterRefImpl {
2031
2044
  return this._value = this._getter();
2032
2045
  }
2033
2046
  }
2047
+ // @__NO_SIDE_EFFECTS__
2034
2048
  function toRef(source, key, defaultValue) {
2035
- if (isRef(source)) {
2049
+ if (/* @__PURE__ */ isRef(source)) {
2036
2050
  return source;
2037
2051
  } else if (isFunction(source)) {
2038
2052
  return new GetterRefImpl(source);
2039
2053
  } else if (isObject(source) && arguments.length > 1) {
2040
2054
  return propertyToRef(source, key, defaultValue);
2041
2055
  } else {
2042
- return ref(source);
2056
+ return /* @__PURE__ */ ref(source);
2043
2057
  }
2044
2058
  }
2045
2059
  function propertyToRef(source, key, defaultValue) {
@@ -2120,6 +2134,7 @@ class ComputedRefImpl {
2120
2134
  }
2121
2135
  }
2122
2136
  }
2137
+ // @__NO_SIDE_EFFECTS__
2123
2138
  function computed$1(getterOrOptions, debugOptions, isSSR = false) {
2124
2139
  let getter;
2125
2140
  let setter;
@@ -3429,65 +3444,6 @@ function emit$1(instance, event, args) {
3429
3444
  return instance.proxy;
3430
3445
  }
3431
3446
 
3432
- const compatModelEventPrefix = `onModelCompat:`;
3433
- const warnedTypes = /* @__PURE__ */ new WeakSet();
3434
- function convertLegacyVModelProps(vnode) {
3435
- const { type, shapeFlag, props, dynamicProps } = vnode;
3436
- const comp = type;
3437
- if (shapeFlag & 6 && props && "modelValue" in props) {
3438
- if (!isCompatEnabled$1(
3439
- "COMPONENT_V_MODEL",
3440
- // this is a special case where we want to use the vnode component's
3441
- // compat config instead of the current rendering instance (which is the
3442
- // parent of the component that exposes v-model)
3443
- { type }
3444
- )) {
3445
- return;
3446
- }
3447
- if (!warnedTypes.has(comp)) {
3448
- pushWarningContext(vnode);
3449
- warnDeprecation$1("COMPONENT_V_MODEL", { type }, comp);
3450
- popWarningContext();
3451
- warnedTypes.add(comp);
3452
- }
3453
- const model = comp.model || {};
3454
- applyModelFromMixins(model, comp.mixins);
3455
- const { prop = "value", event = "input" } = model;
3456
- if (prop !== "modelValue") {
3457
- props[prop] = props.modelValue;
3458
- delete props.modelValue;
3459
- }
3460
- if (dynamicProps) {
3461
- dynamicProps[dynamicProps.indexOf("modelValue")] = prop;
3462
- }
3463
- props[compatModelEventPrefix + event] = props["onUpdate:modelValue"];
3464
- delete props["onUpdate:modelValue"];
3465
- }
3466
- }
3467
- function applyModelFromMixins(model, mixins) {
3468
- if (mixins) {
3469
- mixins.forEach((m) => {
3470
- if (m.model) extend(model, m.model);
3471
- if (m.mixins) applyModelFromMixins(model, m.mixins);
3472
- });
3473
- }
3474
- }
3475
- function compatModelEmit(instance, event, args) {
3476
- if (!isCompatEnabled$1("COMPONENT_V_MODEL", instance)) {
3477
- return;
3478
- }
3479
- const props = instance.vnode.props;
3480
- const modelHandler = props && props[compatModelEventPrefix + event];
3481
- if (modelHandler) {
3482
- callWithErrorHandling(
3483
- modelHandler,
3484
- instance,
3485
- 6,
3486
- args
3487
- );
3488
- }
3489
- }
3490
-
3491
3447
  let currentRenderingInstance = null;
3492
3448
  let currentScopeId = null;
3493
3449
  function setCurrentRenderingInstance(instance) {
@@ -3638,7 +3594,180 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3638
3594
  }
3639
3595
  }
3640
3596
 
3641
- const TeleportEndKey = Symbol("_vte");
3597
+ function provide(key, value) {
3598
+ {
3599
+ if (!currentInstance || currentInstance.isMounted) {
3600
+ warn$1(`provide() can only be used inside setup().`);
3601
+ }
3602
+ }
3603
+ if (currentInstance) {
3604
+ let provides = currentInstance.provides;
3605
+ const parentProvides = currentInstance.parent && currentInstance.parent.provides;
3606
+ if (parentProvides === provides) {
3607
+ provides = currentInstance.provides = Object.create(parentProvides);
3608
+ }
3609
+ provides[key] = value;
3610
+ }
3611
+ }
3612
+ function inject(key, defaultValue, treatDefaultAsFactory = false) {
3613
+ const instance = getCurrentInstance();
3614
+ if (instance || currentApp) {
3615
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
3616
+ if (provides && key in provides) {
3617
+ return provides[key];
3618
+ } else if (arguments.length > 1) {
3619
+ return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
3620
+ } else {
3621
+ warn$1(`injection "${String(key)}" not found.`);
3622
+ }
3623
+ } else {
3624
+ warn$1(`inject() can only be used inside setup() or functional components.`);
3625
+ }
3626
+ }
3627
+ function hasInjectionContext() {
3628
+ return !!(getCurrentInstance() || currentApp);
3629
+ }
3630
+
3631
+ const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
3632
+ const useSSRContext = () => {
3633
+ {
3634
+ const ctx = inject(ssrContextKey);
3635
+ if (!ctx) {
3636
+ warn$1(
3637
+ `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
3638
+ );
3639
+ }
3640
+ return ctx;
3641
+ }
3642
+ };
3643
+
3644
+ function watchEffect(effect, options) {
3645
+ return doWatch(effect, null, options);
3646
+ }
3647
+ function watchPostEffect(effect, options) {
3648
+ return doWatch(
3649
+ effect,
3650
+ null,
3651
+ extend({}, options, { flush: "post" })
3652
+ );
3653
+ }
3654
+ function watchSyncEffect(effect, options) {
3655
+ return doWatch(
3656
+ effect,
3657
+ null,
3658
+ extend({}, options, { flush: "sync" })
3659
+ );
3660
+ }
3661
+ function watch(source, cb, options) {
3662
+ if (!isFunction(cb)) {
3663
+ warn$1(
3664
+ `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
3665
+ );
3666
+ }
3667
+ return doWatch(source, cb, options);
3668
+ }
3669
+ function doWatch(source, cb, options = EMPTY_OBJ) {
3670
+ const { immediate, deep, flush, once } = options;
3671
+ if (!cb) {
3672
+ if (immediate !== void 0) {
3673
+ warn$1(
3674
+ `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
3675
+ );
3676
+ }
3677
+ if (deep !== void 0) {
3678
+ warn$1(
3679
+ `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
3680
+ );
3681
+ }
3682
+ if (once !== void 0) {
3683
+ warn$1(
3684
+ `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
3685
+ );
3686
+ }
3687
+ }
3688
+ const baseWatchOptions = extend({}, options);
3689
+ baseWatchOptions.onWarn = warn$1;
3690
+ const runsImmediately = cb && immediate || !cb && flush !== "post";
3691
+ let ssrCleanup;
3692
+ if (isInSSRComponentSetup) {
3693
+ if (flush === "sync") {
3694
+ const ctx = useSSRContext();
3695
+ ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
3696
+ } else if (!runsImmediately) {
3697
+ const watchStopHandle = () => {
3698
+ };
3699
+ watchStopHandle.stop = NOOP;
3700
+ watchStopHandle.resume = NOOP;
3701
+ watchStopHandle.pause = NOOP;
3702
+ return watchStopHandle;
3703
+ }
3704
+ }
3705
+ const instance = currentInstance;
3706
+ baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
3707
+ let isPre = false;
3708
+ if (flush === "post") {
3709
+ baseWatchOptions.scheduler = (job) => {
3710
+ queuePostRenderEffect(job, instance && instance.suspense);
3711
+ };
3712
+ } else if (flush !== "sync") {
3713
+ isPre = true;
3714
+ baseWatchOptions.scheduler = (job, isFirstRun) => {
3715
+ if (isFirstRun) {
3716
+ job();
3717
+ } else {
3718
+ queueJob(job);
3719
+ }
3720
+ };
3721
+ }
3722
+ baseWatchOptions.augmentJob = (job) => {
3723
+ if (cb) {
3724
+ job.flags |= 4;
3725
+ }
3726
+ if (isPre) {
3727
+ job.flags |= 2;
3728
+ if (instance) {
3729
+ job.id = instance.uid;
3730
+ job.i = instance;
3731
+ }
3732
+ }
3733
+ };
3734
+ const watchHandle = watch$1(source, cb, baseWatchOptions);
3735
+ if (isInSSRComponentSetup) {
3736
+ if (ssrCleanup) {
3737
+ ssrCleanup.push(watchHandle);
3738
+ } else if (runsImmediately) {
3739
+ watchHandle();
3740
+ }
3741
+ }
3742
+ return watchHandle;
3743
+ }
3744
+ function instanceWatch(source, value, options) {
3745
+ const publicThis = this.proxy;
3746
+ const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
3747
+ let cb;
3748
+ if (isFunction(value)) {
3749
+ cb = value;
3750
+ } else {
3751
+ cb = value.handler;
3752
+ options = value;
3753
+ }
3754
+ const reset = setCurrentInstance(this);
3755
+ const res = doWatch(getter, cb.bind(publicThis), options);
3756
+ reset();
3757
+ return res;
3758
+ }
3759
+ function createPathGetter(ctx, path) {
3760
+ const segments = path.split(".");
3761
+ return () => {
3762
+ let cur = ctx;
3763
+ for (let i = 0; i < segments.length && cur; i++) {
3764
+ cur = cur[segments[i]];
3765
+ }
3766
+ return cur;
3767
+ };
3768
+ }
3769
+
3770
+ const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3642
3771
  const isTeleport = (type) => type.__isTeleport;
3643
3772
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
3644
3773
  const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
@@ -3998,8 +4127,8 @@ function prepareAnchor(target, vnode, createText, insert) {
3998
4127
  return targetAnchor;
3999
4128
  }
4000
4129
 
4001
- const leaveCbKey = Symbol("_leaveCb");
4002
- const enterCbKey$1 = Symbol("_enterCb");
4130
+ const leaveCbKey = /* @__PURE__ */ Symbol("_leaveCb");
4131
+ const enterCbKey$1 = /* @__PURE__ */ Symbol("_enterCb");
4003
4132
  function useTransitionState() {
4004
4133
  const state = {
4005
4134
  isMounted: false,
@@ -4850,7 +4979,7 @@ Server rendered element contains more child nodes than client vdom.`
4850
4979
  logMismatchError();
4851
4980
  }
4852
4981
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
4853
- key[0] === "." || isCustomElement) {
4982
+ key[0] === "." || isCustomElement && !isReservedProp(key)) {
4854
4983
  patchProp(el, key, null, props[key], void 0, parentComponent);
4855
4984
  }
4856
4985
  }
@@ -5536,7 +5665,9 @@ const KeepAliveImpl = {
5536
5665
  }
5537
5666
  function pruneCache(filter) {
5538
5667
  cache.forEach((vnode, key) => {
5539
- const name = getComponentName(vnode.type);
5668
+ const name = getComponentName(
5669
+ isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type
5670
+ );
5540
5671
  if (name && !filter(name)) {
5541
5672
  pruneCacheEntry(key);
5542
5673
  }
@@ -5803,7 +5934,7 @@ const FILTERS = "filters";
5803
5934
  function resolveComponent(name, maybeSelfReference) {
5804
5935
  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
5805
5936
  }
5806
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
5937
+ const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
5807
5938
  function resolveDynamicComponent(component) {
5808
5939
  if (isString(component)) {
5809
5940
  return resolveAsset(COMPONENTS, component, false) || component;
@@ -7368,7 +7499,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7368
7499
  return vm;
7369
7500
  }
7370
7501
  }
7371
- Vue.version = `2.6.14-compat:${"3.5.25"}`;
7502
+ Vue.version = `2.6.14-compat:${"3.5.27"}`;
7372
7503
  Vue.config = singletonApp.config;
7373
7504
  Vue.use = (plugin, ...options) => {
7374
7505
  if (plugin && isFunction(plugin.install)) {
@@ -7945,177 +8076,70 @@ If you want to remount the same app, move your app creation logic into a factory
7945
8076
  }
7946
8077
  let currentApp = null;
7947
8078
 
7948
- function provide(key, value) {
7949
- {
7950
- if (!currentInstance || currentInstance.isMounted) {
7951
- warn$1(`provide() can only be used inside setup().`);
8079
+ const compatModelEventPrefix = `onModelCompat:`;
8080
+ const warnedTypes = /* @__PURE__ */ new WeakSet();
8081
+ function convertLegacyVModelProps(vnode) {
8082
+ const { type, shapeFlag, props, dynamicProps } = vnode;
8083
+ const comp = type;
8084
+ if (shapeFlag & 6 && props && "modelValue" in props) {
8085
+ if (!isCompatEnabled$1(
8086
+ "COMPONENT_V_MODEL",
8087
+ // this is a special case where we want to use the vnode component's
8088
+ // compat config instead of the current rendering instance (which is the
8089
+ // parent of the component that exposes v-model)
8090
+ { type }
8091
+ )) {
8092
+ return;
7952
8093
  }
7953
- }
7954
- if (currentInstance) {
7955
- let provides = currentInstance.provides;
7956
- const parentProvides = currentInstance.parent && currentInstance.parent.provides;
7957
- if (parentProvides === provides) {
7958
- provides = currentInstance.provides = Object.create(parentProvides);
8094
+ if (!warnedTypes.has(comp)) {
8095
+ pushWarningContext(vnode);
8096
+ warnDeprecation$1(
8097
+ "COMPONENT_V_MODEL",
8098
+ {
8099
+ type,
8100
+ appContext: vnode.ctx && vnode.ctx.appContext || createAppContext()
8101
+ },
8102
+ comp
8103
+ );
8104
+ popWarningContext();
8105
+ warnedTypes.add(comp);
7959
8106
  }
7960
- provides[key] = value;
7961
- }
7962
- }
7963
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
7964
- const instance = getCurrentInstance();
7965
- if (instance || currentApp) {
7966
- let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
7967
- if (provides && key in provides) {
7968
- return provides[key];
7969
- } else if (arguments.length > 1) {
7970
- return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
7971
- } else {
7972
- warn$1(`injection "${String(key)}" not found.`);
8107
+ const model = comp.model || {};
8108
+ applyModelFromMixins(model, comp.mixins);
8109
+ const { prop = "value", event = "input" } = model;
8110
+ if (prop !== "modelValue") {
8111
+ props[prop] = props.modelValue;
8112
+ delete props.modelValue;
7973
8113
  }
7974
- } else {
7975
- warn$1(`inject() can only be used inside setup() or functional components.`);
7976
- }
7977
- }
7978
- function hasInjectionContext() {
7979
- return !!(getCurrentInstance() || currentApp);
7980
- }
7981
-
7982
- const ssrContextKey = Symbol.for("v-scx");
7983
- const useSSRContext = () => {
7984
- {
7985
- const ctx = inject(ssrContextKey);
7986
- if (!ctx) {
7987
- warn$1(
7988
- `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
7989
- );
8114
+ if (dynamicProps) {
8115
+ dynamicProps[dynamicProps.indexOf("modelValue")] = prop;
7990
8116
  }
7991
- return ctx;
8117
+ props[compatModelEventPrefix + event] = props["onUpdate:modelValue"];
8118
+ delete props["onUpdate:modelValue"];
7992
8119
  }
7993
- };
7994
-
7995
- function watchEffect(effect, options) {
7996
- return doWatch(effect, null, options);
7997
- }
7998
- function watchPostEffect(effect, options) {
7999
- return doWatch(
8000
- effect,
8001
- null,
8002
- extend({}, options, { flush: "post" })
8003
- );
8004
- }
8005
- function watchSyncEffect(effect, options) {
8006
- return doWatch(
8007
- effect,
8008
- null,
8009
- extend({}, options, { flush: "sync" })
8010
- );
8011
8120
  }
8012
- function watch(source, cb, options) {
8013
- if (!isFunction(cb)) {
8014
- warn$1(
8015
- `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
8016
- );
8121
+ function applyModelFromMixins(model, mixins) {
8122
+ if (mixins) {
8123
+ mixins.forEach((m) => {
8124
+ if (m.model) extend(model, m.model);
8125
+ if (m.mixins) applyModelFromMixins(model, m.mixins);
8126
+ });
8017
8127
  }
8018
- return doWatch(source, cb, options);
8019
8128
  }
8020
- function doWatch(source, cb, options = EMPTY_OBJ) {
8021
- const { immediate, deep, flush, once } = options;
8022
- if (!cb) {
8023
- if (immediate !== void 0) {
8024
- warn$1(
8025
- `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
8026
- );
8027
- }
8028
- if (deep !== void 0) {
8029
- warn$1(
8030
- `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
8031
- );
8032
- }
8033
- if (once !== void 0) {
8034
- warn$1(
8035
- `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
8036
- );
8037
- }
8038
- }
8039
- const baseWatchOptions = extend({}, options);
8040
- baseWatchOptions.onWarn = warn$1;
8041
- const runsImmediately = cb && immediate || !cb && flush !== "post";
8042
- let ssrCleanup;
8043
- if (isInSSRComponentSetup) {
8044
- if (flush === "sync") {
8045
- const ctx = useSSRContext();
8046
- ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
8047
- } else if (!runsImmediately) {
8048
- const watchStopHandle = () => {
8049
- };
8050
- watchStopHandle.stop = NOOP;
8051
- watchStopHandle.resume = NOOP;
8052
- watchStopHandle.pause = NOOP;
8053
- return watchStopHandle;
8054
- }
8055
- }
8056
- const instance = currentInstance;
8057
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
8058
- let isPre = false;
8059
- if (flush === "post") {
8060
- baseWatchOptions.scheduler = (job) => {
8061
- queuePostRenderEffect(job, instance && instance.suspense);
8062
- };
8063
- } else if (flush !== "sync") {
8064
- isPre = true;
8065
- baseWatchOptions.scheduler = (job, isFirstRun) => {
8066
- if (isFirstRun) {
8067
- job();
8068
- } else {
8069
- queueJob(job);
8070
- }
8071
- };
8072
- }
8073
- baseWatchOptions.augmentJob = (job) => {
8074
- if (cb) {
8075
- job.flags |= 4;
8076
- }
8077
- if (isPre) {
8078
- job.flags |= 2;
8079
- if (instance) {
8080
- job.id = instance.uid;
8081
- job.i = instance;
8082
- }
8083
- }
8084
- };
8085
- const watchHandle = watch$1(source, cb, baseWatchOptions);
8086
- if (isInSSRComponentSetup) {
8087
- if (ssrCleanup) {
8088
- ssrCleanup.push(watchHandle);
8089
- } else if (runsImmediately) {
8090
- watchHandle();
8091
- }
8129
+ function compatModelEmit(instance, event, args) {
8130
+ if (!isCompatEnabled$1("COMPONENT_V_MODEL", instance)) {
8131
+ return;
8092
8132
  }
8093
- return watchHandle;
8094
- }
8095
- function instanceWatch(source, value, options) {
8096
- const publicThis = this.proxy;
8097
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
8098
- let cb;
8099
- if (isFunction(value)) {
8100
- cb = value;
8101
- } else {
8102
- cb = value.handler;
8103
- options = value;
8133
+ const props = instance.vnode.props;
8134
+ const modelHandler = props && props[compatModelEventPrefix + event];
8135
+ if (modelHandler) {
8136
+ callWithErrorHandling(
8137
+ modelHandler,
8138
+ instance,
8139
+ 6,
8140
+ args
8141
+ );
8104
8142
  }
8105
- const reset = setCurrentInstance(this);
8106
- const res = doWatch(getter, cb.bind(publicThis), options);
8107
- reset();
8108
- return res;
8109
- }
8110
- function createPathGetter(ctx, path) {
8111
- const segments = path.split(".");
8112
- return () => {
8113
- let cur = ctx;
8114
- for (let i = 0; i < segments.length && cur; i++) {
8115
- cur = cur[segments[i]];
8116
- }
8117
- return cur;
8118
- };
8119
8143
  }
8120
8144
 
8121
8145
  function useModel(props, name, options = EMPTY_OBJ) {
@@ -9401,7 +9425,15 @@ function baseCreateRenderer(options, createHydrationFns) {
9401
9425
  } else {
9402
9426
  const el = n2.el = n1.el;
9403
9427
  if (n2.children !== n1.children) {
9404
- hostSetText(el, n2.children);
9428
+ if (isHmrUpdating && n2.patchFlag === -1 && "__elIndex" in n1) {
9429
+ const childNodes = container.childNodes;
9430
+ const newChild = hostCreateText(n2.children);
9431
+ const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
9432
+ hostInsert(newChild, container, oldChild);
9433
+ hostRemove(oldChild);
9434
+ } else {
9435
+ hostSetText(el, n2.children);
9436
+ }
9405
9437
  }
9406
9438
  }
9407
9439
  };
@@ -9787,7 +9819,7 @@ function baseCreateRenderer(options, createHydrationFns) {
9787
9819
  } else {
9788
9820
  if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
9789
9821
  // of renderSlot() with no valid children
9790
- n1.dynamicChildren) {
9822
+ n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {
9791
9823
  patchBlockChildren(
9792
9824
  n1.dynamicChildren,
9793
9825
  dynamicChildren,
@@ -10401,8 +10433,8 @@ function baseCreateRenderer(options, createHydrationFns) {
10401
10433
  const nextChild = c2[nextIndex];
10402
10434
  const anchorVNode = c2[nextIndex + 1];
10403
10435
  const anchor = nextIndex + 1 < l2 ? (
10404
- // #13559, fallback to el placeholder for unresolved async component
10405
- anchorVNode.el || anchorVNode.placeholder
10436
+ // #13559, #14173 fallback to el placeholder for unresolved async component
10437
+ anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
10406
10438
  ) : parentAnchor;
10407
10439
  if (newIndexToOldIndexMap[i] === 0) {
10408
10440
  patch(
@@ -10667,9 +10699,11 @@ function baseCreateRenderer(options, createHydrationFns) {
10667
10699
  };
10668
10700
  let isFlushing = false;
10669
10701
  const render = (vnode, container, namespace) => {
10702
+ let instance;
10670
10703
  if (vnode == null) {
10671
10704
  if (container._vnode) {
10672
10705
  unmount(container._vnode, null, null, true);
10706
+ instance = container._vnode.component;
10673
10707
  }
10674
10708
  } else {
10675
10709
  patch(
@@ -10685,7 +10719,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10685
10719
  container._vnode = vnode;
10686
10720
  if (!isFlushing) {
10687
10721
  isFlushing = true;
10688
- flushPreFlushCbs();
10722
+ flushPreFlushCbs(instance);
10689
10723
  flushPostFlushCbs();
10690
10724
  isFlushing = false;
10691
10725
  }
@@ -10745,9 +10779,13 @@ function traverseStaticChildren(n1, n2, shallow = false) {
10745
10779
  if (!shallow && c2.patchFlag !== -2)
10746
10780
  traverseStaticChildren(c1, c2);
10747
10781
  }
10748
- if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
10749
- c2.patchFlag !== -1) {
10750
- c2.el = c1.el;
10782
+ if (c2.type === Text) {
10783
+ if (c2.patchFlag !== -1) {
10784
+ c2.el = c1.el;
10785
+ } else {
10786
+ c2.__elIndex = i + // take fragment start anchor into account
10787
+ (n1.type === Fragment ? 1 : 0);
10788
+ }
10751
10789
  }
10752
10790
  if (c2.type === Comment && !c2.el) {
10753
10791
  c2.el = c1.el;
@@ -10814,6 +10852,16 @@ function invalidateMount(hooks) {
10814
10852
  hooks[i].flags |= 8;
10815
10853
  }
10816
10854
  }
10855
+ function resolveAsyncComponentPlaceholder(anchorVnode) {
10856
+ if (anchorVnode.placeholder) {
10857
+ return anchorVnode.placeholder;
10858
+ }
10859
+ const instance = anchorVnode.component;
10860
+ if (instance) {
10861
+ return resolveAsyncComponentPlaceholder(instance.subTree);
10862
+ }
10863
+ return null;
10864
+ }
10817
10865
 
10818
10866
  const isSuspense = (type) => type.__isSuspense;
10819
10867
  let suspenseId = 0;
@@ -11473,10 +11521,10 @@ function convertLegacyComponent(comp, instance) {
11473
11521
  return comp;
11474
11522
  }
11475
11523
 
11476
- const Fragment = Symbol.for("v-fgt");
11477
- const Text = Symbol.for("v-txt");
11478
- const Comment = Symbol.for("v-cmt");
11479
- const Static = Symbol.for("v-stc");
11524
+ const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
11525
+ const Text = /* @__PURE__ */ Symbol.for("v-txt");
11526
+ const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
11527
+ const Static = /* @__PURE__ */ Symbol.for("v-stc");
11480
11528
  const blockStack = [];
11481
11529
  let currentBlock = null;
11482
11530
  function openBlock(disableTracking = false) {
@@ -12542,7 +12590,7 @@ function isMemoSame(cached, memo) {
12542
12590
  return true;
12543
12591
  }
12544
12592
 
12545
- const version = "3.5.25";
12593
+ const version = "3.5.27";
12546
12594
  const warn = warn$1 ;
12547
12595
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12548
12596
  const devtools = devtools$1 ;
@@ -12654,7 +12702,7 @@ const nodeOps = {
12654
12702
 
12655
12703
  const TRANSITION$1 = "transition";
12656
12704
  const ANIMATION = "animation";
12657
- const vtcKey = Symbol("_vtc");
12705
+ const vtcKey = /* @__PURE__ */ Symbol("_vtc");
12658
12706
  const DOMTransitionPropsValidators = {
12659
12707
  name: String,
12660
12708
  type: String,
@@ -12984,8 +13032,8 @@ function patchClass(el, value, isSVG) {
12984
13032
  }
12985
13033
  }
12986
13034
 
12987
- const vShowOriginalDisplay = Symbol("_vod");
12988
- const vShowHidden = Symbol("_vsh");
13035
+ const vShowOriginalDisplay = /* @__PURE__ */ Symbol("_vod");
13036
+ const vShowHidden = /* @__PURE__ */ Symbol("_vsh");
12989
13037
  const vShow = {
12990
13038
  // used for prop mismatch check during hydration
12991
13039
  name: "show",
@@ -13034,7 +13082,7 @@ function initVShowForSSR() {
13034
13082
  };
13035
13083
  }
13036
13084
 
13037
- const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
13085
+ const CSS_VAR_TEXT = /* @__PURE__ */ Symbol("CSS_VAR_TEXT" );
13038
13086
  function useCssVars(getter) {
13039
13087
  return;
13040
13088
  }
@@ -13164,7 +13212,7 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
13164
13212
  const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
13165
13213
  function compatCoerceAttr(el, key, value, instance = null) {
13166
13214
  if (isEnumeratedAttr(key)) {
13167
- const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
13215
+ const v2CoercedValue = value === void 0 ? null : value === null || value === false || value === "false" ? "false" : "true";
13168
13216
  if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
13169
13217
  "ATTR_ENUMERATED_COERCION",
13170
13218
  instance,
@@ -13260,7 +13308,7 @@ function addEventListener(el, event, handler, options) {
13260
13308
  function removeEventListener(el, event, handler, options) {
13261
13309
  el.removeEventListener(event, handler, options);
13262
13310
  }
13263
- const veiKey = Symbol("_vei");
13311
+ const veiKey = /* @__PURE__ */ Symbol("_vei");
13264
13312
  function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
13265
13313
  const invokers = el[veiKey] || (el[veiKey] = {});
13266
13314
  const existingInvoker = invokers[rawName];
@@ -13898,8 +13946,8 @@ function useCssModule(name = "$style") {
13898
13946
 
13899
13947
  const positionMap = /* @__PURE__ */ new WeakMap();
13900
13948
  const newPositionMap = /* @__PURE__ */ new WeakMap();
13901
- const moveCbKey = Symbol("_moveCb");
13902
- const enterCbKey = Symbol("_enterCb");
13949
+ const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
13950
+ const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
13903
13951
  const decorate = (t) => {
13904
13952
  delete t.props.mode;
13905
13953
  {
@@ -14061,7 +14109,7 @@ function onCompositionEnd(e) {
14061
14109
  target.dispatchEvent(new Event("input"));
14062
14110
  }
14063
14111
  }
14064
- const assignKey = Symbol("_assign");
14112
+ const assignKey = /* @__PURE__ */ Symbol("_assign");
14065
14113
  function castValue(value, trim, number) {
14066
14114
  if (trim) value = value.trim();
14067
14115
  if (number) value = looseToNumber(value);
@@ -14741,81 +14789,81 @@ function createCompatVue() {
14741
14789
  return Vue;
14742
14790
  }
14743
14791
 
14744
- const FRAGMENT = Symbol(`Fragment` );
14745
- const TELEPORT = Symbol(`Teleport` );
14746
- const SUSPENSE = Symbol(`Suspense` );
14747
- const KEEP_ALIVE = Symbol(`KeepAlive` );
14748
- const BASE_TRANSITION = Symbol(
14792
+ const FRAGMENT = /* @__PURE__ */ Symbol(`Fragment` );
14793
+ const TELEPORT = /* @__PURE__ */ Symbol(`Teleport` );
14794
+ const SUSPENSE = /* @__PURE__ */ Symbol(`Suspense` );
14795
+ const KEEP_ALIVE = /* @__PURE__ */ Symbol(`KeepAlive` );
14796
+ const BASE_TRANSITION = /* @__PURE__ */ Symbol(
14749
14797
  `BaseTransition`
14750
14798
  );
14751
- const OPEN_BLOCK = Symbol(`openBlock` );
14752
- const CREATE_BLOCK = Symbol(`createBlock` );
14753
- const CREATE_ELEMENT_BLOCK = Symbol(
14799
+ const OPEN_BLOCK = /* @__PURE__ */ Symbol(`openBlock` );
14800
+ const CREATE_BLOCK = /* @__PURE__ */ Symbol(`createBlock` );
14801
+ const CREATE_ELEMENT_BLOCK = /* @__PURE__ */ Symbol(
14754
14802
  `createElementBlock`
14755
14803
  );
14756
- const CREATE_VNODE = Symbol(`createVNode` );
14757
- const CREATE_ELEMENT_VNODE = Symbol(
14804
+ const CREATE_VNODE = /* @__PURE__ */ Symbol(`createVNode` );
14805
+ const CREATE_ELEMENT_VNODE = /* @__PURE__ */ Symbol(
14758
14806
  `createElementVNode`
14759
14807
  );
14760
- const CREATE_COMMENT = Symbol(
14808
+ const CREATE_COMMENT = /* @__PURE__ */ Symbol(
14761
14809
  `createCommentVNode`
14762
14810
  );
14763
- const CREATE_TEXT = Symbol(
14811
+ const CREATE_TEXT = /* @__PURE__ */ Symbol(
14764
14812
  `createTextVNode`
14765
14813
  );
14766
- const CREATE_STATIC = Symbol(
14814
+ const CREATE_STATIC = /* @__PURE__ */ Symbol(
14767
14815
  `createStaticVNode`
14768
14816
  );
14769
- const RESOLVE_COMPONENT = Symbol(
14817
+ const RESOLVE_COMPONENT = /* @__PURE__ */ Symbol(
14770
14818
  `resolveComponent`
14771
14819
  );
14772
- const RESOLVE_DYNAMIC_COMPONENT = Symbol(
14820
+ const RESOLVE_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol(
14773
14821
  `resolveDynamicComponent`
14774
14822
  );
14775
- const RESOLVE_DIRECTIVE = Symbol(
14823
+ const RESOLVE_DIRECTIVE = /* @__PURE__ */ Symbol(
14776
14824
  `resolveDirective`
14777
14825
  );
14778
- const RESOLVE_FILTER = Symbol(
14826
+ const RESOLVE_FILTER = /* @__PURE__ */ Symbol(
14779
14827
  `resolveFilter`
14780
14828
  );
14781
- const WITH_DIRECTIVES = Symbol(
14829
+ const WITH_DIRECTIVES = /* @__PURE__ */ Symbol(
14782
14830
  `withDirectives`
14783
14831
  );
14784
- const RENDER_LIST = Symbol(`renderList` );
14785
- const RENDER_SLOT = Symbol(`renderSlot` );
14786
- const CREATE_SLOTS = Symbol(`createSlots` );
14787
- const TO_DISPLAY_STRING = Symbol(
14832
+ const RENDER_LIST = /* @__PURE__ */ Symbol(`renderList` );
14833
+ const RENDER_SLOT = /* @__PURE__ */ Symbol(`renderSlot` );
14834
+ const CREATE_SLOTS = /* @__PURE__ */ Symbol(`createSlots` );
14835
+ const TO_DISPLAY_STRING = /* @__PURE__ */ Symbol(
14788
14836
  `toDisplayString`
14789
14837
  );
14790
- const MERGE_PROPS = Symbol(`mergeProps` );
14791
- const NORMALIZE_CLASS = Symbol(
14838
+ const MERGE_PROPS = /* @__PURE__ */ Symbol(`mergeProps` );
14839
+ const NORMALIZE_CLASS = /* @__PURE__ */ Symbol(
14792
14840
  `normalizeClass`
14793
14841
  );
14794
- const NORMALIZE_STYLE = Symbol(
14842
+ const NORMALIZE_STYLE = /* @__PURE__ */ Symbol(
14795
14843
  `normalizeStyle`
14796
14844
  );
14797
- const NORMALIZE_PROPS = Symbol(
14845
+ const NORMALIZE_PROPS = /* @__PURE__ */ Symbol(
14798
14846
  `normalizeProps`
14799
14847
  );
14800
- const GUARD_REACTIVE_PROPS = Symbol(
14848
+ const GUARD_REACTIVE_PROPS = /* @__PURE__ */ Symbol(
14801
14849
  `guardReactiveProps`
14802
14850
  );
14803
- const TO_HANDLERS = Symbol(`toHandlers` );
14804
- const CAMELIZE = Symbol(`camelize` );
14805
- const CAPITALIZE = Symbol(`capitalize` );
14806
- const TO_HANDLER_KEY = Symbol(
14851
+ const TO_HANDLERS = /* @__PURE__ */ Symbol(`toHandlers` );
14852
+ const CAMELIZE = /* @__PURE__ */ Symbol(`camelize` );
14853
+ const CAPITALIZE = /* @__PURE__ */ Symbol(`capitalize` );
14854
+ const TO_HANDLER_KEY = /* @__PURE__ */ Symbol(
14807
14855
  `toHandlerKey`
14808
14856
  );
14809
- const SET_BLOCK_TRACKING = Symbol(
14857
+ const SET_BLOCK_TRACKING = /* @__PURE__ */ Symbol(
14810
14858
  `setBlockTracking`
14811
14859
  );
14812
- const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
14813
- const POP_SCOPE_ID = Symbol(`popScopeId` );
14814
- const WITH_CTX = Symbol(`withCtx` );
14815
- const UNREF = Symbol(`unref` );
14816
- const IS_REF = Symbol(`isRef` );
14817
- const WITH_MEMO = Symbol(`withMemo` );
14818
- const IS_MEMO_SAME = Symbol(`isMemoSame` );
14860
+ const PUSH_SCOPE_ID = /* @__PURE__ */ Symbol(`pushScopeId` );
14861
+ const POP_SCOPE_ID = /* @__PURE__ */ Symbol(`popScopeId` );
14862
+ const WITH_CTX = /* @__PURE__ */ Symbol(`withCtx` );
14863
+ const UNREF = /* @__PURE__ */ Symbol(`unref` );
14864
+ const IS_REF = /* @__PURE__ */ Symbol(`isRef` );
14865
+ const WITH_MEMO = /* @__PURE__ */ Symbol(`withMemo` );
14866
+ const IS_MEMO_SAME = /* @__PURE__ */ Symbol(`isMemoSame` );
14819
14867
  const helperNameMap = {
14820
14868
  [FRAGMENT]: `Fragment`,
14821
14869
  [TELEPORT]: `Teleport`,
@@ -15085,8 +15133,8 @@ class Tokenizer {
15085
15133
  this.currentSequence = void 0;
15086
15134
  this.sequenceIndex = 0;
15087
15135
  {
15088
- this.entityDecoder = new decode_js.EntityDecoder(
15089
- decode_js.htmlDecodeTree,
15136
+ this.entityDecoder = new decode.EntityDecoder(
15137
+ decode.htmlDecodeTree,
15090
15138
  (cp, consumed) => this.emitCodePoint(cp, consumed)
15091
15139
  );
15092
15140
  }
@@ -15116,14 +15164,28 @@ class Tokenizer {
15116
15164
  getPos(index) {
15117
15165
  let line = 1;
15118
15166
  let column = index + 1;
15119
- for (let i = this.newlines.length - 1; i >= 0; i--) {
15120
- const newlineIndex = this.newlines[i];
15121
- if (index > newlineIndex) {
15122
- line = i + 2;
15123
- column = index - newlineIndex;
15124
- break;
15167
+ const length = this.newlines.length;
15168
+ let j = -1;
15169
+ if (length > 100) {
15170
+ let l = -1;
15171
+ let r = length;
15172
+ while (l + 1 < r) {
15173
+ const m = l + r >>> 1;
15174
+ this.newlines[m] < index ? l = m : r = m;
15175
+ }
15176
+ j = l;
15177
+ } else {
15178
+ for (let i = length - 1; i >= 0; i--) {
15179
+ if (index > this.newlines[i]) {
15180
+ j = i;
15181
+ break;
15182
+ }
15125
15183
  }
15126
15184
  }
15185
+ if (j >= 0) {
15186
+ line = j + 2;
15187
+ column = index - this.newlines[j];
15188
+ }
15127
15189
  return {
15128
15190
  column,
15129
15191
  line,
@@ -15636,7 +15698,7 @@ class Tokenizer {
15636
15698
  this.state = 33;
15637
15699
  this.entityStart = this.index;
15638
15700
  this.entityDecoder.startEntity(
15639
- this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute
15701
+ this.baseState === 1 || this.baseState === 32 ? decode.DecodingMode.Legacy : decode.DecodingMode.Attribute
15640
15702
  );
15641
15703
  }
15642
15704
  }
@@ -15855,7 +15917,7 @@ class Tokenizer {
15855
15917
  this.sectionStart = this.entityStart + consumed;
15856
15918
  this.index = this.sectionStart - 1;
15857
15919
  this.cbs.onattribentity(
15858
- decode_js.fromCodePoint(cp),
15920
+ decode.fromCodePoint(cp),
15859
15921
  this.entityStart,
15860
15922
  this.sectionStart
15861
15923
  );
@@ -15866,7 +15928,7 @@ class Tokenizer {
15866
15928
  this.sectionStart = this.entityStart + consumed;
15867
15929
  this.index = this.sectionStart - 1;
15868
15930
  this.cbs.ontextentity(
15869
- decode_js.fromCodePoint(cp),
15931
+ decode.fromCodePoint(cp),
15870
15932
  this.entityStart,
15871
15933
  this.sectionStart
15872
15934
  );
@@ -15994,7 +16056,7 @@ const errorMessages = {
15994
16056
  [32]: `v-for has invalid expression.`,
15995
16057
  [33]: `<template v-for> key should be placed on the <template> tag.`,
15996
16058
  [34]: `v-bind is missing expression.`,
15997
- [52]: `v-bind with same-name shorthand only allows static argument.`,
16059
+ [53]: `v-bind with same-name shorthand only allows static argument.`,
15998
16060
  [35]: `v-on is missing expression.`,
15999
16061
  [36]: `Unexpected custom directive on <slot> outlet.`,
16000
16062
  [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.`,
@@ -16006,16 +16068,17 @@ const errorMessages = {
16006
16068
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
16007
16069
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
16008
16070
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
16009
- [45]: `Error parsing JavaScript expression: `,
16010
- [46]: `<KeepAlive> expects exactly one child component.`,
16011
- [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.`,
16071
+ [45]: `v-model cannot be used on a const binding because it is not writable.`,
16072
+ [46]: `Error parsing JavaScript expression: `,
16073
+ [47]: `<KeepAlive> expects exactly one child component.`,
16074
+ [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.`,
16012
16075
  // generic errors
16013
- [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
16014
- [48]: `ES module mode is not supported in this build of compiler.`,
16015
- [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
16016
- [50]: `"scopeId" option is only supported in module mode.`,
16076
+ [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
16077
+ [49]: `ES module mode is not supported in this build of compiler.`,
16078
+ [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
16079
+ [51]: `"scopeId" option is only supported in module mode.`,
16017
16080
  // just to fulfill types
16018
- [53]: ``
16081
+ [54]: ``
16019
16082
  };
16020
16083
 
16021
16084
  function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {
@@ -16739,7 +16802,7 @@ const tokenizer = new Tokenizer(stack, {
16739
16802
  let exp = getSlice(innerStart, innerEnd);
16740
16803
  if (exp.includes("&")) {
16741
16804
  {
16742
- exp = decode_js.decodeHTML(exp);
16805
+ exp = decode.decodeHTML(exp);
16743
16806
  }
16744
16807
  }
16745
16808
  addNode({
@@ -17400,7 +17463,7 @@ function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0
17400
17463
  }
17401
17464
  } catch (e) {
17402
17465
  exp.ast = false;
17403
- emitError(45, loc.start.offset, e.message);
17466
+ emitError(46, loc.start.offset, e.message);
17404
17467
  }
17405
17468
  }
17406
17469
  return exp;
@@ -18973,7 +19036,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
18973
19036
  } catch (e) {
18974
19037
  context.onError(
18975
19038
  createCompilerError(
18976
- 45,
19039
+ 46,
18977
19040
  node.loc,
18978
19041
  void 0,
18979
19042
  e.message
@@ -19857,7 +19920,7 @@ const transformElement = (node, context) => {
19857
19920
  patchFlag |= 1024;
19858
19921
  if (node.children.length > 1) {
19859
19922
  context.onError(
19860
- createCompilerError(46, {
19923
+ createCompilerError(47, {
19861
19924
  start: node.children[0].loc.start,
19862
19925
  end: node.children[node.children.length - 1].loc.end,
19863
19926
  source: ""
@@ -20520,7 +20583,7 @@ const transformOn$1 = (dir, node, context, augmentor) => {
20520
20583
  if (arg.isStatic) {
20521
20584
  let rawName = arg.content;
20522
20585
  if (rawName.startsWith("vnode")) {
20523
- context.onError(createCompilerError(51, arg.loc));
20586
+ context.onError(createCompilerError(52, arg.loc));
20524
20587
  }
20525
20588
  if (rawName.startsWith("vue:")) {
20526
20589
  rawName = `vnode-${rawName.slice(4)}`;
@@ -20782,6 +20845,10 @@ const transformModel$1 = (dir, node, context) => {
20782
20845
  context.onError(createCompilerError(44, exp.loc));
20783
20846
  return createTransformProps();
20784
20847
  }
20848
+ if (bindingType === "literal-const" || bindingType === "setup-const") {
20849
+ context.onError(createCompilerError(45, exp.loc));
20850
+ return createTransformProps();
20851
+ }
20785
20852
  const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref");
20786
20853
  if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) {
20787
20854
  context.onError(
@@ -21035,7 +21102,7 @@ const transformVBindShorthand = (node, context) => {
21035
21102
  if (arg.type !== 4 || !arg.isStatic) {
21036
21103
  context.onError(
21037
21104
  createCompilerError(
21038
- 52,
21105
+ 53,
21039
21106
  arg.loc
21040
21107
  )
21041
21108
  );
@@ -21083,10 +21150,10 @@ function baseCompile(source, options = {}) {
21083
21150
  const isModuleMode = options.mode === "module";
21084
21151
  const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode;
21085
21152
  if (!prefixIdentifiers && options.cacheHandlers) {
21086
- onError(createCompilerError(49));
21153
+ onError(createCompilerError(50));
21087
21154
  }
21088
21155
  if (options.scopeId && !isModuleMode) {
21089
- onError(createCompilerError(50));
21156
+ onError(createCompilerError(51));
21090
21157
  }
21091
21158
  const resolvedOptions = extend({}, options, {
21092
21159
  prefixIdentifiers
@@ -21120,26 +21187,26 @@ function baseCompile(source, options = {}) {
21120
21187
 
21121
21188
  const noopDirectiveTransform = () => ({ props: [] });
21122
21189
 
21123
- const V_MODEL_RADIO = Symbol(`vModelRadio` );
21124
- const V_MODEL_CHECKBOX = Symbol(
21190
+ const V_MODEL_RADIO = /* @__PURE__ */ Symbol(`vModelRadio` );
21191
+ const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol(
21125
21192
  `vModelCheckbox`
21126
21193
  );
21127
- const V_MODEL_TEXT = Symbol(`vModelText` );
21128
- const V_MODEL_SELECT = Symbol(
21194
+ const V_MODEL_TEXT = /* @__PURE__ */ Symbol(`vModelText` );
21195
+ const V_MODEL_SELECT = /* @__PURE__ */ Symbol(
21129
21196
  `vModelSelect`
21130
21197
  );
21131
- const V_MODEL_DYNAMIC = Symbol(
21198
+ const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol(
21132
21199
  `vModelDynamic`
21133
21200
  );
21134
- const V_ON_WITH_MODIFIERS = Symbol(
21201
+ const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol(
21135
21202
  `vOnModifiersGuard`
21136
21203
  );
21137
- const V_ON_WITH_KEYS = Symbol(
21204
+ const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol(
21138
21205
  `vOnKeysGuard`
21139
21206
  );
21140
- const V_SHOW = Symbol(`vShow` );
21141
- const TRANSITION = Symbol(`Transition` );
21142
- const TRANSITION_GROUP = Symbol(
21207
+ const V_SHOW = /* @__PURE__ */ Symbol(`vShow` );
21208
+ const TRANSITION = /* @__PURE__ */ Symbol(`Transition` );
21209
+ const TRANSITION_GROUP = /* @__PURE__ */ Symbol(
21143
21210
  `TransitionGroup`
21144
21211
  );
21145
21212
  registerRuntimeHelpers({
@@ -21236,29 +21303,29 @@ function createDOMCompilerError(code, loc) {
21236
21303
  );
21237
21304
  }
21238
21305
  const DOMErrorMessages = {
21239
- [53]: `v-html is missing expression.`,
21240
- [54]: `v-html will override element children.`,
21241
- [55]: `v-text is missing expression.`,
21242
- [56]: `v-text will override element children.`,
21243
- [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
21244
- [58]: `v-model argument is not supported on plain elements.`,
21245
- [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
21246
- [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
21247
- [61]: `v-show is missing expression.`,
21248
- [62]: `<Transition> expects exactly one child element or component.`,
21249
- [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
21306
+ [54]: `v-html is missing expression.`,
21307
+ [55]: `v-html will override element children.`,
21308
+ [56]: `v-text is missing expression.`,
21309
+ [57]: `v-text will override element children.`,
21310
+ [58]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
21311
+ [59]: `v-model argument is not supported on plain elements.`,
21312
+ [60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
21313
+ [61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
21314
+ [62]: `v-show is missing expression.`,
21315
+ [63]: `<Transition> expects exactly one child element or component.`,
21316
+ [64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
21250
21317
  };
21251
21318
 
21252
21319
  const transformVHtml = (dir, node, context) => {
21253
21320
  const { exp, loc } = dir;
21254
21321
  if (!exp) {
21255
21322
  context.onError(
21256
- createDOMCompilerError(53, loc)
21323
+ createDOMCompilerError(54, loc)
21257
21324
  );
21258
21325
  }
21259
21326
  if (node.children.length) {
21260
21327
  context.onError(
21261
- createDOMCompilerError(54, loc)
21328
+ createDOMCompilerError(55, loc)
21262
21329
  );
21263
21330
  node.children.length = 0;
21264
21331
  }
@@ -21276,12 +21343,12 @@ const transformVText = (dir, node, context) => {
21276
21343
  const { exp, loc } = dir;
21277
21344
  if (!exp) {
21278
21345
  context.onError(
21279
- createDOMCompilerError(55, loc)
21346
+ createDOMCompilerError(56, loc)
21280
21347
  );
21281
21348
  }
21282
21349
  if (node.children.length) {
21283
21350
  context.onError(
21284
- createDOMCompilerError(56, loc)
21351
+ createDOMCompilerError(57, loc)
21285
21352
  );
21286
21353
  node.children.length = 0;
21287
21354
  }
@@ -21307,7 +21374,7 @@ const transformModel = (dir, node, context) => {
21307
21374
  if (dir.arg) {
21308
21375
  context.onError(
21309
21376
  createDOMCompilerError(
21310
- 58,
21377
+ 59,
21311
21378
  dir.arg.loc
21312
21379
  )
21313
21380
  );
@@ -21317,7 +21384,7 @@ const transformModel = (dir, node, context) => {
21317
21384
  if (value && isStaticArgOf(value.arg, "value")) {
21318
21385
  context.onError(
21319
21386
  createDOMCompilerError(
21320
- 60,
21387
+ 61,
21321
21388
  value.loc
21322
21389
  )
21323
21390
  );
@@ -21345,7 +21412,7 @@ const transformModel = (dir, node, context) => {
21345
21412
  isInvalidType = true;
21346
21413
  context.onError(
21347
21414
  createDOMCompilerError(
21348
- 59,
21415
+ 60,
21349
21416
  dir.loc
21350
21417
  )
21351
21418
  );
@@ -21371,7 +21438,7 @@ const transformModel = (dir, node, context) => {
21371
21438
  } else {
21372
21439
  context.onError(
21373
21440
  createDOMCompilerError(
21374
- 57,
21441
+ 58,
21375
21442
  dir.loc
21376
21443
  )
21377
21444
  );
@@ -21479,7 +21546,7 @@ const transformShow = (dir, node, context) => {
21479
21546
  const { exp, loc } = dir;
21480
21547
  if (!exp) {
21481
21548
  context.onError(
21482
- createDOMCompilerError(61, loc)
21549
+ createDOMCompilerError(62, loc)
21483
21550
  );
21484
21551
  }
21485
21552
  return {
@@ -21499,7 +21566,7 @@ const transformTransition = (node, context) => {
21499
21566
  if (hasMultipleChildren(node)) {
21500
21567
  context.onError(
21501
21568
  createDOMCompilerError(
21502
- 62,
21569
+ 63,
21503
21570
  {
21504
21571
  start: node.children[0].loc.start,
21505
21572
  end: node.children[node.children.length - 1].loc.end,
@@ -21772,7 +21839,7 @@ const ignoreSideEffectTags = (node, context) => {
21772
21839
  if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
21773
21840
  context.onError(
21774
21841
  createDOMCompilerError(
21775
- 63,
21842
+ 64,
21776
21843
  node.loc
21777
21844
  )
21778
21845
  );