@vue/runtime-dom 3.6.0-rc.5 → 3.6.0-rc.7
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/runtime-dom.cjs.js +77 -64
- package/dist/runtime-dom.cjs.prod.js +77 -64
- package/dist/runtime-dom.d.ts +145 -157
- package/dist/runtime-dom.esm-browser.js +622 -458
- package/dist/runtime-dom.esm-browser.prod.js +4 -4
- package/dist/runtime-dom.esm-bundler.js +91 -74
- package/dist/runtime-dom.global.js +622 -458
- package/dist/runtime-dom.global.prod.js +4 -4
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-rc.7
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* \/\*#\_\_PURE\_\_\*\/
|
|
12
12
|
* So that they can be tree-shaken if necessary.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
15
15
|
function makeMap(str) {
|
|
16
16
|
const map = Object.create(null);
|
|
17
17
|
for (const key of str.split(",")) map[key] = 1;
|
|
@@ -55,9 +55,9 @@ const toRawType = (value) => {
|
|
|
55
55
|
};
|
|
56
56
|
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
57
57
|
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
58
|
-
const isReservedProp =
|
|
59
|
-
const isBuiltInTag =
|
|
60
|
-
const isBuiltInDirective =
|
|
58
|
+
const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
|
|
59
|
+
const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
|
|
60
|
+
const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
|
|
61
61
|
const cacheStringFunction = (fn) => {
|
|
62
62
|
const cache = Object.create(null);
|
|
63
63
|
return ((str) => {
|
|
@@ -131,7 +131,7 @@ const getGlobalThis = () => {
|
|
|
131
131
|
function canSetValueDirectly(tagName) {
|
|
132
132
|
return tagName !== "PROGRESS" && !tagName.includes("-");
|
|
133
133
|
}
|
|
134
|
-
const isGloballyAllowed =
|
|
134
|
+
const isGloballyAllowed = /*@__PURE__*/ makeMap("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");
|
|
135
135
|
//#endregion
|
|
136
136
|
//#region packages/shared/src/normalizeProp.ts
|
|
137
137
|
function normalizeStyle(value) {
|
|
@@ -199,17 +199,17 @@ const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math
|
|
|
199
199
|
* Compiler only.
|
|
200
200
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
201
201
|
*/
|
|
202
|
-
const isHTMLTag =
|
|
202
|
+
const isHTMLTag = /*@__PURE__*/ makeMap(HTML_TAGS);
|
|
203
203
|
/**
|
|
204
204
|
* Compiler only.
|
|
205
205
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
206
206
|
*/
|
|
207
|
-
const isSVGTag =
|
|
207
|
+
const isSVGTag = /*@__PURE__*/ makeMap(SVG_TAGS);
|
|
208
208
|
/**
|
|
209
209
|
* Compiler only.
|
|
210
210
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
211
211
|
*/
|
|
212
|
-
const isMathMLTag =
|
|
212
|
+
const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
|
|
213
213
|
//#endregion
|
|
214
214
|
//#region packages/shared/src/domAttrConfig.ts
|
|
215
215
|
/**
|
|
@@ -224,11 +224,11 @@ const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
|
224
224
|
* - readonly -> readOnly
|
|
225
225
|
*/
|
|
226
226
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
227
|
-
const isSpecialBooleanAttr =
|
|
227
|
+
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
228
228
|
/**
|
|
229
229
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
230
230
|
*/
|
|
231
|
-
const isBooleanAttr =
|
|
231
|
+
const isBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
|
|
232
232
|
/**
|
|
233
233
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
234
234
|
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
@@ -242,11 +242,11 @@ function includeBooleanAttr(value) {
|
|
|
242
242
|
* Don't also forget to allow `data-*` and `aria-*`!
|
|
243
243
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
|
|
244
244
|
*/
|
|
245
|
-
const isKnownHtmlAttr =
|
|
245
|
+
const isKnownHtmlAttr = /*@__PURE__*/ makeMap("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap");
|
|
246
246
|
/**
|
|
247
247
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
|
|
248
248
|
*/
|
|
249
|
-
const isKnownSvgAttr =
|
|
249
|
+
const isKnownSvgAttr = /*@__PURE__*/ makeMap("xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan");
|
|
250
250
|
/**
|
|
251
251
|
* Shared between server-renderer and runtime-core hydration logic
|
|
252
252
|
*/
|
|
@@ -278,6 +278,21 @@ function looseCompareArrays(a, b) {
|
|
|
278
278
|
for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
|
|
279
279
|
return equal;
|
|
280
280
|
}
|
|
281
|
+
function looseCompareCollections(a, b) {
|
|
282
|
+
if (a.size !== b.size) return false;
|
|
283
|
+
const candidates = Array.from(b);
|
|
284
|
+
const matched = new Uint8Array(candidates.length);
|
|
285
|
+
for (const item of a) {
|
|
286
|
+
let index = -1;
|
|
287
|
+
for (let i = 0; i < candidates.length; i++) if (!matched[i] && looseEqual(item, candidates[i])) {
|
|
288
|
+
index = i;
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
if (index < 0) return false;
|
|
292
|
+
matched[index] = 1;
|
|
293
|
+
}
|
|
294
|
+
return true;
|
|
295
|
+
}
|
|
281
296
|
function looseEqual(a, b) {
|
|
282
297
|
if (a === b) return true;
|
|
283
298
|
let aValidType = isDate(a);
|
|
@@ -293,6 +308,12 @@ function looseEqual(a, b) {
|
|
|
293
308
|
bValidType = isObject(b);
|
|
294
309
|
if (aValidType || bValidType) {
|
|
295
310
|
if (!aValidType || !bValidType) return false;
|
|
311
|
+
aValidType = isMap(a);
|
|
312
|
+
bValidType = isMap(b);
|
|
313
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
314
|
+
aValidType = isSet(a);
|
|
315
|
+
bValidType = isSet(b);
|
|
316
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
296
317
|
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
|
297
318
|
for (const key in a) {
|
|
298
319
|
const aHasKey = a.hasOwnProperty(key);
|
|
@@ -739,9 +760,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
739
760
|
if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
740
761
|
}
|
|
741
762
|
break;
|
|
742
|
-
case "set":
|
|
743
|
-
if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
744
|
-
break;
|
|
763
|
+
case "set": if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
745
764
|
}
|
|
746
765
|
}
|
|
747
766
|
}
|
|
@@ -938,8 +957,8 @@ function noTracking(self, method, args = []) {
|
|
|
938
957
|
}
|
|
939
958
|
//#endregion
|
|
940
959
|
//#region packages/reactivity/src/baseHandlers.ts
|
|
941
|
-
const isNonTrackableKeys =
|
|
942
|
-
const builtInSymbols = new Set(
|
|
960
|
+
const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
961
|
+
const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
943
962
|
function hasOwnProperty(key) {
|
|
944
963
|
if (!isSymbol(key)) key = String(key);
|
|
945
964
|
const obj = /* @__PURE__ */ toRaw(this);
|
|
@@ -994,12 +1013,14 @@ var MutableReactiveHandler = class extends BaseReactiveHandler {
|
|
|
994
1013
|
oldValue = /* @__PURE__ */ toRaw(oldValue);
|
|
995
1014
|
value = /* @__PURE__ */ toRaw(value);
|
|
996
1015
|
}
|
|
997
|
-
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value))
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1016
|
+
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
|
|
1017
|
+
if (isOldValueReadonly) {
|
|
1018
|
+
warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
|
|
1019
|
+
return true;
|
|
1020
|
+
} else {
|
|
1021
|
+
oldValue.value = value;
|
|
1022
|
+
return true;
|
|
1023
|
+
}
|
|
1003
1024
|
}
|
|
1004
1025
|
}
|
|
1005
1026
|
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
|
|
@@ -1040,10 +1061,10 @@ var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
|
|
|
1040
1061
|
return true;
|
|
1041
1062
|
}
|
|
1042
1063
|
};
|
|
1043
|
-
const mutableHandlers =
|
|
1044
|
-
const readonlyHandlers =
|
|
1045
|
-
const shallowReactiveHandlers =
|
|
1046
|
-
const shallowReadonlyHandlers =
|
|
1064
|
+
const mutableHandlers = /*@__PURE__*/ new MutableReactiveHandler();
|
|
1065
|
+
const readonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler();
|
|
1066
|
+
const shallowReactiveHandlers = /*@__PURE__*/ new MutableReactiveHandler(true);
|
|
1067
|
+
const shallowReadonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler(true);
|
|
1047
1068
|
//#endregion
|
|
1048
1069
|
//#region packages/reactivity/src/collectionHandlers.ts
|
|
1049
1070
|
const toShallow = (value) => value;
|
|
@@ -1194,10 +1215,10 @@ function createInstrumentationGetter(isReadonly, shallow) {
|
|
|
1194
1215
|
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
|
|
1195
1216
|
};
|
|
1196
1217
|
}
|
|
1197
|
-
const mutableCollectionHandlers = { get:
|
|
1198
|
-
const shallowCollectionHandlers = { get:
|
|
1199
|
-
const readonlyCollectionHandlers = { get:
|
|
1200
|
-
const shallowReadonlyCollectionHandlers = { get:
|
|
1218
|
+
const mutableCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, false) };
|
|
1219
|
+
const shallowCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, true) };
|
|
1220
|
+
const readonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, false) };
|
|
1221
|
+
const shallowReadonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, true) };
|
|
1201
1222
|
function checkIdentityKeys(target, has, key) {
|
|
1202
1223
|
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1203
1224
|
if (rawKey !== key && has.call(target, rawKey)) {
|
|
@@ -1222,7 +1243,7 @@ function targetTypeMap(rawType) {
|
|
|
1222
1243
|
default: return 0;
|
|
1223
1244
|
}
|
|
1224
1245
|
}
|
|
1225
|
-
|
|
1246
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1226
1247
|
function reactive(target) {
|
|
1227
1248
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
1228
1249
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
@@ -1257,7 +1278,7 @@ function reactive(target) {
|
|
|
1257
1278
|
* @param target - The source object.
|
|
1258
1279
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive}
|
|
1259
1280
|
*/
|
|
1260
|
-
|
|
1281
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1261
1282
|
function shallowReactive(target) {
|
|
1262
1283
|
return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
|
|
1263
1284
|
}
|
|
@@ -1290,7 +1311,7 @@ function shallowReactive(target) {
|
|
|
1290
1311
|
* @param target - The source object.
|
|
1291
1312
|
* @see {@link https://vuejs.org/api/reactivity-core.html#readonly}
|
|
1292
1313
|
*/
|
|
1293
|
-
|
|
1314
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1294
1315
|
function readonly(target) {
|
|
1295
1316
|
return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
|
|
1296
1317
|
}
|
|
@@ -1324,7 +1345,7 @@ function readonly(target) {
|
|
|
1324
1345
|
* @param target - The source object.
|
|
1325
1346
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly}
|
|
1326
1347
|
*/
|
|
1327
|
-
|
|
1348
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1328
1349
|
function shallowReadonly(target) {
|
|
1329
1350
|
return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
|
|
1330
1351
|
}
|
|
@@ -1361,7 +1382,7 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
|
|
|
1361
1382
|
* @param value - The value to check.
|
|
1362
1383
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive}
|
|
1363
1384
|
*/
|
|
1364
|
-
|
|
1385
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1365
1386
|
function isReactive(value) {
|
|
1366
1387
|
if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
|
|
1367
1388
|
return !!(value && value["__v_isReactive"]);
|
|
@@ -1377,11 +1398,11 @@ function isReactive(value) {
|
|
|
1377
1398
|
* @param value - The value to check.
|
|
1378
1399
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly}
|
|
1379
1400
|
*/
|
|
1380
|
-
|
|
1401
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1381
1402
|
function isReadonly(value) {
|
|
1382
1403
|
return !!(value && value["__v_isReadonly"]);
|
|
1383
1404
|
}
|
|
1384
|
-
|
|
1405
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1385
1406
|
function isShallow(value) {
|
|
1386
1407
|
return !!(value && value["__v_isShallow"]);
|
|
1387
1408
|
}
|
|
@@ -1392,7 +1413,7 @@ function isShallow(value) {
|
|
|
1392
1413
|
* @param value - The value to check.
|
|
1393
1414
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy}
|
|
1394
1415
|
*/
|
|
1395
|
-
|
|
1416
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1396
1417
|
function isProxy(value) {
|
|
1397
1418
|
return value ? !!value["__v_raw"] : false;
|
|
1398
1419
|
}
|
|
@@ -1419,7 +1440,7 @@ function isProxy(value) {
|
|
|
1419
1440
|
* @param observed - The object for which the "raw" value is requested.
|
|
1420
1441
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw}
|
|
1421
1442
|
*/
|
|
1422
|
-
|
|
1443
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1423
1444
|
function toRaw(observed) {
|
|
1424
1445
|
const raw = observed && observed["__v_raw"];
|
|
1425
1446
|
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
@@ -1468,15 +1489,15 @@ const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value)
|
|
|
1468
1489
|
const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1469
1490
|
//#endregion
|
|
1470
1491
|
//#region packages/reactivity/src/ref.ts
|
|
1471
|
-
|
|
1492
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1472
1493
|
function isRef(r) {
|
|
1473
1494
|
return r ? r["__v_isRef"] === true : false;
|
|
1474
1495
|
}
|
|
1475
|
-
|
|
1496
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1476
1497
|
function ref(value) {
|
|
1477
1498
|
return createRef(value, toReactive);
|
|
1478
1499
|
}
|
|
1479
|
-
|
|
1500
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1480
1501
|
function shallowRef(value) {
|
|
1481
1502
|
return createRef(value);
|
|
1482
1503
|
}
|
|
@@ -1679,7 +1700,7 @@ function customRef(factory) {
|
|
|
1679
1700
|
* @param object - Reactive object to be made into an object of linked refs.
|
|
1680
1701
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs}
|
|
1681
1702
|
*/
|
|
1682
|
-
|
|
1703
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1683
1704
|
function toRefs(object) {
|
|
1684
1705
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1685
1706
|
for (const key in object) ret[key] = propertyToRef(object, key);
|
|
@@ -1730,7 +1751,7 @@ var GetterRefImpl = class {
|
|
|
1730
1751
|
return this._value = this._getter();
|
|
1731
1752
|
}
|
|
1732
1753
|
};
|
|
1733
|
-
|
|
1754
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1734
1755
|
function toRef(source, key, defaultValue) {
|
|
1735
1756
|
if (/* @__PURE__ */ isRef(source)) return source;
|
|
1736
1757
|
else if (isFunction(source)) return new GetterRefImpl(source);
|
|
@@ -1796,10 +1817,12 @@ var ReactiveEffect = class {
|
|
|
1796
1817
|
get dirty() {
|
|
1797
1818
|
const flags = this.flags;
|
|
1798
1819
|
if (flags & 16) return true;
|
|
1799
|
-
if (flags & 32)
|
|
1800
|
-
this.
|
|
1801
|
-
|
|
1802
|
-
|
|
1820
|
+
if (flags & 32) {
|
|
1821
|
+
if (checkDirty(this.deps, this)) {
|
|
1822
|
+
this.flags = flags | 16;
|
|
1823
|
+
return true;
|
|
1824
|
+
} else this.flags = flags & -33;
|
|
1825
|
+
}
|
|
1803
1826
|
return false;
|
|
1804
1827
|
}
|
|
1805
1828
|
};
|
|
@@ -1978,10 +2001,12 @@ var ComputedRefImpl = class {
|
|
|
1978
2001
|
get _dirty() {
|
|
1979
2002
|
const flags = this.flags;
|
|
1980
2003
|
if (flags & 16) return true;
|
|
1981
|
-
if (flags & 32)
|
|
1982
|
-
this.
|
|
1983
|
-
|
|
1984
|
-
|
|
2004
|
+
if (flags & 32) {
|
|
2005
|
+
if (checkDirty(this.deps, this)) {
|
|
2006
|
+
this.flags = flags | 16;
|
|
2007
|
+
return true;
|
|
2008
|
+
} else this.flags = flags & -33;
|
|
2009
|
+
}
|
|
1985
2010
|
return false;
|
|
1986
2011
|
}
|
|
1987
2012
|
/**
|
|
@@ -2042,7 +2067,7 @@ var ComputedRefImpl = class {
|
|
|
2042
2067
|
}
|
|
2043
2068
|
};
|
|
2044
2069
|
setupOnTrigger(ComputedRefImpl);
|
|
2045
|
-
|
|
2070
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2046
2071
|
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
2047
2072
|
let getter;
|
|
2048
2073
|
let setter;
|
|
@@ -2120,25 +2145,26 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2120
2145
|
else if (isFunction(s)) return call ? call(s, 2) : s();
|
|
2121
2146
|
else warnInvalidSource(s, onWarn);
|
|
2122
2147
|
});
|
|
2123
|
-
} else if (isFunction(source))
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2148
|
+
} else if (isFunction(source)) {
|
|
2149
|
+
if (cb) getter = call ? () => call(source, 2) : source;
|
|
2150
|
+
else getter = () => {
|
|
2151
|
+
if (this.cleanupsLength) {
|
|
2152
|
+
const prevSub = setActiveSub();
|
|
2153
|
+
try {
|
|
2154
|
+
cleanup(this);
|
|
2155
|
+
} finally {
|
|
2156
|
+
setActiveSub(prevSub);
|
|
2157
|
+
}
|
|
2158
|
+
}
|
|
2159
|
+
const currentEffect = activeWatcher;
|
|
2160
|
+
activeWatcher = this;
|
|
2127
2161
|
try {
|
|
2128
|
-
|
|
2162
|
+
return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
|
|
2129
2163
|
} finally {
|
|
2130
|
-
|
|
2164
|
+
activeWatcher = currentEffect;
|
|
2131
2165
|
}
|
|
2132
|
-
}
|
|
2133
|
-
|
|
2134
|
-
activeWatcher = this;
|
|
2135
|
-
try {
|
|
2136
|
-
return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
|
|
2137
|
-
} finally {
|
|
2138
|
-
activeWatcher = currentEffect;
|
|
2139
|
-
}
|
|
2140
|
-
};
|
|
2141
|
-
else {
|
|
2166
|
+
};
|
|
2167
|
+
} else {
|
|
2142
2168
|
getter = NOOP;
|
|
2143
2169
|
warnInvalidSource(source, onWarn);
|
|
2144
2170
|
}
|
|
@@ -2462,7 +2488,7 @@ let currentFlushPromise = null;
|
|
|
2462
2488
|
let jobsLength = 0;
|
|
2463
2489
|
let flushIndex = 0;
|
|
2464
2490
|
let postFlushIndex = 0;
|
|
2465
|
-
const resolvedPromise =
|
|
2491
|
+
const resolvedPromise = /*@__PURE__*/ Promise.resolve();
|
|
2466
2492
|
const RECURSION_LIMIT = 100;
|
|
2467
2493
|
function nextTick(fn) {
|
|
2468
2494
|
const p = currentFlushPromise || resolvedPromise;
|
|
@@ -2501,6 +2527,7 @@ const doFlushJobs = () => {
|
|
|
2501
2527
|
flushJobs();
|
|
2502
2528
|
} catch (e) {
|
|
2503
2529
|
currentFlushPromise = null;
|
|
2530
|
+
if (jobsLength || postJobs.length) queueFlush();
|
|
2504
2531
|
throw e;
|
|
2505
2532
|
}
|
|
2506
2533
|
};
|
|
@@ -2508,9 +2535,10 @@ function queueFlush() {
|
|
|
2508
2535
|
if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
|
|
2509
2536
|
}
|
|
2510
2537
|
function queuePostFlushCb(jobs, id = Infinity) {
|
|
2511
|
-
if (!isArray(jobs))
|
|
2512
|
-
|
|
2513
|
-
|
|
2538
|
+
if (!isArray(jobs)) {
|
|
2539
|
+
if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
|
|
2540
|
+
else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
|
|
2541
|
+
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
2514
2542
|
queueFlush();
|
|
2515
2543
|
}
|
|
2516
2544
|
function flushPreFlushCbs(instance, seen) {
|
|
@@ -2524,8 +2552,11 @@ function flushPreFlushCbs(instance, seen) {
|
|
|
2524
2552
|
i--;
|
|
2525
2553
|
jobsLength--;
|
|
2526
2554
|
if (cb.flags & 2) cb.flags &= -2;
|
|
2527
|
-
|
|
2528
|
-
|
|
2555
|
+
try {
|
|
2556
|
+
cb();
|
|
2557
|
+
} finally {
|
|
2558
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
2559
|
+
}
|
|
2529
2560
|
}
|
|
2530
2561
|
}
|
|
2531
2562
|
function flushPostFlushCbs(seen) {
|
|
@@ -2538,18 +2569,22 @@ function flushPostFlushCbs(seen) {
|
|
|
2538
2569
|
activePostJobs = postJobs;
|
|
2539
2570
|
postJobs = [];
|
|
2540
2571
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
cb
|
|
2547
|
-
|
|
2548
|
-
|
|
2572
|
+
try {
|
|
2573
|
+
while (postFlushIndex < activePostJobs.length) {
|
|
2574
|
+
const cb = activePostJobs[postFlushIndex++];
|
|
2575
|
+
if (checkRecursiveUpdates(seen, cb)) continue;
|
|
2576
|
+
if (cb.flags & 2) cb.flags &= -2;
|
|
2577
|
+
if (!(cb.flags & 4)) try {
|
|
2578
|
+
cb();
|
|
2579
|
+
} finally {
|
|
2580
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
2581
|
+
}
|
|
2549
2582
|
}
|
|
2583
|
+
} finally {
|
|
2584
|
+
while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
|
|
2585
|
+
activePostJobs = null;
|
|
2586
|
+
postFlushIndex = 0;
|
|
2550
2587
|
}
|
|
2551
|
-
activePostJobs = null;
|
|
2552
|
-
postFlushIndex = 0;
|
|
2553
2588
|
}
|
|
2554
2589
|
}
|
|
2555
2590
|
let isFlushing = false;
|
|
@@ -2559,9 +2594,12 @@ let isFlushing = false;
|
|
|
2559
2594
|
function flushOnAppMount(instance) {
|
|
2560
2595
|
if (!isFlushing) {
|
|
2561
2596
|
isFlushing = true;
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2597
|
+
try {
|
|
2598
|
+
flushPreFlushCbs(instance);
|
|
2599
|
+
flushPostFlushCbs();
|
|
2600
|
+
} finally {
|
|
2601
|
+
isFlushing = false;
|
|
2602
|
+
}
|
|
2565
2603
|
}
|
|
2566
2604
|
}
|
|
2567
2605
|
function flushJobs(seen) {
|
|
@@ -2591,8 +2629,8 @@ function flushJobs(seen) {
|
|
|
2591
2629
|
jobsLength = 0;
|
|
2592
2630
|
jobs.length = 0;
|
|
2593
2631
|
flushPostFlushCbs(seen);
|
|
2594
|
-
currentFlushPromise = null;
|
|
2595
2632
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
2633
|
+
else currentFlushPromise = null;
|
|
2596
2634
|
}
|
|
2597
2635
|
}
|
|
2598
2636
|
function checkRecursiveUpdates(seen, fn) {
|
|
@@ -2623,6 +2661,19 @@ getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
|
2623
2661
|
rerender: tryWrap(rerender),
|
|
2624
2662
|
reload: tryWrap(reload)
|
|
2625
2663
|
};
|
|
2664
|
+
function runWithHmrUpdating(fn) {
|
|
2665
|
+
isHmrUpdating = true;
|
|
2666
|
+
let done = false;
|
|
2667
|
+
try {
|
|
2668
|
+
fn();
|
|
2669
|
+
done = true;
|
|
2670
|
+
} finally {
|
|
2671
|
+
if (done) nextTick(() => {
|
|
2672
|
+
isHmrUpdating = false;
|
|
2673
|
+
});
|
|
2674
|
+
else isHmrUpdating = false;
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2626
2677
|
const map = /* @__PURE__ */ new Map();
|
|
2627
2678
|
function registerHMR(instance) {
|
|
2628
2679
|
const id = instance.type.__hmrId;
|
|
@@ -2664,18 +2715,16 @@ function rerender(id, newRender) {
|
|
|
2664
2715
|
instance.render = newRender;
|
|
2665
2716
|
normalizeClassComponent(instance.type).render = newRender;
|
|
2666
2717
|
}
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2718
|
+
runWithHmrUpdating(() => {
|
|
2719
|
+
if (instance.vapor) {
|
|
2720
|
+
if (!instance.isUnmounted) instance.hmrRerender();
|
|
2721
|
+
} else {
|
|
2722
|
+
const i = instance;
|
|
2723
|
+
if (!(i.effect.flags & 1024)) {
|
|
2724
|
+
i.renderCache = [];
|
|
2725
|
+
i.effect.run();
|
|
2726
|
+
}
|
|
2675
2727
|
}
|
|
2676
|
-
}
|
|
2677
|
-
nextTick(() => {
|
|
2678
|
-
isHmrUpdating = false;
|
|
2679
2728
|
});
|
|
2680
2729
|
});
|
|
2681
2730
|
}
|
|
@@ -2690,15 +2739,17 @@ function reload(id, newComp) {
|
|
|
2690
2739
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2691
2740
|
const dirtyInstances = new Set(instances);
|
|
2692
2741
|
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2693
|
-
|
|
2694
|
-
const
|
|
2695
|
-
|
|
2696
|
-
if (
|
|
2697
|
-
rerenderedParents.
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2742
|
+
runWithHmrUpdating(() => {
|
|
2743
|
+
for (const instance of instances) {
|
|
2744
|
+
const parent = instance.parent;
|
|
2745
|
+
if (parent) {
|
|
2746
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2747
|
+
rerenderedParents.add(parent);
|
|
2748
|
+
parent.hmrRerender();
|
|
2749
|
+
}
|
|
2750
|
+
} else instance.hmrReload(newComp);
|
|
2751
|
+
}
|
|
2752
|
+
});
|
|
2702
2753
|
} else {
|
|
2703
2754
|
const parentUpdates = /* @__PURE__ */ new Map();
|
|
2704
2755
|
const dirtyInstanceSet = new Set(instances);
|
|
@@ -2732,21 +2783,22 @@ function reload(id, newComp) {
|
|
|
2732
2783
|
}
|
|
2733
2784
|
parentUpdates.forEach((updates, parent) => {
|
|
2734
2785
|
queueJob(() => {
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2786
|
+
try {
|
|
2787
|
+
runWithHmrUpdating(() => {
|
|
2788
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2789
|
+
else {
|
|
2790
|
+
const i = parent;
|
|
2791
|
+
if (!(i.effect.flags & 1024)) {
|
|
2792
|
+
i.renderCache = [];
|
|
2793
|
+
i.effect.run();
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
});
|
|
2797
|
+
} finally {
|
|
2798
|
+
updates.forEach(([instance, dirtyInstances]) => {
|
|
2799
|
+
dirtyInstances.delete(instance);
|
|
2800
|
+
});
|
|
2743
2801
|
}
|
|
2744
|
-
nextTick(() => {
|
|
2745
|
-
isHmrUpdating = false;
|
|
2746
|
-
});
|
|
2747
|
-
updates.forEach(([instance, dirtyInstances]) => {
|
|
2748
|
-
dirtyInstances.delete(instance);
|
|
2749
|
-
});
|
|
2750
2802
|
});
|
|
2751
2803
|
});
|
|
2752
2804
|
}
|
|
@@ -2815,20 +2867,20 @@ function devtoolsInitApp(app, version) {
|
|
|
2815
2867
|
function devtoolsUnmountApp(app) {
|
|
2816
2868
|
emit$1("app:unmount", app);
|
|
2817
2869
|
}
|
|
2818
|
-
const devtoolsComponentAdded =
|
|
2819
|
-
const devtoolsComponentUpdated =
|
|
2820
|
-
const _devtoolsComponentRemoved =
|
|
2870
|
+
const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
|
|
2871
|
+
const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
|
|
2872
|
+
const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
|
|
2821
2873
|
const devtoolsComponentRemoved = (component) => {
|
|
2822
2874
|
if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
|
|
2823
2875
|
};
|
|
2824
|
-
|
|
2876
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2825
2877
|
function createDevtoolsComponentHook(hook) {
|
|
2826
2878
|
return (component) => {
|
|
2827
2879
|
emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
|
|
2828
2880
|
};
|
|
2829
2881
|
}
|
|
2830
|
-
const devtoolsPerfStart =
|
|
2831
|
-
const devtoolsPerfEnd =
|
|
2882
|
+
const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
|
|
2883
|
+
const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
|
|
2832
2884
|
function createDevtoolsPerformanceHook(hook) {
|
|
2833
2885
|
return (component, type, time) => {
|
|
2834
2886
|
emit$1(hook, component.appContext.app, component.uid, component, type, time);
|
|
@@ -3093,15 +3145,16 @@ const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target inst
|
|
|
3093
3145
|
const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
|
|
3094
3146
|
const resolveTarget = (props, select) => {
|
|
3095
3147
|
const targetSelector = props && props.to;
|
|
3096
|
-
if (isString(targetSelector))
|
|
3097
|
-
|
|
3098
|
-
|
|
3148
|
+
if (isString(targetSelector)) {
|
|
3149
|
+
if (!select) {
|
|
3150
|
+
warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
|
|
3151
|
+
return null;
|
|
3152
|
+
} else {
|
|
3153
|
+
const target = select(targetSelector);
|
|
3154
|
+
if (!target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
|
|
3155
|
+
return target;
|
|
3156
|
+
}
|
|
3099
3157
|
} else {
|
|
3100
|
-
const target = select(targetSelector);
|
|
3101
|
-
if (!target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
|
|
3102
|
-
return target;
|
|
3103
|
-
}
|
|
3104
|
-
else {
|
|
3105
3158
|
if (!targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
|
|
3106
3159
|
return targetSelector;
|
|
3107
3160
|
}
|
|
@@ -3139,7 +3192,8 @@ const TeleportImpl = {
|
|
|
3139
3192
|
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3140
3193
|
pendingMounts.delete(vnode);
|
|
3141
3194
|
if (isTeleportDisabled(vnode.props)) {
|
|
3142
|
-
|
|
3195
|
+
const mountContainer = parentNode(vnode.el) || container;
|
|
3196
|
+
mount(vnode, mountContainer, vnode.anchor);
|
|
3143
3197
|
updateCssVars(vnode, true);
|
|
3144
3198
|
}
|
|
3145
3199
|
mountToTarget(vnode);
|
|
@@ -3248,15 +3302,17 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3248
3302
|
const disabled = isTeleportDisabled(vnode.props);
|
|
3249
3303
|
if (target) {
|
|
3250
3304
|
const targetNode = target._lpa || target.firstChild;
|
|
3251
|
-
if (vnode.shapeFlag & 16)
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3305
|
+
if (vnode.shapeFlag & 16) {
|
|
3306
|
+
if (disabled) {
|
|
3307
|
+
hydrateDisabledTeleport(node, vnode);
|
|
3308
|
+
hydrateAnchor(target, targetNode);
|
|
3309
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
|
|
3310
|
+
} else {
|
|
3311
|
+
vnode.anchor = nextSibling(node);
|
|
3312
|
+
hydrateAnchor(target, targetNode);
|
|
3313
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
|
|
3314
|
+
hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3315
|
+
}
|
|
3260
3316
|
}
|
|
3261
3317
|
updateCssVars(vnode, disabled);
|
|
3262
3318
|
} else if (disabled) {
|
|
@@ -3422,8 +3478,10 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
3422
3478
|
persisted,
|
|
3423
3479
|
beforeEnter(el) {
|
|
3424
3480
|
let hook = onBeforeEnter;
|
|
3425
|
-
if (!state.isMounted)
|
|
3426
|
-
|
|
3481
|
+
if (!state.isMounted) {
|
|
3482
|
+
if (appear) hook = onBeforeAppear || onBeforeEnter;
|
|
3483
|
+
else return;
|
|
3484
|
+
}
|
|
3427
3485
|
if (el[leaveCbKey]) el[leaveCbKey](true);
|
|
3428
3486
|
earlyRemove();
|
|
3429
3487
|
callHook(hook, [el]);
|
|
@@ -3433,11 +3491,13 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
3433
3491
|
let hook = onEnter;
|
|
3434
3492
|
let afterHook = onAfterEnter;
|
|
3435
3493
|
let cancelHook = onEnterCancelled;
|
|
3436
|
-
if (!state.isMounted)
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3494
|
+
if (!state.isMounted) {
|
|
3495
|
+
if (appear) {
|
|
3496
|
+
hook = onAppear || onEnter;
|
|
3497
|
+
afterHook = onAfterAppear || onAfterEnter;
|
|
3498
|
+
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
3499
|
+
} else return;
|
|
3500
|
+
}
|
|
3441
3501
|
let called = false;
|
|
3442
3502
|
el[enterCbKey$1] = (cancelled) => {
|
|
3443
3503
|
if (called) return;
|
|
@@ -3471,7 +3531,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
3471
3531
|
else done();
|
|
3472
3532
|
},
|
|
3473
3533
|
clone(node) {
|
|
3474
|
-
return cloneHooks(node);
|
|
3534
|
+
return cloneHooks ? cloneHooks(node) : hooks;
|
|
3475
3535
|
}
|
|
3476
3536
|
};
|
|
3477
3537
|
return hooks;
|
|
@@ -3603,9 +3663,9 @@ function checkTransitionMode(mode) {
|
|
|
3603
3663
|
}
|
|
3604
3664
|
//#endregion
|
|
3605
3665
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
3606
|
-
|
|
3666
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
3607
3667
|
function defineComponent(options, extraOptions) {
|
|
3608
|
-
return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
|
|
3668
|
+
return isFunction(options) ? /*@__PURE__*/ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
|
|
3609
3669
|
}
|
|
3610
3670
|
//#endregion
|
|
3611
3671
|
//#region packages/runtime-core/src/helpers/useId.ts
|
|
@@ -3702,15 +3762,16 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3702
3762
|
if (rawRef.f) {
|
|
3703
3763
|
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
3704
3764
|
if (isUnmount) isArray(existing) && remove(existing, refValue);
|
|
3705
|
-
else if (!isArray(existing))
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3765
|
+
else if (!isArray(existing)) {
|
|
3766
|
+
if (_isString) {
|
|
3767
|
+
refs[ref] = [refValue];
|
|
3768
|
+
if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
|
|
3769
|
+
} else {
|
|
3770
|
+
const newVal = [refValue];
|
|
3771
|
+
if (canSetRef(ref, rawRef.k)) ref.value = newVal;
|
|
3772
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
3773
|
+
}
|
|
3774
|
+
} else if (!existing.includes(refValue)) existing.push(refValue);
|
|
3714
3775
|
} else if (_isString) {
|
|
3715
3776
|
refs[ref] = value;
|
|
3716
3777
|
if (canSetSetupRef(ref)) setupState[ref] = value;
|
|
@@ -3811,11 +3872,12 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3811
3872
|
let nextNode = null;
|
|
3812
3873
|
switch (type) {
|
|
3813
3874
|
case Text:
|
|
3814
|
-
if (domType !== 3)
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3875
|
+
if (domType !== 3) {
|
|
3876
|
+
if (vnode.children === "") {
|
|
3877
|
+
insert(vnode.el = createText(""), parentNode(node), node);
|
|
3878
|
+
nextNode = node;
|
|
3879
|
+
} else nextNode = onMismatch();
|
|
3880
|
+
} else {
|
|
3819
3881
|
if (node.data !== vnode.children) {
|
|
3820
3882
|
warn$1(`Hydration text mismatch in`, node.parentNode, `\n - rendered on server: ${JSON.stringify(node.data)}\n - expected on client: ${JSON.stringify(vnode.children)}`);
|
|
3821
3883
|
logMismatchError();
|
|
@@ -3854,9 +3916,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3854
3916
|
case VaporSlot:
|
|
3855
3917
|
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
3856
3918
|
break;
|
|
3857
|
-
default: if (shapeFlag & 1)
|
|
3858
|
-
|
|
3859
|
-
|
|
3919
|
+
default: if (shapeFlag & 1) {
|
|
3920
|
+
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
|
|
3921
|
+
else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3922
|
+
} else if (shapeFlag & 6) {
|
|
3860
3923
|
vnode.slotScopeIds = slotScopeIds;
|
|
3861
3924
|
const container = parentNode(node);
|
|
3862
3925
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
@@ -3878,19 +3941,20 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3878
3941
|
} else {
|
|
3879
3942
|
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
3880
3943
|
const component = vnode.component;
|
|
3881
|
-
if (isAsyncWrapper(vnode)
|
|
3944
|
+
if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep && !component.asyncResolved)) {
|
|
3882
3945
|
let subTree;
|
|
3883
3946
|
if (isFragmentStart) {
|
|
3884
|
-
subTree = createVNode(
|
|
3947
|
+
subTree = createVNode(Static);
|
|
3885
3948
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
3886
3949
|
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
3887
3950
|
subTree.el = node;
|
|
3888
3951
|
component.subTree = subTree;
|
|
3889
3952
|
}
|
|
3890
3953
|
}
|
|
3891
|
-
} else if (shapeFlag & 64)
|
|
3892
|
-
|
|
3893
|
-
|
|
3954
|
+
} else if (shapeFlag & 64) {
|
|
3955
|
+
if (domType !== 8) nextNode = onMismatch();
|
|
3956
|
+
else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
3957
|
+
} else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
3894
3958
|
else warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
3895
3959
|
}
|
|
3896
3960
|
if (ref != null) setRef(ref, null, parentSuspense, vnode);
|
|
@@ -4031,8 +4095,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4031
4095
|
node = nextSibling(node);
|
|
4032
4096
|
if (node && isComment(node)) {
|
|
4033
4097
|
if (node.data === open) match++;
|
|
4034
|
-
if (node.data === close)
|
|
4035
|
-
|
|
4098
|
+
if (node.data === close) {
|
|
4099
|
+
if (match === 0) return nextSibling(node);
|
|
4100
|
+
else match--;
|
|
4101
|
+
}
|
|
4036
4102
|
}
|
|
4037
4103
|
}
|
|
4038
4104
|
return node;
|
|
@@ -4054,7 +4120,7 @@ const isTemplateNode = (node) => {
|
|
|
4054
4120
|
/**
|
|
4055
4121
|
* Dev only
|
|
4056
4122
|
*/
|
|
4057
|
-
const resourceProps =
|
|
4123
|
+
const resourceProps = /*@__PURE__*/ new Set([
|
|
4058
4124
|
"src",
|
|
4059
4125
|
"srcset",
|
|
4060
4126
|
"href",
|
|
@@ -4296,14 +4362,14 @@ function forEachElement(node, cb) {
|
|
|
4296
4362
|
//#endregion
|
|
4297
4363
|
//#region packages/runtime-core/src/apiAsyncComponent.ts
|
|
4298
4364
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
4299
|
-
|
|
4365
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
4300
4366
|
function defineAsyncComponent(source) {
|
|
4301
4367
|
const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
|
|
4302
4368
|
return /* @__PURE__ */ defineComponent({
|
|
4303
4369
|
name: "AsyncComponentWrapper",
|
|
4304
4370
|
__asyncLoader: load,
|
|
4305
4371
|
__asyncHydrate(el, instance, hydrate) {
|
|
4306
|
-
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
|
|
4372
|
+
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
|
|
4307
4373
|
},
|
|
4308
4374
|
get __asyncResolved() {
|
|
4309
4375
|
return getResolvedComp();
|
|
@@ -4422,10 +4488,10 @@ const useAsyncComponentState = (delay, timeout, onError, instance = currentInsta
|
|
|
4422
4488
|
* shared between core and vapor
|
|
4423
4489
|
* @internal
|
|
4424
4490
|
*/
|
|
4425
|
-
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
4491
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
|
|
4426
4492
|
const wasConnected = el.isConnected;
|
|
4427
4493
|
let patched = false;
|
|
4428
|
-
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4494
|
+
if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4429
4495
|
const performHydrate = () => {
|
|
4430
4496
|
if (patched) {
|
|
4431
4497
|
{
|
|
@@ -4511,10 +4577,13 @@ const KeepAlive = {
|
|
|
4511
4577
|
});
|
|
4512
4578
|
let pendingCacheKey = null;
|
|
4513
4579
|
const cacheSubtree = () => {
|
|
4514
|
-
if (pendingCacheKey != null)
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4580
|
+
if (pendingCacheKey != null) {
|
|
4581
|
+
if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
|
|
4582
|
+
const vnode = getInnerChild(keepAliveInstance.subTree);
|
|
4583
|
+
if (vnode.component) cache.set(pendingCacheKey, vnode);
|
|
4584
|
+
}, void 0, keepAliveInstance.subTree.suspense);
|
|
4585
|
+
else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
|
|
4586
|
+
}
|
|
4518
4587
|
};
|
|
4519
4588
|
onMounted(cacheSubtree);
|
|
4520
4589
|
onUpdated(cacheSubtree);
|
|
@@ -4756,23 +4825,25 @@ function renderList(source, renderItem, cache, index) {
|
|
|
4756
4825
|
}
|
|
4757
4826
|
ret = new Array(source.length);
|
|
4758
4827
|
for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
|
|
4759
|
-
} else if (typeof source === "number")
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
4767
|
-
else {
|
|
4768
|
-
const keys = Object.keys(source);
|
|
4769
|
-
ret = new Array(keys.length);
|
|
4770
|
-
for (let i = 0, l = keys.length; i < l; i++) {
|
|
4771
|
-
const key = keys[i];
|
|
4772
|
-
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
4828
|
+
} else if (typeof source === "number") {
|
|
4829
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
4830
|
+
warn$1(`The v-for range expects a positive integer value but got ${source}.`);
|
|
4831
|
+
ret = [];
|
|
4832
|
+
} else {
|
|
4833
|
+
ret = new Array(source);
|
|
4834
|
+
for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
4773
4835
|
}
|
|
4774
|
-
}
|
|
4775
|
-
|
|
4836
|
+
} else if (isObject(source)) {
|
|
4837
|
+
if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
4838
|
+
else {
|
|
4839
|
+
const keys = Object.keys(source);
|
|
4840
|
+
ret = new Array(keys.length);
|
|
4841
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
4842
|
+
const key = keys[i];
|
|
4843
|
+
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
4844
|
+
}
|
|
4845
|
+
}
|
|
4846
|
+
} else ret = [];
|
|
4776
4847
|
if (cache) cache[index] = ret;
|
|
4777
4848
|
return ret;
|
|
4778
4849
|
}
|
|
@@ -4797,14 +4868,27 @@ function createSlots(slots, dynamicSlots) {
|
|
|
4797
4868
|
//#endregion
|
|
4798
4869
|
//#region packages/runtime-core/src/helpers/renderSlot.ts
|
|
4799
4870
|
/**
|
|
4871
|
+
* Links a slot function to its raw vapor slot: a raw vapor slot carries
|
|
4872
|
+
* itself, and the wrapper the interop slots proxy hands out carries the raw
|
|
4873
|
+
* slot it wraps — one lookup answers both "is this a vapor slot" and
|
|
4874
|
+
* "which one". Internal to vapor interop.
|
|
4875
|
+
*/
|
|
4876
|
+
const rawVaporSlotKey = Symbol(`rawVaporSlot`);
|
|
4877
|
+
/**
|
|
4878
|
+
* Marks a compiler-generated slot fallback as VDOM-rendered so the vapor
|
|
4879
|
+
* interop fallback chain renders it through the VDOM renderer. Internal to
|
|
4880
|
+
* vapor interop.
|
|
4881
|
+
*/
|
|
4882
|
+
const vdomSlotFallbackKey = Symbol(`vdomSlotFallback`);
|
|
4883
|
+
/**
|
|
4800
4884
|
* Compiler runtime helper for rendering `<slot/>`
|
|
4801
4885
|
* @private
|
|
4802
4886
|
*/
|
|
4803
4887
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
4804
4888
|
if (props == null) props = {};
|
|
4805
4889
|
let slot = slots[name];
|
|
4806
|
-
if (fallback) fallback
|
|
4807
|
-
const vaporSlot = slot &&
|
|
4890
|
+
if (fallback) fallback[vdomSlotFallbackKey] = true;
|
|
4891
|
+
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
4808
4892
|
if (vaporSlot) {
|
|
4809
4893
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
4810
4894
|
ret.vs = {
|
|
@@ -4881,11 +4965,38 @@ const getPublicInstance = (i) => {
|
|
|
4881
4965
|
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
4882
4966
|
return getPublicInstance(i.parent);
|
|
4883
4967
|
};
|
|
4968
|
+
const resolveDevRootEl = (vnode) => {
|
|
4969
|
+
let found = false;
|
|
4970
|
+
while (true) {
|
|
4971
|
+
if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
|
|
4972
|
+
const root = filterSingleRoot(vnode.children);
|
|
4973
|
+
if (!root) return;
|
|
4974
|
+
vnode = root;
|
|
4975
|
+
found = true;
|
|
4976
|
+
continue;
|
|
4977
|
+
}
|
|
4978
|
+
const component = vnode.component;
|
|
4979
|
+
if (component && component.subTree) {
|
|
4980
|
+
vnode = component.subTree;
|
|
4981
|
+
continue;
|
|
4982
|
+
}
|
|
4983
|
+
const suspense = vnode.suspense;
|
|
4984
|
+
if (suspense && suspense.activeBranch) {
|
|
4985
|
+
vnode = suspense.activeBranch;
|
|
4986
|
+
continue;
|
|
4987
|
+
}
|
|
4988
|
+
return found ? vnode.el : void 0;
|
|
4989
|
+
}
|
|
4990
|
+
};
|
|
4991
|
+
const getDevRootFragmentEl = (i) => {
|
|
4992
|
+
const el = i.subTree && resolveDevRootEl(i.subTree);
|
|
4993
|
+
return el === void 0 ? i.vnode.el : el;
|
|
4994
|
+
};
|
|
4884
4995
|
let publicPropertiesMap;
|
|
4885
4996
|
const getPublicPropertiesMap = () => {
|
|
4886
4997
|
if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
|
|
4887
4998
|
$: (i) => i,
|
|
4888
|
-
$el: (i) => i
|
|
4999
|
+
$el: (i) => getDevRootFragmentEl(i),
|
|
4889
5000
|
$data: (i) => i.data,
|
|
4890
5001
|
$props: (i) => /* @__PURE__ */ shallowReadonly(i.props),
|
|
4891
5002
|
$attrs: (i) => /* @__PURE__ */ shallowReadonly(i.attrs),
|
|
@@ -4991,7 +5102,7 @@ PublicInstanceProxyHandlers.ownKeys = (target) => {
|
|
|
4991
5102
|
warn$1("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.");
|
|
4992
5103
|
return Reflect.ownKeys(target);
|
|
4993
5104
|
};
|
|
4994
|
-
const RuntimeCompiledPublicInstanceProxyHandlers =
|
|
5105
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
|
|
4995
5106
|
get(target, key) {
|
|
4996
5107
|
if (key === Symbol.unscopables) return;
|
|
4997
5108
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
@@ -5163,12 +5274,13 @@ function mergeDefaults(raw, defaults) {
|
|
|
5163
5274
|
for (const key in defaults) {
|
|
5164
5275
|
if (key.startsWith("__skip")) continue;
|
|
5165
5276
|
let opt = props[key];
|
|
5166
|
-
if (opt)
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5277
|
+
if (opt) {
|
|
5278
|
+
if (isArray(opt) || isFunction(opt)) opt = props[key] = {
|
|
5279
|
+
type: opt,
|
|
5280
|
+
default: defaults[key]
|
|
5281
|
+
};
|
|
5282
|
+
else opt.default = defaults[key];
|
|
5283
|
+
} else if (opt === null) opt = props[key] = { default: defaults[key] };
|
|
5172
5284
|
else warn$1(`props default key "${key}" has no corresponding declaration.`);
|
|
5173
5285
|
if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
|
|
5174
5286
|
}
|
|
@@ -5311,11 +5423,12 @@ function applyOptions(instance) {
|
|
|
5311
5423
|
const opt = computedOptions[key];
|
|
5312
5424
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
5313
5425
|
if (get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
|
|
5426
|
+
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
|
|
5427
|
+
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
5428
|
+
};
|
|
5314
5429
|
const c = computed({
|
|
5315
5430
|
get,
|
|
5316
|
-
set
|
|
5317
|
-
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
5318
|
-
}
|
|
5431
|
+
set
|
|
5319
5432
|
});
|
|
5320
5433
|
Object.defineProperty(ctx, key, {
|
|
5321
5434
|
enumerable: true,
|
|
@@ -5371,9 +5484,10 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
|
|
|
5371
5484
|
for (const key in injectOptions) {
|
|
5372
5485
|
const opt = injectOptions[key];
|
|
5373
5486
|
let injected;
|
|
5374
|
-
if (isObject(opt))
|
|
5375
|
-
|
|
5376
|
-
|
|
5487
|
+
if (isObject(opt)) {
|
|
5488
|
+
if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
|
|
5489
|
+
else injected = inject(opt.from || key);
|
|
5490
|
+
} else injected = inject(opt);
|
|
5377
5491
|
if (/* @__PURE__ */ isRef(injected)) Object.defineProperty(ctx, key, {
|
|
5378
5492
|
enumerable: true,
|
|
5379
5493
|
configurable: true,
|
|
@@ -5394,13 +5508,14 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
5394
5508
|
if (isFunction(handler)) watch(getter, handler);
|
|
5395
5509
|
else warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
5396
5510
|
} else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
|
|
5397
|
-
else if (isObject(raw))
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5511
|
+
else if (isObject(raw)) {
|
|
5512
|
+
if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
5513
|
+
else {
|
|
5514
|
+
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
5515
|
+
if (isFunction(handler)) watch(getter, handler, raw);
|
|
5516
|
+
else warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
5517
|
+
}
|
|
5518
|
+
} else warn$1(`Invalid watch option: "${key}"`, raw);
|
|
5404
5519
|
}
|
|
5405
5520
|
/**
|
|
5406
5521
|
* Resolve merged options and cache it on the component.
|
|
@@ -5486,7 +5601,7 @@ function mergeObjectOptions(to, from) {
|
|
|
5486
5601
|
}
|
|
5487
5602
|
function mergeEmitsOrPropsOptions(to, from) {
|
|
5488
5603
|
if (to) {
|
|
5489
|
-
if (isArray(to) && isArray(from)) return [
|
|
5604
|
+
if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
5490
5605
|
return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
|
|
5491
5606
|
} else return from;
|
|
5492
5607
|
}
|
|
@@ -5605,8 +5720,10 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
|
|
|
5605
5720
|
} else warn$1(`Cannot unmount an app that is not mounted.`);
|
|
5606
5721
|
},
|
|
5607
5722
|
provide(key, value) {
|
|
5608
|
-
if (key in context.provides)
|
|
5609
|
-
|
|
5723
|
+
if (key in context.provides) {
|
|
5724
|
+
if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
|
|
5725
|
+
else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
|
|
5726
|
+
}
|
|
5610
5727
|
context.provides[key] = value;
|
|
5611
5728
|
return app;
|
|
5612
5729
|
},
|
|
@@ -5713,12 +5830,14 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
|
|
|
5713
5830
|
if (instance.isUnmounted) return;
|
|
5714
5831
|
{
|
|
5715
5832
|
const { emitsOptions, propsOptions } = instance;
|
|
5716
|
-
if (emitsOptions)
|
|
5717
|
-
if (!
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
if (
|
|
5833
|
+
if (emitsOptions) {
|
|
5834
|
+
if (!(event in emitsOptions) && true) {
|
|
5835
|
+
if (!propsOptions || !propsOptions[0] || !(toHandlerKey(camelize(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`);
|
|
5836
|
+
} else {
|
|
5837
|
+
const validator = emitsOptions[event];
|
|
5838
|
+
if (isFunction(validator)) {
|
|
5839
|
+
if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
5840
|
+
}
|
|
5722
5841
|
}
|
|
5723
5842
|
}
|
|
5724
5843
|
}
|
|
@@ -5727,7 +5846,7 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
|
|
|
5727
5846
|
const modifiers = isModelListener && getModelModifiers(props, event.slice(7), getter);
|
|
5728
5847
|
if (modifiers) {
|
|
5729
5848
|
if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
5730
|
-
if (modifiers.number) args =
|
|
5849
|
+
if (modifiers.number) args = args.map(looseToNumber);
|
|
5731
5850
|
}
|
|
5732
5851
|
devtoolsComponentEmit(instance, event, args);
|
|
5733
5852
|
{
|
|
@@ -5907,10 +6026,12 @@ function filterSingleRoot(children, recurse = true) {
|
|
|
5907
6026
|
for (let i = 0; i < children.length; i++) {
|
|
5908
6027
|
const child = children[i];
|
|
5909
6028
|
if (isVNode(child)) {
|
|
5910
|
-
if (child.type !== Comment || child.children === "v-if")
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
6029
|
+
if (child.type !== Comment || child.children === "v-if") {
|
|
6030
|
+
if (singleRoot) return;
|
|
6031
|
+
else {
|
|
6032
|
+
singleRoot = child;
|
|
6033
|
+
if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
|
|
6034
|
+
}
|
|
5914
6035
|
}
|
|
5915
6036
|
} else return;
|
|
5916
6037
|
}
|
|
@@ -6031,16 +6152,17 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
6031
6152
|
let key = propsToUpdate[i];
|
|
6032
6153
|
if (isEmitListener(instance.emitsOptions, key)) continue;
|
|
6033
6154
|
const value = rawProps[key];
|
|
6034
|
-
if (options)
|
|
6035
|
-
if (
|
|
6036
|
-
attrs[key]
|
|
6037
|
-
|
|
6155
|
+
if (options) {
|
|
6156
|
+
if (hasOwn(attrs, key)) {
|
|
6157
|
+
if (value !== attrs[key]) {
|
|
6158
|
+
attrs[key] = value;
|
|
6159
|
+
hasAttrsChanged = true;
|
|
6160
|
+
}
|
|
6161
|
+
} else {
|
|
6162
|
+
const camelizedKey = camelize(key);
|
|
6163
|
+
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
6038
6164
|
}
|
|
6039
|
-
} else {
|
|
6040
|
-
const camelizedKey = camelize(key);
|
|
6041
|
-
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
6042
|
-
}
|
|
6043
|
-
else if (value !== attrs[key]) {
|
|
6165
|
+
} else if (value !== attrs[key]) {
|
|
6044
6166
|
attrs[key] = value;
|
|
6045
6167
|
hasAttrsChanged = true;
|
|
6046
6168
|
}
|
|
@@ -6049,9 +6171,11 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
6049
6171
|
} else {
|
|
6050
6172
|
if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
|
|
6051
6173
|
let kebabKey;
|
|
6052
|
-
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))
|
|
6053
|
-
if (
|
|
6054
|
-
|
|
6174
|
+
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
|
|
6175
|
+
if (options) {
|
|
6176
|
+
if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
|
|
6177
|
+
} else delete props[key];
|
|
6178
|
+
}
|
|
6055
6179
|
if (attrs !== rawCurrentProps) {
|
|
6056
6180
|
for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {
|
|
6057
6181
|
delete attrs[key];
|
|
@@ -6070,9 +6194,10 @@ function setFullProps(instance, rawProps, props, attrs) {
|
|
|
6070
6194
|
if (isReservedProp(key)) continue;
|
|
6071
6195
|
const value = rawProps[key];
|
|
6072
6196
|
let camelKey;
|
|
6073
|
-
if (options && hasOwn(options, camelKey = camelize(key)))
|
|
6074
|
-
|
|
6075
|
-
|
|
6197
|
+
if (options && hasOwn(options, camelKey = camelize(key))) {
|
|
6198
|
+
if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
|
|
6199
|
+
else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
6200
|
+
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
6076
6201
|
if (!(key in attrs) || value !== attrs[key]) {
|
|
6077
6202
|
attrs[key] = value;
|
|
6078
6203
|
hasAttrsChanged = true;
|
|
@@ -6235,7 +6360,7 @@ function validateProp(key, value, propOptions, resolvedProps, isAbsent) {
|
|
|
6235
6360
|
}
|
|
6236
6361
|
if (validator && !validator(value, /* @__PURE__ */ shallowReadonly(resolvedProps))) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
|
|
6237
6362
|
}
|
|
6238
|
-
const isSimpleType =
|
|
6363
|
+
const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
|
|
6239
6364
|
/**
|
|
6240
6365
|
* dev only
|
|
6241
6366
|
*/
|
|
@@ -6348,12 +6473,13 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
6348
6473
|
let deletionComparisonTarget = EMPTY_OBJ;
|
|
6349
6474
|
if (vnode.shapeFlag & 32) {
|
|
6350
6475
|
const type = children._;
|
|
6351
|
-
if (type)
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6476
|
+
if (type) {
|
|
6477
|
+
if (isHmrUpdating) {
|
|
6478
|
+
assignSlots(slots, children, optimized);
|
|
6479
|
+
trigger(instance, "set", "$slots");
|
|
6480
|
+
} else if (optimized && type === 1) needDeletionCheck = false;
|
|
6481
|
+
else assignSlots(slots, children, optimized);
|
|
6482
|
+
} else {
|
|
6357
6483
|
needDeletionCheck = !children.$stable;
|
|
6358
6484
|
normalizeObjectSlots(children, slots, instance);
|
|
6359
6485
|
}
|
|
@@ -6371,7 +6497,7 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
6371
6497
|
let supported;
|
|
6372
6498
|
let perf;
|
|
6373
6499
|
let cachedNow$1 = 0;
|
|
6374
|
-
const p$1 =
|
|
6500
|
+
const p$1 = /*@__PURE__*/ Promise.resolve();
|
|
6375
6501
|
const getNow$1 = () => cachedNow$1 || (p$1.then(() => cachedNow$1 = 0), cachedNow$1 = isSupported() ? perf.now() : Date.now());
|
|
6376
6502
|
/**
|
|
6377
6503
|
* @internal
|
|
@@ -6587,7 +6713,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6587
6713
|
for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
|
|
6588
6714
|
};
|
|
6589
6715
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
6590
|
-
for (let i = start; i < children.length; i++)
|
|
6716
|
+
for (let i = start; i < children.length; i++) {
|
|
6717
|
+
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
6718
|
+
patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6719
|
+
}
|
|
6591
6720
|
};
|
|
6592
6721
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6593
6722
|
const el = n2.el = n1.el;
|
|
@@ -6599,6 +6728,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6599
6728
|
let vnodeHook;
|
|
6600
6729
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
6601
6730
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6731
|
+
if (n2.ibu) n2.ibu();
|
|
6602
6732
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6603
6733
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
6604
6734
|
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -6632,8 +6762,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6632
6762
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
6633
6763
|
}
|
|
6634
6764
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
6635
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
|
|
6765
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
6636
6766
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6767
|
+
n2.iu && n2.iu();
|
|
6637
6768
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6638
6769
|
}, void 0, parentSuspense);
|
|
6639
6770
|
};
|
|
@@ -6641,7 +6772,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6641
6772
|
for (let i = 0; i < newChildren.length; i++) {
|
|
6642
6773
|
const oldVNode = oldChildren[i];
|
|
6643
6774
|
const newVNode = newChildren[i];
|
|
6644
|
-
|
|
6775
|
+
const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
|
|
6776
|
+
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
6645
6777
|
}
|
|
6646
6778
|
};
|
|
6647
6779
|
const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
|
|
@@ -6679,41 +6811,46 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6679
6811
|
};
|
|
6680
6812
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6681
6813
|
n2.slotScopeIds = slotScopeIds;
|
|
6682
|
-
if (n2.type.__vapor)
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6814
|
+
if (n2.type.__vapor) {
|
|
6815
|
+
if (n1 == null) {
|
|
6816
|
+
if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
6817
|
+
else {
|
|
6818
|
+
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
6819
|
+
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
6820
|
+
if (n2.dirs) {
|
|
6821
|
+
invokeDirectiveHook(n2, null, parentComponent, "created");
|
|
6822
|
+
invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
|
|
6823
|
+
}
|
|
6824
|
+
}, () => {
|
|
6825
|
+
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
|
|
6826
|
+
});
|
|
6827
|
+
if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
6828
|
+
const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
|
|
6829
|
+
if (vnodeMountedHook) {
|
|
6830
|
+
const scopedVNode = n2;
|
|
6831
|
+
queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
|
|
6832
|
+
}
|
|
6689
6833
|
}
|
|
6690
|
-
}
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6834
|
+
} else {
|
|
6835
|
+
const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
|
|
6836
|
+
getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
|
|
6837
|
+
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6838
|
+
}, () => {
|
|
6839
|
+
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
6840
|
+
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
6841
|
+
if (n2.ibu) n2.ibu();
|
|
6842
|
+
});
|
|
6843
|
+
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
6844
|
+
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs || n2.iu)) queuePostRenderEffect(() => {
|
|
6845
|
+
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6846
|
+
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
6847
|
+
n2.iu && n2.iu();
|
|
6848
|
+
}, void 0, parentSuspense);
|
|
6698
6849
|
}
|
|
6699
|
-
}
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6704
|
-
}, () => {
|
|
6705
|
-
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
6706
|
-
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
6707
|
-
});
|
|
6708
|
-
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
6709
|
-
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
|
|
6710
|
-
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6711
|
-
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
6712
|
-
}, void 0, parentSuspense);
|
|
6713
|
-
}
|
|
6714
|
-
else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
6715
|
-
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
6716
|
-
else updateComponent(n1, n2, optimized);
|
|
6850
|
+
} else if (n1 == null) {
|
|
6851
|
+
if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
6852
|
+
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
6853
|
+
} else updateComponent(n1, n2, optimized);
|
|
6717
6854
|
};
|
|
6718
6855
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
|
|
6719
6856
|
const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
|
|
@@ -6754,16 +6891,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6754
6891
|
};
|
|
6755
6892
|
const updateComponent = (n1, n2, optimized) => {
|
|
6756
6893
|
const instance = n2.component = n1.component;
|
|
6757
|
-
if (shouldUpdateComponent(n1, n2, optimized))
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6894
|
+
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
6895
|
+
if (instance.asyncDep && !instance.asyncResolved) {
|
|
6896
|
+
pushWarningContext(n2);
|
|
6897
|
+
updateComponentPreRender(instance, n2, optimized);
|
|
6898
|
+
popWarningContext();
|
|
6899
|
+
return;
|
|
6900
|
+
} else {
|
|
6901
|
+
instance.next = n2;
|
|
6902
|
+
instance.effect.run();
|
|
6903
|
+
}
|
|
6762
6904
|
} else {
|
|
6763
|
-
instance.next = n2;
|
|
6764
|
-
instance.effect.run();
|
|
6765
|
-
}
|
|
6766
|
-
else {
|
|
6767
6905
|
n2.el = n1.el;
|
|
6768
6906
|
instance.vnode = n2;
|
|
6769
6907
|
}
|
|
@@ -6861,6 +6999,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6861
6999
|
} else next = vnode;
|
|
6862
7000
|
if (bu) invokeArrayFns(bu);
|
|
6863
7001
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
7002
|
+
if (next.ibu) next.ibu();
|
|
6864
7003
|
toggleRecurse(instance, true);
|
|
6865
7004
|
startMeasure(instance, `render`);
|
|
6866
7005
|
const nextTree = renderComponentRoot(instance);
|
|
@@ -6873,7 +7012,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6873
7012
|
next.el = nextTree.el;
|
|
6874
7013
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
6875
7014
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
6876
|
-
if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() =>
|
|
7015
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
7016
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
7017
|
+
next.iu && next.iu();
|
|
7018
|
+
}, void 0, parentSuspense);
|
|
6877
7019
|
devtoolsComponentUpdated(instance);
|
|
6878
7020
|
popWarningContext();
|
|
6879
7021
|
}
|
|
@@ -6913,9 +7055,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6913
7055
|
if (shapeFlag & 8) {
|
|
6914
7056
|
if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
|
|
6915
7057
|
if (c2 !== c1) hostSetElementText(container, c2);
|
|
6916
|
-
} else if (prevShapeFlag & 16)
|
|
6917
|
-
|
|
6918
|
-
|
|
7058
|
+
} else if (prevShapeFlag & 16) {
|
|
7059
|
+
if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
7060
|
+
else unmountChildren(c1, parentComponent, parentSuspense, true);
|
|
7061
|
+
} else {
|
|
6919
7062
|
if (prevShapeFlag & 8) hostSetElementText(container, "");
|
|
6920
7063
|
if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6921
7064
|
}
|
|
@@ -7014,8 +7157,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7014
7157
|
const anchorVNode = c2[nextIndex + 1];
|
|
7015
7158
|
const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
|
|
7016
7159
|
if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
7017
|
-
else if (moved)
|
|
7018
|
-
|
|
7160
|
+
else if (moved) {
|
|
7161
|
+
if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
|
|
7162
|
+
else j--;
|
|
7163
|
+
}
|
|
7019
7164
|
}
|
|
7020
7165
|
}
|
|
7021
7166
|
};
|
|
@@ -7047,26 +7192,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7047
7192
|
moveStaticNode(vnode, container, anchor);
|
|
7048
7193
|
return;
|
|
7049
7194
|
}
|
|
7050
|
-
if (moveType !== 2 && shapeFlag & 1 && transition)
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
const remove = () => {
|
|
7195
|
+
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
7196
|
+
if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
|
|
7197
|
+
else performTransitionLeave(el, transition, () => {
|
|
7054
7198
|
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
7055
7199
|
else hostInsert(el, container, anchor);
|
|
7056
|
-
};
|
|
7057
|
-
|
|
7058
|
-
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
7059
|
-
if (el._isLeaving) el[leaveCbKey](true);
|
|
7060
|
-
if (transition.persisted && !wasLeaving) remove();
|
|
7061
|
-
else leave(el, () => {
|
|
7062
|
-
remove();
|
|
7063
|
-
afterLeave && afterLeave();
|
|
7064
|
-
});
|
|
7065
|
-
};
|
|
7066
|
-
if (delayLeave) delayLeave(el, remove, performLeave);
|
|
7067
|
-
else performLeave();
|
|
7068
|
-
}
|
|
7069
|
-
else hostInsert(el, container, anchor);
|
|
7200
|
+
}, true, true);
|
|
7201
|
+
} else hostInsert(el, container, anchor);
|
|
7070
7202
|
};
|
|
7071
7203
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
7072
7204
|
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
|
|
@@ -7086,16 +7218,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7086
7218
|
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
7087
7219
|
let vnodeHook;
|
|
7088
7220
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7089
|
-
if (shapeFlag & 6)
|
|
7090
|
-
if (
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7221
|
+
if (shapeFlag & 6) {
|
|
7222
|
+
if (isVaporComponent(type)) {
|
|
7223
|
+
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
7224
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7225
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
7226
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
7227
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7228
|
+
}, void 0, parentSuspense);
|
|
7229
|
+
return;
|
|
7230
|
+
} else unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
7231
|
+
} else {
|
|
7099
7232
|
if (shapeFlag & 128) {
|
|
7100
7233
|
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
7101
7234
|
return;
|
|
@@ -7227,12 +7360,14 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
|
7227
7360
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
7228
7361
|
}
|
|
7229
7362
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
7230
|
-
if (!vapor)
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7363
|
+
if (!vapor) {
|
|
7364
|
+
if (allowed) {
|
|
7365
|
+
effect.flags |= 128;
|
|
7366
|
+
job.flags |= 2;
|
|
7367
|
+
} else {
|
|
7368
|
+
effect.flags &= -129;
|
|
7369
|
+
job.flags &= -3;
|
|
7370
|
+
}
|
|
7236
7371
|
}
|
|
7237
7372
|
}
|
|
7238
7373
|
function needTransition(parentSuspense, transition) {
|
|
@@ -7272,8 +7407,10 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
7272
7407
|
}
|
|
7273
7408
|
function locateNonHydratedAsyncRoot(instance) {
|
|
7274
7409
|
const subComponent = instance.subTree && instance.subTree.component;
|
|
7275
|
-
if (subComponent)
|
|
7276
|
-
|
|
7410
|
+
if (subComponent) {
|
|
7411
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
7412
|
+
else return locateNonHydratedAsyncRoot(subComponent);
|
|
7413
|
+
}
|
|
7277
7414
|
}
|
|
7278
7415
|
function invalidateMount(hooks) {
|
|
7279
7416
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
@@ -7292,13 +7429,15 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
|
|
|
7292
7429
|
function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
|
|
7293
7430
|
const performRemove = () => {
|
|
7294
7431
|
remove();
|
|
7295
|
-
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
7432
|
+
if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
|
|
7296
7433
|
};
|
|
7297
7434
|
if (force || isElement && transition && !transition.persisted) {
|
|
7298
7435
|
const { leave, delayLeave } = transition;
|
|
7299
7436
|
const performLeave = () => {
|
|
7437
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
7300
7438
|
if (el._isLeaving && force) el[leaveCbKey](true);
|
|
7301
|
-
|
|
7439
|
+
if (force && transition.persisted && !wasLeaving) remove();
|
|
7440
|
+
else leave(el, performRemove);
|
|
7302
7441
|
};
|
|
7303
7442
|
if (delayLeave) delayLeave(el, performRemove, performLeave);
|
|
7304
7443
|
else performLeave();
|
|
@@ -7394,7 +7533,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
7394
7533
|
patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
7395
7534
|
if (suspense.deps <= 0) suspense.resolve();
|
|
7396
7535
|
else if (isInFallback) {
|
|
7397
|
-
if (!isHydrating) {
|
|
7536
|
+
if (!isHydrating && !suspense.isFallbackMountPending) {
|
|
7398
7537
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7399
7538
|
setActiveBranch(suspense, newFallback);
|
|
7400
7539
|
}
|
|
@@ -7415,7 +7554,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
7415
7554
|
if (isInFallback) {
|
|
7416
7555
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
7417
7556
|
if (suspense.deps <= 0) suspense.resolve();
|
|
7418
|
-
else {
|
|
7557
|
+
else if (!suspense.isFallbackMountPending) {
|
|
7419
7558
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7420
7559
|
setActiveBranch(suspense, newFallback);
|
|
7421
7560
|
}
|
|
@@ -7541,8 +7680,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
7541
7680
|
const mountFallback = () => {
|
|
7542
7681
|
suspense.isFallbackMountPending = false;
|
|
7543
7682
|
if (!suspense.isInFallback) return;
|
|
7544
|
-
|
|
7545
|
-
|
|
7683
|
+
const latestFallback = suspense.vnode.ssFallback;
|
|
7684
|
+
patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7685
|
+
setActiveBranch(suspense, latestFallback);
|
|
7546
7686
|
};
|
|
7547
7687
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
7548
7688
|
if (delayEnter) {
|
|
@@ -7618,9 +7758,10 @@ function normalizeSuspenseSlot(s) {
|
|
|
7618
7758
|
return s;
|
|
7619
7759
|
}
|
|
7620
7760
|
function queueEffectWithSuspense(fn, id, suspense) {
|
|
7621
|
-
if (suspense && suspense.pendingBranch)
|
|
7622
|
-
|
|
7623
|
-
|
|
7761
|
+
if (suspense && suspense.pendingBranch) {
|
|
7762
|
+
if (isArray(fn)) suspense.effects.push(...fn);
|
|
7763
|
+
else suspense.effects.push(fn);
|
|
7764
|
+
} else queuePostFlushCb(fn, id);
|
|
7624
7765
|
}
|
|
7625
7766
|
function setActiveBranch(suspense, branch) {
|
|
7626
7767
|
suspense.activeBranch = branch;
|
|
@@ -7814,8 +7955,10 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
7814
7955
|
if (isVNode(type)) {
|
|
7815
7956
|
const cloned = cloneVNode(type, props, true);
|
|
7816
7957
|
if (children) normalizeChildren(cloned, children);
|
|
7817
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock)
|
|
7818
|
-
|
|
7958
|
+
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
|
|
7959
|
+
if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
7960
|
+
else currentBlock.push(cloned);
|
|
7961
|
+
}
|
|
7819
7962
|
cloned.patchFlag = -2;
|
|
7820
7963
|
return cloned;
|
|
7821
7964
|
}
|
|
@@ -7875,7 +8018,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
7875
8018
|
ce: vnode.ce,
|
|
7876
8019
|
vi: vnode.vi,
|
|
7877
8020
|
vs: cloneVaporSlotMeta(vnode),
|
|
7878
|
-
vb: vnode.vb
|
|
8021
|
+
vb: vnode.vb,
|
|
8022
|
+
ibu: vnode.ibu,
|
|
8023
|
+
iu: vnode.iu
|
|
7879
8024
|
};
|
|
7880
8025
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
7881
8026
|
return cloned;
|
|
@@ -7938,25 +8083,28 @@ function normalizeChildren(vnode, children) {
|
|
|
7938
8083
|
const { shapeFlag } = vnode;
|
|
7939
8084
|
if (children == null) children = null;
|
|
7940
8085
|
else if (isArray(children)) type = 16;
|
|
7941
|
-
else if (typeof children === "object")
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
8086
|
+
else if (typeof children === "object") {
|
|
8087
|
+
if (shapeFlag & 65) {
|
|
8088
|
+
const slot = children.default;
|
|
8089
|
+
if (slot) {
|
|
8090
|
+
slot._c && (slot._d = false);
|
|
8091
|
+
normalizeChildren(vnode, slot());
|
|
8092
|
+
slot._c && (slot._d = true);
|
|
8093
|
+
}
|
|
8094
|
+
return;
|
|
8095
|
+
} else {
|
|
8096
|
+
type = 32;
|
|
8097
|
+
const slotFlag = children._;
|
|
8098
|
+
if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
|
|
8099
|
+
else if (slotFlag === 3 && currentRenderingInstance) {
|
|
8100
|
+
if (currentRenderingInstance.slots._ === 1) children._ = 1;
|
|
8101
|
+
else {
|
|
8102
|
+
children._ = 2;
|
|
8103
|
+
vnode.patchFlag |= 1024;
|
|
8104
|
+
}
|
|
8105
|
+
}
|
|
7957
8106
|
}
|
|
7958
|
-
}
|
|
7959
|
-
else if (isFunction(children)) {
|
|
8107
|
+
} else if (isFunction(children)) {
|
|
7960
8108
|
if (shapeFlag & 65) {
|
|
7961
8109
|
normalizeChildren(vnode, { default: children });
|
|
7962
8110
|
return;
|
|
@@ -8065,7 +8213,7 @@ const useInstanceOption = (key, silent = false) => {
|
|
|
8065
8213
|
};
|
|
8066
8214
|
//#endregion
|
|
8067
8215
|
//#region packages/runtime-core/src/component.ts
|
|
8068
|
-
const emptyAppContext =
|
|
8216
|
+
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
8069
8217
|
let uid = 0;
|
|
8070
8218
|
function createComponentInstance(vnode, parent, suspense) {
|
|
8071
8219
|
const type = vnode.type;
|
|
@@ -8262,10 +8410,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
8262
8410
|
restoreCurrentInstance(prevInstance);
|
|
8263
8411
|
}
|
|
8264
8412
|
}
|
|
8265
|
-
if (!Component.render && instance.render === NOOP && !isSSR)
|
|
8413
|
+
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
8414
|
+
if (!compile && Component.template)
|
|
8266
8415
|
/* v8 ignore start */
|
|
8267
|
-
|
|
8268
|
-
|
|
8416
|
+
warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Use \"vue.esm-browser.js\" instead.");
|
|
8417
|
+
else warn$1(`Component is missing template or render function: `, Component);
|
|
8418
|
+
}
|
|
8269
8419
|
}
|
|
8270
8420
|
const attrsProxyHandlers = {
|
|
8271
8421
|
get(target, key) {
|
|
@@ -8373,11 +8523,12 @@ function h(type, propsOrChildren, children) {
|
|
|
8373
8523
|
try {
|
|
8374
8524
|
setBlockTracking(-1);
|
|
8375
8525
|
const l = arguments.length;
|
|
8376
|
-
if (l === 2)
|
|
8377
|
-
if (
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8526
|
+
if (l === 2) {
|
|
8527
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
8528
|
+
if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
|
|
8529
|
+
return createVNode(type, propsOrChildren);
|
|
8530
|
+
} else return createVNode(type, null, propsOrChildren);
|
|
8531
|
+
} else {
|
|
8381
8532
|
if (l > 3) children = Array.prototype.slice.call(arguments, 2);
|
|
8382
8533
|
else if (l === 3 && isVNode(children)) children = [children];
|
|
8383
8534
|
return createVNode(type, propsOrChildren, children);
|
|
@@ -8569,7 +8720,7 @@ function isMemoSame(cached, memo) {
|
|
|
8569
8720
|
}
|
|
8570
8721
|
//#endregion
|
|
8571
8722
|
//#region packages/runtime-core/src/index.ts
|
|
8572
|
-
const version = "3.6.0-rc.
|
|
8723
|
+
const version = "3.6.0-rc.7";
|
|
8573
8724
|
const warn = warn$1;
|
|
8574
8725
|
/**
|
|
8575
8726
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -8597,7 +8748,7 @@ const DeprecationTypes = null;
|
|
|
8597
8748
|
let policy = void 0;
|
|
8598
8749
|
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
8599
8750
|
if (tt) try {
|
|
8600
|
-
policy =
|
|
8751
|
+
policy = /*@__PURE__*/ tt.createPolicy("vue", { createHTML: (val) => val });
|
|
8601
8752
|
} catch (e) {
|
|
8602
8753
|
warn(`Error creating trusted types policy: ${e}`);
|
|
8603
8754
|
}
|
|
@@ -8605,7 +8756,7 @@ const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) =>
|
|
|
8605
8756
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
8606
8757
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
8607
8758
|
const doc = typeof document !== "undefined" ? document : null;
|
|
8608
|
-
const templateContainer = doc &&
|
|
8759
|
+
const templateContainer = doc && /*@__PURE__*/ doc.createElement("template");
|
|
8609
8760
|
const nodeOps = {
|
|
8610
8761
|
insert: (child, parent, anchor) => {
|
|
8611
8762
|
parent.insertBefore(child, anchor || null);
|
|
@@ -8679,7 +8830,7 @@ const DOMTransitionPropsValidators = {
|
|
|
8679
8830
|
leaveActiveClass: String,
|
|
8680
8831
|
leaveToClass: String
|
|
8681
8832
|
};
|
|
8682
|
-
const TransitionPropsValidators =
|
|
8833
|
+
const TransitionPropsValidators = /*@__PURE__*/ extend({}, BaseTransitionPropsValidators, DOMTransitionPropsValidators);
|
|
8683
8834
|
/**
|
|
8684
8835
|
* Wrap logic that attaches extra properties to Transition in a function
|
|
8685
8836
|
* so that it can be annotated as pure
|
|
@@ -8693,7 +8844,7 @@ const decorate$1 = (t) => {
|
|
|
8693
8844
|
* DOM Transition is a higher-order-component based on the platform-agnostic
|
|
8694
8845
|
* base Transition component, with DOM-specific logic.
|
|
8695
8846
|
*/
|
|
8696
|
-
const Transition =
|
|
8847
|
+
const Transition = /*@__PURE__*/ decorate$1((props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots));
|
|
8697
8848
|
/**
|
|
8698
8849
|
* #3227 Incoming hooks may be merged into arrays when wrapping Transition
|
|
8699
8850
|
* with custom HOCs.
|
|
@@ -8915,14 +9066,15 @@ const vShow = {
|
|
|
8915
9066
|
},
|
|
8916
9067
|
updated(el, { value, oldValue }, { transition }) {
|
|
8917
9068
|
if (!value === !oldValue) return;
|
|
8918
|
-
if (transition)
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
9069
|
+
if (transition) {
|
|
9070
|
+
if (value) {
|
|
9071
|
+
transition.beforeEnter(el);
|
|
9072
|
+
setDisplay(el, true);
|
|
9073
|
+
transition.enter(el);
|
|
9074
|
+
} else transition.leave(el, () => {
|
|
9075
|
+
setDisplay(el, false);
|
|
9076
|
+
});
|
|
9077
|
+
} else setDisplay(el, value);
|
|
8926
9078
|
},
|
|
8927
9079
|
beforeUnmount(el, { value }) {
|
|
8928
9080
|
setDisplay(el, value);
|
|
@@ -9024,11 +9176,13 @@ function patchStyle(el, prev, next) {
|
|
|
9024
9176
|
const isCssString = isString(next);
|
|
9025
9177
|
let hasControlledDisplay = false;
|
|
9026
9178
|
if (next && !isCssString) {
|
|
9027
|
-
if (prev)
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9179
|
+
if (prev) {
|
|
9180
|
+
if (!isString(prev)) {
|
|
9181
|
+
for (const key in prev) if (next[key] == null) setStyle(style, key, "");
|
|
9182
|
+
} else for (const prevStyle of prev.split(";")) {
|
|
9183
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
9184
|
+
if (next[key] == null) setStyle(style, key, "");
|
|
9185
|
+
}
|
|
9032
9186
|
}
|
|
9033
9187
|
for (const key in next) {
|
|
9034
9188
|
if (key === "display") hasControlledDisplay = true;
|
|
@@ -9057,8 +9211,10 @@ function setStyle(style, name, rawVal) {
|
|
|
9057
9211
|
else {
|
|
9058
9212
|
const val = rawVal == null ? "" : String(rawVal);
|
|
9059
9213
|
if (semicolonRE.test(val)) warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
9060
|
-
if (name.startsWith("--"))
|
|
9061
|
-
|
|
9214
|
+
if (name.startsWith("--")) {
|
|
9215
|
+
if (importantRE.test(val)) style.setProperty(name, val.replace(importantRE, ""), "important");
|
|
9216
|
+
else style.setProperty(name, val);
|
|
9217
|
+
} else {
|
|
9062
9218
|
const prefixed = autoPrefix(style, name);
|
|
9063
9219
|
if (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
|
|
9064
9220
|
else style[prefixed] = val;
|
|
@@ -9095,9 +9251,10 @@ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
|
|
|
9095
9251
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
9096
9252
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
9097
9253
|
function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
|
|
9098
|
-
if (isSVG && key.startsWith("xlink:"))
|
|
9099
|
-
|
|
9100
|
-
|
|
9254
|
+
if (isSVG && key.startsWith("xlink:")) {
|
|
9255
|
+
if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
9256
|
+
else el.setAttributeNS(xlinkNS, key, value);
|
|
9257
|
+
} else if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
|
|
9101
9258
|
else el.setAttribute(key, isBoolean ? "" : isSymbol(value) ? String(value) : value);
|
|
9102
9259
|
}
|
|
9103
9260
|
//#endregion
|
|
@@ -9170,7 +9327,7 @@ function parseEventName(name) {
|
|
|
9170
9327
|
return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
|
|
9171
9328
|
}
|
|
9172
9329
|
let cachedNow = 0;
|
|
9173
|
-
const p =
|
|
9330
|
+
const p = /*@__PURE__*/ Promise.resolve();
|
|
9174
9331
|
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
9175
9332
|
function createInvoker(initialValue, instance) {
|
|
9176
9333
|
const invoker = (e) => {
|
|
@@ -9238,7 +9395,7 @@ function shouldSetAsPropForVueCE(el, key) {
|
|
|
9238
9395
|
//#endregion
|
|
9239
9396
|
//#region packages/runtime-dom/src/apiCustomElement.ts
|
|
9240
9397
|
const REMOVAL = {};
|
|
9241
|
-
|
|
9398
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
9242
9399
|
function defineCustomElement(options, extraOptions, _createApp) {
|
|
9243
9400
|
let Comp = /* @__PURE__ */ defineComponent(options, extraOptions);
|
|
9244
9401
|
if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
|
|
@@ -9287,12 +9444,14 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
9287
9444
|
this._parent = parent;
|
|
9288
9445
|
break;
|
|
9289
9446
|
}
|
|
9290
|
-
if (!this._instance)
|
|
9291
|
-
|
|
9292
|
-
this._pendingResolve =
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9447
|
+
if (!this._instance) {
|
|
9448
|
+
if (this._resolved) this._mountComponent(this._def);
|
|
9449
|
+
else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
|
|
9450
|
+
this._pendingResolve = void 0;
|
|
9451
|
+
if (this.isConnected) return this._resolveDef();
|
|
9452
|
+
});
|
|
9453
|
+
else this._resolveDef();
|
|
9454
|
+
}
|
|
9296
9455
|
}
|
|
9297
9456
|
disconnectedCallback() {
|
|
9298
9457
|
this._connected = false;
|
|
@@ -9508,13 +9667,11 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
9508
9667
|
_renderSlots() {
|
|
9509
9668
|
const outlets = this._getSlots();
|
|
9510
9669
|
const scopeId = this._instance.type.__scopeId;
|
|
9511
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
9512
9670
|
for (let i = 0; i < outlets.length; i++) {
|
|
9513
9671
|
const o = outlets[i];
|
|
9514
9672
|
const slotName = o.getAttribute("name") || "default";
|
|
9515
9673
|
const content = this._slots[slotName];
|
|
9516
9674
|
const parent = o.parentNode;
|
|
9517
|
-
const replacementNodes = [];
|
|
9518
9675
|
if (content) for (const n of content) {
|
|
9519
9676
|
if (scopeId && n.nodeType === 1) {
|
|
9520
9677
|
const id = scopeId + "-s";
|
|
@@ -9524,20 +9681,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
9524
9681
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
9525
9682
|
}
|
|
9526
9683
|
parent.insertBefore(n, o);
|
|
9527
|
-
replacementNodes.push(n);
|
|
9528
|
-
}
|
|
9529
|
-
else while (o.firstChild) {
|
|
9530
|
-
const child = o.firstChild;
|
|
9531
|
-
parent.insertBefore(child, o);
|
|
9532
|
-
replacementNodes.push(child);
|
|
9533
9684
|
}
|
|
9685
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
9534
9686
|
parent.removeChild(o);
|
|
9535
|
-
slotReplacements.set(o, {
|
|
9536
|
-
nodes: replacementNodes,
|
|
9537
|
-
usedFallback: !content
|
|
9538
|
-
});
|
|
9539
9687
|
}
|
|
9540
|
-
this._updateSlotNodes(slotReplacements);
|
|
9541
9688
|
}
|
|
9542
9689
|
/**
|
|
9543
9690
|
* @internal
|
|
@@ -9576,7 +9723,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
9576
9723
|
* @internal
|
|
9577
9724
|
*/
|
|
9578
9725
|
_hasShadowRoot() {
|
|
9579
|
-
return this.
|
|
9726
|
+
return this._root !== this;
|
|
9580
9727
|
}
|
|
9581
9728
|
/**
|
|
9582
9729
|
* @internal
|
|
@@ -9621,10 +9768,6 @@ var VueElement = class extends VueElementBase {
|
|
|
9621
9768
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
9622
9769
|
this._app = this._instance = null;
|
|
9623
9770
|
}
|
|
9624
|
-
/**
|
|
9625
|
-
* Only called when shadowRoot is false
|
|
9626
|
-
*/
|
|
9627
|
-
_updateSlotNodes(replacements) {}
|
|
9628
9771
|
_createVNode() {
|
|
9629
9772
|
const baseProps = {};
|
|
9630
9773
|
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
@@ -9690,7 +9833,7 @@ const decorate = (t) => {
|
|
|
9690
9833
|
};
|
|
9691
9834
|
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
9692
9835
|
name: "TransitionGroup",
|
|
9693
|
-
props:
|
|
9836
|
+
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
9694
9837
|
tag: String,
|
|
9695
9838
|
moveClass: String
|
|
9696
9839
|
}),
|
|
@@ -9971,19 +10114,39 @@ const vModelSelectInit = (el, value, number, set) => {
|
|
|
9971
10114
|
el._modelValue = value;
|
|
9972
10115
|
addEventListener(el, "change", () => {
|
|
9973
10116
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
9974
|
-
|
|
9975
|
-
el.
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
10117
|
+
const multiple = el.multiple;
|
|
10118
|
+
const assignedValue = multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
|
|
10119
|
+
const pending = el._pendingValue = [multiple, multiple ? isArray(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue];
|
|
10120
|
+
try {
|
|
10121
|
+
(set || el[assignKey])(assignedValue);
|
|
10122
|
+
} finally {
|
|
10123
|
+
nextTick(() => {
|
|
10124
|
+
if (el._pendingValue === pending) el._pendingValue = void 0;
|
|
10125
|
+
});
|
|
10126
|
+
}
|
|
9979
10127
|
});
|
|
9980
10128
|
};
|
|
10129
|
+
function isSameSelectValue(value, assignedValue, multiple) {
|
|
10130
|
+
if (!multiple) return looseEqual(value, assignedValue);
|
|
10131
|
+
if (isArray(value)) return looseEqual(value, assignedValue);
|
|
10132
|
+
if (isSet(value)) {
|
|
10133
|
+
if (value.size !== assignedValue.length) return false;
|
|
10134
|
+
for (const item of assignedValue) if (!value.has(item)) return false;
|
|
10135
|
+
return true;
|
|
10136
|
+
}
|
|
10137
|
+
return false;
|
|
10138
|
+
}
|
|
9981
10139
|
/**
|
|
9982
10140
|
* @internal
|
|
9983
10141
|
*/
|
|
9984
10142
|
const vModelSetSelected = (el, value) => {
|
|
9985
10143
|
el._modelValue = value;
|
|
9986
|
-
|
|
10144
|
+
const pending = el._pendingValue;
|
|
10145
|
+
el._pendingValue = void 0;
|
|
10146
|
+
if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
|
|
10147
|
+
setSelected(el, value);
|
|
10148
|
+
};
|
|
10149
|
+
function setSelected(el, value) {
|
|
9987
10150
|
const isMultiple = el.multiple;
|
|
9988
10151
|
const isArrayValue = isArray(value);
|
|
9989
10152
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -9993,18 +10156,19 @@ const vModelSetSelected = (el, value) => {
|
|
|
9993
10156
|
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
9994
10157
|
const option = el.options[i];
|
|
9995
10158
|
const optionValue = getValue(option);
|
|
9996
|
-
if (isMultiple)
|
|
9997
|
-
|
|
9998
|
-
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
|
|
10159
|
+
if (isMultiple) {
|
|
10160
|
+
if (isArrayValue) {
|
|
10161
|
+
const optionType = typeof optionValue;
|
|
10162
|
+
if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
|
|
10163
|
+
else option.selected = looseIndexOf(value, optionValue) > -1;
|
|
10164
|
+
} else option.selected = value.has(optionValue);
|
|
10165
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
10002
10166
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
10003
10167
|
return;
|
|
10004
10168
|
}
|
|
10005
10169
|
}
|
|
10006
10170
|
if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
|
|
10007
|
-
}
|
|
10171
|
+
}
|
|
10008
10172
|
/**
|
|
10009
10173
|
* @internal retrieve raw value set via :value bindings
|
|
10010
10174
|
*/
|
|
@@ -10106,7 +10270,7 @@ const withKeys = (fn, modifiers) => {
|
|
|
10106
10270
|
};
|
|
10107
10271
|
//#endregion
|
|
10108
10272
|
//#region packages/runtime-dom/src/index.ts
|
|
10109
|
-
const rendererOptions =
|
|
10273
|
+
const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
|
|
10110
10274
|
let renderer;
|
|
10111
10275
|
let enabledHydration = false;
|
|
10112
10276
|
function ensureRenderer() {
|