@vue/compat 3.5.12 → 3.5.14

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.12
2
+ * @vue/compat v3.5.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -223,10 +223,9 @@ function parseStringStyle(cssText) {
223
223
  return ret;
224
224
  }
225
225
  function stringifyStyle(styles) {
226
+ if (!styles) return "";
227
+ if (isString(styles)) return styles;
226
228
  let ret = "";
227
- if (!styles || isString(styles)) {
228
- return ret;
229
- }
230
229
  for (const key in styles) {
231
230
  const value = styles[key];
232
231
  if (isString(value) || typeof value === "number") {
@@ -450,6 +449,10 @@ class EffectScope {
450
449
  * @internal
451
450
  */
452
451
  this._active = true;
452
+ /**
453
+ * @internal track `on` calls, allow `on` call multiple times
454
+ */
455
+ this._on = 0;
453
456
  /**
454
457
  * @internal
455
458
  */
@@ -520,28 +523,38 @@ class EffectScope {
520
523
  * @internal
521
524
  */
522
525
  on() {
523
- activeEffectScope = this;
526
+ if (++this._on === 1) {
527
+ this.prevScope = activeEffectScope;
528
+ activeEffectScope = this;
529
+ }
524
530
  }
525
531
  /**
526
532
  * This should only be called on non-detached scopes
527
533
  * @internal
528
534
  */
529
535
  off() {
530
- activeEffectScope = this.parent;
536
+ if (this._on > 0 && --this._on === 0) {
537
+ activeEffectScope = this.prevScope;
538
+ this.prevScope = void 0;
539
+ }
531
540
  }
532
541
  stop(fromParent) {
533
542
  if (this._active) {
543
+ this._active = false;
534
544
  let i, l;
535
545
  for (i = 0, l = this.effects.length; i < l; i++) {
536
546
  this.effects[i].stop();
537
547
  }
548
+ this.effects.length = 0;
538
549
  for (i = 0, l = this.cleanups.length; i < l; i++) {
539
550
  this.cleanups[i]();
540
551
  }
552
+ this.cleanups.length = 0;
541
553
  if (this.scopes) {
542
554
  for (i = 0, l = this.scopes.length; i < l; i++) {
543
555
  this.scopes[i].stop(true);
544
556
  }
557
+ this.scopes.length = 0;
545
558
  }
546
559
  if (!this.detached && this.parent && !fromParent) {
547
560
  const last = this.parent.scopes.pop();
@@ -551,7 +564,6 @@ class EffectScope {
551
564
  }
552
565
  }
553
566
  this.parent = void 0;
554
- this._active = false;
555
567
  }
556
568
  }
557
569
  }
@@ -606,7 +618,7 @@ class ReactiveEffect {
606
618
  }
607
619
  resume() {
608
620
  if (this.flags & 64) {
609
- this.flags &= ~64;
621
+ this.flags &= -65;
610
622
  if (pausedQueueEffects.has(this)) {
611
623
  pausedQueueEffects.delete(this);
612
624
  this.trigger();
@@ -646,7 +658,7 @@ class ReactiveEffect {
646
658
  cleanupDeps(this);
647
659
  activeSub = prevEffect;
648
660
  shouldTrack = prevShouldTrack;
649
- this.flags &= ~2;
661
+ this.flags &= -3;
650
662
  }
651
663
  }
652
664
  stop() {
@@ -657,7 +669,7 @@ class ReactiveEffect {
657
669
  this.deps = this.depsTail = void 0;
658
670
  cleanupEffect(this);
659
671
  this.onStop && this.onStop();
660
- this.flags &= ~1;
672
+ this.flags &= -2;
661
673
  }
662
674
  }
663
675
  trigger() {
@@ -707,7 +719,7 @@ function endBatch() {
707
719
  while (e) {
708
720
  const next = e.next;
709
721
  e.next = void 0;
710
- e.flags &= ~8;
722
+ e.flags &= -9;
711
723
  e = next;
712
724
  }
713
725
  }
@@ -718,7 +730,7 @@ function endBatch() {
718
730
  while (e) {
719
731
  const next = e.next;
720
732
  e.next = void 0;
721
- e.flags &= ~8;
733
+ e.flags &= -9;
722
734
  if (e.flags & 1) {
723
735
  try {
724
736
  ;
@@ -774,17 +786,16 @@ function refreshComputed(computed) {
774
786
  if (computed.flags & 4 && !(computed.flags & 16)) {
775
787
  return;
776
788
  }
777
- computed.flags &= ~16;
789
+ computed.flags &= -17;
778
790
  if (computed.globalVersion === globalVersion) {
779
791
  return;
780
792
  }
781
793
  computed.globalVersion = globalVersion;
782
- const dep = computed.dep;
783
- computed.flags |= 2;
784
- if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
785
- computed.flags &= ~2;
794
+ if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
786
795
  return;
787
796
  }
797
+ computed.flags |= 2;
798
+ const dep = computed.dep;
788
799
  const prevSub = activeSub;
789
800
  const prevShouldTrack = shouldTrack;
790
801
  activeSub = computed;
@@ -793,6 +804,7 @@ function refreshComputed(computed) {
793
804
  prepareDeps(computed);
794
805
  const value = computed.fn(computed._value);
795
806
  if (dep.version === 0 || hasChanged(value, computed._value)) {
807
+ computed.flags |= 128;
796
808
  computed._value = value;
797
809
  dep.version++;
798
810
  }
@@ -803,7 +815,7 @@ function refreshComputed(computed) {
803
815
  activeSub = prevSub;
804
816
  shouldTrack = prevShouldTrack;
805
817
  cleanupDeps(computed);
806
- computed.flags &= ~2;
818
+ computed.flags &= -3;
807
819
  }
808
820
  }
809
821
  function removeSub(link, soft = false) {
@@ -822,7 +834,7 @@ function removeSub(link, soft = false) {
822
834
  if (dep.subs === link) {
823
835
  dep.subs = prevSub;
824
836
  if (!prevSub && dep.computed) {
825
- dep.computed.flags &= ~4;
837
+ dep.computed.flags &= -5;
826
838
  for (let l = dep.computed.deps; l; l = l.nextDep) {
827
839
  removeSub(l, true);
828
840
  }
@@ -1317,6 +1329,7 @@ class BaseReactiveHandler {
1317
1329
  this._isShallow = _isShallow;
1318
1330
  }
1319
1331
  get(target, key, receiver) {
1332
+ if (key === "__v_skip") return target["__v_skip"];
1320
1333
  const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1321
1334
  if (key === "__v_isReactive") {
1322
1335
  return !isReadonly2;
@@ -1754,14 +1767,14 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
1754
1767
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1755
1768
  return target;
1756
1769
  }
1757
- const existingProxy = proxyMap.get(target);
1758
- if (existingProxy) {
1759
- return existingProxy;
1760
- }
1761
1770
  const targetType = getTargetType(target);
1762
1771
  if (targetType === 0 /* INVALID */) {
1763
1772
  return target;
1764
1773
  }
1774
+ const existingProxy = proxyMap.get(target);
1775
+ if (existingProxy) {
1776
+ return existingProxy;
1777
+ }
1765
1778
  const proxy = new Proxy(
1766
1779
  target,
1767
1780
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -2153,7 +2166,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2153
2166
  const scope = getCurrentScope();
2154
2167
  const watchHandle = () => {
2155
2168
  effect.stop();
2156
- if (scope) {
2169
+ if (scope && scope.active) {
2157
2170
  remove(scope.effects, effect);
2158
2171
  }
2159
2172
  };
@@ -2605,11 +2618,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2605
2618
  queue.splice(i, 1);
2606
2619
  i--;
2607
2620
  if (cb.flags & 4) {
2608
- cb.flags &= ~1;
2621
+ cb.flags &= -2;
2609
2622
  }
2610
2623
  cb();
2611
2624
  if (!(cb.flags & 4)) {
2612
- cb.flags &= ~1;
2625
+ cb.flags &= -2;
2613
2626
  }
2614
2627
  }
2615
2628
  }
@@ -2634,10 +2647,10 @@ function flushPostFlushCbs(seen) {
2634
2647
  continue;
2635
2648
  }
2636
2649
  if (cb.flags & 4) {
2637
- cb.flags &= ~1;
2650
+ cb.flags &= -2;
2638
2651
  }
2639
2652
  if (!(cb.flags & 8)) cb();
2640
- cb.flags &= ~1;
2653
+ cb.flags &= -2;
2641
2654
  }
2642
2655
  activePostFlushCbs = null;
2643
2656
  postFlushIndex = 0;
@@ -2673,7 +2686,7 @@ function flushJobs(seen) {
2673
2686
  for (; flushIndex < queue.length; flushIndex++) {
2674
2687
  const job = queue[flushIndex];
2675
2688
  if (job) {
2676
- job.flags &= ~1;
2689
+ job.flags &= -2;
2677
2690
  }
2678
2691
  }
2679
2692
  flushIndex = -1;
@@ -3641,11 +3654,32 @@ const TeleportImpl = {
3641
3654
  updateCssVars(n2, true);
3642
3655
  }
3643
3656
  if (isTeleportDeferred(n2.props)) {
3644
- queuePostRenderEffect(mountToTarget, parentSuspense);
3657
+ queuePostRenderEffect(() => {
3658
+ mountToTarget();
3659
+ n2.el.__isMounted = true;
3660
+ }, parentSuspense);
3645
3661
  } else {
3646
3662
  mountToTarget();
3647
3663
  }
3648
3664
  } else {
3665
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3666
+ queuePostRenderEffect(() => {
3667
+ TeleportImpl.process(
3668
+ n1,
3669
+ n2,
3670
+ container,
3671
+ anchor,
3672
+ parentComponent,
3673
+ parentSuspense,
3674
+ namespace,
3675
+ slotScopeIds,
3676
+ optimized,
3677
+ internals
3678
+ );
3679
+ delete n1.el.__isMounted;
3680
+ }, parentSuspense);
3681
+ return;
3682
+ }
3649
3683
  n2.el = n1.el;
3650
3684
  n2.targetStart = n1.targetStart;
3651
3685
  const mainAnchor = n2.anchor = n1.anchor;
@@ -3669,7 +3703,7 @@ const TeleportImpl = {
3669
3703
  namespace,
3670
3704
  slotScopeIds
3671
3705
  );
3672
- traverseStaticChildren(n1, n2, true);
3706
+ traverseStaticChildren(n1, n2, false);
3673
3707
  } else if (!optimized) {
3674
3708
  patchChildren(
3675
3709
  n1,
@@ -3951,10 +3985,9 @@ const BaseTransitionImpl = {
3951
3985
  if (innerChild.type !== Comment) {
3952
3986
  setTransitionHooks(innerChild, enterHooks);
3953
3987
  }
3954
- const oldChild = instance.subTree;
3955
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3988
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3956
3989
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3957
- const leavingHooks = resolveTransitionHooks(
3990
+ let leavingHooks = resolveTransitionHooks(
3958
3991
  oldInnerChild,
3959
3992
  rawProps,
3960
3993
  state,
@@ -3969,6 +4002,7 @@ const BaseTransitionImpl = {
3969
4002
  instance.update();
3970
4003
  }
3971
4004
  delete leavingHooks.afterLeave;
4005
+ oldInnerChild = void 0;
3972
4006
  };
3973
4007
  return emptyPlaceholder(child);
3974
4008
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -3982,10 +4016,19 @@ const BaseTransitionImpl = {
3982
4016
  earlyRemove();
3983
4017
  el[leaveCbKey] = void 0;
3984
4018
  delete enterHooks.delayedLeave;
4019
+ oldInnerChild = void 0;
4020
+ };
4021
+ enterHooks.delayedLeave = () => {
4022
+ delayedLeave();
4023
+ delete enterHooks.delayedLeave;
4024
+ oldInnerChild = void 0;
3985
4025
  };
3986
- enterHooks.delayedLeave = delayedLeave;
3987
4026
  };
4027
+ } else {
4028
+ oldInnerChild = void 0;
3988
4029
  }
4030
+ } else if (oldInnerChild) {
4031
+ oldInnerChild = void 0;
3989
4032
  }
3990
4033
  return child;
3991
4034
  };
@@ -4293,6 +4336,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4293
4336
  return;
4294
4337
  }
4295
4338
  if (isAsyncWrapper(vnode) && !isUnmount) {
4339
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
4340
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
4341
+ }
4296
4342
  return;
4297
4343
  }
4298
4344
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -4557,7 +4603,7 @@ function createHydrationFunctions(rendererInternals) {
4557
4603
  getContainerType(container),
4558
4604
  optimized
4559
4605
  );
4560
- if (isAsyncWrapper(vnode)) {
4606
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
4561
4607
  let subTree;
4562
4608
  if (isFragmentStart) {
4563
4609
  subTree = createVNode(Fragment);
@@ -4826,6 +4872,10 @@ Server rendered element contains fewer child nodes than client vdom.`
4826
4872
  getContainerType(container),
4827
4873
  slotScopeIds
4828
4874
  );
4875
+ if (parentComponent) {
4876
+ parentComponent.vnode.el = vnode.el;
4877
+ updateHOCHostEl(parentComponent, vnode.el);
4878
+ }
4829
4879
  return next;
4830
4880
  };
4831
4881
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -5428,7 +5478,7 @@ const KeepAliveImpl = {
5428
5478
  );
5429
5479
  const { include, exclude, max } = props;
5430
5480
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
5431
- vnode.shapeFlag &= ~256;
5481
+ vnode.shapeFlag &= -257;
5432
5482
  current = vnode;
5433
5483
  return rawVNode;
5434
5484
  }
@@ -5519,8 +5569,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
5519
5569
  }, target);
5520
5570
  }
5521
5571
  function resetShapeFlag(vnode) {
5522
- vnode.shapeFlag &= ~256;
5523
- vnode.shapeFlag &= ~512;
5572
+ vnode.shapeFlag &= -257;
5573
+ vnode.shapeFlag &= -513;
5524
5574
  }
5525
5575
  function getInnerChild(vnode) {
5526
5576
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -5922,14 +5972,16 @@ function renderList(source, renderItem, cache, index) {
5922
5972
  if (sourceIsArray || isString(source)) {
5923
5973
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
5924
5974
  let needsWrap = false;
5975
+ let isReadonlySource = false;
5925
5976
  if (sourceIsReactiveArray) {
5926
5977
  needsWrap = !isShallow(source);
5978
+ isReadonlySource = isReadonly(source);
5927
5979
  source = shallowReadArray(source);
5928
5980
  }
5929
5981
  ret = new Array(source.length);
5930
5982
  for (let i = 0, l = source.length; i < l; i++) {
5931
5983
  ret[i] = renderItem(
5932
- needsWrap ? toReactive(source[i]) : source[i],
5984
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
5933
5985
  i,
5934
5986
  void 0,
5935
5987
  cached && cached[i]
@@ -7181,7 +7233,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7181
7233
  return vm;
7182
7234
  }
7183
7235
  }
7184
- Vue.version = `2.6.14-compat:${"3.5.12"}`;
7236
+ Vue.version = `2.6.14-compat:${"3.5.14"}`;
7185
7237
  Vue.config = singletonApp.config;
7186
7238
  Vue.use = (plugin, ...options) => {
7187
7239
  if (plugin && isFunction(plugin.install)) {
@@ -7675,11 +7727,9 @@ function createAppAPI(render, hydrate) {
7675
7727
  }
7676
7728
  {
7677
7729
  context.reload = () => {
7678
- render(
7679
- cloneVNode(vnode),
7680
- rootContainer,
7681
- namespace
7682
- );
7730
+ const cloned = cloneVNode(vnode);
7731
+ cloned.el = null;
7732
+ render(cloned, rootContainer, namespace);
7683
7733
  };
7684
7734
  }
7685
7735
  if (isHydrate && hydrate) {
@@ -8277,7 +8327,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
8277
8327
  return rawSlot;
8278
8328
  }
8279
8329
  const normalized = withCtx((...args) => {
8280
- if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
8330
+ if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
8281
8331
  warn$1(
8282
8332
  `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
8283
8333
  );
@@ -8316,7 +8366,7 @@ const normalizeVNodeSlots = (instance, children) => {
8316
8366
  };
8317
8367
  const assignSlots = (slots, children, optimized) => {
8318
8368
  for (const key in children) {
8319
- if (optimized || key !== "_") {
8369
+ if (optimized || !isInternalKey(key)) {
8320
8370
  slots[key] = children[key];
8321
8371
  }
8322
8372
  }
@@ -9003,8 +9053,8 @@ function baseCreateRenderer(options, createHydrationFns) {
9003
9053
  endMeasure(instance, `init`);
9004
9054
  }
9005
9055
  }
9056
+ if (isHmrUpdating) initialVNode.el = null;
9006
9057
  if (instance.asyncDep) {
9007
- if (isHmrUpdating) initialVNode.el = null;
9008
9058
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
9009
9059
  if (!initialVNode.el) {
9010
9060
  const placeholder = instance.subTree = createVNode(Comment);
@@ -9590,7 +9640,13 @@ function baseCreateRenderer(options, createHydrationFns) {
9590
9640
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
9591
9641
  } else {
9592
9642
  const { leave, delayLeave, afterLeave } = transition;
9593
- const remove2 = () => hostInsert(el, container, anchor);
9643
+ const remove2 = () => {
9644
+ if (vnode.ctx.isUnmounted) {
9645
+ hostRemove(el);
9646
+ } else {
9647
+ hostInsert(el, container, anchor);
9648
+ }
9649
+ };
9594
9650
  const performLeave = () => {
9595
9651
  leave(el, () => {
9596
9652
  remove2();
@@ -9623,7 +9679,9 @@ function baseCreateRenderer(options, createHydrationFns) {
9623
9679
  optimized = false;
9624
9680
  }
9625
9681
  if (ref != null) {
9682
+ pauseTracking();
9626
9683
  setRef(ref, null, parentSuspense, vnode, true);
9684
+ resetTracking();
9627
9685
  }
9628
9686
  if (cacheIndex != null) {
9629
9687
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -9735,12 +9793,27 @@ function baseCreateRenderer(options, createHydrationFns) {
9735
9793
  if (instance.type.__hmrId) {
9736
9794
  unregisterHMR(instance);
9737
9795
  }
9738
- const { bum, scope, job, subTree, um, m, a } = instance;
9796
+ const {
9797
+ bum,
9798
+ scope,
9799
+ job,
9800
+ subTree,
9801
+ um,
9802
+ m,
9803
+ a,
9804
+ parent,
9805
+ slots: { __: slotCacheKeys }
9806
+ } = instance;
9739
9807
  invalidateMount(m);
9740
9808
  invalidateMount(a);
9741
9809
  if (bum) {
9742
9810
  invokeArrayFns(bum);
9743
9811
  }
9812
+ if (parent && isArray(slotCacheKeys)) {
9813
+ slotCacheKeys.forEach((v) => {
9814
+ parent.renderCache[v] = void 0;
9815
+ });
9816
+ }
9744
9817
  if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) {
9745
9818
  instance.emit("hook:beforeDestroy");
9746
9819
  }
@@ -9845,8 +9918,8 @@ function toggleRecurse({ effect, job }, allowed) {
9845
9918
  effect.flags |= 32;
9846
9919
  job.flags |= 4;
9847
9920
  } else {
9848
- effect.flags &= ~32;
9849
- job.flags &= ~4;
9921
+ effect.flags &= -33;
9922
+ job.flags &= -5;
9850
9923
  }
9851
9924
  }
9852
9925
  function needTransition(parentSuspense, transition) {
@@ -9873,6 +9946,9 @@ function traverseStaticChildren(n1, n2, shallow = false) {
9873
9946
  if (c2.type === Comment && !c2.el) {
9874
9947
  c2.el = c1.el;
9875
9948
  }
9949
+ {
9950
+ c2.el && (c2.el.__vnode = c2);
9951
+ }
9876
9952
  }
9877
9953
  }
9878
9954
  }
@@ -10396,7 +10472,7 @@ function renderComponentRoot(instance) {
10396
10472
  }
10397
10473
  if (extraAttrs.length) {
10398
10474
  warn$1(
10399
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
10475
+ `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
10400
10476
  );
10401
10477
  }
10402
10478
  if (eventAttrs.length) {
@@ -11257,9 +11333,9 @@ function closeBlock() {
11257
11333
  currentBlock = blockStack[blockStack.length - 1] || null;
11258
11334
  }
11259
11335
  let isBlockTreeEnabled = 1;
11260
- function setBlockTracking(value) {
11336
+ function setBlockTracking(value, inVOnce = false) {
11261
11337
  isBlockTreeEnabled += value;
11262
- if (value < 0 && currentBlock) {
11338
+ if (value < 0 && currentBlock && inVOnce) {
11263
11339
  currentBlock.hasOnce = true;
11264
11340
  }
11265
11341
  }
@@ -11303,8 +11379,8 @@ function isSameVNodeType(n1, n2) {
11303
11379
  if (n2.shapeFlag & 6 && n1.component) {
11304
11380
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
11305
11381
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
11306
- n1.shapeFlag &= ~256;
11307
- n2.shapeFlag &= ~512;
11382
+ n1.shapeFlag &= -257;
11383
+ n2.shapeFlag &= -513;
11308
11384
  return false;
11309
11385
  }
11310
11386
  }
@@ -11775,7 +11851,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
11775
11851
  const { props, children } = instance.vnode;
11776
11852
  const isStateful = isStatefulComponent(instance);
11777
11853
  initProps(instance, props, isStateful, isSSR);
11778
- initSlots(instance, children, optimized);
11854
+ initSlots(instance, children, optimized || isSSR);
11779
11855
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
11780
11856
  isSSR && setInSSRSetupState(false);
11781
11857
  return setupResult;
@@ -12118,13 +12194,15 @@ function initCustomFormatter() {
12118
12194
  if (obj.__isVue) {
12119
12195
  return ["div", vueStyle, `VueInstance`];
12120
12196
  } else if (isRef(obj)) {
12197
+ pauseTracking();
12198
+ const value = obj.value;
12199
+ resetTracking();
12121
12200
  return [
12122
12201
  "div",
12123
12202
  {},
12124
12203
  ["span", vueStyle, genRefFlag(obj)],
12125
12204
  "<",
12126
- // avoid debugger accessing value affecting behavior
12127
- formatValue("_value" in obj ? obj._value : obj),
12205
+ formatValue(value),
12128
12206
  `>`
12129
12207
  ];
12130
12208
  } else if (isReactive(obj)) {
@@ -12305,7 +12383,7 @@ function isMemoSame(cached, memo) {
12305
12383
  return true;
12306
12384
  }
12307
12385
 
12308
- const version = "3.5.12";
12386
+ const version = "3.5.14";
12309
12387
  const warn = warn$1 ;
12310
12388
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12311
12389
  const devtools = devtools$1 ;
@@ -12515,7 +12593,8 @@ function resolveTransitionProps(rawProps) {
12515
12593
  onAppear = onEnter,
12516
12594
  onAppearCancelled = onEnterCancelled
12517
12595
  } = baseProps;
12518
- const finishEnter = (el, isAppear, done) => {
12596
+ const finishEnter = (el, isAppear, done, isCancelled) => {
12597
+ el._enterCancelled = isCancelled;
12519
12598
  removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
12520
12599
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
12521
12600
  done && done();
@@ -12573,8 +12652,13 @@ function resolveTransitionProps(rawProps) {
12573
12652
  if (legacyClassEnabled && legacyLeaveFromClass) {
12574
12653
  addTransitionClass(el, legacyLeaveFromClass);
12575
12654
  }
12576
- addTransitionClass(el, leaveActiveClass);
12577
- forceReflow();
12655
+ if (!el._enterCancelled) {
12656
+ forceReflow();
12657
+ addTransitionClass(el, leaveActiveClass);
12658
+ } else {
12659
+ addTransitionClass(el, leaveActiveClass);
12660
+ forceReflow();
12661
+ }
12578
12662
  nextFrame(() => {
12579
12663
  if (!el._isLeaving) {
12580
12664
  return;
@@ -12591,11 +12675,11 @@ function resolveTransitionProps(rawProps) {
12591
12675
  callHook(onLeave, [el, resolve]);
12592
12676
  },
12593
12677
  onEnterCancelled(el) {
12594
- finishEnter(el, false);
12678
+ finishEnter(el, false, void 0, true);
12595
12679
  callHook(onEnterCancelled, [el]);
12596
12680
  },
12597
12681
  onAppearCancelled(el) {
12598
- finishEnter(el, true);
12682
+ finishEnter(el, true, void 0, true);
12599
12683
  callHook(onAppearCancelled, [el]);
12600
12684
  },
12601
12685
  onLeaveCancelled(el) {
@@ -13138,7 +13222,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
13138
13222
  }
13139
13223
  return false;
13140
13224
  }
13141
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
13225
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
13142
13226
  return false;
13143
13227
  }
13144
13228
  if (key === "form") {
@@ -13403,6 +13487,8 @@ class VueElement extends BaseClass {
13403
13487
  this._update();
13404
13488
  }
13405
13489
  if (shouldReflect) {
13490
+ const ob = this._ob;
13491
+ ob && ob.disconnect();
13406
13492
  if (val === true) {
13407
13493
  this.setAttribute(hyphenate(key), "");
13408
13494
  } else if (typeof val === "string" || typeof val === "number") {
@@ -13410,6 +13496,7 @@ class VueElement extends BaseClass {
13410
13496
  } else if (!val) {
13411
13497
  this.removeAttribute(hyphenate(key));
13412
13498
  }
13499
+ ob && ob.observe(this, { attributes: true });
13413
13500
  }
13414
13501
  }
13415
13502
  }
@@ -13627,6 +13714,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13627
13714
  instance.vnode.el,
13628
13715
  moveClass
13629
13716
  )) {
13717
+ prevChildren = [];
13630
13718
  return;
13631
13719
  }
13632
13720
  prevChildren.forEach(callPendingCbs);
@@ -13650,6 +13738,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13650
13738
  };
13651
13739
  el.addEventListener("transitionend", cb);
13652
13740
  });
13741
+ prevChildren = [];
13653
13742
  });
13654
13743
  return () => {
13655
13744
  const rawProps = toRaw(props);
@@ -14670,12 +14759,13 @@ function createConditionalExpression(test, consequent, alternate, newline = true
14670
14759
  loc: locStub
14671
14760
  };
14672
14761
  }
14673
- function createCacheExpression(index, value, needPauseTracking = false) {
14762
+ function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) {
14674
14763
  return {
14675
14764
  type: 20,
14676
14765
  index,
14677
14766
  value,
14678
14767
  needPauseTracking,
14768
+ inVOnce,
14679
14769
  needArraySpread: false,
14680
14770
  loc: locStub
14681
14771
  };
@@ -15954,7 +16044,7 @@ function isReferenced(node, parent, grandparent) {
15954
16044
  if (parent.key === node) {
15955
16045
  return !!parent.computed;
15956
16046
  }
15957
- return !grandparent;
16047
+ return true;
15958
16048
  // no: class { NODE = value; }
15959
16049
  // yes: class { [NODE] = value; }
15960
16050
  // yes: class { key = NODE; }
@@ -16578,7 +16668,7 @@ const tokenizer = new Tokenizer(stack, {
16578
16668
  "COMPILER_V_BIND_SYNC",
16579
16669
  currentOptions,
16580
16670
  currentProp.loc,
16581
- currentProp.rawName
16671
+ currentProp.arg.loc.source
16582
16672
  )) {
16583
16673
  currentProp.name = "model";
16584
16674
  currentProp.modifiers.splice(syncIndex, 1);
@@ -17170,6 +17260,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
17170
17260
  }
17171
17261
  }
17172
17262
  let cachedAsArray = false;
17263
+ const slotCacheKeys = [];
17173
17264
  if (toCache.length === children.length && node.type === 1) {
17174
17265
  if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
17175
17266
  node.codegenNode.children = getCacheExpression(
@@ -17179,6 +17270,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
17179
17270
  } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
17180
17271
  const slot = getSlotNode(node.codegenNode, "default");
17181
17272
  if (slot) {
17273
+ slotCacheKeys.push(context.cached.length);
17182
17274
  slot.returns = getCacheExpression(
17183
17275
  createArrayExpression(slot.returns)
17184
17276
  );
@@ -17188,6 +17280,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
17188
17280
  const slotName = findDir(node, "slot", true);
17189
17281
  const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
17190
17282
  if (slot) {
17283
+ slotCacheKeys.push(context.cached.length);
17191
17284
  slot.returns = getCacheExpression(
17192
17285
  createArrayExpression(slot.returns)
17193
17286
  );
@@ -17197,9 +17290,18 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
17197
17290
  }
17198
17291
  if (!cachedAsArray) {
17199
17292
  for (const child of toCache) {
17293
+ slotCacheKeys.push(context.cached.length);
17200
17294
  child.codegenNode = context.cache(child.codegenNode);
17201
17295
  }
17202
17296
  }
17297
+ 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) {
17298
+ node.codegenNode.children.properties.push(
17299
+ createObjectProperty(
17300
+ `__`,
17301
+ createSimpleExpression(JSON.stringify(slotCacheKeys), false)
17302
+ )
17303
+ );
17304
+ }
17203
17305
  function getCacheExpression(value) {
17204
17306
  const exp = context.cache(value);
17205
17307
  if (inFor && context.hmr) {
@@ -17540,11 +17642,12 @@ function createTransformContext(root, {
17540
17642
  identifier.hoisted = exp;
17541
17643
  return identifier;
17542
17644
  },
17543
- cache(exp, isVNode = false) {
17645
+ cache(exp, isVNode = false, inVOnce = false) {
17544
17646
  const cacheExp = createCacheExpression(
17545
17647
  context.cached.length,
17546
17648
  exp,
17547
- isVNode
17649
+ isVNode,
17650
+ inVOnce
17548
17651
  );
17549
17652
  context.cached.push(cacheExp);
17550
17653
  return cacheExp;
@@ -18400,7 +18503,9 @@ function genCacheExpression(node, context) {
18400
18503
  push(`_cache[${node.index}] || (`);
18401
18504
  if (needPauseTracking) {
18402
18505
  indent();
18403
- push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
18506
+ push(`${helper(SET_BLOCK_TRACKING)}(-1`);
18507
+ if (node.inVOnce) push(`, true`);
18508
+ push(`),`);
18404
18509
  newline();
18405
18510
  push(`(`);
18406
18511
  }
@@ -18488,12 +18593,14 @@ const transformExpression = (node, context) => {
18488
18593
  context
18489
18594
  );
18490
18595
  } else if (node.type === 1) {
18596
+ const memo = findDir(node, "memo");
18491
18597
  for (let i = 0; i < node.props.length; i++) {
18492
18598
  const dir = node.props[i];
18493
18599
  if (dir.type === 7 && dir.name !== "for") {
18494
18600
  const exp = dir.exp;
18495
18601
  const arg = dir.arg;
18496
- if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
18602
+ if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
18603
+ !(memo && arg && arg.type === 4 && arg.content === "key")) {
18497
18604
  dir.exp = processExpression(
18498
18605
  exp,
18499
18606
  context,
@@ -19021,10 +19128,19 @@ const transformFor = createStructuralDirectiveTransform(
19021
19128
  const isTemplate = isTemplateNode(node);
19022
19129
  const memo = findDir(node, "memo");
19023
19130
  const keyProp = findProp(node, `key`, false, true);
19024
- if (keyProp && keyProp.type === 7 && !keyProp.exp) {
19131
+ const isDirKey = keyProp && keyProp.type === 7;
19132
+ if (isDirKey && !keyProp.exp) {
19025
19133
  transformBindShorthand(keyProp, context);
19026
19134
  }
19027
- const keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
19135
+ let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
19136
+ if (memo && keyExp && isDirKey) {
19137
+ {
19138
+ keyProp.exp = keyExp = processExpression(
19139
+ keyExp,
19140
+ context
19141
+ );
19142
+ }
19143
+ }
19028
19144
  const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
19029
19145
  if (isTemplate) {
19030
19146
  if (memo) {
@@ -20416,8 +20532,8 @@ const transformOnce = (node, context) => {
20416
20532
  if (cur.codegenNode) {
20417
20533
  cur.codegenNode = context.cache(
20418
20534
  cur.codegenNode,
20535
+ true,
20419
20536
  true
20420
- /* isVNode */
20421
20537
  );
20422
20538
  }
20423
20539
  };