@vue/compat 3.5.43 → 3.5.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.43
2
+ * @vue/compat v3.5.45
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -68,24 +68,20 @@ const cacheStringFunction = (fn) => {
68
68
  });
69
69
  };
70
70
  const camelizeRE = /-\w/g;
71
- const camelize = cacheStringFunction(
72
- (str) => {
73
- return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
74
- }
75
- );
71
+ const camelize = /* @__PURE__ */ cacheStringFunction((str) => {
72
+ return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
73
+ });
76
74
  const hyphenateRE = /\B([A-Z])/g;
77
- const hyphenate = cacheStringFunction(
75
+ const hyphenate = /* @__PURE__ */ cacheStringFunction(
78
76
  (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
79
77
  );
80
- const capitalize = cacheStringFunction((str) => {
78
+ const capitalize = /* @__PURE__ */ cacheStringFunction((str) => {
81
79
  return str.charAt(0).toUpperCase() + str.slice(1);
82
80
  });
83
- const toHandlerKey = cacheStringFunction(
84
- (str) => {
85
- const s = str ? `on${capitalize(str)}` : ``;
86
- return s;
87
- }
88
- );
81
+ const toHandlerKey = /* @__PURE__ */ cacheStringFunction((str) => {
82
+ const s = str ? `on${capitalize(str)}` : ``;
83
+ return s;
84
+ });
89
85
  const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
90
86
  const invokeArrayFns = (fns, ...arg) => {
91
87
  for (let i = 0; i < fns.length; i++) {
@@ -275,7 +271,7 @@ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
275
271
  const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
276
272
  const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
277
273
 
278
- const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
274
+ const specialBooleanAttrs = `itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
279
275
  const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
280
276
  const isBooleanAttr = /* @__PURE__ */ makeMap(
281
277
  specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
@@ -661,7 +657,11 @@ function getCurrentScope() {
661
657
  }
662
658
  function onScopeDispose(fn, failSilently = false) {
663
659
  if (activeEffectScope) {
664
- activeEffectScope.cleanups.push(fn);
660
+ if (activeEffectScope.active) {
661
+ activeEffectScope.cleanups.push(fn);
662
+ } else {
663
+ fn();
664
+ }
665
665
  } else if (!failSilently) {
666
666
  warn$2(
667
667
  `onScopeDispose() is called when there is no active effect scope to be associated with.`
@@ -1365,19 +1365,41 @@ const arrayInstrumentations = {
1365
1365
  };
1366
1366
  function iterator(self, method, wrapValue) {
1367
1367
  const arr = shallowReadArray(self);
1368
- const iter = arr[method]();
1368
+ const methodFn = arr[method];
1369
+ const iter = methodFn.call(arr);
1369
1370
  if (arr !== self && !isShallow(self)) {
1370
- iter._next = iter.next;
1371
- iter.next = () => {
1372
- const result = iter._next();
1373
- if (!result.done) {
1374
- result.value = wrapValue(result.value);
1371
+ if (iter[Symbol.toStringTag] === "Array Iterator") {
1372
+ const wrapped = Object.create(Object.getPrototypeOf(iter));
1373
+ wrapped.next = () => wrapResult(iter.next(), wrapValue);
1374
+ if (methodFn !== arrayProto[method]) {
1375
+ Object.defineProperties(wrapped, {
1376
+ return: {
1377
+ get() {
1378
+ const fn = iter.return;
1379
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1380
+ }
1381
+ },
1382
+ throw: {
1383
+ get() {
1384
+ const fn = iter.throw;
1385
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1386
+ }
1387
+ }
1388
+ });
1375
1389
  }
1376
- return result;
1377
- };
1390
+ return wrapped;
1391
+ }
1392
+ iter._next = iter.next;
1393
+ iter.next = () => wrapResult(iter._next(), wrapValue);
1378
1394
  }
1379
1395
  return iter;
1380
1396
  }
1397
+ function wrapResult(result, wrapValue) {
1398
+ if (!result.done) {
1399
+ result.value = wrapValue(result.value);
1400
+ }
1401
+ return result;
1402
+ }
1381
1403
  const arrayProto = Array.prototype;
1382
1404
  function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1383
1405
  const arr = shallowReadArray(self);
@@ -1446,7 +1468,7 @@ function noTracking(self, method, args = []) {
1446
1468
  }
1447
1469
 
1448
1470
  const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
1449
- const builtInSymbols = new Set(
1471
+ const builtInSymbols = /* @__PURE__ */ new Set(
1450
1472
  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
1451
1473
  );
1452
1474
  function hasOwnProperty(key) {
@@ -1800,6 +1822,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
1800
1822
  return !isReadonly2;
1801
1823
  } else if (key === "__v_isReadonly") {
1802
1824
  return isReadonly2;
1825
+ } else if (key === "__v_isShallow") {
1826
+ return shallow;
1803
1827
  } else if (key === "__v_raw") {
1804
1828
  return target;
1805
1829
  }
@@ -2345,9 +2369,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2345
2369
  if (once && cb) {
2346
2370
  const _cb = cb;
2347
2371
  cb = (...args) => {
2348
- const res = _cb(...args);
2349
- watchHandle();
2350
- return res;
2372
+ try {
2373
+ return _cb(...args);
2374
+ } finally {
2375
+ watchHandle();
2376
+ }
2351
2377
  };
2352
2378
  }
2353
2379
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
@@ -2358,12 +2384,13 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2358
2384
  if (cb) {
2359
2385
  const newValue = effect.run();
2360
2386
  if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
2361
- if (cleanup) {
2362
- cleanup();
2363
- }
2364
2387
  const currentWatcher = activeWatcher;
2365
- activeWatcher = effect;
2388
+ pauseTracking();
2366
2389
  try {
2390
+ if (cleanup) {
2391
+ cleanup();
2392
+ }
2393
+ activeWatcher = effect;
2367
2394
  const args = [
2368
2395
  newValue,
2369
2396
  // pass undefined as the old value when it's changed for the first time
@@ -2377,6 +2404,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2377
2404
  );
2378
2405
  } finally {
2379
2406
  activeWatcher = currentWatcher;
2407
+ resetTracking();
2380
2408
  }
2381
2409
  }
2382
2410
  } else {
@@ -2650,7 +2678,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
2650
2678
  const res = callWithErrorHandling(fn, instance, type, args);
2651
2679
  if (res && isPromise(res)) {
2652
2680
  res.catch((err) => {
2653
- handleError(err, instance, type);
2681
+ handleError(err, instance, type, void 0, true);
2654
2682
  });
2655
2683
  }
2656
2684
  return res;
@@ -2667,7 +2695,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
2667
2695
  );
2668
2696
  }
2669
2697
  }
2670
- function handleError(err, instance, type, throwInDev = true) {
2698
+ function handleError(err, instance, type, throwInDev = true, isAsyncError = false) {
2671
2699
  const contextVNode = instance ? instance.vnode : null;
2672
2700
  const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
2673
2701
  if (instance) {
@@ -2676,7 +2704,9 @@ function handleError(err, instance, type, throwInDev = true) {
2676
2704
  const errorInfo = ErrorTypeStrings$1[type] ;
2677
2705
  while (cur) {
2678
2706
  const errorCapturedHooks = cur.ec;
2679
- if (errorCapturedHooks) {
2707
+ if (errorCapturedHooks && !cur.isUnmounted && // Async failures may outlive stopped scopes whose unmount effects
2708
+ // are deferred or discarded by Suspense.
2709
+ (!isAsyncError || cur.scope.active)) {
2680
2710
  for (let i = 0; i < errorCapturedHooks.length; i++) {
2681
2711
  if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
2682
2712
  return;
@@ -2777,21 +2807,21 @@ function queuePostFlushCb(cb) {
2777
2807
  }
2778
2808
  queueFlush();
2779
2809
  }
2780
- function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2810
+ function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
2781
2811
  {
2782
2812
  seen = seen || /* @__PURE__ */ new Map();
2783
2813
  }
2784
2814
  for (; i < queue.length; i++) {
2785
2815
  const cb = queue[i];
2786
2816
  if (cb && cb.flags & 2) {
2787
- if (instance && cb.id !== instance.uid) {
2817
+ if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
2788
2818
  continue;
2789
2819
  }
2790
2820
  if (checkRecursiveUpdates(seen, cb)) {
2791
2821
  continue;
2792
2822
  }
2793
2823
  queue.splice(i, 1);
2794
- i--;
2824
+ i = instance ? i - 1 : flushIndex;
2795
2825
  if (cb.flags & 4) {
2796
2826
  cb.flags &= -2;
2797
2827
  }
@@ -2802,12 +2832,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2802
2832
  }
2803
2833
  }
2804
2834
  }
2805
- function flushPostFlushCbs(seen) {
2835
+ function flushPostFlushCbs(seen, skip, minUid = 0) {
2806
2836
  if (pendingPostFlushCbs.length) {
2807
- const deduped = [...new Set(pendingPostFlushCbs)].sort(
2808
- (a, b) => getId(a) - getId(b)
2809
- );
2810
- pendingPostFlushCbs.length = 0;
2837
+ let cbs = pendingPostFlushCbs;
2838
+ let kept = 0;
2839
+ if (skip) {
2840
+ cbs = [];
2841
+ for (let i = 0; i < pendingPostFlushCbs.length; i++) {
2842
+ const cb = pendingPostFlushCbs[i];
2843
+ if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
2844
+ pendingPostFlushCbs[kept++] = cb;
2845
+ } else {
2846
+ cbs.push(cb);
2847
+ }
2848
+ }
2849
+ }
2850
+ const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
2851
+ pendingPostFlushCbs.length = kept;
2811
2852
  if (activePostFlushCbs) {
2812
2853
  for (let i = 0; i < deduped.length; i++) {
2813
2854
  activePostFlushCbs.push(deduped[i]);
@@ -2833,6 +2874,22 @@ function flushPostFlushCbs(seen) {
2833
2874
  postFlushIndex = 0;
2834
2875
  }
2835
2876
  }
2877
+ let isFlushing = false;
2878
+ function flushOnAppMount(fn, minUid) {
2879
+ if (isFlushing) {
2880
+ fn();
2881
+ return;
2882
+ }
2883
+ const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
2884
+ fn();
2885
+ isFlushing = true;
2886
+ try {
2887
+ flushPreFlushCbs(void 0, minUid);
2888
+ flushPostFlushCbs(void 0, queued, minUid);
2889
+ } finally {
2890
+ isFlushing = false;
2891
+ }
2892
+ }
2836
2893
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2837
2894
  function flushJobs(seen) {
2838
2895
  {
@@ -2977,14 +3034,32 @@ function reload(id, newComp) {
2977
3034
  instance.ceReload(newComp.styles);
2978
3035
  dirtyInstances.delete(instance);
2979
3036
  } else if (instance.parent) {
2980
- queueJob(() => {
2981
- if (!(instance.job.flags & 8)) {
2982
- isHmrUpdating = true;
3037
+ const update = () => {
3038
+ if (!instance.scope.active) return;
3039
+ const pending = instance.asyncDep && !instance.asyncResolved ? instance : locateUnresolvedAsyncRoot(instance.parent);
3040
+ if (pending) {
3041
+ pending.asyncDep.catch(NOOP).then(() => {
3042
+ if (instance.scope.active && (pending.asyncResolved || !pending.scope.active)) {
3043
+ queueJob(update);
3044
+ }
3045
+ });
3046
+ return;
3047
+ }
3048
+ dirtyInstances = hmrDirtyComponents.get(oldComp);
3049
+ if (!dirtyInstances) {
3050
+ hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
3051
+ }
3052
+ dirtyInstances.add(instance);
3053
+ isHmrUpdating = true;
3054
+ try {
2983
3055
  instance.parent.update();
3056
+ } finally {
2984
3057
  isHmrUpdating = false;
2985
3058
  dirtyInstances.delete(instance);
3059
+ queuePostFlushCb(() => hmrDirtyComponents.clear());
2986
3060
  }
2987
- });
3061
+ };
3062
+ queueJob(update);
2988
3063
  } else if (instance.appContext.reload) {
2989
3064
  instance.appContext.reload();
2990
3065
  } else if (typeof window !== "undefined") {
@@ -3666,12 +3741,31 @@ function withDirectives(vnode, directives) {
3666
3741
  return vnode;
3667
3742
  }
3668
3743
  function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3669
- const bindings = vnode.dirs;
3744
+ let hookVNode = vnode;
3745
+ if (name === "beforeMount") {
3746
+ vnode._mount = vnode;
3747
+ } else if (name === "beforeUpdate") {
3748
+ const mount = prevVNode && prevVNode._mount;
3749
+ if (mount) {
3750
+ mount._latest = vnode;
3751
+ vnode._mount = mount;
3752
+ }
3753
+ } else if (name === "mounted") {
3754
+ const latest = vnode._latest;
3755
+ vnode._mount = vnode._latest = void 0;
3756
+ if (latest) {
3757
+ hookVNode = latest;
3758
+ latest._mount = void 0;
3759
+ }
3760
+ }
3761
+ const bindings = hookVNode.dirs;
3670
3762
  const oldBindings = prevVNode && prevVNode.dirs;
3671
3763
  for (let i = 0; i < bindings.length; i++) {
3672
- const binding = bindings[i];
3764
+ let binding = bindings[i];
3673
3765
  if (oldBindings) {
3674
3766
  binding.oldValue = oldBindings[i].value;
3767
+ } else if (name === "mounted" && binding.oldValue !== void 0) {
3768
+ binding = extend({}, binding, { oldValue: void 0 });
3675
3769
  }
3676
3770
  let hook = binding.dir[name];
3677
3771
  if (!hook) {
@@ -3682,7 +3776,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3682
3776
  callWithAsyncErrorHandling(hook, instance, 8, [
3683
3777
  vnode.el,
3684
3778
  binding,
3685
- vnode,
3779
+ hookVNode,
3686
3780
  prevVNode
3687
3781
  ]);
3688
3782
  resetTracking();
@@ -3803,6 +3897,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
3803
3897
  let isPre = false;
3804
3898
  if (flush === "post") {
3805
3899
  baseWatchOptions.scheduler = (job) => {
3900
+ job.i = instance;
3806
3901
  queuePostRenderEffect(job, instance && instance.suspense);
3807
3902
  };
3808
3903
  } else if (flush !== "sync") {
@@ -4104,7 +4199,11 @@ const TeleportImpl = {
4104
4199
  };
4105
4200
  function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
4106
4201
  if (moveType === 0) {
4202
+ if (vnode.targetStart) {
4203
+ insert(vnode.targetStart, container, parentAnchor);
4204
+ }
4107
4205
  insert(vnode.targetAnchor, container, parentAnchor);
4206
+ parentAnchor = vnode.targetAnchor;
4108
4207
  }
4109
4208
  const { el, anchor, shapeFlag, children, props } = vnode;
4110
4209
  const isReorder = moveType === 2;
@@ -4273,10 +4372,6 @@ const BaseTransitionPropsValidators = {
4273
4372
  onAfterAppear: TransitionHookValidator,
4274
4373
  onAppearCancelled: TransitionHookValidator
4275
4374
  };
4276
- const recursiveGetSubtree = (instance) => {
4277
- const subTree = instance.subTree;
4278
- return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
4279
- };
4280
4375
  const BaseTransitionImpl = {
4281
4376
  name: `BaseTransition`,
4282
4377
  props: BaseTransitionPropsValidators,
@@ -4305,19 +4400,17 @@ const BaseTransitionImpl = {
4305
4400
  if (!innerChild) {
4306
4401
  return emptyPlaceholder(child);
4307
4402
  }
4308
- let enterHooks = resolveTransitionHooks(
4403
+ const enterHooks = resolveTransitionHooks(
4309
4404
  innerChild,
4310
4405
  rawProps,
4311
4406
  state,
4312
- instance,
4313
- // #11061, ensure enterHooks is fresh after clone
4314
- (hooks) => enterHooks = hooks
4407
+ instance
4315
4408
  );
4316
4409
  if (innerChild.type !== Comment) {
4317
4410
  setTransitionHooks(innerChild, enterHooks);
4318
4411
  }
4319
4412
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
4320
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
4413
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
4321
4414
  let leavingHooks = resolveTransitionHooks(
4322
4415
  oldInnerChild,
4323
4416
  rawProps,
@@ -4330,7 +4423,17 @@ const BaseTransitionImpl = {
4330
4423
  leavingHooks.afterLeave = () => {
4331
4424
  state.isLeaving = false;
4332
4425
  if (!(instance.job.flags & 8)) {
4333
- instance.update();
4426
+ if (instance.effect.flags & 2) {
4427
+ const job = () => {
4428
+ if (!(instance.job.flags & 8)) {
4429
+ instance.update();
4430
+ }
4431
+ };
4432
+ job.i = instance;
4433
+ queueJob(job);
4434
+ } else {
4435
+ instance.update();
4436
+ }
4334
4437
  }
4335
4438
  delete leavingHooks.afterLeave;
4336
4439
  oldInnerChild = void 0;
@@ -4397,7 +4500,7 @@ function getLeavingNodesForType(state, vnode) {
4397
4500
  }
4398
4501
  return leavingVNodesCache;
4399
4502
  }
4400
- function resolveTransitionHooks(vnode, props, state, instance, postClone) {
4503
+ function resolveTransitionHooks(vnode, props, state, instance) {
4401
4504
  const {
4402
4505
  appear,
4403
4506
  mode,
@@ -4453,8 +4556,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
4453
4556
  );
4454
4557
  }
4455
4558
  const leavingVNode = leavingVNodesCache[key];
4456
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
4457
- leavingVNode.el[leaveCbKey]();
4559
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
4560
+ let leavingCb = leavingVNode.el[leaveCbKey];
4561
+ if (!leavingCb) {
4562
+ const leavingRoot = getTransitionRoot(leavingVNode);
4563
+ leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
4564
+ }
4565
+ if (leavingCb) {
4566
+ leavingCb();
4567
+ }
4458
4568
  }
4459
4569
  callHook(hook, [el]);
4460
4570
  },
@@ -4529,15 +4639,21 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
4529
4639
  }
4530
4640
  },
4531
4641
  clone(vnode2) {
4532
- const hooks2 = resolveTransitionHooks(
4533
- vnode2,
4534
- props,
4535
- state,
4536
- instance,
4537
- postClone
4538
- );
4539
- if (postClone) postClone(hooks2);
4540
- return hooks2;
4642
+ const cloned = resolveTransitionHooks(vnode2, props, state, instance);
4643
+ cloned.afterLeave = () => {
4644
+ if (hooks.afterLeave) hooks.afterLeave();
4645
+ };
4646
+ cloned.delayLeave = (el, earlyRemove, delayedLeave) => {
4647
+ if (hooks.delayLeave) {
4648
+ hooks.delayLeave(el, earlyRemove, delayedLeave);
4649
+ } else {
4650
+ delayedLeave();
4651
+ }
4652
+ };
4653
+ cloned.delayedLeave = () => {
4654
+ if (hooks.delayedLeave) hooks.delayedLeave();
4655
+ };
4656
+ return cloned;
4541
4657
  }
4542
4658
  };
4543
4659
  return hooks;
@@ -4578,10 +4694,24 @@ function setTransitionHooks(vnode, hooks) {
4578
4694
  hooks
4579
4695
  );
4580
4696
  } else if (vnode.shapeFlag & 128) {
4581
- vnode.ssContent.transition = hooks.clone(vnode.ssContent);
4582
- vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4697
+ const suspense = vnode.suspense;
4698
+ if (suspense) {
4699
+ const branch = suspense.isHydrating ? suspense.pendingBranch : suspense.activeBranch;
4700
+ if (branch) {
4701
+ setTransitionHooks(branch, hooks.clone(branch));
4702
+ }
4703
+ } else {
4704
+ vnode.ssContent.transition = hooks.clone(vnode.ssContent);
4705
+ vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4706
+ }
4583
4707
  } else {
4584
4708
  vnode.transition = hooks;
4709
+ if (vnode.type === Fragment && isArray(vnode.children)) {
4710
+ const child = filterSingleRoot(vnode.children, false);
4711
+ if (child) {
4712
+ setTransitionHooks(child, hooks);
4713
+ }
4714
+ }
4585
4715
  }
4586
4716
  }
4587
4717
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
@@ -4606,6 +4736,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4606
4736
  }
4607
4737
  return ret;
4608
4738
  }
4739
+ function getTransitionRoot(vnode) {
4740
+ if (vnode.component) {
4741
+ return getTransitionRoot(vnode.component.subTree);
4742
+ }
4743
+ if (vnode.type === Fragment) {
4744
+ const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
4745
+ return child ? getTransitionRoot(child) : void 0;
4746
+ }
4747
+ if (vnode.type !== Comment) {
4748
+ return vnode;
4749
+ }
4750
+ }
4609
4751
 
4610
4752
  // @__NO_SIDE_EFFECTS__
4611
4753
  function defineComponent(options, extraOptions) {
@@ -5262,7 +5404,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5262
5404
  getContainerType(container),
5263
5405
  slotScopeIds
5264
5406
  );
5265
- if (parentComponent) {
5407
+ if (parentComponent && parentComponent.vnode.el === node) {
5266
5408
  parentComponent.vnode.el = vnode.el;
5267
5409
  updateHOCHostEl(parentComponent, vnode.el);
5268
5410
  }
@@ -5511,14 +5653,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
5511
5653
  break;
5512
5654
  }
5513
5655
  }, opts);
5514
- forEach((el) => {
5515
- if (!(el instanceof Element)) return;
5656
+ const observe = (el) => {
5516
5657
  if (elementIsVisibleInViewport(el)) {
5517
5658
  hydrate();
5518
5659
  ob.disconnect();
5519
5660
  return false;
5520
5661
  }
5662
+ if (getComputedStyle(el).display === "contents") {
5663
+ for (let i = 0; i < el.children.length; i++) {
5664
+ if (observe(el.children[i]) === false) return false;
5665
+ }
5666
+ }
5521
5667
  ob.observe(el);
5668
+ };
5669
+ forEach((el) => {
5670
+ if (!(el instanceof Element)) return;
5671
+ return observe(el);
5522
5672
  });
5523
5673
  return () => ob.disconnect();
5524
5674
  };
@@ -5688,7 +5838,8 @@ function defineAsyncComponent(source) {
5688
5838
  err,
5689
5839
  instance,
5690
5840
  13,
5691
- !errorComponent
5841
+ !errorComponent,
5842
+ true
5692
5843
  );
5693
5844
  };
5694
5845
  if (suspensible && instance.suspense || isInSSRComponentSetup) {
@@ -5706,7 +5857,7 @@ function defineAsyncComponent(source) {
5706
5857
  const delayed = ref(!!delay);
5707
5858
  let timeoutTimer;
5708
5859
  let delayTimer;
5709
- onUnmounted(() => {
5860
+ onScopeDispose(() => {
5710
5861
  if (timeoutTimer != null) clearTimeout(timeoutTimer);
5711
5862
  if (delayTimer != null) clearTimeout(delayTimer);
5712
5863
  });
@@ -5834,6 +5985,12 @@ const KeepAliveImpl = {
5834
5985
  }
5835
5986
  };
5836
5987
  sharedContext.deactivate = (vnode) => {
5988
+ const cached = cache.get(
5989
+ vnode.key == null ? vnode.type : vnode.key
5990
+ );
5991
+ if (!cached || cached.component !== vnode.component) {
5992
+ return false;
5993
+ }
5837
5994
  const instance2 = vnode.component;
5838
5995
  invalidateMount(instance2.m);
5839
5996
  invalidateMount(instance2.a);
@@ -5851,6 +6008,7 @@ const KeepAliveImpl = {
5851
6008
  {
5852
6009
  devtoolsComponentAdded(instance2);
5853
6010
  }
6011
+ return true;
5854
6012
  };
5855
6013
  function unmount(vnode) {
5856
6014
  resetShapeFlag(vnode);
@@ -5872,6 +6030,7 @@ const KeepAliveImpl = {
5872
6030
  unmount(cached);
5873
6031
  } else if (current) {
5874
6032
  resetShapeFlag(current);
6033
+ if (cached) resetShapeFlag(cached);
5875
6034
  }
5876
6035
  cache.delete(key);
5877
6036
  keys.delete(key);
@@ -5889,12 +6048,17 @@ const KeepAliveImpl = {
5889
6048
  const cacheSubtree = () => {
5890
6049
  if (pendingCacheKey != null) {
5891
6050
  if (isSuspense(instance.subTree.type)) {
5892
- queuePostRenderEffect(() => {
6051
+ const cacheInnerChild = () => {
5893
6052
  const vnode = getInnerChild(instance.subTree);
5894
6053
  if (vnode.component) {
5895
6054
  cache.set(pendingCacheKey, vnode);
5896
6055
  }
5897
- }, instance.subTree.suspense);
6056
+ };
6057
+ if (instance.subTree.suspense.pendingBranch) {
6058
+ queuePostRenderEffect(cacheInnerChild, instance.subTree.suspense);
6059
+ } else {
6060
+ cacheInnerChild();
6061
+ }
5898
6062
  } else {
5899
6063
  cache.set(pendingCacheKey, getInnerChild(instance.subTree));
5900
6064
  }
@@ -6029,9 +6193,12 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
6029
6193
  true
6030
6194
  /* prepend */
6031
6195
  );
6032
- onUnmounted(() => {
6033
- remove(keepAliveRoot[type], injected);
6034
- }, target);
6196
+ const removal = injectHook(
6197
+ "um",
6198
+ () => remove(keepAliveRoot[type], injected),
6199
+ target
6200
+ );
6201
+ removal.flags = 16;
6035
6202
  }
6036
6203
  function resetShapeFlag(vnode) {
6037
6204
  vnode.shapeFlag &= -257;
@@ -6454,9 +6621,11 @@ function renderList(source, renderItem, cache, index) {
6454
6621
  }
6455
6622
  } else if (typeof source === "number") {
6456
6623
  if (!Number.isInteger(source) || source < 0) {
6457
- warn$1(
6458
- `The v-for range expects a positive integer value but got ${source}.`
6459
- );
6624
+ {
6625
+ warn$1(
6626
+ `The v-for range expects a positive integer value but got ${source}.`
6627
+ );
6628
+ }
6460
6629
  ret = [];
6461
6630
  } else {
6462
6631
  ret = new Array(source);
@@ -6775,6 +6944,7 @@ function installCompatInstanceProperties(map) {
6775
6944
  $vnode: (i) => i.vnode,
6776
6945
  // some private properties that are likely accessed...
6777
6946
  _self: (i) => i.proxy,
6947
+ _setupProxy: (i) => i.setupState,
6778
6948
  _uid: (i) => i.uid,
6779
6949
  _data: (i) => i.data,
6780
6950
  _isMounted: (i) => i.isMounted,
@@ -7762,7 +7932,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7762
7932
  return vm;
7763
7933
  }
7764
7934
  }
7765
- Vue.version = `2.6.14-compat:${"3.5.43"}`;
7935
+ Vue.version = `2.6.14-compat:${"3.5.45"}`;
7766
7936
  Vue.config = singletonApp.config;
7767
7937
  Vue.use = (plugin, ...options) => {
7768
7938
  if (plugin && isFunction(plugin.install)) {
@@ -8919,7 +9089,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
8919
9089
  }
8920
9090
  for (let i = 0; i < nextKeys.length; i++) {
8921
9091
  const key = nextKeys[i];
8922
- if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
9092
+ if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8923
9093
  return true;
8924
9094
  }
8925
9095
  }
@@ -9871,6 +10041,8 @@ function baseCreateRenderer(options, createHydrationFns) {
9871
10041
  const needCallTransitionHooks = needTransition(parentSuspense, transition);
9872
10042
  if (needCallTransitionHooks) {
9873
10043
  transition.beforeEnter(el);
10044
+ } else if (transition && !transition.persisted) {
10045
+ el[deferredEnterKey] = true;
9874
10046
  }
9875
10047
  hostInsert(el, container, anchor);
9876
10048
  if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
@@ -10030,15 +10202,16 @@ function baseCreateRenderer(options, createHydrationFns) {
10030
10202
  for (let i = 0; i < newChildren.length; i++) {
10031
10203
  const oldVNode = oldChildren[i];
10032
10204
  const newVNode = newChildren[i];
10205
+ const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
10033
10206
  const container = (
10034
10207
  // oldVNode may be an errored async setup() component inside Suspense
10035
10208
  // which will not have a mounted element
10036
- oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
10209
+ oldEl && // - In the case of a Fragment, we need to provide the actual parent
10037
10210
  // of the Fragment itself so it can move its children.
10038
10211
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
10039
10212
  // which also requires the correct parent container
10040
10213
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
10041
- oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
10214
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
10042
10215
  // In other cases, the parent container is not actually used so we
10043
10216
  // just pass the block element here to avoid a DOM parentNode call.
10044
10217
  fallbackContainer
@@ -10203,7 +10376,12 @@ function baseCreateRenderer(options, createHydrationFns) {
10203
10376
  }
10204
10377
  if (isHmrUpdating) initialVNode.el = null;
10205
10378
  if (instance.asyncDep) {
10206
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
10379
+ parentSuspense && parentSuspense.registerDep(
10380
+ instance,
10381
+ setupRenderEffect,
10382
+ optimized,
10383
+ namespace
10384
+ );
10207
10385
  if (!initialVNode.el) {
10208
10386
  const placeholder = instance.subTree = createVNode(Comment);
10209
10387
  processCommentNode(null, placeholder, container, anchor);
@@ -10233,6 +10411,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10233
10411
  pushWarningContext(n2);
10234
10412
  }
10235
10413
  n2.el = n1.el;
10414
+ n2.placeholder = n1.placeholder;
10236
10415
  updateComponentPreRender(instance, n2, optimized);
10237
10416
  {
10238
10417
  popWarningContext();
@@ -10244,6 +10423,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10244
10423
  }
10245
10424
  } else {
10246
10425
  n2.el = n1.el;
10426
+ n2.placeholder = n1.placeholder;
10247
10427
  instance.vnode = n2;
10248
10428
  }
10249
10429
  };
@@ -10361,16 +10541,23 @@ function baseCreateRenderer(options, createHydrationFns) {
10361
10541
  } else {
10362
10542
  let { next, bu, u, parent, vnode } = instance;
10363
10543
  {
10364
- const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
10365
- if (nonHydratedAsyncRoot) {
10544
+ const unresolvedAsyncRoot = locateUnresolvedAsyncRoot(instance);
10545
+ if (unresolvedAsyncRoot) {
10366
10546
  if (next) {
10367
10547
  next.el = vnode.el;
10368
10548
  updateComponentPreRender(instance, next, optimized);
10369
10549
  }
10370
- nonHydratedAsyncRoot.asyncDep.then(() => {
10371
- queuePostRenderEffect(() => {
10372
- if (!instance.isUnmounted) update();
10373
- }, parentSuspense);
10550
+ unresolvedAsyncRoot.asyncDep.then(() => {
10551
+ const retry = () => {
10552
+ if (instance.job.flags & 8) return;
10553
+ if (parentSuspense && parentSuspense.pendingBranch) {
10554
+ queuePostRenderEffect(retry, parentSuspense);
10555
+ } else {
10556
+ update();
10557
+ }
10558
+ };
10559
+ retry.flags = 16 | 32;
10560
+ queuePostRenderEffect(retry, parentSuspense);
10374
10561
  });
10375
10562
  return;
10376
10563
  }
@@ -10412,8 +10599,11 @@ function baseCreateRenderer(options, createHydrationFns) {
10412
10599
  patch(
10413
10600
  prevTree,
10414
10601
  nextTree,
10415
- // parent may have changed if it's in a teleport
10416
- hostParentNode(prevTree.el),
10602
+ // parent may have changed if it's in a teleport. a root that is a
10603
+ // pending async component only has its placeholder comment
10604
+ hostParentNode(
10605
+ prevTree.el || resolveAsyncComponentPlaceholder(prevTree)
10606
+ ),
10417
10607
  // anchor may have changed if it's in a fragment
10418
10608
  getNextHostNode(prevTree),
10419
10609
  instance,
@@ -10859,8 +11049,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10859
11049
  if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
10860
11050
  parentComponent.renderCache[cacheIndex] = void 0;
10861
11051
  }
10862
- if (shapeFlag & 256) {
10863
- parentComponent.ctx.deactivate(vnode);
11052
+ if (shapeFlag & 256 && parentComponent.ctx.deactivate(vnode)) {
10864
11053
  return;
10865
11054
  }
10866
11055
  const shouldInvokeDirs = shapeFlag & 1 && dirs;
@@ -10921,18 +11110,9 @@ function baseCreateRenderer(options, createHydrationFns) {
10921
11110
  };
10922
11111
  const remove = (vnode) => {
10923
11112
  const { type, el, anchor, transition } = vnode;
10924
- if (type === Fragment) {
10925
- if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
10926
- vnode.children.forEach((child) => {
10927
- if (child.type === Comment) {
10928
- hostRemove(child.el);
10929
- } else {
10930
- remove(child);
10931
- }
10932
- });
10933
- } else {
10934
- removeFragment(el, anchor);
10935
- }
11113
+ const isFragment = type === Fragment;
11114
+ if (isFragment && !transition) {
11115
+ removeFragment(el, anchor);
10936
11116
  return;
10937
11117
  }
10938
11118
  if (type === Static) {
@@ -10942,17 +11122,25 @@ function baseCreateRenderer(options, createHydrationFns) {
10942
11122
  }
10943
11123
  return;
10944
11124
  }
11125
+ const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
10945
11126
  const performRemove = () => {
10946
- hostRemove(el);
11127
+ if (isFragment) {
11128
+ if (hostParentNode(el)) {
11129
+ removeFragment(el, anchor);
11130
+ }
11131
+ } else {
11132
+ hostRemove(el);
11133
+ }
10947
11134
  if (transition && !transition.persisted && transition.afterLeave) {
10948
11135
  transition.afterLeave();
10949
11136
  }
10950
11137
  };
10951
- if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
11138
+ if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
10952
11139
  const { leave, delayLeave } = transition;
10953
- const performLeave = () => leave(el, performRemove);
11140
+ const leavingEl = leavingNode.el;
11141
+ const performLeave = () => leave(leavingEl, performRemove);
10954
11142
  if (delayLeave) {
10955
- delayLeave(vnode.el, performRemove, performLeave);
11143
+ delayLeave(leavingEl, performRemove, performLeave);
10956
11144
  } else {
10957
11145
  performLeave();
10958
11146
  }
@@ -10986,7 +11174,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10986
11174
  if (job) {
10987
11175
  job.flags |= 8;
10988
11176
  unmount(subTree, instance, parentSuspense, doRemove);
10989
- } else if (instance.vnode.el && subTree) {
11177
+ } else if (subTree) {
10990
11178
  subTree.transition = instance.vnode.transition;
10991
11179
  unmount(subTree, instance, parentSuspense, doRemove);
10992
11180
  }
@@ -10999,9 +11187,11 @@ function baseCreateRenderer(options, createHydrationFns) {
10999
11187
  parentSuspense
11000
11188
  );
11001
11189
  }
11002
- queuePostRenderEffect(() => {
11190
+ const markUnmounted = () => {
11003
11191
  instance.isUnmounted = true;
11004
- }, parentSuspense);
11192
+ };
11193
+ markUnmounted.flags = 16;
11194
+ queuePostRenderEffect(markUnmounted, parentSuspense);
11005
11195
  {
11006
11196
  devtoolsComponentRemoved(instance);
11007
11197
  }
@@ -11022,32 +11212,26 @@ function baseCreateRenderer(options, createHydrationFns) {
11022
11212
  const teleportEnd = el && el[TeleportEndKey];
11023
11213
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
11024
11214
  };
11025
- let isFlushing = false;
11026
11215
  const render = (vnode, container, namespace) => {
11027
- let instance;
11028
- if (vnode == null) {
11029
- if (container._vnode) {
11030
- unmount(container._vnode, null, null, true);
11031
- instance = container._vnode.component;
11216
+ const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
11217
+ flushOnAppMount(() => {
11218
+ if (vnode == null) {
11219
+ if (container._vnode) {
11220
+ unmount(container._vnode, null, null, true);
11221
+ }
11222
+ } else {
11223
+ patch(
11224
+ container._vnode || null,
11225
+ vnode,
11226
+ container,
11227
+ null,
11228
+ null,
11229
+ null,
11230
+ namespace
11231
+ );
11032
11232
  }
11033
- } else {
11034
- patch(
11035
- container._vnode || null,
11036
- vnode,
11037
- container,
11038
- null,
11039
- null,
11040
- null,
11041
- namespace
11042
- );
11043
- }
11044
- container._vnode = vnode;
11045
- if (!isFlushing) {
11046
- isFlushing = true;
11047
- flushPreFlushCbs(instance);
11048
- flushPostFlushCbs();
11049
- isFlushing = false;
11050
- }
11233
+ container._vnode = vnode;
11234
+ }, minUid);
11051
11235
  };
11052
11236
  const internals = {
11053
11237
  p: patch,
@@ -11159,13 +11343,13 @@ function getSequence(arr) {
11159
11343
  }
11160
11344
  return result;
11161
11345
  }
11162
- function locateNonHydratedAsyncRoot(instance) {
11346
+ function locateUnresolvedAsyncRoot(instance) {
11163
11347
  const subComponent = instance.subTree.component;
11164
11348
  if (subComponent) {
11165
11349
  if (subComponent.asyncDep && !subComponent.asyncResolved) {
11166
11350
  return subComponent;
11167
11351
  } else {
11168
- return locateNonHydratedAsyncRoot(subComponent);
11352
+ return locateUnresolvedAsyncRoot(subComponent);
11169
11353
  }
11170
11354
  }
11171
11355
  }
@@ -11183,11 +11367,16 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
11183
11367
  if (instance) {
11184
11368
  return resolveAsyncComponentPlaceholder(instance.subTree);
11185
11369
  }
11370
+ const suspense = anchorVnode.suspense;
11371
+ if (suspense && suspense.activeBranch) {
11372
+ return resolveAsyncComponentPlaceholder(suspense.activeBranch);
11373
+ }
11186
11374
  return null;
11187
11375
  }
11188
11376
 
11189
11377
  const isSuspense = (type) => type.__isSuspense;
11190
11378
  let suspenseId = 0;
11379
+ const deferredEnterKey = /* @__PURE__ */ Symbol("_deferredEnter");
11191
11380
  const SuspenseImpl = {
11192
11381
  name: "Suspense",
11193
11382
  // In order to make Suspense tree-shakable, we need to avoid importing it
@@ -11209,11 +11398,22 @@ const SuspenseImpl = {
11209
11398
  rendererInternals
11210
11399
  );
11211
11400
  } else {
11212
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
11213
- n2.suspense = n1.suspense;
11214
- n2.suspense.vnode = n2;
11215
- n2.el = n1.el;
11216
- return;
11401
+ const suspense = n1.suspense;
11402
+ if (parentSuspense && parentSuspense.deps > 0 && !parentSuspense.isHydrating) {
11403
+ const owner = suspense.parentComponent;
11404
+ const retained = !!owner && owner.suspense === parentSuspense && owner.suspenseId !== parentSuspense.pendingId;
11405
+ if (retained ? (
11406
+ // deps can outlive the pending branch: skip only while it exists
11407
+ parentSuspense.pendingBranch && !isSameVNodeType(
11408
+ n2.ssContent,
11409
+ suspense.pendingBranch || suspense.activeBranch
11410
+ )
11411
+ ) : !suspense.isInFallback) {
11412
+ n2.suspense = suspense;
11413
+ suspense.vnode = n2;
11414
+ n2.el = n1.el;
11415
+ return;
11416
+ }
11217
11417
  }
11218
11418
  patchSuspense(
11219
11419
  n1,
@@ -11238,6 +11438,38 @@ function triggerEvent(vnode, name) {
11238
11438
  eventListener();
11239
11439
  }
11240
11440
  }
11441
+ function enterDeferred(branch) {
11442
+ const enters = [];
11443
+ collectDeferredEnters(branch, enters, true);
11444
+ if (enters.length) {
11445
+ queuePostFlushCb(enters);
11446
+ }
11447
+ }
11448
+ function collectDeferredEnters(vnode, enters, isRoot) {
11449
+ const { el, transition, children, shapeFlag } = vnode;
11450
+ if (shapeFlag & 6) {
11451
+ collectDeferredEnters(vnode.component.subTree, enters, isRoot);
11452
+ return;
11453
+ }
11454
+ if (shapeFlag & (128 | 64)) {
11455
+ return;
11456
+ }
11457
+ if (shapeFlag & 1) {
11458
+ if (!isRoot && el && el[deferredEnterKey]) {
11459
+ el[deferredEnterKey] = void 0;
11460
+ if (transition && !transition.persisted) {
11461
+ transition.beforeEnter(el);
11462
+ enters.push(() => transition.enter(el));
11463
+ }
11464
+ }
11465
+ isRoot = false;
11466
+ }
11467
+ if (shapeFlag & 16) {
11468
+ for (let i = 0; i < children.length; i++) {
11469
+ collectDeferredEnters(children[i], enters, isRoot);
11470
+ }
11471
+ }
11472
+ }
11241
11473
  function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
11242
11474
  const {
11243
11475
  p: patch,
@@ -11337,7 +11569,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
11337
11569
  unmount(pendingBranch, parentComponent, suspense);
11338
11570
  }
11339
11571
  suspense.deps = 0;
11340
- suspense.effects.length = 0;
11572
+ discardEffects(suspense);
11341
11573
  suspense.hiddenContainer = createElement("div");
11342
11574
  if (isInFallback) {
11343
11575
  patch(
@@ -11415,11 +11647,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
11415
11647
  } else {
11416
11648
  triggerEvent(n2, "onPending");
11417
11649
  suspense.pendingBranch = newBranch;
11418
- if (newBranch.shapeFlag & 512) {
11419
- suspense.pendingId = newBranch.component.suspenseId;
11420
- } else {
11421
- suspense.pendingId = suspenseId++;
11422
- }
11650
+ suspense.pendingId = suspenseId++;
11423
11651
  patch(
11424
11652
  null,
11425
11653
  newBranch,
@@ -11434,12 +11662,11 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
11434
11662
  if (suspense.deps <= 0) {
11435
11663
  suspense.resolve();
11436
11664
  } else {
11437
- const { timeout, pendingId } = suspense;
11665
+ const { timeout } = suspense;
11438
11666
  if (timeout > 0) {
11439
- setTimeout(() => {
11440
- if (suspense.pendingId === pendingId) {
11441
- suspense.fallback(newFallback);
11442
- }
11667
+ suspense.timeoutTimer = setTimeout(() => {
11668
+ suspense.timeoutTimer = void 0;
11669
+ suspense.fallback(suspense.vnode.ssFallback);
11443
11670
  }, timeout);
11444
11671
  } else if (timeout === 0) {
11445
11672
  suspense.fallback(newFallback);
@@ -11486,6 +11713,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11486
11713
  deps: 0,
11487
11714
  pendingId: suspenseId++,
11488
11715
  timeout: typeof timeout === "number" ? timeout : -1,
11716
+ timeoutTimer: void 0,
11489
11717
  activeBranch: null,
11490
11718
  isFallbackMountPending: false,
11491
11719
  pendingBranch: null,
@@ -11524,7 +11752,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11524
11752
  let hasUpdatedAnchor = false;
11525
11753
  if (delayEnter) {
11526
11754
  activeBranch.transition.afterLeave = () => {
11527
- if (pendingId === suspense.pendingId) {
11755
+ if (pendingId === suspense.pendingId && !suspense.isUnmounted) {
11756
+ enterDeferred(pendingBranch);
11528
11757
  move(
11529
11758
  pendingBranch,
11530
11759
  container2,
@@ -11539,7 +11768,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11539
11768
  };
11540
11769
  }
11541
11770
  if (activeBranch && !suspense.isFallbackMountPending) {
11542
- if (parentNode(activeBranch.el) === container2) {
11771
+ if (parentNode(
11772
+ activeBranch.el || resolveAsyncComponentPlaceholder(activeBranch)
11773
+ ) === container2) {
11543
11774
  anchor = next(activeBranch);
11544
11775
  hasUpdatedAnchor = true;
11545
11776
  }
@@ -11549,13 +11780,26 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11549
11780
  }
11550
11781
  }
11551
11782
  if (!delayEnter) {
11783
+ enterDeferred(pendingBranch);
11552
11784
  move(pendingBranch, container2, anchor, 0);
11553
11785
  }
11554
11786
  }
11787
+ clearTimeout(suspense.timeoutTimer);
11788
+ suspense.timeoutTimer = void 0;
11555
11789
  suspense.isFallbackMountPending = false;
11556
11790
  setActiveBranch(suspense, pendingBranch);
11557
11791
  suspense.pendingBranch = null;
11558
11792
  suspense.isInFallback = false;
11793
+ let kept = 0;
11794
+ for (let i = 0; i < effects.length; i++) {
11795
+ const effect = effects[i];
11796
+ if (effect.flags & 32) {
11797
+ queuePostFlushCb(effect);
11798
+ } else {
11799
+ effects[kept++] = effect;
11800
+ }
11801
+ }
11802
+ effects.length = kept;
11559
11803
  let parent = suspense.parent;
11560
11804
  let hasUnresolvedAncestor = false;
11561
11805
  while (parent) {
@@ -11584,7 +11828,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11584
11828
  triggerEvent(vnode2, "onResolve");
11585
11829
  },
11586
11830
  fallback(fallbackVNode) {
11587
- if (!suspense.pendingBranch) {
11831
+ if (suspense.isUnmounted || !suspense.pendingBranch) {
11588
11832
  return;
11589
11833
  }
11590
11834
  const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
@@ -11592,7 +11836,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11592
11836
  const anchor2 = next(activeBranch);
11593
11837
  const mountFallback = () => {
11594
11838
  suspense.isFallbackMountPending = false;
11595
- if (!suspense.isInFallback) {
11839
+ if (suspense.isUnmounted || !suspense.isInFallback) {
11596
11840
  return;
11597
11841
  }
11598
11842
  const latestFallback = suspense.vnode.ssFallback;
@@ -11635,25 +11879,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11635
11879
  next() {
11636
11880
  return suspense.activeBranch && next(suspense.activeBranch);
11637
11881
  },
11638
- registerDep(instance, setupRenderEffect, optimized2) {
11882
+ // `namespace` intentionally shadows the boundary's own: the dep must be
11883
+ // mounted with the namespace of the position it was rendered at, which can
11884
+ // differ from the boundary's (e.g. a component nested inside an <svg>).
11885
+ registerDep(instance, setupRenderEffect, optimized2, namespace2) {
11639
11886
  const isInPendingSuspense = !!suspense.pendingBranch;
11640
11887
  if (isInPendingSuspense) {
11641
11888
  suspense.deps++;
11642
11889
  }
11643
11890
  const hydratedEl = instance.vnode.el;
11644
- instance.asyncDep.catch((err) => {
11645
- handleError(err, instance, 0);
11646
- }).then((asyncSetupResult) => {
11647
- if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
11648
- return;
11649
- }
11650
- unsetCurrentInstance();
11651
- if (hydratedEl && !instance.scope.active) {
11652
- if (isInPendingSuspense && --suspense.deps === 0) {
11653
- suspense.resolve();
11654
- }
11655
- return;
11656
- }
11891
+ const render = (asyncSetupResult) => {
11657
11892
  instance.asyncResolved = true;
11658
11893
  const { vnode: vnode2 } = instance;
11659
11894
  {
@@ -11675,7 +11910,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11675
11910
  // consider the comment placeholder case.
11676
11911
  hydratedEl ? null : next(instance.subTree),
11677
11912
  suspense,
11678
- namespace,
11913
+ namespace2,
11679
11914
  optimized2
11680
11915
  );
11681
11916
  if (placeholder) {
@@ -11686,13 +11921,57 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11686
11921
  {
11687
11922
  popWarningContext();
11688
11923
  }
11689
- if (isInPendingSuspense && --suspense.deps === 0) {
11924
+ };
11925
+ instance.asyncDep.catch((err) => {
11926
+ handleError(err, instance, 0, false, true);
11927
+ return () => null;
11928
+ }).then((asyncSetupResult) => {
11929
+ if (instance.isUnmounted || suspense.isUnmounted) {
11930
+ return;
11931
+ }
11932
+ const isPendingDep = isInPendingSuspense && suspense.pendingId === instance.suspenseId;
11933
+ unsetCurrentInstance();
11934
+ if (!instance.scope.active) {
11935
+ if (isPendingDep && --suspense.deps === 0) {
11936
+ suspense.resolve();
11937
+ }
11938
+ return;
11939
+ }
11940
+ if (!isPendingDep && suspense.pendingBranch) {
11941
+ const job = () => {
11942
+ if (instance.isUnmounted || suspense.isUnmounted || !instance.scope.active) {
11943
+ return;
11944
+ }
11945
+ if (suspense.pendingBranch) {
11946
+ queueEffectWithSuspense(job, suspense);
11947
+ } else {
11948
+ render(asyncSetupResult);
11949
+ }
11950
+ };
11951
+ job.flags = 16 | 32;
11952
+ queueEffectWithSuspense(job, suspense);
11953
+ return;
11954
+ }
11955
+ render(asyncSetupResult);
11956
+ if (isPendingDep && --suspense.deps === 0) {
11690
11957
  suspense.resolve();
11691
11958
  }
11692
11959
  });
11693
11960
  },
11694
11961
  unmount(parentSuspense2, doRemove) {
11695
11962
  suspense.isUnmounted = true;
11963
+ clearTimeout(suspense.timeoutTimer);
11964
+ suspense.timeoutTimer = void 0;
11965
+ if (parentSuspenseId !== void 0) {
11966
+ const parent = suspense.parent;
11967
+ const pendingId = parentSuspenseId;
11968
+ parentSuspenseId = void 0;
11969
+ queuePostFlushCb(() => {
11970
+ if (parent.pendingId === pendingId && !parent.isUnmounted && --parent.deps === 0) {
11971
+ parent.resolve();
11972
+ }
11973
+ });
11974
+ }
11696
11975
  if (suspense.activeBranch) {
11697
11976
  unmount(
11698
11977
  suspense.activeBranch,
@@ -11702,12 +11981,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11702
11981
  );
11703
11982
  }
11704
11983
  if (suspense.pendingBranch) {
11705
- unmount(
11706
- suspense.pendingBranch,
11707
- parentComponent,
11708
- parentSuspense2,
11709
- doRemove
11710
- );
11984
+ unmount(suspense.pendingBranch, parentComponent, suspense, doRemove);
11985
+ discardEffects(suspense);
11711
11986
  }
11712
11987
  }
11713
11988
  };
@@ -11777,6 +12052,16 @@ function normalizeSuspenseSlot(s) {
11777
12052
  }
11778
12053
  return s;
11779
12054
  }
12055
+ function discardEffects(suspense) {
12056
+ const { effects } = suspense;
12057
+ for (let i = 0; i < effects.length; i++) {
12058
+ const effect = effects[i];
12059
+ if (effect.flags & 16) {
12060
+ queuePostFlushCb(effect);
12061
+ }
12062
+ }
12063
+ effects.length = 0;
12064
+ }
11780
12065
  function queueEffectWithSuspense(fn, suspense) {
11781
12066
  if (suspense && suspense.pendingBranch) {
11782
12067
  if (isArray(fn)) {
@@ -12092,7 +12377,8 @@ Component that was made reactive: `,
12092
12377
  }
12093
12378
  function guardReactiveProps(props) {
12094
12379
  if (!props) return null;
12095
- return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
12380
+ if (isProxy(props)) return extend({}, props);
12381
+ return isInternalObject(props) ? extend({}, props[rawAttrsKey] || props) : props;
12096
12382
  }
12097
12383
  function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
12098
12384
  const { props, ref, patchFlag, children, transition } = vnode;
@@ -12274,8 +12560,11 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
12274
12560
  ]);
12275
12561
  }
12276
12562
 
12277
- const emptyAppContext = createAppContext();
12563
+ const emptyAppContext = /* @__PURE__ */ createAppContext();
12278
12564
  let uid = 0;
12565
+ function getNextUid() {
12566
+ return uid;
12567
+ }
12279
12568
  function createComponentInstance(vnode, parent, suspense) {
12280
12569
  const type = vnode.type;
12281
12570
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
@@ -12484,7 +12773,8 @@ function setupStatefulComponent(instance, isSSR) {
12484
12773
  setInSSRSetupState(false);
12485
12774
  }
12486
12775
  }).catch((e) => {
12487
- handleError(e, instance, 0);
12776
+ handleError(e, instance, 0, void 0, true);
12777
+ instance.ssrRender = (_, push) => push("<!---->");
12488
12778
  });
12489
12779
  } else {
12490
12780
  instance.asyncDep = setupResult;
@@ -12604,11 +12894,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
12604
12894
  }
12605
12895
  }
12606
12896
  }
12897
+ const rawAttrsKey = /* @__PURE__ */ Symbol();
12607
12898
  const attrsProxyHandlers = {
12608
12899
  get(target, key) {
12609
12900
  markAttrsAccessed();
12610
12901
  track(target, "get", "");
12611
- return target[key];
12902
+ return key === rawAttrsKey ? target : target[key];
12612
12903
  },
12613
12904
  set() {
12614
12905
  warn$1(`setupContext.attrs is readonly.`);
@@ -12960,7 +13251,7 @@ function isMemoSame(cached, memo) {
12960
13251
  return true;
12961
13252
  }
12962
13253
 
12963
- const version = "3.5.43";
13254
+ const version = "3.5.45";
12964
13255
  const warn = warn$1 ;
12965
13256
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12966
13257
  const devtools = devtools$1 ;
@@ -13512,7 +13803,9 @@ function patchStyle(el, prev, next) {
13512
13803
  }
13513
13804
  }
13514
13805
  if (vShowOriginalDisplay in el) {
13515
- el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13806
+ if (!isCssString || prev !== next) {
13807
+ el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13808
+ }
13516
13809
  if (el[vShowHidden]) {
13517
13810
  style.display = "none";
13518
13811
  }
@@ -14038,7 +14331,9 @@ class VueElement extends BaseClass {
14038
14331
  "Custom element style injection is not supported when using shadowRoot: false"
14039
14332
  );
14040
14333
  }
14041
- this._mount(def);
14334
+ if (this._connected) {
14335
+ this._mount(def);
14336
+ }
14042
14337
  };
14043
14338
  const asyncDef = this._def.__asyncLoader;
14044
14339
  if (asyncDef) {
@@ -14408,6 +14703,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
14408
14703
  const newPositionMap = /* @__PURE__ */ new WeakMap();
14409
14704
  const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
14410
14705
  const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
14706
+ const pendingGroups = /* @__PURE__ */ new WeakMap();
14411
14707
  const decorate = (t) => {
14412
14708
  delete t.props.mode;
14413
14709
  {
@@ -14426,21 +14722,30 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
14426
14722
  const state = useTransitionState();
14427
14723
  let prevChildren;
14428
14724
  let children;
14429
- onUpdated(() => {
14430
- if (!prevChildren.length) {
14431
- return;
14725
+ let origins;
14726
+ let moves;
14727
+ const willMove = () => {
14728
+ if (moves === void 0) {
14729
+ moves = prevChildren.length > 0 && hasCSSTransform(
14730
+ prevChildren[0].el,
14731
+ instance.vnode.el,
14732
+ resolveMoveClass(props)
14733
+ );
14432
14734
  }
14433
- const moveClass = props.moveClass || `${props.name || "v"}-move`;
14434
- if (!hasCSSTransform(
14435
- prevChildren[0].el,
14436
- instance.vnode.el,
14437
- moveClass
14438
- )) {
14735
+ return moves;
14736
+ };
14737
+ onUpdated(() => {
14738
+ pendingGroups.delete(instance);
14739
+ if (!willMove()) {
14439
14740
  prevChildren = [];
14741
+ origins = void 0;
14440
14742
  return;
14441
14743
  }
14744
+ const moveClass = resolveMoveClass(props);
14442
14745
  prevChildren.forEach(callPendingCbs);
14443
- prevChildren.forEach(recordPosition);
14746
+ const shift = origins && getOriginShift(origins, instance.vnode.el);
14747
+ origins = void 0;
14748
+ prevChildren.forEach((c) => recordPosition(c, shift));
14444
14749
  const movedChildren = prevChildren.filter(applyTranslation);
14445
14750
  forceReflow(instance.vnode.el);
14446
14751
  movedChildren.forEach((c) => {
@@ -14473,6 +14778,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
14473
14778
  tag = "span";
14474
14779
  }
14475
14780
  prevChildren = [];
14781
+ moves = void 0;
14476
14782
  if (children) {
14477
14783
  for (let i = 0; i < children.length; i++) {
14478
14784
  const child = children[i];
@@ -14504,6 +14810,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
14504
14810
  warn(`<TransitionGroup> children must be keyed.`);
14505
14811
  }
14506
14812
  }
14813
+ if (prevChildren.length) {
14814
+ origins = getOrigins(instance);
14815
+ pendingGroups.set(instance, willMove);
14816
+ }
14507
14817
  return createVNode(tag, null, children);
14508
14818
  };
14509
14819
  }
@@ -14518,8 +14828,11 @@ function callPendingCbs(c) {
14518
14828
  el[enterCbKey]();
14519
14829
  }
14520
14830
  }
14521
- function recordPosition(c) {
14522
- newPositionMap.set(c, getPosition(c.el));
14831
+ function resolveMoveClass(props) {
14832
+ return props.moveClass || `${props.name || "v"}-move`;
14833
+ }
14834
+ function recordPosition(c, shift) {
14835
+ newPositionMap.set(c, getPosition(c.el, shift));
14523
14836
  }
14524
14837
  function applyTranslation(c) {
14525
14838
  const oldPos = positionMap.get(c);
@@ -14543,13 +14856,41 @@ function applyTranslation(c) {
14543
14856
  return c;
14544
14857
  }
14545
14858
  }
14546
- function getPosition(el) {
14859
+ function getPosition(el, shift) {
14547
14860
  const rect = el.getBoundingClientRect();
14548
14861
  return {
14549
- left: rect.left,
14550
- top: rect.top
14862
+ left: rect.left - (shift ? shift.left : 0),
14863
+ top: rect.top - (shift ? shift.top : 0)
14551
14864
  };
14552
14865
  }
14866
+ function getOrigins(instance) {
14867
+ let origins;
14868
+ for (let group = instance.parent; group; group = group.parent) {
14869
+ const willMove = pendingGroups.get(group);
14870
+ if (willMove) {
14871
+ const item = findItem(group.vnode.el, instance.vnode.el);
14872
+ if (item) {
14873
+ (origins || (origins = [])).push(
14874
+ extend(getPosition(item), { item, willMove })
14875
+ );
14876
+ }
14877
+ }
14878
+ }
14879
+ return origins;
14880
+ }
14881
+ function findItem(root, node) {
14882
+ const container = root.nodeType === 1 ? root : root.parentNode;
14883
+ while (node && node.parentNode !== container) {
14884
+ node = node.parentNode;
14885
+ }
14886
+ if (node && node.nodeType === 1) {
14887
+ return node;
14888
+ }
14889
+ }
14890
+ function getOriginShift(origins, root) {
14891
+ const origin = origins.find((o) => o.willMove() && o.item.contains(root));
14892
+ return origin && getPosition(origin.item, origin);
14893
+ }
14553
14894
  function hasCSSTransform(el, root, moveClass) {
14554
14895
  const clone = el.cloneNode();
14555
14896
  const _vtc = el[vtcKey];
@@ -14744,18 +15085,18 @@ const vModelSelect = {
14744
15085
  },
14745
15086
  // set value in mounted & updated because <select> relies on its children
14746
15087
  // <option>s.
14747
- mounted(el, { value }) {
14748
- setSelected(el, value);
15088
+ mounted(el, { value, modifiers: { number } }) {
15089
+ setSelected(el, value, number);
14749
15090
  },
14750
15091
  beforeUpdate(el, { value }, vnode) {
14751
15092
  el._modelValue = value;
14752
15093
  el[assignKey] = getModelAssigner(vnode);
14753
15094
  },
14754
- updated(el, { value }) {
15095
+ updated(el, { value, modifiers: { number } }) {
14755
15096
  const pending = el._pendingValue;
14756
15097
  el._pendingValue = void 0;
14757
15098
  if (!pending || pending[0] !== el.multiple || !isSameSelectValue(value, pending[1], pending[0])) {
14758
- setSelected(el, value);
15099
+ setSelected(el, value, number);
14759
15100
  }
14760
15101
  }
14761
15102
  };
@@ -14771,7 +15112,7 @@ function isSameSelectValue(value, assignedValue, multiple) {
14771
15112
  }
14772
15113
  return false;
14773
15114
  }
14774
- function setSelected(el, value) {
15115
+ function setSelected(el, value, number = false) {
14775
15116
  const isMultiple = el.multiple;
14776
15117
  const isArrayValue = isArray(value);
14777
15118
  if (isMultiple && !isArrayValue && !isSet(value)) {
@@ -14792,7 +15133,7 @@ function setSelected(el, value) {
14792
15133
  option.selected = looseIndexOf(value, optionValue) > -1;
14793
15134
  }
14794
15135
  } else {
14795
- option.selected = value.has(optionValue);
15136
+ option.selected = value.has(optionValue) || number && typeof optionValue === "string" && value.has(looseToNumber(optionValue));
14796
15137
  }
14797
15138
  } else if (looseEqual(getValue(option), value)) {
14798
15139
  if (el.selectedIndex !== i) el.selectedIndex = i;
@@ -16579,7 +16920,8 @@ const errorMessages = {
16579
16920
  [42]: `v-model value must be a valid JavaScript member expression.`,
16580
16921
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
16581
16922
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
16582
- Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
16923
+ Use a v-bind binding combined with a v-on listener that emits update:x event instead.
16924
+ For props declared with defineModel(), assign the returned ref to a variable and use v-model on that variable.`,
16583
16925
  [45]: `v-model cannot be used on a const binding because it is not writable.`,
16584
16926
  [46]: `Error parsing JavaScript expression: `,
16585
16927
  [47]: `<KeepAlive> expects exactly one child component.`,
@@ -17942,7 +18284,11 @@ function getLoc(start, end) {
17942
18284
  };
17943
18285
  }
17944
18286
  function cloneLoc(loc) {
17945
- return getLoc(loc.start.offset, loc.end.offset);
18287
+ return {
18288
+ start: extend({}, loc.start),
18289
+ end: extend({}, loc.end),
18290
+ source: loc.source
18291
+ };
17946
18292
  }
17947
18293
  function setLocEnd(loc, end) {
17948
18294
  loc.end = tokenizer.getPos(end);
@@ -20012,7 +20358,7 @@ const transformFor = createStructuralDirectiveTransform(
20012
20358
  createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
20013
20359
  createCompoundExpression([
20014
20360
  `if (_cached && _cached.el`,
20015
- ...keyExp ? [` && _cached.key === `, keyExp] : [],
20361
+ ...keyExp ? [` && _cached.key === (`, keyExp, `)`] : [],
20016
20362
  ` && ${context.helperString(
20017
20363
  IS_MEMO_SAME
20018
20364
  )}(_cached, _memo)) return _cached`
@@ -22113,7 +22459,8 @@ const transformTransition = (node, context) => {
22113
22459
  if (!node.children.length) {
22114
22460
  return;
22115
22461
  }
22116
- if (hasMultipleChildren(node)) {
22462
+ const multipleChildren = hasMultipleChildren(node);
22463
+ if (multipleChildren) {
22117
22464
  context.onError(
22118
22465
  createDOMCompilerError(
22119
22466
  63,
@@ -22203,7 +22550,7 @@ const stringifyStatic = (children, context, parent) => {
22203
22550
  const child = children[i];
22204
22551
  const isCached = isParentCached || getCachedNode(child);
22205
22552
  if (isCached) {
22206
- const result = analyzeNode(child);
22553
+ const result = analyzeNode(child, context);
22207
22554
  if (result) {
22208
22555
  nc += result[0];
22209
22556
  ec += result[1];
@@ -22230,7 +22577,7 @@ const isStringifiableAttr = (name, ns) => {
22230
22577
  const isNonStringifiable = /* @__PURE__ */ makeMap(
22231
22578
  `caption,thead,tr,th,tbody,td,tfoot,colgroup,col`
22232
22579
  );
22233
- function analyzeNode(node) {
22580
+ function analyzeNode(node, context) {
22234
22581
  if (node.type === 1 && isNonStringifiable(node.tag)) {
22235
22582
  return false;
22236
22583
  }
@@ -22261,6 +22608,9 @@ function analyzeNode(node) {
22261
22608
  if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) {
22262
22609
  return bail();
22263
22610
  }
22611
+ if (p.arg && p.arg.isStatic && (isBooleanAttr(p.arg.content) || p.arg.content === "hidden") && context.isCustomElement(node2.tag)) {
22612
+ return bail();
22613
+ }
22264
22614
  if (isOptionTag && isStaticArgOf(p.arg, "value") && p.exp && !p.exp.isStatic) {
22265
22615
  return bail();
22266
22616
  }
@@ -22308,8 +22658,9 @@ function stringifyNode(node, context) {
22308
22658
  }
22309
22659
  }
22310
22660
  function stringifyElement(node, context) {
22661
+ var _a;
22311
22662
  let res = `<${node.tag}`;
22312
- let innerHTML = "";
22663
+ let innerHTML = void 0;
22313
22664
  for (let i = 0; i < node.props.length; i++) {
22314
22665
  const p = node.props[i];
22315
22666
  if (p.type === 6) {
@@ -22324,13 +22675,10 @@ function stringifyElement(node, context) {
22324
22675
  res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`;
22325
22676
  continue;
22326
22677
  }
22327
- if ((isBooleanAttr(p.arg.content) || p.arg.content === "hidden") && exp.content === "false") {
22328
- continue;
22329
- }
22330
22678
  let evaluated = evaluateConstant(exp);
22331
22679
  if (evaluated != null) {
22332
- const arg = p.arg && p.arg.content;
22333
- if (arg === "hidden" && typeof evaluated === "number" && !includeBooleanAttr(evaluated)) {
22680
+ const arg = p.arg.content;
22681
+ if ((isBooleanAttr(arg) || arg === "hidden") && !includeBooleanAttr(evaluated)) {
22334
22682
  continue;
22335
22683
  }
22336
22684
  if (arg === "class") {
@@ -22343,7 +22691,7 @@ function stringifyElement(node, context) {
22343
22691
  )}"`;
22344
22692
  }
22345
22693
  } else if (p.name === "html") {
22346
- innerHTML = evaluateConstant(p.exp);
22694
+ innerHTML = (_a = evaluateConstant(p.exp)) != null ? _a : "";
22347
22695
  } else if (p.name === "text") {
22348
22696
  innerHTML = escapeHtml(
22349
22697
  toDisplayString(evaluateConstant(p.exp))
@@ -22355,7 +22703,7 @@ function stringifyElement(node, context) {
22355
22703
  res += ` ${context.scopeId}`;
22356
22704
  }
22357
22705
  res += `>`;
22358
- if (innerHTML) {
22706
+ if (innerHTML !== void 0) {
22359
22707
  res += innerHTML;
22360
22708
  } else {
22361
22709
  for (let i = 0; i < node.children.length; i++) {
@@ -22577,7 +22925,8 @@ const validateHtmlNesting = (node, context) => {
22577
22925
 
22578
22926
  const DOMNodeTransforms = [
22579
22927
  transformStyle,
22580
- ...[transformTransition, validateHtmlNesting]
22928
+ transformTransition,
22929
+ ...[validateHtmlNesting]
22581
22930
  ];
22582
22931
  const DOMDirectiveTransforms = {
22583
22932
  cloak: noopDirectiveTransform,