@vue/runtime-dom 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/runtime-dom v3.5.11
2
+ * @vue/runtime-dom v3.5.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -144,10 +144,9 @@ var VueRuntimeDOM = (function (exports) {
144
144
  return ret;
145
145
  }
146
146
  function stringifyStyle(styles) {
147
+ if (!styles) return "";
148
+ if (isString(styles)) return styles;
147
149
  let ret = "";
148
- if (!styles || isString(styles)) {
149
- return ret;
150
- }
151
150
  for (const key in styles) {
152
151
  const value = styles[key];
153
152
  if (isString(value) || typeof value === "number") {
@@ -408,17 +407,21 @@ var VueRuntimeDOM = (function (exports) {
408
407
  }
409
408
  stop(fromParent) {
410
409
  if (this._active) {
410
+ this._active = false;
411
411
  let i, l;
412
412
  for (i = 0, l = this.effects.length; i < l; i++) {
413
413
  this.effects[i].stop();
414
414
  }
415
+ this.effects.length = 0;
415
416
  for (i = 0, l = this.cleanups.length; i < l; i++) {
416
417
  this.cleanups[i]();
417
418
  }
419
+ this.cleanups.length = 0;
418
420
  if (this.scopes) {
419
421
  for (i = 0, l = this.scopes.length; i < l; i++) {
420
422
  this.scopes[i].stop(true);
421
423
  }
424
+ this.scopes.length = 0;
422
425
  }
423
426
  if (!this.detached && this.parent && !fromParent) {
424
427
  const last = this.parent.scopes.pop();
@@ -428,7 +431,6 @@ var VueRuntimeDOM = (function (exports) {
428
431
  }
429
432
  }
430
433
  this.parent = void 0;
431
- this._active = false;
432
434
  }
433
435
  }
434
436
  }
@@ -693,16 +695,16 @@ var VueRuntimeDOM = (function (exports) {
693
695
  nextSub.prevSub = prevSub;
694
696
  link.nextSub = void 0;
695
697
  }
696
- if (dep.subs === link) {
697
- dep.subs = prevSub;
698
- }
699
698
  if (dep.subsHead === link) {
700
699
  dep.subsHead = nextSub;
701
700
  }
702
- if (!dep.subs && dep.computed) {
703
- dep.computed.flags &= ~4;
704
- for (let l = dep.computed.deps; l; l = l.nextDep) {
705
- removeSub(l, true);
701
+ if (dep.subs === link) {
702
+ dep.subs = prevSub;
703
+ if (!prevSub && dep.computed) {
704
+ dep.computed.flags &= ~4;
705
+ for (let l = dep.computed.deps; l; l = l.nextDep) {
706
+ removeSub(l, true);
707
+ }
706
708
  }
707
709
  }
708
710
  if (!soft && !--dep.sc && dep.map) {
@@ -962,7 +964,7 @@ var VueRuntimeDOM = (function (exports) {
962
964
  }
963
965
  });
964
966
  } else {
965
- if (key !== void 0) {
967
+ if (key !== void 0 || depsMap.has(void 0)) {
966
968
  run(depsMap.get(key));
967
969
  }
968
970
  if (isArrayIndex) {
@@ -1194,6 +1196,7 @@ var VueRuntimeDOM = (function (exports) {
1194
1196
  this._isShallow = _isShallow;
1195
1197
  }
1196
1198
  get(target, key, receiver) {
1199
+ if (key === "__v_skip") return target["__v_skip"];
1197
1200
  const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1198
1201
  if (key === "__v_isReactive") {
1199
1202
  return !isReadonly2;
@@ -1337,117 +1340,6 @@ var VueRuntimeDOM = (function (exports) {
1337
1340
 
1338
1341
  const toShallow = (value) => value;
1339
1342
  const getProto = (v) => Reflect.getPrototypeOf(v);
1340
- function get(target, key, isReadonly2 = false, isShallow2 = false) {
1341
- target = target["__v_raw"];
1342
- const rawTarget = toRaw(target);
1343
- const rawKey = toRaw(key);
1344
- if (!isReadonly2) {
1345
- if (hasChanged(key, rawKey)) {
1346
- track(rawTarget, "get", key);
1347
- }
1348
- track(rawTarget, "get", rawKey);
1349
- }
1350
- const { has: has2 } = getProto(rawTarget);
1351
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1352
- if (has2.call(rawTarget, key)) {
1353
- return wrap(target.get(key));
1354
- } else if (has2.call(rawTarget, rawKey)) {
1355
- return wrap(target.get(rawKey));
1356
- } else if (target !== rawTarget) {
1357
- target.get(key);
1358
- }
1359
- }
1360
- function has(key, isReadonly2 = false) {
1361
- const target = this["__v_raw"];
1362
- const rawTarget = toRaw(target);
1363
- const rawKey = toRaw(key);
1364
- if (!isReadonly2) {
1365
- if (hasChanged(key, rawKey)) {
1366
- track(rawTarget, "has", key);
1367
- }
1368
- track(rawTarget, "has", rawKey);
1369
- }
1370
- return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1371
- }
1372
- function size(target, isReadonly2 = false) {
1373
- target = target["__v_raw"];
1374
- !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
1375
- return Reflect.get(target, "size", target);
1376
- }
1377
- function add(value, _isShallow = false) {
1378
- if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
1379
- value = toRaw(value);
1380
- }
1381
- const target = toRaw(this);
1382
- const proto = getProto(target);
1383
- const hadKey = proto.has.call(target, value);
1384
- if (!hadKey) {
1385
- target.add(value);
1386
- trigger(target, "add", value, value);
1387
- }
1388
- return this;
1389
- }
1390
- function set(key, value, _isShallow = false) {
1391
- if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
1392
- value = toRaw(value);
1393
- }
1394
- const target = toRaw(this);
1395
- const { has: has2, get: get2 } = getProto(target);
1396
- let hadKey = has2.call(target, key);
1397
- if (!hadKey) {
1398
- key = toRaw(key);
1399
- hadKey = has2.call(target, key);
1400
- } else {
1401
- checkIdentityKeys(target, has2, key);
1402
- }
1403
- const oldValue = get2.call(target, key);
1404
- target.set(key, value);
1405
- if (!hadKey) {
1406
- trigger(target, "add", key, value);
1407
- } else if (hasChanged(value, oldValue)) {
1408
- trigger(target, "set", key, value, oldValue);
1409
- }
1410
- return this;
1411
- }
1412
- function deleteEntry(key) {
1413
- const target = toRaw(this);
1414
- const { has: has2, get: get2 } = getProto(target);
1415
- let hadKey = has2.call(target, key);
1416
- if (!hadKey) {
1417
- key = toRaw(key);
1418
- hadKey = has2.call(target, key);
1419
- } else {
1420
- checkIdentityKeys(target, has2, key);
1421
- }
1422
- const oldValue = get2 ? get2.call(target, key) : void 0;
1423
- const result = target.delete(key);
1424
- if (hadKey) {
1425
- trigger(target, "delete", key, void 0, oldValue);
1426
- }
1427
- return result;
1428
- }
1429
- function clear() {
1430
- const target = toRaw(this);
1431
- const hadItems = target.size !== 0;
1432
- const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
1433
- const result = target.clear();
1434
- if (hadItems) {
1435
- trigger(target, "clear", void 0, void 0, oldTarget);
1436
- }
1437
- return result;
1438
- }
1439
- function createForEach(isReadonly2, isShallow2) {
1440
- return function forEach(callback, thisArg) {
1441
- const observed = this;
1442
- const target = observed["__v_raw"];
1443
- const rawTarget = toRaw(target);
1444
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1445
- !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
1446
- return target.forEach((value, key) => {
1447
- return callback.call(thisArg, wrap(value), wrap(key), observed);
1448
- });
1449
- };
1450
- }
1451
1343
  function createIterableMethod(method, isReadonly2, isShallow2) {
1452
1344
  return function(...args) {
1453
1345
  const target = this["__v_raw"];
@@ -1490,71 +1382,134 @@ var VueRuntimeDOM = (function (exports) {
1490
1382
  return type === "delete" ? false : type === "clear" ? void 0 : this;
1491
1383
  };
1492
1384
  }
1493
- function createInstrumentations() {
1494
- const mutableInstrumentations2 = {
1385
+ function createInstrumentations(readonly, shallow) {
1386
+ const instrumentations = {
1495
1387
  get(key) {
1496
- return get(this, key);
1497
- },
1498
- get size() {
1499
- return size(this);
1500
- },
1501
- has,
1502
- add,
1503
- set,
1504
- delete: deleteEntry,
1505
- clear,
1506
- forEach: createForEach(false, false)
1507
- };
1508
- const shallowInstrumentations2 = {
1509
- get(key) {
1510
- return get(this, key, false, true);
1511
- },
1512
- get size() {
1513
- return size(this);
1514
- },
1515
- has,
1516
- add(value) {
1517
- return add.call(this, value, true);
1518
- },
1519
- set(key, value) {
1520
- return set.call(this, key, value, true);
1521
- },
1522
- delete: deleteEntry,
1523
- clear,
1524
- forEach: createForEach(false, true)
1525
- };
1526
- const readonlyInstrumentations2 = {
1527
- get(key) {
1528
- return get(this, key, true);
1529
- },
1530
- get size() {
1531
- return size(this, true);
1532
- },
1533
- has(key) {
1534
- return has.call(this, key, true);
1535
- },
1536
- add: createReadonlyMethod("add"),
1537
- set: createReadonlyMethod("set"),
1538
- delete: createReadonlyMethod("delete"),
1539
- clear: createReadonlyMethod("clear"),
1540
- forEach: createForEach(true, false)
1541
- };
1542
- const shallowReadonlyInstrumentations2 = {
1543
- get(key) {
1544
- return get(this, key, true, true);
1388
+ const target = this["__v_raw"];
1389
+ const rawTarget = toRaw(target);
1390
+ const rawKey = toRaw(key);
1391
+ if (!readonly) {
1392
+ if (hasChanged(key, rawKey)) {
1393
+ track(rawTarget, "get", key);
1394
+ }
1395
+ track(rawTarget, "get", rawKey);
1396
+ }
1397
+ const { has } = getProto(rawTarget);
1398
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1399
+ if (has.call(rawTarget, key)) {
1400
+ return wrap(target.get(key));
1401
+ } else if (has.call(rawTarget, rawKey)) {
1402
+ return wrap(target.get(rawKey));
1403
+ } else if (target !== rawTarget) {
1404
+ target.get(key);
1405
+ }
1545
1406
  },
1546
1407
  get size() {
1547
- return size(this, true);
1408
+ const target = this["__v_raw"];
1409
+ !readonly && track(toRaw(target), "iterate", ITERATE_KEY);
1410
+ return Reflect.get(target, "size", target);
1548
1411
  },
1549
1412
  has(key) {
1550
- return has.call(this, key, true);
1413
+ const target = this["__v_raw"];
1414
+ const rawTarget = toRaw(target);
1415
+ const rawKey = toRaw(key);
1416
+ if (!readonly) {
1417
+ if (hasChanged(key, rawKey)) {
1418
+ track(rawTarget, "has", key);
1419
+ }
1420
+ track(rawTarget, "has", rawKey);
1421
+ }
1422
+ return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1551
1423
  },
1552
- add: createReadonlyMethod("add"),
1553
- set: createReadonlyMethod("set"),
1554
- delete: createReadonlyMethod("delete"),
1555
- clear: createReadonlyMethod("clear"),
1556
- forEach: createForEach(true, true)
1424
+ forEach(callback, thisArg) {
1425
+ const observed = this;
1426
+ const target = observed["__v_raw"];
1427
+ const rawTarget = toRaw(target);
1428
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1429
+ !readonly && track(rawTarget, "iterate", ITERATE_KEY);
1430
+ return target.forEach((value, key) => {
1431
+ return callback.call(thisArg, wrap(value), wrap(key), observed);
1432
+ });
1433
+ }
1557
1434
  };
1435
+ extend(
1436
+ instrumentations,
1437
+ readonly ? {
1438
+ add: createReadonlyMethod("add"),
1439
+ set: createReadonlyMethod("set"),
1440
+ delete: createReadonlyMethod("delete"),
1441
+ clear: createReadonlyMethod("clear")
1442
+ } : {
1443
+ add(value) {
1444
+ if (!shallow && !isShallow(value) && !isReadonly(value)) {
1445
+ value = toRaw(value);
1446
+ }
1447
+ const target = toRaw(this);
1448
+ const proto = getProto(target);
1449
+ const hadKey = proto.has.call(target, value);
1450
+ if (!hadKey) {
1451
+ target.add(value);
1452
+ trigger(target, "add", value, value);
1453
+ }
1454
+ return this;
1455
+ },
1456
+ set(key, value) {
1457
+ if (!shallow && !isShallow(value) && !isReadonly(value)) {
1458
+ value = toRaw(value);
1459
+ }
1460
+ const target = toRaw(this);
1461
+ const { has, get } = getProto(target);
1462
+ let hadKey = has.call(target, key);
1463
+ if (!hadKey) {
1464
+ key = toRaw(key);
1465
+ hadKey = has.call(target, key);
1466
+ } else {
1467
+ checkIdentityKeys(target, has, key);
1468
+ }
1469
+ const oldValue = get.call(target, key);
1470
+ target.set(key, value);
1471
+ if (!hadKey) {
1472
+ trigger(target, "add", key, value);
1473
+ } else if (hasChanged(value, oldValue)) {
1474
+ trigger(target, "set", key, value, oldValue);
1475
+ }
1476
+ return this;
1477
+ },
1478
+ delete(key) {
1479
+ const target = toRaw(this);
1480
+ const { has, get } = getProto(target);
1481
+ let hadKey = has.call(target, key);
1482
+ if (!hadKey) {
1483
+ key = toRaw(key);
1484
+ hadKey = has.call(target, key);
1485
+ } else {
1486
+ checkIdentityKeys(target, has, key);
1487
+ }
1488
+ const oldValue = get ? get.call(target, key) : void 0;
1489
+ const result = target.delete(key);
1490
+ if (hadKey) {
1491
+ trigger(target, "delete", key, void 0, oldValue);
1492
+ }
1493
+ return result;
1494
+ },
1495
+ clear() {
1496
+ const target = toRaw(this);
1497
+ const hadItems = target.size !== 0;
1498
+ const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
1499
+ const result = target.clear();
1500
+ if (hadItems) {
1501
+ trigger(
1502
+ target,
1503
+ "clear",
1504
+ void 0,
1505
+ void 0,
1506
+ oldTarget
1507
+ );
1508
+ }
1509
+ return result;
1510
+ }
1511
+ }
1512
+ );
1558
1513
  const iteratorMethods = [
1559
1514
  "keys",
1560
1515
  "values",
@@ -1562,30 +1517,12 @@ var VueRuntimeDOM = (function (exports) {
1562
1517
  Symbol.iterator
1563
1518
  ];
1564
1519
  iteratorMethods.forEach((method) => {
1565
- mutableInstrumentations2[method] = createIterableMethod(method, false, false);
1566
- readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
1567
- shallowInstrumentations2[method] = createIterableMethod(method, false, true);
1568
- shallowReadonlyInstrumentations2[method] = createIterableMethod(
1569
- method,
1570
- true,
1571
- true
1572
- );
1520
+ instrumentations[method] = createIterableMethod(method, readonly, shallow);
1573
1521
  });
1574
- return [
1575
- mutableInstrumentations2,
1576
- readonlyInstrumentations2,
1577
- shallowInstrumentations2,
1578
- shallowReadonlyInstrumentations2
1579
- ];
1522
+ return instrumentations;
1580
1523
  }
1581
- const [
1582
- mutableInstrumentations,
1583
- readonlyInstrumentations,
1584
- shallowInstrumentations,
1585
- shallowReadonlyInstrumentations
1586
- ] = /* @__PURE__ */ createInstrumentations();
1587
1524
  function createInstrumentationGetter(isReadonly2, shallow) {
1588
- const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
1525
+ const instrumentations = createInstrumentations(isReadonly2, shallow);
1589
1526
  return (target, key, receiver) => {
1590
1527
  if (key === "__v_isReactive") {
1591
1528
  return !isReadonly2;
@@ -1613,9 +1550,9 @@ var VueRuntimeDOM = (function (exports) {
1613
1550
  const shallowReadonlyCollectionHandlers = {
1614
1551
  get: /* @__PURE__ */ createInstrumentationGetter(true, true)
1615
1552
  };
1616
- function checkIdentityKeys(target, has2, key) {
1553
+ function checkIdentityKeys(target, has, key) {
1617
1554
  const rawKey = toRaw(key);
1618
- if (rawKey !== key && has2.call(target, rawKey)) {
1555
+ if (rawKey !== key && has.call(target, rawKey)) {
1619
1556
  const type = toRawType(target);
1620
1557
  warn$2(
1621
1558
  `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.`
@@ -2096,7 +2033,7 @@ var VueRuntimeDOM = (function (exports) {
2096
2033
  const scope = getCurrentScope();
2097
2034
  const watchHandle = () => {
2098
2035
  effect.stop();
2099
- if (scope) {
2036
+ if (scope && scope.active) {
2100
2037
  remove(scope.effects, effect);
2101
2038
  }
2102
2039
  };
@@ -3041,7 +2978,7 @@ var VueRuntimeDOM = (function (exports) {
3041
2978
  }
3042
2979
  if (!disabled) {
3043
2980
  mount(target, targetAnchor);
3044
- updateCssVars(n2);
2981
+ updateCssVars(n2, false);
3045
2982
  }
3046
2983
  } else if (!disabled) {
3047
2984
  warn$1(
@@ -3053,14 +2990,35 @@ var VueRuntimeDOM = (function (exports) {
3053
2990
  };
3054
2991
  if (disabled) {
3055
2992
  mount(container, mainAnchor);
3056
- updateCssVars(n2);
2993
+ updateCssVars(n2, true);
3057
2994
  }
3058
2995
  if (isTeleportDeferred(n2.props)) {
3059
- queuePostRenderEffect(mountToTarget, parentSuspense);
2996
+ queuePostRenderEffect(() => {
2997
+ mountToTarget();
2998
+ n2.el.__isMounted = true;
2999
+ }, parentSuspense);
3060
3000
  } else {
3061
3001
  mountToTarget();
3062
3002
  }
3063
3003
  } else {
3004
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3005
+ queuePostRenderEffect(() => {
3006
+ TeleportImpl.process(
3007
+ n1,
3008
+ n2,
3009
+ container,
3010
+ anchor,
3011
+ parentComponent,
3012
+ parentSuspense,
3013
+ namespace,
3014
+ slotScopeIds,
3015
+ optimized,
3016
+ internals
3017
+ );
3018
+ delete n1.el.__isMounted;
3019
+ }, parentSuspense);
3020
+ return;
3021
+ }
3064
3022
  n2.el = n1.el;
3065
3023
  n2.targetStart = n1.targetStart;
3066
3024
  const mainAnchor = n2.anchor = n1.anchor;
@@ -3143,7 +3101,7 @@ var VueRuntimeDOM = (function (exports) {
3143
3101
  );
3144
3102
  }
3145
3103
  }
3146
- updateCssVars(n2);
3104
+ updateCssVars(n2, disabled);
3147
3105
  }
3148
3106
  },
3149
3107
  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
@@ -3211,9 +3169,10 @@ var VueRuntimeDOM = (function (exports) {
3211
3169
  querySelector
3212
3170
  );
3213
3171
  if (target) {
3172
+ const disabled = isTeleportDisabled(vnode.props);
3214
3173
  const targetNode = target._lpa || target.firstChild;
3215
3174
  if (vnode.shapeFlag & 16) {
3216
- if (isTeleportDisabled(vnode.props)) {
3175
+ if (disabled) {
3217
3176
  vnode.anchor = hydrateChildren(
3218
3177
  nextSibling(node),
3219
3178
  vnode,
@@ -3254,16 +3213,23 @@ var VueRuntimeDOM = (function (exports) {
3254
3213
  );
3255
3214
  }
3256
3215
  }
3257
- updateCssVars(vnode);
3216
+ updateCssVars(vnode, disabled);
3258
3217
  }
3259
3218
  return vnode.anchor && nextSibling(vnode.anchor);
3260
3219
  }
3261
3220
  const Teleport = TeleportImpl;
3262
- function updateCssVars(vnode) {
3221
+ function updateCssVars(vnode, isDisabled) {
3263
3222
  const ctx = vnode.ctx;
3264
3223
  if (ctx && ctx.ut) {
3265
- let node = vnode.targetStart;
3266
- while (node && node !== vnode.targetAnchor) {
3224
+ let node, anchor;
3225
+ if (isDisabled) {
3226
+ node = vnode.el;
3227
+ anchor = vnode.anchor;
3228
+ } else {
3229
+ node = vnode.targetStart;
3230
+ anchor = vnode.targetAnchor;
3231
+ }
3232
+ while (node && node !== anchor) {
3267
3233
  if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
3268
3234
  node = node.nextSibling;
3269
3235
  }
@@ -3358,10 +3324,9 @@ var VueRuntimeDOM = (function (exports) {
3358
3324
  if (innerChild.type !== Comment) {
3359
3325
  setTransitionHooks(innerChild, enterHooks);
3360
3326
  }
3361
- const oldChild = instance.subTree;
3362
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3327
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3363
3328
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3364
- const leavingHooks = resolveTransitionHooks(
3329
+ let leavingHooks = resolveTransitionHooks(
3365
3330
  oldInnerChild,
3366
3331
  rawProps,
3367
3332
  state,
@@ -3376,6 +3341,7 @@ var VueRuntimeDOM = (function (exports) {
3376
3341
  instance.update();
3377
3342
  }
3378
3343
  delete leavingHooks.afterLeave;
3344
+ oldInnerChild = void 0;
3379
3345
  };
3380
3346
  return emptyPlaceholder(child);
3381
3347
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -3389,10 +3355,19 @@ var VueRuntimeDOM = (function (exports) {
3389
3355
  earlyRemove();
3390
3356
  el[leaveCbKey] = void 0;
3391
3357
  delete enterHooks.delayedLeave;
3358
+ oldInnerChild = void 0;
3359
+ };
3360
+ enterHooks.delayedLeave = () => {
3361
+ delayedLeave();
3362
+ delete enterHooks.delayedLeave;
3363
+ oldInnerChild = void 0;
3392
3364
  };
3393
- enterHooks.delayedLeave = delayedLeave;
3394
3365
  };
3366
+ } else {
3367
+ oldInnerChild = void 0;
3395
3368
  }
3369
+ } else if (oldInnerChild) {
3370
+ oldInnerChild = void 0;
3396
3371
  }
3397
3372
  return child;
3398
3373
  };
@@ -3697,6 +3672,9 @@ var VueRuntimeDOM = (function (exports) {
3697
3672
  return;
3698
3673
  }
3699
3674
  if (isAsyncWrapper(vnode) && !isUnmount) {
3675
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
3676
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
3677
+ }
3700
3678
  return;
3701
3679
  }
3702
3680
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -3713,8 +3691,15 @@ var VueRuntimeDOM = (function (exports) {
3713
3691
  const setupState = owner.setupState;
3714
3692
  const rawSetupState = toRaw(setupState);
3715
3693
  const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
3716
- if (knownTemplateRefs.has(rawSetupState[key])) {
3717
- return false;
3694
+ {
3695
+ if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
3696
+ warn$1(
3697
+ `Template ref "${key}" used on a non-ref value. It will not work in the production build.`
3698
+ );
3699
+ }
3700
+ if (knownTemplateRefs.has(rawSetupState[key])) {
3701
+ return false;
3702
+ }
3718
3703
  }
3719
3704
  return hasOwn(rawSetupState, key);
3720
3705
  };
@@ -3954,7 +3939,7 @@ var VueRuntimeDOM = (function (exports) {
3954
3939
  getContainerType(container),
3955
3940
  optimized
3956
3941
  );
3957
- if (isAsyncWrapper(vnode)) {
3942
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
3958
3943
  let subTree;
3959
3944
  if (isFragmentStart) {
3960
3945
  subTree = createVNode(Fragment);
@@ -4011,7 +3996,11 @@ var VueRuntimeDOM = (function (exports) {
4011
3996
  }
4012
3997
  let needCallTransitionHooks = false;
4013
3998
  if (isTemplateNode(el)) {
4014
- needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
3999
+ needCallTransitionHooks = needTransition(
4000
+ null,
4001
+ // no need check parentSuspense in hydration
4002
+ transition
4003
+ ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4015
4004
  const content = el.content.firstChild;
4016
4005
  if (needCallTransitionHooks) {
4017
4006
  transition.beforeEnter(content);
@@ -4219,6 +4208,10 @@ Server rendered element contains fewer child nodes than client vdom.`
4219
4208
  getContainerType(container),
4220
4209
  slotScopeIds
4221
4210
  );
4211
+ if (parentComponent) {
4212
+ parentComponent.vnode.el = vnode.el;
4213
+ updateHOCHostEl(parentComponent, vnode.el);
4214
+ }
4222
4215
  return next;
4223
4216
  };
4224
4217
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -4404,6 +4397,8 @@ Server rendered element contains fewer child nodes than client vdom.`
4404
4397
  }
4405
4398
  }
4406
4399
 
4400
+ const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
4401
+ const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
4407
4402
  const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
4408
4403
  const id = requestIdleCallback(hydrate, { timeout });
4409
4404
  return () => cancelIdleCallback(id);
@@ -5100,12 +5095,13 @@ If this is a native custom element, make sure to exclude it from component resol
5100
5095
  }
5101
5096
  openBlock();
5102
5097
  const validSlotContent = slot && ensureValidVNode(slot(props));
5098
+ const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
5099
+ // key attached in the `createSlots` helper, respect that
5100
+ validSlotContent && validSlotContent.key;
5103
5101
  const rendered = createBlock(
5104
5102
  Fragment,
5105
5103
  {
5106
- key: (props.key || // slot content array of a dynamic conditional slot may have a branch
5107
- // key attached in the `createSlots` helper, respect that
5108
- validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
5104
+ key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
5109
5105
  (!validSlotContent && fallback ? "_fb" : "")
5110
5106
  },
5111
5107
  validSlotContent || (fallback ? fallback() : []),
@@ -6460,6 +6456,7 @@ If you want to remount the same app, move your app creation logic into a factory
6460
6456
  function validateProps(rawProps, props, instance) {
6461
6457
  const resolvedValues = toRaw(props);
6462
6458
  const options = instance.propsOptions[0];
6459
+ const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
6463
6460
  for (const key in options) {
6464
6461
  let opt = options[key];
6465
6462
  if (opt == null) continue;
@@ -6468,7 +6465,7 @@ If you want to remount the same app, move your app creation logic into a factory
6468
6465
  resolvedValues[key],
6469
6466
  opt,
6470
6467
  shallowReadonly(resolvedValues) ,
6471
- !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
6468
+ !camelizePropsKey.includes(key)
6472
6469
  );
6473
6470
  }
6474
6471
  }
@@ -8306,19 +8303,19 @@ If you want to remount the same app, move your app creation logic into a factory
8306
8303
  warn$1(`useModel() called without active instance.`);
8307
8304
  return ref();
8308
8305
  }
8309
- if (!i.propsOptions[0][name]) {
8306
+ const camelizedName = camelize(name);
8307
+ if (!i.propsOptions[0][camelizedName]) {
8310
8308
  warn$1(`useModel() called with prop "${name}" which is not declared.`);
8311
8309
  return ref();
8312
8310
  }
8313
- const camelizedName = camelize(name);
8314
8311
  const hyphenatedName = hyphenate(name);
8315
- const modifiers = getModelModifiers(props, name);
8312
+ const modifiers = getModelModifiers(props, camelizedName);
8316
8313
  const res = customRef((track, trigger) => {
8317
8314
  let localValue;
8318
8315
  let prevSetValue = EMPTY_OBJ;
8319
8316
  let prevEmittedValue;
8320
8317
  watchSyncEffect(() => {
8321
- const propValue = props[name];
8318
+ const propValue = props[camelizedName];
8322
8319
  if (hasChanged(localValue, propValue)) {
8323
8320
  localValue = propValue;
8324
8321
  trigger();
@@ -8617,7 +8614,7 @@ If you want to remount the same app, move your app creation logic into a factory
8617
8614
  }
8618
8615
  if (extraAttrs.length) {
8619
8616
  warn$1(
8620
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
8617
+ `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.`
8621
8618
  );
8622
8619
  }
8623
8620
  if (eventAttrs.length) {
@@ -9400,9 +9397,9 @@ If you want to remount the same app, move your app creation logic into a factory
9400
9397
  currentBlock = blockStack[blockStack.length - 1] || null;
9401
9398
  }
9402
9399
  let isBlockTreeEnabled = 1;
9403
- function setBlockTracking(value) {
9400
+ function setBlockTracking(value, inVOnce = false) {
9404
9401
  isBlockTreeEnabled += value;
9405
- if (value < 0 && currentBlock) {
9402
+ if (value < 0 && currentBlock && inVOnce) {
9406
9403
  currentBlock.hasOnce = true;
9407
9404
  }
9408
9405
  }
@@ -9933,9 +9930,9 @@ Component that was made reactive: `,
9933
9930
  }
9934
9931
  const { setup } = Component;
9935
9932
  if (setup) {
9933
+ pauseTracking();
9936
9934
  const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
9937
9935
  const reset = setCurrentInstance(instance);
9938
- pauseTracking();
9939
9936
  const setupResult = callWithErrorHandling(
9940
9937
  setup,
9941
9938
  instance,
@@ -9945,10 +9942,13 @@ Component that was made reactive: `,
9945
9942
  setupContext
9946
9943
  ]
9947
9944
  );
9945
+ const isAsyncSetup = isPromise(setupResult);
9948
9946
  resetTracking();
9949
9947
  reset();
9950
- if (isPromise(setupResult)) {
9951
- if (!isAsyncWrapper(instance)) markAsyncBoundary(instance);
9948
+ if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
9949
+ markAsyncBoundary(instance);
9950
+ }
9951
+ if (isAsyncSetup) {
9952
9952
  setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
9953
9953
  if (isSSR) {
9954
9954
  return setupResult.then((resolvedResult) => {
@@ -10409,7 +10409,7 @@ Component that was made reactive: `,
10409
10409
  return true;
10410
10410
  }
10411
10411
 
10412
- const version = "3.5.11";
10412
+ const version = "3.5.13";
10413
10413
  const warn = warn$1 ;
10414
10414
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10415
10415
  const devtools = devtools$1 ;
@@ -10581,7 +10581,8 @@ Component that was made reactive: `,
10581
10581
  onAppear = onEnter,
10582
10582
  onAppearCancelled = onEnterCancelled
10583
10583
  } = baseProps;
10584
- const finishEnter = (el, isAppear, done) => {
10584
+ const finishEnter = (el, isAppear, done, isCancelled) => {
10585
+ el._enterCancelled = isCancelled;
10585
10586
  removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
10586
10587
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
10587
10588
  done && done();
@@ -10624,8 +10625,13 @@ Component that was made reactive: `,
10624
10625
  el._isLeaving = true;
10625
10626
  const resolve = () => finishLeave(el, done);
10626
10627
  addTransitionClass(el, leaveFromClass);
10627
- addTransitionClass(el, leaveActiveClass);
10628
- forceReflow();
10628
+ if (!el._enterCancelled) {
10629
+ forceReflow();
10630
+ addTransitionClass(el, leaveActiveClass);
10631
+ } else {
10632
+ addTransitionClass(el, leaveActiveClass);
10633
+ forceReflow();
10634
+ }
10629
10635
  nextFrame(() => {
10630
10636
  if (!el._isLeaving) {
10631
10637
  return;
@@ -10639,11 +10645,11 @@ Component that was made reactive: `,
10639
10645
  callHook(onLeave, [el, resolve]);
10640
10646
  },
10641
10647
  onEnterCancelled(el) {
10642
- finishEnter(el, false);
10648
+ finishEnter(el, false, void 0, true);
10643
10649
  callHook(onEnterCancelled, [el]);
10644
10650
  },
10645
10651
  onAppearCancelled(el) {
10646
- finishEnter(el, true);
10652
+ finishEnter(el, true, void 0, true);
10647
10653
  callHook(onAppearCancelled, [el]);
10648
10654
  },
10649
10655
  onLeaveCancelled(el) {
@@ -10856,10 +10862,11 @@ Component that was made reactive: `,
10856
10862
  }
10857
10863
  updateTeleports(vars);
10858
10864
  };
10859
- onBeforeMount(() => {
10860
- watchPostEffect(setVars);
10865
+ onBeforeUpdate(() => {
10866
+ queuePostFlushCb(setVars);
10861
10867
  });
10862
10868
  onMounted(() => {
10869
+ watch(setVars, NOOP, { flush: "post" });
10863
10870
  const ob = new MutationObserver(setVars);
10864
10871
  ob.observe(instance.subTree.el.parentNode, { childList: true });
10865
10872
  onUnmounted(() => ob.disconnect());
@@ -11023,7 +11030,7 @@ Component that was made reactive: `,
11023
11030
  }
11024
11031
  }
11025
11032
 
11026
- function patchDOMProp(el, key, value, parentComponent) {
11033
+ function patchDOMProp(el, key, value, parentComponent, attrName) {
11027
11034
  if (key === "innerHTML" || key === "textContent") {
11028
11035
  if (value != null) {
11029
11036
  el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
@@ -11071,7 +11078,7 @@ Component that was made reactive: `,
11071
11078
  );
11072
11079
  }
11073
11080
  }
11074
- needRemove && el.removeAttribute(key);
11081
+ needRemove && el.removeAttribute(attrName || key);
11075
11082
  }
11076
11083
 
11077
11084
  function addEventListener(el, event, handler, options) {
@@ -11181,7 +11188,7 @@ Expected function or array of functions, received type ${typeof value}.`
11181
11188
  // #11081 force set props for possible async custom element
11182
11189
  el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
11183
11190
  ) {
11184
- patchDOMProp(el, camelize(key), nextValue);
11191
+ patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
11185
11192
  } else {
11186
11193
  if (key === "true-value") {
11187
11194
  el._trueValue = nextValue;
@@ -11466,6 +11473,8 @@ Expected function or array of functions, received type ${typeof value}.`
11466
11473
  this._update();
11467
11474
  }
11468
11475
  if (shouldReflect) {
11476
+ const ob = this._ob;
11477
+ ob && ob.disconnect();
11469
11478
  if (val === true) {
11470
11479
  this.setAttribute(hyphenate(key), "");
11471
11480
  } else if (typeof val === "string" || typeof val === "number") {
@@ -11473,6 +11482,7 @@ Expected function or array of functions, received type ${typeof value}.`
11473
11482
  } else if (!val) {
11474
11483
  this.removeAttribute(hyphenate(key));
11475
11484
  }
11485
+ ob && ob.observe(this, { attributes: true });
11476
11486
  }
11477
11487
  }
11478
11488
  }
@@ -11887,7 +11897,7 @@ Expected function or array of functions, received type ${typeof value}.`
11887
11897
  setChecked(el, binding, vnode);
11888
11898
  }
11889
11899
  };
11890
- function setChecked(el, { value }, vnode) {
11900
+ function setChecked(el, { value, oldValue }, vnode) {
11891
11901
  el._modelValue = value;
11892
11902
  let checked;
11893
11903
  if (isArray(value)) {
@@ -11895,6 +11905,7 @@ Expected function or array of functions, received type ${typeof value}.`
11895
11905
  } else if (isSet(value)) {
11896
11906
  checked = value.has(vnode.props.value);
11897
11907
  } else {
11908
+ if (value === oldValue) return;
11898
11909
  checked = looseEqual(value, getCheckboxValue(el, true));
11899
11910
  }
11900
11911
  if (el.checked !== checked) {