@vue/runtime-dom 3.6.0-rc.4 → 3.6.0-rc.6
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 +75 -46
- package/dist/runtime-dom.cjs.prod.js +75 -46
- package/dist/runtime-dom.d.ts +147 -148
- package/dist/runtime-dom.esm-browser.js +647 -442
- package/dist/runtime-dom.esm-browser.prod.js +4 -4
- package/dist/runtime-dom.esm-bundler.js +89 -56
- package/dist/runtime-dom.global.js +647 -442
- 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.6
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -13,7 +13,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
13
13
|
* \/\*#\_\_PURE\_\_\*\/
|
|
14
14
|
* So that they can be tree-shaken if necessary.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
17
17
|
function makeMap(str) {
|
|
18
18
|
const map = Object.create(null);
|
|
19
19
|
for (const key of str.split(",")) map[key] = 1;
|
|
@@ -57,9 +57,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
57
57
|
};
|
|
58
58
|
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
59
59
|
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
60
|
-
const isReservedProp =
|
|
61
|
-
const isBuiltInTag =
|
|
62
|
-
const isBuiltInDirective =
|
|
60
|
+
const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
|
|
61
|
+
const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
|
|
62
|
+
const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
|
|
63
63
|
const cacheStringFunction = (fn) => {
|
|
64
64
|
const cache = Object.create(null);
|
|
65
65
|
return ((str) => {
|
|
@@ -133,7 +133,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
133
133
|
function canSetValueDirectly(tagName) {
|
|
134
134
|
return tagName !== "PROGRESS" && !tagName.includes("-");
|
|
135
135
|
}
|
|
136
|
-
const isGloballyAllowed =
|
|
136
|
+
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");
|
|
137
137
|
//#endregion
|
|
138
138
|
//#region packages/shared/src/normalizeProp.ts
|
|
139
139
|
function normalizeStyle(value) {
|
|
@@ -201,17 +201,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
201
201
|
* Compiler only.
|
|
202
202
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
203
203
|
*/
|
|
204
|
-
const isHTMLTag =
|
|
204
|
+
const isHTMLTag = /*@__PURE__*/ makeMap(HTML_TAGS);
|
|
205
205
|
/**
|
|
206
206
|
* Compiler only.
|
|
207
207
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
208
208
|
*/
|
|
209
|
-
const isSVGTag =
|
|
209
|
+
const isSVGTag = /*@__PURE__*/ makeMap(SVG_TAGS);
|
|
210
210
|
/**
|
|
211
211
|
* Compiler only.
|
|
212
212
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
213
213
|
*/
|
|
214
|
-
const isMathMLTag =
|
|
214
|
+
const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
|
|
215
215
|
//#endregion
|
|
216
216
|
//#region packages/shared/src/domAttrConfig.ts
|
|
217
217
|
/**
|
|
@@ -226,11 +226,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
226
226
|
* - readonly -> readOnly
|
|
227
227
|
*/
|
|
228
228
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
229
|
-
const isSpecialBooleanAttr =
|
|
229
|
+
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
230
230
|
/**
|
|
231
231
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
232
232
|
*/
|
|
233
|
-
const isBooleanAttr =
|
|
233
|
+
const isBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
|
|
234
234
|
/**
|
|
235
235
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
236
236
|
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
@@ -244,11 +244,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
244
244
|
* Don't also forget to allow `data-*` and `aria-*`!
|
|
245
245
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
|
|
246
246
|
*/
|
|
247
|
-
const isKnownHtmlAttr =
|
|
247
|
+
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");
|
|
248
248
|
/**
|
|
249
249
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
|
|
250
250
|
*/
|
|
251
|
-
const isKnownSvgAttr =
|
|
251
|
+
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");
|
|
252
252
|
/**
|
|
253
253
|
* Shared between server-renderer and runtime-core hydration logic
|
|
254
254
|
*/
|
|
@@ -280,6 +280,21 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
280
280
|
for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
|
|
281
281
|
return equal;
|
|
282
282
|
}
|
|
283
|
+
function looseCompareCollections(a, b) {
|
|
284
|
+
if (a.size !== b.size) return false;
|
|
285
|
+
const candidates = Array.from(b);
|
|
286
|
+
const matched = new Uint8Array(candidates.length);
|
|
287
|
+
for (const item of a) {
|
|
288
|
+
let index = -1;
|
|
289
|
+
for (let i = 0; i < candidates.length; i++) if (!matched[i] && looseEqual(item, candidates[i])) {
|
|
290
|
+
index = i;
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
if (index < 0) return false;
|
|
294
|
+
matched[index] = 1;
|
|
295
|
+
}
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
283
298
|
function looseEqual(a, b) {
|
|
284
299
|
if (a === b) return true;
|
|
285
300
|
let aValidType = isDate(a);
|
|
@@ -295,6 +310,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
295
310
|
bValidType = isObject(b);
|
|
296
311
|
if (aValidType || bValidType) {
|
|
297
312
|
if (!aValidType || !bValidType) return false;
|
|
313
|
+
aValidType = isMap(a);
|
|
314
|
+
bValidType = isMap(b);
|
|
315
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
316
|
+
aValidType = isSet(a);
|
|
317
|
+
bValidType = isSet(b);
|
|
318
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
298
319
|
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
|
299
320
|
for (const key in a) {
|
|
300
321
|
const aHasKey = a.hasOwnProperty(key);
|
|
@@ -741,9 +762,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
741
762
|
if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
742
763
|
}
|
|
743
764
|
break;
|
|
744
|
-
case "set":
|
|
745
|
-
if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
746
|
-
break;
|
|
765
|
+
case "set": if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
747
766
|
}
|
|
748
767
|
}
|
|
749
768
|
}
|
|
@@ -940,8 +959,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
940
959
|
}
|
|
941
960
|
//#endregion
|
|
942
961
|
//#region packages/reactivity/src/baseHandlers.ts
|
|
943
|
-
const isNonTrackableKeys =
|
|
944
|
-
const builtInSymbols = new Set(
|
|
962
|
+
const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
963
|
+
const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
945
964
|
function hasOwnProperty(key) {
|
|
946
965
|
if (!isSymbol(key)) key = String(key);
|
|
947
966
|
const obj = /* @__PURE__ */ toRaw(this);
|
|
@@ -996,12 +1015,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
996
1015
|
oldValue = /* @__PURE__ */ toRaw(oldValue);
|
|
997
1016
|
value = /* @__PURE__ */ toRaw(value);
|
|
998
1017
|
}
|
|
999
|
-
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value))
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1018
|
+
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
|
|
1019
|
+
if (isOldValueReadonly) {
|
|
1020
|
+
warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
|
|
1021
|
+
return true;
|
|
1022
|
+
} else {
|
|
1023
|
+
oldValue.value = value;
|
|
1024
|
+
return true;
|
|
1025
|
+
}
|
|
1005
1026
|
}
|
|
1006
1027
|
}
|
|
1007
1028
|
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
|
|
@@ -1042,10 +1063,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1042
1063
|
return true;
|
|
1043
1064
|
}
|
|
1044
1065
|
};
|
|
1045
|
-
const mutableHandlers =
|
|
1046
|
-
const readonlyHandlers =
|
|
1047
|
-
const shallowReactiveHandlers =
|
|
1048
|
-
const shallowReadonlyHandlers =
|
|
1066
|
+
const mutableHandlers = /*@__PURE__*/ new MutableReactiveHandler();
|
|
1067
|
+
const readonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler();
|
|
1068
|
+
const shallowReactiveHandlers = /*@__PURE__*/ new MutableReactiveHandler(true);
|
|
1069
|
+
const shallowReadonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler(true);
|
|
1049
1070
|
//#endregion
|
|
1050
1071
|
//#region packages/reactivity/src/collectionHandlers.ts
|
|
1051
1072
|
const toShallow = (value) => value;
|
|
@@ -1196,10 +1217,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1196
1217
|
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
|
|
1197
1218
|
};
|
|
1198
1219
|
}
|
|
1199
|
-
const mutableCollectionHandlers = { get:
|
|
1200
|
-
const shallowCollectionHandlers = { get:
|
|
1201
|
-
const readonlyCollectionHandlers = { get:
|
|
1202
|
-
const shallowReadonlyCollectionHandlers = { get:
|
|
1220
|
+
const mutableCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, false) };
|
|
1221
|
+
const shallowCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, true) };
|
|
1222
|
+
const readonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, false) };
|
|
1223
|
+
const shallowReadonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, true) };
|
|
1203
1224
|
function checkIdentityKeys(target, has, key) {
|
|
1204
1225
|
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1205
1226
|
if (rawKey !== key && has.call(target, rawKey)) {
|
|
@@ -1224,7 +1245,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1224
1245
|
default: return 0;
|
|
1225
1246
|
}
|
|
1226
1247
|
}
|
|
1227
|
-
|
|
1248
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1228
1249
|
function reactive(target) {
|
|
1229
1250
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
1230
1251
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
@@ -1259,7 +1280,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1259
1280
|
* @param target - The source object.
|
|
1260
1281
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive}
|
|
1261
1282
|
*/
|
|
1262
|
-
|
|
1283
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1263
1284
|
function shallowReactive(target) {
|
|
1264
1285
|
return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
|
|
1265
1286
|
}
|
|
@@ -1292,7 +1313,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1292
1313
|
* @param target - The source object.
|
|
1293
1314
|
* @see {@link https://vuejs.org/api/reactivity-core.html#readonly}
|
|
1294
1315
|
*/
|
|
1295
|
-
|
|
1316
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1296
1317
|
function readonly(target) {
|
|
1297
1318
|
return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
|
|
1298
1319
|
}
|
|
@@ -1326,7 +1347,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1326
1347
|
* @param target - The source object.
|
|
1327
1348
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly}
|
|
1328
1349
|
*/
|
|
1329
|
-
|
|
1350
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1330
1351
|
function shallowReadonly(target) {
|
|
1331
1352
|
return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
|
|
1332
1353
|
}
|
|
@@ -1363,7 +1384,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1363
1384
|
* @param value - The value to check.
|
|
1364
1385
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive}
|
|
1365
1386
|
*/
|
|
1366
|
-
|
|
1387
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1367
1388
|
function isReactive(value) {
|
|
1368
1389
|
if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
|
|
1369
1390
|
return !!(value && value["__v_isReactive"]);
|
|
@@ -1379,11 +1400,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1379
1400
|
* @param value - The value to check.
|
|
1380
1401
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly}
|
|
1381
1402
|
*/
|
|
1382
|
-
|
|
1403
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1383
1404
|
function isReadonly(value) {
|
|
1384
1405
|
return !!(value && value["__v_isReadonly"]);
|
|
1385
1406
|
}
|
|
1386
|
-
|
|
1407
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1387
1408
|
function isShallow(value) {
|
|
1388
1409
|
return !!(value && value["__v_isShallow"]);
|
|
1389
1410
|
}
|
|
@@ -1394,7 +1415,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1394
1415
|
* @param value - The value to check.
|
|
1395
1416
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy}
|
|
1396
1417
|
*/
|
|
1397
|
-
|
|
1418
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1398
1419
|
function isProxy(value) {
|
|
1399
1420
|
return value ? !!value["__v_raw"] : false;
|
|
1400
1421
|
}
|
|
@@ -1421,7 +1442,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1421
1442
|
* @param observed - The object for which the "raw" value is requested.
|
|
1422
1443
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw}
|
|
1423
1444
|
*/
|
|
1424
|
-
|
|
1445
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1425
1446
|
function toRaw(observed) {
|
|
1426
1447
|
const raw = observed && observed["__v_raw"];
|
|
1427
1448
|
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
@@ -1470,15 +1491,15 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1470
1491
|
const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1471
1492
|
//#endregion
|
|
1472
1493
|
//#region packages/reactivity/src/ref.ts
|
|
1473
|
-
|
|
1494
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1474
1495
|
function isRef(r) {
|
|
1475
1496
|
return r ? r["__v_isRef"] === true : false;
|
|
1476
1497
|
}
|
|
1477
|
-
|
|
1498
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1478
1499
|
function ref(value) {
|
|
1479
1500
|
return createRef(value, toReactive);
|
|
1480
1501
|
}
|
|
1481
|
-
|
|
1502
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1482
1503
|
function shallowRef(value) {
|
|
1483
1504
|
return createRef(value);
|
|
1484
1505
|
}
|
|
@@ -1681,7 +1702,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1681
1702
|
* @param object - Reactive object to be made into an object of linked refs.
|
|
1682
1703
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs}
|
|
1683
1704
|
*/
|
|
1684
|
-
|
|
1705
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1685
1706
|
function toRefs(object) {
|
|
1686
1707
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1687
1708
|
for (const key in object) ret[key] = propertyToRef(object, key);
|
|
@@ -1732,7 +1753,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1732
1753
|
return this._value = this._getter();
|
|
1733
1754
|
}
|
|
1734
1755
|
};
|
|
1735
|
-
|
|
1756
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1736
1757
|
function toRef(source, key, defaultValue) {
|
|
1737
1758
|
if (/* @__PURE__ */ isRef(source)) return source;
|
|
1738
1759
|
else if (isFunction(source)) return new GetterRefImpl(source);
|
|
@@ -1798,10 +1819,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1798
1819
|
get dirty() {
|
|
1799
1820
|
const flags = this.flags;
|
|
1800
1821
|
if (flags & 16) return true;
|
|
1801
|
-
if (flags & 32)
|
|
1802
|
-
this.
|
|
1803
|
-
|
|
1804
|
-
|
|
1822
|
+
if (flags & 32) {
|
|
1823
|
+
if (checkDirty(this.deps, this)) {
|
|
1824
|
+
this.flags = flags | 16;
|
|
1825
|
+
return true;
|
|
1826
|
+
} else this.flags = flags & -33;
|
|
1827
|
+
}
|
|
1805
1828
|
return false;
|
|
1806
1829
|
}
|
|
1807
1830
|
};
|
|
@@ -1980,10 +2003,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1980
2003
|
get _dirty() {
|
|
1981
2004
|
const flags = this.flags;
|
|
1982
2005
|
if (flags & 16) return true;
|
|
1983
|
-
if (flags & 32)
|
|
1984
|
-
this.
|
|
1985
|
-
|
|
1986
|
-
|
|
2006
|
+
if (flags & 32) {
|
|
2007
|
+
if (checkDirty(this.deps, this)) {
|
|
2008
|
+
this.flags = flags | 16;
|
|
2009
|
+
return true;
|
|
2010
|
+
} else this.flags = flags & -33;
|
|
2011
|
+
}
|
|
1987
2012
|
return false;
|
|
1988
2013
|
}
|
|
1989
2014
|
/**
|
|
@@ -2044,7 +2069,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2044
2069
|
}
|
|
2045
2070
|
};
|
|
2046
2071
|
setupOnTrigger(ComputedRefImpl);
|
|
2047
|
-
|
|
2072
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2048
2073
|
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
2049
2074
|
let getter;
|
|
2050
2075
|
let setter;
|
|
@@ -2122,25 +2147,26 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2122
2147
|
else if (isFunction(s)) return call ? call(s, 2) : s();
|
|
2123
2148
|
else warnInvalidSource(s, onWarn);
|
|
2124
2149
|
});
|
|
2125
|
-
} else if (isFunction(source))
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2150
|
+
} else if (isFunction(source)) {
|
|
2151
|
+
if (cb) getter = call ? () => call(source, 2) : source;
|
|
2152
|
+
else getter = () => {
|
|
2153
|
+
if (this.cleanupsLength) {
|
|
2154
|
+
const prevSub = setActiveSub();
|
|
2155
|
+
try {
|
|
2156
|
+
cleanup(this);
|
|
2157
|
+
} finally {
|
|
2158
|
+
setActiveSub(prevSub);
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
const currentEffect = activeWatcher;
|
|
2162
|
+
activeWatcher = this;
|
|
2129
2163
|
try {
|
|
2130
|
-
|
|
2164
|
+
return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
|
|
2131
2165
|
} finally {
|
|
2132
|
-
|
|
2166
|
+
activeWatcher = currentEffect;
|
|
2133
2167
|
}
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
|
-
activeWatcher = this;
|
|
2137
|
-
try {
|
|
2138
|
-
return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
|
|
2139
|
-
} finally {
|
|
2140
|
-
activeWatcher = currentEffect;
|
|
2141
|
-
}
|
|
2142
|
-
};
|
|
2143
|
-
else {
|
|
2168
|
+
};
|
|
2169
|
+
} else {
|
|
2144
2170
|
getter = NOOP;
|
|
2145
2171
|
warnInvalidSource(source, onWarn);
|
|
2146
2172
|
}
|
|
@@ -2464,7 +2490,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2464
2490
|
let jobsLength = 0;
|
|
2465
2491
|
let flushIndex = 0;
|
|
2466
2492
|
let postFlushIndex = 0;
|
|
2467
|
-
const resolvedPromise =
|
|
2493
|
+
const resolvedPromise = /*@__PURE__*/ Promise.resolve();
|
|
2468
2494
|
const RECURSION_LIMIT = 100;
|
|
2469
2495
|
function nextTick(fn) {
|
|
2470
2496
|
const p = currentFlushPromise || resolvedPromise;
|
|
@@ -2503,6 +2529,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2503
2529
|
flushJobs();
|
|
2504
2530
|
} catch (e) {
|
|
2505
2531
|
currentFlushPromise = null;
|
|
2532
|
+
if (jobsLength || postJobs.length) queueFlush();
|
|
2506
2533
|
throw e;
|
|
2507
2534
|
}
|
|
2508
2535
|
};
|
|
@@ -2510,9 +2537,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2510
2537
|
if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
|
|
2511
2538
|
}
|
|
2512
2539
|
function queuePostFlushCb(jobs, id = Infinity) {
|
|
2513
|
-
if (!isArray(jobs))
|
|
2514
|
-
|
|
2515
|
-
|
|
2540
|
+
if (!isArray(jobs)) {
|
|
2541
|
+
if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
|
|
2542
|
+
else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
|
|
2543
|
+
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
2516
2544
|
queueFlush();
|
|
2517
2545
|
}
|
|
2518
2546
|
function flushPreFlushCbs(instance, seen) {
|
|
@@ -2526,8 +2554,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2526
2554
|
i--;
|
|
2527
2555
|
jobsLength--;
|
|
2528
2556
|
if (cb.flags & 2) cb.flags &= -2;
|
|
2529
|
-
|
|
2530
|
-
|
|
2557
|
+
try {
|
|
2558
|
+
cb();
|
|
2559
|
+
} finally {
|
|
2560
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
2561
|
+
}
|
|
2531
2562
|
}
|
|
2532
2563
|
}
|
|
2533
2564
|
function flushPostFlushCbs(seen) {
|
|
@@ -2540,18 +2571,22 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2540
2571
|
activePostJobs = postJobs;
|
|
2541
2572
|
postJobs = [];
|
|
2542
2573
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
cb
|
|
2549
|
-
|
|
2550
|
-
|
|
2574
|
+
try {
|
|
2575
|
+
while (postFlushIndex < activePostJobs.length) {
|
|
2576
|
+
const cb = activePostJobs[postFlushIndex++];
|
|
2577
|
+
if (checkRecursiveUpdates(seen, cb)) continue;
|
|
2578
|
+
if (cb.flags & 2) cb.flags &= -2;
|
|
2579
|
+
if (!(cb.flags & 4)) try {
|
|
2580
|
+
cb();
|
|
2581
|
+
} finally {
|
|
2582
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
2583
|
+
}
|
|
2551
2584
|
}
|
|
2585
|
+
} finally {
|
|
2586
|
+
while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
|
|
2587
|
+
activePostJobs = null;
|
|
2588
|
+
postFlushIndex = 0;
|
|
2552
2589
|
}
|
|
2553
|
-
activePostJobs = null;
|
|
2554
|
-
postFlushIndex = 0;
|
|
2555
2590
|
}
|
|
2556
2591
|
}
|
|
2557
2592
|
let isFlushing = false;
|
|
@@ -2561,9 +2596,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2561
2596
|
function flushOnAppMount(instance) {
|
|
2562
2597
|
if (!isFlushing) {
|
|
2563
2598
|
isFlushing = true;
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2599
|
+
try {
|
|
2600
|
+
flushPreFlushCbs(instance);
|
|
2601
|
+
flushPostFlushCbs();
|
|
2602
|
+
} finally {
|
|
2603
|
+
isFlushing = false;
|
|
2604
|
+
}
|
|
2567
2605
|
}
|
|
2568
2606
|
}
|
|
2569
2607
|
function flushJobs(seen) {
|
|
@@ -2593,8 +2631,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2593
2631
|
jobsLength = 0;
|
|
2594
2632
|
jobs.length = 0;
|
|
2595
2633
|
flushPostFlushCbs(seen);
|
|
2596
|
-
currentFlushPromise = null;
|
|
2597
2634
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
2635
|
+
else currentFlushPromise = null;
|
|
2598
2636
|
}
|
|
2599
2637
|
}
|
|
2600
2638
|
function checkRecursiveUpdates(seen, fn) {
|
|
@@ -2625,6 +2663,19 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2625
2663
|
rerender: tryWrap(rerender),
|
|
2626
2664
|
reload: tryWrap(reload)
|
|
2627
2665
|
};
|
|
2666
|
+
function runWithHmrUpdating(fn) {
|
|
2667
|
+
isHmrUpdating = true;
|
|
2668
|
+
let done = false;
|
|
2669
|
+
try {
|
|
2670
|
+
fn();
|
|
2671
|
+
done = true;
|
|
2672
|
+
} finally {
|
|
2673
|
+
if (done) nextTick(() => {
|
|
2674
|
+
isHmrUpdating = false;
|
|
2675
|
+
});
|
|
2676
|
+
else isHmrUpdating = false;
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2628
2679
|
const map = /* @__PURE__ */ new Map();
|
|
2629
2680
|
function registerHMR(instance) {
|
|
2630
2681
|
const id = instance.type.__hmrId;
|
|
@@ -2666,18 +2717,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2666
2717
|
instance.render = newRender;
|
|
2667
2718
|
normalizeClassComponent(instance.type).render = newRender;
|
|
2668
2719
|
}
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2720
|
+
runWithHmrUpdating(() => {
|
|
2721
|
+
if (instance.vapor) {
|
|
2722
|
+
if (!instance.isUnmounted) instance.hmrRerender();
|
|
2723
|
+
} else {
|
|
2724
|
+
const i = instance;
|
|
2725
|
+
if (!(i.effect.flags & 1024)) {
|
|
2726
|
+
i.renderCache = [];
|
|
2727
|
+
i.effect.run();
|
|
2728
|
+
}
|
|
2677
2729
|
}
|
|
2678
|
-
}
|
|
2679
|
-
nextTick(() => {
|
|
2680
|
-
isHmrUpdating = false;
|
|
2681
2730
|
});
|
|
2682
2731
|
});
|
|
2683
2732
|
}
|
|
@@ -2692,15 +2741,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2692
2741
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2693
2742
|
const dirtyInstances = new Set(instances);
|
|
2694
2743
|
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2695
|
-
|
|
2696
|
-
const
|
|
2697
|
-
|
|
2698
|
-
if (
|
|
2699
|
-
rerenderedParents.
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2744
|
+
runWithHmrUpdating(() => {
|
|
2745
|
+
for (const instance of instances) {
|
|
2746
|
+
const parent = instance.parent;
|
|
2747
|
+
if (parent) {
|
|
2748
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2749
|
+
rerenderedParents.add(parent);
|
|
2750
|
+
parent.hmrRerender();
|
|
2751
|
+
}
|
|
2752
|
+
} else instance.hmrReload(newComp);
|
|
2753
|
+
}
|
|
2754
|
+
});
|
|
2704
2755
|
} else {
|
|
2705
2756
|
const parentUpdates = /* @__PURE__ */ new Map();
|
|
2706
2757
|
const dirtyInstanceSet = new Set(instances);
|
|
@@ -2734,21 +2785,22 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2734
2785
|
}
|
|
2735
2786
|
parentUpdates.forEach((updates, parent) => {
|
|
2736
2787
|
queueJob(() => {
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2788
|
+
try {
|
|
2789
|
+
runWithHmrUpdating(() => {
|
|
2790
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2791
|
+
else {
|
|
2792
|
+
const i = parent;
|
|
2793
|
+
if (!(i.effect.flags & 1024)) {
|
|
2794
|
+
i.renderCache = [];
|
|
2795
|
+
i.effect.run();
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
});
|
|
2799
|
+
} finally {
|
|
2800
|
+
updates.forEach(([instance, dirtyInstances]) => {
|
|
2801
|
+
dirtyInstances.delete(instance);
|
|
2802
|
+
});
|
|
2745
2803
|
}
|
|
2746
|
-
nextTick(() => {
|
|
2747
|
-
isHmrUpdating = false;
|
|
2748
|
-
});
|
|
2749
|
-
updates.forEach(([instance, dirtyInstances]) => {
|
|
2750
|
-
dirtyInstances.delete(instance);
|
|
2751
|
-
});
|
|
2752
2804
|
});
|
|
2753
2805
|
});
|
|
2754
2806
|
}
|
|
@@ -2817,20 +2869,20 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2817
2869
|
function devtoolsUnmountApp(app) {
|
|
2818
2870
|
emit$1("app:unmount", app);
|
|
2819
2871
|
}
|
|
2820
|
-
const devtoolsComponentAdded =
|
|
2821
|
-
const devtoolsComponentUpdated =
|
|
2822
|
-
const _devtoolsComponentRemoved =
|
|
2872
|
+
const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
|
|
2873
|
+
const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
|
|
2874
|
+
const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
|
|
2823
2875
|
const devtoolsComponentRemoved = (component) => {
|
|
2824
2876
|
if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
|
|
2825
2877
|
};
|
|
2826
|
-
|
|
2878
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2827
2879
|
function createDevtoolsComponentHook(hook) {
|
|
2828
2880
|
return (component) => {
|
|
2829
2881
|
emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
|
|
2830
2882
|
};
|
|
2831
2883
|
}
|
|
2832
|
-
const devtoolsPerfStart =
|
|
2833
|
-
const devtoolsPerfEnd =
|
|
2884
|
+
const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
|
|
2885
|
+
const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
|
|
2834
2886
|
function createDevtoolsPerformanceHook(hook) {
|
|
2835
2887
|
return (component, type, time) => {
|
|
2836
2888
|
emit$1(hook, component.appContext.app, component.uid, component, type, time);
|
|
@@ -3091,15 +3143,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3091
3143
|
const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
|
|
3092
3144
|
const resolveTarget = (props, select) => {
|
|
3093
3145
|
const targetSelector = props && props.to;
|
|
3094
|
-
if (isString(targetSelector))
|
|
3095
|
-
|
|
3096
|
-
|
|
3146
|
+
if (isString(targetSelector)) {
|
|
3147
|
+
if (!select) {
|
|
3148
|
+
warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
|
|
3149
|
+
return null;
|
|
3150
|
+
} else {
|
|
3151
|
+
const target = select(targetSelector);
|
|
3152
|
+
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.`);
|
|
3153
|
+
return target;
|
|
3154
|
+
}
|
|
3097
3155
|
} else {
|
|
3098
|
-
const target = select(targetSelector);
|
|
3099
|
-
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.`);
|
|
3100
|
-
return target;
|
|
3101
|
-
}
|
|
3102
|
-
else {
|
|
3103
3156
|
if (!targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
|
|
3104
3157
|
return targetSelector;
|
|
3105
3158
|
}
|
|
@@ -3137,7 +3190,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3137
3190
|
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3138
3191
|
pendingMounts.delete(vnode);
|
|
3139
3192
|
if (isTeleportDisabled(vnode.props)) {
|
|
3140
|
-
|
|
3193
|
+
const mountContainer = parentNode(vnode.el) || container;
|
|
3194
|
+
mount(vnode, mountContainer, vnode.anchor);
|
|
3141
3195
|
updateCssVars(vnode, true);
|
|
3142
3196
|
}
|
|
3143
3197
|
mountToTarget(vnode);
|
|
@@ -3246,15 +3300,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3246
3300
|
const disabled = isTeleportDisabled(vnode.props);
|
|
3247
3301
|
if (target) {
|
|
3248
3302
|
const targetNode = target._lpa || target.firstChild;
|
|
3249
|
-
if (vnode.shapeFlag & 16)
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3303
|
+
if (vnode.shapeFlag & 16) {
|
|
3304
|
+
if (disabled) {
|
|
3305
|
+
hydrateDisabledTeleport(node, vnode);
|
|
3306
|
+
hydrateAnchor(target, targetNode);
|
|
3307
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
|
|
3308
|
+
} else {
|
|
3309
|
+
vnode.anchor = nextSibling(node);
|
|
3310
|
+
hydrateAnchor(target, targetNode);
|
|
3311
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
|
|
3312
|
+
hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3313
|
+
}
|
|
3258
3314
|
}
|
|
3259
3315
|
updateCssVars(vnode, disabled);
|
|
3260
3316
|
} else if (disabled) {
|
|
@@ -3420,8 +3476,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3420
3476
|
persisted,
|
|
3421
3477
|
beforeEnter(el) {
|
|
3422
3478
|
let hook = onBeforeEnter;
|
|
3423
|
-
if (!state.isMounted)
|
|
3424
|
-
|
|
3479
|
+
if (!state.isMounted) {
|
|
3480
|
+
if (appear) hook = onBeforeAppear || onBeforeEnter;
|
|
3481
|
+
else return;
|
|
3482
|
+
}
|
|
3425
3483
|
if (el[leaveCbKey]) el[leaveCbKey](true);
|
|
3426
3484
|
earlyRemove();
|
|
3427
3485
|
callHook(hook, [el]);
|
|
@@ -3431,11 +3489,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3431
3489
|
let hook = onEnter;
|
|
3432
3490
|
let afterHook = onAfterEnter;
|
|
3433
3491
|
let cancelHook = onEnterCancelled;
|
|
3434
|
-
if (!state.isMounted)
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3492
|
+
if (!state.isMounted) {
|
|
3493
|
+
if (appear) {
|
|
3494
|
+
hook = onAppear || onEnter;
|
|
3495
|
+
afterHook = onAfterAppear || onAfterEnter;
|
|
3496
|
+
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
3497
|
+
} else return;
|
|
3498
|
+
}
|
|
3439
3499
|
let called = false;
|
|
3440
3500
|
el[enterCbKey$1] = (cancelled) => {
|
|
3441
3501
|
if (called) return;
|
|
@@ -3601,9 +3661,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3601
3661
|
}
|
|
3602
3662
|
//#endregion
|
|
3603
3663
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
3604
|
-
|
|
3664
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
3605
3665
|
function defineComponent(options, extraOptions) {
|
|
3606
|
-
return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
|
|
3666
|
+
return isFunction(options) ? /*@__PURE__*/ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
|
|
3607
3667
|
}
|
|
3608
3668
|
//#endregion
|
|
3609
3669
|
//#region packages/runtime-core/src/helpers/useId.ts
|
|
@@ -3700,15 +3760,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3700
3760
|
if (rawRef.f) {
|
|
3701
3761
|
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
3702
3762
|
if (isUnmount) isArray(existing) && remove(existing, refValue);
|
|
3703
|
-
else if (!isArray(existing))
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3763
|
+
else if (!isArray(existing)) {
|
|
3764
|
+
if (_isString) {
|
|
3765
|
+
refs[ref] = [refValue];
|
|
3766
|
+
if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
|
|
3767
|
+
} else {
|
|
3768
|
+
const newVal = [refValue];
|
|
3769
|
+
if (canSetRef(ref, rawRef.k)) ref.value = newVal;
|
|
3770
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
3771
|
+
}
|
|
3772
|
+
} else if (!existing.includes(refValue)) existing.push(refValue);
|
|
3712
3773
|
} else if (_isString) {
|
|
3713
3774
|
refs[ref] = value;
|
|
3714
3775
|
if (canSetSetupRef(ref)) setupState[ref] = value;
|
|
@@ -3760,7 +3821,18 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3760
3821
|
hasLoggedMismatchError = true;
|
|
3761
3822
|
};
|
|
3762
3823
|
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
3763
|
-
const isMathMLContainer = (container) =>
|
|
3824
|
+
const isMathMLContainer = (container) => {
|
|
3825
|
+
if (!container.namespaceURI.includes("MathML")) return false;
|
|
3826
|
+
if (container.tagName !== "annotation-xml") return true;
|
|
3827
|
+
const encoding = container.getAttribute("encoding");
|
|
3828
|
+
return !encoding || !encoding.includes("html");
|
|
3829
|
+
};
|
|
3830
|
+
/**
|
|
3831
|
+
* Resolve the element namespace a container's children should be created in.
|
|
3832
|
+
* The live DOM is the source of truth, so this also covers containers that are
|
|
3833
|
+
* only known at runtime (interop boundaries, teleport targets).
|
|
3834
|
+
* @internal
|
|
3835
|
+
*/
|
|
3764
3836
|
const getContainerType = (container) => {
|
|
3765
3837
|
if (container.nodeType !== 1) return void 0;
|
|
3766
3838
|
if (isSVGContainer(container)) return "svg";
|
|
@@ -3798,11 +3870,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3798
3870
|
let nextNode = null;
|
|
3799
3871
|
switch (type) {
|
|
3800
3872
|
case Text:
|
|
3801
|
-
if (domType !== 3)
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3873
|
+
if (domType !== 3) {
|
|
3874
|
+
if (vnode.children === "") {
|
|
3875
|
+
insert(vnode.el = createText(""), parentNode(node), node);
|
|
3876
|
+
nextNode = node;
|
|
3877
|
+
} else nextNode = onMismatch();
|
|
3878
|
+
} else {
|
|
3806
3879
|
if (node.data !== vnode.children) {
|
|
3807
3880
|
warn$1(`Hydration text mismatch in`, node.parentNode, `\n - rendered on server: ${JSON.stringify(node.data)}\n - expected on client: ${JSON.stringify(vnode.children)}`);
|
|
3808
3881
|
logMismatchError();
|
|
@@ -3839,11 +3912,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3839
3912
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3840
3913
|
break;
|
|
3841
3914
|
case VaporSlot:
|
|
3842
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
|
|
3915
|
+
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
3843
3916
|
break;
|
|
3844
|
-
default: if (shapeFlag & 1)
|
|
3845
|
-
|
|
3846
|
-
|
|
3917
|
+
default: if (shapeFlag & 1) {
|
|
3918
|
+
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
|
|
3919
|
+
else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3920
|
+
} else if (shapeFlag & 6) {
|
|
3847
3921
|
vnode.slotScopeIds = slotScopeIds;
|
|
3848
3922
|
const container = parentNode(node);
|
|
3849
3923
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
@@ -3865,19 +3939,20 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3865
3939
|
} else {
|
|
3866
3940
|
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
3867
3941
|
const component = vnode.component;
|
|
3868
|
-
if (isAsyncWrapper(vnode)
|
|
3942
|
+
if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep && !component.asyncResolved)) {
|
|
3869
3943
|
let subTree;
|
|
3870
3944
|
if (isFragmentStart) {
|
|
3871
|
-
subTree = createVNode(
|
|
3945
|
+
subTree = createVNode(Static);
|
|
3872
3946
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
3873
3947
|
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
3874
3948
|
subTree.el = node;
|
|
3875
3949
|
component.subTree = subTree;
|
|
3876
3950
|
}
|
|
3877
3951
|
}
|
|
3878
|
-
} else if (shapeFlag & 64)
|
|
3879
|
-
|
|
3880
|
-
|
|
3952
|
+
} else if (shapeFlag & 64) {
|
|
3953
|
+
if (domType !== 8) nextNode = onMismatch();
|
|
3954
|
+
else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
3955
|
+
} else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
3881
3956
|
else warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
3882
3957
|
}
|
|
3883
3958
|
if (ref != null) setRef(ref, null, parentSuspense, vnode);
|
|
@@ -4006,7 +4081,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4006
4081
|
const container = parentNode(node);
|
|
4007
4082
|
remove(node);
|
|
4008
4083
|
patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
4009
|
-
if (parentComponent) {
|
|
4084
|
+
if (parentComponent && parentComponent.vnode) {
|
|
4010
4085
|
parentComponent.vnode.el = vnode.el;
|
|
4011
4086
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
4012
4087
|
}
|
|
@@ -4018,8 +4093,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4018
4093
|
node = nextSibling(node);
|
|
4019
4094
|
if (node && isComment(node)) {
|
|
4020
4095
|
if (node.data === open) match++;
|
|
4021
|
-
if (node.data === close)
|
|
4022
|
-
|
|
4096
|
+
if (node.data === close) {
|
|
4097
|
+
if (match === 0) return nextSibling(node);
|
|
4098
|
+
else match--;
|
|
4099
|
+
}
|
|
4023
4100
|
}
|
|
4024
4101
|
}
|
|
4025
4102
|
return node;
|
|
@@ -4029,7 +4106,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4029
4106
|
if (parentNode) parentNode.replaceChild(newNode, oldNode);
|
|
4030
4107
|
let parent = parentComponent;
|
|
4031
4108
|
while (parent) {
|
|
4032
|
-
if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
|
|
4109
|
+
if (parent.vnode && parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
|
|
4033
4110
|
parent = parent.parent;
|
|
4034
4111
|
}
|
|
4035
4112
|
};
|
|
@@ -4041,7 +4118,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4041
4118
|
/**
|
|
4042
4119
|
* Dev only
|
|
4043
4120
|
*/
|
|
4044
|
-
const resourceProps =
|
|
4121
|
+
const resourceProps = /*@__PURE__*/ new Set([
|
|
4045
4122
|
"src",
|
|
4046
4123
|
"srcset",
|
|
4047
4124
|
"href",
|
|
@@ -4283,7 +4360,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4283
4360
|
//#endregion
|
|
4284
4361
|
//#region packages/runtime-core/src/apiAsyncComponent.ts
|
|
4285
4362
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
4286
|
-
|
|
4363
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
4287
4364
|
function defineAsyncComponent(source) {
|
|
4288
4365
|
const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
|
|
4289
4366
|
return /* @__PURE__ */ defineComponent({
|
|
@@ -4498,10 +4575,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4498
4575
|
});
|
|
4499
4576
|
let pendingCacheKey = null;
|
|
4500
4577
|
const cacheSubtree = () => {
|
|
4501
|
-
if (pendingCacheKey != null)
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4578
|
+
if (pendingCacheKey != null) {
|
|
4579
|
+
if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
|
|
4580
|
+
const vnode = getInnerChild(keepAliveInstance.subTree);
|
|
4581
|
+
if (vnode.component) cache.set(pendingCacheKey, vnode);
|
|
4582
|
+
}, void 0, keepAliveInstance.subTree.suspense);
|
|
4583
|
+
else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
|
|
4584
|
+
}
|
|
4505
4585
|
};
|
|
4506
4586
|
onMounted(cacheSubtree);
|
|
4507
4587
|
onUpdated(cacheSubtree);
|
|
@@ -4743,23 +4823,25 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4743
4823
|
}
|
|
4744
4824
|
ret = new Array(source.length);
|
|
4745
4825
|
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]);
|
|
4746
|
-
} else if (typeof source === "number")
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
4754
|
-
else {
|
|
4755
|
-
const keys = Object.keys(source);
|
|
4756
|
-
ret = new Array(keys.length);
|
|
4757
|
-
for (let i = 0, l = keys.length; i < l; i++) {
|
|
4758
|
-
const key = keys[i];
|
|
4759
|
-
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
4826
|
+
} else if (typeof source === "number") {
|
|
4827
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
4828
|
+
warn$1(`The v-for range expects a positive integer value but got ${source}.`);
|
|
4829
|
+
ret = [];
|
|
4830
|
+
} else {
|
|
4831
|
+
ret = new Array(source);
|
|
4832
|
+
for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
4760
4833
|
}
|
|
4761
|
-
}
|
|
4762
|
-
|
|
4834
|
+
} else if (isObject(source)) {
|
|
4835
|
+
if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
4836
|
+
else {
|
|
4837
|
+
const keys = Object.keys(source);
|
|
4838
|
+
ret = new Array(keys.length);
|
|
4839
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
4840
|
+
const key = keys[i];
|
|
4841
|
+
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
4842
|
+
}
|
|
4843
|
+
}
|
|
4844
|
+
} else ret = [];
|
|
4763
4845
|
if (cache) cache[index] = ret;
|
|
4764
4846
|
return ret;
|
|
4765
4847
|
}
|
|
@@ -4784,14 +4866,27 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4784
4866
|
//#endregion
|
|
4785
4867
|
//#region packages/runtime-core/src/helpers/renderSlot.ts
|
|
4786
4868
|
/**
|
|
4869
|
+
* Links a slot function to its raw vapor slot: a raw vapor slot carries
|
|
4870
|
+
* itself, and the wrapper the interop slots proxy hands out carries the raw
|
|
4871
|
+
* slot it wraps — one lookup answers both "is this a vapor slot" and
|
|
4872
|
+
* "which one". Internal to vapor interop.
|
|
4873
|
+
*/
|
|
4874
|
+
const rawVaporSlotKey = Symbol(`rawVaporSlot`);
|
|
4875
|
+
/**
|
|
4876
|
+
* Marks a compiler-generated slot fallback as VDOM-rendered so the vapor
|
|
4877
|
+
* interop fallback chain renders it through the VDOM renderer. Internal to
|
|
4878
|
+
* vapor interop.
|
|
4879
|
+
*/
|
|
4880
|
+
const vdomSlotFallbackKey = Symbol(`vdomSlotFallback`);
|
|
4881
|
+
/**
|
|
4787
4882
|
* Compiler runtime helper for rendering `<slot/>`
|
|
4788
4883
|
* @private
|
|
4789
4884
|
*/
|
|
4790
4885
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
4791
4886
|
if (props == null) props = {};
|
|
4792
4887
|
let slot = slots[name];
|
|
4793
|
-
if (fallback) fallback
|
|
4794
|
-
const vaporSlot = slot &&
|
|
4888
|
+
if (fallback) fallback[vdomSlotFallbackKey] = true;
|
|
4889
|
+
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
4795
4890
|
if (vaporSlot) {
|
|
4796
4891
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
4797
4892
|
ret.vs = {
|
|
@@ -4868,11 +4963,38 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4868
4963
|
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
4869
4964
|
return getPublicInstance(i.parent);
|
|
4870
4965
|
};
|
|
4966
|
+
const resolveDevRootEl = (vnode) => {
|
|
4967
|
+
let found = false;
|
|
4968
|
+
while (true) {
|
|
4969
|
+
if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
|
|
4970
|
+
const root = filterSingleRoot(vnode.children);
|
|
4971
|
+
if (!root) return;
|
|
4972
|
+
vnode = root;
|
|
4973
|
+
found = true;
|
|
4974
|
+
continue;
|
|
4975
|
+
}
|
|
4976
|
+
const component = vnode.component;
|
|
4977
|
+
if (component && component.subTree) {
|
|
4978
|
+
vnode = component.subTree;
|
|
4979
|
+
continue;
|
|
4980
|
+
}
|
|
4981
|
+
const suspense = vnode.suspense;
|
|
4982
|
+
if (suspense && suspense.activeBranch) {
|
|
4983
|
+
vnode = suspense.activeBranch;
|
|
4984
|
+
continue;
|
|
4985
|
+
}
|
|
4986
|
+
return found ? vnode.el : void 0;
|
|
4987
|
+
}
|
|
4988
|
+
};
|
|
4989
|
+
const getDevRootFragmentEl = (i) => {
|
|
4990
|
+
const el = i.subTree && resolveDevRootEl(i.subTree);
|
|
4991
|
+
return el === void 0 ? i.vnode.el : el;
|
|
4992
|
+
};
|
|
4871
4993
|
let publicPropertiesMap;
|
|
4872
4994
|
const getPublicPropertiesMap = () => {
|
|
4873
4995
|
if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
|
|
4874
4996
|
$: (i) => i,
|
|
4875
|
-
$el: (i) => i
|
|
4997
|
+
$el: (i) => getDevRootFragmentEl(i),
|
|
4876
4998
|
$data: (i) => i.data,
|
|
4877
4999
|
$props: (i) => /* @__PURE__ */ shallowReadonly(i.props),
|
|
4878
5000
|
$attrs: (i) => /* @__PURE__ */ shallowReadonly(i.attrs),
|
|
@@ -4978,7 +5100,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4978
5100
|
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.");
|
|
4979
5101
|
return Reflect.ownKeys(target);
|
|
4980
5102
|
};
|
|
4981
|
-
const RuntimeCompiledPublicInstanceProxyHandlers =
|
|
5103
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
|
|
4982
5104
|
get(target, key) {
|
|
4983
5105
|
if (key === Symbol.unscopables) return;
|
|
4984
5106
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
@@ -5150,12 +5272,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5150
5272
|
for (const key in defaults) {
|
|
5151
5273
|
if (key.startsWith("__skip")) continue;
|
|
5152
5274
|
let opt = props[key];
|
|
5153
|
-
if (opt)
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5275
|
+
if (opt) {
|
|
5276
|
+
if (isArray(opt) || isFunction(opt)) opt = props[key] = {
|
|
5277
|
+
type: opt,
|
|
5278
|
+
default: defaults[key]
|
|
5279
|
+
};
|
|
5280
|
+
else opt.default = defaults[key];
|
|
5281
|
+
} else if (opt === null) opt = props[key] = { default: defaults[key] };
|
|
5159
5282
|
else warn$1(`props default key "${key}" has no corresponding declaration.`);
|
|
5160
5283
|
if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
|
|
5161
5284
|
}
|
|
@@ -5298,11 +5421,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5298
5421
|
const opt = computedOptions[key];
|
|
5299
5422
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
5300
5423
|
if (get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
|
|
5424
|
+
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
|
|
5425
|
+
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
5426
|
+
};
|
|
5301
5427
|
const c = computed({
|
|
5302
5428
|
get,
|
|
5303
|
-
set
|
|
5304
|
-
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
5305
|
-
}
|
|
5429
|
+
set
|
|
5306
5430
|
});
|
|
5307
5431
|
Object.defineProperty(ctx, key, {
|
|
5308
5432
|
enumerable: true,
|
|
@@ -5358,9 +5482,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5358
5482
|
for (const key in injectOptions) {
|
|
5359
5483
|
const opt = injectOptions[key];
|
|
5360
5484
|
let injected;
|
|
5361
|
-
if (isObject(opt))
|
|
5362
|
-
|
|
5363
|
-
|
|
5485
|
+
if (isObject(opt)) {
|
|
5486
|
+
if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
|
|
5487
|
+
else injected = inject(opt.from || key);
|
|
5488
|
+
} else injected = inject(opt);
|
|
5364
5489
|
if (/* @__PURE__ */ isRef(injected)) Object.defineProperty(ctx, key, {
|
|
5365
5490
|
enumerable: true,
|
|
5366
5491
|
configurable: true,
|
|
@@ -5381,13 +5506,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5381
5506
|
if (isFunction(handler)) watch(getter, handler);
|
|
5382
5507
|
else warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
5383
5508
|
} else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
|
|
5384
|
-
else if (isObject(raw))
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5509
|
+
else if (isObject(raw)) {
|
|
5510
|
+
if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
5511
|
+
else {
|
|
5512
|
+
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
5513
|
+
if (isFunction(handler)) watch(getter, handler, raw);
|
|
5514
|
+
else warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
5515
|
+
}
|
|
5516
|
+
} else warn$1(`Invalid watch option: "${key}"`, raw);
|
|
5391
5517
|
}
|
|
5392
5518
|
/**
|
|
5393
5519
|
* Resolve merged options and cache it on the component.
|
|
@@ -5473,7 +5599,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5473
5599
|
}
|
|
5474
5600
|
function mergeEmitsOrPropsOptions(to, from) {
|
|
5475
5601
|
if (to) {
|
|
5476
|
-
if (isArray(to) && isArray(from)) return [
|
|
5602
|
+
if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
5477
5603
|
return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
|
|
5478
5604
|
} else return from;
|
|
5479
5605
|
}
|
|
@@ -5592,8 +5718,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5592
5718
|
} else warn$1(`Cannot unmount an app that is not mounted.`);
|
|
5593
5719
|
},
|
|
5594
5720
|
provide(key, value) {
|
|
5595
|
-
if (key in context.provides)
|
|
5596
|
-
|
|
5721
|
+
if (key in context.provides) {
|
|
5722
|
+
if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
|
|
5723
|
+
else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
|
|
5724
|
+
}
|
|
5597
5725
|
context.provides[key] = value;
|
|
5598
5726
|
return app;
|
|
5599
5727
|
},
|
|
@@ -5700,12 +5828,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5700
5828
|
if (instance.isUnmounted) return;
|
|
5701
5829
|
{
|
|
5702
5830
|
const { emitsOptions, propsOptions } = instance;
|
|
5703
|
-
if (emitsOptions)
|
|
5704
|
-
if (!
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
if (
|
|
5831
|
+
if (emitsOptions) {
|
|
5832
|
+
if (!(event in emitsOptions) && true) {
|
|
5833
|
+
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.`);
|
|
5834
|
+
} else {
|
|
5835
|
+
const validator = emitsOptions[event];
|
|
5836
|
+
if (isFunction(validator)) {
|
|
5837
|
+
if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
5838
|
+
}
|
|
5709
5839
|
}
|
|
5710
5840
|
}
|
|
5711
5841
|
}
|
|
@@ -5714,7 +5844,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5714
5844
|
const modifiers = isModelListener && getModelModifiers(props, event.slice(7), getter);
|
|
5715
5845
|
if (modifiers) {
|
|
5716
5846
|
if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
5717
|
-
if (modifiers.number) args =
|
|
5847
|
+
if (modifiers.number) args = args.map(looseToNumber);
|
|
5718
5848
|
}
|
|
5719
5849
|
devtoolsComponentEmit(instance, event, args);
|
|
5720
5850
|
{
|
|
@@ -5894,10 +6024,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5894
6024
|
for (let i = 0; i < children.length; i++) {
|
|
5895
6025
|
const child = children[i];
|
|
5896
6026
|
if (isVNode(child)) {
|
|
5897
|
-
if (child.type !== Comment || child.children === "v-if")
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
6027
|
+
if (child.type !== Comment || child.children === "v-if") {
|
|
6028
|
+
if (singleRoot) return;
|
|
6029
|
+
else {
|
|
6030
|
+
singleRoot = child;
|
|
6031
|
+
if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
|
|
6032
|
+
}
|
|
5901
6033
|
}
|
|
5902
6034
|
} else return;
|
|
5903
6035
|
}
|
|
@@ -6018,16 +6150,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6018
6150
|
let key = propsToUpdate[i];
|
|
6019
6151
|
if (isEmitListener(instance.emitsOptions, key)) continue;
|
|
6020
6152
|
const value = rawProps[key];
|
|
6021
|
-
if (options)
|
|
6022
|
-
if (
|
|
6023
|
-
attrs[key]
|
|
6024
|
-
|
|
6153
|
+
if (options) {
|
|
6154
|
+
if (hasOwn(attrs, key)) {
|
|
6155
|
+
if (value !== attrs[key]) {
|
|
6156
|
+
attrs[key] = value;
|
|
6157
|
+
hasAttrsChanged = true;
|
|
6158
|
+
}
|
|
6159
|
+
} else {
|
|
6160
|
+
const camelizedKey = camelize(key);
|
|
6161
|
+
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
6025
6162
|
}
|
|
6026
|
-
} else {
|
|
6027
|
-
const camelizedKey = camelize(key);
|
|
6028
|
-
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
6029
|
-
}
|
|
6030
|
-
else if (value !== attrs[key]) {
|
|
6163
|
+
} else if (value !== attrs[key]) {
|
|
6031
6164
|
attrs[key] = value;
|
|
6032
6165
|
hasAttrsChanged = true;
|
|
6033
6166
|
}
|
|
@@ -6036,9 +6169,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6036
6169
|
} else {
|
|
6037
6170
|
if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
|
|
6038
6171
|
let kebabKey;
|
|
6039
|
-
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))
|
|
6040
|
-
if (
|
|
6041
|
-
|
|
6172
|
+
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
|
|
6173
|
+
if (options) {
|
|
6174
|
+
if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
|
|
6175
|
+
} else delete props[key];
|
|
6176
|
+
}
|
|
6042
6177
|
if (attrs !== rawCurrentProps) {
|
|
6043
6178
|
for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {
|
|
6044
6179
|
delete attrs[key];
|
|
@@ -6057,9 +6192,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6057
6192
|
if (isReservedProp(key)) continue;
|
|
6058
6193
|
const value = rawProps[key];
|
|
6059
6194
|
let camelKey;
|
|
6060
|
-
if (options && hasOwn(options, camelKey = camelize(key)))
|
|
6061
|
-
|
|
6062
|
-
|
|
6195
|
+
if (options && hasOwn(options, camelKey = camelize(key))) {
|
|
6196
|
+
if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
|
|
6197
|
+
else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
6198
|
+
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
6063
6199
|
if (!(key in attrs) || value !== attrs[key]) {
|
|
6064
6200
|
attrs[key] = value;
|
|
6065
6201
|
hasAttrsChanged = true;
|
|
@@ -6222,7 +6358,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6222
6358
|
}
|
|
6223
6359
|
if (validator && !validator(value, /* @__PURE__ */ shallowReadonly(resolvedProps))) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
|
|
6224
6360
|
}
|
|
6225
|
-
const isSimpleType =
|
|
6361
|
+
const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
|
|
6226
6362
|
/**
|
|
6227
6363
|
* dev only
|
|
6228
6364
|
*/
|
|
@@ -6335,12 +6471,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6335
6471
|
let deletionComparisonTarget = EMPTY_OBJ;
|
|
6336
6472
|
if (vnode.shapeFlag & 32) {
|
|
6337
6473
|
const type = children._;
|
|
6338
|
-
if (type)
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6474
|
+
if (type) {
|
|
6475
|
+
if (isHmrUpdating) {
|
|
6476
|
+
assignSlots(slots, children, optimized);
|
|
6477
|
+
trigger(instance, "set", "$slots");
|
|
6478
|
+
} else if (optimized && type === 1) needDeletionCheck = false;
|
|
6479
|
+
else assignSlots(slots, children, optimized);
|
|
6480
|
+
} else {
|
|
6344
6481
|
needDeletionCheck = !children.$stable;
|
|
6345
6482
|
normalizeObjectSlots(children, slots, instance);
|
|
6346
6483
|
}
|
|
@@ -6358,7 +6495,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6358
6495
|
let supported;
|
|
6359
6496
|
let perf;
|
|
6360
6497
|
let cachedNow$1 = 0;
|
|
6361
|
-
const p$1 =
|
|
6498
|
+
const p$1 = /*@__PURE__*/ Promise.resolve();
|
|
6362
6499
|
const getNow$1 = () => cachedNow$1 || (p$1.then(() => cachedNow$1 = 0), cachedNow$1 = isSupported() ? perf.now() : Date.now());
|
|
6363
6500
|
/**
|
|
6364
6501
|
* @internal
|
|
@@ -6455,7 +6592,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6455
6592
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6456
6593
|
break;
|
|
6457
6594
|
case VaporSlot:
|
|
6458
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
|
|
6595
|
+
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
6459
6596
|
break;
|
|
6460
6597
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6461
6598
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -6574,7 +6711,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6574
6711
|
for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
|
|
6575
6712
|
};
|
|
6576
6713
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
6577
|
-
for (let i = start; i < children.length; i++)
|
|
6714
|
+
for (let i = start; i < children.length; i++) {
|
|
6715
|
+
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
6716
|
+
patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6717
|
+
}
|
|
6578
6718
|
};
|
|
6579
6719
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6580
6720
|
const el = n2.el = n1.el;
|
|
@@ -6586,6 +6726,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6586
6726
|
let vnodeHook;
|
|
6587
6727
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
6588
6728
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6729
|
+
if (n2.ibu) n2.ibu();
|
|
6589
6730
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6590
6731
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
6591
6732
|
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -6619,8 +6760,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6619
6760
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
6620
6761
|
}
|
|
6621
6762
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
6622
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
|
|
6763
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
6623
6764
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6765
|
+
n2.iu && n2.iu();
|
|
6624
6766
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6625
6767
|
}, void 0, parentSuspense);
|
|
6626
6768
|
};
|
|
@@ -6628,7 +6770,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6628
6770
|
for (let i = 0; i < newChildren.length; i++) {
|
|
6629
6771
|
const oldVNode = oldChildren[i];
|
|
6630
6772
|
const newVNode = newChildren[i];
|
|
6631
|
-
|
|
6773
|
+
const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
|
|
6774
|
+
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
6632
6775
|
}
|
|
6633
6776
|
};
|
|
6634
6777
|
const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
|
|
@@ -6666,41 +6809,46 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6666
6809
|
};
|
|
6667
6810
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6668
6811
|
n2.slotScopeIds = slotScopeIds;
|
|
6669
|
-
if (n2.type.__vapor)
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6812
|
+
if (n2.type.__vapor) {
|
|
6813
|
+
if (n1 == null) {
|
|
6814
|
+
if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
6815
|
+
else {
|
|
6816
|
+
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
6817
|
+
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
6818
|
+
if (n2.dirs) {
|
|
6819
|
+
invokeDirectiveHook(n2, null, parentComponent, "created");
|
|
6820
|
+
invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
|
|
6821
|
+
}
|
|
6822
|
+
}, () => {
|
|
6823
|
+
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
|
|
6824
|
+
});
|
|
6825
|
+
if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
6826
|
+
const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
|
|
6827
|
+
if (vnodeMountedHook) {
|
|
6828
|
+
const scopedVNode = n2;
|
|
6829
|
+
queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
|
|
6830
|
+
}
|
|
6676
6831
|
}
|
|
6677
|
-
}
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6832
|
+
} else {
|
|
6833
|
+
const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
|
|
6834
|
+
getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
|
|
6835
|
+
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6836
|
+
}, () => {
|
|
6837
|
+
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
6838
|
+
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
6839
|
+
if (n2.ibu) n2.ibu();
|
|
6840
|
+
});
|
|
6841
|
+
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
6842
|
+
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs || n2.iu)) queuePostRenderEffect(() => {
|
|
6843
|
+
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6844
|
+
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
6845
|
+
n2.iu && n2.iu();
|
|
6846
|
+
}, void 0, parentSuspense);
|
|
6685
6847
|
}
|
|
6686
|
-
}
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6691
|
-
}, () => {
|
|
6692
|
-
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
6693
|
-
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
6694
|
-
});
|
|
6695
|
-
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
6696
|
-
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
|
|
6697
|
-
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6698
|
-
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
6699
|
-
}, void 0, parentSuspense);
|
|
6700
|
-
}
|
|
6701
|
-
else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
6702
|
-
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
6703
|
-
else updateComponent(n1, n2, optimized);
|
|
6848
|
+
} else if (n1 == null) {
|
|
6849
|
+
if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
6850
|
+
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
6851
|
+
} else updateComponent(n1, n2, optimized);
|
|
6704
6852
|
};
|
|
6705
6853
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
|
|
6706
6854
|
const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
|
|
@@ -6741,16 +6889,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6741
6889
|
};
|
|
6742
6890
|
const updateComponent = (n1, n2, optimized) => {
|
|
6743
6891
|
const instance = n2.component = n1.component;
|
|
6744
|
-
if (shouldUpdateComponent(n1, n2, optimized))
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6892
|
+
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
6893
|
+
if (instance.asyncDep && !instance.asyncResolved) {
|
|
6894
|
+
pushWarningContext(n2);
|
|
6895
|
+
updateComponentPreRender(instance, n2, optimized);
|
|
6896
|
+
popWarningContext();
|
|
6897
|
+
return;
|
|
6898
|
+
} else {
|
|
6899
|
+
instance.next = n2;
|
|
6900
|
+
instance.effect.run();
|
|
6901
|
+
}
|
|
6749
6902
|
} else {
|
|
6750
|
-
instance.next = n2;
|
|
6751
|
-
instance.effect.run();
|
|
6752
|
-
}
|
|
6753
|
-
else {
|
|
6754
6903
|
n2.el = n1.el;
|
|
6755
6904
|
instance.vnode = n2;
|
|
6756
6905
|
}
|
|
@@ -6848,6 +6997,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6848
6997
|
} else next = vnode;
|
|
6849
6998
|
if (bu) invokeArrayFns(bu);
|
|
6850
6999
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
7000
|
+
if (next.ibu) next.ibu();
|
|
6851
7001
|
toggleRecurse(instance, true);
|
|
6852
7002
|
startMeasure(instance, `render`);
|
|
6853
7003
|
const nextTree = renderComponentRoot(instance);
|
|
@@ -6860,7 +7010,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6860
7010
|
next.el = nextTree.el;
|
|
6861
7011
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
6862
7012
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
6863
|
-
if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() =>
|
|
7013
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
7014
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
7015
|
+
next.iu && next.iu();
|
|
7016
|
+
}, void 0, parentSuspense);
|
|
6864
7017
|
devtoolsComponentUpdated(instance);
|
|
6865
7018
|
popWarningContext();
|
|
6866
7019
|
}
|
|
@@ -6900,9 +7053,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6900
7053
|
if (shapeFlag & 8) {
|
|
6901
7054
|
if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
|
|
6902
7055
|
if (c2 !== c1) hostSetElementText(container, c2);
|
|
6903
|
-
} else if (prevShapeFlag & 16)
|
|
6904
|
-
|
|
6905
|
-
|
|
7056
|
+
} else if (prevShapeFlag & 16) {
|
|
7057
|
+
if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
7058
|
+
else unmountChildren(c1, parentComponent, parentSuspense, true);
|
|
7059
|
+
} else {
|
|
6906
7060
|
if (prevShapeFlag & 8) hostSetElementText(container, "");
|
|
6907
7061
|
if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6908
7062
|
}
|
|
@@ -7001,8 +7155,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7001
7155
|
const anchorVNode = c2[nextIndex + 1];
|
|
7002
7156
|
const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
|
|
7003
7157
|
if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
7004
|
-
else if (moved)
|
|
7005
|
-
|
|
7158
|
+
else if (moved) {
|
|
7159
|
+
if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
|
|
7160
|
+
else j--;
|
|
7161
|
+
}
|
|
7006
7162
|
}
|
|
7007
7163
|
}
|
|
7008
7164
|
};
|
|
@@ -7034,26 +7190,27 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7034
7190
|
moveStaticNode(vnode, container, anchor);
|
|
7035
7191
|
return;
|
|
7036
7192
|
}
|
|
7037
|
-
if (moveType !== 2 && shapeFlag & 1 && transition)
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
const
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7193
|
+
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
7194
|
+
if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
|
|
7195
|
+
else {
|
|
7196
|
+
const { leave, delayLeave, afterLeave } = transition;
|
|
7197
|
+
const remove = () => {
|
|
7198
|
+
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
7199
|
+
else hostInsert(el, container, anchor);
|
|
7200
|
+
};
|
|
7201
|
+
const performLeave = () => {
|
|
7202
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
7203
|
+
if (el._isLeaving) el[leaveCbKey](true);
|
|
7204
|
+
if (transition.persisted && !wasLeaving) remove();
|
|
7205
|
+
else leave(el, () => {
|
|
7206
|
+
remove();
|
|
7207
|
+
afterLeave && afterLeave();
|
|
7208
|
+
});
|
|
7209
|
+
};
|
|
7210
|
+
if (delayLeave) delayLeave(el, remove, performLeave);
|
|
7211
|
+
else performLeave();
|
|
7212
|
+
}
|
|
7213
|
+
} else hostInsert(el, container, anchor);
|
|
7057
7214
|
};
|
|
7058
7215
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
7059
7216
|
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
|
|
@@ -7073,16 +7230,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7073
7230
|
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
7074
7231
|
let vnodeHook;
|
|
7075
7232
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7076
|
-
if (shapeFlag & 6)
|
|
7077
|
-
if (
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7233
|
+
if (shapeFlag & 6) {
|
|
7234
|
+
if (isVaporComponent(type)) {
|
|
7235
|
+
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
7236
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7237
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
7238
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
7239
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7240
|
+
}, void 0, parentSuspense);
|
|
7241
|
+
return;
|
|
7242
|
+
} else unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
7243
|
+
} else {
|
|
7086
7244
|
if (shapeFlag & 128) {
|
|
7087
7245
|
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
7088
7246
|
return;
|
|
@@ -7214,12 +7372,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7214
7372
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
7215
7373
|
}
|
|
7216
7374
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
7217
|
-
if (!vapor)
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7375
|
+
if (!vapor) {
|
|
7376
|
+
if (allowed) {
|
|
7377
|
+
effect.flags |= 128;
|
|
7378
|
+
job.flags |= 2;
|
|
7379
|
+
} else {
|
|
7380
|
+
effect.flags &= -129;
|
|
7381
|
+
job.flags &= -3;
|
|
7382
|
+
}
|
|
7223
7383
|
}
|
|
7224
7384
|
}
|
|
7225
7385
|
function needTransition(parentSuspense, transition) {
|
|
@@ -7259,8 +7419,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7259
7419
|
}
|
|
7260
7420
|
function locateNonHydratedAsyncRoot(instance) {
|
|
7261
7421
|
const subComponent = instance.subTree && instance.subTree.component;
|
|
7262
|
-
if (subComponent)
|
|
7263
|
-
|
|
7422
|
+
if (subComponent) {
|
|
7423
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
7424
|
+
else return locateNonHydratedAsyncRoot(subComponent);
|
|
7425
|
+
}
|
|
7264
7426
|
}
|
|
7265
7427
|
function invalidateMount(hooks) {
|
|
7266
7428
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
@@ -7304,7 +7466,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7304
7466
|
/**
|
|
7305
7467
|
* shared between vdom and vapor
|
|
7306
7468
|
*/
|
|
7307
|
-
function getInheritedScopeIds(vnode, parentComponent) {
|
|
7469
|
+
function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
|
|
7308
7470
|
const inheritedScopeIds = [];
|
|
7309
7471
|
let currentParent = parentComponent;
|
|
7310
7472
|
let currentVNode = vnode;
|
|
@@ -7320,6 +7482,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7320
7482
|
currentParent = currentParent.parent;
|
|
7321
7483
|
} else break;
|
|
7322
7484
|
}
|
|
7485
|
+
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
7486
|
+
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
7323
7487
|
return inheritedScopeIds;
|
|
7324
7488
|
}
|
|
7325
7489
|
function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
@@ -7379,7 +7543,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7379
7543
|
patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
7380
7544
|
if (suspense.deps <= 0) suspense.resolve();
|
|
7381
7545
|
else if (isInFallback) {
|
|
7382
|
-
if (!isHydrating) {
|
|
7546
|
+
if (!isHydrating && !suspense.isFallbackMountPending) {
|
|
7383
7547
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7384
7548
|
setActiveBranch(suspense, newFallback);
|
|
7385
7549
|
}
|
|
@@ -7400,7 +7564,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7400
7564
|
if (isInFallback) {
|
|
7401
7565
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
7402
7566
|
if (suspense.deps <= 0) suspense.resolve();
|
|
7403
|
-
else {
|
|
7567
|
+
else if (!suspense.isFallbackMountPending) {
|
|
7404
7568
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7405
7569
|
setActiveBranch(suspense, newFallback);
|
|
7406
7570
|
}
|
|
@@ -7526,8 +7690,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7526
7690
|
const mountFallback = () => {
|
|
7527
7691
|
suspense.isFallbackMountPending = false;
|
|
7528
7692
|
if (!suspense.isInFallback) return;
|
|
7529
|
-
|
|
7530
|
-
|
|
7693
|
+
const latestFallback = suspense.vnode.ssFallback;
|
|
7694
|
+
patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7695
|
+
setActiveBranch(suspense, latestFallback);
|
|
7531
7696
|
};
|
|
7532
7697
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
7533
7698
|
if (delayEnter) {
|
|
@@ -7603,9 +7768,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7603
7768
|
return s;
|
|
7604
7769
|
}
|
|
7605
7770
|
function queueEffectWithSuspense(fn, id, suspense) {
|
|
7606
|
-
if (suspense && suspense.pendingBranch)
|
|
7607
|
-
|
|
7608
|
-
|
|
7771
|
+
if (suspense && suspense.pendingBranch) {
|
|
7772
|
+
if (isArray(fn)) suspense.effects.push(...fn);
|
|
7773
|
+
else suspense.effects.push(fn);
|
|
7774
|
+
} else queuePostFlushCb(fn, id);
|
|
7609
7775
|
}
|
|
7610
7776
|
function setActiveBranch(suspense, branch) {
|
|
7611
7777
|
suspense.activeBranch = branch;
|
|
@@ -7799,8 +7965,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7799
7965
|
if (isVNode(type)) {
|
|
7800
7966
|
const cloned = cloneVNode(type, props, true);
|
|
7801
7967
|
if (children) normalizeChildren(cloned, children);
|
|
7802
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock)
|
|
7803
|
-
|
|
7968
|
+
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
|
|
7969
|
+
if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
7970
|
+
else currentBlock.push(cloned);
|
|
7971
|
+
}
|
|
7804
7972
|
cloned.patchFlag = -2;
|
|
7805
7973
|
return cloned;
|
|
7806
7974
|
}
|
|
@@ -7860,7 +8028,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7860
8028
|
ce: vnode.ce,
|
|
7861
8029
|
vi: vnode.vi,
|
|
7862
8030
|
vs: cloneVaporSlotMeta(vnode),
|
|
7863
|
-
vb: vnode.vb
|
|
8031
|
+
vb: vnode.vb,
|
|
8032
|
+
ibu: vnode.ibu,
|
|
8033
|
+
iu: vnode.iu
|
|
7864
8034
|
};
|
|
7865
8035
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
7866
8036
|
return cloned;
|
|
@@ -7923,25 +8093,28 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7923
8093
|
const { shapeFlag } = vnode;
|
|
7924
8094
|
if (children == null) children = null;
|
|
7925
8095
|
else if (isArray(children)) type = 16;
|
|
7926
|
-
else if (typeof children === "object")
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
8096
|
+
else if (typeof children === "object") {
|
|
8097
|
+
if (shapeFlag & 65) {
|
|
8098
|
+
const slot = children.default;
|
|
8099
|
+
if (slot) {
|
|
8100
|
+
slot._c && (slot._d = false);
|
|
8101
|
+
normalizeChildren(vnode, slot());
|
|
8102
|
+
slot._c && (slot._d = true);
|
|
8103
|
+
}
|
|
8104
|
+
return;
|
|
8105
|
+
} else {
|
|
8106
|
+
type = 32;
|
|
8107
|
+
const slotFlag = children._;
|
|
8108
|
+
if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
|
|
8109
|
+
else if (slotFlag === 3 && currentRenderingInstance) {
|
|
8110
|
+
if (currentRenderingInstance.slots._ === 1) children._ = 1;
|
|
8111
|
+
else {
|
|
8112
|
+
children._ = 2;
|
|
8113
|
+
vnode.patchFlag |= 1024;
|
|
8114
|
+
}
|
|
8115
|
+
}
|
|
7942
8116
|
}
|
|
7943
|
-
}
|
|
7944
|
-
else if (isFunction(children)) {
|
|
8117
|
+
} else if (isFunction(children)) {
|
|
7945
8118
|
if (shapeFlag & 65) {
|
|
7946
8119
|
normalizeChildren(vnode, { default: children });
|
|
7947
8120
|
return;
|
|
@@ -8050,7 +8223,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8050
8223
|
};
|
|
8051
8224
|
//#endregion
|
|
8052
8225
|
//#region packages/runtime-core/src/component.ts
|
|
8053
|
-
const emptyAppContext =
|
|
8226
|
+
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
8054
8227
|
let uid = 0;
|
|
8055
8228
|
function createComponentInstance(vnode, parent, suspense) {
|
|
8056
8229
|
const type = vnode.type;
|
|
@@ -8247,10 +8420,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8247
8420
|
restoreCurrentInstance(prevInstance);
|
|
8248
8421
|
}
|
|
8249
8422
|
}
|
|
8250
|
-
if (!Component.render && instance.render === NOOP && !isSSR)
|
|
8423
|
+
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
8424
|
+
if (!compile && Component.template)
|
|
8251
8425
|
/* v8 ignore start */
|
|
8252
|
-
|
|
8253
|
-
|
|
8426
|
+
warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Use \"vue.global.js\" instead.");
|
|
8427
|
+
else warn$1(`Component is missing template or render function: `, Component);
|
|
8428
|
+
}
|
|
8254
8429
|
}
|
|
8255
8430
|
const attrsProxyHandlers = {
|
|
8256
8431
|
get(target, key) {
|
|
@@ -8358,11 +8533,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8358
8533
|
try {
|
|
8359
8534
|
setBlockTracking(-1);
|
|
8360
8535
|
const l = arguments.length;
|
|
8361
|
-
if (l === 2)
|
|
8362
|
-
if (
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8536
|
+
if (l === 2) {
|
|
8537
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
8538
|
+
if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
|
|
8539
|
+
return createVNode(type, propsOrChildren);
|
|
8540
|
+
} else return createVNode(type, null, propsOrChildren);
|
|
8541
|
+
} else {
|
|
8366
8542
|
if (l > 3) children = Array.prototype.slice.call(arguments, 2);
|
|
8367
8543
|
else if (l === 3 && isVNode(children)) children = [children];
|
|
8368
8544
|
return createVNode(type, propsOrChildren, children);
|
|
@@ -8554,7 +8730,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8554
8730
|
}
|
|
8555
8731
|
//#endregion
|
|
8556
8732
|
//#region packages/runtime-core/src/index.ts
|
|
8557
|
-
const version = "3.6.0-rc.
|
|
8733
|
+
const version = "3.6.0-rc.6";
|
|
8558
8734
|
const warn = warn$1;
|
|
8559
8735
|
/**
|
|
8560
8736
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -8582,7 +8758,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8582
8758
|
let policy = void 0;
|
|
8583
8759
|
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
8584
8760
|
if (tt) try {
|
|
8585
|
-
policy =
|
|
8761
|
+
policy = /*@__PURE__*/ tt.createPolicy("vue", { createHTML: (val) => val });
|
|
8586
8762
|
} catch (e) {
|
|
8587
8763
|
warn(`Error creating trusted types policy: ${e}`);
|
|
8588
8764
|
}
|
|
@@ -8590,7 +8766,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8590
8766
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
8591
8767
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
8592
8768
|
const doc = typeof document !== "undefined" ? document : null;
|
|
8593
|
-
const templateContainer = doc &&
|
|
8769
|
+
const templateContainer = doc && /*@__PURE__*/ doc.createElement("template");
|
|
8594
8770
|
const nodeOps = {
|
|
8595
8771
|
insert: (child, parent, anchor) => {
|
|
8596
8772
|
parent.insertBefore(child, anchor || null);
|
|
@@ -8664,7 +8840,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8664
8840
|
leaveActiveClass: String,
|
|
8665
8841
|
leaveToClass: String
|
|
8666
8842
|
};
|
|
8667
|
-
const TransitionPropsValidators =
|
|
8843
|
+
const TransitionPropsValidators = /*@__PURE__*/ extend({}, BaseTransitionPropsValidators, DOMTransitionPropsValidators);
|
|
8668
8844
|
/**
|
|
8669
8845
|
* Wrap logic that attaches extra properties to Transition in a function
|
|
8670
8846
|
* so that it can be annotated as pure
|
|
@@ -8678,7 +8854,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8678
8854
|
* DOM Transition is a higher-order-component based on the platform-agnostic
|
|
8679
8855
|
* base Transition component, with DOM-specific logic.
|
|
8680
8856
|
*/
|
|
8681
|
-
const Transition =
|
|
8857
|
+
const Transition = /*@__PURE__*/ decorate$1((props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots));
|
|
8682
8858
|
/**
|
|
8683
8859
|
* #3227 Incoming hooks may be merged into arrays when wrapping Transition
|
|
8684
8860
|
* with custom HOCs.
|
|
@@ -8900,14 +9076,15 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8900
9076
|
},
|
|
8901
9077
|
updated(el, { value, oldValue }, { transition }) {
|
|
8902
9078
|
if (!value === !oldValue) return;
|
|
8903
|
-
if (transition)
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
9079
|
+
if (transition) {
|
|
9080
|
+
if (value) {
|
|
9081
|
+
transition.beforeEnter(el);
|
|
9082
|
+
setDisplay(el, true);
|
|
9083
|
+
transition.enter(el);
|
|
9084
|
+
} else transition.leave(el, () => {
|
|
9085
|
+
setDisplay(el, false);
|
|
9086
|
+
});
|
|
9087
|
+
} else setDisplay(el, value);
|
|
8911
9088
|
},
|
|
8912
9089
|
beforeUnmount(el, { value }) {
|
|
8913
9090
|
setDisplay(el, value);
|
|
@@ -9009,11 +9186,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9009
9186
|
const isCssString = isString(next);
|
|
9010
9187
|
let hasControlledDisplay = false;
|
|
9011
9188
|
if (next && !isCssString) {
|
|
9012
|
-
if (prev)
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9189
|
+
if (prev) {
|
|
9190
|
+
if (!isString(prev)) {
|
|
9191
|
+
for (const key in prev) if (next[key] == null) setStyle(style, key, "");
|
|
9192
|
+
} else for (const prevStyle of prev.split(";")) {
|
|
9193
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
9194
|
+
if (next[key] == null) setStyle(style, key, "");
|
|
9195
|
+
}
|
|
9017
9196
|
}
|
|
9018
9197
|
for (const key in next) {
|
|
9019
9198
|
if (key === "display") hasControlledDisplay = true;
|
|
@@ -9042,8 +9221,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9042
9221
|
else {
|
|
9043
9222
|
const val = rawVal == null ? "" : String(rawVal);
|
|
9044
9223
|
if (semicolonRE.test(val)) warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
9045
|
-
if (name.startsWith("--"))
|
|
9046
|
-
|
|
9224
|
+
if (name.startsWith("--")) {
|
|
9225
|
+
if (importantRE.test(val)) style.setProperty(name, val.replace(importantRE, ""), "important");
|
|
9226
|
+
else style.setProperty(name, val);
|
|
9227
|
+
} else {
|
|
9047
9228
|
const prefixed = autoPrefix(style, name);
|
|
9048
9229
|
if (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
|
|
9049
9230
|
else style[prefixed] = val;
|
|
@@ -9080,9 +9261,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9080
9261
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
9081
9262
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
9082
9263
|
function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
|
|
9083
|
-
if (isSVG && key.startsWith("xlink:"))
|
|
9084
|
-
|
|
9085
|
-
|
|
9264
|
+
if (isSVG && key.startsWith("xlink:")) {
|
|
9265
|
+
if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
9266
|
+
else el.setAttributeNS(xlinkNS, key, value);
|
|
9267
|
+
} else if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
|
|
9086
9268
|
else el.setAttribute(key, isBoolean ? "" : isSymbol(value) ? String(value) : value);
|
|
9087
9269
|
}
|
|
9088
9270
|
//#endregion
|
|
@@ -9155,7 +9337,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9155
9337
|
return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
|
|
9156
9338
|
}
|
|
9157
9339
|
let cachedNow = 0;
|
|
9158
|
-
const p =
|
|
9340
|
+
const p = /*@__PURE__*/ Promise.resolve();
|
|
9159
9341
|
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
9160
9342
|
function createInvoker(initialValue, instance) {
|
|
9161
9343
|
const invoker = (e) => {
|
|
@@ -9223,7 +9405,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9223
9405
|
//#endregion
|
|
9224
9406
|
//#region packages/runtime-dom/src/apiCustomElement.ts
|
|
9225
9407
|
const REMOVAL = {};
|
|
9226
|
-
|
|
9408
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
9227
9409
|
function defineCustomElement(options, extraOptions, _createApp) {
|
|
9228
9410
|
let Comp = /* @__PURE__ */ defineComponent(options, extraOptions);
|
|
9229
9411
|
if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
|
|
@@ -9272,12 +9454,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9272
9454
|
this._parent = parent;
|
|
9273
9455
|
break;
|
|
9274
9456
|
}
|
|
9275
|
-
if (!this._instance)
|
|
9276
|
-
|
|
9277
|
-
this._pendingResolve =
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9457
|
+
if (!this._instance) {
|
|
9458
|
+
if (this._resolved) this._mountComponent(this._def);
|
|
9459
|
+
else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
|
|
9460
|
+
this._pendingResolve = void 0;
|
|
9461
|
+
if (this.isConnected) return this._resolveDef();
|
|
9462
|
+
});
|
|
9463
|
+
else this._resolveDef();
|
|
9464
|
+
}
|
|
9281
9465
|
}
|
|
9282
9466
|
disconnectedCallback() {
|
|
9283
9467
|
this._connected = false;
|
|
@@ -9659,7 +9843,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9659
9843
|
};
|
|
9660
9844
|
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
9661
9845
|
name: "TransitionGroup",
|
|
9662
|
-
props:
|
|
9846
|
+
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
9663
9847
|
tag: String,
|
|
9664
9848
|
moveClass: String
|
|
9665
9849
|
}),
|
|
@@ -9940,19 +10124,39 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9940
10124
|
el._modelValue = value;
|
|
9941
10125
|
addEventListener(el, "change", () => {
|
|
9942
10126
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
9943
|
-
|
|
9944
|
-
el.
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
10127
|
+
const multiple = el.multiple;
|
|
10128
|
+
const assignedValue = multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
|
|
10129
|
+
const pending = el._pendingValue = [multiple, multiple ? isArray(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue];
|
|
10130
|
+
try {
|
|
10131
|
+
(set || el[assignKey])(assignedValue);
|
|
10132
|
+
} finally {
|
|
10133
|
+
nextTick(() => {
|
|
10134
|
+
if (el._pendingValue === pending) el._pendingValue = void 0;
|
|
10135
|
+
});
|
|
10136
|
+
}
|
|
9948
10137
|
});
|
|
9949
10138
|
};
|
|
10139
|
+
function isSameSelectValue(value, assignedValue, multiple) {
|
|
10140
|
+
if (!multiple) return looseEqual(value, assignedValue);
|
|
10141
|
+
if (isArray(value)) return looseEqual(value, assignedValue);
|
|
10142
|
+
if (isSet(value)) {
|
|
10143
|
+
if (value.size !== assignedValue.length) return false;
|
|
10144
|
+
for (const item of assignedValue) if (!value.has(item)) return false;
|
|
10145
|
+
return true;
|
|
10146
|
+
}
|
|
10147
|
+
return false;
|
|
10148
|
+
}
|
|
9950
10149
|
/**
|
|
9951
10150
|
* @internal
|
|
9952
10151
|
*/
|
|
9953
10152
|
const vModelSetSelected = (el, value) => {
|
|
9954
10153
|
el._modelValue = value;
|
|
9955
|
-
|
|
10154
|
+
const pending = el._pendingValue;
|
|
10155
|
+
el._pendingValue = void 0;
|
|
10156
|
+
if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
|
|
10157
|
+
setSelected(el, value);
|
|
10158
|
+
};
|
|
10159
|
+
function setSelected(el, value) {
|
|
9956
10160
|
const isMultiple = el.multiple;
|
|
9957
10161
|
const isArrayValue = isArray(value);
|
|
9958
10162
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -9962,18 +10166,19 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9962
10166
|
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
9963
10167
|
const option = el.options[i];
|
|
9964
10168
|
const optionValue = getValue(option);
|
|
9965
|
-
if (isMultiple)
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
10169
|
+
if (isMultiple) {
|
|
10170
|
+
if (isArrayValue) {
|
|
10171
|
+
const optionType = typeof optionValue;
|
|
10172
|
+
if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
|
|
10173
|
+
else option.selected = looseIndexOf(value, optionValue) > -1;
|
|
10174
|
+
} else option.selected = value.has(optionValue);
|
|
10175
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
9971
10176
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
9972
10177
|
return;
|
|
9973
10178
|
}
|
|
9974
10179
|
}
|
|
9975
10180
|
if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
|
|
9976
|
-
}
|
|
10181
|
+
}
|
|
9977
10182
|
/**
|
|
9978
10183
|
* @internal retrieve raw value set via :value bindings
|
|
9979
10184
|
*/
|
|
@@ -10075,7 +10280,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
10075
10280
|
};
|
|
10076
10281
|
//#endregion
|
|
10077
10282
|
//#region packages/runtime-dom/src/index.ts
|
|
10078
|
-
const rendererOptions =
|
|
10283
|
+
const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
|
|
10079
10284
|
let renderer;
|
|
10080
10285
|
let enabledHydration = false;
|
|
10081
10286
|
function ensureRenderer() {
|