@vue/compat 3.5.43 → 3.5.45
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/README.md +2 -2
- package/dist/vue.cjs.js +581 -232
- package/dist/vue.cjs.prod.js +589 -216
- package/dist/vue.esm-browser.js +570 -222
- package/dist/vue.esm-browser.prod.js +10 -10
- package/dist/vue.esm-bundler.js +572 -224
- package/dist/vue.global.js +570 -222
- package/dist/vue.global.prod.js +10 -10
- package/dist/vue.runtime.esm-browser.js +558 -217
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +560 -219
- package/dist/vue.runtime.global.js +558 -217
- 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.45
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -61,24 +61,20 @@ const cacheStringFunction = (fn) => {
|
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
63
|
const camelizeRE = /-\w/g;
|
|
64
|
-
const camelize = cacheStringFunction(
|
|
65
|
-
(
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
);
|
|
64
|
+
const camelize = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
65
|
+
return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
|
|
66
|
+
});
|
|
69
67
|
const hyphenateRE = /\B([A-Z])/g;
|
|
70
|
-
const hyphenate = cacheStringFunction(
|
|
68
|
+
const hyphenate = /* @__PURE__ */ cacheStringFunction(
|
|
71
69
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
72
70
|
);
|
|
73
|
-
const capitalize = cacheStringFunction((str) => {
|
|
71
|
+
const capitalize = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
74
72
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
75
73
|
});
|
|
76
|
-
const toHandlerKey = cacheStringFunction(
|
|
77
|
-
(str)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
);
|
|
74
|
+
const toHandlerKey = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
75
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
76
|
+
return s;
|
|
77
|
+
});
|
|
82
78
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
83
79
|
const invokeArrayFns = (fns, ...arg) => {
|
|
84
80
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -191,7 +187,7 @@ const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
|
|
|
191
187
|
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
192
188
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
193
189
|
|
|
194
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
190
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
195
191
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
196
192
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
197
193
|
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
@@ -535,7 +531,11 @@ function getCurrentScope() {
|
|
|
535
531
|
}
|
|
536
532
|
function onScopeDispose(fn, failSilently = false) {
|
|
537
533
|
if (activeEffectScope) {
|
|
538
|
-
activeEffectScope.
|
|
534
|
+
if (activeEffectScope.active) {
|
|
535
|
+
activeEffectScope.cleanups.push(fn);
|
|
536
|
+
} else {
|
|
537
|
+
fn();
|
|
538
|
+
}
|
|
539
539
|
} else if (!!(process.env.NODE_ENV !== "production") && !failSilently) {
|
|
540
540
|
warn$2(
|
|
541
541
|
`onScopeDispose() is called when there is no active effect scope to be associated with.`
|
|
@@ -1243,19 +1243,41 @@ const arrayInstrumentations = {
|
|
|
1243
1243
|
};
|
|
1244
1244
|
function iterator(self, method, wrapValue) {
|
|
1245
1245
|
const arr = shallowReadArray(self);
|
|
1246
|
-
const
|
|
1246
|
+
const methodFn = arr[method];
|
|
1247
|
+
const iter = methodFn.call(arr);
|
|
1247
1248
|
if (arr !== self && !isShallow(self)) {
|
|
1248
|
-
iter.
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
if (
|
|
1252
|
-
|
|
1249
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
1250
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
1251
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
1252
|
+
if (methodFn !== arrayProto[method]) {
|
|
1253
|
+
Object.defineProperties(wrapped, {
|
|
1254
|
+
return: {
|
|
1255
|
+
get() {
|
|
1256
|
+
const fn = iter.return;
|
|
1257
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1258
|
+
}
|
|
1259
|
+
},
|
|
1260
|
+
throw: {
|
|
1261
|
+
get() {
|
|
1262
|
+
const fn = iter.throw;
|
|
1263
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
});
|
|
1253
1267
|
}
|
|
1254
|
-
return
|
|
1255
|
-
}
|
|
1268
|
+
return wrapped;
|
|
1269
|
+
}
|
|
1270
|
+
iter._next = iter.next;
|
|
1271
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
1256
1272
|
}
|
|
1257
1273
|
return iter;
|
|
1258
1274
|
}
|
|
1275
|
+
function wrapResult(result, wrapValue) {
|
|
1276
|
+
if (!result.done) {
|
|
1277
|
+
result.value = wrapValue(result.value);
|
|
1278
|
+
}
|
|
1279
|
+
return result;
|
|
1280
|
+
}
|
|
1259
1281
|
const arrayProto = Array.prototype;
|
|
1260
1282
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1261
1283
|
const arr = shallowReadArray(self);
|
|
@@ -1324,7 +1346,7 @@ function noTracking(self, method, args = []) {
|
|
|
1324
1346
|
}
|
|
1325
1347
|
|
|
1326
1348
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1327
|
-
const builtInSymbols = new Set(
|
|
1349
|
+
const builtInSymbols = /* @__PURE__ */ new Set(
|
|
1328
1350
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
1329
1351
|
);
|
|
1330
1352
|
function hasOwnProperty(key) {
|
|
@@ -1678,6 +1700,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
|
|
|
1678
1700
|
return !isReadonly2;
|
|
1679
1701
|
} else if (key === "__v_isReadonly") {
|
|
1680
1702
|
return isReadonly2;
|
|
1703
|
+
} else if (key === "__v_isShallow") {
|
|
1704
|
+
return shallow;
|
|
1681
1705
|
} else if (key === "__v_raw") {
|
|
1682
1706
|
return target;
|
|
1683
1707
|
}
|
|
@@ -2229,9 +2253,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2229
2253
|
if (once && cb) {
|
|
2230
2254
|
const _cb = cb;
|
|
2231
2255
|
cb = (...args) => {
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2256
|
+
try {
|
|
2257
|
+
return _cb(...args);
|
|
2258
|
+
} finally {
|
|
2259
|
+
watchHandle();
|
|
2260
|
+
}
|
|
2235
2261
|
};
|
|
2236
2262
|
}
|
|
2237
2263
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -2242,12 +2268,13 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2242
2268
|
if (cb) {
|
|
2243
2269
|
const newValue = effect.run();
|
|
2244
2270
|
if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2245
|
-
if (cleanup) {
|
|
2246
|
-
cleanup();
|
|
2247
|
-
}
|
|
2248
2271
|
const currentWatcher = activeWatcher;
|
|
2249
|
-
|
|
2272
|
+
pauseTracking();
|
|
2250
2273
|
try {
|
|
2274
|
+
if (cleanup) {
|
|
2275
|
+
cleanup();
|
|
2276
|
+
}
|
|
2277
|
+
activeWatcher = effect;
|
|
2251
2278
|
const args = [
|
|
2252
2279
|
newValue,
|
|
2253
2280
|
// pass undefined as the old value when it's changed for the first time
|
|
@@ -2261,6 +2288,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2261
2288
|
);
|
|
2262
2289
|
} finally {
|
|
2263
2290
|
activeWatcher = currentWatcher;
|
|
2291
|
+
resetTracking();
|
|
2264
2292
|
}
|
|
2265
2293
|
}
|
|
2266
2294
|
} else {
|
|
@@ -2535,7 +2563,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2535
2563
|
const res = callWithErrorHandling(fn, instance, type, args);
|
|
2536
2564
|
if (res && isPromise(res)) {
|
|
2537
2565
|
res.catch((err) => {
|
|
2538
|
-
handleError(err, instance, type);
|
|
2566
|
+
handleError(err, instance, type, void 0, true);
|
|
2539
2567
|
});
|
|
2540
2568
|
}
|
|
2541
2569
|
return res;
|
|
@@ -2552,7 +2580,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2552
2580
|
);
|
|
2553
2581
|
}
|
|
2554
2582
|
}
|
|
2555
|
-
function handleError(err, instance, type, throwInDev = true) {
|
|
2583
|
+
function handleError(err, instance, type, throwInDev = true, isAsyncError = false) {
|
|
2556
2584
|
const contextVNode = instance ? instance.vnode : null;
|
|
2557
2585
|
const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
|
|
2558
2586
|
if (instance) {
|
|
@@ -2561,7 +2589,9 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
2561
2589
|
const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
|
|
2562
2590
|
while (cur) {
|
|
2563
2591
|
const errorCapturedHooks = cur.ec;
|
|
2564
|
-
if (errorCapturedHooks
|
|
2592
|
+
if (errorCapturedHooks && !cur.isUnmounted && // Async failures may outlive stopped scopes whose unmount effects
|
|
2593
|
+
// are deferred or discarded by Suspense.
|
|
2594
|
+
(!isAsyncError || cur.scope.active)) {
|
|
2565
2595
|
for (let i = 0; i < errorCapturedHooks.length; i++) {
|
|
2566
2596
|
if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
|
|
2567
2597
|
return;
|
|
@@ -2666,21 +2696,21 @@ function queuePostFlushCb(cb) {
|
|
|
2666
2696
|
}
|
|
2667
2697
|
queueFlush();
|
|
2668
2698
|
}
|
|
2669
|
-
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
2699
|
+
function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
|
|
2670
2700
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2671
2701
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2672
2702
|
}
|
|
2673
2703
|
for (; i < queue.length; i++) {
|
|
2674
2704
|
const cb = queue[i];
|
|
2675
2705
|
if (cb && cb.flags & 2) {
|
|
2676
|
-
if (instance && cb.id !== instance.uid) {
|
|
2706
|
+
if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
|
|
2677
2707
|
continue;
|
|
2678
2708
|
}
|
|
2679
2709
|
if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) {
|
|
2680
2710
|
continue;
|
|
2681
2711
|
}
|
|
2682
2712
|
queue.splice(i, 1);
|
|
2683
|
-
i
|
|
2713
|
+
i = instance ? i - 1 : flushIndex;
|
|
2684
2714
|
if (cb.flags & 4) {
|
|
2685
2715
|
cb.flags &= -2;
|
|
2686
2716
|
}
|
|
@@ -2691,12 +2721,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
|
2691
2721
|
}
|
|
2692
2722
|
}
|
|
2693
2723
|
}
|
|
2694
|
-
function flushPostFlushCbs(seen) {
|
|
2724
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
2695
2725
|
if (pendingPostFlushCbs.length) {
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
)
|
|
2699
|
-
|
|
2726
|
+
let cbs = pendingPostFlushCbs;
|
|
2727
|
+
let kept = 0;
|
|
2728
|
+
if (skip) {
|
|
2729
|
+
cbs = [];
|
|
2730
|
+
for (let i = 0; i < pendingPostFlushCbs.length; i++) {
|
|
2731
|
+
const cb = pendingPostFlushCbs[i];
|
|
2732
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
|
|
2733
|
+
pendingPostFlushCbs[kept++] = cb;
|
|
2734
|
+
} else {
|
|
2735
|
+
cbs.push(cb);
|
|
2736
|
+
}
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2739
|
+
const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
|
|
2740
|
+
pendingPostFlushCbs.length = kept;
|
|
2700
2741
|
if (activePostFlushCbs) {
|
|
2701
2742
|
for (let i = 0; i < deduped.length; i++) {
|
|
2702
2743
|
activePostFlushCbs.push(deduped[i]);
|
|
@@ -2722,6 +2763,22 @@ function flushPostFlushCbs(seen) {
|
|
|
2722
2763
|
postFlushIndex = 0;
|
|
2723
2764
|
}
|
|
2724
2765
|
}
|
|
2766
|
+
let isFlushing = false;
|
|
2767
|
+
function flushOnAppMount(fn, minUid) {
|
|
2768
|
+
if (isFlushing) {
|
|
2769
|
+
fn();
|
|
2770
|
+
return;
|
|
2771
|
+
}
|
|
2772
|
+
const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
|
|
2773
|
+
fn();
|
|
2774
|
+
isFlushing = true;
|
|
2775
|
+
try {
|
|
2776
|
+
flushPreFlushCbs(void 0, minUid);
|
|
2777
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
2778
|
+
} finally {
|
|
2779
|
+
isFlushing = false;
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2725
2782
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
2726
2783
|
function flushJobs(seen) {
|
|
2727
2784
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -2866,14 +2923,32 @@ function reload(id, newComp) {
|
|
|
2866
2923
|
instance.ceReload(newComp.styles);
|
|
2867
2924
|
dirtyInstances.delete(instance);
|
|
2868
2925
|
} else if (instance.parent) {
|
|
2869
|
-
|
|
2870
|
-
if (!
|
|
2871
|
-
|
|
2926
|
+
const update = () => {
|
|
2927
|
+
if (!instance.scope.active) return;
|
|
2928
|
+
const pending = instance.asyncDep && !instance.asyncResolved ? instance : locateUnresolvedAsyncRoot(instance.parent);
|
|
2929
|
+
if (pending) {
|
|
2930
|
+
pending.asyncDep.catch(NOOP).then(() => {
|
|
2931
|
+
if (instance.scope.active && (pending.asyncResolved || !pending.scope.active)) {
|
|
2932
|
+
queueJob(update);
|
|
2933
|
+
}
|
|
2934
|
+
});
|
|
2935
|
+
return;
|
|
2936
|
+
}
|
|
2937
|
+
dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2938
|
+
if (!dirtyInstances) {
|
|
2939
|
+
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2940
|
+
}
|
|
2941
|
+
dirtyInstances.add(instance);
|
|
2942
|
+
isHmrUpdating = true;
|
|
2943
|
+
try {
|
|
2872
2944
|
instance.parent.update();
|
|
2945
|
+
} finally {
|
|
2873
2946
|
isHmrUpdating = false;
|
|
2874
2947
|
dirtyInstances.delete(instance);
|
|
2948
|
+
queuePostFlushCb(() => hmrDirtyComponents.clear());
|
|
2875
2949
|
}
|
|
2876
|
-
}
|
|
2950
|
+
};
|
|
2951
|
+
queueJob(update);
|
|
2877
2952
|
} else if (instance.appContext.reload) {
|
|
2878
2953
|
instance.appContext.reload();
|
|
2879
2954
|
} else if (typeof window !== "undefined") {
|
|
@@ -3558,12 +3633,31 @@ function withDirectives(vnode, directives) {
|
|
|
3558
3633
|
return vnode;
|
|
3559
3634
|
}
|
|
3560
3635
|
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
3561
|
-
|
|
3636
|
+
let hookVNode = vnode;
|
|
3637
|
+
if (name === "beforeMount") {
|
|
3638
|
+
vnode._mount = vnode;
|
|
3639
|
+
} else if (name === "beforeUpdate") {
|
|
3640
|
+
const mount = prevVNode && prevVNode._mount;
|
|
3641
|
+
if (mount) {
|
|
3642
|
+
mount._latest = vnode;
|
|
3643
|
+
vnode._mount = mount;
|
|
3644
|
+
}
|
|
3645
|
+
} else if (name === "mounted") {
|
|
3646
|
+
const latest = vnode._latest;
|
|
3647
|
+
vnode._mount = vnode._latest = void 0;
|
|
3648
|
+
if (latest) {
|
|
3649
|
+
hookVNode = latest;
|
|
3650
|
+
latest._mount = void 0;
|
|
3651
|
+
}
|
|
3652
|
+
}
|
|
3653
|
+
const bindings = hookVNode.dirs;
|
|
3562
3654
|
const oldBindings = prevVNode && prevVNode.dirs;
|
|
3563
3655
|
for (let i = 0; i < bindings.length; i++) {
|
|
3564
|
-
|
|
3656
|
+
let binding = bindings[i];
|
|
3565
3657
|
if (oldBindings) {
|
|
3566
3658
|
binding.oldValue = oldBindings[i].value;
|
|
3659
|
+
} else if (name === "mounted" && binding.oldValue !== void 0) {
|
|
3660
|
+
binding = extend({}, binding, { oldValue: void 0 });
|
|
3567
3661
|
}
|
|
3568
3662
|
let hook = binding.dir[name];
|
|
3569
3663
|
if (!hook) {
|
|
@@ -3574,7 +3668,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
3574
3668
|
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
3575
3669
|
vnode.el,
|
|
3576
3670
|
binding,
|
|
3577
|
-
|
|
3671
|
+
hookVNode,
|
|
3578
3672
|
prevVNode
|
|
3579
3673
|
]);
|
|
3580
3674
|
resetTracking();
|
|
@@ -3695,6 +3789,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
3695
3789
|
let isPre = false;
|
|
3696
3790
|
if (flush === "post") {
|
|
3697
3791
|
baseWatchOptions.scheduler = (job) => {
|
|
3792
|
+
job.i = instance;
|
|
3698
3793
|
queuePostRenderEffect(job, instance && instance.suspense);
|
|
3699
3794
|
};
|
|
3700
3795
|
} else if (flush !== "sync") {
|
|
@@ -3996,7 +4091,11 @@ const TeleportImpl = {
|
|
|
3996
4091
|
};
|
|
3997
4092
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
3998
4093
|
if (moveType === 0) {
|
|
4094
|
+
if (vnode.targetStart) {
|
|
4095
|
+
insert(vnode.targetStart, container, parentAnchor);
|
|
4096
|
+
}
|
|
3999
4097
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
4098
|
+
parentAnchor = vnode.targetAnchor;
|
|
4000
4099
|
}
|
|
4001
4100
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
4002
4101
|
const isReorder = moveType === 2;
|
|
@@ -4165,10 +4264,6 @@ const BaseTransitionPropsValidators = {
|
|
|
4165
4264
|
onAfterAppear: TransitionHookValidator,
|
|
4166
4265
|
onAppearCancelled: TransitionHookValidator
|
|
4167
4266
|
};
|
|
4168
|
-
const recursiveGetSubtree = (instance) => {
|
|
4169
|
-
const subTree = instance.subTree;
|
|
4170
|
-
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
4171
|
-
};
|
|
4172
4267
|
const BaseTransitionImpl = {
|
|
4173
4268
|
name: `BaseTransition`,
|
|
4174
4269
|
props: BaseTransitionPropsValidators,
|
|
@@ -4197,19 +4292,17 @@ const BaseTransitionImpl = {
|
|
|
4197
4292
|
if (!innerChild) {
|
|
4198
4293
|
return emptyPlaceholder(child);
|
|
4199
4294
|
}
|
|
4200
|
-
|
|
4295
|
+
const enterHooks = resolveTransitionHooks(
|
|
4201
4296
|
innerChild,
|
|
4202
4297
|
rawProps,
|
|
4203
4298
|
state,
|
|
4204
|
-
instance
|
|
4205
|
-
// #11061, ensure enterHooks is fresh after clone
|
|
4206
|
-
(hooks) => enterHooks = hooks
|
|
4299
|
+
instance
|
|
4207
4300
|
);
|
|
4208
4301
|
if (innerChild.type !== Comment) {
|
|
4209
4302
|
setTransitionHooks(innerChild, enterHooks);
|
|
4210
4303
|
}
|
|
4211
4304
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
4212
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) &&
|
|
4305
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
|
|
4213
4306
|
let leavingHooks = resolveTransitionHooks(
|
|
4214
4307
|
oldInnerChild,
|
|
4215
4308
|
rawProps,
|
|
@@ -4222,7 +4315,17 @@ const BaseTransitionImpl = {
|
|
|
4222
4315
|
leavingHooks.afterLeave = () => {
|
|
4223
4316
|
state.isLeaving = false;
|
|
4224
4317
|
if (!(instance.job.flags & 8)) {
|
|
4225
|
-
instance.
|
|
4318
|
+
if (instance.effect.flags & 2) {
|
|
4319
|
+
const job = () => {
|
|
4320
|
+
if (!(instance.job.flags & 8)) {
|
|
4321
|
+
instance.update();
|
|
4322
|
+
}
|
|
4323
|
+
};
|
|
4324
|
+
job.i = instance;
|
|
4325
|
+
queueJob(job);
|
|
4326
|
+
} else {
|
|
4327
|
+
instance.update();
|
|
4328
|
+
}
|
|
4226
4329
|
}
|
|
4227
4330
|
delete leavingHooks.afterLeave;
|
|
4228
4331
|
oldInnerChild = void 0;
|
|
@@ -4290,7 +4393,7 @@ function getLeavingNodesForType(state, vnode) {
|
|
|
4290
4393
|
}
|
|
4291
4394
|
return leavingVNodesCache;
|
|
4292
4395
|
}
|
|
4293
|
-
function resolveTransitionHooks(vnode, props, state, instance
|
|
4396
|
+
function resolveTransitionHooks(vnode, props, state, instance) {
|
|
4294
4397
|
const {
|
|
4295
4398
|
appear,
|
|
4296
4399
|
mode,
|
|
@@ -4346,8 +4449,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4346
4449
|
);
|
|
4347
4450
|
}
|
|
4348
4451
|
const leavingVNode = leavingVNodesCache[key];
|
|
4349
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
4350
|
-
leavingVNode.el[leaveCbKey]
|
|
4452
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
4453
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
4454
|
+
if (!leavingCb) {
|
|
4455
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
4456
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
4457
|
+
}
|
|
4458
|
+
if (leavingCb) {
|
|
4459
|
+
leavingCb();
|
|
4460
|
+
}
|
|
4351
4461
|
}
|
|
4352
4462
|
callHook(hook, [el]);
|
|
4353
4463
|
},
|
|
@@ -4422,15 +4532,21 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4422
4532
|
}
|
|
4423
4533
|
},
|
|
4424
4534
|
clone(vnode2) {
|
|
4425
|
-
const
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4535
|
+
const cloned = resolveTransitionHooks(vnode2, props, state, instance);
|
|
4536
|
+
cloned.afterLeave = () => {
|
|
4537
|
+
if (hooks.afterLeave) hooks.afterLeave();
|
|
4538
|
+
};
|
|
4539
|
+
cloned.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
4540
|
+
if (hooks.delayLeave) {
|
|
4541
|
+
hooks.delayLeave(el, earlyRemove, delayedLeave);
|
|
4542
|
+
} else {
|
|
4543
|
+
delayedLeave();
|
|
4544
|
+
}
|
|
4545
|
+
};
|
|
4546
|
+
cloned.delayedLeave = () => {
|
|
4547
|
+
if (hooks.delayedLeave) hooks.delayedLeave();
|
|
4548
|
+
};
|
|
4549
|
+
return cloned;
|
|
4434
4550
|
}
|
|
4435
4551
|
};
|
|
4436
4552
|
return hooks;
|
|
@@ -4471,10 +4587,24 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4471
4587
|
hooks
|
|
4472
4588
|
);
|
|
4473
4589
|
} else if (vnode.shapeFlag & 128) {
|
|
4474
|
-
|
|
4475
|
-
|
|
4590
|
+
const suspense = vnode.suspense;
|
|
4591
|
+
if (suspense) {
|
|
4592
|
+
const branch = suspense.isHydrating ? suspense.pendingBranch : suspense.activeBranch;
|
|
4593
|
+
if (branch) {
|
|
4594
|
+
setTransitionHooks(branch, hooks.clone(branch));
|
|
4595
|
+
}
|
|
4596
|
+
} else {
|
|
4597
|
+
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4598
|
+
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4599
|
+
}
|
|
4476
4600
|
} else {
|
|
4477
4601
|
vnode.transition = hooks;
|
|
4602
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
4603
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
4604
|
+
if (child) {
|
|
4605
|
+
setTransitionHooks(child, hooks);
|
|
4606
|
+
}
|
|
4607
|
+
}
|
|
4478
4608
|
}
|
|
4479
4609
|
}
|
|
4480
4610
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -4499,6 +4629,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
4499
4629
|
}
|
|
4500
4630
|
return ret;
|
|
4501
4631
|
}
|
|
4632
|
+
function getTransitionRoot(vnode) {
|
|
4633
|
+
if (vnode.component) {
|
|
4634
|
+
return getTransitionRoot(vnode.component.subTree);
|
|
4635
|
+
}
|
|
4636
|
+
if (vnode.type === Fragment) {
|
|
4637
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4638
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
4639
|
+
}
|
|
4640
|
+
if (vnode.type !== Comment) {
|
|
4641
|
+
return vnode;
|
|
4642
|
+
}
|
|
4643
|
+
}
|
|
4502
4644
|
|
|
4503
4645
|
// @__NO_SIDE_EFFECTS__
|
|
4504
4646
|
function defineComponent(options, extraOptions) {
|
|
@@ -5167,7 +5309,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5167
5309
|
getContainerType(container),
|
|
5168
5310
|
slotScopeIds
|
|
5169
5311
|
);
|
|
5170
|
-
if (parentComponent) {
|
|
5312
|
+
if (parentComponent && parentComponent.vnode.el === node) {
|
|
5171
5313
|
parentComponent.vnode.el = vnode.el;
|
|
5172
5314
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
5173
5315
|
}
|
|
@@ -5416,14 +5558,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
5416
5558
|
break;
|
|
5417
5559
|
}
|
|
5418
5560
|
}, opts);
|
|
5419
|
-
|
|
5420
|
-
if (!(el instanceof Element)) return;
|
|
5561
|
+
const observe = (el) => {
|
|
5421
5562
|
if (elementIsVisibleInViewport(el)) {
|
|
5422
5563
|
hydrate();
|
|
5423
5564
|
ob.disconnect();
|
|
5424
5565
|
return false;
|
|
5425
5566
|
}
|
|
5567
|
+
if (getComputedStyle(el).display === "contents") {
|
|
5568
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
5569
|
+
if (observe(el.children[i]) === false) return false;
|
|
5570
|
+
}
|
|
5571
|
+
}
|
|
5426
5572
|
ob.observe(el);
|
|
5573
|
+
};
|
|
5574
|
+
forEach((el) => {
|
|
5575
|
+
if (!(el instanceof Element)) return;
|
|
5576
|
+
return observe(el);
|
|
5427
5577
|
});
|
|
5428
5578
|
return () => ob.disconnect();
|
|
5429
5579
|
};
|
|
@@ -5593,7 +5743,8 @@ function defineAsyncComponent(source) {
|
|
|
5593
5743
|
err,
|
|
5594
5744
|
instance,
|
|
5595
5745
|
13,
|
|
5596
|
-
!errorComponent
|
|
5746
|
+
!errorComponent,
|
|
5747
|
+
true
|
|
5597
5748
|
);
|
|
5598
5749
|
};
|
|
5599
5750
|
if (suspensible && instance.suspense || isInSSRComponentSetup) {
|
|
@@ -5611,7 +5762,7 @@ function defineAsyncComponent(source) {
|
|
|
5611
5762
|
const delayed = ref(!!delay);
|
|
5612
5763
|
let timeoutTimer;
|
|
5613
5764
|
let delayTimer;
|
|
5614
|
-
|
|
5765
|
+
onScopeDispose(() => {
|
|
5615
5766
|
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
5616
5767
|
if (delayTimer != null) clearTimeout(delayTimer);
|
|
5617
5768
|
});
|
|
@@ -5739,6 +5890,12 @@ const KeepAliveImpl = {
|
|
|
5739
5890
|
}
|
|
5740
5891
|
};
|
|
5741
5892
|
sharedContext.deactivate = (vnode) => {
|
|
5893
|
+
const cached = cache.get(
|
|
5894
|
+
vnode.key == null ? vnode.type : vnode.key
|
|
5895
|
+
);
|
|
5896
|
+
if (!cached || cached.component !== vnode.component) {
|
|
5897
|
+
return false;
|
|
5898
|
+
}
|
|
5742
5899
|
const instance2 = vnode.component;
|
|
5743
5900
|
invalidateMount(instance2.m);
|
|
5744
5901
|
invalidateMount(instance2.a);
|
|
@@ -5759,6 +5916,7 @@ const KeepAliveImpl = {
|
|
|
5759
5916
|
if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
5760
5917
|
instance2.__keepAliveStorageContainer = storageContainer;
|
|
5761
5918
|
}
|
|
5919
|
+
return true;
|
|
5762
5920
|
};
|
|
5763
5921
|
function unmount(vnode) {
|
|
5764
5922
|
resetShapeFlag(vnode);
|
|
@@ -5780,6 +5938,7 @@ const KeepAliveImpl = {
|
|
|
5780
5938
|
unmount(cached);
|
|
5781
5939
|
} else if (current) {
|
|
5782
5940
|
resetShapeFlag(current);
|
|
5941
|
+
if (cached) resetShapeFlag(cached);
|
|
5783
5942
|
}
|
|
5784
5943
|
cache.delete(key);
|
|
5785
5944
|
keys.delete(key);
|
|
@@ -5797,12 +5956,17 @@ const KeepAliveImpl = {
|
|
|
5797
5956
|
const cacheSubtree = () => {
|
|
5798
5957
|
if (pendingCacheKey != null) {
|
|
5799
5958
|
if (isSuspense(instance.subTree.type)) {
|
|
5800
|
-
|
|
5959
|
+
const cacheInnerChild = () => {
|
|
5801
5960
|
const vnode = getInnerChild(instance.subTree);
|
|
5802
5961
|
if (vnode.component) {
|
|
5803
5962
|
cache.set(pendingCacheKey, vnode);
|
|
5804
5963
|
}
|
|
5805
|
-
}
|
|
5964
|
+
};
|
|
5965
|
+
if (instance.subTree.suspense.pendingBranch) {
|
|
5966
|
+
queuePostRenderEffect(cacheInnerChild, instance.subTree.suspense);
|
|
5967
|
+
} else {
|
|
5968
|
+
cacheInnerChild();
|
|
5969
|
+
}
|
|
5806
5970
|
} else {
|
|
5807
5971
|
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
5808
5972
|
}
|
|
@@ -5937,9 +6101,12 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
|
5937
6101
|
true
|
|
5938
6102
|
/* prepend */
|
|
5939
6103
|
);
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
6104
|
+
const removal = injectHook(
|
|
6105
|
+
"um",
|
|
6106
|
+
() => remove(keepAliveRoot[type], injected),
|
|
6107
|
+
target
|
|
6108
|
+
);
|
|
6109
|
+
removal.flags = 16;
|
|
5943
6110
|
}
|
|
5944
6111
|
function resetShapeFlag(vnode) {
|
|
5945
6112
|
vnode.shapeFlag &= -257;
|
|
@@ -6361,10 +6528,12 @@ function renderList(source, renderItem, cache, index) {
|
|
|
6361
6528
|
);
|
|
6362
6529
|
}
|
|
6363
6530
|
} else if (typeof source === "number") {
|
|
6364
|
-
if (
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6531
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
6532
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6533
|
+
warn$1(
|
|
6534
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
6535
|
+
);
|
|
6536
|
+
}
|
|
6368
6537
|
ret = [];
|
|
6369
6538
|
} else {
|
|
6370
6539
|
ret = new Array(source);
|
|
@@ -6683,6 +6852,7 @@ function installCompatInstanceProperties(map) {
|
|
|
6683
6852
|
$vnode: (i) => i.vnode,
|
|
6684
6853
|
// some private properties that are likely accessed...
|
|
6685
6854
|
_self: (i) => i.proxy,
|
|
6855
|
+
_setupProxy: (i) => i.setupState,
|
|
6686
6856
|
_uid: (i) => i.uid,
|
|
6687
6857
|
_data: (i) => i.data,
|
|
6688
6858
|
_isMounted: (i) => i.isMounted,
|
|
@@ -7672,7 +7842,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7672
7842
|
return vm;
|
|
7673
7843
|
}
|
|
7674
7844
|
}
|
|
7675
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7845
|
+
Vue.version = `2.6.14-compat:${"3.5.45"}`;
|
|
7676
7846
|
Vue.config = singletonApp.config;
|
|
7677
7847
|
Vue.use = (plugin, ...options) => {
|
|
7678
7848
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8831,7 +9001,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
8831
9001
|
}
|
|
8832
9002
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
8833
9003
|
const key = nextKeys[i];
|
|
8834
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
9004
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
8835
9005
|
return true;
|
|
8836
9006
|
}
|
|
8837
9007
|
}
|
|
@@ -9810,6 +9980,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9810
9980
|
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
9811
9981
|
if (needCallTransitionHooks) {
|
|
9812
9982
|
transition.beforeEnter(el);
|
|
9983
|
+
} else if (transition && !transition.persisted) {
|
|
9984
|
+
el[deferredEnterKey] = true;
|
|
9813
9985
|
}
|
|
9814
9986
|
hostInsert(el, container, anchor);
|
|
9815
9987
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
@@ -9969,15 +10141,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9969
10141
|
for (let i = 0; i < newChildren.length; i++) {
|
|
9970
10142
|
const oldVNode = oldChildren[i];
|
|
9971
10143
|
const newVNode = newChildren[i];
|
|
10144
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
9972
10145
|
const container = (
|
|
9973
10146
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
9974
10147
|
// which will not have a mounted element
|
|
9975
|
-
|
|
10148
|
+
oldEl && // - In the case of a Fragment, we need to provide the actual parent
|
|
9976
10149
|
// of the Fragment itself so it can move its children.
|
|
9977
10150
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
9978
10151
|
// which also requires the correct parent container
|
|
9979
10152
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
9980
|
-
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(
|
|
10153
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
|
|
9981
10154
|
// In other cases, the parent container is not actually used so we
|
|
9982
10155
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
9983
10156
|
fallbackContainer
|
|
@@ -10153,7 +10326,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10153
10326
|
}
|
|
10154
10327
|
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
|
|
10155
10328
|
if (instance.asyncDep) {
|
|
10156
|
-
parentSuspense && parentSuspense.registerDep(
|
|
10329
|
+
parentSuspense && parentSuspense.registerDep(
|
|
10330
|
+
instance,
|
|
10331
|
+
setupRenderEffect,
|
|
10332
|
+
optimized,
|
|
10333
|
+
namespace
|
|
10334
|
+
);
|
|
10157
10335
|
if (!initialVNode.el) {
|
|
10158
10336
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
10159
10337
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -10183,6 +10361,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10183
10361
|
pushWarningContext(n2);
|
|
10184
10362
|
}
|
|
10185
10363
|
n2.el = n1.el;
|
|
10364
|
+
n2.placeholder = n1.placeholder;
|
|
10186
10365
|
updateComponentPreRender(instance, n2, optimized);
|
|
10187
10366
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
10188
10367
|
popWarningContext();
|
|
@@ -10194,6 +10373,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10194
10373
|
}
|
|
10195
10374
|
} else {
|
|
10196
10375
|
n2.el = n1.el;
|
|
10376
|
+
n2.placeholder = n1.placeholder;
|
|
10197
10377
|
instance.vnode = n2;
|
|
10198
10378
|
}
|
|
10199
10379
|
};
|
|
@@ -10311,16 +10491,23 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10311
10491
|
} else {
|
|
10312
10492
|
let { next, bu, u, parent, vnode } = instance;
|
|
10313
10493
|
{
|
|
10314
|
-
const
|
|
10315
|
-
if (
|
|
10494
|
+
const unresolvedAsyncRoot = locateUnresolvedAsyncRoot(instance);
|
|
10495
|
+
if (unresolvedAsyncRoot) {
|
|
10316
10496
|
if (next) {
|
|
10317
10497
|
next.el = vnode.el;
|
|
10318
10498
|
updateComponentPreRender(instance, next, optimized);
|
|
10319
10499
|
}
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
if (
|
|
10323
|
-
|
|
10500
|
+
unresolvedAsyncRoot.asyncDep.then(() => {
|
|
10501
|
+
const retry = () => {
|
|
10502
|
+
if (instance.job.flags & 8) return;
|
|
10503
|
+
if (parentSuspense && parentSuspense.pendingBranch) {
|
|
10504
|
+
queuePostRenderEffect(retry, parentSuspense);
|
|
10505
|
+
} else {
|
|
10506
|
+
update();
|
|
10507
|
+
}
|
|
10508
|
+
};
|
|
10509
|
+
retry.flags = 16 | 32;
|
|
10510
|
+
queuePostRenderEffect(retry, parentSuspense);
|
|
10324
10511
|
});
|
|
10325
10512
|
return;
|
|
10326
10513
|
}
|
|
@@ -10362,8 +10549,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10362
10549
|
patch(
|
|
10363
10550
|
prevTree,
|
|
10364
10551
|
nextTree,
|
|
10365
|
-
// parent may have changed if it's in a teleport
|
|
10366
|
-
|
|
10552
|
+
// parent may have changed if it's in a teleport. a root that is a
|
|
10553
|
+
// pending async component only has its placeholder comment
|
|
10554
|
+
hostParentNode(
|
|
10555
|
+
prevTree.el || resolveAsyncComponentPlaceholder(prevTree)
|
|
10556
|
+
),
|
|
10367
10557
|
// anchor may have changed if it's in a fragment
|
|
10368
10558
|
getNextHostNode(prevTree),
|
|
10369
10559
|
instance,
|
|
@@ -10809,8 +10999,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10809
10999
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
10810
11000
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
10811
11001
|
}
|
|
10812
|
-
if (shapeFlag & 256) {
|
|
10813
|
-
parentComponent.ctx.deactivate(vnode);
|
|
11002
|
+
if (shapeFlag & 256 && parentComponent.ctx.deactivate(vnode)) {
|
|
10814
11003
|
return;
|
|
10815
11004
|
}
|
|
10816
11005
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
@@ -10871,18 +11060,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10871
11060
|
};
|
|
10872
11061
|
const remove = (vnode) => {
|
|
10873
11062
|
const { type, el, anchor, transition } = vnode;
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
if (child.type === Comment) {
|
|
10878
|
-
hostRemove(child.el);
|
|
10879
|
-
} else {
|
|
10880
|
-
remove(child);
|
|
10881
|
-
}
|
|
10882
|
-
});
|
|
10883
|
-
} else {
|
|
10884
|
-
removeFragment(el, anchor);
|
|
10885
|
-
}
|
|
11063
|
+
const isFragment = type === Fragment;
|
|
11064
|
+
if (isFragment && !transition) {
|
|
11065
|
+
removeFragment(el, anchor);
|
|
10886
11066
|
return;
|
|
10887
11067
|
}
|
|
10888
11068
|
if (type === Static) {
|
|
@@ -10892,17 +11072,25 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10892
11072
|
}
|
|
10893
11073
|
return;
|
|
10894
11074
|
}
|
|
11075
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
10895
11076
|
const performRemove = () => {
|
|
10896
|
-
|
|
11077
|
+
if (isFragment) {
|
|
11078
|
+
if (hostParentNode(el)) {
|
|
11079
|
+
removeFragment(el, anchor);
|
|
11080
|
+
}
|
|
11081
|
+
} else {
|
|
11082
|
+
hostRemove(el);
|
|
11083
|
+
}
|
|
10897
11084
|
if (transition && !transition.persisted && transition.afterLeave) {
|
|
10898
11085
|
transition.afterLeave();
|
|
10899
11086
|
}
|
|
10900
11087
|
};
|
|
10901
|
-
if (
|
|
11088
|
+
if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
10902
11089
|
const { leave, delayLeave } = transition;
|
|
10903
|
-
const
|
|
11090
|
+
const leavingEl = leavingNode.el;
|
|
11091
|
+
const performLeave = () => leave(leavingEl, performRemove);
|
|
10904
11092
|
if (delayLeave) {
|
|
10905
|
-
delayLeave(
|
|
11093
|
+
delayLeave(leavingEl, performRemove, performLeave);
|
|
10906
11094
|
} else {
|
|
10907
11095
|
performLeave();
|
|
10908
11096
|
}
|
|
@@ -10936,7 +11124,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10936
11124
|
if (job) {
|
|
10937
11125
|
job.flags |= 8;
|
|
10938
11126
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
10939
|
-
} else if (
|
|
11127
|
+
} else if (subTree) {
|
|
10940
11128
|
subTree.transition = instance.vnode.transition;
|
|
10941
11129
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
10942
11130
|
}
|
|
@@ -10949,9 +11137,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10949
11137
|
parentSuspense
|
|
10950
11138
|
);
|
|
10951
11139
|
}
|
|
10952
|
-
|
|
11140
|
+
const markUnmounted = () => {
|
|
10953
11141
|
instance.isUnmounted = true;
|
|
10954
|
-
}
|
|
11142
|
+
};
|
|
11143
|
+
markUnmounted.flags = 16;
|
|
11144
|
+
queuePostRenderEffect(markUnmounted, parentSuspense);
|
|
10955
11145
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
10956
11146
|
devtoolsComponentRemoved(instance);
|
|
10957
11147
|
}
|
|
@@ -10972,32 +11162,26 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10972
11162
|
const teleportEnd = el && el[TeleportEndKey];
|
|
10973
11163
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
10974
11164
|
};
|
|
10975
|
-
let isFlushing = false;
|
|
10976
11165
|
const render = (vnode, container, namespace) => {
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
if (
|
|
10980
|
-
|
|
10981
|
-
|
|
11166
|
+
const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
|
|
11167
|
+
flushOnAppMount(() => {
|
|
11168
|
+
if (vnode == null) {
|
|
11169
|
+
if (container._vnode) {
|
|
11170
|
+
unmount(container._vnode, null, null, true);
|
|
11171
|
+
}
|
|
11172
|
+
} else {
|
|
11173
|
+
patch(
|
|
11174
|
+
container._vnode || null,
|
|
11175
|
+
vnode,
|
|
11176
|
+
container,
|
|
11177
|
+
null,
|
|
11178
|
+
null,
|
|
11179
|
+
null,
|
|
11180
|
+
namespace
|
|
11181
|
+
);
|
|
10982
11182
|
}
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
container._vnode || null,
|
|
10986
|
-
vnode,
|
|
10987
|
-
container,
|
|
10988
|
-
null,
|
|
10989
|
-
null,
|
|
10990
|
-
null,
|
|
10991
|
-
namespace
|
|
10992
|
-
);
|
|
10993
|
-
}
|
|
10994
|
-
container._vnode = vnode;
|
|
10995
|
-
if (!isFlushing) {
|
|
10996
|
-
isFlushing = true;
|
|
10997
|
-
flushPreFlushCbs(instance);
|
|
10998
|
-
flushPostFlushCbs();
|
|
10999
|
-
isFlushing = false;
|
|
11000
|
-
}
|
|
11183
|
+
container._vnode = vnode;
|
|
11184
|
+
}, minUid);
|
|
11001
11185
|
};
|
|
11002
11186
|
const internals = {
|
|
11003
11187
|
p: patch,
|
|
@@ -11109,13 +11293,13 @@ function getSequence(arr) {
|
|
|
11109
11293
|
}
|
|
11110
11294
|
return result;
|
|
11111
11295
|
}
|
|
11112
|
-
function
|
|
11296
|
+
function locateUnresolvedAsyncRoot(instance) {
|
|
11113
11297
|
const subComponent = instance.subTree.component;
|
|
11114
11298
|
if (subComponent) {
|
|
11115
11299
|
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
11116
11300
|
return subComponent;
|
|
11117
11301
|
} else {
|
|
11118
|
-
return
|
|
11302
|
+
return locateUnresolvedAsyncRoot(subComponent);
|
|
11119
11303
|
}
|
|
11120
11304
|
}
|
|
11121
11305
|
}
|
|
@@ -11133,11 +11317,16 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
|
11133
11317
|
if (instance) {
|
|
11134
11318
|
return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
11135
11319
|
}
|
|
11320
|
+
const suspense = anchorVnode.suspense;
|
|
11321
|
+
if (suspense && suspense.activeBranch) {
|
|
11322
|
+
return resolveAsyncComponentPlaceholder(suspense.activeBranch);
|
|
11323
|
+
}
|
|
11136
11324
|
return null;
|
|
11137
11325
|
}
|
|
11138
11326
|
|
|
11139
11327
|
const isSuspense = (type) => type.__isSuspense;
|
|
11140
11328
|
let suspenseId = 0;
|
|
11329
|
+
const deferredEnterKey = /* @__PURE__ */ Symbol("_deferredEnter");
|
|
11141
11330
|
const SuspenseImpl = {
|
|
11142
11331
|
name: "Suspense",
|
|
11143
11332
|
// In order to make Suspense tree-shakable, we need to avoid importing it
|
|
@@ -11159,11 +11348,22 @@ const SuspenseImpl = {
|
|
|
11159
11348
|
rendererInternals
|
|
11160
11349
|
);
|
|
11161
11350
|
} else {
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11351
|
+
const suspense = n1.suspense;
|
|
11352
|
+
if (parentSuspense && parentSuspense.deps > 0 && !parentSuspense.isHydrating) {
|
|
11353
|
+
const owner = suspense.parentComponent;
|
|
11354
|
+
const retained = !!owner && owner.suspense === parentSuspense && owner.suspenseId !== parentSuspense.pendingId;
|
|
11355
|
+
if (retained ? (
|
|
11356
|
+
// deps can outlive the pending branch: skip only while it exists
|
|
11357
|
+
parentSuspense.pendingBranch && !isSameVNodeType(
|
|
11358
|
+
n2.ssContent,
|
|
11359
|
+
suspense.pendingBranch || suspense.activeBranch
|
|
11360
|
+
)
|
|
11361
|
+
) : !suspense.isInFallback) {
|
|
11362
|
+
n2.suspense = suspense;
|
|
11363
|
+
suspense.vnode = n2;
|
|
11364
|
+
n2.el = n1.el;
|
|
11365
|
+
return;
|
|
11366
|
+
}
|
|
11167
11367
|
}
|
|
11168
11368
|
patchSuspense(
|
|
11169
11369
|
n1,
|
|
@@ -11188,6 +11388,38 @@ function triggerEvent(vnode, name) {
|
|
|
11188
11388
|
eventListener();
|
|
11189
11389
|
}
|
|
11190
11390
|
}
|
|
11391
|
+
function enterDeferred(branch) {
|
|
11392
|
+
const enters = [];
|
|
11393
|
+
collectDeferredEnters(branch, enters, true);
|
|
11394
|
+
if (enters.length) {
|
|
11395
|
+
queuePostFlushCb(enters);
|
|
11396
|
+
}
|
|
11397
|
+
}
|
|
11398
|
+
function collectDeferredEnters(vnode, enters, isRoot) {
|
|
11399
|
+
const { el, transition, children, shapeFlag } = vnode;
|
|
11400
|
+
if (shapeFlag & 6) {
|
|
11401
|
+
collectDeferredEnters(vnode.component.subTree, enters, isRoot);
|
|
11402
|
+
return;
|
|
11403
|
+
}
|
|
11404
|
+
if (shapeFlag & (128 | 64)) {
|
|
11405
|
+
return;
|
|
11406
|
+
}
|
|
11407
|
+
if (shapeFlag & 1) {
|
|
11408
|
+
if (!isRoot && el && el[deferredEnterKey]) {
|
|
11409
|
+
el[deferredEnterKey] = void 0;
|
|
11410
|
+
if (transition && !transition.persisted) {
|
|
11411
|
+
transition.beforeEnter(el);
|
|
11412
|
+
enters.push(() => transition.enter(el));
|
|
11413
|
+
}
|
|
11414
|
+
}
|
|
11415
|
+
isRoot = false;
|
|
11416
|
+
}
|
|
11417
|
+
if (shapeFlag & 16) {
|
|
11418
|
+
for (let i = 0; i < children.length; i++) {
|
|
11419
|
+
collectDeferredEnters(children[i], enters, isRoot);
|
|
11420
|
+
}
|
|
11421
|
+
}
|
|
11422
|
+
}
|
|
11191
11423
|
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
11192
11424
|
const {
|
|
11193
11425
|
p: patch,
|
|
@@ -11287,7 +11519,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11287
11519
|
unmount(pendingBranch, parentComponent, suspense);
|
|
11288
11520
|
}
|
|
11289
11521
|
suspense.deps = 0;
|
|
11290
|
-
suspense
|
|
11522
|
+
discardEffects(suspense);
|
|
11291
11523
|
suspense.hiddenContainer = createElement("div");
|
|
11292
11524
|
if (isInFallback) {
|
|
11293
11525
|
patch(
|
|
@@ -11365,11 +11597,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11365
11597
|
} else {
|
|
11366
11598
|
triggerEvent(n2, "onPending");
|
|
11367
11599
|
suspense.pendingBranch = newBranch;
|
|
11368
|
-
|
|
11369
|
-
suspense.pendingId = newBranch.component.suspenseId;
|
|
11370
|
-
} else {
|
|
11371
|
-
suspense.pendingId = suspenseId++;
|
|
11372
|
-
}
|
|
11600
|
+
suspense.pendingId = suspenseId++;
|
|
11373
11601
|
patch(
|
|
11374
11602
|
null,
|
|
11375
11603
|
newBranch,
|
|
@@ -11384,12 +11612,11 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11384
11612
|
if (suspense.deps <= 0) {
|
|
11385
11613
|
suspense.resolve();
|
|
11386
11614
|
} else {
|
|
11387
|
-
const { timeout
|
|
11615
|
+
const { timeout } = suspense;
|
|
11388
11616
|
if (timeout > 0) {
|
|
11389
|
-
setTimeout(() => {
|
|
11390
|
-
|
|
11391
|
-
|
|
11392
|
-
}
|
|
11617
|
+
suspense.timeoutTimer = setTimeout(() => {
|
|
11618
|
+
suspense.timeoutTimer = void 0;
|
|
11619
|
+
suspense.fallback(suspense.vnode.ssFallback);
|
|
11393
11620
|
}, timeout);
|
|
11394
11621
|
} else if (timeout === 0) {
|
|
11395
11622
|
suspense.fallback(newFallback);
|
|
@@ -11436,6 +11663,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11436
11663
|
deps: 0,
|
|
11437
11664
|
pendingId: suspenseId++,
|
|
11438
11665
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
11666
|
+
timeoutTimer: void 0,
|
|
11439
11667
|
activeBranch: null,
|
|
11440
11668
|
isFallbackMountPending: false,
|
|
11441
11669
|
pendingBranch: null,
|
|
@@ -11474,7 +11702,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11474
11702
|
let hasUpdatedAnchor = false;
|
|
11475
11703
|
if (delayEnter) {
|
|
11476
11704
|
activeBranch.transition.afterLeave = () => {
|
|
11477
|
-
if (pendingId === suspense.pendingId) {
|
|
11705
|
+
if (pendingId === suspense.pendingId && !suspense.isUnmounted) {
|
|
11706
|
+
enterDeferred(pendingBranch);
|
|
11478
11707
|
move(
|
|
11479
11708
|
pendingBranch,
|
|
11480
11709
|
container2,
|
|
@@ -11489,7 +11718,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11489
11718
|
};
|
|
11490
11719
|
}
|
|
11491
11720
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
11492
|
-
if (parentNode(
|
|
11721
|
+
if (parentNode(
|
|
11722
|
+
activeBranch.el || resolveAsyncComponentPlaceholder(activeBranch)
|
|
11723
|
+
) === container2) {
|
|
11493
11724
|
anchor = next(activeBranch);
|
|
11494
11725
|
hasUpdatedAnchor = true;
|
|
11495
11726
|
}
|
|
@@ -11499,13 +11730,26 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11499
11730
|
}
|
|
11500
11731
|
}
|
|
11501
11732
|
if (!delayEnter) {
|
|
11733
|
+
enterDeferred(pendingBranch);
|
|
11502
11734
|
move(pendingBranch, container2, anchor, 0);
|
|
11503
11735
|
}
|
|
11504
11736
|
}
|
|
11737
|
+
clearTimeout(suspense.timeoutTimer);
|
|
11738
|
+
suspense.timeoutTimer = void 0;
|
|
11505
11739
|
suspense.isFallbackMountPending = false;
|
|
11506
11740
|
setActiveBranch(suspense, pendingBranch);
|
|
11507
11741
|
suspense.pendingBranch = null;
|
|
11508
11742
|
suspense.isInFallback = false;
|
|
11743
|
+
let kept = 0;
|
|
11744
|
+
for (let i = 0; i < effects.length; i++) {
|
|
11745
|
+
const effect = effects[i];
|
|
11746
|
+
if (effect.flags & 32) {
|
|
11747
|
+
queuePostFlushCb(effect);
|
|
11748
|
+
} else {
|
|
11749
|
+
effects[kept++] = effect;
|
|
11750
|
+
}
|
|
11751
|
+
}
|
|
11752
|
+
effects.length = kept;
|
|
11509
11753
|
let parent = suspense.parent;
|
|
11510
11754
|
let hasUnresolvedAncestor = false;
|
|
11511
11755
|
while (parent) {
|
|
@@ -11534,7 +11778,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11534
11778
|
triggerEvent(vnode2, "onResolve");
|
|
11535
11779
|
},
|
|
11536
11780
|
fallback(fallbackVNode) {
|
|
11537
|
-
if (!suspense.pendingBranch) {
|
|
11781
|
+
if (suspense.isUnmounted || !suspense.pendingBranch) {
|
|
11538
11782
|
return;
|
|
11539
11783
|
}
|
|
11540
11784
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
|
|
@@ -11542,7 +11786,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11542
11786
|
const anchor2 = next(activeBranch);
|
|
11543
11787
|
const mountFallback = () => {
|
|
11544
11788
|
suspense.isFallbackMountPending = false;
|
|
11545
|
-
if (!suspense.isInFallback) {
|
|
11789
|
+
if (suspense.isUnmounted || !suspense.isInFallback) {
|
|
11546
11790
|
return;
|
|
11547
11791
|
}
|
|
11548
11792
|
const latestFallback = suspense.vnode.ssFallback;
|
|
@@ -11585,25 +11829,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11585
11829
|
next() {
|
|
11586
11830
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
11587
11831
|
},
|
|
11588
|
-
|
|
11832
|
+
// `namespace` intentionally shadows the boundary's own: the dep must be
|
|
11833
|
+
// mounted with the namespace of the position it was rendered at, which can
|
|
11834
|
+
// differ from the boundary's (e.g. a component nested inside an <svg>).
|
|
11835
|
+
registerDep(instance, setupRenderEffect, optimized2, namespace2) {
|
|
11589
11836
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
11590
11837
|
if (isInPendingSuspense) {
|
|
11591
11838
|
suspense.deps++;
|
|
11592
11839
|
}
|
|
11593
11840
|
const hydratedEl = instance.vnode.el;
|
|
11594
|
-
|
|
11595
|
-
handleError(err, instance, 0);
|
|
11596
|
-
}).then((asyncSetupResult) => {
|
|
11597
|
-
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
11598
|
-
return;
|
|
11599
|
-
}
|
|
11600
|
-
unsetCurrentInstance();
|
|
11601
|
-
if (hydratedEl && !instance.scope.active) {
|
|
11602
|
-
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
11603
|
-
suspense.resolve();
|
|
11604
|
-
}
|
|
11605
|
-
return;
|
|
11606
|
-
}
|
|
11841
|
+
const render = (asyncSetupResult) => {
|
|
11607
11842
|
instance.asyncResolved = true;
|
|
11608
11843
|
const { vnode: vnode2 } = instance;
|
|
11609
11844
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -11625,7 +11860,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11625
11860
|
// consider the comment placeholder case.
|
|
11626
11861
|
hydratedEl ? null : next(instance.subTree),
|
|
11627
11862
|
suspense,
|
|
11628
|
-
|
|
11863
|
+
namespace2,
|
|
11629
11864
|
optimized2
|
|
11630
11865
|
);
|
|
11631
11866
|
if (placeholder) {
|
|
@@ -11636,13 +11871,57 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11636
11871
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
11637
11872
|
popWarningContext();
|
|
11638
11873
|
}
|
|
11639
|
-
|
|
11874
|
+
};
|
|
11875
|
+
instance.asyncDep.catch((err) => {
|
|
11876
|
+
handleError(err, instance, 0, false, true);
|
|
11877
|
+
return () => null;
|
|
11878
|
+
}).then((asyncSetupResult) => {
|
|
11879
|
+
if (instance.isUnmounted || suspense.isUnmounted) {
|
|
11880
|
+
return;
|
|
11881
|
+
}
|
|
11882
|
+
const isPendingDep = isInPendingSuspense && suspense.pendingId === instance.suspenseId;
|
|
11883
|
+
unsetCurrentInstance();
|
|
11884
|
+
if (!instance.scope.active) {
|
|
11885
|
+
if (isPendingDep && --suspense.deps === 0) {
|
|
11886
|
+
suspense.resolve();
|
|
11887
|
+
}
|
|
11888
|
+
return;
|
|
11889
|
+
}
|
|
11890
|
+
if (!isPendingDep && suspense.pendingBranch) {
|
|
11891
|
+
const job = () => {
|
|
11892
|
+
if (instance.isUnmounted || suspense.isUnmounted || !instance.scope.active) {
|
|
11893
|
+
return;
|
|
11894
|
+
}
|
|
11895
|
+
if (suspense.pendingBranch) {
|
|
11896
|
+
queueEffectWithSuspense(job, suspense);
|
|
11897
|
+
} else {
|
|
11898
|
+
render(asyncSetupResult);
|
|
11899
|
+
}
|
|
11900
|
+
};
|
|
11901
|
+
job.flags = 16 | 32;
|
|
11902
|
+
queueEffectWithSuspense(job, suspense);
|
|
11903
|
+
return;
|
|
11904
|
+
}
|
|
11905
|
+
render(asyncSetupResult);
|
|
11906
|
+
if (isPendingDep && --suspense.deps === 0) {
|
|
11640
11907
|
suspense.resolve();
|
|
11641
11908
|
}
|
|
11642
11909
|
});
|
|
11643
11910
|
},
|
|
11644
11911
|
unmount(parentSuspense2, doRemove) {
|
|
11645
11912
|
suspense.isUnmounted = true;
|
|
11913
|
+
clearTimeout(suspense.timeoutTimer);
|
|
11914
|
+
suspense.timeoutTimer = void 0;
|
|
11915
|
+
if (parentSuspenseId !== void 0) {
|
|
11916
|
+
const parent = suspense.parent;
|
|
11917
|
+
const pendingId = parentSuspenseId;
|
|
11918
|
+
parentSuspenseId = void 0;
|
|
11919
|
+
queuePostFlushCb(() => {
|
|
11920
|
+
if (parent.pendingId === pendingId && !parent.isUnmounted && --parent.deps === 0) {
|
|
11921
|
+
parent.resolve();
|
|
11922
|
+
}
|
|
11923
|
+
});
|
|
11924
|
+
}
|
|
11646
11925
|
if (suspense.activeBranch) {
|
|
11647
11926
|
unmount(
|
|
11648
11927
|
suspense.activeBranch,
|
|
@@ -11652,12 +11931,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11652
11931
|
);
|
|
11653
11932
|
}
|
|
11654
11933
|
if (suspense.pendingBranch) {
|
|
11655
|
-
unmount(
|
|
11656
|
-
|
|
11657
|
-
parentComponent,
|
|
11658
|
-
parentSuspense2,
|
|
11659
|
-
doRemove
|
|
11660
|
-
);
|
|
11934
|
+
unmount(suspense.pendingBranch, parentComponent, suspense, doRemove);
|
|
11935
|
+
discardEffects(suspense);
|
|
11661
11936
|
}
|
|
11662
11937
|
}
|
|
11663
11938
|
};
|
|
@@ -11727,6 +12002,16 @@ function normalizeSuspenseSlot(s) {
|
|
|
11727
12002
|
}
|
|
11728
12003
|
return s;
|
|
11729
12004
|
}
|
|
12005
|
+
function discardEffects(suspense) {
|
|
12006
|
+
const { effects } = suspense;
|
|
12007
|
+
for (let i = 0; i < effects.length; i++) {
|
|
12008
|
+
const effect = effects[i];
|
|
12009
|
+
if (effect.flags & 16) {
|
|
12010
|
+
queuePostFlushCb(effect);
|
|
12011
|
+
}
|
|
12012
|
+
}
|
|
12013
|
+
effects.length = 0;
|
|
12014
|
+
}
|
|
11730
12015
|
function queueEffectWithSuspense(fn, suspense) {
|
|
11731
12016
|
if (suspense && suspense.pendingBranch) {
|
|
11732
12017
|
if (isArray(fn)) {
|
|
@@ -12042,7 +12327,8 @@ Component that was made reactive: `,
|
|
|
12042
12327
|
}
|
|
12043
12328
|
function guardReactiveProps(props) {
|
|
12044
12329
|
if (!props) return null;
|
|
12045
|
-
|
|
12330
|
+
if (isProxy(props)) return extend({}, props);
|
|
12331
|
+
return isInternalObject(props) ? extend({}, props[rawAttrsKey] || props) : props;
|
|
12046
12332
|
}
|
|
12047
12333
|
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
12048
12334
|
const { props, ref, patchFlag, children, transition } = vnode;
|
|
@@ -12224,8 +12510,11 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
12224
12510
|
]);
|
|
12225
12511
|
}
|
|
12226
12512
|
|
|
12227
|
-
const emptyAppContext = createAppContext();
|
|
12513
|
+
const emptyAppContext = /* @__PURE__ */ createAppContext();
|
|
12228
12514
|
let uid = 0;
|
|
12515
|
+
function getNextUid() {
|
|
12516
|
+
return uid;
|
|
12517
|
+
}
|
|
12229
12518
|
function createComponentInstance(vnode, parent, suspense) {
|
|
12230
12519
|
const type = vnode.type;
|
|
12231
12520
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -12436,7 +12725,8 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
12436
12725
|
setInSSRSetupState(false);
|
|
12437
12726
|
}
|
|
12438
12727
|
}).catch((e) => {
|
|
12439
|
-
handleError(e, instance, 0);
|
|
12728
|
+
handleError(e, instance, 0, void 0, true);
|
|
12729
|
+
instance.ssrRender = (_, push) => push("<!---->");
|
|
12440
12730
|
});
|
|
12441
12731
|
} else {
|
|
12442
12732
|
instance.asyncDep = setupResult;
|
|
@@ -12556,11 +12846,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
12556
12846
|
}
|
|
12557
12847
|
}
|
|
12558
12848
|
}
|
|
12849
|
+
const rawAttrsKey = /* @__PURE__ */ Symbol();
|
|
12559
12850
|
const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
|
|
12560
12851
|
get(target, key) {
|
|
12561
12852
|
markAttrsAccessed();
|
|
12562
12853
|
track(target, "get", "");
|
|
12563
|
-
return target[key];
|
|
12854
|
+
return key === rawAttrsKey ? target : target[key];
|
|
12564
12855
|
},
|
|
12565
12856
|
set() {
|
|
12566
12857
|
warn$1(`setupContext.attrs is readonly.`);
|
|
@@ -12573,7 +12864,7 @@ const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
|
|
|
12573
12864
|
} : {
|
|
12574
12865
|
get(target, key) {
|
|
12575
12866
|
track(target, "get", "");
|
|
12576
|
-
return target[key];
|
|
12867
|
+
return key === rawAttrsKey ? target : target[key];
|
|
12577
12868
|
}
|
|
12578
12869
|
};
|
|
12579
12870
|
function getSlotsProxy(instance) {
|
|
@@ -12924,7 +13215,7 @@ function isMemoSame(cached, memo) {
|
|
|
12924
13215
|
return true;
|
|
12925
13216
|
}
|
|
12926
13217
|
|
|
12927
|
-
const version = "3.5.
|
|
13218
|
+
const version = "3.5.45";
|
|
12928
13219
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
12929
13220
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12930
13221
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -13544,7 +13835,9 @@ function patchStyle(el, prev, next) {
|
|
|
13544
13835
|
}
|
|
13545
13836
|
}
|
|
13546
13837
|
if (vShowOriginalDisplay in el) {
|
|
13547
|
-
|
|
13838
|
+
if (!isCssString || prev !== next) {
|
|
13839
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
13840
|
+
}
|
|
13548
13841
|
if (el[vShowHidden]) {
|
|
13549
13842
|
style.display = "none";
|
|
13550
13843
|
}
|
|
@@ -14070,7 +14363,9 @@ class VueElement extends BaseClass {
|
|
|
14070
14363
|
"Custom element style injection is not supported when using shadowRoot: false"
|
|
14071
14364
|
);
|
|
14072
14365
|
}
|
|
14073
|
-
this.
|
|
14366
|
+
if (this._connected) {
|
|
14367
|
+
this._mount(def);
|
|
14368
|
+
}
|
|
14074
14369
|
};
|
|
14075
14370
|
const asyncDef = this._def.__asyncLoader;
|
|
14076
14371
|
if (asyncDef) {
|
|
@@ -14440,6 +14735,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
|
|
|
14440
14735
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
14441
14736
|
const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
|
|
14442
14737
|
const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
|
|
14738
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
14443
14739
|
const decorate = (t) => {
|
|
14444
14740
|
delete t.props.mode;
|
|
14445
14741
|
{
|
|
@@ -14458,21 +14754,30 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14458
14754
|
const state = useTransitionState();
|
|
14459
14755
|
let prevChildren;
|
|
14460
14756
|
let children;
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14757
|
+
let origins;
|
|
14758
|
+
let moves;
|
|
14759
|
+
const willMove = () => {
|
|
14760
|
+
if (moves === void 0) {
|
|
14761
|
+
moves = prevChildren.length > 0 && hasCSSTransform(
|
|
14762
|
+
prevChildren[0].el,
|
|
14763
|
+
instance.vnode.el,
|
|
14764
|
+
resolveMoveClass(props)
|
|
14765
|
+
);
|
|
14464
14766
|
}
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
)) {
|
|
14767
|
+
return moves;
|
|
14768
|
+
};
|
|
14769
|
+
onUpdated(() => {
|
|
14770
|
+
pendingGroups.delete(instance);
|
|
14771
|
+
if (!willMove()) {
|
|
14471
14772
|
prevChildren = [];
|
|
14773
|
+
origins = void 0;
|
|
14472
14774
|
return;
|
|
14473
14775
|
}
|
|
14776
|
+
const moveClass = resolveMoveClass(props);
|
|
14474
14777
|
prevChildren.forEach(callPendingCbs);
|
|
14475
|
-
|
|
14778
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
14779
|
+
origins = void 0;
|
|
14780
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
14476
14781
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
14477
14782
|
forceReflow(instance.vnode.el);
|
|
14478
14783
|
movedChildren.forEach((c) => {
|
|
@@ -14505,6 +14810,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14505
14810
|
tag = "span";
|
|
14506
14811
|
}
|
|
14507
14812
|
prevChildren = [];
|
|
14813
|
+
moves = void 0;
|
|
14508
14814
|
if (children) {
|
|
14509
14815
|
for (let i = 0; i < children.length; i++) {
|
|
14510
14816
|
const child = children[i];
|
|
@@ -14536,6 +14842,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14536
14842
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
14537
14843
|
}
|
|
14538
14844
|
}
|
|
14845
|
+
if (prevChildren.length) {
|
|
14846
|
+
origins = getOrigins(instance);
|
|
14847
|
+
pendingGroups.set(instance, willMove);
|
|
14848
|
+
}
|
|
14539
14849
|
return createVNode(tag, null, children);
|
|
14540
14850
|
};
|
|
14541
14851
|
}
|
|
@@ -14550,8 +14860,11 @@ function callPendingCbs(c) {
|
|
|
14550
14860
|
el[enterCbKey]();
|
|
14551
14861
|
}
|
|
14552
14862
|
}
|
|
14553
|
-
function
|
|
14554
|
-
|
|
14863
|
+
function resolveMoveClass(props) {
|
|
14864
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
14865
|
+
}
|
|
14866
|
+
function recordPosition(c, shift) {
|
|
14867
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
14555
14868
|
}
|
|
14556
14869
|
function applyTranslation(c) {
|
|
14557
14870
|
const oldPos = positionMap.get(c);
|
|
@@ -14575,13 +14888,41 @@ function applyTranslation(c) {
|
|
|
14575
14888
|
return c;
|
|
14576
14889
|
}
|
|
14577
14890
|
}
|
|
14578
|
-
function getPosition(el) {
|
|
14891
|
+
function getPosition(el, shift) {
|
|
14579
14892
|
const rect = el.getBoundingClientRect();
|
|
14580
14893
|
return {
|
|
14581
|
-
left: rect.left,
|
|
14582
|
-
top: rect.top
|
|
14894
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
14895
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
14583
14896
|
};
|
|
14584
14897
|
}
|
|
14898
|
+
function getOrigins(instance) {
|
|
14899
|
+
let origins;
|
|
14900
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
14901
|
+
const willMove = pendingGroups.get(group);
|
|
14902
|
+
if (willMove) {
|
|
14903
|
+
const item = findItem(group.vnode.el, instance.vnode.el);
|
|
14904
|
+
if (item) {
|
|
14905
|
+
(origins || (origins = [])).push(
|
|
14906
|
+
extend(getPosition(item), { item, willMove })
|
|
14907
|
+
);
|
|
14908
|
+
}
|
|
14909
|
+
}
|
|
14910
|
+
}
|
|
14911
|
+
return origins;
|
|
14912
|
+
}
|
|
14913
|
+
function findItem(root, node) {
|
|
14914
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
14915
|
+
while (node && node.parentNode !== container) {
|
|
14916
|
+
node = node.parentNode;
|
|
14917
|
+
}
|
|
14918
|
+
if (node && node.nodeType === 1) {
|
|
14919
|
+
return node;
|
|
14920
|
+
}
|
|
14921
|
+
}
|
|
14922
|
+
function getOriginShift(origins, root) {
|
|
14923
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
14924
|
+
return origin && getPosition(origin.item, origin);
|
|
14925
|
+
}
|
|
14585
14926
|
function hasCSSTransform(el, root, moveClass) {
|
|
14586
14927
|
const clone = el.cloneNode();
|
|
14587
14928
|
const _vtc = el[vtcKey];
|
|
@@ -14776,18 +15117,18 @@ const vModelSelect = {
|
|
|
14776
15117
|
},
|
|
14777
15118
|
// set value in mounted & updated because <select> relies on its children
|
|
14778
15119
|
// <option>s.
|
|
14779
|
-
mounted(el, { value }) {
|
|
14780
|
-
setSelected(el, value);
|
|
15120
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
15121
|
+
setSelected(el, value, number);
|
|
14781
15122
|
},
|
|
14782
15123
|
beforeUpdate(el, { value }, vnode) {
|
|
14783
15124
|
el._modelValue = value;
|
|
14784
15125
|
el[assignKey] = getModelAssigner(vnode);
|
|
14785
15126
|
},
|
|
14786
|
-
updated(el, { value }) {
|
|
15127
|
+
updated(el, { value, modifiers: { number } }) {
|
|
14787
15128
|
const pending = el._pendingValue;
|
|
14788
15129
|
el._pendingValue = void 0;
|
|
14789
15130
|
if (!pending || pending[0] !== el.multiple || !isSameSelectValue(value, pending[1], pending[0])) {
|
|
14790
|
-
setSelected(el, value);
|
|
15131
|
+
setSelected(el, value, number);
|
|
14791
15132
|
}
|
|
14792
15133
|
}
|
|
14793
15134
|
};
|
|
@@ -14803,7 +15144,7 @@ function isSameSelectValue(value, assignedValue, multiple) {
|
|
|
14803
15144
|
}
|
|
14804
15145
|
return false;
|
|
14805
15146
|
}
|
|
14806
|
-
function setSelected(el, value) {
|
|
15147
|
+
function setSelected(el, value, number = false) {
|
|
14807
15148
|
const isMultiple = el.multiple;
|
|
14808
15149
|
const isArrayValue = isArray(value);
|
|
14809
15150
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -14824,7 +15165,7 @@ function setSelected(el, value) {
|
|
|
14824
15165
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
14825
15166
|
}
|
|
14826
15167
|
} else {
|
|
14827
|
-
option.selected = value.has(optionValue);
|
|
15168
|
+
option.selected = value.has(optionValue) || number && typeof optionValue === "string" && value.has(looseToNumber(optionValue));
|
|
14828
15169
|
}
|
|
14829
15170
|
} else if (looseEqual(getValue(option), value)) {
|
|
14830
15171
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|