@vue/compat 3.5.42 → 3.5.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue.cjs.js +348 -147
- package/dist/vue.cjs.prod.js +378 -135
- package/dist/vue.esm-browser.js +344 -144
- package/dist/vue.esm-browser.prod.js +9 -9
- package/dist/vue.esm-bundler.js +345 -145
- package/dist/vue.global.js +344 -144
- package/dist/vue.global.prod.js +10 -10
- package/dist/vue.runtime.esm-browser.js +337 -140
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +338 -141
- package/dist/vue.runtime.global.js +337 -140
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.44
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -128,10 +128,10 @@ function normalizeStyle(value) {
|
|
|
128
128
|
}
|
|
129
129
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
130
130
|
const propertyDelimiterRE = /:([^]+)/;
|
|
131
|
-
const styleCommentRE =
|
|
131
|
+
const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
|
|
132
132
|
function parseStringStyle(cssText) {
|
|
133
133
|
const ret = {};
|
|
134
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
134
|
+
cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
|
|
135
135
|
if (item) {
|
|
136
136
|
const tmp = item.split(propertyDelimiterRE);
|
|
137
137
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -191,7 +191,7 @@ const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
|
|
|
191
191
|
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
192
192
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
193
193
|
|
|
194
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
194
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
195
195
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
196
196
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
197
197
|
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
@@ -221,22 +221,22 @@ function getEscapedCssVarName(key, doubleEscape) {
|
|
|
221
221
|
);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
function looseCompareArrays(a, b) {
|
|
224
|
+
function looseCompareArrays(a, b, seen) {
|
|
225
225
|
if (a.length !== b.length) return false;
|
|
226
226
|
let equal = true;
|
|
227
227
|
for (let i = 0; equal && i < a.length; i++) {
|
|
228
|
-
equal = looseEqual(a[i], b[i]);
|
|
228
|
+
equal = looseEqual(a[i], b[i], seen);
|
|
229
229
|
}
|
|
230
230
|
return equal;
|
|
231
231
|
}
|
|
232
|
-
function looseCompareCollections(a, b) {
|
|
232
|
+
function looseCompareCollections(a, b, seen) {
|
|
233
233
|
if (a.size !== b.size) return false;
|
|
234
234
|
const candidates = Array.from(b);
|
|
235
235
|
const matched = new Uint8Array(candidates.length);
|
|
236
236
|
for (const item of a) {
|
|
237
237
|
let index = -1;
|
|
238
238
|
for (let i = 0; i < candidates.length; i++) {
|
|
239
|
-
if (!matched[i] && looseEqual(item, candidates[i])) {
|
|
239
|
+
if (!matched[i] && looseEqual(item, candidates[i], seen)) {
|
|
240
240
|
index = i;
|
|
241
241
|
break;
|
|
242
242
|
}
|
|
@@ -246,7 +246,47 @@ function looseCompareCollections(a, b) {
|
|
|
246
246
|
}
|
|
247
247
|
return true;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function looseCompareObjects(a, b, seen) {
|
|
250
|
+
let aValidType = isMap(a);
|
|
251
|
+
let bValidType = isMap(b);
|
|
252
|
+
if (aValidType || bValidType) {
|
|
253
|
+
return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
254
|
+
}
|
|
255
|
+
aValidType = isSet(a);
|
|
256
|
+
bValidType = isSet(b);
|
|
257
|
+
if (aValidType || bValidType) {
|
|
258
|
+
return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
259
|
+
}
|
|
260
|
+
const aKeysCount = Object.keys(a).length;
|
|
261
|
+
const bKeysCount = Object.keys(b).length;
|
|
262
|
+
if (aKeysCount !== bKeysCount) {
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
for (const key in a) {
|
|
266
|
+
const aHasKey = a.hasOwnProperty(key);
|
|
267
|
+
const bHasKey = b.hasOwnProperty(key);
|
|
268
|
+
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) {
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return String(a) === String(b);
|
|
273
|
+
}
|
|
274
|
+
function looseCompareNested(a, b, seen, compare) {
|
|
275
|
+
if (!seen) {
|
|
276
|
+
seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
|
|
277
|
+
}
|
|
278
|
+
const [seenA, seenB] = seen;
|
|
279
|
+
if (seenA.has(a) || seenB.has(b)) {
|
|
280
|
+
return seenA.get(a) === b && seenB.get(b) === a;
|
|
281
|
+
}
|
|
282
|
+
seenA.set(a, b);
|
|
283
|
+
seenB.set(b, a);
|
|
284
|
+
const equal = compare(a, b, seen);
|
|
285
|
+
seenA.delete(a);
|
|
286
|
+
seenB.delete(b);
|
|
287
|
+
return equal;
|
|
288
|
+
}
|
|
289
|
+
function looseEqual(a, b, seen) {
|
|
250
290
|
if (a === b) return true;
|
|
251
291
|
let aValidType = isDate(a);
|
|
252
292
|
let bValidType = isDate(b);
|
|
@@ -261,7 +301,7 @@ function looseEqual(a, b) {
|
|
|
261
301
|
aValidType = isArray(a);
|
|
262
302
|
bValidType = isArray(b);
|
|
263
303
|
if (aValidType || bValidType) {
|
|
264
|
-
return aValidType && bValidType ?
|
|
304
|
+
return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
|
|
265
305
|
}
|
|
266
306
|
aValidType = isObject(a);
|
|
267
307
|
bValidType = isObject(b);
|
|
@@ -269,28 +309,7 @@ function looseEqual(a, b) {
|
|
|
269
309
|
if (!aValidType || !bValidType) {
|
|
270
310
|
return false;
|
|
271
311
|
}
|
|
272
|
-
|
|
273
|
-
bValidType = isMap(b);
|
|
274
|
-
if (aValidType || bValidType) {
|
|
275
|
-
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
276
|
-
}
|
|
277
|
-
aValidType = isSet(a);
|
|
278
|
-
bValidType = isSet(b);
|
|
279
|
-
if (aValidType || bValidType) {
|
|
280
|
-
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
281
|
-
}
|
|
282
|
-
const aKeysCount = Object.keys(a).length;
|
|
283
|
-
const bKeysCount = Object.keys(b).length;
|
|
284
|
-
if (aKeysCount !== bKeysCount) {
|
|
285
|
-
return false;
|
|
286
|
-
}
|
|
287
|
-
for (const key in a) {
|
|
288
|
-
const aHasKey = a.hasOwnProperty(key);
|
|
289
|
-
const bHasKey = b.hasOwnProperty(key);
|
|
290
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
|
|
291
|
-
return false;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
312
|
+
return looseCompareNested(a, b, seen, looseCompareObjects);
|
|
294
313
|
}
|
|
295
314
|
return String(a) === String(b);
|
|
296
315
|
}
|
|
@@ -1091,7 +1110,9 @@ function reactiveReadArray(array) {
|
|
|
1091
1110
|
const raw = toRaw(array);
|
|
1092
1111
|
if (raw === array) return raw;
|
|
1093
1112
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
1094
|
-
|
|
1113
|
+
if (isShallow(array)) return raw;
|
|
1114
|
+
if (!isReadonly(array)) return raw.map(toReactive);
|
|
1115
|
+
return isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
|
|
1095
1116
|
}
|
|
1096
1117
|
function shallowReadArray(arr) {
|
|
1097
1118
|
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
@@ -1218,19 +1239,41 @@ const arrayInstrumentations = {
|
|
|
1218
1239
|
};
|
|
1219
1240
|
function iterator(self, method, wrapValue) {
|
|
1220
1241
|
const arr = shallowReadArray(self);
|
|
1221
|
-
const
|
|
1242
|
+
const methodFn = arr[method];
|
|
1243
|
+
const iter = methodFn.call(arr);
|
|
1222
1244
|
if (arr !== self && !isShallow(self)) {
|
|
1223
|
-
iter.
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
if (
|
|
1227
|
-
|
|
1245
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
1246
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
1247
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
1248
|
+
if (methodFn !== arrayProto[method]) {
|
|
1249
|
+
Object.defineProperties(wrapped, {
|
|
1250
|
+
return: {
|
|
1251
|
+
get() {
|
|
1252
|
+
const fn = iter.return;
|
|
1253
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1256
|
+
throw: {
|
|
1257
|
+
get() {
|
|
1258
|
+
const fn = iter.throw;
|
|
1259
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
});
|
|
1228
1263
|
}
|
|
1229
|
-
return
|
|
1230
|
-
}
|
|
1264
|
+
return wrapped;
|
|
1265
|
+
}
|
|
1266
|
+
iter._next = iter.next;
|
|
1267
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
1231
1268
|
}
|
|
1232
1269
|
return iter;
|
|
1233
1270
|
}
|
|
1271
|
+
function wrapResult(result, wrapValue) {
|
|
1272
|
+
if (!result.done) {
|
|
1273
|
+
result.value = wrapValue(result.value);
|
|
1274
|
+
}
|
|
1275
|
+
return result;
|
|
1276
|
+
}
|
|
1234
1277
|
const arrayProto = Array.prototype;
|
|
1235
1278
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1236
1279
|
const arr = shallowReadArray(self);
|
|
@@ -1653,6 +1696,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
|
|
|
1653
1696
|
return !isReadonly2;
|
|
1654
1697
|
} else if (key === "__v_isReadonly") {
|
|
1655
1698
|
return isReadonly2;
|
|
1699
|
+
} else if (key === "__v_isShallow") {
|
|
1700
|
+
return shallow;
|
|
1656
1701
|
} else if (key === "__v_raw") {
|
|
1657
1702
|
return target;
|
|
1658
1703
|
}
|
|
@@ -2198,9 +2243,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2198
2243
|
if (once && cb) {
|
|
2199
2244
|
const _cb = cb;
|
|
2200
2245
|
cb = (...args) => {
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2246
|
+
try {
|
|
2247
|
+
return _cb(...args);
|
|
2248
|
+
} finally {
|
|
2249
|
+
watchHandle();
|
|
2250
|
+
}
|
|
2204
2251
|
};
|
|
2205
2252
|
}
|
|
2206
2253
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -2211,12 +2258,13 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2211
2258
|
if (cb) {
|
|
2212
2259
|
const newValue = effect.run();
|
|
2213
2260
|
if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2214
|
-
if (cleanup) {
|
|
2215
|
-
cleanup();
|
|
2216
|
-
}
|
|
2217
2261
|
const currentWatcher = activeWatcher;
|
|
2218
|
-
|
|
2262
|
+
pauseTracking();
|
|
2219
2263
|
try {
|
|
2264
|
+
if (cleanup) {
|
|
2265
|
+
cleanup();
|
|
2266
|
+
}
|
|
2267
|
+
activeWatcher = effect;
|
|
2220
2268
|
const args = [
|
|
2221
2269
|
newValue,
|
|
2222
2270
|
// pass undefined as the old value when it's changed for the first time
|
|
@@ -2230,6 +2278,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2230
2278
|
);
|
|
2231
2279
|
} finally {
|
|
2232
2280
|
activeWatcher = currentWatcher;
|
|
2281
|
+
resetTracking();
|
|
2233
2282
|
}
|
|
2234
2283
|
}
|
|
2235
2284
|
} else {
|
|
@@ -2630,21 +2679,21 @@ function queuePostFlushCb(cb) {
|
|
|
2630
2679
|
}
|
|
2631
2680
|
queueFlush();
|
|
2632
2681
|
}
|
|
2633
|
-
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
2682
|
+
function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
|
|
2634
2683
|
{
|
|
2635
2684
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2636
2685
|
}
|
|
2637
2686
|
for (; i < queue.length; i++) {
|
|
2638
2687
|
const cb = queue[i];
|
|
2639
2688
|
if (cb && cb.flags & 2) {
|
|
2640
|
-
if (instance && cb.id !== instance.uid) {
|
|
2689
|
+
if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
|
|
2641
2690
|
continue;
|
|
2642
2691
|
}
|
|
2643
2692
|
if (checkRecursiveUpdates(seen, cb)) {
|
|
2644
2693
|
continue;
|
|
2645
2694
|
}
|
|
2646
2695
|
queue.splice(i, 1);
|
|
2647
|
-
i
|
|
2696
|
+
i = instance ? i - 1 : flushIndex;
|
|
2648
2697
|
if (cb.flags & 4) {
|
|
2649
2698
|
cb.flags &= -2;
|
|
2650
2699
|
}
|
|
@@ -2655,12 +2704,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
|
2655
2704
|
}
|
|
2656
2705
|
}
|
|
2657
2706
|
}
|
|
2658
|
-
function flushPostFlushCbs(seen) {
|
|
2707
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
2659
2708
|
if (pendingPostFlushCbs.length) {
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
)
|
|
2663
|
-
|
|
2709
|
+
let cbs = pendingPostFlushCbs;
|
|
2710
|
+
let kept = 0;
|
|
2711
|
+
if (skip) {
|
|
2712
|
+
cbs = [];
|
|
2713
|
+
for (let i = 0; i < pendingPostFlushCbs.length; i++) {
|
|
2714
|
+
const cb = pendingPostFlushCbs[i];
|
|
2715
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
|
|
2716
|
+
pendingPostFlushCbs[kept++] = cb;
|
|
2717
|
+
} else {
|
|
2718
|
+
cbs.push(cb);
|
|
2719
|
+
}
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
|
|
2723
|
+
pendingPostFlushCbs.length = kept;
|
|
2664
2724
|
if (activePostFlushCbs) {
|
|
2665
2725
|
for (let i = 0; i < deduped.length; i++) {
|
|
2666
2726
|
activePostFlushCbs.push(deduped[i]);
|
|
@@ -2686,6 +2746,22 @@ function flushPostFlushCbs(seen) {
|
|
|
2686
2746
|
postFlushIndex = 0;
|
|
2687
2747
|
}
|
|
2688
2748
|
}
|
|
2749
|
+
let isFlushing = false;
|
|
2750
|
+
function flushOnAppMount(fn, minUid) {
|
|
2751
|
+
if (isFlushing) {
|
|
2752
|
+
fn();
|
|
2753
|
+
return;
|
|
2754
|
+
}
|
|
2755
|
+
const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
|
|
2756
|
+
fn();
|
|
2757
|
+
isFlushing = true;
|
|
2758
|
+
try {
|
|
2759
|
+
flushPreFlushCbs(void 0, minUid);
|
|
2760
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
2761
|
+
} finally {
|
|
2762
|
+
isFlushing = false;
|
|
2763
|
+
}
|
|
2764
|
+
}
|
|
2689
2765
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
2690
2766
|
function flushJobs(seen) {
|
|
2691
2767
|
{
|
|
@@ -3656,6 +3732,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
3656
3732
|
let isPre = false;
|
|
3657
3733
|
if (flush === "post") {
|
|
3658
3734
|
baseWatchOptions.scheduler = (job) => {
|
|
3735
|
+
job.i = instance;
|
|
3659
3736
|
queuePostRenderEffect(job, instance && instance.suspense);
|
|
3660
3737
|
};
|
|
3661
3738
|
} else if (flush !== "sync") {
|
|
@@ -3957,7 +4034,11 @@ const TeleportImpl = {
|
|
|
3957
4034
|
};
|
|
3958
4035
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
3959
4036
|
if (moveType === 0) {
|
|
4037
|
+
if (vnode.targetStart) {
|
|
4038
|
+
insert(vnode.targetStart, container, parentAnchor);
|
|
4039
|
+
}
|
|
3960
4040
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
4041
|
+
parentAnchor = vnode.targetAnchor;
|
|
3961
4042
|
}
|
|
3962
4043
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3963
4044
|
const isReorder = moveType === 2;
|
|
@@ -4126,10 +4207,6 @@ const BaseTransitionPropsValidators = {
|
|
|
4126
4207
|
onAfterAppear: TransitionHookValidator,
|
|
4127
4208
|
onAppearCancelled: TransitionHookValidator
|
|
4128
4209
|
};
|
|
4129
|
-
const recursiveGetSubtree = (instance) => {
|
|
4130
|
-
const subTree = instance.subTree;
|
|
4131
|
-
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
4132
|
-
};
|
|
4133
4210
|
const BaseTransitionImpl = {
|
|
4134
4211
|
name: `BaseTransition`,
|
|
4135
4212
|
props: BaseTransitionPropsValidators,
|
|
@@ -4170,7 +4247,7 @@ const BaseTransitionImpl = {
|
|
|
4170
4247
|
setTransitionHooks(innerChild, enterHooks);
|
|
4171
4248
|
}
|
|
4172
4249
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
4173
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) &&
|
|
4250
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
|
|
4174
4251
|
let leavingHooks = resolveTransitionHooks(
|
|
4175
4252
|
oldInnerChild,
|
|
4176
4253
|
rawProps,
|
|
@@ -4306,8 +4383,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4306
4383
|
);
|
|
4307
4384
|
}
|
|
4308
4385
|
const leavingVNode = leavingVNodesCache[key];
|
|
4309
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
4310
|
-
leavingVNode.el[leaveCbKey]
|
|
4386
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
4387
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
4388
|
+
if (!leavingCb) {
|
|
4389
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
4390
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
4391
|
+
}
|
|
4392
|
+
if (leavingCb) {
|
|
4393
|
+
leavingCb();
|
|
4394
|
+
}
|
|
4311
4395
|
}
|
|
4312
4396
|
callHook(hook, [el]);
|
|
4313
4397
|
},
|
|
@@ -4435,6 +4519,12 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4435
4519
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4436
4520
|
} else {
|
|
4437
4521
|
vnode.transition = hooks;
|
|
4522
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
4523
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
4524
|
+
if (child) {
|
|
4525
|
+
setTransitionHooks(child, hooks);
|
|
4526
|
+
}
|
|
4527
|
+
}
|
|
4438
4528
|
}
|
|
4439
4529
|
}
|
|
4440
4530
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -4459,6 +4549,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
4459
4549
|
}
|
|
4460
4550
|
return ret;
|
|
4461
4551
|
}
|
|
4552
|
+
function getTransitionRoot(vnode) {
|
|
4553
|
+
if (vnode.component) {
|
|
4554
|
+
return getTransitionRoot(vnode.component.subTree);
|
|
4555
|
+
}
|
|
4556
|
+
if (vnode.type === Fragment) {
|
|
4557
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4558
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
4559
|
+
}
|
|
4560
|
+
if (vnode.type !== Comment) {
|
|
4561
|
+
return vnode;
|
|
4562
|
+
}
|
|
4563
|
+
}
|
|
4462
4564
|
|
|
4463
4565
|
// @__NO_SIDE_EFFECTS__
|
|
4464
4566
|
function defineComponent(options, extraOptions) {
|
|
@@ -4832,13 +4934,15 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4832
4934
|
getContainerType(container),
|
|
4833
4935
|
optimized
|
|
4834
4936
|
);
|
|
4835
|
-
if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
|
|
4937
|
+
if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
|
|
4836
4938
|
let subTree;
|
|
4837
4939
|
if (isFragmentStart) {
|
|
4838
4940
|
subTree = createVNode(Static);
|
|
4839
4941
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
4840
4942
|
} else {
|
|
4841
|
-
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
|
|
4943
|
+
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
|
|
4944
|
+
node.nodeType === 8 ? Comment : "div"
|
|
4945
|
+
);
|
|
4842
4946
|
}
|
|
4843
4947
|
subTree.el = node;
|
|
4844
4948
|
vnode.component.subTree = subTree;
|
|
@@ -5362,14 +5466,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
5362
5466
|
break;
|
|
5363
5467
|
}
|
|
5364
5468
|
}, opts);
|
|
5365
|
-
|
|
5366
|
-
if (!(el instanceof Element)) return;
|
|
5469
|
+
const observe = (el) => {
|
|
5367
5470
|
if (elementIsVisibleInViewport(el)) {
|
|
5368
5471
|
hydrate();
|
|
5369
5472
|
ob.disconnect();
|
|
5370
5473
|
return false;
|
|
5371
5474
|
}
|
|
5475
|
+
if (getComputedStyle(el).display === "contents") {
|
|
5476
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
5477
|
+
if (observe(el.children[i]) === false) return false;
|
|
5478
|
+
}
|
|
5479
|
+
}
|
|
5372
5480
|
ob.observe(el);
|
|
5481
|
+
};
|
|
5482
|
+
forEach((el) => {
|
|
5483
|
+
if (!(el instanceof Element)) return;
|
|
5484
|
+
return observe(el);
|
|
5373
5485
|
});
|
|
5374
5486
|
return () => ob.disconnect();
|
|
5375
5487
|
};
|
|
@@ -5726,6 +5838,7 @@ const KeepAliveImpl = {
|
|
|
5726
5838
|
unmount(cached);
|
|
5727
5839
|
} else if (current) {
|
|
5728
5840
|
resetShapeFlag(current);
|
|
5841
|
+
if (cached) resetShapeFlag(cached);
|
|
5729
5842
|
}
|
|
5730
5843
|
cache.delete(key);
|
|
5731
5844
|
keys.delete(key);
|
|
@@ -6308,9 +6421,11 @@ function renderList(source, renderItem, cache, index) {
|
|
|
6308
6421
|
}
|
|
6309
6422
|
} else if (typeof source === "number") {
|
|
6310
6423
|
if (!Number.isInteger(source) || source < 0) {
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6424
|
+
{
|
|
6425
|
+
warn$1(
|
|
6426
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
6427
|
+
);
|
|
6428
|
+
}
|
|
6314
6429
|
ret = [];
|
|
6315
6430
|
} else {
|
|
6316
6431
|
ret = new Array(source);
|
|
@@ -6629,6 +6744,7 @@ function installCompatInstanceProperties(map) {
|
|
|
6629
6744
|
$vnode: (i) => i.vnode,
|
|
6630
6745
|
// some private properties that are likely accessed...
|
|
6631
6746
|
_self: (i) => i.proxy,
|
|
6747
|
+
_setupProxy: (i) => i.setupState,
|
|
6632
6748
|
_uid: (i) => i.uid,
|
|
6633
6749
|
_data: (i) => i.data,
|
|
6634
6750
|
_isMounted: (i) => i.isMounted,
|
|
@@ -7616,7 +7732,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7616
7732
|
return vm;
|
|
7617
7733
|
}
|
|
7618
7734
|
}
|
|
7619
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7735
|
+
Vue.version = `2.6.14-compat:${"3.5.44"}`;
|
|
7620
7736
|
Vue.config = singletonApp.config;
|
|
7621
7737
|
Vue.use = (plugin, ...options) => {
|
|
7622
7738
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8773,7 +8889,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
8773
8889
|
}
|
|
8774
8890
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
8775
8891
|
const key = nextKeys[i];
|
|
8776
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
8892
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
8777
8893
|
return true;
|
|
8778
8894
|
}
|
|
8779
8895
|
}
|
|
@@ -9472,6 +9588,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9472
9588
|
optimized = false;
|
|
9473
9589
|
n2.dynamicChildren = null;
|
|
9474
9590
|
}
|
|
9591
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
9592
|
+
if (n2.dynamicChildren === EMPTY_ARR) {
|
|
9593
|
+
n2.dynamicChildren = [];
|
|
9594
|
+
}
|
|
9595
|
+
n2.dynamicChildren.hasOnce = true;
|
|
9596
|
+
}
|
|
9475
9597
|
const { type, ref, shapeFlag } = n2;
|
|
9476
9598
|
switch (type) {
|
|
9477
9599
|
case Text:
|
|
@@ -9878,15 +10000,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9878
10000
|
for (let i = 0; i < newChildren.length; i++) {
|
|
9879
10001
|
const oldVNode = oldChildren[i];
|
|
9880
10002
|
const newVNode = newChildren[i];
|
|
10003
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
9881
10004
|
const container = (
|
|
9882
10005
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
9883
10006
|
// which will not have a mounted element
|
|
9884
|
-
|
|
10007
|
+
oldEl && // - In the case of a Fragment, we need to provide the actual parent
|
|
9885
10008
|
// of the Fragment itself so it can move its children.
|
|
9886
10009
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
9887
10010
|
// which also requires the correct parent container
|
|
9888
10011
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
9889
|
-
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(
|
|
10012
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
|
|
9890
10013
|
// In other cases, the parent container is not actually used so we
|
|
9891
10014
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
9892
10015
|
fallbackContainer
|
|
@@ -10051,7 +10174,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10051
10174
|
}
|
|
10052
10175
|
if (isHmrUpdating) initialVNode.el = null;
|
|
10053
10176
|
if (instance.asyncDep) {
|
|
10054
|
-
parentSuspense && parentSuspense.registerDep(
|
|
10177
|
+
parentSuspense && parentSuspense.registerDep(
|
|
10178
|
+
instance,
|
|
10179
|
+
setupRenderEffect,
|
|
10180
|
+
optimized,
|
|
10181
|
+
namespace
|
|
10182
|
+
);
|
|
10055
10183
|
if (!initialVNode.el) {
|
|
10056
10184
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
10057
10185
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -10080,6 +10208,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10080
10208
|
{
|
|
10081
10209
|
pushWarningContext(n2);
|
|
10082
10210
|
}
|
|
10211
|
+
n2.el = n1.el;
|
|
10212
|
+
n2.placeholder = n1.placeholder;
|
|
10083
10213
|
updateComponentPreRender(instance, n2, optimized);
|
|
10084
10214
|
{
|
|
10085
10215
|
popWarningContext();
|
|
@@ -10091,6 +10221,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10091
10221
|
}
|
|
10092
10222
|
} else {
|
|
10093
10223
|
n2.el = n1.el;
|
|
10224
|
+
n2.placeholder = n1.placeholder;
|
|
10094
10225
|
instance.vnode = n2;
|
|
10095
10226
|
}
|
|
10096
10227
|
};
|
|
@@ -10695,7 +10826,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10695
10826
|
cacheIndex,
|
|
10696
10827
|
memo
|
|
10697
10828
|
} = vnode;
|
|
10698
|
-
if (patchFlag === -2) {
|
|
10829
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
|
|
10699
10830
|
optimized = false;
|
|
10700
10831
|
}
|
|
10701
10832
|
if (ref != null) {
|
|
@@ -10703,7 +10834,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10703
10834
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
10704
10835
|
resetTracking();
|
|
10705
10836
|
}
|
|
10706
|
-
if (cacheIndex != null) {
|
|
10837
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
10707
10838
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
10708
10839
|
}
|
|
10709
10840
|
if (shapeFlag & 256) {
|
|
@@ -10768,35 +10899,37 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10768
10899
|
};
|
|
10769
10900
|
const remove = (vnode) => {
|
|
10770
10901
|
const { type, el, anchor, transition } = vnode;
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
if (child.type === Comment) {
|
|
10775
|
-
hostRemove(child.el);
|
|
10776
|
-
} else {
|
|
10777
|
-
remove(child);
|
|
10778
|
-
}
|
|
10779
|
-
});
|
|
10780
|
-
} else {
|
|
10781
|
-
removeFragment(el, anchor);
|
|
10782
|
-
}
|
|
10902
|
+
const isFragment = type === Fragment;
|
|
10903
|
+
if (isFragment && !transition) {
|
|
10904
|
+
removeFragment(el, anchor);
|
|
10783
10905
|
return;
|
|
10784
10906
|
}
|
|
10785
10907
|
if (type === Static) {
|
|
10786
10908
|
removeStaticNode(vnode);
|
|
10909
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
10910
|
+
transition.afterLeave();
|
|
10911
|
+
}
|
|
10787
10912
|
return;
|
|
10788
10913
|
}
|
|
10914
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
10789
10915
|
const performRemove = () => {
|
|
10790
|
-
|
|
10916
|
+
if (isFragment) {
|
|
10917
|
+
if (hostParentNode(el)) {
|
|
10918
|
+
removeFragment(el, anchor);
|
|
10919
|
+
}
|
|
10920
|
+
} else {
|
|
10921
|
+
hostRemove(el);
|
|
10922
|
+
}
|
|
10791
10923
|
if (transition && !transition.persisted && transition.afterLeave) {
|
|
10792
10924
|
transition.afterLeave();
|
|
10793
10925
|
}
|
|
10794
10926
|
};
|
|
10795
|
-
if (
|
|
10927
|
+
if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
10796
10928
|
const { leave, delayLeave } = transition;
|
|
10797
|
-
const
|
|
10929
|
+
const leavingEl = leavingNode.el;
|
|
10930
|
+
const performLeave = () => leave(leavingEl, performRemove);
|
|
10798
10931
|
if (delayLeave) {
|
|
10799
|
-
delayLeave(
|
|
10932
|
+
delayLeave(leavingEl, performRemove, performLeave);
|
|
10800
10933
|
} else {
|
|
10801
10934
|
performLeave();
|
|
10802
10935
|
}
|
|
@@ -10830,6 +10963,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10830
10963
|
if (job) {
|
|
10831
10964
|
job.flags |= 8;
|
|
10832
10965
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
10966
|
+
} else if (instance.vnode.el && subTree) {
|
|
10967
|
+
subTree.transition = instance.vnode.transition;
|
|
10968
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
10833
10969
|
}
|
|
10834
10970
|
if (um) {
|
|
10835
10971
|
queuePostRenderEffect(um, parentSuspense);
|
|
@@ -10863,32 +10999,26 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10863
10999
|
const teleportEnd = el && el[TeleportEndKey];
|
|
10864
11000
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
10865
11001
|
};
|
|
10866
|
-
let isFlushing = false;
|
|
10867
11002
|
const render = (vnode, container, namespace) => {
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
if (
|
|
10871
|
-
|
|
10872
|
-
|
|
11003
|
+
const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
|
|
11004
|
+
flushOnAppMount(() => {
|
|
11005
|
+
if (vnode == null) {
|
|
11006
|
+
if (container._vnode) {
|
|
11007
|
+
unmount(container._vnode, null, null, true);
|
|
11008
|
+
}
|
|
11009
|
+
} else {
|
|
11010
|
+
patch(
|
|
11011
|
+
container._vnode || null,
|
|
11012
|
+
vnode,
|
|
11013
|
+
container,
|
|
11014
|
+
null,
|
|
11015
|
+
null,
|
|
11016
|
+
null,
|
|
11017
|
+
namespace
|
|
11018
|
+
);
|
|
10873
11019
|
}
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
container._vnode || null,
|
|
10877
|
-
vnode,
|
|
10878
|
-
container,
|
|
10879
|
-
null,
|
|
10880
|
-
null,
|
|
10881
|
-
null,
|
|
10882
|
-
namespace
|
|
10883
|
-
);
|
|
10884
|
-
}
|
|
10885
|
-
container._vnode = vnode;
|
|
10886
|
-
if (!isFlushing) {
|
|
10887
|
-
isFlushing = true;
|
|
10888
|
-
flushPreFlushCbs(instance);
|
|
10889
|
-
flushPostFlushCbs();
|
|
10890
|
-
isFlushing = false;
|
|
10891
|
-
}
|
|
11020
|
+
container._vnode = vnode;
|
|
11021
|
+
}, minUid);
|
|
10892
11022
|
};
|
|
10893
11023
|
const internals = {
|
|
10894
11024
|
p: patch,
|
|
@@ -11050,7 +11180,7 @@ const SuspenseImpl = {
|
|
|
11050
11180
|
rendererInternals
|
|
11051
11181
|
);
|
|
11052
11182
|
} else {
|
|
11053
|
-
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
11183
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
|
|
11054
11184
|
n2.suspense = n1.suspense;
|
|
11055
11185
|
n2.suspense.vnode = n2;
|
|
11056
11186
|
n2.el = n1.el;
|
|
@@ -11136,10 +11266,12 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11136
11266
|
if (pendingBranch) {
|
|
11137
11267
|
suspense.pendingBranch = newBranch;
|
|
11138
11268
|
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
11269
|
+
suspense.deps++;
|
|
11139
11270
|
patch(
|
|
11140
11271
|
pendingBranch,
|
|
11141
11272
|
newBranch,
|
|
11142
|
-
|
|
11273
|
+
// a hydrating pending branch is adopted SSR DOM, already in place
|
|
11274
|
+
isHydrating ? container : suspense.hiddenContainer,
|
|
11143
11275
|
null,
|
|
11144
11276
|
parentComponent,
|
|
11145
11277
|
suspense,
|
|
@@ -11147,6 +11279,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11147
11279
|
slotScopeIds,
|
|
11148
11280
|
optimized
|
|
11149
11281
|
);
|
|
11282
|
+
suspense.deps--;
|
|
11150
11283
|
if (suspense.deps <= 0) {
|
|
11151
11284
|
suspense.resolve();
|
|
11152
11285
|
} else if (isInFallback) {
|
|
@@ -11412,6 +11545,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11412
11545
|
suspense.effects = [];
|
|
11413
11546
|
if (isSuspensible) {
|
|
11414
11547
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
11548
|
+
parentSuspenseId = void 0;
|
|
11415
11549
|
parentSuspense.deps--;
|
|
11416
11550
|
if (parentSuspense.deps === 0 && !sync) {
|
|
11417
11551
|
parentSuspense.resolve();
|
|
@@ -11472,7 +11606,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11472
11606
|
next() {
|
|
11473
11607
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
11474
11608
|
},
|
|
11475
|
-
|
|
11609
|
+
// `namespace` intentionally shadows the boundary's own: the dep must be
|
|
11610
|
+
// mounted with the namespace of the position it was rendered at, which can
|
|
11611
|
+
// differ from the boundary's (e.g. a component nested inside an <svg>).
|
|
11612
|
+
registerDep(instance, setupRenderEffect, optimized2, namespace2) {
|
|
11476
11613
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
11477
11614
|
if (isInPendingSuspense) {
|
|
11478
11615
|
suspense.deps++;
|
|
@@ -11485,6 +11622,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11485
11622
|
return;
|
|
11486
11623
|
}
|
|
11487
11624
|
unsetCurrentInstance();
|
|
11625
|
+
if (!instance.scope.active) {
|
|
11626
|
+
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
11627
|
+
suspense.resolve();
|
|
11628
|
+
}
|
|
11629
|
+
return;
|
|
11630
|
+
}
|
|
11488
11631
|
instance.asyncResolved = true;
|
|
11489
11632
|
const { vnode: vnode2 } = instance;
|
|
11490
11633
|
{
|
|
@@ -11506,7 +11649,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11506
11649
|
// consider the comment placeholder case.
|
|
11507
11650
|
hydratedEl ? null : next(instance.subTree),
|
|
11508
11651
|
suspense,
|
|
11509
|
-
|
|
11652
|
+
namespace2,
|
|
11510
11653
|
optimized2
|
|
11511
11654
|
);
|
|
11512
11655
|
if (placeholder) {
|
|
@@ -11970,7 +12113,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
11970
12113
|
el: vnode.el,
|
|
11971
12114
|
anchor: vnode.anchor,
|
|
11972
12115
|
ctx: vnode.ctx,
|
|
11973
|
-
ce: vnode.ce
|
|
12116
|
+
ce: vnode.ce,
|
|
12117
|
+
cacheIndex: vnode.cacheIndex
|
|
11974
12118
|
};
|
|
11975
12119
|
if (transition && cloneTransition) {
|
|
11976
12120
|
setTransitionHooks(
|
|
@@ -12106,6 +12250,9 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
12106
12250
|
|
|
12107
12251
|
const emptyAppContext = createAppContext();
|
|
12108
12252
|
let uid = 0;
|
|
12253
|
+
function getNextUid() {
|
|
12254
|
+
return uid;
|
|
12255
|
+
}
|
|
12109
12256
|
function createComponentInstance(vnode, parent, suspense) {
|
|
12110
12257
|
const type = vnode.type;
|
|
12111
12258
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -12790,7 +12937,7 @@ function isMemoSame(cached, memo) {
|
|
|
12790
12937
|
return true;
|
|
12791
12938
|
}
|
|
12792
12939
|
|
|
12793
|
-
const version = "3.5.
|
|
12940
|
+
const version = "3.5.44";
|
|
12794
12941
|
const warn = warn$1 ;
|
|
12795
12942
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12796
12943
|
const devtools = devtools$1 ;
|
|
@@ -13410,7 +13557,9 @@ function patchStyle(el, prev, next) {
|
|
|
13410
13557
|
}
|
|
13411
13558
|
}
|
|
13412
13559
|
if (vShowOriginalDisplay in el) {
|
|
13413
|
-
|
|
13560
|
+
if (!isCssString || prev !== next) {
|
|
13561
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
13562
|
+
}
|
|
13414
13563
|
if (el[vShowHidden]) {
|
|
13415
13564
|
style.display = "none";
|
|
13416
13565
|
}
|
|
@@ -13936,7 +14085,9 @@ class VueElement extends BaseClass {
|
|
|
13936
14085
|
"Custom element style injection is not supported when using shadowRoot: false"
|
|
13937
14086
|
);
|
|
13938
14087
|
}
|
|
13939
|
-
this.
|
|
14088
|
+
if (this._connected) {
|
|
14089
|
+
this._mount(def);
|
|
14090
|
+
}
|
|
13940
14091
|
};
|
|
13941
14092
|
const asyncDef = this._def.__asyncLoader;
|
|
13942
14093
|
if (asyncDef) {
|
|
@@ -14306,6 +14457,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
|
|
|
14306
14457
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
14307
14458
|
const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
|
|
14308
14459
|
const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
|
|
14460
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
14309
14461
|
const decorate = (t) => {
|
|
14310
14462
|
delete t.props.mode;
|
|
14311
14463
|
{
|
|
@@ -14324,21 +14476,30 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14324
14476
|
const state = useTransitionState();
|
|
14325
14477
|
let prevChildren;
|
|
14326
14478
|
let children;
|
|
14327
|
-
|
|
14328
|
-
|
|
14329
|
-
|
|
14479
|
+
let origins;
|
|
14480
|
+
let moves;
|
|
14481
|
+
const willMove = () => {
|
|
14482
|
+
if (moves === void 0) {
|
|
14483
|
+
moves = prevChildren.length > 0 && hasCSSTransform(
|
|
14484
|
+
prevChildren[0].el,
|
|
14485
|
+
instance.vnode.el,
|
|
14486
|
+
resolveMoveClass(props)
|
|
14487
|
+
);
|
|
14330
14488
|
}
|
|
14331
|
-
|
|
14332
|
-
|
|
14333
|
-
|
|
14334
|
-
|
|
14335
|
-
|
|
14336
|
-
)) {
|
|
14489
|
+
return moves;
|
|
14490
|
+
};
|
|
14491
|
+
onUpdated(() => {
|
|
14492
|
+
pendingGroups.delete(instance);
|
|
14493
|
+
if (!willMove()) {
|
|
14337
14494
|
prevChildren = [];
|
|
14495
|
+
origins = void 0;
|
|
14338
14496
|
return;
|
|
14339
14497
|
}
|
|
14498
|
+
const moveClass = resolveMoveClass(props);
|
|
14340
14499
|
prevChildren.forEach(callPendingCbs);
|
|
14341
|
-
|
|
14500
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
14501
|
+
origins = void 0;
|
|
14502
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
14342
14503
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
14343
14504
|
forceReflow(instance.vnode.el);
|
|
14344
14505
|
movedChildren.forEach((c) => {
|
|
@@ -14371,6 +14532,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14371
14532
|
tag = "span";
|
|
14372
14533
|
}
|
|
14373
14534
|
prevChildren = [];
|
|
14535
|
+
moves = void 0;
|
|
14374
14536
|
if (children) {
|
|
14375
14537
|
for (let i = 0; i < children.length; i++) {
|
|
14376
14538
|
const child = children[i];
|
|
@@ -14402,6 +14564,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14402
14564
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
14403
14565
|
}
|
|
14404
14566
|
}
|
|
14567
|
+
if (prevChildren.length) {
|
|
14568
|
+
origins = getOrigins(instance);
|
|
14569
|
+
pendingGroups.set(instance, willMove);
|
|
14570
|
+
}
|
|
14405
14571
|
return createVNode(tag, null, children);
|
|
14406
14572
|
};
|
|
14407
14573
|
}
|
|
@@ -14416,8 +14582,11 @@ function callPendingCbs(c) {
|
|
|
14416
14582
|
el[enterCbKey]();
|
|
14417
14583
|
}
|
|
14418
14584
|
}
|
|
14419
|
-
function
|
|
14420
|
-
|
|
14585
|
+
function resolveMoveClass(props) {
|
|
14586
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
14587
|
+
}
|
|
14588
|
+
function recordPosition(c, shift) {
|
|
14589
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
14421
14590
|
}
|
|
14422
14591
|
function applyTranslation(c) {
|
|
14423
14592
|
const oldPos = positionMap.get(c);
|
|
@@ -14441,13 +14610,41 @@ function applyTranslation(c) {
|
|
|
14441
14610
|
return c;
|
|
14442
14611
|
}
|
|
14443
14612
|
}
|
|
14444
|
-
function getPosition(el) {
|
|
14613
|
+
function getPosition(el, shift) {
|
|
14445
14614
|
const rect = el.getBoundingClientRect();
|
|
14446
14615
|
return {
|
|
14447
|
-
left: rect.left,
|
|
14448
|
-
top: rect.top
|
|
14616
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
14617
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
14449
14618
|
};
|
|
14450
14619
|
}
|
|
14620
|
+
function getOrigins(instance) {
|
|
14621
|
+
let origins;
|
|
14622
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
14623
|
+
const willMove = pendingGroups.get(group);
|
|
14624
|
+
if (willMove) {
|
|
14625
|
+
const item = findItem(group.vnode.el, instance.vnode.el);
|
|
14626
|
+
if (item) {
|
|
14627
|
+
(origins || (origins = [])).push(
|
|
14628
|
+
extend(getPosition(item), { item, willMove })
|
|
14629
|
+
);
|
|
14630
|
+
}
|
|
14631
|
+
}
|
|
14632
|
+
}
|
|
14633
|
+
return origins;
|
|
14634
|
+
}
|
|
14635
|
+
function findItem(root, node) {
|
|
14636
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
14637
|
+
while (node && node.parentNode !== container) {
|
|
14638
|
+
node = node.parentNode;
|
|
14639
|
+
}
|
|
14640
|
+
if (node && node.nodeType === 1) {
|
|
14641
|
+
return node;
|
|
14642
|
+
}
|
|
14643
|
+
}
|
|
14644
|
+
function getOriginShift(origins, root) {
|
|
14645
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
14646
|
+
return origin && getPosition(origin.item, origin);
|
|
14647
|
+
}
|
|
14451
14648
|
function hasCSSTransform(el, root, moveClass) {
|
|
14452
14649
|
const clone = el.cloneNode();
|
|
14453
14650
|
const _vtc = el[vtcKey];
|