@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
  **/
@@ -131,10 +131,10 @@ var Vue = (function () {
131
131
  }
132
132
  const listDelimiterRE = /;(?![^(]*\))/g;
133
133
  const propertyDelimiterRE = /:([^]+)/;
134
- const styleCommentRE = /\/\*[^]*?\*\//g;
134
+ const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
135
135
  function parseStringStyle(cssText) {
136
136
  const ret = {};
137
- cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
137
+ cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
138
138
  if (item) {
139
139
  const tmp = item.split(propertyDelimiterRE);
140
140
  tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
@@ -194,7 +194,7 @@ var Vue = (function () {
194
194
  const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
195
195
  const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
196
196
 
197
- const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
197
+ const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
198
198
  const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
199
199
  const isBooleanAttr = /* @__PURE__ */ makeMap(
200
200
  specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
@@ -224,22 +224,22 @@ var Vue = (function () {
224
224
  );
225
225
  }
226
226
 
227
- function looseCompareArrays(a, b) {
227
+ function looseCompareArrays(a, b, seen) {
228
228
  if (a.length !== b.length) return false;
229
229
  let equal = true;
230
230
  for (let i = 0; equal && i < a.length; i++) {
231
- equal = looseEqual(a[i], b[i]);
231
+ equal = looseEqual(a[i], b[i], seen);
232
232
  }
233
233
  return equal;
234
234
  }
235
- function looseCompareCollections(a, b) {
235
+ function looseCompareCollections(a, b, seen) {
236
236
  if (a.size !== b.size) return false;
237
237
  const candidates = Array.from(b);
238
238
  const matched = new Uint8Array(candidates.length);
239
239
  for (const item of a) {
240
240
  let index = -1;
241
241
  for (let i = 0; i < candidates.length; i++) {
242
- if (!matched[i] && looseEqual(item, candidates[i])) {
242
+ if (!matched[i] && looseEqual(item, candidates[i], seen)) {
243
243
  index = i;
244
244
  break;
245
245
  }
@@ -249,7 +249,47 @@ var Vue = (function () {
249
249
  }
250
250
  return true;
251
251
  }
252
- function looseEqual(a, b) {
252
+ function looseCompareObjects(a, b, seen) {
253
+ let aValidType = isMap(a);
254
+ let bValidType = isMap(b);
255
+ if (aValidType || bValidType) {
256
+ return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
257
+ }
258
+ aValidType = isSet(a);
259
+ bValidType = isSet(b);
260
+ if (aValidType || bValidType) {
261
+ return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
262
+ }
263
+ const aKeysCount = Object.keys(a).length;
264
+ const bKeysCount = Object.keys(b).length;
265
+ if (aKeysCount !== bKeysCount) {
266
+ return false;
267
+ }
268
+ for (const key in a) {
269
+ const aHasKey = a.hasOwnProperty(key);
270
+ const bHasKey = b.hasOwnProperty(key);
271
+ if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) {
272
+ return false;
273
+ }
274
+ }
275
+ return String(a) === String(b);
276
+ }
277
+ function looseCompareNested(a, b, seen, compare) {
278
+ if (!seen) {
279
+ seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
280
+ }
281
+ const [seenA, seenB] = seen;
282
+ if (seenA.has(a) || seenB.has(b)) {
283
+ return seenA.get(a) === b && seenB.get(b) === a;
284
+ }
285
+ seenA.set(a, b);
286
+ seenB.set(b, a);
287
+ const equal = compare(a, b, seen);
288
+ seenA.delete(a);
289
+ seenB.delete(b);
290
+ return equal;
291
+ }
292
+ function looseEqual(a, b, seen) {
253
293
  if (a === b) return true;
254
294
  let aValidType = isDate(a);
255
295
  let bValidType = isDate(b);
@@ -264,7 +304,7 @@ var Vue = (function () {
264
304
  aValidType = isArray(a);
265
305
  bValidType = isArray(b);
266
306
  if (aValidType || bValidType) {
267
- return aValidType && bValidType ? looseCompareArrays(a, b) : false;
307
+ return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
268
308
  }
269
309
  aValidType = isObject(a);
270
310
  bValidType = isObject(b);
@@ -272,28 +312,7 @@ var Vue = (function () {
272
312
  if (!aValidType || !bValidType) {
273
313
  return false;
274
314
  }
275
- aValidType = isMap(a);
276
- bValidType = isMap(b);
277
- if (aValidType || bValidType) {
278
- return aValidType && bValidType ? looseCompareCollections(a, b) : false;
279
- }
280
- aValidType = isSet(a);
281
- bValidType = isSet(b);
282
- if (aValidType || bValidType) {
283
- return aValidType && bValidType ? looseCompareCollections(a, b) : false;
284
- }
285
- const aKeysCount = Object.keys(a).length;
286
- const bKeysCount = Object.keys(b).length;
287
- if (aKeysCount !== bKeysCount) {
288
- return false;
289
- }
290
- for (const key in a) {
291
- const aHasKey = a.hasOwnProperty(key);
292
- const bHasKey = b.hasOwnProperty(key);
293
- if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
294
- return false;
295
- }
296
- }
315
+ return looseCompareNested(a, b, seen, looseCompareObjects);
297
316
  }
298
317
  return String(a) === String(b);
299
318
  }
@@ -1094,7 +1113,9 @@ var Vue = (function () {
1094
1113
  const raw = toRaw(array);
1095
1114
  if (raw === array) return raw;
1096
1115
  track(raw, "iterate", ARRAY_ITERATE_KEY);
1097
- return isShallow(array) ? raw : raw.map(toReactive);
1116
+ if (isShallow(array)) return raw;
1117
+ if (!isReadonly(array)) return raw.map(toReactive);
1118
+ return isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
1098
1119
  }
1099
1120
  function shallowReadArray(arr) {
1100
1121
  track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
@@ -1221,19 +1242,41 @@ var Vue = (function () {
1221
1242
  };
1222
1243
  function iterator(self, method, wrapValue) {
1223
1244
  const arr = shallowReadArray(self);
1224
- const iter = arr[method]();
1245
+ const methodFn = arr[method];
1246
+ const iter = methodFn.call(arr);
1225
1247
  if (arr !== self && !isShallow(self)) {
1226
- iter._next = iter.next;
1227
- iter.next = () => {
1228
- const result = iter._next();
1229
- if (!result.done) {
1230
- result.value = wrapValue(result.value);
1248
+ if (iter[Symbol.toStringTag] === "Array Iterator") {
1249
+ const wrapped = Object.create(Object.getPrototypeOf(iter));
1250
+ wrapped.next = () => wrapResult(iter.next(), wrapValue);
1251
+ if (methodFn !== arrayProto[method]) {
1252
+ Object.defineProperties(wrapped, {
1253
+ return: {
1254
+ get() {
1255
+ const fn = iter.return;
1256
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1257
+ }
1258
+ },
1259
+ throw: {
1260
+ get() {
1261
+ const fn = iter.throw;
1262
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1263
+ }
1264
+ }
1265
+ });
1231
1266
  }
1232
- return result;
1233
- };
1267
+ return wrapped;
1268
+ }
1269
+ iter._next = iter.next;
1270
+ iter.next = () => wrapResult(iter._next(), wrapValue);
1234
1271
  }
1235
1272
  return iter;
1236
1273
  }
1274
+ function wrapResult(result, wrapValue) {
1275
+ if (!result.done) {
1276
+ result.value = wrapValue(result.value);
1277
+ }
1278
+ return result;
1279
+ }
1237
1280
  const arrayProto = Array.prototype;
1238
1281
  function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1239
1282
  const arr = shallowReadArray(self);
@@ -1656,6 +1699,8 @@ var Vue = (function () {
1656
1699
  return !isReadonly2;
1657
1700
  } else if (key === "__v_isReadonly") {
1658
1701
  return isReadonly2;
1702
+ } else if (key === "__v_isShallow") {
1703
+ return shallow;
1659
1704
  } else if (key === "__v_raw") {
1660
1705
  return target;
1661
1706
  }
@@ -2201,9 +2246,11 @@ var Vue = (function () {
2201
2246
  if (once && cb) {
2202
2247
  const _cb = cb;
2203
2248
  cb = (...args) => {
2204
- const res = _cb(...args);
2205
- watchHandle();
2206
- return res;
2249
+ try {
2250
+ return _cb(...args);
2251
+ } finally {
2252
+ watchHandle();
2253
+ }
2207
2254
  };
2208
2255
  }
2209
2256
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
@@ -2214,12 +2261,13 @@ var Vue = (function () {
2214
2261
  if (cb) {
2215
2262
  const newValue = effect.run();
2216
2263
  if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
2217
- if (cleanup) {
2218
- cleanup();
2219
- }
2220
2264
  const currentWatcher = activeWatcher;
2221
- activeWatcher = effect;
2265
+ pauseTracking();
2222
2266
  try {
2267
+ if (cleanup) {
2268
+ cleanup();
2269
+ }
2270
+ activeWatcher = effect;
2223
2271
  const args = [
2224
2272
  newValue,
2225
2273
  // pass undefined as the old value when it's changed for the first time
@@ -2233,6 +2281,7 @@ var Vue = (function () {
2233
2281
  );
2234
2282
  } finally {
2235
2283
  activeWatcher = currentWatcher;
2284
+ resetTracking();
2236
2285
  }
2237
2286
  }
2238
2287
  } else {
@@ -2633,21 +2682,21 @@ var Vue = (function () {
2633
2682
  }
2634
2683
  queueFlush();
2635
2684
  }
2636
- function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2685
+ function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
2637
2686
  {
2638
2687
  seen = seen || /* @__PURE__ */ new Map();
2639
2688
  }
2640
2689
  for (; i < queue.length; i++) {
2641
2690
  const cb = queue[i];
2642
2691
  if (cb && cb.flags & 2) {
2643
- if (instance && cb.id !== instance.uid) {
2692
+ if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
2644
2693
  continue;
2645
2694
  }
2646
2695
  if (checkRecursiveUpdates(seen, cb)) {
2647
2696
  continue;
2648
2697
  }
2649
2698
  queue.splice(i, 1);
2650
- i--;
2699
+ i = instance ? i - 1 : flushIndex;
2651
2700
  if (cb.flags & 4) {
2652
2701
  cb.flags &= -2;
2653
2702
  }
@@ -2658,12 +2707,23 @@ var Vue = (function () {
2658
2707
  }
2659
2708
  }
2660
2709
  }
2661
- function flushPostFlushCbs(seen) {
2710
+ function flushPostFlushCbs(seen, skip, minUid = 0) {
2662
2711
  if (pendingPostFlushCbs.length) {
2663
- const deduped = [...new Set(pendingPostFlushCbs)].sort(
2664
- (a, b) => getId(a) - getId(b)
2665
- );
2666
- pendingPostFlushCbs.length = 0;
2712
+ let cbs = pendingPostFlushCbs;
2713
+ let kept = 0;
2714
+ if (skip) {
2715
+ cbs = [];
2716
+ for (let i = 0; i < pendingPostFlushCbs.length; i++) {
2717
+ const cb = pendingPostFlushCbs[i];
2718
+ if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
2719
+ pendingPostFlushCbs[kept++] = cb;
2720
+ } else {
2721
+ cbs.push(cb);
2722
+ }
2723
+ }
2724
+ }
2725
+ const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
2726
+ pendingPostFlushCbs.length = kept;
2667
2727
  if (activePostFlushCbs) {
2668
2728
  for (let i = 0; i < deduped.length; i++) {
2669
2729
  activePostFlushCbs.push(deduped[i]);
@@ -2689,6 +2749,22 @@ var Vue = (function () {
2689
2749
  postFlushIndex = 0;
2690
2750
  }
2691
2751
  }
2752
+ let isFlushing = false;
2753
+ function flushOnAppMount(fn, minUid) {
2754
+ if (isFlushing) {
2755
+ fn();
2756
+ return;
2757
+ }
2758
+ const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
2759
+ fn();
2760
+ isFlushing = true;
2761
+ try {
2762
+ flushPreFlushCbs(void 0, minUid);
2763
+ flushPostFlushCbs(void 0, queued, minUid);
2764
+ } finally {
2765
+ isFlushing = false;
2766
+ }
2767
+ }
2692
2768
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2693
2769
  function flushJobs(seen) {
2694
2770
  {
@@ -3638,6 +3714,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3638
3714
  let isPre = false;
3639
3715
  if (flush === "post") {
3640
3716
  baseWatchOptions.scheduler = (job) => {
3717
+ job.i = instance;
3641
3718
  queuePostRenderEffect(job, instance && instance.suspense);
3642
3719
  };
3643
3720
  } else if (flush !== "sync") {
@@ -3932,7 +4009,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3932
4009
  };
3933
4010
  function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
3934
4011
  if (moveType === 0) {
4012
+ if (vnode.targetStart) {
4013
+ insert(vnode.targetStart, container, parentAnchor);
4014
+ }
3935
4015
  insert(vnode.targetAnchor, container, parentAnchor);
4016
+ parentAnchor = vnode.targetAnchor;
3936
4017
  }
3937
4018
  const { el, anchor, shapeFlag, children, props } = vnode;
3938
4019
  const isReorder = moveType === 2;
@@ -4101,10 +4182,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4101
4182
  onAfterAppear: TransitionHookValidator,
4102
4183
  onAppearCancelled: TransitionHookValidator
4103
4184
  };
4104
- const recursiveGetSubtree = (instance) => {
4105
- const subTree = instance.subTree;
4106
- return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
4107
- };
4108
4185
  const BaseTransitionImpl = {
4109
4186
  name: `BaseTransition`,
4110
4187
  props: BaseTransitionPropsValidators,
@@ -4145,7 +4222,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4145
4222
  setTransitionHooks(innerChild, enterHooks);
4146
4223
  }
4147
4224
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
4148
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
4225
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
4149
4226
  let leavingHooks = resolveTransitionHooks(
4150
4227
  oldInnerChild,
4151
4228
  rawProps,
@@ -4281,8 +4358,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4281
4358
  );
4282
4359
  }
4283
4360
  const leavingVNode = leavingVNodesCache[key];
4284
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
4285
- leavingVNode.el[leaveCbKey]();
4361
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
4362
+ let leavingCb = leavingVNode.el[leaveCbKey];
4363
+ if (!leavingCb) {
4364
+ const leavingRoot = getTransitionRoot(leavingVNode);
4365
+ leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
4366
+ }
4367
+ if (leavingCb) {
4368
+ leavingCb();
4369
+ }
4286
4370
  }
4287
4371
  callHook(hook, [el]);
4288
4372
  },
@@ -4410,6 +4494,12 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4410
4494
  vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4411
4495
  } else {
4412
4496
  vnode.transition = hooks;
4497
+ if (vnode.type === Fragment && isArray(vnode.children)) {
4498
+ const child = filterSingleRoot(vnode.children, false);
4499
+ if (child) {
4500
+ setTransitionHooks(child, hooks);
4501
+ }
4502
+ }
4413
4503
  }
4414
4504
  }
4415
4505
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
@@ -4434,6 +4524,18 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4434
4524
  }
4435
4525
  return ret;
4436
4526
  }
4527
+ function getTransitionRoot(vnode) {
4528
+ if (vnode.component) {
4529
+ return getTransitionRoot(vnode.component.subTree);
4530
+ }
4531
+ if (vnode.type === Fragment) {
4532
+ const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
4533
+ return child ? getTransitionRoot(child) : void 0;
4534
+ }
4535
+ if (vnode.type !== Comment) {
4536
+ return vnode;
4537
+ }
4538
+ }
4437
4539
 
4438
4540
  // @__NO_SIDE_EFFECTS__
4439
4541
  function defineComponent(options, extraOptions) {
@@ -4807,13 +4909,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4807
4909
  getContainerType(container),
4808
4910
  optimized
4809
4911
  );
4810
- if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
4912
+ if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
4811
4913
  let subTree;
4812
4914
  if (isFragmentStart) {
4813
4915
  subTree = createVNode(Static);
4814
4916
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
4815
4917
  } else {
4816
- subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
4918
+ subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
4919
+ node.nodeType === 8 ? Comment : "div"
4920
+ );
4817
4921
  }
4818
4922
  subTree.el = node;
4819
4923
  vnode.component.subTree = subTree;
@@ -5337,14 +5441,22 @@ Server rendered element contains fewer child nodes than client vdom.`
5337
5441
  break;
5338
5442
  }
5339
5443
  }, opts);
5340
- forEach((el) => {
5341
- if (!(el instanceof Element)) return;
5444
+ const observe = (el) => {
5342
5445
  if (elementIsVisibleInViewport(el)) {
5343
5446
  hydrate();
5344
5447
  ob.disconnect();
5345
5448
  return false;
5346
5449
  }
5450
+ if (getComputedStyle(el).display === "contents") {
5451
+ for (let i = 0; i < el.children.length; i++) {
5452
+ if (observe(el.children[i]) === false) return false;
5453
+ }
5454
+ }
5347
5455
  ob.observe(el);
5456
+ };
5457
+ forEach((el) => {
5458
+ if (!(el instanceof Element)) return;
5459
+ return observe(el);
5348
5460
  });
5349
5461
  return () => ob.disconnect();
5350
5462
  };
@@ -5695,6 +5807,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5695
5807
  unmount(cached);
5696
5808
  } else if (current) {
5697
5809
  resetShapeFlag(current);
5810
+ if (cached) resetShapeFlag(cached);
5698
5811
  }
5699
5812
  cache.delete(key);
5700
5813
  keys.delete(key);
@@ -6277,9 +6390,11 @@ If this is a native custom element, make sure to exclude it from component resol
6277
6390
  }
6278
6391
  } else if (typeof source === "number") {
6279
6392
  if (!Number.isInteger(source) || source < 0) {
6280
- warn$1(
6281
- `The v-for range expects a positive integer value but got ${source}.`
6282
- );
6393
+ {
6394
+ warn$1(
6395
+ `The v-for range expects a positive integer value but got ${source}.`
6396
+ );
6397
+ }
6283
6398
  ret = [];
6284
6399
  } else {
6285
6400
  ret = new Array(source);
@@ -6598,6 +6713,7 @@ If this is a native custom element, make sure to exclude it from component resol
6598
6713
  $vnode: (i) => i.vnode,
6599
6714
  // some private properties that are likely accessed...
6600
6715
  _self: (i) => i.proxy,
6716
+ _setupProxy: (i) => i.setupState,
6601
6717
  _uid: (i) => i.uid,
6602
6718
  _data: (i) => i.data,
6603
6719
  _isMounted: (i) => i.isMounted,
@@ -7582,7 +7698,7 @@ If this is a native custom element, make sure to exclude it from component resol
7582
7698
  return vm;
7583
7699
  }
7584
7700
  }
7585
- Vue.version = `2.6.14-compat:${"3.5.42"}`;
7701
+ Vue.version = `2.6.14-compat:${"3.5.44"}`;
7586
7702
  Vue.config = singletonApp.config;
7587
7703
  Vue.use = (plugin, ...options) => {
7588
7704
  if (plugin && isFunction(plugin.install)) {
@@ -8739,7 +8855,7 @@ If you want to remount the same app, move your app creation logic into a factory
8739
8855
  }
8740
8856
  for (let i = 0; i < nextKeys.length; i++) {
8741
8857
  const key = nextKeys[i];
8742
- if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8858
+ if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8743
8859
  return true;
8744
8860
  }
8745
8861
  }
@@ -9438,6 +9554,12 @@ If you want to remount the same app, move your app creation logic into a factory
9438
9554
  optimized = false;
9439
9555
  n2.dynamicChildren = null;
9440
9556
  }
9557
+ if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
9558
+ if (n2.dynamicChildren === EMPTY_ARR) {
9559
+ n2.dynamicChildren = [];
9560
+ }
9561
+ n2.dynamicChildren.hasOnce = true;
9562
+ }
9441
9563
  const { type, ref, shapeFlag } = n2;
9442
9564
  switch (type) {
9443
9565
  case Text:
@@ -9844,15 +9966,16 @@ If you want to remount the same app, move your app creation logic into a factory
9844
9966
  for (let i = 0; i < newChildren.length; i++) {
9845
9967
  const oldVNode = oldChildren[i];
9846
9968
  const newVNode = newChildren[i];
9969
+ const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
9847
9970
  const container = (
9848
9971
  // oldVNode may be an errored async setup() component inside Suspense
9849
9972
  // which will not have a mounted element
9850
- oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
9973
+ oldEl && // - In the case of a Fragment, we need to provide the actual parent
9851
9974
  // of the Fragment itself so it can move its children.
9852
9975
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
9853
9976
  // which also requires the correct parent container
9854
9977
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
9855
- oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
9978
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
9856
9979
  // In other cases, the parent container is not actually used so we
9857
9980
  // just pass the block element here to avoid a DOM parentNode call.
9858
9981
  fallbackContainer
@@ -10017,7 +10140,12 @@ If you want to remount the same app, move your app creation logic into a factory
10017
10140
  }
10018
10141
  if (isHmrUpdating) initialVNode.el = null;
10019
10142
  if (instance.asyncDep) {
10020
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
10143
+ parentSuspense && parentSuspense.registerDep(
10144
+ instance,
10145
+ setupRenderEffect,
10146
+ optimized,
10147
+ namespace
10148
+ );
10021
10149
  if (!initialVNode.el) {
10022
10150
  const placeholder = instance.subTree = createVNode(Comment);
10023
10151
  processCommentNode(null, placeholder, container, anchor);
@@ -10046,6 +10174,8 @@ If you want to remount the same app, move your app creation logic into a factory
10046
10174
  {
10047
10175
  pushWarningContext(n2);
10048
10176
  }
10177
+ n2.el = n1.el;
10178
+ n2.placeholder = n1.placeholder;
10049
10179
  updateComponentPreRender(instance, n2, optimized);
10050
10180
  {
10051
10181
  popWarningContext();
@@ -10057,6 +10187,7 @@ If you want to remount the same app, move your app creation logic into a factory
10057
10187
  }
10058
10188
  } else {
10059
10189
  n2.el = n1.el;
10190
+ n2.placeholder = n1.placeholder;
10060
10191
  instance.vnode = n2;
10061
10192
  }
10062
10193
  };
@@ -10661,7 +10792,7 @@ If you want to remount the same app, move your app creation logic into a factory
10661
10792
  cacheIndex,
10662
10793
  memo
10663
10794
  } = vnode;
10664
- if (patchFlag === -2) {
10795
+ if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
10665
10796
  optimized = false;
10666
10797
  }
10667
10798
  if (ref != null) {
@@ -10669,7 +10800,7 @@ If you want to remount the same app, move your app creation logic into a factory
10669
10800
  setRef(ref, null, parentSuspense, vnode, true);
10670
10801
  resetTracking();
10671
10802
  }
10672
- if (cacheIndex != null) {
10803
+ if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
10673
10804
  parentComponent.renderCache[cacheIndex] = void 0;
10674
10805
  }
10675
10806
  if (shapeFlag & 256) {
@@ -10734,35 +10865,37 @@ If you want to remount the same app, move your app creation logic into a factory
10734
10865
  };
10735
10866
  const remove = (vnode) => {
10736
10867
  const { type, el, anchor, transition } = vnode;
10737
- if (type === Fragment) {
10738
- if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
10739
- vnode.children.forEach((child) => {
10740
- if (child.type === Comment) {
10741
- hostRemove(child.el);
10742
- } else {
10743
- remove(child);
10744
- }
10745
- });
10746
- } else {
10747
- removeFragment(el, anchor);
10748
- }
10868
+ const isFragment = type === Fragment;
10869
+ if (isFragment && !transition) {
10870
+ removeFragment(el, anchor);
10749
10871
  return;
10750
10872
  }
10751
10873
  if (type === Static) {
10752
10874
  removeStaticNode(vnode);
10875
+ if (transition && !transition.persisted && transition.afterLeave) {
10876
+ transition.afterLeave();
10877
+ }
10753
10878
  return;
10754
10879
  }
10880
+ const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
10755
10881
  const performRemove = () => {
10756
- hostRemove(el);
10882
+ if (isFragment) {
10883
+ if (hostParentNode(el)) {
10884
+ removeFragment(el, anchor);
10885
+ }
10886
+ } else {
10887
+ hostRemove(el);
10888
+ }
10757
10889
  if (transition && !transition.persisted && transition.afterLeave) {
10758
10890
  transition.afterLeave();
10759
10891
  }
10760
10892
  };
10761
- if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
10893
+ if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
10762
10894
  const { leave, delayLeave } = transition;
10763
- const performLeave = () => leave(el, performRemove);
10895
+ const leavingEl = leavingNode.el;
10896
+ const performLeave = () => leave(leavingEl, performRemove);
10764
10897
  if (delayLeave) {
10765
- delayLeave(vnode.el, performRemove, performLeave);
10898
+ delayLeave(leavingEl, performRemove, performLeave);
10766
10899
  } else {
10767
10900
  performLeave();
10768
10901
  }
@@ -10796,6 +10929,9 @@ If you want to remount the same app, move your app creation logic into a factory
10796
10929
  if (job) {
10797
10930
  job.flags |= 8;
10798
10931
  unmount(subTree, instance, parentSuspense, doRemove);
10932
+ } else if (instance.vnode.el && subTree) {
10933
+ subTree.transition = instance.vnode.transition;
10934
+ unmount(subTree, instance, parentSuspense, doRemove);
10799
10935
  }
10800
10936
  if (um) {
10801
10937
  queuePostRenderEffect(um, parentSuspense);
@@ -10829,32 +10965,26 @@ If you want to remount the same app, move your app creation logic into a factory
10829
10965
  const teleportEnd = el && el[TeleportEndKey];
10830
10966
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
10831
10967
  };
10832
- let isFlushing = false;
10833
10968
  const render = (vnode, container, namespace) => {
10834
- let instance;
10835
- if (vnode == null) {
10836
- if (container._vnode) {
10837
- unmount(container._vnode, null, null, true);
10838
- instance = container._vnode.component;
10969
+ const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
10970
+ flushOnAppMount(() => {
10971
+ if (vnode == null) {
10972
+ if (container._vnode) {
10973
+ unmount(container._vnode, null, null, true);
10974
+ }
10975
+ } else {
10976
+ patch(
10977
+ container._vnode || null,
10978
+ vnode,
10979
+ container,
10980
+ null,
10981
+ null,
10982
+ null,
10983
+ namespace
10984
+ );
10839
10985
  }
10840
- } else {
10841
- patch(
10842
- container._vnode || null,
10843
- vnode,
10844
- container,
10845
- null,
10846
- null,
10847
- null,
10848
- namespace
10849
- );
10850
- }
10851
- container._vnode = vnode;
10852
- if (!isFlushing) {
10853
- isFlushing = true;
10854
- flushPreFlushCbs(instance);
10855
- flushPostFlushCbs();
10856
- isFlushing = false;
10857
- }
10986
+ container._vnode = vnode;
10987
+ }, minUid);
10858
10988
  };
10859
10989
  const internals = {
10860
10990
  p: patch,
@@ -11016,7 +11146,7 @@ If you want to remount the same app, move your app creation logic into a factory
11016
11146
  rendererInternals
11017
11147
  );
11018
11148
  } else {
11019
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
11149
+ if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
11020
11150
  n2.suspense = n1.suspense;
11021
11151
  n2.suspense.vnode = n2;
11022
11152
  n2.el = n1.el;
@@ -11102,10 +11232,12 @@ If you want to remount the same app, move your app creation logic into a factory
11102
11232
  if (pendingBranch) {
11103
11233
  suspense.pendingBranch = newBranch;
11104
11234
  if (isSameVNodeType(pendingBranch, newBranch)) {
11235
+ suspense.deps++;
11105
11236
  patch(
11106
11237
  pendingBranch,
11107
11238
  newBranch,
11108
- suspense.hiddenContainer,
11239
+ // a hydrating pending branch is adopted SSR DOM, already in place
11240
+ isHydrating ? container : suspense.hiddenContainer,
11109
11241
  null,
11110
11242
  parentComponent,
11111
11243
  suspense,
@@ -11113,6 +11245,7 @@ If you want to remount the same app, move your app creation logic into a factory
11113
11245
  slotScopeIds,
11114
11246
  optimized
11115
11247
  );
11248
+ suspense.deps--;
11116
11249
  if (suspense.deps <= 0) {
11117
11250
  suspense.resolve();
11118
11251
  } else if (isInFallback) {
@@ -11378,6 +11511,7 @@ If you want to remount the same app, move your app creation logic into a factory
11378
11511
  suspense.effects = [];
11379
11512
  if (isSuspensible) {
11380
11513
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
11514
+ parentSuspenseId = void 0;
11381
11515
  parentSuspense.deps--;
11382
11516
  if (parentSuspense.deps === 0 && !sync) {
11383
11517
  parentSuspense.resolve();
@@ -11438,7 +11572,10 @@ If you want to remount the same app, move your app creation logic into a factory
11438
11572
  next() {
11439
11573
  return suspense.activeBranch && next(suspense.activeBranch);
11440
11574
  },
11441
- registerDep(instance, setupRenderEffect, optimized2) {
11575
+ // `namespace` intentionally shadows the boundary's own: the dep must be
11576
+ // mounted with the namespace of the position it was rendered at, which can
11577
+ // differ from the boundary's (e.g. a component nested inside an <svg>).
11578
+ registerDep(instance, setupRenderEffect, optimized2, namespace2) {
11442
11579
  const isInPendingSuspense = !!suspense.pendingBranch;
11443
11580
  if (isInPendingSuspense) {
11444
11581
  suspense.deps++;
@@ -11451,6 +11588,12 @@ If you want to remount the same app, move your app creation logic into a factory
11451
11588
  return;
11452
11589
  }
11453
11590
  unsetCurrentInstance();
11591
+ if (!instance.scope.active) {
11592
+ if (isInPendingSuspense && --suspense.deps === 0) {
11593
+ suspense.resolve();
11594
+ }
11595
+ return;
11596
+ }
11454
11597
  instance.asyncResolved = true;
11455
11598
  const { vnode: vnode2 } = instance;
11456
11599
  {
@@ -11472,7 +11615,7 @@ If you want to remount the same app, move your app creation logic into a factory
11472
11615
  // consider the comment placeholder case.
11473
11616
  hydratedEl ? null : next(instance.subTree),
11474
11617
  suspense,
11475
- namespace,
11618
+ namespace2,
11476
11619
  optimized2
11477
11620
  );
11478
11621
  if (placeholder) {
@@ -11936,7 +12079,8 @@ Component that was made reactive: `,
11936
12079
  el: vnode.el,
11937
12080
  anchor: vnode.anchor,
11938
12081
  ctx: vnode.ctx,
11939
- ce: vnode.ce
12082
+ ce: vnode.ce,
12083
+ cacheIndex: vnode.cacheIndex
11940
12084
  };
11941
12085
  if (transition && cloneTransition) {
11942
12086
  setTransitionHooks(
@@ -12072,6 +12216,9 @@ Component that was made reactive: `,
12072
12216
 
12073
12217
  const emptyAppContext = createAppContext();
12074
12218
  let uid = 0;
12219
+ function getNextUid() {
12220
+ return uid;
12221
+ }
12075
12222
  function createComponentInstance(vnode, parent, suspense) {
12076
12223
  const type = vnode.type;
12077
12224
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
@@ -12742,7 +12889,7 @@ Component that was made reactive: `,
12742
12889
  return true;
12743
12890
  }
12744
12891
 
12745
- const version = "3.5.42";
12892
+ const version = "3.5.44";
12746
12893
  const warn = warn$1 ;
12747
12894
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12748
12895
  const devtools = devtools$1 ;
@@ -13343,7 +13490,9 @@ Component that was made reactive: `,
13343
13490
  }
13344
13491
  }
13345
13492
  if (vShowOriginalDisplay in el) {
13346
- el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13493
+ if (!isCssString || prev !== next) {
13494
+ el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13495
+ }
13347
13496
  if (el[vShowHidden]) {
13348
13497
  style.display = "none";
13349
13498
  }
@@ -13869,7 +14018,9 @@ Expected function or array of functions, received type ${typeof value}.`
13869
14018
  "Custom element style injection is not supported when using shadowRoot: false"
13870
14019
  );
13871
14020
  }
13872
- this._mount(def);
14021
+ if (this._connected) {
14022
+ this._mount(def);
14023
+ }
13873
14024
  };
13874
14025
  const asyncDef = this._def.__asyncLoader;
13875
14026
  if (asyncDef) {
@@ -14227,6 +14378,7 @@ Expected function or array of functions, received type ${typeof value}.`
14227
14378
  const newPositionMap = /* @__PURE__ */ new WeakMap();
14228
14379
  const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
14229
14380
  const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
14381
+ const pendingGroups = /* @__PURE__ */ new WeakMap();
14230
14382
  const decorate = (t) => {
14231
14383
  delete t.props.mode;
14232
14384
  {
@@ -14245,21 +14397,30 @@ Expected function or array of functions, received type ${typeof value}.`
14245
14397
  const state = useTransitionState();
14246
14398
  let prevChildren;
14247
14399
  let children;
14248
- onUpdated(() => {
14249
- if (!prevChildren.length) {
14250
- return;
14400
+ let origins;
14401
+ let moves;
14402
+ const willMove = () => {
14403
+ if (moves === void 0) {
14404
+ moves = prevChildren.length > 0 && hasCSSTransform(
14405
+ prevChildren[0].el,
14406
+ instance.vnode.el,
14407
+ resolveMoveClass(props)
14408
+ );
14251
14409
  }
14252
- const moveClass = props.moveClass || `${props.name || "v"}-move`;
14253
- if (!hasCSSTransform(
14254
- prevChildren[0].el,
14255
- instance.vnode.el,
14256
- moveClass
14257
- )) {
14410
+ return moves;
14411
+ };
14412
+ onUpdated(() => {
14413
+ pendingGroups.delete(instance);
14414
+ if (!willMove()) {
14258
14415
  prevChildren = [];
14416
+ origins = void 0;
14259
14417
  return;
14260
14418
  }
14419
+ const moveClass = resolveMoveClass(props);
14261
14420
  prevChildren.forEach(callPendingCbs);
14262
- prevChildren.forEach(recordPosition);
14421
+ const shift = origins && getOriginShift(origins, instance.vnode.el);
14422
+ origins = void 0;
14423
+ prevChildren.forEach((c) => recordPosition(c, shift));
14263
14424
  const movedChildren = prevChildren.filter(applyTranslation);
14264
14425
  forceReflow(instance.vnode.el);
14265
14426
  movedChildren.forEach((c) => {
@@ -14292,6 +14453,7 @@ Expected function or array of functions, received type ${typeof value}.`
14292
14453
  tag = "span";
14293
14454
  }
14294
14455
  prevChildren = [];
14456
+ moves = void 0;
14295
14457
  if (children) {
14296
14458
  for (let i = 0; i < children.length; i++) {
14297
14459
  const child = children[i];
@@ -14323,6 +14485,10 @@ Expected function or array of functions, received type ${typeof value}.`
14323
14485
  warn(`<TransitionGroup> children must be keyed.`);
14324
14486
  }
14325
14487
  }
14488
+ if (prevChildren.length) {
14489
+ origins = getOrigins(instance);
14490
+ pendingGroups.set(instance, willMove);
14491
+ }
14326
14492
  return createVNode(tag, null, children);
14327
14493
  };
14328
14494
  }
@@ -14337,8 +14503,11 @@ Expected function or array of functions, received type ${typeof value}.`
14337
14503
  el[enterCbKey]();
14338
14504
  }
14339
14505
  }
14340
- function recordPosition(c) {
14341
- newPositionMap.set(c, getPosition(c.el));
14506
+ function resolveMoveClass(props) {
14507
+ return props.moveClass || `${props.name || "v"}-move`;
14508
+ }
14509
+ function recordPosition(c, shift) {
14510
+ newPositionMap.set(c, getPosition(c.el, shift));
14342
14511
  }
14343
14512
  function applyTranslation(c) {
14344
14513
  const oldPos = positionMap.get(c);
@@ -14362,13 +14531,41 @@ Expected function or array of functions, received type ${typeof value}.`
14362
14531
  return c;
14363
14532
  }
14364
14533
  }
14365
- function getPosition(el) {
14534
+ function getPosition(el, shift) {
14366
14535
  const rect = el.getBoundingClientRect();
14367
14536
  return {
14368
- left: rect.left,
14369
- top: rect.top
14537
+ left: rect.left - (shift ? shift.left : 0),
14538
+ top: rect.top - (shift ? shift.top : 0)
14370
14539
  };
14371
14540
  }
14541
+ function getOrigins(instance) {
14542
+ let origins;
14543
+ for (let group = instance.parent; group; group = group.parent) {
14544
+ const willMove = pendingGroups.get(group);
14545
+ if (willMove) {
14546
+ const item = findItem(group.vnode.el, instance.vnode.el);
14547
+ if (item) {
14548
+ (origins || (origins = [])).push(
14549
+ extend(getPosition(item), { item, willMove })
14550
+ );
14551
+ }
14552
+ }
14553
+ }
14554
+ return origins;
14555
+ }
14556
+ function findItem(root, node) {
14557
+ const container = root.nodeType === 1 ? root : root.parentNode;
14558
+ while (node && node.parentNode !== container) {
14559
+ node = node.parentNode;
14560
+ }
14561
+ if (node && node.nodeType === 1) {
14562
+ return node;
14563
+ }
14564
+ }
14565
+ function getOriginShift(origins, root) {
14566
+ const origin = origins.find((o) => o.willMove() && o.item.contains(root));
14567
+ return origin && getPosition(origin.item, origin);
14568
+ }
14372
14569
  function hasCSSTransform(el, root, moveClass) {
14373
14570
  const clone = el.cloneNode();
14374
14571
  const _vtc = el[vtcKey];