@vue/compat 3.6.0-rc.1 → 3.6.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-compat.d.ts +738 -678
- package/dist/vue.cjs.js +1315 -939
- package/dist/vue.cjs.prod.js +1103 -804
- package/dist/vue.esm-browser.js +1227 -890
- package/dist/vue.esm-browser.prod.js +7 -6
- package/dist/vue.esm-bundler.js +1300 -911
- package/dist/vue.global.js +1227 -890
- package/dist/vue.global.prod.js +7 -6
- package/dist/vue.runtime.esm-browser.js +1227 -890
- package/dist/vue.runtime.esm-browser.prod.js +7 -6
- package/dist/vue.runtime.esm-bundler.js +1300 -911
- package/dist/vue.runtime.global.js +1227 -890
- package/dist/vue.runtime.global.prod.js +7 -6
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.10
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -24,7 +24,7 @@ var Vue = (function() {
|
|
|
24
24
|
* \/\*#\_\_PURE\_\_\*\/
|
|
25
25
|
* So that they can be tree-shaken if necessary.
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
28
28
|
function makeMap(str) {
|
|
29
29
|
const map = Object.create(null);
|
|
30
30
|
for (const key of str.split(",")) map[key] = 1;
|
|
@@ -68,9 +68,9 @@ var Vue = (function() {
|
|
|
68
68
|
};
|
|
69
69
|
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
70
70
|
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
71
|
-
const isReservedProp =
|
|
72
|
-
const isBuiltInTag =
|
|
73
|
-
const isBuiltInDirective =
|
|
71
|
+
const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
|
|
72
|
+
const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
|
|
73
|
+
const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
|
|
74
74
|
const cacheStringFunction = (fn) => {
|
|
75
75
|
const cache = Object.create(null);
|
|
76
76
|
return ((str) => {
|
|
@@ -178,7 +178,7 @@ var Vue = (function() {
|
|
|
178
178
|
[2]: "DYNAMIC",
|
|
179
179
|
[3]: "FORWARDED"
|
|
180
180
|
};
|
|
181
|
-
const isGloballyAllowed =
|
|
181
|
+
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");
|
|
182
182
|
//#endregion
|
|
183
183
|
//#region packages/shared/src/codeframe.ts
|
|
184
184
|
const range = 2;
|
|
@@ -232,10 +232,10 @@ var Vue = (function() {
|
|
|
232
232
|
}
|
|
233
233
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
234
234
|
const propertyDelimiterRE = /:([^]+)/;
|
|
235
|
-
const styleCommentRE =
|
|
235
|
+
const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
|
|
236
236
|
function parseStringStyle(cssText) {
|
|
237
237
|
const ret = {};
|
|
238
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
238
|
+
cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
|
|
239
239
|
if (item) {
|
|
240
240
|
const tmp = item.split(propertyDelimiterRE);
|
|
241
241
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -285,22 +285,22 @@ var Vue = (function() {
|
|
|
285
285
|
* Compiler only.
|
|
286
286
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
287
287
|
*/
|
|
288
|
-
const isHTMLTag =
|
|
288
|
+
const isHTMLTag = /*@__PURE__*/ makeMap(HTML_TAGS);
|
|
289
289
|
/**
|
|
290
290
|
* Compiler only.
|
|
291
291
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
292
292
|
*/
|
|
293
|
-
const isSVGTag =
|
|
293
|
+
const isSVGTag = /*@__PURE__*/ makeMap(SVG_TAGS);
|
|
294
294
|
/**
|
|
295
295
|
* Compiler only.
|
|
296
296
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
297
297
|
*/
|
|
298
|
-
const isMathMLTag =
|
|
298
|
+
const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
|
|
299
299
|
/**
|
|
300
300
|
* Compiler only.
|
|
301
301
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
302
302
|
*/
|
|
303
|
-
const isVoidTag =
|
|
303
|
+
const isVoidTag = /*@__PURE__*/ makeMap(VOID_TAGS);
|
|
304
304
|
//#endregion
|
|
305
305
|
//#region packages/shared/src/domAttrConfig.ts
|
|
306
306
|
/**
|
|
@@ -315,11 +315,11 @@ var Vue = (function() {
|
|
|
315
315
|
* - readonly -> readOnly
|
|
316
316
|
*/
|
|
317
317
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
318
|
-
const isSpecialBooleanAttr =
|
|
318
|
+
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
319
319
|
/**
|
|
320
320
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
321
321
|
*/
|
|
322
|
-
const isBooleanAttr =
|
|
322
|
+
const isBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
|
|
323
323
|
/**
|
|
324
324
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
325
325
|
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
@@ -333,11 +333,11 @@ var Vue = (function() {
|
|
|
333
333
|
* Don't also forget to allow `data-*` and `aria-*`!
|
|
334
334
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
|
|
335
335
|
*/
|
|
336
|
-
const isKnownHtmlAttr =
|
|
336
|
+
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");
|
|
337
337
|
/**
|
|
338
338
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
|
|
339
339
|
*/
|
|
340
|
-
const isKnownSvgAttr =
|
|
340
|
+
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");
|
|
341
341
|
/**
|
|
342
342
|
* Shared between server-renderer and runtime-core hydration logic
|
|
343
343
|
*/
|
|
@@ -363,13 +363,54 @@ var Vue = (function() {
|
|
|
363
363
|
}
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region packages/shared/src/looseEqual.ts
|
|
366
|
-
function looseCompareArrays(a, b) {
|
|
366
|
+
function looseCompareArrays(a, b, seen) {
|
|
367
367
|
if (a.length !== b.length) return false;
|
|
368
368
|
let equal = true;
|
|
369
|
-
for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
|
|
369
|
+
for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i], seen);
|
|
370
370
|
return equal;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function looseCompareCollections(a, b, seen) {
|
|
373
|
+
if (a.size !== b.size) return false;
|
|
374
|
+
const candidates = Array.from(b);
|
|
375
|
+
const matched = new Uint8Array(candidates.length);
|
|
376
|
+
for (const item of a) {
|
|
377
|
+
let index = -1;
|
|
378
|
+
for (let i = 0; i < candidates.length; i++) if (!matched[i] && looseEqual(item, candidates[i], seen)) {
|
|
379
|
+
index = i;
|
|
380
|
+
break;
|
|
381
|
+
}
|
|
382
|
+
if (index < 0) return false;
|
|
383
|
+
matched[index] = 1;
|
|
384
|
+
}
|
|
385
|
+
return true;
|
|
386
|
+
}
|
|
387
|
+
function looseCompareObjects(a, b, seen) {
|
|
388
|
+
let aValidType = isMap(a);
|
|
389
|
+
let bValidType = isMap(b);
|
|
390
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
391
|
+
aValidType = isSet(a);
|
|
392
|
+
bValidType = isSet(b);
|
|
393
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
394
|
+
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
|
395
|
+
for (const key in a) {
|
|
396
|
+
const aHasKey = a.hasOwnProperty(key);
|
|
397
|
+
const bHasKey = b.hasOwnProperty(key);
|
|
398
|
+
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) return false;
|
|
399
|
+
}
|
|
400
|
+
return String(a) === String(b);
|
|
401
|
+
}
|
|
402
|
+
function looseCompareNested(a, b, seen, compare) {
|
|
403
|
+
if (!seen) seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
|
|
404
|
+
const [seenA, seenB] = seen;
|
|
405
|
+
if (seenA.has(a) || seenB.has(b)) return seenA.get(a) === b && seenB.get(b) === a;
|
|
406
|
+
seenA.set(a, b);
|
|
407
|
+
seenB.set(b, a);
|
|
408
|
+
const equal = compare(a, b, seen);
|
|
409
|
+
seenA.delete(a);
|
|
410
|
+
seenB.delete(b);
|
|
411
|
+
return equal;
|
|
412
|
+
}
|
|
413
|
+
function looseEqual(a, b, seen) {
|
|
373
414
|
if (a === b) return true;
|
|
374
415
|
let aValidType = isDate(a);
|
|
375
416
|
let bValidType = isDate(b);
|
|
@@ -379,17 +420,12 @@ var Vue = (function() {
|
|
|
379
420
|
if (aValidType || bValidType) return a === b;
|
|
380
421
|
aValidType = isArray(a);
|
|
381
422
|
bValidType = isArray(b);
|
|
382
|
-
if (aValidType || bValidType) return aValidType && bValidType ?
|
|
423
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
|
|
383
424
|
aValidType = isObject(a);
|
|
384
425
|
bValidType = isObject(b);
|
|
385
426
|
if (aValidType || bValidType) {
|
|
386
427
|
if (!aValidType || !bValidType) return false;
|
|
387
|
-
|
|
388
|
-
for (const key in a) {
|
|
389
|
-
const aHasKey = a.hasOwnProperty(key);
|
|
390
|
-
const bHasKey = b.hasOwnProperty(key);
|
|
391
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) return false;
|
|
392
|
-
}
|
|
428
|
+
return looseCompareNested(a, b, seen, looseCompareObjects);
|
|
393
429
|
}
|
|
394
430
|
return String(a) === String(b);
|
|
395
431
|
}
|
|
@@ -519,6 +555,8 @@ var Vue = (function() {
|
|
|
519
555
|
function warn$2(msg, ...args) {
|
|
520
556
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
521
557
|
}
|
|
558
|
+
//#endregion
|
|
559
|
+
//#region packages/reactivity/src/system.ts
|
|
522
560
|
const notifyBuffer = [];
|
|
523
561
|
let batchDepth = 0;
|
|
524
562
|
let activeSub = void 0;
|
|
@@ -657,13 +695,23 @@ var Vue = (function() {
|
|
|
657
695
|
sub.flags &= -5;
|
|
658
696
|
}
|
|
659
697
|
function flush() {
|
|
698
|
+
let hasError = false;
|
|
699
|
+
let error;
|
|
660
700
|
while (notifyIndex < notifyBufferLength) {
|
|
661
701
|
const effect = notifyBuffer[notifyIndex];
|
|
662
702
|
notifyBuffer[notifyIndex++] = void 0;
|
|
663
|
-
|
|
703
|
+
try {
|
|
704
|
+
effect.notify();
|
|
705
|
+
} catch (err) {
|
|
706
|
+
if (!hasError) {
|
|
707
|
+
hasError = true;
|
|
708
|
+
error = err;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
664
711
|
}
|
|
665
712
|
notifyIndex = 0;
|
|
666
713
|
notifyBufferLength = 0;
|
|
714
|
+
if (hasError) throw error;
|
|
667
715
|
}
|
|
668
716
|
function checkDirty(link, sub) {
|
|
669
717
|
let stack;
|
|
@@ -747,7 +795,7 @@ var Vue = (function() {
|
|
|
747
795
|
}
|
|
748
796
|
set subs(value) {
|
|
749
797
|
this._subs = value;
|
|
750
|
-
if (value === void 0) this.map.delete(this.key);
|
|
798
|
+
if (value === void 0 && this.map) this.map.delete(this.key);
|
|
751
799
|
}
|
|
752
800
|
};
|
|
753
801
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -830,9 +878,7 @@ var Vue = (function() {
|
|
|
830
878
|
if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
831
879
|
}
|
|
832
880
|
break;
|
|
833
|
-
case "set":
|
|
834
|
-
if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
835
|
-
break;
|
|
881
|
+
case "set": if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
836
882
|
}
|
|
837
883
|
}
|
|
838
884
|
}
|
|
@@ -847,13 +893,17 @@ var Vue = (function() {
|
|
|
847
893
|
/**
|
|
848
894
|
* Track array iteration and return:
|
|
849
895
|
* - if input is reactive: a cloned raw array with reactive values
|
|
850
|
-
* - if input is
|
|
896
|
+
* - if input is readonly: a cloned raw array with readonly values, preserving
|
|
897
|
+
* reactivity
|
|
898
|
+
* - if input is raw or shallow: the original raw array
|
|
851
899
|
*/
|
|
852
900
|
function reactiveReadArray(array) {
|
|
853
901
|
const raw = /* @__PURE__ */ toRaw(array);
|
|
854
902
|
if (raw === array) return raw;
|
|
855
903
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
856
|
-
|
|
904
|
+
if (/* @__PURE__ */ isShallow(array)) return raw;
|
|
905
|
+
if (!/* @__PURE__ */ isReadonly(array)) return raw.map(toReactive);
|
|
906
|
+
return /* @__PURE__ */ isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
|
|
857
907
|
}
|
|
858
908
|
/**
|
|
859
909
|
* Track array iteration and return raw array
|
|
@@ -1029,8 +1079,8 @@ var Vue = (function() {
|
|
|
1029
1079
|
}
|
|
1030
1080
|
//#endregion
|
|
1031
1081
|
//#region packages/reactivity/src/baseHandlers.ts
|
|
1032
|
-
const isNonTrackableKeys =
|
|
1033
|
-
const builtInSymbols = new Set(
|
|
1082
|
+
const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1083
|
+
const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
1034
1084
|
function hasOwnProperty(key) {
|
|
1035
1085
|
if (!isSymbol(key)) key = String(key);
|
|
1036
1086
|
const obj = /* @__PURE__ */ toRaw(this);
|
|
@@ -1085,12 +1135,14 @@ var Vue = (function() {
|
|
|
1085
1135
|
oldValue = /* @__PURE__ */ toRaw(oldValue);
|
|
1086
1136
|
value = /* @__PURE__ */ toRaw(value);
|
|
1087
1137
|
}
|
|
1088
|
-
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value))
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1138
|
+
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
|
|
1139
|
+
if (isOldValueReadonly) {
|
|
1140
|
+
warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
|
|
1141
|
+
return true;
|
|
1142
|
+
} else {
|
|
1143
|
+
oldValue.value = value;
|
|
1144
|
+
return true;
|
|
1145
|
+
}
|
|
1094
1146
|
}
|
|
1095
1147
|
}
|
|
1096
1148
|
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
|
|
@@ -1131,10 +1183,10 @@ var Vue = (function() {
|
|
|
1131
1183
|
return true;
|
|
1132
1184
|
}
|
|
1133
1185
|
};
|
|
1134
|
-
const mutableHandlers =
|
|
1135
|
-
const readonlyHandlers =
|
|
1136
|
-
const shallowReactiveHandlers =
|
|
1137
|
-
const shallowReadonlyHandlers =
|
|
1186
|
+
const mutableHandlers = /*@__PURE__*/ new MutableReactiveHandler();
|
|
1187
|
+
const readonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler();
|
|
1188
|
+
const shallowReactiveHandlers = /*@__PURE__*/ new MutableReactiveHandler(true);
|
|
1189
|
+
const shallowReadonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler(true);
|
|
1138
1190
|
//#endregion
|
|
1139
1191
|
//#region packages/reactivity/src/collectionHandlers.ts
|
|
1140
1192
|
const toShallow = (value) => value;
|
|
@@ -1285,10 +1337,10 @@ var Vue = (function() {
|
|
|
1285
1337
|
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
|
|
1286
1338
|
};
|
|
1287
1339
|
}
|
|
1288
|
-
const mutableCollectionHandlers = { get:
|
|
1289
|
-
const shallowCollectionHandlers = { get:
|
|
1290
|
-
const readonlyCollectionHandlers = { get:
|
|
1291
|
-
const shallowReadonlyCollectionHandlers = { get:
|
|
1340
|
+
const mutableCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, false) };
|
|
1341
|
+
const shallowCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, true) };
|
|
1342
|
+
const readonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, false) };
|
|
1343
|
+
const shallowReadonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, true) };
|
|
1292
1344
|
function checkIdentityKeys(target, has, key) {
|
|
1293
1345
|
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1294
1346
|
if (rawKey !== key && has.call(target, rawKey)) {
|
|
@@ -1313,7 +1365,7 @@ var Vue = (function() {
|
|
|
1313
1365
|
default: return 0;
|
|
1314
1366
|
}
|
|
1315
1367
|
}
|
|
1316
|
-
|
|
1368
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1317
1369
|
function reactive(target) {
|
|
1318
1370
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
1319
1371
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
@@ -1348,7 +1400,7 @@ var Vue = (function() {
|
|
|
1348
1400
|
* @param target - The source object.
|
|
1349
1401
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive}
|
|
1350
1402
|
*/
|
|
1351
|
-
|
|
1403
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1352
1404
|
function shallowReactive(target) {
|
|
1353
1405
|
return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
|
|
1354
1406
|
}
|
|
@@ -1381,7 +1433,7 @@ var Vue = (function() {
|
|
|
1381
1433
|
* @param target - The source object.
|
|
1382
1434
|
* @see {@link https://vuejs.org/api/reactivity-core.html#readonly}
|
|
1383
1435
|
*/
|
|
1384
|
-
|
|
1436
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1385
1437
|
function readonly(target) {
|
|
1386
1438
|
return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
|
|
1387
1439
|
}
|
|
@@ -1415,7 +1467,7 @@ var Vue = (function() {
|
|
|
1415
1467
|
* @param target - The source object.
|
|
1416
1468
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly}
|
|
1417
1469
|
*/
|
|
1418
|
-
|
|
1470
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1419
1471
|
function shallowReadonly(target) {
|
|
1420
1472
|
return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
|
|
1421
1473
|
}
|
|
@@ -1452,7 +1504,7 @@ var Vue = (function() {
|
|
|
1452
1504
|
* @param value - The value to check.
|
|
1453
1505
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive}
|
|
1454
1506
|
*/
|
|
1455
|
-
|
|
1507
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1456
1508
|
function isReactive(value) {
|
|
1457
1509
|
if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
|
|
1458
1510
|
return !!(value && value["__v_isReactive"]);
|
|
@@ -1468,11 +1520,11 @@ var Vue = (function() {
|
|
|
1468
1520
|
* @param value - The value to check.
|
|
1469
1521
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly}
|
|
1470
1522
|
*/
|
|
1471
|
-
|
|
1523
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1472
1524
|
function isReadonly(value) {
|
|
1473
1525
|
return !!(value && value["__v_isReadonly"]);
|
|
1474
1526
|
}
|
|
1475
|
-
|
|
1527
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1476
1528
|
function isShallow(value) {
|
|
1477
1529
|
return !!(value && value["__v_isShallow"]);
|
|
1478
1530
|
}
|
|
@@ -1483,7 +1535,7 @@ var Vue = (function() {
|
|
|
1483
1535
|
* @param value - The value to check.
|
|
1484
1536
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy}
|
|
1485
1537
|
*/
|
|
1486
|
-
|
|
1538
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1487
1539
|
function isProxy(value) {
|
|
1488
1540
|
return value ? !!value["__v_raw"] : false;
|
|
1489
1541
|
}
|
|
@@ -1510,7 +1562,7 @@ var Vue = (function() {
|
|
|
1510
1562
|
* @param observed - The object for which the "raw" value is requested.
|
|
1511
1563
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw}
|
|
1512
1564
|
*/
|
|
1513
|
-
|
|
1565
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1514
1566
|
function toRaw(observed) {
|
|
1515
1567
|
const raw = observed && observed["__v_raw"];
|
|
1516
1568
|
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
@@ -1559,15 +1611,15 @@ var Vue = (function() {
|
|
|
1559
1611
|
const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1560
1612
|
//#endregion
|
|
1561
1613
|
//#region packages/reactivity/src/ref.ts
|
|
1562
|
-
|
|
1614
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1563
1615
|
function isRef(r) {
|
|
1564
1616
|
return r ? r["__v_isRef"] === true : false;
|
|
1565
1617
|
}
|
|
1566
|
-
|
|
1618
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1567
1619
|
function ref(value) {
|
|
1568
1620
|
return createRef(value, toReactive);
|
|
1569
1621
|
}
|
|
1570
|
-
|
|
1622
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1571
1623
|
function shallowRef(value) {
|
|
1572
1624
|
return createRef(value);
|
|
1573
1625
|
}
|
|
@@ -1770,7 +1822,7 @@ var Vue = (function() {
|
|
|
1770
1822
|
* @param object - Reactive object to be made into an object of linked refs.
|
|
1771
1823
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs}
|
|
1772
1824
|
*/
|
|
1773
|
-
|
|
1825
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1774
1826
|
function toRefs(object) {
|
|
1775
1827
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1776
1828
|
for (const key in object) ret[key] = propertyToRef(object, key);
|
|
@@ -1821,7 +1873,7 @@ var Vue = (function() {
|
|
|
1821
1873
|
return this._value = this._getter();
|
|
1822
1874
|
}
|
|
1823
1875
|
};
|
|
1824
|
-
|
|
1876
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1825
1877
|
function toRef(source, key, defaultValue) {
|
|
1826
1878
|
if (/* @__PURE__ */ isRef(source)) return source;
|
|
1827
1879
|
else if (isFunction(source)) return new GetterRefImpl(source);
|
|
@@ -1887,10 +1939,12 @@ var Vue = (function() {
|
|
|
1887
1939
|
get dirty() {
|
|
1888
1940
|
const flags = this.flags;
|
|
1889
1941
|
if (flags & 16) return true;
|
|
1890
|
-
if (flags & 32)
|
|
1891
|
-
this.
|
|
1892
|
-
|
|
1893
|
-
|
|
1942
|
+
if (flags & 32) {
|
|
1943
|
+
if (checkDirty(this.deps, this)) {
|
|
1944
|
+
this.flags = flags | 16;
|
|
1945
|
+
return true;
|
|
1946
|
+
} else this.flags = flags & -33;
|
|
1947
|
+
}
|
|
1894
1948
|
return false;
|
|
1895
1949
|
}
|
|
1896
1950
|
};
|
|
@@ -2069,10 +2123,12 @@ var Vue = (function() {
|
|
|
2069
2123
|
get _dirty() {
|
|
2070
2124
|
const flags = this.flags;
|
|
2071
2125
|
if (flags & 16) return true;
|
|
2072
|
-
if (flags & 32)
|
|
2073
|
-
this.
|
|
2074
|
-
|
|
2075
|
-
|
|
2126
|
+
if (flags & 32) {
|
|
2127
|
+
if (checkDirty(this.deps, this)) {
|
|
2128
|
+
this.flags = flags | 16;
|
|
2129
|
+
return true;
|
|
2130
|
+
} else this.flags = flags & -33;
|
|
2131
|
+
}
|
|
2076
2132
|
return false;
|
|
2077
2133
|
}
|
|
2078
2134
|
/**
|
|
@@ -2133,7 +2189,7 @@ var Vue = (function() {
|
|
|
2133
2189
|
}
|
|
2134
2190
|
};
|
|
2135
2191
|
setupOnTrigger(ComputedRefImpl);
|
|
2136
|
-
|
|
2192
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2137
2193
|
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
2138
2194
|
let getter;
|
|
2139
2195
|
let setter;
|
|
@@ -2211,25 +2267,26 @@ var Vue = (function() {
|
|
|
2211
2267
|
else if (isFunction(s)) return call ? call(s, 2) : s();
|
|
2212
2268
|
else warnInvalidSource(s, onWarn);
|
|
2213
2269
|
});
|
|
2214
|
-
} else if (isFunction(source))
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2270
|
+
} else if (isFunction(source)) {
|
|
2271
|
+
if (cb) getter = call ? () => call(source, 2) : source;
|
|
2272
|
+
else getter = () => {
|
|
2273
|
+
if (this.cleanupsLength) {
|
|
2274
|
+
const prevSub = setActiveSub();
|
|
2275
|
+
try {
|
|
2276
|
+
cleanup(this);
|
|
2277
|
+
} finally {
|
|
2278
|
+
setActiveSub(prevSub);
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
const currentEffect = activeWatcher;
|
|
2282
|
+
activeWatcher = this;
|
|
2218
2283
|
try {
|
|
2219
|
-
|
|
2284
|
+
return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
|
|
2220
2285
|
} finally {
|
|
2221
|
-
|
|
2286
|
+
activeWatcher = currentEffect;
|
|
2222
2287
|
}
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
activeWatcher = this;
|
|
2226
|
-
try {
|
|
2227
|
-
return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
|
|
2228
|
-
} finally {
|
|
2229
|
-
activeWatcher = currentEffect;
|
|
2230
|
-
}
|
|
2231
|
-
};
|
|
2232
|
-
else {
|
|
2288
|
+
};
|
|
2289
|
+
} else {
|
|
2233
2290
|
getter = NOOP;
|
|
2234
2291
|
warnInvalidSource(source, onWarn);
|
|
2235
2292
|
}
|
|
@@ -2553,7 +2610,7 @@ var Vue = (function() {
|
|
|
2553
2610
|
let jobsLength = 0;
|
|
2554
2611
|
let flushIndex = 0;
|
|
2555
2612
|
let postFlushIndex = 0;
|
|
2556
|
-
const resolvedPromise =
|
|
2613
|
+
const resolvedPromise = /*@__PURE__*/ Promise.resolve();
|
|
2557
2614
|
const RECURSION_LIMIT = 100;
|
|
2558
2615
|
function nextTick(fn) {
|
|
2559
2616
|
const p = currentFlushPromise || resolvedPromise;
|
|
@@ -2592,6 +2649,7 @@ var Vue = (function() {
|
|
|
2592
2649
|
flushJobs();
|
|
2593
2650
|
} catch (e) {
|
|
2594
2651
|
currentFlushPromise = null;
|
|
2652
|
+
if (jobsLength || postJobs.length) queueFlush();
|
|
2595
2653
|
throw e;
|
|
2596
2654
|
}
|
|
2597
2655
|
};
|
|
@@ -2599,9 +2657,10 @@ var Vue = (function() {
|
|
|
2599
2657
|
if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
|
|
2600
2658
|
}
|
|
2601
2659
|
function queuePostFlushCb(jobs, id = Infinity) {
|
|
2602
|
-
if (!isArray(jobs))
|
|
2603
|
-
|
|
2604
|
-
|
|
2660
|
+
if (!isArray(jobs)) {
|
|
2661
|
+
if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
|
|
2662
|
+
else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
|
|
2663
|
+
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
2605
2664
|
queueFlush();
|
|
2606
2665
|
}
|
|
2607
2666
|
function flushPreFlushCbs(instance, seen) {
|
|
@@ -2615,32 +2674,39 @@ var Vue = (function() {
|
|
|
2615
2674
|
i--;
|
|
2616
2675
|
jobsLength--;
|
|
2617
2676
|
if (cb.flags & 2) cb.flags &= -2;
|
|
2618
|
-
|
|
2619
|
-
|
|
2677
|
+
try {
|
|
2678
|
+
cb();
|
|
2679
|
+
} finally {
|
|
2680
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
2681
|
+
}
|
|
2620
2682
|
}
|
|
2621
2683
|
}
|
|
2622
2684
|
function flushPostFlushCbs(seen) {
|
|
2623
2685
|
if (postJobs.length) {
|
|
2624
2686
|
if (activePostJobs) {
|
|
2625
|
-
activePostJobs.push(
|
|
2687
|
+
for (let i = 0; i < postJobs.length; i++) activePostJobs.push(postJobs[i]);
|
|
2626
2688
|
postJobs.length = 0;
|
|
2627
2689
|
return;
|
|
2628
2690
|
}
|
|
2629
2691
|
activePostJobs = postJobs;
|
|
2630
2692
|
postJobs = [];
|
|
2631
2693
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
cb
|
|
2638
|
-
|
|
2639
|
-
|
|
2694
|
+
try {
|
|
2695
|
+
while (postFlushIndex < activePostJobs.length) {
|
|
2696
|
+
const cb = activePostJobs[postFlushIndex++];
|
|
2697
|
+
if (checkRecursiveUpdates(seen, cb)) continue;
|
|
2698
|
+
if (cb.flags & 2) cb.flags &= -2;
|
|
2699
|
+
if (!(cb.flags & 4)) try {
|
|
2700
|
+
cb();
|
|
2701
|
+
} finally {
|
|
2702
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
2703
|
+
}
|
|
2640
2704
|
}
|
|
2705
|
+
} finally {
|
|
2706
|
+
while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
|
|
2707
|
+
activePostJobs = null;
|
|
2708
|
+
postFlushIndex = 0;
|
|
2641
2709
|
}
|
|
2642
|
-
activePostJobs = null;
|
|
2643
|
-
postFlushIndex = 0;
|
|
2644
2710
|
}
|
|
2645
2711
|
}
|
|
2646
2712
|
let isFlushing = false;
|
|
@@ -2650,9 +2716,12 @@ var Vue = (function() {
|
|
|
2650
2716
|
function flushOnAppMount(instance) {
|
|
2651
2717
|
if (!isFlushing) {
|
|
2652
2718
|
isFlushing = true;
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2719
|
+
try {
|
|
2720
|
+
flushPreFlushCbs(instance);
|
|
2721
|
+
flushPostFlushCbs();
|
|
2722
|
+
} finally {
|
|
2723
|
+
isFlushing = false;
|
|
2724
|
+
}
|
|
2656
2725
|
}
|
|
2657
2726
|
}
|
|
2658
2727
|
function flushJobs(seen) {
|
|
@@ -2682,8 +2751,8 @@ var Vue = (function() {
|
|
|
2682
2751
|
jobsLength = 0;
|
|
2683
2752
|
jobs.length = 0;
|
|
2684
2753
|
flushPostFlushCbs(seen);
|
|
2685
|
-
currentFlushPromise = null;
|
|
2686
2754
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
2755
|
+
else currentFlushPromise = null;
|
|
2687
2756
|
}
|
|
2688
2757
|
}
|
|
2689
2758
|
function checkRecursiveUpdates(seen, fn) {
|
|
@@ -2714,6 +2783,19 @@ var Vue = (function() {
|
|
|
2714
2783
|
rerender: tryWrap(rerender),
|
|
2715
2784
|
reload: tryWrap(reload)
|
|
2716
2785
|
};
|
|
2786
|
+
function runWithHmrUpdating(fn) {
|
|
2787
|
+
isHmrUpdating = true;
|
|
2788
|
+
let done = false;
|
|
2789
|
+
try {
|
|
2790
|
+
fn();
|
|
2791
|
+
done = true;
|
|
2792
|
+
} finally {
|
|
2793
|
+
if (done) nextTick(() => {
|
|
2794
|
+
isHmrUpdating = false;
|
|
2795
|
+
});
|
|
2796
|
+
else isHmrUpdating = false;
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2717
2799
|
const map = /* @__PURE__ */ new Map();
|
|
2718
2800
|
function registerHMR(instance) {
|
|
2719
2801
|
const id = instance.type.__hmrId;
|
|
@@ -2755,18 +2837,16 @@ var Vue = (function() {
|
|
|
2755
2837
|
instance.render = newRender;
|
|
2756
2838
|
normalizeClassComponent(instance.type).render = newRender;
|
|
2757
2839
|
}
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2840
|
+
runWithHmrUpdating(() => {
|
|
2841
|
+
if (instance.vapor) {
|
|
2842
|
+
if (!instance.isUnmounted) instance.hmrRerender();
|
|
2843
|
+
} else {
|
|
2844
|
+
const i = instance;
|
|
2845
|
+
if (!(i.effect.flags & 1024)) {
|
|
2846
|
+
i.renderCache = [];
|
|
2847
|
+
i.effect.run();
|
|
2848
|
+
}
|
|
2766
2849
|
}
|
|
2767
|
-
}
|
|
2768
|
-
nextTick(() => {
|
|
2769
|
-
isHmrUpdating = false;
|
|
2770
2850
|
});
|
|
2771
2851
|
});
|
|
2772
2852
|
}
|
|
@@ -2781,17 +2861,19 @@ var Vue = (function() {
|
|
|
2781
2861
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2782
2862
|
const dirtyInstances = new Set(instances);
|
|
2783
2863
|
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2784
|
-
|
|
2785
|
-
const
|
|
2786
|
-
|
|
2787
|
-
if (
|
|
2788
|
-
rerenderedParents.
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2864
|
+
runWithHmrUpdating(() => {
|
|
2865
|
+
for (const instance of instances) {
|
|
2866
|
+
const parent = instance.parent;
|
|
2867
|
+
if (parent) {
|
|
2868
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2869
|
+
rerenderedParents.add(parent);
|
|
2870
|
+
parent.hmrRerender();
|
|
2871
|
+
}
|
|
2872
|
+
} else instance.hmrReload(newComp);
|
|
2873
|
+
}
|
|
2874
|
+
});
|
|
2793
2875
|
} else {
|
|
2794
|
-
const
|
|
2876
|
+
const parents = /* @__PURE__ */ new Set();
|
|
2795
2877
|
const dirtyInstanceSet = new Set(instances);
|
|
2796
2878
|
for (const instance of instances) {
|
|
2797
2879
|
const oldComp = normalizeClassComponent(instance.type);
|
|
@@ -2810,33 +2892,23 @@ var Vue = (function() {
|
|
|
2810
2892
|
instance.ceReload(newComp.styles);
|
|
2811
2893
|
dirtyInstances.delete(instance);
|
|
2812
2894
|
} else if (instance.parent) {
|
|
2813
|
-
|
|
2814
|
-
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
|
|
2815
|
-
let updates = parentUpdates.get(parent);
|
|
2816
|
-
if (!updates) parentUpdates.set(parent, updates = []);
|
|
2817
|
-
updates.push([instance, dirtyInstances]);
|
|
2818
|
-
}
|
|
2895
|
+
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) parents.add(instance.parent);
|
|
2819
2896
|
} else if (instance.appContext.reload) instance.appContext.reload();
|
|
2820
2897
|
else if (typeof window !== "undefined") window.location.reload();
|
|
2821
2898
|
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2822
2899
|
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2823
2900
|
}
|
|
2824
|
-
|
|
2901
|
+
parents.forEach((parent) => {
|
|
2825
2902
|
queueJob(() => {
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2903
|
+
runWithHmrUpdating(() => {
|
|
2904
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2905
|
+
else {
|
|
2906
|
+
const i = parent;
|
|
2907
|
+
if (!(i.effect.flags & 1024)) {
|
|
2908
|
+
i.renderCache = [];
|
|
2909
|
+
i.effect.run();
|
|
2910
|
+
}
|
|
2833
2911
|
}
|
|
2834
|
-
}
|
|
2835
|
-
nextTick(() => {
|
|
2836
|
-
isHmrUpdating = false;
|
|
2837
|
-
});
|
|
2838
|
-
updates.forEach(([instance, dirtyInstances]) => {
|
|
2839
|
-
dirtyInstances.delete(instance);
|
|
2840
2912
|
});
|
|
2841
2913
|
});
|
|
2842
2914
|
});
|
|
@@ -2906,20 +2978,20 @@ var Vue = (function() {
|
|
|
2906
2978
|
function devtoolsUnmountApp(app) {
|
|
2907
2979
|
emit$2("app:unmount", app);
|
|
2908
2980
|
}
|
|
2909
|
-
const devtoolsComponentAdded =
|
|
2910
|
-
const devtoolsComponentUpdated =
|
|
2911
|
-
const _devtoolsComponentRemoved =
|
|
2981
|
+
const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
|
|
2982
|
+
const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
|
|
2983
|
+
const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
|
|
2912
2984
|
const devtoolsComponentRemoved = (component) => {
|
|
2913
2985
|
if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
|
|
2914
2986
|
};
|
|
2915
|
-
|
|
2987
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2916
2988
|
function createDevtoolsComponentHook(hook) {
|
|
2917
2989
|
return (component) => {
|
|
2918
2990
|
emit$2(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
|
|
2919
2991
|
};
|
|
2920
2992
|
}
|
|
2921
|
-
const devtoolsPerfStart =
|
|
2922
|
-
const devtoolsPerfEnd =
|
|
2993
|
+
const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
|
|
2994
|
+
const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
|
|
2923
2995
|
function createDevtoolsPerformanceHook(hook) {
|
|
2924
2996
|
return (component, type, time) => {
|
|
2925
2997
|
emit$2(hook, component.appContext.app, component.uid, component, type, time);
|
|
@@ -3148,7 +3220,7 @@ var Vue = (function() {
|
|
|
3148
3220
|
validateCompatConfig(config);
|
|
3149
3221
|
extend(globalCompatConfig, config);
|
|
3150
3222
|
}
|
|
3151
|
-
const seenConfigObjects =
|
|
3223
|
+
const seenConfigObjects = /*@__PURE__*/ new WeakSet();
|
|
3152
3224
|
const warnedInvalidKeys = {};
|
|
3153
3225
|
function validateCompatConfig(config, instance) {
|
|
3154
3226
|
if (seenConfigObjects.has(config)) return;
|
|
@@ -3200,7 +3272,7 @@ var Vue = (function() {
|
|
|
3200
3272
|
}
|
|
3201
3273
|
//#endregion
|
|
3202
3274
|
//#region packages/runtime-core/src/compat/instanceEventEmitter.ts
|
|
3203
|
-
const eventRegistryMap =
|
|
3275
|
+
const eventRegistryMap = /*@__PURE__*/ new WeakMap();
|
|
3204
3276
|
function getRegistry(instance) {
|
|
3205
3277
|
let events = eventRegistryMap.get(instance);
|
|
3206
3278
|
if (!events) eventRegistryMap.set(instance, events = Object.create(null));
|
|
@@ -3334,19 +3406,21 @@ var Vue = (function() {
|
|
|
3334
3406
|
};
|
|
3335
3407
|
function mapCompatDirectiveHook(name, dir, instance) {
|
|
3336
3408
|
const mappedName = legacyDirectiveHookMap[name];
|
|
3337
|
-
if (mappedName)
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3409
|
+
if (mappedName) {
|
|
3410
|
+
if (isArray(mappedName)) {
|
|
3411
|
+
const hook = [];
|
|
3412
|
+
mappedName.forEach((mapped) => {
|
|
3413
|
+
const mappedHook = dir[mapped];
|
|
3414
|
+
if (mappedHook) {
|
|
3415
|
+
softAssertCompatEnabled("CUSTOM_DIR", instance, mapped, name);
|
|
3416
|
+
hook.push(mappedHook);
|
|
3417
|
+
}
|
|
3418
|
+
});
|
|
3419
|
+
return hook.length ? hook : void 0;
|
|
3420
|
+
} else {
|
|
3421
|
+
if (dir[mappedName]) softAssertCompatEnabled("CUSTOM_DIR", instance, mappedName, name);
|
|
3422
|
+
return dir[mappedName];
|
|
3423
|
+
}
|
|
3350
3424
|
}
|
|
3351
3425
|
}
|
|
3352
3426
|
//#endregion
|
|
@@ -3509,7 +3583,7 @@ var Vue = (function() {
|
|
|
3509
3583
|
}
|
|
3510
3584
|
const prev = setCurrentInstance(this);
|
|
3511
3585
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3512
|
-
|
|
3586
|
+
restoreCurrentInstance(prev);
|
|
3513
3587
|
return res;
|
|
3514
3588
|
}
|
|
3515
3589
|
function createPathGetter(ctx, path) {
|
|
@@ -3531,15 +3605,16 @@ var Vue = (function() {
|
|
|
3531
3605
|
const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
|
|
3532
3606
|
const resolveTarget = (props, select) => {
|
|
3533
3607
|
const targetSelector = props && props.to;
|
|
3534
|
-
if (isString(targetSelector))
|
|
3535
|
-
|
|
3536
|
-
|
|
3608
|
+
if (isString(targetSelector)) {
|
|
3609
|
+
if (!select) {
|
|
3610
|
+
warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
|
|
3611
|
+
return null;
|
|
3612
|
+
} else {
|
|
3613
|
+
const target = select(targetSelector);
|
|
3614
|
+
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.`);
|
|
3615
|
+
return target;
|
|
3616
|
+
}
|
|
3537
3617
|
} else {
|
|
3538
|
-
const target = select(targetSelector);
|
|
3539
|
-
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.`);
|
|
3540
|
-
return target;
|
|
3541
|
-
}
|
|
3542
|
-
else {
|
|
3543
3618
|
if (!targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
|
|
3544
3619
|
return targetSelector;
|
|
3545
3620
|
}
|
|
@@ -3577,7 +3652,8 @@ var Vue = (function() {
|
|
|
3577
3652
|
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3578
3653
|
pendingMounts.delete(vnode);
|
|
3579
3654
|
if (isTeleportDisabled(vnode.props)) {
|
|
3580
|
-
|
|
3655
|
+
const mountContainer = parentNode(vnode.el) || container;
|
|
3656
|
+
mount(vnode, mountContainer, vnode.anchor);
|
|
3581
3657
|
updateCssVars(vnode, true);
|
|
3582
3658
|
}
|
|
3583
3659
|
mountToTarget(vnode);
|
|
@@ -3686,15 +3762,17 @@ var Vue = (function() {
|
|
|
3686
3762
|
const disabled = isTeleportDisabled(vnode.props);
|
|
3687
3763
|
if (target) {
|
|
3688
3764
|
const targetNode = target._lpa || target.firstChild;
|
|
3689
|
-
if (vnode.shapeFlag & 16)
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3765
|
+
if (vnode.shapeFlag & 16) {
|
|
3766
|
+
if (disabled) {
|
|
3767
|
+
hydrateDisabledTeleport(node, vnode);
|
|
3768
|
+
hydrateAnchor(target, targetNode);
|
|
3769
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
|
|
3770
|
+
} else {
|
|
3771
|
+
vnode.anchor = nextSibling(node);
|
|
3772
|
+
hydrateAnchor(target, targetNode);
|
|
3773
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
|
|
3774
|
+
hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3775
|
+
}
|
|
3698
3776
|
}
|
|
3699
3777
|
updateCssVars(vnode, disabled);
|
|
3700
3778
|
} else if (disabled) {
|
|
@@ -3782,49 +3860,16 @@ var Vue = (function() {
|
|
|
3782
3860
|
setup(props, { slots }) {
|
|
3783
3861
|
const instance = getCurrentInstance();
|
|
3784
3862
|
const state = useTransitionState();
|
|
3863
|
+
let resumeAfterLeave;
|
|
3785
3864
|
return () => {
|
|
3786
|
-
const
|
|
3787
|
-
const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
|
|
3865
|
+
const child = resolveTransitionChild(slots.default && slots.default(), !!instance.subTree);
|
|
3788
3866
|
if (!child) return;
|
|
3789
3867
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
3790
3868
|
const { mode } = rawProps;
|
|
3791
3869
|
checkTransitionMode(mode);
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
let enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance, (hooks) => enterHooks = hooks);
|
|
3796
|
-
if (innerChild.type !== Comment) setTransitionHooks(innerChild, enterHooks);
|
|
3797
|
-
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
3798
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
3799
|
-
let leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);
|
|
3800
|
-
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
3801
|
-
if (mode === "out-in" && innerChild.type !== Comment) {
|
|
3802
|
-
state.isLeaving = true;
|
|
3803
|
-
leavingHooks.afterLeave = () => {
|
|
3804
|
-
state.isLeaving = false;
|
|
3805
|
-
if (!(instance.job.flags & 4)) instance.update();
|
|
3806
|
-
delete leavingHooks.afterLeave;
|
|
3807
|
-
oldInnerChild = void 0;
|
|
3808
|
-
};
|
|
3809
|
-
return emptyPlaceholder(child);
|
|
3810
|
-
} else if (mode === "in-out" && innerChild.type !== Comment) leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
3811
|
-
const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);
|
|
3812
|
-
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
3813
|
-
el[leaveCbKey] = () => {
|
|
3814
|
-
earlyRemove();
|
|
3815
|
-
el[leaveCbKey] = void 0;
|
|
3816
|
-
delete enterHooks.delayedLeave;
|
|
3817
|
-
oldInnerChild = void 0;
|
|
3818
|
-
};
|
|
3819
|
-
enterHooks.delayedLeave = () => {
|
|
3820
|
-
delayedLeave();
|
|
3821
|
-
delete enterHooks.delayedLeave;
|
|
3822
|
-
oldInnerChild = void 0;
|
|
3823
|
-
};
|
|
3824
|
-
};
|
|
3825
|
-
else oldInnerChild = void 0;
|
|
3826
|
-
} else if (oldInnerChild) oldInnerChild = void 0;
|
|
3827
|
-
return child;
|
|
3870
|
+
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
3871
|
+
if (!(instance.job.flags & 4)) instance.update();
|
|
3872
|
+
}) : NOOP);
|
|
3828
3873
|
};
|
|
3829
3874
|
}
|
|
3830
3875
|
};
|
|
@@ -3894,8 +3939,10 @@ var Vue = (function() {
|
|
|
3894
3939
|
persisted,
|
|
3895
3940
|
beforeEnter(el) {
|
|
3896
3941
|
let hook = onBeforeEnter;
|
|
3897
|
-
if (!state.isMounted)
|
|
3898
|
-
|
|
3942
|
+
if (!state.isMounted) {
|
|
3943
|
+
if (appear) hook = onBeforeAppear || onBeforeEnter;
|
|
3944
|
+
else return;
|
|
3945
|
+
}
|
|
3899
3946
|
if (el[leaveCbKey]) el[leaveCbKey](true);
|
|
3900
3947
|
earlyRemove();
|
|
3901
3948
|
callHook(hook, [el]);
|
|
@@ -3905,11 +3952,13 @@ var Vue = (function() {
|
|
|
3905
3952
|
let hook = onEnter;
|
|
3906
3953
|
let afterHook = onAfterEnter;
|
|
3907
3954
|
let cancelHook = onEnterCancelled;
|
|
3908
|
-
if (!state.isMounted)
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3955
|
+
if (!state.isMounted) {
|
|
3956
|
+
if (appear) {
|
|
3957
|
+
hook = onAppear || onEnter;
|
|
3958
|
+
afterHook = onAfterAppear || onAfterEnter;
|
|
3959
|
+
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
3960
|
+
} else return;
|
|
3961
|
+
}
|
|
3913
3962
|
let called = false;
|
|
3914
3963
|
el[enterCbKey$1] = (cancelled) => {
|
|
3915
3964
|
if (called) return;
|
|
@@ -3943,7 +3992,7 @@ var Vue = (function() {
|
|
|
3943
3992
|
else done();
|
|
3944
3993
|
},
|
|
3945
3994
|
clone(node) {
|
|
3946
|
-
return cloneHooks(node);
|
|
3995
|
+
return cloneHooks ? cloneHooks(node) : hooks;
|
|
3947
3996
|
}
|
|
3948
3997
|
};
|
|
3949
3998
|
return hooks;
|
|
@@ -3967,16 +4016,91 @@ var Vue = (function() {
|
|
|
3967
4016
|
if (shapeFlag & 32 && isFunction(children.default)) return children.default();
|
|
3968
4017
|
}
|
|
3969
4018
|
}
|
|
4019
|
+
function resolveTransitionChild(children, renderEmpty = false) {
|
|
4020
|
+
const branches = children && getTransitionRawChildren(children, true);
|
|
4021
|
+
return branches && branches.length ? findNonCommentChild(branches) : renderEmpty ? createCommentVNode() : void 0;
|
|
4022
|
+
}
|
|
4023
|
+
/**
|
|
4024
|
+
* @internal
|
|
4025
|
+
*/
|
|
4026
|
+
function prepareTransitionSwitch(previous, next, props, state, instance, resumeAfterLeave, delayedLeaveSource) {
|
|
4027
|
+
if (state.isLeaving) return emptyPlaceholder(next);
|
|
4028
|
+
const nextInner = getInnerChild$1(next);
|
|
4029
|
+
if (!nextInner) return emptyPlaceholder(next);
|
|
4030
|
+
let enterHooks = resolveTransitionHooks(nextInner, props, state, instance, (hooks) => {
|
|
4031
|
+
if (delayedLeaveSource) forwardDelayedLeave(hooks, delayedLeaveSource);
|
|
4032
|
+
enterHooks = hooks;
|
|
4033
|
+
});
|
|
4034
|
+
if (delayedLeaveSource) forwardDelayedLeave(enterHooks, delayedLeaveSource);
|
|
4035
|
+
if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
|
|
4036
|
+
const mode = props.mode;
|
|
4037
|
+
const previousInner = previous && getInnerChild$1(previous);
|
|
4038
|
+
if (previous && previousInner && previousInner.type !== Comment && !isSameVNodeType(previousInner, nextInner) && (!previous.component || recursiveGetSubtree(previous.component).type !== Comment)) {
|
|
4039
|
+
const leavingHooks = prepareLeavingTransitionHooks(previousInner, props, state, instance);
|
|
4040
|
+
if (nextInner.type !== Comment && (mode === "out-in" || mode === "in-out") && applyTransitionModeSwitch(previousInner, leavingHooks, mode === "in-out" ? () => enterHooks : void 0, props, state, resumeAfterLeave)) return emptyPlaceholder(next);
|
|
4041
|
+
}
|
|
4042
|
+
return next;
|
|
4043
|
+
}
|
|
4044
|
+
function forwardDelayedLeave(hooks, source) {
|
|
4045
|
+
const delayedLeave = source && source.delayedLeave;
|
|
4046
|
+
if (!delayedLeave) return;
|
|
4047
|
+
hooks.delayedLeave = () => {
|
|
4048
|
+
if (source.delayedLeave === delayedLeave) delayedLeave();
|
|
4049
|
+
delete hooks.delayedLeave;
|
|
4050
|
+
};
|
|
4051
|
+
}
|
|
4052
|
+
function prepareLeavingTransitionHooks(previousInner, props, state, instance) {
|
|
4053
|
+
return setTransitionHooks(previousInner, resolveTransitionHooks(previousInner, props, state, instance));
|
|
4054
|
+
}
|
|
4055
|
+
function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, props, state, resumeAfterLeave) {
|
|
4056
|
+
if (props.mode === "out-in") {
|
|
4057
|
+
state.isLeaving = true;
|
|
4058
|
+
leavingHooks.afterLeave = () => {
|
|
4059
|
+
state.isLeaving = false;
|
|
4060
|
+
resumeAfterLeave();
|
|
4061
|
+
delete leavingHooks.afterLeave;
|
|
4062
|
+
};
|
|
4063
|
+
return true;
|
|
4064
|
+
} else if (props.mode === "in-out" && getEnterHooks) {
|
|
4065
|
+
let delayedLeavingVNode = leavingVNode;
|
|
4066
|
+
leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
4067
|
+
const enterHooks = getEnterHooks();
|
|
4068
|
+
if (!enterHooks) {
|
|
4069
|
+
delayedLeave();
|
|
4070
|
+
return;
|
|
4071
|
+
}
|
|
4072
|
+
const vnode = delayedLeavingVNode;
|
|
4073
|
+
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
4074
|
+
leavingVNodesCache[String(vnode.key)] = vnode;
|
|
4075
|
+
el[leaveCbKey] = () => {
|
|
4076
|
+
earlyRemove();
|
|
4077
|
+
el[leaveCbKey] = void 0;
|
|
4078
|
+
delete enterHooks.delayedLeave;
|
|
4079
|
+
delayedLeavingVNode = void 0;
|
|
4080
|
+
};
|
|
4081
|
+
enterHooks.delayedLeave = () => {
|
|
4082
|
+
delayedLeave();
|
|
4083
|
+
delete enterHooks.delayedLeave;
|
|
4084
|
+
delayedLeavingVNode = void 0;
|
|
4085
|
+
};
|
|
4086
|
+
};
|
|
4087
|
+
}
|
|
4088
|
+
return false;
|
|
4089
|
+
}
|
|
3970
4090
|
function setTransitionHooks(vnode, hooks) {
|
|
3971
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
3972
|
-
else {
|
|
4091
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3973
4092
|
vnode.transition = hooks;
|
|
3974
|
-
setTransitionHooks(vnode.component
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
4093
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
4094
|
+
else {
|
|
4095
|
+
const subTree = vnode.component.subTree;
|
|
4096
|
+
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
4097
|
+
}
|
|
4098
|
+
} else if (vnode.shapeFlag & 128) {
|
|
4099
|
+
const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4100
|
+
const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4101
|
+
return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
|
|
3979
4102
|
} else vnode.transition = hooks;
|
|
4103
|
+
return hooks;
|
|
3980
4104
|
}
|
|
3981
4105
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
3982
4106
|
let ret = [];
|
|
@@ -4000,9 +4124,9 @@ var Vue = (function() {
|
|
|
4000
4124
|
}
|
|
4001
4125
|
//#endregion
|
|
4002
4126
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
4003
|
-
|
|
4127
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
4004
4128
|
function defineComponent(options, extraOptions) {
|
|
4005
|
-
return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
|
|
4129
|
+
return isFunction(options) ? /*@__PURE__*/ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
|
|
4006
4130
|
}
|
|
4007
4131
|
//#endregion
|
|
4008
4132
|
//#region packages/runtime-core/src/helpers/useId.ts
|
|
@@ -4099,15 +4223,16 @@ var Vue = (function() {
|
|
|
4099
4223
|
if (rawRef.f) {
|
|
4100
4224
|
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
4101
4225
|
if (isUnmount) isArray(existing) && remove(existing, refValue);
|
|
4102
|
-
else if (!isArray(existing))
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4226
|
+
else if (!isArray(existing)) {
|
|
4227
|
+
if (_isString) {
|
|
4228
|
+
refs[ref] = [refValue];
|
|
4229
|
+
if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
|
|
4230
|
+
} else {
|
|
4231
|
+
const newVal = [refValue];
|
|
4232
|
+
if (canSetRef(ref, rawRef.k)) ref.value = newVal;
|
|
4233
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
4234
|
+
}
|
|
4235
|
+
} else if (!existing.includes(refValue)) existing.push(refValue);
|
|
4111
4236
|
} else if (_isString) {
|
|
4112
4237
|
refs[ref] = value;
|
|
4113
4238
|
if (canSetSetupRef(ref)) setupState[ref] = value;
|
|
@@ -4159,7 +4284,18 @@ var Vue = (function() {
|
|
|
4159
4284
|
hasLoggedMismatchError = true;
|
|
4160
4285
|
};
|
|
4161
4286
|
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
4162
|
-
const isMathMLContainer = (container) =>
|
|
4287
|
+
const isMathMLContainer = (container) => {
|
|
4288
|
+
if (!container.namespaceURI.includes("MathML")) return false;
|
|
4289
|
+
if (container.tagName !== "annotation-xml") return true;
|
|
4290
|
+
const encoding = container.getAttribute("encoding");
|
|
4291
|
+
return !encoding || !encoding.includes("html");
|
|
4292
|
+
};
|
|
4293
|
+
/**
|
|
4294
|
+
* Resolve the element namespace a container's children should be created in.
|
|
4295
|
+
* The live DOM is the source of truth, so this also covers containers that are
|
|
4296
|
+
* only known at runtime (interop boundaries, teleport targets).
|
|
4297
|
+
* @internal
|
|
4298
|
+
*/
|
|
4163
4299
|
const getContainerType = (container) => {
|
|
4164
4300
|
if (container.nodeType !== 1) return void 0;
|
|
4165
4301
|
if (isSVGContainer(container)) return "svg";
|
|
@@ -4183,7 +4319,7 @@ var Vue = (function() {
|
|
|
4183
4319
|
};
|
|
4184
4320
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
4185
4321
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
4186
|
-
const isFragmentStart = isComment(node) && node.data === "[";
|
|
4322
|
+
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
|
|
4187
4323
|
const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
|
|
4188
4324
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
4189
4325
|
let domType = node.nodeType;
|
|
@@ -4197,11 +4333,12 @@ var Vue = (function() {
|
|
|
4197
4333
|
let nextNode = null;
|
|
4198
4334
|
switch (type) {
|
|
4199
4335
|
case Text:
|
|
4200
|
-
if (domType !== 3)
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4336
|
+
if (domType !== 3) {
|
|
4337
|
+
if (vnode.children === "") {
|
|
4338
|
+
insert(vnode.el = createText(""), parentNode(node), node);
|
|
4339
|
+
nextNode = node;
|
|
4340
|
+
} else nextNode = onMismatch();
|
|
4341
|
+
} else {
|
|
4205
4342
|
if (node.data !== vnode.children) {
|
|
4206
4343
|
warn$1(`Hydration text mismatch in`, node.parentNode, `\n - rendered on server: ${JSON.stringify(node.data)}\n - expected on client: ${JSON.stringify(vnode.children)}`);
|
|
4207
4344
|
logMismatchError();
|
|
@@ -4238,45 +4375,35 @@ var Vue = (function() {
|
|
|
4238
4375
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4239
4376
|
break;
|
|
4240
4377
|
case VaporSlot:
|
|
4241
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
|
|
4378
|
+
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4242
4379
|
break;
|
|
4243
|
-
default: if (shapeFlag & 1)
|
|
4244
|
-
|
|
4245
|
-
|
|
4380
|
+
default: if (shapeFlag & 1) {
|
|
4381
|
+
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
|
|
4382
|
+
else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4383
|
+
} else if (shapeFlag & 6) {
|
|
4246
4384
|
vnode.slotScopeIds = slotScopeIds;
|
|
4247
4385
|
const container = parentNode(node);
|
|
4248
4386
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
4249
4387
|
else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
4250
4388
|
else nextNode = nextSibling(node);
|
|
4251
|
-
if (vnode.type.__vapor)
|
|
4252
|
-
|
|
4253
|
-
getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense, () => {
|
|
4254
|
-
if (vnode.dirs) {
|
|
4255
|
-
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
4256
|
-
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
4257
|
-
}
|
|
4258
|
-
}, () => {
|
|
4259
|
-
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, vnode);
|
|
4260
|
-
});
|
|
4261
|
-
if (vnode.dirs) queueEffectWithSuspense(() => invokeDirectiveHook(vnode, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
4262
|
-
const vnodeMountedHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeMounted;
|
|
4263
|
-
if (vnodeMountedHook) queueEffectWithSuspense(() => invokeVNodeHook(vnodeMountedHook, parentComponent, vnode), void 0, parentSuspense);
|
|
4264
|
-
} else {
|
|
4389
|
+
if (vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
|
|
4390
|
+
else {
|
|
4265
4391
|
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
4266
4392
|
const component = vnode.component;
|
|
4267
|
-
if (isAsyncWrapper(vnode)
|
|
4393
|
+
if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep)) {
|
|
4268
4394
|
let subTree;
|
|
4269
4395
|
if (isFragmentStart) {
|
|
4270
|
-
subTree = createVNode(
|
|
4396
|
+
subTree = createVNode(Static);
|
|
4271
4397
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
4272
|
-
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
4398
|
+
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(node.nodeType === 8 ? Comment : "div");
|
|
4273
4399
|
subTree.el = node;
|
|
4274
4400
|
component.subTree = subTree;
|
|
4275
4401
|
}
|
|
4276
4402
|
}
|
|
4277
|
-
} else if (shapeFlag & 64)
|
|
4278
|
-
|
|
4279
|
-
|
|
4403
|
+
} else if (shapeFlag & 64) {
|
|
4404
|
+
if (domType !== 8) nextNode = onMismatch();
|
|
4405
|
+
else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
4406
|
+
} else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
4280
4407
|
else warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
4281
4408
|
}
|
|
4282
4409
|
if (ref != null) setRef(ref, null, parentSuspense, vnode);
|
|
@@ -4328,7 +4455,10 @@ var Vue = (function() {
|
|
|
4328
4455
|
const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
|
|
4329
4456
|
for (const key in props) {
|
|
4330
4457
|
if (!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) logMismatchError();
|
|
4331
|
-
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key))
|
|
4458
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
4459
|
+
if (isUnchangedResourceProp(el, key, props[key])) continue;
|
|
4460
|
+
patchProp(el, key, null, props[key], namespace, parentComponent);
|
|
4461
|
+
}
|
|
4332
4462
|
}
|
|
4333
4463
|
}
|
|
4334
4464
|
let vnodeHooks;
|
|
@@ -4376,8 +4506,9 @@ var Vue = (function() {
|
|
|
4376
4506
|
const { slotScopeIds: fragmentSlotScopeIds } = vnode;
|
|
4377
4507
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
4378
4508
|
const container = parentNode(node);
|
|
4379
|
-
const
|
|
4380
|
-
|
|
4509
|
+
const first = nextSibling(node);
|
|
4510
|
+
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4511
|
+
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
4381
4512
|
else {
|
|
4382
4513
|
logMismatchError();
|
|
4383
4514
|
insert(vnode.anchor = createComment(`]`), container, next);
|
|
@@ -4386,7 +4517,7 @@ var Vue = (function() {
|
|
|
4386
4517
|
};
|
|
4387
4518
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4388
4519
|
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
4389
|
-
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
4520
|
+
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && (node.data === "[" || node.data === "(") ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
4390
4521
|
logMismatchError();
|
|
4391
4522
|
}
|
|
4392
4523
|
vnode.el = null;
|
|
@@ -4402,20 +4533,22 @@ var Vue = (function() {
|
|
|
4402
4533
|
const container = parentNode(node);
|
|
4403
4534
|
remove(node);
|
|
4404
4535
|
patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
4405
|
-
if (parentComponent) {
|
|
4536
|
+
if (parentComponent && parentComponent.vnode) {
|
|
4406
4537
|
parentComponent.vnode.el = vnode.el;
|
|
4407
4538
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
4408
4539
|
}
|
|
4409
4540
|
return next;
|
|
4410
4541
|
};
|
|
4411
|
-
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
4542
|
+
const locateClosingAnchor = (node, open = node && isComment(node) && node.data === "(" ? "(" : "[", close = open === "(" ? ")" : "]") => {
|
|
4412
4543
|
let match = 0;
|
|
4413
4544
|
while (node) {
|
|
4414
4545
|
node = nextSibling(node);
|
|
4415
4546
|
if (node && isComment(node)) {
|
|
4416
4547
|
if (node.data === open) match++;
|
|
4417
|
-
if (node.data === close)
|
|
4418
|
-
|
|
4548
|
+
if (node.data === close) {
|
|
4549
|
+
if (match === 0) return nextSibling(node);
|
|
4550
|
+
else match--;
|
|
4551
|
+
}
|
|
4419
4552
|
}
|
|
4420
4553
|
}
|
|
4421
4554
|
return node;
|
|
@@ -4425,7 +4558,7 @@ var Vue = (function() {
|
|
|
4425
4558
|
if (parentNode) parentNode.replaceChild(newNode, oldNode);
|
|
4426
4559
|
let parent = parentComponent;
|
|
4427
4560
|
while (parent) {
|
|
4428
|
-
if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
|
|
4561
|
+
if (parent.vnode && parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
|
|
4429
4562
|
parent = parent.parent;
|
|
4430
4563
|
}
|
|
4431
4564
|
};
|
|
@@ -4434,6 +4567,16 @@ var Vue = (function() {
|
|
|
4434
4567
|
const isTemplateNode$1 = (node) => {
|
|
4435
4568
|
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
4436
4569
|
};
|
|
4570
|
+
const resourceProps = /*@__PURE__*/ new Set([
|
|
4571
|
+
"src",
|
|
4572
|
+
"srcset",
|
|
4573
|
+
"href",
|
|
4574
|
+
"poster"
|
|
4575
|
+
]);
|
|
4576
|
+
function isUnchangedResourceProp(el, key, clientValue) {
|
|
4577
|
+
if (!resourceProps.has(key)) return false;
|
|
4578
|
+
return el.getAttribute(key) === (clientValue == null ? null : `${clientValue}`);
|
|
4579
|
+
}
|
|
4437
4580
|
/**
|
|
4438
4581
|
* Dev only
|
|
4439
4582
|
*/
|
|
@@ -4477,7 +4620,10 @@ var Vue = (function() {
|
|
|
4477
4620
|
function getAttributeMismatch(el, key, clientValue) {
|
|
4478
4621
|
let actual;
|
|
4479
4622
|
let expected;
|
|
4480
|
-
if (
|
|
4623
|
+
if (key === "hidden") {
|
|
4624
|
+
actual = normalizeHiddenValue(el.getAttribute(key));
|
|
4625
|
+
expected = normalizeHiddenValue(clientValue);
|
|
4626
|
+
} else if (isBooleanAttr(key)) {
|
|
4481
4627
|
actual = el.hasAttribute(key);
|
|
4482
4628
|
expected = includeBooleanAttr(clientValue);
|
|
4483
4629
|
} else if (clientValue == null) {
|
|
@@ -4505,6 +4651,11 @@ var Vue = (function() {
|
|
|
4505
4651
|
}
|
|
4506
4652
|
return false;
|
|
4507
4653
|
}
|
|
4654
|
+
function normalizeHiddenValue(value) {
|
|
4655
|
+
if (!isRenderableAttrValue(value)) return false;
|
|
4656
|
+
if (isString(value)) return value.toLowerCase() === "until-found" ? "until-found" : "";
|
|
4657
|
+
return includeBooleanAttr(value) ? "" : false;
|
|
4658
|
+
}
|
|
4508
4659
|
function toClassSet(str) {
|
|
4509
4660
|
return new Set(str.trim().split(/\s+/));
|
|
4510
4661
|
}
|
|
@@ -4643,16 +4794,18 @@ var Vue = (function() {
|
|
|
4643
4794
|
return teardown;
|
|
4644
4795
|
};
|
|
4645
4796
|
function forEachElement(node, cb) {
|
|
4646
|
-
if (isComment(node) && node.data === "[") {
|
|
4797
|
+
if (isComment(node) && (node.data === "[" || node.data === "(")) {
|
|
4798
|
+
const open = node.data;
|
|
4799
|
+
const close = open === "[" ? "]" : ")";
|
|
4647
4800
|
let depth = 1;
|
|
4648
4801
|
let next = node.nextSibling;
|
|
4649
4802
|
while (next) {
|
|
4650
4803
|
if (next.nodeType === 1) {
|
|
4651
4804
|
if (cb(next) === false) break;
|
|
4652
4805
|
} else if (isComment(next)) {
|
|
4653
|
-
if (next.data ===
|
|
4806
|
+
if (next.data === close) {
|
|
4654
4807
|
if (--depth === 0) break;
|
|
4655
|
-
} else if (next.data ===
|
|
4808
|
+
} else if (next.data === open) depth++;
|
|
4656
4809
|
}
|
|
4657
4810
|
next = next.nextSibling;
|
|
4658
4811
|
}
|
|
@@ -4661,14 +4814,14 @@ var Vue = (function() {
|
|
|
4661
4814
|
//#endregion
|
|
4662
4815
|
//#region packages/runtime-core/src/apiAsyncComponent.ts
|
|
4663
4816
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
4664
|
-
|
|
4817
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
4665
4818
|
function defineAsyncComponent(source) {
|
|
4666
4819
|
const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
|
|
4667
4820
|
return /* @__PURE__ */ defineComponent({
|
|
4668
4821
|
name: "AsyncComponentWrapper",
|
|
4669
4822
|
__asyncLoader: load,
|
|
4670
4823
|
__asyncHydrate(el, instance, hydrate) {
|
|
4671
|
-
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
|
|
4824
|
+
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
|
|
4672
4825
|
},
|
|
4673
4826
|
get __asyncResolved() {
|
|
4674
4827
|
return getResolvedComp();
|
|
@@ -4787,10 +4940,10 @@ var Vue = (function() {
|
|
|
4787
4940
|
* shared between core and vapor
|
|
4788
4941
|
* @internal
|
|
4789
4942
|
*/
|
|
4790
|
-
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
4943
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
|
|
4791
4944
|
const wasConnected = el.isConnected;
|
|
4792
4945
|
let patched = false;
|
|
4793
|
-
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4946
|
+
if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4794
4947
|
const performHydrate = () => {
|
|
4795
4948
|
if (patched) {
|
|
4796
4949
|
{
|
|
@@ -4876,10 +5029,13 @@ var Vue = (function() {
|
|
|
4876
5029
|
});
|
|
4877
5030
|
let pendingCacheKey = null;
|
|
4878
5031
|
const cacheSubtree = () => {
|
|
4879
|
-
if (pendingCacheKey != null)
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
5032
|
+
if (pendingCacheKey != null) {
|
|
5033
|
+
if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
|
|
5034
|
+
const vnode = getInnerChild(keepAliveInstance.subTree);
|
|
5035
|
+
if (vnode.component) cache.set(pendingCacheKey, vnode);
|
|
5036
|
+
}, void 0, keepAliveInstance.subTree.suspense);
|
|
5037
|
+
else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
|
|
5038
|
+
}
|
|
4883
5039
|
};
|
|
4884
5040
|
onMounted(cacheSubtree);
|
|
4885
5041
|
onUpdated(cacheSubtree);
|
|
@@ -4950,7 +5106,7 @@ var Vue = (function() {
|
|
|
4950
5106
|
t.__isBuiltIn = true;
|
|
4951
5107
|
return t;
|
|
4952
5108
|
};
|
|
4953
|
-
const KeepAlive =
|
|
5109
|
+
const KeepAlive = /*@__PURE__*/ decorate$2(KeepAliveImpl);
|
|
4954
5110
|
function matches(pattern, name) {
|
|
4955
5111
|
if (isArray(pattern)) return pattern.some((p) => matches(p, name));
|
|
4956
5112
|
else if (isString(pattern)) return pattern.split(",").includes(name);
|
|
@@ -5041,7 +5197,7 @@ var Vue = (function() {
|
|
|
5041
5197
|
try {
|
|
5042
5198
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
5043
5199
|
} finally {
|
|
5044
|
-
|
|
5200
|
+
restoreCurrentInstance(prev);
|
|
5045
5201
|
setActiveSub(prevSub);
|
|
5046
5202
|
}
|
|
5047
5203
|
});
|
|
@@ -5166,16 +5322,17 @@ var Vue = (function() {
|
|
|
5166
5322
|
}
|
|
5167
5323
|
const l = arguments.length;
|
|
5168
5324
|
const is2ndArgArrayChildren = isArray(propsOrChildren);
|
|
5169
|
-
if (l === 2 || is2ndArgArrayChildren)
|
|
5170
|
-
if (
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5325
|
+
if (l === 2 || is2ndArgArrayChildren) {
|
|
5326
|
+
if (isObject(propsOrChildren) && !is2ndArgArrayChildren) {
|
|
5327
|
+
if (isVNode(propsOrChildren)) return convertLegacySlots(createVNode(type, null, [propsOrChildren]));
|
|
5328
|
+
return convertLegacySlots(convertLegacyDirectives(createVNode(type, convertLegacyProps(propsOrChildren, type)), propsOrChildren));
|
|
5329
|
+
} else return convertLegacySlots(createVNode(type, null, propsOrChildren));
|
|
5330
|
+
} else {
|
|
5174
5331
|
if (isVNode(children)) children = [children];
|
|
5175
5332
|
return convertLegacySlots(convertLegacyDirectives(createVNode(type, convertLegacyProps(propsOrChildren, type), children), propsOrChildren));
|
|
5176
5333
|
}
|
|
5177
5334
|
}
|
|
5178
|
-
const skipLegacyRootLevelProps =
|
|
5335
|
+
const skipLegacyRootLevelProps = /*@__PURE__*/ makeMap("staticStyle,staticClass,directives,model,hook");
|
|
5179
5336
|
function convertLegacyProps(legacyProps, type) {
|
|
5180
5337
|
if (!legacyProps) return null;
|
|
5181
5338
|
const converted = {};
|
|
@@ -5187,8 +5344,10 @@ var Vue = (function() {
|
|
|
5187
5344
|
if (key === "nativeOn") handlerKey += `Native`;
|
|
5188
5345
|
const existing = converted[handlerKey];
|
|
5189
5346
|
const incoming = listeners[event];
|
|
5190
|
-
if (existing !== incoming)
|
|
5191
|
-
|
|
5347
|
+
if (existing !== incoming) {
|
|
5348
|
+
if (existing) converted[handlerKey] = [].concat(existing, incoming);
|
|
5349
|
+
else converted[handlerKey] = incoming;
|
|
5350
|
+
}
|
|
5192
5351
|
}
|
|
5193
5352
|
} else if (!skipLegacyRootLevelProps(key)) converted[key] = legacyProps[key];
|
|
5194
5353
|
if (legacyProps.staticClass) converted.class = normalizeClass([legacyProps.staticClass, converted.class]);
|
|
@@ -5287,7 +5446,7 @@ var Vue = (function() {
|
|
|
5287
5446
|
const legacyFn = comp.render;
|
|
5288
5447
|
const Func = (props, ctx) => {
|
|
5289
5448
|
const instance = getCurrentInstance();
|
|
5290
|
-
|
|
5449
|
+
const legacyCtx = {
|
|
5291
5450
|
props,
|
|
5292
5451
|
children: instance.vnode.children || [],
|
|
5293
5452
|
data: instance.vnode.props || {},
|
|
@@ -5307,7 +5466,8 @@ var Vue = (function() {
|
|
|
5307
5466
|
}
|
|
5308
5467
|
return {};
|
|
5309
5468
|
}
|
|
5310
|
-
}
|
|
5469
|
+
};
|
|
5470
|
+
return legacyFn(compatH, legacyCtx);
|
|
5311
5471
|
};
|
|
5312
5472
|
Func.props = comp.props;
|
|
5313
5473
|
Func.displayName = comp.name;
|
|
@@ -5336,23 +5496,25 @@ var Vue = (function() {
|
|
|
5336
5496
|
}
|
|
5337
5497
|
ret = new Array(source.length);
|
|
5338
5498
|
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]);
|
|
5339
|
-
} else if (typeof source === "number")
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
5347
|
-
else {
|
|
5348
|
-
const keys = Object.keys(source);
|
|
5349
|
-
ret = new Array(keys.length);
|
|
5350
|
-
for (let i = 0, l = keys.length; i < l; i++) {
|
|
5351
|
-
const key = keys[i];
|
|
5352
|
-
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
5499
|
+
} else if (typeof source === "number") {
|
|
5500
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
5501
|
+
warn$1(`The v-for range expects a positive integer value but got ${source}.`);
|
|
5502
|
+
ret = [];
|
|
5503
|
+
} else {
|
|
5504
|
+
ret = new Array(source);
|
|
5505
|
+
for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
5353
5506
|
}
|
|
5354
|
-
}
|
|
5355
|
-
|
|
5507
|
+
} else if (isObject(source)) {
|
|
5508
|
+
if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
5509
|
+
else {
|
|
5510
|
+
const keys = Object.keys(source);
|
|
5511
|
+
ret = new Array(keys.length);
|
|
5512
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
5513
|
+
const key = keys[i];
|
|
5514
|
+
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
5515
|
+
}
|
|
5516
|
+
}
|
|
5517
|
+
} else ret = [];
|
|
5356
5518
|
if (cache) cache[index] = ret;
|
|
5357
5519
|
return ret;
|
|
5358
5520
|
}
|
|
@@ -5377,18 +5539,28 @@ var Vue = (function() {
|
|
|
5377
5539
|
//#endregion
|
|
5378
5540
|
//#region packages/runtime-core/src/helpers/renderSlot.ts
|
|
5379
5541
|
/**
|
|
5542
|
+
* Links a slot function to its raw vapor slot: a raw vapor slot carries
|
|
5543
|
+
* itself, and the wrapper the interop slots proxy hands out carries the raw
|
|
5544
|
+
* slot it wraps — one lookup answers both "is this a vapor slot" and
|
|
5545
|
+
* "which one". Internal to vapor interop.
|
|
5546
|
+
*/
|
|
5547
|
+
const rawVaporSlotKey = Symbol(`rawVaporSlot`);
|
|
5548
|
+
/**
|
|
5380
5549
|
* Compiler runtime helper for rendering `<slot/>`
|
|
5381
5550
|
* @private
|
|
5382
5551
|
*/
|
|
5383
|
-
function renderSlot(slots, name, props
|
|
5552
|
+
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
5553
|
+
if (props == null) props = {};
|
|
5384
5554
|
let slot = slots[name];
|
|
5385
|
-
|
|
5386
|
-
const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
|
|
5555
|
+
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
5387
5556
|
if (vaporSlot) {
|
|
5388
5557
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
5389
5558
|
ret.vs = {
|
|
5390
5559
|
slot: vaporSlot,
|
|
5391
|
-
fallback
|
|
5560
|
+
outlets: fallback ? [{
|
|
5561
|
+
fallback,
|
|
5562
|
+
owner: currentRenderingInstance
|
|
5563
|
+
}] : void 0
|
|
5392
5564
|
};
|
|
5393
5565
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5394
5566
|
return ret;
|
|
@@ -5409,9 +5581,15 @@ var Vue = (function() {
|
|
|
5409
5581
|
let rendered;
|
|
5410
5582
|
try {
|
|
5411
5583
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5412
|
-
|
|
5584
|
+
let attached = false;
|
|
5585
|
+
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
5586
|
+
const interop = currentRenderingInstance.appContext.vapor;
|
|
5587
|
+
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
5588
|
+
}
|
|
5413
5589
|
const slotKey = props.key || branchKey || validSlotContent && validSlotContent.key;
|
|
5414
5590
|
rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
|
|
5591
|
+
if (!validSlotContent && fallback) rendered.shapeFlag |= 1024;
|
|
5592
|
+
if (attached) rendered.vo = true;
|
|
5415
5593
|
} catch (err) {
|
|
5416
5594
|
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
5417
5595
|
throw err;
|
|
@@ -5429,10 +5607,6 @@ var Vue = (function() {
|
|
|
5429
5607
|
return true;
|
|
5430
5608
|
}) ? vnodes : null;
|
|
5431
5609
|
}
|
|
5432
|
-
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
5433
|
-
let vaporSlot;
|
|
5434
|
-
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
|
|
5435
|
-
}
|
|
5436
5610
|
//#endregion
|
|
5437
5611
|
//#region packages/runtime-core/src/helpers/toHandlers.ts
|
|
5438
5612
|
/**
|
|
@@ -5491,12 +5665,14 @@ var Vue = (function() {
|
|
|
5491
5665
|
function mapKeyToName(slots) {
|
|
5492
5666
|
for (let i = 0; i < slots.length; i++) {
|
|
5493
5667
|
const fn = slots[i];
|
|
5494
|
-
if (fn)
|
|
5495
|
-
|
|
5668
|
+
if (fn) {
|
|
5669
|
+
if (isArray(fn)) mapKeyToName(fn);
|
|
5670
|
+
else fn.name = fn.key || "default";
|
|
5671
|
+
}
|
|
5496
5672
|
}
|
|
5497
5673
|
return slots;
|
|
5498
5674
|
}
|
|
5499
|
-
const staticCacheMap =
|
|
5675
|
+
const staticCacheMap = /*@__PURE__*/ new WeakMap();
|
|
5500
5676
|
function legacyRenderStatic(instance, index) {
|
|
5501
5677
|
let cache = staticCacheMap.get(instance);
|
|
5502
5678
|
if (!cache) staticCacheMap.set(instance, cache = []);
|
|
@@ -5629,11 +5805,38 @@ var Vue = (function() {
|
|
|
5629
5805
|
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
5630
5806
|
return getPublicInstance(i.parent);
|
|
5631
5807
|
};
|
|
5808
|
+
const resolveDevRootEl = (vnode) => {
|
|
5809
|
+
let found = false;
|
|
5810
|
+
while (true) {
|
|
5811
|
+
if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
|
|
5812
|
+
const root = filterSingleRoot(vnode.children);
|
|
5813
|
+
if (!root) return;
|
|
5814
|
+
vnode = root;
|
|
5815
|
+
found = true;
|
|
5816
|
+
continue;
|
|
5817
|
+
}
|
|
5818
|
+
const component = vnode.component;
|
|
5819
|
+
if (component && component.subTree) {
|
|
5820
|
+
vnode = component.subTree;
|
|
5821
|
+
continue;
|
|
5822
|
+
}
|
|
5823
|
+
const suspense = vnode.suspense;
|
|
5824
|
+
if (suspense && suspense.activeBranch) {
|
|
5825
|
+
vnode = suspense.activeBranch;
|
|
5826
|
+
continue;
|
|
5827
|
+
}
|
|
5828
|
+
return found ? vnode.el : void 0;
|
|
5829
|
+
}
|
|
5830
|
+
};
|
|
5831
|
+
const getDevRootFragmentEl = (i) => {
|
|
5832
|
+
const el = i.subTree && resolveDevRootEl(i.subTree);
|
|
5833
|
+
return el === void 0 ? i.vnode.el : el;
|
|
5834
|
+
};
|
|
5632
5835
|
let publicPropertiesMap;
|
|
5633
5836
|
const getPublicPropertiesMap = () => {
|
|
5634
5837
|
if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
|
|
5635
5838
|
$: (i) => i,
|
|
5636
|
-
$el: (i) => i
|
|
5839
|
+
$el: (i) => getDevRootFragmentEl(i),
|
|
5637
5840
|
$data: (i) => i.data,
|
|
5638
5841
|
$props: (i) => /* @__PURE__ */ shallowReadonly(i.props),
|
|
5639
5842
|
$attrs: (i) => /* @__PURE__ */ shallowReadonly(i.attrs),
|
|
@@ -5746,7 +5949,7 @@ var Vue = (function() {
|
|
|
5746
5949
|
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.");
|
|
5747
5950
|
return Reflect.ownKeys(target);
|
|
5748
5951
|
};
|
|
5749
|
-
const RuntimeCompiledPublicInstanceProxyHandlers =
|
|
5952
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
|
|
5750
5953
|
get(target, key) {
|
|
5751
5954
|
if (key === Symbol.unscopables) return;
|
|
5752
5955
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
@@ -5931,12 +6134,13 @@ var Vue = (function() {
|
|
|
5931
6134
|
for (const key in defaults) {
|
|
5932
6135
|
if (key.startsWith("__skip")) continue;
|
|
5933
6136
|
let opt = props[key];
|
|
5934
|
-
if (opt)
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
6137
|
+
if (opt) {
|
|
6138
|
+
if (isArray(opt) || isFunction(opt)) opt = props[key] = {
|
|
6139
|
+
type: opt,
|
|
6140
|
+
default: defaults[key]
|
|
6141
|
+
};
|
|
6142
|
+
else opt.default = defaults[key];
|
|
6143
|
+
} else if (opt === null) opt = props[key] = { default: defaults[key] };
|
|
5940
6144
|
else warn$1(`props default key "${key}" has no corresponding declaration.`);
|
|
5941
6145
|
if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
|
|
5942
6146
|
}
|
|
@@ -5986,37 +6190,32 @@ var Vue = (function() {
|
|
|
5986
6190
|
function withAsyncContext(getAwaitable) {
|
|
5987
6191
|
const ctx = getCurrentGenericInstance();
|
|
5988
6192
|
const inSSRSetup = isInSSRComponentSetup;
|
|
5989
|
-
const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
|
|
5990
6193
|
if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
5991
6194
|
let awaitable = getAwaitable();
|
|
5992
6195
|
setCurrentInstance(null, void 0);
|
|
5993
6196
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5994
6197
|
const restore = () => {
|
|
5995
|
-
const
|
|
6198
|
+
const stoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
5996
6199
|
setCurrentInstance(ctx);
|
|
5997
6200
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
5998
|
-
|
|
5999
|
-
return () => {
|
|
6000
|
-
if (reset) reset();
|
|
6001
|
-
if (resetStoppedScope) resetStoppedScope.reset();
|
|
6002
|
-
};
|
|
6201
|
+
return stoppedScope;
|
|
6003
6202
|
};
|
|
6004
6203
|
const cleanup = () => {
|
|
6005
6204
|
setCurrentInstance(null, void 0);
|
|
6006
6205
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
6007
6206
|
};
|
|
6008
6207
|
if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
|
|
6009
|
-
const
|
|
6208
|
+
const stoppedScope = restore();
|
|
6010
6209
|
Promise.resolve().then(() => Promise.resolve().then(() => {
|
|
6011
|
-
if (
|
|
6210
|
+
if (stoppedScope) stoppedScope.reset();
|
|
6012
6211
|
cleanup();
|
|
6013
6212
|
}));
|
|
6014
6213
|
throw e;
|
|
6015
6214
|
});
|
|
6016
6215
|
return [awaitable, () => {
|
|
6017
|
-
const
|
|
6216
|
+
const stoppedScope = restore();
|
|
6018
6217
|
Promise.resolve().then(() => {
|
|
6019
|
-
if (
|
|
6218
|
+
if (stoppedScope) stoppedScope.reset();
|
|
6020
6219
|
cleanup();
|
|
6021
6220
|
});
|
|
6022
6221
|
}];
|
|
@@ -6079,11 +6278,12 @@ var Vue = (function() {
|
|
|
6079
6278
|
const opt = computedOptions[key];
|
|
6080
6279
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
6081
6280
|
if (get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
|
|
6281
|
+
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
|
|
6282
|
+
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
6283
|
+
};
|
|
6082
6284
|
const c = computed({
|
|
6083
6285
|
get,
|
|
6084
|
-
set
|
|
6085
|
-
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
6086
|
-
}
|
|
6286
|
+
set
|
|
6087
6287
|
});
|
|
6088
6288
|
Object.defineProperty(ctx, key, {
|
|
6089
6289
|
enumerable: true,
|
|
@@ -6142,9 +6342,10 @@ var Vue = (function() {
|
|
|
6142
6342
|
for (const key in injectOptions) {
|
|
6143
6343
|
const opt = injectOptions[key];
|
|
6144
6344
|
let injected;
|
|
6145
|
-
if (isObject(opt))
|
|
6146
|
-
|
|
6147
|
-
|
|
6345
|
+
if (isObject(opt)) {
|
|
6346
|
+
if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
|
|
6347
|
+
else injected = inject(opt.from || key);
|
|
6348
|
+
} else injected = inject(opt);
|
|
6148
6349
|
if (/* @__PURE__ */ isRef(injected)) Object.defineProperty(ctx, key, {
|
|
6149
6350
|
enumerable: true,
|
|
6150
6351
|
configurable: true,
|
|
@@ -6164,7 +6365,8 @@ var Vue = (function() {
|
|
|
6164
6365
|
{
|
|
6165
6366
|
const cur = getCurrentInstance();
|
|
6166
6367
|
const instance = cur && getCurrentScope() === cur.scope ? cur : null;
|
|
6167
|
-
|
|
6368
|
+
const newValue = getter();
|
|
6369
|
+
if (isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) options.deep = true;
|
|
6168
6370
|
const baseGetter = getter;
|
|
6169
6371
|
getter = () => {
|
|
6170
6372
|
const val = baseGetter();
|
|
@@ -6177,13 +6379,14 @@ var Vue = (function() {
|
|
|
6177
6379
|
if (isFunction(handler)) watch(getter, handler, options);
|
|
6178
6380
|
else warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
6179
6381
|
} else if (isFunction(raw)) watch(getter, raw.bind(publicThis), options);
|
|
6180
|
-
else if (isObject(raw))
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6382
|
+
else if (isObject(raw)) {
|
|
6383
|
+
if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
6384
|
+
else {
|
|
6385
|
+
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
6386
|
+
if (isFunction(handler)) watch(getter, handler, extend(raw, options));
|
|
6387
|
+
else warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
6388
|
+
}
|
|
6389
|
+
} else warn$1(`Invalid watch option: "${key}"`, raw);
|
|
6187
6390
|
}
|
|
6188
6391
|
/**
|
|
6189
6392
|
* Resolve merged options and cache it on the component.
|
|
@@ -6197,12 +6400,13 @@ var Vue = (function() {
|
|
|
6197
6400
|
const cached = cache.get(base);
|
|
6198
6401
|
let resolved;
|
|
6199
6402
|
if (cached) resolved = cached;
|
|
6200
|
-
else if (!globalMixins.length && !mixins && !extendsOptions)
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6403
|
+
else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
6404
|
+
if (isCompatEnabled$1("PRIVATE_APIS", instance)) {
|
|
6405
|
+
resolved = extend({}, base);
|
|
6406
|
+
resolved.parent = instance.parent && instance.parent.proxy;
|
|
6407
|
+
resolved.propsData = instance.vnode.props;
|
|
6408
|
+
} else resolved = base;
|
|
6409
|
+
} else {
|
|
6206
6410
|
resolved = {};
|
|
6207
6411
|
if (globalMixins.length) globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
|
|
6208
6412
|
mergeOptions(resolved, base, optionMergeStrategies);
|
|
@@ -6275,7 +6479,7 @@ var Vue = (function() {
|
|
|
6275
6479
|
}
|
|
6276
6480
|
function mergeEmitsOrPropsOptions(to, from) {
|
|
6277
6481
|
if (to) {
|
|
6278
|
-
if (isArray(to) && isArray(from)) return [
|
|
6482
|
+
if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
6279
6483
|
return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
|
|
6280
6484
|
} else return from;
|
|
6281
6485
|
}
|
|
@@ -6336,7 +6540,7 @@ var Vue = (function() {
|
|
|
6336
6540
|
if (options.el) return vm.$mount(options.el);
|
|
6337
6541
|
else return vm;
|
|
6338
6542
|
}
|
|
6339
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6543
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.10`;
|
|
6340
6544
|
Vue.config = singletonApp.config;
|
|
6341
6545
|
Vue.use = (plugin, ...options) => {
|
|
6342
6546
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6726,8 +6930,10 @@ var Vue = (function() {
|
|
|
6726
6930
|
} else warn$1(`Cannot unmount an app that is not mounted.`);
|
|
6727
6931
|
},
|
|
6728
6932
|
provide(key, value) {
|
|
6729
|
-
if (key in context.provides)
|
|
6730
|
-
|
|
6933
|
+
if (key in context.provides) {
|
|
6934
|
+
if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
|
|
6935
|
+
else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
|
|
6936
|
+
}
|
|
6731
6937
|
context.provides[key] = value;
|
|
6732
6938
|
return app;
|
|
6733
6939
|
},
|
|
@@ -6809,13 +7015,17 @@ var Vue = (function() {
|
|
|
6809
7015
|
const modifiers = getModelModifiers(props, camelizedName, defaultPropGetter);
|
|
6810
7016
|
const res = customRef((track, trigger) => {
|
|
6811
7017
|
let localValue;
|
|
7018
|
+
let prevPropValue = EMPTY_OBJ;
|
|
6812
7019
|
let prevSetValue = EMPTY_OBJ;
|
|
6813
7020
|
let prevEmittedValue;
|
|
6814
7021
|
watchSyncEffect(() => {
|
|
6815
7022
|
const propValue = props[camelizedName];
|
|
6816
|
-
if (hasChanged(
|
|
6817
|
-
|
|
6818
|
-
|
|
7023
|
+
if (hasChanged(prevPropValue, propValue)) {
|
|
7024
|
+
prevPropValue = propValue;
|
|
7025
|
+
if (hasChanged(localValue, propValue)) {
|
|
7026
|
+
localValue = propValue;
|
|
7027
|
+
trigger();
|
|
7028
|
+
}
|
|
6819
7029
|
}
|
|
6820
7030
|
});
|
|
6821
7031
|
return {
|
|
@@ -6877,12 +7087,14 @@ var Vue = (function() {
|
|
|
6877
7087
|
if (instance.isUnmounted) return;
|
|
6878
7088
|
{
|
|
6879
7089
|
const { emitsOptions, propsOptions } = instance;
|
|
6880
|
-
if (emitsOptions)
|
|
6881
|
-
if (!
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
if (
|
|
7090
|
+
if (emitsOptions) {
|
|
7091
|
+
if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
|
|
7092
|
+
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.`);
|
|
7093
|
+
} else {
|
|
7094
|
+
const validator = emitsOptions[event];
|
|
7095
|
+
if (isFunction(validator)) {
|
|
7096
|
+
if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
7097
|
+
}
|
|
6886
7098
|
}
|
|
6887
7099
|
}
|
|
6888
7100
|
}
|
|
@@ -6892,7 +7104,7 @@ var Vue = (function() {
|
|
|
6892
7104
|
const modifiers = isCompatModelListener ? props.modelModifiers : isModelListener && getModelModifiers(props, event.slice(7), getter);
|
|
6893
7105
|
if (modifiers) {
|
|
6894
7106
|
if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
6895
|
-
if (modifiers.number) args =
|
|
7107
|
+
if (modifiers.number) args = args.map(looseToNumber);
|
|
6896
7108
|
}
|
|
6897
7109
|
devtoolsComponentEmit(instance, event, args);
|
|
6898
7110
|
{
|
|
@@ -7034,8 +7246,9 @@ var Vue = (function() {
|
|
|
7034
7246
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
7035
7247
|
}
|
|
7036
7248
|
if (vnode.transition) {
|
|
7037
|
-
|
|
7038
|
-
|
|
7249
|
+
const child = isTeleport(root.type) ? getInnerChild$1(root) || root : root;
|
|
7250
|
+
if (!isElementRoot(child)) warn$1("Component inside <Transition> renders non-element root node that cannot be animated.");
|
|
7251
|
+
setTransitionHooks(child, vnode.transition);
|
|
7039
7252
|
}
|
|
7040
7253
|
if (setRoot) setRoot(root);
|
|
7041
7254
|
else result = root;
|
|
@@ -7086,18 +7299,21 @@ var Vue = (function() {
|
|
|
7086
7299
|
for (let i = 0; i < children.length; i++) {
|
|
7087
7300
|
const child = children[i];
|
|
7088
7301
|
if (isVNode(child)) {
|
|
7089
|
-
if (child.type !== Comment || child.children === "v-if")
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7302
|
+
if (child.type !== Comment || child.children === "v-if") {
|
|
7303
|
+
if (singleRoot) return;
|
|
7304
|
+
else {
|
|
7305
|
+
singleRoot = child;
|
|
7306
|
+
if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
|
|
7307
|
+
}
|
|
7093
7308
|
}
|
|
7094
7309
|
} else return;
|
|
7095
7310
|
}
|
|
7096
7311
|
return singleRoot;
|
|
7097
7312
|
}
|
|
7313
|
+
const isFunctionalFallthroughKey = (key) => key === "class" || key === "style" || isOn(key);
|
|
7098
7314
|
const getFunctionalFallthrough = (attrs) => {
|
|
7099
7315
|
let res;
|
|
7100
|
-
for (const key in attrs) if (
|
|
7316
|
+
for (const key in attrs) if (isFunctionalFallthroughKey(key)) (res || (res = {}))[key] = attrs[key];
|
|
7101
7317
|
return res;
|
|
7102
7318
|
};
|
|
7103
7319
|
const filterModelListeners = (attrs, props) => {
|
|
@@ -7233,16 +7449,17 @@ var Vue = (function() {
|
|
|
7233
7449
|
let key = propsToUpdate[i];
|
|
7234
7450
|
if (isEmitListener(instance.emitsOptions, key)) continue;
|
|
7235
7451
|
const value = rawProps[key];
|
|
7236
|
-
if (options)
|
|
7237
|
-
if (
|
|
7238
|
-
attrs[key]
|
|
7239
|
-
|
|
7452
|
+
if (options) {
|
|
7453
|
+
if (hasOwn(attrs, key)) {
|
|
7454
|
+
if (value !== attrs[key]) {
|
|
7455
|
+
attrs[key] = value;
|
|
7456
|
+
hasAttrsChanged = true;
|
|
7457
|
+
}
|
|
7458
|
+
} else {
|
|
7459
|
+
const camelizedKey = camelize(key);
|
|
7460
|
+
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
7240
7461
|
}
|
|
7241
7462
|
} else {
|
|
7242
|
-
const camelizedKey = camelize(key);
|
|
7243
|
-
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
7244
|
-
}
|
|
7245
|
-
else {
|
|
7246
7463
|
if (isOn(key) && key.endsWith("Native")) key = key.slice(0, -6);
|
|
7247
7464
|
else if (shouldSkipAttr(key, instance)) continue;
|
|
7248
7465
|
if (value !== attrs[key]) {
|
|
@@ -7255,9 +7472,11 @@ var Vue = (function() {
|
|
|
7255
7472
|
} else {
|
|
7256
7473
|
if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
|
|
7257
7474
|
let kebabKey;
|
|
7258
|
-
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))
|
|
7259
|
-
if (
|
|
7260
|
-
|
|
7475
|
+
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
|
|
7476
|
+
if (options) {
|
|
7477
|
+
if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
|
|
7478
|
+
} else delete props[key];
|
|
7479
|
+
}
|
|
7261
7480
|
if (attrs !== rawCurrentProps) {
|
|
7262
7481
|
for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && !hasOwn(rawProps, key + "Native")) {
|
|
7263
7482
|
delete attrs[key];
|
|
@@ -7278,9 +7497,10 @@ var Vue = (function() {
|
|
|
7278
7497
|
if (key === "inline-template") continue;
|
|
7279
7498
|
const value = rawProps[key];
|
|
7280
7499
|
let camelKey;
|
|
7281
|
-
if (options && hasOwn(options, camelKey = camelize(key)))
|
|
7282
|
-
|
|
7283
|
-
|
|
7500
|
+
if (options && hasOwn(options, camelKey = camelize(key))) {
|
|
7501
|
+
if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
|
|
7502
|
+
else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
7503
|
+
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
7284
7504
|
if (isOn(key) && key.endsWith("Native")) key = key.slice(0, -6);
|
|
7285
7505
|
else if (shouldSkipAttr(key, instance)) continue;
|
|
7286
7506
|
if (!(key in attrs) || value !== attrs[key]) {
|
|
@@ -7329,7 +7549,7 @@ var Vue = (function() {
|
|
|
7329
7549
|
const prev = setCurrentInstance(instance);
|
|
7330
7550
|
const props = /* @__PURE__ */ toRaw(instance.props);
|
|
7331
7551
|
value = factory.call(isCompatEnabled$1("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null, props);
|
|
7332
|
-
|
|
7552
|
+
restoreCurrentInstance(prev);
|
|
7333
7553
|
return value;
|
|
7334
7554
|
}
|
|
7335
7555
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -7446,7 +7666,7 @@ var Vue = (function() {
|
|
|
7446
7666
|
}
|
|
7447
7667
|
if (validator && !validator(value, /* @__PURE__ */ shallowReadonly(resolvedProps))) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
|
|
7448
7668
|
}
|
|
7449
|
-
const isSimpleType =
|
|
7669
|
+
const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
|
|
7450
7670
|
/**
|
|
7451
7671
|
* dev only
|
|
7452
7672
|
*/
|
|
@@ -7559,12 +7779,13 @@ var Vue = (function() {
|
|
|
7559
7779
|
let deletionComparisonTarget = EMPTY_OBJ;
|
|
7560
7780
|
if (vnode.shapeFlag & 32) {
|
|
7561
7781
|
const type = children._;
|
|
7562
|
-
if (type)
|
|
7563
|
-
|
|
7564
|
-
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7782
|
+
if (type) {
|
|
7783
|
+
if (isHmrUpdating) {
|
|
7784
|
+
assignSlots(slots, children, optimized);
|
|
7785
|
+
trigger(instance, "set", "$slots");
|
|
7786
|
+
} else if (optimized && type === 1) needDeletionCheck = false;
|
|
7787
|
+
else assignSlots(slots, children, optimized);
|
|
7788
|
+
} else {
|
|
7568
7789
|
needDeletionCheck = !children.$stable;
|
|
7569
7790
|
normalizeObjectSlots(children, slots, instance);
|
|
7570
7791
|
}
|
|
@@ -7582,7 +7803,7 @@ var Vue = (function() {
|
|
|
7582
7803
|
let supported;
|
|
7583
7804
|
let perf;
|
|
7584
7805
|
let cachedNow$1 = 0;
|
|
7585
|
-
const p$1 =
|
|
7806
|
+
const p$1 = /*@__PURE__*/ Promise.resolve();
|
|
7586
7807
|
const getNow$1 = () => cachedNow$1 || (p$1.then(() => cachedNow$1 = 0), cachedNow$1 = isSupported() ? perf.now() : Date.now());
|
|
7587
7808
|
/**
|
|
7588
7809
|
* @internal
|
|
@@ -7663,6 +7884,10 @@ var Vue = (function() {
|
|
|
7663
7884
|
optimized = false;
|
|
7664
7885
|
n2.dynamicChildren = null;
|
|
7665
7886
|
}
|
|
7887
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
7888
|
+
if (n2.dynamicChildren === EMPTY_ARR) n2.dynamicChildren = [];
|
|
7889
|
+
n2.dynamicChildren.hasOnce = true;
|
|
7890
|
+
}
|
|
7666
7891
|
const { type, ref, shapeFlag } = n2;
|
|
7667
7892
|
switch (type) {
|
|
7668
7893
|
case Text:
|
|
@@ -7679,7 +7904,7 @@ var Vue = (function() {
|
|
|
7679
7904
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
7680
7905
|
break;
|
|
7681
7906
|
case VaporSlot:
|
|
7682
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
|
|
7907
|
+
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
7683
7908
|
break;
|
|
7684
7909
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
7685
7910
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -7798,7 +8023,10 @@ var Vue = (function() {
|
|
|
7798
8023
|
for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
|
|
7799
8024
|
};
|
|
7800
8025
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
7801
|
-
for (let i = start; i < children.length; i++)
|
|
8026
|
+
for (let i = start; i < children.length; i++) {
|
|
8027
|
+
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
8028
|
+
patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8029
|
+
}
|
|
7802
8030
|
};
|
|
7803
8031
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
7804
8032
|
const el = n2.el = n1.el;
|
|
@@ -7810,6 +8038,7 @@ var Vue = (function() {
|
|
|
7810
8038
|
let vnodeHook;
|
|
7811
8039
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
7812
8040
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8041
|
+
if (n2.ibu) n2.ibu();
|
|
7813
8042
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
7814
8043
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
7815
8044
|
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -7843,8 +8072,9 @@ var Vue = (function() {
|
|
|
7843
8072
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
7844
8073
|
}
|
|
7845
8074
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
7846
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
|
|
8075
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
7847
8076
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8077
|
+
n2.iu && n2.iu();
|
|
7848
8078
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
7849
8079
|
}, void 0, parentSuspense);
|
|
7850
8080
|
};
|
|
@@ -7852,7 +8082,8 @@ var Vue = (function() {
|
|
|
7852
8082
|
for (let i = 0; i < newChildren.length; i++) {
|
|
7853
8083
|
const oldVNode = oldChildren[i];
|
|
7854
8084
|
const newVNode = newChildren[i];
|
|
7855
|
-
|
|
8085
|
+
const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
|
|
8086
|
+
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
7856
8087
|
}
|
|
7857
8088
|
};
|
|
7858
8089
|
const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
|
|
@@ -7890,41 +8121,15 @@ var Vue = (function() {
|
|
|
7890
8121
|
};
|
|
7891
8122
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
7892
8123
|
n2.slotScopeIds = slotScopeIds;
|
|
7893
|
-
if (n2.type.__vapor)
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
|
|
7903
|
-
});
|
|
7904
|
-
if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
7905
|
-
const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
|
|
7906
|
-
if (vnodeMountedHook) {
|
|
7907
|
-
const scopedVNode = n2;
|
|
7908
|
-
queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
|
|
7909
|
-
}
|
|
7910
|
-
}
|
|
7911
|
-
else {
|
|
7912
|
-
const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
|
|
7913
|
-
getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
|
|
7914
|
-
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
7915
|
-
}, () => {
|
|
7916
|
-
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
7917
|
-
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
7918
|
-
});
|
|
7919
|
-
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
7920
|
-
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
|
|
7921
|
-
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
7922
|
-
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
7923
|
-
}, void 0, parentSuspense);
|
|
7924
|
-
}
|
|
7925
|
-
else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
7926
|
-
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
7927
|
-
else updateComponent(n1, n2, optimized);
|
|
8124
|
+
if (n2.type.__vapor) {
|
|
8125
|
+
if (n1 == null) {
|
|
8126
|
+
if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
8127
|
+
else getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense);
|
|
8128
|
+
} else getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdateComponent(n1, n2, optimized));
|
|
8129
|
+
} else if (n1 == null) {
|
|
8130
|
+
if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
8131
|
+
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
8132
|
+
} else updateComponent(n1, n2, optimized);
|
|
7928
8133
|
};
|
|
7929
8134
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
|
|
7930
8135
|
const compatMountInstance = initialVNode.isCompatRoot && initialVNode.component;
|
|
@@ -7968,16 +8173,18 @@ var Vue = (function() {
|
|
|
7968
8173
|
};
|
|
7969
8174
|
const updateComponent = (n1, n2, optimized) => {
|
|
7970
8175
|
const instance = n2.component = n1.component;
|
|
7971
|
-
if (shouldUpdateComponent(n1, n2, optimized))
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
8176
|
+
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
8177
|
+
if (instance.asyncDep && !instance.asyncResolved) {
|
|
8178
|
+
pushWarningContext(n2);
|
|
8179
|
+
n2.el = n1.el;
|
|
8180
|
+
updateComponentPreRender(instance, n2, optimized);
|
|
8181
|
+
popWarningContext();
|
|
8182
|
+
return;
|
|
8183
|
+
} else {
|
|
8184
|
+
instance.next = n2;
|
|
8185
|
+
instance.effect.run();
|
|
8186
|
+
}
|
|
7976
8187
|
} else {
|
|
7977
|
-
instance.next = n2;
|
|
7978
|
-
instance.effect.run();
|
|
7979
|
-
}
|
|
7980
|
-
else {
|
|
7981
8188
|
n2.el = n1.el;
|
|
7982
8189
|
instance.vnode = n2;
|
|
7983
8190
|
}
|
|
@@ -8080,6 +8287,7 @@ var Vue = (function() {
|
|
|
8080
8287
|
} else next = vnode;
|
|
8081
8288
|
if (bu) invokeArrayFns(bu);
|
|
8082
8289
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8290
|
+
if (next.ibu) next.ibu();
|
|
8083
8291
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) instance.emit("hook:beforeUpdate");
|
|
8084
8292
|
toggleRecurse(instance, true);
|
|
8085
8293
|
startMeasure(instance, `render`);
|
|
@@ -8093,7 +8301,10 @@ var Vue = (function() {
|
|
|
8093
8301
|
next.el = nextTree.el;
|
|
8094
8302
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
8095
8303
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
8096
|
-
if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() =>
|
|
8304
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
8305
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8306
|
+
next.iu && next.iu();
|
|
8307
|
+
}, void 0, parentSuspense);
|
|
8097
8308
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:updated"), void 0, parentSuspense);
|
|
8098
8309
|
devtoolsComponentUpdated(instance);
|
|
8099
8310
|
popWarningContext();
|
|
@@ -8134,9 +8345,10 @@ var Vue = (function() {
|
|
|
8134
8345
|
if (shapeFlag & 8) {
|
|
8135
8346
|
if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
|
|
8136
8347
|
if (c2 !== c1) hostSetElementText(container, c2);
|
|
8137
|
-
} else if (prevShapeFlag & 16)
|
|
8138
|
-
|
|
8139
|
-
|
|
8348
|
+
} else if (prevShapeFlag & 16) {
|
|
8349
|
+
if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8350
|
+
else unmountChildren(c1, parentComponent, parentSuspense, true);
|
|
8351
|
+
} else {
|
|
8140
8352
|
if (prevShapeFlag & 8) hostSetElementText(container, "");
|
|
8141
8353
|
if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8142
8354
|
}
|
|
@@ -8235,15 +8447,17 @@ var Vue = (function() {
|
|
|
8235
8447
|
const anchorVNode = c2[nextIndex + 1];
|
|
8236
8448
|
const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
|
|
8237
8449
|
if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8238
|
-
else if (moved)
|
|
8239
|
-
|
|
8450
|
+
else if (moved) {
|
|
8451
|
+
if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
|
|
8452
|
+
else j--;
|
|
8453
|
+
}
|
|
8240
8454
|
}
|
|
8241
8455
|
}
|
|
8242
8456
|
};
|
|
8243
8457
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
8244
8458
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
8245
8459
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
8246
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
8460
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
8247
8461
|
return;
|
|
8248
8462
|
}
|
|
8249
8463
|
if (shapeFlag & 6) {
|
|
@@ -8268,54 +8482,37 @@ var Vue = (function() {
|
|
|
8268
8482
|
moveStaticNode(vnode, container, anchor);
|
|
8269
8483
|
return;
|
|
8270
8484
|
}
|
|
8271
|
-
if (moveType !== 2 && shapeFlag & 1 && transition)
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
const remove = () => {
|
|
8485
|
+
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
8486
|
+
if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
|
|
8487
|
+
else performTransitionLeave(el, transition, () => {
|
|
8275
8488
|
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
8276
8489
|
else hostInsert(el, container, anchor);
|
|
8277
|
-
};
|
|
8278
|
-
|
|
8279
|
-
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8280
|
-
if (el._isLeaving) el[leaveCbKey](true);
|
|
8281
|
-
if (transition.persisted && !wasLeaving) remove();
|
|
8282
|
-
else leave(el, () => {
|
|
8283
|
-
remove();
|
|
8284
|
-
afterLeave && afterLeave();
|
|
8285
|
-
});
|
|
8286
|
-
};
|
|
8287
|
-
if (delayLeave) delayLeave(el, remove, performLeave);
|
|
8288
|
-
else performLeave();
|
|
8289
|
-
}
|
|
8290
|
-
else hostInsert(el, container, anchor);
|
|
8490
|
+
}, true, true);
|
|
8491
|
+
} else hostInsert(el, container, anchor);
|
|
8291
8492
|
};
|
|
8292
8493
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
8293
8494
|
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
|
|
8294
|
-
if (patchFlag === -2) optimized = false;
|
|
8495
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) optimized = false;
|
|
8295
8496
|
if (ref != null) {
|
|
8296
8497
|
const prevSub = setActiveSub();
|
|
8297
8498
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
8298
8499
|
setActiveSub(prevSub);
|
|
8299
8500
|
}
|
|
8300
|
-
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8501
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8301
8502
|
if (shapeFlag & 256) {
|
|
8302
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
8503
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8303
8504
|
else parentComponent.ctx.deactivate(vnode);
|
|
8304
8505
|
return;
|
|
8305
8506
|
}
|
|
8507
|
+
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
8508
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8509
|
+
return;
|
|
8510
|
+
}
|
|
8306
8511
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
8307
8512
|
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
8308
8513
|
let vnodeHook;
|
|
8309
8514
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8310
|
-
if (shapeFlag & 6)
|
|
8311
|
-
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
8312
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8313
|
-
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
8314
|
-
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8315
|
-
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8316
|
-
}, void 0, parentSuspense);
|
|
8317
|
-
return;
|
|
8318
|
-
} else unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
8515
|
+
if (shapeFlag & 6) unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
8319
8516
|
else {
|
|
8320
8517
|
if (shapeFlag & 128) {
|
|
8321
8518
|
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
@@ -8326,7 +8523,7 @@ var Vue = (function() {
|
|
|
8326
8523
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
8327
8524
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
8328
8525
|
if (type === VaporSlot) {
|
|
8329
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8526
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8330
8527
|
return;
|
|
8331
8528
|
}
|
|
8332
8529
|
if (doRemove) remove(vnode);
|
|
@@ -8350,6 +8547,7 @@ var Vue = (function() {
|
|
|
8350
8547
|
}
|
|
8351
8548
|
if (type === Static) {
|
|
8352
8549
|
removeStaticNode(vnode);
|
|
8550
|
+
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
8353
8551
|
return;
|
|
8354
8552
|
}
|
|
8355
8553
|
if (transition) performTransitionLeave(el, transition, () => hostRemove(el), !!(vnode.shapeFlag & 1));
|
|
@@ -8375,7 +8573,10 @@ var Vue = (function() {
|
|
|
8375
8573
|
if (effect) {
|
|
8376
8574
|
effect.stop();
|
|
8377
8575
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8378
|
-
} else if (
|
|
8576
|
+
} else if (instance.vnode.el && subTree) {
|
|
8577
|
+
subTree.transition = instance.vnode.transition;
|
|
8578
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8579
|
+
}
|
|
8379
8580
|
if (um) queuePostRenderEffect(um, void 0, parentSuspense);
|
|
8380
8581
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:destroyed"), void 0, parentSuspense);
|
|
8381
8582
|
queuePostRenderEffect(() => instance.isUnmounted = true, void 0, parentSuspense);
|
|
@@ -8450,12 +8651,14 @@ var Vue = (function() {
|
|
|
8450
8651
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
8451
8652
|
}
|
|
8452
8653
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
8453
|
-
if (!vapor)
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8654
|
+
if (!vapor) {
|
|
8655
|
+
if (allowed) {
|
|
8656
|
+
effect.flags |= 128;
|
|
8657
|
+
job.flags |= 2;
|
|
8658
|
+
} else {
|
|
8659
|
+
effect.flags &= -129;
|
|
8660
|
+
job.flags &= -3;
|
|
8661
|
+
}
|
|
8459
8662
|
}
|
|
8460
8663
|
}
|
|
8461
8664
|
function needTransition(parentSuspense, transition) {
|
|
@@ -8495,8 +8698,10 @@ var Vue = (function() {
|
|
|
8495
8698
|
}
|
|
8496
8699
|
function locateNonHydratedAsyncRoot(instance) {
|
|
8497
8700
|
const subComponent = instance.subTree && instance.subTree.component;
|
|
8498
|
-
if (subComponent)
|
|
8499
|
-
|
|
8701
|
+
if (subComponent) {
|
|
8702
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
8703
|
+
else return locateNonHydratedAsyncRoot(subComponent);
|
|
8704
|
+
}
|
|
8500
8705
|
}
|
|
8501
8706
|
function invalidateMount(hooks) {
|
|
8502
8707
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
@@ -8515,13 +8720,15 @@ var Vue = (function() {
|
|
|
8515
8720
|
function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
|
|
8516
8721
|
const performRemove = () => {
|
|
8517
8722
|
remove();
|
|
8518
|
-
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
8723
|
+
if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
|
|
8519
8724
|
};
|
|
8520
8725
|
if (force || isElement && transition && !transition.persisted) {
|
|
8521
8726
|
const { leave, delayLeave } = transition;
|
|
8522
8727
|
const performLeave = () => {
|
|
8728
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8523
8729
|
if (el._isLeaving && force) el[leaveCbKey](true);
|
|
8524
|
-
|
|
8730
|
+
if (force && transition.persisted && !wasLeaving) remove();
|
|
8731
|
+
else leave(el, performRemove);
|
|
8525
8732
|
};
|
|
8526
8733
|
if (delayLeave) delayLeave(el, performRemove, performLeave);
|
|
8527
8734
|
else performLeave();
|
|
@@ -8540,7 +8747,7 @@ var Vue = (function() {
|
|
|
8540
8747
|
/**
|
|
8541
8748
|
* shared between vdom and vapor
|
|
8542
8749
|
*/
|
|
8543
|
-
function getInheritedScopeIds(vnode, parentComponent) {
|
|
8750
|
+
function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
|
|
8544
8751
|
const inheritedScopeIds = [];
|
|
8545
8752
|
let currentParent = parentComponent;
|
|
8546
8753
|
let currentVNode = vnode;
|
|
@@ -8556,6 +8763,8 @@ var Vue = (function() {
|
|
|
8556
8763
|
currentParent = currentParent.parent;
|
|
8557
8764
|
} else break;
|
|
8558
8765
|
}
|
|
8766
|
+
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
8767
|
+
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
8559
8768
|
return inheritedScopeIds;
|
|
8560
8769
|
}
|
|
8561
8770
|
function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
@@ -8574,7 +8783,7 @@ var Vue = (function() {
|
|
|
8574
8783
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
8575
8784
|
if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
|
|
8576
8785
|
else {
|
|
8577
|
-
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
8786
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
|
|
8578
8787
|
n2.suspense = n1.suspense;
|
|
8579
8788
|
n2.suspense.vnode = n2;
|
|
8580
8789
|
n2.el = n1.el;
|
|
@@ -8612,10 +8821,12 @@ var Vue = (function() {
|
|
|
8612
8821
|
if (pendingBranch) {
|
|
8613
8822
|
suspense.pendingBranch = newBranch;
|
|
8614
8823
|
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
8615
|
-
|
|
8824
|
+
suspense.deps++;
|
|
8825
|
+
patch(pendingBranch, newBranch, isHydrating ? container : suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
8826
|
+
suspense.deps--;
|
|
8616
8827
|
if (suspense.deps <= 0) suspense.resolve();
|
|
8617
8828
|
else if (isInFallback) {
|
|
8618
|
-
if (!isHydrating) {
|
|
8829
|
+
if (!isHydrating && !suspense.isFallbackMountPending) {
|
|
8619
8830
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
8620
8831
|
setActiveBranch(suspense, newFallback);
|
|
8621
8832
|
}
|
|
@@ -8627,12 +8838,16 @@ var Vue = (function() {
|
|
|
8627
8838
|
suspense.activeBranch = pendingBranch;
|
|
8628
8839
|
} else unmount(pendingBranch, parentComponent, suspense);
|
|
8629
8840
|
suspense.deps = 0;
|
|
8841
|
+
for (let i = 0; i < suspense.effects.length; i++) {
|
|
8842
|
+
const effect = suspense.effects[i];
|
|
8843
|
+
if (effect.flags & 8) queuePostFlushCb(effect);
|
|
8844
|
+
}
|
|
8630
8845
|
suspense.effects.length = 0;
|
|
8631
8846
|
suspense.hiddenContainer = createElement("div");
|
|
8632
8847
|
if (isInFallback) {
|
|
8633
8848
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
8634
8849
|
if (suspense.deps <= 0) suspense.resolve();
|
|
8635
|
-
else {
|
|
8850
|
+
else if (!suspense.isFallbackMountPending) {
|
|
8636
8851
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
8637
8852
|
setActiveBranch(suspense, newFallback);
|
|
8638
8853
|
}
|
|
@@ -8734,7 +8949,7 @@ var Vue = (function() {
|
|
|
8734
8949
|
let hasUnresolvedAncestor = false;
|
|
8735
8950
|
while (parent) {
|
|
8736
8951
|
if (parent.pendingBranch) {
|
|
8737
|
-
parent.effects.push(
|
|
8952
|
+
for (let i = 0; i < effects.length; i++) parent.effects.push(effects[i]);
|
|
8738
8953
|
hasUnresolvedAncestor = true;
|
|
8739
8954
|
break;
|
|
8740
8955
|
}
|
|
@@ -8744,6 +8959,7 @@ var Vue = (function() {
|
|
|
8744
8959
|
suspense.effects = [];
|
|
8745
8960
|
if (isSuspensible) {
|
|
8746
8961
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
8962
|
+
parentSuspenseId = void 0;
|
|
8747
8963
|
parentSuspense.deps--;
|
|
8748
8964
|
if (parentSuspense.deps === 0 && !sync) parentSuspense.resolve();
|
|
8749
8965
|
}
|
|
@@ -8758,8 +8974,9 @@ var Vue = (function() {
|
|
|
8758
8974
|
const mountFallback = () => {
|
|
8759
8975
|
suspense.isFallbackMountPending = false;
|
|
8760
8976
|
if (!suspense.isInFallback) return;
|
|
8761
|
-
|
|
8762
|
-
|
|
8977
|
+
const latestFallback = suspense.vnode.ssFallback;
|
|
8978
|
+
patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
8979
|
+
setActiveBranch(suspense, latestFallback);
|
|
8763
8980
|
};
|
|
8764
8981
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
8765
8982
|
if (delayEnter) {
|
|
@@ -8780,11 +8997,16 @@ var Vue = (function() {
|
|
|
8780
8997
|
registerDep(instance, onResolve) {
|
|
8781
8998
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
8782
8999
|
if (isInPendingSuspense) suspense.deps++;
|
|
9000
|
+
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
8783
9001
|
instance.asyncDep.catch((err) => {
|
|
8784
9002
|
handleError(err, instance, 0);
|
|
8785
9003
|
}).then((asyncSetupResult) => {
|
|
8786
9004
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
8787
9005
|
setCurrentInstance(null, void 0);
|
|
9006
|
+
if (hydratedEl && !instance.scope.active) {
|
|
9007
|
+
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
9008
|
+
return;
|
|
9009
|
+
}
|
|
8788
9010
|
instance.asyncResolved = true;
|
|
8789
9011
|
onResolve(asyncSetupResult);
|
|
8790
9012
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
@@ -8835,9 +9057,10 @@ var Vue = (function() {
|
|
|
8835
9057
|
return s;
|
|
8836
9058
|
}
|
|
8837
9059
|
function queueEffectWithSuspense(fn, id, suspense) {
|
|
8838
|
-
if (suspense && suspense.pendingBranch)
|
|
8839
|
-
|
|
8840
|
-
|
|
9060
|
+
if (suspense && suspense.pendingBranch) {
|
|
9061
|
+
if (isArray(fn)) suspense.effects.push(...fn);
|
|
9062
|
+
else suspense.effects.push(fn);
|
|
9063
|
+
} else queuePostFlushCb(fn, id);
|
|
8841
9064
|
}
|
|
8842
9065
|
function setActiveBranch(suspense, branch) {
|
|
8843
9066
|
suspense.activeBranch = branch;
|
|
@@ -9044,11 +9267,26 @@ var Vue = (function() {
|
|
|
9044
9267
|
if (shapeFlag & 128) type.normalize(vnode);
|
|
9045
9268
|
} else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;
|
|
9046
9269
|
if (vnode.key !== vnode.key) warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
9270
|
+
if (props && vnode.shapeFlag & 1) {
|
|
9271
|
+
const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
|
|
9272
|
+
if (overwritingProp && hasContentChildren(vnode.children)) warn$1(`The \`${overwritingProp}\` prop on <${vnode.type}> will override its children. Remove either the \`${overwritingProp}\` prop or the children.`);
|
|
9273
|
+
}
|
|
9047
9274
|
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);
|
|
9048
9275
|
convertLegacyVModelProps(vnode);
|
|
9049
9276
|
defineLegacyVNodeProperties(vnode);
|
|
9050
9277
|
return vnode;
|
|
9051
9278
|
}
|
|
9279
|
+
/**
|
|
9280
|
+
* dev only
|
|
9281
|
+
* Whether children would actually render something. Empty text and empty
|
|
9282
|
+
* arrays are ignored, mirroring the compiler's `node.children.length` check
|
|
9283
|
+
* for `v-html` / `v-text`.
|
|
9284
|
+
*/
|
|
9285
|
+
function hasContentChildren(children) {
|
|
9286
|
+
if (isString(children)) return children !== "";
|
|
9287
|
+
if (isArray(children)) return children.length > 0;
|
|
9288
|
+
return false;
|
|
9289
|
+
}
|
|
9052
9290
|
const createVNode = createVNodeWithArgsTransform;
|
|
9053
9291
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
9054
9292
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
@@ -9058,8 +9296,10 @@ var Vue = (function() {
|
|
|
9058
9296
|
if (isVNode(type)) {
|
|
9059
9297
|
const cloned = cloneVNode(type, props, true);
|
|
9060
9298
|
if (children) normalizeChildren(cloned, children);
|
|
9061
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock)
|
|
9062
|
-
|
|
9299
|
+
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
|
|
9300
|
+
if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
9301
|
+
else currentBlock.push(cloned);
|
|
9302
|
+
}
|
|
9063
9303
|
cloned.patchFlag = -2;
|
|
9064
9304
|
return cloned;
|
|
9065
9305
|
}
|
|
@@ -9120,7 +9360,10 @@ var Vue = (function() {
|
|
|
9120
9360
|
ce: vnode.ce,
|
|
9121
9361
|
vi: vnode.vi,
|
|
9122
9362
|
vs: cloneVaporSlotMeta(vnode),
|
|
9123
|
-
vb: vnode.vb
|
|
9363
|
+
vb: vnode.vb,
|
|
9364
|
+
ibu: vnode.ibu,
|
|
9365
|
+
iu: vnode.iu,
|
|
9366
|
+
cacheIndex: vnode.cacheIndex
|
|
9124
9367
|
};
|
|
9125
9368
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
9126
9369
|
defineLegacyVNodeProperties(cloned);
|
|
@@ -9131,8 +9374,7 @@ var Vue = (function() {
|
|
|
9131
9374
|
if (!vaporSlot) return vaporSlot;
|
|
9132
9375
|
const cloned = {
|
|
9133
9376
|
slot: vaporSlot.slot,
|
|
9134
|
-
|
|
9135
|
-
outletFallback: vaporSlot.outletFallback
|
|
9377
|
+
outlets: vaporSlot.outlets
|
|
9136
9378
|
};
|
|
9137
9379
|
if (vnode.el) {
|
|
9138
9380
|
cloned.state = vaporSlot.state;
|
|
@@ -9184,25 +9426,28 @@ var Vue = (function() {
|
|
|
9184
9426
|
const { shapeFlag } = vnode;
|
|
9185
9427
|
if (children == null) children = null;
|
|
9186
9428
|
else if (isArray(children)) type = 16;
|
|
9187
|
-
else if (typeof children === "object")
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9429
|
+
else if (typeof children === "object") {
|
|
9430
|
+
if (shapeFlag & 65) {
|
|
9431
|
+
const slot = children.default;
|
|
9432
|
+
if (slot) {
|
|
9433
|
+
slot._c && (slot._d = false);
|
|
9434
|
+
normalizeChildren(vnode, slot());
|
|
9435
|
+
slot._c && (slot._d = true);
|
|
9436
|
+
}
|
|
9437
|
+
return;
|
|
9438
|
+
} else {
|
|
9439
|
+
type = 32;
|
|
9440
|
+
const slotFlag = children._;
|
|
9441
|
+
if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
|
|
9442
|
+
else if (slotFlag === 3 && currentRenderingInstance) {
|
|
9443
|
+
if (currentRenderingInstance.slots._ === 1) children._ = 1;
|
|
9444
|
+
else {
|
|
9445
|
+
children._ = 2;
|
|
9446
|
+
vnode.patchFlag |= 1024;
|
|
9447
|
+
}
|
|
9448
|
+
}
|
|
9203
9449
|
}
|
|
9204
|
-
}
|
|
9205
|
-
else if (isFunction(children)) {
|
|
9450
|
+
} else if (isFunction(children)) {
|
|
9206
9451
|
if (shapeFlag & 65) {
|
|
9207
9452
|
normalizeChildren(vnode, { default: children });
|
|
9208
9453
|
return;
|
|
@@ -9270,6 +9515,16 @@ var Vue = (function() {
|
|
|
9270
9515
|
simpleSetCurrentInstance(instance);
|
|
9271
9516
|
}
|
|
9272
9517
|
};
|
|
9518
|
+
/**
|
|
9519
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
9520
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
9521
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
9522
|
+
* @internal
|
|
9523
|
+
*/
|
|
9524
|
+
const restoreCurrentInstance = (prev) => {
|
|
9525
|
+
setCurrentScope(prev[1]);
|
|
9526
|
+
simpleSetCurrentInstance(prev[0]);
|
|
9527
|
+
};
|
|
9273
9528
|
const internalOptions = [
|
|
9274
9529
|
"ce",
|
|
9275
9530
|
"type",
|
|
@@ -9301,7 +9556,7 @@ var Vue = (function() {
|
|
|
9301
9556
|
};
|
|
9302
9557
|
//#endregion
|
|
9303
9558
|
//#region packages/runtime-core/src/component.ts
|
|
9304
|
-
const emptyAppContext =
|
|
9559
|
+
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
9305
9560
|
let uid = 0;
|
|
9306
9561
|
function createComponentInstance(vnode, parent, suspense) {
|
|
9307
9562
|
const type = vnode.type;
|
|
@@ -9421,7 +9676,7 @@ var Vue = (function() {
|
|
|
9421
9676
|
const setupResult = callWithErrorHandling(setup, instance, 0, [/* @__PURE__ */ shallowReadonly(instance.props), setupContext]);
|
|
9422
9677
|
const isAsyncSetup = isPromise(setupResult);
|
|
9423
9678
|
setActiveSub(prevSub);
|
|
9424
|
-
|
|
9679
|
+
restoreCurrentInstance(prev);
|
|
9425
9680
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
9426
9681
|
if (isAsyncSetup) {
|
|
9427
9682
|
const unsetCurrentInstance = () => {
|
|
@@ -9429,7 +9684,12 @@ var Vue = (function() {
|
|
|
9429
9684
|
};
|
|
9430
9685
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
9431
9686
|
if (isSSR) return setupResult.then((resolvedResult) => {
|
|
9432
|
-
|
|
9687
|
+
setInSSRSetupState(true);
|
|
9688
|
+
try {
|
|
9689
|
+
handleSetupResult(instance, resolvedResult, isSSR);
|
|
9690
|
+
} finally {
|
|
9691
|
+
setInSSRSetupState(false);
|
|
9692
|
+
}
|
|
9433
9693
|
}).catch((e) => {
|
|
9434
9694
|
handleError(e, instance, 0);
|
|
9435
9695
|
});
|
|
@@ -9494,13 +9754,15 @@ var Vue = (function() {
|
|
|
9494
9754
|
applyOptions(instance);
|
|
9495
9755
|
} finally {
|
|
9496
9756
|
setActiveSub(prevSub);
|
|
9497
|
-
|
|
9757
|
+
restoreCurrentInstance(prevInstance);
|
|
9498
9758
|
}
|
|
9499
9759
|
}
|
|
9500
|
-
if (!Component.render && instance.render === NOOP && !isSSR)
|
|
9760
|
+
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
9761
|
+
if (!compile$1 && Component.template)
|
|
9501
9762
|
/* v8 ignore start */
|
|
9502
|
-
|
|
9503
|
-
|
|
9763
|
+
warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Use \"vue.global.js\" instead.");
|
|
9764
|
+
else warn$1(`Component is missing template or render function: `, Component);
|
|
9765
|
+
}
|
|
9504
9766
|
}
|
|
9505
9767
|
const attrsProxyHandlers = {
|
|
9506
9768
|
get(target, key) {
|
|
@@ -9563,14 +9825,13 @@ var Vue = (function() {
|
|
|
9563
9825
|
if (instance.exposed) return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
|
|
9564
9826
|
get(target, key) {
|
|
9565
9827
|
if (key in target) return target[key];
|
|
9566
|
-
else {
|
|
9828
|
+
else if (!instance.vapor) {
|
|
9567
9829
|
const publicPropertiesMap = getPublicPropertiesMap();
|
|
9568
9830
|
if (key in publicPropertiesMap) return publicPropertiesMap[key](instance);
|
|
9569
9831
|
}
|
|
9570
9832
|
},
|
|
9571
9833
|
has(target, key) {
|
|
9572
|
-
|
|
9573
|
-
return key in target || key in publicPropertiesMap;
|
|
9834
|
+
return key in target || !instance.vapor && key in getPublicPropertiesMap();
|
|
9574
9835
|
}
|
|
9575
9836
|
}));
|
|
9576
9837
|
else return instance.proxy;
|
|
@@ -9608,11 +9869,12 @@ var Vue = (function() {
|
|
|
9608
9869
|
try {
|
|
9609
9870
|
setBlockTracking(-1);
|
|
9610
9871
|
const l = arguments.length;
|
|
9611
|
-
if (l === 2)
|
|
9612
|
-
if (
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9872
|
+
if (l === 2) {
|
|
9873
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
9874
|
+
if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
|
|
9875
|
+
return createVNode(type, propsOrChildren);
|
|
9876
|
+
} else return createVNode(type, null, propsOrChildren);
|
|
9877
|
+
} else {
|
|
9616
9878
|
if (l > 3) children = Array.prototype.slice.call(arguments, 2);
|
|
9617
9879
|
else if (l === 3 && isVNode(children)) children = [children];
|
|
9618
9880
|
return createVNode(type, propsOrChildren, children);
|
|
@@ -9804,7 +10066,7 @@ var Vue = (function() {
|
|
|
9804
10066
|
}
|
|
9805
10067
|
//#endregion
|
|
9806
10068
|
//#region packages/runtime-core/src/index.ts
|
|
9807
|
-
const version = "3.6.0-rc.
|
|
10069
|
+
const version = "3.6.0-rc.10";
|
|
9808
10070
|
const warn = warn$1;
|
|
9809
10071
|
/**
|
|
9810
10072
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9833,7 +10095,7 @@ var Vue = (function() {
|
|
|
9833
10095
|
let policy = void 0;
|
|
9834
10096
|
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
9835
10097
|
if (tt) try {
|
|
9836
|
-
policy =
|
|
10098
|
+
policy = /*@__PURE__*/ tt.createPolicy("vue", { createHTML: (val) => val });
|
|
9837
10099
|
} catch (e) {
|
|
9838
10100
|
warn(`Error creating trusted types policy: ${e}`);
|
|
9839
10101
|
}
|
|
@@ -9841,7 +10103,7 @@ var Vue = (function() {
|
|
|
9841
10103
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
9842
10104
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
9843
10105
|
const doc = typeof document !== "undefined" ? document : null;
|
|
9844
|
-
const templateContainer = doc &&
|
|
10106
|
+
const templateContainer = doc && /*@__PURE__*/ doc.createElement("template");
|
|
9845
10107
|
const nodeOps = {
|
|
9846
10108
|
insert: (child, parent, anchor) => {
|
|
9847
10109
|
parent.insertBefore(child, anchor || null);
|
|
@@ -9915,7 +10177,7 @@ var Vue = (function() {
|
|
|
9915
10177
|
leaveActiveClass: String,
|
|
9916
10178
|
leaveToClass: String
|
|
9917
10179
|
};
|
|
9918
|
-
const TransitionPropsValidators =
|
|
10180
|
+
const TransitionPropsValidators = /*@__PURE__*/ extend({}, BaseTransitionPropsValidators, DOMTransitionPropsValidators);
|
|
9919
10181
|
/**
|
|
9920
10182
|
* Wrap logic that attaches extra properties to Transition in a function
|
|
9921
10183
|
* so that it can be annotated as pure
|
|
@@ -9930,7 +10192,7 @@ var Vue = (function() {
|
|
|
9930
10192
|
* DOM Transition is a higher-order-component based on the platform-agnostic
|
|
9931
10193
|
* base Transition component, with DOM-specific logic.
|
|
9932
10194
|
*/
|
|
9933
|
-
const Transition =
|
|
10195
|
+
const Transition = /*@__PURE__*/ decorate$1((props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots));
|
|
9934
10196
|
/**
|
|
9935
10197
|
* #3227 Incoming hooks may be merged into arrays when wrapping Transition
|
|
9936
10198
|
* with custom HOCs.
|
|
@@ -10170,14 +10432,15 @@ var Vue = (function() {
|
|
|
10170
10432
|
},
|
|
10171
10433
|
updated(el, { value, oldValue }, { transition }) {
|
|
10172
10434
|
if (!value === !oldValue) return;
|
|
10173
|
-
if (transition)
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
|
|
10435
|
+
if (transition) {
|
|
10436
|
+
if (value) {
|
|
10437
|
+
transition.beforeEnter(el);
|
|
10438
|
+
setDisplay(el, true);
|
|
10439
|
+
transition.enter(el);
|
|
10440
|
+
} else transition.leave(el, () => {
|
|
10441
|
+
setDisplay(el, false);
|
|
10442
|
+
});
|
|
10443
|
+
} else setDisplay(el, value);
|
|
10181
10444
|
},
|
|
10182
10445
|
beforeUnmount(el, { value }) {
|
|
10183
10446
|
setDisplay(el, value);
|
|
@@ -10196,49 +10459,20 @@ var Vue = (function() {
|
|
|
10196
10459
|
*/
|
|
10197
10460
|
function useCssVars(getter) {
|
|
10198
10461
|
const instance = getCurrentInstance();
|
|
10199
|
-
const getVars = () => getter(instance.proxy);
|
|
10200
|
-
const setVars = (vars) => {
|
|
10201
|
-
if (instance.ce) setVarsOnNode(instance.ce, vars);
|
|
10202
|
-
else setVarsOnVNode(instance.subTree, vars);
|
|
10203
|
-
};
|
|
10204
|
-
baseUseCssVars(instance, () => instance.subTree.el.parentNode, getVars, setVars);
|
|
10205
|
-
}
|
|
10206
|
-
function setVarsOnVNode(vnode, vars) {
|
|
10207
|
-
if (vnode.shapeFlag & 128) {
|
|
10208
|
-
const suspense = vnode.suspense;
|
|
10209
|
-
vnode = suspense.activeBranch;
|
|
10210
|
-
if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
|
|
10211
|
-
setVarsOnVNode(suspense.activeBranch, vars);
|
|
10212
|
-
});
|
|
10213
|
-
}
|
|
10214
|
-
while (vnode.component) vnode = vnode.component.subTree;
|
|
10215
|
-
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
10216
|
-
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
10217
|
-
else if (vnode.type === Static) {
|
|
10218
|
-
let { el, anchor } = vnode;
|
|
10219
|
-
while (el) {
|
|
10220
|
-
setVarsOnNode(el, vars);
|
|
10221
|
-
if (el === anchor) break;
|
|
10222
|
-
el = el.nextSibling;
|
|
10223
|
-
}
|
|
10224
|
-
}
|
|
10225
|
-
}
|
|
10226
|
-
/**
|
|
10227
|
-
* @internal
|
|
10228
|
-
* shared between vdom and vapor
|
|
10229
|
-
*/
|
|
10230
|
-
function baseUseCssVars(instance, getParentNode, getVars, setVars) {
|
|
10231
10462
|
/* v8 ignore start */
|
|
10232
10463
|
if (!instance) {
|
|
10233
10464
|
warn(`useCssVars is called without current active component instance.`);
|
|
10234
10465
|
return;
|
|
10235
10466
|
}
|
|
10467
|
+
/* v8 ignore stop */
|
|
10468
|
+
const getVars = () => getter(instance.proxy);
|
|
10236
10469
|
instance.getCssVars = getVars;
|
|
10237
10470
|
const updateTeleports = instance.ut = (vars = getVars()) => {
|
|
10238
10471
|
Array.from(document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)).forEach((node) => setVarsOnNode(node, vars));
|
|
10239
10472
|
};
|
|
10240
10473
|
const applyCssVars = (vars = getVars()) => {
|
|
10241
|
-
|
|
10474
|
+
if (instance.ce) setVarsOnNode(instance.ce, vars);
|
|
10475
|
+
else setVarsOnVNode(instance.subTree, vars);
|
|
10242
10476
|
updateTeleports(vars);
|
|
10243
10477
|
};
|
|
10244
10478
|
onBeforeUpdate(() => {
|
|
@@ -10251,10 +10485,38 @@ var Vue = (function() {
|
|
|
10251
10485
|
applyCssVars(vars);
|
|
10252
10486
|
}, NOOP, { flush: "post" });
|
|
10253
10487
|
const ob = new MutationObserver(() => applyCssVars());
|
|
10254
|
-
ob.observe(
|
|
10488
|
+
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
10255
10489
|
onUnmounted(() => ob.disconnect());
|
|
10256
10490
|
});
|
|
10257
10491
|
}
|
|
10492
|
+
function setVarsOnVNode(vnode, vars) {
|
|
10493
|
+
if (vnode.shapeFlag & 128) {
|
|
10494
|
+
const suspense = vnode.suspense;
|
|
10495
|
+
vnode = suspense.activeBranch;
|
|
10496
|
+
if (suspense.pendingBranch && !suspense.isHydrating) suspense.effects.push(() => {
|
|
10497
|
+
setVarsOnVNode(suspense.activeBranch, vars);
|
|
10498
|
+
});
|
|
10499
|
+
}
|
|
10500
|
+
while (vnode.component) {
|
|
10501
|
+
const component = vnode.component;
|
|
10502
|
+
if (component.vapor) {
|
|
10503
|
+
component.appContext.vapor.applyCssVars(vnode, vars);
|
|
10504
|
+
return;
|
|
10505
|
+
}
|
|
10506
|
+
vnode = vnode.component.subTree;
|
|
10507
|
+
}
|
|
10508
|
+
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
10509
|
+
else if (vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
10510
|
+
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
10511
|
+
else if (vnode.type === Static) {
|
|
10512
|
+
let { el, anchor } = vnode;
|
|
10513
|
+
while (el) {
|
|
10514
|
+
setVarsOnNode(el, vars);
|
|
10515
|
+
if (el === anchor) break;
|
|
10516
|
+
el = el.nextSibling;
|
|
10517
|
+
}
|
|
10518
|
+
}
|
|
10519
|
+
}
|
|
10258
10520
|
/**
|
|
10259
10521
|
* @internal
|
|
10260
10522
|
* shared between vdom and vapor
|
|
@@ -10279,11 +10541,13 @@ var Vue = (function() {
|
|
|
10279
10541
|
const isCssString = isString(next);
|
|
10280
10542
|
let hasControlledDisplay = false;
|
|
10281
10543
|
if (next && !isCssString) {
|
|
10282
|
-
if (prev)
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
|
|
10544
|
+
if (prev) {
|
|
10545
|
+
if (!isString(prev)) {
|
|
10546
|
+
for (const key in prev) if (next[key] == null) setStyle(style, key, "");
|
|
10547
|
+
} else for (const prevStyle of prev.split(";")) {
|
|
10548
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
10549
|
+
if (next[key] == null) setStyle(style, key, "");
|
|
10550
|
+
}
|
|
10287
10551
|
}
|
|
10288
10552
|
for (const key in next) {
|
|
10289
10553
|
if (key === "display") hasControlledDisplay = true;
|
|
@@ -10299,7 +10563,11 @@ var Vue = (function() {
|
|
|
10299
10563
|
style.cssText = next;
|
|
10300
10564
|
hasControlledDisplay = displayRE.test(next);
|
|
10301
10565
|
}
|
|
10302
|
-
} else if (prev)
|
|
10566
|
+
} else if (prev) {
|
|
10567
|
+
const cssVarText = style[CSS_VAR_TEXT];
|
|
10568
|
+
if (cssVarText) style.cssText = cssVarText;
|
|
10569
|
+
else el.removeAttribute("style");
|
|
10570
|
+
}
|
|
10303
10571
|
if (vShowOriginalDisplay in el) {
|
|
10304
10572
|
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10305
10573
|
if (el[vShowHidden]) style.display = "none";
|
|
@@ -10312,8 +10580,10 @@ var Vue = (function() {
|
|
|
10312
10580
|
else {
|
|
10313
10581
|
const val = rawVal == null ? "" : String(rawVal);
|
|
10314
10582
|
if (semicolonRE.test(val)) warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
10315
|
-
if (name.startsWith("--"))
|
|
10316
|
-
|
|
10583
|
+
if (name.startsWith("--")) {
|
|
10584
|
+
if (importantRE.test(val)) style.setProperty(name, val.replace(importantRE, ""), "important");
|
|
10585
|
+
else style.setProperty(name, val);
|
|
10586
|
+
} else {
|
|
10317
10587
|
const prefixed = autoPrefix(style, name);
|
|
10318
10588
|
if (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
|
|
10319
10589
|
else style[prefixed] = val;
|
|
@@ -10350,15 +10620,16 @@ var Vue = (function() {
|
|
|
10350
10620
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
10351
10621
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
10352
10622
|
function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
|
|
10353
|
-
if (isSVG && key.startsWith("xlink:"))
|
|
10354
|
-
|
|
10355
|
-
|
|
10623
|
+
if (isSVG && key.startsWith("xlink:")) {
|
|
10624
|
+
if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
10625
|
+
else el.setAttributeNS(xlinkNS, key, value);
|
|
10626
|
+
} else {
|
|
10356
10627
|
if (compatCoerceAttr(el, key, value, instance)) return;
|
|
10357
10628
|
if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
|
|
10358
10629
|
else el.setAttribute(key, isBoolean ? "" : isSymbol(value) ? String(value) : value);
|
|
10359
10630
|
}
|
|
10360
10631
|
}
|
|
10361
|
-
const isEnumeratedAttr =
|
|
10632
|
+
const isEnumeratedAttr = /*@__PURE__*/ makeMap("contenteditable,draggable,spellcheck");
|
|
10362
10633
|
function compatCoerceAttr(el, key, value, instance = null) {
|
|
10363
10634
|
if (isEnumeratedAttr(key)) {
|
|
10364
10635
|
const v2CoercedValue = value === void 0 ? null : value === null || value === false || value === "false" ? "false" : "true";
|
|
@@ -10450,7 +10721,7 @@ var Vue = (function() {
|
|
|
10450
10721
|
return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
|
|
10451
10722
|
}
|
|
10452
10723
|
let cachedNow = 0;
|
|
10453
|
-
const p =
|
|
10724
|
+
const p = /*@__PURE__*/ Promise.resolve();
|
|
10454
10725
|
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
10455
10726
|
function createInvoker(initialValue, instance) {
|
|
10456
10727
|
const invoker = (e) => {
|
|
@@ -10518,7 +10789,7 @@ var Vue = (function() {
|
|
|
10518
10789
|
//#endregion
|
|
10519
10790
|
//#region packages/runtime-dom/src/apiCustomElement.ts
|
|
10520
10791
|
const REMOVAL = {};
|
|
10521
|
-
|
|
10792
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
10522
10793
|
function defineCustomElement(options, extraOptions, _createApp) {
|
|
10523
10794
|
let Comp = /* @__PURE__ */ defineComponent(options, extraOptions);
|
|
10524
10795
|
if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
|
|
@@ -10567,12 +10838,14 @@ var Vue = (function() {
|
|
|
10567
10838
|
this._parent = parent;
|
|
10568
10839
|
break;
|
|
10569
10840
|
}
|
|
10570
|
-
if (!this._instance)
|
|
10571
|
-
|
|
10572
|
-
this._pendingResolve =
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10841
|
+
if (!this._instance) {
|
|
10842
|
+
if (this._resolved) this._mountComponent(this._def);
|
|
10843
|
+
else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
|
|
10844
|
+
this._pendingResolve = void 0;
|
|
10845
|
+
if (this.isConnected) return this._resolveDef();
|
|
10846
|
+
});
|
|
10847
|
+
else this._resolveDef();
|
|
10848
|
+
}
|
|
10576
10849
|
}
|
|
10577
10850
|
disconnectedCallback() {
|
|
10578
10851
|
this._connected = false;
|
|
@@ -10606,7 +10879,7 @@ var Vue = (function() {
|
|
|
10606
10879
|
* resolve inner component definition (handle possible async component)
|
|
10607
10880
|
*/
|
|
10608
10881
|
_resolveDef() {
|
|
10609
|
-
if (this._pendingResolve) return;
|
|
10882
|
+
if (this._pendingResolve) return this._pendingResolve;
|
|
10610
10883
|
for (let i = 0; i < this.attributes.length; i++) this._setAttr(this.attributes[i].name);
|
|
10611
10884
|
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
10612
10885
|
this._ob.observe(this, { attributes: true });
|
|
@@ -10636,6 +10909,7 @@ var Vue = (function() {
|
|
|
10636
10909
|
this._def = def;
|
|
10637
10910
|
resolve(def);
|
|
10638
10911
|
});
|
|
10912
|
+
return this._pendingResolve;
|
|
10639
10913
|
} else resolve(this._def);
|
|
10640
10914
|
}
|
|
10641
10915
|
_mountComponent(def) {
|
|
@@ -10674,14 +10948,17 @@ var Vue = (function() {
|
|
|
10674
10948
|
const { props } = def;
|
|
10675
10949
|
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
10676
10950
|
for (const key of Object.keys(this)) if (key[0] !== "_" && declaredPropKeys.includes(key)) this._setProp(key, this[key]);
|
|
10677
|
-
for (const key of declaredPropKeys.map(camelize))
|
|
10678
|
-
|
|
10679
|
-
|
|
10680
|
-
|
|
10681
|
-
|
|
10682
|
-
|
|
10683
|
-
|
|
10684
|
-
|
|
10951
|
+
for (const key of declaredPropKeys.map(camelize)) {
|
|
10952
|
+
if (key in Object.getPrototypeOf(this)) warn(`Custom element prop "${key}" conflicts with an existing property on the element and will overwrite it.`);
|
|
10953
|
+
Object.defineProperty(this, key, {
|
|
10954
|
+
get() {
|
|
10955
|
+
return this._getProp(key);
|
|
10956
|
+
},
|
|
10957
|
+
set(val) {
|
|
10958
|
+
this._setProp(key, val, true, !this._patching);
|
|
10959
|
+
}
|
|
10960
|
+
});
|
|
10961
|
+
}
|
|
10685
10962
|
}
|
|
10686
10963
|
_setAttr(key) {
|
|
10687
10964
|
if (key.startsWith("data-v-")) return;
|
|
@@ -10784,13 +11061,11 @@ var Vue = (function() {
|
|
|
10784
11061
|
_renderSlots() {
|
|
10785
11062
|
const outlets = this._getSlots();
|
|
10786
11063
|
const scopeId = this._instance.type.__scopeId;
|
|
10787
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
10788
11064
|
for (let i = 0; i < outlets.length; i++) {
|
|
10789
11065
|
const o = outlets[i];
|
|
10790
11066
|
const slotName = o.getAttribute("name") || "default";
|
|
10791
11067
|
const content = this._slots[slotName];
|
|
10792
11068
|
const parent = o.parentNode;
|
|
10793
|
-
const replacementNodes = [];
|
|
10794
11069
|
if (content) for (const n of content) {
|
|
10795
11070
|
if (scopeId && n.nodeType === 1) {
|
|
10796
11071
|
const id = scopeId + "-s";
|
|
@@ -10800,20 +11075,10 @@ var Vue = (function() {
|
|
|
10800
11075
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
10801
11076
|
}
|
|
10802
11077
|
parent.insertBefore(n, o);
|
|
10803
|
-
replacementNodes.push(n);
|
|
10804
|
-
}
|
|
10805
|
-
else while (o.firstChild) {
|
|
10806
|
-
const child = o.firstChild;
|
|
10807
|
-
parent.insertBefore(child, o);
|
|
10808
|
-
replacementNodes.push(child);
|
|
10809
11078
|
}
|
|
11079
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
10810
11080
|
parent.removeChild(o);
|
|
10811
|
-
slotReplacements.set(o, {
|
|
10812
|
-
nodes: replacementNodes,
|
|
10813
|
-
usedFallback: !content
|
|
10814
|
-
});
|
|
10815
11081
|
}
|
|
10816
|
-
this._updateSlotNodes(slotReplacements);
|
|
10817
11082
|
}
|
|
10818
11083
|
/**
|
|
10819
11084
|
* @internal
|
|
@@ -10852,7 +11117,7 @@ var Vue = (function() {
|
|
|
10852
11117
|
* @internal
|
|
10853
11118
|
*/
|
|
10854
11119
|
_hasShadowRoot() {
|
|
10855
|
-
return this.
|
|
11120
|
+
return this._root !== this;
|
|
10856
11121
|
}
|
|
10857
11122
|
/**
|
|
10858
11123
|
* @internal
|
|
@@ -10897,10 +11162,6 @@ var Vue = (function() {
|
|
|
10897
11162
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
10898
11163
|
this._app = this._instance = null;
|
|
10899
11164
|
}
|
|
10900
|
-
/**
|
|
10901
|
-
* Only called when shadowRoot is false
|
|
10902
|
-
*/
|
|
10903
|
-
_updateSlotNodes(replacements) {}
|
|
10904
11165
|
_createVNode() {
|
|
10905
11166
|
const baseProps = {};
|
|
10906
11167
|
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
@@ -10951,7 +11212,7 @@ var Vue = (function() {
|
|
|
10951
11212
|
};
|
|
10952
11213
|
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
10953
11214
|
name: "TransitionGroup",
|
|
10954
|
-
props:
|
|
11215
|
+
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
10955
11216
|
tag: String,
|
|
10956
11217
|
moveClass: String
|
|
10957
11218
|
}),
|
|
@@ -11083,13 +11344,22 @@ var Vue = (function() {
|
|
|
11083
11344
|
}
|
|
11084
11345
|
}
|
|
11085
11346
|
const assignKey = Symbol("_assign");
|
|
11347
|
+
const initialValueKey = Symbol("_initialValue");
|
|
11086
11348
|
const vModelText = {
|
|
11087
11349
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
11350
|
+
if (el.parentNode) {
|
|
11351
|
+
if (el.type === "text") el[initialValueKey] = el.defaultValue.replace(/[\r\n]/g, "");
|
|
11352
|
+
else if (el.type === "textarea") el[initialValueKey] = el.defaultValue.replace(/\r\n?/g, "\n");
|
|
11353
|
+
}
|
|
11088
11354
|
el[assignKey] = getModelAssigner(vnode);
|
|
11089
11355
|
vModelTextInit(el, trim, number || !!(vnode.props && vnode.props.type === "number"), lazy);
|
|
11090
11356
|
},
|
|
11091
|
-
mounted(el, { value }) {
|
|
11092
|
-
|
|
11357
|
+
mounted(el, { value, modifiers: { trim, number } }) {
|
|
11358
|
+
const newValue = value == null ? "" : value;
|
|
11359
|
+
const initialValue = el[initialValueKey];
|
|
11360
|
+
delete el[initialValueKey];
|
|
11361
|
+
if (initialValue !== void 0 && (el.type === "text" || el.type === "textarea") && el.value !== initialValue) el[assignKey](castValue(el.value, trim, number));
|
|
11362
|
+
else el.value = newValue;
|
|
11093
11363
|
},
|
|
11094
11364
|
beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
|
|
11095
11365
|
el[assignKey] = getModelAssigner(vnode);
|
|
@@ -11224,19 +11494,39 @@ var Vue = (function() {
|
|
|
11224
11494
|
el._modelValue = value;
|
|
11225
11495
|
addEventListener(el, "change", () => {
|
|
11226
11496
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
11227
|
-
|
|
11228
|
-
el.
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11497
|
+
const multiple = el.multiple;
|
|
11498
|
+
const assignedValue = multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
|
|
11499
|
+
const pending = el._pendingValue = [multiple, multiple ? isArray(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue];
|
|
11500
|
+
try {
|
|
11501
|
+
(set || el[assignKey])(assignedValue);
|
|
11502
|
+
} finally {
|
|
11503
|
+
nextTick(() => {
|
|
11504
|
+
if (el._pendingValue === pending) el._pendingValue = void 0;
|
|
11505
|
+
});
|
|
11506
|
+
}
|
|
11232
11507
|
});
|
|
11233
11508
|
};
|
|
11509
|
+
function isSameSelectValue(value, assignedValue, multiple) {
|
|
11510
|
+
if (!multiple) return looseEqual(value, assignedValue);
|
|
11511
|
+
if (isArray(value)) return looseEqual(value, assignedValue);
|
|
11512
|
+
if (isSet(value)) {
|
|
11513
|
+
if (value.size !== assignedValue.length) return false;
|
|
11514
|
+
for (const item of assignedValue) if (!value.has(item)) return false;
|
|
11515
|
+
return true;
|
|
11516
|
+
}
|
|
11517
|
+
return false;
|
|
11518
|
+
}
|
|
11234
11519
|
/**
|
|
11235
11520
|
* @internal
|
|
11236
11521
|
*/
|
|
11237
11522
|
const vModelSetSelected = (el, value) => {
|
|
11238
11523
|
el._modelValue = value;
|
|
11239
|
-
|
|
11524
|
+
const pending = el._pendingValue;
|
|
11525
|
+
el._pendingValue = void 0;
|
|
11526
|
+
if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
|
|
11527
|
+
setSelected(el, value);
|
|
11528
|
+
};
|
|
11529
|
+
function setSelected(el, value) {
|
|
11240
11530
|
const isMultiple = el.multiple;
|
|
11241
11531
|
const isArrayValue = isArray(value);
|
|
11242
11532
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -11246,18 +11536,19 @@ var Vue = (function() {
|
|
|
11246
11536
|
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
11247
11537
|
const option = el.options[i];
|
|
11248
11538
|
const optionValue = getValue(option);
|
|
11249
|
-
if (isMultiple)
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11539
|
+
if (isMultiple) {
|
|
11540
|
+
if (isArrayValue) {
|
|
11541
|
+
const optionType = typeof optionValue;
|
|
11542
|
+
if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
|
|
11543
|
+
else option.selected = looseIndexOf(value, optionValue) > -1;
|
|
11544
|
+
} else option.selected = value.has(optionValue);
|
|
11545
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
11255
11546
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
11256
11547
|
return;
|
|
11257
11548
|
}
|
|
11258
11549
|
}
|
|
11259
11550
|
if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
|
|
11260
|
-
}
|
|
11551
|
+
}
|
|
11261
11552
|
/**
|
|
11262
11553
|
* @internal retrieve raw value set via :value bindings
|
|
11263
11554
|
*/
|
|
@@ -11553,7 +11844,7 @@ var Vue = (function() {
|
|
|
11553
11844
|
withModifiers: () => withModifiers,
|
|
11554
11845
|
withScopeId: () => withScopeId
|
|
11555
11846
|
});
|
|
11556
|
-
const rendererOptions =
|
|
11847
|
+
const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
|
|
11557
11848
|
let renderer;
|
|
11558
11849
|
let enabledHydration = false;
|
|
11559
11850
|
function ensureRenderer() {
|
|
@@ -12104,13 +12395,14 @@ var Vue = (function() {
|
|
|
12104
12395
|
}
|
|
12105
12396
|
}
|
|
12106
12397
|
stateInterpolationOpen(c) {
|
|
12107
|
-
if (c === this.delimiterOpen[this.delimiterIndex])
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12398
|
+
if (c === this.delimiterOpen[this.delimiterIndex]) {
|
|
12399
|
+
if (this.delimiterIndex === this.delimiterOpen.length - 1) {
|
|
12400
|
+
const start = this.index + 1 - this.delimiterOpen.length;
|
|
12401
|
+
if (start > this.sectionStart) this.cbs.ontext(this.sectionStart, start);
|
|
12402
|
+
this.state = 3;
|
|
12403
|
+
this.sectionStart = start;
|
|
12404
|
+
} else this.delimiterIndex++;
|
|
12405
|
+
} else if (this.inRCDATA) {
|
|
12114
12406
|
this.state = 32;
|
|
12115
12407
|
this.stateInRCDATA(c);
|
|
12116
12408
|
} else {
|
|
@@ -12126,13 +12418,14 @@ var Vue = (function() {
|
|
|
12126
12418
|
}
|
|
12127
12419
|
}
|
|
12128
12420
|
stateInterpolationClose(c) {
|
|
12129
|
-
if (c === this.delimiterClose[this.delimiterIndex])
|
|
12130
|
-
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12421
|
+
if (c === this.delimiterClose[this.delimiterIndex]) {
|
|
12422
|
+
if (this.delimiterIndex === this.delimiterClose.length - 1) {
|
|
12423
|
+
this.cbs.oninterpolation(this.sectionStart, this.index + 1);
|
|
12424
|
+
if (this.inRCDATA) this.state = 32;
|
|
12425
|
+
else this.state = 1;
|
|
12426
|
+
this.sectionStart = this.index + 1;
|
|
12427
|
+
} else this.delimiterIndex++;
|
|
12428
|
+
} else {
|
|
12136
12429
|
this.state = 3;
|
|
12137
12430
|
this.stateInterpolation(c);
|
|
12138
12431
|
}
|
|
@@ -12247,9 +12540,10 @@ var Vue = (function() {
|
|
|
12247
12540
|
this.sectionStart = this.index;
|
|
12248
12541
|
if (this.mode === 0) this.state = 6;
|
|
12249
12542
|
else if (this.inSFCRoot) this.state = 34;
|
|
12250
|
-
else if (!this.inXML)
|
|
12251
|
-
|
|
12252
|
-
|
|
12543
|
+
else if (!this.inXML) {
|
|
12544
|
+
if (c === 116) this.state = 30;
|
|
12545
|
+
else this.state = c === 115 ? 29 : 6;
|
|
12546
|
+
} else this.state = 6;
|
|
12253
12547
|
} else if (c === 47) this.state = 8;
|
|
12254
12548
|
else {
|
|
12255
12549
|
this.state = 1;
|
|
@@ -12602,9 +12896,7 @@ var Vue = (function() {
|
|
|
12602
12896
|
case 24:
|
|
12603
12897
|
this.stateInProcessingInstruction(c);
|
|
12604
12898
|
break;
|
|
12605
|
-
case 33:
|
|
12606
|
-
this.stateInEntity();
|
|
12607
|
-
break;
|
|
12899
|
+
case 33: this.stateInEntity();
|
|
12608
12900
|
}
|
|
12609
12901
|
this.index++;
|
|
12610
12902
|
}
|
|
@@ -12633,9 +12925,10 @@ var Vue = (function() {
|
|
|
12633
12925
|
handleTrailingData() {
|
|
12634
12926
|
const endIndex = this.buffer.length;
|
|
12635
12927
|
if (this.sectionStart >= endIndex) return;
|
|
12636
|
-
if (this.state === 28)
|
|
12637
|
-
|
|
12638
|
-
|
|
12928
|
+
if (this.state === 28) {
|
|
12929
|
+
if (this.currentSequence === Sequences.CdataEnd) this.cbs.oncdata(this.sectionStart, endIndex);
|
|
12930
|
+
else this.cbs.oncomment(this.sectionStart, endIndex);
|
|
12931
|
+
} else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) {} else this.cbs.ontext(this.sectionStart, endIndex);
|
|
12639
12932
|
}
|
|
12640
12933
|
emitCodePoint(cp, consumed) {}
|
|
12641
12934
|
};
|
|
@@ -12837,12 +13130,10 @@ var Vue = (function() {
|
|
|
12837
13130
|
if (!--currentOpenParensCount) state = stateStack.pop();
|
|
12838
13131
|
}
|
|
12839
13132
|
break;
|
|
12840
|
-
case 3:
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
}
|
|
12845
|
-
break;
|
|
13133
|
+
case 3: if (char === currentStringType) {
|
|
13134
|
+
state = stateStack.pop();
|
|
13135
|
+
currentStringType = null;
|
|
13136
|
+
}
|
|
12846
13137
|
}
|
|
12847
13138
|
}
|
|
12848
13139
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
@@ -12892,7 +13183,7 @@ var Vue = (function() {
|
|
|
12892
13183
|
function isSlotOutlet(node) {
|
|
12893
13184
|
return node.type === 1 && node.tagType === 2;
|
|
12894
13185
|
}
|
|
12895
|
-
const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
13186
|
+
const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
12896
13187
|
function getUnnormalizedProps(props, callPath = []) {
|
|
12897
13188
|
if (props && !isString(props) && props.type === 14) {
|
|
12898
13189
|
const callee = props.callee;
|
|
@@ -12935,9 +13226,10 @@ var Vue = (function() {
|
|
|
12935
13226
|
propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [createObjectExpression([prop]), props]);
|
|
12936
13227
|
if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) parentCall = callPath[callPath.length - 2];
|
|
12937
13228
|
}
|
|
12938
|
-
if (node.type === 13)
|
|
12939
|
-
|
|
12940
|
-
|
|
13229
|
+
if (node.type === 13) {
|
|
13230
|
+
if (parentCall) parentCall.arguments[0] = propsWithInjection;
|
|
13231
|
+
else node.props = propsWithInjection;
|
|
13232
|
+
} else if (parentCall) parentCall.arguments[0] = propsWithInjection;
|
|
12941
13233
|
else node.arguments[2] = propsWithInjection;
|
|
12942
13234
|
}
|
|
12943
13235
|
function injectSlotKey(node, prop) {
|
|
@@ -13212,10 +13504,7 @@ var Vue = (function() {
|
|
|
13212
13504
|
case 18:
|
|
13213
13505
|
case 19:
|
|
13214
13506
|
case 20:
|
|
13215
|
-
case 21:
|
|
13216
|
-
emitError(9, end);
|
|
13217
|
-
break;
|
|
13218
|
-
default: break;
|
|
13507
|
+
case 21: emitError(9, end);
|
|
13219
13508
|
}
|
|
13220
13509
|
for (let index = 0; index < stack.length; index++) {
|
|
13221
13510
|
onCloseTag(stack[index], end - 1);
|
|
@@ -13365,7 +13654,7 @@ var Vue = (function() {
|
|
|
13365
13654
|
while (currentInput.charCodeAt(i) !== c && i >= 0) i--;
|
|
13366
13655
|
return i;
|
|
13367
13656
|
}
|
|
13368
|
-
const specialTemplateDir = new Set([
|
|
13657
|
+
const specialTemplateDir = /* @__PURE__ */ new Set([
|
|
13369
13658
|
"if",
|
|
13370
13659
|
"else",
|
|
13371
13660
|
"else-if",
|
|
@@ -13401,16 +13690,18 @@ var Vue = (function() {
|
|
|
13401
13690
|
let removedWhitespace = false;
|
|
13402
13691
|
for (let i = 0; i < nodes.length; i++) {
|
|
13403
13692
|
const node = nodes[i];
|
|
13404
|
-
if (node.type === 2)
|
|
13405
|
-
if (
|
|
13406
|
-
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
|
|
13412
|
-
|
|
13413
|
-
|
|
13693
|
+
if (node.type === 2) {
|
|
13694
|
+
if (!inPre) {
|
|
13695
|
+
if (isAllWhitespace(node.content)) {
|
|
13696
|
+
const prev = nodes[i - 1] && nodes[i - 1].type;
|
|
13697
|
+
const next = nodes[i + 1] && nodes[i + 1].type;
|
|
13698
|
+
if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
|
|
13699
|
+
removedWhitespace = true;
|
|
13700
|
+
nodes[i] = null;
|
|
13701
|
+
} else node.content = " ";
|
|
13702
|
+
} else if (shouldCondense) node.content = condense(node.content);
|
|
13703
|
+
} else node.content = node.content.replace(windowsNewlineRE, "\n");
|
|
13704
|
+
}
|
|
13414
13705
|
}
|
|
13415
13706
|
return removedWhitespace ? nodes.filter(Boolean) : nodes;
|
|
13416
13707
|
}
|
|
@@ -13671,7 +13962,7 @@ var Vue = (function() {
|
|
|
13671
13962
|
default: return 0;
|
|
13672
13963
|
}
|
|
13673
13964
|
}
|
|
13674
|
-
const allowHoistedHelperSet = new Set([
|
|
13965
|
+
const allowHoistedHelperSet = /* @__PURE__ */ new Set([
|
|
13675
13966
|
NORMALIZE_CLASS,
|
|
13676
13967
|
NORMALIZE_STYLE,
|
|
13677
13968
|
NORMALIZE_PROPS,
|
|
@@ -13715,7 +14006,7 @@ var Vue = (function() {
|
|
|
13715
14006
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
13716
14007
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
13717
14008
|
}
|
|
13718
|
-
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false,
|
|
14009
|
+
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13719
14010
|
const context = {
|
|
13720
14011
|
filename,
|
|
13721
14012
|
selfName: getSelfName(filename),
|
|
@@ -13737,7 +14028,6 @@ var Vue = (function() {
|
|
|
13737
14028
|
bindingMetadata,
|
|
13738
14029
|
inline,
|
|
13739
14030
|
isTS,
|
|
13740
|
-
eventDelegation,
|
|
13741
14031
|
onError,
|
|
13742
14032
|
onWarn,
|
|
13743
14033
|
compatConfig,
|
|
@@ -13830,7 +14120,7 @@ var Vue = (function() {
|
|
|
13830
14120
|
traverseNode(root, context);
|
|
13831
14121
|
if (options.hoistStatic) cacheStatic(root, context);
|
|
13832
14122
|
if (!options.ssr) createRootCodegen(root, context);
|
|
13833
|
-
root.helpers = new Set([...context.helpers.keys()]);
|
|
14123
|
+
root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]);
|
|
13834
14124
|
root.components = [...context.components];
|
|
13835
14125
|
root.directives = [...context.directives];
|
|
13836
14126
|
root.imports = context.imports;
|
|
@@ -13877,8 +14167,10 @@ var Vue = (function() {
|
|
|
13877
14167
|
const exitFns = [];
|
|
13878
14168
|
for (let i = 0; i < nodeTransforms.length; i++) {
|
|
13879
14169
|
const onExit = nodeTransforms[i](node, context);
|
|
13880
|
-
if (onExit)
|
|
13881
|
-
|
|
14170
|
+
if (onExit) {
|
|
14171
|
+
if (isArray(onExit)) exitFns.push(...onExit);
|
|
14172
|
+
else exitFns.push(onExit);
|
|
14173
|
+
}
|
|
13882
14174
|
if (!context.currentNode) return;
|
|
13883
14175
|
else node = context.currentNode;
|
|
13884
14176
|
}
|
|
@@ -13895,9 +14187,7 @@ var Vue = (function() {
|
|
|
13895
14187
|
case 10:
|
|
13896
14188
|
case 11:
|
|
13897
14189
|
case 1:
|
|
13898
|
-
case 0:
|
|
13899
|
-
traverseChildren(node, context);
|
|
13900
|
-
break;
|
|
14190
|
+
case 0: traverseChildren(node, context);
|
|
13901
14191
|
}
|
|
13902
14192
|
context.currentNode = node;
|
|
13903
14193
|
let i = exitFns.length;
|
|
@@ -14093,10 +14383,12 @@ var Vue = (function() {
|
|
|
14093
14383
|
if (isString(node)) push(node, -3);
|
|
14094
14384
|
else if (isArray(node)) genNodeListAsArray(node, context);
|
|
14095
14385
|
else genNode(node, context);
|
|
14096
|
-
if (i < nodes.length - 1)
|
|
14097
|
-
|
|
14098
|
-
|
|
14099
|
-
|
|
14386
|
+
if (i < nodes.length - 1) {
|
|
14387
|
+
if (multilines) {
|
|
14388
|
+
comma && push(",");
|
|
14389
|
+
newline();
|
|
14390
|
+
} else comma && push(", ");
|
|
14391
|
+
}
|
|
14100
14392
|
}
|
|
14101
14393
|
}
|
|
14102
14394
|
function genNode(node, context) {
|
|
@@ -14208,8 +14500,10 @@ var Vue = (function() {
|
|
|
14208
14500
|
const { push, helper, pure } = context;
|
|
14209
14501
|
const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node;
|
|
14210
14502
|
let patchFlagString;
|
|
14211
|
-
if (patchFlag)
|
|
14212
|
-
|
|
14503
|
+
if (patchFlag) {
|
|
14504
|
+
if (patchFlag < 0) patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`;
|
|
14505
|
+
else patchFlagString = patchFlag + ` /* ${Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `)} */`;
|
|
14506
|
+
}
|
|
14213
14507
|
if (directives) push(helper(WITH_DIRECTIVES) + `(`);
|
|
14214
14508
|
if (isBlock) push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `);
|
|
14215
14509
|
if (pure) push(PURE_ANNOTATION);
|
|
@@ -14478,16 +14772,17 @@ var Vue = (function() {
|
|
|
14478
14772
|
const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2));
|
|
14479
14773
|
const { children } = branch;
|
|
14480
14774
|
const firstChild = children[0];
|
|
14481
|
-
if (children.length !== 1 || firstChild.type !== 1)
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14775
|
+
if (children.length !== 1 || firstChild.type !== 1) {
|
|
14776
|
+
if (children.length === 1 && firstChild.type === 11) {
|
|
14777
|
+
const vnodeCall = firstChild.codegenNode;
|
|
14778
|
+
injectProp(vnodeCall, keyProperty, context);
|
|
14779
|
+
return vnodeCall;
|
|
14780
|
+
} else {
|
|
14781
|
+
let patchFlag = 64;
|
|
14782
|
+
if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) patchFlag |= 2048;
|
|
14783
|
+
return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag, void 0, void 0, true, false, false, branch.loc);
|
|
14784
|
+
}
|
|
14485
14785
|
} else {
|
|
14486
|
-
let patchFlag = 64;
|
|
14487
|
-
if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) patchFlag |= 2048;
|
|
14488
|
-
return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag, void 0, void 0, true, false, false, branch.loc);
|
|
14489
|
-
}
|
|
14490
|
-
else {
|
|
14491
14786
|
const ret = firstChild.codegenNode;
|
|
14492
14787
|
const vnodeCall = getMemoedVNodeCall(ret);
|
|
14493
14788
|
if (vnodeCall.type === 13) convertToBlock(vnodeCall, context);
|
|
@@ -14508,9 +14803,10 @@ var Vue = (function() {
|
|
|
14508
14803
|
return true;
|
|
14509
14804
|
}
|
|
14510
14805
|
function getParentCondition(node) {
|
|
14511
|
-
while (true) if (node.type === 19)
|
|
14512
|
-
|
|
14513
|
-
|
|
14806
|
+
while (true) if (node.type === 19) {
|
|
14807
|
+
if (node.alternate.type === 19) node = node.alternate;
|
|
14808
|
+
else return node;
|
|
14809
|
+
} else if (node.type === 20) node = node.value;
|
|
14514
14810
|
}
|
|
14515
14811
|
//#endregion
|
|
14516
14812
|
//#region packages/compiler-core/src/transforms/vFor.ts
|
|
@@ -14548,15 +14844,24 @@ var Vue = (function() {
|
|
|
14548
14844
|
else {
|
|
14549
14845
|
childBlock = children[0].codegenNode;
|
|
14550
14846
|
if (isTemplate && keyProperty) injectProp(childBlock, keyProperty, context);
|
|
14551
|
-
|
|
14552
|
-
|
|
14553
|
-
|
|
14554
|
-
|
|
14555
|
-
|
|
14847
|
+
const shouldUseBlock = !isStableFragment || childBlock.isBlockRequired === true;
|
|
14848
|
+
if (childBlock.isBlock !== shouldUseBlock) {
|
|
14849
|
+
if (childBlock.isBlock) {
|
|
14850
|
+
removeHelper(OPEN_BLOCK);
|
|
14851
|
+
removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
|
|
14852
|
+
} else removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent));
|
|
14853
|
+
}
|
|
14854
|
+
childBlock.isBlock = shouldUseBlock;
|
|
14556
14855
|
if (childBlock.isBlock) {
|
|
14557
14856
|
helper(OPEN_BLOCK);
|
|
14558
14857
|
helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
|
|
14559
|
-
} else
|
|
14858
|
+
} else {
|
|
14859
|
+
helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
|
|
14860
|
+
if (childBlock.needsPatch) {
|
|
14861
|
+
var _childBlock$patchFlag;
|
|
14862
|
+
childBlock.patchFlag = ((_childBlock$patchFlag = childBlock.patchFlag) !== null && _childBlock$patchFlag !== void 0 ? _childBlock$patchFlag : 0) | 512;
|
|
14863
|
+
}
|
|
14864
|
+
}
|
|
14560
14865
|
}
|
|
14561
14866
|
if (memo) {
|
|
14562
14867
|
const loop = createFunctionExpression(createForLoopParams(forNode.parseResult, [createSimpleExpression(`_cached`)]));
|
|
@@ -14728,8 +15033,10 @@ var Vue = (function() {
|
|
|
14728
15033
|
return createObjectProperty(`default`, fn);
|
|
14729
15034
|
};
|
|
14730
15035
|
if (!hasTemplateSlots) slotsProperties.push(buildDefaultSlotProperty(void 0, children));
|
|
14731
|
-
else if (implicitDefaultChildren.length && !implicitDefaultChildren.every(isWhitespaceText))
|
|
14732
|
-
|
|
15036
|
+
else if (implicitDefaultChildren.length && !implicitDefaultChildren.every(isWhitespaceText)) {
|
|
15037
|
+
if (hasNamedDefaultSlot) context.onError(createCompilerError(39, implicitDefaultChildren[0].loc));
|
|
15038
|
+
else slotsProperties.push(buildDefaultSlotProperty(void 0, implicitDefaultChildren));
|
|
15039
|
+
}
|
|
14733
15040
|
}
|
|
14734
15041
|
const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1;
|
|
14735
15042
|
let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`, createSimpleExpression(slotFlag + ` /* ${slotFlagsText[slotFlag]} */`, false))), loc);
|
|
@@ -14755,10 +15062,7 @@ var Vue = (function() {
|
|
|
14755
15062
|
if (hasForwardedSlots(child.branches)) return true;
|
|
14756
15063
|
break;
|
|
14757
15064
|
case 10:
|
|
14758
|
-
case 11:
|
|
14759
|
-
if (hasForwardedSlots(child.children)) return true;
|
|
14760
|
-
break;
|
|
14761
|
-
default: break;
|
|
15065
|
+
case 11: if (hasForwardedSlots(child.children)) return true;
|
|
14762
15066
|
}
|
|
14763
15067
|
}
|
|
14764
15068
|
return false;
|
|
@@ -14780,12 +15084,16 @@ var Vue = (function() {
|
|
|
14780
15084
|
let vnodeDynamicProps;
|
|
14781
15085
|
let dynamicPropNames;
|
|
14782
15086
|
let vnodeDirectives;
|
|
15087
|
+
let needsPatch = false;
|
|
15088
|
+
let isBlockRequired = false;
|
|
14783
15089
|
let shouldUseBlock = isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && (tag === "svg" || tag === "foreignObject" || tag === "math");
|
|
14784
15090
|
if (props.length > 0) {
|
|
14785
15091
|
const propsBuildResult = buildProps(node, context, void 0, isComponent, isDynamicComponent);
|
|
14786
15092
|
vnodeProps = propsBuildResult.props;
|
|
14787
15093
|
patchFlag = propsBuildResult.patchFlag;
|
|
14788
15094
|
dynamicPropNames = propsBuildResult.dynamicPropNames;
|
|
15095
|
+
needsPatch = propsBuildResult.needsPatch;
|
|
15096
|
+
isBlockRequired = propsBuildResult.isBlockRequired;
|
|
14789
15097
|
const directives = propsBuildResult.directives;
|
|
14790
15098
|
vnodeDirectives = directives && directives.length ? createArrayExpression(directives.map((dir) => buildDirectiveArgs(dir, context))) : void 0;
|
|
14791
15099
|
if (propsBuildResult.shouldUseBlock) shouldUseBlock = true;
|
|
@@ -14814,7 +15122,10 @@ var Vue = (function() {
|
|
|
14814
15122
|
} else vnodeChildren = node.children;
|
|
14815
15123
|
}
|
|
14816
15124
|
if (dynamicPropNames && dynamicPropNames.length) vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);
|
|
14817
|
-
node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, patchFlag === 0 ? void 0 : patchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false, isComponent, node.loc);
|
|
15125
|
+
const vnodeCall = node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, patchFlag === 0 ? void 0 : patchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false, isComponent, node.loc);
|
|
15126
|
+
needsPatch = needsPatch && (patchFlag === 0 || patchFlag === 32);
|
|
15127
|
+
if (needsPatch) vnodeCall.needsPatch = true;
|
|
15128
|
+
if (isBlockRequired) vnodeCall.isBlockRequired = true;
|
|
14818
15129
|
};
|
|
14819
15130
|
};
|
|
14820
15131
|
function resolveComponentType(node, context, ssr = false) {
|
|
@@ -14848,6 +15159,7 @@ var Vue = (function() {
|
|
|
14848
15159
|
const runtimeDirectives = [];
|
|
14849
15160
|
const hasChildren = children.length > 0;
|
|
14850
15161
|
let shouldUseBlock = false;
|
|
15162
|
+
let isBlockRequired = false;
|
|
14851
15163
|
let patchFlag = 0;
|
|
14852
15164
|
let hasRef = false;
|
|
14853
15165
|
let hasClassBinding = false;
|
|
@@ -14872,12 +15184,12 @@ var Vue = (function() {
|
|
|
14872
15184
|
const isEventHandler = isOn(name);
|
|
14873
15185
|
if (isEventHandler && (!isComponent || isDynamicComponent) && name.toLowerCase() !== "onclick" && name !== "onUpdate:modelValue" && !isReservedProp(name)) hasHydrationEventBinding = true;
|
|
14874
15186
|
if (isEventHandler && isReservedProp(name)) hasVnodeHook = true;
|
|
15187
|
+
if (name === "ref") hasRef = true;
|
|
14875
15188
|
if (isEventHandler && value.type === 14) value = value.arguments[0];
|
|
14876
15189
|
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) return;
|
|
14877
|
-
if (name === "
|
|
14878
|
-
else if (name === "class") hasClassBinding = true;
|
|
15190
|
+
if (name === "class") hasClassBinding = true;
|
|
14879
15191
|
else if (name === "style") hasStyleBinding = true;
|
|
14880
|
-
else if (name !== "key" && !dynamicPropNames.includes(name)) dynamicPropNames.push(name);
|
|
15192
|
+
else if (name !== "ref" && name !== "key" && !dynamicPropNames.includes(name)) dynamicPropNames.push(name);
|
|
14881
15193
|
if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) dynamicPropNames.push(name);
|
|
14882
15194
|
} else hasDynamicKeys = true;
|
|
14883
15195
|
};
|
|
@@ -14903,33 +15215,38 @@ var Vue = (function() {
|
|
|
14903
15215
|
if (name === "once" || name === "memo") continue;
|
|
14904
15216
|
if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled("COMPILER_IS_ON_ELEMENT", context))) continue;
|
|
14905
15217
|
if (isVOn && ssr) continue;
|
|
14906
|
-
if (isVBind && isStaticArgOf(arg, "key")
|
|
15218
|
+
if (isVBind && isStaticArgOf(arg, "key")) shouldUseBlock = true;
|
|
15219
|
+
if (isVOn && hasChildren && arg && isStaticExp(arg) && camelize(arg.content) === "vue:beforeUpdate") {
|
|
15220
|
+
shouldUseBlock = true;
|
|
15221
|
+
isBlockRequired = true;
|
|
15222
|
+
}
|
|
14907
15223
|
if (isVBind && isStaticArgOf(arg, "ref")) pushRefVForMarker();
|
|
14908
15224
|
if (!arg && (isVBind || isVOn)) {
|
|
14909
15225
|
hasDynamicKeys = true;
|
|
14910
|
-
if (exp)
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
if (
|
|
14914
|
-
if (
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14918
|
-
|
|
14919
|
-
|
|
14920
|
-
|
|
14921
|
-
|
|
14922
|
-
|
|
14923
|
-
|
|
14924
|
-
|
|
14925
|
-
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
|
|
14929
|
-
|
|
14930
|
-
|
|
14931
|
-
|
|
14932
|
-
|
|
15226
|
+
if (exp) {
|
|
15227
|
+
if (isVBind) {
|
|
15228
|
+
pushMergeArg();
|
|
15229
|
+
if (mergeArgs.some((arg) => {
|
|
15230
|
+
if (arg.type === 15) return arg.properties.some(({ key }) => {
|
|
15231
|
+
if (key.type !== 4 || !key.isStatic) return true;
|
|
15232
|
+
return key.content !== "class" && key.content !== "style" && !isOn(key.content);
|
|
15233
|
+
});
|
|
15234
|
+
else return true;
|
|
15235
|
+
})) checkCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER", context, loc);
|
|
15236
|
+
if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER", context)) {
|
|
15237
|
+
mergeArgs.unshift(exp);
|
|
15238
|
+
continue;
|
|
15239
|
+
}
|
|
15240
|
+
pushRefVForMarker();
|
|
15241
|
+
pushMergeArg();
|
|
15242
|
+
mergeArgs.push(exp);
|
|
15243
|
+
} else pushMergeArg({
|
|
15244
|
+
type: 14,
|
|
15245
|
+
loc,
|
|
15246
|
+
callee: context.helper(TO_HANDLERS),
|
|
15247
|
+
arguments: isComponent ? [exp] : [exp, `true`]
|
|
15248
|
+
});
|
|
15249
|
+
} else context.onError(createCompilerError(isVBind ? 34 : 35, loc));
|
|
14933
15250
|
continue;
|
|
14934
15251
|
}
|
|
14935
15252
|
if (isVBind && modifiers.some((mod) => mod.content === "prop")) patchFlag |= 32;
|
|
@@ -14945,7 +15262,10 @@ var Vue = (function() {
|
|
|
14945
15262
|
}
|
|
14946
15263
|
} else if (!isBuiltInDirective(name)) {
|
|
14947
15264
|
runtimeDirectives.push(prop);
|
|
14948
|
-
if (hasChildren)
|
|
15265
|
+
if (hasChildren) {
|
|
15266
|
+
shouldUseBlock = true;
|
|
15267
|
+
isBlockRequired = true;
|
|
15268
|
+
}
|
|
14949
15269
|
}
|
|
14950
15270
|
}
|
|
14951
15271
|
}
|
|
@@ -14962,7 +15282,8 @@ var Vue = (function() {
|
|
|
14962
15282
|
if (dynamicPropNames.length) patchFlag |= 8;
|
|
14963
15283
|
if (hasHydrationEventBinding) patchFlag |= 32;
|
|
14964
15284
|
}
|
|
14965
|
-
|
|
15285
|
+
const needsPatch = (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0);
|
|
15286
|
+
if (!shouldUseBlock && needsPatch) patchFlag |= 512;
|
|
14966
15287
|
if (!context.inSSR && propsExpression) switch (propsExpression.type) {
|
|
14967
15288
|
case 15:
|
|
14968
15289
|
let classKeyIndex = -1;
|
|
@@ -14983,16 +15304,16 @@ var Vue = (function() {
|
|
|
14983
15304
|
} else propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]);
|
|
14984
15305
|
break;
|
|
14985
15306
|
case 14: break;
|
|
14986
|
-
default:
|
|
14987
|
-
propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [propsExpression])]);
|
|
14988
|
-
break;
|
|
15307
|
+
default: propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [propsExpression])]);
|
|
14989
15308
|
}
|
|
14990
15309
|
return {
|
|
14991
15310
|
props: propsExpression,
|
|
14992
15311
|
directives: runtimeDirectives,
|
|
14993
15312
|
patchFlag,
|
|
14994
15313
|
dynamicPropNames,
|
|
14995
|
-
shouldUseBlock
|
|
15314
|
+
shouldUseBlock,
|
|
15315
|
+
needsPatch,
|
|
15316
|
+
isBlockRequired
|
|
14996
15317
|
};
|
|
14997
15318
|
}
|
|
14998
15319
|
function dedupeProperties(properties) {
|
|
@@ -15089,10 +15410,12 @@ var Vue = (function() {
|
|
|
15089
15410
|
for (let i = 0; i < node.props.length; i++) {
|
|
15090
15411
|
const p = node.props[i];
|
|
15091
15412
|
if (p.type === 6) {
|
|
15092
|
-
if (p.value)
|
|
15093
|
-
|
|
15094
|
-
|
|
15095
|
-
|
|
15413
|
+
if (p.value) {
|
|
15414
|
+
if (p.name === "name") slotName = JSON.stringify(p.value.content);
|
|
15415
|
+
else {
|
|
15416
|
+
p.name = camelize(p.name);
|
|
15417
|
+
nonNameProps.push(p);
|
|
15418
|
+
}
|
|
15096
15419
|
}
|
|
15097
15420
|
} else if (p.name === "bind" && isStaticArgOf(p.arg, "name")) {
|
|
15098
15421
|
if (p.exp) slotName = p.exp;
|
|
@@ -15118,17 +15441,18 @@ var Vue = (function() {
|
|
|
15118
15441
|
const { loc, modifiers, arg } = dir;
|
|
15119
15442
|
if (!dir.exp && !modifiers.length) context.onError(createCompilerError(35, loc));
|
|
15120
15443
|
let eventName;
|
|
15121
|
-
if (arg.type === 4)
|
|
15122
|
-
|
|
15123
|
-
|
|
15124
|
-
|
|
15125
|
-
|
|
15126
|
-
|
|
15127
|
-
|
|
15128
|
-
|
|
15129
|
-
|
|
15130
|
-
|
|
15131
|
-
|
|
15444
|
+
if (arg.type === 4) {
|
|
15445
|
+
if (arg.isStatic) {
|
|
15446
|
+
let rawName = arg.content;
|
|
15447
|
+
if (rawName.startsWith("vnode")) context.onError(createCompilerError(52, arg.loc));
|
|
15448
|
+
if (rawName.startsWith("vue:")) rawName = `vnode-${rawName.slice(4)}`;
|
|
15449
|
+
eventName = createSimpleExpression(node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? toHandlerKey(camelize(rawName)) : `on:${rawName}`, true, arg.loc);
|
|
15450
|
+
} else eventName = createCompoundExpression([
|
|
15451
|
+
`${context.helperString(TO_HANDLER_KEY)}(`,
|
|
15452
|
+
arg,
|
|
15453
|
+
`)`
|
|
15454
|
+
]);
|
|
15455
|
+
} else {
|
|
15132
15456
|
eventName = arg;
|
|
15133
15457
|
eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`);
|
|
15134
15458
|
eventName.children.push(`)`);
|
|
@@ -15164,11 +15488,14 @@ var Vue = (function() {
|
|
|
15164
15488
|
arg.children.unshift(`(`);
|
|
15165
15489
|
arg.children.push(`) || ""`);
|
|
15166
15490
|
} else if (!arg.isStatic) arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
15167
|
-
if (modifiers.some((mod) => mod.content === "camel"))
|
|
15168
|
-
|
|
15169
|
-
|
|
15170
|
-
|
|
15171
|
-
|
|
15491
|
+
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
15492
|
+
if (arg.type === 4) {
|
|
15493
|
+
if (arg.isStatic) arg.content = camelize(arg.content);
|
|
15494
|
+
else arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
15495
|
+
} else {
|
|
15496
|
+
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
15497
|
+
arg.children.push(`)`);
|
|
15498
|
+
}
|
|
15172
15499
|
}
|
|
15173
15500
|
if (!context.inSSR) {
|
|
15174
15501
|
if (modifiers.some((mod) => mod.content === "prop")) injectPrefix(arg, ".");
|
|
@@ -15177,9 +15504,10 @@ var Vue = (function() {
|
|
|
15177
15504
|
return { props: [createObjectProperty(arg, exp)] };
|
|
15178
15505
|
};
|
|
15179
15506
|
const injectPrefix = (arg, prefix) => {
|
|
15180
|
-
if (arg.type === 4)
|
|
15181
|
-
|
|
15182
|
-
|
|
15507
|
+
if (arg.type === 4) {
|
|
15508
|
+
if (arg.isStatic) arg.content = prefix + arg.content;
|
|
15509
|
+
else arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
15510
|
+
} else {
|
|
15183
15511
|
arg.children.unshift(`'${prefix}' + (`);
|
|
15184
15512
|
arg.children.push(`)`);
|
|
15185
15513
|
}
|
|
@@ -15326,11 +15654,12 @@ var Vue = (function() {
|
|
|
15326
15654
|
if (c === 96 && prev !== 92) inTemplateString = false;
|
|
15327
15655
|
} else if (inRegex) {
|
|
15328
15656
|
if (c === 47 && prev !== 92) inRegex = false;
|
|
15329
|
-
} else if (c === 124 && exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren)
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
|
|
15657
|
+
} else if (c === 124 && exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) {
|
|
15658
|
+
if (expression === void 0) {
|
|
15659
|
+
lastFilterIndex = i + 1;
|
|
15660
|
+
expression = exp.slice(0, i).trim();
|
|
15661
|
+
} else pushFilter();
|
|
15662
|
+
} else {
|
|
15334
15663
|
switch (c) {
|
|
15335
15664
|
case 34:
|
|
15336
15665
|
inDouble = true;
|
|
@@ -15356,9 +15685,7 @@ var Vue = (function() {
|
|
|
15356
15685
|
case 123:
|
|
15357
15686
|
curly++;
|
|
15358
15687
|
break;
|
|
15359
|
-
case 125:
|
|
15360
|
-
curly--;
|
|
15361
|
-
break;
|
|
15688
|
+
case 125: curly--;
|
|
15362
15689
|
}
|
|
15363
15690
|
if (c === 47) {
|
|
15364
15691
|
let j = i - 1;
|
|
@@ -15634,9 +15961,7 @@ var Vue = (function() {
|
|
|
15634
15961
|
isInvalidType = true;
|
|
15635
15962
|
context.onError(createDOMCompilerError(60, dir.loc));
|
|
15636
15963
|
break;
|
|
15637
|
-
default:
|
|
15638
|
-
checkDuplicatedValue();
|
|
15639
|
-
break;
|
|
15964
|
+
default: checkDuplicatedValue();
|
|
15640
15965
|
}
|
|
15641
15966
|
} else if (hasDynamicKeyVBind(node)) directiveToUse = V_MODEL_DYNAMIC;
|
|
15642
15967
|
else checkDuplicatedValue();
|
|
@@ -15649,27 +15974,37 @@ var Vue = (function() {
|
|
|
15649
15974
|
};
|
|
15650
15975
|
//#endregion
|
|
15651
15976
|
//#region packages/compiler-dom/src/transforms/vOn.ts
|
|
15652
|
-
const isEventOptionModifier =
|
|
15653
|
-
const isNonKeyModifier =
|
|
15654
|
-
const maybeKeyModifier =
|
|
15655
|
-
const isKeyboardEvent =
|
|
15977
|
+
const isEventOptionModifier = /*@__PURE__*/ makeMap(`passive,once,capture`);
|
|
15978
|
+
const isNonKeyModifier = /*@__PURE__*/ makeMap("stop,prevent,self,ctrl,shift,alt,meta,exact,middle");
|
|
15979
|
+
const maybeKeyModifier = /*@__PURE__*/ makeMap("left,right");
|
|
15980
|
+
const isKeyboardEvent = /*@__PURE__*/ makeMap(`onkeyup,onkeydown,onkeypress`);
|
|
15656
15981
|
const resolveModifiers = (key, modifiers, context, loc) => {
|
|
15657
15982
|
const keyModifiers = [];
|
|
15658
15983
|
const nonKeyModifiers = [];
|
|
15659
15984
|
const eventOptionModifiers = [];
|
|
15660
15985
|
for (let i = 0; i < modifiers.length; i++) {
|
|
15661
15986
|
const modifier = modifiers[i].content;
|
|
15987
|
+
if (modifier === "delegate") {
|
|
15988
|
+
if (context) {
|
|
15989
|
+
const error = /* @__PURE__ */ new SyntaxError(`.delegate modifier is only supported in Vapor components.`);
|
|
15990
|
+
error.loc = modifiers[i].loc;
|
|
15991
|
+
context.onWarn(error);
|
|
15992
|
+
}
|
|
15993
|
+
continue;
|
|
15994
|
+
}
|
|
15662
15995
|
if (modifier === "native" && context && checkCompatEnabled("COMPILER_V_ON_NATIVE", context, loc)) eventOptionModifiers.push(modifier);
|
|
15663
15996
|
else if (isEventOptionModifier(modifier)) eventOptionModifiers.push(modifier);
|
|
15664
15997
|
else {
|
|
15665
15998
|
const keyString = isString(key) ? key : isStaticExp(key) ? key.content : null;
|
|
15666
|
-
if (maybeKeyModifier(modifier))
|
|
15667
|
-
|
|
15668
|
-
|
|
15669
|
-
|
|
15670
|
-
|
|
15671
|
-
|
|
15672
|
-
|
|
15999
|
+
if (maybeKeyModifier(modifier)) {
|
|
16000
|
+
if (keyString) {
|
|
16001
|
+
if (isKeyboardEvent(keyString.toLowerCase())) keyModifiers.push(modifier);
|
|
16002
|
+
else nonKeyModifiers.push(modifier);
|
|
16003
|
+
} else {
|
|
16004
|
+
keyModifiers.push(modifier);
|
|
16005
|
+
nonKeyModifiers.push(modifier);
|
|
16006
|
+
}
|
|
16007
|
+
} else if (isNonKeyModifier(modifier)) nonKeyModifiers.push(modifier);
|
|
15673
16008
|
else keyModifiers.push(modifier);
|
|
15674
16009
|
}
|
|
15675
16010
|
}
|
|
@@ -15784,7 +16119,7 @@ var Vue = (function() {
|
|
|
15784
16119
|
}
|
|
15785
16120
|
return true;
|
|
15786
16121
|
}
|
|
15787
|
-
const headings = new Set([
|
|
16122
|
+
const headings = /* @__PURE__ */ new Set([
|
|
15788
16123
|
"h1",
|
|
15789
16124
|
"h2",
|
|
15790
16125
|
"h3",
|
|
@@ -15796,7 +16131,7 @@ var Vue = (function() {
|
|
|
15796
16131
|
/**
|
|
15797
16132
|
* maps element to set of elements that can be it's children, no other */
|
|
15798
16133
|
const onlyValidChildren = {
|
|
15799
|
-
head: new Set([
|
|
16134
|
+
head: /* @__PURE__ */ new Set([
|
|
15800
16135
|
"base",
|
|
15801
16136
|
"basefront",
|
|
15802
16137
|
"bgsound",
|
|
@@ -15809,24 +16144,24 @@ var Vue = (function() {
|
|
|
15809
16144
|
"script",
|
|
15810
16145
|
"template"
|
|
15811
16146
|
]),
|
|
15812
|
-
optgroup: new Set(["option"]),
|
|
15813
|
-
select: new Set([
|
|
16147
|
+
optgroup: /* @__PURE__ */ new Set(["option"]),
|
|
16148
|
+
select: /* @__PURE__ */ new Set([
|
|
15814
16149
|
"optgroup",
|
|
15815
16150
|
"option",
|
|
15816
16151
|
"hr"
|
|
15817
16152
|
]),
|
|
15818
|
-
table: new Set([
|
|
16153
|
+
table: /* @__PURE__ */ new Set([
|
|
15819
16154
|
"caption",
|
|
15820
16155
|
"colgroup",
|
|
15821
16156
|
"tbody",
|
|
15822
16157
|
"tfoot",
|
|
15823
16158
|
"thead"
|
|
15824
16159
|
]),
|
|
15825
|
-
tr: new Set(["td", "th"]),
|
|
15826
|
-
colgroup: new Set(["col"]),
|
|
15827
|
-
tbody: new Set(["tr"]),
|
|
15828
|
-
thead: new Set(["tr"]),
|
|
15829
|
-
tfoot: new Set(["tr"]),
|
|
16160
|
+
tr: /* @__PURE__ */ new Set(["td", "th"]),
|
|
16161
|
+
colgroup: /* @__PURE__ */ new Set(["col"]),
|
|
16162
|
+
tbody: /* @__PURE__ */ new Set(["tr"]),
|
|
16163
|
+
thead: /* @__PURE__ */ new Set(["tr"]),
|
|
16164
|
+
tfoot: /* @__PURE__ */ new Set(["tr"]),
|
|
15830
16165
|
script: emptySet,
|
|
15831
16166
|
iframe: emptySet,
|
|
15832
16167
|
option: emptySet,
|
|
@@ -15837,30 +16172,30 @@ var Vue = (function() {
|
|
|
15837
16172
|
/** maps elements to set of elements which can be it's parent, no other */
|
|
15838
16173
|
const onlyValidParents = {
|
|
15839
16174
|
html: emptySet,
|
|
15840
|
-
body: new Set(["html"]),
|
|
15841
|
-
head: new Set(["html"]),
|
|
15842
|
-
td: new Set(["tr"]),
|
|
15843
|
-
colgroup: new Set(["table"]),
|
|
15844
|
-
caption: new Set(["table"]),
|
|
15845
|
-
tbody: new Set(["table"]),
|
|
15846
|
-
tfoot: new Set(["table"]),
|
|
15847
|
-
col: new Set(["colgroup"]),
|
|
15848
|
-
th: new Set(["tr"]),
|
|
15849
|
-
thead: new Set(["table"]),
|
|
15850
|
-
tr: new Set([
|
|
16175
|
+
body: /* @__PURE__ */ new Set(["html"]),
|
|
16176
|
+
head: /* @__PURE__ */ new Set(["html"]),
|
|
16177
|
+
td: /* @__PURE__ */ new Set(["tr"]),
|
|
16178
|
+
colgroup: /* @__PURE__ */ new Set(["table"]),
|
|
16179
|
+
caption: /* @__PURE__ */ new Set(["table"]),
|
|
16180
|
+
tbody: /* @__PURE__ */ new Set(["table"]),
|
|
16181
|
+
tfoot: /* @__PURE__ */ new Set(["table"]),
|
|
16182
|
+
col: /* @__PURE__ */ new Set(["colgroup"]),
|
|
16183
|
+
th: /* @__PURE__ */ new Set(["tr"]),
|
|
16184
|
+
thead: /* @__PURE__ */ new Set(["table"]),
|
|
16185
|
+
tr: /* @__PURE__ */ new Set([
|
|
15851
16186
|
"tbody",
|
|
15852
16187
|
"thead",
|
|
15853
16188
|
"tfoot"
|
|
15854
16189
|
]),
|
|
15855
|
-
dd: new Set(["dl", "div"]),
|
|
15856
|
-
dt: new Set(["dl", "div"]),
|
|
15857
|
-
figcaption: new Set(["figure"]),
|
|
15858
|
-
summary: new Set(["details"]),
|
|
15859
|
-
area: new Set(["map"])
|
|
16190
|
+
dd: /* @__PURE__ */ new Set(["dl", "div"]),
|
|
16191
|
+
dt: /* @__PURE__ */ new Set(["dl", "div"]),
|
|
16192
|
+
figcaption: /* @__PURE__ */ new Set(["figure"]),
|
|
16193
|
+
summary: /* @__PURE__ */ new Set(["details"]),
|
|
16194
|
+
area: /* @__PURE__ */ new Set(["map"])
|
|
15860
16195
|
};
|
|
15861
16196
|
/** maps element to set of elements that can not be it's children, others can */
|
|
15862
16197
|
const knownInvalidChildren = {
|
|
15863
|
-
p: new Set([
|
|
16198
|
+
p: /* @__PURE__ */ new Set([
|
|
15864
16199
|
"address",
|
|
15865
16200
|
"article",
|
|
15866
16201
|
"aside",
|
|
@@ -15895,7 +16230,7 @@ var Vue = (function() {
|
|
|
15895
16230
|
"table",
|
|
15896
16231
|
"ul"
|
|
15897
16232
|
]),
|
|
15898
|
-
svg: new Set([
|
|
16233
|
+
svg: /* @__PURE__ */ new Set([
|
|
15899
16234
|
"b",
|
|
15900
16235
|
"blockquote",
|
|
15901
16236
|
"br",
|
|
@@ -15936,12 +16271,12 @@ var Vue = (function() {
|
|
|
15936
16271
|
};
|
|
15937
16272
|
/** maps element to set of elements that can not be it's parent, others can */
|
|
15938
16273
|
const knownInvalidParents = {
|
|
15939
|
-
a: new Set(["a"]),
|
|
15940
|
-
button: new Set(["button"]),
|
|
15941
|
-
dd: new Set(["dd", "dt"]),
|
|
15942
|
-
dt: new Set(["dd", "dt"]),
|
|
15943
|
-
form: new Set(["form"]),
|
|
15944
|
-
li: new Set(["li"]),
|
|
16274
|
+
a: /* @__PURE__ */ new Set(["a"]),
|
|
16275
|
+
button: /* @__PURE__ */ new Set(["button"]),
|
|
16276
|
+
dd: /* @__PURE__ */ new Set(["dd", "dt"]),
|
|
16277
|
+
dt: /* @__PURE__ */ new Set(["dd", "dt"]),
|
|
16278
|
+
form: /* @__PURE__ */ new Set(["form"]),
|
|
16279
|
+
li: /* @__PURE__ */ new Set(["li"]),
|
|
15945
16280
|
h1: headings,
|
|
15946
16281
|
h2: headings,
|
|
15947
16282
|
h3: headings,
|
|
@@ -15984,10 +16319,12 @@ var Vue = (function() {
|
|
|
15984
16319
|
//#region packages/vue-compat/src/index.ts
|
|
15985
16320
|
const compileCache = Object.create(null);
|
|
15986
16321
|
function compileToFunction(template, options) {
|
|
15987
|
-
if (!isString(template))
|
|
15988
|
-
|
|
15989
|
-
|
|
15990
|
-
|
|
16322
|
+
if (!isString(template)) {
|
|
16323
|
+
if (template.nodeType) template = template.innerHTML;
|
|
16324
|
+
else {
|
|
16325
|
+
warn(`invalid template option: `, template);
|
|
16326
|
+
return NOOP;
|
|
16327
|
+
}
|
|
15991
16328
|
}
|
|
15992
16329
|
const key = genCacheKey(template, options);
|
|
15993
16330
|
const cached = compileCache[key];
|