vue 3.5.10 → 3.5.12
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.
- package/dist/vue.cjs.js +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +226 -257
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +217 -253
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +222 -256
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +213 -252
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +6 -6
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue v3.5.12
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -630,8 +630,14 @@ class ReactiveEffect {
|
|
|
630
630
|
}
|
|
631
631
|
let batchDepth = 0;
|
|
632
632
|
let batchedSub;
|
|
633
|
-
|
|
633
|
+
let batchedComputed;
|
|
634
|
+
function batch(sub, isComputed = false) {
|
|
634
635
|
sub.flags |= 8;
|
|
636
|
+
if (isComputed) {
|
|
637
|
+
sub.next = batchedComputed;
|
|
638
|
+
batchedComputed = sub;
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
635
641
|
sub.next = batchedSub;
|
|
636
642
|
batchedSub = sub;
|
|
637
643
|
}
|
|
@@ -642,20 +648,22 @@ function endBatch() {
|
|
|
642
648
|
if (--batchDepth > 0) {
|
|
643
649
|
return;
|
|
644
650
|
}
|
|
651
|
+
if (batchedComputed) {
|
|
652
|
+
let e = batchedComputed;
|
|
653
|
+
batchedComputed = void 0;
|
|
654
|
+
while (e) {
|
|
655
|
+
const next = e.next;
|
|
656
|
+
e.next = void 0;
|
|
657
|
+
e.flags &= ~8;
|
|
658
|
+
e = next;
|
|
659
|
+
}
|
|
660
|
+
}
|
|
645
661
|
let error;
|
|
646
662
|
while (batchedSub) {
|
|
647
663
|
let e = batchedSub;
|
|
648
|
-
let next;
|
|
649
|
-
while (e) {
|
|
650
|
-
if (!(e.flags & 1)) {
|
|
651
|
-
e.flags &= ~8;
|
|
652
|
-
}
|
|
653
|
-
e = e.next;
|
|
654
|
-
}
|
|
655
|
-
e = batchedSub;
|
|
656
664
|
batchedSub = void 0;
|
|
657
665
|
while (e) {
|
|
658
|
-
next = e.next;
|
|
666
|
+
const next = e.next;
|
|
659
667
|
e.next = void 0;
|
|
660
668
|
e.flags &= ~8;
|
|
661
669
|
if (e.flags & 1) {
|
|
@@ -755,16 +763,16 @@ function removeSub(link, soft = false) {
|
|
|
755
763
|
nextSub.prevSub = prevSub;
|
|
756
764
|
link.nextSub = void 0;
|
|
757
765
|
}
|
|
758
|
-
if (dep.subs === link) {
|
|
759
|
-
dep.subs = prevSub;
|
|
760
|
-
}
|
|
761
766
|
if (dep.subsHead === link) {
|
|
762
767
|
dep.subsHead = nextSub;
|
|
763
768
|
}
|
|
764
|
-
if (
|
|
765
|
-
dep.
|
|
766
|
-
|
|
767
|
-
|
|
769
|
+
if (dep.subs === link) {
|
|
770
|
+
dep.subs = prevSub;
|
|
771
|
+
if (!prevSub && dep.computed) {
|
|
772
|
+
dep.computed.flags &= ~4;
|
|
773
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
774
|
+
removeSub(l, true);
|
|
775
|
+
}
|
|
768
776
|
}
|
|
769
777
|
}
|
|
770
778
|
if (!soft && !--dep.sc && dep.map) {
|
|
@@ -851,7 +859,6 @@ class Dep {
|
|
|
851
859
|
/**
|
|
852
860
|
* For object property deps cleanup
|
|
853
861
|
*/
|
|
854
|
-
this.target = void 0;
|
|
855
862
|
this.map = void 0;
|
|
856
863
|
this.key = void 0;
|
|
857
864
|
/**
|
|
@@ -979,7 +986,6 @@ function track(target, type, key) {
|
|
|
979
986
|
let dep = depsMap.get(key);
|
|
980
987
|
if (!dep) {
|
|
981
988
|
depsMap.set(key, dep = new Dep());
|
|
982
|
-
dep.target = target;
|
|
983
989
|
dep.map = depsMap;
|
|
984
990
|
dep.key = key;
|
|
985
991
|
}
|
|
@@ -1026,7 +1032,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
1026
1032
|
}
|
|
1027
1033
|
});
|
|
1028
1034
|
} else {
|
|
1029
|
-
if (key !== void 0) {
|
|
1035
|
+
if (key !== void 0 || depsMap.has(void 0)) {
|
|
1030
1036
|
run(depsMap.get(key));
|
|
1031
1037
|
}
|
|
1032
1038
|
if (isArrayIndex) {
|
|
@@ -1401,117 +1407,6 @@ const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true
|
|
|
1401
1407
|
|
|
1402
1408
|
const toShallow = (value) => value;
|
|
1403
1409
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1404
|
-
function get(target, key, isReadonly2 = false, isShallow2 = false) {
|
|
1405
|
-
target = target["__v_raw"];
|
|
1406
|
-
const rawTarget = toRaw(target);
|
|
1407
|
-
const rawKey = toRaw(key);
|
|
1408
|
-
if (!isReadonly2) {
|
|
1409
|
-
if (hasChanged(key, rawKey)) {
|
|
1410
|
-
track(rawTarget, "get", key);
|
|
1411
|
-
}
|
|
1412
|
-
track(rawTarget, "get", rawKey);
|
|
1413
|
-
}
|
|
1414
|
-
const { has: has2 } = getProto(rawTarget);
|
|
1415
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1416
|
-
if (has2.call(rawTarget, key)) {
|
|
1417
|
-
return wrap(target.get(key));
|
|
1418
|
-
} else if (has2.call(rawTarget, rawKey)) {
|
|
1419
|
-
return wrap(target.get(rawKey));
|
|
1420
|
-
} else if (target !== rawTarget) {
|
|
1421
|
-
target.get(key);
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
function has(key, isReadonly2 = false) {
|
|
1425
|
-
const target = this["__v_raw"];
|
|
1426
|
-
const rawTarget = toRaw(target);
|
|
1427
|
-
const rawKey = toRaw(key);
|
|
1428
|
-
if (!isReadonly2) {
|
|
1429
|
-
if (hasChanged(key, rawKey)) {
|
|
1430
|
-
track(rawTarget, "has", key);
|
|
1431
|
-
}
|
|
1432
|
-
track(rawTarget, "has", rawKey);
|
|
1433
|
-
}
|
|
1434
|
-
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1435
|
-
}
|
|
1436
|
-
function size(target, isReadonly2 = false) {
|
|
1437
|
-
target = target["__v_raw"];
|
|
1438
|
-
!isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1439
|
-
return Reflect.get(target, "size", target);
|
|
1440
|
-
}
|
|
1441
|
-
function add(value, _isShallow = false) {
|
|
1442
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1443
|
-
value = toRaw(value);
|
|
1444
|
-
}
|
|
1445
|
-
const target = toRaw(this);
|
|
1446
|
-
const proto = getProto(target);
|
|
1447
|
-
const hadKey = proto.has.call(target, value);
|
|
1448
|
-
if (!hadKey) {
|
|
1449
|
-
target.add(value);
|
|
1450
|
-
trigger(target, "add", value, value);
|
|
1451
|
-
}
|
|
1452
|
-
return this;
|
|
1453
|
-
}
|
|
1454
|
-
function set(key, value, _isShallow = false) {
|
|
1455
|
-
if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
|
|
1456
|
-
value = toRaw(value);
|
|
1457
|
-
}
|
|
1458
|
-
const target = toRaw(this);
|
|
1459
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1460
|
-
let hadKey = has2.call(target, key);
|
|
1461
|
-
if (!hadKey) {
|
|
1462
|
-
key = toRaw(key);
|
|
1463
|
-
hadKey = has2.call(target, key);
|
|
1464
|
-
} else {
|
|
1465
|
-
checkIdentityKeys(target, has2, key);
|
|
1466
|
-
}
|
|
1467
|
-
const oldValue = get2.call(target, key);
|
|
1468
|
-
target.set(key, value);
|
|
1469
|
-
if (!hadKey) {
|
|
1470
|
-
trigger(target, "add", key, value);
|
|
1471
|
-
} else if (hasChanged(value, oldValue)) {
|
|
1472
|
-
trigger(target, "set", key, value, oldValue);
|
|
1473
|
-
}
|
|
1474
|
-
return this;
|
|
1475
|
-
}
|
|
1476
|
-
function deleteEntry(key) {
|
|
1477
|
-
const target = toRaw(this);
|
|
1478
|
-
const { has: has2, get: get2 } = getProto(target);
|
|
1479
|
-
let hadKey = has2.call(target, key);
|
|
1480
|
-
if (!hadKey) {
|
|
1481
|
-
key = toRaw(key);
|
|
1482
|
-
hadKey = has2.call(target, key);
|
|
1483
|
-
} else {
|
|
1484
|
-
checkIdentityKeys(target, has2, key);
|
|
1485
|
-
}
|
|
1486
|
-
const oldValue = get2 ? get2.call(target, key) : void 0;
|
|
1487
|
-
const result = target.delete(key);
|
|
1488
|
-
if (hadKey) {
|
|
1489
|
-
trigger(target, "delete", key, void 0, oldValue);
|
|
1490
|
-
}
|
|
1491
|
-
return result;
|
|
1492
|
-
}
|
|
1493
|
-
function clear() {
|
|
1494
|
-
const target = toRaw(this);
|
|
1495
|
-
const hadItems = target.size !== 0;
|
|
1496
|
-
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1497
|
-
const result = target.clear();
|
|
1498
|
-
if (hadItems) {
|
|
1499
|
-
trigger(target, "clear", void 0, void 0, oldTarget);
|
|
1500
|
-
}
|
|
1501
|
-
return result;
|
|
1502
|
-
}
|
|
1503
|
-
function createForEach(isReadonly2, isShallow2) {
|
|
1504
|
-
return function forEach(callback, thisArg) {
|
|
1505
|
-
const observed = this;
|
|
1506
|
-
const target = observed["__v_raw"];
|
|
1507
|
-
const rawTarget = toRaw(target);
|
|
1508
|
-
const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
|
|
1509
|
-
!isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1510
|
-
return target.forEach((value, key) => {
|
|
1511
|
-
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1512
|
-
});
|
|
1513
|
-
};
|
|
1514
|
-
}
|
|
1515
1410
|
function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
1516
1411
|
return function(...args) {
|
|
1517
1412
|
const target = this["__v_raw"];
|
|
@@ -1554,71 +1449,134 @@ function createReadonlyMethod(type) {
|
|
|
1554
1449
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1555
1450
|
};
|
|
1556
1451
|
}
|
|
1557
|
-
function createInstrumentations() {
|
|
1558
|
-
const
|
|
1559
|
-
get(key) {
|
|
1560
|
-
return get(this, key);
|
|
1561
|
-
},
|
|
1562
|
-
get size() {
|
|
1563
|
-
return size(this);
|
|
1564
|
-
},
|
|
1565
|
-
has,
|
|
1566
|
-
add,
|
|
1567
|
-
set,
|
|
1568
|
-
delete: deleteEntry,
|
|
1569
|
-
clear,
|
|
1570
|
-
forEach: createForEach(false, false)
|
|
1571
|
-
};
|
|
1572
|
-
const shallowInstrumentations2 = {
|
|
1452
|
+
function createInstrumentations(readonly, shallow) {
|
|
1453
|
+
const instrumentations = {
|
|
1573
1454
|
get(key) {
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
return get(this, key, true);
|
|
1593
|
-
},
|
|
1594
|
-
get size() {
|
|
1595
|
-
return size(this, true);
|
|
1596
|
-
},
|
|
1597
|
-
has(key) {
|
|
1598
|
-
return has.call(this, key, true);
|
|
1599
|
-
},
|
|
1600
|
-
add: createReadonlyMethod("add"),
|
|
1601
|
-
set: createReadonlyMethod("set"),
|
|
1602
|
-
delete: createReadonlyMethod("delete"),
|
|
1603
|
-
clear: createReadonlyMethod("clear"),
|
|
1604
|
-
forEach: createForEach(true, false)
|
|
1605
|
-
};
|
|
1606
|
-
const shallowReadonlyInstrumentations2 = {
|
|
1607
|
-
get(key) {
|
|
1608
|
-
return get(this, key, true, true);
|
|
1455
|
+
const target = this["__v_raw"];
|
|
1456
|
+
const rawTarget = toRaw(target);
|
|
1457
|
+
const rawKey = toRaw(key);
|
|
1458
|
+
if (!readonly) {
|
|
1459
|
+
if (hasChanged(key, rawKey)) {
|
|
1460
|
+
track(rawTarget, "get", key);
|
|
1461
|
+
}
|
|
1462
|
+
track(rawTarget, "get", rawKey);
|
|
1463
|
+
}
|
|
1464
|
+
const { has } = getProto(rawTarget);
|
|
1465
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1466
|
+
if (has.call(rawTarget, key)) {
|
|
1467
|
+
return wrap(target.get(key));
|
|
1468
|
+
} else if (has.call(rawTarget, rawKey)) {
|
|
1469
|
+
return wrap(target.get(rawKey));
|
|
1470
|
+
} else if (target !== rawTarget) {
|
|
1471
|
+
target.get(key);
|
|
1472
|
+
}
|
|
1609
1473
|
},
|
|
1610
1474
|
get size() {
|
|
1611
|
-
|
|
1475
|
+
const target = this["__v_raw"];
|
|
1476
|
+
!readonly && track(toRaw(target), "iterate", ITERATE_KEY);
|
|
1477
|
+
return Reflect.get(target, "size", target);
|
|
1612
1478
|
},
|
|
1613
1479
|
has(key) {
|
|
1614
|
-
|
|
1480
|
+
const target = this["__v_raw"];
|
|
1481
|
+
const rawTarget = toRaw(target);
|
|
1482
|
+
const rawKey = toRaw(key);
|
|
1483
|
+
if (!readonly) {
|
|
1484
|
+
if (hasChanged(key, rawKey)) {
|
|
1485
|
+
track(rawTarget, "has", key);
|
|
1486
|
+
}
|
|
1487
|
+
track(rawTarget, "has", rawKey);
|
|
1488
|
+
}
|
|
1489
|
+
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
|
|
1615
1490
|
},
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1491
|
+
forEach(callback, thisArg) {
|
|
1492
|
+
const observed = this;
|
|
1493
|
+
const target = observed["__v_raw"];
|
|
1494
|
+
const rawTarget = toRaw(target);
|
|
1495
|
+
const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
|
|
1496
|
+
!readonly && track(rawTarget, "iterate", ITERATE_KEY);
|
|
1497
|
+
return target.forEach((value, key) => {
|
|
1498
|
+
return callback.call(thisArg, wrap(value), wrap(key), observed);
|
|
1499
|
+
});
|
|
1500
|
+
}
|
|
1621
1501
|
};
|
|
1502
|
+
extend(
|
|
1503
|
+
instrumentations,
|
|
1504
|
+
readonly ? {
|
|
1505
|
+
add: createReadonlyMethod("add"),
|
|
1506
|
+
set: createReadonlyMethod("set"),
|
|
1507
|
+
delete: createReadonlyMethod("delete"),
|
|
1508
|
+
clear: createReadonlyMethod("clear")
|
|
1509
|
+
} : {
|
|
1510
|
+
add(value) {
|
|
1511
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1512
|
+
value = toRaw(value);
|
|
1513
|
+
}
|
|
1514
|
+
const target = toRaw(this);
|
|
1515
|
+
const proto = getProto(target);
|
|
1516
|
+
const hadKey = proto.has.call(target, value);
|
|
1517
|
+
if (!hadKey) {
|
|
1518
|
+
target.add(value);
|
|
1519
|
+
trigger(target, "add", value, value);
|
|
1520
|
+
}
|
|
1521
|
+
return this;
|
|
1522
|
+
},
|
|
1523
|
+
set(key, value) {
|
|
1524
|
+
if (!shallow && !isShallow(value) && !isReadonly(value)) {
|
|
1525
|
+
value = toRaw(value);
|
|
1526
|
+
}
|
|
1527
|
+
const target = toRaw(this);
|
|
1528
|
+
const { has, get } = getProto(target);
|
|
1529
|
+
let hadKey = has.call(target, key);
|
|
1530
|
+
if (!hadKey) {
|
|
1531
|
+
key = toRaw(key);
|
|
1532
|
+
hadKey = has.call(target, key);
|
|
1533
|
+
} else {
|
|
1534
|
+
checkIdentityKeys(target, has, key);
|
|
1535
|
+
}
|
|
1536
|
+
const oldValue = get.call(target, key);
|
|
1537
|
+
target.set(key, value);
|
|
1538
|
+
if (!hadKey) {
|
|
1539
|
+
trigger(target, "add", key, value);
|
|
1540
|
+
} else if (hasChanged(value, oldValue)) {
|
|
1541
|
+
trigger(target, "set", key, value, oldValue);
|
|
1542
|
+
}
|
|
1543
|
+
return this;
|
|
1544
|
+
},
|
|
1545
|
+
delete(key) {
|
|
1546
|
+
const target = toRaw(this);
|
|
1547
|
+
const { has, get } = getProto(target);
|
|
1548
|
+
let hadKey = has.call(target, key);
|
|
1549
|
+
if (!hadKey) {
|
|
1550
|
+
key = toRaw(key);
|
|
1551
|
+
hadKey = has.call(target, key);
|
|
1552
|
+
} else {
|
|
1553
|
+
checkIdentityKeys(target, has, key);
|
|
1554
|
+
}
|
|
1555
|
+
const oldValue = get ? get.call(target, key) : void 0;
|
|
1556
|
+
const result = target.delete(key);
|
|
1557
|
+
if (hadKey) {
|
|
1558
|
+
trigger(target, "delete", key, void 0, oldValue);
|
|
1559
|
+
}
|
|
1560
|
+
return result;
|
|
1561
|
+
},
|
|
1562
|
+
clear() {
|
|
1563
|
+
const target = toRaw(this);
|
|
1564
|
+
const hadItems = target.size !== 0;
|
|
1565
|
+
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
|
|
1566
|
+
const result = target.clear();
|
|
1567
|
+
if (hadItems) {
|
|
1568
|
+
trigger(
|
|
1569
|
+
target,
|
|
1570
|
+
"clear",
|
|
1571
|
+
void 0,
|
|
1572
|
+
void 0,
|
|
1573
|
+
oldTarget
|
|
1574
|
+
);
|
|
1575
|
+
}
|
|
1576
|
+
return result;
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
);
|
|
1622
1580
|
const iteratorMethods = [
|
|
1623
1581
|
"keys",
|
|
1624
1582
|
"values",
|
|
@@ -1626,30 +1584,12 @@ function createInstrumentations() {
|
|
|
1626
1584
|
Symbol.iterator
|
|
1627
1585
|
];
|
|
1628
1586
|
iteratorMethods.forEach((method) => {
|
|
1629
|
-
|
|
1630
|
-
readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
|
|
1631
|
-
shallowInstrumentations2[method] = createIterableMethod(method, false, true);
|
|
1632
|
-
shallowReadonlyInstrumentations2[method] = createIterableMethod(
|
|
1633
|
-
method,
|
|
1634
|
-
true,
|
|
1635
|
-
true
|
|
1636
|
-
);
|
|
1587
|
+
instrumentations[method] = createIterableMethod(method, readonly, shallow);
|
|
1637
1588
|
});
|
|
1638
|
-
return
|
|
1639
|
-
mutableInstrumentations2,
|
|
1640
|
-
readonlyInstrumentations2,
|
|
1641
|
-
shallowInstrumentations2,
|
|
1642
|
-
shallowReadonlyInstrumentations2
|
|
1643
|
-
];
|
|
1589
|
+
return instrumentations;
|
|
1644
1590
|
}
|
|
1645
|
-
const [
|
|
1646
|
-
mutableInstrumentations,
|
|
1647
|
-
readonlyInstrumentations,
|
|
1648
|
-
shallowInstrumentations,
|
|
1649
|
-
shallowReadonlyInstrumentations
|
|
1650
|
-
] = /* @__PURE__ */ createInstrumentations();
|
|
1651
1591
|
function createInstrumentationGetter(isReadonly2, shallow) {
|
|
1652
|
-
const instrumentations =
|
|
1592
|
+
const instrumentations = createInstrumentations(isReadonly2, shallow);
|
|
1653
1593
|
return (target, key, receiver) => {
|
|
1654
1594
|
if (key === "__v_isReactive") {
|
|
1655
1595
|
return !isReadonly2;
|
|
@@ -1677,9 +1617,9 @@ const readonlyCollectionHandlers = {
|
|
|
1677
1617
|
const shallowReadonlyCollectionHandlers = {
|
|
1678
1618
|
get: /* @__PURE__ */ createInstrumentationGetter(true, true)
|
|
1679
1619
|
};
|
|
1680
|
-
function checkIdentityKeys(target,
|
|
1620
|
+
function checkIdentityKeys(target, has, key) {
|
|
1681
1621
|
const rawKey = toRaw(key);
|
|
1682
|
-
if (rawKey !== key &&
|
|
1622
|
+
if (rawKey !== key && has.call(target, rawKey)) {
|
|
1683
1623
|
const type = toRawType(target);
|
|
1684
1624
|
warn$2(
|
|
1685
1625
|
`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.`
|
|
@@ -2015,7 +1955,7 @@ class ComputedRefImpl {
|
|
|
2015
1955
|
this.flags |= 16;
|
|
2016
1956
|
if (!(this.flags & 8) && // avoid infinite self recursion
|
|
2017
1957
|
activeSub !== this) {
|
|
2018
|
-
batch(this);
|
|
1958
|
+
batch(this, true);
|
|
2019
1959
|
return true;
|
|
2020
1960
|
}
|
|
2021
1961
|
}
|
|
@@ -2537,10 +2477,8 @@ function logError(err, type, contextVNode, throwInDev = true, throwInProd = fals
|
|
|
2537
2477
|
}
|
|
2538
2478
|
}
|
|
2539
2479
|
|
|
2540
|
-
let isFlushing = false;
|
|
2541
|
-
let isFlushPending = false;
|
|
2542
2480
|
const queue = [];
|
|
2543
|
-
let flushIndex =
|
|
2481
|
+
let flushIndex = -1;
|
|
2544
2482
|
const pendingPostFlushCbs = [];
|
|
2545
2483
|
let activePostFlushCbs = null;
|
|
2546
2484
|
let postFlushIndex = 0;
|
|
@@ -2552,7 +2490,7 @@ function nextTick(fn) {
|
|
|
2552
2490
|
return fn ? p.then(this ? fn.bind(this) : fn) : p;
|
|
2553
2491
|
}
|
|
2554
2492
|
function findInsertionIndex(id) {
|
|
2555
|
-
let start =
|
|
2493
|
+
let start = flushIndex + 1;
|
|
2556
2494
|
let end = queue.length;
|
|
2557
2495
|
while (start < end) {
|
|
2558
2496
|
const middle = start + end >>> 1;
|
|
@@ -2581,8 +2519,7 @@ function queueJob(job) {
|
|
|
2581
2519
|
}
|
|
2582
2520
|
}
|
|
2583
2521
|
function queueFlush() {
|
|
2584
|
-
if (!
|
|
2585
|
-
isFlushPending = true;
|
|
2522
|
+
if (!currentFlushPromise) {
|
|
2586
2523
|
currentFlushPromise = resolvedPromise.then(flushJobs);
|
|
2587
2524
|
}
|
|
2588
2525
|
}
|
|
@@ -2599,7 +2536,7 @@ function queuePostFlushCb(cb) {
|
|
|
2599
2536
|
}
|
|
2600
2537
|
queueFlush();
|
|
2601
2538
|
}
|
|
2602
|
-
function flushPreFlushCbs(instance, seen, i =
|
|
2539
|
+
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
2603
2540
|
{
|
|
2604
2541
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2605
2542
|
}
|
|
@@ -2655,8 +2592,6 @@ function flushPostFlushCbs(seen) {
|
|
|
2655
2592
|
}
|
|
2656
2593
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
2657
2594
|
function flushJobs(seen) {
|
|
2658
|
-
isFlushPending = false;
|
|
2659
|
-
isFlushing = true;
|
|
2660
2595
|
{
|
|
2661
2596
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2662
2597
|
}
|
|
@@ -2688,10 +2623,9 @@ function flushJobs(seen) {
|
|
|
2688
2623
|
job.flags &= ~1;
|
|
2689
2624
|
}
|
|
2690
2625
|
}
|
|
2691
|
-
flushIndex =
|
|
2626
|
+
flushIndex = -1;
|
|
2692
2627
|
queue.length = 0;
|
|
2693
2628
|
flushPostFlushCbs(seen);
|
|
2694
|
-
isFlushing = false;
|
|
2695
2629
|
currentFlushPromise = null;
|
|
2696
2630
|
if (queue.length || pendingPostFlushCbs.length) {
|
|
2697
2631
|
flushJobs(seen);
|
|
@@ -3111,7 +3045,7 @@ const TeleportImpl = {
|
|
|
3111
3045
|
}
|
|
3112
3046
|
if (!disabled) {
|
|
3113
3047
|
mount(target, targetAnchor);
|
|
3114
|
-
updateCssVars(n2);
|
|
3048
|
+
updateCssVars(n2, false);
|
|
3115
3049
|
}
|
|
3116
3050
|
} else if (!disabled) {
|
|
3117
3051
|
warn$1(
|
|
@@ -3123,7 +3057,7 @@ const TeleportImpl = {
|
|
|
3123
3057
|
};
|
|
3124
3058
|
if (disabled) {
|
|
3125
3059
|
mount(container, mainAnchor);
|
|
3126
|
-
updateCssVars(n2);
|
|
3060
|
+
updateCssVars(n2, true);
|
|
3127
3061
|
}
|
|
3128
3062
|
if (isTeleportDeferred(n2.props)) {
|
|
3129
3063
|
queuePostRenderEffect(mountToTarget, parentSuspense);
|
|
@@ -3213,7 +3147,7 @@ const TeleportImpl = {
|
|
|
3213
3147
|
);
|
|
3214
3148
|
}
|
|
3215
3149
|
}
|
|
3216
|
-
updateCssVars(n2);
|
|
3150
|
+
updateCssVars(n2, disabled);
|
|
3217
3151
|
}
|
|
3218
3152
|
},
|
|
3219
3153
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
@@ -3281,9 +3215,10 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3281
3215
|
querySelector
|
|
3282
3216
|
);
|
|
3283
3217
|
if (target) {
|
|
3218
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3284
3219
|
const targetNode = target._lpa || target.firstChild;
|
|
3285
3220
|
if (vnode.shapeFlag & 16) {
|
|
3286
|
-
if (
|
|
3221
|
+
if (disabled) {
|
|
3287
3222
|
vnode.anchor = hydrateChildren(
|
|
3288
3223
|
nextSibling(node),
|
|
3289
3224
|
vnode,
|
|
@@ -3324,16 +3259,23 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3324
3259
|
);
|
|
3325
3260
|
}
|
|
3326
3261
|
}
|
|
3327
|
-
updateCssVars(vnode);
|
|
3262
|
+
updateCssVars(vnode, disabled);
|
|
3328
3263
|
}
|
|
3329
3264
|
return vnode.anchor && nextSibling(vnode.anchor);
|
|
3330
3265
|
}
|
|
3331
3266
|
const Teleport = TeleportImpl;
|
|
3332
|
-
function updateCssVars(vnode) {
|
|
3267
|
+
function updateCssVars(vnode, isDisabled) {
|
|
3333
3268
|
const ctx = vnode.ctx;
|
|
3334
3269
|
if (ctx && ctx.ut) {
|
|
3335
|
-
let node
|
|
3336
|
-
|
|
3270
|
+
let node, anchor;
|
|
3271
|
+
if (isDisabled) {
|
|
3272
|
+
node = vnode.el;
|
|
3273
|
+
anchor = vnode.anchor;
|
|
3274
|
+
} else {
|
|
3275
|
+
node = vnode.targetStart;
|
|
3276
|
+
anchor = vnode.targetAnchor;
|
|
3277
|
+
}
|
|
3278
|
+
while (node && node !== anchor) {
|
|
3337
3279
|
if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
|
|
3338
3280
|
node = node.nextSibling;
|
|
3339
3281
|
}
|
|
@@ -3783,8 +3725,15 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3783
3725
|
const setupState = owner.setupState;
|
|
3784
3726
|
const rawSetupState = toRaw(setupState);
|
|
3785
3727
|
const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
|
|
3786
|
-
|
|
3787
|
-
|
|
3728
|
+
{
|
|
3729
|
+
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
3730
|
+
warn$1(
|
|
3731
|
+
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
3732
|
+
);
|
|
3733
|
+
}
|
|
3734
|
+
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
3735
|
+
return false;
|
|
3736
|
+
}
|
|
3788
3737
|
}
|
|
3789
3738
|
return hasOwn(rawSetupState, key);
|
|
3790
3739
|
};
|
|
@@ -4081,7 +4030,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4081
4030
|
}
|
|
4082
4031
|
let needCallTransitionHooks = false;
|
|
4083
4032
|
if (isTemplateNode(el)) {
|
|
4084
|
-
needCallTransitionHooks = needTransition(
|
|
4033
|
+
needCallTransitionHooks = needTransition(
|
|
4034
|
+
null,
|
|
4035
|
+
// no need check parentSuspense in hydration
|
|
4036
|
+
transition
|
|
4037
|
+
) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
|
|
4085
4038
|
const content = el.content.firstChild;
|
|
4086
4039
|
if (needCallTransitionHooks) {
|
|
4087
4040
|
transition.beforeEnter(content);
|
|
@@ -4474,6 +4427,8 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
4474
4427
|
}
|
|
4475
4428
|
}
|
|
4476
4429
|
|
|
4430
|
+
const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
|
|
4431
|
+
const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
|
|
4477
4432
|
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
4478
4433
|
const id = requestIdleCallback(hydrate, { timeout });
|
|
4479
4434
|
return () => cancelIdleCallback(id);
|
|
@@ -5176,12 +5131,13 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
5176
5131
|
}
|
|
5177
5132
|
openBlock();
|
|
5178
5133
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5134
|
+
const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
5135
|
+
// key attached in the `createSlots` helper, respect that
|
|
5136
|
+
validSlotContent && validSlotContent.key;
|
|
5179
5137
|
const rendered = createBlock(
|
|
5180
5138
|
Fragment,
|
|
5181
5139
|
{
|
|
5182
|
-
key: (
|
|
5183
|
-
// key attached in the `createSlots` helper, respect that
|
|
5184
|
-
validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
5140
|
+
key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
|
|
5185
5141
|
(!validSlotContent && fallback ? "_fb" : "")
|
|
5186
5142
|
},
|
|
5187
5143
|
validSlotContent || (fallback ? fallback() : []),
|
|
@@ -6539,6 +6495,7 @@ function getType(ctor) {
|
|
|
6539
6495
|
function validateProps(rawProps, props, instance) {
|
|
6540
6496
|
const resolvedValues = toRaw(props);
|
|
6541
6497
|
const options = instance.propsOptions[0];
|
|
6498
|
+
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
6542
6499
|
for (const key in options) {
|
|
6543
6500
|
let opt = options[key];
|
|
6544
6501
|
if (opt == null) continue;
|
|
@@ -6547,7 +6504,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
6547
6504
|
resolvedValues[key],
|
|
6548
6505
|
opt,
|
|
6549
6506
|
shallowReadonly(resolvedValues) ,
|
|
6550
|
-
!
|
|
6507
|
+
!camelizePropsKey.includes(key)
|
|
6551
6508
|
);
|
|
6552
6509
|
}
|
|
6553
6510
|
}
|
|
@@ -8327,14 +8284,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
8327
8284
|
}
|
|
8328
8285
|
const baseWatchOptions = extend({}, options);
|
|
8329
8286
|
baseWatchOptions.onWarn = warn$1;
|
|
8287
|
+
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
8330
8288
|
let ssrCleanup;
|
|
8331
8289
|
if (isInSSRComponentSetup) {
|
|
8332
8290
|
if (flush === "sync") {
|
|
8333
8291
|
const ctx = useSSRContext();
|
|
8334
8292
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
8335
|
-
} else if (!
|
|
8336
|
-
baseWatchOptions.once = true;
|
|
8337
|
-
} else {
|
|
8293
|
+
} else if (!runsImmediately) {
|
|
8338
8294
|
const watchStopHandle = () => {
|
|
8339
8295
|
};
|
|
8340
8296
|
watchStopHandle.stop = NOOP;
|
|
@@ -8373,7 +8329,13 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
8373
8329
|
}
|
|
8374
8330
|
};
|
|
8375
8331
|
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
8376
|
-
if (
|
|
8332
|
+
if (isInSSRComponentSetup) {
|
|
8333
|
+
if (ssrCleanup) {
|
|
8334
|
+
ssrCleanup.push(watchHandle);
|
|
8335
|
+
} else if (runsImmediately) {
|
|
8336
|
+
watchHandle();
|
|
8337
|
+
}
|
|
8338
|
+
}
|
|
8377
8339
|
return watchHandle;
|
|
8378
8340
|
}
|
|
8379
8341
|
function instanceWatch(source, value, options) {
|
|
@@ -8408,19 +8370,19 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
8408
8370
|
warn$1(`useModel() called without active instance.`);
|
|
8409
8371
|
return ref();
|
|
8410
8372
|
}
|
|
8411
|
-
|
|
8373
|
+
const camelizedName = camelize(name);
|
|
8374
|
+
if (!i.propsOptions[0][camelizedName]) {
|
|
8412
8375
|
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
8413
8376
|
return ref();
|
|
8414
8377
|
}
|
|
8415
|
-
const camelizedName = camelize(name);
|
|
8416
8378
|
const hyphenatedName = hyphenate(name);
|
|
8417
|
-
const modifiers = getModelModifiers(props,
|
|
8379
|
+
const modifiers = getModelModifiers(props, camelizedName);
|
|
8418
8380
|
const res = customRef((track, trigger) => {
|
|
8419
8381
|
let localValue;
|
|
8420
8382
|
let prevSetValue = EMPTY_OBJ;
|
|
8421
8383
|
let prevEmittedValue;
|
|
8422
8384
|
watchSyncEffect(() => {
|
|
8423
|
-
const propValue = props[
|
|
8385
|
+
const propValue = props[camelizedName];
|
|
8424
8386
|
if (hasChanged(localValue, propValue)) {
|
|
8425
8387
|
localValue = propValue;
|
|
8426
8388
|
trigger();
|
|
@@ -10047,9 +10009,9 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10047
10009
|
}
|
|
10048
10010
|
const { setup } = Component;
|
|
10049
10011
|
if (setup) {
|
|
10012
|
+
pauseTracking();
|
|
10050
10013
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
10051
10014
|
const reset = setCurrentInstance(instance);
|
|
10052
|
-
pauseTracking();
|
|
10053
10015
|
const setupResult = callWithErrorHandling(
|
|
10054
10016
|
setup,
|
|
10055
10017
|
instance,
|
|
@@ -10059,10 +10021,13 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10059
10021
|
setupContext
|
|
10060
10022
|
]
|
|
10061
10023
|
);
|
|
10024
|
+
const isAsyncSetup = isPromise(setupResult);
|
|
10062
10025
|
resetTracking();
|
|
10063
10026
|
reset();
|
|
10064
|
-
if (
|
|
10065
|
-
|
|
10027
|
+
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
|
|
10028
|
+
markAsyncBoundary(instance);
|
|
10029
|
+
}
|
|
10030
|
+
if (isAsyncSetup) {
|
|
10066
10031
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
10067
10032
|
if (isSSR) {
|
|
10068
10033
|
return setupResult.then((resolvedResult) => {
|
|
@@ -10525,7 +10490,7 @@ function isMemoSame(cached, memo) {
|
|
|
10525
10490
|
return true;
|
|
10526
10491
|
}
|
|
10527
10492
|
|
|
10528
|
-
const version = "3.5.
|
|
10493
|
+
const version = "3.5.12";
|
|
10529
10494
|
const warn = warn$1 ;
|
|
10530
10495
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10531
10496
|
const devtools = devtools$1 ;
|
|
@@ -11158,7 +11123,7 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
|
|
|
11158
11123
|
}
|
|
11159
11124
|
}
|
|
11160
11125
|
|
|
11161
|
-
function patchDOMProp(el, key, value, parentComponent) {
|
|
11126
|
+
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
11162
11127
|
if (key === "innerHTML" || key === "textContent") {
|
|
11163
11128
|
if (value != null) {
|
|
11164
11129
|
el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
@@ -11206,7 +11171,7 @@ function patchDOMProp(el, key, value, parentComponent) {
|
|
|
11206
11171
|
);
|
|
11207
11172
|
}
|
|
11208
11173
|
}
|
|
11209
|
-
needRemove && el.removeAttribute(key);
|
|
11174
|
+
needRemove && el.removeAttribute(attrName || key);
|
|
11210
11175
|
}
|
|
11211
11176
|
|
|
11212
11177
|
function addEventListener(el, event, handler, options) {
|
|
@@ -11316,7 +11281,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
|
|
|
11316
11281
|
// #11081 force set props for possible async custom element
|
|
11317
11282
|
el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
|
|
11318
11283
|
) {
|
|
11319
|
-
patchDOMProp(el, camelize(key), nextValue);
|
|
11284
|
+
patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
|
|
11320
11285
|
} else {
|
|
11321
11286
|
if (key === "true-value") {
|
|
11322
11287
|
el._trueValue = nextValue;
|
|
@@ -12034,7 +11999,7 @@ const vModelCheckbox = {
|
|
|
12034
11999
|
setChecked(el, binding, vnode);
|
|
12035
12000
|
}
|
|
12036
12001
|
};
|
|
12037
|
-
function setChecked(el, { value }, vnode) {
|
|
12002
|
+
function setChecked(el, { value, oldValue }, vnode) {
|
|
12038
12003
|
el._modelValue = value;
|
|
12039
12004
|
let checked;
|
|
12040
12005
|
if (isArray(value)) {
|
|
@@ -12042,6 +12007,7 @@ function setChecked(el, { value }, vnode) {
|
|
|
12042
12007
|
} else if (isSet(value)) {
|
|
12043
12008
|
checked = value.has(vnode.props.value);
|
|
12044
12009
|
} else {
|
|
12010
|
+
if (value === oldValue) return;
|
|
12045
12011
|
checked = looseEqual(value, getCheckboxValue(el, true));
|
|
12046
12012
|
}
|
|
12047
12013
|
if (el.checked !== checked) {
|
|
@@ -14533,6 +14499,9 @@ function getLoc(start, end) {
|
|
|
14533
14499
|
source: end == null ? end : getSlice(start, end)
|
|
14534
14500
|
};
|
|
14535
14501
|
}
|
|
14502
|
+
function cloneLoc(loc) {
|
|
14503
|
+
return getLoc(loc.start.offset, loc.end.offset);
|
|
14504
|
+
}
|
|
14536
14505
|
function setLocEnd(loc, end) {
|
|
14537
14506
|
loc.end = tokenizer.getPos(end);
|
|
14538
14507
|
loc.source = getSlice(loc.start.offset, end);
|
|
@@ -15877,7 +15846,7 @@ function processIf(node, dir, context, processCodegen) {
|
|
|
15877
15846
|
const branch = createIfBranch(node, dir);
|
|
15878
15847
|
const ifNode = {
|
|
15879
15848
|
type: 9,
|
|
15880
|
-
loc: node.loc,
|
|
15849
|
+
loc: cloneLoc(node.loc),
|
|
15881
15850
|
branches: [branch]
|
|
15882
15851
|
};
|
|
15883
15852
|
context.replaceNode(ifNode);
|