@vue/compat 3.5.17 → 3.5.19

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/compat v3.5.17
2
+ * @vue/compat v3.5.19
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -63,10 +63,10 @@ const isBuiltInDirective = /* @__PURE__ */ makeMap(
63
63
  );
64
64
  const cacheStringFunction = (fn) => {
65
65
  const cache = /* @__PURE__ */ Object.create(null);
66
- return (str) => {
66
+ return ((str) => {
67
67
  const hit = cache[str];
68
68
  return hit || (cache[str] = fn(str));
69
- };
69
+ });
70
70
  };
71
71
  const camelizeRE = /-(\w)/g;
72
72
  const camelize = cacheStringFunction(
@@ -1263,7 +1263,7 @@ class MutableReactiveHandler extends BaseReactiveHandler {
1263
1263
  }
1264
1264
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
1265
1265
  if (isOldValueReadonly) {
1266
- return false;
1266
+ return true;
1267
1267
  } else {
1268
1268
  oldValue.value = value;
1269
1269
  return true;
@@ -3420,7 +3420,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3420
3420
  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
3421
3421
  const setupState = owner.setupState;
3422
3422
  const rawSetupState = toRaw(setupState);
3423
- const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
3423
+ const canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {
3424
3424
  return hasOwn(rawSetupState, key);
3425
3425
  };
3426
3426
  if (oldRef != null && oldRef !== ref) {
@@ -3430,7 +3430,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3430
3430
  setupState[oldRef] = null;
3431
3431
  }
3432
3432
  } else if (isRef(oldRef)) {
3433
- oldRef.value = null;
3433
+ {
3434
+ oldRef.value = null;
3435
+ }
3436
+ const oldRawRefAtom = oldRawRef;
3437
+ if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
3434
3438
  }
3435
3439
  }
3436
3440
  if (isFunction(ref)) {
@@ -3441,7 +3445,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3441
3445
  if (_isString || _isRef) {
3442
3446
  const doSet = () => {
3443
3447
  if (rawRef.f) {
3444
- const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
3448
+ const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value ;
3445
3449
  if (isUnmount) {
3446
3450
  isArray(existing) && remove(existing, refValue);
3447
3451
  } else {
@@ -3452,8 +3456,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3452
3456
  setupState[ref] = refs[ref];
3453
3457
  }
3454
3458
  } else {
3455
- ref.value = [refValue];
3456
- if (rawRef.k) refs[rawRef.k] = ref.value;
3459
+ const newVal = [refValue];
3460
+ {
3461
+ ref.value = newVal;
3462
+ }
3463
+ if (rawRef.k) refs[rawRef.k] = newVal;
3457
3464
  }
3458
3465
  } else if (!existing.includes(refValue)) {
3459
3466
  existing.push(refValue);
@@ -3465,7 +3472,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
3465
3472
  setupState[ref] = value;
3466
3473
  }
3467
3474
  } else if (_isRef) {
3468
- ref.value = value;
3475
+ {
3476
+ ref.value = value;
3477
+ }
3469
3478
  if (rawRef.k) refs[rawRef.k] = value;
3470
3479
  } else ;
3471
3480
  };
@@ -4092,10 +4101,15 @@ function defineAsyncComponent(source) {
4092
4101
  name: "AsyncComponentWrapper",
4093
4102
  __asyncLoader: load,
4094
4103
  __asyncHydrate(el, instance, hydrate) {
4104
+ let patched = false;
4105
+ (instance.bu || (instance.bu = [])).push(() => patched = true);
4106
+ const performHydrate = () => {
4107
+ if (patched) {
4108
+ return;
4109
+ }
4110
+ hydrate();
4111
+ };
4095
4112
  const doHydrate = hydrateStrategy ? () => {
4096
- const performHydrate = () => {
4097
- hydrate();
4098
- };
4099
4113
  const teardown = hydrateStrategy(
4100
4114
  performHydrate,
4101
4115
  (cb) => forEachElement(el, cb)
@@ -4103,8 +4117,7 @@ function defineAsyncComponent(source) {
4103
4117
  if (teardown) {
4104
4118
  (instance.bum || (instance.bum = [])).push(teardown);
4105
4119
  }
4106
- (instance.u || (instance.u = [])).push(() => true);
4107
- } : hydrate;
4120
+ } : performHydrate;
4108
4121
  if (resolvedComp) {
4109
4122
  doHydrate();
4110
4123
  } else {
@@ -5289,10 +5302,10 @@ const PublicInstanceProxyHandlers = {
5289
5302
  return true;
5290
5303
  },
5291
5304
  has({
5292
- _: { data, setupState, accessCache, ctx, appContext, propsOptions }
5305
+ _: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
5293
5306
  }, key) {
5294
- let normalizedProps;
5295
- return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
5307
+ let normalizedProps, cssModules;
5308
+ return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
5296
5309
  },
5297
5310
  defineProperty(target, key, descriptor) {
5298
5311
  if (descriptor.get != null) {
@@ -5353,7 +5366,7 @@ function useSlots() {
5353
5366
  function useAttrs() {
5354
5367
  return getContext().attrs;
5355
5368
  }
5356
- function getContext() {
5369
+ function getContext(calledFunctionName) {
5357
5370
  const i = getCurrentInstance();
5358
5371
  return i.setupContext || (i.setupContext = createSetupContext(i));
5359
5372
  }
@@ -5540,7 +5553,8 @@ function applyOptions(instance) {
5540
5553
  expose.forEach((key) => {
5541
5554
  Object.defineProperty(exposed, key, {
5542
5555
  get: () => publicThis[key],
5543
- set: (val) => publicThis[key] = val
5556
+ set: (val) => publicThis[key] = val,
5557
+ enumerable: true
5544
5558
  });
5545
5559
  });
5546
5560
  } else if (!instance.exposed) {
@@ -5827,7 +5841,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5827
5841
  return vm;
5828
5842
  }
5829
5843
  }
5830
- Vue.version = `2.6.14-compat:${"3.5.17"}`;
5844
+ Vue.version = `2.6.14-compat:${"3.5.19"}`;
5831
5845
  Vue.config = singletonApp.config;
5832
5846
  Vue.use = (plugin, ...options) => {
5833
5847
  if (plugin && isFunction(plugin.install)) {
@@ -5841,22 +5855,22 @@ function createCompatVue$1(createApp, createSingletonApp) {
5841
5855
  singletonApp.mixin(m);
5842
5856
  return Vue;
5843
5857
  };
5844
- Vue.component = (name, comp) => {
5858
+ Vue.component = ((name, comp) => {
5845
5859
  if (comp) {
5846
5860
  singletonApp.component(name, comp);
5847
5861
  return Vue;
5848
5862
  } else {
5849
5863
  return singletonApp.component(name);
5850
5864
  }
5851
- };
5852
- Vue.directive = (name, dir) => {
5865
+ });
5866
+ Vue.directive = ((name, dir) => {
5853
5867
  if (dir) {
5854
5868
  singletonApp.directive(name, dir);
5855
5869
  return Vue;
5856
5870
  } else {
5857
5871
  return singletonApp.directive(name);
5858
5872
  }
5859
- };
5873
+ });
5860
5874
  Vue.options = { _base: Vue };
5861
5875
  let cid = 1;
5862
5876
  Vue.cid = cid;
@@ -5919,14 +5933,14 @@ function createCompatVue$1(createApp, createSingletonApp) {
5919
5933
  assertCompatEnabled("GLOBAL_OBSERVABLE", null);
5920
5934
  return reactive(target);
5921
5935
  };
5922
- Vue.filter = (name, filter) => {
5936
+ Vue.filter = ((name, filter) => {
5923
5937
  if (filter) {
5924
5938
  singletonApp.filter(name, filter);
5925
5939
  return Vue;
5926
5940
  } else {
5927
5941
  return singletonApp.filter(name);
5928
5942
  }
5929
- };
5943
+ });
5930
5944
  const util = {
5931
5945
  warn: NOOP,
5932
5946
  extend: extend$1,
@@ -6305,7 +6319,7 @@ function provide(key, value) {
6305
6319
  }
6306
6320
  }
6307
6321
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
6308
- const instance = currentInstance || currentRenderingInstance;
6322
+ const instance = getCurrentInstance();
6309
6323
  if (instance || currentApp) {
6310
6324
  let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
6311
6325
  if (provides && key in provides) {
@@ -6316,7 +6330,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
6316
6330
  }
6317
6331
  }
6318
6332
  function hasInjectionContext() {
6319
- return !!(currentInstance || currentRenderingInstance || currentApp);
6333
+ return !!(getCurrentInstance() || currentApp);
6320
6334
  }
6321
6335
 
6322
6336
  function createPropsDefaultThis(instance, rawProps, propKey) {
@@ -6666,7 +6680,7 @@ function validatePropName(key) {
6666
6680
  return false;
6667
6681
  }
6668
6682
 
6669
- const isInternalKey = (key) => key[0] === "_" || key === "$stable";
6683
+ const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
6670
6684
  const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
6671
6685
  const normalizeSlot = (key, rawSlot, ctx) => {
6672
6686
  if (rawSlot._n) {
@@ -6706,8 +6720,6 @@ const assignSlots = (slots, children, optimized) => {
6706
6720
  const initSlots = (instance, children, optimized) => {
6707
6721
  const slots = instance.slots = createInternalObject();
6708
6722
  if (instance.vnode.shapeFlag & 32) {
6709
- const cacheIndexes = children.__;
6710
- if (cacheIndexes) def(slots, "__", cacheIndexes, true);
6711
6723
  const type = children._;
6712
6724
  if (type) {
6713
6725
  assignSlots(slots, children, optimized);
@@ -7301,6 +7313,7 @@ function baseCreateRenderer(options, createHydrationFns) {
7301
7313
  if (!initialVNode.el) {
7302
7314
  const placeholder = instance.subTree = createVNode(Comment);
7303
7315
  processCommentNode(null, placeholder, container, anchor);
7316
+ initialVNode.placeholder = placeholder.el;
7304
7317
  }
7305
7318
  } else {
7306
7319
  setupRenderEffect(
@@ -7757,7 +7770,11 @@ function baseCreateRenderer(options, createHydrationFns) {
7757
7770
  for (i = toBePatched - 1; i >= 0; i--) {
7758
7771
  const nextIndex = s2 + i;
7759
7772
  const nextChild = c2[nextIndex];
7760
- const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
7773
+ const anchorVNode = c2[nextIndex + 1];
7774
+ const anchor = nextIndex + 1 < l2 ? (
7775
+ // #13559, fallback to el placeholder for unresolved async component
7776
+ anchorVNode.el || anchorVNode.placeholder
7777
+ ) : parentAnchor;
7761
7778
  if (newIndexToOldIndexMap[i] === 0) {
7762
7779
  patch(
7763
7780
  null,
@@ -7822,6 +7839,12 @@ function baseCreateRenderer(options, createHydrationFns) {
7822
7839
  }
7823
7840
  };
7824
7841
  const performLeave = () => {
7842
+ if (el._isLeaving) {
7843
+ el[leaveCbKey](
7844
+ true
7845
+ /* cancelled */
7846
+ );
7847
+ }
7825
7848
  leave(el, () => {
7826
7849
  remove2();
7827
7850
  afterLeave && afterLeave();
@@ -7956,27 +7979,12 @@ function baseCreateRenderer(options, createHydrationFns) {
7956
7979
  hostRemove(end);
7957
7980
  };
7958
7981
  const unmountComponent = (instance, parentSuspense, doRemove) => {
7959
- const {
7960
- bum,
7961
- scope,
7962
- job,
7963
- subTree,
7964
- um,
7965
- m,
7966
- a,
7967
- parent,
7968
- slots: { __: slotCacheKeys }
7969
- } = instance;
7982
+ const { bum, scope, job, subTree, um, m, a } = instance;
7970
7983
  invalidateMount(m);
7971
7984
  invalidateMount(a);
7972
7985
  if (bum) {
7973
7986
  invokeArrayFns(bum);
7974
7987
  }
7975
- if (parent && isArray(slotCacheKeys)) {
7976
- slotCacheKeys.forEach((v) => {
7977
- parent.renderCache[v] = void 0;
7978
- });
7979
- }
7980
7988
  if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) {
7981
7989
  instance.emit("hook:beforeDestroy");
7982
7990
  }
@@ -7997,12 +8005,6 @@ function baseCreateRenderer(options, createHydrationFns) {
7997
8005
  queuePostRenderEffect(() => {
7998
8006
  instance.isUnmounted = true;
7999
8007
  }, parentSuspense);
8000
- if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
8001
- parentSuspense.deps--;
8002
- if (parentSuspense.deps === 0) {
8003
- parentSuspense.resolve();
8004
- }
8005
- }
8006
8008
  };
8007
8009
  const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
8008
8010
  for (let i = start; i < children.length; i++) {
@@ -8100,7 +8102,8 @@ function traverseStaticChildren(n1, n2, shallow = false) {
8100
8102
  if (!shallow && c2.patchFlag !== -2)
8101
8103
  traverseStaticChildren(c1, c2);
8102
8104
  }
8103
- if (c2.type === Text) {
8105
+ if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
8106
+ c2.patchFlag !== -1) {
8104
8107
  c2.el = c1.el;
8105
8108
  }
8106
8109
  if (c2.type === Comment && !c2.el) {
@@ -9511,6 +9514,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
9511
9514
  suspense: vnode.suspense,
9512
9515
  ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
9513
9516
  ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
9517
+ placeholder: vnode.placeholder,
9514
9518
  el: vnode.el,
9515
9519
  anchor: vnode.anchor,
9516
9520
  ctx: vnode.ctx,
@@ -9988,7 +9992,7 @@ function isMemoSame(cached, memo) {
9988
9992
  return true;
9989
9993
  }
9990
9994
 
9991
- const version = "3.5.17";
9995
+ const version = "3.5.19";
9992
9996
  const warn$1 = NOOP;
9993
9997
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
9994
9998
  const devtools = void 0;
@@ -10829,10 +10833,10 @@ function defineCustomElement(options, extraOptions, _createApp) {
10829
10833
  VueCustomElement.def = Comp;
10830
10834
  return VueCustomElement;
10831
10835
  }
10832
- /*! #__NO_SIDE_EFFECTS__ */
10833
- const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
10836
+
10837
+ const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
10834
10838
  return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
10835
- };
10839
+ });
10836
10840
  const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
10837
10841
  };
10838
10842
  class VueElement extends BaseClass {
@@ -11635,13 +11639,13 @@ const modifierGuards = {
11635
11639
  const withModifiers = (fn, modifiers) => {
11636
11640
  const cache = fn._withMods || (fn._withMods = {});
11637
11641
  const cacheKey = modifiers.join(".");
11638
- return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
11642
+ return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
11639
11643
  for (let i = 0; i < modifiers.length; i++) {
11640
11644
  const guard = modifierGuards[modifiers[i]];
11641
11645
  if (guard && guard(event, modifiers)) return;
11642
11646
  }
11643
11647
  return fn(event, ...args);
11644
- });
11648
+ }));
11645
11649
  };
11646
11650
  const keyNames = {
11647
11651
  esc: "escape",
@@ -11665,7 +11669,7 @@ const withKeys = (fn, modifiers) => {
11665
11669
  }
11666
11670
  const cache = fn._withKeys || (fn._withKeys = {});
11667
11671
  const cacheKey = modifiers.join(".");
11668
- return cache[cacheKey] || (cache[cacheKey] = (event) => {
11672
+ return cache[cacheKey] || (cache[cacheKey] = ((event) => {
11669
11673
  if (!("key" in event)) {
11670
11674
  return;
11671
11675
  }
@@ -11695,7 +11699,7 @@ const withKeys = (fn, modifiers) => {
11695
11699
  }
11696
11700
  }
11697
11701
  }
11698
- });
11702
+ }));
11699
11703
  };
11700
11704
 
11701
11705
  const rendererOptions = /* @__PURE__ */ extend$1({ patchProp }, nodeOps);
@@ -11709,13 +11713,13 @@ function ensureHydrationRenderer() {
11709
11713
  enabledHydration = true;
11710
11714
  return renderer;
11711
11715
  }
11712
- const render = (...args) => {
11716
+ const render = ((...args) => {
11713
11717
  ensureRenderer().render(...args);
11714
- };
11715
- const hydrate = (...args) => {
11718
+ });
11719
+ const hydrate = ((...args) => {
11716
11720
  ensureHydrationRenderer().hydrate(...args);
11717
- };
11718
- const createApp = (...args) => {
11721
+ });
11722
+ const createApp = ((...args) => {
11719
11723
  const app = ensureRenderer().createApp(...args);
11720
11724
  const { mount } = app;
11721
11725
  app.mount = (containerOrSelector) => {
@@ -11736,8 +11740,8 @@ const createApp = (...args) => {
11736
11740
  return proxy;
11737
11741
  };
11738
11742
  return app;
11739
- };
11740
- const createSSRApp = (...args) => {
11743
+ });
11744
+ const createSSRApp = ((...args) => {
11741
11745
  const app = ensureHydrationRenderer().createApp(...args);
11742
11746
  const { mount } = app;
11743
11747
  app.mount = (containerOrSelector) => {
@@ -11747,7 +11751,7 @@ const createSSRApp = (...args) => {
11747
11751
  }
11748
11752
  };
11749
11753
  return app;
11750
- };
11754
+ });
11751
11755
  function resolveRootNamespace(container) {
11752
11756
  if (container instanceof SVGElement) {
11753
11757
  return "svg";
@@ -13255,14 +13259,15 @@ function isReferencedIdentifier(id, parent, parentStack) {
13255
13259
  if (id.name === "arguments") {
13256
13260
  return false;
13257
13261
  }
13258
- if (isReferenced(id, parent)) {
13262
+ if (isReferenced(id, parent, parentStack[parentStack.length - 2])) {
13259
13263
  return true;
13260
13264
  }
13261
13265
  switch (parent.type) {
13262
13266
  case "AssignmentExpression":
13263
13267
  case "AssignmentPattern":
13264
13268
  return true;
13265
- case "ObjectPattern":
13269
+ case "ObjectProperty":
13270
+ return parent.key !== id && isInDestructureAssignment(parent, parentStack);
13266
13271
  case "ArrayPattern":
13267
13272
  return isInDestructureAssignment(parent, parentStack);
13268
13273
  }
@@ -13431,7 +13436,7 @@ function isReferenced(node, parent, grandparent) {
13431
13436
  if (parent.key === node) {
13432
13437
  return !!parent.computed;
13433
13438
  }
13434
- return true;
13439
+ return !grandparent || grandparent.type !== "ObjectPattern";
13435
13440
  // no: class { NODE = value; }
13436
13441
  // yes: class { [NODE] = value; }
13437
13442
  // yes: class { key = NODE; }
@@ -13481,6 +13486,9 @@ function isReferenced(node, parent, grandparent) {
13481
13486
  // yes: export { NODE as foo };
13482
13487
  // no: export { NODE as foo } from "foo";
13483
13488
  case "ExportSpecifier":
13489
+ if (grandparent == null ? void 0 : grandparent.source) {
13490
+ return false;
13491
+ }
13484
13492
  return parent.local === node;
13485
13493
  // no: import NODE from "foo";
13486
13494
  // no: import * as NODE from "foo";
@@ -13561,7 +13569,7 @@ function isCoreComponent(tag) {
13561
13569
  return BASE_TRANSITION;
13562
13570
  }
13563
13571
  }
13564
- const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/;
13572
+ const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/;
13565
13573
  const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
13566
13574
  const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
13567
13575
  const isMemberExpressionNode = (exp, context) => {
@@ -13654,6 +13662,9 @@ function hasDynamicKeyVBind(node) {
13654
13662
  function isText$1(node) {
13655
13663
  return node.type === 5 || node.type === 2;
13656
13664
  }
13665
+ function isVPre(p) {
13666
+ return p.type === 7 && p.name === "pre";
13667
+ }
13657
13668
  function isVSlot(p) {
13658
13669
  return p.type === 7 && p.name === "slot";
13659
13670
  }
@@ -13952,7 +13963,7 @@ const tokenizer = new Tokenizer(stack, {
13952
13963
  ondirarg(start, end) {
13953
13964
  if (start === end) return;
13954
13965
  const arg = getSlice(start, end);
13955
- if (inVPre) {
13966
+ if (inVPre && !isVPre(currentProp)) {
13956
13967
  currentProp.name += arg;
13957
13968
  setLocEnd(currentProp.nameLoc, end);
13958
13969
  } else {
@@ -13967,7 +13978,7 @@ const tokenizer = new Tokenizer(stack, {
13967
13978
  },
13968
13979
  ondirmodifier(start, end) {
13969
13980
  const mod = getSlice(start, end);
13970
- if (inVPre) {
13981
+ if (inVPre && !isVPre(currentProp)) {
13971
13982
  currentProp.name += "." + mod;
13972
13983
  setLocEnd(currentProp.nameLoc, end);
13973
13984
  } else if (currentProp.name === "slot") {
@@ -14577,6 +14588,11 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
14577
14588
  } else if (child.type === 12) {
14578
14589
  const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
14579
14590
  if (constantType >= 2) {
14591
+ if (child.codegenNode.type === 14 && child.codegenNode.arguments.length > 0) {
14592
+ child.codegenNode.arguments.push(
14593
+ -1 + (``)
14594
+ );
14595
+ }
14580
14596
  toCache.push(child);
14581
14597
  continue;
14582
14598
  }
@@ -14605,7 +14621,6 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
14605
14621
  }
14606
14622
  }
14607
14623
  let cachedAsArray = false;
14608
- const slotCacheKeys = [];
14609
14624
  if (toCache.length === children.length && node.type === 1) {
14610
14625
  if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
14611
14626
  node.codegenNode.children = getCacheExpression(
@@ -14615,7 +14630,6 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
14615
14630
  } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
14616
14631
  const slot = getSlotNode(node.codegenNode, "default");
14617
14632
  if (slot) {
14618
- slotCacheKeys.push(context.cached.length);
14619
14633
  slot.returns = getCacheExpression(
14620
14634
  createArrayExpression(slot.returns)
14621
14635
  );
@@ -14625,7 +14639,6 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
14625
14639
  const slotName = findDir(node, "slot", true);
14626
14640
  const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
14627
14641
  if (slot) {
14628
- slotCacheKeys.push(context.cached.length);
14629
14642
  slot.returns = getCacheExpression(
14630
14643
  createArrayExpression(slot.returns)
14631
14644
  );
@@ -14635,23 +14648,12 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
14635
14648
  }
14636
14649
  if (!cachedAsArray) {
14637
14650
  for (const child of toCache) {
14638
- slotCacheKeys.push(context.cached.length);
14639
14651
  child.codegenNode = context.cache(child.codegenNode);
14640
14652
  }
14641
14653
  }
14642
- if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
14643
- node.codegenNode.children.properties.push(
14644
- createObjectProperty(
14645
- `__`,
14646
- createSimpleExpression(JSON.stringify(slotCacheKeys), false)
14647
- )
14648
- );
14649
- }
14650
14654
  function getCacheExpression(value) {
14651
14655
  const exp = context.cache(value);
14652
- if (inFor && context.hmr) {
14653
- exp.needArraySpread = true;
14654
- }
14656
+ exp.needArraySpread = true;
14655
14657
  return exp;
14656
14658
  }
14657
14659
  function getSlotNode(node2, name) {
@@ -16194,7 +16196,7 @@ function processIf(node, dir, context, processCodegen) {
16194
16196
  continue;
16195
16197
  }
16196
16198
  if (sibling && sibling.type === 9) {
16197
- if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
16199
+ if ((dir.name === "else-if" || dir.name === "else") && sibling.branches[sibling.branches.length - 1].condition === void 0) {
16198
16200
  context.onError(
16199
16201
  createCompilerError(30, node.loc)
16200
16202
  );
@@ -16373,7 +16375,7 @@ const transformBind = (dir, _node, context) => {
16373
16375
  arg.children.unshift(`(`);
16374
16376
  arg.children.push(`) || ""`);
16375
16377
  } else if (!arg.isStatic) {
16376
- arg.content = `${arg.content} || ""`;
16378
+ arg.content = arg.content ? `${arg.content} || ""` : `""`;
16377
16379
  }
16378
16380
  if (modifiers.some((mod) => mod.content === "camel")) {
16379
16381
  if (arg.type === 4) {
@@ -18043,7 +18045,7 @@ const seen = /* @__PURE__ */ new WeakSet();
18043
18045
  const transformMemo = (node, context) => {
18044
18046
  if (node.type === 1) {
18045
18047
  const dir = findDir(node, "memo");
18046
- if (!dir || seen.has(node)) {
18048
+ if (!dir || seen.has(node) || context.inSSR) {
18047
18049
  return;
18048
18050
  }
18049
18051
  seen.add(node);