@vue/compat 3.5.11 → 3.5.13

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.11
2
+ * @vue/compat v3.5.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -141,10 +141,9 @@ function parseStringStyle(cssText) {
141
141
  return ret;
142
142
  }
143
143
  function stringifyStyle(styles) {
144
+ if (!styles) return "";
145
+ if (isString(styles)) return styles;
144
146
  let ret = "";
145
- if (!styles || isString(styles)) {
146
- return ret;
147
- }
148
147
  for (const key in styles) {
149
148
  const value = styles[key];
150
149
  if (isString(value) || typeof value === "number") {
@@ -405,17 +404,21 @@ class EffectScope {
405
404
  }
406
405
  stop(fromParent) {
407
406
  if (this._active) {
407
+ this._active = false;
408
408
  let i, l;
409
409
  for (i = 0, l = this.effects.length; i < l; i++) {
410
410
  this.effects[i].stop();
411
411
  }
412
+ this.effects.length = 0;
412
413
  for (i = 0, l = this.cleanups.length; i < l; i++) {
413
414
  this.cleanups[i]();
414
415
  }
416
+ this.cleanups.length = 0;
415
417
  if (this.scopes) {
416
418
  for (i = 0, l = this.scopes.length; i < l; i++) {
417
419
  this.scopes[i].stop(true);
418
420
  }
421
+ this.scopes.length = 0;
419
422
  }
420
423
  if (!this.detached && this.parent && !fromParent) {
421
424
  const last = this.parent.scopes.pop();
@@ -425,7 +428,6 @@ class EffectScope {
425
428
  }
426
429
  }
427
430
  this.parent = void 0;
428
- this._active = false;
429
431
  }
430
432
  }
431
433
  }
@@ -690,16 +692,16 @@ function removeSub(link, soft = false) {
690
692
  nextSub.prevSub = prevSub;
691
693
  link.nextSub = void 0;
692
694
  }
693
- if (dep.subs === link) {
694
- dep.subs = prevSub;
695
- }
696
695
  if (dep.subsHead === link) {
697
696
  dep.subsHead = nextSub;
698
697
  }
699
- if (!dep.subs && dep.computed) {
700
- dep.computed.flags &= ~4;
701
- for (let l = dep.computed.deps; l; l = l.nextDep) {
702
- removeSub(l, true);
698
+ if (dep.subs === link) {
699
+ dep.subs = prevSub;
700
+ if (!prevSub && dep.computed) {
701
+ dep.computed.flags &= ~4;
702
+ for (let l = dep.computed.deps; l; l = l.nextDep) {
703
+ removeSub(l, true);
704
+ }
703
705
  }
704
706
  }
705
707
  if (!soft && !--dep.sc && dep.map) {
@@ -959,7 +961,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
959
961
  }
960
962
  });
961
963
  } else {
962
- if (key !== void 0) {
964
+ if (key !== void 0 || depsMap.has(void 0)) {
963
965
  run(depsMap.get(key));
964
966
  }
965
967
  if (isArrayIndex) {
@@ -1191,6 +1193,7 @@ class BaseReactiveHandler {
1191
1193
  this._isShallow = _isShallow;
1192
1194
  }
1193
1195
  get(target, key, receiver) {
1196
+ if (key === "__v_skip") return target["__v_skip"];
1194
1197
  const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1195
1198
  if (key === "__v_isReactive") {
1196
1199
  return !isReadonly2;
@@ -1334,117 +1337,6 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
1334
1337
 
1335
1338
  const toShallow = (value) => value;
1336
1339
  const getProto = (v) => Reflect.getPrototypeOf(v);
1337
- function get(target, key, isReadonly2 = false, isShallow2 = false) {
1338
- target = target["__v_raw"];
1339
- const rawTarget = toRaw(target);
1340
- const rawKey = toRaw(key);
1341
- if (!isReadonly2) {
1342
- if (hasChanged(key, rawKey)) {
1343
- track(rawTarget, "get", key);
1344
- }
1345
- track(rawTarget, "get", rawKey);
1346
- }
1347
- const { has: has2 } = getProto(rawTarget);
1348
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1349
- if (has2.call(rawTarget, key)) {
1350
- return wrap(target.get(key));
1351
- } else if (has2.call(rawTarget, rawKey)) {
1352
- return wrap(target.get(rawKey));
1353
- } else if (target !== rawTarget) {
1354
- target.get(key);
1355
- }
1356
- }
1357
- function has(key, isReadonly2 = false) {
1358
- const target = this["__v_raw"];
1359
- const rawTarget = toRaw(target);
1360
- const rawKey = toRaw(key);
1361
- if (!isReadonly2) {
1362
- if (hasChanged(key, rawKey)) {
1363
- track(rawTarget, "has", key);
1364
- }
1365
- track(rawTarget, "has", rawKey);
1366
- }
1367
- return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1368
- }
1369
- function size(target, isReadonly2 = false) {
1370
- target = target["__v_raw"];
1371
- !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
1372
- return Reflect.get(target, "size", target);
1373
- }
1374
- function add(value, _isShallow = false) {
1375
- if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
1376
- value = toRaw(value);
1377
- }
1378
- const target = toRaw(this);
1379
- const proto = getProto(target);
1380
- const hadKey = proto.has.call(target, value);
1381
- if (!hadKey) {
1382
- target.add(value);
1383
- trigger(target, "add", value, value);
1384
- }
1385
- return this;
1386
- }
1387
- function set(key, value, _isShallow = false) {
1388
- if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
1389
- value = toRaw(value);
1390
- }
1391
- const target = toRaw(this);
1392
- const { has: has2, get: get2 } = getProto(target);
1393
- let hadKey = has2.call(target, key);
1394
- if (!hadKey) {
1395
- key = toRaw(key);
1396
- hadKey = has2.call(target, key);
1397
- } else {
1398
- checkIdentityKeys(target, has2, key);
1399
- }
1400
- const oldValue = get2.call(target, key);
1401
- target.set(key, value);
1402
- if (!hadKey) {
1403
- trigger(target, "add", key, value);
1404
- } else if (hasChanged(value, oldValue)) {
1405
- trigger(target, "set", key, value, oldValue);
1406
- }
1407
- return this;
1408
- }
1409
- function deleteEntry(key) {
1410
- const target = toRaw(this);
1411
- const { has: has2, get: get2 } = getProto(target);
1412
- let hadKey = has2.call(target, key);
1413
- if (!hadKey) {
1414
- key = toRaw(key);
1415
- hadKey = has2.call(target, key);
1416
- } else {
1417
- checkIdentityKeys(target, has2, key);
1418
- }
1419
- const oldValue = get2 ? get2.call(target, key) : void 0;
1420
- const result = target.delete(key);
1421
- if (hadKey) {
1422
- trigger(target, "delete", key, void 0, oldValue);
1423
- }
1424
- return result;
1425
- }
1426
- function clear() {
1427
- const target = toRaw(this);
1428
- const hadItems = target.size !== 0;
1429
- const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
1430
- const result = target.clear();
1431
- if (hadItems) {
1432
- trigger(target, "clear", void 0, void 0, oldTarget);
1433
- }
1434
- return result;
1435
- }
1436
- function createForEach(isReadonly2, isShallow2) {
1437
- return function forEach(callback, thisArg) {
1438
- const observed = this;
1439
- const target = observed["__v_raw"];
1440
- const rawTarget = toRaw(target);
1441
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1442
- !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
1443
- return target.forEach((value, key) => {
1444
- return callback.call(thisArg, wrap(value), wrap(key), observed);
1445
- });
1446
- };
1447
- }
1448
1340
  function createIterableMethod(method, isReadonly2, isShallow2) {
1449
1341
  return function(...args) {
1450
1342
  const target = this["__v_raw"];
@@ -1487,71 +1379,134 @@ function createReadonlyMethod(type) {
1487
1379
  return type === "delete" ? false : type === "clear" ? void 0 : this;
1488
1380
  };
1489
1381
  }
1490
- function createInstrumentations() {
1491
- const mutableInstrumentations2 = {
1382
+ function createInstrumentations(readonly, shallow) {
1383
+ const instrumentations = {
1492
1384
  get(key) {
1493
- return get(this, key);
1494
- },
1495
- get size() {
1496
- return size(this);
1497
- },
1498
- has,
1499
- add,
1500
- set,
1501
- delete: deleteEntry,
1502
- clear,
1503
- forEach: createForEach(false, false)
1504
- };
1505
- const shallowInstrumentations2 = {
1506
- get(key) {
1507
- return get(this, key, false, true);
1508
- },
1509
- get size() {
1510
- return size(this);
1511
- },
1512
- has,
1513
- add(value) {
1514
- return add.call(this, value, true);
1515
- },
1516
- set(key, value) {
1517
- return set.call(this, key, value, true);
1518
- },
1519
- delete: deleteEntry,
1520
- clear,
1521
- forEach: createForEach(false, true)
1522
- };
1523
- const readonlyInstrumentations2 = {
1524
- get(key) {
1525
- return get(this, key, true);
1526
- },
1527
- get size() {
1528
- return size(this, true);
1529
- },
1530
- has(key) {
1531
- return has.call(this, key, true);
1532
- },
1533
- add: createReadonlyMethod("add"),
1534
- set: createReadonlyMethod("set"),
1535
- delete: createReadonlyMethod("delete"),
1536
- clear: createReadonlyMethod("clear"),
1537
- forEach: createForEach(true, false)
1538
- };
1539
- const shallowReadonlyInstrumentations2 = {
1540
- get(key) {
1541
- return get(this, key, true, true);
1385
+ const target = this["__v_raw"];
1386
+ const rawTarget = toRaw(target);
1387
+ const rawKey = toRaw(key);
1388
+ if (!readonly) {
1389
+ if (hasChanged(key, rawKey)) {
1390
+ track(rawTarget, "get", key);
1391
+ }
1392
+ track(rawTarget, "get", rawKey);
1393
+ }
1394
+ const { has } = getProto(rawTarget);
1395
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1396
+ if (has.call(rawTarget, key)) {
1397
+ return wrap(target.get(key));
1398
+ } else if (has.call(rawTarget, rawKey)) {
1399
+ return wrap(target.get(rawKey));
1400
+ } else if (target !== rawTarget) {
1401
+ target.get(key);
1402
+ }
1542
1403
  },
1543
1404
  get size() {
1544
- return size(this, true);
1405
+ const target = this["__v_raw"];
1406
+ !readonly && track(toRaw(target), "iterate", ITERATE_KEY);
1407
+ return Reflect.get(target, "size", target);
1545
1408
  },
1546
1409
  has(key) {
1547
- return has.call(this, key, true);
1410
+ const target = this["__v_raw"];
1411
+ const rawTarget = toRaw(target);
1412
+ const rawKey = toRaw(key);
1413
+ if (!readonly) {
1414
+ if (hasChanged(key, rawKey)) {
1415
+ track(rawTarget, "has", key);
1416
+ }
1417
+ track(rawTarget, "has", rawKey);
1418
+ }
1419
+ return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1548
1420
  },
1549
- add: createReadonlyMethod("add"),
1550
- set: createReadonlyMethod("set"),
1551
- delete: createReadonlyMethod("delete"),
1552
- clear: createReadonlyMethod("clear"),
1553
- forEach: createForEach(true, true)
1421
+ forEach(callback, thisArg) {
1422
+ const observed = this;
1423
+ const target = observed["__v_raw"];
1424
+ const rawTarget = toRaw(target);
1425
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1426
+ !readonly && track(rawTarget, "iterate", ITERATE_KEY);
1427
+ return target.forEach((value, key) => {
1428
+ return callback.call(thisArg, wrap(value), wrap(key), observed);
1429
+ });
1430
+ }
1554
1431
  };
1432
+ extend(
1433
+ instrumentations,
1434
+ readonly ? {
1435
+ add: createReadonlyMethod("add"),
1436
+ set: createReadonlyMethod("set"),
1437
+ delete: createReadonlyMethod("delete"),
1438
+ clear: createReadonlyMethod("clear")
1439
+ } : {
1440
+ add(value) {
1441
+ if (!shallow && !isShallow(value) && !isReadonly(value)) {
1442
+ value = toRaw(value);
1443
+ }
1444
+ const target = toRaw(this);
1445
+ const proto = getProto(target);
1446
+ const hadKey = proto.has.call(target, value);
1447
+ if (!hadKey) {
1448
+ target.add(value);
1449
+ trigger(target, "add", value, value);
1450
+ }
1451
+ return this;
1452
+ },
1453
+ set(key, value) {
1454
+ if (!shallow && !isShallow(value) && !isReadonly(value)) {
1455
+ value = toRaw(value);
1456
+ }
1457
+ const target = toRaw(this);
1458
+ const { has, get } = getProto(target);
1459
+ let hadKey = has.call(target, key);
1460
+ if (!hadKey) {
1461
+ key = toRaw(key);
1462
+ hadKey = has.call(target, key);
1463
+ } else {
1464
+ checkIdentityKeys(target, has, key);
1465
+ }
1466
+ const oldValue = get.call(target, key);
1467
+ target.set(key, value);
1468
+ if (!hadKey) {
1469
+ trigger(target, "add", key, value);
1470
+ } else if (hasChanged(value, oldValue)) {
1471
+ trigger(target, "set", key, value, oldValue);
1472
+ }
1473
+ return this;
1474
+ },
1475
+ delete(key) {
1476
+ const target = toRaw(this);
1477
+ const { has, get } = getProto(target);
1478
+ let hadKey = has.call(target, key);
1479
+ if (!hadKey) {
1480
+ key = toRaw(key);
1481
+ hadKey = has.call(target, key);
1482
+ } else {
1483
+ checkIdentityKeys(target, has, key);
1484
+ }
1485
+ const oldValue = get ? get.call(target, key) : void 0;
1486
+ const result = target.delete(key);
1487
+ if (hadKey) {
1488
+ trigger(target, "delete", key, void 0, oldValue);
1489
+ }
1490
+ return result;
1491
+ },
1492
+ clear() {
1493
+ const target = toRaw(this);
1494
+ const hadItems = target.size !== 0;
1495
+ const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
1496
+ const result = target.clear();
1497
+ if (hadItems) {
1498
+ trigger(
1499
+ target,
1500
+ "clear",
1501
+ void 0,
1502
+ void 0,
1503
+ oldTarget
1504
+ );
1505
+ }
1506
+ return result;
1507
+ }
1508
+ }
1509
+ );
1555
1510
  const iteratorMethods = [
1556
1511
  "keys",
1557
1512
  "values",
@@ -1559,30 +1514,12 @@ function createInstrumentations() {
1559
1514
  Symbol.iterator
1560
1515
  ];
1561
1516
  iteratorMethods.forEach((method) => {
1562
- mutableInstrumentations2[method] = createIterableMethod(method, false, false);
1563
- readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
1564
- shallowInstrumentations2[method] = createIterableMethod(method, false, true);
1565
- shallowReadonlyInstrumentations2[method] = createIterableMethod(
1566
- method,
1567
- true,
1568
- true
1569
- );
1517
+ instrumentations[method] = createIterableMethod(method, readonly, shallow);
1570
1518
  });
1571
- return [
1572
- mutableInstrumentations2,
1573
- readonlyInstrumentations2,
1574
- shallowInstrumentations2,
1575
- shallowReadonlyInstrumentations2
1576
- ];
1519
+ return instrumentations;
1577
1520
  }
1578
- const [
1579
- mutableInstrumentations,
1580
- readonlyInstrumentations,
1581
- shallowInstrumentations,
1582
- shallowReadonlyInstrumentations
1583
- ] = /* @__PURE__ */ createInstrumentations();
1584
1521
  function createInstrumentationGetter(isReadonly2, shallow) {
1585
- const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
1522
+ const instrumentations = createInstrumentations(isReadonly2, shallow);
1586
1523
  return (target, key, receiver) => {
1587
1524
  if (key === "__v_isReactive") {
1588
1525
  return !isReadonly2;
@@ -1610,9 +1547,9 @@ const readonlyCollectionHandlers = {
1610
1547
  const shallowReadonlyCollectionHandlers = {
1611
1548
  get: /* @__PURE__ */ createInstrumentationGetter(true, true)
1612
1549
  };
1613
- function checkIdentityKeys(target, has2, key) {
1550
+ function checkIdentityKeys(target, has, key) {
1614
1551
  const rawKey = toRaw(key);
1615
- if (rawKey !== key && has2.call(target, rawKey)) {
1552
+ if (rawKey !== key && has.call(target, rawKey)) {
1616
1553
  const type = toRawType(target);
1617
1554
  warn$2(
1618
1555
  `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
@@ -2093,7 +2030,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2093
2030
  const scope = getCurrentScope();
2094
2031
  const watchHandle = () => {
2095
2032
  effect.stop();
2096
- if (scope) {
2033
+ if (scope && scope.active) {
2097
2034
  remove(scope.effects, effect);
2098
2035
  }
2099
2036
  };
@@ -3566,7 +3503,7 @@ const TeleportImpl = {
3566
3503
  }
3567
3504
  if (!disabled) {
3568
3505
  mount(target, targetAnchor);
3569
- updateCssVars(n2);
3506
+ updateCssVars(n2, false);
3570
3507
  }
3571
3508
  } else if (!disabled) {
3572
3509
  warn$1(
@@ -3578,14 +3515,35 @@ const TeleportImpl = {
3578
3515
  };
3579
3516
  if (disabled) {
3580
3517
  mount(container, mainAnchor);
3581
- updateCssVars(n2);
3518
+ updateCssVars(n2, true);
3582
3519
  }
3583
3520
  if (isTeleportDeferred(n2.props)) {
3584
- queuePostRenderEffect(mountToTarget, parentSuspense);
3521
+ queuePostRenderEffect(() => {
3522
+ mountToTarget();
3523
+ n2.el.__isMounted = true;
3524
+ }, parentSuspense);
3585
3525
  } else {
3586
3526
  mountToTarget();
3587
3527
  }
3588
3528
  } else {
3529
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3530
+ queuePostRenderEffect(() => {
3531
+ TeleportImpl.process(
3532
+ n1,
3533
+ n2,
3534
+ container,
3535
+ anchor,
3536
+ parentComponent,
3537
+ parentSuspense,
3538
+ namespace,
3539
+ slotScopeIds,
3540
+ optimized,
3541
+ internals
3542
+ );
3543
+ delete n1.el.__isMounted;
3544
+ }, parentSuspense);
3545
+ return;
3546
+ }
3589
3547
  n2.el = n1.el;
3590
3548
  n2.targetStart = n1.targetStart;
3591
3549
  const mainAnchor = n2.anchor = n1.anchor;
@@ -3668,7 +3626,7 @@ const TeleportImpl = {
3668
3626
  );
3669
3627
  }
3670
3628
  }
3671
- updateCssVars(n2);
3629
+ updateCssVars(n2, disabled);
3672
3630
  }
3673
3631
  },
3674
3632
  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
@@ -3736,9 +3694,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
3736
3694
  querySelector
3737
3695
  );
3738
3696
  if (target) {
3697
+ const disabled = isTeleportDisabled(vnode.props);
3739
3698
  const targetNode = target._lpa || target.firstChild;
3740
3699
  if (vnode.shapeFlag & 16) {
3741
- if (isTeleportDisabled(vnode.props)) {
3700
+ if (disabled) {
3742
3701
  vnode.anchor = hydrateChildren(
3743
3702
  nextSibling(node),
3744
3703
  vnode,
@@ -3779,16 +3738,23 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
3779
3738
  );
3780
3739
  }
3781
3740
  }
3782
- updateCssVars(vnode);
3741
+ updateCssVars(vnode, disabled);
3783
3742
  }
3784
3743
  return vnode.anchor && nextSibling(vnode.anchor);
3785
3744
  }
3786
3745
  const Teleport = TeleportImpl;
3787
- function updateCssVars(vnode) {
3746
+ function updateCssVars(vnode, isDisabled) {
3788
3747
  const ctx = vnode.ctx;
3789
3748
  if (ctx && ctx.ut) {
3790
- let node = vnode.targetStart;
3791
- while (node && node !== vnode.targetAnchor) {
3749
+ let node, anchor;
3750
+ if (isDisabled) {
3751
+ node = vnode.el;
3752
+ anchor = vnode.anchor;
3753
+ } else {
3754
+ node = vnode.targetStart;
3755
+ anchor = vnode.targetAnchor;
3756
+ }
3757
+ while (node && node !== anchor) {
3792
3758
  if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
3793
3759
  node = node.nextSibling;
3794
3760
  }
@@ -3883,10 +3849,9 @@ const BaseTransitionImpl = {
3883
3849
  if (innerChild.type !== Comment) {
3884
3850
  setTransitionHooks(innerChild, enterHooks);
3885
3851
  }
3886
- const oldChild = instance.subTree;
3887
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3852
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3888
3853
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3889
- const leavingHooks = resolveTransitionHooks(
3854
+ let leavingHooks = resolveTransitionHooks(
3890
3855
  oldInnerChild,
3891
3856
  rawProps,
3892
3857
  state,
@@ -3901,6 +3866,7 @@ const BaseTransitionImpl = {
3901
3866
  instance.update();
3902
3867
  }
3903
3868
  delete leavingHooks.afterLeave;
3869
+ oldInnerChild = void 0;
3904
3870
  };
3905
3871
  return emptyPlaceholder(child);
3906
3872
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -3914,10 +3880,19 @@ const BaseTransitionImpl = {
3914
3880
  earlyRemove();
3915
3881
  el[leaveCbKey] = void 0;
3916
3882
  delete enterHooks.delayedLeave;
3883
+ oldInnerChild = void 0;
3884
+ };
3885
+ enterHooks.delayedLeave = () => {
3886
+ delayedLeave();
3887
+ delete enterHooks.delayedLeave;
3888
+ oldInnerChild = void 0;
3917
3889
  };
3918
- enterHooks.delayedLeave = delayedLeave;
3919
3890
  };
3891
+ } else {
3892
+ oldInnerChild = void 0;
3920
3893
  }
3894
+ } else if (oldInnerChild) {
3895
+ oldInnerChild = void 0;
3921
3896
  }
3922
3897
  return child;
3923
3898
  };
@@ -4225,6 +4200,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4225
4200
  return;
4226
4201
  }
4227
4202
  if (isAsyncWrapper(vnode) && !isUnmount) {
4203
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
4204
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
4205
+ }
4228
4206
  return;
4229
4207
  }
4230
4208
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -4241,8 +4219,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4241
4219
  const setupState = owner.setupState;
4242
4220
  const rawSetupState = toRaw(setupState);
4243
4221
  const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
4244
- if (knownTemplateRefs.has(rawSetupState[key])) {
4245
- return false;
4222
+ {
4223
+ if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
4224
+ warn$1(
4225
+ `Template ref "${key}" used on a non-ref value. It will not work in the production build.`
4226
+ );
4227
+ }
4228
+ if (knownTemplateRefs.has(rawSetupState[key])) {
4229
+ return false;
4230
+ }
4246
4231
  }
4247
4232
  return hasOwn(rawSetupState, key);
4248
4233
  };
@@ -4482,7 +4467,7 @@ function createHydrationFunctions(rendererInternals) {
4482
4467
  getContainerType(container),
4483
4468
  optimized
4484
4469
  );
4485
- if (isAsyncWrapper(vnode)) {
4470
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
4486
4471
  let subTree;
4487
4472
  if (isFragmentStart) {
4488
4473
  subTree = createVNode(Fragment);
@@ -4539,7 +4524,11 @@ function createHydrationFunctions(rendererInternals) {
4539
4524
  }
4540
4525
  let needCallTransitionHooks = false;
4541
4526
  if (isTemplateNode(el)) {
4542
- needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4527
+ needCallTransitionHooks = needTransition(
4528
+ null,
4529
+ // no need check parentSuspense in hydration
4530
+ transition
4531
+ ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4543
4532
  const content = el.content.firstChild;
4544
4533
  if (needCallTransitionHooks) {
4545
4534
  transition.beforeEnter(content);
@@ -4747,6 +4736,10 @@ Server rendered element contains fewer child nodes than client vdom.`
4747
4736
  getContainerType(container),
4748
4737
  slotScopeIds
4749
4738
  );
4739
+ if (parentComponent) {
4740
+ parentComponent.vnode.el = vnode.el;
4741
+ updateHOCHostEl(parentComponent, vnode.el);
4742
+ }
4750
4743
  return next;
4751
4744
  };
4752
4745
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -4932,6 +4925,8 @@ function isMismatchAllowed(el, allowedType) {
4932
4925
  }
4933
4926
  }
4934
4927
 
4928
+ const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
4929
+ const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
4935
4930
  const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
4936
4931
  const id = requestIdleCallback(hydrate, { timeout });
4937
4932
  return () => cancelIdleCallback(id);
@@ -5925,12 +5920,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
5925
5920
  }
5926
5921
  openBlock();
5927
5922
  const validSlotContent = slot && ensureValidVNode(slot(props));
5923
+ const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
5924
+ // key attached in the `createSlots` helper, respect that
5925
+ validSlotContent && validSlotContent.key;
5928
5926
  const rendered = createBlock(
5929
5927
  Fragment,
5930
5928
  {
5931
- key: (props.key || // slot content array of a dynamic conditional slot may have a branch
5932
- // key attached in the `createSlots` helper, respect that
5933
- validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
5929
+ key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
5934
5930
  (!validSlotContent && fallback ? "_fb" : "")
5935
5931
  },
5936
5932
  validSlotContent || (fallback ? fallback() : []),
@@ -7099,7 +7095,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7099
7095
  return vm;
7100
7096
  }
7101
7097
  }
7102
- Vue.version = `2.6.14-compat:${"3.5.11"}`;
7098
+ Vue.version = `2.6.14-compat:${"3.5.13"}`;
7103
7099
  Vue.config = singletonApp.config;
7104
7100
  Vue.use = (plugin, ...options) => {
7105
7101
  if (plugin && isFunction(plugin.install)) {
@@ -8087,6 +8083,7 @@ function getType(ctor) {
8087
8083
  function validateProps(rawProps, props, instance) {
8088
8084
  const resolvedValues = toRaw(props);
8089
8085
  const options = instance.propsOptions[0];
8086
+ const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
8090
8087
  for (const key in options) {
8091
8088
  let opt = options[key];
8092
8089
  if (opt == null) continue;
@@ -8095,7 +8092,7 @@ function validateProps(rawProps, props, instance) {
8095
8092
  resolvedValues[key],
8096
8093
  opt,
8097
8094
  shallowReadonly(resolvedValues) ,
8098
- !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
8095
+ !camelizePropsKey.includes(key)
8099
8096
  );
8100
8097
  }
8101
8098
  }
@@ -9909,14 +9906,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
9909
9906
  }
9910
9907
  const baseWatchOptions = extend({}, options);
9911
9908
  baseWatchOptions.onWarn = warn$1;
9909
+ const runsImmediately = cb && immediate || !cb && flush !== "post";
9912
9910
  let ssrCleanup;
9913
9911
  if (isInSSRComponentSetup) {
9914
9912
  if (flush === "sync") {
9915
9913
  const ctx = useSSRContext();
9916
9914
  ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
9917
- } else if (!cb || immediate) {
9918
- baseWatchOptions.once = true;
9919
- } else {
9915
+ } else if (!runsImmediately) {
9920
9916
  const watchStopHandle = () => {
9921
9917
  };
9922
9918
  watchStopHandle.stop = NOOP;
@@ -9955,7 +9951,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
9955
9951
  }
9956
9952
  };
9957
9953
  const watchHandle = watch$1(source, cb, baseWatchOptions);
9958
- if (ssrCleanup) ssrCleanup.push(watchHandle);
9954
+ if (isInSSRComponentSetup) {
9955
+ if (ssrCleanup) {
9956
+ ssrCleanup.push(watchHandle);
9957
+ } else if (runsImmediately) {
9958
+ watchHandle();
9959
+ }
9960
+ }
9959
9961
  return watchHandle;
9960
9962
  }
9961
9963
  function instanceWatch(source, value, options) {
@@ -9990,19 +9992,19 @@ function useModel(props, name, options = EMPTY_OBJ) {
9990
9992
  warn$1(`useModel() called without active instance.`);
9991
9993
  return ref();
9992
9994
  }
9993
- if (!i.propsOptions[0][name]) {
9995
+ const camelizedName = camelize(name);
9996
+ if (!i.propsOptions[0][camelizedName]) {
9994
9997
  warn$1(`useModel() called with prop "${name}" which is not declared.`);
9995
9998
  return ref();
9996
9999
  }
9997
- const camelizedName = camelize(name);
9998
10000
  const hyphenatedName = hyphenate(name);
9999
- const modifiers = getModelModifiers(props, name);
10001
+ const modifiers = getModelModifiers(props, camelizedName);
10000
10002
  const res = customRef((track, trigger) => {
10001
10003
  let localValue;
10002
10004
  let prevSetValue = EMPTY_OBJ;
10003
10005
  let prevEmittedValue;
10004
10006
  watchSyncEffect(() => {
10005
- const propValue = props[name];
10007
+ const propValue = props[camelizedName];
10006
10008
  if (hasChanged(localValue, propValue)) {
10007
10009
  localValue = propValue;
10008
10010
  trigger();
@@ -10308,7 +10310,7 @@ function renderComponentRoot(instance) {
10308
10310
  }
10309
10311
  if (extraAttrs.length) {
10310
10312
  warn$1(
10311
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
10313
+ `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
10312
10314
  );
10313
10315
  }
10314
10316
  if (eventAttrs.length) {
@@ -11169,9 +11171,9 @@ function closeBlock() {
11169
11171
  currentBlock = blockStack[blockStack.length - 1] || null;
11170
11172
  }
11171
11173
  let isBlockTreeEnabled = 1;
11172
- function setBlockTracking(value) {
11174
+ function setBlockTracking(value, inVOnce = false) {
11173
11175
  isBlockTreeEnabled += value;
11174
- if (value < 0 && currentBlock) {
11176
+ if (value < 0 && currentBlock && inVOnce) {
11175
11177
  currentBlock.hasOnce = true;
11176
11178
  }
11177
11179
  }
@@ -11724,9 +11726,9 @@ function setupStatefulComponent(instance, isSSR) {
11724
11726
  }
11725
11727
  const { setup } = Component;
11726
11728
  if (setup) {
11729
+ pauseTracking();
11727
11730
  const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
11728
11731
  const reset = setCurrentInstance(instance);
11729
- pauseTracking();
11730
11732
  const setupResult = callWithErrorHandling(
11731
11733
  setup,
11732
11734
  instance,
@@ -11736,10 +11738,13 @@ function setupStatefulComponent(instance, isSSR) {
11736
11738
  setupContext
11737
11739
  ]
11738
11740
  );
11741
+ const isAsyncSetup = isPromise(setupResult);
11739
11742
  resetTracking();
11740
11743
  reset();
11741
- if (isPromise(setupResult)) {
11742
- if (!isAsyncWrapper(instance)) markAsyncBoundary(instance);
11744
+ if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
11745
+ markAsyncBoundary(instance);
11746
+ }
11747
+ if (isAsyncSetup) {
11743
11748
  setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
11744
11749
  if (isSSR) {
11745
11750
  return setupResult.then((resolvedResult) => {
@@ -12214,7 +12219,7 @@ function isMemoSame(cached, memo) {
12214
12219
  return true;
12215
12220
  }
12216
12221
 
12217
- const version = "3.5.11";
12222
+ const version = "3.5.13";
12218
12223
  const warn = warn$1 ;
12219
12224
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12220
12225
  const devtools = devtools$1 ;
@@ -12424,7 +12429,8 @@ function resolveTransitionProps(rawProps) {
12424
12429
  onAppear = onEnter,
12425
12430
  onAppearCancelled = onEnterCancelled
12426
12431
  } = baseProps;
12427
- const finishEnter = (el, isAppear, done) => {
12432
+ const finishEnter = (el, isAppear, done, isCancelled) => {
12433
+ el._enterCancelled = isCancelled;
12428
12434
  removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
12429
12435
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
12430
12436
  done && done();
@@ -12482,8 +12488,13 @@ function resolveTransitionProps(rawProps) {
12482
12488
  if (legacyClassEnabled && legacyLeaveFromClass) {
12483
12489
  addTransitionClass(el, legacyLeaveFromClass);
12484
12490
  }
12485
- addTransitionClass(el, leaveActiveClass);
12486
- forceReflow();
12491
+ if (!el._enterCancelled) {
12492
+ forceReflow();
12493
+ addTransitionClass(el, leaveActiveClass);
12494
+ } else {
12495
+ addTransitionClass(el, leaveActiveClass);
12496
+ forceReflow();
12497
+ }
12487
12498
  nextFrame(() => {
12488
12499
  if (!el._isLeaving) {
12489
12500
  return;
@@ -12500,11 +12511,11 @@ function resolveTransitionProps(rawProps) {
12500
12511
  callHook(onLeave, [el, resolve]);
12501
12512
  },
12502
12513
  onEnterCancelled(el) {
12503
- finishEnter(el, false);
12514
+ finishEnter(el, false, void 0, true);
12504
12515
  callHook(onEnterCancelled, [el]);
12505
12516
  },
12506
12517
  onAppearCancelled(el) {
12507
- finishEnter(el, true);
12518
+ finishEnter(el, true, void 0, true);
12508
12519
  callHook(onAppearCancelled, [el]);
12509
12520
  },
12510
12521
  onLeaveCancelled(el) {
@@ -12724,10 +12735,11 @@ function useCssVars(getter) {
12724
12735
  }
12725
12736
  updateTeleports(vars);
12726
12737
  };
12727
- onBeforeMount(() => {
12728
- watchPostEffect(setVars);
12738
+ onBeforeUpdate(() => {
12739
+ queuePostFlushCb(setVars);
12729
12740
  });
12730
12741
  onMounted(() => {
12742
+ watch(setVars, NOOP, { flush: "post" });
12731
12743
  const ob = new MutationObserver(setVars);
12732
12744
  ob.observe(instance.subTree.el.parentNode, { childList: true });
12733
12745
  onUnmounted(() => ob.disconnect());
@@ -12919,7 +12931,7 @@ function compatCoerceAttr(el, key, value, instance = null) {
12919
12931
  return false;
12920
12932
  }
12921
12933
 
12922
- function patchDOMProp(el, key, value, parentComponent) {
12934
+ function patchDOMProp(el, key, value, parentComponent, attrName) {
12923
12935
  if (key === "innerHTML" || key === "textContent") {
12924
12936
  if (value != null) {
12925
12937
  el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
@@ -12983,7 +12995,7 @@ function patchDOMProp(el, key, value, parentComponent) {
12983
12995
  );
12984
12996
  }
12985
12997
  }
12986
- needRemove && el.removeAttribute(key);
12998
+ needRemove && el.removeAttribute(attrName || key);
12987
12999
  }
12988
13000
 
12989
13001
  function addEventListener(el, event, handler, options) {
@@ -13093,7 +13105,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
13093
13105
  // #11081 force set props for possible async custom element
13094
13106
  el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
13095
13107
  ) {
13096
- patchDOMProp(el, camelize(key), nextValue, parentComponent);
13108
+ patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
13097
13109
  } else {
13098
13110
  if (key === "true-value") {
13099
13111
  el._trueValue = nextValue;
@@ -13378,6 +13390,8 @@ class VueElement extends BaseClass {
13378
13390
  this._update();
13379
13391
  }
13380
13392
  if (shouldReflect) {
13393
+ const ob = this._ob;
13394
+ ob && ob.disconnect();
13381
13395
  if (val === true) {
13382
13396
  this.setAttribute(hyphenate(key), "");
13383
13397
  } else if (typeof val === "string" || typeof val === "number") {
@@ -13385,6 +13399,7 @@ class VueElement extends BaseClass {
13385
13399
  } else if (!val) {
13386
13400
  this.removeAttribute(hyphenate(key));
13387
13401
  }
13402
+ ob && ob.observe(this, { attributes: true });
13388
13403
  }
13389
13404
  }
13390
13405
  }
@@ -13820,7 +13835,7 @@ const vModelCheckbox = {
13820
13835
  setChecked(el, binding, vnode);
13821
13836
  }
13822
13837
  };
13823
- function setChecked(el, { value }, vnode) {
13838
+ function setChecked(el, { value, oldValue }, vnode) {
13824
13839
  el._modelValue = value;
13825
13840
  let checked;
13826
13841
  if (isArray(value)) {
@@ -13828,6 +13843,7 @@ function setChecked(el, { value }, vnode) {
13828
13843
  } else if (isSet(value)) {
13829
13844
  checked = value.has(vnode.props.value);
13830
13845
  } else {
13846
+ if (value === oldValue) return;
13831
13847
  checked = looseEqual(value, getCheckboxValue(el, true));
13832
13848
  }
13833
13849
  if (el.checked !== checked) {