@vue/runtime-core 3.6.0-rc.5 → 3.6.0-rc.7

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.6.0-rc.5
2
+ * @vue/runtime-core v3.6.0-rc.7
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -264,7 +264,7 @@ let currentFlushPromise = null;
264
264
  let jobsLength = 0;
265
265
  let flushIndex = 0;
266
266
  let postFlushIndex = 0;
267
- const resolvedPromise = /* @__PURE__ */ Promise.resolve();
267
+ const resolvedPromise = /*@__PURE__*/ Promise.resolve();
268
268
  const RECURSION_LIMIT = 100;
269
269
  function nextTick(fn) {
270
270
  const p = currentFlushPromise || resolvedPromise;
@@ -303,6 +303,7 @@ const doFlushJobs = () => {
303
303
  flushJobs();
304
304
  } catch (e) {
305
305
  currentFlushPromise = null;
306
+ if (jobsLength || postJobs.length) queueFlush();
306
307
  throw e;
307
308
  }
308
309
  };
@@ -310,9 +311,10 @@ function queueFlush() {
310
311
  if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
311
312
  }
312
313
  function queuePostFlushCb(jobs, id = Infinity) {
313
- if (!isArray(jobs)) if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
314
- else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
315
- else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
314
+ if (!isArray(jobs)) {
315
+ if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
316
+ else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
317
+ } else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
316
318
  queueFlush();
317
319
  }
318
320
  function flushPreFlushCbs(instance, seen) {
@@ -326,8 +328,11 @@ function flushPreFlushCbs(instance, seen) {
326
328
  i--;
327
329
  jobsLength--;
328
330
  if (cb.flags & 2) cb.flags &= -2;
329
- cb();
330
- if (!(cb.flags & 2)) cb.flags &= -2;
331
+ try {
332
+ cb();
333
+ } finally {
334
+ if (!(cb.flags & 2)) cb.flags &= -2;
335
+ }
331
336
  }
332
337
  }
333
338
  function flushPostFlushCbs(seen) {
@@ -340,18 +345,22 @@ function flushPostFlushCbs(seen) {
340
345
  activePostJobs = postJobs;
341
346
  postJobs = [];
342
347
  if (!!(process.env.NODE_ENV !== "production")) seen = seen || /* @__PURE__ */ new Map();
343
- while (postFlushIndex < activePostJobs.length) {
344
- const cb = activePostJobs[postFlushIndex++];
345
- if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) continue;
346
- if (cb.flags & 2) cb.flags &= -2;
347
- if (!(cb.flags & 4)) try {
348
- cb();
349
- } finally {
350
- cb.flags &= -2;
348
+ try {
349
+ while (postFlushIndex < activePostJobs.length) {
350
+ const cb = activePostJobs[postFlushIndex++];
351
+ if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) continue;
352
+ if (cb.flags & 2) cb.flags &= -2;
353
+ if (!(cb.flags & 4)) try {
354
+ cb();
355
+ } finally {
356
+ if (!(cb.flags & 2)) cb.flags &= -2;
357
+ }
351
358
  }
359
+ } finally {
360
+ while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
361
+ activePostJobs = null;
362
+ postFlushIndex = 0;
352
363
  }
353
- activePostJobs = null;
354
- postFlushIndex = 0;
355
364
  }
356
365
  }
357
366
  let isFlushing = false;
@@ -361,9 +370,12 @@ let isFlushing = false;
361
370
  function flushOnAppMount(instance) {
362
371
  if (!isFlushing) {
363
372
  isFlushing = true;
364
- flushPreFlushCbs(instance);
365
- flushPostFlushCbs();
366
- isFlushing = false;
373
+ try {
374
+ flushPreFlushCbs(instance);
375
+ flushPostFlushCbs();
376
+ } finally {
377
+ isFlushing = false;
378
+ }
367
379
  }
368
380
  }
369
381
  function flushJobs(seen) {
@@ -393,8 +405,8 @@ function flushJobs(seen) {
393
405
  jobsLength = 0;
394
406
  jobs.length = 0;
395
407
  flushPostFlushCbs(seen);
396
- currentFlushPromise = null;
397
408
  if (jobsLength || postJobs.length) flushJobs(seen);
409
+ else currentFlushPromise = null;
398
410
  }
399
411
  }
400
412
  function checkRecursiveUpdates(seen, fn) {
@@ -425,6 +437,19 @@ if (!!(process.env.NODE_ENV !== "production")) getGlobalThis().__VUE_HMR_RUNTIME
425
437
  rerender: tryWrap(rerender),
426
438
  reload: tryWrap(reload)
427
439
  };
440
+ function runWithHmrUpdating(fn) {
441
+ isHmrUpdating = true;
442
+ let done = false;
443
+ try {
444
+ fn();
445
+ done = true;
446
+ } finally {
447
+ if (done) nextTick(() => {
448
+ isHmrUpdating = false;
449
+ });
450
+ else isHmrUpdating = false;
451
+ }
452
+ }
428
453
  const map = /* @__PURE__ */ new Map();
429
454
  function registerHMR(instance) {
430
455
  const id = instance.type.__hmrId;
@@ -466,18 +491,16 @@ function rerender(id, newRender) {
466
491
  instance.render = newRender;
467
492
  normalizeClassComponent(instance.type).render = newRender;
468
493
  }
469
- isHmrUpdating = true;
470
- if (instance.vapor) {
471
- if (!instance.isUnmounted) instance.hmrRerender();
472
- } else {
473
- const i = instance;
474
- if (!(i.effect.flags & 1024)) {
475
- i.renderCache = [];
476
- i.effect.run();
494
+ runWithHmrUpdating(() => {
495
+ if (instance.vapor) {
496
+ if (!instance.isUnmounted) instance.hmrRerender();
497
+ } else {
498
+ const i = instance;
499
+ if (!(i.effect.flags & 1024)) {
500
+ i.renderCache = [];
501
+ i.effect.run();
502
+ }
477
503
  }
478
- }
479
- nextTick(() => {
480
- isHmrUpdating = false;
481
504
  });
482
505
  });
483
506
  }
@@ -492,15 +515,17 @@ function reload(id, newComp) {
492
515
  for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
493
516
  const dirtyInstances = new Set(instances);
494
517
  const rerenderedParents = /* @__PURE__ */ new Set();
495
- for (const instance of instances) {
496
- const parent = instance.parent;
497
- if (parent) {
498
- if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
499
- rerenderedParents.add(parent);
500
- parent.hmrRerender();
501
- }
502
- } else instance.hmrReload(newComp);
503
- }
518
+ runWithHmrUpdating(() => {
519
+ for (const instance of instances) {
520
+ const parent = instance.parent;
521
+ if (parent) {
522
+ if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
523
+ rerenderedParents.add(parent);
524
+ parent.hmrRerender();
525
+ }
526
+ } else instance.hmrReload(newComp);
527
+ }
528
+ });
504
529
  } else {
505
530
  const parentUpdates = /* @__PURE__ */ new Map();
506
531
  const dirtyInstanceSet = new Set(instances);
@@ -534,21 +559,22 @@ function reload(id, newComp) {
534
559
  }
535
560
  parentUpdates.forEach((updates, parent) => {
536
561
  queueJob(() => {
537
- isHmrUpdating = true;
538
- if (parent.vapor) parent.hmrRerender();
539
- else {
540
- const i = parent;
541
- if (!(i.effect.flags & 1024)) {
542
- i.renderCache = [];
543
- i.effect.run();
544
- }
562
+ try {
563
+ runWithHmrUpdating(() => {
564
+ if (parent.vapor) parent.hmrRerender();
565
+ else {
566
+ const i = parent;
567
+ if (!(i.effect.flags & 1024)) {
568
+ i.renderCache = [];
569
+ i.effect.run();
570
+ }
571
+ }
572
+ });
573
+ } finally {
574
+ updates.forEach(([instance, dirtyInstances]) => {
575
+ dirtyInstances.delete(instance);
576
+ });
545
577
  }
546
- nextTick(() => {
547
- isHmrUpdating = false;
548
- });
549
- updates.forEach(([instance, dirtyInstances]) => {
550
- dirtyInstances.delete(instance);
551
- });
552
578
  });
553
579
  });
554
580
  }
@@ -617,20 +643,20 @@ function devtoolsInitApp(app, version) {
617
643
  function devtoolsUnmountApp(app) {
618
644
  emit$1("app:unmount", app);
619
645
  }
620
- const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added");
621
- const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated");
622
- const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook("component:removed");
646
+ const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
647
+ const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
648
+ const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
623
649
  const devtoolsComponentRemoved = (component) => {
624
650
  if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
625
651
  };
626
- /* @__NO_SIDE_EFFECTS__ */
652
+ /*@__NO_SIDE_EFFECTS__*/
627
653
  function createDevtoolsComponentHook(hook) {
628
654
  return (component) => {
629
655
  emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
630
656
  };
631
657
  }
632
- const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start");
633
- const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end");
658
+ const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
659
+ const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
634
660
  function createDevtoolsPerformanceHook(hook) {
635
661
  return (component, type, time) => {
636
662
  emit$1(hook, component.appContext.app, component.uid, component, type, time);
@@ -915,15 +941,16 @@ const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target inst
915
941
  const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
916
942
  const resolveTarget = (props, select) => {
917
943
  const targetSelector = props && props.to;
918
- if (isString(targetSelector)) if (!select) {
919
- process.env.NODE_ENV !== "production" && warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
920
- return null;
944
+ if (isString(targetSelector)) {
945
+ if (!select) {
946
+ process.env.NODE_ENV !== "production" && warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
947
+ return null;
948
+ } else {
949
+ const target = select(targetSelector);
950
+ if (!!(process.env.NODE_ENV !== "production") && !target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
951
+ return target;
952
+ }
921
953
  } else {
922
- const target = select(targetSelector);
923
- if (!!(process.env.NODE_ENV !== "production") && !target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
924
- return target;
925
- }
926
- else {
927
954
  if (!!(process.env.NODE_ENV !== "production") && !targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
928
955
  return targetSelector;
929
956
  }
@@ -961,7 +988,8 @@ const TeleportImpl = {
961
988
  if (pendingMounts.get(vnode) !== mountJob) return;
962
989
  pendingMounts.delete(vnode);
963
990
  if (isTeleportDisabled(vnode.props)) {
964
- mount(vnode, parentNode(vnode.el) || container, vnode.anchor);
991
+ const mountContainer = parentNode(vnode.el) || container;
992
+ mount(vnode, mountContainer, vnode.anchor);
965
993
  updateCssVars(vnode, true);
966
994
  }
967
995
  mountToTarget(vnode);
@@ -1070,15 +1098,17 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
1070
1098
  const disabled = isTeleportDisabled(vnode.props);
1071
1099
  if (target) {
1072
1100
  const targetNode = target._lpa || target.firstChild;
1073
- if (vnode.shapeFlag & 16) if (disabled) {
1074
- hydrateDisabledTeleport(node, vnode);
1075
- hydrateAnchor(target, targetNode);
1076
- if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
1077
- } else {
1078
- vnode.anchor = nextSibling(node);
1079
- hydrateAnchor(target, targetNode);
1080
- if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
1081
- hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
1101
+ if (vnode.shapeFlag & 16) {
1102
+ if (disabled) {
1103
+ hydrateDisabledTeleport(node, vnode);
1104
+ hydrateAnchor(target, targetNode);
1105
+ if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
1106
+ } else {
1107
+ vnode.anchor = nextSibling(node);
1108
+ hydrateAnchor(target, targetNode);
1109
+ if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
1110
+ hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
1111
+ }
1082
1112
  }
1083
1113
  updateCssVars(vnode, disabled);
1084
1114
  } else if (disabled) {
@@ -1245,8 +1275,10 @@ function baseResolveTransitionHooks(context, props, state, instance) {
1245
1275
  persisted,
1246
1276
  beforeEnter(el) {
1247
1277
  let hook = onBeforeEnter;
1248
- if (!state.isMounted) if (appear) hook = onBeforeAppear || onBeforeEnter;
1249
- else return;
1278
+ if (!state.isMounted) {
1279
+ if (appear) hook = onBeforeAppear || onBeforeEnter;
1280
+ else return;
1281
+ }
1250
1282
  if (el[leaveCbKey]) el[leaveCbKey](true);
1251
1283
  earlyRemove();
1252
1284
  callHook(hook, [el]);
@@ -1256,11 +1288,13 @@ function baseResolveTransitionHooks(context, props, state, instance) {
1256
1288
  let hook = onEnter;
1257
1289
  let afterHook = onAfterEnter;
1258
1290
  let cancelHook = onEnterCancelled;
1259
- if (!state.isMounted) if (appear) {
1260
- hook = onAppear || onEnter;
1261
- afterHook = onAfterAppear || onAfterEnter;
1262
- cancelHook = onAppearCancelled || onEnterCancelled;
1263
- } else return;
1291
+ if (!state.isMounted) {
1292
+ if (appear) {
1293
+ hook = onAppear || onEnter;
1294
+ afterHook = onAfterAppear || onAfterEnter;
1295
+ cancelHook = onAppearCancelled || onEnterCancelled;
1296
+ } else return;
1297
+ }
1264
1298
  let called = false;
1265
1299
  el[enterCbKey] = (cancelled) => {
1266
1300
  if (called) return;
@@ -1294,7 +1328,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
1294
1328
  else done();
1295
1329
  },
1296
1330
  clone(node) {
1297
- return cloneHooks(node);
1331
+ return cloneHooks ? cloneHooks(node) : hooks;
1298
1332
  }
1299
1333
  };
1300
1334
  return hooks;
@@ -1437,9 +1471,9 @@ function checkTransitionMode(mode) {
1437
1471
  }
1438
1472
  //#endregion
1439
1473
  //#region packages/runtime-core/src/apiDefineComponent.ts
1440
- /* @__NO_SIDE_EFFECTS__ */
1474
+ /*@__NO_SIDE_EFFECTS__*/
1441
1475
  function defineComponent(options, extraOptions) {
1442
- return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
1476
+ return isFunction(options) ? /*@__PURE__*/ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
1443
1477
  }
1444
1478
  //#endregion
1445
1479
  //#region packages/runtime-core/src/helpers/useId.ts
@@ -1536,15 +1570,16 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1536
1570
  if (rawRef.f) {
1537
1571
  const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
1538
1572
  if (isUnmount) isArray(existing) && remove(existing, refValue);
1539
- else if (!isArray(existing)) if (_isString) {
1540
- refs[ref] = [refValue];
1541
- if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
1542
- } else {
1543
- const newVal = [refValue];
1544
- if (canSetRef(ref, rawRef.k)) ref.value = newVal;
1545
- if (rawRef.k) refs[rawRef.k] = newVal;
1546
- }
1547
- else if (!existing.includes(refValue)) existing.push(refValue);
1573
+ else if (!isArray(existing)) {
1574
+ if (_isString) {
1575
+ refs[ref] = [refValue];
1576
+ if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
1577
+ } else {
1578
+ const newVal = [refValue];
1579
+ if (canSetRef(ref, rawRef.k)) ref.value = newVal;
1580
+ if (rawRef.k) refs[rawRef.k] = newVal;
1581
+ }
1582
+ } else if (!existing.includes(refValue)) existing.push(refValue);
1548
1583
  } else if (_isString) {
1549
1584
  refs[ref] = value;
1550
1585
  if (canSetSetupRef(ref)) setupState[ref] = value;
@@ -1658,11 +1693,12 @@ function createHydrationFunctions(rendererInternals) {
1658
1693
  let nextNode = null;
1659
1694
  switch (type) {
1660
1695
  case Text:
1661
- if (domType !== 3) if (vnode.children === "") {
1662
- insert(vnode.el = createText(""), parentNode(node), node);
1663
- nextNode = node;
1664
- } else nextNode = onMismatch();
1665
- else {
1696
+ if (domType !== 3) {
1697
+ if (vnode.children === "") {
1698
+ insert(vnode.el = createText(""), parentNode(node), node);
1699
+ nextNode = node;
1700
+ } else nextNode = onMismatch();
1701
+ } else {
1666
1702
  if (node.data !== vnode.children) {
1667
1703
  (process.env.NODE_ENV !== "production" || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(`Hydration text mismatch in`, node.parentNode, `\n - rendered on server: ${JSON.stringify(node.data)}\n - expected on client: ${JSON.stringify(vnode.children)}`);
1668
1704
  logMismatchError();
@@ -1701,9 +1737,10 @@ function createHydrationFunctions(rendererInternals) {
1701
1737
  case VaporSlot:
1702
1738
  nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
1703
1739
  break;
1704
- default: if (shapeFlag & 1) if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
1705
- else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
1706
- else if (shapeFlag & 6) {
1740
+ default: if (shapeFlag & 1) {
1741
+ if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
1742
+ else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
1743
+ } else if (shapeFlag & 6) {
1707
1744
  vnode.slotScopeIds = slotScopeIds;
1708
1745
  const container = parentNode(node);
1709
1746
  if (isFragmentStart) nextNode = locateClosingAnchor(node);
@@ -1725,19 +1762,20 @@ function createHydrationFunctions(rendererInternals) {
1725
1762
  } else {
1726
1763
  mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
1727
1764
  const component = vnode.component;
1728
- if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved || component.asyncDep && !component.asyncResolved) {
1765
+ if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep && !component.asyncResolved)) {
1729
1766
  let subTree;
1730
1767
  if (isFragmentStart) {
1731
- subTree = createVNode(Fragment);
1768
+ subTree = createVNode(Static);
1732
1769
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
1733
1770
  } else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
1734
1771
  subTree.el = node;
1735
1772
  component.subTree = subTree;
1736
1773
  }
1737
1774
  }
1738
- } else if (shapeFlag & 64) if (domType !== 8) nextNode = onMismatch();
1739
- else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
1740
- else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
1775
+ } else if (shapeFlag & 64) {
1776
+ if (domType !== 8) nextNode = onMismatch();
1777
+ else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
1778
+ } else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
1741
1779
  else if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
1742
1780
  }
1743
1781
  if (ref != null) setRef(ref, null, parentSuspense, vnode);
@@ -1882,8 +1920,10 @@ function createHydrationFunctions(rendererInternals) {
1882
1920
  node = nextSibling(node);
1883
1921
  if (node && isComment(node)) {
1884
1922
  if (node.data === open) match++;
1885
- if (node.data === close) if (match === 0) return nextSibling(node);
1886
- else match--;
1923
+ if (node.data === close) {
1924
+ if (match === 0) return nextSibling(node);
1925
+ else match--;
1926
+ }
1887
1927
  }
1888
1928
  }
1889
1929
  return node;
@@ -1905,7 +1945,7 @@ const isTemplateNode = (node) => {
1905
1945
  /**
1906
1946
  * Dev only
1907
1947
  */
1908
- const resourceProps = /* @__PURE__ */ new Set([
1948
+ const resourceProps = /*@__PURE__*/ new Set([
1909
1949
  "src",
1910
1950
  "srcset",
1911
1951
  "href",
@@ -2159,14 +2199,14 @@ function forEachElement(node, cb) {
2159
2199
  //#endregion
2160
2200
  //#region packages/runtime-core/src/apiAsyncComponent.ts
2161
2201
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
2162
- /* @__NO_SIDE_EFFECTS__ */
2202
+ /*@__NO_SIDE_EFFECTS__*/
2163
2203
  function defineAsyncComponent(source) {
2164
2204
  const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
2165
2205
  return /* @__PURE__ */ defineComponent({
2166
2206
  name: "AsyncComponentWrapper",
2167
2207
  __asyncLoader: load,
2168
2208
  __asyncHydrate(el, instance, hydrate) {
2169
- performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
2209
+ performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
2170
2210
  },
2171
2211
  get __asyncResolved() {
2172
2212
  return getResolvedComp();
@@ -2285,10 +2325,10 @@ const useAsyncComponentState = (delay, timeout, onError, instance = currentInsta
2285
2325
  * shared between core and vapor
2286
2326
  * @internal
2287
2327
  */
2288
- function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
2328
+ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
2289
2329
  const wasConnected = el.isConnected;
2290
2330
  let patched = false;
2291
- (instance.bu || (instance.bu = [])).push(() => patched = true);
2331
+ if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
2292
2332
  const performHydrate = () => {
2293
2333
  if (patched) {
2294
2334
  if (!!(process.env.NODE_ENV !== "production")) {
@@ -2378,10 +2418,13 @@ const KeepAlive = {
2378
2418
  });
2379
2419
  let pendingCacheKey = null;
2380
2420
  const cacheSubtree = () => {
2381
- if (pendingCacheKey != null) if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
2382
- cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
2383
- }, void 0, keepAliveInstance.subTree.suspense);
2384
- else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
2421
+ if (pendingCacheKey != null) {
2422
+ if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
2423
+ const vnode = getInnerChild(keepAliveInstance.subTree);
2424
+ if (vnode.component) cache.set(pendingCacheKey, vnode);
2425
+ }, void 0, keepAliveInstance.subTree.suspense);
2426
+ else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
2427
+ }
2385
2428
  };
2386
2429
  onMounted(cacheSubtree);
2387
2430
  onUpdated(cacheSubtree);
@@ -2623,23 +2666,25 @@ function renderList(source, renderItem, cache, index) {
2623
2666
  }
2624
2667
  ret = new Array(source.length);
2625
2668
  for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
2626
- } else if (typeof source === "number") if (!!(process.env.NODE_ENV !== "production") && (!Number.isInteger(source) || source < 0)) {
2627
- warn$1(`The v-for range expects a positive integer value but got ${source}.`);
2628
- ret = [];
2629
- } else {
2630
- ret = new Array(source);
2631
- for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
2632
- }
2633
- else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
2634
- else {
2635
- const keys = Object.keys(source);
2636
- ret = new Array(keys.length);
2637
- for (let i = 0, l = keys.length; i < l; i++) {
2638
- const key = keys[i];
2639
- ret[i] = renderItem(source[key], key, i, cached && cached[i]);
2669
+ } else if (typeof source === "number") {
2670
+ if (!!(process.env.NODE_ENV !== "production") && (!Number.isInteger(source) || source < 0)) {
2671
+ warn$1(`The v-for range expects a positive integer value but got ${source}.`);
2672
+ ret = [];
2673
+ } else {
2674
+ ret = new Array(source);
2675
+ for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
2640
2676
  }
2641
- }
2642
- else ret = [];
2677
+ } else if (isObject(source)) {
2678
+ if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
2679
+ else {
2680
+ const keys = Object.keys(source);
2681
+ ret = new Array(keys.length);
2682
+ for (let i = 0, l = keys.length; i < l; i++) {
2683
+ const key = keys[i];
2684
+ ret[i] = renderItem(source[key], key, i, cached && cached[i]);
2685
+ }
2686
+ }
2687
+ } else ret = [];
2643
2688
  if (cache) cache[index] = ret;
2644
2689
  return ret;
2645
2690
  }
@@ -2664,14 +2709,27 @@ function createSlots(slots, dynamicSlots) {
2664
2709
  //#endregion
2665
2710
  //#region packages/runtime-core/src/helpers/renderSlot.ts
2666
2711
  /**
2712
+ * Links a slot function to its raw vapor slot: a raw vapor slot carries
2713
+ * itself, and the wrapper the interop slots proxy hands out carries the raw
2714
+ * slot it wraps — one lookup answers both "is this a vapor slot" and
2715
+ * "which one". Internal to vapor interop.
2716
+ */
2717
+ const rawVaporSlotKey = Symbol(`rawVaporSlot`);
2718
+ /**
2719
+ * Marks a compiler-generated slot fallback as VDOM-rendered so the vapor
2720
+ * interop fallback chain renders it through the VDOM renderer. Internal to
2721
+ * vapor interop.
2722
+ */
2723
+ const vdomSlotFallbackKey = Symbol(`vdomSlotFallback`);
2724
+ /**
2667
2725
  * Compiler runtime helper for rendering `<slot/>`
2668
2726
  * @private
2669
2727
  */
2670
2728
  function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
2671
2729
  if (props == null) props = {};
2672
2730
  let slot = slots[name];
2673
- if (fallback) fallback.__vdom = true;
2674
- const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
2731
+ if (fallback) fallback[vdomSlotFallbackKey] = true;
2732
+ const vaporSlot = slot && slot[rawVaporSlotKey];
2675
2733
  if (vaporSlot) {
2676
2734
  const ret = (openBlock(), createBlock(VaporSlot, props));
2677
2735
  ret.vs = {
@@ -2748,11 +2806,38 @@ const getPublicInstance = (i) => {
2748
2806
  if (isStatefulComponent(i)) return getComponentPublicInstance(i);
2749
2807
  return getPublicInstance(i.parent);
2750
2808
  };
2809
+ const resolveDevRootEl = (vnode) => {
2810
+ let found = false;
2811
+ while (true) {
2812
+ if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
2813
+ const root = filterSingleRoot(vnode.children);
2814
+ if (!root) return;
2815
+ vnode = root;
2816
+ found = true;
2817
+ continue;
2818
+ }
2819
+ const component = vnode.component;
2820
+ if (component && component.subTree) {
2821
+ vnode = component.subTree;
2822
+ continue;
2823
+ }
2824
+ const suspense = vnode.suspense;
2825
+ if (suspense && suspense.activeBranch) {
2826
+ vnode = suspense.activeBranch;
2827
+ continue;
2828
+ }
2829
+ return found ? vnode.el : void 0;
2830
+ }
2831
+ };
2832
+ const getDevRootFragmentEl = (i) => {
2833
+ const el = i.subTree && resolveDevRootEl(i.subTree);
2834
+ return el === void 0 ? i.vnode.el : el;
2835
+ };
2751
2836
  let publicPropertiesMap;
2752
2837
  const getPublicPropertiesMap = () => {
2753
2838
  if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
2754
2839
  $: (i) => i,
2755
- $el: (i) => i.vnode.el,
2840
+ $el: (i) => !!(process.env.NODE_ENV !== "production") ? getDevRootFragmentEl(i) : i.vnode.el,
2756
2841
  $data: (i) => i.data,
2757
2842
  $props: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(i.props) : i.props,
2758
2843
  $attrs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(i.attrs) : i.attrs,
@@ -2858,7 +2943,7 @@ if (!!(process.env.NODE_ENV !== "production") && true) PublicInstanceProxyHandle
2858
2943
  warn$1("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.");
2859
2944
  return Reflect.ownKeys(target);
2860
2945
  };
2861
- const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, {
2946
+ const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
2862
2947
  get(target, key) {
2863
2948
  if (key === Symbol.unscopables) return;
2864
2949
  return PublicInstanceProxyHandlers.get(target, key, target);
@@ -3030,12 +3115,13 @@ function mergeDefaults(raw, defaults) {
3030
3115
  for (const key in defaults) {
3031
3116
  if (key.startsWith("__skip")) continue;
3032
3117
  let opt = props[key];
3033
- if (opt) if (isArray(opt) || isFunction(opt)) opt = props[key] = {
3034
- type: opt,
3035
- default: defaults[key]
3036
- };
3037
- else opt.default = defaults[key];
3038
- else if (opt === null) opt = props[key] = { default: defaults[key] };
3118
+ if (opt) {
3119
+ if (isArray(opt) || isFunction(opt)) opt = props[key] = {
3120
+ type: opt,
3121
+ default: defaults[key]
3122
+ };
3123
+ else opt.default = defaults[key];
3124
+ } else if (opt === null) opt = props[key] = { default: defaults[key] };
3039
3125
  else if (!!(process.env.NODE_ENV !== "production")) warn$1(`props default key "${key}" has no corresponding declaration.`);
3040
3126
  if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
3041
3127
  }
@@ -3179,11 +3265,12 @@ function applyOptions(instance) {
3179
3265
  const opt = computedOptions[key];
3180
3266
  const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
3181
3267
  if (!!(process.env.NODE_ENV !== "production") && get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
3268
+ const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => {
3269
+ warn$1(`Write operation failed: computed property "${key}" is readonly.`);
3270
+ } : NOOP;
3182
3271
  const c = computed({
3183
3272
  get,
3184
- set: !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => {
3185
- warn$1(`Write operation failed: computed property "${key}" is readonly.`);
3186
- } : NOOP
3273
+ set
3187
3274
  });
3188
3275
  Object.defineProperty(ctx, key, {
3189
3276
  enumerable: true,
@@ -3240,9 +3327,10 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
3240
3327
  for (const key in injectOptions) {
3241
3328
  const opt = injectOptions[key];
3242
3329
  let injected;
3243
- if (isObject(opt)) if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
3244
- else injected = inject(opt.from || key);
3245
- else injected = inject(opt);
3330
+ if (isObject(opt)) {
3331
+ if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
3332
+ else injected = inject(opt.from || key);
3333
+ } else injected = inject(opt);
3246
3334
  if (isRef$1(injected)) Object.defineProperty(ctx, key, {
3247
3335
  enumerable: true,
3248
3336
  configurable: true,
@@ -3263,13 +3351,14 @@ function createWatcher(raw, ctx, publicThis, key) {
3263
3351
  if (isFunction(handler)) watch(getter, handler);
3264
3352
  else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
3265
3353
  } else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
3266
- else if (isObject(raw)) if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
3267
- else {
3268
- const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
3269
- if (isFunction(handler)) watch(getter, handler, raw);
3270
- else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
3271
- }
3272
- else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch option: "${key}"`, raw);
3354
+ else if (isObject(raw)) {
3355
+ if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
3356
+ else {
3357
+ const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
3358
+ if (isFunction(handler)) watch(getter, handler, raw);
3359
+ else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
3360
+ }
3361
+ } else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch option: "${key}"`, raw);
3273
3362
  }
3274
3363
  /**
3275
3364
  * Resolve merged options and cache it on the component.
@@ -3355,7 +3444,7 @@ function mergeObjectOptions(to, from) {
3355
3444
  }
3356
3445
  function mergeEmitsOrPropsOptions(to, from) {
3357
3446
  if (to) {
3358
- if (isArray(to) && isArray(from)) return [...new Set([...to, ...from])];
3447
+ if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
3359
3448
  return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
3360
3449
  } else return from;
3361
3450
  }
@@ -3480,8 +3569,10 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
3480
3569
  } else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Cannot unmount an app that is not mounted.`);
3481
3570
  },
3482
3571
  provide(key, value) {
3483
- if (!!(process.env.NODE_ENV !== "production") && key in context.provides) if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
3484
- else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
3572
+ if (!!(process.env.NODE_ENV !== "production") && key in context.provides) {
3573
+ if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
3574
+ else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
3575
+ }
3485
3576
  context.provides[key] = value;
3486
3577
  return app;
3487
3578
  },
@@ -3588,12 +3679,14 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
3588
3679
  if (instance.isUnmounted) return;
3589
3680
  if (!!(process.env.NODE_ENV !== "production")) {
3590
3681
  const { emitsOptions, propsOptions } = instance;
3591
- if (emitsOptions) if (!(event in emitsOptions) && true) {
3592
- if (!propsOptions || !propsOptions[0] || !(toHandlerKey$1(camelize$1(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey$1(camelize$1(event))}" prop.`);
3593
- } else {
3594
- const validator = emitsOptions[event];
3595
- if (isFunction(validator)) {
3596
- if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
3682
+ if (emitsOptions) {
3683
+ if (!(event in emitsOptions) && true) {
3684
+ if (!propsOptions || !propsOptions[0] || !(toHandlerKey$1(camelize$1(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey$1(camelize$1(event))}" prop.`);
3685
+ } else {
3686
+ const validator = emitsOptions[event];
3687
+ if (isFunction(validator)) {
3688
+ if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
3689
+ }
3597
3690
  }
3598
3691
  }
3599
3692
  }
@@ -3602,7 +3695,7 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
3602
3695
  const modifiers = isModelListener && getModelModifiers(props, event.slice(7), getter);
3603
3696
  if (modifiers) {
3604
3697
  if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
3605
- if (modifiers.number) args = rawArgs.map(looseToNumber);
3698
+ if (modifiers.number) args = args.map(looseToNumber);
3606
3699
  }
3607
3700
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentEmit(instance, event, args);
3608
3701
  if (!!(process.env.NODE_ENV !== "production")) {
@@ -3786,10 +3879,12 @@ function filterSingleRoot(children, recurse = true) {
3786
3879
  for (let i = 0; i < children.length; i++) {
3787
3880
  const child = children[i];
3788
3881
  if (isVNode(child)) {
3789
- if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
3790
- else {
3791
- singleRoot = child;
3792
- if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
3882
+ if (child.type !== Comment || child.children === "v-if") {
3883
+ if (singleRoot) return;
3884
+ else {
3885
+ singleRoot = child;
3886
+ if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
3887
+ }
3793
3888
  }
3794
3889
  } else return;
3795
3890
  }
@@ -3910,16 +4005,17 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3910
4005
  let key = propsToUpdate[i];
3911
4006
  if (isEmitListener(instance.emitsOptions, key)) continue;
3912
4007
  const value = rawProps[key];
3913
- if (options) if (hasOwn(attrs, key)) {
3914
- if (value !== attrs[key]) {
3915
- attrs[key] = value;
3916
- hasAttrsChanged = true;
4008
+ if (options) {
4009
+ if (hasOwn(attrs, key)) {
4010
+ if (value !== attrs[key]) {
4011
+ attrs[key] = value;
4012
+ hasAttrsChanged = true;
4013
+ }
4014
+ } else {
4015
+ const camelizedKey = camelize$1(key);
4016
+ props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
3917
4017
  }
3918
- } else {
3919
- const camelizedKey = camelize$1(key);
3920
- props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
3921
- }
3922
- else if (value !== attrs[key]) {
4018
+ } else if (value !== attrs[key]) {
3923
4019
  attrs[key] = value;
3924
4020
  hasAttrsChanged = true;
3925
4021
  }
@@ -3928,9 +4024,11 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3928
4024
  } else {
3929
4025
  if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
3930
4026
  let kebabKey;
3931
- for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) if (options) {
3932
- if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
3933
- } else delete props[key];
4027
+ for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
4028
+ if (options) {
4029
+ if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
4030
+ } else delete props[key];
4031
+ }
3934
4032
  if (attrs !== rawCurrentProps) {
3935
4033
  for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {
3936
4034
  delete attrs[key];
@@ -3949,9 +4047,10 @@ function setFullProps(instance, rawProps, props, attrs) {
3949
4047
  if (isReservedProp(key)) continue;
3950
4048
  const value = rawProps[key];
3951
4049
  let camelKey;
3952
- if (options && hasOwn(options, camelKey = camelize$1(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
3953
- else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
3954
- else if (!isEmitListener(instance.emitsOptions, key)) {
4050
+ if (options && hasOwn(options, camelKey = camelize$1(key))) {
4051
+ if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
4052
+ else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
4053
+ } else if (!isEmitListener(instance.emitsOptions, key)) {
3955
4054
  if (!(key in attrs) || value !== attrs[key]) {
3956
4055
  attrs[key] = value;
3957
4056
  hasAttrsChanged = true;
@@ -4114,7 +4213,7 @@ function validateProp(key, value, propOptions, resolvedProps, isAbsent) {
4114
4213
  }
4115
4214
  if (validator && !validator(value, !!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(resolvedProps) : resolvedProps)) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
4116
4215
  }
4117
- const isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
4216
+ const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
4118
4217
  /**
4119
4218
  * dev only
4120
4219
  */
@@ -4227,12 +4326,13 @@ const updateSlots = (instance, children, optimized) => {
4227
4326
  let deletionComparisonTarget = EMPTY_OBJ;
4228
4327
  if (vnode.shapeFlag & 32) {
4229
4328
  const type = children._;
4230
- if (type) if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
4231
- assignSlots(slots, children, optimized);
4232
- trigger(instance, "set", "$slots");
4233
- } else if (optimized && type === 1) needDeletionCheck = false;
4234
- else assignSlots(slots, children, optimized);
4235
- else {
4329
+ if (type) {
4330
+ if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
4331
+ assignSlots(slots, children, optimized);
4332
+ trigger(instance, "set", "$slots");
4333
+ } else if (optimized && type === 1) needDeletionCheck = false;
4334
+ else assignSlots(slots, children, optimized);
4335
+ } else {
4236
4336
  needDeletionCheck = !children.$stable;
4237
4337
  normalizeObjectSlots(children, slots, instance);
4238
4338
  }
@@ -4250,7 +4350,7 @@ const updateSlots = (instance, children, optimized) => {
4250
4350
  let supported;
4251
4351
  let perf;
4252
4352
  let cachedNow = 0;
4253
- const p = /* @__PURE__ */ Promise.resolve();
4353
+ const p = /*@__PURE__*/ Promise.resolve();
4254
4354
  const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = isSupported() ? perf.now() : Date.now());
4255
4355
  /**
4256
4356
  * @internal
@@ -4498,7 +4598,10 @@ function baseCreateRenderer(options, createHydrationFns) {
4498
4598
  for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
4499
4599
  };
4500
4600
  const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
4501
- for (let i = start; i < children.length; i++) patch(null, children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4601
+ for (let i = start; i < children.length; i++) {
4602
+ const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
4603
+ patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4604
+ }
4502
4605
  };
4503
4606
  const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
4504
4607
  const el = n2.el = n1.el;
@@ -4510,6 +4613,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4510
4613
  let vnodeHook;
4511
4614
  parentComponent && toggleRecurse(parentComponent, false);
4512
4615
  if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
4616
+ if (n2.ibu) n2.ibu();
4513
4617
  if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
4514
4618
  parentComponent && toggleRecurse(parentComponent, true);
4515
4619
  if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
@@ -4543,8 +4647,9 @@ function baseCreateRenderer(options, createHydrationFns) {
4543
4647
  if (n1.children !== n2.children) hostSetElementText(el, n2.children);
4544
4648
  }
4545
4649
  } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
4546
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
4650
+ if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
4547
4651
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
4652
+ n2.iu && n2.iu();
4548
4653
  dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
4549
4654
  }, void 0, parentSuspense);
4550
4655
  };
@@ -4552,7 +4657,8 @@ function baseCreateRenderer(options, createHydrationFns) {
4552
4657
  for (let i = 0; i < newChildren.length; i++) {
4553
4658
  const oldVNode = oldChildren[i];
4554
4659
  const newVNode = newChildren[i];
4555
- patch(oldVNode, newVNode, oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
4660
+ const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
4661
+ patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
4556
4662
  }
4557
4663
  };
4558
4664
  const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
@@ -4591,41 +4697,46 @@ function baseCreateRenderer(options, createHydrationFns) {
4591
4697
  };
4592
4698
  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
4593
4699
  n2.slotScopeIds = slotScopeIds;
4594
- if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
4595
- else {
4596
- const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
4597
- getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
4598
- if (n2.dirs) {
4599
- invokeDirectiveHook(n2, null, parentComponent, "created");
4600
- invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
4700
+ if (n2.type.__vapor) {
4701
+ if (n1 == null) {
4702
+ if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
4703
+ else {
4704
+ const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
4705
+ getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
4706
+ if (n2.dirs) {
4707
+ invokeDirectiveHook(n2, null, parentComponent, "created");
4708
+ invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
4709
+ }
4710
+ }, () => {
4711
+ if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
4712
+ });
4713
+ if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
4714
+ const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
4715
+ if (vnodeMountedHook) {
4716
+ const scopedVNode = n2;
4717
+ queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
4718
+ }
4601
4719
  }
4602
- }, () => {
4603
- if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
4604
- });
4605
- if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
4606
- const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
4607
- if (vnodeMountedHook) {
4608
- const scopedVNode = n2;
4609
- queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
4720
+ } else {
4721
+ const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
4722
+ getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
4723
+ if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
4724
+ }, () => {
4725
+ const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
4726
+ if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
4727
+ if (n2.ibu) n2.ibu();
4728
+ });
4729
+ const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
4730
+ if (shouldUpdate && (vnodeUpdatedHook || n2.dirs || n2.iu)) queuePostRenderEffect(() => {
4731
+ n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
4732
+ vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
4733
+ n2.iu && n2.iu();
4734
+ }, void 0, parentSuspense);
4610
4735
  }
4611
- }
4612
- else {
4613
- const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
4614
- getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
4615
- if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
4616
- }, () => {
4617
- const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
4618
- if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
4619
- });
4620
- const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
4621
- if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
4622
- n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
4623
- vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
4624
- }, void 0, parentSuspense);
4625
- }
4626
- else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
4627
- else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
4628
- else updateComponent(n1, n2, optimized);
4736
+ } else if (n1 == null) {
4737
+ if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
4738
+ else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
4739
+ } else updateComponent(n1, n2, optimized);
4629
4740
  };
4630
4741
  const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
4631
4742
  const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
@@ -4670,16 +4781,17 @@ function baseCreateRenderer(options, createHydrationFns) {
4670
4781
  };
4671
4782
  const updateComponent = (n1, n2, optimized) => {
4672
4783
  const instance = n2.component = n1.component;
4673
- if (shouldUpdateComponent(n1, n2, optimized)) if (instance.asyncDep && !instance.asyncResolved) {
4674
- if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(n2);
4675
- updateComponentPreRender(instance, n2, optimized);
4676
- if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
4677
- return;
4784
+ if (shouldUpdateComponent(n1, n2, optimized)) {
4785
+ if (instance.asyncDep && !instance.asyncResolved) {
4786
+ if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(n2);
4787
+ updateComponentPreRender(instance, n2, optimized);
4788
+ if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
4789
+ return;
4790
+ } else {
4791
+ instance.next = n2;
4792
+ instance.effect.run();
4793
+ }
4678
4794
  } else {
4679
- instance.next = n2;
4680
- instance.effect.run();
4681
- }
4682
- else {
4683
4795
  n2.el = n1.el;
4684
4796
  instance.vnode = n2;
4685
4797
  }
@@ -4779,6 +4891,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4779
4891
  } else next = vnode;
4780
4892
  if (bu) invokeArrayFns(bu);
4781
4893
  if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
4894
+ if (next.ibu) next.ibu();
4782
4895
  toggleRecurse(instance, true);
4783
4896
  if (!!(process.env.NODE_ENV !== "production")) startMeasure(instance, `render`);
4784
4897
  const nextTree = renderComponentRoot(instance);
@@ -4791,7 +4904,10 @@ function baseCreateRenderer(options, createHydrationFns) {
4791
4904
  next.el = nextTree.el;
4792
4905
  if (originNext === null) updateHOCHostEl(instance, nextTree.el);
4793
4906
  if (u) queuePostRenderEffect(u, void 0, parentSuspense);
4794
- if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), void 0, parentSuspense);
4907
+ if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
4908
+ vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
4909
+ next.iu && next.iu();
4910
+ }, void 0, parentSuspense);
4795
4911
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentUpdated(instance);
4796
4912
  if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
4797
4913
  }
@@ -4831,9 +4947,10 @@ function baseCreateRenderer(options, createHydrationFns) {
4831
4947
  if (shapeFlag & 8) {
4832
4948
  if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
4833
4949
  if (c2 !== c1) hostSetElementText(container, c2);
4834
- } else if (prevShapeFlag & 16) if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4835
- else unmountChildren(c1, parentComponent, parentSuspense, true);
4836
- else {
4950
+ } else if (prevShapeFlag & 16) {
4951
+ if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4952
+ else unmountChildren(c1, parentComponent, parentSuspense, true);
4953
+ } else {
4837
4954
  if (prevShapeFlag & 8) hostSetElementText(container, "");
4838
4955
  if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4839
4956
  }
@@ -4932,8 +5049,10 @@ function baseCreateRenderer(options, createHydrationFns) {
4932
5049
  const anchorVNode = c2[nextIndex + 1];
4933
5050
  const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
4934
5051
  if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4935
- else if (moved) if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
4936
- else j--;
5052
+ else if (moved) {
5053
+ if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
5054
+ else j--;
5055
+ }
4937
5056
  }
4938
5057
  }
4939
5058
  };
@@ -4965,26 +5084,13 @@ function baseCreateRenderer(options, createHydrationFns) {
4965
5084
  moveStaticNode(vnode, container, anchor);
4966
5085
  return;
4967
5086
  }
4968
- if (moveType !== 2 && shapeFlag & 1 && transition) if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
4969
- else {
4970
- const { leave, delayLeave, afterLeave } = transition;
4971
- const remove = () => {
5087
+ if (moveType !== 2 && shapeFlag & 1 && transition) {
5088
+ if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
5089
+ else performTransitionLeave(el, transition, () => {
4972
5090
  if (vnode.ctx.isUnmounted) hostRemove(el);
4973
5091
  else hostInsert(el, container, anchor);
4974
- };
4975
- const performLeave = () => {
4976
- const wasLeaving = el._isLeaving || !!el[leaveCbKey];
4977
- if (el._isLeaving) el[leaveCbKey](true);
4978
- if (transition.persisted && !wasLeaving) remove();
4979
- else leave(el, () => {
4980
- remove();
4981
- afterLeave && afterLeave();
4982
- });
4983
- };
4984
- if (delayLeave) delayLeave(el, remove, performLeave);
4985
- else performLeave();
4986
- }
4987
- else hostInsert(el, container, anchor);
5092
+ }, true, true);
5093
+ } else hostInsert(el, container, anchor);
4988
5094
  };
4989
5095
  const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
4990
5096
  const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
@@ -5004,16 +5110,17 @@ function baseCreateRenderer(options, createHydrationFns) {
5004
5110
  const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
5005
5111
  let vnodeHook;
5006
5112
  if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
5007
- if (shapeFlag & 6) if (isVaporComponent(type)) {
5008
- if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
5009
- getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
5010
- if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
5011
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
5012
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
5013
- }, void 0, parentSuspense);
5014
- return;
5015
- } else unmountComponent(vnode.component, parentSuspense, doRemove);
5016
- else {
5113
+ if (shapeFlag & 6) {
5114
+ if (isVaporComponent(type)) {
5115
+ if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
5116
+ getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
5117
+ if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
5118
+ dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
5119
+ vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
5120
+ }, void 0, parentSuspense);
5121
+ return;
5122
+ } else unmountComponent(vnode.component, parentSuspense, doRemove);
5123
+ } else {
5017
5124
  if (shapeFlag & 128) {
5018
5125
  vnode.suspense.unmount(parentSuspense, doRemove);
5019
5126
  return;
@@ -5145,12 +5252,14 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
5145
5252
  return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
5146
5253
  }
5147
5254
  function toggleRecurse({ effect, job, vapor }, allowed) {
5148
- if (!vapor) if (allowed) {
5149
- effect.flags |= 128;
5150
- job.flags |= 2;
5151
- } else {
5152
- effect.flags &= -129;
5153
- job.flags &= -3;
5255
+ if (!vapor) {
5256
+ if (allowed) {
5257
+ effect.flags |= 128;
5258
+ job.flags |= 2;
5259
+ } else {
5260
+ effect.flags &= -129;
5261
+ job.flags &= -3;
5262
+ }
5154
5263
  }
5155
5264
  }
5156
5265
  function needTransition(parentSuspense, transition) {
@@ -5190,8 +5299,10 @@ function traverseStaticChildren(n1, n2, shallow = false) {
5190
5299
  }
5191
5300
  function locateNonHydratedAsyncRoot(instance) {
5192
5301
  const subComponent = instance.subTree && instance.subTree.component;
5193
- if (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
5194
- else return locateNonHydratedAsyncRoot(subComponent);
5302
+ if (subComponent) {
5303
+ if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
5304
+ else return locateNonHydratedAsyncRoot(subComponent);
5305
+ }
5195
5306
  }
5196
5307
  function invalidateMount(hooks) {
5197
5308
  if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
@@ -5210,13 +5321,15 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
5210
5321
  function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
5211
5322
  const performRemove = () => {
5212
5323
  remove();
5213
- if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
5324
+ if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
5214
5325
  };
5215
5326
  if (force || isElement && transition && !transition.persisted) {
5216
5327
  const { leave, delayLeave } = transition;
5217
5328
  const performLeave = () => {
5329
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
5218
5330
  if (el._isLeaving && force) el[leaveCbKey](true);
5219
- leave(el, performRemove);
5331
+ if (force && transition.persisted && !wasLeaving) remove();
5332
+ else leave(el, performRemove);
5220
5333
  };
5221
5334
  if (delayLeave) delayLeave(el, performRemove, performLeave);
5222
5335
  else performLeave();
@@ -5312,7 +5425,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
5312
5425
  patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
5313
5426
  if (suspense.deps <= 0) suspense.resolve();
5314
5427
  else if (isInFallback) {
5315
- if (!isHydrating) {
5428
+ if (!isHydrating && !suspense.isFallbackMountPending) {
5316
5429
  patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
5317
5430
  setActiveBranch(suspense, newFallback);
5318
5431
  }
@@ -5333,7 +5446,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
5333
5446
  if (isInFallback) {
5334
5447
  patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
5335
5448
  if (suspense.deps <= 0) suspense.resolve();
5336
- else {
5449
+ else if (!suspense.isFallbackMountPending) {
5337
5450
  patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
5338
5451
  setActiveBranch(suspense, newFallback);
5339
5452
  }
@@ -5461,8 +5574,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5461
5574
  const mountFallback = () => {
5462
5575
  suspense.isFallbackMountPending = false;
5463
5576
  if (!suspense.isInFallback) return;
5464
- patch(null, fallbackVNode, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
5465
- setActiveBranch(suspense, fallbackVNode);
5577
+ const latestFallback = suspense.vnode.ssFallback;
5578
+ patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
5579
+ setActiveBranch(suspense, latestFallback);
5466
5580
  };
5467
5581
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
5468
5582
  if (delayEnter) {
@@ -5538,9 +5652,10 @@ function normalizeSuspenseSlot(s) {
5538
5652
  return s;
5539
5653
  }
5540
5654
  function queueEffectWithSuspense(fn, id, suspense) {
5541
- if (suspense && suspense.pendingBranch) if (isArray(fn)) suspense.effects.push(...fn);
5542
- else suspense.effects.push(fn);
5543
- else queuePostFlushCb(fn, id);
5655
+ if (suspense && suspense.pendingBranch) {
5656
+ if (isArray(fn)) suspense.effects.push(...fn);
5657
+ else suspense.effects.push(fn);
5658
+ } else queuePostFlushCb(fn, id);
5544
5659
  }
5545
5660
  function setActiveBranch(suspense, branch) {
5546
5661
  suspense.activeBranch = branch;
@@ -5734,8 +5849,10 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
5734
5849
  if (isVNode(type)) {
5735
5850
  const cloned = cloneVNode(type, props, true);
5736
5851
  if (children) normalizeChildren(cloned, children);
5737
- if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
5738
- else currentBlock.push(cloned);
5852
+ if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
5853
+ if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
5854
+ else currentBlock.push(cloned);
5855
+ }
5739
5856
  cloned.patchFlag = -2;
5740
5857
  return cloned;
5741
5858
  }
@@ -5795,7 +5912,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
5795
5912
  ce: vnode.ce,
5796
5913
  vi: vnode.vi,
5797
5914
  vs: cloneVaporSlotMeta(vnode),
5798
- vb: vnode.vb
5915
+ vb: vnode.vb,
5916
+ ibu: vnode.ibu,
5917
+ iu: vnode.iu
5799
5918
  };
5800
5919
  if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
5801
5920
  return cloned;
@@ -5858,25 +5977,28 @@ function normalizeChildren(vnode, children) {
5858
5977
  const { shapeFlag } = vnode;
5859
5978
  if (children == null) children = null;
5860
5979
  else if (isArray(children)) type = 16;
5861
- else if (typeof children === "object") if (shapeFlag & 65) {
5862
- const slot = children.default;
5863
- if (slot) {
5864
- slot._c && (slot._d = false);
5865
- normalizeChildren(vnode, slot());
5866
- slot._c && (slot._d = true);
5867
- }
5868
- return;
5869
- } else {
5870
- type = 32;
5871
- const slotFlag = children._;
5872
- if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
5873
- else if (slotFlag === 3 && currentRenderingInstance) if (currentRenderingInstance.slots._ === 1) children._ = 1;
5874
- else {
5875
- children._ = 2;
5876
- vnode.patchFlag |= 1024;
5980
+ else if (typeof children === "object") {
5981
+ if (shapeFlag & 65) {
5982
+ const slot = children.default;
5983
+ if (slot) {
5984
+ slot._c && (slot._d = false);
5985
+ normalizeChildren(vnode, slot());
5986
+ slot._c && (slot._d = true);
5987
+ }
5988
+ return;
5989
+ } else {
5990
+ type = 32;
5991
+ const slotFlag = children._;
5992
+ if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
5993
+ else if (slotFlag === 3 && currentRenderingInstance) {
5994
+ if (currentRenderingInstance.slots._ === 1) children._ = 1;
5995
+ else {
5996
+ children._ = 2;
5997
+ vnode.patchFlag |= 1024;
5998
+ }
5999
+ }
5877
6000
  }
5878
- }
5879
- else if (isFunction(children)) {
6001
+ } else if (isFunction(children)) {
5880
6002
  if (shapeFlag & 65) {
5881
6003
  normalizeChildren(vnode, { default: children });
5882
6004
  return;
@@ -5994,7 +6116,7 @@ const useInstanceOption = (key, silent = false) => {
5994
6116
  };
5995
6117
  //#endregion
5996
6118
  //#region packages/runtime-core/src/component.ts
5997
- const emptyAppContext = /* @__PURE__ */ createAppContext();
6119
+ const emptyAppContext = /*@__PURE__*/ createAppContext();
5998
6120
  let uid = 0;
5999
6121
  /**
6000
6122
  * @internal for vapor
@@ -6148,9 +6270,10 @@ function setupStatefulComponent(instance, isSSR) {
6148
6270
  } else finishComponentSetup(instance, isSSR);
6149
6271
  }
6150
6272
  function handleSetupResult(instance, setupResult, isSSR) {
6151
- if (isFunction(setupResult)) if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
6152
- else instance.render = setupResult;
6153
- else if (isObject(setupResult)) {
6273
+ if (isFunction(setupResult)) {
6274
+ if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
6275
+ else instance.render = setupResult;
6276
+ } else if (isObject(setupResult)) {
6154
6277
  if (!!(process.env.NODE_ENV !== "production") && isVNode(setupResult)) warn$1("setup() should not return VNodes directly - return a render function instead.");
6155
6278
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) instance.devtoolsRawSetupState = setupResult;
6156
6279
  instance.setupState = proxyRefs$1(setupResult);
@@ -6201,10 +6324,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
6201
6324
  restoreCurrentInstance(prevInstance);
6202
6325
  }
6203
6326
  }
6204
- if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) if (!compile && Component.template)
6327
+ if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
6328
+ if (!compile && Component.template)
6205
6329
  /* v8 ignore start */
6206
- warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".");
6207
- else warn$1(`Component is missing template or render function: `, Component);
6330
+ warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".");
6331
+ else warn$1(`Component is missing template or render function: `, Component);
6332
+ }
6208
6333
  }
6209
6334
  const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
6210
6335
  get(target, key) {
@@ -6322,11 +6447,12 @@ function h(type, propsOrChildren, children) {
6322
6447
  try {
6323
6448
  setBlockTracking(-1);
6324
6449
  const l = arguments.length;
6325
- if (l === 2) if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
6326
- if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
6327
- return createVNode(type, propsOrChildren);
6328
- } else return createVNode(type, null, propsOrChildren);
6329
- else {
6450
+ if (l === 2) {
6451
+ if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
6452
+ if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
6453
+ return createVNode(type, propsOrChildren);
6454
+ } else return createVNode(type, null, propsOrChildren);
6455
+ } else {
6330
6456
  if (l > 3) children = Array.prototype.slice.call(arguments, 2);
6331
6457
  else if (l === 3 && isVNode(children)) children = [children];
6332
6458
  return createVNode(type, propsOrChildren, children);
@@ -6518,7 +6644,7 @@ function isMemoSame(cached, memo) {
6518
6644
  }
6519
6645
  //#endregion
6520
6646
  //#region packages/runtime-core/src/index.ts
6521
- const version = "3.6.0-rc.5";
6647
+ const version = "3.6.0-rc.7";
6522
6648
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
6523
6649
  /**
6524
6650
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -6553,4 +6679,4 @@ const resolveFilter = null;
6553
6679
  const compatUtils = null;
6554
6680
  const DeprecationTypes = null;
6555
6681
  //#endregion
6556
- export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, VaporSlot, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureValidVNode, ensureVaporSlotFallback, expose, filterModelListeners, flushOnAppMount, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, useAsyncComponentState, useAttrs, useId, useInstanceOption, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };
6682
+ export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, VaporSlot, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureValidVNode, ensureVaporSlotFallback, expose, filterModelListeners, flushOnAppMount, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, rawVaporSlotKey, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, useAsyncComponentState, useAttrs, useId, useInstanceOption, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, validateComponentName, validateProps, vdomSlotFallbackKey, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };