@vue/runtime-core 3.5.13 → 3.5.15

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/runtime-core v3.5.13
2
+ * @vue/runtime-core v3.5.15
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -348,11 +348,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
348
348
  queue.splice(i, 1);
349
349
  i--;
350
350
  if (cb.flags & 4) {
351
- cb.flags &= ~1;
351
+ cb.flags &= -2;
352
352
  }
353
353
  cb();
354
354
  if (!(cb.flags & 4)) {
355
- cb.flags &= ~1;
355
+ cb.flags &= -2;
356
356
  }
357
357
  }
358
358
  }
@@ -377,10 +377,10 @@ function flushPostFlushCbs(seen) {
377
377
  continue;
378
378
  }
379
379
  if (cb.flags & 4) {
380
- cb.flags &= ~1;
380
+ cb.flags &= -2;
381
381
  }
382
382
  if (!(cb.flags & 8)) cb();
383
- cb.flags &= ~1;
383
+ cb.flags &= -2;
384
384
  }
385
385
  activePostFlushCbs = null;
386
386
  postFlushIndex = 0;
@@ -416,7 +416,7 @@ function flushJobs(seen) {
416
416
  for (; flushIndex < queue.length; flushIndex++) {
417
417
  const job = queue[flushIndex];
418
418
  if (job) {
419
- job.flags &= ~1;
419
+ job.flags &= -2;
420
420
  }
421
421
  }
422
422
  flushIndex = -1;
@@ -856,15 +856,16 @@ const TeleportImpl = {
856
856
  updateCssVars(n2, true);
857
857
  }
858
858
  if (isTeleportDeferred(n2.props)) {
859
+ n2.el.__isMounted = false;
859
860
  queuePostRenderEffect(() => {
860
861
  mountToTarget();
861
- n2.el.__isMounted = true;
862
+ delete n2.el.__isMounted;
862
863
  }, parentSuspense);
863
864
  } else {
864
865
  mountToTarget();
865
866
  }
866
867
  } else {
867
- if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
868
+ if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
868
869
  queuePostRenderEffect(() => {
869
870
  TeleportImpl.process(
870
871
  n1,
@@ -878,7 +879,6 @@ const TeleportImpl = {
878
879
  optimized,
879
880
  internals
880
881
  );
881
- delete n1.el.__isMounted;
882
882
  }, parentSuspense);
883
883
  return;
884
884
  }
@@ -905,7 +905,7 @@ const TeleportImpl = {
905
905
  namespace,
906
906
  slotScopeIds
907
907
  );
908
- traverseStaticChildren(n1, n2, true);
908
+ traverseStaticChildren(n1, n2, false);
909
909
  } else if (!optimized) {
910
910
  patchChildren(
911
911
  n1,
@@ -1866,6 +1866,8 @@ function createHydrationFunctions(rendererInternals) {
1866
1866
  ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
1867
1867
  const content = el.content.firstChild;
1868
1868
  if (needCallTransitionHooks) {
1869
+ const cls = content.getAttribute("class");
1870
+ if (cls) content.$cls = cls;
1869
1871
  transition.beforeEnter(content);
1870
1872
  }
1871
1873
  replaceNode(content, el, parentComponent);
@@ -2118,7 +2120,12 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
2118
2120
  let actual;
2119
2121
  let expected;
2120
2122
  if (key === "class") {
2121
- actual = el.getAttribute("class");
2123
+ if (el.$cls) {
2124
+ actual = el.$cls;
2125
+ delete el.$cls;
2126
+ } else {
2127
+ actual = el.getAttribute("class");
2128
+ }
2122
2129
  expected = shared.normalizeClass(clientValue);
2123
2130
  if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
2124
2131
  mismatchType = 2 /* CLASS */;
@@ -2413,14 +2420,25 @@ function defineAsyncComponent(source) {
2413
2420
  name: "AsyncComponentWrapper",
2414
2421
  __asyncLoader: load,
2415
2422
  __asyncHydrate(el, instance, hydrate) {
2423
+ let patched = false;
2416
2424
  const doHydrate = hydrateStrategy ? () => {
2425
+ const performHydrate = () => {
2426
+ if (patched) {
2427
+ warn$1(
2428
+ `Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
2429
+ );
2430
+ return;
2431
+ }
2432
+ hydrate();
2433
+ };
2417
2434
  const teardown = hydrateStrategy(
2418
- hydrate,
2435
+ performHydrate,
2419
2436
  (cb) => forEachElement(el, cb)
2420
2437
  );
2421
2438
  if (teardown) {
2422
2439
  (instance.bum || (instance.bum = [])).push(teardown);
2423
2440
  }
2441
+ (instance.u || (instance.u = [])).push(() => patched = true);
2424
2442
  } : hydrate;
2425
2443
  if (resolvedComp) {
2426
2444
  doHydrate();
@@ -2677,7 +2695,7 @@ const KeepAliveImpl = {
2677
2695
  );
2678
2696
  const { include, exclude, max } = props;
2679
2697
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
2680
- vnode.shapeFlag &= ~256;
2698
+ vnode.shapeFlag &= -257;
2681
2699
  current = vnode;
2682
2700
  return rawVNode;
2683
2701
  }
@@ -2764,8 +2782,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
2764
2782
  }, target);
2765
2783
  }
2766
2784
  function resetShapeFlag(vnode) {
2767
- vnode.shapeFlag &= ~256;
2768
- vnode.shapeFlag &= ~512;
2785
+ vnode.shapeFlag &= -257;
2786
+ vnode.shapeFlag &= -513;
2769
2787
  }
2770
2788
  function getInnerChild(vnode) {
2771
2789
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -2880,14 +2898,16 @@ function renderList(source, renderItem, cache, index) {
2880
2898
  if (sourceIsArray || shared.isString(source)) {
2881
2899
  const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source);
2882
2900
  let needsWrap = false;
2901
+ let isReadonlySource = false;
2883
2902
  if (sourceIsReactiveArray) {
2884
2903
  needsWrap = !reactivity.isShallow(source);
2904
+ isReadonlySource = reactivity.isReadonly(source);
2885
2905
  source = reactivity.shallowReadArray(source);
2886
2906
  }
2887
2907
  ret = new Array(source.length);
2888
2908
  for (let i = 0, l = source.length; i < l; i++) {
2889
2909
  ret[i] = renderItem(
2890
- needsWrap ? reactivity.toReactive(source[i]) : source[i],
2910
+ needsWrap ? isReadonlySource ? reactivity.toReadonly(reactivity.toReactive(source[i])) : reactivity.toReactive(source[i]) : source[i],
2891
2911
  i,
2892
2912
  void 0,
2893
2913
  cached && cached[i]
@@ -3909,11 +3929,9 @@ function createAppAPI(render, hydrate) {
3909
3929
  }
3910
3930
  {
3911
3931
  context.reload = () => {
3912
- render(
3913
- cloneVNode(vnode),
3914
- rootContainer,
3915
- namespace
3916
- );
3932
+ const cloned = cloneVNode(vnode);
3933
+ cloned.el = null;
3934
+ render(cloned, rootContainer, namespace);
3917
3935
  };
3918
3936
  }
3919
3937
  if (isHydrate && hydrate) {
@@ -3963,9 +3981,15 @@ If you want to remount the same app, move your app creation logic into a factory
3963
3981
  },
3964
3982
  provide(key, value) {
3965
3983
  if (key in context.provides) {
3966
- warn$1(
3967
- `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
3968
- );
3984
+ if (shared.hasOwn(context.provides, key)) {
3985
+ warn$1(
3986
+ `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
3987
+ );
3988
+ } else {
3989
+ warn$1(
3990
+ `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
3991
+ );
3992
+ }
3969
3993
  }
3970
3994
  context.provides[key] = value;
3971
3995
  return app;
@@ -4002,7 +4026,7 @@ function provide(key, value) {
4002
4026
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
4003
4027
  const instance = currentInstance || currentRenderingInstance;
4004
4028
  if (instance || currentApp) {
4005
- const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
4029
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
4006
4030
  if (provides && key in provides) {
4007
4031
  return provides[key];
4008
4032
  } else if (arguments.length > 1) {
@@ -4436,7 +4460,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
4436
4460
  return rawSlot;
4437
4461
  }
4438
4462
  const normalized = withCtx((...args) => {
4439
- if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
4463
+ if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
4440
4464
  warn$1(
4441
4465
  `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.`
4442
4466
  );
@@ -4475,7 +4499,7 @@ const normalizeVNodeSlots = (instance, children) => {
4475
4499
  };
4476
4500
  const assignSlots = (slots, children, optimized) => {
4477
4501
  for (const key in children) {
4478
- if (optimized || key !== "_") {
4502
+ if (optimized || !isInternalKey(key)) {
4479
4503
  slots[key] = children[key];
4480
4504
  }
4481
4505
  }
@@ -4999,7 +5023,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4999
5023
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
5000
5024
  // which also requires the correct parent container
5001
5025
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
5002
- oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
5026
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
5003
5027
  // In other cases, the parent container is not actually used so we
5004
5028
  // just pass the block element here to avoid a DOM parentNode call.
5005
5029
  fallbackContainer
@@ -5161,8 +5185,8 @@ function baseCreateRenderer(options, createHydrationFns) {
5161
5185
  endMeasure(instance, `init`);
5162
5186
  }
5163
5187
  }
5188
+ if (isHmrUpdating) initialVNode.el = null;
5164
5189
  if (instance.asyncDep) {
5165
- if (isHmrUpdating) initialVNode.el = null;
5166
5190
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
5167
5191
  if (!initialVNode.el) {
5168
5192
  const placeholder = instance.subTree = createVNode(Comment);
@@ -5724,7 +5748,13 @@ function baseCreateRenderer(options, createHydrationFns) {
5724
5748
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
5725
5749
  } else {
5726
5750
  const { leave, delayLeave, afterLeave } = transition;
5727
- const remove2 = () => hostInsert(el, container, anchor);
5751
+ const remove2 = () => {
5752
+ if (vnode.ctx.isUnmounted) {
5753
+ hostRemove(el);
5754
+ } else {
5755
+ hostInsert(el, container, anchor);
5756
+ }
5757
+ };
5728
5758
  const performLeave = () => {
5729
5759
  leave(el, () => {
5730
5760
  remove2();
@@ -5757,7 +5787,9 @@ function baseCreateRenderer(options, createHydrationFns) {
5757
5787
  optimized = false;
5758
5788
  }
5759
5789
  if (ref != null) {
5790
+ reactivity.pauseTracking();
5760
5791
  setRef(ref, null, parentSuspense, vnode, true);
5792
+ reactivity.resetTracking();
5761
5793
  }
5762
5794
  if (cacheIndex != null) {
5763
5795
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -5869,12 +5901,27 @@ function baseCreateRenderer(options, createHydrationFns) {
5869
5901
  if (instance.type.__hmrId) {
5870
5902
  unregisterHMR(instance);
5871
5903
  }
5872
- const { bum, scope, job, subTree, um, m, a } = instance;
5904
+ const {
5905
+ bum,
5906
+ scope,
5907
+ job,
5908
+ subTree,
5909
+ um,
5910
+ m,
5911
+ a,
5912
+ parent,
5913
+ slots: { __: slotCacheKeys }
5914
+ } = instance;
5873
5915
  invalidateMount(m);
5874
5916
  invalidateMount(a);
5875
5917
  if (bum) {
5876
5918
  shared.invokeArrayFns(bum);
5877
5919
  }
5920
+ if (parent && shared.isArray(slotCacheKeys)) {
5921
+ slotCacheKeys.forEach((v) => {
5922
+ parent.renderCache[v] = void 0;
5923
+ });
5924
+ }
5878
5925
  scope.stop();
5879
5926
  if (job) {
5880
5927
  job.flags |= 8;
@@ -5970,8 +6017,8 @@ function toggleRecurse({ effect, job }, allowed) {
5970
6017
  effect.flags |= 32;
5971
6018
  job.flags |= 4;
5972
6019
  } else {
5973
- effect.flags &= ~32;
5974
- job.flags &= ~4;
6020
+ effect.flags &= -33;
6021
+ job.flags &= -5;
5975
6022
  }
5976
6023
  }
5977
6024
  function needTransition(parentSuspense, transition) {
@@ -5998,6 +6045,9 @@ function traverseStaticChildren(n1, n2, shallow = false) {
5998
6045
  if (c2.type === Comment && !c2.el) {
5999
6046
  c2.el = c1.el;
6000
6047
  }
6048
+ {
6049
+ c2.el && (c2.el.__vnode = c2);
6050
+ }
6001
6051
  }
6002
6052
  }
6003
6053
  }
@@ -7343,8 +7393,8 @@ function isSameVNodeType(n1, n2) {
7343
7393
  if (n2.shapeFlag & 6 && n1.component) {
7344
7394
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
7345
7395
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
7346
- n1.shapeFlag &= ~256;
7347
- n2.shapeFlag &= ~512;
7396
+ n1.shapeFlag &= -257;
7397
+ n2.shapeFlag &= -513;
7348
7398
  return false;
7349
7399
  }
7350
7400
  }
@@ -7805,7 +7855,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
7805
7855
  const { props, children } = instance.vnode;
7806
7856
  const isStateful = isStatefulComponent(instance);
7807
7857
  initProps(instance, props, isStateful, isSSR);
7808
- initSlots(instance, children, optimized);
7858
+ initSlots(instance, children, optimized || isSSR);
7809
7859
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
7810
7860
  isSSR && setInSSRSetupState(false);
7811
7861
  return setupResult;
@@ -8136,13 +8186,15 @@ function initCustomFormatter() {
8136
8186
  if (obj.__isVue) {
8137
8187
  return ["div", vueStyle, `VueInstance`];
8138
8188
  } else if (reactivity.isRef(obj)) {
8189
+ reactivity.pauseTracking();
8190
+ const value = obj.value;
8191
+ reactivity.resetTracking();
8139
8192
  return [
8140
8193
  "div",
8141
8194
  {},
8142
8195
  ["span", vueStyle, genRefFlag(obj)],
8143
8196
  "<",
8144
- // avoid debugger accessing value affecting behavior
8145
- formatValue("_value" in obj ? obj._value : obj),
8197
+ formatValue(value),
8146
8198
  `>`
8147
8199
  ];
8148
8200
  } else if (reactivity.isReactive(obj)) {
@@ -8323,7 +8375,7 @@ function isMemoSame(cached, memo) {
8323
8375
  return true;
8324
8376
  }
8325
8377
 
8326
- const version = "3.5.13";
8378
+ const version = "3.5.15";
8327
8379
  const warn = warn$1 ;
8328
8380
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8329
8381
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.13
2
+ * @vue/runtime-core v3.5.15
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -213,11 +213,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
213
213
  queue.splice(i, 1);
214
214
  i--;
215
215
  if (cb.flags & 4) {
216
- cb.flags &= ~1;
216
+ cb.flags &= -2;
217
217
  }
218
218
  cb();
219
219
  if (!(cb.flags & 4)) {
220
- cb.flags &= ~1;
220
+ cb.flags &= -2;
221
221
  }
222
222
  }
223
223
  }
@@ -236,10 +236,10 @@ function flushPostFlushCbs(seen) {
236
236
  for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
237
237
  const cb = activePostFlushCbs[postFlushIndex];
238
238
  if (cb.flags & 4) {
239
- cb.flags &= ~1;
239
+ cb.flags &= -2;
240
240
  }
241
241
  if (!(cb.flags & 8)) cb();
242
- cb.flags &= ~1;
242
+ cb.flags &= -2;
243
243
  }
244
244
  activePostFlushCbs = null;
245
245
  postFlushIndex = 0;
@@ -269,7 +269,7 @@ function flushJobs(seen) {
269
269
  for (; flushIndex < queue.length; flushIndex++) {
270
270
  const job = queue[flushIndex];
271
271
  if (job) {
272
- job.flags &= ~1;
272
+ job.flags &= -2;
273
273
  }
274
274
  }
275
275
  flushIndex = -1;
@@ -449,15 +449,16 @@ const TeleportImpl = {
449
449
  updateCssVars(n2, true);
450
450
  }
451
451
  if (isTeleportDeferred(n2.props)) {
452
+ n2.el.__isMounted = false;
452
453
  queuePostRenderEffect(() => {
453
454
  mountToTarget();
454
- n2.el.__isMounted = true;
455
+ delete n2.el.__isMounted;
455
456
  }, parentSuspense);
456
457
  } else {
457
458
  mountToTarget();
458
459
  }
459
460
  } else {
460
- if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
461
+ if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
461
462
  queuePostRenderEffect(() => {
462
463
  TeleportImpl.process(
463
464
  n1,
@@ -471,7 +472,6 @@ const TeleportImpl = {
471
472
  optimized,
472
473
  internals
473
474
  );
474
- delete n1.el.__isMounted;
475
475
  }, parentSuspense);
476
476
  return;
477
477
  }
@@ -998,6 +998,9 @@ function getInnerChild$1(vnode) {
998
998
  }
999
999
  return vnode;
1000
1000
  }
1001
+ if (vnode.component) {
1002
+ return vnode.component.subTree;
1003
+ }
1001
1004
  const { shapeFlag, children } = vnode;
1002
1005
  if (children) {
1003
1006
  if (shapeFlag & 16) {
@@ -1387,6 +1390,8 @@ function createHydrationFunctions(rendererInternals) {
1387
1390
  ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
1388
1391
  const content = el.content.firstChild;
1389
1392
  if (needCallTransitionHooks) {
1393
+ const cls = content.getAttribute("class");
1394
+ if (cls) content.$cls = cls;
1390
1395
  transition.beforeEnter(content);
1391
1396
  }
1392
1397
  replaceNode(content, el, parentComponent);
@@ -1777,13 +1782,17 @@ function defineAsyncComponent(source) {
1777
1782
  __asyncLoader: load,
1778
1783
  __asyncHydrate(el, instance, hydrate) {
1779
1784
  const doHydrate = hydrateStrategy ? () => {
1785
+ const performHydrate = () => {
1786
+ hydrate();
1787
+ };
1780
1788
  const teardown = hydrateStrategy(
1781
- hydrate,
1789
+ performHydrate,
1782
1790
  (cb) => forEachElement(el, cb)
1783
1791
  );
1784
1792
  if (teardown) {
1785
1793
  (instance.bum || (instance.bum = [])).push(teardown);
1786
1794
  }
1795
+ (instance.u || (instance.u = [])).push(() => true);
1787
1796
  } : hydrate;
1788
1797
  if (resolvedComp) {
1789
1798
  doHydrate();
@@ -2028,7 +2037,7 @@ const KeepAliveImpl = {
2028
2037
  );
2029
2038
  const { include, exclude, max } = props;
2030
2039
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
2031
- vnode.shapeFlag &= ~256;
2040
+ vnode.shapeFlag &= -257;
2032
2041
  current = vnode;
2033
2042
  return rawVNode;
2034
2043
  }
@@ -2115,8 +2124,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
2115
2124
  }, target);
2116
2125
  }
2117
2126
  function resetShapeFlag(vnode) {
2118
- vnode.shapeFlag &= ~256;
2119
- vnode.shapeFlag &= ~512;
2127
+ vnode.shapeFlag &= -257;
2128
+ vnode.shapeFlag &= -513;
2120
2129
  }
2121
2130
  function getInnerChild(vnode) {
2122
2131
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -2217,14 +2226,16 @@ function renderList(source, renderItem, cache, index) {
2217
2226
  if (sourceIsArray || shared.isString(source)) {
2218
2227
  const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source);
2219
2228
  let needsWrap = false;
2229
+ let isReadonlySource = false;
2220
2230
  if (sourceIsReactiveArray) {
2221
2231
  needsWrap = !reactivity.isShallow(source);
2232
+ isReadonlySource = reactivity.isReadonly(source);
2222
2233
  source = reactivity.shallowReadArray(source);
2223
2234
  }
2224
2235
  ret = new Array(source.length);
2225
2236
  for (let i = 0, l = source.length; i < l; i++) {
2226
2237
  ret[i] = renderItem(
2227
- needsWrap ? reactivity.toReactive(source[i]) : source[i],
2238
+ needsWrap ? isReadonlySource ? reactivity.toReadonly(reactivity.toReactive(source[i])) : reactivity.toReactive(source[i]) : source[i],
2228
2239
  i,
2229
2240
  void 0,
2230
2241
  cached && cached[i]
@@ -3037,7 +3048,7 @@ function provide(key, value) {
3037
3048
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
3038
3049
  const instance = currentInstance || currentRenderingInstance;
3039
3050
  if (instance || currentApp) {
3040
- const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
3051
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
3041
3052
  if (provides && key in provides) {
3042
3053
  return provides[key];
3043
3054
  } else if (arguments.length > 1) {
@@ -3357,7 +3368,7 @@ const normalizeVNodeSlots = (instance, children) => {
3357
3368
  };
3358
3369
  const assignSlots = (slots, children, optimized) => {
3359
3370
  for (const key in children) {
3360
- if (optimized || key !== "_") {
3371
+ if (optimized || !isInternalKey(key)) {
3361
3372
  slots[key] = children[key];
3362
3373
  }
3363
3374
  }
@@ -3798,7 +3809,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3798
3809
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
3799
3810
  // which also requires the correct parent container
3800
3811
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
3801
- oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
3812
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
3802
3813
  // In other cases, the parent container is not actually used so we
3803
3814
  // just pass the block element here to avoid a DOM parentNode call.
3804
3815
  fallbackContainer
@@ -4443,7 +4454,13 @@ function baseCreateRenderer(options, createHydrationFns) {
4443
4454
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
4444
4455
  } else {
4445
4456
  const { leave, delayLeave, afterLeave } = transition;
4446
- const remove2 = () => hostInsert(el, container, anchor);
4457
+ const remove2 = () => {
4458
+ if (vnode.ctx.isUnmounted) {
4459
+ hostRemove(el);
4460
+ } else {
4461
+ hostInsert(el, container, anchor);
4462
+ }
4463
+ };
4447
4464
  const performLeave = () => {
4448
4465
  leave(el, () => {
4449
4466
  remove2();
@@ -4476,7 +4493,9 @@ function baseCreateRenderer(options, createHydrationFns) {
4476
4493
  optimized = false;
4477
4494
  }
4478
4495
  if (ref != null) {
4496
+ reactivity.pauseTracking();
4479
4497
  setRef(ref, null, parentSuspense, vnode, true);
4498
+ reactivity.resetTracking();
4480
4499
  }
4481
4500
  if (cacheIndex != null) {
4482
4501
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -4577,12 +4596,27 @@ function baseCreateRenderer(options, createHydrationFns) {
4577
4596
  hostRemove(end);
4578
4597
  };
4579
4598
  const unmountComponent = (instance, parentSuspense, doRemove) => {
4580
- const { bum, scope, job, subTree, um, m, a } = instance;
4599
+ const {
4600
+ bum,
4601
+ scope,
4602
+ job,
4603
+ subTree,
4604
+ um,
4605
+ m,
4606
+ a,
4607
+ parent,
4608
+ slots: { __: slotCacheKeys }
4609
+ } = instance;
4581
4610
  invalidateMount(m);
4582
4611
  invalidateMount(a);
4583
4612
  if (bum) {
4584
4613
  shared.invokeArrayFns(bum);
4585
4614
  }
4615
+ if (parent && shared.isArray(slotCacheKeys)) {
4616
+ slotCacheKeys.forEach((v) => {
4617
+ parent.renderCache[v] = void 0;
4618
+ });
4619
+ }
4586
4620
  scope.stop();
4587
4621
  if (job) {
4588
4622
  job.flags |= 8;
@@ -4675,8 +4709,8 @@ function toggleRecurse({ effect, job }, allowed) {
4675
4709
  effect.flags |= 32;
4676
4710
  job.flags |= 4;
4677
4711
  } else {
4678
- effect.flags &= ~32;
4679
- job.flags &= ~4;
4712
+ effect.flags &= -33;
4713
+ job.flags &= -5;
4680
4714
  }
4681
4715
  }
4682
4716
  function needTransition(parentSuspense, transition) {
@@ -4700,6 +4734,9 @@ function traverseStaticChildren(n1, n2, shallow = false) {
4700
4734
  if (c2.type === Text) {
4701
4735
  c2.el = c1.el;
4702
4736
  }
4737
+ if (c2.type === Comment && !c2.el) {
4738
+ c2.el = c1.el;
4739
+ }
4703
4740
  }
4704
4741
  }
4705
4742
  }
@@ -6275,7 +6312,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
6275
6312
  const { props, children } = instance.vnode;
6276
6313
  const isStateful = isStatefulComponent(instance);
6277
6314
  initProps(instance, props, isStateful, isSSR);
6278
- initSlots(instance, children, optimized);
6315
+ initSlots(instance, children, optimized || isSSR);
6279
6316
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
6280
6317
  isSSR && setInSSRSetupState(false);
6281
6318
  return setupResult;
@@ -6484,7 +6521,7 @@ function isMemoSame(cached, memo) {
6484
6521
  return true;
6485
6522
  }
6486
6523
 
6487
- const version = "3.5.13";
6524
+ const version = "3.5.15";
6488
6525
  const warn$1 = shared.NOOP;
6489
6526
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6490
6527
  const devtools = void 0;
@@ -1,4 +1,4 @@
1
- import { computed as computed$1, Ref, OnCleanup, WatchStopHandle, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, WatchCallback, ReactiveEffect, DebuggerOptions, WatchEffect, WatchHandle, WatchSource, ReactiveMarker, ShallowRef, WatchErrorCodes, reactive } from '@vue/reactivity';
1
+ import { computed as computed$1, Ref, OnCleanup, WatchStopHandle, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, WatchCallback, ReactiveEffect, DebuggerOptions, WatchSource, WatchHandle, ReactiveMarker, WatchEffect, ShallowRef, WatchErrorCodes, reactive } from '@vue/reactivity';
2
2
  export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, Reactive, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WatchCallback, WatchEffect, WatchHandle, WatchSource, WatchStopHandle, WritableComputedOptions, WritableComputedRef, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
3
3
  import { IfAny, Prettify, LooseRequired, UnionToIntersection, OverloadParameters, IsKeyValues } from '@vue/shared';
4
4
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
@@ -129,7 +129,9 @@ type InferPropType<T, NullAsAny = true> = [T] extends [null] ? NullAsAny extends
129
129
  * To extract accepted props from the parent, use {@link ExtractPublicPropTypes}.
130
130
  */
131
131
  export type ExtractPropTypes<O> = {
132
- [K in keyof Pick<O, RequiredKeys<O>>]: InferPropType<O[K]>;
132
+ [K in keyof Pick<O, RequiredKeys<O>>]: O[K] extends {
133
+ default: any;
134
+ } ? Exclude<InferPropType<O[K]>, undefined> : InferPropType<O[K]>;
133
135
  } & {
134
136
  [K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>;
135
137
  };
@@ -417,7 +419,7 @@ export interface ObjectDirective<HostElement = any, Value = any, Modifiers exten
417
419
  }
418
420
  export type FunctionDirective<HostElement = any, V = any, Modifiers extends string = string, Arg extends string = string> = DirectiveHook<HostElement, any, V, Modifiers, Arg>;
419
421
  export type Directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string> = ObjectDirective<HostElement, Value, Modifiers, Arg> | FunctionDirective<HostElement, Value, Modifiers, Arg>;
420
- type DirectiveModifiers<K extends string = string> = Record<K, boolean>;
422
+ type DirectiveModifiers<K extends string = string> = Partial<Record<K, boolean>>;
421
423
  export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, string] | [Directive | undefined, any, string | undefined, DirectiveModifiers]>;
422
424
  /**
423
425
  * Adds directives to a VNode.
@@ -872,20 +874,20 @@ interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOpt
872
874
  filters?: Record<string, Function>;
873
875
  mixins?: Mixin[];
874
876
  extends?: Extends;
875
- beforeCreate?(): void;
876
- created?(): void;
877
- beforeMount?(): void;
878
- mounted?(): void;
879
- beforeUpdate?(): void;
880
- updated?(): void;
881
- activated?(): void;
882
- deactivated?(): void;
877
+ beforeCreate?(): any;
878
+ created?(): any;
879
+ beforeMount?(): any;
880
+ mounted?(): any;
881
+ beforeUpdate?(): any;
882
+ updated?(): any;
883
+ activated?(): any;
884
+ deactivated?(): any;
883
885
  /** @deprecated use `beforeUnmount` instead */
884
- beforeDestroy?(): void;
885
- beforeUnmount?(): void;
886
+ beforeDestroy?(): any;
887
+ beforeUnmount?(): any;
886
888
  /** @deprecated use `unmounted` instead */
887
- destroyed?(): void;
888
- unmounted?(): void;
889
+ destroyed?(): any;
890
+ unmounted?(): any;
889
891
  renderTracked?: DebuggerHook;
890
892
  renderTriggered?: DebuggerHook;
891
893
  errorCaptured?: ErrorCapturedHook;
@@ -1017,8 +1019,8 @@ InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide>
1017
1019
  export interface App<HostElement = any> {
1018
1020
  version: string;
1019
1021
  config: AppConfig;
1020
- use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: Options): this;
1021
- use<Options>(plugin: Plugin<Options>, options: Options): this;
1022
+ use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: NoInfer<Options>): this;
1023
+ use<Options>(plugin: Plugin<Options>, options: NoInfer<Options>): this;
1022
1024
  mixin(mixin: ComponentOptions): this;
1023
1025
  component(name: string): Component | undefined;
1024
1026
  component<T extends Component | DefineComponent>(name: string, component: T): this;
@@ -1105,7 +1107,7 @@ export type ObjectPlugin<Options = any[]> = {
1105
1107
  install: PluginInstallFunction<Options>;
1106
1108
  };
1107
1109
  export type FunctionPlugin<Options = any[]> = PluginInstallFunction<Options> & Partial<ObjectPlugin<Options>>;
1108
- export type Plugin<Options = any[]> = FunctionPlugin<Options> | ObjectPlugin<Options>;
1110
+ export type Plugin<Options = any[], P extends unknown[] = Options extends unknown[] ? Options : [Options]> = FunctionPlugin<P> | ObjectPlugin<P>;
1109
1111
  export type CreateAppFunction<HostElement> = (rootComponent: Component, rootProps?: Data | null) => App<HostElement>;
1110
1112
 
1111
1113
  type TeleportVNode = VNode<RendererNode, RendererElement, TeleportProps>;
@@ -1317,7 +1319,9 @@ type Data = Record<string, unknown>;
1317
1319
  */
1318
1320
  export type ComponentInstance<T> = T extends {
1319
1321
  new (): ComponentPublicInstance;
1320
- } ? InstanceType<T> : T extends FunctionalComponent<infer Props, infer Emits> ? ComponentPublicInstance<Props, {}, {}, {}, {}, ShortEmitsToObject<Emits>> : T extends Component<infer Props, infer RawBindings, infer D, infer C, infer M> ? ComponentPublicInstance<unknown extends Props ? {} : Props, unknown extends RawBindings ? {} : RawBindings, unknown extends D ? {} : D, C, M> : never;
1322
+ } ? InstanceType<T> : T extends FunctionalComponent<infer Props, infer Emits> ? ComponentPublicInstance<Props, {}, {}, {}, {}, ShortEmitsToObject<Emits>> : T extends Component<infer PropsOrInstance, infer RawBindings, infer D, infer C, infer M> ? PropsOrInstance extends {
1323
+ $props: unknown;
1324
+ } ? PropsOrInstance : ComponentPublicInstance<unknown extends PropsOrInstance ? {} : PropsOrInstance, unknown extends RawBindings ? {} : RawBindings, unknown extends D ? {} : D, C, M> : never;
1321
1325
  /**
1322
1326
  * For extending allowed non-declared props on components in TSX
1323
1327
  */
@@ -1406,7 +1410,7 @@ export type ConcreteComponent<Props = {}, RawBindings = any, D = any, C extends
1406
1410
  * A type used in public APIs where a component type is expected.
1407
1411
  * The constructor type is an artificial type returned by defineComponent().
1408
1412
  */
1409
- export type Component<Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ConcreteComponent<Props, RawBindings, D, C, M, E, S> | ComponentPublicInstanceConstructor<Props>;
1413
+ export type Component<PropsOrInstance = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, E extends EmitsOptions | Record<string, any[]> = {}, S extends Record<string, any> = any> = ConcreteComponent<PropsOrInstance, RawBindings, D, C, M, E, S> | ComponentPublicInstanceConstructor<PropsOrInstance>;
1410
1414
 
1411
1415
  export type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends any ? {
1412
1416
  attrs: Data;
@@ -1525,7 +1529,8 @@ export declare function defineAsyncComponent<T extends Component = {
1525
1529
 
1526
1530
  export declare function useModel<M extends PropertyKey, T extends Record<string, any>, K extends keyof T, G = T[K], S = T[K]>(props: T, name: K, options?: DefineModelOptions<T[K], G, S>): ModelRef<T[K], M, G, S>;
1527
1531
 
1528
- export declare function useTemplateRef<T = unknown, Keys extends string = string>(key: Keys): Readonly<ShallowRef<T | null>>;
1532
+ export type TemplateRef<T = unknown> = Readonly<ShallowRef<T | null>>;
1533
+ export declare function useTemplateRef<T = unknown, Keys extends string = string>(key: Keys): TemplateRef<T>;
1529
1534
 
1530
1535
  export declare function useId(): string;
1531
1536
 
@@ -1798,7 +1803,8 @@ declare module '@vue/reactivity' {
1798
1803
 
1799
1804
  export declare const DeprecationTypes: typeof DeprecationTypes$1;
1800
1805
 
1801
- export { type WatchEffectOptions as WatchOptionsBase, createBaseVNode as createElementVNode, };
1806
+ export { createBaseVNode as createElementVNode, };
1807
+ export type { WatchEffectOptions as WatchOptionsBase };
1802
1808
  // Note: this file is auto concatenated to the end of the bundled d.ts during
1803
1809
  // build.
1804
1810
 
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.13
2
+ * @vue/runtime-core v3.5.15
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
- import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';
6
+ import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, isReadonly, shallowReadArray, toReadonly, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1 } from '@vue/reactivity';
7
7
  export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
8
- import { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, isSymbol, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
8
+ import { isString, isFunction, EMPTY_OBJ, isPromise, isArray, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, camelize, capitalize, isSymbol, isGloballyAllowed, NO, EMPTY_ARR, hyphenate, makeMap, toRawType, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
9
9
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
10
10
 
11
11
  const stack = [];
@@ -351,11 +351,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
351
351
  queue.splice(i, 1);
352
352
  i--;
353
353
  if (cb.flags & 4) {
354
- cb.flags &= ~1;
354
+ cb.flags &= -2;
355
355
  }
356
356
  cb();
357
357
  if (!(cb.flags & 4)) {
358
- cb.flags &= ~1;
358
+ cb.flags &= -2;
359
359
  }
360
360
  }
361
361
  }
@@ -380,10 +380,10 @@ function flushPostFlushCbs(seen) {
380
380
  continue;
381
381
  }
382
382
  if (cb.flags & 4) {
383
- cb.flags &= ~1;
383
+ cb.flags &= -2;
384
384
  }
385
385
  if (!(cb.flags & 8)) cb();
386
- cb.flags &= ~1;
386
+ cb.flags &= -2;
387
387
  }
388
388
  activePostFlushCbs = null;
389
389
  postFlushIndex = 0;
@@ -419,7 +419,7 @@ function flushJobs(seen) {
419
419
  for (; flushIndex < queue.length; flushIndex++) {
420
420
  const job = queue[flushIndex];
421
421
  if (job) {
422
- job.flags &= ~1;
422
+ job.flags &= -2;
423
423
  }
424
424
  }
425
425
  flushIndex = -1;
@@ -859,15 +859,16 @@ const TeleportImpl = {
859
859
  updateCssVars(n2, true);
860
860
  }
861
861
  if (isTeleportDeferred(n2.props)) {
862
+ n2.el.__isMounted = false;
862
863
  queuePostRenderEffect(() => {
863
864
  mountToTarget();
864
- n2.el.__isMounted = true;
865
+ delete n2.el.__isMounted;
865
866
  }, parentSuspense);
866
867
  } else {
867
868
  mountToTarget();
868
869
  }
869
870
  } else {
870
- if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
871
+ if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {
871
872
  queuePostRenderEffect(() => {
872
873
  TeleportImpl.process(
873
874
  n1,
@@ -881,7 +882,6 @@ const TeleportImpl = {
881
882
  optimized,
882
883
  internals
883
884
  );
884
- delete n1.el.__isMounted;
885
885
  }, parentSuspense);
886
886
  return;
887
887
  }
@@ -908,7 +908,7 @@ const TeleportImpl = {
908
908
  namespace,
909
909
  slotScopeIds
910
910
  );
911
- traverseStaticChildren(n1, n2, true);
911
+ traverseStaticChildren(n1, n2, !!!(process.env.NODE_ENV !== "production"));
912
912
  } else if (!optimized) {
913
913
  patchChildren(
914
914
  n1,
@@ -1425,7 +1425,7 @@ function getInnerChild$1(vnode) {
1425
1425
  }
1426
1426
  return vnode;
1427
1427
  }
1428
- if (!!(process.env.NODE_ENV !== "production") && vnode.component) {
1428
+ if (vnode.component) {
1429
1429
  return vnode.component.subTree;
1430
1430
  }
1431
1431
  const { shapeFlag, children } = vnode;
@@ -1870,6 +1870,8 @@ function createHydrationFunctions(rendererInternals) {
1870
1870
  ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
1871
1871
  const content = el.content.firstChild;
1872
1872
  if (needCallTransitionHooks) {
1873
+ const cls = content.getAttribute("class");
1874
+ if (cls) content.$cls = cls;
1873
1875
  transition.beforeEnter(content);
1874
1876
  }
1875
1877
  replaceNode(content, el, parentComponent);
@@ -2133,7 +2135,12 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
2133
2135
  let actual;
2134
2136
  let expected;
2135
2137
  if (key === "class") {
2136
- actual = el.getAttribute("class");
2138
+ if (el.$cls) {
2139
+ actual = el.$cls;
2140
+ delete el.$cls;
2141
+ } else {
2142
+ actual = el.getAttribute("class");
2143
+ }
2137
2144
  expected = normalizeClass(clientValue);
2138
2145
  if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) {
2139
2146
  mismatchType = 2 /* CLASS */;
@@ -2428,14 +2435,25 @@ function defineAsyncComponent(source) {
2428
2435
  name: "AsyncComponentWrapper",
2429
2436
  __asyncLoader: load,
2430
2437
  __asyncHydrate(el, instance, hydrate) {
2438
+ let patched = false;
2431
2439
  const doHydrate = hydrateStrategy ? () => {
2440
+ const performHydrate = () => {
2441
+ if (!!(process.env.NODE_ENV !== "production") && patched) {
2442
+ warn$1(
2443
+ `Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
2444
+ );
2445
+ return;
2446
+ }
2447
+ hydrate();
2448
+ };
2432
2449
  const teardown = hydrateStrategy(
2433
- hydrate,
2450
+ performHydrate,
2434
2451
  (cb) => forEachElement(el, cb)
2435
2452
  );
2436
2453
  if (teardown) {
2437
2454
  (instance.bum || (instance.bum = [])).push(teardown);
2438
2455
  }
2456
+ (instance.u || (instance.u = [])).push(() => patched = true);
2439
2457
  } : hydrate;
2440
2458
  if (resolvedComp) {
2441
2459
  doHydrate();
@@ -2605,6 +2623,9 @@ const KeepAliveImpl = {
2605
2623
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
2606
2624
  devtoolsComponentAdded(instance2);
2607
2625
  }
2626
+ if (!!(process.env.NODE_ENV !== "production") && true) {
2627
+ instance2.__keepAliveStorageContainer = storageContainer;
2628
+ }
2608
2629
  };
2609
2630
  function unmount(vnode) {
2610
2631
  resetShapeFlag(vnode);
@@ -2692,7 +2713,7 @@ const KeepAliveImpl = {
2692
2713
  );
2693
2714
  const { include, exclude, max } = props;
2694
2715
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
2695
- vnode.shapeFlag &= ~256;
2716
+ vnode.shapeFlag &= -257;
2696
2717
  current = vnode;
2697
2718
  return rawVNode;
2698
2719
  }
@@ -2779,8 +2800,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
2779
2800
  }, target);
2780
2801
  }
2781
2802
  function resetShapeFlag(vnode) {
2782
- vnode.shapeFlag &= ~256;
2783
- vnode.shapeFlag &= ~512;
2803
+ vnode.shapeFlag &= -257;
2804
+ vnode.shapeFlag &= -513;
2784
2805
  }
2785
2806
  function getInnerChild(vnode) {
2786
2807
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -2895,14 +2916,16 @@ function renderList(source, renderItem, cache, index) {
2895
2916
  if (sourceIsArray || isString(source)) {
2896
2917
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
2897
2918
  let needsWrap = false;
2919
+ let isReadonlySource = false;
2898
2920
  if (sourceIsReactiveArray) {
2899
2921
  needsWrap = !isShallow(source);
2922
+ isReadonlySource = isReadonly(source);
2900
2923
  source = shallowReadArray(source);
2901
2924
  }
2902
2925
  ret = new Array(source.length);
2903
2926
  for (let i = 0, l = source.length; i < l; i++) {
2904
2927
  ret[i] = renderItem(
2905
- needsWrap ? toReactive(source[i]) : source[i],
2928
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
2906
2929
  i,
2907
2930
  void 0,
2908
2931
  cached && cached[i]
@@ -3928,11 +3951,9 @@ function createAppAPI(render, hydrate) {
3928
3951
  }
3929
3952
  if (!!(process.env.NODE_ENV !== "production")) {
3930
3953
  context.reload = () => {
3931
- render(
3932
- cloneVNode(vnode),
3933
- rootContainer,
3934
- namespace
3935
- );
3954
+ const cloned = cloneVNode(vnode);
3955
+ cloned.el = null;
3956
+ render(cloned, rootContainer, namespace);
3936
3957
  };
3937
3958
  }
3938
3959
  if (isHydrate && hydrate) {
@@ -3982,9 +4003,15 @@ If you want to remount the same app, move your app creation logic into a factory
3982
4003
  },
3983
4004
  provide(key, value) {
3984
4005
  if (!!(process.env.NODE_ENV !== "production") && key in context.provides) {
3985
- warn$1(
3986
- `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
3987
- );
4006
+ if (hasOwn(context.provides, key)) {
4007
+ warn$1(
4008
+ `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
4009
+ );
4010
+ } else {
4011
+ warn$1(
4012
+ `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
4013
+ );
4014
+ }
3988
4015
  }
3989
4016
  context.provides[key] = value;
3990
4017
  return app;
@@ -4021,7 +4048,7 @@ function provide(key, value) {
4021
4048
  function inject(key, defaultValue, treatDefaultAsFactory = false) {
4022
4049
  const instance = currentInstance || currentRenderingInstance;
4023
4050
  if (instance || currentApp) {
4024
- const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
4051
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
4025
4052
  if (provides && key in provides) {
4026
4053
  return provides[key];
4027
4054
  } else if (arguments.length > 1) {
@@ -4455,7 +4482,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
4455
4482
  return rawSlot;
4456
4483
  }
4457
4484
  const normalized = withCtx((...args) => {
4458
- if (!!(process.env.NODE_ENV !== "production") && currentInstance && (!ctx || ctx.root === currentInstance.root)) {
4485
+ if (!!(process.env.NODE_ENV !== "production") && currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
4459
4486
  warn$1(
4460
4487
  `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.`
4461
4488
  );
@@ -4494,7 +4521,7 @@ const normalizeVNodeSlots = (instance, children) => {
4494
4521
  };
4495
4522
  const assignSlots = (slots, children, optimized) => {
4496
4523
  for (const key in children) {
4497
- if (optimized || key !== "_") {
4524
+ if (optimized || !isInternalKey(key)) {
4498
4525
  slots[key] = children[key];
4499
4526
  }
4500
4527
  }
@@ -5045,7 +5072,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5045
5072
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
5046
5073
  // which also requires the correct parent container
5047
5074
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
5048
- oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : (
5075
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
5049
5076
  // In other cases, the parent container is not actually used so we
5050
5077
  // just pass the block element here to avoid a DOM parentNode call.
5051
5078
  fallbackContainer
@@ -5218,8 +5245,8 @@ function baseCreateRenderer(options, createHydrationFns) {
5218
5245
  endMeasure(instance, `init`);
5219
5246
  }
5220
5247
  }
5248
+ if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
5221
5249
  if (instance.asyncDep) {
5222
- if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
5223
5250
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
5224
5251
  if (!initialVNode.el) {
5225
5252
  const placeholder = instance.subTree = createVNode(Comment);
@@ -5781,7 +5808,13 @@ function baseCreateRenderer(options, createHydrationFns) {
5781
5808
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
5782
5809
  } else {
5783
5810
  const { leave, delayLeave, afterLeave } = transition;
5784
- const remove2 = () => hostInsert(el, container, anchor);
5811
+ const remove2 = () => {
5812
+ if (vnode.ctx.isUnmounted) {
5813
+ hostRemove(el);
5814
+ } else {
5815
+ hostInsert(el, container, anchor);
5816
+ }
5817
+ };
5785
5818
  const performLeave = () => {
5786
5819
  leave(el, () => {
5787
5820
  remove2();
@@ -5814,7 +5847,9 @@ function baseCreateRenderer(options, createHydrationFns) {
5814
5847
  optimized = false;
5815
5848
  }
5816
5849
  if (ref != null) {
5850
+ pauseTracking();
5817
5851
  setRef(ref, null, parentSuspense, vnode, true);
5852
+ resetTracking();
5818
5853
  }
5819
5854
  if (cacheIndex != null) {
5820
5855
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -5926,12 +5961,27 @@ function baseCreateRenderer(options, createHydrationFns) {
5926
5961
  if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) {
5927
5962
  unregisterHMR(instance);
5928
5963
  }
5929
- const { bum, scope, job, subTree, um, m, a } = instance;
5964
+ const {
5965
+ bum,
5966
+ scope,
5967
+ job,
5968
+ subTree,
5969
+ um,
5970
+ m,
5971
+ a,
5972
+ parent,
5973
+ slots: { __: slotCacheKeys }
5974
+ } = instance;
5930
5975
  invalidateMount(m);
5931
5976
  invalidateMount(a);
5932
5977
  if (bum) {
5933
5978
  invokeArrayFns(bum);
5934
5979
  }
5980
+ if (parent && isArray(slotCacheKeys)) {
5981
+ slotCacheKeys.forEach((v) => {
5982
+ parent.renderCache[v] = void 0;
5983
+ });
5984
+ }
5935
5985
  scope.stop();
5936
5986
  if (job) {
5937
5987
  job.flags |= 8;
@@ -6027,8 +6077,8 @@ function toggleRecurse({ effect, job }, allowed) {
6027
6077
  effect.flags |= 32;
6028
6078
  job.flags |= 4;
6029
6079
  } else {
6030
- effect.flags &= ~32;
6031
- job.flags &= ~4;
6080
+ effect.flags &= -33;
6081
+ job.flags &= -5;
6032
6082
  }
6033
6083
  }
6034
6084
  function needTransition(parentSuspense, transition) {
@@ -6052,9 +6102,12 @@ function traverseStaticChildren(n1, n2, shallow = false) {
6052
6102
  if (c2.type === Text) {
6053
6103
  c2.el = c1.el;
6054
6104
  }
6055
- if (!!(process.env.NODE_ENV !== "production") && c2.type === Comment && !c2.el) {
6105
+ if (c2.type === Comment && !c2.el) {
6056
6106
  c2.el = c1.el;
6057
6107
  }
6108
+ if (!!(process.env.NODE_ENV !== "production")) {
6109
+ c2.el && (c2.el.__vnode = c2);
6110
+ }
6058
6111
  }
6059
6112
  }
6060
6113
  }
@@ -7400,8 +7453,8 @@ function isSameVNodeType(n1, n2) {
7400
7453
  if (!!(process.env.NODE_ENV !== "production") && n2.shapeFlag & 6 && n1.component) {
7401
7454
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
7402
7455
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
7403
- n1.shapeFlag &= ~256;
7404
- n2.shapeFlag &= ~512;
7456
+ n1.shapeFlag &= -257;
7457
+ n2.shapeFlag &= -513;
7405
7458
  return false;
7406
7459
  }
7407
7460
  }
@@ -7864,7 +7917,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
7864
7917
  const { props, children } = instance.vnode;
7865
7918
  const isStateful = isStatefulComponent(instance);
7866
7919
  initProps(instance, props, isStateful, isSSR);
7867
- initSlots(instance, children, optimized);
7920
+ initSlots(instance, children, optimized || isSSR);
7868
7921
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
7869
7922
  isSSR && setInSSRSetupState(false);
7870
7923
  return setupResult;
@@ -8207,13 +8260,15 @@ function initCustomFormatter() {
8207
8260
  if (obj.__isVue) {
8208
8261
  return ["div", vueStyle, `VueInstance`];
8209
8262
  } else if (isRef(obj)) {
8263
+ pauseTracking();
8264
+ const value = obj.value;
8265
+ resetTracking();
8210
8266
  return [
8211
8267
  "div",
8212
8268
  {},
8213
8269
  ["span", vueStyle, genRefFlag(obj)],
8214
8270
  "<",
8215
- // avoid debugger accessing value affecting behavior
8216
- formatValue("_value" in obj ? obj._value : obj),
8271
+ formatValue(value),
8217
8272
  `>`
8218
8273
  ];
8219
8274
  } else if (isReactive(obj)) {
@@ -8394,7 +8449,7 @@ function isMemoSame(cached, memo) {
8394
8449
  return true;
8395
8450
  }
8396
8451
 
8397
- const version = "3.5.13";
8452
+ const version = "3.5.15";
8398
8453
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8399
8454
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8400
8455
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.5.13",
3
+ "version": "3.5.15",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
48
48
  "dependencies": {
49
- "@vue/shared": "3.5.13",
50
- "@vue/reactivity": "3.5.13"
49
+ "@vue/shared": "3.5.15",
50
+ "@vue/reactivity": "3.5.15"
51
51
  }
52
52
  }