vue 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 +7 -10
- package/dist/vue.cjs.prod.js +7 -10
- package/dist/vue.esm-browser.js +491 -414
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +374 -298
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +297 -226
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.global.js +300 -229
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +12 -12
package/dist/vue.global.js
CHANGED
|
@@ -172,7 +172,7 @@ var Vue = (function (exports) {
|
|
|
172
172
|
// These tag configs are shared between compiler-dom and runtime-dom, so they
|
|
173
173
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element
|
|
174
174
|
const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +
|
|
175
|
-
'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
|
|
175
|
+
'header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
|
|
176
176
|
'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +
|
|
177
177
|
'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +
|
|
178
178
|
'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +
|
|
@@ -184,7 +184,7 @@ var Vue = (function (exports) {
|
|
|
184
184
|
const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +
|
|
185
185
|
'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +
|
|
186
186
|
'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +
|
|
187
|
-
'
|
|
187
|
+
'feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
|
|
188
188
|
'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +
|
|
189
189
|
'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +
|
|
190
190
|
'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +
|
|
@@ -341,12 +341,13 @@ var Vue = (function (exports) {
|
|
|
341
341
|
arr.splice(i, 1);
|
|
342
342
|
}
|
|
343
343
|
};
|
|
344
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
345
|
-
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
|
344
|
+
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
345
|
+
const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
|
|
346
346
|
const isArray = Array.isArray;
|
|
347
347
|
const isMap = (val) => toTypeString(val) === '[object Map]';
|
|
348
348
|
const isSet = (val) => toTypeString(val) === '[object Set]';
|
|
349
349
|
const isDate = (val) => toTypeString(val) === '[object Date]';
|
|
350
|
+
const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
|
|
350
351
|
const isFunction = (val) => typeof val === 'function';
|
|
351
352
|
const isString = (val) => typeof val === 'string';
|
|
352
353
|
const isSymbol = (val) => typeof val === 'symbol';
|
|
@@ -413,10 +414,22 @@ var Vue = (function (exports) {
|
|
|
413
414
|
value
|
|
414
415
|
});
|
|
415
416
|
};
|
|
416
|
-
|
|
417
|
+
/**
|
|
418
|
+
* "123-foo" will be parsed to 123
|
|
419
|
+
* This is used for the .number modifier in v-model
|
|
420
|
+
*/
|
|
421
|
+
const looseToNumber = (val) => {
|
|
417
422
|
const n = parseFloat(val);
|
|
418
423
|
return isNaN(n) ? val : n;
|
|
419
424
|
};
|
|
425
|
+
/**
|
|
426
|
+
* Only conerces number-like strings
|
|
427
|
+
* "123-foo" will be returned as-is
|
|
428
|
+
*/
|
|
429
|
+
const toNumber = (val) => {
|
|
430
|
+
const n = isString(val) ? Number(val) : NaN;
|
|
431
|
+
return isNaN(n) ? val : n;
|
|
432
|
+
};
|
|
420
433
|
let _globalThis;
|
|
421
434
|
const getGlobalThis = () => {
|
|
422
435
|
return (_globalThis ||
|
|
@@ -432,7 +445,7 @@ var Vue = (function (exports) {
|
|
|
432
445
|
: {}));
|
|
433
446
|
};
|
|
434
447
|
|
|
435
|
-
function warn(msg, ...args) {
|
|
448
|
+
function warn$1(msg, ...args) {
|
|
436
449
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
437
450
|
}
|
|
438
451
|
|
|
@@ -443,7 +456,7 @@ var Vue = (function (exports) {
|
|
|
443
456
|
/**
|
|
444
457
|
* @internal
|
|
445
458
|
*/
|
|
446
|
-
this.
|
|
459
|
+
this._active = true;
|
|
447
460
|
/**
|
|
448
461
|
* @internal
|
|
449
462
|
*/
|
|
@@ -458,8 +471,11 @@ var Vue = (function (exports) {
|
|
|
458
471
|
(activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
|
|
459
472
|
}
|
|
460
473
|
}
|
|
474
|
+
get active() {
|
|
475
|
+
return this._active;
|
|
476
|
+
}
|
|
461
477
|
run(fn) {
|
|
462
|
-
if (this.
|
|
478
|
+
if (this._active) {
|
|
463
479
|
const currentEffectScope = activeEffectScope;
|
|
464
480
|
try {
|
|
465
481
|
activeEffectScope = this;
|
|
@@ -470,7 +486,7 @@ var Vue = (function (exports) {
|
|
|
470
486
|
}
|
|
471
487
|
}
|
|
472
488
|
else {
|
|
473
|
-
warn(`cannot run an inactive effect scope.`);
|
|
489
|
+
warn$1(`cannot run an inactive effect scope.`);
|
|
474
490
|
}
|
|
475
491
|
}
|
|
476
492
|
/**
|
|
@@ -488,7 +504,7 @@ var Vue = (function (exports) {
|
|
|
488
504
|
activeEffectScope = this.parent;
|
|
489
505
|
}
|
|
490
506
|
stop(fromParent) {
|
|
491
|
-
if (this.
|
|
507
|
+
if (this._active) {
|
|
492
508
|
let i, l;
|
|
493
509
|
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
494
510
|
this.effects[i].stop();
|
|
@@ -511,7 +527,7 @@ var Vue = (function (exports) {
|
|
|
511
527
|
}
|
|
512
528
|
}
|
|
513
529
|
this.parent = undefined;
|
|
514
|
-
this.
|
|
530
|
+
this._active = false;
|
|
515
531
|
}
|
|
516
532
|
}
|
|
517
533
|
}
|
|
@@ -531,7 +547,7 @@ var Vue = (function (exports) {
|
|
|
531
547
|
activeEffectScope.cleanups.push(fn);
|
|
532
548
|
}
|
|
533
549
|
else {
|
|
534
|
-
warn(`onScopeDispose() is called when there is no active effect scope` +
|
|
550
|
+
warn$1(`onScopeDispose() is called when there is no active effect scope` +
|
|
535
551
|
` to be associated with.`);
|
|
536
552
|
}
|
|
537
553
|
}
|
|
@@ -732,7 +748,7 @@ var Vue = (function (exports) {
|
|
|
732
748
|
deps = [...depsMap.values()];
|
|
733
749
|
}
|
|
734
750
|
else if (key === 'length' && isArray(target)) {
|
|
735
|
-
const newLength =
|
|
751
|
+
const newLength = Number(newValue);
|
|
736
752
|
depsMap.forEach((dep, key) => {
|
|
737
753
|
if (key === 'length' || key >= newLength) {
|
|
738
754
|
deps.push(dep);
|
|
@@ -821,6 +837,10 @@ var Vue = (function (exports) {
|
|
|
821
837
|
}
|
|
822
838
|
}
|
|
823
839
|
}
|
|
840
|
+
function getDepFromReactive(object, key) {
|
|
841
|
+
var _a;
|
|
842
|
+
return (_a = targetMap.get(object)) === null || _a === void 0 ? void 0 : _a.get(key);
|
|
843
|
+
}
|
|
824
844
|
|
|
825
845
|
const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
826
846
|
const builtInSymbols = new Set(
|
|
@@ -832,7 +852,7 @@ var Vue = (function (exports) {
|
|
|
832
852
|
.filter(key => key !== 'arguments' && key !== 'caller')
|
|
833
853
|
.map(key => Symbol[key])
|
|
834
854
|
.filter(isSymbol));
|
|
835
|
-
const get = /*#__PURE__*/ createGetter();
|
|
855
|
+
const get$1 = /*#__PURE__*/ createGetter();
|
|
836
856
|
const shallowGet = /*#__PURE__*/ createGetter(false, true);
|
|
837
857
|
const readonlyGet = /*#__PURE__*/ createGetter(true);
|
|
838
858
|
const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);
|
|
@@ -866,6 +886,11 @@ var Vue = (function (exports) {
|
|
|
866
886
|
});
|
|
867
887
|
return instrumentations;
|
|
868
888
|
}
|
|
889
|
+
function hasOwnProperty(key) {
|
|
890
|
+
const obj = toRaw(this);
|
|
891
|
+
track(obj, "has" /* TrackOpTypes.HAS */, key);
|
|
892
|
+
return obj.hasOwnProperty(key);
|
|
893
|
+
}
|
|
869
894
|
function createGetter(isReadonly = false, shallow = false) {
|
|
870
895
|
return function get(target, key, receiver) {
|
|
871
896
|
if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
|
|
@@ -889,8 +914,13 @@ var Vue = (function (exports) {
|
|
|
889
914
|
return target;
|
|
890
915
|
}
|
|
891
916
|
const targetIsArray = isArray(target);
|
|
892
|
-
if (!isReadonly
|
|
893
|
-
|
|
917
|
+
if (!isReadonly) {
|
|
918
|
+
if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
|
|
919
|
+
return Reflect.get(arrayInstrumentations, key, receiver);
|
|
920
|
+
}
|
|
921
|
+
if (key === 'hasOwnProperty') {
|
|
922
|
+
return hasOwnProperty;
|
|
923
|
+
}
|
|
894
924
|
}
|
|
895
925
|
const res = Reflect.get(target, key, receiver);
|
|
896
926
|
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
|
|
@@ -915,7 +945,7 @@ var Vue = (function (exports) {
|
|
|
915
945
|
return res;
|
|
916
946
|
};
|
|
917
947
|
}
|
|
918
|
-
const set = /*#__PURE__*/ createSetter();
|
|
948
|
+
const set$1 = /*#__PURE__*/ createSetter();
|
|
919
949
|
const shallowSet = /*#__PURE__*/ createSetter(true);
|
|
920
950
|
function createSetter(shallow = false) {
|
|
921
951
|
return function set(target, key, value, receiver) {
|
|
@@ -958,7 +988,7 @@ var Vue = (function (exports) {
|
|
|
958
988
|
}
|
|
959
989
|
return result;
|
|
960
990
|
}
|
|
961
|
-
function has(target, key) {
|
|
991
|
+
function has$1(target, key) {
|
|
962
992
|
const result = Reflect.has(target, key);
|
|
963
993
|
if (!isSymbol(key) || !builtInSymbols.has(key)) {
|
|
964
994
|
track(target, "has" /* TrackOpTypes.HAS */, key);
|
|
@@ -970,23 +1000,23 @@ var Vue = (function (exports) {
|
|
|
970
1000
|
return Reflect.ownKeys(target);
|
|
971
1001
|
}
|
|
972
1002
|
const mutableHandlers = {
|
|
973
|
-
get,
|
|
974
|
-
set,
|
|
1003
|
+
get: get$1,
|
|
1004
|
+
set: set$1,
|
|
975
1005
|
deleteProperty,
|
|
976
|
-
has,
|
|
1006
|
+
has: has$1,
|
|
977
1007
|
ownKeys
|
|
978
1008
|
};
|
|
979
1009
|
const readonlyHandlers = {
|
|
980
1010
|
get: readonlyGet,
|
|
981
1011
|
set(target, key) {
|
|
982
1012
|
{
|
|
983
|
-
warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
1013
|
+
warn$1(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
984
1014
|
}
|
|
985
1015
|
return true;
|
|
986
1016
|
},
|
|
987
1017
|
deleteProperty(target, key) {
|
|
988
1018
|
{
|
|
989
|
-
warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
1019
|
+
warn$1(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
|
|
990
1020
|
}
|
|
991
1021
|
return true;
|
|
992
1022
|
}
|
|
@@ -1004,7 +1034,7 @@ var Vue = (function (exports) {
|
|
|
1004
1034
|
|
|
1005
1035
|
const toShallow = (value) => value;
|
|
1006
1036
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
1007
|
-
function get
|
|
1037
|
+
function get(target, key, isReadonly = false, isShallow = false) {
|
|
1008
1038
|
// #1772: readonly(reactive(Map)) should return readonly + reactive version
|
|
1009
1039
|
// of the value
|
|
1010
1040
|
target = target["__v_raw" /* ReactiveFlags.RAW */];
|
|
@@ -1030,7 +1060,7 @@ var Vue = (function (exports) {
|
|
|
1030
1060
|
target.get(key);
|
|
1031
1061
|
}
|
|
1032
1062
|
}
|
|
1033
|
-
function has
|
|
1063
|
+
function has(key, isReadonly = false) {
|
|
1034
1064
|
const target = this["__v_raw" /* ReactiveFlags.RAW */];
|
|
1035
1065
|
const rawTarget = toRaw(target);
|
|
1036
1066
|
const rawKey = toRaw(key);
|
|
@@ -1060,7 +1090,7 @@ var Vue = (function (exports) {
|
|
|
1060
1090
|
}
|
|
1061
1091
|
return this;
|
|
1062
1092
|
}
|
|
1063
|
-
function set
|
|
1093
|
+
function set(key, value) {
|
|
1064
1094
|
value = toRaw(value);
|
|
1065
1095
|
const target = toRaw(this);
|
|
1066
1096
|
const { has, get } = getProto(target);
|
|
@@ -1173,41 +1203,41 @@ var Vue = (function (exports) {
|
|
|
1173
1203
|
function createInstrumentations() {
|
|
1174
1204
|
const mutableInstrumentations = {
|
|
1175
1205
|
get(key) {
|
|
1176
|
-
return get
|
|
1206
|
+
return get(this, key);
|
|
1177
1207
|
},
|
|
1178
1208
|
get size() {
|
|
1179
1209
|
return size(this);
|
|
1180
1210
|
},
|
|
1181
|
-
has
|
|
1211
|
+
has,
|
|
1182
1212
|
add,
|
|
1183
|
-
set
|
|
1213
|
+
set,
|
|
1184
1214
|
delete: deleteEntry,
|
|
1185
1215
|
clear,
|
|
1186
1216
|
forEach: createForEach(false, false)
|
|
1187
1217
|
};
|
|
1188
1218
|
const shallowInstrumentations = {
|
|
1189
1219
|
get(key) {
|
|
1190
|
-
return get
|
|
1220
|
+
return get(this, key, false, true);
|
|
1191
1221
|
},
|
|
1192
1222
|
get size() {
|
|
1193
1223
|
return size(this);
|
|
1194
1224
|
},
|
|
1195
|
-
has
|
|
1225
|
+
has,
|
|
1196
1226
|
add,
|
|
1197
|
-
set
|
|
1227
|
+
set,
|
|
1198
1228
|
delete: deleteEntry,
|
|
1199
1229
|
clear,
|
|
1200
1230
|
forEach: createForEach(false, true)
|
|
1201
1231
|
};
|
|
1202
1232
|
const readonlyInstrumentations = {
|
|
1203
1233
|
get(key) {
|
|
1204
|
-
return get
|
|
1234
|
+
return get(this, key, true);
|
|
1205
1235
|
},
|
|
1206
1236
|
get size() {
|
|
1207
1237
|
return size(this, true);
|
|
1208
1238
|
},
|
|
1209
1239
|
has(key) {
|
|
1210
|
-
return has
|
|
1240
|
+
return has.call(this, key, true);
|
|
1211
1241
|
},
|
|
1212
1242
|
add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
|
|
1213
1243
|
set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
|
|
@@ -1217,13 +1247,13 @@ var Vue = (function (exports) {
|
|
|
1217
1247
|
};
|
|
1218
1248
|
const shallowReadonlyInstrumentations = {
|
|
1219
1249
|
get(key) {
|
|
1220
|
-
return get
|
|
1250
|
+
return get(this, key, true, true);
|
|
1221
1251
|
},
|
|
1222
1252
|
get size() {
|
|
1223
1253
|
return size(this, true);
|
|
1224
1254
|
},
|
|
1225
1255
|
has(key) {
|
|
1226
|
-
return has
|
|
1256
|
+
return has.call(this, key, true);
|
|
1227
1257
|
},
|
|
1228
1258
|
add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
|
|
1229
1259
|
set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
|
|
@@ -1414,9 +1444,10 @@ var Vue = (function (exports) {
|
|
|
1414
1444
|
}
|
|
1415
1445
|
function triggerRefValue(ref, newVal) {
|
|
1416
1446
|
ref = toRaw(ref);
|
|
1417
|
-
|
|
1447
|
+
const dep = ref.dep;
|
|
1448
|
+
if (dep) {
|
|
1418
1449
|
{
|
|
1419
|
-
triggerEffects(
|
|
1450
|
+
triggerEffects(dep, {
|
|
1420
1451
|
target: ref,
|
|
1421
1452
|
type: "set" /* TriggerOpTypes.SET */,
|
|
1422
1453
|
key: 'value',
|
|
@@ -1528,6 +1559,9 @@ var Vue = (function (exports) {
|
|
|
1528
1559
|
set value(newVal) {
|
|
1529
1560
|
this._object[this._key] = newVal;
|
|
1530
1561
|
}
|
|
1562
|
+
get dep() {
|
|
1563
|
+
return getDepFromReactive(toRaw(this._object), this._key);
|
|
1564
|
+
}
|
|
1531
1565
|
}
|
|
1532
1566
|
function toRef(object, key, defaultValue) {
|
|
1533
1567
|
const val = object[key];
|
|
@@ -1569,7 +1603,7 @@ var Vue = (function (exports) {
|
|
|
1569
1603
|
}
|
|
1570
1604
|
}
|
|
1571
1605
|
_a = "__v_isReadonly" /* ReactiveFlags.IS_READONLY */;
|
|
1572
|
-
function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
1606
|
+
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
1573
1607
|
let getter;
|
|
1574
1608
|
let setter;
|
|
1575
1609
|
const onlyGetter = isFunction(getterOrOptions);
|
|
@@ -1599,7 +1633,7 @@ var Vue = (function (exports) {
|
|
|
1599
1633
|
function popWarningContext() {
|
|
1600
1634
|
stack.pop();
|
|
1601
1635
|
}
|
|
1602
|
-
function warn
|
|
1636
|
+
function warn(msg, ...args) {
|
|
1603
1637
|
// avoid props formatting or warn handler tracking deps that might be mutated
|
|
1604
1638
|
// during patch, leading to infinite recursion.
|
|
1605
1639
|
pauseTracking();
|
|
@@ -1705,6 +1739,20 @@ var Vue = (function (exports) {
|
|
|
1705
1739
|
return raw ? value : [`${key}=`, value];
|
|
1706
1740
|
}
|
|
1707
1741
|
}
|
|
1742
|
+
/**
|
|
1743
|
+
* @internal
|
|
1744
|
+
*/
|
|
1745
|
+
function assertNumber(val, type) {
|
|
1746
|
+
if (val === undefined) {
|
|
1747
|
+
return;
|
|
1748
|
+
}
|
|
1749
|
+
else if (typeof val !== 'number') {
|
|
1750
|
+
warn(`${type} is not a valid number - ` + `got ${JSON.stringify(val)}.`);
|
|
1751
|
+
}
|
|
1752
|
+
else if (isNaN(val)) {
|
|
1753
|
+
warn(`${type} is NaN - ` + 'the duration expression might be incorrect.');
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1708
1756
|
|
|
1709
1757
|
const ErrorTypeStrings = {
|
|
1710
1758
|
["sp" /* LifecycleHooks.SERVER_PREFETCH */]: 'serverPrefetch hook',
|
|
@@ -1798,7 +1846,7 @@ var Vue = (function (exports) {
|
|
|
1798
1846
|
if (contextVNode) {
|
|
1799
1847
|
pushWarningContext(contextVNode);
|
|
1800
1848
|
}
|
|
1801
|
-
warn
|
|
1849
|
+
warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
1802
1850
|
if (contextVNode) {
|
|
1803
1851
|
popWarningContext();
|
|
1804
1852
|
}
|
|
@@ -1994,7 +2042,7 @@ var Vue = (function (exports) {
|
|
|
1994
2042
|
if (count > RECURSION_LIMIT) {
|
|
1995
2043
|
const instance = fn.ownerInstance;
|
|
1996
2044
|
const componentName = instance && getComponentName(instance.type);
|
|
1997
|
-
warn
|
|
2045
|
+
warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +
|
|
1998
2046
|
`This means you have a reactive effect that is mutating its own ` +
|
|
1999
2047
|
`dependencies and thus recursively triggering itself. Possible sources ` +
|
|
2000
2048
|
`include component template, render function, updated hook or ` +
|
|
@@ -2142,9 +2190,10 @@ var Vue = (function (exports) {
|
|
|
2142
2190
|
};
|
|
2143
2191
|
}
|
|
2144
2192
|
|
|
2193
|
+
exports.devtools = void 0;
|
|
2145
2194
|
let buffer = [];
|
|
2146
2195
|
let devtoolsNotInstalled = false;
|
|
2147
|
-
function emit(event, ...args) {
|
|
2196
|
+
function emit$1(event, ...args) {
|
|
2148
2197
|
if (exports.devtools) {
|
|
2149
2198
|
exports.devtools.emit(event, ...args);
|
|
2150
2199
|
}
|
|
@@ -2191,7 +2240,7 @@ var Vue = (function (exports) {
|
|
|
2191
2240
|
}
|
|
2192
2241
|
}
|
|
2193
2242
|
function devtoolsInitApp(app, version) {
|
|
2194
|
-
emit("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
|
|
2243
|
+
emit$1("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
|
|
2195
2244
|
Fragment,
|
|
2196
2245
|
Text,
|
|
2197
2246
|
Comment,
|
|
@@ -2199,7 +2248,7 @@ var Vue = (function (exports) {
|
|
|
2199
2248
|
});
|
|
2200
2249
|
}
|
|
2201
2250
|
function devtoolsUnmountApp(app) {
|
|
2202
|
-
emit("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
|
|
2251
|
+
emit$1("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
|
|
2203
2252
|
}
|
|
2204
2253
|
const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* DevtoolsHooks.COMPONENT_ADDED */);
|
|
2205
2254
|
const devtoolsComponentUpdated =
|
|
@@ -2215,21 +2264,21 @@ var Vue = (function (exports) {
|
|
|
2215
2264
|
};
|
|
2216
2265
|
function createDevtoolsComponentHook(hook) {
|
|
2217
2266
|
return (component) => {
|
|
2218
|
-
emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
|
|
2267
|
+
emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
|
|
2219
2268
|
};
|
|
2220
2269
|
}
|
|
2221
2270
|
const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* DevtoolsHooks.PERFORMANCE_START */);
|
|
2222
2271
|
const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* DevtoolsHooks.PERFORMANCE_END */);
|
|
2223
2272
|
function createDevtoolsPerformanceHook(hook) {
|
|
2224
2273
|
return (component, type, time) => {
|
|
2225
|
-
emit(hook, component.appContext.app, component.uid, component, type, time);
|
|
2274
|
+
emit$1(hook, component.appContext.app, component.uid, component, type, time);
|
|
2226
2275
|
};
|
|
2227
2276
|
}
|
|
2228
2277
|
function devtoolsComponentEmit(component, event, params) {
|
|
2229
|
-
emit("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
2278
|
+
emit$1("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
|
|
2230
2279
|
}
|
|
2231
2280
|
|
|
2232
|
-
function emit
|
|
2281
|
+
function emit(instance, event, ...rawArgs) {
|
|
2233
2282
|
if (instance.isUnmounted)
|
|
2234
2283
|
return;
|
|
2235
2284
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
@@ -2239,7 +2288,7 @@ var Vue = (function (exports) {
|
|
|
2239
2288
|
if (!(event in emitsOptions) &&
|
|
2240
2289
|
!(false )) {
|
|
2241
2290
|
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
2242
|
-
warn
|
|
2291
|
+
warn(`Component emitted event "${event}" but it is neither declared in ` +
|
|
2243
2292
|
`the emits option nor as an "${toHandlerKey(event)}" prop.`);
|
|
2244
2293
|
}
|
|
2245
2294
|
}
|
|
@@ -2248,7 +2297,7 @@ var Vue = (function (exports) {
|
|
|
2248
2297
|
if (isFunction(validator)) {
|
|
2249
2298
|
const isValid = validator(...rawArgs);
|
|
2250
2299
|
if (!isValid) {
|
|
2251
|
-
warn
|
|
2300
|
+
warn(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
2252
2301
|
}
|
|
2253
2302
|
}
|
|
2254
2303
|
}
|
|
@@ -2265,7 +2314,7 @@ var Vue = (function (exports) {
|
|
|
2265
2314
|
args = rawArgs.map(a => (isString(a) ? a.trim() : a));
|
|
2266
2315
|
}
|
|
2267
2316
|
if (number) {
|
|
2268
|
-
args = rawArgs.map(
|
|
2317
|
+
args = rawArgs.map(looseToNumber);
|
|
2269
2318
|
}
|
|
2270
2319
|
}
|
|
2271
2320
|
{
|
|
@@ -2274,7 +2323,7 @@ var Vue = (function (exports) {
|
|
|
2274
2323
|
{
|
|
2275
2324
|
const lowerCaseEvent = event.toLowerCase();
|
|
2276
2325
|
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
|
|
2277
|
-
warn
|
|
2326
|
+
warn(`Event "${lowerCaseEvent}" is emitted in component ` +
|
|
2278
2327
|
`${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` +
|
|
2279
2328
|
`Note that HTML attributes are case-insensitive and you cannot use ` +
|
|
2280
2329
|
`v-on to listen to camelCase events when using in-DOM templates. ` +
|
|
@@ -2549,13 +2598,13 @@ var Vue = (function (exports) {
|
|
|
2549
2598
|
}
|
|
2550
2599
|
}
|
|
2551
2600
|
if (extraAttrs.length) {
|
|
2552
|
-
warn
|
|
2601
|
+
warn(`Extraneous non-props attributes (` +
|
|
2553
2602
|
`${extraAttrs.join(', ')}) ` +
|
|
2554
2603
|
`were passed to component but could not be automatically inherited ` +
|
|
2555
2604
|
`because component renders fragment or text root nodes.`);
|
|
2556
2605
|
}
|
|
2557
2606
|
if (eventAttrs.length) {
|
|
2558
|
-
warn
|
|
2607
|
+
warn(`Extraneous non-emits event listeners (` +
|
|
2559
2608
|
`${eventAttrs.join(', ')}) ` +
|
|
2560
2609
|
`were passed to component but could not be automatically inherited ` +
|
|
2561
2610
|
`because component renders fragment or text root nodes. ` +
|
|
@@ -2568,7 +2617,7 @@ var Vue = (function (exports) {
|
|
|
2568
2617
|
// inherit directives
|
|
2569
2618
|
if (vnode.dirs) {
|
|
2570
2619
|
if (!isElementRoot(root)) {
|
|
2571
|
-
warn
|
|
2620
|
+
warn(`Runtime directive used on component with non-element root node. ` +
|
|
2572
2621
|
`The directives will not function as intended.`);
|
|
2573
2622
|
}
|
|
2574
2623
|
// clone before mutating since the root may be a hoisted vnode
|
|
@@ -2578,7 +2627,7 @@ var Vue = (function (exports) {
|
|
|
2578
2627
|
// inherit transition data
|
|
2579
2628
|
if (vnode.transition) {
|
|
2580
2629
|
if (!isElementRoot(root)) {
|
|
2581
|
-
warn
|
|
2630
|
+
warn(`Component inside <Transition> renders non-element root node ` +
|
|
2582
2631
|
`that cannot be animated.`);
|
|
2583
2632
|
}
|
|
2584
2633
|
root.transition = vnode.transition;
|
|
@@ -2913,7 +2962,10 @@ var Vue = (function (exports) {
|
|
|
2913
2962
|
console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`);
|
|
2914
2963
|
}
|
|
2915
2964
|
const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;
|
|
2916
|
-
const timeout =
|
|
2965
|
+
const timeout = vnode.props ? toNumber(vnode.props.timeout) : undefined;
|
|
2966
|
+
{
|
|
2967
|
+
assertNumber(timeout, `Suspense timeout`);
|
|
2968
|
+
}
|
|
2917
2969
|
const suspense = {
|
|
2918
2970
|
vnode,
|
|
2919
2971
|
parent,
|
|
@@ -3141,7 +3193,7 @@ var Vue = (function (exports) {
|
|
|
3141
3193
|
if (isArray(s)) {
|
|
3142
3194
|
const singleChild = filterSingleRoot(s);
|
|
3143
3195
|
if (!singleChild) {
|
|
3144
|
-
warn
|
|
3196
|
+
warn(`<Suspense> slots expect a single root node.`);
|
|
3145
3197
|
}
|
|
3146
3198
|
s = singleChild;
|
|
3147
3199
|
}
|
|
@@ -3179,7 +3231,7 @@ var Vue = (function (exports) {
|
|
|
3179
3231
|
function provide(key, value) {
|
|
3180
3232
|
if (!currentInstance) {
|
|
3181
3233
|
{
|
|
3182
|
-
warn
|
|
3234
|
+
warn(`provide() can only be used inside setup().`);
|
|
3183
3235
|
}
|
|
3184
3236
|
}
|
|
3185
3237
|
else {
|
|
@@ -3218,11 +3270,11 @@ var Vue = (function (exports) {
|
|
|
3218
3270
|
: defaultValue;
|
|
3219
3271
|
}
|
|
3220
3272
|
else {
|
|
3221
|
-
warn
|
|
3273
|
+
warn(`injection "${String(key)}" not found.`);
|
|
3222
3274
|
}
|
|
3223
3275
|
}
|
|
3224
3276
|
else {
|
|
3225
|
-
warn
|
|
3277
|
+
warn(`inject() can only be used inside setup() or functional components.`);
|
|
3226
3278
|
}
|
|
3227
3279
|
}
|
|
3228
3280
|
|
|
@@ -3231,17 +3283,17 @@ var Vue = (function (exports) {
|
|
|
3231
3283
|
return doWatch(effect, null, options);
|
|
3232
3284
|
}
|
|
3233
3285
|
function watchPostEffect(effect, options) {
|
|
3234
|
-
return doWatch(effect, null,
|
|
3286
|
+
return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: 'post' }) );
|
|
3235
3287
|
}
|
|
3236
3288
|
function watchSyncEffect(effect, options) {
|
|
3237
|
-
return doWatch(effect, null,
|
|
3289
|
+
return doWatch(effect, null, Object.assign(Object.assign({}, options), { flush: 'sync' }) );
|
|
3238
3290
|
}
|
|
3239
3291
|
// initial value for watchers to trigger on undefined initial values
|
|
3240
3292
|
const INITIAL_WATCHER_VALUE = {};
|
|
3241
3293
|
// implementation
|
|
3242
3294
|
function watch(source, cb, options) {
|
|
3243
3295
|
if (!isFunction(cb)) {
|
|
3244
|
-
warn
|
|
3296
|
+
warn(`\`watch(fn, options?)\` signature has been moved to a separate API. ` +
|
|
3245
3297
|
`Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` +
|
|
3246
3298
|
`supports \`watch(source, cb, options?) signature.`);
|
|
3247
3299
|
}
|
|
@@ -3250,19 +3302,20 @@ var Vue = (function (exports) {
|
|
|
3250
3302
|
function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
|
|
3251
3303
|
if (!cb) {
|
|
3252
3304
|
if (immediate !== undefined) {
|
|
3253
|
-
warn
|
|
3305
|
+
warn(`watch() "immediate" option is only respected when using the ` +
|
|
3254
3306
|
`watch(source, callback, options?) signature.`);
|
|
3255
3307
|
}
|
|
3256
3308
|
if (deep !== undefined) {
|
|
3257
|
-
warn
|
|
3309
|
+
warn(`watch() "deep" option is only respected when using the ` +
|
|
3258
3310
|
`watch(source, callback, options?) signature.`);
|
|
3259
3311
|
}
|
|
3260
3312
|
}
|
|
3261
3313
|
const warnInvalidSource = (s) => {
|
|
3262
|
-
warn
|
|
3314
|
+
warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +
|
|
3263
3315
|
`a reactive object, or an array of these types.`);
|
|
3264
3316
|
};
|
|
3265
|
-
const instance = currentInstance;
|
|
3317
|
+
const instance = getCurrentScope() === (currentInstance === null || currentInstance === void 0 ? void 0 : currentInstance.scope) ? currentInstance : null;
|
|
3318
|
+
// const instance = currentInstance
|
|
3266
3319
|
let getter;
|
|
3267
3320
|
let forceTrigger = false;
|
|
3268
3321
|
let isMultiSource = false;
|
|
@@ -3349,7 +3402,7 @@ var Vue = (function (exports) {
|
|
|
3349
3402
|
// pass undefined as the old value when it's changed for the first time
|
|
3350
3403
|
oldValue === INITIAL_WATCHER_VALUE
|
|
3351
3404
|
? undefined
|
|
3352
|
-
:
|
|
3405
|
+
: isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE
|
|
3353
3406
|
? []
|
|
3354
3407
|
: oldValue,
|
|
3355
3408
|
onCleanup
|
|
@@ -3529,7 +3582,7 @@ var Vue = (function (exports) {
|
|
|
3529
3582
|
if (c.type !== Comment) {
|
|
3530
3583
|
if (hasFound) {
|
|
3531
3584
|
// warn more than one non-comment child
|
|
3532
|
-
warn
|
|
3585
|
+
warn('<transition> can only be used on a single element or component. ' +
|
|
3533
3586
|
'Use <transition-group> for lists.');
|
|
3534
3587
|
break;
|
|
3535
3588
|
}
|
|
@@ -3547,7 +3600,7 @@ var Vue = (function (exports) {
|
|
|
3547
3600
|
mode !== 'in-out' &&
|
|
3548
3601
|
mode !== 'out-in' &&
|
|
3549
3602
|
mode !== 'default') {
|
|
3550
|
-
warn
|
|
3603
|
+
warn(`invalid <transition> mode: ${mode}`);
|
|
3551
3604
|
}
|
|
3552
3605
|
if (state.isLeaving) {
|
|
3553
3606
|
return emptyPlaceholder(child);
|
|
@@ -3855,7 +3908,7 @@ var Vue = (function (exports) {
|
|
|
3855
3908
|
return pendingRequest;
|
|
3856
3909
|
}
|
|
3857
3910
|
if (!comp) {
|
|
3858
|
-
warn
|
|
3911
|
+
warn(`Async component loader resolved to undefined. ` +
|
|
3859
3912
|
`If you are using retry(), make sure to return its return value.`);
|
|
3860
3913
|
}
|
|
3861
3914
|
// interop module default
|
|
@@ -4042,7 +4095,7 @@ var Vue = (function (exports) {
|
|
|
4042
4095
|
}
|
|
4043
4096
|
function pruneCacheEntry(key) {
|
|
4044
4097
|
const cached = cache.get(key);
|
|
4045
|
-
if (!current || cached
|
|
4098
|
+
if (!current || !isSameVNodeType(cached, current)) {
|
|
4046
4099
|
unmount(cached);
|
|
4047
4100
|
}
|
|
4048
4101
|
else if (current) {
|
|
@@ -4074,7 +4127,7 @@ var Vue = (function (exports) {
|
|
|
4074
4127
|
cache.forEach(cached => {
|
|
4075
4128
|
const { subTree, suspense } = instance;
|
|
4076
4129
|
const vnode = getInnerChild(subTree);
|
|
4077
|
-
if (cached.type === vnode.type) {
|
|
4130
|
+
if (cached.type === vnode.type && cached.key === vnode.key) {
|
|
4078
4131
|
// current instance will be unmounted as part of keep-alive's unmount
|
|
4079
4132
|
resetShapeFlag(vnode);
|
|
4080
4133
|
// but invoke its deactivated hook here
|
|
@@ -4094,7 +4147,7 @@ var Vue = (function (exports) {
|
|
|
4094
4147
|
const rawVNode = children[0];
|
|
4095
4148
|
if (children.length > 1) {
|
|
4096
4149
|
{
|
|
4097
|
-
warn
|
|
4150
|
+
warn(`KeepAlive should contain exactly one component child.`);
|
|
4098
4151
|
}
|
|
4099
4152
|
current = null;
|
|
4100
4153
|
return children;
|
|
@@ -4171,7 +4224,7 @@ var Vue = (function (exports) {
|
|
|
4171
4224
|
else if (isString(pattern)) {
|
|
4172
4225
|
return pattern.split(',').includes(name);
|
|
4173
4226
|
}
|
|
4174
|
-
else if (pattern
|
|
4227
|
+
else if (isRegExp(pattern)) {
|
|
4175
4228
|
return pattern.test(name);
|
|
4176
4229
|
}
|
|
4177
4230
|
/* istanbul ignore next */
|
|
@@ -4265,7 +4318,7 @@ var Vue = (function (exports) {
|
|
|
4265
4318
|
}
|
|
4266
4319
|
else {
|
|
4267
4320
|
const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ''));
|
|
4268
|
-
warn
|
|
4321
|
+
warn(`${apiName} is called when there is no active component instance to be ` +
|
|
4269
4322
|
`associated with. ` +
|
|
4270
4323
|
`Lifecycle injection APIs can only be used during execution of setup().` +
|
|
4271
4324
|
(` If you are using async setup(), make sure to register lifecycle ` +
|
|
@@ -4304,7 +4357,7 @@ var Vue = (function (exports) {
|
|
|
4304
4357
|
*/
|
|
4305
4358
|
function validateDirectiveName(name) {
|
|
4306
4359
|
if (isBuiltInDirective(name)) {
|
|
4307
|
-
warn
|
|
4360
|
+
warn('Do not use built-in directive ids as custom directive id: ' + name);
|
|
4308
4361
|
}
|
|
4309
4362
|
}
|
|
4310
4363
|
/**
|
|
@@ -4313,7 +4366,7 @@ var Vue = (function (exports) {
|
|
|
4313
4366
|
function withDirectives(vnode, directives) {
|
|
4314
4367
|
const internalInstance = currentRenderingInstance;
|
|
4315
4368
|
if (internalInstance === null) {
|
|
4316
|
-
warn
|
|
4369
|
+
warn(`withDirectives can only be used inside render functions.`);
|
|
4317
4370
|
return vnode;
|
|
4318
4371
|
}
|
|
4319
4372
|
const instance = getExposeProxy(internalInstance) ||
|
|
@@ -4424,12 +4477,12 @@ var Vue = (function (exports) {
|
|
|
4424
4477
|
? `\nIf this is a native custom element, make sure to exclude it from ` +
|
|
4425
4478
|
`component resolution via compilerOptions.isCustomElement.`
|
|
4426
4479
|
: ``;
|
|
4427
|
-
warn
|
|
4480
|
+
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
4428
4481
|
}
|
|
4429
4482
|
return res;
|
|
4430
4483
|
}
|
|
4431
4484
|
else {
|
|
4432
|
-
warn
|
|
4485
|
+
warn(`resolve${capitalize(type.slice(0, -1))} ` +
|
|
4433
4486
|
`can only be used in render() or setup().`);
|
|
4434
4487
|
}
|
|
4435
4488
|
}
|
|
@@ -4454,7 +4507,7 @@ var Vue = (function (exports) {
|
|
|
4454
4507
|
}
|
|
4455
4508
|
else if (typeof source === 'number') {
|
|
4456
4509
|
if (!Number.isInteger(source)) {
|
|
4457
|
-
warn
|
|
4510
|
+
warn(`The v-for range expect an integer value but got ${source}.`);
|
|
4458
4511
|
}
|
|
4459
4512
|
ret = new Array(source);
|
|
4460
4513
|
for (let i = 0; i < source; i++) {
|
|
@@ -4531,7 +4584,7 @@ var Vue = (function (exports) {
|
|
|
4531
4584
|
}
|
|
4532
4585
|
let slot = slots[name];
|
|
4533
4586
|
if (slot && slot.length > 1) {
|
|
4534
|
-
warn
|
|
4587
|
+
warn(`SSR-optimized slot function detected in a non-SSR-optimized render ` +
|
|
4535
4588
|
`function. You need to mark this component with $dynamic-slots in the ` +
|
|
4536
4589
|
`parent template.`);
|
|
4537
4590
|
slot = () => [];
|
|
@@ -4584,7 +4637,7 @@ var Vue = (function (exports) {
|
|
|
4584
4637
|
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
4585
4638
|
const ret = {};
|
|
4586
4639
|
if (!isObject(obj)) {
|
|
4587
|
-
warn
|
|
4640
|
+
warn(`v-on with no argument expects an object value.`);
|
|
4588
4641
|
return ret;
|
|
4589
4642
|
}
|
|
4590
4643
|
for (const key in obj) {
|
|
@@ -4716,11 +4769,11 @@ var Vue = (function (exports) {
|
|
|
4716
4769
|
// to infinite warning loop
|
|
4717
4770
|
key.indexOf('__v') !== 0)) {
|
|
4718
4771
|
if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
|
|
4719
|
-
warn
|
|
4772
|
+
warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` +
|
|
4720
4773
|
`character ("$" or "_") and is not proxied on the render context.`);
|
|
4721
4774
|
}
|
|
4722
4775
|
else if (instance === currentRenderingInstance) {
|
|
4723
|
-
warn
|
|
4776
|
+
warn(`Property ${JSON.stringify(key)} was accessed during render ` +
|
|
4724
4777
|
`but is not defined on instance.`);
|
|
4725
4778
|
}
|
|
4726
4779
|
}
|
|
@@ -4733,7 +4786,7 @@ var Vue = (function (exports) {
|
|
|
4733
4786
|
}
|
|
4734
4787
|
else if (setupState.__isScriptSetup &&
|
|
4735
4788
|
hasOwn(setupState, key)) {
|
|
4736
|
-
warn
|
|
4789
|
+
warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
4737
4790
|
return false;
|
|
4738
4791
|
}
|
|
4739
4792
|
else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
@@ -4741,11 +4794,11 @@ var Vue = (function (exports) {
|
|
|
4741
4794
|
return true;
|
|
4742
4795
|
}
|
|
4743
4796
|
else if (hasOwn(instance.props, key)) {
|
|
4744
|
-
warn
|
|
4797
|
+
warn(`Attempting to mutate prop "${key}". Props are readonly.`);
|
|
4745
4798
|
return false;
|
|
4746
4799
|
}
|
|
4747
4800
|
if (key[0] === '$' && key.slice(1) in instance) {
|
|
4748
|
-
warn
|
|
4801
|
+
warn(`Attempting to mutate public property "${key}". ` +
|
|
4749
4802
|
`Properties starting with $ are reserved and readonly.`);
|
|
4750
4803
|
return false;
|
|
4751
4804
|
}
|
|
@@ -4786,7 +4839,7 @@ var Vue = (function (exports) {
|
|
|
4786
4839
|
};
|
|
4787
4840
|
{
|
|
4788
4841
|
PublicInstanceProxyHandlers.ownKeys = (target) => {
|
|
4789
|
-
warn
|
|
4842
|
+
warn(`Avoid app logic that relies on enumerating keys on a component instance. ` +
|
|
4790
4843
|
`The keys will be empty in production mode to avoid performance overhead.`);
|
|
4791
4844
|
return Reflect.ownKeys(target);
|
|
4792
4845
|
};
|
|
@@ -4802,7 +4855,7 @@ var Vue = (function (exports) {
|
|
|
4802
4855
|
has(_, key) {
|
|
4803
4856
|
const has = key[0] !== '_' && !isGloballyWhitelisted(key);
|
|
4804
4857
|
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
4805
|
-
warn
|
|
4858
|
+
warn(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);
|
|
4806
4859
|
}
|
|
4807
4860
|
return has;
|
|
4808
4861
|
}
|
|
@@ -4852,7 +4905,7 @@ var Vue = (function (exports) {
|
|
|
4852
4905
|
Object.keys(toRaw(setupState)).forEach(key => {
|
|
4853
4906
|
if (!setupState.__isScriptSetup) {
|
|
4854
4907
|
if (isReservedPrefix(key[0])) {
|
|
4855
|
-
warn
|
|
4908
|
+
warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
|
|
4856
4909
|
`which are reserved prefixes for Vue internals.`);
|
|
4857
4910
|
return;
|
|
4858
4911
|
}
|
|
@@ -4870,7 +4923,7 @@ var Vue = (function (exports) {
|
|
|
4870
4923
|
const cache = Object.create(null);
|
|
4871
4924
|
return (type, key) => {
|
|
4872
4925
|
if (cache[key]) {
|
|
4873
|
-
warn
|
|
4926
|
+
warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
|
|
4874
4927
|
}
|
|
4875
4928
|
else {
|
|
4876
4929
|
cache[key] = type;
|
|
@@ -4887,7 +4940,7 @@ var Vue = (function (exports) {
|
|
|
4887
4940
|
// call beforeCreate first before accessing other options since
|
|
4888
4941
|
// the hook may mutate resolved options (#2791)
|
|
4889
4942
|
if (options.beforeCreate) {
|
|
4890
|
-
callHook(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
|
|
4943
|
+
callHook$1(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
|
|
4891
4944
|
}
|
|
4892
4945
|
const {
|
|
4893
4946
|
// state
|
|
@@ -4937,24 +4990,24 @@ var Vue = (function (exports) {
|
|
|
4937
4990
|
}
|
|
4938
4991
|
}
|
|
4939
4992
|
else {
|
|
4940
|
-
warn
|
|
4993
|
+
warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` +
|
|
4941
4994
|
`Did you reference the function correctly?`);
|
|
4942
4995
|
}
|
|
4943
4996
|
}
|
|
4944
4997
|
}
|
|
4945
4998
|
if (dataOptions) {
|
|
4946
4999
|
if (!isFunction(dataOptions)) {
|
|
4947
|
-
warn
|
|
5000
|
+
warn(`The data option must be a function. ` +
|
|
4948
5001
|
`Plain object usage is no longer supported.`);
|
|
4949
5002
|
}
|
|
4950
5003
|
const data = dataOptions.call(publicThis, publicThis);
|
|
4951
5004
|
if (isPromise(data)) {
|
|
4952
|
-
warn
|
|
5005
|
+
warn(`data() returned a Promise - note data() cannot be async; If you ` +
|
|
4953
5006
|
`intend to perform data fetching before component renders, use ` +
|
|
4954
5007
|
`async setup() + <Suspense>.`);
|
|
4955
5008
|
}
|
|
4956
5009
|
if (!isObject(data)) {
|
|
4957
|
-
warn
|
|
5010
|
+
warn(`data() should return an object.`);
|
|
4958
5011
|
}
|
|
4959
5012
|
else {
|
|
4960
5013
|
instance.data = reactive(data);
|
|
@@ -4985,15 +5038,15 @@ var Vue = (function (exports) {
|
|
|
4985
5038
|
? opt.get.bind(publicThis, publicThis)
|
|
4986
5039
|
: NOOP;
|
|
4987
5040
|
if (get === NOOP) {
|
|
4988
|
-
warn
|
|
5041
|
+
warn(`Computed property "${key}" has no getter.`);
|
|
4989
5042
|
}
|
|
4990
5043
|
const set = !isFunction(opt) && isFunction(opt.set)
|
|
4991
5044
|
? opt.set.bind(publicThis)
|
|
4992
5045
|
: () => {
|
|
4993
|
-
warn
|
|
5046
|
+
warn(`Write operation failed: computed property "${key}" is readonly.`);
|
|
4994
5047
|
}
|
|
4995
5048
|
;
|
|
4996
|
-
const c = computed
|
|
5049
|
+
const c = computed({
|
|
4997
5050
|
get,
|
|
4998
5051
|
set
|
|
4999
5052
|
});
|
|
@@ -5022,7 +5075,7 @@ var Vue = (function (exports) {
|
|
|
5022
5075
|
});
|
|
5023
5076
|
}
|
|
5024
5077
|
if (created) {
|
|
5025
|
-
callHook(created, instance, "c" /* LifecycleHooks.CREATED */);
|
|
5078
|
+
callHook$1(created, instance, "c" /* LifecycleHooks.CREATED */);
|
|
5026
5079
|
}
|
|
5027
5080
|
function registerLifecycleHook(register, hook) {
|
|
5028
5081
|
if (isArray(hook)) {
|
|
@@ -5102,7 +5155,7 @@ var Vue = (function (exports) {
|
|
|
5102
5155
|
}
|
|
5103
5156
|
else {
|
|
5104
5157
|
{
|
|
5105
|
-
warn
|
|
5158
|
+
warn(`injected property "${key}" is a ref and will be auto-unwrapped ` +
|
|
5106
5159
|
`and no longer needs \`.value\` in the next minor release. ` +
|
|
5107
5160
|
`To opt-in to the new behavior now, ` +
|
|
5108
5161
|
`set \`app.config.unwrapInjectedRef = true\` (this config is ` +
|
|
@@ -5119,7 +5172,7 @@ var Vue = (function (exports) {
|
|
|
5119
5172
|
}
|
|
5120
5173
|
}
|
|
5121
5174
|
}
|
|
5122
|
-
function callHook(hook, instance, type) {
|
|
5175
|
+
function callHook$1(hook, instance, type) {
|
|
5123
5176
|
callWithAsyncErrorHandling(isArray(hook)
|
|
5124
5177
|
? hook.map(h => h.bind(instance.proxy))
|
|
5125
5178
|
: hook.bind(instance.proxy), instance, type);
|
|
@@ -5134,7 +5187,7 @@ var Vue = (function (exports) {
|
|
|
5134
5187
|
watch(getter, handler);
|
|
5135
5188
|
}
|
|
5136
5189
|
else {
|
|
5137
|
-
warn
|
|
5190
|
+
warn(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
5138
5191
|
}
|
|
5139
5192
|
}
|
|
5140
5193
|
else if (isFunction(raw)) {
|
|
@@ -5152,12 +5205,12 @@ var Vue = (function (exports) {
|
|
|
5152
5205
|
watch(getter, handler, raw);
|
|
5153
5206
|
}
|
|
5154
5207
|
else {
|
|
5155
|
-
warn
|
|
5208
|
+
warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
5156
5209
|
}
|
|
5157
5210
|
}
|
|
5158
5211
|
}
|
|
5159
5212
|
else {
|
|
5160
|
-
warn
|
|
5213
|
+
warn(`Invalid watch option: "${key}"`, raw);
|
|
5161
5214
|
}
|
|
5162
5215
|
}
|
|
5163
5216
|
/**
|
|
@@ -5201,7 +5254,7 @@ var Vue = (function (exports) {
|
|
|
5201
5254
|
}
|
|
5202
5255
|
for (const key in from) {
|
|
5203
5256
|
if (asMixin && key === 'expose') {
|
|
5204
|
-
warn
|
|
5257
|
+
warn(`"expose" option is ignored when declared in mixins or extends. ` +
|
|
5205
5258
|
`It should only be declared in the base component itself.`);
|
|
5206
5259
|
}
|
|
5207
5260
|
else {
|
|
@@ -5219,20 +5272,20 @@ var Vue = (function (exports) {
|
|
|
5219
5272
|
methods: mergeObjectOptions,
|
|
5220
5273
|
computed: mergeObjectOptions,
|
|
5221
5274
|
// lifecycle
|
|
5222
|
-
beforeCreate: mergeAsArray,
|
|
5223
|
-
created: mergeAsArray,
|
|
5224
|
-
beforeMount: mergeAsArray,
|
|
5225
|
-
mounted: mergeAsArray,
|
|
5226
|
-
beforeUpdate: mergeAsArray,
|
|
5227
|
-
updated: mergeAsArray,
|
|
5228
|
-
beforeDestroy: mergeAsArray,
|
|
5229
|
-
beforeUnmount: mergeAsArray,
|
|
5230
|
-
destroyed: mergeAsArray,
|
|
5231
|
-
unmounted: mergeAsArray,
|
|
5232
|
-
activated: mergeAsArray,
|
|
5233
|
-
deactivated: mergeAsArray,
|
|
5234
|
-
errorCaptured: mergeAsArray,
|
|
5235
|
-
serverPrefetch: mergeAsArray,
|
|
5275
|
+
beforeCreate: mergeAsArray$1,
|
|
5276
|
+
created: mergeAsArray$1,
|
|
5277
|
+
beforeMount: mergeAsArray$1,
|
|
5278
|
+
mounted: mergeAsArray$1,
|
|
5279
|
+
beforeUpdate: mergeAsArray$1,
|
|
5280
|
+
updated: mergeAsArray$1,
|
|
5281
|
+
beforeDestroy: mergeAsArray$1,
|
|
5282
|
+
beforeUnmount: mergeAsArray$1,
|
|
5283
|
+
destroyed: mergeAsArray$1,
|
|
5284
|
+
unmounted: mergeAsArray$1,
|
|
5285
|
+
activated: mergeAsArray$1,
|
|
5286
|
+
deactivated: mergeAsArray$1,
|
|
5287
|
+
errorCaptured: mergeAsArray$1,
|
|
5288
|
+
serverPrefetch: mergeAsArray$1,
|
|
5236
5289
|
// assets
|
|
5237
5290
|
components: mergeObjectOptions,
|
|
5238
5291
|
directives: mergeObjectOptions,
|
|
@@ -5266,7 +5319,7 @@ var Vue = (function (exports) {
|
|
|
5266
5319
|
}
|
|
5267
5320
|
return raw;
|
|
5268
5321
|
}
|
|
5269
|
-
function mergeAsArray(to, from) {
|
|
5322
|
+
function mergeAsArray$1(to, from) {
|
|
5270
5323
|
return to ? [...new Set([].concat(to, from))] : from;
|
|
5271
5324
|
}
|
|
5272
5325
|
function mergeObjectOptions(to, from) {
|
|
@@ -5279,7 +5332,7 @@ var Vue = (function (exports) {
|
|
|
5279
5332
|
return to;
|
|
5280
5333
|
const merged = extend(Object.create(null), to);
|
|
5281
5334
|
for (const key in from) {
|
|
5282
|
-
merged[key] = mergeAsArray(to[key], from[key]);
|
|
5335
|
+
merged[key] = mergeAsArray$1(to[key], from[key]);
|
|
5283
5336
|
}
|
|
5284
5337
|
return merged;
|
|
5285
5338
|
}
|
|
@@ -5534,7 +5587,7 @@ var Vue = (function (exports) {
|
|
|
5534
5587
|
if (isArray(raw)) {
|
|
5535
5588
|
for (let i = 0; i < raw.length; i++) {
|
|
5536
5589
|
if (!isString(raw[i])) {
|
|
5537
|
-
warn
|
|
5590
|
+
warn(`props must be strings when using array syntax.`, raw[i]);
|
|
5538
5591
|
}
|
|
5539
5592
|
const normalizedKey = camelize(raw[i]);
|
|
5540
5593
|
if (validatePropName(normalizedKey)) {
|
|
@@ -5544,7 +5597,7 @@ var Vue = (function (exports) {
|
|
|
5544
5597
|
}
|
|
5545
5598
|
else if (raw) {
|
|
5546
5599
|
if (!isObject(raw)) {
|
|
5547
|
-
warn
|
|
5600
|
+
warn(`invalid props options`, raw);
|
|
5548
5601
|
}
|
|
5549
5602
|
for (const key in raw) {
|
|
5550
5603
|
const normalizedKey = camelize(key);
|
|
@@ -5577,15 +5630,15 @@ var Vue = (function (exports) {
|
|
|
5577
5630
|
return true;
|
|
5578
5631
|
}
|
|
5579
5632
|
else {
|
|
5580
|
-
warn
|
|
5633
|
+
warn(`Invalid prop name: "${key}" is a reserved property.`);
|
|
5581
5634
|
}
|
|
5582
5635
|
return false;
|
|
5583
5636
|
}
|
|
5584
5637
|
// use function string name to check type constructors
|
|
5585
5638
|
// so that it works across vms / iframes.
|
|
5586
5639
|
function getType(ctor) {
|
|
5587
|
-
const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
|
|
5588
|
-
return match ? match[
|
|
5640
|
+
const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
|
|
5641
|
+
return match ? match[2] : ctor === null ? 'null' : '';
|
|
5589
5642
|
}
|
|
5590
5643
|
function isSameType(a, b) {
|
|
5591
5644
|
return getType(a) === getType(b);
|
|
@@ -5619,7 +5672,7 @@ var Vue = (function (exports) {
|
|
|
5619
5672
|
const { type, required, validator } = prop;
|
|
5620
5673
|
// required!
|
|
5621
5674
|
if (required && isAbsent) {
|
|
5622
|
-
warn
|
|
5675
|
+
warn('Missing required prop: "' + name + '"');
|
|
5623
5676
|
return;
|
|
5624
5677
|
}
|
|
5625
5678
|
// missing but optional
|
|
@@ -5638,13 +5691,13 @@ var Vue = (function (exports) {
|
|
|
5638
5691
|
isValid = valid;
|
|
5639
5692
|
}
|
|
5640
5693
|
if (!isValid) {
|
|
5641
|
-
warn
|
|
5694
|
+
warn(getInvalidTypeMessage(name, value, expectedTypes));
|
|
5642
5695
|
return;
|
|
5643
5696
|
}
|
|
5644
5697
|
}
|
|
5645
5698
|
// custom validator
|
|
5646
5699
|
if (validator && !validator(value)) {
|
|
5647
|
-
warn
|
|
5700
|
+
warn('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
5648
5701
|
}
|
|
5649
5702
|
}
|
|
5650
5703
|
const isSimpleType = /*#__PURE__*/ makeMap('String,Number,Boolean,Function,Symbol,BigInt');
|
|
@@ -5741,7 +5794,7 @@ var Vue = (function (exports) {
|
|
|
5741
5794
|
}
|
|
5742
5795
|
const normalized = withCtx((...args) => {
|
|
5743
5796
|
if (true && currentInstance) {
|
|
5744
|
-
warn
|
|
5797
|
+
warn(`Slot "${key}" invoked outside of the render function: ` +
|
|
5745
5798
|
`this will not track dependencies used in the slot. ` +
|
|
5746
5799
|
`Invoke the slot function inside the render function instead.`);
|
|
5747
5800
|
}
|
|
@@ -5761,7 +5814,7 @@ var Vue = (function (exports) {
|
|
|
5761
5814
|
}
|
|
5762
5815
|
else if (value != null) {
|
|
5763
5816
|
{
|
|
5764
|
-
warn
|
|
5817
|
+
warn(`Non-function value encountered for slot "${key}". ` +
|
|
5765
5818
|
`Prefer function slots for better performance.`);
|
|
5766
5819
|
}
|
|
5767
5820
|
const normalized = normalizeSlotValue(value);
|
|
@@ -5772,7 +5825,7 @@ var Vue = (function (exports) {
|
|
|
5772
5825
|
const normalizeVNodeSlots = (instance, children) => {
|
|
5773
5826
|
if (!isKeepAlive(instance.vnode) &&
|
|
5774
5827
|
!(false )) {
|
|
5775
|
-
warn
|
|
5828
|
+
warn(`Non-function value encountered for default slot. ` +
|
|
5776
5829
|
`Prefer function slots for better performance.`);
|
|
5777
5830
|
}
|
|
5778
5831
|
const normalized = normalizeSlotValue(children);
|
|
@@ -5873,21 +5926,21 @@ var Vue = (function (exports) {
|
|
|
5873
5926
|
emitsCache: new WeakMap()
|
|
5874
5927
|
};
|
|
5875
5928
|
}
|
|
5876
|
-
let uid = 0;
|
|
5929
|
+
let uid$1 = 0;
|
|
5877
5930
|
function createAppAPI(render, hydrate) {
|
|
5878
5931
|
return function createApp(rootComponent, rootProps = null) {
|
|
5879
5932
|
if (!isFunction(rootComponent)) {
|
|
5880
5933
|
rootComponent = Object.assign({}, rootComponent);
|
|
5881
5934
|
}
|
|
5882
5935
|
if (rootProps != null && !isObject(rootProps)) {
|
|
5883
|
-
warn
|
|
5936
|
+
warn(`root props passed to app.mount() must be an object.`);
|
|
5884
5937
|
rootProps = null;
|
|
5885
5938
|
}
|
|
5886
5939
|
const context = createAppContext();
|
|
5887
5940
|
const installedPlugins = new Set();
|
|
5888
5941
|
let isMounted = false;
|
|
5889
5942
|
const app = (context.app = {
|
|
5890
|
-
_uid: uid++,
|
|
5943
|
+
_uid: uid$1++,
|
|
5891
5944
|
_component: rootComponent,
|
|
5892
5945
|
_props: rootProps,
|
|
5893
5946
|
_container: null,
|
|
@@ -5899,12 +5952,12 @@ var Vue = (function (exports) {
|
|
|
5899
5952
|
},
|
|
5900
5953
|
set config(v) {
|
|
5901
5954
|
{
|
|
5902
|
-
warn
|
|
5955
|
+
warn(`app.config cannot be replaced. Modify individual options instead.`);
|
|
5903
5956
|
}
|
|
5904
5957
|
},
|
|
5905
5958
|
use(plugin, ...options) {
|
|
5906
5959
|
if (installedPlugins.has(plugin)) {
|
|
5907
|
-
warn
|
|
5960
|
+
warn(`Plugin has already been applied to target app.`);
|
|
5908
5961
|
}
|
|
5909
5962
|
else if (plugin && isFunction(plugin.install)) {
|
|
5910
5963
|
installedPlugins.add(plugin);
|
|
@@ -5915,7 +5968,7 @@ var Vue = (function (exports) {
|
|
|
5915
5968
|
plugin(app, ...options);
|
|
5916
5969
|
}
|
|
5917
5970
|
else {
|
|
5918
|
-
warn
|
|
5971
|
+
warn(`A plugin must either be a function or an object with an "install" ` +
|
|
5919
5972
|
`function.`);
|
|
5920
5973
|
}
|
|
5921
5974
|
return app;
|
|
@@ -5926,7 +5979,7 @@ var Vue = (function (exports) {
|
|
|
5926
5979
|
context.mixins.push(mixin);
|
|
5927
5980
|
}
|
|
5928
5981
|
else {
|
|
5929
|
-
warn
|
|
5982
|
+
warn('Mixin has already been applied to target app' +
|
|
5930
5983
|
(mixin.name ? `: ${mixin.name}` : ''));
|
|
5931
5984
|
}
|
|
5932
5985
|
}
|
|
@@ -5940,7 +5993,7 @@ var Vue = (function (exports) {
|
|
|
5940
5993
|
return context.components[name];
|
|
5941
5994
|
}
|
|
5942
5995
|
if (context.components[name]) {
|
|
5943
|
-
warn
|
|
5996
|
+
warn(`Component "${name}" has already been registered in target app.`);
|
|
5944
5997
|
}
|
|
5945
5998
|
context.components[name] = component;
|
|
5946
5999
|
return app;
|
|
@@ -5953,7 +6006,7 @@ var Vue = (function (exports) {
|
|
|
5953
6006
|
return context.directives[name];
|
|
5954
6007
|
}
|
|
5955
6008
|
if (context.directives[name]) {
|
|
5956
|
-
warn
|
|
6009
|
+
warn(`Directive "${name}" has already been registered in target app.`);
|
|
5957
6010
|
}
|
|
5958
6011
|
context.directives[name] = directive;
|
|
5959
6012
|
return app;
|
|
@@ -5962,7 +6015,7 @@ var Vue = (function (exports) {
|
|
|
5962
6015
|
if (!isMounted) {
|
|
5963
6016
|
// #5571
|
|
5964
6017
|
if (rootContainer.__vue_app__) {
|
|
5965
|
-
warn
|
|
6018
|
+
warn(`There is already an app instance mounted on the host container.\n` +
|
|
5966
6019
|
` If you want to mount another app on the same host container,` +
|
|
5967
6020
|
` you need to unmount the previous app by calling \`app.unmount()\` first.`);
|
|
5968
6021
|
}
|
|
@@ -5992,7 +6045,7 @@ var Vue = (function (exports) {
|
|
|
5992
6045
|
return getExposeProxy(vnode.component) || vnode.component.proxy;
|
|
5993
6046
|
}
|
|
5994
6047
|
else {
|
|
5995
|
-
warn
|
|
6048
|
+
warn(`App has already been mounted.\n` +
|
|
5996
6049
|
`If you want to remount the same app, move your app creation logic ` +
|
|
5997
6050
|
`into a factory function and create fresh app instances for each ` +
|
|
5998
6051
|
`mount - e.g. \`const createMyApp = () => createApp(App)\``);
|
|
@@ -6008,12 +6061,12 @@ var Vue = (function (exports) {
|
|
|
6008
6061
|
delete app._container.__vue_app__;
|
|
6009
6062
|
}
|
|
6010
6063
|
else {
|
|
6011
|
-
warn
|
|
6064
|
+
warn(`Cannot unmount an app that is not mounted.`);
|
|
6012
6065
|
}
|
|
6013
6066
|
},
|
|
6014
6067
|
provide(key, value) {
|
|
6015
6068
|
if (key in context.provides) {
|
|
6016
|
-
warn
|
|
6069
|
+
warn(`App already provides property with key "${String(key)}". ` +
|
|
6017
6070
|
`It will be overwritten with the new value.`);
|
|
6018
6071
|
}
|
|
6019
6072
|
context.provides[key] = value;
|
|
@@ -6043,7 +6096,7 @@ var Vue = (function (exports) {
|
|
|
6043
6096
|
const value = isUnmount ? null : refValue;
|
|
6044
6097
|
const { i: owner, r: ref } = rawRef;
|
|
6045
6098
|
if (!owner) {
|
|
6046
|
-
warn
|
|
6099
|
+
warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
|
|
6047
6100
|
`A vnode with ref must be created inside the render function.`);
|
|
6048
6101
|
return;
|
|
6049
6102
|
}
|
|
@@ -6110,7 +6163,7 @@ var Vue = (function (exports) {
|
|
|
6110
6163
|
refs[rawRef.k] = value;
|
|
6111
6164
|
}
|
|
6112
6165
|
else {
|
|
6113
|
-
warn
|
|
6166
|
+
warn('Invalid template ref type:', ref, `(${typeof ref})`);
|
|
6114
6167
|
}
|
|
6115
6168
|
};
|
|
6116
6169
|
if (value) {
|
|
@@ -6122,7 +6175,7 @@ var Vue = (function (exports) {
|
|
|
6122
6175
|
}
|
|
6123
6176
|
}
|
|
6124
6177
|
else {
|
|
6125
|
-
warn
|
|
6178
|
+
warn('Invalid template ref type:', ref, `(${typeof ref})`);
|
|
6126
6179
|
}
|
|
6127
6180
|
}
|
|
6128
6181
|
}
|
|
@@ -6139,7 +6192,7 @@ var Vue = (function (exports) {
|
|
|
6139
6192
|
const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
|
|
6140
6193
|
const hydrate = (vnode, container) => {
|
|
6141
6194
|
if (!container.hasChildNodes()) {
|
|
6142
|
-
warn
|
|
6195
|
+
warn(`Attempting to hydrate existing markup but container is empty. ` +
|
|
6143
6196
|
`Performing full mount instead.`);
|
|
6144
6197
|
patch(null, vnode, container);
|
|
6145
6198
|
flushPostFlushCbs();
|
|
@@ -6182,7 +6235,7 @@ var Vue = (function (exports) {
|
|
|
6182
6235
|
else {
|
|
6183
6236
|
if (node.data !== vnode.children) {
|
|
6184
6237
|
hasMismatch = true;
|
|
6185
|
-
warn
|
|
6238
|
+
warn(`Hydration text mismatch:` +
|
|
6186
6239
|
`\n- Client: ${JSON.stringify(node.data)}` +
|
|
6187
6240
|
`\n- Server: ${JSON.stringify(vnode.children)}`);
|
|
6188
6241
|
node.data = vnode.children;
|
|
@@ -6297,7 +6350,7 @@ var Vue = (function (exports) {
|
|
|
6297
6350
|
nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
6298
6351
|
}
|
|
6299
6352
|
else {
|
|
6300
|
-
warn
|
|
6353
|
+
warn('Invalid HostVNode type:', type, `(${typeof type})`);
|
|
6301
6354
|
}
|
|
6302
6355
|
}
|
|
6303
6356
|
if (ref != null) {
|
|
@@ -6358,7 +6411,7 @@ var Vue = (function (exports) {
|
|
|
6358
6411
|
while (next) {
|
|
6359
6412
|
hasMismatch = true;
|
|
6360
6413
|
if (!hasWarned) {
|
|
6361
|
-
warn
|
|
6414
|
+
warn(`Hydration children mismatch in <${vnode.type}>: ` +
|
|
6362
6415
|
`server rendered element contains more child nodes than client vdom.`);
|
|
6363
6416
|
hasWarned = true;
|
|
6364
6417
|
}
|
|
@@ -6371,7 +6424,7 @@ var Vue = (function (exports) {
|
|
|
6371
6424
|
else if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
|
|
6372
6425
|
if (el.textContent !== vnode.children) {
|
|
6373
6426
|
hasMismatch = true;
|
|
6374
|
-
warn
|
|
6427
|
+
warn(`Hydration text content mismatch in <${vnode.type}>:\n` +
|
|
6375
6428
|
`- Client: ${el.textContent}\n` +
|
|
6376
6429
|
`- Server: ${vnode.children}`);
|
|
6377
6430
|
el.textContent = vnode.children;
|
|
@@ -6398,7 +6451,7 @@ var Vue = (function (exports) {
|
|
|
6398
6451
|
else {
|
|
6399
6452
|
hasMismatch = true;
|
|
6400
6453
|
if (!hasWarned) {
|
|
6401
|
-
warn
|
|
6454
|
+
warn(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +
|
|
6402
6455
|
`server rendered element contains fewer child nodes than client vdom.`);
|
|
6403
6456
|
hasWarned = true;
|
|
6404
6457
|
}
|
|
@@ -6431,7 +6484,7 @@ var Vue = (function (exports) {
|
|
|
6431
6484
|
};
|
|
6432
6485
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
6433
6486
|
hasMismatch = true;
|
|
6434
|
-
warn
|
|
6487
|
+
warn(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
|
|
6435
6488
|
? `(text)`
|
|
6436
6489
|
: isComment(node) && node.data === '['
|
|
6437
6490
|
? `(start of fragment)`
|
|
@@ -6599,7 +6652,7 @@ var Vue = (function (exports) {
|
|
|
6599
6652
|
type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
|
|
6600
6653
|
}
|
|
6601
6654
|
else {
|
|
6602
|
-
warn
|
|
6655
|
+
warn('Invalid VNode type:', type, `(${typeof type})`);
|
|
6603
6656
|
}
|
|
6604
6657
|
}
|
|
6605
6658
|
// set ref
|
|
@@ -6689,6 +6742,8 @@ var Vue = (function (exports) {
|
|
|
6689
6742
|
if (dirs) {
|
|
6690
6743
|
invokeDirectiveHook(vnode, null, parentComponent, 'created');
|
|
6691
6744
|
}
|
|
6745
|
+
// scopeId
|
|
6746
|
+
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
6692
6747
|
// props
|
|
6693
6748
|
if (props) {
|
|
6694
6749
|
for (const key in props) {
|
|
@@ -6712,8 +6767,6 @@ var Vue = (function (exports) {
|
|
|
6712
6767
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
6713
6768
|
}
|
|
6714
6769
|
}
|
|
6715
|
-
// scopeId
|
|
6716
|
-
setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
|
|
6717
6770
|
{
|
|
6718
6771
|
Object.defineProperty(el, '__vnode', {
|
|
6719
6772
|
value: vnode,
|
|
@@ -7423,7 +7476,7 @@ var Vue = (function (exports) {
|
|
|
7423
7476
|
: normalizeVNode(c2[i]));
|
|
7424
7477
|
if (nextChild.key != null) {
|
|
7425
7478
|
if (keyToNewIndexMap.has(nextChild.key)) {
|
|
7426
|
-
warn
|
|
7479
|
+
warn(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);
|
|
7427
7480
|
}
|
|
7428
7481
|
keyToNewIndexMap.set(nextChild.key, i);
|
|
7429
7482
|
}
|
|
@@ -7868,14 +7921,14 @@ var Vue = (function (exports) {
|
|
|
7868
7921
|
const targetSelector = props && props.to;
|
|
7869
7922
|
if (isString(targetSelector)) {
|
|
7870
7923
|
if (!select) {
|
|
7871
|
-
warn
|
|
7924
|
+
warn(`Current renderer does not support string target for Teleports. ` +
|
|
7872
7925
|
`(missing querySelector renderer option)`);
|
|
7873
7926
|
return null;
|
|
7874
7927
|
}
|
|
7875
7928
|
else {
|
|
7876
7929
|
const target = select(targetSelector);
|
|
7877
7930
|
if (!target) {
|
|
7878
|
-
warn
|
|
7931
|
+
warn(`Failed to locate Teleport target with selector "${targetSelector}". ` +
|
|
7879
7932
|
`Note the target element must exist before the component is mounted - ` +
|
|
7880
7933
|
`i.e. the target cannot be rendered by the component itself, and ` +
|
|
7881
7934
|
`ideally should be outside of the entire Vue component tree.`);
|
|
@@ -7885,7 +7938,7 @@ var Vue = (function (exports) {
|
|
|
7885
7938
|
}
|
|
7886
7939
|
else {
|
|
7887
7940
|
if (!targetSelector && !isTeleportDisabled(props)) {
|
|
7888
|
-
warn
|
|
7941
|
+
warn(`Invalid Teleport target: ${targetSelector}`);
|
|
7889
7942
|
}
|
|
7890
7943
|
return targetSelector;
|
|
7891
7944
|
}
|
|
@@ -7918,7 +7971,7 @@ var Vue = (function (exports) {
|
|
|
7918
7971
|
isSVG = isSVG || isTargetSVG(target);
|
|
7919
7972
|
}
|
|
7920
7973
|
else if (!disabled) {
|
|
7921
|
-
warn
|
|
7974
|
+
warn('Invalid Teleport target on mount:', target, `(${typeof target})`);
|
|
7922
7975
|
}
|
|
7923
7976
|
const mount = (container, anchor) => {
|
|
7924
7977
|
// Teleport *always* has Array children. This is enforced in both the
|
|
@@ -7970,7 +8023,7 @@ var Vue = (function (exports) {
|
|
|
7970
8023
|
moveTeleport(n2, nextTarget, null, internals, 0 /* TeleportMoveTypes.TARGET_CHANGE */);
|
|
7971
8024
|
}
|
|
7972
8025
|
else {
|
|
7973
|
-
warn
|
|
8026
|
+
warn('Invalid Teleport target on update:', target, `(${typeof target})`);
|
|
7974
8027
|
}
|
|
7975
8028
|
}
|
|
7976
8029
|
else if (wasDisabled) {
|
|
@@ -8251,7 +8304,7 @@ var Vue = (function (exports) {
|
|
|
8251
8304
|
}
|
|
8252
8305
|
// validate key
|
|
8253
8306
|
if (vnode.key !== vnode.key) {
|
|
8254
|
-
warn
|
|
8307
|
+
warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
8255
8308
|
}
|
|
8256
8309
|
// track vnode for block tree
|
|
8257
8310
|
if (isBlockTreeEnabled > 0 &&
|
|
@@ -8275,7 +8328,7 @@ var Vue = (function (exports) {
|
|
|
8275
8328
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
8276
8329
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
8277
8330
|
if (!type) {
|
|
8278
|
-
warn
|
|
8331
|
+
warn(`Invalid vnode type when creating vnode: ${type}.`);
|
|
8279
8332
|
}
|
|
8280
8333
|
type = Comment;
|
|
8281
8334
|
}
|
|
@@ -8333,7 +8386,7 @@ var Vue = (function (exports) {
|
|
|
8333
8386
|
: 0;
|
|
8334
8387
|
if (shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ && isProxy(type)) {
|
|
8335
8388
|
type = toRaw(type);
|
|
8336
|
-
warn
|
|
8389
|
+
warn(`Vue received a Component which was made a reactive object. This can ` +
|
|
8337
8390
|
`lead to unnecessary performance overhead, and should be avoided by ` +
|
|
8338
8391
|
`marking the component with \`markRaw\` or using \`shallowRef\` ` +
|
|
8339
8392
|
`instead of \`ref\`.`, `\nComponent that was made reactive: `, type);
|
|
@@ -8401,7 +8454,8 @@ var Vue = (function (exports) {
|
|
|
8401
8454
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
8402
8455
|
el: vnode.el,
|
|
8403
8456
|
anchor: vnode.anchor,
|
|
8404
|
-
ctx: vnode.ctx
|
|
8457
|
+
ctx: vnode.ctx,
|
|
8458
|
+
ce: vnode.ce
|
|
8405
8459
|
};
|
|
8406
8460
|
return cloned;
|
|
8407
8461
|
}
|
|
@@ -8568,13 +8622,13 @@ var Vue = (function (exports) {
|
|
|
8568
8622
|
}
|
|
8569
8623
|
|
|
8570
8624
|
const emptyAppContext = createAppContext();
|
|
8571
|
-
let uid
|
|
8625
|
+
let uid = 0;
|
|
8572
8626
|
function createComponentInstance(vnode, parent, suspense) {
|
|
8573
8627
|
const type = vnode.type;
|
|
8574
8628
|
// inherit parent app context - or - if root, adopt from root vnode
|
|
8575
8629
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
8576
8630
|
const instance = {
|
|
8577
|
-
uid: uid
|
|
8631
|
+
uid: uid++,
|
|
8578
8632
|
vnode,
|
|
8579
8633
|
type,
|
|
8580
8634
|
parent,
|
|
@@ -8644,7 +8698,7 @@ var Vue = (function (exports) {
|
|
|
8644
8698
|
instance.ctx = createDevRenderContext(instance);
|
|
8645
8699
|
}
|
|
8646
8700
|
instance.root = parent ? parent.root : instance;
|
|
8647
|
-
instance.emit = emit
|
|
8701
|
+
instance.emit = emit.bind(null, instance);
|
|
8648
8702
|
// apply custom element special handling
|
|
8649
8703
|
if (vnode.ce) {
|
|
8650
8704
|
vnode.ce(instance);
|
|
@@ -8665,7 +8719,7 @@ var Vue = (function (exports) {
|
|
|
8665
8719
|
function validateComponentName(name, config) {
|
|
8666
8720
|
const appIsNativeTag = config.isNativeTag || NO;
|
|
8667
8721
|
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
8668
|
-
warn
|
|
8722
|
+
warn('Do not use built-in or reserved HTML elements as component id: ' + name);
|
|
8669
8723
|
}
|
|
8670
8724
|
}
|
|
8671
8725
|
function isStatefulComponent(instance) {
|
|
@@ -8704,7 +8758,7 @@ var Vue = (function (exports) {
|
|
|
8704
8758
|
}
|
|
8705
8759
|
}
|
|
8706
8760
|
if (Component.compilerOptions && isRuntimeOnly()) {
|
|
8707
|
-
warn
|
|
8761
|
+
warn(`"compilerOptions" is only supported when using a build of Vue that ` +
|
|
8708
8762
|
`includes the runtime compiler. Since you are using a runtime-only ` +
|
|
8709
8763
|
`build, the options should be passed via your build tool config instead.`);
|
|
8710
8764
|
}
|
|
@@ -8745,7 +8799,7 @@ var Vue = (function (exports) {
|
|
|
8745
8799
|
instance.asyncDep = setupResult;
|
|
8746
8800
|
if (!instance.suspense) {
|
|
8747
8801
|
const name = (_a = Component.name) !== null && _a !== void 0 ? _a : 'Anonymous';
|
|
8748
|
-
warn
|
|
8802
|
+
warn(`Component <${name}>: setup function returned a promise, but no ` +
|
|
8749
8803
|
`<Suspense> boundary was found in the parent component tree. ` +
|
|
8750
8804
|
`A component with async setup() must be nested in a <Suspense> ` +
|
|
8751
8805
|
`in order to be rendered.`);
|
|
@@ -8769,7 +8823,7 @@ var Vue = (function (exports) {
|
|
|
8769
8823
|
}
|
|
8770
8824
|
else if (isObject(setupResult)) {
|
|
8771
8825
|
if (isVNode(setupResult)) {
|
|
8772
|
-
warn
|
|
8826
|
+
warn(`setup() should not return VNodes directly - ` +
|
|
8773
8827
|
`return a render function instead.`);
|
|
8774
8828
|
}
|
|
8775
8829
|
// setup returned bindings.
|
|
@@ -8783,18 +8837,18 @@ var Vue = (function (exports) {
|
|
|
8783
8837
|
}
|
|
8784
8838
|
}
|
|
8785
8839
|
else if (setupResult !== undefined) {
|
|
8786
|
-
warn
|
|
8840
|
+
warn(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);
|
|
8787
8841
|
}
|
|
8788
8842
|
finishComponentSetup(instance, isSSR);
|
|
8789
8843
|
}
|
|
8790
|
-
let compile;
|
|
8844
|
+
let compile$1;
|
|
8791
8845
|
let installWithProxy;
|
|
8792
8846
|
/**
|
|
8793
8847
|
* For runtime-dom to register the compiler.
|
|
8794
8848
|
* Note the exported method uses any to avoid d.ts relying on the compiler types.
|
|
8795
8849
|
*/
|
|
8796
8850
|
function registerRuntimeCompiler(_compile) {
|
|
8797
|
-
compile = _compile;
|
|
8851
|
+
compile$1 = _compile;
|
|
8798
8852
|
installWithProxy = i => {
|
|
8799
8853
|
if (i.render._rc) {
|
|
8800
8854
|
i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
|
|
@@ -8802,7 +8856,7 @@ var Vue = (function (exports) {
|
|
|
8802
8856
|
};
|
|
8803
8857
|
}
|
|
8804
8858
|
// dev only
|
|
8805
|
-
const isRuntimeOnly = () => !compile;
|
|
8859
|
+
const isRuntimeOnly = () => !compile$1;
|
|
8806
8860
|
function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
8807
8861
|
const Component = instance.type;
|
|
8808
8862
|
// template / render function normalization
|
|
@@ -8810,7 +8864,7 @@ var Vue = (function (exports) {
|
|
|
8810
8864
|
if (!instance.render) {
|
|
8811
8865
|
// only do on-the-fly compile if not in SSR - SSR on-the-fly compilation
|
|
8812
8866
|
// is done by server-renderer
|
|
8813
|
-
if (!isSSR && compile && !Component.render) {
|
|
8867
|
+
if (!isSSR && compile$1 && !Component.render) {
|
|
8814
8868
|
const template = Component.template ||
|
|
8815
8869
|
resolveMergedOptions(instance).template;
|
|
8816
8870
|
if (template) {
|
|
@@ -8823,7 +8877,7 @@ var Vue = (function (exports) {
|
|
|
8823
8877
|
isCustomElement,
|
|
8824
8878
|
delimiters
|
|
8825
8879
|
}, compilerOptions), componentCompilerOptions);
|
|
8826
|
-
Component.render = compile(template, finalCompilerOptions);
|
|
8880
|
+
Component.render = compile$1(template, finalCompilerOptions);
|
|
8827
8881
|
{
|
|
8828
8882
|
endMeasure(instance, `compile`);
|
|
8829
8883
|
}
|
|
@@ -8849,14 +8903,14 @@ var Vue = (function (exports) {
|
|
|
8849
8903
|
// the runtime compilation of template in SSR is done by server-render
|
|
8850
8904
|
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
8851
8905
|
/* istanbul ignore if */
|
|
8852
|
-
if (!compile && Component.template) {
|
|
8853
|
-
warn
|
|
8906
|
+
if (!compile$1 && Component.template) {
|
|
8907
|
+
warn(`Component provided template option but ` +
|
|
8854
8908
|
`runtime compilation is not supported in this build of Vue.` +
|
|
8855
8909
|
(` Use "vue.global.js" instead.`
|
|
8856
8910
|
) /* should not happen */);
|
|
8857
8911
|
}
|
|
8858
8912
|
else {
|
|
8859
|
-
warn
|
|
8913
|
+
warn(`Component is missing template or render function.`);
|
|
8860
8914
|
}
|
|
8861
8915
|
}
|
|
8862
8916
|
}
|
|
@@ -8868,11 +8922,11 @@ var Vue = (function (exports) {
|
|
|
8868
8922
|
return target[key];
|
|
8869
8923
|
},
|
|
8870
8924
|
set() {
|
|
8871
|
-
warn
|
|
8925
|
+
warn(`setupContext.attrs is readonly.`);
|
|
8872
8926
|
return false;
|
|
8873
8927
|
},
|
|
8874
8928
|
deleteProperty() {
|
|
8875
|
-
warn
|
|
8929
|
+
warn(`setupContext.attrs is readonly.`);
|
|
8876
8930
|
return false;
|
|
8877
8931
|
}
|
|
8878
8932
|
}
|
|
@@ -8880,8 +8934,24 @@ var Vue = (function (exports) {
|
|
|
8880
8934
|
}
|
|
8881
8935
|
function createSetupContext(instance) {
|
|
8882
8936
|
const expose = exposed => {
|
|
8883
|
-
|
|
8884
|
-
|
|
8937
|
+
{
|
|
8938
|
+
if (instance.exposed) {
|
|
8939
|
+
warn(`expose() should be called only once per setup().`);
|
|
8940
|
+
}
|
|
8941
|
+
if (exposed != null) {
|
|
8942
|
+
let exposedType = typeof exposed;
|
|
8943
|
+
if (exposedType === 'object') {
|
|
8944
|
+
if (isArray(exposed)) {
|
|
8945
|
+
exposedType = 'array';
|
|
8946
|
+
}
|
|
8947
|
+
else if (isRef(exposed)) {
|
|
8948
|
+
exposedType = 'ref';
|
|
8949
|
+
}
|
|
8950
|
+
}
|
|
8951
|
+
if (exposedType !== 'object') {
|
|
8952
|
+
warn(`expose() should be passed a plain object, received ${exposedType}.`);
|
|
8953
|
+
}
|
|
8954
|
+
}
|
|
8885
8955
|
}
|
|
8886
8956
|
instance.exposed = exposed || {};
|
|
8887
8957
|
};
|
|
@@ -8956,13 +9026,13 @@ var Vue = (function (exports) {
|
|
|
8956
9026
|
return isFunction(value) && '__vccOpts' in value;
|
|
8957
9027
|
}
|
|
8958
9028
|
|
|
8959
|
-
const computed
|
|
9029
|
+
const computed = ((getterOrOptions, debugOptions) => {
|
|
8960
9030
|
// @ts-ignore
|
|
8961
|
-
return computed(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
9031
|
+
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
8962
9032
|
});
|
|
8963
9033
|
|
|
8964
9034
|
// dev only
|
|
8965
|
-
const warnRuntimeUsage = (method) => warn
|
|
9035
|
+
const warnRuntimeUsage = (method) => warn(`${method}() is a compiler-hint helper that is only usable inside ` +
|
|
8966
9036
|
`<script setup> of a single file component. Its arguments should be ` +
|
|
8967
9037
|
`compiled away and passing it at runtime has no effect.`);
|
|
8968
9038
|
// implementation
|
|
@@ -9029,7 +9099,7 @@ var Vue = (function (exports) {
|
|
|
9029
9099
|
function getContext() {
|
|
9030
9100
|
const i = getCurrentInstance();
|
|
9031
9101
|
if (!i) {
|
|
9032
|
-
warn
|
|
9102
|
+
warn(`useContext() called without active instance.`);
|
|
9033
9103
|
}
|
|
9034
9104
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
9035
9105
|
}
|
|
@@ -9056,7 +9126,7 @@ var Vue = (function (exports) {
|
|
|
9056
9126
|
props[key] = { default: defaults[key] };
|
|
9057
9127
|
}
|
|
9058
9128
|
else {
|
|
9059
|
-
warn
|
|
9129
|
+
warn(`props default key "${key}" has no corresponding declaration.`);
|
|
9060
9130
|
}
|
|
9061
9131
|
}
|
|
9062
9132
|
return props;
|
|
@@ -9099,7 +9169,7 @@ var Vue = (function (exports) {
|
|
|
9099
9169
|
function withAsyncContext(getAwaitable) {
|
|
9100
9170
|
const ctx = getCurrentInstance();
|
|
9101
9171
|
if (!ctx) {
|
|
9102
|
-
warn
|
|
9172
|
+
warn(`withAsyncContext called without active current instance. ` +
|
|
9103
9173
|
`This is likely a bug.`);
|
|
9104
9174
|
}
|
|
9105
9175
|
let awaitable = getAwaitable();
|
|
@@ -9144,7 +9214,7 @@ var Vue = (function (exports) {
|
|
|
9144
9214
|
const ssrContextKey = Symbol(`ssrContext` );
|
|
9145
9215
|
const useSSRContext = () => {
|
|
9146
9216
|
{
|
|
9147
|
-
warn
|
|
9217
|
+
warn(`useSSRContext() is not supported in the global build.`);
|
|
9148
9218
|
}
|
|
9149
9219
|
};
|
|
9150
9220
|
|
|
@@ -9365,7 +9435,7 @@ var Vue = (function (exports) {
|
|
|
9365
9435
|
}
|
|
9366
9436
|
|
|
9367
9437
|
// Core API ------------------------------------------------------------------
|
|
9368
|
-
const version = "3.2.
|
|
9438
|
+
const version = "3.2.46";
|
|
9369
9439
|
/**
|
|
9370
9440
|
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
|
9371
9441
|
* @internal
|
|
@@ -9482,9 +9552,6 @@ var Vue = (function (exports) {
|
|
|
9482
9552
|
const style = el.style;
|
|
9483
9553
|
const isCssString = isString(next);
|
|
9484
9554
|
if (next && !isCssString) {
|
|
9485
|
-
for (const key in next) {
|
|
9486
|
-
setStyle(style, key, next[key]);
|
|
9487
|
-
}
|
|
9488
9555
|
if (prev && !isString(prev)) {
|
|
9489
9556
|
for (const key in prev) {
|
|
9490
9557
|
if (next[key] == null) {
|
|
@@ -9492,6 +9559,9 @@ var Vue = (function (exports) {
|
|
|
9492
9559
|
}
|
|
9493
9560
|
}
|
|
9494
9561
|
}
|
|
9562
|
+
for (const key in next) {
|
|
9563
|
+
setStyle(style, key, next[key]);
|
|
9564
|
+
}
|
|
9495
9565
|
}
|
|
9496
9566
|
else {
|
|
9497
9567
|
const currentDisplay = style.display;
|
|
@@ -9522,7 +9592,7 @@ var Vue = (function (exports) {
|
|
|
9522
9592
|
val = '';
|
|
9523
9593
|
{
|
|
9524
9594
|
if (semicolonRE.test(val)) {
|
|
9525
|
-
warn
|
|
9595
|
+
warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
9526
9596
|
}
|
|
9527
9597
|
}
|
|
9528
9598
|
if (name.startsWith('--')) {
|
|
@@ -9646,7 +9716,7 @@ var Vue = (function (exports) {
|
|
|
9646
9716
|
catch (e) {
|
|
9647
9717
|
// do not warn if value is auto-coerced from nullish values
|
|
9648
9718
|
if (!needRemove) {
|
|
9649
|
-
warn
|
|
9719
|
+
warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
|
|
9650
9720
|
`value ${value} is invalid.`, e);
|
|
9651
9721
|
}
|
|
9652
9722
|
}
|
|
@@ -9850,7 +9920,7 @@ var Vue = (function (exports) {
|
|
|
9850
9920
|
}
|
|
9851
9921
|
else {
|
|
9852
9922
|
if (this.shadowRoot) {
|
|
9853
|
-
warn
|
|
9923
|
+
warn(`Custom element has pre-rendered declarative shadow root but is not ` +
|
|
9854
9924
|
`defined as hydratable. Use \`defineSSRCustomElement\`.`);
|
|
9855
9925
|
}
|
|
9856
9926
|
this.attachShadow({ mode: 'open' });
|
|
@@ -10056,7 +10126,7 @@ var Vue = (function (exports) {
|
|
|
10056
10126
|
/* istanbul ignore else */
|
|
10057
10127
|
{
|
|
10058
10128
|
{
|
|
10059
|
-
warn
|
|
10129
|
+
warn(`useCssModule() is not supported in the global build.`);
|
|
10060
10130
|
}
|
|
10061
10131
|
return EMPTY_OBJ;
|
|
10062
10132
|
}
|
|
@@ -10070,7 +10140,7 @@ var Vue = (function (exports) {
|
|
|
10070
10140
|
const instance = getCurrentInstance();
|
|
10071
10141
|
/* istanbul ignore next */
|
|
10072
10142
|
if (!instance) {
|
|
10073
|
-
warn
|
|
10143
|
+
warn(`useCssVars is called without current active component instance.`);
|
|
10074
10144
|
return;
|
|
10075
10145
|
}
|
|
10076
10146
|
const updateTeleports = (instance.ut = (vars = getter(instance.proxy)) => {
|
|
@@ -10127,7 +10197,7 @@ var Vue = (function (exports) {
|
|
|
10127
10197
|
}
|
|
10128
10198
|
}
|
|
10129
10199
|
|
|
10130
|
-
const TRANSITION = 'transition';
|
|
10200
|
+
const TRANSITION$1 = 'transition';
|
|
10131
10201
|
const ANIMATION = 'animation';
|
|
10132
10202
|
// DOM Transition is a higher-order-component based on the platform-agnostic
|
|
10133
10203
|
// base Transition component, with DOM-specific logic.
|
|
@@ -10157,7 +10227,7 @@ var Vue = (function (exports) {
|
|
|
10157
10227
|
* #3227 Incoming hooks may be merged into arrays when wrapping Transition
|
|
10158
10228
|
* with custom HOCs.
|
|
10159
10229
|
*/
|
|
10160
|
-
const callHook
|
|
10230
|
+
const callHook = (hook, args = []) => {
|
|
10161
10231
|
if (isArray(hook)) {
|
|
10162
10232
|
hook.forEach(h => h(...args));
|
|
10163
10233
|
}
|
|
@@ -10207,7 +10277,7 @@ var Vue = (function (exports) {
|
|
|
10207
10277
|
return (el, done) => {
|
|
10208
10278
|
const hook = isAppear ? onAppear : onEnter;
|
|
10209
10279
|
const resolve = () => finishEnter(el, isAppear, done);
|
|
10210
|
-
callHook
|
|
10280
|
+
callHook(hook, [el, resolve]);
|
|
10211
10281
|
nextFrame(() => {
|
|
10212
10282
|
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
10213
10283
|
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
@@ -10219,12 +10289,12 @@ var Vue = (function (exports) {
|
|
|
10219
10289
|
};
|
|
10220
10290
|
return extend(baseProps, {
|
|
10221
10291
|
onBeforeEnter(el) {
|
|
10222
|
-
callHook
|
|
10292
|
+
callHook(onBeforeEnter, [el]);
|
|
10223
10293
|
addTransitionClass(el, enterFromClass);
|
|
10224
10294
|
addTransitionClass(el, enterActiveClass);
|
|
10225
10295
|
},
|
|
10226
10296
|
onBeforeAppear(el) {
|
|
10227
|
-
callHook
|
|
10297
|
+
callHook(onBeforeAppear, [el]);
|
|
10228
10298
|
addTransitionClass(el, appearFromClass);
|
|
10229
10299
|
addTransitionClass(el, appearActiveClass);
|
|
10230
10300
|
},
|
|
@@ -10248,19 +10318,19 @@ var Vue = (function (exports) {
|
|
|
10248
10318
|
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
10249
10319
|
}
|
|
10250
10320
|
});
|
|
10251
|
-
callHook
|
|
10321
|
+
callHook(onLeave, [el, resolve]);
|
|
10252
10322
|
},
|
|
10253
10323
|
onEnterCancelled(el) {
|
|
10254
10324
|
finishEnter(el, false);
|
|
10255
|
-
callHook
|
|
10325
|
+
callHook(onEnterCancelled, [el]);
|
|
10256
10326
|
},
|
|
10257
10327
|
onAppearCancelled(el) {
|
|
10258
10328
|
finishEnter(el, true);
|
|
10259
|
-
callHook
|
|
10329
|
+
callHook(onAppearCancelled, [el]);
|
|
10260
10330
|
},
|
|
10261
10331
|
onLeaveCancelled(el) {
|
|
10262
10332
|
finishLeave(el);
|
|
10263
|
-
callHook
|
|
10333
|
+
callHook(onLeaveCancelled, [el]);
|
|
10264
10334
|
}
|
|
10265
10335
|
});
|
|
10266
10336
|
}
|
|
@@ -10278,18 +10348,10 @@ var Vue = (function (exports) {
|
|
|
10278
10348
|
}
|
|
10279
10349
|
function NumberOf(val) {
|
|
10280
10350
|
const res = toNumber(val);
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
}
|
|
10284
|
-
function validateDuration(val) {
|
|
10285
|
-
if (typeof val !== 'number') {
|
|
10286
|
-
warn$1(`<transition> explicit duration is not a valid number - ` +
|
|
10287
|
-
`got ${JSON.stringify(val)}.`);
|
|
10288
|
-
}
|
|
10289
|
-
else if (isNaN(val)) {
|
|
10290
|
-
warn$1(`<transition> explicit duration is NaN - ` +
|
|
10291
|
-
'the duration expression might be incorrect.');
|
|
10351
|
+
{
|
|
10352
|
+
assertNumber(res, '<transition> explicit duration');
|
|
10292
10353
|
}
|
|
10354
|
+
return res;
|
|
10293
10355
|
}
|
|
10294
10356
|
function addTransitionClass(el, cls) {
|
|
10295
10357
|
cls.split(/\s+/).forEach(c => c && el.classList.add(c));
|
|
@@ -10348,8 +10410,8 @@ var Vue = (function (exports) {
|
|
|
10348
10410
|
const styles = window.getComputedStyle(el);
|
|
10349
10411
|
// JSDOM may return undefined for transition properties
|
|
10350
10412
|
const getStyleProperties = (key) => (styles[key] || '').split(', ');
|
|
10351
|
-
const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
|
|
10352
|
-
const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
|
|
10413
|
+
const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`);
|
|
10414
|
+
const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`);
|
|
10353
10415
|
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
10354
10416
|
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
10355
10417
|
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
@@ -10358,9 +10420,9 @@ var Vue = (function (exports) {
|
|
|
10358
10420
|
let timeout = 0;
|
|
10359
10421
|
let propCount = 0;
|
|
10360
10422
|
/* istanbul ignore if */
|
|
10361
|
-
if (expectedType === TRANSITION) {
|
|
10423
|
+
if (expectedType === TRANSITION$1) {
|
|
10362
10424
|
if (transitionTimeout > 0) {
|
|
10363
|
-
type = TRANSITION;
|
|
10425
|
+
type = TRANSITION$1;
|
|
10364
10426
|
timeout = transitionTimeout;
|
|
10365
10427
|
propCount = transitionDurations.length;
|
|
10366
10428
|
}
|
|
@@ -10377,17 +10439,17 @@ var Vue = (function (exports) {
|
|
|
10377
10439
|
type =
|
|
10378
10440
|
timeout > 0
|
|
10379
10441
|
? transitionTimeout > animationTimeout
|
|
10380
|
-
? TRANSITION
|
|
10442
|
+
? TRANSITION$1
|
|
10381
10443
|
: ANIMATION
|
|
10382
10444
|
: null;
|
|
10383
10445
|
propCount = type
|
|
10384
|
-
? type === TRANSITION
|
|
10446
|
+
? type === TRANSITION$1
|
|
10385
10447
|
? transitionDurations.length
|
|
10386
10448
|
: animationDurations.length
|
|
10387
10449
|
: 0;
|
|
10388
10450
|
}
|
|
10389
|
-
const hasTransform = type === TRANSITION &&
|
|
10390
|
-
/\b(transform|all)(,|$)/.test(getStyleProperties(`${TRANSITION}Property`).toString());
|
|
10451
|
+
const hasTransform = type === TRANSITION$1 &&
|
|
10452
|
+
/\b(transform|all)(,|$)/.test(getStyleProperties(`${TRANSITION$1}Property`).toString());
|
|
10391
10453
|
return {
|
|
10392
10454
|
type,
|
|
10393
10455
|
timeout,
|
|
@@ -10472,7 +10534,7 @@ var Vue = (function (exports) {
|
|
|
10472
10534
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
10473
10535
|
}
|
|
10474
10536
|
else {
|
|
10475
|
-
warn
|
|
10537
|
+
warn(`<TransitionGroup> children must be keyed.`);
|
|
10476
10538
|
}
|
|
10477
10539
|
}
|
|
10478
10540
|
if (prevChildren) {
|
|
@@ -10486,6 +10548,14 @@ var Vue = (function (exports) {
|
|
|
10486
10548
|
};
|
|
10487
10549
|
}
|
|
10488
10550
|
};
|
|
10551
|
+
/**
|
|
10552
|
+
* TransitionGroup does not support "mode" so we need to remove it from the
|
|
10553
|
+
* props declarations, but direct delete operation is considered a side effect
|
|
10554
|
+
* and will make the entire transition feature non-tree-shakeable, so we do it
|
|
10555
|
+
* in a function and mark the function's invocation as pure.
|
|
10556
|
+
*/
|
|
10557
|
+
const removeMode = (props) => delete props.mode;
|
|
10558
|
+
/*#__PURE__*/ removeMode(TransitionGroupImpl.props);
|
|
10489
10559
|
const TransitionGroup = TransitionGroupImpl;
|
|
10490
10560
|
function callPendingCbs(c) {
|
|
10491
10561
|
const el = c.el;
|
|
@@ -10561,7 +10631,7 @@ var Vue = (function (exports) {
|
|
|
10561
10631
|
domValue = domValue.trim();
|
|
10562
10632
|
}
|
|
10563
10633
|
if (castToNumber) {
|
|
10564
|
-
domValue =
|
|
10634
|
+
domValue = looseToNumber(domValue);
|
|
10565
10635
|
}
|
|
10566
10636
|
el._assign(domValue);
|
|
10567
10637
|
});
|
|
@@ -10596,7 +10666,8 @@ var Vue = (function (exports) {
|
|
|
10596
10666
|
if (trim && el.value.trim() === value) {
|
|
10597
10667
|
return;
|
|
10598
10668
|
}
|
|
10599
|
-
if ((number || el.type === 'number') &&
|
|
10669
|
+
if ((number || el.type === 'number') &&
|
|
10670
|
+
looseToNumber(el.value) === value) {
|
|
10600
10671
|
return;
|
|
10601
10672
|
}
|
|
10602
10673
|
}
|
|
@@ -10685,7 +10756,7 @@ var Vue = (function (exports) {
|
|
|
10685
10756
|
addEventListener(el, 'change', () => {
|
|
10686
10757
|
const selectedVal = Array.prototype.filter
|
|
10687
10758
|
.call(el.options, (o) => o.selected)
|
|
10688
|
-
.map((o) => number ?
|
|
10759
|
+
.map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
10689
10760
|
el._assign(el.multiple
|
|
10690
10761
|
? isSetModel
|
|
10691
10762
|
? new Set(selectedVal)
|
|
@@ -10709,7 +10780,7 @@ var Vue = (function (exports) {
|
|
|
10709
10780
|
function setSelected(el, value) {
|
|
10710
10781
|
const isMultiple = el.multiple;
|
|
10711
10782
|
if (isMultiple && !isArray(value) && !isSet(value)) {
|
|
10712
|
-
warn
|
|
10783
|
+
warn(`<select multiple v-model> expects an Array or Set value for its binding, ` +
|
|
10713
10784
|
`but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);
|
|
10714
10785
|
return;
|
|
10715
10786
|
}
|
|
@@ -10962,7 +11033,7 @@ var Vue = (function (exports) {
|
|
|
10962
11033
|
return isCustomElement;
|
|
10963
11034
|
},
|
|
10964
11035
|
set() {
|
|
10965
|
-
warn
|
|
11036
|
+
warn(`The \`isCustomElement\` config option is deprecated. Use ` +
|
|
10966
11037
|
`\`compilerOptions.isCustomElement\` instead.`);
|
|
10967
11038
|
}
|
|
10968
11039
|
});
|
|
@@ -10976,11 +11047,11 @@ var Vue = (function (exports) {
|
|
|
10976
11047
|
`- 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`;
|
|
10977
11048
|
Object.defineProperty(app.config, 'compilerOptions', {
|
|
10978
11049
|
get() {
|
|
10979
|
-
warn
|
|
11050
|
+
warn(msg);
|
|
10980
11051
|
return compilerOptions;
|
|
10981
11052
|
},
|
|
10982
11053
|
set() {
|
|
10983
|
-
warn
|
|
11054
|
+
warn(msg);
|
|
10984
11055
|
}
|
|
10985
11056
|
});
|
|
10986
11057
|
}
|
|
@@ -10989,14 +11060,14 @@ var Vue = (function (exports) {
|
|
|
10989
11060
|
if (isString(container)) {
|
|
10990
11061
|
const res = document.querySelector(container);
|
|
10991
11062
|
if (!res) {
|
|
10992
|
-
warn
|
|
11063
|
+
warn(`Failed to mount app: mount target selector "${container}" returned null.`);
|
|
10993
11064
|
}
|
|
10994
11065
|
return res;
|
|
10995
11066
|
}
|
|
10996
11067
|
if (window.ShadowRoot &&
|
|
10997
11068
|
container instanceof window.ShadowRoot &&
|
|
10998
11069
|
container.mode === 'closed') {
|
|
10999
|
-
warn
|
|
11070
|
+
warn(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
|
|
11000
11071
|
}
|
|
11001
11072
|
return container;
|
|
11002
11073
|
}
|
|
@@ -11007,6 +11078,7 @@ var Vue = (function (exports) {
|
|
|
11007
11078
|
|
|
11008
11079
|
function initDev() {
|
|
11009
11080
|
{
|
|
11081
|
+
/* istanbul ignore if */
|
|
11010
11082
|
{
|
|
11011
11083
|
console.info(`You are running a development build of Vue.\n` +
|
|
11012
11084
|
`Make sure to use the production build (*.prod.js) when deploying for production.`);
|
|
@@ -11071,7 +11143,7 @@ var Vue = (function (exports) {
|
|
|
11071
11143
|
[34 /* ErrorCodes.X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`,
|
|
11072
11144
|
[35 /* ErrorCodes.X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`,
|
|
11073
11145
|
[36 /* ErrorCodes.X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`,
|
|
11074
|
-
[37 /* ErrorCodes.X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template
|
|
11146
|
+
[37 /* ErrorCodes.X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>. ` +
|
|
11075
11147
|
`When there are multiple named slots, all slots should use <template> ` +
|
|
11076
11148
|
`syntax to avoid scope ambiguity.`,
|
|
11077
11149
|
[38 /* ErrorCodes.X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `,
|
|
@@ -11194,7 +11266,7 @@ var Vue = (function (exports) {
|
|
|
11194
11266
|
return {
|
|
11195
11267
|
type: 0 /* NodeTypes.ROOT */,
|
|
11196
11268
|
children,
|
|
11197
|
-
helpers:
|
|
11269
|
+
helpers: new Set(),
|
|
11198
11270
|
components: [],
|
|
11199
11271
|
directives: [],
|
|
11200
11272
|
hoists: [],
|
|
@@ -11492,7 +11564,7 @@ var Vue = (function (exports) {
|
|
|
11492
11564
|
!p.arg.isStatic) // v-bind:[foo]
|
|
11493
11565
|
);
|
|
11494
11566
|
}
|
|
11495
|
-
function isText(node) {
|
|
11567
|
+
function isText$1(node) {
|
|
11496
11568
|
return node.type === 5 /* NodeTypes.INTERPOLATION */ || node.type === 2 /* NodeTypes.TEXT */;
|
|
11497
11569
|
}
|
|
11498
11570
|
function isVSlot(p) {
|
|
@@ -12916,7 +12988,7 @@ var Vue = (function (exports) {
|
|
|
12916
12988
|
createRootCodegen(root, context);
|
|
12917
12989
|
}
|
|
12918
12990
|
// finalize meta information
|
|
12919
|
-
root.helpers = [...context.helpers.keys()];
|
|
12991
|
+
root.helpers = new Set([...context.helpers.keys()]);
|
|
12920
12992
|
root.components = [...context.components];
|
|
12921
12993
|
root.directives = [...context.directives];
|
|
12922
12994
|
root.imports = context.imports;
|
|
@@ -13119,12 +13191,16 @@ var Vue = (function (exports) {
|
|
|
13119
13191
|
if (options.onContextCreated)
|
|
13120
13192
|
options.onContextCreated(context);
|
|
13121
13193
|
const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context;
|
|
13122
|
-
const
|
|
13194
|
+
const helpers = Array.from(ast.helpers);
|
|
13195
|
+
const hasHelpers = helpers.length > 0;
|
|
13123
13196
|
const useWithBlock = !prefixIdentifiers && mode !== 'module';
|
|
13197
|
+
const isSetupInlined = !true ;
|
|
13124
13198
|
// preambles
|
|
13125
13199
|
// in setup() inline mode, the preamble is generated in a sub context
|
|
13126
13200
|
// and returned separately.
|
|
13127
|
-
const preambleContext =
|
|
13201
|
+
const preambleContext = isSetupInlined
|
|
13202
|
+
? createCodegenContext(ast, options)
|
|
13203
|
+
: context;
|
|
13128
13204
|
{
|
|
13129
13205
|
genFunctionPreamble(ast, preambleContext);
|
|
13130
13206
|
}
|
|
@@ -13142,7 +13218,7 @@ var Vue = (function (exports) {
|
|
|
13142
13218
|
// function mode const declarations should be inside with block
|
|
13143
13219
|
// also they should be renamed to avoid collision with user properties
|
|
13144
13220
|
if (hasHelpers) {
|
|
13145
|
-
push(`const { ${
|
|
13221
|
+
push(`const { ${helpers.map(aliasHelper).join(', ')} } = _Vue`);
|
|
13146
13222
|
push(`\n`);
|
|
13147
13223
|
newline();
|
|
13148
13224
|
}
|
|
@@ -13189,7 +13265,7 @@ var Vue = (function (exports) {
|
|
|
13189
13265
|
return {
|
|
13190
13266
|
ast,
|
|
13191
13267
|
code: context.code,
|
|
13192
|
-
preamble: ``,
|
|
13268
|
+
preamble: isSetupInlined ? preambleContext.code : ``,
|
|
13193
13269
|
// SourceMapGenerator does have toJSON() method but it's not in the types
|
|
13194
13270
|
map: context.map ? context.map.toJSON() : undefined
|
|
13195
13271
|
};
|
|
@@ -13201,7 +13277,8 @@ var Vue = (function (exports) {
|
|
|
13201
13277
|
// In prefix mode, we place the const declaration at top so it's done
|
|
13202
13278
|
// only once; But if we not prefixing, we place the declaration inside the
|
|
13203
13279
|
// with block so it doesn't incur the `in` check cost for every helper access.
|
|
13204
|
-
|
|
13280
|
+
const helpers = Array.from(ast.helpers);
|
|
13281
|
+
if (helpers.length > 0) {
|
|
13205
13282
|
{
|
|
13206
13283
|
// "with" mode.
|
|
13207
13284
|
// save Vue in a separate variable to avoid collision
|
|
@@ -13217,7 +13294,7 @@ var Vue = (function (exports) {
|
|
|
13217
13294
|
CREATE_TEXT,
|
|
13218
13295
|
CREATE_STATIC
|
|
13219
13296
|
]
|
|
13220
|
-
.filter(helper =>
|
|
13297
|
+
.filter(helper => helpers.includes(helper))
|
|
13221
13298
|
.map(aliasHelper)
|
|
13222
13299
|
.join(', ');
|
|
13223
13300
|
push(`const { ${staticHelpers} } = _Vue\n`);
|
|
@@ -13262,7 +13339,7 @@ var Vue = (function (exports) {
|
|
|
13262
13339
|
}
|
|
13263
13340
|
context.pure = false;
|
|
13264
13341
|
}
|
|
13265
|
-
function isText
|
|
13342
|
+
function isText(n) {
|
|
13266
13343
|
return (isString(n) ||
|
|
13267
13344
|
n.type === 4 /* NodeTypes.SIMPLE_EXPRESSION */ ||
|
|
13268
13345
|
n.type === 2 /* NodeTypes.TEXT */ ||
|
|
@@ -13271,7 +13348,7 @@ var Vue = (function (exports) {
|
|
|
13271
13348
|
}
|
|
13272
13349
|
function genNodeListAsArray(nodes, context) {
|
|
13273
13350
|
const multilines = nodes.length > 3 ||
|
|
13274
|
-
(nodes.some(n => isArray(n) || !isText
|
|
13351
|
+
(nodes.some(n => isArray(n) || !isText(n)));
|
|
13275
13352
|
context.push(`[`);
|
|
13276
13353
|
multilines && context.indent();
|
|
13277
13354
|
genNodeList(nodes, context, multilines);
|
|
@@ -13608,11 +13685,11 @@ var Vue = (function (exports) {
|
|
|
13608
13685
|
}
|
|
13609
13686
|
|
|
13610
13687
|
// these keywords should not appear inside expressions, but operators like
|
|
13611
|
-
// typeof, instanceof and in are allowed
|
|
13688
|
+
// 'typeof', 'instanceof', and 'in' are allowed
|
|
13612
13689
|
const prohibitedKeywordRE = new RegExp('\\b' +
|
|
13613
|
-
('
|
|
13614
|
-
'
|
|
13615
|
-
'
|
|
13690
|
+
('arguments,await,break,case,catch,class,const,continue,debugger,default,' +
|
|
13691
|
+
'delete,do,else,export,extends,finally,for,function,if,import,let,new,' +
|
|
13692
|
+
'return,super,switch,throw,try,var,void,while,with,yield')
|
|
13616
13693
|
.split(',')
|
|
13617
13694
|
.join('\\b|\\b') +
|
|
13618
13695
|
'\\b');
|
|
@@ -14861,7 +14938,7 @@ var Vue = (function (exports) {
|
|
|
14861
14938
|
const existing = knownProps.get(name);
|
|
14862
14939
|
if (existing) {
|
|
14863
14940
|
if (name === 'style' || name === 'class' || isOn(name)) {
|
|
14864
|
-
mergeAsArray
|
|
14941
|
+
mergeAsArray(existing, prop);
|
|
14865
14942
|
}
|
|
14866
14943
|
// unexpected duplicate, should have emitted error during parse
|
|
14867
14944
|
}
|
|
@@ -14872,7 +14949,7 @@ var Vue = (function (exports) {
|
|
|
14872
14949
|
}
|
|
14873
14950
|
return deduped;
|
|
14874
14951
|
}
|
|
14875
|
-
function mergeAsArray
|
|
14952
|
+
function mergeAsArray(existing, incoming) {
|
|
14876
14953
|
if (existing.value.type === 17 /* NodeTypes.JS_ARRAY_EXPRESSION */) {
|
|
14877
14954
|
existing.value.elements.push(incoming.value);
|
|
14878
14955
|
}
|
|
@@ -15000,7 +15077,7 @@ var Vue = (function (exports) {
|
|
|
15000
15077
|
}
|
|
15001
15078
|
|
|
15002
15079
|
const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
15003
|
-
const transformOn = (dir, node, context, augmentor) => {
|
|
15080
|
+
const transformOn$1 = (dir, node, context, augmentor) => {
|
|
15004
15081
|
const { loc, modifiers, arg } = dir;
|
|
15005
15082
|
if (!dir.exp && !modifiers.length) {
|
|
15006
15083
|
context.onError(createCompilerError(35 /* ErrorCodes.X_V_ON_NO_EXPRESSION */, loc));
|
|
@@ -15160,11 +15237,11 @@ var Vue = (function (exports) {
|
|
|
15160
15237
|
let hasText = false;
|
|
15161
15238
|
for (let i = 0; i < children.length; i++) {
|
|
15162
15239
|
const child = children[i];
|
|
15163
|
-
if (isText(child)) {
|
|
15240
|
+
if (isText$1(child)) {
|
|
15164
15241
|
hasText = true;
|
|
15165
15242
|
for (let j = i + 1; j < children.length; j++) {
|
|
15166
15243
|
const next = children[j];
|
|
15167
|
-
if (isText(next)) {
|
|
15244
|
+
if (isText$1(next)) {
|
|
15168
15245
|
if (!currentContainer) {
|
|
15169
15246
|
currentContainer = children[i] = createCompoundExpression([child], child.loc);
|
|
15170
15247
|
}
|
|
@@ -15206,7 +15283,7 @@ var Vue = (function (exports) {
|
|
|
15206
15283
|
// runtime normalization.
|
|
15207
15284
|
for (let i = 0; i < children.length; i++) {
|
|
15208
15285
|
const child = children[i];
|
|
15209
|
-
if (isText(child) || child.type === 8 /* NodeTypes.COMPOUND_EXPRESSION */) {
|
|
15286
|
+
if (isText$1(child) || child.type === 8 /* NodeTypes.COMPOUND_EXPRESSION */) {
|
|
15210
15287
|
const callArgs = [];
|
|
15211
15288
|
// createTextVNode defaults to single whitespace, so if it is a
|
|
15212
15289
|
// single space the code could be an empty call to save bytes.
|
|
@@ -15231,13 +15308,13 @@ var Vue = (function (exports) {
|
|
|
15231
15308
|
}
|
|
15232
15309
|
};
|
|
15233
15310
|
|
|
15234
|
-
const seen = new WeakSet();
|
|
15311
|
+
const seen$1 = new WeakSet();
|
|
15235
15312
|
const transformOnce = (node, context) => {
|
|
15236
15313
|
if (node.type === 1 /* NodeTypes.ELEMENT */ && findDir(node, 'once', true)) {
|
|
15237
|
-
if (seen.has(node) || context.inVOnce) {
|
|
15314
|
+
if (seen$1.has(node) || context.inVOnce) {
|
|
15238
15315
|
return;
|
|
15239
15316
|
}
|
|
15240
|
-
seen.add(node);
|
|
15317
|
+
seen$1.add(node);
|
|
15241
15318
|
context.inVOnce = true;
|
|
15242
15319
|
context.helper(SET_BLOCK_TRACKING);
|
|
15243
15320
|
return () => {
|
|
@@ -15250,7 +15327,7 @@ var Vue = (function (exports) {
|
|
|
15250
15327
|
}
|
|
15251
15328
|
};
|
|
15252
15329
|
|
|
15253
|
-
const transformModel = (dir, node, context) => {
|
|
15330
|
+
const transformModel$1 = (dir, node, context) => {
|
|
15254
15331
|
const { exp, arg } = dir;
|
|
15255
15332
|
if (!exp) {
|
|
15256
15333
|
context.onError(createCompilerError(41 /* ErrorCodes.X_V_MODEL_NO_EXPRESSION */, dir.loc));
|
|
@@ -15276,7 +15353,7 @@ var Vue = (function (exports) {
|
|
|
15276
15353
|
const propName = arg ? arg : createSimpleExpression('modelValue', true);
|
|
15277
15354
|
const eventName = arg
|
|
15278
15355
|
? isStaticExp(arg)
|
|
15279
|
-
? `onUpdate:${arg.content}`
|
|
15356
|
+
? `onUpdate:${camelize(arg.content)}`
|
|
15280
15357
|
: createCompoundExpression(['"onUpdate:" + ', arg])
|
|
15281
15358
|
: `onUpdate:modelValue`;
|
|
15282
15359
|
let assignmentExp;
|
|
@@ -15312,14 +15389,14 @@ var Vue = (function (exports) {
|
|
|
15312
15389
|
return { props };
|
|
15313
15390
|
}
|
|
15314
15391
|
|
|
15315
|
-
const seen
|
|
15392
|
+
const seen = new WeakSet();
|
|
15316
15393
|
const transformMemo = (node, context) => {
|
|
15317
15394
|
if (node.type === 1 /* NodeTypes.ELEMENT */) {
|
|
15318
15395
|
const dir = findDir(node, 'memo');
|
|
15319
|
-
if (!dir || seen
|
|
15396
|
+
if (!dir || seen.has(node)) {
|
|
15320
15397
|
return;
|
|
15321
15398
|
}
|
|
15322
|
-
seen
|
|
15399
|
+
seen.add(node);
|
|
15323
15400
|
return () => {
|
|
15324
15401
|
const codegenNode = node.codegenNode ||
|
|
15325
15402
|
context.currentNode.codegenNode;
|
|
@@ -15355,9 +15432,9 @@ var Vue = (function (exports) {
|
|
|
15355
15432
|
transformText
|
|
15356
15433
|
],
|
|
15357
15434
|
{
|
|
15358
|
-
on: transformOn,
|
|
15435
|
+
on: transformOn$1,
|
|
15359
15436
|
bind: transformBind,
|
|
15360
|
-
model: transformModel
|
|
15437
|
+
model: transformModel$1
|
|
15361
15438
|
}
|
|
15362
15439
|
];
|
|
15363
15440
|
}
|
|
@@ -15408,7 +15485,7 @@ var Vue = (function (exports) {
|
|
|
15408
15485
|
const V_ON_WITH_MODIFIERS = Symbol(`vOnModifiersGuard` );
|
|
15409
15486
|
const V_ON_WITH_KEYS = Symbol(`vOnKeysGuard` );
|
|
15410
15487
|
const V_SHOW = Symbol(`vShow` );
|
|
15411
|
-
const TRANSITION
|
|
15488
|
+
const TRANSITION = Symbol(`Transition` );
|
|
15412
15489
|
const TRANSITION_GROUP = Symbol(`TransitionGroup` );
|
|
15413
15490
|
registerRuntimeHelpers({
|
|
15414
15491
|
[V_MODEL_RADIO]: `vModelRadio`,
|
|
@@ -15419,7 +15496,7 @@ var Vue = (function (exports) {
|
|
|
15419
15496
|
[V_ON_WITH_MODIFIERS]: `withModifiers`,
|
|
15420
15497
|
[V_ON_WITH_KEYS]: `withKeys`,
|
|
15421
15498
|
[V_SHOW]: `vShow`,
|
|
15422
|
-
[TRANSITION
|
|
15499
|
+
[TRANSITION]: `Transition`,
|
|
15423
15500
|
[TRANSITION_GROUP]: `TransitionGroup`
|
|
15424
15501
|
});
|
|
15425
15502
|
|
|
@@ -15447,7 +15524,7 @@ var Vue = (function (exports) {
|
|
|
15447
15524
|
decodeEntities: decodeHtmlBrowser ,
|
|
15448
15525
|
isBuiltInComponent: (tag) => {
|
|
15449
15526
|
if (isBuiltInType(tag, `Transition`)) {
|
|
15450
|
-
return TRANSITION
|
|
15527
|
+
return TRANSITION;
|
|
15451
15528
|
}
|
|
15452
15529
|
else if (isBuiltInType(tag, `TransitionGroup`)) {
|
|
15453
15530
|
return TRANSITION_GROUP;
|
|
@@ -15587,8 +15664,8 @@ var Vue = (function (exports) {
|
|
|
15587
15664
|
};
|
|
15588
15665
|
};
|
|
15589
15666
|
|
|
15590
|
-
const transformModel
|
|
15591
|
-
const baseResult = transformModel(dir, node, context);
|
|
15667
|
+
const transformModel = (dir, node, context) => {
|
|
15668
|
+
const baseResult = transformModel$1(dir, node, context);
|
|
15592
15669
|
// base transform has errors OR component v-model (only need props)
|
|
15593
15670
|
if (!baseResult.props.length || node.tagType === 1 /* ElementTypes.COMPONENT */) {
|
|
15594
15671
|
return baseResult;
|
|
@@ -15738,8 +15815,8 @@ var Vue = (function (exports) {
|
|
|
15738
15815
|
])
|
|
15739
15816
|
: key;
|
|
15740
15817
|
};
|
|
15741
|
-
const transformOn
|
|
15742
|
-
return transformOn(dir, node, context, baseResult => {
|
|
15818
|
+
const transformOn = (dir, node, context) => {
|
|
15819
|
+
return transformOn$1(dir, node, context, baseResult => {
|
|
15743
15820
|
const { modifiers } = dir;
|
|
15744
15821
|
if (!modifiers.length)
|
|
15745
15822
|
return baseResult;
|
|
@@ -15793,7 +15870,7 @@ var Vue = (function (exports) {
|
|
|
15793
15870
|
if (node.type === 1 /* NodeTypes.ELEMENT */ &&
|
|
15794
15871
|
node.tagType === 1 /* ElementTypes.COMPONENT */) {
|
|
15795
15872
|
const component = context.isBuiltInComponent(node.tag);
|
|
15796
|
-
if (component === TRANSITION
|
|
15873
|
+
if (component === TRANSITION) {
|
|
15797
15874
|
return () => {
|
|
15798
15875
|
if (!node.children.length) {
|
|
15799
15876
|
return;
|
|
@@ -15852,11 +15929,11 @@ var Vue = (function (exports) {
|
|
|
15852
15929
|
cloak: noopDirectiveTransform,
|
|
15853
15930
|
html: transformVHtml,
|
|
15854
15931
|
text: transformVText,
|
|
15855
|
-
model: transformModel
|
|
15856
|
-
on: transformOn
|
|
15932
|
+
model: transformModel,
|
|
15933
|
+
on: transformOn,
|
|
15857
15934
|
show: transformShow
|
|
15858
15935
|
};
|
|
15859
|
-
function compile
|
|
15936
|
+
function compile(template, options = {}) {
|
|
15860
15937
|
return baseCompile(template, extend({}, parserOptions, options, {
|
|
15861
15938
|
nodeTransforms: [
|
|
15862
15939
|
// ignore <script> and <tag>
|
|
@@ -15882,7 +15959,7 @@ var Vue = (function (exports) {
|
|
|
15882
15959
|
template = template.innerHTML;
|
|
15883
15960
|
}
|
|
15884
15961
|
else {
|
|
15885
|
-
warn
|
|
15962
|
+
warn(`invalid template option: `, template);
|
|
15886
15963
|
return NOOP;
|
|
15887
15964
|
}
|
|
15888
15965
|
}
|
|
@@ -15894,7 +15971,7 @@ var Vue = (function (exports) {
|
|
|
15894
15971
|
if (template[0] === '#') {
|
|
15895
15972
|
const el = document.querySelector(template);
|
|
15896
15973
|
if (!el) {
|
|
15897
|
-
warn
|
|
15974
|
+
warn(`Template element not found or is empty: ${template}`);
|
|
15898
15975
|
}
|
|
15899
15976
|
// __UNSAFE__
|
|
15900
15977
|
// Reason: potential execution of JS expressions in in-DOM template.
|
|
@@ -15910,14 +15987,14 @@ var Vue = (function (exports) {
|
|
|
15910
15987
|
if (!opts.isCustomElement && typeof customElements !== 'undefined') {
|
|
15911
15988
|
opts.isCustomElement = tag => !!customElements.get(tag);
|
|
15912
15989
|
}
|
|
15913
|
-
const { code } = compile
|
|
15990
|
+
const { code } = compile(template, opts);
|
|
15914
15991
|
function onError(err, asWarning = false) {
|
|
15915
15992
|
const message = asWarning
|
|
15916
15993
|
? err.message
|
|
15917
15994
|
: `Template compilation error: ${err.message}`;
|
|
15918
15995
|
const codeFrame = err.loc &&
|
|
15919
15996
|
generateCodeFrame(template, err.loc.start.offset, err.loc.end.offset);
|
|
15920
|
-
warn
|
|
15997
|
+
warn(codeFrame ? `${message}\n${codeFrame}` : message);
|
|
15921
15998
|
}
|
|
15922
15999
|
// The wildcard import results in a huge object with every export
|
|
15923
16000
|
// with keys that cannot be mangled, and can be quite heavy size-wise.
|
|
@@ -15942,6 +16019,7 @@ var Vue = (function (exports) {
|
|
|
15942
16019
|
exports.Transition = Transition;
|
|
15943
16020
|
exports.TransitionGroup = TransitionGroup;
|
|
15944
16021
|
exports.VueElement = VueElement;
|
|
16022
|
+
exports.assertNumber = assertNumber;
|
|
15945
16023
|
exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling;
|
|
15946
16024
|
exports.callWithErrorHandling = callWithErrorHandling;
|
|
15947
16025
|
exports.camelize = camelize;
|
|
@@ -15949,7 +16027,7 @@ var Vue = (function (exports) {
|
|
|
15949
16027
|
exports.cloneVNode = cloneVNode;
|
|
15950
16028
|
exports.compatUtils = compatUtils;
|
|
15951
16029
|
exports.compile = compileToFunction;
|
|
15952
|
-
exports.computed = computed
|
|
16030
|
+
exports.computed = computed;
|
|
15953
16031
|
exports.createApp = createApp;
|
|
15954
16032
|
exports.createBlock = createBlock;
|
|
15955
16033
|
exports.createCommentVNode = createCommentVNode;
|
|
@@ -16060,7 +16138,7 @@ var Vue = (function (exports) {
|
|
|
16060
16138
|
exports.vModelText = vModelText;
|
|
16061
16139
|
exports.vShow = vShow;
|
|
16062
16140
|
exports.version = version;
|
|
16063
|
-
exports.warn = warn
|
|
16141
|
+
exports.warn = warn;
|
|
16064
16142
|
exports.watch = watch;
|
|
16065
16143
|
exports.watchEffect = watchEffect;
|
|
16066
16144
|
exports.watchPostEffect = watchPostEffect;
|
|
@@ -16074,8 +16152,6 @@ var Vue = (function (exports) {
|
|
|
16074
16152
|
exports.withModifiers = withModifiers;
|
|
16075
16153
|
exports.withScopeId = withScopeId;
|
|
16076
16154
|
|
|
16077
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
16078
|
-
|
|
16079
16155
|
return exports;
|
|
16080
16156
|
|
|
16081
|
-
}({})
|
|
16157
|
+
})({});
|