vue 3.5.43 → 3.5.44

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 v3.5.43
2
+ * vue v3.5.44
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -264,7 +264,7 @@ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
264
264
  const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
265
265
  const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
266
266
 
267
- const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
267
+ const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
268
268
  const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
269
269
  const isBooleanAttr = /* @__PURE__ */ makeMap(
270
270
  specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
@@ -1312,19 +1312,41 @@ const arrayInstrumentations = {
1312
1312
  };
1313
1313
  function iterator(self, method, wrapValue) {
1314
1314
  const arr = shallowReadArray(self);
1315
- const iter = arr[method]();
1315
+ const methodFn = arr[method];
1316
+ const iter = methodFn.call(arr);
1316
1317
  if (arr !== self && !isShallow(self)) {
1317
- iter._next = iter.next;
1318
- iter.next = () => {
1319
- const result = iter._next();
1320
- if (!result.done) {
1321
- result.value = wrapValue(result.value);
1318
+ if (iter[Symbol.toStringTag] === "Array Iterator") {
1319
+ const wrapped = Object.create(Object.getPrototypeOf(iter));
1320
+ wrapped.next = () => wrapResult(iter.next(), wrapValue);
1321
+ if (methodFn !== arrayProto[method]) {
1322
+ Object.defineProperties(wrapped, {
1323
+ return: {
1324
+ get() {
1325
+ const fn = iter.return;
1326
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1327
+ }
1328
+ },
1329
+ throw: {
1330
+ get() {
1331
+ const fn = iter.throw;
1332
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1333
+ }
1334
+ }
1335
+ });
1322
1336
  }
1323
- return result;
1324
- };
1337
+ return wrapped;
1338
+ }
1339
+ iter._next = iter.next;
1340
+ iter.next = () => wrapResult(iter._next(), wrapValue);
1325
1341
  }
1326
1342
  return iter;
1327
1343
  }
1344
+ function wrapResult(result, wrapValue) {
1345
+ if (!result.done) {
1346
+ result.value = wrapValue(result.value);
1347
+ }
1348
+ return result;
1349
+ }
1328
1350
  const arrayProto = Array.prototype;
1329
1351
  function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1330
1352
  const arr = shallowReadArray(self);
@@ -1747,6 +1769,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
1747
1769
  return !isReadonly2;
1748
1770
  } else if (key === "__v_isReadonly") {
1749
1771
  return isReadonly2;
1772
+ } else if (key === "__v_isShallow") {
1773
+ return shallow;
1750
1774
  } else if (key === "__v_raw") {
1751
1775
  return target;
1752
1776
  }
@@ -2292,9 +2316,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2292
2316
  if (once && cb) {
2293
2317
  const _cb = cb;
2294
2318
  cb = (...args) => {
2295
- const res = _cb(...args);
2296
- watchHandle();
2297
- return res;
2319
+ try {
2320
+ return _cb(...args);
2321
+ } finally {
2322
+ watchHandle();
2323
+ }
2298
2324
  };
2299
2325
  }
2300
2326
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
@@ -2305,12 +2331,13 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2305
2331
  if (cb) {
2306
2332
  const newValue = effect.run();
2307
2333
  if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
2308
- if (cleanup) {
2309
- cleanup();
2310
- }
2311
2334
  const currentWatcher = activeWatcher;
2312
- activeWatcher = effect;
2335
+ pauseTracking();
2313
2336
  try {
2337
+ if (cleanup) {
2338
+ cleanup();
2339
+ }
2340
+ activeWatcher = effect;
2314
2341
  const args = [
2315
2342
  newValue,
2316
2343
  // pass undefined as the old value when it's changed for the first time
@@ -2324,6 +2351,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2324
2351
  );
2325
2352
  } finally {
2326
2353
  activeWatcher = currentWatcher;
2354
+ resetTracking();
2327
2355
  }
2328
2356
  }
2329
2357
  } else {
@@ -2724,21 +2752,21 @@ function queuePostFlushCb(cb) {
2724
2752
  }
2725
2753
  queueFlush();
2726
2754
  }
2727
- function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2755
+ function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
2728
2756
  {
2729
2757
  seen = seen || /* @__PURE__ */ new Map();
2730
2758
  }
2731
2759
  for (; i < queue.length; i++) {
2732
2760
  const cb = queue[i];
2733
2761
  if (cb && cb.flags & 2) {
2734
- if (instance && cb.id !== instance.uid) {
2762
+ if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
2735
2763
  continue;
2736
2764
  }
2737
2765
  if (checkRecursiveUpdates(seen, cb)) {
2738
2766
  continue;
2739
2767
  }
2740
2768
  queue.splice(i, 1);
2741
- i--;
2769
+ i = instance ? i - 1 : flushIndex;
2742
2770
  if (cb.flags & 4) {
2743
2771
  cb.flags &= -2;
2744
2772
  }
@@ -2749,12 +2777,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2749
2777
  }
2750
2778
  }
2751
2779
  }
2752
- function flushPostFlushCbs(seen) {
2780
+ function flushPostFlushCbs(seen, skip, minUid = 0) {
2753
2781
  if (pendingPostFlushCbs.length) {
2754
- const deduped = [...new Set(pendingPostFlushCbs)].sort(
2755
- (a, b) => getId(a) - getId(b)
2756
- );
2757
- pendingPostFlushCbs.length = 0;
2782
+ let cbs = pendingPostFlushCbs;
2783
+ let kept = 0;
2784
+ if (skip) {
2785
+ cbs = [];
2786
+ for (let i = 0; i < pendingPostFlushCbs.length; i++) {
2787
+ const cb = pendingPostFlushCbs[i];
2788
+ if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
2789
+ pendingPostFlushCbs[kept++] = cb;
2790
+ } else {
2791
+ cbs.push(cb);
2792
+ }
2793
+ }
2794
+ }
2795
+ const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
2796
+ pendingPostFlushCbs.length = kept;
2758
2797
  if (activePostFlushCbs) {
2759
2798
  for (let i = 0; i < deduped.length; i++) {
2760
2799
  activePostFlushCbs.push(deduped[i]);
@@ -2780,6 +2819,22 @@ function flushPostFlushCbs(seen) {
2780
2819
  postFlushIndex = 0;
2781
2820
  }
2782
2821
  }
2822
+ let isFlushing = false;
2823
+ function flushOnAppMount(fn, minUid) {
2824
+ if (isFlushing) {
2825
+ fn();
2826
+ return;
2827
+ }
2828
+ const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
2829
+ fn();
2830
+ isFlushing = true;
2831
+ try {
2832
+ flushPreFlushCbs(void 0, minUid);
2833
+ flushPostFlushCbs(void 0, queued, minUid);
2834
+ } finally {
2835
+ isFlushing = false;
2836
+ }
2837
+ }
2783
2838
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2784
2839
  function flushJobs(seen) {
2785
2840
  {
@@ -3281,6 +3336,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
3281
3336
  let isPre = false;
3282
3337
  if (flush === "post") {
3283
3338
  baseWatchOptions.scheduler = (job) => {
3339
+ job.i = instance;
3284
3340
  queuePostRenderEffect(job, instance && instance.suspense);
3285
3341
  };
3286
3342
  } else if (flush !== "sync") {
@@ -3582,7 +3638,11 @@ const TeleportImpl = {
3582
3638
  };
3583
3639
  function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
3584
3640
  if (moveType === 0) {
3641
+ if (vnode.targetStart) {
3642
+ insert(vnode.targetStart, container, parentAnchor);
3643
+ }
3585
3644
  insert(vnode.targetAnchor, container, parentAnchor);
3645
+ parentAnchor = vnode.targetAnchor;
3586
3646
  }
3587
3647
  const { el, anchor, shapeFlag, children, props } = vnode;
3588
3648
  const isReorder = moveType === 2;
@@ -3751,10 +3811,6 @@ const BaseTransitionPropsValidators = {
3751
3811
  onAfterAppear: TransitionHookValidator,
3752
3812
  onAppearCancelled: TransitionHookValidator
3753
3813
  };
3754
- const recursiveGetSubtree = (instance) => {
3755
- const subTree = instance.subTree;
3756
- return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
3757
- };
3758
3814
  const BaseTransitionImpl = {
3759
3815
  name: `BaseTransition`,
3760
3816
  props: BaseTransitionPropsValidators,
@@ -3795,7 +3851,7 @@ const BaseTransitionImpl = {
3795
3851
  setTransitionHooks(innerChild, enterHooks);
3796
3852
  }
3797
3853
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3798
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
3854
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
3799
3855
  let leavingHooks = resolveTransitionHooks(
3800
3856
  oldInnerChild,
3801
3857
  rawProps,
@@ -3928,8 +3984,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
3928
3984
  );
3929
3985
  }
3930
3986
  const leavingVNode = leavingVNodesCache[key];
3931
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
3932
- leavingVNode.el[leaveCbKey]();
3987
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
3988
+ let leavingCb = leavingVNode.el[leaveCbKey];
3989
+ if (!leavingCb) {
3990
+ const leavingRoot = getTransitionRoot(leavingVNode);
3991
+ leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
3992
+ }
3993
+ if (leavingCb) {
3994
+ leavingCb();
3995
+ }
3933
3996
  }
3934
3997
  callHook(hook, [el]);
3935
3998
  },
@@ -4057,6 +4120,12 @@ function setTransitionHooks(vnode, hooks) {
4057
4120
  vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4058
4121
  } else {
4059
4122
  vnode.transition = hooks;
4123
+ if (vnode.type === Fragment && isArray(vnode.children)) {
4124
+ const child = filterSingleRoot(vnode.children, false);
4125
+ if (child) {
4126
+ setTransitionHooks(child, hooks);
4127
+ }
4128
+ }
4060
4129
  }
4061
4130
  }
4062
4131
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
@@ -4081,6 +4150,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4081
4150
  }
4082
4151
  return ret;
4083
4152
  }
4153
+ function getTransitionRoot(vnode) {
4154
+ if (vnode.component) {
4155
+ return getTransitionRoot(vnode.component.subTree);
4156
+ }
4157
+ if (vnode.type === Fragment) {
4158
+ const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
4159
+ return child ? getTransitionRoot(child) : void 0;
4160
+ }
4161
+ if (vnode.type !== Comment) {
4162
+ return vnode;
4163
+ }
4164
+ }
4084
4165
 
4085
4166
  // @__NO_SIDE_EFFECTS__
4086
4167
  function defineComponent(options, extraOptions) {
@@ -4986,14 +5067,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
4986
5067
  break;
4987
5068
  }
4988
5069
  }, opts);
4989
- forEach((el) => {
4990
- if (!(el instanceof Element)) return;
5070
+ const observe = (el) => {
4991
5071
  if (elementIsVisibleInViewport(el)) {
4992
5072
  hydrate();
4993
5073
  ob.disconnect();
4994
5074
  return false;
4995
5075
  }
5076
+ if (getComputedStyle(el).display === "contents") {
5077
+ for (let i = 0; i < el.children.length; i++) {
5078
+ if (observe(el.children[i]) === false) return false;
5079
+ }
5080
+ }
4996
5081
  ob.observe(el);
5082
+ };
5083
+ forEach((el) => {
5084
+ if (!(el instanceof Element)) return;
5085
+ return observe(el);
4997
5086
  });
4998
5087
  return () => ob.disconnect();
4999
5088
  };
@@ -5350,6 +5439,7 @@ const KeepAliveImpl = {
5350
5439
  unmount(cached);
5351
5440
  } else if (current) {
5352
5441
  resetShapeFlag(current);
5442
+ if (cached) resetShapeFlag(cached);
5353
5443
  }
5354
5444
  cache.delete(key);
5355
5445
  keys.delete(key);
@@ -5641,9 +5731,11 @@ function renderList(source, renderItem, cache, index) {
5641
5731
  }
5642
5732
  } else if (typeof source === "number") {
5643
5733
  if (!Number.isInteger(source) || source < 0) {
5644
- warn$1(
5645
- `The v-for range expects a positive integer value but got ${source}.`
5646
- );
5734
+ {
5735
+ warn$1(
5736
+ `The v-for range expects a positive integer value but got ${source}.`
5737
+ );
5738
+ }
5647
5739
  ret = [];
5648
5740
  } else {
5649
5741
  ret = new Array(source);
@@ -7281,7 +7373,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
7281
7373
  }
7282
7374
  for (let i = 0; i < nextKeys.length; i++) {
7283
7375
  const key = nextKeys[i];
7284
- if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
7376
+ if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
7285
7377
  return true;
7286
7378
  }
7287
7379
  }
@@ -8320,15 +8412,16 @@ function baseCreateRenderer(options, createHydrationFns) {
8320
8412
  for (let i = 0; i < newChildren.length; i++) {
8321
8413
  const oldVNode = oldChildren[i];
8322
8414
  const newVNode = newChildren[i];
8415
+ const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
8323
8416
  const container = (
8324
8417
  // oldVNode may be an errored async setup() component inside Suspense
8325
8418
  // which will not have a mounted element
8326
- oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
8419
+ oldEl && // - In the case of a Fragment, we need to provide the actual parent
8327
8420
  // of the Fragment itself so it can move its children.
8328
8421
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
8329
8422
  // which also requires the correct parent container
8330
8423
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
8331
- oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
8424
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
8332
8425
  // In other cases, the parent container is not actually used so we
8333
8426
  // just pass the block element here to avoid a DOM parentNode call.
8334
8427
  fallbackContainer
@@ -8492,7 +8585,12 @@ function baseCreateRenderer(options, createHydrationFns) {
8492
8585
  }
8493
8586
  if (isHmrUpdating) initialVNode.el = null;
8494
8587
  if (instance.asyncDep) {
8495
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
8588
+ parentSuspense && parentSuspense.registerDep(
8589
+ instance,
8590
+ setupRenderEffect,
8591
+ optimized,
8592
+ namespace
8593
+ );
8496
8594
  if (!initialVNode.el) {
8497
8595
  const placeholder = instance.subTree = createVNode(Comment);
8498
8596
  processCommentNode(null, placeholder, container, anchor);
@@ -8522,6 +8620,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8522
8620
  pushWarningContext(n2);
8523
8621
  }
8524
8622
  n2.el = n1.el;
8623
+ n2.placeholder = n1.placeholder;
8525
8624
  updateComponentPreRender(instance, n2, optimized);
8526
8625
  {
8527
8626
  popWarningContext();
@@ -8533,6 +8632,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8533
8632
  }
8534
8633
  } else {
8535
8634
  n2.el = n1.el;
8635
+ n2.placeholder = n1.placeholder;
8536
8636
  instance.vnode = n2;
8537
8637
  }
8538
8638
  };
@@ -9186,18 +9286,9 @@ function baseCreateRenderer(options, createHydrationFns) {
9186
9286
  };
9187
9287
  const remove = (vnode) => {
9188
9288
  const { type, el, anchor, transition } = vnode;
9189
- if (type === Fragment) {
9190
- if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
9191
- vnode.children.forEach((child) => {
9192
- if (child.type === Comment) {
9193
- hostRemove(child.el);
9194
- } else {
9195
- remove(child);
9196
- }
9197
- });
9198
- } else {
9199
- removeFragment(el, anchor);
9200
- }
9289
+ const isFragment = type === Fragment;
9290
+ if (isFragment && !transition) {
9291
+ removeFragment(el, anchor);
9201
9292
  return;
9202
9293
  }
9203
9294
  if (type === Static) {
@@ -9207,17 +9298,25 @@ function baseCreateRenderer(options, createHydrationFns) {
9207
9298
  }
9208
9299
  return;
9209
9300
  }
9301
+ const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
9210
9302
  const performRemove = () => {
9211
- hostRemove(el);
9303
+ if (isFragment) {
9304
+ if (hostParentNode(el)) {
9305
+ removeFragment(el, anchor);
9306
+ }
9307
+ } else {
9308
+ hostRemove(el);
9309
+ }
9212
9310
  if (transition && !transition.persisted && transition.afterLeave) {
9213
9311
  transition.afterLeave();
9214
9312
  }
9215
9313
  };
9216
- if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
9314
+ if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
9217
9315
  const { leave, delayLeave } = transition;
9218
- const performLeave = () => leave(el, performRemove);
9316
+ const leavingEl = leavingNode.el;
9317
+ const performLeave = () => leave(leavingEl, performRemove);
9219
9318
  if (delayLeave) {
9220
- delayLeave(vnode.el, performRemove, performLeave);
9319
+ delayLeave(leavingEl, performRemove, performLeave);
9221
9320
  } else {
9222
9321
  performLeave();
9223
9322
  }
@@ -9278,32 +9377,26 @@ function baseCreateRenderer(options, createHydrationFns) {
9278
9377
  const teleportEnd = el && el[TeleportEndKey];
9279
9378
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
9280
9379
  };
9281
- let isFlushing = false;
9282
9380
  const render = (vnode, container, namespace) => {
9283
- let instance;
9284
- if (vnode == null) {
9285
- if (container._vnode) {
9286
- unmount(container._vnode, null, null, true);
9287
- instance = container._vnode.component;
9381
+ const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
9382
+ flushOnAppMount(() => {
9383
+ if (vnode == null) {
9384
+ if (container._vnode) {
9385
+ unmount(container._vnode, null, null, true);
9386
+ }
9387
+ } else {
9388
+ patch(
9389
+ container._vnode || null,
9390
+ vnode,
9391
+ container,
9392
+ null,
9393
+ null,
9394
+ null,
9395
+ namespace
9396
+ );
9288
9397
  }
9289
- } else {
9290
- patch(
9291
- container._vnode || null,
9292
- vnode,
9293
- container,
9294
- null,
9295
- null,
9296
- null,
9297
- namespace
9298
- );
9299
- }
9300
- container._vnode = vnode;
9301
- if (!isFlushing) {
9302
- isFlushing = true;
9303
- flushPreFlushCbs(instance);
9304
- flushPostFlushCbs();
9305
- isFlushing = false;
9306
- }
9398
+ container._vnode = vnode;
9399
+ }, minUid);
9307
9400
  };
9308
9401
  const internals = {
9309
9402
  p: patch,
@@ -9891,7 +9984,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9891
9984
  next() {
9892
9985
  return suspense.activeBranch && next(suspense.activeBranch);
9893
9986
  },
9894
- registerDep(instance, setupRenderEffect, optimized2) {
9987
+ // `namespace` intentionally shadows the boundary's own: the dep must be
9988
+ // mounted with the namespace of the position it was rendered at, which can
9989
+ // differ from the boundary's (e.g. a component nested inside an <svg>).
9990
+ registerDep(instance, setupRenderEffect, optimized2, namespace2) {
9895
9991
  const isInPendingSuspense = !!suspense.pendingBranch;
9896
9992
  if (isInPendingSuspense) {
9897
9993
  suspense.deps++;
@@ -9904,7 +10000,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9904
10000
  return;
9905
10001
  }
9906
10002
  unsetCurrentInstance();
9907
- if (hydratedEl && !instance.scope.active) {
10003
+ if (!instance.scope.active) {
9908
10004
  if (isInPendingSuspense && --suspense.deps === 0) {
9909
10005
  suspense.resolve();
9910
10006
  }
@@ -9931,7 +10027,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
9931
10027
  // consider the comment placeholder case.
9932
10028
  hydratedEl ? null : next(instance.subTree),
9933
10029
  suspense,
9934
- namespace,
10030
+ namespace2,
9935
10031
  optimized2
9936
10032
  );
9937
10033
  if (placeholder) {
@@ -10465,6 +10561,9 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
10465
10561
 
10466
10562
  const emptyAppContext = createAppContext();
10467
10563
  let uid = 0;
10564
+ function getNextUid() {
10565
+ return uid;
10566
+ }
10468
10567
  function createComponentInstance(vnode, parent, suspense) {
10469
10568
  const type = vnode.type;
10470
10569
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
@@ -11137,7 +11236,7 @@ function isMemoSame(cached, memo) {
11137
11236
  return true;
11138
11237
  }
11139
11238
 
11140
- const version = "3.5.43";
11239
+ const version = "3.5.44";
11141
11240
  const warn = warn$1 ;
11142
11241
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11143
11242
  const devtools = devtools$1 ;
@@ -11713,7 +11812,9 @@ function patchStyle(el, prev, next) {
11713
11812
  }
11714
11813
  }
11715
11814
  if (vShowOriginalDisplay in el) {
11716
- el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
11815
+ if (!isCssString || prev !== next) {
11816
+ el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
11817
+ }
11717
11818
  if (el[vShowHidden]) {
11718
11819
  style.display = "none";
11719
11820
  }
@@ -12195,7 +12296,9 @@ class VueElement extends BaseClass {
12195
12296
  "Custom element style injection is not supported when using shadowRoot: false"
12196
12297
  );
12197
12298
  }
12198
- this._mount(def);
12299
+ if (this._connected) {
12300
+ this._mount(def);
12301
+ }
12199
12302
  };
12200
12303
  const asyncDef = this._def.__asyncLoader;
12201
12304
  if (asyncDef) {
@@ -12565,6 +12668,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
12565
12668
  const newPositionMap = /* @__PURE__ */ new WeakMap();
12566
12669
  const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
12567
12670
  const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
12671
+ const pendingGroups = /* @__PURE__ */ new WeakMap();
12568
12672
  const decorate = (t) => {
12569
12673
  delete t.props.mode;
12570
12674
  return t;
@@ -12580,21 +12684,30 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
12580
12684
  const state = useTransitionState();
12581
12685
  let prevChildren;
12582
12686
  let children;
12583
- onUpdated(() => {
12584
- if (!prevChildren.length) {
12585
- return;
12687
+ let origins;
12688
+ let moves;
12689
+ const willMove = () => {
12690
+ if (moves === void 0) {
12691
+ moves = prevChildren.length > 0 && hasCSSTransform(
12692
+ prevChildren[0].el,
12693
+ instance.vnode.el,
12694
+ resolveMoveClass(props)
12695
+ );
12586
12696
  }
12587
- const moveClass = props.moveClass || `${props.name || "v"}-move`;
12588
- if (!hasCSSTransform(
12589
- prevChildren[0].el,
12590
- instance.vnode.el,
12591
- moveClass
12592
- )) {
12697
+ return moves;
12698
+ };
12699
+ onUpdated(() => {
12700
+ pendingGroups.delete(instance);
12701
+ if (!willMove()) {
12593
12702
  prevChildren = [];
12703
+ origins = void 0;
12594
12704
  return;
12595
12705
  }
12706
+ const moveClass = resolveMoveClass(props);
12596
12707
  prevChildren.forEach(callPendingCbs);
12597
- prevChildren.forEach(recordPosition);
12708
+ const shift = origins && getOriginShift(origins, instance.vnode.el);
12709
+ origins = void 0;
12710
+ prevChildren.forEach((c) => recordPosition(c, shift));
12598
12711
  const movedChildren = prevChildren.filter(applyTranslation);
12599
12712
  forceReflow(instance.vnode.el);
12600
12713
  movedChildren.forEach((c) => {
@@ -12621,6 +12734,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
12621
12734
  const cssTransitionProps = resolveTransitionProps(rawProps);
12622
12735
  let tag = rawProps.tag || Fragment;
12623
12736
  prevChildren = [];
12737
+ moves = void 0;
12624
12738
  if (children) {
12625
12739
  for (let i = 0; i < children.length; i++) {
12626
12740
  const child = children[i];
@@ -12652,6 +12766,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
12652
12766
  warn(`<TransitionGroup> children must be keyed.`);
12653
12767
  }
12654
12768
  }
12769
+ if (prevChildren.length) {
12770
+ origins = getOrigins(instance);
12771
+ pendingGroups.set(instance, willMove);
12772
+ }
12655
12773
  return createVNode(tag, null, children);
12656
12774
  };
12657
12775
  }
@@ -12666,8 +12784,11 @@ function callPendingCbs(c) {
12666
12784
  el[enterCbKey]();
12667
12785
  }
12668
12786
  }
12669
- function recordPosition(c) {
12670
- newPositionMap.set(c, getPosition(c.el));
12787
+ function resolveMoveClass(props) {
12788
+ return props.moveClass || `${props.name || "v"}-move`;
12789
+ }
12790
+ function recordPosition(c, shift) {
12791
+ newPositionMap.set(c, getPosition(c.el, shift));
12671
12792
  }
12672
12793
  function applyTranslation(c) {
12673
12794
  const oldPos = positionMap.get(c);
@@ -12691,13 +12812,41 @@ function applyTranslation(c) {
12691
12812
  return c;
12692
12813
  }
12693
12814
  }
12694
- function getPosition(el) {
12815
+ function getPosition(el, shift) {
12695
12816
  const rect = el.getBoundingClientRect();
12696
12817
  return {
12697
- left: rect.left,
12698
- top: rect.top
12818
+ left: rect.left - (shift ? shift.left : 0),
12819
+ top: rect.top - (shift ? shift.top : 0)
12699
12820
  };
12700
12821
  }
12822
+ function getOrigins(instance) {
12823
+ let origins;
12824
+ for (let group = instance.parent; group; group = group.parent) {
12825
+ const willMove = pendingGroups.get(group);
12826
+ if (willMove) {
12827
+ const item = findItem(group.vnode.el, instance.vnode.el);
12828
+ if (item) {
12829
+ (origins || (origins = [])).push(
12830
+ extend(getPosition(item), { item, willMove })
12831
+ );
12832
+ }
12833
+ }
12834
+ }
12835
+ return origins;
12836
+ }
12837
+ function findItem(root, node) {
12838
+ const container = root.nodeType === 1 ? root : root.parentNode;
12839
+ while (node && node.parentNode !== container) {
12840
+ node = node.parentNode;
12841
+ }
12842
+ if (node && node.nodeType === 1) {
12843
+ return node;
12844
+ }
12845
+ }
12846
+ function getOriginShift(origins, root) {
12847
+ const origin = origins.find((o) => o.willMove() && o.item.contains(root));
12848
+ return origin && getPosition(origin.item, origin);
12849
+ }
12701
12850
  function hasCSSTransform(el, root, moveClass) {
12702
12851
  const clone = el.cloneNode();
12703
12852
  const _vtc = el[vtcKey];
@@ -14545,7 +14694,8 @@ const errorMessages = {
14545
14694
  [42]: `v-model value must be a valid JavaScript member expression.`,
14546
14695
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
14547
14696
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
14548
- Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
14697
+ Use a v-bind binding combined with a v-on listener that emits update:x event instead.
14698
+ For props declared with defineModel(), assign the returned ref to a variable and use v-model on that variable.`,
14549
14699
  [45]: `v-model cannot be used on a const binding because it is not writable.`,
14550
14700
  [46]: `Error parsing JavaScript expression: `,
14551
14701
  [47]: `<KeepAlive> expects exactly one child component.`,
@@ -17039,7 +17189,7 @@ const transformFor = createStructuralDirectiveTransform(
17039
17189
  createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
17040
17190
  createCompoundExpression([
17041
17191
  `if (_cached && _cached.el`,
17042
- ...keyExp ? [` && _cached.key === `, keyExp] : [],
17192
+ ...keyExp ? [` && _cached.key === (`, keyExp, `)`] : [],
17043
17193
  ` && ${context.helperString(
17044
17194
  IS_MEMO_SAME
17045
17195
  )}(_cached, _memo)) return _cached`
@@ -18780,7 +18930,8 @@ const transformTransition = (node, context) => {
18780
18930
  if (!node.children.length) {
18781
18931
  return;
18782
18932
  }
18783
- if (hasMultipleChildren(node)) {
18933
+ const multipleChildren = hasMultipleChildren(node);
18934
+ if (multipleChildren) {
18784
18935
  context.onError(
18785
18936
  createDOMCompilerError(
18786
18937
  63,
@@ -19007,7 +19158,8 @@ const validateHtmlNesting = (node, context) => {
19007
19158
 
19008
19159
  const DOMNodeTransforms = [
19009
19160
  transformStyle,
19010
- ...[transformTransition, validateHtmlNesting]
19161
+ transformTransition,
19162
+ ...[validateHtmlNesting]
19011
19163
  ];
19012
19164
  const DOMDirectiveTransforms = {
19013
19165
  cloak: noopDirectiveTransform,