@vue/runtime-dom 3.6.0-rc.5 → 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 +628 -436
- 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 +628 -436
- 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;
|
|
@@ -3809,11 +3870,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3809
3870
|
let nextNode = null;
|
|
3810
3871
|
switch (type) {
|
|
3811
3872
|
case Text:
|
|
3812
|
-
if (domType !== 3)
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
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 {
|
|
3817
3879
|
if (node.data !== vnode.children) {
|
|
3818
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)}`);
|
|
3819
3881
|
logMismatchError();
|
|
@@ -3852,9 +3914,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3852
3914
|
case VaporSlot:
|
|
3853
3915
|
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
3854
3916
|
break;
|
|
3855
|
-
default: if (shapeFlag & 1)
|
|
3856
|
-
|
|
3857
|
-
|
|
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) {
|
|
3858
3921
|
vnode.slotScopeIds = slotScopeIds;
|
|
3859
3922
|
const container = parentNode(node);
|
|
3860
3923
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
@@ -3876,19 +3939,20 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3876
3939
|
} else {
|
|
3877
3940
|
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
3878
3941
|
const component = vnode.component;
|
|
3879
|
-
if (isAsyncWrapper(vnode)
|
|
3942
|
+
if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep && !component.asyncResolved)) {
|
|
3880
3943
|
let subTree;
|
|
3881
3944
|
if (isFragmentStart) {
|
|
3882
|
-
subTree = createVNode(
|
|
3945
|
+
subTree = createVNode(Static);
|
|
3883
3946
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
3884
3947
|
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
3885
3948
|
subTree.el = node;
|
|
3886
3949
|
component.subTree = subTree;
|
|
3887
3950
|
}
|
|
3888
3951
|
}
|
|
3889
|
-
} else if (shapeFlag & 64)
|
|
3890
|
-
|
|
3891
|
-
|
|
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);
|
|
3892
3956
|
else warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
3893
3957
|
}
|
|
3894
3958
|
if (ref != null) setRef(ref, null, parentSuspense, vnode);
|
|
@@ -4029,8 +4093,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4029
4093
|
node = nextSibling(node);
|
|
4030
4094
|
if (node && isComment(node)) {
|
|
4031
4095
|
if (node.data === open) match++;
|
|
4032
|
-
if (node.data === close)
|
|
4033
|
-
|
|
4096
|
+
if (node.data === close) {
|
|
4097
|
+
if (match === 0) return nextSibling(node);
|
|
4098
|
+
else match--;
|
|
4099
|
+
}
|
|
4034
4100
|
}
|
|
4035
4101
|
}
|
|
4036
4102
|
return node;
|
|
@@ -4052,7 +4118,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4052
4118
|
/**
|
|
4053
4119
|
* Dev only
|
|
4054
4120
|
*/
|
|
4055
|
-
const resourceProps =
|
|
4121
|
+
const resourceProps = /*@__PURE__*/ new Set([
|
|
4056
4122
|
"src",
|
|
4057
4123
|
"srcset",
|
|
4058
4124
|
"href",
|
|
@@ -4294,7 +4360,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4294
4360
|
//#endregion
|
|
4295
4361
|
//#region packages/runtime-core/src/apiAsyncComponent.ts
|
|
4296
4362
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
4297
|
-
|
|
4363
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
4298
4364
|
function defineAsyncComponent(source) {
|
|
4299
4365
|
const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
|
|
4300
4366
|
return /* @__PURE__ */ defineComponent({
|
|
@@ -4509,10 +4575,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4509
4575
|
});
|
|
4510
4576
|
let pendingCacheKey = null;
|
|
4511
4577
|
const cacheSubtree = () => {
|
|
4512
|
-
if (pendingCacheKey != null)
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
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
|
+
}
|
|
4516
4585
|
};
|
|
4517
4586
|
onMounted(cacheSubtree);
|
|
4518
4587
|
onUpdated(cacheSubtree);
|
|
@@ -4754,23 +4823,25 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4754
4823
|
}
|
|
4755
4824
|
ret = new Array(source.length);
|
|
4756
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]);
|
|
4757
|
-
} else if (typeof source === "number")
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
4765
|
-
else {
|
|
4766
|
-
const keys = Object.keys(source);
|
|
4767
|
-
ret = new Array(keys.length);
|
|
4768
|
-
for (let i = 0, l = keys.length; i < l; i++) {
|
|
4769
|
-
const key = keys[i];
|
|
4770
|
-
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]);
|
|
4771
4833
|
}
|
|
4772
|
-
}
|
|
4773
|
-
|
|
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 = [];
|
|
4774
4845
|
if (cache) cache[index] = ret;
|
|
4775
4846
|
return ret;
|
|
4776
4847
|
}
|
|
@@ -4795,14 +4866,27 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4795
4866
|
//#endregion
|
|
4796
4867
|
//#region packages/runtime-core/src/helpers/renderSlot.ts
|
|
4797
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
|
+
/**
|
|
4798
4882
|
* Compiler runtime helper for rendering `<slot/>`
|
|
4799
4883
|
* @private
|
|
4800
4884
|
*/
|
|
4801
4885
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
4802
4886
|
if (props == null) props = {};
|
|
4803
4887
|
let slot = slots[name];
|
|
4804
|
-
if (fallback) fallback
|
|
4805
|
-
const vaporSlot = slot &&
|
|
4888
|
+
if (fallback) fallback[vdomSlotFallbackKey] = true;
|
|
4889
|
+
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
4806
4890
|
if (vaporSlot) {
|
|
4807
4891
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
4808
4892
|
ret.vs = {
|
|
@@ -4879,11 +4963,38 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4879
4963
|
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
4880
4964
|
return getPublicInstance(i.parent);
|
|
4881
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
|
+
};
|
|
4882
4993
|
let publicPropertiesMap;
|
|
4883
4994
|
const getPublicPropertiesMap = () => {
|
|
4884
4995
|
if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
|
|
4885
4996
|
$: (i) => i,
|
|
4886
|
-
$el: (i) => i
|
|
4997
|
+
$el: (i) => getDevRootFragmentEl(i),
|
|
4887
4998
|
$data: (i) => i.data,
|
|
4888
4999
|
$props: (i) => /* @__PURE__ */ shallowReadonly(i.props),
|
|
4889
5000
|
$attrs: (i) => /* @__PURE__ */ shallowReadonly(i.attrs),
|
|
@@ -4989,7 +5100,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4989
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.");
|
|
4990
5101
|
return Reflect.ownKeys(target);
|
|
4991
5102
|
};
|
|
4992
|
-
const RuntimeCompiledPublicInstanceProxyHandlers =
|
|
5103
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
|
|
4993
5104
|
get(target, key) {
|
|
4994
5105
|
if (key === Symbol.unscopables) return;
|
|
4995
5106
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
@@ -5161,12 +5272,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5161
5272
|
for (const key in defaults) {
|
|
5162
5273
|
if (key.startsWith("__skip")) continue;
|
|
5163
5274
|
let opt = props[key];
|
|
5164
|
-
if (opt)
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
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] };
|
|
5170
5282
|
else warn$1(`props default key "${key}" has no corresponding declaration.`);
|
|
5171
5283
|
if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
|
|
5172
5284
|
}
|
|
@@ -5309,11 +5421,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5309
5421
|
const opt = computedOptions[key];
|
|
5310
5422
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
5311
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
|
+
};
|
|
5312
5427
|
const c = computed({
|
|
5313
5428
|
get,
|
|
5314
|
-
set
|
|
5315
|
-
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
5316
|
-
}
|
|
5429
|
+
set
|
|
5317
5430
|
});
|
|
5318
5431
|
Object.defineProperty(ctx, key, {
|
|
5319
5432
|
enumerable: true,
|
|
@@ -5369,9 +5482,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5369
5482
|
for (const key in injectOptions) {
|
|
5370
5483
|
const opt = injectOptions[key];
|
|
5371
5484
|
let injected;
|
|
5372
|
-
if (isObject(opt))
|
|
5373
|
-
|
|
5374
|
-
|
|
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);
|
|
5375
5489
|
if (/* @__PURE__ */ isRef(injected)) Object.defineProperty(ctx, key, {
|
|
5376
5490
|
enumerable: true,
|
|
5377
5491
|
configurable: true,
|
|
@@ -5392,13 +5506,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5392
5506
|
if (isFunction(handler)) watch(getter, handler);
|
|
5393
5507
|
else warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
5394
5508
|
} else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
|
|
5395
|
-
else if (isObject(raw))
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
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);
|
|
5402
5517
|
}
|
|
5403
5518
|
/**
|
|
5404
5519
|
* Resolve merged options and cache it on the component.
|
|
@@ -5484,7 +5599,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5484
5599
|
}
|
|
5485
5600
|
function mergeEmitsOrPropsOptions(to, from) {
|
|
5486
5601
|
if (to) {
|
|
5487
|
-
if (isArray(to) && isArray(from)) return [
|
|
5602
|
+
if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
5488
5603
|
return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
|
|
5489
5604
|
} else return from;
|
|
5490
5605
|
}
|
|
@@ -5603,8 +5718,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5603
5718
|
} else warn$1(`Cannot unmount an app that is not mounted.`);
|
|
5604
5719
|
},
|
|
5605
5720
|
provide(key, value) {
|
|
5606
|
-
if (key in context.provides)
|
|
5607
|
-
|
|
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
|
+
}
|
|
5608
5725
|
context.provides[key] = value;
|
|
5609
5726
|
return app;
|
|
5610
5727
|
},
|
|
@@ -5711,12 +5828,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5711
5828
|
if (instance.isUnmounted) return;
|
|
5712
5829
|
{
|
|
5713
5830
|
const { emitsOptions, propsOptions } = instance;
|
|
5714
|
-
if (emitsOptions)
|
|
5715
|
-
if (!
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
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
|
+
}
|
|
5720
5839
|
}
|
|
5721
5840
|
}
|
|
5722
5841
|
}
|
|
@@ -5725,7 +5844,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5725
5844
|
const modifiers = isModelListener && getModelModifiers(props, event.slice(7), getter);
|
|
5726
5845
|
if (modifiers) {
|
|
5727
5846
|
if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
5728
|
-
if (modifiers.number) args =
|
|
5847
|
+
if (modifiers.number) args = args.map(looseToNumber);
|
|
5729
5848
|
}
|
|
5730
5849
|
devtoolsComponentEmit(instance, event, args);
|
|
5731
5850
|
{
|
|
@@ -5905,10 +6024,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5905
6024
|
for (let i = 0; i < children.length; i++) {
|
|
5906
6025
|
const child = children[i];
|
|
5907
6026
|
if (isVNode(child)) {
|
|
5908
|
-
if (child.type !== Comment || child.children === "v-if")
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
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
|
+
}
|
|
5912
6033
|
}
|
|
5913
6034
|
} else return;
|
|
5914
6035
|
}
|
|
@@ -6029,16 +6150,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6029
6150
|
let key = propsToUpdate[i];
|
|
6030
6151
|
if (isEmitListener(instance.emitsOptions, key)) continue;
|
|
6031
6152
|
const value = rawProps[key];
|
|
6032
|
-
if (options)
|
|
6033
|
-
if (
|
|
6034
|
-
attrs[key]
|
|
6035
|
-
|
|
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);
|
|
6036
6162
|
}
|
|
6037
|
-
} else {
|
|
6038
|
-
const camelizedKey = camelize(key);
|
|
6039
|
-
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
6040
|
-
}
|
|
6041
|
-
else if (value !== attrs[key]) {
|
|
6163
|
+
} else if (value !== attrs[key]) {
|
|
6042
6164
|
attrs[key] = value;
|
|
6043
6165
|
hasAttrsChanged = true;
|
|
6044
6166
|
}
|
|
@@ -6047,9 +6169,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6047
6169
|
} else {
|
|
6048
6170
|
if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
|
|
6049
6171
|
let kebabKey;
|
|
6050
|
-
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))
|
|
6051
|
-
if (
|
|
6052
|
-
|
|
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
|
+
}
|
|
6053
6177
|
if (attrs !== rawCurrentProps) {
|
|
6054
6178
|
for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {
|
|
6055
6179
|
delete attrs[key];
|
|
@@ -6068,9 +6192,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6068
6192
|
if (isReservedProp(key)) continue;
|
|
6069
6193
|
const value = rawProps[key];
|
|
6070
6194
|
let camelKey;
|
|
6071
|
-
if (options && hasOwn(options, camelKey = camelize(key)))
|
|
6072
|
-
|
|
6073
|
-
|
|
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)) {
|
|
6074
6199
|
if (!(key in attrs) || value !== attrs[key]) {
|
|
6075
6200
|
attrs[key] = value;
|
|
6076
6201
|
hasAttrsChanged = true;
|
|
@@ -6233,7 +6358,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6233
6358
|
}
|
|
6234
6359
|
if (validator && !validator(value, /* @__PURE__ */ shallowReadonly(resolvedProps))) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
|
|
6235
6360
|
}
|
|
6236
|
-
const isSimpleType =
|
|
6361
|
+
const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
|
|
6237
6362
|
/**
|
|
6238
6363
|
* dev only
|
|
6239
6364
|
*/
|
|
@@ -6346,12 +6471,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6346
6471
|
let deletionComparisonTarget = EMPTY_OBJ;
|
|
6347
6472
|
if (vnode.shapeFlag & 32) {
|
|
6348
6473
|
const type = children._;
|
|
6349
|
-
if (type)
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
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 {
|
|
6355
6481
|
needDeletionCheck = !children.$stable;
|
|
6356
6482
|
normalizeObjectSlots(children, slots, instance);
|
|
6357
6483
|
}
|
|
@@ -6369,7 +6495,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6369
6495
|
let supported;
|
|
6370
6496
|
let perf;
|
|
6371
6497
|
let cachedNow$1 = 0;
|
|
6372
|
-
const p$1 =
|
|
6498
|
+
const p$1 = /*@__PURE__*/ Promise.resolve();
|
|
6373
6499
|
const getNow$1 = () => cachedNow$1 || (p$1.then(() => cachedNow$1 = 0), cachedNow$1 = isSupported() ? perf.now() : Date.now());
|
|
6374
6500
|
/**
|
|
6375
6501
|
* @internal
|
|
@@ -6585,7 +6711,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6585
6711
|
for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
|
|
6586
6712
|
};
|
|
6587
6713
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
6588
|
-
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
|
+
}
|
|
6589
6718
|
};
|
|
6590
6719
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6591
6720
|
const el = n2.el = n1.el;
|
|
@@ -6597,6 +6726,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6597
6726
|
let vnodeHook;
|
|
6598
6727
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
6599
6728
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6729
|
+
if (n2.ibu) n2.ibu();
|
|
6600
6730
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6601
6731
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
6602
6732
|
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -6630,8 +6760,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6630
6760
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
6631
6761
|
}
|
|
6632
6762
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
6633
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
|
|
6763
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
6634
6764
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6765
|
+
n2.iu && n2.iu();
|
|
6635
6766
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6636
6767
|
}, void 0, parentSuspense);
|
|
6637
6768
|
};
|
|
@@ -6639,7 +6770,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6639
6770
|
for (let i = 0; i < newChildren.length; i++) {
|
|
6640
6771
|
const oldVNode = oldChildren[i];
|
|
6641
6772
|
const newVNode = newChildren[i];
|
|
6642
|
-
|
|
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);
|
|
6643
6775
|
}
|
|
6644
6776
|
};
|
|
6645
6777
|
const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
|
|
@@ -6677,41 +6809,46 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6677
6809
|
};
|
|
6678
6810
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6679
6811
|
n2.slotScopeIds = slotScopeIds;
|
|
6680
|
-
if (n2.type.__vapor)
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
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
|
+
}
|
|
6687
6831
|
}
|
|
6688
|
-
}
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
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);
|
|
6696
6847
|
}
|
|
6697
|
-
}
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6702
|
-
}, () => {
|
|
6703
|
-
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
6704
|
-
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
6705
|
-
});
|
|
6706
|
-
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
6707
|
-
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
|
|
6708
|
-
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6709
|
-
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
6710
|
-
}, void 0, parentSuspense);
|
|
6711
|
-
}
|
|
6712
|
-
else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
6713
|
-
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
6714
|
-
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);
|
|
6715
6852
|
};
|
|
6716
6853
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
|
|
6717
6854
|
const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
|
|
@@ -6752,16 +6889,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6752
6889
|
};
|
|
6753
6890
|
const updateComponent = (n1, n2, optimized) => {
|
|
6754
6891
|
const instance = n2.component = n1.component;
|
|
6755
|
-
if (shouldUpdateComponent(n1, n2, optimized))
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
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
|
+
}
|
|
6760
6902
|
} else {
|
|
6761
|
-
instance.next = n2;
|
|
6762
|
-
instance.effect.run();
|
|
6763
|
-
}
|
|
6764
|
-
else {
|
|
6765
6903
|
n2.el = n1.el;
|
|
6766
6904
|
instance.vnode = n2;
|
|
6767
6905
|
}
|
|
@@ -6859,6 +6997,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6859
6997
|
} else next = vnode;
|
|
6860
6998
|
if (bu) invokeArrayFns(bu);
|
|
6861
6999
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
7000
|
+
if (next.ibu) next.ibu();
|
|
6862
7001
|
toggleRecurse(instance, true);
|
|
6863
7002
|
startMeasure(instance, `render`);
|
|
6864
7003
|
const nextTree = renderComponentRoot(instance);
|
|
@@ -6871,7 +7010,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6871
7010
|
next.el = nextTree.el;
|
|
6872
7011
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
6873
7012
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
6874
|
-
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);
|
|
6875
7017
|
devtoolsComponentUpdated(instance);
|
|
6876
7018
|
popWarningContext();
|
|
6877
7019
|
}
|
|
@@ -6911,9 +7053,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6911
7053
|
if (shapeFlag & 8) {
|
|
6912
7054
|
if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
|
|
6913
7055
|
if (c2 !== c1) hostSetElementText(container, c2);
|
|
6914
|
-
} else if (prevShapeFlag & 16)
|
|
6915
|
-
|
|
6916
|
-
|
|
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 {
|
|
6917
7060
|
if (prevShapeFlag & 8) hostSetElementText(container, "");
|
|
6918
7061
|
if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6919
7062
|
}
|
|
@@ -7012,8 +7155,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7012
7155
|
const anchorVNode = c2[nextIndex + 1];
|
|
7013
7156
|
const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
|
|
7014
7157
|
if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
7015
|
-
else if (moved)
|
|
7016
|
-
|
|
7158
|
+
else if (moved) {
|
|
7159
|
+
if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
|
|
7160
|
+
else j--;
|
|
7161
|
+
}
|
|
7017
7162
|
}
|
|
7018
7163
|
}
|
|
7019
7164
|
};
|
|
@@ -7045,26 +7190,27 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7045
7190
|
moveStaticNode(vnode, container, anchor);
|
|
7046
7191
|
return;
|
|
7047
7192
|
}
|
|
7048
|
-
if (moveType !== 2 && shapeFlag & 1 && transition)
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
const
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
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);
|
|
7068
7214
|
};
|
|
7069
7215
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
7070
7216
|
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
|
|
@@ -7084,16 +7230,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7084
7230
|
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
7085
7231
|
let vnodeHook;
|
|
7086
7232
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
7087
|
-
if (shapeFlag & 6)
|
|
7088
|
-
if (
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
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 {
|
|
7097
7244
|
if (shapeFlag & 128) {
|
|
7098
7245
|
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
7099
7246
|
return;
|
|
@@ -7225,12 +7372,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7225
7372
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
7226
7373
|
}
|
|
7227
7374
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
7228
|
-
if (!vapor)
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
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
|
+
}
|
|
7234
7383
|
}
|
|
7235
7384
|
}
|
|
7236
7385
|
function needTransition(parentSuspense, transition) {
|
|
@@ -7270,8 +7419,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7270
7419
|
}
|
|
7271
7420
|
function locateNonHydratedAsyncRoot(instance) {
|
|
7272
7421
|
const subComponent = instance.subTree && instance.subTree.component;
|
|
7273
|
-
if (subComponent)
|
|
7274
|
-
|
|
7422
|
+
if (subComponent) {
|
|
7423
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
7424
|
+
else return locateNonHydratedAsyncRoot(subComponent);
|
|
7425
|
+
}
|
|
7275
7426
|
}
|
|
7276
7427
|
function invalidateMount(hooks) {
|
|
7277
7428
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
@@ -7392,7 +7543,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7392
7543
|
patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
7393
7544
|
if (suspense.deps <= 0) suspense.resolve();
|
|
7394
7545
|
else if (isInFallback) {
|
|
7395
|
-
if (!isHydrating) {
|
|
7546
|
+
if (!isHydrating && !suspense.isFallbackMountPending) {
|
|
7396
7547
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7397
7548
|
setActiveBranch(suspense, newFallback);
|
|
7398
7549
|
}
|
|
@@ -7413,7 +7564,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7413
7564
|
if (isInFallback) {
|
|
7414
7565
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
7415
7566
|
if (suspense.deps <= 0) suspense.resolve();
|
|
7416
|
-
else {
|
|
7567
|
+
else if (!suspense.isFallbackMountPending) {
|
|
7417
7568
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7418
7569
|
setActiveBranch(suspense, newFallback);
|
|
7419
7570
|
}
|
|
@@ -7539,8 +7690,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7539
7690
|
const mountFallback = () => {
|
|
7540
7691
|
suspense.isFallbackMountPending = false;
|
|
7541
7692
|
if (!suspense.isInFallback) return;
|
|
7542
|
-
|
|
7543
|
-
|
|
7693
|
+
const latestFallback = suspense.vnode.ssFallback;
|
|
7694
|
+
patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
7695
|
+
setActiveBranch(suspense, latestFallback);
|
|
7544
7696
|
};
|
|
7545
7697
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
7546
7698
|
if (delayEnter) {
|
|
@@ -7616,9 +7768,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7616
7768
|
return s;
|
|
7617
7769
|
}
|
|
7618
7770
|
function queueEffectWithSuspense(fn, id, suspense) {
|
|
7619
|
-
if (suspense && suspense.pendingBranch)
|
|
7620
|
-
|
|
7621
|
-
|
|
7771
|
+
if (suspense && suspense.pendingBranch) {
|
|
7772
|
+
if (isArray(fn)) suspense.effects.push(...fn);
|
|
7773
|
+
else suspense.effects.push(fn);
|
|
7774
|
+
} else queuePostFlushCb(fn, id);
|
|
7622
7775
|
}
|
|
7623
7776
|
function setActiveBranch(suspense, branch) {
|
|
7624
7777
|
suspense.activeBranch = branch;
|
|
@@ -7812,8 +7965,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7812
7965
|
if (isVNode(type)) {
|
|
7813
7966
|
const cloned = cloneVNode(type, props, true);
|
|
7814
7967
|
if (children) normalizeChildren(cloned, children);
|
|
7815
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock)
|
|
7816
|
-
|
|
7968
|
+
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
|
|
7969
|
+
if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
7970
|
+
else currentBlock.push(cloned);
|
|
7971
|
+
}
|
|
7817
7972
|
cloned.patchFlag = -2;
|
|
7818
7973
|
return cloned;
|
|
7819
7974
|
}
|
|
@@ -7873,7 +8028,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7873
8028
|
ce: vnode.ce,
|
|
7874
8029
|
vi: vnode.vi,
|
|
7875
8030
|
vs: cloneVaporSlotMeta(vnode),
|
|
7876
|
-
vb: vnode.vb
|
|
8031
|
+
vb: vnode.vb,
|
|
8032
|
+
ibu: vnode.ibu,
|
|
8033
|
+
iu: vnode.iu
|
|
7877
8034
|
};
|
|
7878
8035
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
7879
8036
|
return cloned;
|
|
@@ -7936,25 +8093,28 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7936
8093
|
const { shapeFlag } = vnode;
|
|
7937
8094
|
if (children == null) children = null;
|
|
7938
8095
|
else if (isArray(children)) type = 16;
|
|
7939
|
-
else if (typeof children === "object")
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
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
|
+
}
|
|
7955
8116
|
}
|
|
7956
|
-
}
|
|
7957
|
-
else if (isFunction(children)) {
|
|
8117
|
+
} else if (isFunction(children)) {
|
|
7958
8118
|
if (shapeFlag & 65) {
|
|
7959
8119
|
normalizeChildren(vnode, { default: children });
|
|
7960
8120
|
return;
|
|
@@ -8063,7 +8223,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8063
8223
|
};
|
|
8064
8224
|
//#endregion
|
|
8065
8225
|
//#region packages/runtime-core/src/component.ts
|
|
8066
|
-
const emptyAppContext =
|
|
8226
|
+
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
8067
8227
|
let uid = 0;
|
|
8068
8228
|
function createComponentInstance(vnode, parent, suspense) {
|
|
8069
8229
|
const type = vnode.type;
|
|
@@ -8260,10 +8420,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8260
8420
|
restoreCurrentInstance(prevInstance);
|
|
8261
8421
|
}
|
|
8262
8422
|
}
|
|
8263
|
-
if (!Component.render && instance.render === NOOP && !isSSR)
|
|
8423
|
+
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
8424
|
+
if (!compile && Component.template)
|
|
8264
8425
|
/* v8 ignore start */
|
|
8265
|
-
|
|
8266
|
-
|
|
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
|
+
}
|
|
8267
8429
|
}
|
|
8268
8430
|
const attrsProxyHandlers = {
|
|
8269
8431
|
get(target, key) {
|
|
@@ -8371,11 +8533,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8371
8533
|
try {
|
|
8372
8534
|
setBlockTracking(-1);
|
|
8373
8535
|
const l = arguments.length;
|
|
8374
|
-
if (l === 2)
|
|
8375
|
-
if (
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
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 {
|
|
8379
8542
|
if (l > 3) children = Array.prototype.slice.call(arguments, 2);
|
|
8380
8543
|
else if (l === 3 && isVNode(children)) children = [children];
|
|
8381
8544
|
return createVNode(type, propsOrChildren, children);
|
|
@@ -8567,7 +8730,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8567
8730
|
}
|
|
8568
8731
|
//#endregion
|
|
8569
8732
|
//#region packages/runtime-core/src/index.ts
|
|
8570
|
-
const version = "3.6.0-rc.
|
|
8733
|
+
const version = "3.6.0-rc.6";
|
|
8571
8734
|
const warn = warn$1;
|
|
8572
8735
|
/**
|
|
8573
8736
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -8595,7 +8758,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8595
8758
|
let policy = void 0;
|
|
8596
8759
|
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
8597
8760
|
if (tt) try {
|
|
8598
|
-
policy =
|
|
8761
|
+
policy = /*@__PURE__*/ tt.createPolicy("vue", { createHTML: (val) => val });
|
|
8599
8762
|
} catch (e) {
|
|
8600
8763
|
warn(`Error creating trusted types policy: ${e}`);
|
|
8601
8764
|
}
|
|
@@ -8603,7 +8766,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8603
8766
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
8604
8767
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
8605
8768
|
const doc = typeof document !== "undefined" ? document : null;
|
|
8606
|
-
const templateContainer = doc &&
|
|
8769
|
+
const templateContainer = doc && /*@__PURE__*/ doc.createElement("template");
|
|
8607
8770
|
const nodeOps = {
|
|
8608
8771
|
insert: (child, parent, anchor) => {
|
|
8609
8772
|
parent.insertBefore(child, anchor || null);
|
|
@@ -8677,7 +8840,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8677
8840
|
leaveActiveClass: String,
|
|
8678
8841
|
leaveToClass: String
|
|
8679
8842
|
};
|
|
8680
|
-
const TransitionPropsValidators =
|
|
8843
|
+
const TransitionPropsValidators = /*@__PURE__*/ extend({}, BaseTransitionPropsValidators, DOMTransitionPropsValidators);
|
|
8681
8844
|
/**
|
|
8682
8845
|
* Wrap logic that attaches extra properties to Transition in a function
|
|
8683
8846
|
* so that it can be annotated as pure
|
|
@@ -8691,7 +8854,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8691
8854
|
* DOM Transition is a higher-order-component based on the platform-agnostic
|
|
8692
8855
|
* base Transition component, with DOM-specific logic.
|
|
8693
8856
|
*/
|
|
8694
|
-
const Transition =
|
|
8857
|
+
const Transition = /*@__PURE__*/ decorate$1((props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots));
|
|
8695
8858
|
/**
|
|
8696
8859
|
* #3227 Incoming hooks may be merged into arrays when wrapping Transition
|
|
8697
8860
|
* with custom HOCs.
|
|
@@ -8913,14 +9076,15 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8913
9076
|
},
|
|
8914
9077
|
updated(el, { value, oldValue }, { transition }) {
|
|
8915
9078
|
if (!value === !oldValue) return;
|
|
8916
|
-
if (transition)
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
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);
|
|
8924
9088
|
},
|
|
8925
9089
|
beforeUnmount(el, { value }) {
|
|
8926
9090
|
setDisplay(el, value);
|
|
@@ -9022,11 +9186,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9022
9186
|
const isCssString = isString(next);
|
|
9023
9187
|
let hasControlledDisplay = false;
|
|
9024
9188
|
if (next && !isCssString) {
|
|
9025
|
-
if (prev)
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
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
|
+
}
|
|
9030
9196
|
}
|
|
9031
9197
|
for (const key in next) {
|
|
9032
9198
|
if (key === "display") hasControlledDisplay = true;
|
|
@@ -9055,8 +9221,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9055
9221
|
else {
|
|
9056
9222
|
const val = rawVal == null ? "" : String(rawVal);
|
|
9057
9223
|
if (semicolonRE.test(val)) warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
9058
|
-
if (name.startsWith("--"))
|
|
9059
|
-
|
|
9224
|
+
if (name.startsWith("--")) {
|
|
9225
|
+
if (importantRE.test(val)) style.setProperty(name, val.replace(importantRE, ""), "important");
|
|
9226
|
+
else style.setProperty(name, val);
|
|
9227
|
+
} else {
|
|
9060
9228
|
const prefixed = autoPrefix(style, name);
|
|
9061
9229
|
if (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
|
|
9062
9230
|
else style[prefixed] = val;
|
|
@@ -9093,9 +9261,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9093
9261
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
9094
9262
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
9095
9263
|
function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
|
|
9096
|
-
if (isSVG && key.startsWith("xlink:"))
|
|
9097
|
-
|
|
9098
|
-
|
|
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);
|
|
9099
9268
|
else el.setAttribute(key, isBoolean ? "" : isSymbol(value) ? String(value) : value);
|
|
9100
9269
|
}
|
|
9101
9270
|
//#endregion
|
|
@@ -9168,7 +9337,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9168
9337
|
return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
|
|
9169
9338
|
}
|
|
9170
9339
|
let cachedNow = 0;
|
|
9171
|
-
const p =
|
|
9340
|
+
const p = /*@__PURE__*/ Promise.resolve();
|
|
9172
9341
|
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
9173
9342
|
function createInvoker(initialValue, instance) {
|
|
9174
9343
|
const invoker = (e) => {
|
|
@@ -9236,7 +9405,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9236
9405
|
//#endregion
|
|
9237
9406
|
//#region packages/runtime-dom/src/apiCustomElement.ts
|
|
9238
9407
|
const REMOVAL = {};
|
|
9239
|
-
|
|
9408
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
9240
9409
|
function defineCustomElement(options, extraOptions, _createApp) {
|
|
9241
9410
|
let Comp = /* @__PURE__ */ defineComponent(options, extraOptions);
|
|
9242
9411
|
if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
|
|
@@ -9285,12 +9454,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9285
9454
|
this._parent = parent;
|
|
9286
9455
|
break;
|
|
9287
9456
|
}
|
|
9288
|
-
if (!this._instance)
|
|
9289
|
-
|
|
9290
|
-
this._pendingResolve =
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
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
|
+
}
|
|
9294
9465
|
}
|
|
9295
9466
|
disconnectedCallback() {
|
|
9296
9467
|
this._connected = false;
|
|
@@ -9672,7 +9843,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9672
9843
|
};
|
|
9673
9844
|
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
9674
9845
|
name: "TransitionGroup",
|
|
9675
|
-
props:
|
|
9846
|
+
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
9676
9847
|
tag: String,
|
|
9677
9848
|
moveClass: String
|
|
9678
9849
|
}),
|
|
@@ -9953,19 +10124,39 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9953
10124
|
el._modelValue = value;
|
|
9954
10125
|
addEventListener(el, "change", () => {
|
|
9955
10126
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
9956
|
-
|
|
9957
|
-
el.
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
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
|
+
}
|
|
9961
10137
|
});
|
|
9962
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
|
+
}
|
|
9963
10149
|
/**
|
|
9964
10150
|
* @internal
|
|
9965
10151
|
*/
|
|
9966
10152
|
const vModelSetSelected = (el, value) => {
|
|
9967
10153
|
el._modelValue = value;
|
|
9968
|
-
|
|
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) {
|
|
9969
10160
|
const isMultiple = el.multiple;
|
|
9970
10161
|
const isArrayValue = isArray(value);
|
|
9971
10162
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -9975,18 +10166,19 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9975
10166
|
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
9976
10167
|
const option = el.options[i];
|
|
9977
10168
|
const optionValue = getValue(option);
|
|
9978
|
-
if (isMultiple)
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
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)) {
|
|
9984
10176
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
9985
10177
|
return;
|
|
9986
10178
|
}
|
|
9987
10179
|
}
|
|
9988
10180
|
if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
|
|
9989
|
-
}
|
|
10181
|
+
}
|
|
9990
10182
|
/**
|
|
9991
10183
|
* @internal retrieve raw value set via :value bindings
|
|
9992
10184
|
*/
|
|
@@ -10088,7 +10280,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
10088
10280
|
};
|
|
10089
10281
|
//#endregion
|
|
10090
10282
|
//#region packages/runtime-dom/src/index.ts
|
|
10091
|
-
const rendererOptions =
|
|
10283
|
+
const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
|
|
10092
10284
|
let renderer;
|
|
10093
10285
|
let enabledHydration = false;
|
|
10094
10286
|
function ensureRenderer() {
|