@structured-field/widget-editor 0.1.0 → 1.0.1
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.
|
@@ -46,8 +46,8 @@ function makeMap(str) {
|
|
|
46
46
|
return (val) => val in map;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
const EMPTY_OBJ =
|
|
50
|
-
const EMPTY_ARR =
|
|
49
|
+
const EMPTY_OBJ = {};
|
|
50
|
+
const EMPTY_ARR = [];
|
|
51
51
|
const NOOP = () => {
|
|
52
52
|
};
|
|
53
53
|
const NO = () => false;
|
|
@@ -85,9 +85,6 @@ const isReservedProp = /* @__PURE__ */ makeMap(
|
|
|
85
85
|
// the leading comma is intentional so empty string "" is also included
|
|
86
86
|
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
|
|
87
87
|
);
|
|
88
|
-
const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
89
|
-
"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
|
|
90
|
-
);
|
|
91
88
|
const cacheStringFunction = (fn) => {
|
|
92
89
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
93
90
|
return ((str) => {
|
|
@@ -188,13 +185,6 @@ function normalizeClass(value) {
|
|
|
188
185
|
return res.trim();
|
|
189
186
|
}
|
|
190
187
|
|
|
191
|
-
const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
|
|
192
|
-
const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
|
|
193
|
-
const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
|
|
194
|
-
const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
|
|
195
|
-
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
196
|
-
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
197
|
-
|
|
198
188
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
199
189
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
200
190
|
function includeBooleanAttr(value) {
|
|
@@ -293,10 +283,6 @@ const stringifySymbol = (v, i = "") => {
|
|
|
293
283
|
* @license MIT
|
|
294
284
|
**/
|
|
295
285
|
|
|
296
|
-
function warn$2(msg, ...args) {
|
|
297
|
-
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
286
|
let activeEffectScope;
|
|
301
287
|
class EffectScope {
|
|
302
288
|
// TODO isolatedDeclarations "__v_skip"
|
|
@@ -372,8 +358,6 @@ class EffectScope {
|
|
|
372
358
|
} finally {
|
|
373
359
|
activeEffectScope = currentEffectScope;
|
|
374
360
|
}
|
|
375
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
376
|
-
warn$2(`cannot run an inactive effect scope.`);
|
|
377
361
|
}
|
|
378
362
|
}
|
|
379
363
|
/**
|
|
@@ -496,11 +480,6 @@ class ReactiveEffect {
|
|
|
496
480
|
try {
|
|
497
481
|
return this.fn();
|
|
498
482
|
} finally {
|
|
499
|
-
if (!!(process.env.NODE_ENV !== "production") && activeSub !== this) {
|
|
500
|
-
warn$2(
|
|
501
|
-
"Active effect was not restored correctly - this is likely a Vue internal bug."
|
|
502
|
-
);
|
|
503
|
-
}
|
|
504
483
|
cleanupDeps(this);
|
|
505
484
|
activeSub = prevEffect;
|
|
506
485
|
shouldTrack = prevShouldTrack;
|
|
@@ -674,9 +653,6 @@ function removeSub(link, soft = false) {
|
|
|
674
653
|
nextSub.prevSub = prevSub;
|
|
675
654
|
link.nextSub = void 0;
|
|
676
655
|
}
|
|
677
|
-
if (!!(process.env.NODE_ENV !== "production") && dep.subsHead === link) {
|
|
678
|
-
dep.subsHead = nextSub;
|
|
679
|
-
}
|
|
680
656
|
if (dep.subs === link) {
|
|
681
657
|
dep.subs = prevSub;
|
|
682
658
|
if (!prevSub && dep.computed) {
|
|
@@ -760,9 +736,6 @@ class Dep {
|
|
|
760
736
|
* @internal
|
|
761
737
|
*/
|
|
762
738
|
this.__v_skip = true;
|
|
763
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
764
|
-
this.subsHead = void 0;
|
|
765
|
-
}
|
|
766
739
|
}
|
|
767
740
|
track(debugInfo) {
|
|
768
741
|
if (!activeSub || !shouldTrack || activeSub === this.computed) {
|
|
@@ -796,16 +769,6 @@ class Dep {
|
|
|
796
769
|
}
|
|
797
770
|
}
|
|
798
771
|
}
|
|
799
|
-
if (!!(process.env.NODE_ENV !== "production") && activeSub.onTrack) {
|
|
800
|
-
activeSub.onTrack(
|
|
801
|
-
extend(
|
|
802
|
-
{
|
|
803
|
-
effect: activeSub
|
|
804
|
-
},
|
|
805
|
-
debugInfo
|
|
806
|
-
)
|
|
807
|
-
);
|
|
808
|
-
}
|
|
809
772
|
return link;
|
|
810
773
|
}
|
|
811
774
|
trigger(debugInfo) {
|
|
@@ -816,20 +779,7 @@ class Dep {
|
|
|
816
779
|
notify(debugInfo) {
|
|
817
780
|
startBatch();
|
|
818
781
|
try {
|
|
819
|
-
if (!!(
|
|
820
|
-
for (let head = this.subsHead; head; head = head.nextSub) {
|
|
821
|
-
if (head.sub.onTrigger && !(head.sub.flags & 8)) {
|
|
822
|
-
head.sub.onTrigger(
|
|
823
|
-
extend(
|
|
824
|
-
{
|
|
825
|
-
effect: head.sub
|
|
826
|
-
},
|
|
827
|
-
debugInfo
|
|
828
|
-
)
|
|
829
|
-
);
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
}
|
|
782
|
+
if (!!("production" !== "production")) ;
|
|
833
783
|
for (let link = this.subs; link; link = link.prevSub) {
|
|
834
784
|
if (link.sub.notify()) {
|
|
835
785
|
;
|
|
@@ -856,21 +806,18 @@ function addSub(link) {
|
|
|
856
806
|
link.prevSub = currentTail;
|
|
857
807
|
if (currentTail) currentTail.nextSub = link;
|
|
858
808
|
}
|
|
859
|
-
if (!!(process.env.NODE_ENV !== "production") && link.dep.subsHead === void 0) {
|
|
860
|
-
link.dep.subsHead = link;
|
|
861
|
-
}
|
|
862
809
|
link.dep.subs = link;
|
|
863
810
|
}
|
|
864
811
|
}
|
|
865
812
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
866
813
|
const ITERATE_KEY = /* @__PURE__ */ Symbol(
|
|
867
|
-
|
|
814
|
+
""
|
|
868
815
|
);
|
|
869
816
|
const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
|
|
870
|
-
|
|
817
|
+
""
|
|
871
818
|
);
|
|
872
819
|
const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
|
|
873
|
-
|
|
820
|
+
""
|
|
874
821
|
);
|
|
875
822
|
function track(target, type, key) {
|
|
876
823
|
if (shouldTrack && activeSub) {
|
|
@@ -884,13 +831,7 @@ function track(target, type, key) {
|
|
|
884
831
|
dep.map = depsMap;
|
|
885
832
|
dep.key = key;
|
|
886
833
|
}
|
|
887
|
-
|
|
888
|
-
dep.track({
|
|
889
|
-
target,
|
|
890
|
-
type,
|
|
891
|
-
key
|
|
892
|
-
});
|
|
893
|
-
} else {
|
|
834
|
+
{
|
|
894
835
|
dep.track();
|
|
895
836
|
}
|
|
896
837
|
}
|
|
@@ -903,16 +844,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
903
844
|
}
|
|
904
845
|
const run = (dep) => {
|
|
905
846
|
if (dep) {
|
|
906
|
-
|
|
907
|
-
dep.trigger({
|
|
908
|
-
target,
|
|
909
|
-
type,
|
|
910
|
-
key,
|
|
911
|
-
newValue,
|
|
912
|
-
oldValue,
|
|
913
|
-
oldTarget
|
|
914
|
-
});
|
|
915
|
-
} else {
|
|
847
|
+
{
|
|
916
848
|
dep.trigger();
|
|
917
849
|
}
|
|
918
850
|
}
|
|
@@ -1262,12 +1194,6 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1262
1194
|
}
|
|
1263
1195
|
if (!isArrayWithIntegerKey && isRef(oldValue) && !isRef(value)) {
|
|
1264
1196
|
if (isOldValueReadonly) {
|
|
1265
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
1266
|
-
warn$2(
|
|
1267
|
-
`Set operation on key "${String(key)}" failed: target is readonly.`,
|
|
1268
|
-
target[key]
|
|
1269
|
-
);
|
|
1270
|
-
}
|
|
1271
1197
|
return true;
|
|
1272
1198
|
} else {
|
|
1273
1199
|
oldValue.value = value;
|
|
@@ -1286,17 +1212,17 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
1286
1212
|
if (!hadKey) {
|
|
1287
1213
|
trigger(target, "add", key, value);
|
|
1288
1214
|
} else if (hasChanged(value, oldValue)) {
|
|
1289
|
-
trigger(target, "set", key, value
|
|
1215
|
+
trigger(target, "set", key, value);
|
|
1290
1216
|
}
|
|
1291
1217
|
}
|
|
1292
1218
|
return result;
|
|
1293
1219
|
}
|
|
1294
1220
|
deleteProperty(target, key) {
|
|
1295
1221
|
const hadKey = hasOwn(target, key);
|
|
1296
|
-
|
|
1222
|
+
target[key];
|
|
1297
1223
|
const result = Reflect.deleteProperty(target, key);
|
|
1298
1224
|
if (result && hadKey) {
|
|
1299
|
-
trigger(target, "delete", key, void 0
|
|
1225
|
+
trigger(target, "delete", key, void 0);
|
|
1300
1226
|
}
|
|
1301
1227
|
return result;
|
|
1302
1228
|
}
|
|
@@ -1321,21 +1247,9 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
|
1321
1247
|
super(true, isShallow2);
|
|
1322
1248
|
}
|
|
1323
1249
|
set(target, key) {
|
|
1324
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
1325
|
-
warn$2(
|
|
1326
|
-
`Set operation on key "${String(key)}" failed: target is readonly.`,
|
|
1327
|
-
target
|
|
1328
|
-
);
|
|
1329
|
-
}
|
|
1330
1250
|
return true;
|
|
1331
1251
|
}
|
|
1332
1252
|
deleteProperty(target, key) {
|
|
1333
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
1334
|
-
warn$2(
|
|
1335
|
-
`Delete operation on key "${String(key)}" failed: target is readonly.`,
|
|
1336
|
-
target
|
|
1337
|
-
);
|
|
1338
|
-
}
|
|
1339
1253
|
return true;
|
|
1340
1254
|
}
|
|
1341
1255
|
}
|
|
@@ -1378,13 +1292,6 @@ function createIterableMethod(method, isReadonly2, isShallow2) {
|
|
|
1378
1292
|
}
|
|
1379
1293
|
function createReadonlyMethod(type) {
|
|
1380
1294
|
return function(...args) {
|
|
1381
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
1382
|
-
const key = args[0] ? `on key "${args[0]}" ` : ``;
|
|
1383
|
-
warn$2(
|
|
1384
|
-
`${capitalize(type)} operation ${key}failed: target is readonly.`,
|
|
1385
|
-
toRaw(this)
|
|
1386
|
-
);
|
|
1387
|
-
}
|
|
1388
1295
|
return type === "delete" ? false : type === "clear" ? void 0 : this;
|
|
1389
1296
|
};
|
|
1390
1297
|
}
|
|
@@ -1468,15 +1375,13 @@ function createInstrumentations(readonly, shallow) {
|
|
|
1468
1375
|
if (!hadKey) {
|
|
1469
1376
|
key = toRaw(key);
|
|
1470
1377
|
hadKey = has.call(target, key);
|
|
1471
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
1472
|
-
checkIdentityKeys(target, has, key);
|
|
1473
1378
|
}
|
|
1474
1379
|
const oldValue = get.call(target, key);
|
|
1475
1380
|
target.set(key, value);
|
|
1476
1381
|
if (!hadKey) {
|
|
1477
1382
|
trigger(target, "add", key, value);
|
|
1478
1383
|
} else if (hasChanged(value, oldValue)) {
|
|
1479
|
-
trigger(target, "set", key, value
|
|
1384
|
+
trigger(target, "set", key, value);
|
|
1480
1385
|
}
|
|
1481
1386
|
return this;
|
|
1482
1387
|
},
|
|
@@ -1487,29 +1392,24 @@ function createInstrumentations(readonly, shallow) {
|
|
|
1487
1392
|
if (!hadKey) {
|
|
1488
1393
|
key = toRaw(key);
|
|
1489
1394
|
hadKey = has.call(target, key);
|
|
1490
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
1491
|
-
checkIdentityKeys(target, has, key);
|
|
1492
1395
|
}
|
|
1493
|
-
|
|
1396
|
+
get ? get.call(target, key) : void 0;
|
|
1494
1397
|
const result = target.delete(key);
|
|
1495
1398
|
if (hadKey) {
|
|
1496
|
-
trigger(target, "delete", key, void 0
|
|
1399
|
+
trigger(target, "delete", key, void 0);
|
|
1497
1400
|
}
|
|
1498
1401
|
return result;
|
|
1499
1402
|
},
|
|
1500
1403
|
clear() {
|
|
1501
1404
|
const target = toRaw(this);
|
|
1502
1405
|
const hadItems = target.size !== 0;
|
|
1503
|
-
const oldTarget = !!(process.env.NODE_ENV !== "production") ? isMap(target) ? new Map(target) : new Set(target) : void 0;
|
|
1504
1406
|
const result = target.clear();
|
|
1505
1407
|
if (hadItems) {
|
|
1506
1408
|
trigger(
|
|
1507
1409
|
target,
|
|
1508
1410
|
"clear",
|
|
1509
1411
|
void 0,
|
|
1510
|
-
void 0
|
|
1511
|
-
oldTarget
|
|
1512
|
-
);
|
|
1412
|
+
void 0);
|
|
1513
1413
|
}
|
|
1514
1414
|
return result;
|
|
1515
1415
|
}
|
|
@@ -1555,15 +1455,6 @@ const readonlyCollectionHandlers = {
|
|
|
1555
1455
|
const shallowReadonlyCollectionHandlers = {
|
|
1556
1456
|
get: /* @__PURE__ */ createInstrumentationGetter(true, true)
|
|
1557
1457
|
};
|
|
1558
|
-
function checkIdentityKeys(target, has, key) {
|
|
1559
|
-
const rawKey = toRaw(key);
|
|
1560
|
-
if (rawKey !== key && has.call(target, rawKey)) {
|
|
1561
|
-
const type = toRawType(target);
|
|
1562
|
-
warn$2(
|
|
1563
|
-
`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
|
|
1564
|
-
);
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
1458
|
|
|
1568
1459
|
const reactiveMap = /* @__PURE__ */ new WeakMap();
|
|
1569
1460
|
const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -1631,13 +1522,6 @@ function shallowReadonly(target) {
|
|
|
1631
1522
|
}
|
|
1632
1523
|
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
|
|
1633
1524
|
if (!isObject(target)) {
|
|
1634
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
1635
|
-
warn$2(
|
|
1636
|
-
`value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(
|
|
1637
|
-
target
|
|
1638
|
-
)}`
|
|
1639
|
-
);
|
|
1640
|
-
}
|
|
1641
1525
|
return target;
|
|
1642
1526
|
}
|
|
1643
1527
|
if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
|
|
@@ -1715,13 +1599,7 @@ class RefImpl {
|
|
|
1715
1599
|
this["__v_isShallow"] = isShallow2;
|
|
1716
1600
|
}
|
|
1717
1601
|
get value() {
|
|
1718
|
-
|
|
1719
|
-
this.dep.track({
|
|
1720
|
-
target: this,
|
|
1721
|
-
type: "get",
|
|
1722
|
-
key: "value"
|
|
1723
|
-
});
|
|
1724
|
-
} else {
|
|
1602
|
+
{
|
|
1725
1603
|
this.dep.track();
|
|
1726
1604
|
}
|
|
1727
1605
|
return this._value;
|
|
@@ -1733,15 +1611,7 @@ class RefImpl {
|
|
|
1733
1611
|
if (hasChanged(newValue, oldValue)) {
|
|
1734
1612
|
this._rawValue = newValue;
|
|
1735
1613
|
this._value = useDirectValue ? newValue : toReactive(newValue);
|
|
1736
|
-
|
|
1737
|
-
this.dep.trigger({
|
|
1738
|
-
target: this,
|
|
1739
|
-
type: "set",
|
|
1740
|
-
key: "value",
|
|
1741
|
-
newValue,
|
|
1742
|
-
oldValue
|
|
1743
|
-
});
|
|
1744
|
-
} else {
|
|
1614
|
+
{
|
|
1745
1615
|
this.dep.trigger();
|
|
1746
1616
|
}
|
|
1747
1617
|
}
|
|
@@ -1818,14 +1688,10 @@ class ComputedRefImpl {
|
|
|
1818
1688
|
activeSub !== this) {
|
|
1819
1689
|
batch(this, true);
|
|
1820
1690
|
return true;
|
|
1821
|
-
}
|
|
1691
|
+
}
|
|
1822
1692
|
}
|
|
1823
1693
|
get value() {
|
|
1824
|
-
const link =
|
|
1825
|
-
target: this,
|
|
1826
|
-
type: "get",
|
|
1827
|
-
key: "value"
|
|
1828
|
-
}) : this.dep.track();
|
|
1694
|
+
const link = this.dep.track();
|
|
1829
1695
|
refreshComputed(this);
|
|
1830
1696
|
if (link) {
|
|
1831
1697
|
link.version = this.dep.version;
|
|
@@ -1835,8 +1701,6 @@ class ComputedRefImpl {
|
|
|
1835
1701
|
set value(newValue) {
|
|
1836
1702
|
if (this.setter) {
|
|
1837
1703
|
this.setter(newValue);
|
|
1838
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
1839
|
-
warn$2("Write operation failed: computed value is readonly");
|
|
1840
1704
|
}
|
|
1841
1705
|
}
|
|
1842
1706
|
}
|
|
@@ -1851,7 +1715,6 @@ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1851
1715
|
setter = getterOrOptions.set;
|
|
1852
1716
|
}
|
|
1853
1717
|
const cRef = new ComputedRefImpl(getter, setter, isSSR);
|
|
1854
|
-
if (!!(process.env.NODE_ENV !== "production") && debugOptions) ;
|
|
1855
1718
|
return cRef;
|
|
1856
1719
|
}
|
|
1857
1720
|
const INITIAL_WATCHER_VALUE = {};
|
|
@@ -1862,21 +1725,10 @@ function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher
|
|
|
1862
1725
|
let cleanups = cleanupMap.get(owner);
|
|
1863
1726
|
if (!cleanups) cleanupMap.set(owner, cleanups = []);
|
|
1864
1727
|
cleanups.push(cleanupFn);
|
|
1865
|
-
} else if (!!(process.env.NODE_ENV !== "production") && !failSilently) {
|
|
1866
|
-
warn$2(
|
|
1867
|
-
`onWatcherCleanup() was called when there was no active watcher to associate with.`
|
|
1868
|
-
);
|
|
1869
1728
|
}
|
|
1870
1729
|
}
|
|
1871
1730
|
function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
1872
1731
|
const { immediate, deep, once, scheduler, augmentJob, call } = options;
|
|
1873
|
-
const warnInvalidSource = (s) => {
|
|
1874
|
-
(options.onWarn || warn$2)(
|
|
1875
|
-
`Invalid watch source: `,
|
|
1876
|
-
s,
|
|
1877
|
-
`A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
|
|
1878
|
-
);
|
|
1879
|
-
};
|
|
1880
1732
|
const reactiveGetter = (source2) => {
|
|
1881
1733
|
if (deep) return source2;
|
|
1882
1734
|
if (isShallow(source2) || deep === false || deep === 0)
|
|
@@ -1905,9 +1757,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
1905
1757
|
return reactiveGetter(s);
|
|
1906
1758
|
} else if (isFunction(s)) {
|
|
1907
1759
|
return call ? call(s, 2) : s();
|
|
1908
|
-
} else
|
|
1909
|
-
!!(process.env.NODE_ENV !== "production") && warnInvalidSource(s);
|
|
1910
|
-
}
|
|
1760
|
+
} else ;
|
|
1911
1761
|
});
|
|
1912
1762
|
} else if (isFunction(source)) {
|
|
1913
1763
|
if (cb) {
|
|
@@ -1933,7 +1783,6 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
1933
1783
|
}
|
|
1934
1784
|
} else {
|
|
1935
1785
|
getter = NOOP;
|
|
1936
|
-
!!(process.env.NODE_ENV !== "production") && warnInvalidSource(source);
|
|
1937
1786
|
}
|
|
1938
1787
|
if (cb && deep) {
|
|
1939
1788
|
const baseGetter = getter;
|
|
@@ -2004,10 +1853,6 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2004
1853
|
cleanupMap.delete(effect);
|
|
2005
1854
|
}
|
|
2006
1855
|
};
|
|
2007
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2008
|
-
effect.onTrack = options.onTrack;
|
|
2009
|
-
effect.onTrigger = options.onTrigger;
|
|
2010
|
-
}
|
|
2011
1856
|
if (cb) {
|
|
2012
1857
|
if (immediate) {
|
|
2013
1858
|
job(true);
|
|
@@ -2064,12 +1909,6 @@ function traverse(value, depth = Infinity, seen) {
|
|
|
2064
1909
|
**/
|
|
2065
1910
|
|
|
2066
1911
|
const stack = [];
|
|
2067
|
-
function pushWarningContext(vnode) {
|
|
2068
|
-
stack.push(vnode);
|
|
2069
|
-
}
|
|
2070
|
-
function popWarningContext() {
|
|
2071
|
-
stack.pop();
|
|
2072
|
-
}
|
|
2073
1912
|
let isWarning = false;
|
|
2074
1913
|
function warn$1(msg, ...args) {
|
|
2075
1914
|
if (isWarning) return;
|
|
@@ -2175,39 +2014,6 @@ function formatProp(key, value, raw) {
|
|
|
2175
2014
|
return raw ? value : [`${key}=`, value];
|
|
2176
2015
|
}
|
|
2177
2016
|
}
|
|
2178
|
-
const ErrorTypeStrings$1 = {
|
|
2179
|
-
["sp"]: "serverPrefetch hook",
|
|
2180
|
-
["bc"]: "beforeCreate hook",
|
|
2181
|
-
["c"]: "created hook",
|
|
2182
|
-
["bm"]: "beforeMount hook",
|
|
2183
|
-
["m"]: "mounted hook",
|
|
2184
|
-
["bu"]: "beforeUpdate hook",
|
|
2185
|
-
["u"]: "updated",
|
|
2186
|
-
["bum"]: "beforeUnmount hook",
|
|
2187
|
-
["um"]: "unmounted hook",
|
|
2188
|
-
["a"]: "activated hook",
|
|
2189
|
-
["da"]: "deactivated hook",
|
|
2190
|
-
["ec"]: "errorCaptured hook",
|
|
2191
|
-
["rtc"]: "renderTracked hook",
|
|
2192
|
-
["rtg"]: "renderTriggered hook",
|
|
2193
|
-
[0]: "setup function",
|
|
2194
|
-
[1]: "render function",
|
|
2195
|
-
[2]: "watcher getter",
|
|
2196
|
-
[3]: "watcher callback",
|
|
2197
|
-
[4]: "watcher cleanup function",
|
|
2198
|
-
[5]: "native event handler",
|
|
2199
|
-
[6]: "component event handler",
|
|
2200
|
-
[7]: "vnode hook",
|
|
2201
|
-
[8]: "directive hook",
|
|
2202
|
-
[9]: "transition hook",
|
|
2203
|
-
[10]: "app errorHandler",
|
|
2204
|
-
[11]: "app warnHandler",
|
|
2205
|
-
[12]: "ref function",
|
|
2206
|
-
[13]: "async component loader",
|
|
2207
|
-
[14]: "scheduler flush",
|
|
2208
|
-
[15]: "component update",
|
|
2209
|
-
[16]: "app unmount cleanup function"
|
|
2210
|
-
};
|
|
2211
2017
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
2212
2018
|
try {
|
|
2213
2019
|
return args ? fn(...args) : fn();
|
|
@@ -2231,10 +2037,6 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2231
2037
|
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
2232
2038
|
}
|
|
2233
2039
|
return values;
|
|
2234
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
2235
|
-
warn$1(
|
|
2236
|
-
`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
|
|
2237
|
-
);
|
|
2238
2040
|
}
|
|
2239
2041
|
}
|
|
2240
2042
|
function handleError(err, instance, type, throwInDev = true) {
|
|
@@ -2243,7 +2045,7 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
2243
2045
|
if (instance) {
|
|
2244
2046
|
let cur = instance.parent;
|
|
2245
2047
|
const exposedInstance = instance.proxy;
|
|
2246
|
-
const errorInfo =
|
|
2048
|
+
const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`;
|
|
2247
2049
|
while (cur) {
|
|
2248
2050
|
const errorCapturedHooks = cur.ec;
|
|
2249
2051
|
if (errorCapturedHooks) {
|
|
@@ -2269,21 +2071,7 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
2269
2071
|
logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
|
|
2270
2072
|
}
|
|
2271
2073
|
function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
|
|
2272
|
-
if (
|
|
2273
|
-
const info = ErrorTypeStrings$1[type];
|
|
2274
|
-
if (contextVNode) {
|
|
2275
|
-
pushWarningContext(contextVNode);
|
|
2276
|
-
}
|
|
2277
|
-
warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
2278
|
-
if (contextVNode) {
|
|
2279
|
-
popWarningContext();
|
|
2280
|
-
}
|
|
2281
|
-
if (throwInDev) {
|
|
2282
|
-
throw err;
|
|
2283
|
-
} else {
|
|
2284
|
-
console.error(err);
|
|
2285
|
-
}
|
|
2286
|
-
} else if (throwInProd) {
|
|
2074
|
+
if (throwInProd) {
|
|
2287
2075
|
throw err;
|
|
2288
2076
|
} else {
|
|
2289
2077
|
console.error(err);
|
|
@@ -2297,7 +2085,6 @@ let activePostFlushCbs = null;
|
|
|
2297
2085
|
let postFlushIndex = 0;
|
|
2298
2086
|
const resolvedPromise = /* @__PURE__ */ Promise.resolve();
|
|
2299
2087
|
let currentFlushPromise = null;
|
|
2300
|
-
const RECURSION_LIMIT = 100;
|
|
2301
2088
|
function nextTick(fn) {
|
|
2302
2089
|
const p = currentFlushPromise || resolvedPromise;
|
|
2303
2090
|
return fn ? p.then(this ? fn.bind(this) : fn) : p;
|
|
@@ -2350,18 +2137,12 @@ function queuePostFlushCb(cb) {
|
|
|
2350
2137
|
queueFlush();
|
|
2351
2138
|
}
|
|
2352
2139
|
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
2353
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2354
|
-
seen = seen || /* @__PURE__ */ new Map();
|
|
2355
|
-
}
|
|
2356
2140
|
for (; i < queue.length; i++) {
|
|
2357
2141
|
const cb = queue[i];
|
|
2358
2142
|
if (cb && cb.flags & 2) {
|
|
2359
2143
|
if (instance && cb.id !== instance.uid) {
|
|
2360
2144
|
continue;
|
|
2361
2145
|
}
|
|
2362
|
-
if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) {
|
|
2363
|
-
continue;
|
|
2364
|
-
}
|
|
2365
2146
|
queue.splice(i, 1);
|
|
2366
2147
|
i--;
|
|
2367
2148
|
if (cb.flags & 4) {
|
|
@@ -2385,14 +2166,8 @@ function flushPostFlushCbs(seen) {
|
|
|
2385
2166
|
return;
|
|
2386
2167
|
}
|
|
2387
2168
|
activePostFlushCbs = deduped;
|
|
2388
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2389
|
-
seen = seen || /* @__PURE__ */ new Map();
|
|
2390
|
-
}
|
|
2391
2169
|
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
2392
2170
|
const cb = activePostFlushCbs[postFlushIndex];
|
|
2393
|
-
if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) {
|
|
2394
|
-
continue;
|
|
2395
|
-
}
|
|
2396
2171
|
if (cb.flags & 4) {
|
|
2397
2172
|
cb.flags &= -2;
|
|
2398
2173
|
}
|
|
@@ -2405,17 +2180,12 @@ function flushPostFlushCbs(seen) {
|
|
|
2405
2180
|
}
|
|
2406
2181
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
2407
2182
|
function flushJobs(seen) {
|
|
2408
|
-
|
|
2409
|
-
seen = seen || /* @__PURE__ */ new Map();
|
|
2410
|
-
}
|
|
2411
|
-
const check = !!(process.env.NODE_ENV !== "production") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;
|
|
2183
|
+
const check = NOOP;
|
|
2412
2184
|
try {
|
|
2413
2185
|
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
2414
2186
|
const job = queue[flushIndex];
|
|
2415
2187
|
if (job && !(job.flags & 8)) {
|
|
2416
|
-
if (!!(
|
|
2417
|
-
continue;
|
|
2418
|
-
}
|
|
2188
|
+
if (!!("production" !== "production") && check(job)) ;
|
|
2419
2189
|
if (job.flags & 4) {
|
|
2420
2190
|
job.flags &= ~1;
|
|
2421
2191
|
}
|
|
@@ -2438,246 +2208,13 @@ function flushJobs(seen) {
|
|
|
2438
2208
|
}
|
|
2439
2209
|
flushIndex = -1;
|
|
2440
2210
|
queue.length = 0;
|
|
2441
|
-
flushPostFlushCbs(
|
|
2211
|
+
flushPostFlushCbs();
|
|
2442
2212
|
currentFlushPromise = null;
|
|
2443
2213
|
if (queue.length || pendingPostFlushCbs.length) {
|
|
2444
|
-
flushJobs(
|
|
2445
|
-
}
|
|
2446
|
-
}
|
|
2447
|
-
}
|
|
2448
|
-
function checkRecursiveUpdates(seen, fn) {
|
|
2449
|
-
const count = seen.get(fn) || 0;
|
|
2450
|
-
if (count > RECURSION_LIMIT) {
|
|
2451
|
-
const instance = fn.i;
|
|
2452
|
-
const componentName = instance && getComponentName(instance.type);
|
|
2453
|
-
handleError(
|
|
2454
|
-
`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
|
|
2455
|
-
null,
|
|
2456
|
-
10
|
|
2457
|
-
);
|
|
2458
|
-
return true;
|
|
2459
|
-
}
|
|
2460
|
-
seen.set(fn, count + 1);
|
|
2461
|
-
return false;
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
let isHmrUpdating = false;
|
|
2465
|
-
const hmrDirtyComponents = /* @__PURE__ */ new Map();
|
|
2466
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2467
|
-
getGlobalThis().__VUE_HMR_RUNTIME__ = {
|
|
2468
|
-
createRecord: tryWrap(createRecord),
|
|
2469
|
-
rerender: tryWrap(rerender),
|
|
2470
|
-
reload: tryWrap(reload)
|
|
2471
|
-
};
|
|
2472
|
-
}
|
|
2473
|
-
const map = /* @__PURE__ */ new Map();
|
|
2474
|
-
function registerHMR(instance) {
|
|
2475
|
-
const id = instance.type.__hmrId;
|
|
2476
|
-
let record = map.get(id);
|
|
2477
|
-
if (!record) {
|
|
2478
|
-
createRecord(id, instance.type);
|
|
2479
|
-
record = map.get(id);
|
|
2480
|
-
}
|
|
2481
|
-
record.instances.add(instance);
|
|
2482
|
-
}
|
|
2483
|
-
function unregisterHMR(instance) {
|
|
2484
|
-
map.get(instance.type.__hmrId).instances.delete(instance);
|
|
2485
|
-
}
|
|
2486
|
-
function createRecord(id, initialDef) {
|
|
2487
|
-
if (map.has(id)) {
|
|
2488
|
-
return false;
|
|
2489
|
-
}
|
|
2490
|
-
map.set(id, {
|
|
2491
|
-
initialDef: normalizeClassComponent(initialDef),
|
|
2492
|
-
instances: /* @__PURE__ */ new Set()
|
|
2493
|
-
});
|
|
2494
|
-
return true;
|
|
2495
|
-
}
|
|
2496
|
-
function normalizeClassComponent(component) {
|
|
2497
|
-
return isClassComponent(component) ? component.__vccOpts : component;
|
|
2498
|
-
}
|
|
2499
|
-
function rerender(id, newRender) {
|
|
2500
|
-
const record = map.get(id);
|
|
2501
|
-
if (!record) {
|
|
2502
|
-
return;
|
|
2503
|
-
}
|
|
2504
|
-
record.initialDef.render = newRender;
|
|
2505
|
-
[...record.instances].forEach((instance) => {
|
|
2506
|
-
if (newRender) {
|
|
2507
|
-
instance.render = newRender;
|
|
2508
|
-
normalizeClassComponent(instance.type).render = newRender;
|
|
2509
|
-
}
|
|
2510
|
-
instance.renderCache = [];
|
|
2511
|
-
isHmrUpdating = true;
|
|
2512
|
-
if (!(instance.job.flags & 8)) {
|
|
2513
|
-
instance.update();
|
|
2514
|
-
}
|
|
2515
|
-
isHmrUpdating = false;
|
|
2516
|
-
});
|
|
2517
|
-
}
|
|
2518
|
-
function reload(id, newComp) {
|
|
2519
|
-
const record = map.get(id);
|
|
2520
|
-
if (!record) return;
|
|
2521
|
-
newComp = normalizeClassComponent(newComp);
|
|
2522
|
-
updateComponentDef(record.initialDef, newComp);
|
|
2523
|
-
const instances = [...record.instances];
|
|
2524
|
-
for (let i = 0; i < instances.length; i++) {
|
|
2525
|
-
const instance = instances[i];
|
|
2526
|
-
const oldComp = normalizeClassComponent(instance.type);
|
|
2527
|
-
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2528
|
-
if (!dirtyInstances) {
|
|
2529
|
-
if (oldComp !== record.initialDef) {
|
|
2530
|
-
updateComponentDef(oldComp, newComp);
|
|
2531
|
-
}
|
|
2532
|
-
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2533
|
-
}
|
|
2534
|
-
dirtyInstances.add(instance);
|
|
2535
|
-
instance.appContext.propsCache.delete(instance.type);
|
|
2536
|
-
instance.appContext.emitsCache.delete(instance.type);
|
|
2537
|
-
instance.appContext.optionsCache.delete(instance.type);
|
|
2538
|
-
if (instance.ceReload) {
|
|
2539
|
-
dirtyInstances.add(instance);
|
|
2540
|
-
instance.ceReload(newComp.styles);
|
|
2541
|
-
dirtyInstances.delete(instance);
|
|
2542
|
-
} else if (instance.parent) {
|
|
2543
|
-
queueJob(() => {
|
|
2544
|
-
if (!(instance.job.flags & 8)) {
|
|
2545
|
-
isHmrUpdating = true;
|
|
2546
|
-
instance.parent.update();
|
|
2547
|
-
isHmrUpdating = false;
|
|
2548
|
-
dirtyInstances.delete(instance);
|
|
2549
|
-
}
|
|
2550
|
-
});
|
|
2551
|
-
} else if (instance.appContext.reload) {
|
|
2552
|
-
instance.appContext.reload();
|
|
2553
|
-
} else if (typeof window !== "undefined") {
|
|
2554
|
-
window.location.reload();
|
|
2555
|
-
} else {
|
|
2556
|
-
console.warn(
|
|
2557
|
-
"[HMR] Root or manually mounted instance modified. Full reload required."
|
|
2558
|
-
);
|
|
2559
|
-
}
|
|
2560
|
-
if (instance.root.ce && instance !== instance.root) {
|
|
2561
|
-
instance.root.ce._removeChildStyle(oldComp);
|
|
2562
|
-
}
|
|
2563
|
-
}
|
|
2564
|
-
queuePostFlushCb(() => {
|
|
2565
|
-
hmrDirtyComponents.clear();
|
|
2566
|
-
});
|
|
2567
|
-
}
|
|
2568
|
-
function updateComponentDef(oldComp, newComp) {
|
|
2569
|
-
extend(oldComp, newComp);
|
|
2570
|
-
for (const key in oldComp) {
|
|
2571
|
-
if (key !== "__file" && !(key in newComp)) {
|
|
2572
|
-
delete oldComp[key];
|
|
2573
|
-
}
|
|
2574
|
-
}
|
|
2575
|
-
}
|
|
2576
|
-
function tryWrap(fn) {
|
|
2577
|
-
return (id, arg) => {
|
|
2578
|
-
try {
|
|
2579
|
-
return fn(id, arg);
|
|
2580
|
-
} catch (e) {
|
|
2581
|
-
console.error(e);
|
|
2582
|
-
console.warn(
|
|
2583
|
-
`[HMR] Something went wrong during Vue component hot-reload. Full reload required.`
|
|
2584
|
-
);
|
|
2214
|
+
flushJobs();
|
|
2585
2215
|
}
|
|
2586
|
-
};
|
|
2587
|
-
}
|
|
2588
|
-
|
|
2589
|
-
let devtools$1;
|
|
2590
|
-
let buffer = [];
|
|
2591
|
-
let devtoolsNotInstalled = false;
|
|
2592
|
-
function emit$1(event, ...args) {
|
|
2593
|
-
if (devtools$1) {
|
|
2594
|
-
devtools$1.emit(event, ...args);
|
|
2595
|
-
} else if (!devtoolsNotInstalled) {
|
|
2596
|
-
buffer.push({ event, args });
|
|
2597
|
-
}
|
|
2598
|
-
}
|
|
2599
|
-
function setDevtoolsHook$1(hook, target) {
|
|
2600
|
-
var _a, _b;
|
|
2601
|
-
devtools$1 = hook;
|
|
2602
|
-
if (devtools$1) {
|
|
2603
|
-
devtools$1.enabled = true;
|
|
2604
|
-
buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
|
|
2605
|
-
buffer = [];
|
|
2606
|
-
} else if (
|
|
2607
|
-
// handle late devtools injection - only do this if we are in an actual
|
|
2608
|
-
// browser environment to avoid the timer handle stalling test runner exit
|
|
2609
|
-
// (#4815)
|
|
2610
|
-
typeof window !== "undefined" && // some envs mock window but not fully
|
|
2611
|
-
window.HTMLElement && // also exclude jsdom
|
|
2612
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
2613
|
-
!((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
|
|
2614
|
-
) {
|
|
2615
|
-
const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
|
|
2616
|
-
replay.push((newHook) => {
|
|
2617
|
-
setDevtoolsHook$1(newHook, target);
|
|
2618
|
-
});
|
|
2619
|
-
setTimeout(() => {
|
|
2620
|
-
if (!devtools$1) {
|
|
2621
|
-
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
|
|
2622
|
-
devtoolsNotInstalled = true;
|
|
2623
|
-
buffer = [];
|
|
2624
|
-
}
|
|
2625
|
-
}, 3e3);
|
|
2626
|
-
} else {
|
|
2627
|
-
devtoolsNotInstalled = true;
|
|
2628
|
-
buffer = [];
|
|
2629
2216
|
}
|
|
2630
2217
|
}
|
|
2631
|
-
function devtoolsInitApp(app, version) {
|
|
2632
|
-
emit$1("app:init" /* APP_INIT */, app, version, {
|
|
2633
|
-
Fragment,
|
|
2634
|
-
Text,
|
|
2635
|
-
Comment,
|
|
2636
|
-
Static
|
|
2637
|
-
});
|
|
2638
|
-
}
|
|
2639
|
-
function devtoolsUnmountApp(app) {
|
|
2640
|
-
emit$1("app:unmount" /* APP_UNMOUNT */, app);
|
|
2641
|
-
}
|
|
2642
|
-
const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */);
|
|
2643
|
-
const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */);
|
|
2644
|
-
const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
2645
|
-
"component:removed" /* COMPONENT_REMOVED */
|
|
2646
|
-
);
|
|
2647
|
-
const devtoolsComponentRemoved = (component) => {
|
|
2648
|
-
if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered
|
|
2649
|
-
!devtools$1.cleanupBuffer(component)) {
|
|
2650
|
-
_devtoolsComponentRemoved(component);
|
|
2651
|
-
}
|
|
2652
|
-
};
|
|
2653
|
-
// @__NO_SIDE_EFFECTS__
|
|
2654
|
-
function createDevtoolsComponentHook(hook) {
|
|
2655
|
-
return (component) => {
|
|
2656
|
-
emit$1(
|
|
2657
|
-
hook,
|
|
2658
|
-
component.appContext.app,
|
|
2659
|
-
component.uid,
|
|
2660
|
-
component.parent ? component.parent.uid : void 0,
|
|
2661
|
-
component
|
|
2662
|
-
);
|
|
2663
|
-
};
|
|
2664
|
-
}
|
|
2665
|
-
const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */);
|
|
2666
|
-
const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */);
|
|
2667
|
-
function createDevtoolsPerformanceHook(hook) {
|
|
2668
|
-
return (component, type, time) => {
|
|
2669
|
-
emit$1(hook, component.appContext.app, component.uid, component, type, time);
|
|
2670
|
-
};
|
|
2671
|
-
}
|
|
2672
|
-
function devtoolsComponentEmit(component, event, params) {
|
|
2673
|
-
emit$1(
|
|
2674
|
-
"component:emit" /* COMPONENT_EMIT */,
|
|
2675
|
-
component.appContext.app,
|
|
2676
|
-
component,
|
|
2677
|
-
event,
|
|
2678
|
-
params
|
|
2679
|
-
);
|
|
2680
|
-
}
|
|
2681
2218
|
|
|
2682
2219
|
let currentRenderingInstance = null;
|
|
2683
2220
|
let currentScopeId = null;
|
|
@@ -2706,9 +2243,6 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
|
|
|
2706
2243
|
setBlockTracking(1);
|
|
2707
2244
|
}
|
|
2708
2245
|
}
|
|
2709
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
2710
|
-
devtoolsComponentUpdated(ctx);
|
|
2711
|
-
}
|
|
2712
2246
|
return res;
|
|
2713
2247
|
};
|
|
2714
2248
|
renderFnWithContext._n = true;
|
|
@@ -2716,15 +2250,8 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
|
|
|
2716
2250
|
renderFnWithContext._d = true;
|
|
2717
2251
|
return renderFnWithContext;
|
|
2718
2252
|
}
|
|
2719
|
-
|
|
2720
|
-
function validateDirectiveName(name) {
|
|
2721
|
-
if (isBuiltInDirective(name)) {
|
|
2722
|
-
warn$1("Do not use built-in directive ids as custom directive id: " + name);
|
|
2723
|
-
}
|
|
2724
|
-
}
|
|
2725
2253
|
function withDirectives(vnode, directives) {
|
|
2726
2254
|
if (currentRenderingInstance === null) {
|
|
2727
|
-
!!(process.env.NODE_ENV !== "production") && warn$1(`withDirectives can only be used inside render functions.`);
|
|
2728
2255
|
return vnode;
|
|
2729
2256
|
}
|
|
2730
2257
|
const instance = getComponentPublicInstance(currentRenderingInstance);
|
|
@@ -2776,11 +2303,6 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
2776
2303
|
}
|
|
2777
2304
|
|
|
2778
2305
|
function provide(key, value) {
|
|
2779
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2780
|
-
if (!currentInstance || currentInstance.isMounted) {
|
|
2781
|
-
warn$1(`provide() can only be used inside setup().`);
|
|
2782
|
-
}
|
|
2783
|
-
}
|
|
2784
2306
|
if (currentInstance) {
|
|
2785
2307
|
let provides = currentInstance.provides;
|
|
2786
2308
|
const parentProvides = currentInstance.parent && currentInstance.parent.provides;
|
|
@@ -2798,11 +2320,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
2798
2320
|
return provides[key];
|
|
2799
2321
|
} else if (arguments.length > 1) {
|
|
2800
2322
|
return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
2801
|
-
} else
|
|
2802
|
-
warn$1(`injection "${String(key)}" not found.`);
|
|
2803
|
-
}
|
|
2804
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
2805
|
-
warn$1(`inject() can only be used inside setup() or functional components.`);
|
|
2323
|
+
} else ;
|
|
2806
2324
|
}
|
|
2807
2325
|
}
|
|
2808
2326
|
|
|
@@ -2810,43 +2328,15 @@ const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
|
|
|
2810
2328
|
const useSSRContext = () => {
|
|
2811
2329
|
{
|
|
2812
2330
|
const ctx = inject(ssrContextKey);
|
|
2813
|
-
if (!ctx) {
|
|
2814
|
-
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
2815
|
-
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
2816
|
-
);
|
|
2817
|
-
}
|
|
2818
2331
|
return ctx;
|
|
2819
2332
|
}
|
|
2820
2333
|
};
|
|
2821
2334
|
function watch(source, cb, options) {
|
|
2822
|
-
if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) {
|
|
2823
|
-
warn$1(
|
|
2824
|
-
`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
|
|
2825
|
-
);
|
|
2826
|
-
}
|
|
2827
2335
|
return doWatch(source, cb, options);
|
|
2828
2336
|
}
|
|
2829
2337
|
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
2830
2338
|
const { immediate, deep, flush, once } = options;
|
|
2831
|
-
if (!!(process.env.NODE_ENV !== "production") && !cb) {
|
|
2832
|
-
if (immediate !== void 0) {
|
|
2833
|
-
warn$1(
|
|
2834
|
-
`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
|
|
2835
|
-
);
|
|
2836
|
-
}
|
|
2837
|
-
if (deep !== void 0) {
|
|
2838
|
-
warn$1(
|
|
2839
|
-
`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
|
|
2840
|
-
);
|
|
2841
|
-
}
|
|
2842
|
-
if (once !== void 0) {
|
|
2843
|
-
warn$1(
|
|
2844
|
-
`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
|
|
2845
|
-
);
|
|
2846
|
-
}
|
|
2847
|
-
}
|
|
2848
2339
|
const baseWatchOptions = extend({}, options);
|
|
2849
|
-
if (!!(process.env.NODE_ENV !== "production")) baseWatchOptions.onWarn = warn$1;
|
|
2850
2340
|
const runsImmediately = cb && immediate || !cb && flush !== "post";
|
|
2851
2341
|
let ssrCleanup;
|
|
2852
2342
|
if (isInSSRComponentSetup) {
|
|
@@ -2954,8 +2444,6 @@ function defineComponent(options, extraOptions) {
|
|
|
2954
2444
|
function markAsyncBoundary(instance) {
|
|
2955
2445
|
instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
|
|
2956
2446
|
}
|
|
2957
|
-
|
|
2958
|
-
const knownTemplateRefs = /* @__PURE__ */ new WeakSet();
|
|
2959
2447
|
function isTemplateRefKey(refs, key) {
|
|
2960
2448
|
let desc;
|
|
2961
2449
|
return !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);
|
|
@@ -2984,36 +2472,17 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
2984
2472
|
const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
|
|
2985
2473
|
const value = isUnmount ? null : refValue;
|
|
2986
2474
|
const { i: owner, r: ref } = rawRef;
|
|
2987
|
-
if (!!(process.env.NODE_ENV !== "production") && !owner) {
|
|
2988
|
-
warn$1(
|
|
2989
|
-
`Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
|
|
2990
|
-
);
|
|
2991
|
-
return;
|
|
2992
|
-
}
|
|
2993
2475
|
const oldRef = oldRawRef && oldRawRef.r;
|
|
2994
2476
|
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
2995
2477
|
const setupState = owner.setupState;
|
|
2996
2478
|
const rawSetupState = toRaw(setupState);
|
|
2997
2479
|
const canSetSetupRef = setupState === EMPTY_OBJ ? NO : (key) => {
|
|
2998
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2999
|
-
if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
|
|
3000
|
-
warn$1(
|
|
3001
|
-
`Template ref "${key}" used on a non-ref value. It will not work in the production build.`
|
|
3002
|
-
);
|
|
3003
|
-
}
|
|
3004
|
-
if (knownTemplateRefs.has(rawSetupState[key])) {
|
|
3005
|
-
return false;
|
|
3006
|
-
}
|
|
3007
|
-
}
|
|
3008
2480
|
if (isTemplateRefKey(refs, key)) {
|
|
3009
2481
|
return false;
|
|
3010
2482
|
}
|
|
3011
2483
|
return hasOwn(rawSetupState, key);
|
|
3012
2484
|
};
|
|
3013
2485
|
const canSetRef = (ref2, key) => {
|
|
3014
|
-
if (!!(process.env.NODE_ENV !== "production") && knownTemplateRefs.has(ref2)) {
|
|
3015
|
-
return false;
|
|
3016
|
-
}
|
|
3017
2486
|
if (key && isTemplateRefKey(refs, key)) {
|
|
3018
2487
|
return false;
|
|
3019
2488
|
}
|
|
@@ -3042,7 +2511,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3042
2511
|
if (_isString || _isRef) {
|
|
3043
2512
|
const doSet = () => {
|
|
3044
2513
|
if (rawRef.f) {
|
|
3045
|
-
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(
|
|
2514
|
+
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef() || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
3046
2515
|
if (isUnmount) {
|
|
3047
2516
|
isArray(existing) && remove(existing, refValue);
|
|
3048
2517
|
} else {
|
|
@@ -3073,9 +2542,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3073
2542
|
ref.value = value;
|
|
3074
2543
|
}
|
|
3075
2544
|
if (rawRef.k) refs[rawRef.k] = value;
|
|
3076
|
-
} else
|
|
3077
|
-
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
3078
|
-
}
|
|
2545
|
+
} else ;
|
|
3079
2546
|
};
|
|
3080
2547
|
if (value) {
|
|
3081
2548
|
const job = () => {
|
|
@@ -3089,8 +2556,6 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3089
2556
|
invalidatePendingSetRef(rawRef);
|
|
3090
2557
|
doSet();
|
|
3091
2558
|
}
|
|
3092
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3093
|
-
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
3094
2559
|
}
|
|
3095
2560
|
}
|
|
3096
2561
|
}
|
|
@@ -3171,17 +2636,9 @@ function defineAsyncComponent(source) {
|
|
|
3171
2636
|
if (thisRequest !== pendingRequest && pendingRequest) {
|
|
3172
2637
|
return pendingRequest;
|
|
3173
2638
|
}
|
|
3174
|
-
if (!!(process.env.NODE_ENV !== "production") && !comp) {
|
|
3175
|
-
warn$1(
|
|
3176
|
-
`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
|
|
3177
|
-
);
|
|
3178
|
-
}
|
|
3179
2639
|
if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
|
|
3180
2640
|
comp = comp.default;
|
|
3181
2641
|
}
|
|
3182
|
-
if (!!(process.env.NODE_ENV !== "production") && comp && !isObject(comp) && !isFunction(comp)) {
|
|
3183
|
-
throw new Error(`Invalid async component load result: ${comp}`);
|
|
3184
|
-
}
|
|
3185
2642
|
resolvedComp = comp;
|
|
3186
2643
|
return comp;
|
|
3187
2644
|
}));
|
|
@@ -3194,11 +2651,6 @@ function defineAsyncComponent(source) {
|
|
|
3194
2651
|
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
3195
2652
|
const performHydrate = () => {
|
|
3196
2653
|
if (patched) {
|
|
3197
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3198
|
-
warn$1(
|
|
3199
|
-
`Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
|
|
3200
|
-
);
|
|
3201
|
-
}
|
|
3202
2654
|
return;
|
|
3203
2655
|
}
|
|
3204
2656
|
hydrate();
|
|
@@ -3359,11 +2811,6 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
3359
2811
|
hooks.push(wrappedHook);
|
|
3360
2812
|
}
|
|
3361
2813
|
return wrappedHook;
|
|
3362
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3363
|
-
const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
|
|
3364
|
-
warn$1(
|
|
3365
|
-
`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )
|
|
3366
|
-
);
|
|
3367
2814
|
}
|
|
3368
2815
|
}
|
|
3369
2816
|
const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
@@ -3424,16 +2871,7 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
|
|
|
3424
2871
|
if (!res && maybeSelfReference) {
|
|
3425
2872
|
return Component;
|
|
3426
2873
|
}
|
|
3427
|
-
if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) {
|
|
3428
|
-
const extra = `
|
|
3429
|
-
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` ;
|
|
3430
|
-
warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
3431
|
-
}
|
|
3432
2874
|
return res;
|
|
3433
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3434
|
-
warn$1(
|
|
3435
|
-
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
|
|
3436
|
-
);
|
|
3437
2875
|
}
|
|
3438
2876
|
}
|
|
3439
2877
|
function resolve(registry, name) {
|
|
@@ -3463,12 +2901,7 @@ function renderList(source, renderItem, cache, index) {
|
|
|
3463
2901
|
);
|
|
3464
2902
|
}
|
|
3465
2903
|
} else if (typeof source === "number") {
|
|
3466
|
-
|
|
3467
|
-
warn$1(
|
|
3468
|
-
`The v-for range expects a positive integer value but got ${source}.`
|
|
3469
|
-
);
|
|
3470
|
-
ret = [];
|
|
3471
|
-
} else {
|
|
2904
|
+
{
|
|
3472
2905
|
ret = new Array(source);
|
|
3473
2906
|
for (let i = 0; i < source; i++) {
|
|
3474
2907
|
ret[i] = renderItem(i + 1, i, void 0, cached);
|
|
@@ -3506,23 +2939,22 @@ const publicPropertiesMap = (
|
|
|
3506
2939
|
$: (i) => i,
|
|
3507
2940
|
$el: (i) => i.vnode.el,
|
|
3508
2941
|
$data: (i) => i.data,
|
|
3509
|
-
$props: (i) =>
|
|
3510
|
-
$attrs: (i) =>
|
|
3511
|
-
$slots: (i) =>
|
|
3512
|
-
$refs: (i) =>
|
|
2942
|
+
$props: (i) => i.props,
|
|
2943
|
+
$attrs: (i) => i.attrs,
|
|
2944
|
+
$slots: (i) => i.slots,
|
|
2945
|
+
$refs: (i) => i.refs,
|
|
3513
2946
|
$parent: (i) => getPublicInstance(i.parent),
|
|
3514
2947
|
$root: (i) => getPublicInstance(i.root),
|
|
3515
2948
|
$host: (i) => i.ce,
|
|
3516
2949
|
$emit: (i) => i.emit,
|
|
3517
|
-
$options: (i) =>
|
|
2950
|
+
$options: (i) => resolveMergedOptions(i) ,
|
|
3518
2951
|
$forceUpdate: (i) => i.f || (i.f = () => {
|
|
3519
2952
|
queueJob(i.update);
|
|
3520
2953
|
}),
|
|
3521
2954
|
$nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
|
|
3522
|
-
$watch: (i) =>
|
|
2955
|
+
$watch: (i) => instanceWatch.bind(i)
|
|
3523
2956
|
})
|
|
3524
2957
|
);
|
|
3525
|
-
const isReservedPrefix = (key) => key === "_" || key === "$";
|
|
3526
2958
|
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
3527
2959
|
const PublicInstanceProxyHandlers = {
|
|
3528
2960
|
get({ _: instance }, key) {
|
|
@@ -3530,9 +2962,6 @@ const PublicInstanceProxyHandlers = {
|
|
|
3530
2962
|
return true;
|
|
3531
2963
|
}
|
|
3532
2964
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
3533
|
-
if (!!(process.env.NODE_ENV !== "production") && key === "__isVue") {
|
|
3534
|
-
return true;
|
|
3535
|
-
}
|
|
3536
2965
|
if (key[0] !== "$") {
|
|
3537
2966
|
const n = accessCache[key];
|
|
3538
2967
|
if (n !== void 0) {
|
|
@@ -3549,7 +2978,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
3549
2978
|
} else if (hasSetupBinding(setupState, key)) {
|
|
3550
2979
|
accessCache[key] = 1 /* SETUP */;
|
|
3551
2980
|
return setupState[key];
|
|
3552
|
-
} else if (
|
|
2981
|
+
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
3553
2982
|
accessCache[key] = 2 /* DATA */;
|
|
3554
2983
|
return data[key];
|
|
3555
2984
|
} else if (hasOwn(props, key)) {
|
|
@@ -3558,7 +2987,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
3558
2987
|
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
3559
2988
|
accessCache[key] = 4 /* CONTEXT */;
|
|
3560
2989
|
return ctx[key];
|
|
3561
|
-
} else if (
|
|
2990
|
+
} else if (shouldCacheAccess) {
|
|
3562
2991
|
accessCache[key] = 0 /* OTHER */;
|
|
3563
2992
|
}
|
|
3564
2993
|
}
|
|
@@ -3567,9 +2996,6 @@ const PublicInstanceProxyHandlers = {
|
|
|
3567
2996
|
if (publicGetter) {
|
|
3568
2997
|
if (key === "$attrs") {
|
|
3569
2998
|
track(instance.attrs, "get", "");
|
|
3570
|
-
!!(process.env.NODE_ENV !== "production") && markAttrsAccessed();
|
|
3571
|
-
} else if (!!(process.env.NODE_ENV !== "production") && key === "$slots") {
|
|
3572
|
-
track(instance, "get", key);
|
|
3573
2999
|
}
|
|
3574
3000
|
return publicGetter(instance);
|
|
3575
3001
|
} else if (
|
|
@@ -3587,50 +3013,23 @@ const PublicInstanceProxyHandlers = {
|
|
|
3587
3013
|
{
|
|
3588
3014
|
return globalProperties[key];
|
|
3589
3015
|
}
|
|
3590
|
-
} else
|
|
3591
|
-
// to infinite warning loop
|
|
3592
|
-
key.indexOf("__v") !== 0)) {
|
|
3593
|
-
if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
|
|
3594
|
-
warn$1(
|
|
3595
|
-
`Property ${JSON.stringify(
|
|
3596
|
-
key
|
|
3597
|
-
)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
|
|
3598
|
-
);
|
|
3599
|
-
} else if (instance === currentRenderingInstance) {
|
|
3600
|
-
warn$1(
|
|
3601
|
-
`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
|
|
3602
|
-
);
|
|
3603
|
-
}
|
|
3604
|
-
}
|
|
3016
|
+
} else ;
|
|
3605
3017
|
},
|
|
3606
3018
|
set({ _: instance }, key, value) {
|
|
3607
3019
|
const { data, setupState, ctx } = instance;
|
|
3608
3020
|
if (hasSetupBinding(setupState, key)) {
|
|
3609
3021
|
setupState[key] = value;
|
|
3610
3022
|
return true;
|
|
3611
|
-
} else if (
|
|
3612
|
-
warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
3613
|
-
return false;
|
|
3614
|
-
} else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
3023
|
+
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
3615
3024
|
data[key] = value;
|
|
3616
3025
|
return true;
|
|
3617
3026
|
} else if (hasOwn(instance.props, key)) {
|
|
3618
|
-
!!(process.env.NODE_ENV !== "production") && warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
|
|
3619
3027
|
return false;
|
|
3620
3028
|
}
|
|
3621
3029
|
if (key[0] === "$" && key.slice(1) in instance) {
|
|
3622
|
-
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
3623
|
-
`Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
|
|
3624
|
-
);
|
|
3625
3030
|
return false;
|
|
3626
3031
|
} else {
|
|
3627
|
-
|
|
3628
|
-
Object.defineProperty(ctx, key, {
|
|
3629
|
-
enumerable: true,
|
|
3630
|
-
configurable: true,
|
|
3631
|
-
value
|
|
3632
|
-
});
|
|
3633
|
-
} else {
|
|
3032
|
+
{
|
|
3634
3033
|
ctx[key] = value;
|
|
3635
3034
|
}
|
|
3636
3035
|
}
|
|
@@ -3640,7 +3039,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
3640
3039
|
_: { data, setupState, accessCache, ctx, appContext, props, type }
|
|
3641
3040
|
}, key) {
|
|
3642
3041
|
let cssModules;
|
|
3643
|
-
return !!(accessCache[key] ||
|
|
3042
|
+
return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || hasOwn(props, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
|
|
3644
3043
|
},
|
|
3645
3044
|
defineProperty(target, key, descriptor) {
|
|
3646
3045
|
if (descriptor.get != null) {
|
|
@@ -3651,87 +3050,12 @@ const PublicInstanceProxyHandlers = {
|
|
|
3651
3050
|
return Reflect.defineProperty(target, key, descriptor);
|
|
3652
3051
|
}
|
|
3653
3052
|
};
|
|
3654
|
-
if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
3655
|
-
PublicInstanceProxyHandlers.ownKeys = (target) => {
|
|
3656
|
-
warn$1(
|
|
3657
|
-
`Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
|
|
3658
|
-
);
|
|
3659
|
-
return Reflect.ownKeys(target);
|
|
3660
|
-
};
|
|
3661
|
-
}
|
|
3662
|
-
function createDevRenderContext(instance) {
|
|
3663
|
-
const target = {};
|
|
3664
|
-
Object.defineProperty(target, `_`, {
|
|
3665
|
-
configurable: true,
|
|
3666
|
-
enumerable: false,
|
|
3667
|
-
get: () => instance
|
|
3668
|
-
});
|
|
3669
|
-
Object.keys(publicPropertiesMap).forEach((key) => {
|
|
3670
|
-
Object.defineProperty(target, key, {
|
|
3671
|
-
configurable: true,
|
|
3672
|
-
enumerable: false,
|
|
3673
|
-
get: () => publicPropertiesMap[key](instance),
|
|
3674
|
-
// intercepted by the proxy so no need for implementation,
|
|
3675
|
-
// but needed to prevent set errors
|
|
3676
|
-
set: NOOP
|
|
3677
|
-
});
|
|
3678
|
-
});
|
|
3679
|
-
return target;
|
|
3680
|
-
}
|
|
3681
|
-
function exposePropsOnRenderContext(instance) {
|
|
3682
|
-
const {
|
|
3683
|
-
ctx,
|
|
3684
|
-
propsOptions: [propsOptions]
|
|
3685
|
-
} = instance;
|
|
3686
|
-
if (propsOptions) {
|
|
3687
|
-
Object.keys(propsOptions).forEach((key) => {
|
|
3688
|
-
Object.defineProperty(ctx, key, {
|
|
3689
|
-
enumerable: true,
|
|
3690
|
-
configurable: true,
|
|
3691
|
-
get: () => instance.props[key],
|
|
3692
|
-
set: NOOP
|
|
3693
|
-
});
|
|
3694
|
-
});
|
|
3695
|
-
}
|
|
3696
|
-
}
|
|
3697
|
-
function exposeSetupStateOnRenderContext(instance) {
|
|
3698
|
-
const { ctx, setupState } = instance;
|
|
3699
|
-
Object.keys(toRaw(setupState)).forEach((key) => {
|
|
3700
|
-
if (!setupState.__isScriptSetup) {
|
|
3701
|
-
if (isReservedPrefix(key[0])) {
|
|
3702
|
-
warn$1(
|
|
3703
|
-
`setup() return property ${JSON.stringify(
|
|
3704
|
-
key
|
|
3705
|
-
)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
|
|
3706
|
-
);
|
|
3707
|
-
return;
|
|
3708
|
-
}
|
|
3709
|
-
Object.defineProperty(ctx, key, {
|
|
3710
|
-
enumerable: true,
|
|
3711
|
-
configurable: true,
|
|
3712
|
-
get: () => setupState[key],
|
|
3713
|
-
set: NOOP
|
|
3714
|
-
});
|
|
3715
|
-
}
|
|
3716
|
-
});
|
|
3717
|
-
}
|
|
3718
3053
|
function normalizePropsOrEmits(props) {
|
|
3719
3054
|
return isArray(props) ? props.reduce(
|
|
3720
3055
|
(normalized, p) => (normalized[p] = null, normalized),
|
|
3721
3056
|
{}
|
|
3722
3057
|
) : props;
|
|
3723
3058
|
}
|
|
3724
|
-
|
|
3725
|
-
function createDuplicateChecker() {
|
|
3726
|
-
const cache = /* @__PURE__ */ Object.create(null);
|
|
3727
|
-
return (type, key) => {
|
|
3728
|
-
if (cache[key]) {
|
|
3729
|
-
warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
|
|
3730
|
-
} else {
|
|
3731
|
-
cache[key] = type;
|
|
3732
|
-
}
|
|
3733
|
-
};
|
|
3734
|
-
}
|
|
3735
3059
|
let shouldCacheAccess = true;
|
|
3736
3060
|
function applyOptions(instance) {
|
|
3737
3061
|
const options = resolveMergedOptions(instance);
|
|
@@ -3774,15 +3098,7 @@ function applyOptions(instance) {
|
|
|
3774
3098
|
directives,
|
|
3775
3099
|
filters
|
|
3776
3100
|
} = options;
|
|
3777
|
-
const checkDuplicateProperties =
|
|
3778
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3779
|
-
const [propsOptions] = instance.propsOptions;
|
|
3780
|
-
if (propsOptions) {
|
|
3781
|
-
for (const key in propsOptions) {
|
|
3782
|
-
checkDuplicateProperties("Props" /* PROPS */, key);
|
|
3783
|
-
}
|
|
3784
|
-
}
|
|
3785
|
-
}
|
|
3101
|
+
const checkDuplicateProperties = null;
|
|
3786
3102
|
if (injectOptions) {
|
|
3787
3103
|
resolveInjections(injectOptions, ctx, checkDuplicateProperties);
|
|
3788
3104
|
}
|
|
@@ -3790,55 +3106,16 @@ function applyOptions(instance) {
|
|
|
3790
3106
|
for (const key in methods) {
|
|
3791
3107
|
const methodHandler = methods[key];
|
|
3792
3108
|
if (isFunction(methodHandler)) {
|
|
3793
|
-
|
|
3794
|
-
Object.defineProperty(ctx, key, {
|
|
3795
|
-
value: methodHandler.bind(publicThis),
|
|
3796
|
-
configurable: true,
|
|
3797
|
-
enumerable: true,
|
|
3798
|
-
writable: true
|
|
3799
|
-
});
|
|
3800
|
-
} else {
|
|
3109
|
+
{
|
|
3801
3110
|
ctx[key] = methodHandler.bind(publicThis);
|
|
3802
3111
|
}
|
|
3803
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3804
|
-
checkDuplicateProperties("Methods" /* METHODS */, key);
|
|
3805
|
-
}
|
|
3806
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3807
|
-
warn$1(
|
|
3808
|
-
`Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
|
|
3809
|
-
);
|
|
3810
3112
|
}
|
|
3811
3113
|
}
|
|
3812
3114
|
}
|
|
3813
3115
|
if (dataOptions) {
|
|
3814
|
-
if (!!(process.env.NODE_ENV !== "production") && !isFunction(dataOptions)) {
|
|
3815
|
-
warn$1(
|
|
3816
|
-
`The data option must be a function. Plain object usage is no longer supported.`
|
|
3817
|
-
);
|
|
3818
|
-
}
|
|
3819
3116
|
const data = dataOptions.call(publicThis, publicThis);
|
|
3820
|
-
if (
|
|
3821
|
-
warn$1(
|
|
3822
|
-
`data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
|
|
3823
|
-
);
|
|
3824
|
-
}
|
|
3825
|
-
if (!isObject(data)) {
|
|
3826
|
-
!!(process.env.NODE_ENV !== "production") && warn$1(`data() should return an object.`);
|
|
3827
|
-
} else {
|
|
3117
|
+
if (!isObject(data)) ; else {
|
|
3828
3118
|
instance.data = reactive(data);
|
|
3829
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3830
|
-
for (const key in data) {
|
|
3831
|
-
checkDuplicateProperties("Data" /* DATA */, key);
|
|
3832
|
-
if (!isReservedPrefix(key[0])) {
|
|
3833
|
-
Object.defineProperty(ctx, key, {
|
|
3834
|
-
configurable: true,
|
|
3835
|
-
enumerable: true,
|
|
3836
|
-
get: () => data[key],
|
|
3837
|
-
set: NOOP
|
|
3838
|
-
});
|
|
3839
|
-
}
|
|
3840
|
-
}
|
|
3841
|
-
}
|
|
3842
3119
|
}
|
|
3843
3120
|
}
|
|
3844
3121
|
shouldCacheAccess = true;
|
|
@@ -3846,14 +3123,7 @@ function applyOptions(instance) {
|
|
|
3846
3123
|
for (const key in computedOptions) {
|
|
3847
3124
|
const opt = computedOptions[key];
|
|
3848
3125
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
3849
|
-
|
|
3850
|
-
warn$1(`Computed property "${key}" has no getter.`);
|
|
3851
|
-
}
|
|
3852
|
-
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => {
|
|
3853
|
-
warn$1(
|
|
3854
|
-
`Write operation failed: computed property "${key}" is readonly.`
|
|
3855
|
-
);
|
|
3856
|
-
} : NOOP;
|
|
3126
|
+
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP;
|
|
3857
3127
|
const c = computed({
|
|
3858
3128
|
get,
|
|
3859
3129
|
set
|
|
@@ -3864,9 +3134,6 @@ function applyOptions(instance) {
|
|
|
3864
3134
|
get: () => c.value,
|
|
3865
3135
|
set: (v) => c.value = v
|
|
3866
3136
|
});
|
|
3867
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3868
|
-
checkDuplicateProperties("Computed" /* COMPUTED */, key);
|
|
3869
|
-
}
|
|
3870
3137
|
}
|
|
3871
3138
|
}
|
|
3872
3139
|
if (watchOptions) {
|
|
@@ -3958,9 +3225,6 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
|
|
|
3958
3225
|
} else {
|
|
3959
3226
|
ctx[key] = injected;
|
|
3960
3227
|
}
|
|
3961
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3962
|
-
checkDuplicateProperties("Inject" /* INJECT */, key);
|
|
3963
|
-
}
|
|
3964
3228
|
}
|
|
3965
3229
|
}
|
|
3966
3230
|
function callHook(hook, instance, type) {
|
|
@@ -3978,8 +3242,6 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
3978
3242
|
{
|
|
3979
3243
|
watch(getter, handler);
|
|
3980
3244
|
}
|
|
3981
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3982
|
-
warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
3983
3245
|
}
|
|
3984
3246
|
} else if (isFunction(raw)) {
|
|
3985
3247
|
{
|
|
@@ -3992,13 +3254,9 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
3992
3254
|
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
3993
3255
|
if (isFunction(handler)) {
|
|
3994
3256
|
watch(getter, handler, raw);
|
|
3995
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3996
|
-
warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
3997
3257
|
}
|
|
3998
3258
|
}
|
|
3999
|
-
} else
|
|
4000
|
-
warn$1(`Invalid watch option: "${key}"`, raw);
|
|
4001
|
-
}
|
|
3259
|
+
} else ;
|
|
4002
3260
|
}
|
|
4003
3261
|
function resolveMergedOptions(instance) {
|
|
4004
3262
|
const base = instance.type;
|
|
@@ -4041,11 +3299,7 @@ function mergeOptions(to, from, strats, asMixin = false) {
|
|
|
4041
3299
|
);
|
|
4042
3300
|
}
|
|
4043
3301
|
for (const key in from) {
|
|
4044
|
-
if (asMixin && key === "expose") {
|
|
4045
|
-
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
4046
|
-
`"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
|
|
4047
|
-
);
|
|
4048
|
-
} else {
|
|
3302
|
+
if (asMixin && key === "expose") ; else {
|
|
4049
3303
|
const strat = internalOptionMergeStrats[key] || strats && strats[key];
|
|
4050
3304
|
to[key] = strat ? strat(to[key], from[key]) : from[key];
|
|
4051
3305
|
}
|
|
@@ -4168,7 +3422,6 @@ function createAppAPI(render, hydrate) {
|
|
|
4168
3422
|
rootComponent = extend({}, rootComponent);
|
|
4169
3423
|
}
|
|
4170
3424
|
if (rootProps != null && !isObject(rootProps)) {
|
|
4171
|
-
!!(process.env.NODE_ENV !== "production") && warn$1(`root props passed to app.mount() must be an object.`);
|
|
4172
3425
|
rootProps = null;
|
|
4173
3426
|
}
|
|
4174
3427
|
const context = createAppContext();
|
|
@@ -4187,76 +3440,41 @@ function createAppAPI(render, hydrate) {
|
|
|
4187
3440
|
return context.config;
|
|
4188
3441
|
},
|
|
4189
3442
|
set config(v) {
|
|
4190
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4191
|
-
warn$1(
|
|
4192
|
-
`app.config cannot be replaced. Modify individual options instead.`
|
|
4193
|
-
);
|
|
4194
|
-
}
|
|
4195
3443
|
},
|
|
4196
3444
|
use(plugin, ...options) {
|
|
4197
|
-
if (installedPlugins.has(plugin)) {
|
|
4198
|
-
!!(process.env.NODE_ENV !== "production") && warn$1(`Plugin has already been applied to target app.`);
|
|
4199
|
-
} else if (plugin && isFunction(plugin.install)) {
|
|
3445
|
+
if (installedPlugins.has(plugin)) ; else if (plugin && isFunction(plugin.install)) {
|
|
4200
3446
|
installedPlugins.add(plugin);
|
|
4201
3447
|
plugin.install(app, ...options);
|
|
4202
3448
|
} else if (isFunction(plugin)) {
|
|
4203
3449
|
installedPlugins.add(plugin);
|
|
4204
3450
|
plugin(app, ...options);
|
|
4205
|
-
} else
|
|
4206
|
-
warn$1(
|
|
4207
|
-
`A plugin must either be a function or an object with an "install" function.`
|
|
4208
|
-
);
|
|
4209
|
-
}
|
|
3451
|
+
} else ;
|
|
4210
3452
|
return app;
|
|
4211
3453
|
},
|
|
4212
3454
|
mixin(mixin) {
|
|
4213
|
-
|
|
3455
|
+
{
|
|
4214
3456
|
if (!context.mixins.includes(mixin)) {
|
|
4215
3457
|
context.mixins.push(mixin);
|
|
4216
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4217
|
-
warn$1(
|
|
4218
|
-
"Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
|
|
4219
|
-
);
|
|
4220
3458
|
}
|
|
4221
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4222
|
-
warn$1("Mixins are only available in builds supporting Options API");
|
|
4223
3459
|
}
|
|
4224
3460
|
return app;
|
|
4225
3461
|
},
|
|
4226
3462
|
component(name, component) {
|
|
4227
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4228
|
-
validateComponentName(name, context.config);
|
|
4229
|
-
}
|
|
4230
3463
|
if (!component) {
|
|
4231
3464
|
return context.components[name];
|
|
4232
3465
|
}
|
|
4233
|
-
if (!!(process.env.NODE_ENV !== "production") && context.components[name]) {
|
|
4234
|
-
warn$1(`Component "${name}" has already been registered in target app.`);
|
|
4235
|
-
}
|
|
4236
3466
|
context.components[name] = component;
|
|
4237
3467
|
return app;
|
|
4238
3468
|
},
|
|
4239
3469
|
directive(name, directive) {
|
|
4240
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4241
|
-
validateDirectiveName(name);
|
|
4242
|
-
}
|
|
4243
3470
|
if (!directive) {
|
|
4244
3471
|
return context.directives[name];
|
|
4245
3472
|
}
|
|
4246
|
-
if (!!(process.env.NODE_ENV !== "production") && context.directives[name]) {
|
|
4247
|
-
warn$1(`Directive "${name}" has already been registered in target app.`);
|
|
4248
|
-
}
|
|
4249
3473
|
context.directives[name] = directive;
|
|
4250
3474
|
return app;
|
|
4251
3475
|
},
|
|
4252
3476
|
mount(rootContainer, isHydrate, namespace) {
|
|
4253
3477
|
if (!isMounted) {
|
|
4254
|
-
if (!!(process.env.NODE_ENV !== "production") && rootContainer.__vue_app__) {
|
|
4255
|
-
warn$1(
|
|
4256
|
-
`There is already an app instance mounted on the host container.
|
|
4257
|
-
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
4258
|
-
);
|
|
4259
|
-
}
|
|
4260
3478
|
const vnode = app._ceVNode || createVNode(rootComponent, rootProps);
|
|
4261
3479
|
vnode.appContext = context;
|
|
4262
3480
|
if (namespace === true) {
|
|
@@ -4264,37 +3482,16 @@ function createAppAPI(render, hydrate) {
|
|
|
4264
3482
|
} else if (namespace === false) {
|
|
4265
3483
|
namespace = void 0;
|
|
4266
3484
|
}
|
|
4267
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4268
|
-
context.reload = () => {
|
|
4269
|
-
const cloned = cloneVNode(vnode);
|
|
4270
|
-
cloned.el = null;
|
|
4271
|
-
render(cloned, rootContainer, namespace);
|
|
4272
|
-
};
|
|
4273
|
-
}
|
|
4274
3485
|
{
|
|
4275
3486
|
render(vnode, rootContainer, namespace);
|
|
4276
3487
|
}
|
|
4277
3488
|
isMounted = true;
|
|
4278
3489
|
app._container = rootContainer;
|
|
4279
3490
|
rootContainer.__vue_app__ = app;
|
|
4280
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
4281
|
-
app._instance = vnode.component;
|
|
4282
|
-
devtoolsInitApp(app, version);
|
|
4283
|
-
}
|
|
4284
3491
|
return getComponentPublicInstance(vnode.component);
|
|
4285
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4286
|
-
warn$1(
|
|
4287
|
-
`App has already been mounted.
|
|
4288
|
-
If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
|
|
4289
|
-
);
|
|
4290
3492
|
}
|
|
4291
3493
|
},
|
|
4292
3494
|
onUnmount(cleanupFn) {
|
|
4293
|
-
if (!!(process.env.NODE_ENV !== "production") && typeof cleanupFn !== "function") {
|
|
4294
|
-
warn$1(
|
|
4295
|
-
`Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
|
|
4296
|
-
);
|
|
4297
|
-
}
|
|
4298
3495
|
pluginCleanupFns.push(cleanupFn);
|
|
4299
3496
|
},
|
|
4300
3497
|
unmount() {
|
|
@@ -4305,27 +3502,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
4305
3502
|
16
|
|
4306
3503
|
);
|
|
4307
3504
|
render(null, app._container);
|
|
4308
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
4309
|
-
app._instance = null;
|
|
4310
|
-
devtoolsUnmountApp(app);
|
|
4311
|
-
}
|
|
4312
3505
|
delete app._container.__vue_app__;
|
|
4313
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4314
|
-
warn$1(`Cannot unmount an app that is not mounted.`);
|
|
4315
3506
|
}
|
|
4316
3507
|
},
|
|
4317
3508
|
provide(key, value) {
|
|
4318
|
-
if (!!(process.env.NODE_ENV !== "production") && key in context.provides) {
|
|
4319
|
-
if (hasOwn(context.provides, key)) {
|
|
4320
|
-
warn$1(
|
|
4321
|
-
`App already provides property with key "${String(key)}". It will be overwritten with the new value.`
|
|
4322
|
-
);
|
|
4323
|
-
} else {
|
|
4324
|
-
warn$1(
|
|
4325
|
-
`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
|
|
4326
|
-
);
|
|
4327
|
-
}
|
|
4328
|
-
}
|
|
4329
3509
|
context.provides[key] = value;
|
|
4330
3510
|
return app;
|
|
4331
3511
|
},
|
|
@@ -4350,31 +3530,6 @@ const getModelModifiers = (props, modelName) => {
|
|
|
4350
3530
|
function emit(instance, event, ...rawArgs) {
|
|
4351
3531
|
if (instance.isUnmounted) return;
|
|
4352
3532
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
4353
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4354
|
-
const {
|
|
4355
|
-
emitsOptions,
|
|
4356
|
-
propsOptions: [propsOptions]
|
|
4357
|
-
} = instance;
|
|
4358
|
-
if (emitsOptions) {
|
|
4359
|
-
if (!(event in emitsOptions) && true) {
|
|
4360
|
-
if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
|
|
4361
|
-
warn$1(
|
|
4362
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
4363
|
-
);
|
|
4364
|
-
}
|
|
4365
|
-
} else {
|
|
4366
|
-
const validator = emitsOptions[event];
|
|
4367
|
-
if (isFunction(validator)) {
|
|
4368
|
-
const isValid = validator(...rawArgs);
|
|
4369
|
-
if (!isValid) {
|
|
4370
|
-
warn$1(
|
|
4371
|
-
`Invalid event arguments: event validation failed for event "${event}".`
|
|
4372
|
-
);
|
|
4373
|
-
}
|
|
4374
|
-
}
|
|
4375
|
-
}
|
|
4376
|
-
}
|
|
4377
|
-
}
|
|
4378
3533
|
let args = rawArgs;
|
|
4379
3534
|
const isModelListener = event.startsWith("update:");
|
|
4380
3535
|
const modifiers = isModelListener && getModelModifiers(props, event.slice(7));
|
|
@@ -4386,22 +3541,6 @@ function emit(instance, event, ...rawArgs) {
|
|
|
4386
3541
|
args = rawArgs.map(looseToNumber);
|
|
4387
3542
|
}
|
|
4388
3543
|
}
|
|
4389
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
4390
|
-
devtoolsComponentEmit(instance, event, args);
|
|
4391
|
-
}
|
|
4392
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4393
|
-
const lowerCaseEvent = event.toLowerCase();
|
|
4394
|
-
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
|
|
4395
|
-
warn$1(
|
|
4396
|
-
`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
|
|
4397
|
-
instance,
|
|
4398
|
-
instance.type
|
|
4399
|
-
)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(
|
|
4400
|
-
event
|
|
4401
|
-
)}" instead of "${event}".`
|
|
4402
|
-
);
|
|
4403
|
-
}
|
|
4404
|
-
}
|
|
4405
3544
|
let handlerName;
|
|
4406
3545
|
let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
|
|
4407
3546
|
props[handlerName = toHandlerKey(camelize(event))];
|
|
@@ -4434,7 +3573,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
4434
3573
|
}
|
|
4435
3574
|
const mixinEmitsCache = /* @__PURE__ */ new WeakMap();
|
|
4436
3575
|
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
4437
|
-
const cache =
|
|
3576
|
+
const cache = asMixin ? mixinEmitsCache : appContext.emitsCache;
|
|
4438
3577
|
const cached = cache.get(comp);
|
|
4439
3578
|
if (cached !== void 0) {
|
|
4440
3579
|
return cached;
|
|
@@ -4442,7 +3581,7 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
|
4442
3581
|
const raw = comp.emits;
|
|
4443
3582
|
let normalized = {};
|
|
4444
3583
|
let hasExtends = false;
|
|
4445
|
-
if (
|
|
3584
|
+
if (!isFunction(comp)) {
|
|
4446
3585
|
const extendEmits = (raw2) => {
|
|
4447
3586
|
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
|
|
4448
3587
|
if (normalizedFromExtend) {
|
|
@@ -4483,10 +3622,7 @@ function isEmitListener(options, key) {
|
|
|
4483
3622
|
key = key.slice(2).replace(/Once$/, "");
|
|
4484
3623
|
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
4485
3624
|
}
|
|
4486
|
-
|
|
4487
|
-
let accessedAttrs = false;
|
|
4488
3625
|
function markAttrsAccessed() {
|
|
4489
|
-
accessedAttrs = true;
|
|
4490
3626
|
}
|
|
4491
3627
|
function renderComponentRoot(instance) {
|
|
4492
3628
|
const {
|
|
@@ -4509,13 +3645,10 @@ function renderComponentRoot(instance) {
|
|
|
4509
3645
|
const prev = setCurrentRenderingInstance(instance);
|
|
4510
3646
|
let result;
|
|
4511
3647
|
let fallthroughAttrs;
|
|
4512
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4513
|
-
accessedAttrs = false;
|
|
4514
|
-
}
|
|
4515
3648
|
try {
|
|
4516
3649
|
if (vnode.shapeFlag & 4) {
|
|
4517
3650
|
const proxyToUse = withProxy || proxy;
|
|
4518
|
-
const thisProxy = !!(
|
|
3651
|
+
const thisProxy = !!("production" !== "production") && setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
4519
3652
|
get(target, key, receiver) {
|
|
4520
3653
|
warn$1(
|
|
4521
3654
|
`Property '${String(
|
|
@@ -4530,7 +3663,7 @@ function renderComponentRoot(instance) {
|
|
|
4530
3663
|
thisProxy,
|
|
4531
3664
|
proxyToUse,
|
|
4532
3665
|
renderCache,
|
|
4533
|
-
!!(
|
|
3666
|
+
!!("production" !== "production") ? shallowReadonly(props) : props,
|
|
4534
3667
|
setupState,
|
|
4535
3668
|
data,
|
|
4536
3669
|
ctx
|
|
@@ -4539,13 +3672,11 @@ function renderComponentRoot(instance) {
|
|
|
4539
3672
|
fallthroughAttrs = attrs;
|
|
4540
3673
|
} else {
|
|
4541
3674
|
const render2 = Component;
|
|
4542
|
-
if (!!(
|
|
4543
|
-
markAttrsAccessed();
|
|
4544
|
-
}
|
|
3675
|
+
if (!!("production" !== "production") && attrs === props) ;
|
|
4545
3676
|
result = normalizeVNode(
|
|
4546
3677
|
render2.length > 1 ? render2(
|
|
4547
|
-
!!(
|
|
4548
|
-
!!(
|
|
3678
|
+
!!("production" !== "production") ? shallowReadonly(props) : props,
|
|
3679
|
+
!!("production" !== "production") ? {
|
|
4549
3680
|
get attrs() {
|
|
4550
3681
|
markAttrsAccessed();
|
|
4551
3682
|
return shallowReadonly(attrs);
|
|
@@ -4554,7 +3685,7 @@ function renderComponentRoot(instance) {
|
|
|
4554
3685
|
emit
|
|
4555
3686
|
} : { attrs, slots, emit }
|
|
4556
3687
|
) : render2(
|
|
4557
|
-
!!(
|
|
3688
|
+
!!("production" !== "production") ? shallowReadonly(props) : props,
|
|
4558
3689
|
null
|
|
4559
3690
|
)
|
|
4560
3691
|
);
|
|
@@ -4566,10 +3697,6 @@ function renderComponentRoot(instance) {
|
|
|
4566
3697
|
result = createVNode(Comment);
|
|
4567
3698
|
}
|
|
4568
3699
|
let root = result;
|
|
4569
|
-
let setRoot = void 0;
|
|
4570
|
-
if (!!(process.env.NODE_ENV !== "production") && result.patchFlag > 0 && result.patchFlag & 2048) {
|
|
4571
|
-
[root, setRoot] = getChildRoot(result);
|
|
4572
|
-
}
|
|
4573
3700
|
if (fallthroughAttrs && inheritAttrs !== false) {
|
|
4574
3701
|
const keys = Object.keys(fallthroughAttrs);
|
|
4575
3702
|
const { shapeFlag } = root;
|
|
@@ -4582,102 +3709,22 @@ function renderComponentRoot(instance) {
|
|
|
4582
3709
|
);
|
|
4583
3710
|
}
|
|
4584
3711
|
root = cloneVNode(root, fallthroughAttrs, false, true);
|
|
4585
|
-
} else if (!!(process.env.NODE_ENV !== "production") && !accessedAttrs && root.type !== Comment) {
|
|
4586
|
-
const allAttrs = Object.keys(attrs);
|
|
4587
|
-
const eventAttrs = [];
|
|
4588
|
-
const extraAttrs = [];
|
|
4589
|
-
for (let i = 0, l = allAttrs.length; i < l; i++) {
|
|
4590
|
-
const key = allAttrs[i];
|
|
4591
|
-
if (isOn(key)) {
|
|
4592
|
-
if (!isModelListener(key)) {
|
|
4593
|
-
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
|
|
4594
|
-
}
|
|
4595
|
-
} else {
|
|
4596
|
-
extraAttrs.push(key);
|
|
4597
|
-
}
|
|
4598
|
-
}
|
|
4599
|
-
if (extraAttrs.length) {
|
|
4600
|
-
warn$1(
|
|
4601
|
-
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
|
|
4602
|
-
);
|
|
4603
|
-
}
|
|
4604
|
-
if (eventAttrs.length) {
|
|
4605
|
-
warn$1(
|
|
4606
|
-
`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
|
|
4607
|
-
);
|
|
4608
|
-
}
|
|
4609
3712
|
}
|
|
4610
3713
|
}
|
|
4611
3714
|
}
|
|
4612
3715
|
if (vnode.dirs) {
|
|
4613
|
-
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) {
|
|
4614
|
-
warn$1(
|
|
4615
|
-
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
4616
|
-
);
|
|
4617
|
-
}
|
|
4618
3716
|
root = cloneVNode(root, null, false, true);
|
|
4619
3717
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
4620
3718
|
}
|
|
4621
3719
|
if (vnode.transition) {
|
|
4622
|
-
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) {
|
|
4623
|
-
warn$1(
|
|
4624
|
-
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
4625
|
-
);
|
|
4626
|
-
}
|
|
4627
3720
|
setTransitionHooks(root, vnode.transition);
|
|
4628
3721
|
}
|
|
4629
|
-
|
|
4630
|
-
setRoot(root);
|
|
4631
|
-
} else {
|
|
3722
|
+
{
|
|
4632
3723
|
result = root;
|
|
4633
3724
|
}
|
|
4634
3725
|
setCurrentRenderingInstance(prev);
|
|
4635
3726
|
return result;
|
|
4636
3727
|
}
|
|
4637
|
-
const getChildRoot = (vnode) => {
|
|
4638
|
-
const rawChildren = vnode.children;
|
|
4639
|
-
const dynamicChildren = vnode.dynamicChildren;
|
|
4640
|
-
const childRoot = filterSingleRoot(rawChildren, false);
|
|
4641
|
-
if (!childRoot) {
|
|
4642
|
-
return [vnode, void 0];
|
|
4643
|
-
} else if (!!(process.env.NODE_ENV !== "production") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {
|
|
4644
|
-
return getChildRoot(childRoot);
|
|
4645
|
-
}
|
|
4646
|
-
const index = rawChildren.indexOf(childRoot);
|
|
4647
|
-
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
|
|
4648
|
-
const setRoot = (updatedRoot) => {
|
|
4649
|
-
rawChildren[index] = updatedRoot;
|
|
4650
|
-
if (dynamicChildren) {
|
|
4651
|
-
if (dynamicIndex > -1) {
|
|
4652
|
-
dynamicChildren[dynamicIndex] = updatedRoot;
|
|
4653
|
-
} else if (updatedRoot.patchFlag > 0) {
|
|
4654
|
-
vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
|
|
4655
|
-
}
|
|
4656
|
-
}
|
|
4657
|
-
};
|
|
4658
|
-
return [normalizeVNode(childRoot), setRoot];
|
|
4659
|
-
};
|
|
4660
|
-
function filterSingleRoot(children, recurse = true) {
|
|
4661
|
-
let singleRoot;
|
|
4662
|
-
for (let i = 0; i < children.length; i++) {
|
|
4663
|
-
const child = children[i];
|
|
4664
|
-
if (isVNode(child)) {
|
|
4665
|
-
if (child.type !== Comment || child.children === "v-if") {
|
|
4666
|
-
if (singleRoot) {
|
|
4667
|
-
return;
|
|
4668
|
-
} else {
|
|
4669
|
-
singleRoot = child;
|
|
4670
|
-
if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {
|
|
4671
|
-
return filterSingleRoot(singleRoot.children);
|
|
4672
|
-
}
|
|
4673
|
-
}
|
|
4674
|
-
}
|
|
4675
|
-
} else {
|
|
4676
|
-
return;
|
|
4677
|
-
}
|
|
4678
|
-
}
|
|
4679
|
-
return singleRoot;
|
|
4680
|
-
}
|
|
4681
3728
|
const getFunctionalFallthrough = (attrs) => {
|
|
4682
3729
|
let res;
|
|
4683
3730
|
for (const key in attrs) {
|
|
@@ -4696,16 +3743,10 @@ const filterModelListeners = (attrs, props) => {
|
|
|
4696
3743
|
}
|
|
4697
3744
|
return res;
|
|
4698
3745
|
};
|
|
4699
|
-
const isElementRoot = (vnode) => {
|
|
4700
|
-
return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
|
|
4701
|
-
};
|
|
4702
3746
|
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
|
|
4703
3747
|
const { props: prevProps, children: prevChildren, component } = prevVNode;
|
|
4704
3748
|
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
|
|
4705
3749
|
const emits = component.emitsOptions;
|
|
4706
|
-
if (!!(process.env.NODE_ENV !== "production") && (prevChildren || nextChildren) && isHmrUpdating) {
|
|
4707
|
-
return true;
|
|
4708
|
-
}
|
|
4709
3750
|
if (nextVNode.dirs || nextVNode.transition) {
|
|
4710
3751
|
return true;
|
|
4711
3752
|
}
|
|
@@ -4796,9 +3837,6 @@ function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
|
4796
3837
|
props[key] = void 0;
|
|
4797
3838
|
}
|
|
4798
3839
|
}
|
|
4799
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4800
|
-
validateProps(rawProps || {}, props, instance);
|
|
4801
|
-
}
|
|
4802
3840
|
if (isStateful) {
|
|
4803
3841
|
instance.props = isSSR ? props : shallowReactive(props);
|
|
4804
3842
|
} else {
|
|
@@ -4810,12 +3848,6 @@ function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
|
4810
3848
|
}
|
|
4811
3849
|
instance.attrs = attrs;
|
|
4812
3850
|
}
|
|
4813
|
-
function isInHmrContext(instance) {
|
|
4814
|
-
while (instance) {
|
|
4815
|
-
if (instance.type.__hmrId) return true;
|
|
4816
|
-
instance = instance.parent;
|
|
4817
|
-
}
|
|
4818
|
-
}
|
|
4819
3851
|
function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
4820
3852
|
const {
|
|
4821
3853
|
props,
|
|
@@ -4829,7 +3861,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
4829
3861
|
// always force full diff in dev
|
|
4830
3862
|
// - #1942 if hmr is enabled with sfc component
|
|
4831
3863
|
// - vite#872 non-sfc component used by sfc component
|
|
4832
|
-
|
|
3864
|
+
(optimized || patchFlag > 0) && !(patchFlag & 16)
|
|
4833
3865
|
) {
|
|
4834
3866
|
if (patchFlag & 8) {
|
|
4835
3867
|
const propsToUpdate = instance.vnode.dynamicProps;
|
|
@@ -4904,9 +3936,6 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
4904
3936
|
if (hasAttrsChanged) {
|
|
4905
3937
|
trigger(instance.attrs, "set", "");
|
|
4906
3938
|
}
|
|
4907
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4908
|
-
validateProps(rawProps || {}, props, instance);
|
|
4909
|
-
}
|
|
4910
3939
|
}
|
|
4911
3940
|
function setFullProps(instance, rawProps, props, attrs) {
|
|
4912
3941
|
const [options, needCastKeys] = instance.propsOptions;
|
|
@@ -4987,7 +4016,7 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
|
4987
4016
|
}
|
|
4988
4017
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
4989
4018
|
function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
4990
|
-
const cache =
|
|
4019
|
+
const cache = asMixin ? mixinPropsCache : appContext.propsCache;
|
|
4991
4020
|
const cached = cache.get(comp);
|
|
4992
4021
|
if (cached) {
|
|
4993
4022
|
return cached;
|
|
@@ -4996,7 +4025,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
4996
4025
|
const normalized = {};
|
|
4997
4026
|
const needCastKeys = [];
|
|
4998
4027
|
let hasExtends = false;
|
|
4999
|
-
if (
|
|
4028
|
+
if (!isFunction(comp)) {
|
|
5000
4029
|
const extendProps = (raw2) => {
|
|
5001
4030
|
hasExtends = true;
|
|
5002
4031
|
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
@@ -5021,18 +4050,12 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
5021
4050
|
}
|
|
5022
4051
|
if (isArray(raw)) {
|
|
5023
4052
|
for (let i = 0; i < raw.length; i++) {
|
|
5024
|
-
if (!!(process.env.NODE_ENV !== "production") && !isString(raw[i])) {
|
|
5025
|
-
warn$1(`props must be strings when using array syntax.`, raw[i]);
|
|
5026
|
-
}
|
|
5027
4053
|
const normalizedKey = camelize(raw[i]);
|
|
5028
4054
|
if (validatePropName(normalizedKey)) {
|
|
5029
4055
|
normalized[normalizedKey] = EMPTY_OBJ;
|
|
5030
4056
|
}
|
|
5031
4057
|
}
|
|
5032
4058
|
} else if (raw) {
|
|
5033
|
-
if (!!(process.env.NODE_ENV !== "production") && !isObject(raw)) {
|
|
5034
|
-
warn$1(`invalid props options`, raw);
|
|
5035
|
-
}
|
|
5036
4059
|
for (const key in raw) {
|
|
5037
4060
|
const normalizedKey = camelize(key);
|
|
5038
4061
|
if (validatePropName(normalizedKey)) {
|
|
@@ -5072,126 +4095,9 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
5072
4095
|
function validatePropName(key) {
|
|
5073
4096
|
if (key[0] !== "$" && !isReservedProp(key)) {
|
|
5074
4097
|
return true;
|
|
5075
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
5076
|
-
warn$1(`Invalid prop name: "${key}" is a reserved property.`);
|
|
5077
4098
|
}
|
|
5078
4099
|
return false;
|
|
5079
4100
|
}
|
|
5080
|
-
function getType(ctor) {
|
|
5081
|
-
if (ctor === null) {
|
|
5082
|
-
return "null";
|
|
5083
|
-
}
|
|
5084
|
-
if (typeof ctor === "function") {
|
|
5085
|
-
return ctor.name || "";
|
|
5086
|
-
} else if (typeof ctor === "object") {
|
|
5087
|
-
const name = ctor.constructor && ctor.constructor.name;
|
|
5088
|
-
return name || "";
|
|
5089
|
-
}
|
|
5090
|
-
return "";
|
|
5091
|
-
}
|
|
5092
|
-
function validateProps(rawProps, props, instance) {
|
|
5093
|
-
const resolvedValues = toRaw(props);
|
|
5094
|
-
const options = instance.propsOptions[0];
|
|
5095
|
-
const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
|
|
5096
|
-
for (const key in options) {
|
|
5097
|
-
let opt = options[key];
|
|
5098
|
-
if (opt == null) continue;
|
|
5099
|
-
validateProp(
|
|
5100
|
-
key,
|
|
5101
|
-
resolvedValues[key],
|
|
5102
|
-
opt,
|
|
5103
|
-
!!(process.env.NODE_ENV !== "production") ? shallowReadonly(resolvedValues) : resolvedValues,
|
|
5104
|
-
!camelizePropsKey.includes(key)
|
|
5105
|
-
);
|
|
5106
|
-
}
|
|
5107
|
-
}
|
|
5108
|
-
function validateProp(name, value, prop, props, isAbsent) {
|
|
5109
|
-
const { type, required, validator, skipCheck } = prop;
|
|
5110
|
-
if (required && isAbsent) {
|
|
5111
|
-
warn$1('Missing required prop: "' + name + '"');
|
|
5112
|
-
return;
|
|
5113
|
-
}
|
|
5114
|
-
if (value == null && !required) {
|
|
5115
|
-
return;
|
|
5116
|
-
}
|
|
5117
|
-
if (type != null && type !== true && !skipCheck) {
|
|
5118
|
-
let isValid = false;
|
|
5119
|
-
const types = isArray(type) ? type : [type];
|
|
5120
|
-
const expectedTypes = [];
|
|
5121
|
-
for (let i = 0; i < types.length && !isValid; i++) {
|
|
5122
|
-
const { valid, expectedType } = assertType(value, types[i]);
|
|
5123
|
-
expectedTypes.push(expectedType || "");
|
|
5124
|
-
isValid = valid;
|
|
5125
|
-
}
|
|
5126
|
-
if (!isValid) {
|
|
5127
|
-
warn$1(getInvalidTypeMessage(name, value, expectedTypes));
|
|
5128
|
-
return;
|
|
5129
|
-
}
|
|
5130
|
-
}
|
|
5131
|
-
if (validator && !validator(value, props)) {
|
|
5132
|
-
warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
5133
|
-
}
|
|
5134
|
-
}
|
|
5135
|
-
const isSimpleType = /* @__PURE__ */ makeMap(
|
|
5136
|
-
"String,Number,Boolean,Function,Symbol,BigInt"
|
|
5137
|
-
);
|
|
5138
|
-
function assertType(value, type) {
|
|
5139
|
-
let valid;
|
|
5140
|
-
const expectedType = getType(type);
|
|
5141
|
-
if (expectedType === "null") {
|
|
5142
|
-
valid = value === null;
|
|
5143
|
-
} else if (isSimpleType(expectedType)) {
|
|
5144
|
-
const t = typeof value;
|
|
5145
|
-
valid = t === expectedType.toLowerCase();
|
|
5146
|
-
if (!valid && t === "object") {
|
|
5147
|
-
valid = value instanceof type;
|
|
5148
|
-
}
|
|
5149
|
-
} else if (expectedType === "Object") {
|
|
5150
|
-
valid = isObject(value);
|
|
5151
|
-
} else if (expectedType === "Array") {
|
|
5152
|
-
valid = isArray(value);
|
|
5153
|
-
} else {
|
|
5154
|
-
valid = value instanceof type;
|
|
5155
|
-
}
|
|
5156
|
-
return {
|
|
5157
|
-
valid,
|
|
5158
|
-
expectedType
|
|
5159
|
-
};
|
|
5160
|
-
}
|
|
5161
|
-
function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
5162
|
-
if (expectedTypes.length === 0) {
|
|
5163
|
-
return `Prop type [] for prop "${name}" won't match anything. Did you mean to use type Array instead?`;
|
|
5164
|
-
}
|
|
5165
|
-
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
|
|
5166
|
-
const expectedType = expectedTypes[0];
|
|
5167
|
-
const receivedType = toRawType(value);
|
|
5168
|
-
const expectedValue = styleValue(value, expectedType);
|
|
5169
|
-
const receivedValue = styleValue(value, receivedType);
|
|
5170
|
-
if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
|
|
5171
|
-
message += ` with value ${expectedValue}`;
|
|
5172
|
-
}
|
|
5173
|
-
message += `, got ${receivedType} `;
|
|
5174
|
-
if (isExplicable(receivedType)) {
|
|
5175
|
-
message += `with value ${receivedValue}.`;
|
|
5176
|
-
}
|
|
5177
|
-
return message;
|
|
5178
|
-
}
|
|
5179
|
-
function styleValue(value, type) {
|
|
5180
|
-
if (type === "String") {
|
|
5181
|
-
return `"${value}"`;
|
|
5182
|
-
} else if (type === "Number") {
|
|
5183
|
-
return `${Number(value)}`;
|
|
5184
|
-
} else {
|
|
5185
|
-
return `${value}`;
|
|
5186
|
-
}
|
|
5187
|
-
}
|
|
5188
|
-
function isExplicable(type) {
|
|
5189
|
-
const explicitTypes = ["string", "number", "boolean"];
|
|
5190
|
-
return explicitTypes.some((elem) => type.toLowerCase() === elem);
|
|
5191
|
-
}
|
|
5192
|
-
function isBoolean(...args) {
|
|
5193
|
-
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
5194
|
-
}
|
|
5195
4101
|
|
|
5196
4102
|
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
5197
4103
|
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
@@ -5200,11 +4106,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
|
|
|
5200
4106
|
return rawSlot;
|
|
5201
4107
|
}
|
|
5202
4108
|
const normalized = withCtx((...args) => {
|
|
5203
|
-
if (!!(
|
|
5204
|
-
warn$1(
|
|
5205
|
-
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
|
5206
|
-
);
|
|
5207
|
-
}
|
|
4109
|
+
if (!!("production" !== "production") && currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) ;
|
|
5208
4110
|
return normalizeSlotValue(rawSlot(...args));
|
|
5209
4111
|
}, ctx);
|
|
5210
4112
|
normalized._c = false;
|
|
@@ -5218,22 +4120,12 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
|
5218
4120
|
if (isFunction(value)) {
|
|
5219
4121
|
slots[key] = normalizeSlot(key, value, ctx);
|
|
5220
4122
|
} else if (value != null) {
|
|
5221
|
-
if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
5222
|
-
warn$1(
|
|
5223
|
-
`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
|
|
5224
|
-
);
|
|
5225
|
-
}
|
|
5226
4123
|
const normalized = normalizeSlotValue(value);
|
|
5227
4124
|
slots[key] = () => normalized;
|
|
5228
4125
|
}
|
|
5229
4126
|
}
|
|
5230
4127
|
};
|
|
5231
4128
|
const normalizeVNodeSlots = (instance, children) => {
|
|
5232
|
-
if (!!(process.env.NODE_ENV !== "production") && !isKeepAlive(instance.vnode) && true) {
|
|
5233
|
-
warn$1(
|
|
5234
|
-
`Non-function value encountered for default slot. Prefer function slots for better performance.`
|
|
5235
|
-
);
|
|
5236
|
-
}
|
|
5237
4129
|
const normalized = normalizeSlotValue(children);
|
|
5238
4130
|
instance.slots.default = () => normalized;
|
|
5239
4131
|
};
|
|
@@ -5267,10 +4159,7 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
5267
4159
|
if (vnode.shapeFlag & 32) {
|
|
5268
4160
|
const type = children._;
|
|
5269
4161
|
if (type) {
|
|
5270
|
-
if (
|
|
5271
|
-
assignSlots(slots, children, optimized);
|
|
5272
|
-
trigger(instance, "set", "$slots");
|
|
5273
|
-
} else if (optimized && type === 1) {
|
|
4162
|
+
if (optimized && type === 1) {
|
|
5274
4163
|
needDeletionCheck = false;
|
|
5275
4164
|
} else {
|
|
5276
4165
|
assignSlots(slots, children, optimized);
|
|
@@ -5293,81 +4182,13 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
5293
4182
|
}
|
|
5294
4183
|
};
|
|
5295
4184
|
|
|
5296
|
-
let supported;
|
|
5297
|
-
let perf;
|
|
5298
|
-
function startMeasure(instance, type) {
|
|
5299
|
-
if (instance.appContext.config.performance && isSupported()) {
|
|
5300
|
-
perf.mark(`vue-${type}-${instance.uid}`);
|
|
5301
|
-
}
|
|
5302
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
5303
|
-
devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());
|
|
5304
|
-
}
|
|
5305
|
-
}
|
|
5306
|
-
function endMeasure(instance, type) {
|
|
5307
|
-
if (instance.appContext.config.performance && isSupported()) {
|
|
5308
|
-
const startTag = `vue-${type}-${instance.uid}`;
|
|
5309
|
-
const endTag = startTag + `:end`;
|
|
5310
|
-
const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`;
|
|
5311
|
-
perf.mark(endTag);
|
|
5312
|
-
perf.measure(measureName, startTag, endTag);
|
|
5313
|
-
perf.clearMeasures(measureName);
|
|
5314
|
-
perf.clearMarks(startTag);
|
|
5315
|
-
perf.clearMarks(endTag);
|
|
5316
|
-
}
|
|
5317
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
5318
|
-
devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());
|
|
5319
|
-
}
|
|
5320
|
-
}
|
|
5321
|
-
function isSupported() {
|
|
5322
|
-
if (supported !== void 0) {
|
|
5323
|
-
return supported;
|
|
5324
|
-
}
|
|
5325
|
-
if (typeof window !== "undefined" && window.performance) {
|
|
5326
|
-
supported = true;
|
|
5327
|
-
perf = window.performance;
|
|
5328
|
-
} else {
|
|
5329
|
-
supported = false;
|
|
5330
|
-
}
|
|
5331
|
-
return supported;
|
|
5332
|
-
}
|
|
5333
|
-
|
|
5334
|
-
function initFeatureFlags() {
|
|
5335
|
-
const needWarn = [];
|
|
5336
|
-
if (typeof __VUE_OPTIONS_API__ !== "boolean") {
|
|
5337
|
-
!!(process.env.NODE_ENV !== "production") && needWarn.push(`__VUE_OPTIONS_API__`);
|
|
5338
|
-
getGlobalThis().__VUE_OPTIONS_API__ = true;
|
|
5339
|
-
}
|
|
5340
|
-
if (typeof __VUE_PROD_DEVTOOLS__ !== "boolean") {
|
|
5341
|
-
!!(process.env.NODE_ENV !== "production") && needWarn.push(`__VUE_PROD_DEVTOOLS__`);
|
|
5342
|
-
getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;
|
|
5343
|
-
}
|
|
5344
|
-
if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== "boolean") {
|
|
5345
|
-
!!(process.env.NODE_ENV !== "production") && needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`);
|
|
5346
|
-
getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;
|
|
5347
|
-
}
|
|
5348
|
-
if (!!(process.env.NODE_ENV !== "production") && needWarn.length) {
|
|
5349
|
-
const multi = needWarn.length > 1;
|
|
5350
|
-
console.warn(
|
|
5351
|
-
`Feature flag${multi ? `s` : ``} ${needWarn.join(", ")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
|
|
5352
|
-
|
|
5353
|
-
For more details, see https://link.vuejs.org/feature-flags.`
|
|
5354
|
-
);
|
|
5355
|
-
}
|
|
5356
|
-
}
|
|
5357
|
-
|
|
5358
4185
|
const queuePostRenderEffect = queueEffectWithSuspense ;
|
|
5359
4186
|
function createRenderer(options) {
|
|
5360
4187
|
return baseCreateRenderer(options);
|
|
5361
4188
|
}
|
|
5362
4189
|
function baseCreateRenderer(options, createHydrationFns) {
|
|
5363
|
-
{
|
|
5364
|
-
initFeatureFlags();
|
|
5365
|
-
}
|
|
5366
4190
|
const target = getGlobalThis();
|
|
5367
4191
|
target.__VUE__ = true;
|
|
5368
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
5369
|
-
setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
|
|
5370
|
-
}
|
|
5371
4192
|
const {
|
|
5372
4193
|
insert: hostInsert,
|
|
5373
4194
|
remove: hostRemove,
|
|
@@ -5382,7 +4203,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5382
4203
|
setScopeId: hostSetScopeId = NOOP,
|
|
5383
4204
|
insertStaticContent: hostInsertStaticContent
|
|
5384
4205
|
} = options;
|
|
5385
|
-
const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!
|
|
4206
|
+
const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => {
|
|
5386
4207
|
if (n1 === n2) {
|
|
5387
4208
|
return;
|
|
5388
4209
|
}
|
|
@@ -5406,8 +4227,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5406
4227
|
case Static:
|
|
5407
4228
|
if (n1 == null) {
|
|
5408
4229
|
mountStaticNode(n2, container, anchor, namespace);
|
|
5409
|
-
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
5410
|
-
patchStaticNode(n1, n2, container, namespace);
|
|
5411
4230
|
}
|
|
5412
4231
|
break;
|
|
5413
4232
|
case Fragment:
|
|
@@ -5474,9 +4293,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5474
4293
|
optimized,
|
|
5475
4294
|
internals
|
|
5476
4295
|
);
|
|
5477
|
-
} else
|
|
5478
|
-
warn$1("Invalid VNode type:", type, `(${typeof type})`);
|
|
5479
|
-
}
|
|
4296
|
+
} else ;
|
|
5480
4297
|
}
|
|
5481
4298
|
if (ref != null && parentComponent) {
|
|
5482
4299
|
setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
|
|
@@ -5519,21 +4336,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5519
4336
|
n2.anchor
|
|
5520
4337
|
);
|
|
5521
4338
|
};
|
|
5522
|
-
const patchStaticNode = (n1, n2, container, namespace) => {
|
|
5523
|
-
if (n2.children !== n1.children) {
|
|
5524
|
-
const anchor = hostNextSibling(n1.anchor);
|
|
5525
|
-
removeStaticNode(n1);
|
|
5526
|
-
[n2.el, n2.anchor] = hostInsertStaticContent(
|
|
5527
|
-
n2.children,
|
|
5528
|
-
container,
|
|
5529
|
-
anchor,
|
|
5530
|
-
namespace
|
|
5531
|
-
);
|
|
5532
|
-
} else {
|
|
5533
|
-
n2.el = n1.el;
|
|
5534
|
-
n2.anchor = n1.anchor;
|
|
5535
|
-
}
|
|
5536
|
-
};
|
|
5537
4339
|
const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
|
|
5538
4340
|
let next;
|
|
5539
4341
|
while (el && el !== anchor) {
|
|
@@ -5632,10 +4434,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5632
4434
|
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
5633
4435
|
}
|
|
5634
4436
|
}
|
|
5635
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
5636
|
-
def(el, "__vnode", vnode, true);
|
|
5637
|
-
def(el, "__vueParentComponent", parentComponent, true);
|
|
5638
|
-
}
|
|
5639
4437
|
if (dirs) {
|
|
5640
4438
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
5641
4439
|
}
|
|
@@ -5663,9 +4461,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5663
4461
|
}
|
|
5664
4462
|
if (parentComponent) {
|
|
5665
4463
|
let subTree = parentComponent.subTree;
|
|
5666
|
-
if (!!(process.env.NODE_ENV !== "production") && subTree.patchFlag > 0 && subTree.patchFlag & 2048) {
|
|
5667
|
-
subTree = filterSingleRoot(subTree.children) || subTree;
|
|
5668
|
-
}
|
|
5669
4464
|
if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
|
|
5670
4465
|
const parentVNode = parentComponent.vnode;
|
|
5671
4466
|
setScopeId(
|
|
@@ -5696,9 +4491,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5696
4491
|
};
|
|
5697
4492
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
5698
4493
|
const el = n2.el = n1.el;
|
|
5699
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
5700
|
-
el.__vnode = n2;
|
|
5701
|
-
}
|
|
5702
4494
|
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
5703
4495
|
patchFlag |= n1.patchFlag & 16;
|
|
5704
4496
|
const oldProps = n1.props || EMPTY_OBJ;
|
|
@@ -5712,11 +4504,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5712
4504
|
invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
5713
4505
|
}
|
|
5714
4506
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
5715
|
-
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
|
|
5716
|
-
patchFlag = 0;
|
|
5717
|
-
optimized = false;
|
|
5718
|
-
dynamicChildren = null;
|
|
5719
|
-
}
|
|
5720
4507
|
if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {
|
|
5721
4508
|
hostSetElementText(el, "");
|
|
5722
4509
|
}
|
|
@@ -5730,9 +4517,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5730
4517
|
resolveChildrenNamespace(n2, namespace),
|
|
5731
4518
|
slotScopeIds
|
|
5732
4519
|
);
|
|
5733
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
5734
|
-
traverseStaticChildren(n1, n2);
|
|
5735
|
-
}
|
|
5736
4520
|
} else if (!optimized) {
|
|
5737
4521
|
patchChildren(
|
|
5738
4522
|
n1,
|
|
@@ -5849,12 +4633,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5849
4633
|
const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
|
|
5850
4634
|
const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
|
|
5851
4635
|
let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
|
|
5852
|
-
if (!!(process.env.NODE_ENV !== "production") && // #5523 dev root fragment may inherit directives
|
|
5853
|
-
(isHmrUpdating || patchFlag & 2048)) {
|
|
5854
|
-
patchFlag = 0;
|
|
5855
|
-
optimized = false;
|
|
5856
|
-
dynamicChildren = null;
|
|
5857
|
-
}
|
|
5858
4636
|
if (fragmentSlotScopeIds) {
|
|
5859
4637
|
slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
5860
4638
|
}
|
|
@@ -5888,9 +4666,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5888
4666
|
namespace,
|
|
5889
4667
|
slotScopeIds
|
|
5890
4668
|
);
|
|
5891
|
-
if (
|
|
5892
|
-
traverseStaticChildren(n1, n2);
|
|
5893
|
-
} else if (
|
|
4669
|
+
if (
|
|
5894
4670
|
// #2080 if the stable fragment has a key, it's a <template v-for> that may
|
|
5895
4671
|
// get moved around. Make sure all root level vnodes inherit el.
|
|
5896
4672
|
// #2134 or if it's a component root, it may also get moved around
|
|
@@ -5951,26 +4727,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5951
4727
|
parentComponent,
|
|
5952
4728
|
parentSuspense
|
|
5953
4729
|
));
|
|
5954
|
-
if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) {
|
|
5955
|
-
registerHMR(instance);
|
|
5956
|
-
}
|
|
5957
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
5958
|
-
pushWarningContext(initialVNode);
|
|
5959
|
-
startMeasure(instance, `mount`);
|
|
5960
|
-
}
|
|
5961
4730
|
if (isKeepAlive(initialVNode)) {
|
|
5962
4731
|
instance.ctx.renderer = internals;
|
|
5963
4732
|
}
|
|
5964
4733
|
{
|
|
5965
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
5966
|
-
startMeasure(instance, `init`);
|
|
5967
|
-
}
|
|
5968
4734
|
setupComponent(instance, false, optimized);
|
|
5969
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
5970
|
-
endMeasure(instance, `init`);
|
|
5971
|
-
}
|
|
5972
4735
|
}
|
|
5973
|
-
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
|
|
5974
4736
|
if (instance.asyncDep) {
|
|
5975
4737
|
parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
|
|
5976
4738
|
if (!initialVNode.el) {
|
|
@@ -5989,22 +4751,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5989
4751
|
optimized
|
|
5990
4752
|
);
|
|
5991
4753
|
}
|
|
5992
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
5993
|
-
popWarningContext();
|
|
5994
|
-
endMeasure(instance, `mount`);
|
|
5995
|
-
}
|
|
5996
4754
|
};
|
|
5997
4755
|
const updateComponent = (n1, n2, optimized) => {
|
|
5998
4756
|
const instance = n2.component = n1.component;
|
|
5999
4757
|
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
6000
4758
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
6001
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6002
|
-
pushWarningContext(n2);
|
|
6003
|
-
}
|
|
6004
4759
|
updateComponentPreRender(instance, n2, optimized);
|
|
6005
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6006
|
-
popWarningContext();
|
|
6007
|
-
}
|
|
6008
4760
|
return;
|
|
6009
4761
|
} else {
|
|
6010
4762
|
instance.next = n2;
|
|
@@ -6037,16 +4789,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6037
4789
|
instance.parent ? instance.parent.type : void 0
|
|
6038
4790
|
);
|
|
6039
4791
|
}
|
|
6040
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6041
|
-
startMeasure(instance, `render`);
|
|
6042
|
-
}
|
|
6043
4792
|
const subTree = instance.subTree = renderComponentRoot(instance);
|
|
6044
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6045
|
-
endMeasure(instance, `render`);
|
|
6046
|
-
}
|
|
6047
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6048
|
-
startMeasure(instance, `patch`);
|
|
6049
|
-
}
|
|
6050
4793
|
patch(
|
|
6051
4794
|
null,
|
|
6052
4795
|
subTree,
|
|
@@ -6056,9 +4799,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6056
4799
|
parentSuspense,
|
|
6057
4800
|
namespace
|
|
6058
4801
|
);
|
|
6059
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6060
|
-
endMeasure(instance, `patch`);
|
|
6061
|
-
}
|
|
6062
4802
|
initialVNode.el = subTree.el;
|
|
6063
4803
|
}
|
|
6064
4804
|
if (m) {
|
|
@@ -6075,9 +4815,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6075
4815
|
instance.a && queuePostRenderEffect(instance.a, parentSuspense);
|
|
6076
4816
|
}
|
|
6077
4817
|
instance.isMounted = true;
|
|
6078
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
6079
|
-
devtoolsComponentAdded(instance);
|
|
6080
|
-
}
|
|
6081
4818
|
initialVNode = container = anchor = null;
|
|
6082
4819
|
} else {
|
|
6083
4820
|
let { next, bu, u, parent, vnode } = instance;
|
|
@@ -6098,9 +4835,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6098
4835
|
}
|
|
6099
4836
|
let originNext = next;
|
|
6100
4837
|
let vnodeHook;
|
|
6101
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6102
|
-
pushWarningContext(next || instance.vnode);
|
|
6103
|
-
}
|
|
6104
4838
|
toggleRecurse(instance, false);
|
|
6105
4839
|
if (next) {
|
|
6106
4840
|
next.el = vnode.el;
|
|
@@ -6115,18 +4849,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6115
4849
|
invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
6116
4850
|
}
|
|
6117
4851
|
toggleRecurse(instance, true);
|
|
6118
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6119
|
-
startMeasure(instance, `render`);
|
|
6120
|
-
}
|
|
6121
4852
|
const nextTree = renderComponentRoot(instance);
|
|
6122
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6123
|
-
endMeasure(instance, `render`);
|
|
6124
|
-
}
|
|
6125
4853
|
const prevTree = instance.subTree;
|
|
6126
4854
|
instance.subTree = nextTree;
|
|
6127
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6128
|
-
startMeasure(instance, `patch`);
|
|
6129
|
-
}
|
|
6130
4855
|
patch(
|
|
6131
4856
|
prevTree,
|
|
6132
4857
|
nextTree,
|
|
@@ -6138,9 +4863,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6138
4863
|
parentSuspense,
|
|
6139
4864
|
namespace
|
|
6140
4865
|
);
|
|
6141
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6142
|
-
endMeasure(instance, `patch`);
|
|
6143
|
-
}
|
|
6144
4866
|
next.el = nextTree.el;
|
|
6145
4867
|
if (originNext === null) {
|
|
6146
4868
|
updateHOCHostEl(instance, nextTree.el);
|
|
@@ -6154,12 +4876,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6154
4876
|
parentSuspense
|
|
6155
4877
|
);
|
|
6156
4878
|
}
|
|
6157
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
6158
|
-
devtoolsComponentUpdated(instance);
|
|
6159
|
-
}
|
|
6160
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6161
|
-
popWarningContext();
|
|
6162
|
-
}
|
|
6163
4879
|
}
|
|
6164
4880
|
};
|
|
6165
4881
|
instance.scope.on();
|
|
@@ -6171,10 +4887,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6171
4887
|
job.id = instance.uid;
|
|
6172
4888
|
effect.scheduler = () => queueJob(job);
|
|
6173
4889
|
toggleRecurse(instance, true);
|
|
6174
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6175
|
-
effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;
|
|
6176
|
-
effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;
|
|
6177
|
-
}
|
|
6178
4890
|
update();
|
|
6179
4891
|
};
|
|
6180
4892
|
const updateComponentPreRender = (instance, nextVNode, optimized) => {
|
|
@@ -6386,13 +5098,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6386
5098
|
for (i = s2; i <= e2; i++) {
|
|
6387
5099
|
const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
6388
5100
|
if (nextChild.key != null) {
|
|
6389
|
-
if (!!(process.env.NODE_ENV !== "production") && keyToNewIndexMap.has(nextChild.key)) {
|
|
6390
|
-
warn$1(
|
|
6391
|
-
`Duplicate keys found during update:`,
|
|
6392
|
-
JSON.stringify(nextChild.key),
|
|
6393
|
-
`Make sure keys are unique.`
|
|
6394
|
-
);
|
|
6395
|
-
}
|
|
6396
5101
|
keyToNewIndexMap.set(nextChild.key, i);
|
|
6397
5102
|
}
|
|
6398
5103
|
}
|
|
@@ -6620,15 +5325,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6620
5325
|
const remove = (vnode) => {
|
|
6621
5326
|
const { type, el, anchor, transition } = vnode;
|
|
6622
5327
|
if (type === Fragment) {
|
|
6623
|
-
|
|
6624
|
-
vnode.children.forEach((child) => {
|
|
6625
|
-
if (child.type === Comment) {
|
|
6626
|
-
hostRemove(child.el);
|
|
6627
|
-
} else {
|
|
6628
|
-
remove(child);
|
|
6629
|
-
}
|
|
6630
|
-
});
|
|
6631
|
-
} else {
|
|
5328
|
+
{
|
|
6632
5329
|
removeFragment(el, anchor);
|
|
6633
5330
|
}
|
|
6634
5331
|
return;
|
|
@@ -6665,9 +5362,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6665
5362
|
hostRemove(end);
|
|
6666
5363
|
};
|
|
6667
5364
|
const unmountComponent = (instance, parentSuspense, doRemove) => {
|
|
6668
|
-
if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) {
|
|
6669
|
-
unregisterHMR(instance);
|
|
6670
|
-
}
|
|
6671
5365
|
const { bum, scope, job, subTree, um, m, a } = instance;
|
|
6672
5366
|
invalidateMount(m);
|
|
6673
5367
|
invalidateMount(a);
|
|
@@ -6685,9 +5379,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6685
5379
|
queuePostRenderEffect(() => {
|
|
6686
5380
|
instance.isUnmounted = true;
|
|
6687
5381
|
}, parentSuspense);
|
|
6688
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
6689
|
-
devtoolsComponentRemoved(instance);
|
|
6690
|
-
}
|
|
6691
5382
|
};
|
|
6692
5383
|
const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
|
|
6693
5384
|
for (let i = start; i < children.length; i++) {
|
|
@@ -6790,9 +5481,6 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
6790
5481
|
if (c2.type === Comment && !c2.el) {
|
|
6791
5482
|
c2.el = c1.el;
|
|
6792
5483
|
}
|
|
6793
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6794
|
-
c2.el && (c2.el.__vnode = c2);
|
|
6795
|
-
}
|
|
6796
5484
|
}
|
|
6797
5485
|
}
|
|
6798
5486
|
}
|
|
@@ -6933,21 +5621,8 @@ function isVNode(value) {
|
|
|
6933
5621
|
return value ? value.__v_isVNode === true : false;
|
|
6934
5622
|
}
|
|
6935
5623
|
function isSameVNodeType(n1, n2) {
|
|
6936
|
-
if (!!(process.env.NODE_ENV !== "production") && n2.shapeFlag & 6 && n1.component) {
|
|
6937
|
-
const dirtyInstances = hmrDirtyComponents.get(n2.type);
|
|
6938
|
-
if (dirtyInstances && dirtyInstances.has(n1.component)) {
|
|
6939
|
-
n1.shapeFlag &= -257;
|
|
6940
|
-
n2.shapeFlag &= -513;
|
|
6941
|
-
return false;
|
|
6942
|
-
}
|
|
6943
|
-
}
|
|
6944
5624
|
return n1.type === n2.type && n1.key === n2.key;
|
|
6945
5625
|
}
|
|
6946
|
-
const createVNodeWithArgsTransform = (...args) => {
|
|
6947
|
-
return _createVNode(
|
|
6948
|
-
...args
|
|
6949
|
-
);
|
|
6950
|
-
};
|
|
6951
5626
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
6952
5627
|
const normalizeRef = ({
|
|
6953
5628
|
ref,
|
|
@@ -6997,9 +5672,6 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
6997
5672
|
} else if (children) {
|
|
6998
5673
|
vnode.shapeFlag |= isString(children) ? 8 : 16;
|
|
6999
5674
|
}
|
|
7000
|
-
if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) {
|
|
7001
|
-
warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
7002
|
-
}
|
|
7003
5675
|
if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
|
|
7004
5676
|
!isBlockNode && // has current parent block
|
|
7005
5677
|
currentBlock && // presence of a patch flag indicates this node needs patching on updates.
|
|
@@ -7013,12 +5685,9 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
7013
5685
|
}
|
|
7014
5686
|
return vnode;
|
|
7015
5687
|
}
|
|
7016
|
-
const createVNode =
|
|
5688
|
+
const createVNode = _createVNode;
|
|
7017
5689
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
7018
5690
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
7019
|
-
if (!!(process.env.NODE_ENV !== "production") && !type) {
|
|
7020
|
-
warn$1(`Invalid vnode type when creating vnode: ${type}.`);
|
|
7021
|
-
}
|
|
7022
5691
|
type = Comment;
|
|
7023
5692
|
}
|
|
7024
5693
|
if (isVNode(type)) {
|
|
@@ -7058,15 +5727,6 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
7058
5727
|
}
|
|
7059
5728
|
}
|
|
7060
5729
|
const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
|
|
7061
|
-
if (!!(process.env.NODE_ENV !== "production") && shapeFlag & 4 && isProxy(type)) {
|
|
7062
|
-
type = toRaw(type);
|
|
7063
|
-
warn$1(
|
|
7064
|
-
`Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
|
|
7065
|
-
`
|
|
7066
|
-
Component that was made reactive: `,
|
|
7067
|
-
type
|
|
7068
|
-
);
|
|
7069
|
-
}
|
|
7070
5730
|
return createBaseVNode(
|
|
7071
5731
|
type,
|
|
7072
5732
|
props,
|
|
@@ -7099,7 +5759,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
7099
5759
|
) : ref,
|
|
7100
5760
|
scopeId: vnode.scopeId,
|
|
7101
5761
|
slotScopeIds: vnode.slotScopeIds,
|
|
7102
|
-
children:
|
|
5762
|
+
children: children,
|
|
7103
5763
|
target: vnode.target,
|
|
7104
5764
|
targetStart: vnode.targetStart,
|
|
7105
5765
|
targetAnchor: vnode.targetAnchor,
|
|
@@ -7137,13 +5797,6 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
7137
5797
|
}
|
|
7138
5798
|
return cloned;
|
|
7139
5799
|
}
|
|
7140
|
-
function deepCloneVNode(vnode) {
|
|
7141
|
-
const cloned = cloneVNode(vnode);
|
|
7142
|
-
if (isArray(vnode.children)) {
|
|
7143
|
-
cloned.children = vnode.children.map(deepCloneVNode);
|
|
7144
|
-
}
|
|
7145
|
-
return cloned;
|
|
7146
|
-
}
|
|
7147
5800
|
function createTextVNode(text = " ", flag = 0) {
|
|
7148
5801
|
return createVNode(Text, null, text, flag);
|
|
7149
5802
|
}
|
|
@@ -7326,9 +5979,7 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
7326
5979
|
ec: null,
|
|
7327
5980
|
sp: null
|
|
7328
5981
|
};
|
|
7329
|
-
|
|
7330
|
-
instance.ctx = createDevRenderContext(instance);
|
|
7331
|
-
} else {
|
|
5982
|
+
{
|
|
7332
5983
|
instance.ctx = { _: instance };
|
|
7333
5984
|
}
|
|
7334
5985
|
instance.root = parent ? parent.root : instance;
|
|
@@ -7375,14 +6026,6 @@ const unsetCurrentInstance = () => {
|
|
|
7375
6026
|
currentInstance && currentInstance.scope.off();
|
|
7376
6027
|
internalSetCurrentInstance(null);
|
|
7377
6028
|
};
|
|
7378
|
-
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
7379
|
-
function validateComponentName(name, { isNativeTag }) {
|
|
7380
|
-
if (isBuiltInTag(name) || isNativeTag(name)) {
|
|
7381
|
-
warn$1(
|
|
7382
|
-
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
7383
|
-
);
|
|
7384
|
-
}
|
|
7385
|
-
}
|
|
7386
6029
|
function isStatefulComponent(instance) {
|
|
7387
6030
|
return instance.vnode.shapeFlag & 4;
|
|
7388
6031
|
}
|
|
@@ -7399,33 +6042,8 @@ function setupComponent(instance, isSSR = false, optimized = false) {
|
|
|
7399
6042
|
}
|
|
7400
6043
|
function setupStatefulComponent(instance, isSSR) {
|
|
7401
6044
|
const Component = instance.type;
|
|
7402
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7403
|
-
if (Component.name) {
|
|
7404
|
-
validateComponentName(Component.name, instance.appContext.config);
|
|
7405
|
-
}
|
|
7406
|
-
if (Component.components) {
|
|
7407
|
-
const names = Object.keys(Component.components);
|
|
7408
|
-
for (let i = 0; i < names.length; i++) {
|
|
7409
|
-
validateComponentName(names[i], instance.appContext.config);
|
|
7410
|
-
}
|
|
7411
|
-
}
|
|
7412
|
-
if (Component.directives) {
|
|
7413
|
-
const names = Object.keys(Component.directives);
|
|
7414
|
-
for (let i = 0; i < names.length; i++) {
|
|
7415
|
-
validateDirectiveName(names[i]);
|
|
7416
|
-
}
|
|
7417
|
-
}
|
|
7418
|
-
if (Component.compilerOptions && isRuntimeOnly()) {
|
|
7419
|
-
warn$1(
|
|
7420
|
-
`"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`
|
|
7421
|
-
);
|
|
7422
|
-
}
|
|
7423
|
-
}
|
|
7424
6045
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
7425
6046
|
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
7426
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7427
|
-
exposePropsOnRenderContext(instance);
|
|
7428
|
-
}
|
|
7429
6047
|
const { setup } = Component;
|
|
7430
6048
|
if (setup) {
|
|
7431
6049
|
pauseTracking();
|
|
@@ -7436,7 +6054,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7436
6054
|
instance,
|
|
7437
6055
|
0,
|
|
7438
6056
|
[
|
|
7439
|
-
|
|
6057
|
+
instance.props,
|
|
7440
6058
|
setupContext
|
|
7441
6059
|
]
|
|
7442
6060
|
);
|
|
@@ -7450,24 +6068,18 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7450
6068
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
7451
6069
|
if (isSSR) {
|
|
7452
6070
|
return setupResult.then((resolvedResult) => {
|
|
7453
|
-
handleSetupResult(instance, resolvedResult
|
|
6071
|
+
handleSetupResult(instance, resolvedResult);
|
|
7454
6072
|
}).catch((e) => {
|
|
7455
6073
|
handleError(e, instance, 0);
|
|
7456
6074
|
});
|
|
7457
6075
|
} else {
|
|
7458
6076
|
instance.asyncDep = setupResult;
|
|
7459
|
-
if (!!(process.env.NODE_ENV !== "production") && !instance.suspense) {
|
|
7460
|
-
const name = formatComponentName(instance, Component);
|
|
7461
|
-
warn$1(
|
|
7462
|
-
`Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`
|
|
7463
|
-
);
|
|
7464
|
-
}
|
|
7465
6077
|
}
|
|
7466
6078
|
} else {
|
|
7467
|
-
handleSetupResult(instance, setupResult
|
|
6079
|
+
handleSetupResult(instance, setupResult);
|
|
7468
6080
|
}
|
|
7469
6081
|
} else {
|
|
7470
|
-
finishComponentSetup(instance
|
|
6082
|
+
finishComponentSetup(instance);
|
|
7471
6083
|
}
|
|
7472
6084
|
}
|
|
7473
6085
|
function handleSetupResult(instance, setupResult, isSSR) {
|
|
@@ -7478,32 +6090,16 @@ function handleSetupResult(instance, setupResult, isSSR) {
|
|
|
7478
6090
|
instance.render = setupResult;
|
|
7479
6091
|
}
|
|
7480
6092
|
} else if (isObject(setupResult)) {
|
|
7481
|
-
if (!!(process.env.NODE_ENV !== "production") && isVNode(setupResult)) {
|
|
7482
|
-
warn$1(
|
|
7483
|
-
`setup() should not return VNodes directly - return a render function instead.`
|
|
7484
|
-
);
|
|
7485
|
-
}
|
|
7486
|
-
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
7487
|
-
instance.devtoolsRawSetupState = setupResult;
|
|
7488
|
-
}
|
|
7489
6093
|
instance.setupState = proxyRefs(setupResult);
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
}
|
|
7493
|
-
} else if (!!(process.env.NODE_ENV !== "production") && setupResult !== void 0) {
|
|
7494
|
-
warn$1(
|
|
7495
|
-
`setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
|
|
7496
|
-
);
|
|
7497
|
-
}
|
|
7498
|
-
finishComponentSetup(instance, isSSR);
|
|
6094
|
+
} else ;
|
|
6095
|
+
finishComponentSetup(instance);
|
|
7499
6096
|
}
|
|
7500
|
-
const isRuntimeOnly = () => true;
|
|
7501
6097
|
function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
7502
6098
|
const Component = instance.type;
|
|
7503
6099
|
if (!instance.render) {
|
|
7504
6100
|
instance.render = Component.render || NOOP;
|
|
7505
6101
|
}
|
|
7506
|
-
|
|
6102
|
+
{
|
|
7507
6103
|
const reset = setCurrentInstance(instance);
|
|
7508
6104
|
pauseTracking();
|
|
7509
6105
|
try {
|
|
@@ -7513,84 +6109,18 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
7513
6109
|
reset();
|
|
7514
6110
|
}
|
|
7515
6111
|
}
|
|
7516
|
-
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
|
|
7517
|
-
if (Component.template) {
|
|
7518
|
-
warn$1(
|
|
7519
|
-
`Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` )
|
|
7520
|
-
);
|
|
7521
|
-
} else {
|
|
7522
|
-
warn$1(`Component is missing template or render function: `, Component);
|
|
7523
|
-
}
|
|
7524
|
-
}
|
|
7525
6112
|
}
|
|
7526
|
-
const attrsProxyHandlers =
|
|
7527
|
-
get(target, key) {
|
|
7528
|
-
markAttrsAccessed();
|
|
7529
|
-
track(target, "get", "");
|
|
7530
|
-
return target[key];
|
|
7531
|
-
},
|
|
7532
|
-
set() {
|
|
7533
|
-
warn$1(`setupContext.attrs is readonly.`);
|
|
7534
|
-
return false;
|
|
7535
|
-
},
|
|
7536
|
-
deleteProperty() {
|
|
7537
|
-
warn$1(`setupContext.attrs is readonly.`);
|
|
7538
|
-
return false;
|
|
7539
|
-
}
|
|
7540
|
-
} : {
|
|
6113
|
+
const attrsProxyHandlers = {
|
|
7541
6114
|
get(target, key) {
|
|
7542
6115
|
track(target, "get", "");
|
|
7543
6116
|
return target[key];
|
|
7544
6117
|
}
|
|
7545
6118
|
};
|
|
7546
|
-
function getSlotsProxy(instance) {
|
|
7547
|
-
return new Proxy(instance.slots, {
|
|
7548
|
-
get(target, key) {
|
|
7549
|
-
track(instance, "get", "$slots");
|
|
7550
|
-
return target[key];
|
|
7551
|
-
}
|
|
7552
|
-
});
|
|
7553
|
-
}
|
|
7554
6119
|
function createSetupContext(instance) {
|
|
7555
6120
|
const expose = (exposed) => {
|
|
7556
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7557
|
-
if (instance.exposed) {
|
|
7558
|
-
warn$1(`expose() should be called only once per setup().`);
|
|
7559
|
-
}
|
|
7560
|
-
if (exposed != null) {
|
|
7561
|
-
let exposedType = typeof exposed;
|
|
7562
|
-
if (exposedType === "object") {
|
|
7563
|
-
if (isArray(exposed)) {
|
|
7564
|
-
exposedType = "array";
|
|
7565
|
-
} else if (isRef(exposed)) {
|
|
7566
|
-
exposedType = "ref";
|
|
7567
|
-
}
|
|
7568
|
-
}
|
|
7569
|
-
if (exposedType !== "object") {
|
|
7570
|
-
warn$1(
|
|
7571
|
-
`expose() should be passed a plain object, received ${exposedType}.`
|
|
7572
|
-
);
|
|
7573
|
-
}
|
|
7574
|
-
}
|
|
7575
|
-
}
|
|
7576
6121
|
instance.exposed = exposed || {};
|
|
7577
6122
|
};
|
|
7578
|
-
|
|
7579
|
-
let attrsProxy;
|
|
7580
|
-
let slotsProxy;
|
|
7581
|
-
return Object.freeze({
|
|
7582
|
-
get attrs() {
|
|
7583
|
-
return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
|
|
7584
|
-
},
|
|
7585
|
-
get slots() {
|
|
7586
|
-
return slotsProxy || (slotsProxy = getSlotsProxy(instance));
|
|
7587
|
-
},
|
|
7588
|
-
get emit() {
|
|
7589
|
-
return (event, ...args) => instance.emit(event, ...args);
|
|
7590
|
-
},
|
|
7591
|
-
expose
|
|
7592
|
-
});
|
|
7593
|
-
} else {
|
|
6123
|
+
{
|
|
7594
6124
|
return {
|
|
7595
6125
|
attrs: new Proxy(instance.attrs, attrsProxyHandlers),
|
|
7596
6126
|
slots: instance.slots,
|
|
@@ -7650,12 +6180,6 @@ function isClassComponent(value) {
|
|
|
7650
6180
|
|
|
7651
6181
|
const computed = (getterOrOptions, debugOptions) => {
|
|
7652
6182
|
const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
7653
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7654
|
-
const i = getCurrentInstance();
|
|
7655
|
-
if (i && i.appContext.config.warnRecursiveComputed) {
|
|
7656
|
-
c._warnRecursive = true;
|
|
7657
|
-
}
|
|
7658
|
-
}
|
|
7659
6183
|
return c;
|
|
7660
6184
|
};
|
|
7661
6185
|
|
|
@@ -7685,190 +6209,7 @@ function h(type, propsOrChildren, children) {
|
|
|
7685
6209
|
}
|
|
7686
6210
|
}
|
|
7687
6211
|
|
|
7688
|
-
function initCustomFormatter() {
|
|
7689
|
-
if (!!!(process.env.NODE_ENV !== "production") || typeof window === "undefined") {
|
|
7690
|
-
return;
|
|
7691
|
-
}
|
|
7692
|
-
const vueStyle = { style: "color:#3ba776" };
|
|
7693
|
-
const numberStyle = { style: "color:#1677ff" };
|
|
7694
|
-
const stringStyle = { style: "color:#f5222d" };
|
|
7695
|
-
const keywordStyle = { style: "color:#eb2f96" };
|
|
7696
|
-
const formatter = {
|
|
7697
|
-
__vue_custom_formatter: true,
|
|
7698
|
-
header(obj) {
|
|
7699
|
-
if (!isObject(obj)) {
|
|
7700
|
-
return null;
|
|
7701
|
-
}
|
|
7702
|
-
if (obj.__isVue) {
|
|
7703
|
-
return ["div", vueStyle, `VueInstance`];
|
|
7704
|
-
} else if (isRef(obj)) {
|
|
7705
|
-
pauseTracking();
|
|
7706
|
-
const value = obj.value;
|
|
7707
|
-
resetTracking();
|
|
7708
|
-
return [
|
|
7709
|
-
"div",
|
|
7710
|
-
{},
|
|
7711
|
-
["span", vueStyle, genRefFlag(obj)],
|
|
7712
|
-
"<",
|
|
7713
|
-
formatValue(value),
|
|
7714
|
-
`>`
|
|
7715
|
-
];
|
|
7716
|
-
} else if (isReactive(obj)) {
|
|
7717
|
-
return [
|
|
7718
|
-
"div",
|
|
7719
|
-
{},
|
|
7720
|
-
["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"],
|
|
7721
|
-
"<",
|
|
7722
|
-
formatValue(obj),
|
|
7723
|
-
`>${isReadonly(obj) ? ` (readonly)` : ``}`
|
|
7724
|
-
];
|
|
7725
|
-
} else if (isReadonly(obj)) {
|
|
7726
|
-
return [
|
|
7727
|
-
"div",
|
|
7728
|
-
{},
|
|
7729
|
-
["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"],
|
|
7730
|
-
"<",
|
|
7731
|
-
formatValue(obj),
|
|
7732
|
-
">"
|
|
7733
|
-
];
|
|
7734
|
-
}
|
|
7735
|
-
return null;
|
|
7736
|
-
},
|
|
7737
|
-
hasBody(obj) {
|
|
7738
|
-
return obj && obj.__isVue;
|
|
7739
|
-
},
|
|
7740
|
-
body(obj) {
|
|
7741
|
-
if (obj && obj.__isVue) {
|
|
7742
|
-
return [
|
|
7743
|
-
"div",
|
|
7744
|
-
{},
|
|
7745
|
-
...formatInstance(obj.$)
|
|
7746
|
-
];
|
|
7747
|
-
}
|
|
7748
|
-
}
|
|
7749
|
-
};
|
|
7750
|
-
function formatInstance(instance) {
|
|
7751
|
-
const blocks = [];
|
|
7752
|
-
if (instance.type.props && instance.props) {
|
|
7753
|
-
blocks.push(createInstanceBlock("props", toRaw(instance.props)));
|
|
7754
|
-
}
|
|
7755
|
-
if (instance.setupState !== EMPTY_OBJ) {
|
|
7756
|
-
blocks.push(createInstanceBlock("setup", instance.setupState));
|
|
7757
|
-
}
|
|
7758
|
-
if (instance.data !== EMPTY_OBJ) {
|
|
7759
|
-
blocks.push(createInstanceBlock("data", toRaw(instance.data)));
|
|
7760
|
-
}
|
|
7761
|
-
const computed = extractKeys(instance, "computed");
|
|
7762
|
-
if (computed) {
|
|
7763
|
-
blocks.push(createInstanceBlock("computed", computed));
|
|
7764
|
-
}
|
|
7765
|
-
const injected = extractKeys(instance, "inject");
|
|
7766
|
-
if (injected) {
|
|
7767
|
-
blocks.push(createInstanceBlock("injected", injected));
|
|
7768
|
-
}
|
|
7769
|
-
blocks.push([
|
|
7770
|
-
"div",
|
|
7771
|
-
{},
|
|
7772
|
-
[
|
|
7773
|
-
"span",
|
|
7774
|
-
{
|
|
7775
|
-
style: keywordStyle.style + ";opacity:0.66"
|
|
7776
|
-
},
|
|
7777
|
-
"$ (internal): "
|
|
7778
|
-
],
|
|
7779
|
-
["object", { object: instance }]
|
|
7780
|
-
]);
|
|
7781
|
-
return blocks;
|
|
7782
|
-
}
|
|
7783
|
-
function createInstanceBlock(type, target) {
|
|
7784
|
-
target = extend({}, target);
|
|
7785
|
-
if (!Object.keys(target).length) {
|
|
7786
|
-
return ["span", {}];
|
|
7787
|
-
}
|
|
7788
|
-
return [
|
|
7789
|
-
"div",
|
|
7790
|
-
{ style: "line-height:1.25em;margin-bottom:0.6em" },
|
|
7791
|
-
[
|
|
7792
|
-
"div",
|
|
7793
|
-
{
|
|
7794
|
-
style: "color:#476582"
|
|
7795
|
-
},
|
|
7796
|
-
type
|
|
7797
|
-
],
|
|
7798
|
-
[
|
|
7799
|
-
"div",
|
|
7800
|
-
{
|
|
7801
|
-
style: "padding-left:1.25em"
|
|
7802
|
-
},
|
|
7803
|
-
...Object.keys(target).map((key) => {
|
|
7804
|
-
return [
|
|
7805
|
-
"div",
|
|
7806
|
-
{},
|
|
7807
|
-
["span", keywordStyle, key + ": "],
|
|
7808
|
-
formatValue(target[key], false)
|
|
7809
|
-
];
|
|
7810
|
-
})
|
|
7811
|
-
]
|
|
7812
|
-
];
|
|
7813
|
-
}
|
|
7814
|
-
function formatValue(v, asRaw = true) {
|
|
7815
|
-
if (typeof v === "number") {
|
|
7816
|
-
return ["span", numberStyle, v];
|
|
7817
|
-
} else if (typeof v === "string") {
|
|
7818
|
-
return ["span", stringStyle, JSON.stringify(v)];
|
|
7819
|
-
} else if (typeof v === "boolean") {
|
|
7820
|
-
return ["span", keywordStyle, v];
|
|
7821
|
-
} else if (isObject(v)) {
|
|
7822
|
-
return ["object", { object: asRaw ? toRaw(v) : v }];
|
|
7823
|
-
} else {
|
|
7824
|
-
return ["span", stringStyle, String(v)];
|
|
7825
|
-
}
|
|
7826
|
-
}
|
|
7827
|
-
function extractKeys(instance, type) {
|
|
7828
|
-
const Comp = instance.type;
|
|
7829
|
-
if (isFunction(Comp)) {
|
|
7830
|
-
return;
|
|
7831
|
-
}
|
|
7832
|
-
const extracted = {};
|
|
7833
|
-
for (const key in instance.ctx) {
|
|
7834
|
-
if (isKeyOfType(Comp, key, type)) {
|
|
7835
|
-
extracted[key] = instance.ctx[key];
|
|
7836
|
-
}
|
|
7837
|
-
}
|
|
7838
|
-
return extracted;
|
|
7839
|
-
}
|
|
7840
|
-
function isKeyOfType(Comp, key, type) {
|
|
7841
|
-
const opts = Comp[type];
|
|
7842
|
-
if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {
|
|
7843
|
-
return true;
|
|
7844
|
-
}
|
|
7845
|
-
if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
|
|
7846
|
-
return true;
|
|
7847
|
-
}
|
|
7848
|
-
if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {
|
|
7849
|
-
return true;
|
|
7850
|
-
}
|
|
7851
|
-
}
|
|
7852
|
-
function genRefFlag(v) {
|
|
7853
|
-
if (isShallow(v)) {
|
|
7854
|
-
return `ShallowRef`;
|
|
7855
|
-
}
|
|
7856
|
-
if (v.effect) {
|
|
7857
|
-
return `ComputedRef`;
|
|
7858
|
-
}
|
|
7859
|
-
return `Ref`;
|
|
7860
|
-
}
|
|
7861
|
-
if (window.devtoolsFormatters) {
|
|
7862
|
-
window.devtoolsFormatters.push(formatter);
|
|
7863
|
-
} else {
|
|
7864
|
-
window.devtoolsFormatters = [formatter];
|
|
7865
|
-
}
|
|
7866
|
-
}
|
|
7867
|
-
|
|
7868
6212
|
const version = "3.5.30";
|
|
7869
|
-
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
7870
|
-
!!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
7871
|
-
!!(process.env.NODE_ENV !== "production") || true ? setDevtoolsHook$1 : NOOP;
|
|
7872
6213
|
|
|
7873
6214
|
/**
|
|
7874
6215
|
* @vue/runtime-dom v3.5.30
|
|
@@ -7884,7 +6225,6 @@ if (tt) {
|
|
|
7884
6225
|
createHTML: (val) => val
|
|
7885
6226
|
});
|
|
7886
6227
|
} catch (e) {
|
|
7887
|
-
!!(process.env.NODE_ENV !== "production") && warn(`Error creating trusted types policy: ${e}`);
|
|
7888
6228
|
}
|
|
7889
6229
|
}
|
|
7890
6230
|
const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
|
|
@@ -8015,7 +6355,7 @@ function setDisplay(el, value) {
|
|
|
8015
6355
|
el[vShowHidden] = !value;
|
|
8016
6356
|
}
|
|
8017
6357
|
|
|
8018
|
-
const CSS_VAR_TEXT = /* @__PURE__ */ Symbol(
|
|
6358
|
+
const CSS_VAR_TEXT = /* @__PURE__ */ Symbol("");
|
|
8019
6359
|
|
|
8020
6360
|
const displayRE = /(?:^|;)\s*display\s*:/;
|
|
8021
6361
|
function patchStyle(el, prev, next) {
|
|
@@ -8066,20 +6406,12 @@ function patchStyle(el, prev, next) {
|
|
|
8066
6406
|
}
|
|
8067
6407
|
}
|
|
8068
6408
|
}
|
|
8069
|
-
const semicolonRE = /[^\\];\s*$/;
|
|
8070
6409
|
const importantRE = /\s*!important$/;
|
|
8071
6410
|
function setStyle(style, name, val) {
|
|
8072
6411
|
if (isArray(val)) {
|
|
8073
6412
|
val.forEach((v) => setStyle(style, name, v));
|
|
8074
6413
|
} else {
|
|
8075
6414
|
if (val == null) val = "";
|
|
8076
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
8077
|
-
if (semicolonRE.test(val)) {
|
|
8078
|
-
warn(
|
|
8079
|
-
`Unexpected semicolon at the end of '${name}' style value: '${val}'`
|
|
8080
|
-
);
|
|
8081
|
-
}
|
|
8082
|
-
}
|
|
8083
6415
|
if (name.startsWith("--")) {
|
|
8084
6416
|
style.setProperty(name, val);
|
|
8085
6417
|
} else {
|
|
@@ -8178,12 +6510,6 @@ function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
|
8178
6510
|
try {
|
|
8179
6511
|
el[key] = value;
|
|
8180
6512
|
} catch (e) {
|
|
8181
|
-
if (!!(process.env.NODE_ENV !== "production") && !needRemove) {
|
|
8182
|
-
warn(
|
|
8183
|
-
`Failed setting prop "${key}" on <${tag.toLowerCase()}>: value ${value} is invalid.`,
|
|
8184
|
-
e
|
|
8185
|
-
);
|
|
8186
|
-
}
|
|
8187
6513
|
}
|
|
8188
6514
|
needRemove && el.removeAttribute(attrName || key);
|
|
8189
6515
|
}
|
|
@@ -8199,12 +6525,12 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
8199
6525
|
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
8200
6526
|
const existingInvoker = invokers[rawName];
|
|
8201
6527
|
if (nextValue && existingInvoker) {
|
|
8202
|
-
existingInvoker.value =
|
|
6528
|
+
existingInvoker.value = nextValue;
|
|
8203
6529
|
} else {
|
|
8204
6530
|
const [name, options] = parseName(rawName);
|
|
8205
6531
|
if (nextValue) {
|
|
8206
6532
|
const invoker = invokers[rawName] = createInvoker(
|
|
8207
|
-
|
|
6533
|
+
nextValue,
|
|
8208
6534
|
instance
|
|
8209
6535
|
);
|
|
8210
6536
|
addEventListener(el, name, invoker, options);
|
|
@@ -8249,16 +6575,6 @@ function createInvoker(initialValue, instance) {
|
|
|
8249
6575
|
invoker.attached = getNow();
|
|
8250
6576
|
return invoker;
|
|
8251
6577
|
}
|
|
8252
|
-
function sanitizeEventValue(value, propName) {
|
|
8253
|
-
if (isFunction(value) || isArray(value)) {
|
|
8254
|
-
return value;
|
|
8255
|
-
}
|
|
8256
|
-
warn(
|
|
8257
|
-
`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?
|
|
8258
|
-
Expected function or array of functions, received type ${typeof value}.`
|
|
8259
|
-
);
|
|
8260
|
-
return NOOP;
|
|
8261
|
-
}
|
|
8262
6578
|
function patchStopImmediatePropagation(e, value) {
|
|
8263
6579
|
if (isArray(value)) {
|
|
8264
6580
|
const originalStop = e.stopImmediatePropagation;
|
|
@@ -8452,10 +6768,6 @@ function ensureRenderer() {
|
|
|
8452
6768
|
}
|
|
8453
6769
|
const createApp = ((...args) => {
|
|
8454
6770
|
const app = ensureRenderer().createApp(...args);
|
|
8455
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
8456
|
-
injectNativeTagCheck(app);
|
|
8457
|
-
injectCompilerOptionsCheck(app);
|
|
8458
|
-
}
|
|
8459
6771
|
const { mount } = app;
|
|
8460
6772
|
app.mount = (containerOrSelector) => {
|
|
8461
6773
|
const container = normalizeContainer(containerOrSelector);
|
|
@@ -8484,75 +6796,14 @@ function resolveRootNamespace(container) {
|
|
|
8484
6796
|
return "mathml";
|
|
8485
6797
|
}
|
|
8486
6798
|
}
|
|
8487
|
-
function injectNativeTagCheck(app) {
|
|
8488
|
-
Object.defineProperty(app.config, "isNativeTag", {
|
|
8489
|
-
value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
|
|
8490
|
-
writable: false
|
|
8491
|
-
});
|
|
8492
|
-
}
|
|
8493
|
-
function injectCompilerOptionsCheck(app) {
|
|
8494
|
-
{
|
|
8495
|
-
const isCustomElement = app.config.isCustomElement;
|
|
8496
|
-
Object.defineProperty(app.config, "isCustomElement", {
|
|
8497
|
-
get() {
|
|
8498
|
-
return isCustomElement;
|
|
8499
|
-
},
|
|
8500
|
-
set() {
|
|
8501
|
-
warn(
|
|
8502
|
-
`The \`isCustomElement\` config option is deprecated. Use \`compilerOptions.isCustomElement\` instead.`
|
|
8503
|
-
);
|
|
8504
|
-
}
|
|
8505
|
-
});
|
|
8506
|
-
const compilerOptions = app.config.compilerOptions;
|
|
8507
|
-
const msg = `The \`compilerOptions\` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, \`compilerOptions\` must be passed to \`@vue/compiler-dom\` in the build setup instead.
|
|
8508
|
-
- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.
|
|
8509
|
-
- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader
|
|
8510
|
-
- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc`;
|
|
8511
|
-
Object.defineProperty(app.config, "compilerOptions", {
|
|
8512
|
-
get() {
|
|
8513
|
-
warn(msg);
|
|
8514
|
-
return compilerOptions;
|
|
8515
|
-
},
|
|
8516
|
-
set() {
|
|
8517
|
-
warn(msg);
|
|
8518
|
-
}
|
|
8519
|
-
});
|
|
8520
|
-
}
|
|
8521
|
-
}
|
|
8522
6799
|
function normalizeContainer(container) {
|
|
8523
6800
|
if (isString(container)) {
|
|
8524
6801
|
const res = document.querySelector(container);
|
|
8525
|
-
if (!!(process.env.NODE_ENV !== "production") && !res) {
|
|
8526
|
-
warn(
|
|
8527
|
-
`Failed to mount app: mount target selector "${container}" returned null.`
|
|
8528
|
-
);
|
|
8529
|
-
}
|
|
8530
6802
|
return res;
|
|
8531
6803
|
}
|
|
8532
|
-
if (!!(process.env.NODE_ENV !== "production") && window.ShadowRoot && container instanceof window.ShadowRoot && container.mode === "closed") {
|
|
8533
|
-
warn(
|
|
8534
|
-
`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`
|
|
8535
|
-
);
|
|
8536
|
-
}
|
|
8537
6804
|
return container;
|
|
8538
6805
|
}
|
|
8539
6806
|
|
|
8540
|
-
/**
|
|
8541
|
-
* vue v3.5.30
|
|
8542
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8543
|
-
* @license MIT
|
|
8544
|
-
**/
|
|
8545
|
-
|
|
8546
|
-
function initDev() {
|
|
8547
|
-
{
|
|
8548
|
-
initCustomFormatter();
|
|
8549
|
-
}
|
|
8550
|
-
}
|
|
8551
|
-
|
|
8552
|
-
if (!!(process.env.NODE_ENV !== "production")) {
|
|
8553
|
-
initDev();
|
|
8554
|
-
}
|
|
8555
|
-
|
|
8556
6807
|
const _hoisted_1$a = ["value", "placeholder"];
|
|
8557
6808
|
const _hoisted_2$8 = ["value", "placeholder"];
|
|
8558
6809
|
const _hoisted_3$7 = {
|