@vue/compat 3.5.17 → 3.5.19
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 +138 -113
- package/dist/vue.cjs.prod.js +98 -96
- package/dist/vue.esm-browser.js +134 -112
- package/dist/vue.esm-browser.prod.js +8 -8
- package/dist/vue.esm-bundler.js +135 -113
- package/dist/vue.global.js +134 -112
- package/dist/vue.global.prod.js +8 -8
- package/dist/vue.runtime.esm-browser.js +121 -93
- package/dist/vue.runtime.esm-browser.prod.js +3 -3
- package/dist/vue.runtime.esm-bundler.js +122 -94
- package/dist/vue.runtime.global.js +121 -93
- package/dist/vue.runtime.global.prod.js +3 -3
- package/package.json +3 -3
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.19
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -56,10 +56,10 @@ const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
|
56
56
|
);
|
|
57
57
|
const cacheStringFunction = (fn) => {
|
|
58
58
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
59
|
-
return (str) => {
|
|
59
|
+
return ((str) => {
|
|
60
60
|
const hit = cache[str];
|
|
61
61
|
return hit || (cache[str] = fn(str));
|
|
62
|
-
};
|
|
62
|
+
});
|
|
63
63
|
};
|
|
64
64
|
const camelizeRE = /-(\w)/g;
|
|
65
65
|
const camelize = cacheStringFunction(
|
|
@@ -384,6 +384,24 @@ const stringifySymbol = (v, i = "") => {
|
|
|
384
384
|
);
|
|
385
385
|
};
|
|
386
386
|
|
|
387
|
+
function normalizeCssVarValue(value) {
|
|
388
|
+
if (value == null) {
|
|
389
|
+
return "initial";
|
|
390
|
+
}
|
|
391
|
+
if (typeof value === "string") {
|
|
392
|
+
return value === "" ? " " : value;
|
|
393
|
+
}
|
|
394
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
395
|
+
{
|
|
396
|
+
console.warn(
|
|
397
|
+
"[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
|
|
398
|
+
value
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
return String(value);
|
|
403
|
+
}
|
|
404
|
+
|
|
387
405
|
function warn$2(msg, ...args) {
|
|
388
406
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
389
407
|
}
|
|
@@ -1347,7 +1365,13 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1347
1365
|
}
|
|
1348
1366
|
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
|
|
1349
1367
|
if (isOldValueReadonly) {
|
|
1350
|
-
|
|
1368
|
+
{
|
|
1369
|
+
warn$2(
|
|
1370
|
+
`Set operation on key "${String(key)}" failed: target is readonly.`,
|
|
1371
|
+
target[key]
|
|
1372
|
+
);
|
|
1373
|
+
}
|
|
1374
|
+
return true;
|
|
1351
1375
|
} else {
|
|
1352
1376
|
oldValue.value = value;
|
|
1353
1377
|
return true;
|
|
@@ -2714,7 +2738,9 @@ function rerender(id, newRender) {
|
|
|
2714
2738
|
}
|
|
2715
2739
|
instance.renderCache = [];
|
|
2716
2740
|
isHmrUpdating = true;
|
|
2717
|
-
instance.
|
|
2741
|
+
if (!(instance.job.flags & 8)) {
|
|
2742
|
+
instance.update();
|
|
2743
|
+
}
|
|
2718
2744
|
isHmrUpdating = false;
|
|
2719
2745
|
});
|
|
2720
2746
|
}
|
|
@@ -4306,7 +4332,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4306
4332
|
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
4307
4333
|
const setupState = owner.setupState;
|
|
4308
4334
|
const rawSetupState = toRaw(setupState);
|
|
4309
|
-
const canSetSetupRef = setupState === EMPTY_OBJ ?
|
|
4335
|
+
const canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {
|
|
4310
4336
|
{
|
|
4311
4337
|
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
4312
4338
|
warn$1(
|
|
@@ -4319,6 +4345,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4319
4345
|
}
|
|
4320
4346
|
return hasOwn(rawSetupState, key);
|
|
4321
4347
|
};
|
|
4348
|
+
const canSetRef = (ref2) => {
|
|
4349
|
+
return !knownTemplateRefs.has(ref2);
|
|
4350
|
+
};
|
|
4322
4351
|
if (oldRef != null && oldRef !== ref) {
|
|
4323
4352
|
if (isString(oldRef)) {
|
|
4324
4353
|
refs[oldRef] = null;
|
|
@@ -4326,7 +4355,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4326
4355
|
setupState[oldRef] = null;
|
|
4327
4356
|
}
|
|
4328
4357
|
} else if (isRef(oldRef)) {
|
|
4329
|
-
oldRef
|
|
4358
|
+
if (canSetRef(oldRef)) {
|
|
4359
|
+
oldRef.value = null;
|
|
4360
|
+
}
|
|
4361
|
+
const oldRawRefAtom = oldRawRef;
|
|
4362
|
+
if (oldRawRefAtom.k) refs[oldRawRefAtom.k] = null;
|
|
4330
4363
|
}
|
|
4331
4364
|
}
|
|
4332
4365
|
if (isFunction(ref)) {
|
|
@@ -4337,7 +4370,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4337
4370
|
if (_isString || _isRef) {
|
|
4338
4371
|
const doSet = () => {
|
|
4339
4372
|
if (rawRef.f) {
|
|
4340
|
-
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;
|
|
4373
|
+
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
4341
4374
|
if (isUnmount) {
|
|
4342
4375
|
isArray(existing) && remove(existing, refValue);
|
|
4343
4376
|
} else {
|
|
@@ -4348,8 +4381,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4348
4381
|
setupState[ref] = refs[ref];
|
|
4349
4382
|
}
|
|
4350
4383
|
} else {
|
|
4351
|
-
|
|
4352
|
-
if (
|
|
4384
|
+
const newVal = [refValue];
|
|
4385
|
+
if (canSetRef(ref)) {
|
|
4386
|
+
ref.value = newVal;
|
|
4387
|
+
}
|
|
4388
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
4353
4389
|
}
|
|
4354
4390
|
} else if (!existing.includes(refValue)) {
|
|
4355
4391
|
existing.push(refValue);
|
|
@@ -4361,7 +4397,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4361
4397
|
setupState[ref] = value;
|
|
4362
4398
|
}
|
|
4363
4399
|
} else if (_isRef) {
|
|
4364
|
-
ref
|
|
4400
|
+
if (canSetRef(ref)) {
|
|
4401
|
+
ref.value = value;
|
|
4402
|
+
}
|
|
4365
4403
|
if (rawRef.k) refs[rawRef.k] = value;
|
|
4366
4404
|
} else {
|
|
4367
4405
|
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
@@ -4982,10 +5020,8 @@ function resolveCssVars(instance, vnode, expectedMap) {
|
|
|
4982
5020
|
if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
|
|
4983
5021
|
const cssVars = instance.getCssVars();
|
|
4984
5022
|
for (const key in cssVars) {
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
String(cssVars[key])
|
|
4988
|
-
);
|
|
5023
|
+
const value = normalizeCssVarValue(cssVars[key]);
|
|
5024
|
+
expectedMap.set(`--${getEscapedCssVarName(key)}`, value);
|
|
4989
5025
|
}
|
|
4990
5026
|
}
|
|
4991
5027
|
if (vnode === root && instance.parent) {
|
|
@@ -5174,16 +5210,19 @@ function defineAsyncComponent(source) {
|
|
|
5174
5210
|
__asyncLoader: load,
|
|
5175
5211
|
__asyncHydrate(el, instance, hydrate) {
|
|
5176
5212
|
let patched = false;
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5213
|
+
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
5214
|
+
const performHydrate = () => {
|
|
5215
|
+
if (patched) {
|
|
5216
|
+
{
|
|
5180
5217
|
warn$1(
|
|
5181
|
-
`Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
|
|
5218
|
+
`Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
|
|
5182
5219
|
);
|
|
5183
|
-
return;
|
|
5184
5220
|
}
|
|
5185
|
-
|
|
5186
|
-
}
|
|
5221
|
+
return;
|
|
5222
|
+
}
|
|
5223
|
+
hydrate();
|
|
5224
|
+
};
|
|
5225
|
+
const doHydrate = hydrateStrategy ? () => {
|
|
5187
5226
|
const teardown = hydrateStrategy(
|
|
5188
5227
|
performHydrate,
|
|
5189
5228
|
(cb) => forEachElement(el, cb)
|
|
@@ -5191,8 +5230,7 @@ function defineAsyncComponent(source) {
|
|
|
5191
5230
|
if (teardown) {
|
|
5192
5231
|
(instance.bum || (instance.bum = [])).push(teardown);
|
|
5193
5232
|
}
|
|
5194
|
-
|
|
5195
|
-
} : hydrate;
|
|
5233
|
+
} : performHydrate;
|
|
5196
5234
|
if (resolvedComp) {
|
|
5197
5235
|
doHydrate();
|
|
5198
5236
|
} else {
|
|
@@ -6459,10 +6497,10 @@ const PublicInstanceProxyHandlers = {
|
|
|
6459
6497
|
return true;
|
|
6460
6498
|
},
|
|
6461
6499
|
has({
|
|
6462
|
-
_: { data, setupState, accessCache, ctx, appContext, propsOptions }
|
|
6500
|
+
_: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
|
|
6463
6501
|
}, key) {
|
|
6464
|
-
let normalizedProps;
|
|
6465
|
-
return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
|
|
6502
|
+
let normalizedProps, cssModules;
|
|
6503
|
+
return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
|
|
6466
6504
|
},
|
|
6467
6505
|
defineProperty(target, key, descriptor) {
|
|
6468
6506
|
if (descriptor.get != null) {
|
|
@@ -6614,15 +6652,15 @@ function withDefaults(props, defaults) {
|
|
|
6614
6652
|
return null;
|
|
6615
6653
|
}
|
|
6616
6654
|
function useSlots() {
|
|
6617
|
-
return getContext().slots;
|
|
6655
|
+
return getContext("useSlots").slots;
|
|
6618
6656
|
}
|
|
6619
6657
|
function useAttrs() {
|
|
6620
|
-
return getContext().attrs;
|
|
6658
|
+
return getContext("useAttrs").attrs;
|
|
6621
6659
|
}
|
|
6622
|
-
function getContext() {
|
|
6660
|
+
function getContext(calledFunctionName) {
|
|
6623
6661
|
const i = getCurrentInstance();
|
|
6624
6662
|
if (!i) {
|
|
6625
|
-
warn$1(
|
|
6663
|
+
warn$1(`${calledFunctionName}() called without active instance.`);
|
|
6626
6664
|
}
|
|
6627
6665
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
6628
6666
|
}
|
|
@@ -6881,7 +6919,8 @@ function applyOptions(instance) {
|
|
|
6881
6919
|
expose.forEach((key) => {
|
|
6882
6920
|
Object.defineProperty(exposed, key, {
|
|
6883
6921
|
get: () => publicThis[key],
|
|
6884
|
-
set: (val) => publicThis[key] = val
|
|
6922
|
+
set: (val) => publicThis[key] = val,
|
|
6923
|
+
enumerable: true
|
|
6885
6924
|
});
|
|
6886
6925
|
});
|
|
6887
6926
|
} else if (!instance.exposed) {
|
|
@@ -7206,7 +7245,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7206
7245
|
return vm;
|
|
7207
7246
|
}
|
|
7208
7247
|
}
|
|
7209
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7248
|
+
Vue.version = `2.6.14-compat:${"3.5.19"}`;
|
|
7210
7249
|
Vue.config = singletonApp.config;
|
|
7211
7250
|
Vue.use = (plugin, ...options) => {
|
|
7212
7251
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -7220,22 +7259,22 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7220
7259
|
singletonApp.mixin(m);
|
|
7221
7260
|
return Vue;
|
|
7222
7261
|
};
|
|
7223
|
-
Vue.component = (name, comp) => {
|
|
7262
|
+
Vue.component = ((name, comp) => {
|
|
7224
7263
|
if (comp) {
|
|
7225
7264
|
singletonApp.component(name, comp);
|
|
7226
7265
|
return Vue;
|
|
7227
7266
|
} else {
|
|
7228
7267
|
return singletonApp.component(name);
|
|
7229
7268
|
}
|
|
7230
|
-
};
|
|
7231
|
-
Vue.directive = (name, dir) => {
|
|
7269
|
+
});
|
|
7270
|
+
Vue.directive = ((name, dir) => {
|
|
7232
7271
|
if (dir) {
|
|
7233
7272
|
singletonApp.directive(name, dir);
|
|
7234
7273
|
return Vue;
|
|
7235
7274
|
} else {
|
|
7236
7275
|
return singletonApp.directive(name);
|
|
7237
7276
|
}
|
|
7238
|
-
};
|
|
7277
|
+
});
|
|
7239
7278
|
Vue.options = { _base: Vue };
|
|
7240
7279
|
let cid = 1;
|
|
7241
7280
|
Vue.cid = cid;
|
|
@@ -7298,14 +7337,14 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7298
7337
|
assertCompatEnabled("GLOBAL_OBSERVABLE", null);
|
|
7299
7338
|
return reactive(target);
|
|
7300
7339
|
};
|
|
7301
|
-
Vue.filter = (name, filter) => {
|
|
7340
|
+
Vue.filter = ((name, filter) => {
|
|
7302
7341
|
if (filter) {
|
|
7303
7342
|
singletonApp.filter(name, filter);
|
|
7304
7343
|
return Vue;
|
|
7305
7344
|
} else {
|
|
7306
7345
|
return singletonApp.filter(name);
|
|
7307
7346
|
}
|
|
7308
|
-
};
|
|
7347
|
+
});
|
|
7309
7348
|
const util = {
|
|
7310
7349
|
warn: warn$1 ,
|
|
7311
7350
|
extend,
|
|
@@ -7798,7 +7837,7 @@ function provide(key, value) {
|
|
|
7798
7837
|
}
|
|
7799
7838
|
}
|
|
7800
7839
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
7801
|
-
const instance =
|
|
7840
|
+
const instance = getCurrentInstance();
|
|
7802
7841
|
if (instance || currentApp) {
|
|
7803
7842
|
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
7804
7843
|
if (provides && key in provides) {
|
|
@@ -7813,7 +7852,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
7813
7852
|
}
|
|
7814
7853
|
}
|
|
7815
7854
|
function hasInjectionContext() {
|
|
7816
|
-
return !!(
|
|
7855
|
+
return !!(getCurrentInstance() || currentApp);
|
|
7817
7856
|
}
|
|
7818
7857
|
|
|
7819
7858
|
function createPropsDefaultThis(instance, rawProps, propKey) {
|
|
@@ -8299,7 +8338,7 @@ function isBoolean(...args) {
|
|
|
8299
8338
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
8300
8339
|
}
|
|
8301
8340
|
|
|
8302
|
-
const isInternalKey = (key) => key
|
|
8341
|
+
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
8303
8342
|
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
8304
8343
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
8305
8344
|
if (rawSlot._n) {
|
|
@@ -8353,8 +8392,6 @@ const assignSlots = (slots, children, optimized) => {
|
|
|
8353
8392
|
const initSlots = (instance, children, optimized) => {
|
|
8354
8393
|
const slots = instance.slots = createInternalObject();
|
|
8355
8394
|
if (instance.vnode.shapeFlag & 32) {
|
|
8356
|
-
const cacheIndexes = children.__;
|
|
8357
|
-
if (cacheIndexes) def(slots, "__", cacheIndexes, true);
|
|
8358
8395
|
const type = children._;
|
|
8359
8396
|
if (type) {
|
|
8360
8397
|
assignSlots(slots, children, optimized);
|
|
@@ -8415,12 +8452,10 @@ function endMeasure(instance, type) {
|
|
|
8415
8452
|
if (instance.appContext.config.performance && isSupported()) {
|
|
8416
8453
|
const startTag = `vue-${type}-${instance.uid}`;
|
|
8417
8454
|
const endTag = startTag + `:end`;
|
|
8455
|
+
const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
|
|
8418
8456
|
perf.mark(endTag);
|
|
8419
|
-
perf.measure(
|
|
8420
|
-
|
|
8421
|
-
startTag,
|
|
8422
|
-
endTag
|
|
8423
|
-
);
|
|
8457
|
+
perf.measure(measureName, startTag, endTag);
|
|
8458
|
+
perf.clearMeasures(measureName);
|
|
8424
8459
|
perf.clearMarks(startTag);
|
|
8425
8460
|
perf.clearMarks(endTag);
|
|
8426
8461
|
}
|
|
@@ -9042,6 +9077,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9042
9077
|
if (!initialVNode.el) {
|
|
9043
9078
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
9044
9079
|
processCommentNode(null, placeholder, container, anchor);
|
|
9080
|
+
initialVNode.placeholder = placeholder.el;
|
|
9045
9081
|
}
|
|
9046
9082
|
} else {
|
|
9047
9083
|
setupRenderEffect(
|
|
@@ -9567,7 +9603,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9567
9603
|
for (i = toBePatched - 1; i >= 0; i--) {
|
|
9568
9604
|
const nextIndex = s2 + i;
|
|
9569
9605
|
const nextChild = c2[nextIndex];
|
|
9570
|
-
const
|
|
9606
|
+
const anchorVNode = c2[nextIndex + 1];
|
|
9607
|
+
const anchor = nextIndex + 1 < l2 ? (
|
|
9608
|
+
// #13559, fallback to el placeholder for unresolved async component
|
|
9609
|
+
anchorVNode.el || anchorVNode.placeholder
|
|
9610
|
+
) : parentAnchor;
|
|
9571
9611
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
9572
9612
|
patch(
|
|
9573
9613
|
null,
|
|
@@ -9632,6 +9672,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9632
9672
|
}
|
|
9633
9673
|
};
|
|
9634
9674
|
const performLeave = () => {
|
|
9675
|
+
if (el._isLeaving) {
|
|
9676
|
+
el[leaveCbKey](
|
|
9677
|
+
true
|
|
9678
|
+
/* cancelled */
|
|
9679
|
+
);
|
|
9680
|
+
}
|
|
9635
9681
|
leave(el, () => {
|
|
9636
9682
|
remove2();
|
|
9637
9683
|
afterLeave && afterLeave();
|
|
@@ -9777,27 +9823,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9777
9823
|
if (instance.type.__hmrId) {
|
|
9778
9824
|
unregisterHMR(instance);
|
|
9779
9825
|
}
|
|
9780
|
-
const {
|
|
9781
|
-
bum,
|
|
9782
|
-
scope,
|
|
9783
|
-
job,
|
|
9784
|
-
subTree,
|
|
9785
|
-
um,
|
|
9786
|
-
m,
|
|
9787
|
-
a,
|
|
9788
|
-
parent,
|
|
9789
|
-
slots: { __: slotCacheKeys }
|
|
9790
|
-
} = instance;
|
|
9826
|
+
const { bum, scope, job, subTree, um, m, a } = instance;
|
|
9791
9827
|
invalidateMount(m);
|
|
9792
9828
|
invalidateMount(a);
|
|
9793
9829
|
if (bum) {
|
|
9794
9830
|
invokeArrayFns(bum);
|
|
9795
9831
|
}
|
|
9796
|
-
if (parent && isArray(slotCacheKeys)) {
|
|
9797
|
-
slotCacheKeys.forEach((v) => {
|
|
9798
|
-
parent.renderCache[v] = void 0;
|
|
9799
|
-
});
|
|
9800
|
-
}
|
|
9801
9832
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) {
|
|
9802
9833
|
instance.emit("hook:beforeDestroy");
|
|
9803
9834
|
}
|
|
@@ -9818,12 +9849,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9818
9849
|
queuePostRenderEffect(() => {
|
|
9819
9850
|
instance.isUnmounted = true;
|
|
9820
9851
|
}, parentSuspense);
|
|
9821
|
-
if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
|
|
9822
|
-
parentSuspense.deps--;
|
|
9823
|
-
if (parentSuspense.deps === 0) {
|
|
9824
|
-
parentSuspense.resolve();
|
|
9825
|
-
}
|
|
9826
|
-
}
|
|
9827
9852
|
{
|
|
9828
9853
|
devtoolsComponentRemoved(instance);
|
|
9829
9854
|
}
|
|
@@ -9924,7 +9949,8 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
9924
9949
|
if (!shallow && c2.patchFlag !== -2)
|
|
9925
9950
|
traverseStaticChildren(c1, c2);
|
|
9926
9951
|
}
|
|
9927
|
-
if (c2.type === Text
|
|
9952
|
+
if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
|
|
9953
|
+
c2.patchFlag !== -1) {
|
|
9928
9954
|
c2.el = c1.el;
|
|
9929
9955
|
}
|
|
9930
9956
|
if (c2.type === Comment && !c2.el) {
|
|
@@ -11562,6 +11588,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
11562
11588
|
suspense: vnode.suspense,
|
|
11563
11589
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
11564
11590
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
11591
|
+
placeholder: vnode.placeholder,
|
|
11565
11592
|
el: vnode.el,
|
|
11566
11593
|
anchor: vnode.anchor,
|
|
11567
11594
|
ctx: vnode.ctx,
|
|
@@ -12368,7 +12395,7 @@ function isMemoSame(cached, memo) {
|
|
|
12368
12395
|
return true;
|
|
12369
12396
|
}
|
|
12370
12397
|
|
|
12371
|
-
const version = "3.5.
|
|
12398
|
+
const version = "3.5.19";
|
|
12372
12399
|
const warn = warn$1 ;
|
|
12373
12400
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12374
12401
|
const devtools = devtools$1 ;
|
|
@@ -12925,8 +12952,9 @@ function setVarsOnNode(el, vars) {
|
|
|
12925
12952
|
const style = el.style;
|
|
12926
12953
|
let cssText = "";
|
|
12927
12954
|
for (const key in vars) {
|
|
12928
|
-
|
|
12929
|
-
|
|
12955
|
+
const value = normalizeCssVarValue(vars[key]);
|
|
12956
|
+
style.setProperty(`--${key}`, value);
|
|
12957
|
+
cssText += `--${key}: ${value};`;
|
|
12930
12958
|
}
|
|
12931
12959
|
style[CSS_VAR_TEXT] = cssText;
|
|
12932
12960
|
}
|
|
@@ -13312,10 +13340,10 @@ function defineCustomElement(options, extraOptions, _createApp) {
|
|
|
13312
13340
|
VueCustomElement.def = Comp;
|
|
13313
13341
|
return VueCustomElement;
|
|
13314
13342
|
}
|
|
13315
|
-
|
|
13316
|
-
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
13343
|
+
|
|
13344
|
+
const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
13317
13345
|
return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
|
|
13318
|
-
};
|
|
13346
|
+
});
|
|
13319
13347
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
13320
13348
|
};
|
|
13321
13349
|
class VueElement extends BaseClass {
|
|
@@ -14185,13 +14213,13 @@ const modifierGuards = {
|
|
|
14185
14213
|
const withModifiers = (fn, modifiers) => {
|
|
14186
14214
|
const cache = fn._withMods || (fn._withMods = {});
|
|
14187
14215
|
const cacheKey = modifiers.join(".");
|
|
14188
|
-
return cache[cacheKey] || (cache[cacheKey] = (event, ...args) => {
|
|
14216
|
+
return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
|
|
14189
14217
|
for (let i = 0; i < modifiers.length; i++) {
|
|
14190
14218
|
const guard = modifierGuards[modifiers[i]];
|
|
14191
14219
|
if (guard && guard(event, modifiers)) return;
|
|
14192
14220
|
}
|
|
14193
14221
|
return fn(event, ...args);
|
|
14194
|
-
});
|
|
14222
|
+
}));
|
|
14195
14223
|
};
|
|
14196
14224
|
const keyNames = {
|
|
14197
14225
|
esc: "escape",
|
|
@@ -14221,7 +14249,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
14221
14249
|
}
|
|
14222
14250
|
const cache = fn._withKeys || (fn._withKeys = {});
|
|
14223
14251
|
const cacheKey = modifiers.join(".");
|
|
14224
|
-
return cache[cacheKey] || (cache[cacheKey] = (event) => {
|
|
14252
|
+
return cache[cacheKey] || (cache[cacheKey] = ((event) => {
|
|
14225
14253
|
if (!("key" in event)) {
|
|
14226
14254
|
return;
|
|
14227
14255
|
}
|
|
@@ -14251,7 +14279,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
14251
14279
|
}
|
|
14252
14280
|
}
|
|
14253
14281
|
}
|
|
14254
|
-
});
|
|
14282
|
+
}));
|
|
14255
14283
|
};
|
|
14256
14284
|
|
|
14257
14285
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
@@ -14265,13 +14293,13 @@ function ensureHydrationRenderer() {
|
|
|
14265
14293
|
enabledHydration = true;
|
|
14266
14294
|
return renderer;
|
|
14267
14295
|
}
|
|
14268
|
-
const render = (...args) => {
|
|
14296
|
+
const render = ((...args) => {
|
|
14269
14297
|
ensureRenderer().render(...args);
|
|
14270
|
-
};
|
|
14271
|
-
const hydrate = (...args) => {
|
|
14298
|
+
});
|
|
14299
|
+
const hydrate = ((...args) => {
|
|
14272
14300
|
ensureHydrationRenderer().hydrate(...args);
|
|
14273
|
-
};
|
|
14274
|
-
const createApp = (...args) => {
|
|
14301
|
+
});
|
|
14302
|
+
const createApp = ((...args) => {
|
|
14275
14303
|
const app = ensureRenderer().createApp(...args);
|
|
14276
14304
|
{
|
|
14277
14305
|
injectNativeTagCheck(app);
|
|
@@ -14308,8 +14336,8 @@ const createApp = (...args) => {
|
|
|
14308
14336
|
return proxy;
|
|
14309
14337
|
};
|
|
14310
14338
|
return app;
|
|
14311
|
-
};
|
|
14312
|
-
const createSSRApp = (...args) => {
|
|
14339
|
+
});
|
|
14340
|
+
const createSSRApp = ((...args) => {
|
|
14313
14341
|
const app = ensureHydrationRenderer().createApp(...args);
|
|
14314
14342
|
{
|
|
14315
14343
|
injectNativeTagCheck(app);
|
|
@@ -14323,7 +14351,7 @@ const createSSRApp = (...args) => {
|
|
|
14323
14351
|
}
|
|
14324
14352
|
};
|
|
14325
14353
|
return app;
|
|
14326
|
-
};
|
|
14354
|
+
});
|
|
14327
14355
|
function resolveRootNamespace(container) {
|
|
14328
14356
|
if (container instanceof SVGElement) {
|
|
14329
14357
|
return "svg";
|
|
@@ -15829,7 +15857,7 @@ function isCoreComponent(tag) {
|
|
|
15829
15857
|
return BASE_TRANSITION;
|
|
15830
15858
|
}
|
|
15831
15859
|
}
|
|
15832
|
-
const nonIdentifierRE =
|
|
15860
|
+
const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/;
|
|
15833
15861
|
const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
15834
15862
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
15835
15863
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
@@ -15941,6 +15969,9 @@ function hasDynamicKeyVBind(node) {
|
|
|
15941
15969
|
function isText$1(node) {
|
|
15942
15970
|
return node.type === 5 || node.type === 2;
|
|
15943
15971
|
}
|
|
15972
|
+
function isVPre(p) {
|
|
15973
|
+
return p.type === 7 && p.name === "pre";
|
|
15974
|
+
}
|
|
15944
15975
|
function isVSlot(p) {
|
|
15945
15976
|
return p.type === 7 && p.name === "slot";
|
|
15946
15977
|
}
|
|
@@ -16199,7 +16230,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
16199
16230
|
ondirarg(start, end) {
|
|
16200
16231
|
if (start === end) return;
|
|
16201
16232
|
const arg = getSlice(start, end);
|
|
16202
|
-
if (inVPre) {
|
|
16233
|
+
if (inVPre && !isVPre(currentProp)) {
|
|
16203
16234
|
currentProp.name += arg;
|
|
16204
16235
|
setLocEnd(currentProp.nameLoc, end);
|
|
16205
16236
|
} else {
|
|
@@ -16214,7 +16245,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
16214
16245
|
},
|
|
16215
16246
|
ondirmodifier(start, end) {
|
|
16216
16247
|
const mod = getSlice(start, end);
|
|
16217
|
-
if (inVPre) {
|
|
16248
|
+
if (inVPre && !isVPre(currentProp)) {
|
|
16218
16249
|
currentProp.name += "." + mod;
|
|
16219
16250
|
setLocEnd(currentProp.nameLoc, end);
|
|
16220
16251
|
} else if (currentProp.name === "slot") {
|
|
@@ -16842,6 +16873,11 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
16842
16873
|
} else if (child.type === 12) {
|
|
16843
16874
|
const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
|
|
16844
16875
|
if (constantType >= 2) {
|
|
16876
|
+
if (child.codegenNode.type === 14 && child.codegenNode.arguments.length > 0) {
|
|
16877
|
+
child.codegenNode.arguments.push(
|
|
16878
|
+
-1 + (` /* ${PatchFlagNames[-1]} */` )
|
|
16879
|
+
);
|
|
16880
|
+
}
|
|
16845
16881
|
toCache.push(child);
|
|
16846
16882
|
continue;
|
|
16847
16883
|
}
|
|
@@ -16870,7 +16906,6 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
16870
16906
|
}
|
|
16871
16907
|
}
|
|
16872
16908
|
let cachedAsArray = false;
|
|
16873
|
-
const slotCacheKeys = [];
|
|
16874
16909
|
if (toCache.length === children.length && node.type === 1) {
|
|
16875
16910
|
if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
|
|
16876
16911
|
node.codegenNode.children = getCacheExpression(
|
|
@@ -16880,7 +16915,6 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
16880
16915
|
} else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
16881
16916
|
const slot = getSlotNode(node.codegenNode, "default");
|
|
16882
16917
|
if (slot) {
|
|
16883
|
-
slotCacheKeys.push(context.cached.length);
|
|
16884
16918
|
slot.returns = getCacheExpression(
|
|
16885
16919
|
createArrayExpression(slot.returns)
|
|
16886
16920
|
);
|
|
@@ -16890,7 +16924,6 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
16890
16924
|
const slotName = findDir(node, "slot", true);
|
|
16891
16925
|
const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
|
|
16892
16926
|
if (slot) {
|
|
16893
|
-
slotCacheKeys.push(context.cached.length);
|
|
16894
16927
|
slot.returns = getCacheExpression(
|
|
16895
16928
|
createArrayExpression(slot.returns)
|
|
16896
16929
|
);
|
|
@@ -16900,23 +16933,12 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
|
|
|
16900
16933
|
}
|
|
16901
16934
|
if (!cachedAsArray) {
|
|
16902
16935
|
for (const child of toCache) {
|
|
16903
|
-
slotCacheKeys.push(context.cached.length);
|
|
16904
16936
|
child.codegenNode = context.cache(child.codegenNode);
|
|
16905
16937
|
}
|
|
16906
16938
|
}
|
|
16907
|
-
if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
|
|
16908
|
-
node.codegenNode.children.properties.push(
|
|
16909
|
-
createObjectProperty(
|
|
16910
|
-
`__`,
|
|
16911
|
-
createSimpleExpression(JSON.stringify(slotCacheKeys), false)
|
|
16912
|
-
)
|
|
16913
|
-
);
|
|
16914
|
-
}
|
|
16915
16939
|
function getCacheExpression(value) {
|
|
16916
16940
|
const exp = context.cache(value);
|
|
16917
|
-
|
|
16918
|
-
exp.needArraySpread = true;
|
|
16919
|
-
}
|
|
16941
|
+
exp.needArraySpread = true;
|
|
16920
16942
|
return exp;
|
|
16921
16943
|
}
|
|
16922
16944
|
function getSlotNode(node2, name) {
|
|
@@ -18112,7 +18134,7 @@ function processIf(node, dir, context, processCodegen) {
|
|
|
18112
18134
|
continue;
|
|
18113
18135
|
}
|
|
18114
18136
|
if (sibling && sibling.type === 9) {
|
|
18115
|
-
if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
|
|
18137
|
+
if ((dir.name === "else-if" || dir.name === "else") && sibling.branches[sibling.branches.length - 1].condition === void 0) {
|
|
18116
18138
|
context.onError(
|
|
18117
18139
|
createCompilerError(30, node.loc)
|
|
18118
18140
|
);
|
|
@@ -18291,7 +18313,7 @@ const transformBind = (dir, _node, context) => {
|
|
|
18291
18313
|
arg.children.unshift(`(`);
|
|
18292
18314
|
arg.children.push(`) || ""`);
|
|
18293
18315
|
} else if (!arg.isStatic) {
|
|
18294
|
-
arg.content = `${arg.content} || ""`;
|
|
18316
|
+
arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
18295
18317
|
}
|
|
18296
18318
|
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
18297
18319
|
if (arg.type === 4) {
|
|
@@ -19810,7 +19832,7 @@ const seen = /* @__PURE__ */ new WeakSet();
|
|
|
19810
19832
|
const transformMemo = (node, context) => {
|
|
19811
19833
|
if (node.type === 1) {
|
|
19812
19834
|
const dir = findDir(node, "memo");
|
|
19813
|
-
if (!dir || seen.has(node)) {
|
|
19835
|
+
if (!dir || seen.has(node) || context.inSSR) {
|
|
19814
19836
|
return;
|
|
19815
19837
|
}
|
|
19816
19838
|
seen.add(node);
|