@vue/compat 3.2.45 → 3.2.46
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 +602 -524
- package/dist/vue.cjs.prod.js +421 -339
- package/dist/vue.esm-browser.js +609 -528
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +613 -533
- package/dist/vue.global.js +603 -522
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +440 -364
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +444 -369
- package/dist/vue.runtime.global.js +434 -358
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -169,7 +169,7 @@ function normalizeProps(props) {
|
|
|
169
169
|
// These tag configs are shared between compiler-dom and runtime-dom, so they
|
|
170
170
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element
|
|
171
171
|
const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +
|
|
172
|
-
'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
|
|
172
|
+
'header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
|
|
173
173
|
'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +
|
|
174
174
|
'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +
|
|
175
175
|
'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +
|
|
@@ -181,7 +181,7 @@ const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,asi
|
|
|
181
181
|
const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +
|
|
182
182
|
'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +
|
|
183
183
|
'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +
|
|
184
|
-
'
|
|
184
|
+
'feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
|
|
185
185
|
'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +
|
|
186
186
|
'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +
|
|
187
187
|
'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +
|
|
@@ -339,12 +339,13 @@ const remove = (arr, el) => {
|
|
|
339
339
|
arr.splice(i, 1);
|
|
340
340
|
}
|
|
341
341
|
};
|
|
342
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
343
|
-
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
|
342
|
+
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
343
|
+
const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
|
|
344
344
|
const isArray = Array.isArray;
|
|
345
345
|
const isMap = (val) => toTypeString(val) === '[object Map]';
|
|
346
346
|
const isSet = (val) => toTypeString(val) === '[object Set]';
|
|
347
347
|
const isDate = (val) => toTypeString(val) === '[object Date]';
|
|
348
|
+
const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
|
|
348
349
|
const isFunction = (val) => typeof val === 'function';
|
|
349
350
|
const isString = (val) => typeof val === 'string';
|
|
350
351
|
const isSymbol = (val) => typeof val === 'symbol';
|
|
@@ -411,10 +412,22 @@ const def = (obj, key, value) => {
|
|
|
411
412
|
value
|
|
412
413
|
});
|
|
413
414
|
};
|
|
414
|
-
|
|
415
|
+
/**
|
|
416
|
+
* "123-foo" will be parsed to 123
|
|
417
|
+
* This is used for the .number modifier in v-model
|
|
418
|
+
*/
|
|
419
|
+
const looseToNumber = (val) => {
|
|
415
420
|
const n = parseFloat(val);
|
|
416
421
|
return isNaN(n) ? val : n;
|
|
417
422
|
};
|
|
423
|
+
/**
|
|
424
|
+
* Only conerces number-like strings
|
|
425
|
+
* "123-foo" will be returned as-is
|
|
426
|
+
*/
|
|
427
|
+
const toNumber = (val) => {
|
|
428
|
+
const n = isString(val) ? Number(val) : NaN;
|
|
429
|
+
return isNaN(n) ? val : n;
|
|
430
|
+
};
|
|
418
431
|
let _globalThis;
|
|
419
432
|
const getGlobalThis = () => {
|
|
420
433
|
return (_globalThis ||
|
|
@@ -430,7 +443,7 @@ const getGlobalThis = () => {
|
|
|
430
443
|
: {}));
|
|
431
444
|
};
|
|
432
445
|
|
|
433
|
-
function warn(msg, ...args) {
|
|
446
|
+
function warn$1(msg, ...args) {
|
|
434
447
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
435
448
|
}
|
|
436
449
|
|
|
@@ -441,7 +454,7 @@ class EffectScope {
|
|
|
441
454
|
/**
|
|
442
455
|
* @internal
|
|
443
456
|
*/
|
|
444
|
-
this.
|
|
457
|
+
this._active = true;
|
|
445
458
|
/**
|
|
446
459
|
* @internal
|
|
447
460
|
*/
|
|
@@ -456,8 +469,11 @@ class EffectScope {
|
|
|
456
469
|
(activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
|
|
457
470
|
}
|
|
458
471
|
}
|
|
472
|
+
get active() {
|
|
473
|
+
return this._active;
|
|
474
|
+
}
|
|
459
475
|
run(fn) {
|
|
460
|
-
if (this.
|
|
476
|
+
if (this._active) {
|
|
461
477
|
const currentEffectScope = activeEffectScope;
|
|
462
478
|
try {
|
|
463
479
|
activeEffectScope = this;
|
|
@@ -468,7 +484,7 @@ class EffectScope {
|
|
|
468
484
|
}
|
|
469
485
|
}
|
|
470
486
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
471
|
-
warn(`cannot run an inactive effect scope.`);
|
|
487
|
+
warn$1(`cannot run an inactive effect scope.`);
|
|
472
488
|
}
|
|
473
489
|
}
|
|
474
490
|
/**
|
|
@@ -486,7 +502,7 @@ class EffectScope {
|
|
|
486
502
|
activeEffectScope = this.parent;
|
|
487
503
|
}
|
|
488
504
|
stop(fromParent) {
|
|
489
|
-
if (this.
|
|
505
|
+
if (this._active) {
|
|
490
506
|
let i, l;
|
|
491
507
|
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
492
508
|
this.effects[i].stop();
|
|
@@ -509,7 +525,7 @@ class EffectScope {
|
|
|
509
525
|
}
|
|
510
526
|
}
|
|
511
527
|
this.parent = undefined;
|
|
512
|
-
this.
|
|
528
|
+
this._active = false;
|
|
513
529
|
}
|
|
514
530
|
}
|
|
515
531
|
}
|
|
@@ -529,7 +545,7 @@ function onScopeDispose(fn) {
|
|
|
529
545
|
activeEffectScope.cleanups.push(fn);
|
|
530
546
|
}
|
|
531
547
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
532
|
-
warn(`onScopeDispose() is called when there is no active effect scope` +
|
|
548
|
+
warn$1(`onScopeDispose() is called when there is no active effect scope` +
|
|
533
549
|
` to be associated with.`);
|
|
534
550
|
}
|
|
535
551
|
}
|
|
@@ -731,7 +747,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
731
747
|
deps = [...depsMap.values()];
|
|
732
748
|
}
|
|
733
749
|
else if (key === 'length' && isArray(target)) {
|
|
734
|
-
const newLength =
|
|
750
|
+
const newLength = Number(newValue);
|
|
735
751
|
depsMap.forEach((dep, key) => {
|
|
736
752
|
if (key === 'length' || key >= newLength) {
|
|
737
753
|
deps.push(dep);
|
|
@@ -827,6 +843,10 @@ function triggerEffect(effect, debuggerEventExtraInfo) {
|
|
|
827
843
|
}
|
|
828
844
|
}
|
|
829
845
|
}
|
|
846
|
+
function getDepFromReactive(object, key) {
|
|
847
|
+
var _a;
|
|
848
|
+
return (_a = targetMap.get(object)) === null || _a === void 0 ? void 0 : _a.get(key);
|
|
849
|
+
}
|
|
830
850
|
|
|
831
851
|
const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
832
852
|
const builtInSymbols = new Set(
|
|
@@ -838,7 +858,7 @@ Object.getOwnPropertyNames(Symbol)
|
|
|
838
858
|
.filter(key => key !== 'arguments' && key !== 'caller')
|
|
839
859
|
.map(key => Symbol[key])
|
|
840
860
|
.filter(isSymbol));
|
|
841
|
-
const get = /*#__PURE__*/ createGetter();
|
|
861
|
+
const get$1 = /*#__PURE__*/ createGetter();
|
|
842
862
|
const shallowGet = /*#__PURE__*/ createGetter(false, true);
|
|
843
863
|
const readonlyGet = /*#__PURE__*/ createGetter(true);
|
|
844
864
|
const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);
|
|
@@ -872,6 +892,11 @@ function createArrayInstrumentations() {
|
|
|
872
892
|
});
|
|
873
893
|
return instrumentations;
|
|
874
894
|
}
|
|
895
|
+
function hasOwnProperty(key) {
|
|
896
|
+
const obj = toRaw(this);
|
|
897
|
+
track(obj, "has" /* TrackOpTypes.HAS */, key);
|
|
898
|
+
return obj.hasOwnProperty(key);
|
|
899
|
+
}
|
|
875
900
|
function createGetter(isReadonly = false, shallow = false) {
|
|
876
901
|
return function get(target, key, receiver) {
|
|
877
902
|
if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
|
|
@@ -895,8 +920,13 @@ function createGetter(isReadonly = false, shallow = false) {
|
|
|
895
920
|
return target;
|
|
896
921
|
}
|
|
897
922
|
const targetIsArray = isArray(target);
|
|
898
|
-
if (!isReadonly
|
|
899
|
-
|
|
923
|
+
if (!isReadonly) {
|
|
924
|
+
if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
|
|
925
|
+
return Reflect.get(arrayInstrumentations, key, receiver);
|
|
926
|
+
}
|
|
927
|
+
if (key === 'hasOwnProperty') {
|
|
928
|
+
return hasOwnProperty;
|
|
929
|
+
}
|
|
900
930
|
}
|
|
901
931
|
const res = Reflect.get(target, key, receiver);
|
|
902
932
|
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
|
|
@@ -921,7 +951,7 @@ function createGetter(isReadonly = false, shallow = false) {
|
|
|
921
951
|
return res;
|
|
922
952
|
};
|
|
923
953
|
}
|
|
924
|
-
const set = /*#__PURE__*/ createSetter();
|
|
954
|
+
const set$1 = /*#__PURE__*/ createSetter();
|
|
925
955
|
const shallowSet = /*#__PURE__*/ createSetter(true);
|
|
926
956
|
function createSetter(shallow = false) {
|
|
927
957
|
return function set(target, key, value, receiver) {
|
|
@@ -964,7 +994,7 @@ function deleteProperty(target, key) {
|
|
|
964
994
|
}
|
|
965
995
|
return result;
|
|
966
996
|
}
|
|
967
|
-
function has(target, key) {
|
|
997
|
+
function has$1(target, key) {
|
|
968
998
|
const result = Reflect.has(target, key);
|
|
969
999
|
if (!isSymbol(key) || !builtInSymbols.has(key)) {
|
|
970
1000
|
track(target, "has" /* TrackOpTypes.HAS */, key);
|
|
@@ -976,23 +1006,23 @@ function ownKeys(target) {
|
|
|
976
1006
|
return Reflect.ownKeys(target);
|
|
977
1007
|
}
|
|
978
1008
|
const mutableHandlers = {
|
|
979
|
-
get,
|
|
980
|
-
set,
|
|
1009
|
+
get: get$1,
|
|
1010
|
+
set: set$1,
|
|
981
1011
|
deleteProperty,
|
|
982
|
-
has,
|
|
1012
|
+
has: has$1,
|
|
983
1013
|
ownKeys
|
|
984
1014
|
};
|
|
985
1015
|
const readonlyHandlers = {
|
|
986
1016
|
get: readonlyGet,
|
|
987
1017
|
set(target, key) {
|
|
988
1018
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
989
|
-
warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
1019
|
+
warn$1(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
990
1020
|
}
|
|
991
1021
|
return true;
|
|
992
1022
|
},
|
|
993
1023
|
deleteProperty(target, key) {
|
|
994
1024
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
995
|
-
warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
1025
|
+
warn$1(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
996
1026
|
}
|
|
997
1027
|
return true;
|
|
998
1028
|
}
|
|
@@ -1010,7 +1040,7 @@ const shallowReadonlyHandlers = /*#__PURE__*/ extend({}, readonlyHandlers, {
|
|
|
1010
1040
|
|
|
1011
1041
|
const toShallow = (value) => value;
|
|
1012
1042
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1013
|
-
function get
|
|
1043
|
+
function get(target, key, isReadonly = false, isShallow = false) {
|
|
1014
1044
|
// #1772: readonly(reactive(Map)) should return readonly + reactive version
|
|
1015
1045
|
// of the value
|
|
1016
1046
|
target = target["__v_raw" /* ReactiveFlags.RAW */];
|
|
@@ -1036,7 +1066,7 @@ function get$1(target, key, isReadonly = false, isShallow = false) {
|
|
|
1036
1066
|
target.get(key);
|
|
1037
1067
|
}
|
|
1038
1068
|
}
|
|
1039
|
-
function has
|
|
1069
|
+
function has(key, isReadonly = false) {
|
|
1040
1070
|
const target = this["__v_raw" /* ReactiveFlags.RAW */];
|
|
1041
1071
|
const rawTarget = toRaw(target);
|
|
1042
1072
|
const rawKey = toRaw(key);
|
|
@@ -1066,7 +1096,7 @@ function add(value) {
|
|
|
1066
1096
|
}
|
|
1067
1097
|
return this;
|
|
1068
1098
|
}
|
|
1069
|
-
function set
|
|
1099
|
+
function set(key, value) {
|
|
1070
1100
|
value = toRaw(value);
|
|
1071
1101
|
const target = toRaw(this);
|
|
1072
1102
|
const { has, get } = getProto(target);
|
|
@@ -1180,41 +1210,41 @@ function createReadonlyMethod(type) {
|
|
|
1180
1210
|
function createInstrumentations() {
|
|
1181
1211
|
const mutableInstrumentations = {
|
|
1182
1212
|
get(key) {
|
|
1183
|
-
return get
|
|
1213
|
+
return get(this, key);
|
|
1184
1214
|
},
|
|
1185
1215
|
get size() {
|
|
1186
1216
|
return size(this);
|
|
1187
1217
|
},
|
|
1188
|
-
has
|
|
1218
|
+
has,
|
|
1189
1219
|
add,
|
|
1190
|
-
set
|
|
1220
|
+
set,
|
|
1191
1221
|
delete: deleteEntry,
|
|
1192
1222
|
clear,
|
|
1193
1223
|
forEach: createForEach(false, false)
|
|
1194
1224
|
};
|
|
1195
1225
|
const shallowInstrumentations = {
|
|
1196
1226
|
get(key) {
|
|
1197
|
-
return get
|
|
1227
|
+
return get(this, key, false, true);
|
|
1198
1228
|
},
|
|
1199
1229
|
get size() {
|
|
1200
1230
|
return size(this);
|
|
1201
1231
|
},
|
|
1202
|
-
has
|
|
1232
|
+
has,
|
|
1203
1233
|
add,
|
|
1204
|
-
set
|
|
1234
|
+
set,
|
|
1205
1235
|
delete: deleteEntry,
|
|
1206
1236
|
clear,
|
|
1207
1237
|
forEach: createForEach(false, true)
|
|
1208
1238
|
};
|
|
1209
1239
|
const readonlyInstrumentations = {
|
|
1210
1240
|
get(key) {
|
|
1211
|
-
return get
|
|
1241
|
+
return get(this, key, true);
|
|
1212
1242
|
},
|
|
1213
1243
|
get size() {
|
|
1214
1244
|
return size(this, true);
|
|
1215
1245
|
},
|
|
1216
1246
|
has(key) {
|
|
1217
|
-
return has
|
|
1247
|
+
return has.call(this, key, true);
|
|
1218
1248
|
},
|
|
1219
1249
|
add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
|
|
1220
1250
|
set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
|
|
@@ -1224,13 +1254,13 @@ function createInstrumentations() {
|
|
|
1224
1254
|
};
|
|
1225
1255
|
const shallowReadonlyInstrumentations = {
|
|
1226
1256
|
get(key) {
|
|
1227
|
-
return get
|
|
1257
|
+
return get(this, key, true, true);
|
|
1228
1258
|
},
|
|
1229
1259
|
get size() {
|
|
1230
1260
|
return size(this, true);
|
|
1231
1261
|
},
|
|
1232
1262
|
has(key) {
|
|
1233
|
-
return has
|
|
1263
|
+
return has.call(this, key, true);
|
|
1234
1264
|
},
|
|
1235
1265
|
add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
|
|
1236
1266
|
set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
|
|
@@ -1424,9 +1454,10 @@ function trackRefValue(ref) {
|
|
|
1424
1454
|
}
|
|
1425
1455
|
function triggerRefValue(ref, newVal) {
|
|
1426
1456
|
ref = toRaw(ref);
|
|
1427
|
-
|
|
1457
|
+
const dep = ref.dep;
|
|
1458
|
+
if (dep) {
|
|
1428
1459
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
1429
|
-
triggerEffects(
|
|
1460
|
+
triggerEffects(dep, {
|
|
1430
1461
|
target: ref,
|
|
1431
1462
|
type: "set" /* TriggerOpTypes.SET */,
|
|
1432
1463
|
key: 'value',
|
|
@@ -1434,7 +1465,7 @@ function triggerRefValue(ref, newVal) {
|
|
|
1434
1465
|
});
|
|
1435
1466
|
}
|
|
1436
1467
|
else {
|
|
1437
|
-
triggerEffects(
|
|
1468
|
+
triggerEffects(dep);
|
|
1438
1469
|
}
|
|
1439
1470
|
}
|
|
1440
1471
|
}
|
|
@@ -1541,6 +1572,9 @@ class ObjectRefImpl {
|
|
|
1541
1572
|
set value(newVal) {
|
|
1542
1573
|
this._object[this._key] = newVal;
|
|
1543
1574
|
}
|
|
1575
|
+
get dep() {
|
|
1576
|
+
return getDepFromReactive(toRaw(this._object), this._key);
|
|
1577
|
+
}
|
|
1544
1578
|
}
|
|
1545
1579
|
function toRef(object, key, defaultValue) {
|
|
1546
1580
|
const val = object[key];
|
|
@@ -1582,7 +1616,7 @@ class ComputedRefImpl {
|
|
|
1582
1616
|
}
|
|
1583
1617
|
}
|
|
1584
1618
|
_a = "__v_isReadonly" /* ReactiveFlags.IS_READONLY */;
|
|
1585
|
-
function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
1619
|
+
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
1586
1620
|
let getter;
|
|
1587
1621
|
let setter;
|
|
1588
1622
|
const onlyGetter = isFunction(getterOrOptions);
|
|
@@ -1613,7 +1647,7 @@ function pushWarningContext(vnode) {
|
|
|
1613
1647
|
function popWarningContext() {
|
|
1614
1648
|
stack.pop();
|
|
1615
1649
|
}
|
|
1616
|
-
function warn
|
|
1650
|
+
function warn(msg, ...args) {
|
|
1617
1651
|
if (!(process.env.NODE_ENV !== 'production'))
|
|
1618
1652
|
return;
|
|
1619
1653
|
// avoid props formatting or warn handler tracking deps that might be mutated
|
|
@@ -1721,6 +1755,22 @@ function formatProp(key, value, raw) {
|
|
|
1721
1755
|
return raw ? value : [`${key}=`, value];
|
|
1722
1756
|
}
|
|
1723
1757
|
}
|
|
1758
|
+
/**
|
|
1759
|
+
* @internal
|
|
1760
|
+
*/
|
|
1761
|
+
function assertNumber(val, type) {
|
|
1762
|
+
if (!(process.env.NODE_ENV !== 'production'))
|
|
1763
|
+
return;
|
|
1764
|
+
if (val === undefined) {
|
|
1765
|
+
return;
|
|
1766
|
+
}
|
|
1767
|
+
else if (typeof val !== 'number') {
|
|
1768
|
+
warn(`${type} is not a valid number - ` + `got ${JSON.stringify(val)}.`);
|
|
1769
|
+
}
|
|
1770
|
+
else if (isNaN(val)) {
|
|
1771
|
+
warn(`${type} is NaN - ` + 'the duration expression might be incorrect.');
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1724
1774
|
|
|
1725
1775
|
const ErrorTypeStrings = {
|
|
1726
1776
|
["sp" /* LifecycleHooks.SERVER_PREFETCH */]: 'serverPrefetch hook',
|
|
@@ -1814,7 +1864,7 @@ function logError(err, type, contextVNode, throwInDev = true) {
|
|
|
1814
1864
|
if (contextVNode) {
|
|
1815
1865
|
pushWarningContext(contextVNode);
|
|
1816
1866
|
}
|
|
1817
|
-
warn
|
|
1867
|
+
warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
1818
1868
|
if (contextVNode) {
|
|
1819
1869
|
popWarningContext();
|
|
1820
1870
|
}
|
|
@@ -2016,7 +2066,7 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
2016
2066
|
if (count > RECURSION_LIMIT) {
|
|
2017
2067
|
const instance = fn.ownerInstance;
|
|
2018
2068
|
const componentName = instance && getComponentName(instance.type);
|
|
2019
|
-
warn
|
|
2069
|
+
warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +
|
|
2020
2070
|
`This means you have a reactive effect that is mutating its own ` +
|
|
2021
2071
|
`dependencies and thus recursively triggering itself. Possible sources ` +
|
|
2022
2072
|
`include component template, render function, updated hook or ` +
|
|
@@ -2167,7 +2217,7 @@ function tryWrap(fn) {
|
|
|
2167
2217
|
let devtools;
|
|
2168
2218
|
let buffer = [];
|
|
2169
2219
|
let devtoolsNotInstalled = false;
|
|
2170
|
-
function emit(event, ...args) {
|
|
2220
|
+
function emit$2(event, ...args) {
|
|
2171
2221
|
if (devtools) {
|
|
2172
2222
|
devtools.emit(event, ...args);
|
|
2173
2223
|
}
|
|
@@ -2214,7 +2264,7 @@ function setDevtoolsHook(hook, target) {
|
|
|
2214
2264
|
}
|
|
2215
2265
|
}
|
|
2216
2266
|
function devtoolsInitApp(app, version) {
|
|
2217
|
-
emit("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
|
|
2267
|
+
emit$2("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
|
|
2218
2268
|
Fragment,
|
|
2219
2269
|
Text,
|
|
2220
2270
|
Comment,
|
|
@@ -2222,7 +2272,7 @@ function devtoolsInitApp(app, version) {
|
|
|
2222
2272
|
});
|
|
2223
2273
|
}
|
|
2224
2274
|
function devtoolsUnmountApp(app) {
|
|
2225
|
-
emit("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
|
|
2275
|
+
emit$2("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
|
|
2226
2276
|
}
|
|
2227
2277
|
const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* DevtoolsHooks.COMPONENT_ADDED */);
|
|
2228
2278
|
const devtoolsComponentUpdated =
|
|
@@ -2238,21 +2288,21 @@ const devtoolsComponentRemoved = (component) => {
|
|
|
2238
2288
|
};
|
|
2239
2289
|
function createDevtoolsComponentHook(hook) {
|
|
2240
2290
|
return (component) => {
|
|
2241
|
-
emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
|
|
2291
|
+
emit$2(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
|
|
2242
2292
|
};
|
|
2243
2293
|
}
|
|
2244
2294
|
const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* DevtoolsHooks.PERFORMANCE_START */);
|
|
2245
2295
|
const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* DevtoolsHooks.PERFORMANCE_END */);
|
|
2246
2296
|
function createDevtoolsPerformanceHook(hook) {
|
|
2247
2297
|
return (component, type, time) => {
|
|
2248
|
-
emit(hook, component.appContext.app, component.uid, component, type, time);
|
|
2298
|
+
emit$2(hook, component.appContext.app, component.uid, component, type, time);
|
|
2249
2299
|
};
|
|
2250
2300
|
}
|
|
2251
2301
|
function devtoolsComponentEmit(component, event, params) {
|
|
2252
|
-
emit("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
2302
|
+
emit$2("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
2253
2303
|
}
|
|
2254
2304
|
|
|
2255
|
-
const deprecationData = {
|
|
2305
|
+
const deprecationData$1 = {
|
|
2256
2306
|
["GLOBAL_MOUNT" /* DeprecationTypes.GLOBAL_MOUNT */]: {
|
|
2257
2307
|
message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
|
|
2258
2308
|
`option have been removed. Use createApp(RootComponent).mount() instead.`,
|
|
@@ -2516,7 +2566,7 @@ const deprecationData = {
|
|
|
2516
2566
|
};
|
|
2517
2567
|
const instanceWarned = Object.create(null);
|
|
2518
2568
|
const warnCount = Object.create(null);
|
|
2519
|
-
function warnDeprecation(key, instance, ...args) {
|
|
2569
|
+
function warnDeprecation$1(key, instance, ...args) {
|
|
2520
2570
|
if (!(process.env.NODE_ENV !== 'production')) {
|
|
2521
2571
|
return;
|
|
2522
2572
|
}
|
|
@@ -2540,13 +2590,13 @@ function warnDeprecation(key, instance, ...args) {
|
|
|
2540
2590
|
// same warning, but different component. skip the long message and just
|
|
2541
2591
|
// log the key and count.
|
|
2542
2592
|
if (dupKey in warnCount) {
|
|
2543
|
-
warn
|
|
2593
|
+
warn(`(deprecation ${key}) (${++warnCount[dupKey] + 1})`);
|
|
2544
2594
|
return;
|
|
2545
2595
|
}
|
|
2546
2596
|
warnCount[dupKey] = 0;
|
|
2547
|
-
const { message, link } = deprecationData[key];
|
|
2548
|
-
warn
|
|
2549
|
-
if (!isCompatEnabled(key, instance, true)) {
|
|
2597
|
+
const { message, link } = deprecationData$1[key];
|
|
2598
|
+
warn(`(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`);
|
|
2599
|
+
if (!isCompatEnabled$1(key, instance, true)) {
|
|
2550
2600
|
console.error(`^ The above deprecation's compat behavior is disabled and will likely ` +
|
|
2551
2601
|
`lead to runtime errors.`);
|
|
2552
2602
|
}
|
|
@@ -2554,7 +2604,7 @@ function warnDeprecation(key, instance, ...args) {
|
|
|
2554
2604
|
const globalCompatConfig = {
|
|
2555
2605
|
MODE: 2
|
|
2556
2606
|
};
|
|
2557
|
-
function configureCompat(config) {
|
|
2607
|
+
function configureCompat$1(config) {
|
|
2558
2608
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
2559
2609
|
validateCompatConfig(config);
|
|
2560
2610
|
}
|
|
@@ -2570,24 +2620,24 @@ function validateCompatConfig(config, instance) {
|
|
|
2570
2620
|
seenConfigObjects.add(config);
|
|
2571
2621
|
for (const key of Object.keys(config)) {
|
|
2572
2622
|
if (key !== 'MODE' &&
|
|
2573
|
-
!(key in deprecationData) &&
|
|
2623
|
+
!(key in deprecationData$1) &&
|
|
2574
2624
|
!(key in warnedInvalidKeys)) {
|
|
2575
2625
|
if (key.startsWith('COMPILER_')) {
|
|
2576
2626
|
if (isRuntimeOnly()) {
|
|
2577
|
-
warn
|
|
2627
|
+
warn(`Deprecation config "${key}" is compiler-specific and you are ` +
|
|
2578
2628
|
`running a runtime-only build of Vue. This deprecation should be ` +
|
|
2579
2629
|
`configured via compiler options in your build setup instead.\n` +
|
|
2580
2630
|
`Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`);
|
|
2581
2631
|
}
|
|
2582
2632
|
}
|
|
2583
2633
|
else {
|
|
2584
|
-
warn
|
|
2634
|
+
warn(`Invalid deprecation config "${key}".`);
|
|
2585
2635
|
}
|
|
2586
2636
|
warnedInvalidKeys[key] = true;
|
|
2587
2637
|
}
|
|
2588
2638
|
}
|
|
2589
2639
|
if (instance && config["OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */] != null) {
|
|
2590
|
-
warn
|
|
2640
|
+
warn(`Deprecation config "${"OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */}" can only be configured globally.`);
|
|
2591
2641
|
}
|
|
2592
2642
|
}
|
|
2593
2643
|
function getCompatConfigForKey(key, instance) {
|
|
@@ -2597,7 +2647,7 @@ function getCompatConfigForKey(key, instance) {
|
|
|
2597
2647
|
}
|
|
2598
2648
|
return globalCompatConfig[key];
|
|
2599
2649
|
}
|
|
2600
|
-
function isCompatEnabled(key, instance, enableForBuiltIn = false) {
|
|
2650
|
+
function isCompatEnabled$1(key, instance, enableForBuiltIn = false) {
|
|
2601
2651
|
// skip compat for built-in components
|
|
2602
2652
|
if (!enableForBuiltIn && instance && instance.type.__isBuiltIn) {
|
|
2603
2653
|
return false;
|
|
@@ -2618,11 +2668,11 @@ function isCompatEnabled(key, instance, enableForBuiltIn = false) {
|
|
|
2618
2668
|
* Use this for features that are completely removed in non-compat build.
|
|
2619
2669
|
*/
|
|
2620
2670
|
function assertCompatEnabled(key, instance, ...args) {
|
|
2621
|
-
if (!isCompatEnabled(key, instance)) {
|
|
2671
|
+
if (!isCompatEnabled$1(key, instance)) {
|
|
2622
2672
|
throw new Error(`${key} compat has been disabled.`);
|
|
2623
2673
|
}
|
|
2624
2674
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
2625
|
-
warnDeprecation(key, instance, ...args);
|
|
2675
|
+
warnDeprecation$1(key, instance, ...args);
|
|
2626
2676
|
}
|
|
2627
2677
|
}
|
|
2628
2678
|
/**
|
|
@@ -2631,19 +2681,19 @@ function assertCompatEnabled(key, instance, ...args) {
|
|
|
2631
2681
|
*/
|
|
2632
2682
|
function softAssertCompatEnabled(key, instance, ...args) {
|
|
2633
2683
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
2634
|
-
warnDeprecation(key, instance, ...args);
|
|
2684
|
+
warnDeprecation$1(key, instance, ...args);
|
|
2635
2685
|
}
|
|
2636
|
-
return isCompatEnabled(key, instance);
|
|
2686
|
+
return isCompatEnabled$1(key, instance);
|
|
2637
2687
|
}
|
|
2638
2688
|
/**
|
|
2639
2689
|
* Use this for features with the same syntax but with mutually exclusive
|
|
2640
2690
|
* behavior in 2 vs 3. Only warn if compat is enabled.
|
|
2641
2691
|
* e.g. render function
|
|
2642
2692
|
*/
|
|
2643
|
-
function checkCompatEnabled(key, instance, ...args) {
|
|
2644
|
-
const enabled = isCompatEnabled(key, instance);
|
|
2693
|
+
function checkCompatEnabled$1(key, instance, ...args) {
|
|
2694
|
+
const enabled = isCompatEnabled$1(key, instance);
|
|
2645
2695
|
if ((process.env.NODE_ENV !== 'production') && enabled) {
|
|
2646
|
-
warnDeprecation(key, instance, ...args);
|
|
2696
|
+
warnDeprecation$1(key, instance, ...args);
|
|
2647
2697
|
}
|
|
2648
2698
|
return enabled;
|
|
2649
2699
|
}
|
|
@@ -2721,7 +2771,7 @@ function convertLegacyVModelProps(vnode) {
|
|
|
2721
2771
|
const { type, shapeFlag, props, dynamicProps } = vnode;
|
|
2722
2772
|
const comp = type;
|
|
2723
2773
|
if (shapeFlag & 6 /* ShapeFlags.COMPONENT */ && props && 'modelValue' in props) {
|
|
2724
|
-
if (!isCompatEnabled("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */,
|
|
2774
|
+
if (!isCompatEnabled$1("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */,
|
|
2725
2775
|
// this is a special case where we want to use the vnode component's
|
|
2726
2776
|
// compat config instead of the current rendering instance (which is the
|
|
2727
2777
|
// parent of the component that exposes v-model)
|
|
@@ -2730,7 +2780,7 @@ function convertLegacyVModelProps(vnode) {
|
|
|
2730
2780
|
}
|
|
2731
2781
|
if ((process.env.NODE_ENV !== 'production') && !warnedTypes.has(comp)) {
|
|
2732
2782
|
pushWarningContext(vnode);
|
|
2733
|
-
warnDeprecation("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, { type }, comp);
|
|
2783
|
+
warnDeprecation$1("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, { type }, comp);
|
|
2734
2784
|
popWarningContext();
|
|
2735
2785
|
warnedTypes.add(comp);
|
|
2736
2786
|
}
|
|
@@ -2763,7 +2813,7 @@ function applyModelFromMixins(model, mixins) {
|
|
|
2763
2813
|
}
|
|
2764
2814
|
}
|
|
2765
2815
|
function compatModelEmit(instance, event, args) {
|
|
2766
|
-
if (!isCompatEnabled("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, instance)) {
|
|
2816
|
+
if (!isCompatEnabled$1("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, instance)) {
|
|
2767
2817
|
return;
|
|
2768
2818
|
}
|
|
2769
2819
|
const props = instance.vnode.props;
|
|
@@ -2773,7 +2823,7 @@ function compatModelEmit(instance, event, args) {
|
|
|
2773
2823
|
}
|
|
2774
2824
|
}
|
|
2775
2825
|
|
|
2776
|
-
function emit
|
|
2826
|
+
function emit(instance, event, ...rawArgs) {
|
|
2777
2827
|
if (instance.isUnmounted)
|
|
2778
2828
|
return;
|
|
2779
2829
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
@@ -2784,7 +2834,7 @@ function emit$2(instance, event, ...rawArgs) {
|
|
|
2784
2834
|
!((event.startsWith('hook:') ||
|
|
2785
2835
|
event.startsWith(compatModelEventPrefix)))) {
|
|
2786
2836
|
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
2787
|
-
warn
|
|
2837
|
+
warn(`Component emitted event "${event}" but it is neither declared in ` +
|
|
2788
2838
|
`the emits option nor as an "${toHandlerKey(event)}" prop.`);
|
|
2789
2839
|
}
|
|
2790
2840
|
}
|
|
@@ -2793,7 +2843,7 @@ function emit$2(instance, event, ...rawArgs) {
|
|
|
2793
2843
|
if (isFunction(validator)) {
|
|
2794
2844
|
const isValid = validator(...rawArgs);
|
|
2795
2845
|
if (!isValid) {
|
|
2796
|
-
warn
|
|
2846
|
+
warn(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
2797
2847
|
}
|
|
2798
2848
|
}
|
|
2799
2849
|
}
|
|
@@ -2810,7 +2860,7 @@ function emit$2(instance, event, ...rawArgs) {
|
|
|
2810
2860
|
args = rawArgs.map(a => (isString(a) ? a.trim() : a));
|
|
2811
2861
|
}
|
|
2812
2862
|
if (number) {
|
|
2813
|
-
args = rawArgs.map(
|
|
2863
|
+
args = rawArgs.map(looseToNumber);
|
|
2814
2864
|
}
|
|
2815
2865
|
}
|
|
2816
2866
|
if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {
|
|
@@ -2819,7 +2869,7 @@ function emit$2(instance, event, ...rawArgs) {
|
|
|
2819
2869
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
2820
2870
|
const lowerCaseEvent = event.toLowerCase();
|
|
2821
2871
|
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
|
|
2822
|
-
warn
|
|
2872
|
+
warn(`Event "${lowerCaseEvent}" is emitted in component ` +
|
|
2823
2873
|
`${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` +
|
|
2824
2874
|
`Note that HTML attributes are case-insensitive and you cannot use ` +
|
|
2825
2875
|
`v-on to listen to camelCase events when using in-DOM templates. ` +
|
|
@@ -3110,13 +3160,13 @@ function renderComponentRoot(instance) {
|
|
|
3110
3160
|
}
|
|
3111
3161
|
}
|
|
3112
3162
|
if (extraAttrs.length) {
|
|
3113
|
-
warn
|
|
3163
|
+
warn(`Extraneous non-props attributes (` +
|
|
3114
3164
|
`${extraAttrs.join(', ')}) ` +
|
|
3115
3165
|
`were passed to component but could not be automatically inherited ` +
|
|
3116
3166
|
`because component renders fragment or text root nodes.`);
|
|
3117
3167
|
}
|
|
3118
3168
|
if (eventAttrs.length) {
|
|
3119
|
-
warn
|
|
3169
|
+
warn(`Extraneous non-emits event listeners (` +
|
|
3120
3170
|
`${eventAttrs.join(', ')}) ` +
|
|
3121
3171
|
`were passed to component but could not be automatically inherited ` +
|
|
3122
3172
|
`because component renders fragment or text root nodes. ` +
|
|
@@ -3126,13 +3176,13 @@ function renderComponentRoot(instance) {
|
|
|
3126
3176
|
}
|
|
3127
3177
|
}
|
|
3128
3178
|
}
|
|
3129
|
-
if (isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
|
|
3179
|
+
if (isCompatEnabled$1("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
|
|
3130
3180
|
vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ &&
|
|
3131
3181
|
root.shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 6 /* ShapeFlags.COMPONENT */)) {
|
|
3132
3182
|
const { class: cls, style } = vnode.props || {};
|
|
3133
3183
|
if (cls || style) {
|
|
3134
3184
|
if ((process.env.NODE_ENV !== 'production') && inheritAttrs === false) {
|
|
3135
|
-
warnDeprecation("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance, getComponentName(instance.type));
|
|
3185
|
+
warnDeprecation$1("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance, getComponentName(instance.type));
|
|
3136
3186
|
}
|
|
3137
3187
|
root = cloneVNode(root, {
|
|
3138
3188
|
class: cls,
|
|
@@ -3143,7 +3193,7 @@ function renderComponentRoot(instance) {
|
|
|
3143
3193
|
// inherit directives
|
|
3144
3194
|
if (vnode.dirs) {
|
|
3145
3195
|
if ((process.env.NODE_ENV !== 'production') && !isElementRoot(root)) {
|
|
3146
|
-
warn
|
|
3196
|
+
warn(`Runtime directive used on component with non-element root node. ` +
|
|
3147
3197
|
`The directives will not function as intended.`);
|
|
3148
3198
|
}
|
|
3149
3199
|
// clone before mutating since the root may be a hoisted vnode
|
|
@@ -3153,7 +3203,7 @@ function renderComponentRoot(instance) {
|
|
|
3153
3203
|
// inherit transition data
|
|
3154
3204
|
if (vnode.transition) {
|
|
3155
3205
|
if ((process.env.NODE_ENV !== 'production') && !isElementRoot(root)) {
|
|
3156
|
-
warn
|
|
3206
|
+
warn(`Component inside <Transition> renders non-element root node ` +
|
|
3157
3207
|
`that cannot be animated.`);
|
|
3158
3208
|
}
|
|
3159
3209
|
root.transition = vnode.transition;
|
|
@@ -3488,7 +3538,10 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
|
|
|
3488
3538
|
console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`);
|
|
3489
3539
|
}
|
|
3490
3540
|
const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;
|
|
3491
|
-
const timeout =
|
|
3541
|
+
const timeout = vnode.props ? toNumber(vnode.props.timeout) : undefined;
|
|
3542
|
+
if ((process.env.NODE_ENV !== 'production')) {
|
|
3543
|
+
assertNumber(timeout, `Suspense timeout`);
|
|
3544
|
+
}
|
|
3492
3545
|
const suspense = {
|
|
3493
3546
|
vnode,
|
|
3494
3547
|
parent,
|
|
@@ -3716,7 +3769,7 @@ function normalizeSuspenseSlot(s) {
|
|
|
3716
3769
|
if (isArray(s)) {
|
|
3717
3770
|
const singleChild = filterSingleRoot(s);
|
|
3718
3771
|
if ((process.env.NODE_ENV !== 'production') && !singleChild) {
|
|
3719
|
-
warn
|
|
3772
|
+
warn(`<Suspense> slots expect a single root node.`);
|
|
3720
3773
|
}
|
|
3721
3774
|
s = singleChild;
|
|
3722
3775
|
}
|
|
@@ -3754,7 +3807,7 @@ function setActiveBranch(suspense, branch) {
|
|
|
3754
3807
|
function provide(key, value) {
|
|
3755
3808
|
if (!currentInstance) {
|
|
3756
3809
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
3757
|
-
warn
|
|
3810
|
+
warn(`provide() can only be used inside setup().`);
|
|
3758
3811
|
}
|
|
3759
3812
|
}
|
|
3760
3813
|
else {
|
|
@@ -3793,11 +3846,11 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
3793
3846
|
: defaultValue;
|
|
3794
3847
|
}
|
|
3795
3848
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
3796
|
-
warn
|
|
3849
|
+
warn(`injection "${String(key)}" not found.`);
|
|
3797
3850
|
}
|
|
3798
3851
|
}
|
|
3799
3852
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
3800
|
-
warn
|
|
3853
|
+
warn(`inject() can only be used inside setup() or functional components.`);
|
|
3801
3854
|
}
|
|
3802
3855
|
}
|
|
3803
3856
|
|
|
@@ -3806,19 +3859,17 @@ function watchEffect(effect, options) {
|
|
|
3806
3859
|
return doWatch(effect, null, options);
|
|
3807
3860
|
}
|
|
3808
3861
|
function watchPostEffect(effect, options) {
|
|
3809
|
-
return doWatch(effect, null, (
|
|
3810
|
-
? Object.assign(Object.assign({}, options), { flush: 'post' }) : { flush: 'post' }));
|
|
3862
|
+
return doWatch(effect, null, (process.env.NODE_ENV !== 'production') ? Object.assign(Object.assign({}, options), { flush: 'post' }) : { flush: 'post' });
|
|
3811
3863
|
}
|
|
3812
3864
|
function watchSyncEffect(effect, options) {
|
|
3813
|
-
return doWatch(effect, null, (
|
|
3814
|
-
? Object.assign(Object.assign({}, options), { flush: 'sync' }) : { flush: 'sync' }));
|
|
3865
|
+
return doWatch(effect, null, (process.env.NODE_ENV !== 'production') ? Object.assign(Object.assign({}, options), { flush: 'sync' }) : { flush: 'sync' });
|
|
3815
3866
|
}
|
|
3816
3867
|
// initial value for watchers to trigger on undefined initial values
|
|
3817
3868
|
const INITIAL_WATCHER_VALUE = {};
|
|
3818
3869
|
// implementation
|
|
3819
3870
|
function watch(source, cb, options) {
|
|
3820
3871
|
if ((process.env.NODE_ENV !== 'production') && !isFunction(cb)) {
|
|
3821
|
-
warn
|
|
3872
|
+
warn(`\`watch(fn, options?)\` signature has been moved to a separate API. ` +
|
|
3822
3873
|
`Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` +
|
|
3823
3874
|
`supports \`watch(source, cb, options?) signature.`);
|
|
3824
3875
|
}
|
|
@@ -3827,19 +3878,20 @@ function watch(source, cb, options) {
|
|
|
3827
3878
|
function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
|
|
3828
3879
|
if ((process.env.NODE_ENV !== 'production') && !cb) {
|
|
3829
3880
|
if (immediate !== undefined) {
|
|
3830
|
-
warn
|
|
3881
|
+
warn(`watch() "immediate" option is only respected when using the ` +
|
|
3831
3882
|
`watch(source, callback, options?) signature.`);
|
|
3832
3883
|
}
|
|
3833
3884
|
if (deep !== undefined) {
|
|
3834
|
-
warn
|
|
3885
|
+
warn(`watch() "deep" option is only respected when using the ` +
|
|
3835
3886
|
`watch(source, callback, options?) signature.`);
|
|
3836
3887
|
}
|
|
3837
3888
|
}
|
|
3838
3889
|
const warnInvalidSource = (s) => {
|
|
3839
|
-
warn
|
|
3890
|
+
warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +
|
|
3840
3891
|
`a reactive object, or an array of these types.`);
|
|
3841
3892
|
};
|
|
3842
|
-
const instance = currentInstance;
|
|
3893
|
+
const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
|
|
3894
|
+
// const instance = currentInstance
|
|
3843
3895
|
let getter;
|
|
3844
3896
|
let forceTrigger = false;
|
|
3845
3897
|
let isMultiSource = false;
|
|
@@ -3897,7 +3949,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3897
3949
|
getter = () => {
|
|
3898
3950
|
const val = baseGetter();
|
|
3899
3951
|
if (isArray(val) &&
|
|
3900
|
-
checkCompatEnabled("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance)) {
|
|
3952
|
+
checkCompatEnabled$1("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance)) {
|
|
3901
3953
|
traverse(val);
|
|
3902
3954
|
}
|
|
3903
3955
|
return val;
|
|
@@ -3953,7 +4005,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3953
4005
|
? newValue.some((v, i) => hasChanged(v, oldValue[i]))
|
|
3954
4006
|
: hasChanged(newValue, oldValue)) ||
|
|
3955
4007
|
(isArray(newValue) &&
|
|
3956
|
-
isCompatEnabled("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance))) {
|
|
4008
|
+
isCompatEnabled$1("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance))) {
|
|
3957
4009
|
// cleanup before running cb again
|
|
3958
4010
|
if (cleanup) {
|
|
3959
4011
|
cleanup();
|
|
@@ -3963,7 +4015,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
3963
4015
|
// pass undefined as the old value when it's changed for the first time
|
|
3964
4016
|
oldValue === INITIAL_WATCHER_VALUE
|
|
3965
4017
|
? undefined
|
|
3966
|
-
:
|
|
4018
|
+
: isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE
|
|
3967
4019
|
? []
|
|
3968
4020
|
: oldValue,
|
|
3969
4021
|
onCleanup
|
|
@@ -4145,7 +4197,7 @@ const BaseTransitionImpl = {
|
|
|
4145
4197
|
if (c.type !== Comment) {
|
|
4146
4198
|
if ((process.env.NODE_ENV !== 'production') && hasFound) {
|
|
4147
4199
|
// warn more than one non-comment child
|
|
4148
|
-
warn
|
|
4200
|
+
warn('<transition> can only be used on a single element or component. ' +
|
|
4149
4201
|
'Use <transition-group> for lists.');
|
|
4150
4202
|
break;
|
|
4151
4203
|
}
|
|
@@ -4166,7 +4218,7 @@ const BaseTransitionImpl = {
|
|
|
4166
4218
|
mode !== 'in-out' &&
|
|
4167
4219
|
mode !== 'out-in' &&
|
|
4168
4220
|
mode !== 'default') {
|
|
4169
|
-
warn
|
|
4221
|
+
warn(`invalid <transition> mode: ${mode}`);
|
|
4170
4222
|
}
|
|
4171
4223
|
if (state.isLeaving) {
|
|
4172
4224
|
return emptyPlaceholder(child);
|
|
@@ -4477,7 +4529,7 @@ function defineAsyncComponent(source) {
|
|
|
4477
4529
|
return pendingRequest;
|
|
4478
4530
|
}
|
|
4479
4531
|
if ((process.env.NODE_ENV !== 'production') && !comp) {
|
|
4480
|
-
warn
|
|
4532
|
+
warn(`Async component loader resolved to undefined. ` +
|
|
4481
4533
|
`If you are using retry(), make sure to return its return value.`);
|
|
4482
4534
|
}
|
|
4483
4535
|
// interop module default
|
|
@@ -4672,7 +4724,7 @@ const KeepAliveImpl = {
|
|
|
4672
4724
|
}
|
|
4673
4725
|
function pruneCacheEntry(key) {
|
|
4674
4726
|
const cached = cache.get(key);
|
|
4675
|
-
if (!current || cached
|
|
4727
|
+
if (!current || !isSameVNodeType(cached, current)) {
|
|
4676
4728
|
unmount(cached);
|
|
4677
4729
|
}
|
|
4678
4730
|
else if (current) {
|
|
@@ -4704,7 +4756,7 @@ const KeepAliveImpl = {
|
|
|
4704
4756
|
cache.forEach(cached => {
|
|
4705
4757
|
const { subTree, suspense } = instance;
|
|
4706
4758
|
const vnode = getInnerChild(subTree);
|
|
4707
|
-
if (cached.type === vnode.type) {
|
|
4759
|
+
if (cached.type === vnode.type && cached.key === vnode.key) {
|
|
4708
4760
|
// current instance will be unmounted as part of keep-alive's unmount
|
|
4709
4761
|
resetShapeFlag(vnode);
|
|
4710
4762
|
// but invoke its deactivated hook here
|
|
@@ -4724,7 +4776,7 @@ const KeepAliveImpl = {
|
|
|
4724
4776
|
const rawVNode = children[0];
|
|
4725
4777
|
if (children.length > 1) {
|
|
4726
4778
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
4727
|
-
warn
|
|
4779
|
+
warn(`KeepAlive should contain exactly one component child.`);
|
|
4728
4780
|
}
|
|
4729
4781
|
current = null;
|
|
4730
4782
|
return children;
|
|
@@ -4804,7 +4856,7 @@ function matches(pattern, name) {
|
|
|
4804
4856
|
else if (isString(pattern)) {
|
|
4805
4857
|
return pattern.split(',').includes(name);
|
|
4806
4858
|
}
|
|
4807
|
-
else if (pattern
|
|
4859
|
+
else if (isRegExp(pattern)) {
|
|
4808
4860
|
return pattern.test(name);
|
|
4809
4861
|
}
|
|
4810
4862
|
/* istanbul ignore next */
|
|
@@ -4898,7 +4950,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
4898
4950
|
}
|
|
4899
4951
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
4900
4952
|
const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ''));
|
|
4901
|
-
warn
|
|
4953
|
+
warn(`${apiName} is called when there is no active component instance to be ` +
|
|
4902
4954
|
`associated with. ` +
|
|
4903
4955
|
`Lifecycle injection APIs can only be used during execution of setup().` +
|
|
4904
4956
|
(` If you are using async setup(), make sure to register lifecycle ` +
|
|
@@ -4928,18 +4980,18 @@ function getCompatChildren(instance) {
|
|
|
4928
4980
|
const root = instance.subTree;
|
|
4929
4981
|
const children = [];
|
|
4930
4982
|
if (root) {
|
|
4931
|
-
walk(root, children);
|
|
4983
|
+
walk$1(root, children);
|
|
4932
4984
|
}
|
|
4933
4985
|
return children;
|
|
4934
4986
|
}
|
|
4935
|
-
function walk(vnode, children) {
|
|
4987
|
+
function walk$1(vnode, children) {
|
|
4936
4988
|
if (vnode.component) {
|
|
4937
4989
|
children.push(vnode.component.proxy);
|
|
4938
4990
|
}
|
|
4939
4991
|
else if (vnode.shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
|
|
4940
4992
|
const vnodes = vnode.children;
|
|
4941
4993
|
for (let i = 0; i < vnodes.length; i++) {
|
|
4942
|
-
walk(vnodes[i], children);
|
|
4994
|
+
walk$1(vnodes[i], children);
|
|
4943
4995
|
}
|
|
4944
4996
|
}
|
|
4945
4997
|
}
|
|
@@ -5002,7 +5054,7 @@ return withDirectives(h(comp), [
|
|
|
5002
5054
|
*/
|
|
5003
5055
|
function validateDirectiveName(name) {
|
|
5004
5056
|
if (isBuiltInDirective(name)) {
|
|
5005
|
-
warn
|
|
5057
|
+
warn('Do not use built-in directive ids as custom directive id: ' + name);
|
|
5006
5058
|
}
|
|
5007
5059
|
}
|
|
5008
5060
|
/**
|
|
@@ -5011,7 +5063,7 @@ function validateDirectiveName(name) {
|
|
|
5011
5063
|
function withDirectives(vnode, directives) {
|
|
5012
5064
|
const internalInstance = currentRenderingInstance;
|
|
5013
5065
|
if (internalInstance === null) {
|
|
5014
|
-
(process.env.NODE_ENV !== 'production') && warn
|
|
5066
|
+
(process.env.NODE_ENV !== 'production') && warn(`withDirectives can only be used inside render functions.`);
|
|
5015
5067
|
return vnode;
|
|
5016
5068
|
}
|
|
5017
5069
|
const instance = getExposeProxy(internalInstance) ||
|
|
@@ -5100,7 +5152,7 @@ function resolveDirective(name) {
|
|
|
5100
5152
|
* v2 compat only
|
|
5101
5153
|
* @internal
|
|
5102
5154
|
*/
|
|
5103
|
-
function resolveFilter(name) {
|
|
5155
|
+
function resolveFilter$1(name) {
|
|
5104
5156
|
return resolveAsset(FILTERS, name);
|
|
5105
5157
|
}
|
|
5106
5158
|
// implementation
|
|
@@ -5133,12 +5185,12 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
|
|
|
5133
5185
|
? `\nIf this is a native custom element, make sure to exclude it from ` +
|
|
5134
5186
|
`component resolution via compilerOptions.isCustomElement.`
|
|
5135
5187
|
: ``;
|
|
5136
|
-
warn
|
|
5188
|
+
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
5137
5189
|
}
|
|
5138
5190
|
return res;
|
|
5139
5191
|
}
|
|
5140
5192
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
5141
|
-
warn
|
|
5193
|
+
warn(`resolve${capitalize(type.slice(0, -1))} ` +
|
|
5142
5194
|
`can only be used in render() or setup().`);
|
|
5143
5195
|
}
|
|
5144
5196
|
}
|
|
@@ -5164,7 +5216,7 @@ function convertLegacyRenderFn(instance) {
|
|
|
5164
5216
|
return;
|
|
5165
5217
|
}
|
|
5166
5218
|
// v2 render function, try to provide compat
|
|
5167
|
-
if (checkCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance)) {
|
|
5219
|
+
if (checkCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance)) {
|
|
5168
5220
|
const wrapped = (Component.render = function compatRender() {
|
|
5169
5221
|
// @ts-ignore
|
|
5170
5222
|
return render.call(this, compatH);
|
|
@@ -5325,8 +5377,8 @@ function convertLegacySlots(vnode) {
|
|
|
5325
5377
|
}
|
|
5326
5378
|
function defineLegacyVNodeProperties(vnode) {
|
|
5327
5379
|
/* istanbul ignore if */
|
|
5328
|
-
if (isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, currentRenderingInstance, true /* enable for built-ins */) &&
|
|
5329
|
-
isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, currentRenderingInstance, true /* enable for built-ins */)) {
|
|
5380
|
+
if (isCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, currentRenderingInstance, true /* enable for built-ins */) &&
|
|
5381
|
+
isCompatEnabled$1("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, currentRenderingInstance, true /* enable for built-ins */)) {
|
|
5330
5382
|
const context = currentRenderingInstance;
|
|
5331
5383
|
const getInstance = () => vnode.component && vnode.component.proxy;
|
|
5332
5384
|
let componentOptions;
|
|
@@ -5416,7 +5468,7 @@ function renderList(source, renderItem, cache, index) {
|
|
|
5416
5468
|
}
|
|
5417
5469
|
else if (typeof source === 'number') {
|
|
5418
5470
|
if ((process.env.NODE_ENV !== 'production') && !Number.isInteger(source)) {
|
|
5419
|
-
warn
|
|
5471
|
+
warn(`The v-for range expect an integer value but got ${source}.`);
|
|
5420
5472
|
}
|
|
5421
5473
|
ret = new Array(source);
|
|
5422
5474
|
for (let i = 0; i < source; i++) {
|
|
@@ -5493,7 +5545,7 @@ fallback, noSlotted) {
|
|
|
5493
5545
|
}
|
|
5494
5546
|
let slot = slots[name];
|
|
5495
5547
|
if ((process.env.NODE_ENV !== 'production') && slot && slot.length > 1) {
|
|
5496
|
-
warn
|
|
5548
|
+
warn(`SSR-optimized slot function detected in a non-SSR-optimized render ` +
|
|
5497
5549
|
`function. You need to mark this component with $dynamic-slots in the ` +
|
|
5498
5550
|
`parent template.`);
|
|
5499
5551
|
slot = () => [];
|
|
@@ -5546,7 +5598,7 @@ function ensureValidVNode(vnodes) {
|
|
|
5546
5598
|
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
5547
5599
|
const ret = {};
|
|
5548
5600
|
if ((process.env.NODE_ENV !== 'production') && !isObject(obj)) {
|
|
5549
|
-
warn
|
|
5601
|
+
warn(`v-on with no argument expects an object value.`);
|
|
5550
5602
|
return ret;
|
|
5551
5603
|
}
|
|
5552
5604
|
for (const key in obj) {
|
|
@@ -5707,7 +5759,7 @@ function installCompatInstanceProperties(map) {
|
|
|
5707
5759
|
},
|
|
5708
5760
|
// overrides existing accessor
|
|
5709
5761
|
$slots: i => {
|
|
5710
|
-
if (isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, i) &&
|
|
5762
|
+
if (isCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, i) &&
|
|
5711
5763
|
i.render &&
|
|
5712
5764
|
i.render._compatWrapped) {
|
|
5713
5765
|
return new Proxy(i.slots, legacySlotProxyHandlers);
|
|
@@ -5732,7 +5784,7 @@ function installCompatInstanceProperties(map) {
|
|
|
5732
5784
|
$listeners: getCompatListeners
|
|
5733
5785
|
});
|
|
5734
5786
|
/* istanbul ignore if */
|
|
5735
|
-
if (isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, null)) {
|
|
5787
|
+
if (isCompatEnabled$1("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, null)) {
|
|
5736
5788
|
extend(map, {
|
|
5737
5789
|
// needed by many libs / render fns
|
|
5738
5790
|
$vnode: i => i.vnode,
|
|
@@ -5754,14 +5806,14 @@ function installCompatInstanceProperties(map) {
|
|
|
5754
5806
|
$createElement: () => compatH,
|
|
5755
5807
|
_c: () => compatH,
|
|
5756
5808
|
_o: () => legacyMarkOnce,
|
|
5757
|
-
_n: () =>
|
|
5809
|
+
_n: () => looseToNumber,
|
|
5758
5810
|
_s: () => toDisplayString,
|
|
5759
5811
|
_l: () => renderList,
|
|
5760
5812
|
_t: i => legacyRenderSlot.bind(null, i),
|
|
5761
5813
|
_q: () => looseEqual,
|
|
5762
5814
|
_i: () => looseIndexOf,
|
|
5763
5815
|
_m: i => legacyRenderStatic.bind(null, i),
|
|
5764
|
-
_f: () => resolveFilter,
|
|
5816
|
+
_f: () => resolveFilter$1,
|
|
5765
5817
|
_k: i => legacyCheckKeyCodes.bind(null, i),
|
|
5766
5818
|
_b: () => legacyBindObjectProps,
|
|
5767
5819
|
_v: () => createTextVNode,
|
|
@@ -5908,11 +5960,11 @@ const PublicInstanceProxyHandlers = {
|
|
|
5908
5960
|
// to infinite warning loop
|
|
5909
5961
|
key.indexOf('__v') !== 0)) {
|
|
5910
5962
|
if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
|
|
5911
|
-
warn
|
|
5963
|
+
warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` +
|
|
5912
5964
|
`character ("$" or "_") and is not proxied on the render context.`);
|
|
5913
5965
|
}
|
|
5914
5966
|
else if (instance === currentRenderingInstance) {
|
|
5915
|
-
warn
|
|
5967
|
+
warn(`Property ${JSON.stringify(key)} was accessed during render ` +
|
|
5916
5968
|
`but is not defined on instance.`);
|
|
5917
5969
|
}
|
|
5918
5970
|
}
|
|
@@ -5926,7 +5978,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
5926
5978
|
else if ((process.env.NODE_ENV !== 'production') &&
|
|
5927
5979
|
setupState.__isScriptSetup &&
|
|
5928
5980
|
hasOwn(setupState, key)) {
|
|
5929
|
-
warn
|
|
5981
|
+
warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
5930
5982
|
return false;
|
|
5931
5983
|
}
|
|
5932
5984
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
@@ -5934,12 +5986,12 @@ const PublicInstanceProxyHandlers = {
|
|
|
5934
5986
|
return true;
|
|
5935
5987
|
}
|
|
5936
5988
|
else if (hasOwn(instance.props, key)) {
|
|
5937
|
-
(process.env.NODE_ENV !== 'production') && warn
|
|
5989
|
+
(process.env.NODE_ENV !== 'production') && warn(`Attempting to mutate prop "${key}". Props are readonly.`);
|
|
5938
5990
|
return false;
|
|
5939
5991
|
}
|
|
5940
5992
|
if (key[0] === '$' && key.slice(1) in instance) {
|
|
5941
5993
|
(process.env.NODE_ENV !== 'production') &&
|
|
5942
|
-
warn
|
|
5994
|
+
warn(`Attempting to mutate public property "${key}". ` +
|
|
5943
5995
|
`Properties starting with $ are reserved and readonly.`);
|
|
5944
5996
|
return false;
|
|
5945
5997
|
}
|
|
@@ -5980,7 +6032,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
5980
6032
|
};
|
|
5981
6033
|
if ((process.env.NODE_ENV !== 'production') && !false) {
|
|
5982
6034
|
PublicInstanceProxyHandlers.ownKeys = (target) => {
|
|
5983
|
-
warn
|
|
6035
|
+
warn(`Avoid app logic that relies on enumerating keys on a component instance. ` +
|
|
5984
6036
|
`The keys will be empty in production mode to avoid performance overhead.`);
|
|
5985
6037
|
return Reflect.ownKeys(target);
|
|
5986
6038
|
};
|
|
@@ -5996,7 +6048,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ extend({}, Publ
|
|
|
5996
6048
|
has(_, key) {
|
|
5997
6049
|
const has = key[0] !== '_' && !isGloballyWhitelisted(key);
|
|
5998
6050
|
if ((process.env.NODE_ENV !== 'production') && !has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
5999
|
-
warn
|
|
6051
|
+
warn(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);
|
|
6000
6052
|
}
|
|
6001
6053
|
return has;
|
|
6002
6054
|
}
|
|
@@ -6046,7 +6098,7 @@ function exposeSetupStateOnRenderContext(instance) {
|
|
|
6046
6098
|
Object.keys(toRaw(setupState)).forEach(key => {
|
|
6047
6099
|
if (!setupState.__isScriptSetup) {
|
|
6048
6100
|
if (isReservedPrefix(key[0])) {
|
|
6049
|
-
warn
|
|
6101
|
+
warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
|
|
6050
6102
|
`which are reserved prefixes for Vue internals.`);
|
|
6051
6103
|
return;
|
|
6052
6104
|
}
|
|
@@ -6065,7 +6117,7 @@ function deepMergeData(to, from) {
|
|
|
6065
6117
|
const toVal = to[key];
|
|
6066
6118
|
const fromVal = from[key];
|
|
6067
6119
|
if (key in to && isPlainObject(toVal) && isPlainObject(fromVal)) {
|
|
6068
|
-
(process.env.NODE_ENV !== 'production') && warnDeprecation("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null, key);
|
|
6120
|
+
(process.env.NODE_ENV !== 'production') && warnDeprecation$1("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null, key);
|
|
6069
6121
|
deepMergeData(toVal, fromVal);
|
|
6070
6122
|
}
|
|
6071
6123
|
else {
|
|
@@ -6079,7 +6131,7 @@ function createDuplicateChecker() {
|
|
|
6079
6131
|
const cache = Object.create(null);
|
|
6080
6132
|
return (type, key) => {
|
|
6081
6133
|
if (cache[key]) {
|
|
6082
|
-
warn
|
|
6134
|
+
warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
|
|
6083
6135
|
}
|
|
6084
6136
|
else {
|
|
6085
6137
|
cache[key] = type;
|
|
@@ -6096,7 +6148,7 @@ function applyOptions(instance) {
|
|
|
6096
6148
|
// call beforeCreate first before accessing other options since
|
|
6097
6149
|
// the hook may mutate resolved options (#2791)
|
|
6098
6150
|
if (options.beforeCreate) {
|
|
6099
|
-
callHook(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
|
|
6151
|
+
callHook$1(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
|
|
6100
6152
|
}
|
|
6101
6153
|
const {
|
|
6102
6154
|
// state
|
|
@@ -6149,24 +6201,24 @@ function applyOptions(instance) {
|
|
|
6149
6201
|
}
|
|
6150
6202
|
}
|
|
6151
6203
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
6152
|
-
warn
|
|
6204
|
+
warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` +
|
|
6153
6205
|
`Did you reference the function correctly?`);
|
|
6154
6206
|
}
|
|
6155
6207
|
}
|
|
6156
6208
|
}
|
|
6157
6209
|
if (dataOptions) {
|
|
6158
6210
|
if ((process.env.NODE_ENV !== 'production') && !isFunction(dataOptions)) {
|
|
6159
|
-
warn
|
|
6211
|
+
warn(`The data option must be a function. ` +
|
|
6160
6212
|
`Plain object usage is no longer supported.`);
|
|
6161
6213
|
}
|
|
6162
6214
|
const data = dataOptions.call(publicThis, publicThis);
|
|
6163
6215
|
if ((process.env.NODE_ENV !== 'production') && isPromise(data)) {
|
|
6164
|
-
warn
|
|
6216
|
+
warn(`data() returned a Promise - note data() cannot be async; If you ` +
|
|
6165
6217
|
`intend to perform data fetching before component renders, use ` +
|
|
6166
6218
|
`async setup() + <Suspense>.`);
|
|
6167
6219
|
}
|
|
6168
6220
|
if (!isObject(data)) {
|
|
6169
|
-
(process.env.NODE_ENV !== 'production') && warn
|
|
6221
|
+
(process.env.NODE_ENV !== 'production') && warn(`data() should return an object.`);
|
|
6170
6222
|
}
|
|
6171
6223
|
else {
|
|
6172
6224
|
instance.data = reactive(data);
|
|
@@ -6197,16 +6249,16 @@ function applyOptions(instance) {
|
|
|
6197
6249
|
? opt.get.bind(publicThis, publicThis)
|
|
6198
6250
|
: NOOP;
|
|
6199
6251
|
if ((process.env.NODE_ENV !== 'production') && get === NOOP) {
|
|
6200
|
-
warn
|
|
6252
|
+
warn(`Computed property "${key}" has no getter.`);
|
|
6201
6253
|
}
|
|
6202
6254
|
const set = !isFunction(opt) && isFunction(opt.set)
|
|
6203
6255
|
? opt.set.bind(publicThis)
|
|
6204
6256
|
: (process.env.NODE_ENV !== 'production')
|
|
6205
6257
|
? () => {
|
|
6206
|
-
warn
|
|
6258
|
+
warn(`Write operation failed: computed property "${key}" is readonly.`);
|
|
6207
6259
|
}
|
|
6208
6260
|
: NOOP;
|
|
6209
|
-
const c = computed
|
|
6261
|
+
const c = computed({
|
|
6210
6262
|
get,
|
|
6211
6263
|
set
|
|
6212
6264
|
});
|
|
@@ -6235,7 +6287,7 @@ function applyOptions(instance) {
|
|
|
6235
6287
|
});
|
|
6236
6288
|
}
|
|
6237
6289
|
if (created) {
|
|
6238
|
-
callHook(created, instance, "c" /* LifecycleHooks.CREATED */);
|
|
6290
|
+
callHook$1(created, instance, "c" /* LifecycleHooks.CREATED */);
|
|
6239
6291
|
}
|
|
6240
6292
|
function registerLifecycleHook(register, hook) {
|
|
6241
6293
|
if (isArray(hook)) {
|
|
@@ -6295,7 +6347,7 @@ function applyOptions(instance) {
|
|
|
6295
6347
|
if (directives)
|
|
6296
6348
|
instance.directives = directives;
|
|
6297
6349
|
if (filters &&
|
|
6298
|
-
isCompatEnabled("FILTERS" /* DeprecationTypes.FILTERS */, instance)) {
|
|
6350
|
+
isCompatEnabled$1("FILTERS" /* DeprecationTypes.FILTERS */, instance)) {
|
|
6299
6351
|
instance.filters = filters;
|
|
6300
6352
|
}
|
|
6301
6353
|
}
|
|
@@ -6329,7 +6381,7 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP,
|
|
|
6329
6381
|
}
|
|
6330
6382
|
else {
|
|
6331
6383
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
6332
|
-
warn
|
|
6384
|
+
warn(`injected property "${key}" is a ref and will be auto-unwrapped ` +
|
|
6333
6385
|
`and no longer needs \`.value\` in the next minor release. ` +
|
|
6334
6386
|
`To opt-in to the new behavior now, ` +
|
|
6335
6387
|
`set \`app.config.unwrapInjectedRef = true\` (this config is ` +
|
|
@@ -6346,7 +6398,7 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP,
|
|
|
6346
6398
|
}
|
|
6347
6399
|
}
|
|
6348
6400
|
}
|
|
6349
|
-
function callHook(hook, instance, type) {
|
|
6401
|
+
function callHook$1(hook, instance, type) {
|
|
6350
6402
|
callWithAsyncErrorHandling(isArray(hook)
|
|
6351
6403
|
? hook.map(h => h.bind(instance.proxy))
|
|
6352
6404
|
: hook.bind(instance.proxy), instance, type);
|
|
@@ -6361,7 +6413,7 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
6361
6413
|
watch(getter, handler);
|
|
6362
6414
|
}
|
|
6363
6415
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
6364
|
-
warn
|
|
6416
|
+
warn(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
6365
6417
|
}
|
|
6366
6418
|
}
|
|
6367
6419
|
else if (isFunction(raw)) {
|
|
@@ -6379,12 +6431,12 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
6379
6431
|
watch(getter, handler, raw);
|
|
6380
6432
|
}
|
|
6381
6433
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
6382
|
-
warn
|
|
6434
|
+
warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
6383
6435
|
}
|
|
6384
6436
|
}
|
|
6385
6437
|
}
|
|
6386
6438
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
6387
|
-
warn
|
|
6439
|
+
warn(`Invalid watch option: "${key}"`, raw);
|
|
6388
6440
|
}
|
|
6389
6441
|
}
|
|
6390
6442
|
/**
|
|
@@ -6402,7 +6454,7 @@ function resolveMergedOptions(instance) {
|
|
|
6402
6454
|
resolved = cached;
|
|
6403
6455
|
}
|
|
6404
6456
|
else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
6405
|
-
if (isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, instance)) {
|
|
6457
|
+
if (isCompatEnabled$1("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, instance)) {
|
|
6406
6458
|
resolved = extend({}, base);
|
|
6407
6459
|
resolved.parent = instance.parent && instance.parent.proxy;
|
|
6408
6460
|
resolved.propsData = instance.vnode.props;
|
|
@@ -6437,7 +6489,7 @@ function mergeOptions(to, from, strats, asMixin = false) {
|
|
|
6437
6489
|
for (const key in from) {
|
|
6438
6490
|
if (asMixin && key === 'expose') {
|
|
6439
6491
|
(process.env.NODE_ENV !== 'production') &&
|
|
6440
|
-
warn
|
|
6492
|
+
warn(`"expose" option is ignored when declared in mixins or extends. ` +
|
|
6441
6493
|
`It should only be declared in the base component itself.`);
|
|
6442
6494
|
}
|
|
6443
6495
|
else {
|
|
@@ -6455,20 +6507,20 @@ const internalOptionMergeStrats = {
|
|
|
6455
6507
|
methods: mergeObjectOptions,
|
|
6456
6508
|
computed: mergeObjectOptions,
|
|
6457
6509
|
// lifecycle
|
|
6458
|
-
beforeCreate: mergeAsArray,
|
|
6459
|
-
created: mergeAsArray,
|
|
6460
|
-
beforeMount: mergeAsArray,
|
|
6461
|
-
mounted: mergeAsArray,
|
|
6462
|
-
beforeUpdate: mergeAsArray,
|
|
6463
|
-
updated: mergeAsArray,
|
|
6464
|
-
beforeDestroy: mergeAsArray,
|
|
6465
|
-
beforeUnmount: mergeAsArray,
|
|
6466
|
-
destroyed: mergeAsArray,
|
|
6467
|
-
unmounted: mergeAsArray,
|
|
6468
|
-
activated: mergeAsArray,
|
|
6469
|
-
deactivated: mergeAsArray,
|
|
6470
|
-
errorCaptured: mergeAsArray,
|
|
6471
|
-
serverPrefetch: mergeAsArray,
|
|
6510
|
+
beforeCreate: mergeAsArray$1,
|
|
6511
|
+
created: mergeAsArray$1,
|
|
6512
|
+
beforeMount: mergeAsArray$1,
|
|
6513
|
+
mounted: mergeAsArray$1,
|
|
6514
|
+
beforeUpdate: mergeAsArray$1,
|
|
6515
|
+
updated: mergeAsArray$1,
|
|
6516
|
+
beforeDestroy: mergeAsArray$1,
|
|
6517
|
+
beforeUnmount: mergeAsArray$1,
|
|
6518
|
+
destroyed: mergeAsArray$1,
|
|
6519
|
+
unmounted: mergeAsArray$1,
|
|
6520
|
+
activated: mergeAsArray$1,
|
|
6521
|
+
deactivated: mergeAsArray$1,
|
|
6522
|
+
errorCaptured: mergeAsArray$1,
|
|
6523
|
+
serverPrefetch: mergeAsArray$1,
|
|
6472
6524
|
// assets
|
|
6473
6525
|
components: mergeObjectOptions,
|
|
6474
6526
|
directives: mergeObjectOptions,
|
|
@@ -6489,7 +6541,7 @@ function mergeDataFn(to, from) {
|
|
|
6489
6541
|
return from;
|
|
6490
6542
|
}
|
|
6491
6543
|
return function mergedDataFn() {
|
|
6492
|
-
return (isCompatEnabled("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null)
|
|
6544
|
+
return (isCompatEnabled$1("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null)
|
|
6493
6545
|
? deepMergeData
|
|
6494
6546
|
: extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
|
|
6495
6547
|
};
|
|
@@ -6507,7 +6559,7 @@ function normalizeInject(raw) {
|
|
|
6507
6559
|
}
|
|
6508
6560
|
return raw;
|
|
6509
6561
|
}
|
|
6510
|
-
function mergeAsArray(to, from) {
|
|
6562
|
+
function mergeAsArray$1(to, from) {
|
|
6511
6563
|
return to ? [...new Set([].concat(to, from))] : from;
|
|
6512
6564
|
}
|
|
6513
6565
|
function mergeObjectOptions(to, from) {
|
|
@@ -6520,7 +6572,7 @@ function mergeWatchOptions(to, from) {
|
|
|
6520
6572
|
return to;
|
|
6521
6573
|
const merged = extend(Object.create(null), to);
|
|
6522
6574
|
for (const key in from) {
|
|
6523
|
-
merged[key] = mergeAsArray(to[key], from[key]);
|
|
6575
|
+
merged[key] = mergeAsArray$1(to[key], from[key]);
|
|
6524
6576
|
}
|
|
6525
6577
|
return merged;
|
|
6526
6578
|
}
|
|
@@ -6529,7 +6581,7 @@ function createPropsDefaultThis(instance, rawProps, propKey) {
|
|
|
6529
6581
|
return new Proxy({}, {
|
|
6530
6582
|
get(_, key) {
|
|
6531
6583
|
(process.env.NODE_ENV !== 'production') &&
|
|
6532
|
-
warnDeprecation("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, null, propKey);
|
|
6584
|
+
warnDeprecation$1("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, null, propKey);
|
|
6533
6585
|
// $options
|
|
6534
6586
|
if (key === '$options') {
|
|
6535
6587
|
return resolveMergedOptions(instance);
|
|
@@ -6559,11 +6611,11 @@ function shouldSkipAttr(key, instance) {
|
|
|
6559
6611
|
return true;
|
|
6560
6612
|
}
|
|
6561
6613
|
if ((key === 'class' || key === 'style') &&
|
|
6562
|
-
isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance)) {
|
|
6614
|
+
isCompatEnabled$1("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance)) {
|
|
6563
6615
|
return true;
|
|
6564
6616
|
}
|
|
6565
6617
|
if (isOn(key) &&
|
|
6566
|
-
isCompatEnabled("INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */, instance)) {
|
|
6618
|
+
isCompatEnabled$1("INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */, instance)) {
|
|
6567
6619
|
return true;
|
|
6568
6620
|
}
|
|
6569
6621
|
// vue-router
|
|
@@ -6791,7 +6843,7 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
|
6791
6843
|
}
|
|
6792
6844
|
else {
|
|
6793
6845
|
setCurrentInstance(instance);
|
|
6794
|
-
value = propsDefaults[key] = defaultValue.call(isCompatEnabled("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, instance)
|
|
6846
|
+
value = propsDefaults[key] = defaultValue.call(isCompatEnabled$1("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, instance)
|
|
6795
6847
|
? createPropsDefaultThis(instance, props, key)
|
|
6796
6848
|
: null, props);
|
|
6797
6849
|
unsetCurrentInstance();
|
|
@@ -6855,7 +6907,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
6855
6907
|
if (isArray(raw)) {
|
|
6856
6908
|
for (let i = 0; i < raw.length; i++) {
|
|
6857
6909
|
if ((process.env.NODE_ENV !== 'production') && !isString(raw[i])) {
|
|
6858
|
-
warn
|
|
6910
|
+
warn(`props must be strings when using array syntax.`, raw[i]);
|
|
6859
6911
|
}
|
|
6860
6912
|
const normalizedKey = camelize(raw[i]);
|
|
6861
6913
|
if (validatePropName(normalizedKey)) {
|
|
@@ -6865,7 +6917,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
6865
6917
|
}
|
|
6866
6918
|
else if (raw) {
|
|
6867
6919
|
if ((process.env.NODE_ENV !== 'production') && !isObject(raw)) {
|
|
6868
|
-
warn
|
|
6920
|
+
warn(`invalid props options`, raw);
|
|
6869
6921
|
}
|
|
6870
6922
|
for (const key in raw) {
|
|
6871
6923
|
const normalizedKey = camelize(key);
|
|
@@ -6898,15 +6950,15 @@ function validatePropName(key) {
|
|
|
6898
6950
|
return true;
|
|
6899
6951
|
}
|
|
6900
6952
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
6901
|
-
warn
|
|
6953
|
+
warn(`Invalid prop name: "${key}" is a reserved property.`);
|
|
6902
6954
|
}
|
|
6903
6955
|
return false;
|
|
6904
6956
|
}
|
|
6905
6957
|
// use function string name to check type constructors
|
|
6906
6958
|
// so that it works across vms / iframes.
|
|
6907
6959
|
function getType(ctor) {
|
|
6908
|
-
const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
|
|
6909
|
-
return match ? match[
|
|
6960
|
+
const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
|
|
6961
|
+
return match ? match[2] : ctor === null ? 'null' : '';
|
|
6910
6962
|
}
|
|
6911
6963
|
function isSameType(a, b) {
|
|
6912
6964
|
return getType(a) === getType(b);
|
|
@@ -6940,7 +6992,7 @@ function validateProp(name, value, prop, isAbsent) {
|
|
|
6940
6992
|
const { type, required, validator } = prop;
|
|
6941
6993
|
// required!
|
|
6942
6994
|
if (required && isAbsent) {
|
|
6943
|
-
warn
|
|
6995
|
+
warn('Missing required prop: "' + name + '"');
|
|
6944
6996
|
return;
|
|
6945
6997
|
}
|
|
6946
6998
|
// missing but optional
|
|
@@ -6959,13 +7011,13 @@ function validateProp(name, value, prop, isAbsent) {
|
|
|
6959
7011
|
isValid = valid;
|
|
6960
7012
|
}
|
|
6961
7013
|
if (!isValid) {
|
|
6962
|
-
warn
|
|
7014
|
+
warn(getInvalidTypeMessage(name, value, expectedTypes));
|
|
6963
7015
|
return;
|
|
6964
7016
|
}
|
|
6965
7017
|
}
|
|
6966
7018
|
// custom validator
|
|
6967
7019
|
if (validator && !validator(value)) {
|
|
6968
|
-
warn
|
|
7020
|
+
warn('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
6969
7021
|
}
|
|
6970
7022
|
}
|
|
6971
7023
|
const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt');
|
|
@@ -7062,7 +7114,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
|
|
|
7062
7114
|
}
|
|
7063
7115
|
const normalized = withCtx((...args) => {
|
|
7064
7116
|
if ((process.env.NODE_ENV !== 'production') && currentInstance) {
|
|
7065
|
-
warn
|
|
7117
|
+
warn(`Slot "${key}" invoked outside of the render function: ` +
|
|
7066
7118
|
`this will not track dependencies used in the slot. ` +
|
|
7067
7119
|
`Invoke the slot function inside the render function instead.`);
|
|
7068
7120
|
}
|
|
@@ -7082,8 +7134,8 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
|
7082
7134
|
}
|
|
7083
7135
|
else if (value != null) {
|
|
7084
7136
|
if ((process.env.NODE_ENV !== 'production') &&
|
|
7085
|
-
!(isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
|
|
7086
|
-
warn
|
|
7137
|
+
!(isCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
|
|
7138
|
+
warn(`Non-function value encountered for slot "${key}". ` +
|
|
7087
7139
|
`Prefer function slots for better performance.`);
|
|
7088
7140
|
}
|
|
7089
7141
|
const normalized = normalizeSlotValue(value);
|
|
@@ -7094,8 +7146,8 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
|
7094
7146
|
const normalizeVNodeSlots = (instance, children) => {
|
|
7095
7147
|
if ((process.env.NODE_ENV !== 'production') &&
|
|
7096
7148
|
!isKeepAlive(instance.vnode) &&
|
|
7097
|
-
!(isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
|
|
7098
|
-
warn
|
|
7149
|
+
!(isCompatEnabled$1("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
|
|
7150
|
+
warn(`Non-function value encountered for default slot. ` +
|
|
7099
7151
|
`Prefer function slots for better performance.`);
|
|
7100
7152
|
}
|
|
7101
7153
|
const normalized = normalizeSlotValue(children);
|
|
@@ -7193,7 +7245,7 @@ function installLegacyConfigWarnings(config) {
|
|
|
7193
7245
|
},
|
|
7194
7246
|
set(newVal) {
|
|
7195
7247
|
if (!isCopyingConfig) {
|
|
7196
|
-
warnDeprecation(legacyConfigOptions[key], null);
|
|
7248
|
+
warnDeprecation$1(legacyConfigOptions[key], null);
|
|
7197
7249
|
}
|
|
7198
7250
|
val = newVal;
|
|
7199
7251
|
}
|
|
@@ -7219,7 +7271,7 @@ let isCopyingConfig = false;
|
|
|
7219
7271
|
let singletonApp;
|
|
7220
7272
|
let singletonCtor;
|
|
7221
7273
|
// Legacy global Vue constructor
|
|
7222
|
-
function createCompatVue(createApp, createSingletonApp) {
|
|
7274
|
+
function createCompatVue$1(createApp, createSingletonApp) {
|
|
7223
7275
|
singletonApp = createSingletonApp({});
|
|
7224
7276
|
const Vue = (singletonCtor = function Vue(options = {}) {
|
|
7225
7277
|
return createCompatApp(options, Vue);
|
|
@@ -7244,7 +7296,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
7244
7296
|
return vm;
|
|
7245
7297
|
}
|
|
7246
7298
|
}
|
|
7247
|
-
Vue.version = `2.6.14-compat:${"3.2.
|
|
7299
|
+
Vue.version = `2.6.14-compat:${"3.2.46"}`;
|
|
7248
7300
|
Vue.config = singletonApp.config;
|
|
7249
7301
|
Vue.use = (p, ...options) => {
|
|
7250
7302
|
if (p && isFunction(p.install)) {
|
|
@@ -7346,7 +7398,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
7346
7398
|
});
|
|
7347
7399
|
// internal utils - these are technically internal but some plugins use it.
|
|
7348
7400
|
const util = {
|
|
7349
|
-
warn: (process.env.NODE_ENV !== 'production') ? warn
|
|
7401
|
+
warn: (process.env.NODE_ENV !== 'production') ? warn : NOOP,
|
|
7350
7402
|
extend,
|
|
7351
7403
|
mergeOptions: (parent, child, vm) => mergeOptions(parent, child, vm ? undefined : internalOptionMergeStrats),
|
|
7352
7404
|
defineReactive
|
|
@@ -7357,7 +7409,7 @@ function createCompatVue(createApp, createSingletonApp) {
|
|
|
7357
7409
|
return util;
|
|
7358
7410
|
}
|
|
7359
7411
|
});
|
|
7360
|
-
Vue.configureCompat = configureCompat;
|
|
7412
|
+
Vue.configureCompat = configureCompat$1;
|
|
7361
7413
|
return Vue;
|
|
7362
7414
|
}
|
|
7363
7415
|
function installAppCompatProperties(app, context, render) {
|
|
@@ -7382,7 +7434,7 @@ function installFilterMethod(app, context) {
|
|
|
7382
7434
|
return context.filters[name];
|
|
7383
7435
|
}
|
|
7384
7436
|
if ((process.env.NODE_ENV !== 'production') && context.filters[name]) {
|
|
7385
|
-
warn
|
|
7437
|
+
warn(`Filter "${name}" has already been registered.`);
|
|
7386
7438
|
}
|
|
7387
7439
|
context.filters[name] = filter;
|
|
7388
7440
|
return app;
|
|
@@ -7394,7 +7446,7 @@ function installLegacyAPIs(app) {
|
|
|
7394
7446
|
// so that app.use() can work with legacy plugins that extend prototypes
|
|
7395
7447
|
prototype: {
|
|
7396
7448
|
get() {
|
|
7397
|
-
(process.env.NODE_ENV !== 'production') && warnDeprecation("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7449
|
+
(process.env.NODE_ENV !== 'production') && warnDeprecation$1("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7398
7450
|
return app.config.globalProperties;
|
|
7399
7451
|
}
|
|
7400
7452
|
},
|
|
@@ -7431,7 +7483,7 @@ function applySingletonAppMutations(app) {
|
|
|
7431
7483
|
app.config[key] = isObject(val) ? Object.create(val) : val;
|
|
7432
7484
|
// compat for runtime ignoredElements -> isCustomElement
|
|
7433
7485
|
if (key === 'ignoredElements' &&
|
|
7434
|
-
isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */, null) &&
|
|
7486
|
+
isCompatEnabled$1("CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */, null) &&
|
|
7435
7487
|
!isRuntimeOnly() &&
|
|
7436
7488
|
isArray(val)) {
|
|
7437
7489
|
app.config.compilerOptions.isCustomElement = tag => {
|
|
@@ -7444,7 +7496,7 @@ function applySingletonAppMutations(app) {
|
|
|
7444
7496
|
}
|
|
7445
7497
|
function applySingletonPrototype(app, Ctor) {
|
|
7446
7498
|
// copy prototype augmentations as config.globalProperties
|
|
7447
|
-
const enabled = isCompatEnabled("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7499
|
+
const enabled = isCompatEnabled$1("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7448
7500
|
if (enabled) {
|
|
7449
7501
|
app.config.globalProperties = Object.create(Ctor.prototype);
|
|
7450
7502
|
}
|
|
@@ -7459,7 +7511,7 @@ function applySingletonPrototype(app, Ctor) {
|
|
|
7459
7511
|
}
|
|
7460
7512
|
}
|
|
7461
7513
|
if ((process.env.NODE_ENV !== 'production') && hasPrototypeAugmentations) {
|
|
7462
|
-
warnDeprecation("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7514
|
+
warnDeprecation$1("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
|
|
7463
7515
|
}
|
|
7464
7516
|
}
|
|
7465
7517
|
function installCompatMount(app, context, render) {
|
|
@@ -7493,7 +7545,7 @@ function installCompatMount(app, context, render) {
|
|
|
7493
7545
|
// both runtime-core AND runtime-dom.
|
|
7494
7546
|
instance.ctx._compat_mount = (selectorOrEl) => {
|
|
7495
7547
|
if (isMounted) {
|
|
7496
|
-
(process.env.NODE_ENV !== 'production') && warn
|
|
7548
|
+
(process.env.NODE_ENV !== 'production') && warn(`Root instance is already mounted.`);
|
|
7497
7549
|
return;
|
|
7498
7550
|
}
|
|
7499
7551
|
let container;
|
|
@@ -7502,7 +7554,7 @@ function installCompatMount(app, context, render) {
|
|
|
7502
7554
|
const result = document.querySelector(selectorOrEl);
|
|
7503
7555
|
if (!result) {
|
|
7504
7556
|
(process.env.NODE_ENV !== 'production') &&
|
|
7505
|
-
warn
|
|
7557
|
+
warn(`Failed to mount root instance: selector "${selectorOrEl}" returned null.`);
|
|
7506
7558
|
return;
|
|
7507
7559
|
}
|
|
7508
7560
|
container = result;
|
|
@@ -7530,7 +7582,7 @@ function installCompatMount(app, context, render) {
|
|
|
7530
7582
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
7531
7583
|
const attr = container.attributes[i];
|
|
7532
7584
|
if (attr.name !== 'v-cloak' && /^(v-|:|@)/.test(attr.name)) {
|
|
7533
|
-
warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */, null);
|
|
7585
|
+
warnDeprecation$1("GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */, null);
|
|
7534
7586
|
break;
|
|
7535
7587
|
}
|
|
7536
7588
|
}
|
|
@@ -7569,7 +7621,7 @@ function installCompatMount(app, context, render) {
|
|
|
7569
7621
|
if (bum) {
|
|
7570
7622
|
invokeArrayFns(bum);
|
|
7571
7623
|
}
|
|
7572
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7624
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7573
7625
|
instance.emit('hook:beforeDestroy');
|
|
7574
7626
|
}
|
|
7575
7627
|
// stop effects
|
|
@@ -7580,7 +7632,7 @@ function installCompatMount(app, context, render) {
|
|
|
7580
7632
|
if (um) {
|
|
7581
7633
|
invokeArrayFns(um);
|
|
7582
7634
|
}
|
|
7583
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7635
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
7584
7636
|
instance.emit('hook:destroyed');
|
|
7585
7637
|
}
|
|
7586
7638
|
}
|
|
@@ -7672,21 +7724,21 @@ function createAppContext() {
|
|
|
7672
7724
|
emitsCache: new WeakMap()
|
|
7673
7725
|
};
|
|
7674
7726
|
}
|
|
7675
|
-
let uid = 0;
|
|
7727
|
+
let uid$1 = 0;
|
|
7676
7728
|
function createAppAPI(render, hydrate) {
|
|
7677
7729
|
return function createApp(rootComponent, rootProps = null) {
|
|
7678
7730
|
if (!isFunction(rootComponent)) {
|
|
7679
7731
|
rootComponent = Object.assign({}, rootComponent);
|
|
7680
7732
|
}
|
|
7681
7733
|
if (rootProps != null && !isObject(rootProps)) {
|
|
7682
|
-
(process.env.NODE_ENV !== 'production') && warn
|
|
7734
|
+
(process.env.NODE_ENV !== 'production') && warn(`root props passed to app.mount() must be an object.`);
|
|
7683
7735
|
rootProps = null;
|
|
7684
7736
|
}
|
|
7685
7737
|
const context = createAppContext();
|
|
7686
7738
|
const installedPlugins = new Set();
|
|
7687
7739
|
let isMounted = false;
|
|
7688
7740
|
const app = (context.app = {
|
|
7689
|
-
_uid: uid++,
|
|
7741
|
+
_uid: uid$1++,
|
|
7690
7742
|
_component: rootComponent,
|
|
7691
7743
|
_props: rootProps,
|
|
7692
7744
|
_container: null,
|
|
@@ -7698,12 +7750,12 @@ function createAppAPI(render, hydrate) {
|
|
|
7698
7750
|
},
|
|
7699
7751
|
set config(v) {
|
|
7700
7752
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
7701
|
-
warn
|
|
7753
|
+
warn(`app.config cannot be replaced. Modify individual options instead.`);
|
|
7702
7754
|
}
|
|
7703
7755
|
},
|
|
7704
7756
|
use(plugin, ...options) {
|
|
7705
7757
|
if (installedPlugins.has(plugin)) {
|
|
7706
|
-
(process.env.NODE_ENV !== 'production') && warn
|
|
7758
|
+
(process.env.NODE_ENV !== 'production') && warn(`Plugin has already been applied to target app.`);
|
|
7707
7759
|
}
|
|
7708
7760
|
else if (plugin && isFunction(plugin.install)) {
|
|
7709
7761
|
installedPlugins.add(plugin);
|
|
@@ -7714,7 +7766,7 @@ function createAppAPI(render, hydrate) {
|
|
|
7714
7766
|
plugin(app, ...options);
|
|
7715
7767
|
}
|
|
7716
7768
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
7717
|
-
warn
|
|
7769
|
+
warn(`A plugin must either be a function or an object with an "install" ` +
|
|
7718
7770
|
`function.`);
|
|
7719
7771
|
}
|
|
7720
7772
|
return app;
|
|
@@ -7725,12 +7777,12 @@ function createAppAPI(render, hydrate) {
|
|
|
7725
7777
|
context.mixins.push(mixin);
|
|
7726
7778
|
}
|
|
7727
7779
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
7728
|
-
warn
|
|
7780
|
+
warn('Mixin has already been applied to target app' +
|
|
7729
7781
|
(mixin.name ? `: ${mixin.name}` : ''));
|
|
7730
7782
|
}
|
|
7731
7783
|
}
|
|
7732
7784
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
7733
|
-
warn
|
|
7785
|
+
warn('Mixins are only available in builds supporting Options API');
|
|
7734
7786
|
}
|
|
7735
7787
|
return app;
|
|
7736
7788
|
},
|
|
@@ -7742,7 +7794,7 @@ function createAppAPI(render, hydrate) {
|
|
|
7742
7794
|
return context.components[name];
|
|
7743
7795
|
}
|
|
7744
7796
|
if ((process.env.NODE_ENV !== 'production') && context.components[name]) {
|
|
7745
|
-
warn
|
|
7797
|
+
warn(`Component "${name}" has already been registered in target app.`);
|
|
7746
7798
|
}
|
|
7747
7799
|
context.components[name] = component;
|
|
7748
7800
|
return app;
|
|
@@ -7755,7 +7807,7 @@ function createAppAPI(render, hydrate) {
|
|
|
7755
7807
|
return context.directives[name];
|
|
7756
7808
|
}
|
|
7757
7809
|
if ((process.env.NODE_ENV !== 'production') && context.directives[name]) {
|
|
7758
|
-
warn
|
|
7810
|
+
warn(`Directive "${name}" has already been registered in target app.`);
|
|
7759
7811
|
}
|
|
7760
7812
|
context.directives[name] = directive;
|
|
7761
7813
|
return app;
|
|
@@ -7764,7 +7816,7 @@ function createAppAPI(render, hydrate) {
|
|
|
7764
7816
|
if (!isMounted) {
|
|
7765
7817
|
// #5571
|
|
7766
7818
|
if ((process.env.NODE_ENV !== 'production') && rootContainer.__vue_app__) {
|
|
7767
|
-
warn
|
|
7819
|
+
warn(`There is already an app instance mounted on the host container.\n` +
|
|
7768
7820
|
` If you want to mount another app on the same host container,` +
|
|
7769
7821
|
` you need to unmount the previous app by calling \`app.unmount()\` first.`);
|
|
7770
7822
|
}
|
|
@@ -7794,7 +7846,7 @@ function createAppAPI(render, hydrate) {
|
|
|
7794
7846
|
return getExposeProxy(vnode.component) || vnode.component.proxy;
|
|
7795
7847
|
}
|
|
7796
7848
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
7797
|
-
warn
|
|
7849
|
+
warn(`App has already been mounted.\n` +
|
|
7798
7850
|
`If you want to remount the same app, move your app creation logic ` +
|
|
7799
7851
|
`into a factory function and create fresh app instances for each ` +
|
|
7800
7852
|
`mount - e.g. \`const createMyApp = () => createApp(App)\``);
|
|
@@ -7810,12 +7862,12 @@ function createAppAPI(render, hydrate) {
|
|
|
7810
7862
|
delete app._container.__vue_app__;
|
|
7811
7863
|
}
|
|
7812
7864
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
7813
|
-
warn
|
|
7865
|
+
warn(`Cannot unmount an app that is not mounted.`);
|
|
7814
7866
|
}
|
|
7815
7867
|
},
|
|
7816
7868
|
provide(key, value) {
|
|
7817
7869
|
if ((process.env.NODE_ENV !== 'production') && key in context.provides) {
|
|
7818
|
-
warn
|
|
7870
|
+
warn(`App already provides property with key "${String(key)}". ` +
|
|
7819
7871
|
`It will be overwritten with the new value.`);
|
|
7820
7872
|
}
|
|
7821
7873
|
context.provides[key] = value;
|
|
@@ -7848,7 +7900,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
7848
7900
|
const value = isUnmount ? null : refValue;
|
|
7849
7901
|
const { i: owner, r: ref } = rawRef;
|
|
7850
7902
|
if ((process.env.NODE_ENV !== 'production') && !owner) {
|
|
7851
|
-
warn
|
|
7903
|
+
warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
|
|
7852
7904
|
`A vnode with ref must be created inside the render function.`);
|
|
7853
7905
|
return;
|
|
7854
7906
|
}
|
|
@@ -7915,7 +7967,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
7915
7967
|
refs[rawRef.k] = value;
|
|
7916
7968
|
}
|
|
7917
7969
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
7918
|
-
warn
|
|
7970
|
+
warn('Invalid template ref type:', ref, `(${typeof ref})`);
|
|
7919
7971
|
}
|
|
7920
7972
|
};
|
|
7921
7973
|
if (value) {
|
|
@@ -7927,7 +7979,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
7927
7979
|
}
|
|
7928
7980
|
}
|
|
7929
7981
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
7930
|
-
warn
|
|
7982
|
+
warn('Invalid template ref type:', ref, `(${typeof ref})`);
|
|
7931
7983
|
}
|
|
7932
7984
|
}
|
|
7933
7985
|
}
|
|
@@ -7945,7 +7997,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7945
7997
|
const hydrate = (vnode, container) => {
|
|
7946
7998
|
if (!container.hasChildNodes()) {
|
|
7947
7999
|
(process.env.NODE_ENV !== 'production') &&
|
|
7948
|
-
warn
|
|
8000
|
+
warn(`Attempting to hydrate existing markup but container is empty. ` +
|
|
7949
8001
|
`Performing full mount instead.`);
|
|
7950
8002
|
patch(null, vnode, container);
|
|
7951
8003
|
flushPostFlushCbs();
|
|
@@ -7989,7 +8041,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
7989
8041
|
if (node.data !== vnode.children) {
|
|
7990
8042
|
hasMismatch = true;
|
|
7991
8043
|
(process.env.NODE_ENV !== 'production') &&
|
|
7992
|
-
warn
|
|
8044
|
+
warn(`Hydration text mismatch:` +
|
|
7993
8045
|
`\n- Client: ${JSON.stringify(node.data)}` +
|
|
7994
8046
|
`\n- Server: ${JSON.stringify(vnode.children)}`);
|
|
7995
8047
|
node.data = vnode.children;
|
|
@@ -8104,7 +8156,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
8104
8156
|
nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
8105
8157
|
}
|
|
8106
8158
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
8107
|
-
warn
|
|
8159
|
+
warn('Invalid HostVNode type:', type, `(${typeof type})`);
|
|
8108
8160
|
}
|
|
8109
8161
|
}
|
|
8110
8162
|
if (ref != null) {
|
|
@@ -8165,7 +8217,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
8165
8217
|
while (next) {
|
|
8166
8218
|
hasMismatch = true;
|
|
8167
8219
|
if ((process.env.NODE_ENV !== 'production') && !hasWarned) {
|
|
8168
|
-
warn
|
|
8220
|
+
warn(`Hydration children mismatch in <${vnode.type}>: ` +
|
|
8169
8221
|
`server rendered element contains more child nodes than client vdom.`);
|
|
8170
8222
|
hasWarned = true;
|
|
8171
8223
|
}
|
|
@@ -8179,7 +8231,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
8179
8231
|
if (el.textContent !== vnode.children) {
|
|
8180
8232
|
hasMismatch = true;
|
|
8181
8233
|
(process.env.NODE_ENV !== 'production') &&
|
|
8182
|
-
warn
|
|
8234
|
+
warn(`Hydration text content mismatch in <${vnode.type}>:\n` +
|
|
8183
8235
|
`- Client: ${el.textContent}\n` +
|
|
8184
8236
|
`- Server: ${vnode.children}`);
|
|
8185
8237
|
el.textContent = vnode.children;
|
|
@@ -8206,7 +8258,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
8206
8258
|
else {
|
|
8207
8259
|
hasMismatch = true;
|
|
8208
8260
|
if ((process.env.NODE_ENV !== 'production') && !hasWarned) {
|
|
8209
|
-
warn
|
|
8261
|
+
warn(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +
|
|
8210
8262
|
`server rendered element contains fewer child nodes than client vdom.`);
|
|
8211
8263
|
hasWarned = true;
|
|
8212
8264
|
}
|
|
@@ -8240,7 +8292,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
8240
8292
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
8241
8293
|
hasMismatch = true;
|
|
8242
8294
|
(process.env.NODE_ENV !== 'production') &&
|
|
8243
|
-
warn
|
|
8295
|
+
warn(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
|
|
8244
8296
|
? `(text)`
|
|
8245
8297
|
: isComment(node) && node.data === '['
|
|
8246
8298
|
? `(start of fragment)`
|
|
@@ -8439,7 +8491,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8439
8491
|
type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
|
|
8440
8492
|
}
|
|
8441
8493
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
8442
|
-
warn
|
|
8494
|
+
warn('Invalid VNode type:', type, `(${typeof type})`);
|
|
8443
8495
|
}
|
|
8444
8496
|
}
|
|
8445
8497
|
// set ref
|
|
@@ -8529,6 +8581,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8529
8581
|
if (dirs) {
|
|
8530
8582
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
8531
8583
|
}
|
|
8584
|
+
// scopeId
|
|
8585
|
+
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
8532
8586
|
// props
|
|
8533
8587
|
if (props) {
|
|
8534
8588
|
for (const key in props) {
|
|
@@ -8552,8 +8606,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8552
8606
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8553
8607
|
}
|
|
8554
8608
|
}
|
|
8555
|
-
// scopeId
|
|
8556
|
-
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
8557
8609
|
if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {
|
|
8558
8610
|
Object.defineProperty(el, '__vnode', {
|
|
8559
8611
|
value: vnode,
|
|
@@ -8929,7 +8981,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8929
8981
|
(vnodeHook = props && props.onVnodeBeforeMount)) {
|
|
8930
8982
|
invokeVNodeHook(vnodeHook, parent, initialVNode);
|
|
8931
8983
|
}
|
|
8932
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8984
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8933
8985
|
instance.emit('hook:beforeMount');
|
|
8934
8986
|
}
|
|
8935
8987
|
toggleRecurse(instance, true);
|
|
@@ -8990,7 +9042,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8990
9042
|
const scopedInitialVNode = initialVNode;
|
|
8991
9043
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
|
|
8992
9044
|
}
|
|
8993
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9045
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
8994
9046
|
queuePostRenderEffect(() => instance.emit('hook:mounted'), parentSuspense);
|
|
8995
9047
|
}
|
|
8996
9048
|
// activated hook for keep-alive roots.
|
|
@@ -9001,7 +9053,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9001
9053
|
isAsyncWrapper(parent.vnode) &&
|
|
9002
9054
|
parent.vnode.shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */)) {
|
|
9003
9055
|
instance.a && queuePostRenderEffect(instance.a, parentSuspense);
|
|
9004
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9056
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9005
9057
|
queuePostRenderEffect(() => instance.emit('hook:activated'), parentSuspense);
|
|
9006
9058
|
}
|
|
9007
9059
|
}
|
|
@@ -9039,7 +9091,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9039
9091
|
if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) {
|
|
9040
9092
|
invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
9041
9093
|
}
|
|
9042
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9094
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9043
9095
|
instance.emit('hook:beforeUpdate');
|
|
9044
9096
|
}
|
|
9045
9097
|
toggleRecurse(instance, true);
|
|
@@ -9079,7 +9131,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9079
9131
|
if ((vnodeHook = next.props && next.props.onVnodeUpdated)) {
|
|
9080
9132
|
queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);
|
|
9081
9133
|
}
|
|
9082
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9134
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9083
9135
|
queuePostRenderEffect(() => instance.emit('hook:updated'), parentSuspense);
|
|
9084
9136
|
}
|
|
9085
9137
|
if ((process.env.NODE_ENV !== 'production') || __VUE_PROD_DEVTOOLS__) {
|
|
@@ -9284,7 +9336,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9284
9336
|
: normalizeVNode(c2[i]));
|
|
9285
9337
|
if (nextChild.key != null) {
|
|
9286
9338
|
if ((process.env.NODE_ENV !== 'production') && keyToNewIndexMap.has(nextChild.key)) {
|
|
9287
|
-
warn
|
|
9339
|
+
warn(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);
|
|
9288
9340
|
}
|
|
9289
9341
|
keyToNewIndexMap.set(nextChild.key, i);
|
|
9290
9342
|
}
|
|
@@ -9553,7 +9605,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9553
9605
|
if (bum) {
|
|
9554
9606
|
invokeArrayFns(bum);
|
|
9555
9607
|
}
|
|
9556
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9608
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9557
9609
|
instance.emit('hook:beforeDestroy');
|
|
9558
9610
|
}
|
|
9559
9611
|
// stop effects in component scope
|
|
@@ -9569,7 +9621,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9569
9621
|
if (um) {
|
|
9570
9622
|
queuePostRenderEffect(um, parentSuspense);
|
|
9571
9623
|
}
|
|
9572
|
-
if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9624
|
+
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
|
|
9573
9625
|
queuePostRenderEffect(() => instance.emit('hook:destroyed'), parentSuspense);
|
|
9574
9626
|
}
|
|
9575
9627
|
queuePostRenderEffect(() => {
|
|
@@ -9737,7 +9789,7 @@ const resolveTarget = (props, select) => {
|
|
|
9737
9789
|
if (isString(targetSelector)) {
|
|
9738
9790
|
if (!select) {
|
|
9739
9791
|
(process.env.NODE_ENV !== 'production') &&
|
|
9740
|
-
warn
|
|
9792
|
+
warn(`Current renderer does not support string target for Teleports. ` +
|
|
9741
9793
|
`(missing querySelector renderer option)`);
|
|
9742
9794
|
return null;
|
|
9743
9795
|
}
|
|
@@ -9745,7 +9797,7 @@ const resolveTarget = (props, select) => {
|
|
|
9745
9797
|
const target = select(targetSelector);
|
|
9746
9798
|
if (!target) {
|
|
9747
9799
|
(process.env.NODE_ENV !== 'production') &&
|
|
9748
|
-
warn
|
|
9800
|
+
warn(`Failed to locate Teleport target with selector "${targetSelector}". ` +
|
|
9749
9801
|
`Note the target element must exist before the component is mounted - ` +
|
|
9750
9802
|
`i.e. the target cannot be rendered by the component itself, and ` +
|
|
9751
9803
|
`ideally should be outside of the entire Vue component tree.`);
|
|
@@ -9755,7 +9807,7 @@ const resolveTarget = (props, select) => {
|
|
|
9755
9807
|
}
|
|
9756
9808
|
else {
|
|
9757
9809
|
if ((process.env.NODE_ENV !== 'production') && !targetSelector && !isTeleportDisabled(props)) {
|
|
9758
|
-
warn
|
|
9810
|
+
warn(`Invalid Teleport target: ${targetSelector}`);
|
|
9759
9811
|
}
|
|
9760
9812
|
return targetSelector;
|
|
9761
9813
|
}
|
|
@@ -9790,7 +9842,7 @@ const TeleportImpl = {
|
|
|
9790
9842
|
isSVG = isSVG || isTargetSVG(target);
|
|
9791
9843
|
}
|
|
9792
9844
|
else if ((process.env.NODE_ENV !== 'production') && !disabled) {
|
|
9793
|
-
warn
|
|
9845
|
+
warn('Invalid Teleport target on mount:', target, `(${typeof target})`);
|
|
9794
9846
|
}
|
|
9795
9847
|
const mount = (container, anchor) => {
|
|
9796
9848
|
// Teleport *always* has Array children. This is enforced in both the
|
|
@@ -9842,7 +9894,7 @@ const TeleportImpl = {
|
|
|
9842
9894
|
moveTeleport(n2, nextTarget, null, internals, 0 /* TeleportMoveTypes.TARGET_CHANGE */);
|
|
9843
9895
|
}
|
|
9844
9896
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
9845
|
-
warn
|
|
9897
|
+
warn('Invalid Teleport target on update:', target, `(${typeof target})`);
|
|
9846
9898
|
}
|
|
9847
9899
|
}
|
|
9848
9900
|
else if (wasDisabled) {
|
|
@@ -9998,7 +10050,7 @@ function convertLegacyComponent(comp, instance) {
|
|
|
9998
10050
|
}
|
|
9999
10051
|
// 2.x async component
|
|
10000
10052
|
if (isFunction(comp) &&
|
|
10001
|
-
checkCompatEnabled("COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */, instance, comp)) {
|
|
10053
|
+
checkCompatEnabled$1("COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */, instance, comp)) {
|
|
10002
10054
|
// since after disabling this, plain functions are still valid usage, do not
|
|
10003
10055
|
// use softAssert here.
|
|
10004
10056
|
return convertLegacyAsyncComponent(comp);
|
|
@@ -10184,7 +10236,7 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
10184
10236
|
}
|
|
10185
10237
|
// validate key
|
|
10186
10238
|
if ((process.env.NODE_ENV !== 'production') && vnode.key !== vnode.key) {
|
|
10187
|
-
warn
|
|
10239
|
+
warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
10188
10240
|
}
|
|
10189
10241
|
// track vnode for block tree
|
|
10190
10242
|
if (isBlockTreeEnabled > 0 &&
|
|
@@ -10212,7 +10264,7 @@ const createVNode = ((process.env.NODE_ENV !== 'production') ? createVNodeWithAr
|
|
|
10212
10264
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
10213
10265
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
10214
10266
|
if ((process.env.NODE_ENV !== 'production') && !type) {
|
|
10215
|
-
warn
|
|
10267
|
+
warn(`Invalid vnode type when creating vnode: ${type}.`);
|
|
10216
10268
|
}
|
|
10217
10269
|
type = Comment;
|
|
10218
10270
|
}
|
|
@@ -10274,7 +10326,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
10274
10326
|
: 0;
|
|
10275
10327
|
if ((process.env.NODE_ENV !== 'production') && shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ && isProxy(type)) {
|
|
10276
10328
|
type = toRaw(type);
|
|
10277
|
-
warn
|
|
10329
|
+
warn(`Vue received a Component which was made a reactive object. This can ` +
|
|
10278
10330
|
`lead to unnecessary performance overhead, and should be avoided by ` +
|
|
10279
10331
|
`marking the component with \`markRaw\` or using \`shallowRef\` ` +
|
|
10280
10332
|
`instead of \`ref\`.`, `\nComponent that was made reactive: `, type);
|
|
@@ -10342,7 +10394,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
10342
10394
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
10343
10395
|
el: vnode.el,
|
|
10344
10396
|
anchor: vnode.anchor,
|
|
10345
|
-
ctx: vnode.ctx
|
|
10397
|
+
ctx: vnode.ctx,
|
|
10398
|
+
ce: vnode.ce
|
|
10346
10399
|
};
|
|
10347
10400
|
{
|
|
10348
10401
|
defineLegacyVNodeProperties(cloned);
|
|
@@ -10512,13 +10565,13 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
10512
10565
|
}
|
|
10513
10566
|
|
|
10514
10567
|
const emptyAppContext = createAppContext();
|
|
10515
|
-
let uid
|
|
10568
|
+
let uid = 0;
|
|
10516
10569
|
function createComponentInstance(vnode, parent, suspense) {
|
|
10517
10570
|
const type = vnode.type;
|
|
10518
10571
|
// inherit parent app context - or - if root, adopt from root vnode
|
|
10519
10572
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
10520
10573
|
const instance = {
|
|
10521
|
-
uid: uid
|
|
10574
|
+
uid: uid++,
|
|
10522
10575
|
vnode,
|
|
10523
10576
|
type,
|
|
10524
10577
|
parent,
|
|
@@ -10591,7 +10644,7 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
10591
10644
|
instance.ctx = { _: instance };
|
|
10592
10645
|
}
|
|
10593
10646
|
instance.root = parent ? parent.root : instance;
|
|
10594
|
-
instance.emit = emit
|
|
10647
|
+
instance.emit = emit.bind(null, instance);
|
|
10595
10648
|
// apply custom element special handling
|
|
10596
10649
|
if (vnode.ce) {
|
|
10597
10650
|
vnode.ce(instance);
|
|
@@ -10612,7 +10665,7 @@ const isBuiltInTag = /*#__PURE__*/ makeMap('slot,component');
|
|
|
10612
10665
|
function validateComponentName(name, config) {
|
|
10613
10666
|
const appIsNativeTag = config.isNativeTag || NO;
|
|
10614
10667
|
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
10615
|
-
warn
|
|
10668
|
+
warn('Do not use built-in or reserved HTML elements as component id: ' + name);
|
|
10616
10669
|
}
|
|
10617
10670
|
}
|
|
10618
10671
|
function isStatefulComponent(instance) {
|
|
@@ -10651,7 +10704,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10651
10704
|
}
|
|
10652
10705
|
}
|
|
10653
10706
|
if (Component.compilerOptions && isRuntimeOnly()) {
|
|
10654
|
-
warn
|
|
10707
|
+
warn(`"compilerOptions" is only supported when using a build of Vue that ` +
|
|
10655
10708
|
`includes the runtime compiler. Since you are using a runtime-only ` +
|
|
10656
10709
|
`build, the options should be passed via your build tool config instead.`);
|
|
10657
10710
|
}
|
|
@@ -10692,7 +10745,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
10692
10745
|
instance.asyncDep = setupResult;
|
|
10693
10746
|
if ((process.env.NODE_ENV !== 'production') && !instance.suspense) {
|
|
10694
10747
|
const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
|
|
10695
|
-
warn
|
|
10748
|
+
warn(`Component <${name}>: setup function returned a promise, but no ` +
|
|
10696
10749
|
`<Suspense> boundary was found in the parent component tree. ` +
|
|
10697
10750
|
`A component with async setup() must be nested in a <Suspense> ` +
|
|
10698
10751
|
`in order to be rendered.`);
|
|
@@ -10721,7 +10774,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
|
|
|
10721
10774
|
}
|
|
10722
10775
|
else if (isObject(setupResult)) {
|
|
10723
10776
|
if ((process.env.NODE_ENV !== 'production') && isVNode(setupResult)) {
|
|
10724
|
-
warn
|
|
10777
|
+
warn(`setup() should not return VNodes directly - ` +
|
|
10725
10778
|
`return a render function instead.`);
|
|
10726
10779
|
}
|
|
10727
10780
|
// setup returned bindings.
|
|
@@ -10735,18 +10788,18 @@ function handleSetupResult(instance, setupResult, isSSR) {
|
|
|
10735
10788
|
}
|
|
10736
10789
|
}
|
|
10737
10790
|
else if ((process.env.NODE_ENV !== 'production') && setupResult !== undefined) {
|
|
10738
|
-
warn
|
|
10791
|
+
warn(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);
|
|
10739
10792
|
}
|
|
10740
10793
|
finishComponentSetup(instance, isSSR);
|
|
10741
10794
|
}
|
|
10742
|
-
let compile;
|
|
10795
|
+
let compile$1;
|
|
10743
10796
|
let installWithProxy;
|
|
10744
10797
|
/**
|
|
10745
10798
|
* For runtime-dom to register the compiler.
|
|
10746
10799
|
* Note the exported method uses any to avoid d.ts relying on the compiler types.
|
|
10747
10800
|
*/
|
|
10748
10801
|
function registerRuntimeCompiler(_compile) {
|
|
10749
|
-
compile = _compile;
|
|
10802
|
+
compile$1 = _compile;
|
|
10750
10803
|
installWithProxy = i => {
|
|
10751
10804
|
if (i.render._rc) {
|
|
10752
10805
|
i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
|
|
@@ -10754,7 +10807,7 @@ function registerRuntimeCompiler(_compile) {
|
|
|
10754
10807
|
};
|
|
10755
10808
|
}
|
|
10756
10809
|
// dev only
|
|
10757
|
-
const isRuntimeOnly = () => !compile;
|
|
10810
|
+
const isRuntimeOnly = () => !compile$1;
|
|
10758
10811
|
function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
10759
10812
|
const Component = instance.type;
|
|
10760
10813
|
{
|
|
@@ -10768,7 +10821,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
10768
10821
|
if (!instance.render) {
|
|
10769
10822
|
// only do on-the-fly compile if not in SSR - SSR on-the-fly compilation
|
|
10770
10823
|
// is done by server-renderer
|
|
10771
|
-
if (!isSSR && compile && !Component.render) {
|
|
10824
|
+
if (!isSSR && compile$1 && !Component.render) {
|
|
10772
10825
|
const template = (instance.vnode.props &&
|
|
10773
10826
|
instance.vnode.props['inline-template']) ||
|
|
10774
10827
|
Component.template ||
|
|
@@ -10791,7 +10844,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
10791
10844
|
extend(finalCompilerOptions.compatConfig, Component.compatConfig);
|
|
10792
10845
|
}
|
|
10793
10846
|
}
|
|
10794
|
-
Component.render = compile(template, finalCompilerOptions);
|
|
10847
|
+
Component.render = compile$1(template, finalCompilerOptions);
|
|
10795
10848
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
10796
10849
|
endMeasure(instance, `compile`);
|
|
10797
10850
|
}
|
|
@@ -10817,14 +10870,14 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
10817
10870
|
// the runtime compilation of template in SSR is done by server-render
|
|
10818
10871
|
if ((process.env.NODE_ENV !== 'production') && !Component.render && instance.render === NOOP && !isSSR) {
|
|
10819
10872
|
/* istanbul ignore if */
|
|
10820
|
-
if (!compile && Component.template) {
|
|
10821
|
-
warn
|
|
10873
|
+
if (!compile$1 && Component.template) {
|
|
10874
|
+
warn(`Component provided template option but ` +
|
|
10822
10875
|
`runtime compilation is not supported in this build of Vue.` +
|
|
10823
10876
|
(` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
|
|
10824
10877
|
) /* should not happen */);
|
|
10825
10878
|
}
|
|
10826
10879
|
else {
|
|
10827
|
-
warn
|
|
10880
|
+
warn(`Component is missing template or render function.`);
|
|
10828
10881
|
}
|
|
10829
10882
|
}
|
|
10830
10883
|
}
|
|
@@ -10837,11 +10890,11 @@ function createAttrsProxy(instance) {
|
|
|
10837
10890
|
return target[key];
|
|
10838
10891
|
},
|
|
10839
10892
|
set() {
|
|
10840
|
-
warn
|
|
10893
|
+
warn(`setupContext.attrs is readonly.`);
|
|
10841
10894
|
return false;
|
|
10842
10895
|
},
|
|
10843
10896
|
deleteProperty() {
|
|
10844
|
-
warn
|
|
10897
|
+
warn(`setupContext.attrs is readonly.`);
|
|
10845
10898
|
return false;
|
|
10846
10899
|
}
|
|
10847
10900
|
}
|
|
@@ -10854,8 +10907,24 @@ function createAttrsProxy(instance) {
|
|
|
10854
10907
|
}
|
|
10855
10908
|
function createSetupContext(instance) {
|
|
10856
10909
|
const expose = exposed => {
|
|
10857
|
-
if ((process.env.NODE_ENV !== 'production')
|
|
10858
|
-
|
|
10910
|
+
if ((process.env.NODE_ENV !== 'production')) {
|
|
10911
|
+
if (instance.exposed) {
|
|
10912
|
+
warn(`expose() should be called only once per setup().`);
|
|
10913
|
+
}
|
|
10914
|
+
if (exposed != null) {
|
|
10915
|
+
let exposedType = typeof exposed;
|
|
10916
|
+
if (exposedType === 'object') {
|
|
10917
|
+
if (isArray(exposed)) {
|
|
10918
|
+
exposedType = 'array';
|
|
10919
|
+
}
|
|
10920
|
+
else if (isRef(exposed)) {
|
|
10921
|
+
exposedType = 'ref';
|
|
10922
|
+
}
|
|
10923
|
+
}
|
|
10924
|
+
if (exposedType !== 'object') {
|
|
10925
|
+
warn(`expose() should be passed a plain object, received ${exposedType}.`);
|
|
10926
|
+
}
|
|
10927
|
+
}
|
|
10859
10928
|
}
|
|
10860
10929
|
instance.exposed = exposed || {};
|
|
10861
10930
|
};
|
|
@@ -10940,13 +11009,13 @@ function isClassComponent(value) {
|
|
|
10940
11009
|
return isFunction(value) && '__vccOpts' in value;
|
|
10941
11010
|
}
|
|
10942
11011
|
|
|
10943
|
-
const computed
|
|
11012
|
+
const computed = ((getterOrOptions, debugOptions) => {
|
|
10944
11013
|
// @ts-ignore
|
|
10945
|
-
return computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
11014
|
+
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
10946
11015
|
});
|
|
10947
11016
|
|
|
10948
11017
|
// dev only
|
|
10949
|
-
const warnRuntimeUsage = (method) => warn
|
|
11018
|
+
const warnRuntimeUsage = (method) => warn(`${method}() is a compiler-hint helper that is only usable inside ` +
|
|
10950
11019
|
`<script setup> of a single file component. Its arguments should be ` +
|
|
10951
11020
|
`compiled away and passing it at runtime has no effect.`);
|
|
10952
11021
|
// implementation
|
|
@@ -11013,7 +11082,7 @@ function useAttrs() {
|
|
|
11013
11082
|
function getContext() {
|
|
11014
11083
|
const i = getCurrentInstance();
|
|
11015
11084
|
if ((process.env.NODE_ENV !== 'production') && !i) {
|
|
11016
|
-
warn
|
|
11085
|
+
warn(`useContext() called without active instance.`);
|
|
11017
11086
|
}
|
|
11018
11087
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
11019
11088
|
}
|
|
@@ -11040,7 +11109,7 @@ function mergeDefaults(raw, defaults) {
|
|
|
11040
11109
|
props[key] = { default: defaults[key] };
|
|
11041
11110
|
}
|
|
11042
11111
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
11043
|
-
warn
|
|
11112
|
+
warn(`props default key "${key}" has no corresponding declaration.`);
|
|
11044
11113
|
}
|
|
11045
11114
|
}
|
|
11046
11115
|
return props;
|
|
@@ -11083,7 +11152,7 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
11083
11152
|
function withAsyncContext(getAwaitable) {
|
|
11084
11153
|
const ctx = getCurrentInstance();
|
|
11085
11154
|
if ((process.env.NODE_ENV !== 'production') && !ctx) {
|
|
11086
|
-
warn
|
|
11155
|
+
warn(`withAsyncContext called without active current instance. ` +
|
|
11087
11156
|
`This is likely a bug.`);
|
|
11088
11157
|
}
|
|
11089
11158
|
let awaitable = getAwaitable();
|
|
@@ -11131,7 +11200,7 @@ const useSSRContext = () => {
|
|
|
11131
11200
|
const ctx = inject(ssrContextKey);
|
|
11132
11201
|
if (!ctx) {
|
|
11133
11202
|
(process.env.NODE_ENV !== 'production') &&
|
|
11134
|
-
warn
|
|
11203
|
+
warn(`Server rendering context not provided. Make sure to only call ` +
|
|
11135
11204
|
`useSSRContext() conditionally in the server build.`);
|
|
11136
11205
|
}
|
|
11137
11206
|
return ctx;
|
|
@@ -11355,7 +11424,7 @@ function isMemoSame(cached, memo) {
|
|
|
11355
11424
|
}
|
|
11356
11425
|
|
|
11357
11426
|
// Core API ------------------------------------------------------------------
|
|
11358
|
-
const version = "3.2.
|
|
11427
|
+
const version = "3.2.46";
|
|
11359
11428
|
const _ssrUtils = {
|
|
11360
11429
|
createComponentInstance,
|
|
11361
11430
|
setupComponent,
|
|
@@ -11372,12 +11441,12 @@ const ssrUtils = (_ssrUtils );
|
|
|
11372
11441
|
/**
|
|
11373
11442
|
* @internal only exposed in compat builds
|
|
11374
11443
|
*/
|
|
11375
|
-
const resolveFilter
|
|
11444
|
+
const resolveFilter = resolveFilter$1 ;
|
|
11376
11445
|
const _compatUtils = {
|
|
11377
|
-
warnDeprecation,
|
|
11378
|
-
createCompatVue,
|
|
11379
|
-
isCompatEnabled,
|
|
11380
|
-
checkCompatEnabled,
|
|
11446
|
+
warnDeprecation: warnDeprecation$1,
|
|
11447
|
+
createCompatVue: createCompatVue$1,
|
|
11448
|
+
isCompatEnabled: isCompatEnabled$1,
|
|
11449
|
+
checkCompatEnabled: checkCompatEnabled$1,
|
|
11381
11450
|
softAssertCompatEnabled
|
|
11382
11451
|
};
|
|
11383
11452
|
/**
|
|
@@ -11487,9 +11556,6 @@ function patchStyle(el, prev, next) {
|
|
|
11487
11556
|
const style = el.style;
|
|
11488
11557
|
const isCssString = isString(next);
|
|
11489
11558
|
if (next && !isCssString) {
|
|
11490
|
-
for (const key in next) {
|
|
11491
|
-
setStyle(style, key, next[key]);
|
|
11492
|
-
}
|
|
11493
11559
|
if (prev && !isString(prev)) {
|
|
11494
11560
|
for (const key in prev) {
|
|
11495
11561
|
if (next[key] == null) {
|
|
@@ -11497,6 +11563,9 @@ function patchStyle(el, prev, next) {
|
|
|
11497
11563
|
}
|
|
11498
11564
|
}
|
|
11499
11565
|
}
|
|
11566
|
+
for (const key in next) {
|
|
11567
|
+
setStyle(style, key, next[key]);
|
|
11568
|
+
}
|
|
11500
11569
|
}
|
|
11501
11570
|
else {
|
|
11502
11571
|
const currentDisplay = style.display;
|
|
@@ -11527,7 +11596,7 @@ function setStyle(style, name, val) {
|
|
|
11527
11596
|
val = '';
|
|
11528
11597
|
if ((process.env.NODE_ENV !== 'production')) {
|
|
11529
11598
|
if (semicolonRE.test(val)) {
|
|
11530
|
-
warn
|
|
11599
|
+
warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
11531
11600
|
}
|
|
11532
11601
|
}
|
|
11533
11602
|
if (name.startsWith('--')) {
|
|
@@ -11690,7 +11759,7 @@ prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
|
11690
11759
|
catch (e) {
|
|
11691
11760
|
// do not warn if value is auto-coerced from nullish values
|
|
11692
11761
|
if ((process.env.NODE_ENV !== 'production') && !needRemove) {
|
|
11693
|
-
warn
|
|
11762
|
+
warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
|
|
11694
11763
|
`value ${value} is invalid.`, e);
|
|
11695
11764
|
}
|
|
11696
11765
|
}
|
|
@@ -11894,7 +11963,7 @@ class VueElement extends BaseClass {
|
|
|
11894
11963
|
}
|
|
11895
11964
|
else {
|
|
11896
11965
|
if ((process.env.NODE_ENV !== 'production') && this.shadowRoot) {
|
|
11897
|
-
warn
|
|
11966
|
+
warn(`Custom element has pre-rendered declarative shadow root but is not ` +
|
|
11898
11967
|
`defined as hydratable. Use \`defineSSRCustomElement\`.`);
|
|
11899
11968
|
}
|
|
11900
11969
|
this.attachShadow({ mode: 'open' });
|
|
@@ -12101,18 +12170,18 @@ function useCssModule(name = '$style') {
|
|
|
12101
12170
|
{
|
|
12102
12171
|
const instance = getCurrentInstance();
|
|
12103
12172
|
if (!instance) {
|
|
12104
|
-
(process.env.NODE_ENV !== 'production') && warn
|
|
12173
|
+
(process.env.NODE_ENV !== 'production') && warn(`useCssModule must be called inside setup()`);
|
|
12105
12174
|
return EMPTY_OBJ;
|
|
12106
12175
|
}
|
|
12107
12176
|
const modules = instance.type.__cssModules;
|
|
12108
12177
|
if (!modules) {
|
|
12109
|
-
(process.env.NODE_ENV !== 'production') && warn
|
|
12178
|
+
(process.env.NODE_ENV !== 'production') && warn(`Current instance does not have CSS modules injected.`);
|
|
12110
12179
|
return EMPTY_OBJ;
|
|
12111
12180
|
}
|
|
12112
12181
|
const mod = modules[name];
|
|
12113
12182
|
if (!mod) {
|
|
12114
12183
|
(process.env.NODE_ENV !== 'production') &&
|
|
12115
|
-
warn
|
|
12184
|
+
warn(`Current instance does not have CSS module named "${name}".`);
|
|
12116
12185
|
return EMPTY_OBJ;
|
|
12117
12186
|
}
|
|
12118
12187
|
return mod;
|
|
@@ -12128,7 +12197,7 @@ function useCssVars(getter) {
|
|
|
12128
12197
|
/* istanbul ignore next */
|
|
12129
12198
|
if (!instance) {
|
|
12130
12199
|
(process.env.NODE_ENV !== 'production') &&
|
|
12131
|
-
warn
|
|
12200
|
+
warn(`useCssVars is called without current active component instance.`);
|
|
12132
12201
|
return;
|
|
12133
12202
|
}
|
|
12134
12203
|
const updateTeleports = (instance.ut = (vars = getter(instance.proxy)) => {
|
|
@@ -12185,7 +12254,7 @@ function setVarsOnNode(el, vars) {
|
|
|
12185
12254
|
}
|
|
12186
12255
|
}
|
|
12187
12256
|
|
|
12188
|
-
const TRANSITION = 'transition';
|
|
12257
|
+
const TRANSITION$1 = 'transition';
|
|
12189
12258
|
const ANIMATION = 'animation';
|
|
12190
12259
|
// DOM Transition is a higher-order-component based on the platform-agnostic
|
|
12191
12260
|
// base Transition component, with DOM-specific logic.
|
|
@@ -12218,7 +12287,7 @@ const TransitionPropsValidators = (Transition.props =
|
|
|
12218
12287
|
* #3227 Incoming hooks may be merged into arrays when wrapping Transition
|
|
12219
12288
|
* with custom HOCs.
|
|
12220
12289
|
*/
|
|
12221
|
-
const callHook
|
|
12290
|
+
const callHook = (hook, args = []) => {
|
|
12222
12291
|
if (isArray(hook)) {
|
|
12223
12292
|
hook.forEach(h => h(...args));
|
|
12224
12293
|
}
|
|
@@ -12285,11 +12354,16 @@ function resolveTransitionProps(rawProps) {
|
|
|
12285
12354
|
return (el, done) => {
|
|
12286
12355
|
const hook = isAppear ? onAppear : onEnter;
|
|
12287
12356
|
const resolve = () => finishEnter(el, isAppear, done);
|
|
12288
|
-
callHook
|
|
12357
|
+
callHook(hook, [el, resolve]);
|
|
12289
12358
|
nextFrame(() => {
|
|
12290
12359
|
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
12291
12360
|
if (legacyClassEnabled) {
|
|
12292
|
-
|
|
12361
|
+
const legacyClass = isAppear
|
|
12362
|
+
? legacyAppearFromClass
|
|
12363
|
+
: legacyEnterFromClass;
|
|
12364
|
+
if (legacyClass) {
|
|
12365
|
+
removeTransitionClass(el, legacyClass);
|
|
12366
|
+
}
|
|
12293
12367
|
}
|
|
12294
12368
|
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
12295
12369
|
if (!hasExplicitCallback(hook)) {
|
|
@@ -12300,17 +12374,17 @@ function resolveTransitionProps(rawProps) {
|
|
|
12300
12374
|
};
|
|
12301
12375
|
return extend(baseProps, {
|
|
12302
12376
|
onBeforeEnter(el) {
|
|
12303
|
-
callHook
|
|
12377
|
+
callHook(onBeforeEnter, [el]);
|
|
12304
12378
|
addTransitionClass(el, enterFromClass);
|
|
12305
|
-
if (legacyClassEnabled) {
|
|
12379
|
+
if (legacyClassEnabled && legacyEnterFromClass) {
|
|
12306
12380
|
addTransitionClass(el, legacyEnterFromClass);
|
|
12307
12381
|
}
|
|
12308
12382
|
addTransitionClass(el, enterActiveClass);
|
|
12309
12383
|
},
|
|
12310
12384
|
onBeforeAppear(el) {
|
|
12311
|
-
callHook
|
|
12385
|
+
callHook(onBeforeAppear, [el]);
|
|
12312
12386
|
addTransitionClass(el, appearFromClass);
|
|
12313
|
-
if (legacyClassEnabled) {
|
|
12387
|
+
if (legacyClassEnabled && legacyAppearFromClass) {
|
|
12314
12388
|
addTransitionClass(el, legacyAppearFromClass);
|
|
12315
12389
|
}
|
|
12316
12390
|
addTransitionClass(el, appearActiveClass);
|
|
@@ -12321,7 +12395,7 @@ function resolveTransitionProps(rawProps) {
|
|
|
12321
12395
|
el._isLeaving = true;
|
|
12322
12396
|
const resolve = () => finishLeave(el, done);
|
|
12323
12397
|
addTransitionClass(el, leaveFromClass);
|
|
12324
|
-
if (legacyClassEnabled) {
|
|
12398
|
+
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
12325
12399
|
addTransitionClass(el, legacyLeaveFromClass);
|
|
12326
12400
|
}
|
|
12327
12401
|
// force reflow so *-leave-from classes immediately take effect (#2593)
|
|
@@ -12333,7 +12407,7 @@ function resolveTransitionProps(rawProps) {
|
|
|
12333
12407
|
return;
|
|
12334
12408
|
}
|
|
12335
12409
|
removeTransitionClass(el, leaveFromClass);
|
|
12336
|
-
if (legacyClassEnabled) {
|
|
12410
|
+
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
12337
12411
|
removeTransitionClass(el, legacyLeaveFromClass);
|
|
12338
12412
|
}
|
|
12339
12413
|
addTransitionClass(el, leaveToClass);
|
|
@@ -12341,19 +12415,19 @@ function resolveTransitionProps(rawProps) {
|
|
|
12341
12415
|
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
12342
12416
|
}
|
|
12343
12417
|
});
|
|
12344
|
-
callHook
|
|
12418
|
+
callHook(onLeave, [el, resolve]);
|
|
12345
12419
|
},
|
|
12346
12420
|
onEnterCancelled(el) {
|
|
12347
12421
|
finishEnter(el, false);
|
|
12348
|
-
callHook
|
|
12422
|
+
callHook(onEnterCancelled, [el]);
|
|
12349
12423
|
},
|
|
12350
12424
|
onAppearCancelled(el) {
|
|
12351
12425
|
finishEnter(el, true);
|
|
12352
|
-
callHook
|
|
12426
|
+
callHook(onAppearCancelled, [el]);
|
|
12353
12427
|
},
|
|
12354
12428
|
onLeaveCancelled(el) {
|
|
12355
12429
|
finishLeave(el);
|
|
12356
|
-
callHook
|
|
12430
|
+
callHook(onLeaveCancelled, [el]);
|
|
12357
12431
|
}
|
|
12358
12432
|
});
|
|
12359
12433
|
}
|
|
@@ -12371,19 +12445,10 @@ function normalizeDuration(duration) {
|
|
|
12371
12445
|
}
|
|
12372
12446
|
function NumberOf(val) {
|
|
12373
12447
|
const res = toNumber(val);
|
|
12374
|
-
if ((process.env.NODE_ENV !== 'production'))
|
|
12375
|
-
|
|
12376
|
-
return res;
|
|
12377
|
-
}
|
|
12378
|
-
function validateDuration(val) {
|
|
12379
|
-
if (typeof val !== 'number') {
|
|
12380
|
-
warn$1(`<transition> explicit duration is not a valid number - ` +
|
|
12381
|
-
`got ${JSON.stringify(val)}.`);
|
|
12382
|
-
}
|
|
12383
|
-
else if (isNaN(val)) {
|
|
12384
|
-
warn$1(`<transition> explicit duration is NaN - ` +
|
|
12385
|
-
'the duration expression might be incorrect.');
|
|
12448
|
+
if ((process.env.NODE_ENV !== 'production')) {
|
|
12449
|
+
assertNumber(res, '<transition> explicit duration');
|
|
12386
12450
|
}
|
|
12451
|
+
return res;
|
|
12387
12452
|
}
|
|
12388
12453
|
function addTransitionClass(el, cls) {
|
|
12389
12454
|
cls.split(/\s+/).forEach(c => c && el.classList.add(c));
|
|
@@ -12442,8 +12507,8 @@ function getTransitionInfo(el, expectedType) {
|
|
|
12442
12507
|
const styles = window.getComputedStyle(el);
|
|
12443
12508
|
// JSDOM may return undefined for transition properties
|
|
12444
12509
|
const getStyleProperties = (key) => (styles[key] || '').split(', ');
|
|
12445
|
-
const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
|
|
12446
|
-
const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
|
|
12510
|
+
const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`);
|
|
12511
|
+
const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`);
|
|
12447
12512
|
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
12448
12513
|
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
12449
12514
|
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
@@ -12452,9 +12517,9 @@ function getTransitionInfo(el, expectedType) {
|
|
|
12452
12517
|
let timeout = 0;
|
|
12453
12518
|
let propCount = 0;
|
|
12454
12519
|
/* istanbul ignore if */
|
|
12455
|
-
if (expectedType === TRANSITION) {
|
|
12520
|
+
if (expectedType === TRANSITION$1) {
|
|
12456
12521
|
if (transitionTimeout > 0) {
|
|
12457
|
-
type = TRANSITION;
|
|
12522
|
+
type = TRANSITION$1;
|
|
12458
12523
|
timeout = transitionTimeout;
|
|
12459
12524
|
propCount = transitionDurations.length;
|
|
12460
12525
|
}
|
|
@@ -12471,17 +12536,17 @@ function getTransitionInfo(el, expectedType) {
|
|
|
12471
12536
|
type =
|
|
12472
12537
|
timeout > 0
|
|
12473
12538
|
? transitionTimeout > animationTimeout
|
|
12474
|
-
? TRANSITION
|
|
12539
|
+
? TRANSITION$1
|
|
12475
12540
|
: ANIMATION
|
|
12476
12541
|
: null;
|
|
12477
12542
|
propCount = type
|
|
12478
|
-
? type === TRANSITION
|
|
12543
|
+
? type === TRANSITION$1
|
|
12479
12544
|
? transitionDurations.length
|
|
12480
12545
|
: animationDurations.length
|
|
12481
12546
|
: 0;
|
|
12482
12547
|
}
|
|
12483
|
-
const hasTransform = type === TRANSITION &&
|
|
12484
|
-
/\b(transform|all)(,|$)/.test(getStyleProperties(`${TRANSITION}Property`).toString());
|
|
12548
|
+
const hasTransform = type === TRANSITION$1 &&
|
|
12549
|
+
/\b(transform|all)(,|$)/.test(getStyleProperties(`${TRANSITION$1}Property`).toString());
|
|
12485
12550
|
return {
|
|
12486
12551
|
type,
|
|
12487
12552
|
timeout,
|
|
@@ -12570,7 +12635,7 @@ const TransitionGroupImpl = {
|
|
|
12570
12635
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
12571
12636
|
}
|
|
12572
12637
|
else if ((process.env.NODE_ENV !== 'production')) {
|
|
12573
|
-
warn
|
|
12638
|
+
warn(`<TransitionGroup> children must be keyed.`);
|
|
12574
12639
|
}
|
|
12575
12640
|
}
|
|
12576
12641
|
if (prevChildren) {
|
|
@@ -12587,6 +12652,14 @@ const TransitionGroupImpl = {
|
|
|
12587
12652
|
{
|
|
12588
12653
|
TransitionGroupImpl.__isBuiltIn = true;
|
|
12589
12654
|
}
|
|
12655
|
+
/**
|
|
12656
|
+
* TransitionGroup does not support "mode" so we need to remove it from the
|
|
12657
|
+
* props declarations, but direct delete operation is considered a side effect
|
|
12658
|
+
* and will make the entire transition feature non-tree-shakeable, so we do it
|
|
12659
|
+
* in a function and mark the function's invocation as pure.
|
|
12660
|
+
*/
|
|
12661
|
+
const removeMode = (props) => delete props.mode;
|
|
12662
|
+
/*#__PURE__*/ removeMode(TransitionGroupImpl.props);
|
|
12590
12663
|
const TransitionGroup = TransitionGroupImpl;
|
|
12591
12664
|
function callPendingCbs(c) {
|
|
12592
12665
|
const el = c.el;
|
|
@@ -12662,7 +12735,7 @@ const vModelText = {
|
|
|
12662
12735
|
domValue = domValue.trim();
|
|
12663
12736
|
}
|
|
12664
12737
|
if (castToNumber) {
|
|
12665
|
-
domValue =
|
|
12738
|
+
domValue = looseToNumber(domValue);
|
|
12666
12739
|
}
|
|
12667
12740
|
el._assign(domValue);
|
|
12668
12741
|
});
|
|
@@ -12697,7 +12770,8 @@ const vModelText = {
|
|
|
12697
12770
|
if (trim && el.value.trim() === value) {
|
|
12698
12771
|
return;
|
|
12699
12772
|
}
|
|
12700
|
-
if ((number || el.type === 'number') &&
|
|
12773
|
+
if ((number || el.type === 'number') &&
|
|
12774
|
+
looseToNumber(el.value) === value) {
|
|
12701
12775
|
return;
|
|
12702
12776
|
}
|
|
12703
12777
|
}
|
|
@@ -12786,7 +12860,7 @@ const vModelSelect = {
|
|
|
12786
12860
|
addEventListener(el, 'change', () => {
|
|
12787
12861
|
const selectedVal = Array.prototype.filter
|
|
12788
12862
|
.call(el.options, (o) => o.selected)
|
|
12789
|
-
.map((o) => number ?
|
|
12863
|
+
.map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
12790
12864
|
el._assign(el.multiple
|
|
12791
12865
|
? isSetModel
|
|
12792
12866
|
? new Set(selectedVal)
|
|
@@ -12811,7 +12885,7 @@ function setSelected(el, value) {
|
|
|
12811
12885
|
const isMultiple = el.multiple;
|
|
12812
12886
|
if (isMultiple && !isArray(value) && !isSet(value)) {
|
|
12813
12887
|
(process.env.NODE_ENV !== 'production') &&
|
|
12814
|
-
warn
|
|
12888
|
+
warn(`<select multiple v-model> expects an Array or Set value for its binding, ` +
|
|
12815
12889
|
`but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);
|
|
12816
12890
|
return;
|
|
12817
12891
|
}
|
|
@@ -13152,7 +13226,7 @@ function injectCompilerOptionsCheck(app) {
|
|
|
13152
13226
|
return isCustomElement;
|
|
13153
13227
|
},
|
|
13154
13228
|
set() {
|
|
13155
|
-
warn
|
|
13229
|
+
warn(`The \`isCustomElement\` config option is deprecated. Use ` +
|
|
13156
13230
|
`\`compilerOptions.isCustomElement\` instead.`);
|
|
13157
13231
|
}
|
|
13158
13232
|
});
|
|
@@ -13166,11 +13240,11 @@ function injectCompilerOptionsCheck(app) {
|
|
|
13166
13240
|
`- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`;
|
|
13167
13241
|
Object.defineProperty(app.config, 'compilerOptions', {
|
|
13168
13242
|
get() {
|
|
13169
|
-
warn
|
|
13243
|
+
warn(msg);
|
|
13170
13244
|
return compilerOptions;
|
|
13171
13245
|
},
|
|
13172
13246
|
set() {
|
|
13173
|
-
warn
|
|
13247
|
+
warn(msg);
|
|
13174
13248
|
}
|
|
13175
13249
|
});
|
|
13176
13250
|
}
|
|
@@ -13179,7 +13253,7 @@ function normalizeContainer(container) {
|
|
|
13179
13253
|
if (isString(container)) {
|
|
13180
13254
|
const res = document.querySelector(container);
|
|
13181
13255
|
if ((process.env.NODE_ENV !== 'production') && !res) {
|
|
13182
|
-
warn
|
|
13256
|
+
warn(`Failed to mount app: mount target selector "${container}" returned null.`);
|
|
13183
13257
|
}
|
|
13184
13258
|
return res;
|
|
13185
13259
|
}
|
|
@@ -13187,7 +13261,7 @@ function normalizeContainer(container) {
|
|
|
13187
13261
|
window.ShadowRoot &&
|
|
13188
13262
|
container instanceof window.ShadowRoot &&
|
|
13189
13263
|
container.mode === 'closed') {
|
|
13190
|
-
warn
|
|
13264
|
+
warn(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
|
|
13191
13265
|
}
|
|
13192
13266
|
return container;
|
|
13193
13267
|
}
|
|
@@ -13206,150 +13280,151 @@ const initDirectivesForSSR = () => {
|
|
|
13206
13280
|
|
|
13207
13281
|
var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
13208
13282
|
__proto__: null,
|
|
13209
|
-
|
|
13210
|
-
|
|
13283
|
+
BaseTransition: BaseTransition,
|
|
13284
|
+
Comment: Comment,
|
|
13285
|
+
EffectScope: EffectScope,
|
|
13286
|
+
Fragment: Fragment,
|
|
13287
|
+
KeepAlive: KeepAlive,
|
|
13288
|
+
ReactiveEffect: ReactiveEffect,
|
|
13289
|
+
Static: Static,
|
|
13290
|
+
Suspense: Suspense,
|
|
13291
|
+
Teleport: Teleport,
|
|
13292
|
+
Text: Text,
|
|
13293
|
+
Transition: Transition,
|
|
13294
|
+
TransitionGroup: TransitionGroup,
|
|
13295
|
+
VueElement: VueElement,
|
|
13296
|
+
assertNumber: assertNumber,
|
|
13297
|
+
callWithAsyncErrorHandling: callWithAsyncErrorHandling,
|
|
13298
|
+
callWithErrorHandling: callWithErrorHandling,
|
|
13299
|
+
camelize: camelize,
|
|
13300
|
+
capitalize: capitalize,
|
|
13301
|
+
cloneVNode: cloneVNode,
|
|
13302
|
+
compatUtils: compatUtils,
|
|
13303
|
+
computed: computed,
|
|
13211
13304
|
createApp: createApp,
|
|
13305
|
+
createBlock: createBlock,
|
|
13306
|
+
createCommentVNode: createCommentVNode,
|
|
13307
|
+
createElementBlock: createElementBlock,
|
|
13308
|
+
createElementVNode: createBaseVNode,
|
|
13309
|
+
createHydrationRenderer: createHydrationRenderer,
|
|
13310
|
+
createPropsRestProxy: createPropsRestProxy,
|
|
13311
|
+
createRenderer: createRenderer,
|
|
13212
13312
|
createSSRApp: createSSRApp,
|
|
13213
|
-
|
|
13313
|
+
createSlots: createSlots,
|
|
13314
|
+
createStaticVNode: createStaticVNode,
|
|
13315
|
+
createTextVNode: createTextVNode,
|
|
13316
|
+
createVNode: createVNode,
|
|
13317
|
+
customRef: customRef,
|
|
13318
|
+
defineAsyncComponent: defineAsyncComponent,
|
|
13319
|
+
defineComponent: defineComponent,
|
|
13214
13320
|
defineCustomElement: defineCustomElement,
|
|
13321
|
+
defineEmits: defineEmits,
|
|
13322
|
+
defineExpose: defineExpose,
|
|
13323
|
+
defineProps: defineProps,
|
|
13215
13324
|
defineSSRCustomElement: defineSSRCustomElement,
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
ref: ref,
|
|
13231
|
-
readonly: readonly,
|
|
13232
|
-
unref: unref,
|
|
13233
|
-
proxyRefs: proxyRefs,
|
|
13234
|
-
isRef: isRef,
|
|
13235
|
-
toRef: toRef,
|
|
13236
|
-
toRefs: toRefs,
|
|
13325
|
+
get devtools () { return devtools; },
|
|
13326
|
+
effect: effect,
|
|
13327
|
+
effectScope: effectScope,
|
|
13328
|
+
getCurrentInstance: getCurrentInstance,
|
|
13329
|
+
getCurrentScope: getCurrentScope,
|
|
13330
|
+
getTransitionRawChildren: getTransitionRawChildren,
|
|
13331
|
+
guardReactiveProps: guardReactiveProps,
|
|
13332
|
+
h: h,
|
|
13333
|
+
handleError: handleError,
|
|
13334
|
+
hydrate: hydrate,
|
|
13335
|
+
initCustomFormatter: initCustomFormatter,
|
|
13336
|
+
initDirectivesForSSR: initDirectivesForSSR,
|
|
13337
|
+
inject: inject,
|
|
13338
|
+
isMemoSame: isMemoSame,
|
|
13237
13339
|
isProxy: isProxy,
|
|
13238
13340
|
isReactive: isReactive,
|
|
13239
13341
|
isReadonly: isReadonly,
|
|
13342
|
+
isRef: isRef,
|
|
13343
|
+
isRuntimeOnly: isRuntimeOnly,
|
|
13240
13344
|
isShallow: isShallow,
|
|
13241
|
-
|
|
13242
|
-
triggerRef: triggerRef,
|
|
13243
|
-
shallowRef: shallowRef,
|
|
13244
|
-
shallowReactive: shallowReactive,
|
|
13245
|
-
shallowReadonly: shallowReadonly,
|
|
13345
|
+
isVNode: isVNode,
|
|
13246
13346
|
markRaw: markRaw,
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
onScopeDispose: onScopeDispose,
|
|
13255
|
-
computed: computed$1,
|
|
13256
|
-
watch: watch,
|
|
13257
|
-
watchEffect: watchEffect,
|
|
13258
|
-
watchPostEffect: watchPostEffect,
|
|
13259
|
-
watchSyncEffect: watchSyncEffect,
|
|
13347
|
+
mergeDefaults: mergeDefaults,
|
|
13348
|
+
mergeProps: mergeProps,
|
|
13349
|
+
nextTick: nextTick,
|
|
13350
|
+
normalizeClass: normalizeClass,
|
|
13351
|
+
normalizeProps: normalizeProps,
|
|
13352
|
+
normalizeStyle: normalizeStyle,
|
|
13353
|
+
onActivated: onActivated,
|
|
13260
13354
|
onBeforeMount: onBeforeMount,
|
|
13261
|
-
onMounted: onMounted,
|
|
13262
|
-
onBeforeUpdate: onBeforeUpdate,
|
|
13263
|
-
onUpdated: onUpdated,
|
|
13264
13355
|
onBeforeUnmount: onBeforeUnmount,
|
|
13265
|
-
|
|
13266
|
-
onActivated: onActivated,
|
|
13356
|
+
onBeforeUpdate: onBeforeUpdate,
|
|
13267
13357
|
onDeactivated: onDeactivated,
|
|
13358
|
+
onErrorCaptured: onErrorCaptured,
|
|
13359
|
+
onMounted: onMounted,
|
|
13268
13360
|
onRenderTracked: onRenderTracked,
|
|
13269
13361
|
onRenderTriggered: onRenderTriggered,
|
|
13270
|
-
|
|
13362
|
+
onScopeDispose: onScopeDispose,
|
|
13271
13363
|
onServerPrefetch: onServerPrefetch,
|
|
13364
|
+
onUnmounted: onUnmounted,
|
|
13365
|
+
onUpdated: onUpdated,
|
|
13366
|
+
openBlock: openBlock,
|
|
13367
|
+
popScopeId: popScopeId,
|
|
13272
13368
|
provide: provide,
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
defineComponent: defineComponent,
|
|
13276
|
-
defineAsyncComponent: defineAsyncComponent,
|
|
13277
|
-
useAttrs: useAttrs,
|
|
13278
|
-
useSlots: useSlots,
|
|
13279
|
-
defineProps: defineProps,
|
|
13280
|
-
defineEmits: defineEmits,
|
|
13281
|
-
defineExpose: defineExpose,
|
|
13282
|
-
withDefaults: withDefaults,
|
|
13283
|
-
mergeDefaults: mergeDefaults,
|
|
13284
|
-
createPropsRestProxy: createPropsRestProxy,
|
|
13285
|
-
withAsyncContext: withAsyncContext,
|
|
13286
|
-
getCurrentInstance: getCurrentInstance,
|
|
13287
|
-
h: h,
|
|
13288
|
-
createVNode: createVNode,
|
|
13289
|
-
cloneVNode: cloneVNode,
|
|
13290
|
-
mergeProps: mergeProps,
|
|
13291
|
-
isVNode: isVNode,
|
|
13292
|
-
Fragment: Fragment,
|
|
13293
|
-
Text: Text,
|
|
13294
|
-
Comment: Comment,
|
|
13295
|
-
Static: Static,
|
|
13296
|
-
Teleport: Teleport,
|
|
13297
|
-
Suspense: Suspense,
|
|
13298
|
-
KeepAlive: KeepAlive,
|
|
13299
|
-
BaseTransition: BaseTransition,
|
|
13300
|
-
withDirectives: withDirectives,
|
|
13301
|
-
useSSRContext: useSSRContext,
|
|
13302
|
-
ssrContextKey: ssrContextKey,
|
|
13303
|
-
createRenderer: createRenderer,
|
|
13304
|
-
createHydrationRenderer: createHydrationRenderer,
|
|
13369
|
+
proxyRefs: proxyRefs,
|
|
13370
|
+
pushScopeId: pushScopeId,
|
|
13305
13371
|
queuePostFlushCb: queuePostFlushCb,
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
|
|
13309
|
-
|
|
13372
|
+
reactive: reactive,
|
|
13373
|
+
readonly: readonly,
|
|
13374
|
+
ref: ref,
|
|
13375
|
+
registerRuntimeCompiler: registerRuntimeCompiler,
|
|
13376
|
+
render: render,
|
|
13377
|
+
renderList: renderList,
|
|
13378
|
+
renderSlot: renderSlot,
|
|
13310
13379
|
resolveComponent: resolveComponent,
|
|
13311
13380
|
resolveDirective: resolveDirective,
|
|
13312
13381
|
resolveDynamicComponent: resolveDynamicComponent,
|
|
13313
|
-
|
|
13314
|
-
isRuntimeOnly: isRuntimeOnly,
|
|
13315
|
-
useTransitionState: useTransitionState,
|
|
13382
|
+
resolveFilter: resolveFilter,
|
|
13316
13383
|
resolveTransitionHooks: resolveTransitionHooks,
|
|
13317
|
-
setTransitionHooks: setTransitionHooks,
|
|
13318
|
-
getTransitionRawChildren: getTransitionRawChildren,
|
|
13319
|
-
initCustomFormatter: initCustomFormatter,
|
|
13320
|
-
get devtools () { return devtools; },
|
|
13321
|
-
setDevtoolsHook: setDevtoolsHook,
|
|
13322
|
-
withCtx: withCtx,
|
|
13323
|
-
pushScopeId: pushScopeId,
|
|
13324
|
-
popScopeId: popScopeId,
|
|
13325
|
-
withScopeId: withScopeId,
|
|
13326
|
-
renderList: renderList,
|
|
13327
|
-
toHandlers: toHandlers,
|
|
13328
|
-
renderSlot: renderSlot,
|
|
13329
|
-
createSlots: createSlots,
|
|
13330
|
-
withMemo: withMemo,
|
|
13331
|
-
isMemoSame: isMemoSame,
|
|
13332
|
-
openBlock: openBlock,
|
|
13333
|
-
createBlock: createBlock,
|
|
13334
13384
|
setBlockTracking: setBlockTracking,
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
-
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
13385
|
+
setDevtoolsHook: setDevtoolsHook,
|
|
13386
|
+
setTransitionHooks: setTransitionHooks,
|
|
13387
|
+
shallowReactive: shallowReactive,
|
|
13388
|
+
shallowReadonly: shallowReadonly,
|
|
13389
|
+
shallowRef: shallowRef,
|
|
13390
|
+
ssrContextKey: ssrContextKey,
|
|
13391
|
+
ssrUtils: ssrUtils,
|
|
13392
|
+
stop: stop,
|
|
13341
13393
|
toDisplayString: toDisplayString,
|
|
13342
|
-
camelize: camelize,
|
|
13343
|
-
capitalize: capitalize,
|
|
13344
13394
|
toHandlerKey: toHandlerKey,
|
|
13345
|
-
|
|
13346
|
-
|
|
13347
|
-
|
|
13395
|
+
toHandlers: toHandlers,
|
|
13396
|
+
toRaw: toRaw,
|
|
13397
|
+
toRef: toRef,
|
|
13398
|
+
toRefs: toRefs,
|
|
13348
13399
|
transformVNodeArgs: transformVNodeArgs,
|
|
13400
|
+
triggerRef: triggerRef,
|
|
13401
|
+
unref: unref,
|
|
13402
|
+
useAttrs: useAttrs,
|
|
13403
|
+
useCssModule: useCssModule,
|
|
13404
|
+
useCssVars: useCssVars,
|
|
13405
|
+
useSSRContext: useSSRContext,
|
|
13406
|
+
useSlots: useSlots,
|
|
13407
|
+
useTransitionState: useTransitionState,
|
|
13408
|
+
vModelCheckbox: vModelCheckbox,
|
|
13409
|
+
vModelDynamic: vModelDynamic,
|
|
13410
|
+
vModelRadio: vModelRadio,
|
|
13411
|
+
vModelSelect: vModelSelect,
|
|
13412
|
+
vModelText: vModelText,
|
|
13413
|
+
vShow: vShow,
|
|
13349
13414
|
version: version,
|
|
13350
|
-
|
|
13351
|
-
|
|
13352
|
-
|
|
13415
|
+
warn: warn,
|
|
13416
|
+
watch: watch,
|
|
13417
|
+
watchEffect: watchEffect,
|
|
13418
|
+
watchPostEffect: watchPostEffect,
|
|
13419
|
+
watchSyncEffect: watchSyncEffect,
|
|
13420
|
+
withAsyncContext: withAsyncContext,
|
|
13421
|
+
withCtx: withCtx,
|
|
13422
|
+
withDefaults: withDefaults,
|
|
13423
|
+
withDirectives: withDirectives,
|
|
13424
|
+
withKeys: withKeys,
|
|
13425
|
+
withMemo: withMemo,
|
|
13426
|
+
withModifiers: withModifiers,
|
|
13427
|
+
withScopeId: withScopeId
|
|
13353
13428
|
});
|
|
13354
13429
|
|
|
13355
13430
|
function initDev() {
|
|
@@ -13379,7 +13454,7 @@ function wrappedCreateApp(...args) {
|
|
|
13379
13454
|
}
|
|
13380
13455
|
return app;
|
|
13381
13456
|
}
|
|
13382
|
-
function createCompatVue
|
|
13457
|
+
function createCompatVue() {
|
|
13383
13458
|
const Vue = compatUtils.createCompatVue(createApp, wrappedCreateApp);
|
|
13384
13459
|
extend(Vue, runtimeDom);
|
|
13385
13460
|
return Vue;
|
|
@@ -13442,7 +13517,7 @@ const errorMessages = {
|
|
|
13442
13517
|
[34 /* ErrorCodes.X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`,
|
|
13443
13518
|
[35 /* ErrorCodes.X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`,
|
|
13444
13519
|
[36 /* ErrorCodes.X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`,
|
|
13445
|
-
[37 /* ErrorCodes.X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template
|
|
13520
|
+
[37 /* ErrorCodes.X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>. ` +
|
|
13446
13521
|
`When there are multiple named slots, all slots should use <template> ` +
|
|
13447
13522
|
`syntax to avoid scope ambiguity.`,
|
|
13448
13523
|
[38 /* ErrorCodes.X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `,
|
|
@@ -13565,7 +13640,7 @@ function createRoot(children, loc = locStub) {
|
|
|
13565
13640
|
return {
|
|
13566
13641
|
type: 0 /* NodeTypes.ROOT */,
|
|
13567
13642
|
children,
|
|
13568
|
-
helpers:
|
|
13643
|
+
helpers: new Set(),
|
|
13569
13644
|
components: [],
|
|
13570
13645
|
directives: [],
|
|
13571
13646
|
hoists: [],
|
|
@@ -13863,7 +13938,7 @@ function hasDynamicKeyVBind(node) {
|
|
|
13863
13938
|
!p.arg.isStatic) // v-bind:[foo]
|
|
13864
13939
|
);
|
|
13865
13940
|
}
|
|
13866
|
-
function isText(node) {
|
|
13941
|
+
function isText$1(node) {
|
|
13867
13942
|
return node.type === 5 /* NodeTypes.INTERPOLATION */ || node.type === 2 /* NodeTypes.TEXT */;
|
|
13868
13943
|
}
|
|
13869
13944
|
function isVSlot(p) {
|
|
@@ -14011,7 +14086,7 @@ function makeBlock(node, { helper, removeHelper, inSSR }) {
|
|
|
14011
14086
|
}
|
|
14012
14087
|
}
|
|
14013
14088
|
|
|
14014
|
-
const deprecationData
|
|
14089
|
+
const deprecationData = {
|
|
14015
14090
|
["COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */]: {
|
|
14016
14091
|
message: `Platform-native elements with "is" prop will no longer be ` +
|
|
14017
14092
|
`treated as components in Vue 3 unless the "is" value is explicitly ` +
|
|
@@ -14075,26 +14150,26 @@ function getCompatValue(key, context) {
|
|
|
14075
14150
|
return value;
|
|
14076
14151
|
}
|
|
14077
14152
|
}
|
|
14078
|
-
function isCompatEnabled
|
|
14153
|
+
function isCompatEnabled(key, context) {
|
|
14079
14154
|
const mode = getCompatValue('MODE', context);
|
|
14080
14155
|
const value = getCompatValue(key, context);
|
|
14081
14156
|
// in v3 mode, only enable if explicitly set to true
|
|
14082
14157
|
// otherwise enable for any non-false value
|
|
14083
14158
|
return mode === 3 ? value === true : value !== false;
|
|
14084
14159
|
}
|
|
14085
|
-
function checkCompatEnabled
|
|
14086
|
-
const enabled = isCompatEnabled
|
|
14160
|
+
function checkCompatEnabled(key, context, loc, ...args) {
|
|
14161
|
+
const enabled = isCompatEnabled(key, context);
|
|
14087
14162
|
if ((process.env.NODE_ENV !== 'production') && enabled) {
|
|
14088
|
-
warnDeprecation
|
|
14163
|
+
warnDeprecation(key, context, loc, ...args);
|
|
14089
14164
|
}
|
|
14090
14165
|
return enabled;
|
|
14091
14166
|
}
|
|
14092
|
-
function warnDeprecation
|
|
14167
|
+
function warnDeprecation(key, context, loc, ...args) {
|
|
14093
14168
|
const val = getCompatValue(key, context);
|
|
14094
14169
|
if (val === 'suppress-warning') {
|
|
14095
14170
|
return;
|
|
14096
14171
|
}
|
|
14097
|
-
const { message, link } = deprecationData
|
|
14172
|
+
const { message, link } = deprecationData[key];
|
|
14098
14173
|
const msg = `(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`;
|
|
14099
14174
|
const err = new SyntaxError(msg);
|
|
14100
14175
|
err.code = key;
|
|
@@ -14216,13 +14291,13 @@ function parseChildren(context, mode, ancestors) {
|
|
|
14216
14291
|
else if (/[a-z]/i.test(s[1])) {
|
|
14217
14292
|
node = parseElement(context, ancestors);
|
|
14218
14293
|
// 2.x <template> with no directive compat
|
|
14219
|
-
if (isCompatEnabled
|
|
14294
|
+
if (isCompatEnabled("COMPILER_NATIVE_TEMPLATE" /* CompilerDeprecationTypes.COMPILER_NATIVE_TEMPLATE */, context) &&
|
|
14220
14295
|
node &&
|
|
14221
14296
|
node.tag === 'template' &&
|
|
14222
14297
|
!node.props.some(p => p.type === 7 /* NodeTypes.DIRECTIVE */ &&
|
|
14223
14298
|
isSpecialTemplateDirective(p.name))) {
|
|
14224
14299
|
(process.env.NODE_ENV !== 'production') &&
|
|
14225
|
-
warnDeprecation
|
|
14300
|
+
warnDeprecation("COMPILER_NATIVE_TEMPLATE" /* CompilerDeprecationTypes.COMPILER_NATIVE_TEMPLATE */, context, node.loc);
|
|
14226
14301
|
node = node.children;
|
|
14227
14302
|
}
|
|
14228
14303
|
}
|
|
@@ -14422,7 +14497,7 @@ function parseElement(context, ancestors) {
|
|
|
14422
14497
|
{
|
|
14423
14498
|
const inlineTemplateProp = element.props.find(p => p.type === 6 /* NodeTypes.ATTRIBUTE */ && p.name === 'inline-template');
|
|
14424
14499
|
if (inlineTemplateProp &&
|
|
14425
|
-
checkCompatEnabled
|
|
14500
|
+
checkCompatEnabled("COMPILER_INLINE_TEMPLATE" /* CompilerDeprecationTypes.COMPILER_INLINE_TEMPLATE */, context, inlineTemplateProp.loc)) {
|
|
14426
14501
|
const loc = getSelection(context, element.loc.end);
|
|
14427
14502
|
inlineTemplateProp.value = {
|
|
14428
14503
|
type: 2 /* NodeTypes.TEXT */,
|
|
@@ -14500,7 +14575,7 @@ function parseTag(context, type, parent) {
|
|
|
14500
14575
|
}
|
|
14501
14576
|
// 2.x deprecation checks
|
|
14502
14577
|
if ((process.env.NODE_ENV !== 'production') &&
|
|
14503
|
-
isCompatEnabled
|
|
14578
|
+
isCompatEnabled("COMPILER_V_IF_V_FOR_PRECEDENCE" /* CompilerDeprecationTypes.COMPILER_V_IF_V_FOR_PRECEDENCE */, context)) {
|
|
14504
14579
|
let hasIf = false;
|
|
14505
14580
|
let hasFor = false;
|
|
14506
14581
|
for (let i = 0; i < props.length; i++) {
|
|
@@ -14514,7 +14589,7 @@ function parseTag(context, type, parent) {
|
|
|
14514
14589
|
}
|
|
14515
14590
|
}
|
|
14516
14591
|
if (hasIf && hasFor) {
|
|
14517
|
-
warnDeprecation
|
|
14592
|
+
warnDeprecation("COMPILER_V_IF_V_FOR_PRECEDENCE" /* CompilerDeprecationTypes.COMPILER_V_IF_V_FOR_PRECEDENCE */, context, getSelection(context, start));
|
|
14518
14593
|
break;
|
|
14519
14594
|
}
|
|
14520
14595
|
}
|
|
@@ -14566,7 +14641,7 @@ function isComponent(tag, props, context) {
|
|
|
14566
14641
|
if (p.value.content.startsWith('vue:')) {
|
|
14567
14642
|
return true;
|
|
14568
14643
|
}
|
|
14569
|
-
else if (checkCompatEnabled
|
|
14644
|
+
else if (checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context, p.loc)) {
|
|
14570
14645
|
return true;
|
|
14571
14646
|
}
|
|
14572
14647
|
}
|
|
@@ -14582,7 +14657,7 @@ function isComponent(tag, props, context) {
|
|
|
14582
14657
|
p.name === 'bind' &&
|
|
14583
14658
|
isStaticArgOf(p.arg, 'is') &&
|
|
14584
14659
|
true &&
|
|
14585
|
-
checkCompatEnabled
|
|
14660
|
+
checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context, p.loc)) {
|
|
14586
14661
|
return true;
|
|
14587
14662
|
}
|
|
14588
14663
|
}
|
|
@@ -14708,12 +14783,12 @@ function parseAttribute(context, nameSet) {
|
|
|
14708
14783
|
// 2.x compat v-bind:foo.sync -> v-model:foo
|
|
14709
14784
|
if (dirName === 'bind' && arg) {
|
|
14710
14785
|
if (modifiers.includes('sync') &&
|
|
14711
|
-
checkCompatEnabled
|
|
14786
|
+
checkCompatEnabled("COMPILER_V_BIND_SYNC" /* CompilerDeprecationTypes.COMPILER_V_BIND_SYNC */, context, loc, arg.loc.source)) {
|
|
14712
14787
|
dirName = 'model';
|
|
14713
14788
|
modifiers.splice(modifiers.indexOf('sync'), 1);
|
|
14714
14789
|
}
|
|
14715
14790
|
if ((process.env.NODE_ENV !== 'production') && modifiers.includes('prop')) {
|
|
14716
|
-
checkCompatEnabled
|
|
14791
|
+
checkCompatEnabled("COMPILER_V_BIND_PROP" /* CompilerDeprecationTypes.COMPILER_V_BIND_PROP */, context, loc);
|
|
14717
14792
|
}
|
|
14718
14793
|
}
|
|
14719
14794
|
return {
|
|
@@ -14928,7 +15003,7 @@ function startsWithEndTagOpen(source, tag) {
|
|
|
14928
15003
|
}
|
|
14929
15004
|
|
|
14930
15005
|
function hoistStatic(root, context) {
|
|
14931
|
-
walk
|
|
15006
|
+
walk(root, context,
|
|
14932
15007
|
// Root node is unfortunately non-hoistable due to potential parent
|
|
14933
15008
|
// fallthrough attributes.
|
|
14934
15009
|
isSingleElementRoot(root, root.children[0]));
|
|
@@ -14939,7 +15014,7 @@ function isSingleElementRoot(root, child) {
|
|
|
14939
15014
|
child.type === 1 /* NodeTypes.ELEMENT */ &&
|
|
14940
15015
|
!isSlotOutlet(child));
|
|
14941
15016
|
}
|
|
14942
|
-
function walk
|
|
15017
|
+
function walk(node, context, doNotHoistNode = false) {
|
|
14943
15018
|
const { children } = node;
|
|
14944
15019
|
const originalCount = children.length;
|
|
14945
15020
|
let hoistedCount = 0;
|
|
@@ -14988,19 +15063,19 @@ function walk$1(node, context, doNotHoistNode = false) {
|
|
|
14988
15063
|
if (isComponent) {
|
|
14989
15064
|
context.scopes.vSlot++;
|
|
14990
15065
|
}
|
|
14991
|
-
walk
|
|
15066
|
+
walk(child, context);
|
|
14992
15067
|
if (isComponent) {
|
|
14993
15068
|
context.scopes.vSlot--;
|
|
14994
15069
|
}
|
|
14995
15070
|
}
|
|
14996
15071
|
else if (child.type === 11 /* NodeTypes.FOR */) {
|
|
14997
15072
|
// Do not hoist v-for single child because it has to be a block
|
|
14998
|
-
walk
|
|
15073
|
+
walk(child, context, child.children.length === 1);
|
|
14999
15074
|
}
|
|
15000
15075
|
else if (child.type === 9 /* NodeTypes.IF */) {
|
|
15001
15076
|
for (let i = 0; i < child.branches.length; i++) {
|
|
15002
15077
|
// Do not hoist v-if single child because it has to be a block
|
|
15003
|
-
walk
|
|
15078
|
+
walk(child.branches[i], context, child.branches[i].children.length === 1);
|
|
15004
15079
|
}
|
|
15005
15080
|
}
|
|
15006
15081
|
}
|
|
@@ -15349,7 +15424,7 @@ function transform(root, options) {
|
|
|
15349
15424
|
createRootCodegen(root, context);
|
|
15350
15425
|
}
|
|
15351
15426
|
// finalize meta information
|
|
15352
|
-
root.helpers = [...context.helpers.keys()];
|
|
15427
|
+
root.helpers = new Set([...context.helpers.keys()]);
|
|
15353
15428
|
root.components = [...context.components];
|
|
15354
15429
|
root.directives = [...context.directives];
|
|
15355
15430
|
root.imports = context.imports;
|
|
@@ -15556,12 +15631,16 @@ function generate(ast, options = {}) {
|
|
|
15556
15631
|
if (options.onContextCreated)
|
|
15557
15632
|
options.onContextCreated(context);
|
|
15558
15633
|
const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context;
|
|
15559
|
-
const
|
|
15634
|
+
const helpers = Array.from(ast.helpers);
|
|
15635
|
+
const hasHelpers = helpers.length > 0;
|
|
15560
15636
|
const useWithBlock = !prefixIdentifiers && mode !== 'module';
|
|
15637
|
+
const isSetupInlined = !true ;
|
|
15561
15638
|
// preambles
|
|
15562
15639
|
// in setup() inline mode, the preamble is generated in a sub context
|
|
15563
15640
|
// and returned separately.
|
|
15564
|
-
const preambleContext =
|
|
15641
|
+
const preambleContext = isSetupInlined
|
|
15642
|
+
? createCodegenContext(ast, options)
|
|
15643
|
+
: context;
|
|
15565
15644
|
{
|
|
15566
15645
|
genFunctionPreamble(ast, preambleContext);
|
|
15567
15646
|
}
|
|
@@ -15579,7 +15658,7 @@ function generate(ast, options = {}) {
|
|
|
15579
15658
|
// function mode const declarations should be inside with block
|
|
15580
15659
|
// also they should be renamed to avoid collision with user properties
|
|
15581
15660
|
if (hasHelpers) {
|
|
15582
|
-
push(`const { ${
|
|
15661
|
+
push(`const { ${helpers.map(aliasHelper).join(', ')} } = _Vue`);
|
|
15583
15662
|
push(`\n`);
|
|
15584
15663
|
newline();
|
|
15585
15664
|
}
|
|
@@ -15631,7 +15710,7 @@ function generate(ast, options = {}) {
|
|
|
15631
15710
|
return {
|
|
15632
15711
|
ast,
|
|
15633
15712
|
code: context.code,
|
|
15634
|
-
preamble: ``,
|
|
15713
|
+
preamble: isSetupInlined ? preambleContext.code : ``,
|
|
15635
15714
|
// SourceMapGenerator does have toJSON() method but it's not in the types
|
|
15636
15715
|
map: context.map ? context.map.toJSON() : undefined
|
|
15637
15716
|
};
|
|
@@ -15643,7 +15722,8 @@ function genFunctionPreamble(ast, context) {
|
|
|
15643
15722
|
// In prefix mode, we place the const declaration at top so it's done
|
|
15644
15723
|
// only once; But if we not prefixing, we place the declaration inside the
|
|
15645
15724
|
// with block so it doesn't incur the `in` check cost for every helper access.
|
|
15646
|
-
|
|
15725
|
+
const helpers = Array.from(ast.helpers);
|
|
15726
|
+
if (helpers.length > 0) {
|
|
15647
15727
|
{
|
|
15648
15728
|
// "with" mode.
|
|
15649
15729
|
// save Vue in a separate variable to avoid collision
|
|
@@ -15659,7 +15739,7 @@ function genFunctionPreamble(ast, context) {
|
|
|
15659
15739
|
CREATE_TEXT,
|
|
15660
15740
|
CREATE_STATIC
|
|
15661
15741
|
]
|
|
15662
|
-
.filter(helper =>
|
|
15742
|
+
.filter(helper => helpers.includes(helper))
|
|
15663
15743
|
.map(aliasHelper)
|
|
15664
15744
|
.join(', ');
|
|
15665
15745
|
push(`const { ${staticHelpers} } = _Vue\n`);
|
|
@@ -15706,7 +15786,7 @@ function genHoists(hoists, context) {
|
|
|
15706
15786
|
}
|
|
15707
15787
|
context.pure = false;
|
|
15708
15788
|
}
|
|
15709
|
-
function isText
|
|
15789
|
+
function isText(n) {
|
|
15710
15790
|
return (isString(n) ||
|
|
15711
15791
|
n.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */ ||
|
|
15712
15792
|
n.type === 2 /* NodeTypes.TEXT */ ||
|
|
@@ -15715,7 +15795,7 @@ function isText$1(n) {
|
|
|
15715
15795
|
}
|
|
15716
15796
|
function genNodeListAsArray(nodes, context) {
|
|
15717
15797
|
const multilines = nodes.length > 3 ||
|
|
15718
|
-
(((process.env.NODE_ENV !== 'production')) && nodes.some(n => isArray(n) || !isText
|
|
15798
|
+
(((process.env.NODE_ENV !== 'production')) && nodes.some(n => isArray(n) || !isText(n)));
|
|
15719
15799
|
context.push(`[`);
|
|
15720
15800
|
multilines && context.indent();
|
|
15721
15801
|
genNodeList(nodes, context, multilines);
|
|
@@ -16057,11 +16137,11 @@ function genCacheExpression(node, context) {
|
|
|
16057
16137
|
}
|
|
16058
16138
|
|
|
16059
16139
|
// these keywords should not appear inside expressions, but operators like
|
|
16060
|
-
// typeof, instanceof and in are allowed
|
|
16140
|
+
// 'typeof', 'instanceof', and 'in' are allowed
|
|
16061
16141
|
const prohibitedKeywordRE = new RegExp('\\b' +
|
|
16062
|
-
('
|
|
16063
|
-
'
|
|
16064
|
-
'
|
|
16142
|
+
('arguments,await,break,case,catch,class,const,continue,debugger,default,' +
|
|
16143
|
+
'delete,do,else,export,extends,finally,for,function,if,import,let,new,' +
|
|
16144
|
+
'return,super,switch,throw,try,var,void,while,with,yield')
|
|
16065
16145
|
.split(',')
|
|
16066
16146
|
.join('\\b|\\b') +
|
|
16067
16147
|
'\\b');
|
|
@@ -16965,7 +17045,7 @@ function resolveComponentType(node, context, ssr = false) {
|
|
|
16965
17045
|
const isProp = findProp(node, 'is');
|
|
16966
17046
|
if (isProp) {
|
|
16967
17047
|
if (isExplicitDynamic ||
|
|
16968
|
-
(isCompatEnabled
|
|
17048
|
+
(isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context))) {
|
|
16969
17049
|
const exp = isProp.type === 6 /* NodeTypes.ATTRIBUTE */
|
|
16970
17050
|
? isProp.value && createSimpleExpression(isProp.value.content, true)
|
|
16971
17051
|
: isProp.exp;
|
|
@@ -17093,7 +17173,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
17093
17173
|
if (name === 'is' &&
|
|
17094
17174
|
(isComponentTag(tag) ||
|
|
17095
17175
|
(value && value.content.startsWith('vue:')) ||
|
|
17096
|
-
(isCompatEnabled
|
|
17176
|
+
(isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context)))) {
|
|
17097
17177
|
continue;
|
|
17098
17178
|
}
|
|
17099
17179
|
properties.push(createObjectProperty(createSimpleExpression(name, true, getInnerRange(loc, 0, name.length)), createSimpleExpression(value ? value.content : '', isStatic, value ? value.loc : loc)));
|
|
@@ -17119,7 +17199,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
17119
17199
|
(isVBind &&
|
|
17120
17200
|
isStaticArgOf(arg, 'is') &&
|
|
17121
17201
|
(isComponentTag(tag) ||
|
|
17122
|
-
(isCompatEnabled
|
|
17202
|
+
(isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* CompilerDeprecationTypes.COMPILER_IS_ON_ELEMENT */, context))))) {
|
|
17123
17203
|
continue;
|
|
17124
17204
|
}
|
|
17125
17205
|
// skip v-on in SSR compilation
|
|
@@ -17165,10 +17245,10 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
17165
17245
|
}
|
|
17166
17246
|
});
|
|
17167
17247
|
if (hasOverridableKeys) {
|
|
17168
|
-
checkCompatEnabled
|
|
17248
|
+
checkCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* CompilerDeprecationTypes.COMPILER_V_BIND_OBJECT_ORDER */, context, loc);
|
|
17169
17249
|
}
|
|
17170
17250
|
}
|
|
17171
|
-
if (isCompatEnabled
|
|
17251
|
+
if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* CompilerDeprecationTypes.COMPILER_V_BIND_OBJECT_ORDER */, context)) {
|
|
17172
17252
|
mergeArgs.unshift(exp);
|
|
17173
17253
|
continue;
|
|
17174
17254
|
}
|
|
@@ -17348,7 +17428,7 @@ function dedupeProperties(properties) {
|
|
|
17348
17428
|
const existing = knownProps.get(name);
|
|
17349
17429
|
if (existing) {
|
|
17350
17430
|
if (name === 'style' || name === 'class' || isOn(name)) {
|
|
17351
|
-
mergeAsArray
|
|
17431
|
+
mergeAsArray(existing, prop);
|
|
17352
17432
|
}
|
|
17353
17433
|
// unexpected duplicate, should have emitted error during parse
|
|
17354
17434
|
}
|
|
@@ -17359,7 +17439,7 @@ function dedupeProperties(properties) {
|
|
|
17359
17439
|
}
|
|
17360
17440
|
return deduped;
|
|
17361
17441
|
}
|
|
17362
|
-
function mergeAsArray
|
|
17442
|
+
function mergeAsArray(existing, incoming) {
|
|
17363
17443
|
if (existing.value.type === 17 /* NodeTypes.JS_ARRAY_EXPRESSION */) {
|
|
17364
17444
|
existing.value.elements.push(incoming.value);
|
|
17365
17445
|
}
|
|
@@ -17487,7 +17567,7 @@ function processSlotOutlet(node, context) {
|
|
|
17487
17567
|
}
|
|
17488
17568
|
|
|
17489
17569
|
const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
17490
|
-
const transformOn = (dir, node, context, augmentor) => {
|
|
17570
|
+
const transformOn$1 = (dir, node, context, augmentor) => {
|
|
17491
17571
|
const { loc, modifiers, arg } = dir;
|
|
17492
17572
|
if (!dir.exp && !modifiers.length) {
|
|
17493
17573
|
context.onError(createCompilerError(35 /* ErrorCodes.X_V_ON_NO_EXPRESSION */, loc));
|
|
@@ -17647,11 +17727,11 @@ const transformText = (node, context) => {
|
|
|
17647
17727
|
let hasText = false;
|
|
17648
17728
|
for (let i = 0; i < children.length; i++) {
|
|
17649
17729
|
const child = children[i];
|
|
17650
|
-
if (isText(child)) {
|
|
17730
|
+
if (isText$1(child)) {
|
|
17651
17731
|
hasText = true;
|
|
17652
17732
|
for (let j = i + 1; j < children.length; j++) {
|
|
17653
17733
|
const next = children[j];
|
|
17654
|
-
if (isText(next)) {
|
|
17734
|
+
if (isText$1(next)) {
|
|
17655
17735
|
if (!currentContainer) {
|
|
17656
17736
|
currentContainer = children[i] = createCompoundExpression([child], child.loc);
|
|
17657
17737
|
}
|
|
@@ -17693,7 +17773,7 @@ const transformText = (node, context) => {
|
|
|
17693
17773
|
// runtime normalization.
|
|
17694
17774
|
for (let i = 0; i < children.length; i++) {
|
|
17695
17775
|
const child = children[i];
|
|
17696
|
-
if (isText(child) || child.type === 8 /* NodeTypes.COMPOUND_EXPRESSION */) {
|
|
17776
|
+
if (isText$1(child) || child.type === 8 /* NodeTypes.COMPOUND_EXPRESSION */) {
|
|
17697
17777
|
const callArgs = [];
|
|
17698
17778
|
// createTextVNode defaults to single whitespace, so if it is a
|
|
17699
17779
|
// single space the code could be an empty call to save bytes.
|
|
@@ -17718,13 +17798,13 @@ const transformText = (node, context) => {
|
|
|
17718
17798
|
}
|
|
17719
17799
|
};
|
|
17720
17800
|
|
|
17721
|
-
const seen = new WeakSet();
|
|
17801
|
+
const seen$1 = new WeakSet();
|
|
17722
17802
|
const transformOnce = (node, context) => {
|
|
17723
17803
|
if (node.type === 1 /* NodeTypes.ELEMENT */ && findDir(node, 'once', true)) {
|
|
17724
|
-
if (seen.has(node) || context.inVOnce) {
|
|
17804
|
+
if (seen$1.has(node) || context.inVOnce) {
|
|
17725
17805
|
return;
|
|
17726
17806
|
}
|
|
17727
|
-
seen.add(node);
|
|
17807
|
+
seen$1.add(node);
|
|
17728
17808
|
context.inVOnce = true;
|
|
17729
17809
|
context.helper(SET_BLOCK_TRACKING);
|
|
17730
17810
|
return () => {
|
|
@@ -17737,7 +17817,7 @@ const transformOnce = (node, context) => {
|
|
|
17737
17817
|
}
|
|
17738
17818
|
};
|
|
17739
17819
|
|
|
17740
|
-
const transformModel = (dir, node, context) => {
|
|
17820
|
+
const transformModel$1 = (dir, node, context) => {
|
|
17741
17821
|
const { exp, arg } = dir;
|
|
17742
17822
|
if (!exp) {
|
|
17743
17823
|
context.onError(createCompilerError(41 /* ErrorCodes.X_V_MODEL_NO_EXPRESSION */, dir.loc));
|
|
@@ -17763,7 +17843,7 @@ const transformModel = (dir, node, context) => {
|
|
|
17763
17843
|
const propName = arg ? arg : createSimpleExpression('modelValue', true);
|
|
17764
17844
|
const eventName = arg
|
|
17765
17845
|
? isStaticExp(arg)
|
|
17766
|
-
? `onUpdate:${arg.content}`
|
|
17846
|
+
? `onUpdate:${camelize(arg.content)}`
|
|
17767
17847
|
: createCompoundExpression(['"onUpdate:" + ', arg])
|
|
17768
17848
|
: `onUpdate:modelValue`;
|
|
17769
17849
|
let assignmentExp;
|
|
@@ -17801,7 +17881,7 @@ function createTransformProps(props = []) {
|
|
|
17801
17881
|
|
|
17802
17882
|
const validDivisionCharRE = /[\w).+\-_$\]]/;
|
|
17803
17883
|
const transformFilter = (node, context) => {
|
|
17804
|
-
if (!isCompatEnabled
|
|
17884
|
+
if (!isCompatEnabled("COMPILER_FILTER" /* CompilerDeprecationTypes.COMPILER_FILTERS */, context)) {
|
|
17805
17885
|
return;
|
|
17806
17886
|
}
|
|
17807
17887
|
if (node.type === 5 /* NodeTypes.INTERPOLATION */) {
|
|
@@ -17943,7 +18023,7 @@ function parseFilter(node, context) {
|
|
|
17943
18023
|
}
|
|
17944
18024
|
if (filters.length) {
|
|
17945
18025
|
(process.env.NODE_ENV !== 'production') &&
|
|
17946
|
-
warnDeprecation
|
|
18026
|
+
warnDeprecation("COMPILER_FILTER" /* CompilerDeprecationTypes.COMPILER_FILTERS */, context, node.loc);
|
|
17947
18027
|
for (i = 0; i < filters.length; i++) {
|
|
17948
18028
|
expression = wrapFilter(expression, filters[i], context);
|
|
17949
18029
|
}
|
|
@@ -17965,14 +18045,14 @@ function wrapFilter(exp, filter, context) {
|
|
|
17965
18045
|
}
|
|
17966
18046
|
}
|
|
17967
18047
|
|
|
17968
|
-
const seen
|
|
18048
|
+
const seen = new WeakSet();
|
|
17969
18049
|
const transformMemo = (node, context) => {
|
|
17970
18050
|
if (node.type === 1 /* NodeTypes.ELEMENT */) {
|
|
17971
18051
|
const dir = findDir(node, 'memo');
|
|
17972
|
-
if (!dir || seen
|
|
18052
|
+
if (!dir || seen.has(node)) {
|
|
17973
18053
|
return;
|
|
17974
18054
|
}
|
|
17975
|
-
seen
|
|
18055
|
+
seen.add(node);
|
|
17976
18056
|
return () => {
|
|
17977
18057
|
const codegenNode = node.codegenNode ||
|
|
17978
18058
|
context.currentNode.codegenNode;
|
|
@@ -18009,9 +18089,9 @@ function getBaseTransformPreset(prefixIdentifiers) {
|
|
|
18009
18089
|
transformText
|
|
18010
18090
|
],
|
|
18011
18091
|
{
|
|
18012
|
-
on: transformOn,
|
|
18092
|
+
on: transformOn$1,
|
|
18013
18093
|
bind: transformBind,
|
|
18014
|
-
model: transformModel
|
|
18094
|
+
model: transformModel$1
|
|
18015
18095
|
}
|
|
18016
18096
|
];
|
|
18017
18097
|
}
|
|
@@ -18062,7 +18142,7 @@ const V_MODEL_DYNAMIC = Symbol((process.env.NODE_ENV !== 'production') ? `vModel
|
|
|
18062
18142
|
const V_ON_WITH_MODIFIERS = Symbol((process.env.NODE_ENV !== 'production') ? `vOnModifiersGuard` : ``);
|
|
18063
18143
|
const V_ON_WITH_KEYS = Symbol((process.env.NODE_ENV !== 'production') ? `vOnKeysGuard` : ``);
|
|
18064
18144
|
const V_SHOW = Symbol((process.env.NODE_ENV !== 'production') ? `vShow` : ``);
|
|
18065
|
-
const TRANSITION
|
|
18145
|
+
const TRANSITION = Symbol((process.env.NODE_ENV !== 'production') ? `Transition` : ``);
|
|
18066
18146
|
const TRANSITION_GROUP = Symbol((process.env.NODE_ENV !== 'production') ? `TransitionGroup` : ``);
|
|
18067
18147
|
registerRuntimeHelpers({
|
|
18068
18148
|
[V_MODEL_RADIO]: `vModelRadio`,
|
|
@@ -18073,7 +18153,7 @@ registerRuntimeHelpers({
|
|
|
18073
18153
|
[V_ON_WITH_MODIFIERS]: `withModifiers`,
|
|
18074
18154
|
[V_ON_WITH_KEYS]: `withKeys`,
|
|
18075
18155
|
[V_SHOW]: `vShow`,
|
|
18076
|
-
[TRANSITION
|
|
18156
|
+
[TRANSITION]: `Transition`,
|
|
18077
18157
|
[TRANSITION_GROUP]: `TransitionGroup`
|
|
18078
18158
|
});
|
|
18079
18159
|
|
|
@@ -18101,7 +18181,7 @@ const parserOptions = {
|
|
|
18101
18181
|
decodeEntities: decodeHtmlBrowser ,
|
|
18102
18182
|
isBuiltInComponent: (tag) => {
|
|
18103
18183
|
if (isBuiltInType(tag, `Transition`)) {
|
|
18104
|
-
return TRANSITION
|
|
18184
|
+
return TRANSITION;
|
|
18105
18185
|
}
|
|
18106
18186
|
else if (isBuiltInType(tag, `TransitionGroup`)) {
|
|
18107
18187
|
return TRANSITION_GROUP;
|
|
@@ -18241,8 +18321,8 @@ const transformVText = (dir, node, context) => {
|
|
|
18241
18321
|
};
|
|
18242
18322
|
};
|
|
18243
18323
|
|
|
18244
|
-
const transformModel
|
|
18245
|
-
const baseResult = transformModel(dir, node, context);
|
|
18324
|
+
const transformModel = (dir, node, context) => {
|
|
18325
|
+
const baseResult = transformModel$1(dir, node, context);
|
|
18246
18326
|
// base transform has errors OR component v-model (only need props)
|
|
18247
18327
|
if (!baseResult.props.length || node.tagType === 1 /* ElementTypes.COMPONENT */) {
|
|
18248
18328
|
return baseResult;
|
|
@@ -18342,7 +18422,7 @@ const resolveModifiers = (key, modifiers, context, loc) => {
|
|
|
18342
18422
|
for (let i = 0; i < modifiers.length; i++) {
|
|
18343
18423
|
const modifier = modifiers[i];
|
|
18344
18424
|
if (modifier === 'native' &&
|
|
18345
|
-
checkCompatEnabled
|
|
18425
|
+
checkCompatEnabled("COMPILER_V_ON_NATIVE" /* CompilerDeprecationTypes.COMPILER_V_ON_NATIVE */, context, loc)) {
|
|
18346
18426
|
eventOptionModifiers.push(modifier);
|
|
18347
18427
|
}
|
|
18348
18428
|
else if (isEventOptionModifier(modifier)) {
|
|
@@ -18396,8 +18476,8 @@ const transformClick = (key, event) => {
|
|
|
18396
18476
|
])
|
|
18397
18477
|
: key;
|
|
18398
18478
|
};
|
|
18399
|
-
const transformOn
|
|
18400
|
-
return transformOn(dir, node, context, baseResult => {
|
|
18479
|
+
const transformOn = (dir, node, context) => {
|
|
18480
|
+
return transformOn$1(dir, node, context, baseResult => {
|
|
18401
18481
|
const { modifiers } = dir;
|
|
18402
18482
|
if (!modifiers.length)
|
|
18403
18483
|
return baseResult;
|
|
@@ -18451,7 +18531,7 @@ const transformTransition = (node, context) => {
|
|
|
18451
18531
|
if (node.type === 1 /* NodeTypes.ELEMENT */ &&
|
|
18452
18532
|
node.tagType === 1 /* ElementTypes.COMPONENT */) {
|
|
18453
18533
|
const component = context.isBuiltInComponent(node.tag);
|
|
18454
|
-
if (component === TRANSITION
|
|
18534
|
+
if (component === TRANSITION) {
|
|
18455
18535
|
return () => {
|
|
18456
18536
|
if (!node.children.length) {
|
|
18457
18537
|
return;
|
|
@@ -18510,11 +18590,11 @@ const DOMDirectiveTransforms = {
|
|
|
18510
18590
|
cloak: noopDirectiveTransform,
|
|
18511
18591
|
html: transformVHtml,
|
|
18512
18592
|
text: transformVText,
|
|
18513
|
-
model: transformModel
|
|
18514
|
-
on: transformOn
|
|
18593
|
+
model: transformModel,
|
|
18594
|
+
on: transformOn,
|
|
18515
18595
|
show: transformShow
|
|
18516
18596
|
};
|
|
18517
|
-
function compile
|
|
18597
|
+
function compile(template, options = {}) {
|
|
18518
18598
|
return baseCompile(template, extend({}, parserOptions, options, {
|
|
18519
18599
|
nodeTransforms: [
|
|
18520
18600
|
// ignore <script> and <tag>
|
|
@@ -18537,7 +18617,7 @@ function compileToFunction(template, options) {
|
|
|
18537
18617
|
template = template.innerHTML;
|
|
18538
18618
|
}
|
|
18539
18619
|
else {
|
|
18540
|
-
(process.env.NODE_ENV !== 'production') && warn
|
|
18620
|
+
(process.env.NODE_ENV !== 'production') && warn(`invalid template option: `, template);
|
|
18541
18621
|
return NOOP;
|
|
18542
18622
|
}
|
|
18543
18623
|
}
|
|
@@ -18549,7 +18629,7 @@ function compileToFunction(template, options) {
|
|
|
18549
18629
|
if (template[0] === '#') {
|
|
18550
18630
|
const el = document.querySelector(template);
|
|
18551
18631
|
if ((process.env.NODE_ENV !== 'production') && !el) {
|
|
18552
|
-
warn
|
|
18632
|
+
warn(`Template element not found or is empty: ${template}`);
|
|
18553
18633
|
}
|
|
18554
18634
|
// __UNSAFE__
|
|
18555
18635
|
// Reason: potential execution of JS expressions in in-DOM template.
|
|
@@ -18558,9 +18638,9 @@ function compileToFunction(template, options) {
|
|
|
18558
18638
|
template = el ? el.innerHTML : ``;
|
|
18559
18639
|
}
|
|
18560
18640
|
if ((process.env.NODE_ENV !== 'production') && !false && (!options || !options.whitespace)) {
|
|
18561
|
-
warnDeprecation("CONFIG_WHITESPACE" /* DeprecationTypes.CONFIG_WHITESPACE */, null);
|
|
18641
|
+
warnDeprecation$1("CONFIG_WHITESPACE" /* DeprecationTypes.CONFIG_WHITESPACE */, null);
|
|
18562
18642
|
}
|
|
18563
|
-
const { code } = compile
|
|
18643
|
+
const { code } = compile(template, extend({
|
|
18564
18644
|
hoistStatic: true,
|
|
18565
18645
|
whitespace: 'preserve',
|
|
18566
18646
|
onError: (process.env.NODE_ENV !== 'production') ? onError : undefined,
|
|
@@ -18572,7 +18652,7 @@ function compileToFunction(template, options) {
|
|
|
18572
18652
|
: `Template compilation error: ${err.message}`;
|
|
18573
18653
|
const codeFrame = err.loc &&
|
|
18574
18654
|
generateCodeFrame(template, err.loc.start.offset, err.loc.end.offset);
|
|
18575
|
-
warn
|
|
18655
|
+
warn(codeFrame ? `${message}\n${codeFrame}` : message);
|
|
18576
18656
|
}
|
|
18577
18657
|
// The wildcard import results in a huge object with every export
|
|
18578
18658
|
// with keys that cannot be mangled, and can be quite heavy size-wise.
|
|
@@ -18583,10 +18663,10 @@ function compileToFunction(template, options) {
|
|
|
18583
18663
|
return (compileCache[key] = render);
|
|
18584
18664
|
}
|
|
18585
18665
|
registerRuntimeCompiler(compileToFunction);
|
|
18586
|
-
const Vue = createCompatVue
|
|
18666
|
+
const Vue = createCompatVue();
|
|
18587
18667
|
Vue.compile = compileToFunction;
|
|
18668
|
+
var Vue$1 = Vue;
|
|
18588
18669
|
|
|
18589
|
-
const { configureCompat
|
|
18670
|
+
const { configureCompat } = Vue$1;
|
|
18590
18671
|
|
|
18591
|
-
export default
|
|
18592
|
-
export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed$1 as computed, configureCompat$1 as configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter$1 as resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn$1 as warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
18672
|
+
export { BaseTransition, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue$1 as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|