@vue/compat 3.5.42 → 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/compat v3.5.42
2
+ * @vue/compat v3.5.44
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -199,10 +199,10 @@ function normalizeStyle(value) {
199
199
  }
200
200
  const listDelimiterRE = /;(?![^(]*\))/g;
201
201
  const propertyDelimiterRE = /:([^]+)/;
202
- const styleCommentRE = /\/\*[^]*?\*\//g;
202
+ const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
203
203
  function parseStringStyle(cssText) {
204
204
  const ret = {};
205
- cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
205
+ cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
206
206
  if (item) {
207
207
  const tmp = item.split(propertyDelimiterRE);
208
208
  tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
@@ -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`
@@ -294,22 +294,22 @@ function getEscapedCssVarName(key, doubleEscape) {
294
294
  );
295
295
  }
296
296
 
297
- function looseCompareArrays(a, b) {
297
+ function looseCompareArrays(a, b, seen) {
298
298
  if (a.length !== b.length) return false;
299
299
  let equal = true;
300
300
  for (let i = 0; equal && i < a.length; i++) {
301
- equal = looseEqual(a[i], b[i]);
301
+ equal = looseEqual(a[i], b[i], seen);
302
302
  }
303
303
  return equal;
304
304
  }
305
- function looseCompareCollections(a, b) {
305
+ function looseCompareCollections(a, b, seen) {
306
306
  if (a.size !== b.size) return false;
307
307
  const candidates = Array.from(b);
308
308
  const matched = new Uint8Array(candidates.length);
309
309
  for (const item of a) {
310
310
  let index = -1;
311
311
  for (let i = 0; i < candidates.length; i++) {
312
- if (!matched[i] && looseEqual(item, candidates[i])) {
312
+ if (!matched[i] && looseEqual(item, candidates[i], seen)) {
313
313
  index = i;
314
314
  break;
315
315
  }
@@ -319,7 +319,47 @@ function looseCompareCollections(a, b) {
319
319
  }
320
320
  return true;
321
321
  }
322
- function looseEqual(a, b) {
322
+ function looseCompareObjects(a, b, seen) {
323
+ let aValidType = isMap(a);
324
+ let bValidType = isMap(b);
325
+ if (aValidType || bValidType) {
326
+ return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
327
+ }
328
+ aValidType = isSet(a);
329
+ bValidType = isSet(b);
330
+ if (aValidType || bValidType) {
331
+ return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
332
+ }
333
+ const aKeysCount = Object.keys(a).length;
334
+ const bKeysCount = Object.keys(b).length;
335
+ if (aKeysCount !== bKeysCount) {
336
+ return false;
337
+ }
338
+ for (const key in a) {
339
+ const aHasKey = a.hasOwnProperty(key);
340
+ const bHasKey = b.hasOwnProperty(key);
341
+ if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) {
342
+ return false;
343
+ }
344
+ }
345
+ return String(a) === String(b);
346
+ }
347
+ function looseCompareNested(a, b, seen, compare) {
348
+ if (!seen) {
349
+ seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
350
+ }
351
+ const [seenA, seenB] = seen;
352
+ if (seenA.has(a) || seenB.has(b)) {
353
+ return seenA.get(a) === b && seenB.get(b) === a;
354
+ }
355
+ seenA.set(a, b);
356
+ seenB.set(b, a);
357
+ const equal = compare(a, b, seen);
358
+ seenA.delete(a);
359
+ seenB.delete(b);
360
+ return equal;
361
+ }
362
+ function looseEqual(a, b, seen) {
323
363
  if (a === b) return true;
324
364
  let aValidType = isDate(a);
325
365
  let bValidType = isDate(b);
@@ -334,7 +374,7 @@ function looseEqual(a, b) {
334
374
  aValidType = isArray(a);
335
375
  bValidType = isArray(b);
336
376
  if (aValidType || bValidType) {
337
- return aValidType && bValidType ? looseCompareArrays(a, b) : false;
377
+ return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
338
378
  }
339
379
  aValidType = isObject(a);
340
380
  bValidType = isObject(b);
@@ -342,28 +382,7 @@ function looseEqual(a, b) {
342
382
  if (!aValidType || !bValidType) {
343
383
  return false;
344
384
  }
345
- aValidType = isMap(a);
346
- bValidType = isMap(b);
347
- if (aValidType || bValidType) {
348
- return aValidType && bValidType ? looseCompareCollections(a, b) : false;
349
- }
350
- aValidType = isSet(a);
351
- bValidType = isSet(b);
352
- if (aValidType || bValidType) {
353
- return aValidType && bValidType ? looseCompareCollections(a, b) : false;
354
- }
355
- const aKeysCount = Object.keys(a).length;
356
- const bKeysCount = Object.keys(b).length;
357
- if (aKeysCount !== bKeysCount) {
358
- return false;
359
- }
360
- for (const key in a) {
361
- const aHasKey = a.hasOwnProperty(key);
362
- const bHasKey = b.hasOwnProperty(key);
363
- if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
364
- return false;
365
- }
366
- }
385
+ return looseCompareNested(a, b, seen, looseCompareObjects);
367
386
  }
368
387
  return String(a) === String(b);
369
388
  }
@@ -1164,7 +1183,9 @@ function reactiveReadArray(array) {
1164
1183
  const raw = toRaw(array);
1165
1184
  if (raw === array) return raw;
1166
1185
  track(raw, "iterate", ARRAY_ITERATE_KEY);
1167
- return isShallow(array) ? raw : raw.map(toReactive);
1186
+ if (isShallow(array)) return raw;
1187
+ if (!isReadonly(array)) return raw.map(toReactive);
1188
+ return isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
1168
1189
  }
1169
1190
  function shallowReadArray(arr) {
1170
1191
  track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
@@ -1291,19 +1312,41 @@ const arrayInstrumentations = {
1291
1312
  };
1292
1313
  function iterator(self, method, wrapValue) {
1293
1314
  const arr = shallowReadArray(self);
1294
- const iter = arr[method]();
1315
+ const methodFn = arr[method];
1316
+ const iter = methodFn.call(arr);
1295
1317
  if (arr !== self && !isShallow(self)) {
1296
- iter._next = iter.next;
1297
- iter.next = () => {
1298
- const result = iter._next();
1299
- if (!result.done) {
1300
- 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
+ });
1301
1336
  }
1302
- return result;
1303
- };
1337
+ return wrapped;
1338
+ }
1339
+ iter._next = iter.next;
1340
+ iter.next = () => wrapResult(iter._next(), wrapValue);
1304
1341
  }
1305
1342
  return iter;
1306
1343
  }
1344
+ function wrapResult(result, wrapValue) {
1345
+ if (!result.done) {
1346
+ result.value = wrapValue(result.value);
1347
+ }
1348
+ return result;
1349
+ }
1307
1350
  const arrayProto = Array.prototype;
1308
1351
  function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1309
1352
  const arr = shallowReadArray(self);
@@ -1726,6 +1769,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
1726
1769
  return !isReadonly2;
1727
1770
  } else if (key === "__v_isReadonly") {
1728
1771
  return isReadonly2;
1772
+ } else if (key === "__v_isShallow") {
1773
+ return shallow;
1729
1774
  } else if (key === "__v_raw") {
1730
1775
  return target;
1731
1776
  }
@@ -2271,9 +2316,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2271
2316
  if (once && cb) {
2272
2317
  const _cb = cb;
2273
2318
  cb = (...args) => {
2274
- const res = _cb(...args);
2275
- watchHandle();
2276
- return res;
2319
+ try {
2320
+ return _cb(...args);
2321
+ } finally {
2322
+ watchHandle();
2323
+ }
2277
2324
  };
2278
2325
  }
2279
2326
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
@@ -2284,12 +2331,13 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2284
2331
  if (cb) {
2285
2332
  const newValue = effect.run();
2286
2333
  if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
2287
- if (cleanup) {
2288
- cleanup();
2289
- }
2290
2334
  const currentWatcher = activeWatcher;
2291
- activeWatcher = effect;
2335
+ pauseTracking();
2292
2336
  try {
2337
+ if (cleanup) {
2338
+ cleanup();
2339
+ }
2340
+ activeWatcher = effect;
2293
2341
  const args = [
2294
2342
  newValue,
2295
2343
  // pass undefined as the old value when it's changed for the first time
@@ -2303,6 +2351,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2303
2351
  );
2304
2352
  } finally {
2305
2353
  activeWatcher = currentWatcher;
2354
+ resetTracking();
2306
2355
  }
2307
2356
  }
2308
2357
  } else {
@@ -2703,21 +2752,21 @@ function queuePostFlushCb(cb) {
2703
2752
  }
2704
2753
  queueFlush();
2705
2754
  }
2706
- function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2755
+ function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
2707
2756
  {
2708
2757
  seen = seen || /* @__PURE__ */ new Map();
2709
2758
  }
2710
2759
  for (; i < queue.length; i++) {
2711
2760
  const cb = queue[i];
2712
2761
  if (cb && cb.flags & 2) {
2713
- if (instance && cb.id !== instance.uid) {
2762
+ if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
2714
2763
  continue;
2715
2764
  }
2716
2765
  if (checkRecursiveUpdates(seen, cb)) {
2717
2766
  continue;
2718
2767
  }
2719
2768
  queue.splice(i, 1);
2720
- i--;
2769
+ i = instance ? i - 1 : flushIndex;
2721
2770
  if (cb.flags & 4) {
2722
2771
  cb.flags &= -2;
2723
2772
  }
@@ -2728,12 +2777,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2728
2777
  }
2729
2778
  }
2730
2779
  }
2731
- function flushPostFlushCbs(seen) {
2780
+ function flushPostFlushCbs(seen, skip, minUid = 0) {
2732
2781
  if (pendingPostFlushCbs.length) {
2733
- const deduped = [...new Set(pendingPostFlushCbs)].sort(
2734
- (a, b) => getId(a) - getId(b)
2735
- );
2736
- 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;
2737
2797
  if (activePostFlushCbs) {
2738
2798
  for (let i = 0; i < deduped.length; i++) {
2739
2799
  activePostFlushCbs.push(deduped[i]);
@@ -2759,6 +2819,22 @@ function flushPostFlushCbs(seen) {
2759
2819
  postFlushIndex = 0;
2760
2820
  }
2761
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
+ }
2762
2838
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2763
2839
  function flushJobs(seen) {
2764
2840
  {
@@ -3729,6 +3805,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
3729
3805
  let isPre = false;
3730
3806
  if (flush === "post") {
3731
3807
  baseWatchOptions.scheduler = (job) => {
3808
+ job.i = instance;
3732
3809
  queuePostRenderEffect(job, instance && instance.suspense);
3733
3810
  };
3734
3811
  } else if (flush !== "sync") {
@@ -4030,7 +4107,11 @@ const TeleportImpl = {
4030
4107
  };
4031
4108
  function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
4032
4109
  if (moveType === 0) {
4110
+ if (vnode.targetStart) {
4111
+ insert(vnode.targetStart, container, parentAnchor);
4112
+ }
4033
4113
  insert(vnode.targetAnchor, container, parentAnchor);
4114
+ parentAnchor = vnode.targetAnchor;
4034
4115
  }
4035
4116
  const { el, anchor, shapeFlag, children, props } = vnode;
4036
4117
  const isReorder = moveType === 2;
@@ -4199,10 +4280,6 @@ const BaseTransitionPropsValidators = {
4199
4280
  onAfterAppear: TransitionHookValidator,
4200
4281
  onAppearCancelled: TransitionHookValidator
4201
4282
  };
4202
- const recursiveGetSubtree = (instance) => {
4203
- const subTree = instance.subTree;
4204
- return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
4205
- };
4206
4283
  const BaseTransitionImpl = {
4207
4284
  name: `BaseTransition`,
4208
4285
  props: BaseTransitionPropsValidators,
@@ -4243,7 +4320,7 @@ const BaseTransitionImpl = {
4243
4320
  setTransitionHooks(innerChild, enterHooks);
4244
4321
  }
4245
4322
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
4246
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
4323
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
4247
4324
  let leavingHooks = resolveTransitionHooks(
4248
4325
  oldInnerChild,
4249
4326
  rawProps,
@@ -4379,8 +4456,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
4379
4456
  );
4380
4457
  }
4381
4458
  const leavingVNode = leavingVNodesCache[key];
4382
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
4383
- leavingVNode.el[leaveCbKey]();
4459
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
4460
+ let leavingCb = leavingVNode.el[leaveCbKey];
4461
+ if (!leavingCb) {
4462
+ const leavingRoot = getTransitionRoot(leavingVNode);
4463
+ leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
4464
+ }
4465
+ if (leavingCb) {
4466
+ leavingCb();
4467
+ }
4384
4468
  }
4385
4469
  callHook(hook, [el]);
4386
4470
  },
@@ -4508,6 +4592,12 @@ function setTransitionHooks(vnode, hooks) {
4508
4592
  vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4509
4593
  } else {
4510
4594
  vnode.transition = hooks;
4595
+ if (vnode.type === Fragment && isArray(vnode.children)) {
4596
+ const child = filterSingleRoot(vnode.children, false);
4597
+ if (child) {
4598
+ setTransitionHooks(child, hooks);
4599
+ }
4600
+ }
4511
4601
  }
4512
4602
  }
4513
4603
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
@@ -4532,6 +4622,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4532
4622
  }
4533
4623
  return ret;
4534
4624
  }
4625
+ function getTransitionRoot(vnode) {
4626
+ if (vnode.component) {
4627
+ return getTransitionRoot(vnode.component.subTree);
4628
+ }
4629
+ if (vnode.type === Fragment) {
4630
+ const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
4631
+ return child ? getTransitionRoot(child) : void 0;
4632
+ }
4633
+ if (vnode.type !== Comment) {
4634
+ return vnode;
4635
+ }
4636
+ }
4535
4637
 
4536
4638
  // @__NO_SIDE_EFFECTS__
4537
4639
  function defineComponent(options, extraOptions) {
@@ -4905,13 +5007,15 @@ function createHydrationFunctions(rendererInternals) {
4905
5007
  getContainerType(container),
4906
5008
  optimized
4907
5009
  );
4908
- if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
5010
+ if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
4909
5011
  let subTree;
4910
5012
  if (isFragmentStart) {
4911
5013
  subTree = createVNode(Static);
4912
5014
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
4913
5015
  } else {
4914
- subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
5016
+ subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
5017
+ node.nodeType === 8 ? Comment : "div"
5018
+ );
4915
5019
  }
4916
5020
  subTree.el = node;
4917
5021
  vnode.component.subTree = subTree;
@@ -5435,14 +5539,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
5435
5539
  break;
5436
5540
  }
5437
5541
  }, opts);
5438
- forEach((el) => {
5439
- if (!(el instanceof Element)) return;
5542
+ const observe = (el) => {
5440
5543
  if (elementIsVisibleInViewport(el)) {
5441
5544
  hydrate();
5442
5545
  ob.disconnect();
5443
5546
  return false;
5444
5547
  }
5548
+ if (getComputedStyle(el).display === "contents") {
5549
+ for (let i = 0; i < el.children.length; i++) {
5550
+ if (observe(el.children[i]) === false) return false;
5551
+ }
5552
+ }
5445
5553
  ob.observe(el);
5554
+ };
5555
+ forEach((el) => {
5556
+ if (!(el instanceof Element)) return;
5557
+ return observe(el);
5446
5558
  });
5447
5559
  return () => ob.disconnect();
5448
5560
  };
@@ -5799,6 +5911,7 @@ const KeepAliveImpl = {
5799
5911
  unmount(cached);
5800
5912
  } else if (current) {
5801
5913
  resetShapeFlag(current);
5914
+ if (cached) resetShapeFlag(cached);
5802
5915
  }
5803
5916
  cache.delete(key);
5804
5917
  keys.delete(key);
@@ -6381,9 +6494,11 @@ function renderList(source, renderItem, cache, index) {
6381
6494
  }
6382
6495
  } else if (typeof source === "number") {
6383
6496
  if (!Number.isInteger(source) || source < 0) {
6384
- warn$1(
6385
- `The v-for range expects a positive integer value but got ${source}.`
6386
- );
6497
+ {
6498
+ warn$1(
6499
+ `The v-for range expects a positive integer value but got ${source}.`
6500
+ );
6501
+ }
6387
6502
  ret = [];
6388
6503
  } else {
6389
6504
  ret = new Array(source);
@@ -6702,6 +6817,7 @@ function installCompatInstanceProperties(map) {
6702
6817
  $vnode: (i) => i.vnode,
6703
6818
  // some private properties that are likely accessed...
6704
6819
  _self: (i) => i.proxy,
6820
+ _setupProxy: (i) => i.setupState,
6705
6821
  _uid: (i) => i.uid,
6706
6822
  _data: (i) => i.data,
6707
6823
  _isMounted: (i) => i.isMounted,
@@ -7689,7 +7805,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7689
7805
  return vm;
7690
7806
  }
7691
7807
  }
7692
- Vue.version = `2.6.14-compat:${"3.5.42"}`;
7808
+ Vue.version = `2.6.14-compat:${"3.5.44"}`;
7693
7809
  Vue.config = singletonApp.config;
7694
7810
  Vue.use = (plugin, ...options) => {
7695
7811
  if (plugin && isFunction(plugin.install)) {
@@ -8846,7 +8962,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
8846
8962
  }
8847
8963
  for (let i = 0; i < nextKeys.length; i++) {
8848
8964
  const key = nextKeys[i];
8849
- if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8965
+ if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8850
8966
  return true;
8851
8967
  }
8852
8968
  }
@@ -9545,6 +9661,12 @@ function baseCreateRenderer(options, createHydrationFns) {
9545
9661
  optimized = false;
9546
9662
  n2.dynamicChildren = null;
9547
9663
  }
9664
+ if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
9665
+ if (n2.dynamicChildren === EMPTY_ARR) {
9666
+ n2.dynamicChildren = [];
9667
+ }
9668
+ n2.dynamicChildren.hasOnce = true;
9669
+ }
9548
9670
  const { type, ref, shapeFlag } = n2;
9549
9671
  switch (type) {
9550
9672
  case Text:
@@ -9951,15 +10073,16 @@ function baseCreateRenderer(options, createHydrationFns) {
9951
10073
  for (let i = 0; i < newChildren.length; i++) {
9952
10074
  const oldVNode = oldChildren[i];
9953
10075
  const newVNode = newChildren[i];
10076
+ const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
9954
10077
  const container = (
9955
10078
  // oldVNode may be an errored async setup() component inside Suspense
9956
10079
  // which will not have a mounted element
9957
- oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
10080
+ oldEl && // - In the case of a Fragment, we need to provide the actual parent
9958
10081
  // of the Fragment itself so it can move its children.
9959
10082
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
9960
10083
  // which also requires the correct parent container
9961
10084
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
9962
- oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
10085
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
9963
10086
  // In other cases, the parent container is not actually used so we
9964
10087
  // just pass the block element here to avoid a DOM parentNode call.
9965
10088
  fallbackContainer
@@ -10124,7 +10247,12 @@ function baseCreateRenderer(options, createHydrationFns) {
10124
10247
  }
10125
10248
  if (isHmrUpdating) initialVNode.el = null;
10126
10249
  if (instance.asyncDep) {
10127
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
10250
+ parentSuspense && parentSuspense.registerDep(
10251
+ instance,
10252
+ setupRenderEffect,
10253
+ optimized,
10254
+ namespace
10255
+ );
10128
10256
  if (!initialVNode.el) {
10129
10257
  const placeholder = instance.subTree = createVNode(Comment);
10130
10258
  processCommentNode(null, placeholder, container, anchor);
@@ -10153,6 +10281,8 @@ function baseCreateRenderer(options, createHydrationFns) {
10153
10281
  {
10154
10282
  pushWarningContext(n2);
10155
10283
  }
10284
+ n2.el = n1.el;
10285
+ n2.placeholder = n1.placeholder;
10156
10286
  updateComponentPreRender(instance, n2, optimized);
10157
10287
  {
10158
10288
  popWarningContext();
@@ -10164,6 +10294,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10164
10294
  }
10165
10295
  } else {
10166
10296
  n2.el = n1.el;
10297
+ n2.placeholder = n1.placeholder;
10167
10298
  instance.vnode = n2;
10168
10299
  }
10169
10300
  };
@@ -10768,7 +10899,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10768
10899
  cacheIndex,
10769
10900
  memo
10770
10901
  } = vnode;
10771
- if (patchFlag === -2) {
10902
+ if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
10772
10903
  optimized = false;
10773
10904
  }
10774
10905
  if (ref != null) {
@@ -10776,7 +10907,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10776
10907
  setRef(ref, null, parentSuspense, vnode, true);
10777
10908
  resetTracking();
10778
10909
  }
10779
- if (cacheIndex != null) {
10910
+ if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
10780
10911
  parentComponent.renderCache[cacheIndex] = void 0;
10781
10912
  }
10782
10913
  if (shapeFlag & 256) {
@@ -10841,35 +10972,37 @@ function baseCreateRenderer(options, createHydrationFns) {
10841
10972
  };
10842
10973
  const remove = (vnode) => {
10843
10974
  const { type, el, anchor, transition } = vnode;
10844
- if (type === Fragment) {
10845
- if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
10846
- vnode.children.forEach((child) => {
10847
- if (child.type === Comment) {
10848
- hostRemove(child.el);
10849
- } else {
10850
- remove(child);
10851
- }
10852
- });
10853
- } else {
10854
- removeFragment(el, anchor);
10855
- }
10975
+ const isFragment = type === Fragment;
10976
+ if (isFragment && !transition) {
10977
+ removeFragment(el, anchor);
10856
10978
  return;
10857
10979
  }
10858
10980
  if (type === Static) {
10859
10981
  removeStaticNode(vnode);
10982
+ if (transition && !transition.persisted && transition.afterLeave) {
10983
+ transition.afterLeave();
10984
+ }
10860
10985
  return;
10861
10986
  }
10987
+ const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
10862
10988
  const performRemove = () => {
10863
- hostRemove(el);
10989
+ if (isFragment) {
10990
+ if (hostParentNode(el)) {
10991
+ removeFragment(el, anchor);
10992
+ }
10993
+ } else {
10994
+ hostRemove(el);
10995
+ }
10864
10996
  if (transition && !transition.persisted && transition.afterLeave) {
10865
10997
  transition.afterLeave();
10866
10998
  }
10867
10999
  };
10868
- if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
11000
+ if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
10869
11001
  const { leave, delayLeave } = transition;
10870
- const performLeave = () => leave(el, performRemove);
11002
+ const leavingEl = leavingNode.el;
11003
+ const performLeave = () => leave(leavingEl, performRemove);
10871
11004
  if (delayLeave) {
10872
- delayLeave(vnode.el, performRemove, performLeave);
11005
+ delayLeave(leavingEl, performRemove, performLeave);
10873
11006
  } else {
10874
11007
  performLeave();
10875
11008
  }
@@ -10903,6 +11036,9 @@ function baseCreateRenderer(options, createHydrationFns) {
10903
11036
  if (job) {
10904
11037
  job.flags |= 8;
10905
11038
  unmount(subTree, instance, parentSuspense, doRemove);
11039
+ } else if (instance.vnode.el && subTree) {
11040
+ subTree.transition = instance.vnode.transition;
11041
+ unmount(subTree, instance, parentSuspense, doRemove);
10906
11042
  }
10907
11043
  if (um) {
10908
11044
  queuePostRenderEffect(um, parentSuspense);
@@ -10936,32 +11072,26 @@ function baseCreateRenderer(options, createHydrationFns) {
10936
11072
  const teleportEnd = el && el[TeleportEndKey];
10937
11073
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
10938
11074
  };
10939
- let isFlushing = false;
10940
11075
  const render = (vnode, container, namespace) => {
10941
- let instance;
10942
- if (vnode == null) {
10943
- if (container._vnode) {
10944
- unmount(container._vnode, null, null, true);
10945
- instance = container._vnode.component;
11076
+ const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
11077
+ flushOnAppMount(() => {
11078
+ if (vnode == null) {
11079
+ if (container._vnode) {
11080
+ unmount(container._vnode, null, null, true);
11081
+ }
11082
+ } else {
11083
+ patch(
11084
+ container._vnode || null,
11085
+ vnode,
11086
+ container,
11087
+ null,
11088
+ null,
11089
+ null,
11090
+ namespace
11091
+ );
10946
11092
  }
10947
- } else {
10948
- patch(
10949
- container._vnode || null,
10950
- vnode,
10951
- container,
10952
- null,
10953
- null,
10954
- null,
10955
- namespace
10956
- );
10957
- }
10958
- container._vnode = vnode;
10959
- if (!isFlushing) {
10960
- isFlushing = true;
10961
- flushPreFlushCbs(instance);
10962
- flushPostFlushCbs();
10963
- isFlushing = false;
10964
- }
11093
+ container._vnode = vnode;
11094
+ }, minUid);
10965
11095
  };
10966
11096
  const internals = {
10967
11097
  p: patch,
@@ -11123,7 +11253,7 @@ const SuspenseImpl = {
11123
11253
  rendererInternals
11124
11254
  );
11125
11255
  } else {
11126
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
11256
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
11127
11257
  n2.suspense = n1.suspense;
11128
11258
  n2.suspense.vnode = n2;
11129
11259
  n2.el = n1.el;
@@ -11209,10 +11339,12 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
11209
11339
  if (pendingBranch) {
11210
11340
  suspense.pendingBranch = newBranch;
11211
11341
  if (isSameVNodeType(pendingBranch, newBranch)) {
11342
+ suspense.deps++;
11212
11343
  patch(
11213
11344
  pendingBranch,
11214
11345
  newBranch,
11215
- suspense.hiddenContainer,
11346
+ // a hydrating pending branch is adopted SSR DOM, already in place
11347
+ isHydrating ? container : suspense.hiddenContainer,
11216
11348
  null,
11217
11349
  parentComponent,
11218
11350
  suspense,
@@ -11220,6 +11352,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
11220
11352
  slotScopeIds,
11221
11353
  optimized
11222
11354
  );
11355
+ suspense.deps--;
11223
11356
  if (suspense.deps <= 0) {
11224
11357
  suspense.resolve();
11225
11358
  } else if (isInFallback) {
@@ -11485,6 +11618,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11485
11618
  suspense.effects = [];
11486
11619
  if (isSuspensible) {
11487
11620
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
11621
+ parentSuspenseId = void 0;
11488
11622
  parentSuspense.deps--;
11489
11623
  if (parentSuspense.deps === 0 && !sync) {
11490
11624
  parentSuspense.resolve();
@@ -11545,7 +11679,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11545
11679
  next() {
11546
11680
  return suspense.activeBranch && next(suspense.activeBranch);
11547
11681
  },
11548
- registerDep(instance, setupRenderEffect, optimized2) {
11682
+ // `namespace` intentionally shadows the boundary's own: the dep must be
11683
+ // mounted with the namespace of the position it was rendered at, which can
11684
+ // differ from the boundary's (e.g. a component nested inside an <svg>).
11685
+ registerDep(instance, setupRenderEffect, optimized2, namespace2) {
11549
11686
  const isInPendingSuspense = !!suspense.pendingBranch;
11550
11687
  if (isInPendingSuspense) {
11551
11688
  suspense.deps++;
@@ -11558,6 +11695,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11558
11695
  return;
11559
11696
  }
11560
11697
  unsetCurrentInstance();
11698
+ if (!instance.scope.active) {
11699
+ if (isInPendingSuspense && --suspense.deps === 0) {
11700
+ suspense.resolve();
11701
+ }
11702
+ return;
11703
+ }
11561
11704
  instance.asyncResolved = true;
11562
11705
  const { vnode: vnode2 } = instance;
11563
11706
  {
@@ -11579,7 +11722,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11579
11722
  // consider the comment placeholder case.
11580
11723
  hydratedEl ? null : next(instance.subTree),
11581
11724
  suspense,
11582
- namespace,
11725
+ namespace2,
11583
11726
  optimized2
11584
11727
  );
11585
11728
  if (placeholder) {
@@ -12043,7 +12186,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
12043
12186
  el: vnode.el,
12044
12187
  anchor: vnode.anchor,
12045
12188
  ctx: vnode.ctx,
12046
- ce: vnode.ce
12189
+ ce: vnode.ce,
12190
+ cacheIndex: vnode.cacheIndex
12047
12191
  };
12048
12192
  if (transition && cloneTransition) {
12049
12193
  setTransitionHooks(
@@ -12179,6 +12323,9 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
12179
12323
 
12180
12324
  const emptyAppContext = createAppContext();
12181
12325
  let uid = 0;
12326
+ function getNextUid() {
12327
+ return uid;
12328
+ }
12182
12329
  function createComponentInstance(vnode, parent, suspense) {
12183
12330
  const type = vnode.type;
12184
12331
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
@@ -12863,7 +13010,7 @@ function isMemoSame(cached, memo) {
12863
13010
  return true;
12864
13011
  }
12865
13012
 
12866
- const version = "3.5.42";
13013
+ const version = "3.5.44";
12867
13014
  const warn = warn$1 ;
12868
13015
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12869
13016
  const devtools = devtools$1 ;
@@ -13483,7 +13630,9 @@ function patchStyle(el, prev, next) {
13483
13630
  }
13484
13631
  }
13485
13632
  if (vShowOriginalDisplay in el) {
13486
- el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13633
+ if (!isCssString || prev !== next) {
13634
+ el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13635
+ }
13487
13636
  if (el[vShowHidden]) {
13488
13637
  style.display = "none";
13489
13638
  }
@@ -14009,7 +14158,9 @@ class VueElement extends BaseClass {
14009
14158
  "Custom element style injection is not supported when using shadowRoot: false"
14010
14159
  );
14011
14160
  }
14012
- this._mount(def);
14161
+ if (this._connected) {
14162
+ this._mount(def);
14163
+ }
14013
14164
  };
14014
14165
  const asyncDef = this._def.__asyncLoader;
14015
14166
  if (asyncDef) {
@@ -14379,6 +14530,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
14379
14530
  const newPositionMap = /* @__PURE__ */ new WeakMap();
14380
14531
  const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
14381
14532
  const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
14533
+ const pendingGroups = /* @__PURE__ */ new WeakMap();
14382
14534
  const decorate = (t) => {
14383
14535
  delete t.props.mode;
14384
14536
  {
@@ -14397,21 +14549,30 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
14397
14549
  const state = useTransitionState();
14398
14550
  let prevChildren;
14399
14551
  let children;
14400
- onUpdated(() => {
14401
- if (!prevChildren.length) {
14402
- return;
14552
+ let origins;
14553
+ let moves;
14554
+ const willMove = () => {
14555
+ if (moves === void 0) {
14556
+ moves = prevChildren.length > 0 && hasCSSTransform(
14557
+ prevChildren[0].el,
14558
+ instance.vnode.el,
14559
+ resolveMoveClass(props)
14560
+ );
14403
14561
  }
14404
- const moveClass = props.moveClass || `${props.name || "v"}-move`;
14405
- if (!hasCSSTransform(
14406
- prevChildren[0].el,
14407
- instance.vnode.el,
14408
- moveClass
14409
- )) {
14562
+ return moves;
14563
+ };
14564
+ onUpdated(() => {
14565
+ pendingGroups.delete(instance);
14566
+ if (!willMove()) {
14410
14567
  prevChildren = [];
14568
+ origins = void 0;
14411
14569
  return;
14412
14570
  }
14571
+ const moveClass = resolveMoveClass(props);
14413
14572
  prevChildren.forEach(callPendingCbs);
14414
- prevChildren.forEach(recordPosition);
14573
+ const shift = origins && getOriginShift(origins, instance.vnode.el);
14574
+ origins = void 0;
14575
+ prevChildren.forEach((c) => recordPosition(c, shift));
14415
14576
  const movedChildren = prevChildren.filter(applyTranslation);
14416
14577
  forceReflow(instance.vnode.el);
14417
14578
  movedChildren.forEach((c) => {
@@ -14444,6 +14605,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
14444
14605
  tag = "span";
14445
14606
  }
14446
14607
  prevChildren = [];
14608
+ moves = void 0;
14447
14609
  if (children) {
14448
14610
  for (let i = 0; i < children.length; i++) {
14449
14611
  const child = children[i];
@@ -14475,6 +14637,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
14475
14637
  warn(`<TransitionGroup> children must be keyed.`);
14476
14638
  }
14477
14639
  }
14640
+ if (prevChildren.length) {
14641
+ origins = getOrigins(instance);
14642
+ pendingGroups.set(instance, willMove);
14643
+ }
14478
14644
  return createVNode(tag, null, children);
14479
14645
  };
14480
14646
  }
@@ -14489,8 +14655,11 @@ function callPendingCbs(c) {
14489
14655
  el[enterCbKey]();
14490
14656
  }
14491
14657
  }
14492
- function recordPosition(c) {
14493
- newPositionMap.set(c, getPosition(c.el));
14658
+ function resolveMoveClass(props) {
14659
+ return props.moveClass || `${props.name || "v"}-move`;
14660
+ }
14661
+ function recordPosition(c, shift) {
14662
+ newPositionMap.set(c, getPosition(c.el, shift));
14494
14663
  }
14495
14664
  function applyTranslation(c) {
14496
14665
  const oldPos = positionMap.get(c);
@@ -14514,13 +14683,41 @@ function applyTranslation(c) {
14514
14683
  return c;
14515
14684
  }
14516
14685
  }
14517
- function getPosition(el) {
14686
+ function getPosition(el, shift) {
14518
14687
  const rect = el.getBoundingClientRect();
14519
14688
  return {
14520
- left: rect.left,
14521
- top: rect.top
14689
+ left: rect.left - (shift ? shift.left : 0),
14690
+ top: rect.top - (shift ? shift.top : 0)
14522
14691
  };
14523
14692
  }
14693
+ function getOrigins(instance) {
14694
+ let origins;
14695
+ for (let group = instance.parent; group; group = group.parent) {
14696
+ const willMove = pendingGroups.get(group);
14697
+ if (willMove) {
14698
+ const item = findItem(group.vnode.el, instance.vnode.el);
14699
+ if (item) {
14700
+ (origins || (origins = [])).push(
14701
+ extend(getPosition(item), { item, willMove })
14702
+ );
14703
+ }
14704
+ }
14705
+ }
14706
+ return origins;
14707
+ }
14708
+ function findItem(root, node) {
14709
+ const container = root.nodeType === 1 ? root : root.parentNode;
14710
+ while (node && node.parentNode !== container) {
14711
+ node = node.parentNode;
14712
+ }
14713
+ if (node && node.nodeType === 1) {
14714
+ return node;
14715
+ }
14716
+ }
14717
+ function getOriginShift(origins, root) {
14718
+ const origin = origins.find((o) => o.willMove() && o.item.contains(root));
14719
+ return origin && getPosition(origin.item, origin);
14720
+ }
14524
14721
  function hasCSSTransform(el, root, moveClass) {
14525
14722
  const clone = el.cloneNode();
14526
14723
  const _vtc = el[vtcKey];
@@ -16503,7 +16700,8 @@ const errorMessages = {
16503
16700
  [42]: `v-model value must be a valid JavaScript member expression.`,
16504
16701
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
16505
16702
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
16506
- Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
16703
+ Use a v-bind binding combined with a v-on listener that emits update:x event instead.
16704
+ For props declared with defineModel(), assign the returned ref to a variable and use v-model on that variable.`,
16507
16705
  [45]: `v-model cannot be used on a const binding because it is not writable.`,
16508
16706
  [46]: `Error parsing JavaScript expression: `,
16509
16707
  [47]: `<KeepAlive> expects exactly one child component.`,
@@ -19094,7 +19292,7 @@ const transformFor = createStructuralDirectiveTransform(
19094
19292
  createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
19095
19293
  createCompoundExpression([
19096
19294
  `if (_cached && _cached.el`,
19097
- ...keyExp ? [` && _cached.key === `, keyExp] : [],
19295
+ ...keyExp ? [` && _cached.key === (`, keyExp, `)`] : [],
19098
19296
  ` && ${context.helperString(
19099
19297
  IS_MEMO_SAME
19100
19298
  )}(_cached, _memo)) return _cached`
@@ -21033,7 +21231,8 @@ const transformTransition = (node, context) => {
21033
21231
  if (!node.children.length) {
21034
21232
  return;
21035
21233
  }
21036
- if (hasMultipleChildren(node)) {
21234
+ const multipleChildren = hasMultipleChildren(node);
21235
+ if (multipleChildren) {
21037
21236
  context.onError(
21038
21237
  createDOMCompilerError(
21039
21238
  63,
@@ -21260,7 +21459,8 @@ const validateHtmlNesting = (node, context) => {
21260
21459
 
21261
21460
  const DOMNodeTransforms = [
21262
21461
  transformStyle,
21263
- ...[transformTransition, validateHtmlNesting]
21462
+ transformTransition,
21463
+ ...[validateHtmlNesting]
21264
21464
  ];
21265
21465
  const DOMDirectiveTransforms = {
21266
21466
  cloak: noopDirectiveTransform,