@vue/compat 3.3.4 → 3.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue.cjs.js +968 -957
- package/dist/vue.cjs.prod.js +818 -809
- package/dist/vue.esm-browser.js +1000 -989
- package/dist/vue.esm-browser.prod.js +6 -1
- package/dist/vue.esm-bundler.js +1008 -997
- package/dist/vue.global.js +988 -977
- package/dist/vue.global.prod.js +6 -1
- package/dist/vue.runtime.esm-browser.js +996 -980
- package/dist/vue.runtime.esm-browser.prod.js +6 -1
- package/dist/vue.runtime.esm-bundler.js +1003 -987
- package/dist/vue.runtime.global.js +985 -969
- package/dist/vue.runtime.global.prod.js +6 -1
- package/package.json +3 -3
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -40,7 +40,7 @@ const isString = (val) => typeof val === "string";
|
|
|
40
40
|
const isSymbol = (val) => typeof val === "symbol";
|
|
41
41
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
42
42
|
const isPromise = (val) => {
|
|
43
|
-
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
43
|
+
return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
|
|
44
44
|
};
|
|
45
45
|
const objectToString = Object.prototype.toString;
|
|
46
46
|
const toTypeString = (value) => objectToString.call(value);
|
|
@@ -71,12 +71,13 @@ const hyphenateRE = /\B([A-Z])/g;
|
|
|
71
71
|
const hyphenate = cacheStringFunction(
|
|
72
72
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
73
73
|
);
|
|
74
|
-
const capitalize = cacheStringFunction(
|
|
75
|
-
|
|
76
|
-
);
|
|
77
|
-
const toHandlerKey = cacheStringFunction(
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
const capitalize = cacheStringFunction((str) => {
|
|
75
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
76
|
+
});
|
|
77
|
+
const toHandlerKey = cacheStringFunction((str) => {
|
|
78
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
79
|
+
return s;
|
|
80
|
+
});
|
|
80
81
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
81
82
|
const invokeArrayFns = (fns, arg) => {
|
|
82
83
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -107,8 +108,8 @@ function genPropsAccessExp(name) {
|
|
|
107
108
|
return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;
|
|
108
109
|
}
|
|
109
110
|
|
|
110
|
-
const
|
|
111
|
-
const
|
|
111
|
+
const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
|
|
112
|
+
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
|
|
112
113
|
|
|
113
114
|
function normalizeStyle(value) {
|
|
114
115
|
if (isArray(value)) {
|
|
@@ -123,9 +124,7 @@ function normalizeStyle(value) {
|
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
return res;
|
|
126
|
-
} else if (isString(value)) {
|
|
127
|
-
return value;
|
|
128
|
-
} else if (isObject(value)) {
|
|
127
|
+
} else if (isString(value) || isObject(value)) {
|
|
129
128
|
return value;
|
|
130
129
|
}
|
|
131
130
|
}
|
|
@@ -527,7 +526,7 @@ function cleanupEffect(effect2) {
|
|
|
527
526
|
}
|
|
528
527
|
}
|
|
529
528
|
function effect(fn, options) {
|
|
530
|
-
if (fn.effect) {
|
|
529
|
+
if (fn.effect instanceof ReactiveEffect) {
|
|
531
530
|
fn = fn.effect.fn;
|
|
532
531
|
}
|
|
533
532
|
const _effect = new ReactiveEffect(fn);
|
|
@@ -678,10 +677,6 @@ const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`
|
|
|
678
677
|
const builtInSymbols = new Set(
|
|
679
678
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
680
679
|
);
|
|
681
|
-
const get$1 = /* @__PURE__ */ createGetter();
|
|
682
|
-
const shallowGet = /* @__PURE__ */ createGetter(false, true);
|
|
683
|
-
const readonlyGet = /* @__PURE__ */ createGetter(true);
|
|
684
|
-
const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true);
|
|
685
680
|
const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
|
|
686
681
|
function createArrayInstrumentations() {
|
|
687
682
|
const instrumentations = {};
|
|
@@ -714,8 +709,13 @@ function hasOwnProperty(key) {
|
|
|
714
709
|
track(obj, "has", key);
|
|
715
710
|
return obj.hasOwnProperty(key);
|
|
716
711
|
}
|
|
717
|
-
|
|
718
|
-
|
|
712
|
+
class BaseReactiveHandler {
|
|
713
|
+
constructor(_isReadonly = false, _shallow = false) {
|
|
714
|
+
this._isReadonly = _isReadonly;
|
|
715
|
+
this._shallow = _shallow;
|
|
716
|
+
}
|
|
717
|
+
get(target, key, receiver) {
|
|
718
|
+
const isReadonly2 = this._isReadonly, shallow = this._shallow;
|
|
719
719
|
if (key === "__v_isReactive") {
|
|
720
720
|
return !isReadonly2;
|
|
721
721
|
} else if (key === "__v_isReadonly") {
|
|
@@ -751,17 +751,18 @@ function createGetter(isReadonly2 = false, shallow = false) {
|
|
|
751
751
|
return isReadonly2 ? readonly(res) : reactive(res);
|
|
752
752
|
}
|
|
753
753
|
return res;
|
|
754
|
-
}
|
|
754
|
+
}
|
|
755
755
|
}
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
756
|
+
class MutableReactiveHandler extends BaseReactiveHandler {
|
|
757
|
+
constructor(shallow = false) {
|
|
758
|
+
super(false, shallow);
|
|
759
|
+
}
|
|
760
|
+
set(target, key, value, receiver) {
|
|
760
761
|
let oldValue = target[key];
|
|
761
762
|
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
|
|
762
763
|
return false;
|
|
763
764
|
}
|
|
764
|
-
if (!
|
|
765
|
+
if (!this._shallow) {
|
|
765
766
|
if (!isShallow(value) && !isReadonly(value)) {
|
|
766
767
|
oldValue = toRaw(oldValue);
|
|
767
768
|
value = toRaw(value);
|
|
@@ -781,59 +782,49 @@ function createSetter(shallow = false) {
|
|
|
781
782
|
}
|
|
782
783
|
}
|
|
783
784
|
return result;
|
|
784
|
-
};
|
|
785
|
-
}
|
|
786
|
-
function deleteProperty(target, key) {
|
|
787
|
-
const hadKey = hasOwn(target, key);
|
|
788
|
-
target[key];
|
|
789
|
-
const result = Reflect.deleteProperty(target, key);
|
|
790
|
-
if (result && hadKey) {
|
|
791
|
-
trigger(target, "delete", key, void 0);
|
|
792
785
|
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
786
|
+
deleteProperty(target, key) {
|
|
787
|
+
const hadKey = hasOwn(target, key);
|
|
788
|
+
target[key];
|
|
789
|
+
const result = Reflect.deleteProperty(target, key);
|
|
790
|
+
if (result && hadKey) {
|
|
791
|
+
trigger(target, "delete", key, void 0);
|
|
792
|
+
}
|
|
793
|
+
return result;
|
|
794
|
+
}
|
|
795
|
+
has(target, key) {
|
|
796
|
+
const result = Reflect.has(target, key);
|
|
797
|
+
if (!isSymbol(key) || !builtInSymbols.has(key)) {
|
|
798
|
+
track(target, "has", key);
|
|
799
|
+
}
|
|
800
|
+
return result;
|
|
801
|
+
}
|
|
802
|
+
ownKeys(target) {
|
|
803
|
+
track(
|
|
804
|
+
target,
|
|
805
|
+
"iterate",
|
|
806
|
+
isArray(target) ? "length" : ITERATE_KEY
|
|
807
|
+
);
|
|
808
|
+
return Reflect.ownKeys(target);
|
|
799
809
|
}
|
|
800
|
-
return result;
|
|
801
|
-
}
|
|
802
|
-
function ownKeys(target) {
|
|
803
|
-
track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
|
|
804
|
-
return Reflect.ownKeys(target);
|
|
805
810
|
}
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
has: has$1,
|
|
811
|
-
ownKeys
|
|
812
|
-
};
|
|
813
|
-
const readonlyHandlers = {
|
|
814
|
-
get: readonlyGet,
|
|
811
|
+
class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
812
|
+
constructor(shallow = false) {
|
|
813
|
+
super(true, shallow);
|
|
814
|
+
}
|
|
815
815
|
set(target, key) {
|
|
816
816
|
return true;
|
|
817
|
-
}
|
|
817
|
+
}
|
|
818
818
|
deleteProperty(target, key) {
|
|
819
819
|
return true;
|
|
820
820
|
}
|
|
821
|
-
}
|
|
822
|
-
const
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
get: shallowGet,
|
|
827
|
-
set: shallowSet
|
|
828
|
-
}
|
|
829
|
-
);
|
|
830
|
-
const shallowReadonlyHandlers = /* @__PURE__ */ extend(
|
|
831
|
-
{},
|
|
832
|
-
readonlyHandlers,
|
|
833
|
-
{
|
|
834
|
-
get: shallowReadonlyGet
|
|
835
|
-
}
|
|
821
|
+
}
|
|
822
|
+
const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
823
|
+
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
824
|
+
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
|
|
825
|
+
true
|
|
836
826
|
);
|
|
827
|
+
const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
|
|
837
828
|
|
|
838
829
|
const toShallow = (value) => value;
|
|
839
830
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
@@ -842,7 +833,7 @@ function get(target, key, isReadonly = false, isShallow = false) {
|
|
|
842
833
|
const rawTarget = toRaw(target);
|
|
843
834
|
const rawKey = toRaw(key);
|
|
844
835
|
if (!isReadonly) {
|
|
845
|
-
if (key
|
|
836
|
+
if (hasChanged(key, rawKey)) {
|
|
846
837
|
track(rawTarget, "get", key);
|
|
847
838
|
}
|
|
848
839
|
track(rawTarget, "get", rawKey);
|
|
@@ -862,7 +853,7 @@ function has(key, isReadonly = false) {
|
|
|
862
853
|
const rawTarget = toRaw(target);
|
|
863
854
|
const rawKey = toRaw(key);
|
|
864
855
|
if (!isReadonly) {
|
|
865
|
-
if (key
|
|
856
|
+
if (hasChanged(key, rawKey)) {
|
|
866
857
|
track(rawTarget, "has", key);
|
|
867
858
|
}
|
|
868
859
|
track(rawTarget, "has", rawKey);
|
|
@@ -1356,11 +1347,7 @@ function toRef(source, key, defaultValue) {
|
|
|
1356
1347
|
}
|
|
1357
1348
|
function propertyToRef(source, key, defaultValue) {
|
|
1358
1349
|
const val = source[key];
|
|
1359
|
-
return isRef(val) ? val : new ObjectRefImpl(
|
|
1360
|
-
source,
|
|
1361
|
-
key,
|
|
1362
|
-
defaultValue
|
|
1363
|
-
);
|
|
1350
|
+
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
|
|
1364
1351
|
}
|
|
1365
1352
|
|
|
1366
1353
|
class ComputedRefImpl {
|
|
@@ -2845,9 +2832,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
2845
2832
|
}
|
|
2846
2833
|
if (cb) {
|
|
2847
2834
|
const newValue = effect.run();
|
|
2848
|
-
if (deep || forceTrigger || (isMultiSource ? newValue.some(
|
|
2849
|
-
(v, i) => hasChanged(v, oldValue[i])
|
|
2850
|
-
) : hasChanged(newValue, oldValue)) || isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) {
|
|
2835
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) {
|
|
2851
2836
|
if (cleanup) {
|
|
2852
2837
|
cleanup();
|
|
2853
2838
|
}
|
|
@@ -3013,6 +2998,8 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
3013
2998
|
}
|
|
3014
2999
|
}
|
|
3015
3000
|
|
|
3001
|
+
const leaveCbKey = Symbol("_leaveCb");
|
|
3002
|
+
const enterCbKey$1 = Symbol("_enterCb");
|
|
3016
3003
|
function useTransitionState() {
|
|
3017
3004
|
const state = {
|
|
3018
3005
|
isMounted: false,
|
|
@@ -3123,9 +3110,9 @@ const BaseTransitionImpl = {
|
|
|
3123
3110
|
oldInnerChild
|
|
3124
3111
|
);
|
|
3125
3112
|
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
3126
|
-
el
|
|
3113
|
+
el[leaveCbKey] = () => {
|
|
3127
3114
|
earlyRemove();
|
|
3128
|
-
el
|
|
3115
|
+
el[leaveCbKey] = void 0;
|
|
3129
3116
|
delete enterHooks.delayedLeave;
|
|
3130
3117
|
};
|
|
3131
3118
|
enterHooks.delayedLeave = delayedLeave;
|
|
@@ -3199,15 +3186,15 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3199
3186
|
return;
|
|
3200
3187
|
}
|
|
3201
3188
|
}
|
|
3202
|
-
if (el
|
|
3203
|
-
el
|
|
3189
|
+
if (el[leaveCbKey]) {
|
|
3190
|
+
el[leaveCbKey](
|
|
3204
3191
|
true
|
|
3205
3192
|
/* cancelled */
|
|
3206
3193
|
);
|
|
3207
3194
|
}
|
|
3208
3195
|
const leavingVNode = leavingVNodesCache[key];
|
|
3209
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el
|
|
3210
|
-
leavingVNode.el
|
|
3196
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
|
|
3197
|
+
leavingVNode.el[leaveCbKey]();
|
|
3211
3198
|
}
|
|
3212
3199
|
callHook(hook, [el]);
|
|
3213
3200
|
},
|
|
@@ -3225,7 +3212,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3225
3212
|
}
|
|
3226
3213
|
}
|
|
3227
3214
|
let called = false;
|
|
3228
|
-
const done = el
|
|
3215
|
+
const done = el[enterCbKey$1] = (cancelled) => {
|
|
3229
3216
|
if (called)
|
|
3230
3217
|
return;
|
|
3231
3218
|
called = true;
|
|
@@ -3237,7 +3224,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3237
3224
|
if (hooks.delayedLeave) {
|
|
3238
3225
|
hooks.delayedLeave();
|
|
3239
3226
|
}
|
|
3240
|
-
el
|
|
3227
|
+
el[enterCbKey$1] = void 0;
|
|
3241
3228
|
};
|
|
3242
3229
|
if (hook) {
|
|
3243
3230
|
callAsyncHook(hook, [el, done]);
|
|
@@ -3247,8 +3234,8 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3247
3234
|
},
|
|
3248
3235
|
leave(el, remove) {
|
|
3249
3236
|
const key2 = String(vnode.key);
|
|
3250
|
-
if (el
|
|
3251
|
-
el
|
|
3237
|
+
if (el[enterCbKey$1]) {
|
|
3238
|
+
el[enterCbKey$1](
|
|
3252
3239
|
true
|
|
3253
3240
|
/* cancelled */
|
|
3254
3241
|
);
|
|
@@ -3258,7 +3245,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3258
3245
|
}
|
|
3259
3246
|
callHook(onBeforeLeave, [el]);
|
|
3260
3247
|
let called = false;
|
|
3261
|
-
const done = el
|
|
3248
|
+
const done = el[leaveCbKey] = (cancelled) => {
|
|
3262
3249
|
if (called)
|
|
3263
3250
|
return;
|
|
3264
3251
|
called = true;
|
|
@@ -3268,7 +3255,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
3268
3255
|
} else {
|
|
3269
3256
|
callHook(onAfterLeave, [el]);
|
|
3270
3257
|
}
|
|
3271
|
-
el
|
|
3258
|
+
el[leaveCbKey] = void 0;
|
|
3272
3259
|
if (leavingVNodesCache[key2] === vnode) {
|
|
3273
3260
|
delete leavingVNodesCache[key2];
|
|
3274
3261
|
}
|
|
@@ -3330,6 +3317,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
3330
3317
|
return ret;
|
|
3331
3318
|
}
|
|
3332
3319
|
|
|
3320
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
3321
|
+
// @__NO_SIDE_EFFECTS__
|
|
3333
3322
|
function defineComponent(options, extraOptions) {
|
|
3334
3323
|
return isFunction(options) ? (
|
|
3335
3324
|
// #8326: extend call and options.name access are considered side-effects
|
|
@@ -3339,6 +3328,8 @@ function defineComponent(options, extraOptions) {
|
|
|
3339
3328
|
}
|
|
3340
3329
|
|
|
3341
3330
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
3331
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
3332
|
+
// @__NO_SIDE_EFFECTS__
|
|
3342
3333
|
function defineAsyncComponent(source) {
|
|
3343
3334
|
if (isFunction(source)) {
|
|
3344
3335
|
source = { loader: source };
|
|
@@ -4310,6 +4301,7 @@ function legacyPrependModifier(value, symbol) {
|
|
|
4310
4301
|
function installCompatInstanceProperties(map) {
|
|
4311
4302
|
const set = (target, key, val) => {
|
|
4312
4303
|
target[key] = val;
|
|
4304
|
+
return target[key];
|
|
4313
4305
|
};
|
|
4314
4306
|
const del = (target, key) => {
|
|
4315
4307
|
delete target[key];
|
|
@@ -4545,7 +4537,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
|
4545
4537
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
4546
4538
|
},
|
|
4547
4539
|
has(_, key) {
|
|
4548
|
-
const has = key[0] !== "_" && !
|
|
4540
|
+
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
4549
4541
|
return has;
|
|
4550
4542
|
}
|
|
4551
4543
|
}
|
|
@@ -5073,7 +5065,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5073
5065
|
return vm;
|
|
5074
5066
|
}
|
|
5075
5067
|
}
|
|
5076
|
-
Vue.version = `2.6.14-compat:${"3.3.
|
|
5068
|
+
Vue.version = `2.6.14-compat:${"3.3.5"}`;
|
|
5077
5069
|
Vue.config = singletonApp.config;
|
|
5078
5070
|
Vue.use = (p, ...options) => {
|
|
5079
5071
|
if (p && isFunction(p.install)) {
|
|
@@ -5484,10 +5476,7 @@ function createAppAPI(render, hydrate) {
|
|
|
5484
5476
|
},
|
|
5485
5477
|
mount(rootContainer, isHydrate, isSVG) {
|
|
5486
5478
|
if (!isMounted) {
|
|
5487
|
-
const vnode = createVNode(
|
|
5488
|
-
rootComponent,
|
|
5489
|
-
rootProps
|
|
5490
|
-
);
|
|
5479
|
+
const vnode = createVNode(rootComponent, rootProps);
|
|
5491
5480
|
vnode.appContext = context;
|
|
5492
5481
|
if (isHydrate && hydrate) {
|
|
5493
5482
|
hydrate(vnode, rootContainer);
|
|
@@ -7879,6 +7868,10 @@ const TeleportImpl = {
|
|
|
7879
7868
|
internals,
|
|
7880
7869
|
1
|
|
7881
7870
|
);
|
|
7871
|
+
} else {
|
|
7872
|
+
if (n2.props && n1.props && n2.props.to !== n1.props.to) {
|
|
7873
|
+
n2.props.to = n1.props.to;
|
|
7874
|
+
}
|
|
7882
7875
|
}
|
|
7883
7876
|
} else {
|
|
7884
7877
|
if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
@@ -8639,9 +8632,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
8639
8632
|
if (!skipOptions) {
|
|
8640
8633
|
setCurrentInstance(instance);
|
|
8641
8634
|
pauseTracking();
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8635
|
+
try {
|
|
8636
|
+
applyOptions(instance);
|
|
8637
|
+
} finally {
|
|
8638
|
+
resetTracking();
|
|
8639
|
+
unsetCurrentInstance();
|
|
8640
|
+
}
|
|
8645
8641
|
}
|
|
8646
8642
|
}
|
|
8647
8643
|
function getAttrsProxy(instance) {
|
|
@@ -8757,7 +8753,7 @@ function isMemoSame(cached, memo) {
|
|
|
8757
8753
|
return true;
|
|
8758
8754
|
}
|
|
8759
8755
|
|
|
8760
|
-
const version = "3.3.
|
|
8756
|
+
const version = "3.3.5";
|
|
8761
8757
|
const _ssrUtils = {
|
|
8762
8758
|
createComponentInstance,
|
|
8763
8759
|
setupComponent,
|
|
@@ -8844,148 +8840,498 @@ const nodeOps = {
|
|
|
8844
8840
|
}
|
|
8845
8841
|
};
|
|
8846
8842
|
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
} else if (isSVG) {
|
|
8855
|
-
el.setAttribute("class", value);
|
|
8856
|
-
} else {
|
|
8857
|
-
el.className = value;
|
|
8858
|
-
}
|
|
8843
|
+
const TRANSITION$1 = "transition";
|
|
8844
|
+
const ANIMATION = "animation";
|
|
8845
|
+
const vtcKey = Symbol("_vtc");
|
|
8846
|
+
const Transition = (props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots);
|
|
8847
|
+
Transition.displayName = "Transition";
|
|
8848
|
+
{
|
|
8849
|
+
Transition.__isBuiltIn = true;
|
|
8859
8850
|
}
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
8863
|
-
|
|
8864
|
-
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
-
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8851
|
+
const DOMTransitionPropsValidators = {
|
|
8852
|
+
name: String,
|
|
8853
|
+
type: String,
|
|
8854
|
+
css: {
|
|
8855
|
+
type: Boolean,
|
|
8856
|
+
default: true
|
|
8857
|
+
},
|
|
8858
|
+
duration: [String, Number, Object],
|
|
8859
|
+
enterFromClass: String,
|
|
8860
|
+
enterActiveClass: String,
|
|
8861
|
+
enterToClass: String,
|
|
8862
|
+
appearFromClass: String,
|
|
8863
|
+
appearActiveClass: String,
|
|
8864
|
+
appearToClass: String,
|
|
8865
|
+
leaveFromClass: String,
|
|
8866
|
+
leaveActiveClass: String,
|
|
8867
|
+
leaveToClass: String
|
|
8868
|
+
};
|
|
8869
|
+
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
|
|
8870
|
+
{},
|
|
8871
|
+
BaseTransitionPropsValidators,
|
|
8872
|
+
DOMTransitionPropsValidators
|
|
8873
|
+
);
|
|
8874
|
+
const callHook = (hook, args = []) => {
|
|
8875
|
+
if (isArray(hook)) {
|
|
8876
|
+
hook.forEach((h2) => h2(...args));
|
|
8877
|
+
} else if (hook) {
|
|
8878
|
+
hook(...args);
|
|
8887
8879
|
}
|
|
8888
|
-
}
|
|
8889
|
-
const
|
|
8890
|
-
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
8896
|
-
|
|
8897
|
-
style.setProperty(name, val);
|
|
8898
|
-
} else {
|
|
8899
|
-
const prefixed = autoPrefix(style, name);
|
|
8900
|
-
if (importantRE.test(val)) {
|
|
8901
|
-
style.setProperty(
|
|
8902
|
-
hyphenate(prefixed),
|
|
8903
|
-
val.replace(importantRE, ""),
|
|
8904
|
-
"important"
|
|
8905
|
-
);
|
|
8906
|
-
} else {
|
|
8907
|
-
style[prefixed] = val;
|
|
8908
|
-
}
|
|
8880
|
+
};
|
|
8881
|
+
const hasExplicitCallback = (hook) => {
|
|
8882
|
+
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
8883
|
+
};
|
|
8884
|
+
function resolveTransitionProps(rawProps) {
|
|
8885
|
+
const baseProps = {};
|
|
8886
|
+
for (const key in rawProps) {
|
|
8887
|
+
if (!(key in DOMTransitionPropsValidators)) {
|
|
8888
|
+
baseProps[key] = rawProps[key];
|
|
8909
8889
|
}
|
|
8910
8890
|
}
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
const prefixCache = {};
|
|
8914
|
-
function autoPrefix(style, rawName) {
|
|
8915
|
-
const cached = prefixCache[rawName];
|
|
8916
|
-
if (cached) {
|
|
8917
|
-
return cached;
|
|
8918
|
-
}
|
|
8919
|
-
let name = camelize(rawName);
|
|
8920
|
-
if (name !== "filter" && name in style) {
|
|
8921
|
-
return prefixCache[rawName] = name;
|
|
8922
|
-
}
|
|
8923
|
-
name = capitalize(name);
|
|
8924
|
-
for (let i = 0; i < prefixes.length; i++) {
|
|
8925
|
-
const prefixed = prefixes[i] + name;
|
|
8926
|
-
if (prefixed in style) {
|
|
8927
|
-
return prefixCache[rawName] = prefixed;
|
|
8928
|
-
}
|
|
8891
|
+
if (rawProps.css === false) {
|
|
8892
|
+
return baseProps;
|
|
8929
8893
|
}
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
}
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
|
|
8894
|
+
const {
|
|
8895
|
+
name = "v",
|
|
8896
|
+
type,
|
|
8897
|
+
duration,
|
|
8898
|
+
enterFromClass = `${name}-enter-from`,
|
|
8899
|
+
enterActiveClass = `${name}-enter-active`,
|
|
8900
|
+
enterToClass = `${name}-enter-to`,
|
|
8901
|
+
appearFromClass = enterFromClass,
|
|
8902
|
+
appearActiveClass = enterActiveClass,
|
|
8903
|
+
appearToClass = enterToClass,
|
|
8904
|
+
leaveFromClass = `${name}-leave-from`,
|
|
8905
|
+
leaveActiveClass = `${name}-leave-active`,
|
|
8906
|
+
leaveToClass = `${name}-leave-to`
|
|
8907
|
+
} = rawProps;
|
|
8908
|
+
const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES", null);
|
|
8909
|
+
let legacyEnterFromClass;
|
|
8910
|
+
let legacyAppearFromClass;
|
|
8911
|
+
let legacyLeaveFromClass;
|
|
8912
|
+
if (legacyClassEnabled) {
|
|
8913
|
+
const toLegacyClass = (cls) => cls.replace(/-from$/, "");
|
|
8914
|
+
if (!rawProps.enterFromClass) {
|
|
8915
|
+
legacyEnterFromClass = toLegacyClass(enterFromClass);
|
|
8950
8916
|
}
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
|
|
8954
|
-
function compatCoerceAttr(el, key, value, instance = null) {
|
|
8955
|
-
if (isEnumeratedAttr(key)) {
|
|
8956
|
-
const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
|
|
8957
|
-
if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
|
|
8958
|
-
"ATTR_ENUMERATED_COERCION",
|
|
8959
|
-
instance,
|
|
8960
|
-
key,
|
|
8961
|
-
value,
|
|
8962
|
-
v2CoercedValue
|
|
8963
|
-
)) {
|
|
8964
|
-
el.setAttribute(key, v2CoercedValue);
|
|
8965
|
-
return true;
|
|
8917
|
+
if (!rawProps.appearFromClass) {
|
|
8918
|
+
legacyAppearFromClass = toLegacyClass(appearFromClass);
|
|
8966
8919
|
}
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
instance,
|
|
8970
|
-
key
|
|
8971
|
-
)) {
|
|
8972
|
-
el.removeAttribute(key);
|
|
8973
|
-
return true;
|
|
8974
|
-
}
|
|
8975
|
-
return false;
|
|
8976
|
-
}
|
|
8977
|
-
|
|
8978
|
-
function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
8979
|
-
if (key === "innerHTML" || key === "textContent") {
|
|
8980
|
-
if (prevChildren) {
|
|
8981
|
-
unmountChildren(prevChildren, parentComponent, parentSuspense);
|
|
8920
|
+
if (!rawProps.leaveFromClass) {
|
|
8921
|
+
legacyLeaveFromClass = toLegacyClass(leaveFromClass);
|
|
8982
8922
|
}
|
|
8983
|
-
el[key] = value == null ? "" : value;
|
|
8984
|
-
return;
|
|
8985
8923
|
}
|
|
8986
|
-
const
|
|
8987
|
-
|
|
8988
|
-
|
|
8924
|
+
const durations = normalizeDuration(duration);
|
|
8925
|
+
const enterDuration = durations && durations[0];
|
|
8926
|
+
const leaveDuration = durations && durations[1];
|
|
8927
|
+
const {
|
|
8928
|
+
onBeforeEnter,
|
|
8929
|
+
onEnter,
|
|
8930
|
+
onEnterCancelled,
|
|
8931
|
+
onLeave,
|
|
8932
|
+
onLeaveCancelled,
|
|
8933
|
+
onBeforeAppear = onBeforeEnter,
|
|
8934
|
+
onAppear = onEnter,
|
|
8935
|
+
onAppearCancelled = onEnterCancelled
|
|
8936
|
+
} = baseProps;
|
|
8937
|
+
const finishEnter = (el, isAppear, done) => {
|
|
8938
|
+
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
8939
|
+
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
8940
|
+
done && done();
|
|
8941
|
+
};
|
|
8942
|
+
const finishLeave = (el, done) => {
|
|
8943
|
+
el._isLeaving = false;
|
|
8944
|
+
removeTransitionClass(el, leaveFromClass);
|
|
8945
|
+
removeTransitionClass(el, leaveToClass);
|
|
8946
|
+
removeTransitionClass(el, leaveActiveClass);
|
|
8947
|
+
done && done();
|
|
8948
|
+
};
|
|
8949
|
+
const makeEnterHook = (isAppear) => {
|
|
8950
|
+
return (el, done) => {
|
|
8951
|
+
const hook = isAppear ? onAppear : onEnter;
|
|
8952
|
+
const resolve = () => finishEnter(el, isAppear, done);
|
|
8953
|
+
callHook(hook, [el, resolve]);
|
|
8954
|
+
nextFrame(() => {
|
|
8955
|
+
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
8956
|
+
if (legacyClassEnabled) {
|
|
8957
|
+
const legacyClass = isAppear ? legacyAppearFromClass : legacyEnterFromClass;
|
|
8958
|
+
if (legacyClass) {
|
|
8959
|
+
removeTransitionClass(el, legacyClass);
|
|
8960
|
+
}
|
|
8961
|
+
}
|
|
8962
|
+
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
8963
|
+
if (!hasExplicitCallback(hook)) {
|
|
8964
|
+
whenTransitionEnds(el, type, enterDuration, resolve);
|
|
8965
|
+
}
|
|
8966
|
+
});
|
|
8967
|
+
};
|
|
8968
|
+
};
|
|
8969
|
+
return extend(baseProps, {
|
|
8970
|
+
onBeforeEnter(el) {
|
|
8971
|
+
callHook(onBeforeEnter, [el]);
|
|
8972
|
+
addTransitionClass(el, enterFromClass);
|
|
8973
|
+
if (legacyClassEnabled && legacyEnterFromClass) {
|
|
8974
|
+
addTransitionClass(el, legacyEnterFromClass);
|
|
8975
|
+
}
|
|
8976
|
+
addTransitionClass(el, enterActiveClass);
|
|
8977
|
+
},
|
|
8978
|
+
onBeforeAppear(el) {
|
|
8979
|
+
callHook(onBeforeAppear, [el]);
|
|
8980
|
+
addTransitionClass(el, appearFromClass);
|
|
8981
|
+
if (legacyClassEnabled && legacyAppearFromClass) {
|
|
8982
|
+
addTransitionClass(el, legacyAppearFromClass);
|
|
8983
|
+
}
|
|
8984
|
+
addTransitionClass(el, appearActiveClass);
|
|
8985
|
+
},
|
|
8986
|
+
onEnter: makeEnterHook(false),
|
|
8987
|
+
onAppear: makeEnterHook(true),
|
|
8988
|
+
onLeave(el, done) {
|
|
8989
|
+
el._isLeaving = true;
|
|
8990
|
+
const resolve = () => finishLeave(el, done);
|
|
8991
|
+
addTransitionClass(el, leaveFromClass);
|
|
8992
|
+
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
8993
|
+
addTransitionClass(el, legacyLeaveFromClass);
|
|
8994
|
+
}
|
|
8995
|
+
forceReflow();
|
|
8996
|
+
addTransitionClass(el, leaveActiveClass);
|
|
8997
|
+
nextFrame(() => {
|
|
8998
|
+
if (!el._isLeaving) {
|
|
8999
|
+
return;
|
|
9000
|
+
}
|
|
9001
|
+
removeTransitionClass(el, leaveFromClass);
|
|
9002
|
+
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
9003
|
+
removeTransitionClass(el, legacyLeaveFromClass);
|
|
9004
|
+
}
|
|
9005
|
+
addTransitionClass(el, leaveToClass);
|
|
9006
|
+
if (!hasExplicitCallback(onLeave)) {
|
|
9007
|
+
whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
9008
|
+
}
|
|
9009
|
+
});
|
|
9010
|
+
callHook(onLeave, [el, resolve]);
|
|
9011
|
+
},
|
|
9012
|
+
onEnterCancelled(el) {
|
|
9013
|
+
finishEnter(el, false);
|
|
9014
|
+
callHook(onEnterCancelled, [el]);
|
|
9015
|
+
},
|
|
9016
|
+
onAppearCancelled(el) {
|
|
9017
|
+
finishEnter(el, true);
|
|
9018
|
+
callHook(onAppearCancelled, [el]);
|
|
9019
|
+
},
|
|
9020
|
+
onLeaveCancelled(el) {
|
|
9021
|
+
finishLeave(el);
|
|
9022
|
+
callHook(onLeaveCancelled, [el]);
|
|
9023
|
+
}
|
|
9024
|
+
});
|
|
9025
|
+
}
|
|
9026
|
+
function normalizeDuration(duration) {
|
|
9027
|
+
if (duration == null) {
|
|
9028
|
+
return null;
|
|
9029
|
+
} else if (isObject(duration)) {
|
|
9030
|
+
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
9031
|
+
} else {
|
|
9032
|
+
const n = NumberOf(duration);
|
|
9033
|
+
return [n, n];
|
|
9034
|
+
}
|
|
9035
|
+
}
|
|
9036
|
+
function NumberOf(val) {
|
|
9037
|
+
const res = toNumber(val);
|
|
9038
|
+
return res;
|
|
9039
|
+
}
|
|
9040
|
+
function addTransitionClass(el, cls) {
|
|
9041
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
9042
|
+
(el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
|
|
9043
|
+
}
|
|
9044
|
+
function removeTransitionClass(el, cls) {
|
|
9045
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
9046
|
+
const _vtc = el[vtcKey];
|
|
9047
|
+
if (_vtc) {
|
|
9048
|
+
_vtc.delete(cls);
|
|
9049
|
+
if (!_vtc.size) {
|
|
9050
|
+
el[vtcKey] = void 0;
|
|
9051
|
+
}
|
|
9052
|
+
}
|
|
9053
|
+
}
|
|
9054
|
+
function nextFrame(cb) {
|
|
9055
|
+
requestAnimationFrame(() => {
|
|
9056
|
+
requestAnimationFrame(cb);
|
|
9057
|
+
});
|
|
9058
|
+
}
|
|
9059
|
+
let endId = 0;
|
|
9060
|
+
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
9061
|
+
const id = el._endId = ++endId;
|
|
9062
|
+
const resolveIfNotStale = () => {
|
|
9063
|
+
if (id === el._endId) {
|
|
9064
|
+
resolve();
|
|
9065
|
+
}
|
|
9066
|
+
};
|
|
9067
|
+
if (explicitTimeout) {
|
|
9068
|
+
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
9069
|
+
}
|
|
9070
|
+
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
9071
|
+
if (!type) {
|
|
9072
|
+
return resolve();
|
|
9073
|
+
}
|
|
9074
|
+
const endEvent = type + "end";
|
|
9075
|
+
let ended = 0;
|
|
9076
|
+
const end = () => {
|
|
9077
|
+
el.removeEventListener(endEvent, onEnd);
|
|
9078
|
+
resolveIfNotStale();
|
|
9079
|
+
};
|
|
9080
|
+
const onEnd = (e) => {
|
|
9081
|
+
if (e.target === el && ++ended >= propCount) {
|
|
9082
|
+
end();
|
|
9083
|
+
}
|
|
9084
|
+
};
|
|
9085
|
+
setTimeout(() => {
|
|
9086
|
+
if (ended < propCount) {
|
|
9087
|
+
end();
|
|
9088
|
+
}
|
|
9089
|
+
}, timeout + 1);
|
|
9090
|
+
el.addEventListener(endEvent, onEnd);
|
|
9091
|
+
}
|
|
9092
|
+
function getTransitionInfo(el, expectedType) {
|
|
9093
|
+
const styles = window.getComputedStyle(el);
|
|
9094
|
+
const getStyleProperties = (key) => (styles[key] || "").split(", ");
|
|
9095
|
+
const transitionDelays = getStyleProperties(`${TRANSITION$1}Delay`);
|
|
9096
|
+
const transitionDurations = getStyleProperties(`${TRANSITION$1}Duration`);
|
|
9097
|
+
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
9098
|
+
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
9099
|
+
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
9100
|
+
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
9101
|
+
let type = null;
|
|
9102
|
+
let timeout = 0;
|
|
9103
|
+
let propCount = 0;
|
|
9104
|
+
if (expectedType === TRANSITION$1) {
|
|
9105
|
+
if (transitionTimeout > 0) {
|
|
9106
|
+
type = TRANSITION$1;
|
|
9107
|
+
timeout = transitionTimeout;
|
|
9108
|
+
propCount = transitionDurations.length;
|
|
9109
|
+
}
|
|
9110
|
+
} else if (expectedType === ANIMATION) {
|
|
9111
|
+
if (animationTimeout > 0) {
|
|
9112
|
+
type = ANIMATION;
|
|
9113
|
+
timeout = animationTimeout;
|
|
9114
|
+
propCount = animationDurations.length;
|
|
9115
|
+
}
|
|
9116
|
+
} else {
|
|
9117
|
+
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
9118
|
+
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION$1 : ANIMATION : null;
|
|
9119
|
+
propCount = type ? type === TRANSITION$1 ? transitionDurations.length : animationDurations.length : 0;
|
|
9120
|
+
}
|
|
9121
|
+
const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test(
|
|
9122
|
+
getStyleProperties(`${TRANSITION$1}Property`).toString()
|
|
9123
|
+
);
|
|
9124
|
+
return {
|
|
9125
|
+
type,
|
|
9126
|
+
timeout,
|
|
9127
|
+
propCount,
|
|
9128
|
+
hasTransform
|
|
9129
|
+
};
|
|
9130
|
+
}
|
|
9131
|
+
function getTimeout(delays, durations) {
|
|
9132
|
+
while (delays.length < durations.length) {
|
|
9133
|
+
delays = delays.concat(delays);
|
|
9134
|
+
}
|
|
9135
|
+
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
9136
|
+
}
|
|
9137
|
+
function toMs(s) {
|
|
9138
|
+
if (s === "auto")
|
|
9139
|
+
return 0;
|
|
9140
|
+
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
9141
|
+
}
|
|
9142
|
+
function forceReflow() {
|
|
9143
|
+
return document.body.offsetHeight;
|
|
9144
|
+
}
|
|
9145
|
+
|
|
9146
|
+
function patchClass(el, value, isSVG) {
|
|
9147
|
+
const transitionClasses = el[vtcKey];
|
|
9148
|
+
if (transitionClasses) {
|
|
9149
|
+
value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
|
|
9150
|
+
}
|
|
9151
|
+
if (value == null) {
|
|
9152
|
+
el.removeAttribute("class");
|
|
9153
|
+
} else if (isSVG) {
|
|
9154
|
+
el.setAttribute("class", value);
|
|
9155
|
+
} else {
|
|
9156
|
+
el.className = value;
|
|
9157
|
+
}
|
|
9158
|
+
}
|
|
9159
|
+
|
|
9160
|
+
const vShowOldKey = Symbol("_vod");
|
|
9161
|
+
const vShow = {
|
|
9162
|
+
beforeMount(el, { value }, { transition }) {
|
|
9163
|
+
el[vShowOldKey] = el.style.display === "none" ? "" : el.style.display;
|
|
9164
|
+
if (transition && value) {
|
|
9165
|
+
transition.beforeEnter(el);
|
|
9166
|
+
} else {
|
|
9167
|
+
setDisplay(el, value);
|
|
9168
|
+
}
|
|
9169
|
+
},
|
|
9170
|
+
mounted(el, { value }, { transition }) {
|
|
9171
|
+
if (transition && value) {
|
|
9172
|
+
transition.enter(el);
|
|
9173
|
+
}
|
|
9174
|
+
},
|
|
9175
|
+
updated(el, { value, oldValue }, { transition }) {
|
|
9176
|
+
if (!value === !oldValue)
|
|
9177
|
+
return;
|
|
9178
|
+
if (transition) {
|
|
9179
|
+
if (value) {
|
|
9180
|
+
transition.beforeEnter(el);
|
|
9181
|
+
setDisplay(el, true);
|
|
9182
|
+
transition.enter(el);
|
|
9183
|
+
} else {
|
|
9184
|
+
transition.leave(el, () => {
|
|
9185
|
+
setDisplay(el, false);
|
|
9186
|
+
});
|
|
9187
|
+
}
|
|
9188
|
+
} else {
|
|
9189
|
+
setDisplay(el, value);
|
|
9190
|
+
}
|
|
9191
|
+
},
|
|
9192
|
+
beforeUnmount(el, { value }) {
|
|
9193
|
+
setDisplay(el, value);
|
|
9194
|
+
}
|
|
9195
|
+
};
|
|
9196
|
+
function setDisplay(el, value) {
|
|
9197
|
+
el.style.display = value ? el[vShowOldKey] : "none";
|
|
9198
|
+
}
|
|
9199
|
+
function initVShowForSSR() {
|
|
9200
|
+
vShow.getSSRProps = ({ value }) => {
|
|
9201
|
+
if (!value) {
|
|
9202
|
+
return { style: { display: "none" } };
|
|
9203
|
+
}
|
|
9204
|
+
};
|
|
9205
|
+
}
|
|
9206
|
+
|
|
9207
|
+
function patchStyle(el, prev, next) {
|
|
9208
|
+
const style = el.style;
|
|
9209
|
+
const isCssString = isString(next);
|
|
9210
|
+
if (next && !isCssString) {
|
|
9211
|
+
if (prev && !isString(prev)) {
|
|
9212
|
+
for (const key in prev) {
|
|
9213
|
+
if (next[key] == null) {
|
|
9214
|
+
setStyle(style, key, "");
|
|
9215
|
+
}
|
|
9216
|
+
}
|
|
9217
|
+
}
|
|
9218
|
+
for (const key in next) {
|
|
9219
|
+
setStyle(style, key, next[key]);
|
|
9220
|
+
}
|
|
9221
|
+
} else {
|
|
9222
|
+
const currentDisplay = style.display;
|
|
9223
|
+
if (isCssString) {
|
|
9224
|
+
if (prev !== next) {
|
|
9225
|
+
style.cssText = next;
|
|
9226
|
+
}
|
|
9227
|
+
} else if (prev) {
|
|
9228
|
+
el.removeAttribute("style");
|
|
9229
|
+
}
|
|
9230
|
+
if (vShowOldKey in el) {
|
|
9231
|
+
style.display = currentDisplay;
|
|
9232
|
+
}
|
|
9233
|
+
}
|
|
9234
|
+
}
|
|
9235
|
+
const importantRE = /\s*!important$/;
|
|
9236
|
+
function setStyle(style, name, val) {
|
|
9237
|
+
if (isArray(val)) {
|
|
9238
|
+
val.forEach((v) => setStyle(style, name, v));
|
|
9239
|
+
} else {
|
|
9240
|
+
if (val == null)
|
|
9241
|
+
val = "";
|
|
9242
|
+
if (name.startsWith("--")) {
|
|
9243
|
+
style.setProperty(name, val);
|
|
9244
|
+
} else {
|
|
9245
|
+
const prefixed = autoPrefix(style, name);
|
|
9246
|
+
if (importantRE.test(val)) {
|
|
9247
|
+
style.setProperty(
|
|
9248
|
+
hyphenate(prefixed),
|
|
9249
|
+
val.replace(importantRE, ""),
|
|
9250
|
+
"important"
|
|
9251
|
+
);
|
|
9252
|
+
} else {
|
|
9253
|
+
style[prefixed] = val;
|
|
9254
|
+
}
|
|
9255
|
+
}
|
|
9256
|
+
}
|
|
9257
|
+
}
|
|
9258
|
+
const prefixes = ["Webkit", "Moz", "ms"];
|
|
9259
|
+
const prefixCache = {};
|
|
9260
|
+
function autoPrefix(style, rawName) {
|
|
9261
|
+
const cached = prefixCache[rawName];
|
|
9262
|
+
if (cached) {
|
|
9263
|
+
return cached;
|
|
9264
|
+
}
|
|
9265
|
+
let name = camelize(rawName);
|
|
9266
|
+
if (name !== "filter" && name in style) {
|
|
9267
|
+
return prefixCache[rawName] = name;
|
|
9268
|
+
}
|
|
9269
|
+
name = capitalize(name);
|
|
9270
|
+
for (let i = 0; i < prefixes.length; i++) {
|
|
9271
|
+
const prefixed = prefixes[i] + name;
|
|
9272
|
+
if (prefixed in style) {
|
|
9273
|
+
return prefixCache[rawName] = prefixed;
|
|
9274
|
+
}
|
|
9275
|
+
}
|
|
9276
|
+
return rawName;
|
|
9277
|
+
}
|
|
9278
|
+
|
|
9279
|
+
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
9280
|
+
function patchAttr(el, key, value, isSVG, instance) {
|
|
9281
|
+
if (isSVG && key.startsWith("xlink:")) {
|
|
9282
|
+
if (value == null) {
|
|
9283
|
+
el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
9284
|
+
} else {
|
|
9285
|
+
el.setAttributeNS(xlinkNS, key, value);
|
|
9286
|
+
}
|
|
9287
|
+
} else {
|
|
9288
|
+
if (compatCoerceAttr(el, key, value, instance)) {
|
|
9289
|
+
return;
|
|
9290
|
+
}
|
|
9291
|
+
const isBoolean = isSpecialBooleanAttr(key);
|
|
9292
|
+
if (value == null || isBoolean && !includeBooleanAttr(value)) {
|
|
9293
|
+
el.removeAttribute(key);
|
|
9294
|
+
} else {
|
|
9295
|
+
el.setAttribute(key, isBoolean ? "" : value);
|
|
9296
|
+
}
|
|
9297
|
+
}
|
|
9298
|
+
}
|
|
9299
|
+
const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
|
|
9300
|
+
function compatCoerceAttr(el, key, value, instance = null) {
|
|
9301
|
+
if (isEnumeratedAttr(key)) {
|
|
9302
|
+
const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
|
|
9303
|
+
if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
|
|
9304
|
+
"ATTR_ENUMERATED_COERCION",
|
|
9305
|
+
instance,
|
|
9306
|
+
key,
|
|
9307
|
+
value,
|
|
9308
|
+
v2CoercedValue
|
|
9309
|
+
)) {
|
|
9310
|
+
el.setAttribute(key, v2CoercedValue);
|
|
9311
|
+
return true;
|
|
9312
|
+
}
|
|
9313
|
+
} else if (value === false && !isSpecialBooleanAttr(key) && compatUtils.softAssertCompatEnabled(
|
|
9314
|
+
"ATTR_FALSE_VALUE",
|
|
9315
|
+
instance,
|
|
9316
|
+
key
|
|
9317
|
+
)) {
|
|
9318
|
+
el.removeAttribute(key);
|
|
9319
|
+
return true;
|
|
9320
|
+
}
|
|
9321
|
+
return false;
|
|
9322
|
+
}
|
|
9323
|
+
|
|
9324
|
+
function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspense, unmountChildren) {
|
|
9325
|
+
if (key === "innerHTML" || key === "textContent") {
|
|
9326
|
+
if (prevChildren) {
|
|
9327
|
+
unmountChildren(prevChildren, parentComponent, parentSuspense);
|
|
9328
|
+
}
|
|
9329
|
+
el[key] = value == null ? "" : value;
|
|
9330
|
+
return;
|
|
9331
|
+
}
|
|
9332
|
+
const tag = el.tagName;
|
|
9333
|
+
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
9334
|
+
!tag.includes("-")) {
|
|
8989
9335
|
el._value = value;
|
|
8990
9336
|
const oldValue = tag === "OPTION" ? el.getAttribute("value") : el.value;
|
|
8991
9337
|
const newValue = value == null ? "" : value;
|
|
@@ -9034,8 +9380,9 @@ function addEventListener(el, event, handler, options) {
|
|
|
9034
9380
|
function removeEventListener(el, event, handler, options) {
|
|
9035
9381
|
el.removeEventListener(event, handler, options);
|
|
9036
9382
|
}
|
|
9383
|
+
const veiKey = Symbol("_vei");
|
|
9037
9384
|
function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
9038
|
-
const invokers = el
|
|
9385
|
+
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
9039
9386
|
const existingInvoker = invokers[rawName];
|
|
9040
9387
|
if (nextValue && existingInvoker) {
|
|
9041
9388
|
existingInvoker.value = nextValue;
|
|
@@ -9140,539 +9487,250 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
9140
9487
|
if (key === "spellcheck" || key === "draggable" || key === "translate") {
|
|
9141
9488
|
return false;
|
|
9142
9489
|
}
|
|
9143
|
-
if (key === "form") {
|
|
9144
|
-
return false;
|
|
9145
|
-
}
|
|
9146
|
-
if (key === "list" && el.tagName === "INPUT") {
|
|
9147
|
-
return false;
|
|
9148
|
-
}
|
|
9149
|
-
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
9150
|
-
return false;
|
|
9151
|
-
}
|
|
9152
|
-
if (nativeOnRE.test(key) && isString(value)) {
|
|
9153
|
-
return false;
|
|
9154
|
-
}
|
|
9155
|
-
return key in el;
|
|
9156
|
-
}
|
|
9157
|
-
|
|
9158
|
-
function defineCustomElement(options, hydrate2) {
|
|
9159
|
-
const Comp = defineComponent(options);
|
|
9160
|
-
class VueCustomElement extends VueElement {
|
|
9161
|
-
constructor(initialProps) {
|
|
9162
|
-
super(Comp, initialProps, hydrate2);
|
|
9163
|
-
}
|
|
9164
|
-
}
|
|
9165
|
-
VueCustomElement.def = Comp;
|
|
9166
|
-
return VueCustomElement;
|
|
9167
|
-
}
|
|
9168
|
-
const defineSSRCustomElement = (options) => {
|
|
9169
|
-
return defineCustomElement(options, hydrate);
|
|
9170
|
-
};
|
|
9171
|
-
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
9172
|
-
};
|
|
9173
|
-
class VueElement extends BaseClass {
|
|
9174
|
-
constructor(_def, _props = {}, hydrate2) {
|
|
9175
|
-
super();
|
|
9176
|
-
this._def = _def;
|
|
9177
|
-
this._props = _props;
|
|
9178
|
-
/**
|
|
9179
|
-
* @internal
|
|
9180
|
-
*/
|
|
9181
|
-
this._instance = null;
|
|
9182
|
-
this._connected = false;
|
|
9183
|
-
this._resolved = false;
|
|
9184
|
-
this._numberProps = null;
|
|
9185
|
-
if (this.shadowRoot && hydrate2) {
|
|
9186
|
-
hydrate2(this._createVNode(), this.shadowRoot);
|
|
9187
|
-
} else {
|
|
9188
|
-
this.attachShadow({ mode: "open" });
|
|
9189
|
-
if (!this._def.__asyncLoader) {
|
|
9190
|
-
this._resolveProps(this._def);
|
|
9191
|
-
}
|
|
9192
|
-
}
|
|
9193
|
-
}
|
|
9194
|
-
connectedCallback() {
|
|
9195
|
-
this._connected = true;
|
|
9196
|
-
if (!this._instance) {
|
|
9197
|
-
if (this._resolved) {
|
|
9198
|
-
this._update();
|
|
9199
|
-
} else {
|
|
9200
|
-
this._resolveDef();
|
|
9201
|
-
}
|
|
9202
|
-
}
|
|
9203
|
-
}
|
|
9204
|
-
disconnectedCallback() {
|
|
9205
|
-
this._connected = false;
|
|
9206
|
-
nextTick(() => {
|
|
9207
|
-
if (!this._connected) {
|
|
9208
|
-
render(null, this.shadowRoot);
|
|
9209
|
-
this._instance = null;
|
|
9210
|
-
}
|
|
9211
|
-
});
|
|
9212
|
-
}
|
|
9213
|
-
/**
|
|
9214
|
-
* resolve inner component definition (handle possible async component)
|
|
9215
|
-
*/
|
|
9216
|
-
_resolveDef() {
|
|
9217
|
-
this._resolved = true;
|
|
9218
|
-
for (let i = 0; i < this.attributes.length; i++) {
|
|
9219
|
-
this._setAttr(this.attributes[i].name);
|
|
9220
|
-
}
|
|
9221
|
-
new MutationObserver((mutations) => {
|
|
9222
|
-
for (const m of mutations) {
|
|
9223
|
-
this._setAttr(m.attributeName);
|
|
9224
|
-
}
|
|
9225
|
-
}).observe(this, { attributes: true });
|
|
9226
|
-
const resolve = (def, isAsync = false) => {
|
|
9227
|
-
const { props, styles } = def;
|
|
9228
|
-
let numberProps;
|
|
9229
|
-
if (props && !isArray(props)) {
|
|
9230
|
-
for (const key in props) {
|
|
9231
|
-
const opt = props[key];
|
|
9232
|
-
if (opt === Number || opt && opt.type === Number) {
|
|
9233
|
-
if (key in this._props) {
|
|
9234
|
-
this._props[key] = toNumber(this._props[key]);
|
|
9235
|
-
}
|
|
9236
|
-
(numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
|
|
9237
|
-
}
|
|
9238
|
-
}
|
|
9239
|
-
}
|
|
9240
|
-
this._numberProps = numberProps;
|
|
9241
|
-
if (isAsync) {
|
|
9242
|
-
this._resolveProps(def);
|
|
9243
|
-
}
|
|
9244
|
-
this._applyStyles(styles);
|
|
9245
|
-
this._update();
|
|
9246
|
-
};
|
|
9247
|
-
const asyncDef = this._def.__asyncLoader;
|
|
9248
|
-
if (asyncDef) {
|
|
9249
|
-
asyncDef().then((def) => resolve(def, true));
|
|
9250
|
-
} else {
|
|
9251
|
-
resolve(this._def);
|
|
9252
|
-
}
|
|
9253
|
-
}
|
|
9254
|
-
_resolveProps(def) {
|
|
9255
|
-
const { props } = def;
|
|
9256
|
-
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
9257
|
-
for (const key of Object.keys(this)) {
|
|
9258
|
-
if (key[0] !== "_" && declaredPropKeys.includes(key)) {
|
|
9259
|
-
this._setProp(key, this[key], true, false);
|
|
9260
|
-
}
|
|
9261
|
-
}
|
|
9262
|
-
for (const key of declaredPropKeys.map(camelize)) {
|
|
9263
|
-
Object.defineProperty(this, key, {
|
|
9264
|
-
get() {
|
|
9265
|
-
return this._getProp(key);
|
|
9266
|
-
},
|
|
9267
|
-
set(val) {
|
|
9268
|
-
this._setProp(key, val);
|
|
9269
|
-
}
|
|
9270
|
-
});
|
|
9271
|
-
}
|
|
9272
|
-
}
|
|
9273
|
-
_setAttr(key) {
|
|
9274
|
-
let value = this.getAttribute(key);
|
|
9275
|
-
const camelKey = camelize(key);
|
|
9276
|
-
if (this._numberProps && this._numberProps[camelKey]) {
|
|
9277
|
-
value = toNumber(value);
|
|
9278
|
-
}
|
|
9279
|
-
this._setProp(camelKey, value, false);
|
|
9280
|
-
}
|
|
9281
|
-
/**
|
|
9282
|
-
* @internal
|
|
9283
|
-
*/
|
|
9284
|
-
_getProp(key) {
|
|
9285
|
-
return this._props[key];
|
|
9286
|
-
}
|
|
9287
|
-
/**
|
|
9288
|
-
* @internal
|
|
9289
|
-
*/
|
|
9290
|
-
_setProp(key, val, shouldReflect = true, shouldUpdate = true) {
|
|
9291
|
-
if (val !== this._props[key]) {
|
|
9292
|
-
this._props[key] = val;
|
|
9293
|
-
if (shouldUpdate && this._instance) {
|
|
9294
|
-
this._update();
|
|
9295
|
-
}
|
|
9296
|
-
if (shouldReflect) {
|
|
9297
|
-
if (val === true) {
|
|
9298
|
-
this.setAttribute(hyphenate(key), "");
|
|
9299
|
-
} else if (typeof val === "string" || typeof val === "number") {
|
|
9300
|
-
this.setAttribute(hyphenate(key), val + "");
|
|
9301
|
-
} else if (!val) {
|
|
9302
|
-
this.removeAttribute(hyphenate(key));
|
|
9303
|
-
}
|
|
9304
|
-
}
|
|
9305
|
-
}
|
|
9306
|
-
}
|
|
9307
|
-
_update() {
|
|
9308
|
-
render(this._createVNode(), this.shadowRoot);
|
|
9309
|
-
}
|
|
9310
|
-
_createVNode() {
|
|
9311
|
-
const vnode = createVNode(this._def, extend({}, this._props));
|
|
9312
|
-
if (!this._instance) {
|
|
9313
|
-
vnode.ce = (instance) => {
|
|
9314
|
-
this._instance = instance;
|
|
9315
|
-
instance.isCE = true;
|
|
9316
|
-
const dispatch = (event, args) => {
|
|
9317
|
-
this.dispatchEvent(
|
|
9318
|
-
new CustomEvent(event, {
|
|
9319
|
-
detail: args
|
|
9320
|
-
})
|
|
9321
|
-
);
|
|
9322
|
-
};
|
|
9323
|
-
instance.emit = (event, ...args) => {
|
|
9324
|
-
dispatch(event, args);
|
|
9325
|
-
if (hyphenate(event) !== event) {
|
|
9326
|
-
dispatch(hyphenate(event), args);
|
|
9327
|
-
}
|
|
9328
|
-
};
|
|
9329
|
-
let parent = this;
|
|
9330
|
-
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
9331
|
-
if (parent instanceof VueElement) {
|
|
9332
|
-
instance.parent = parent._instance;
|
|
9333
|
-
instance.provides = parent._instance.provides;
|
|
9334
|
-
break;
|
|
9335
|
-
}
|
|
9336
|
-
}
|
|
9337
|
-
};
|
|
9338
|
-
}
|
|
9339
|
-
return vnode;
|
|
9340
|
-
}
|
|
9341
|
-
_applyStyles(styles) {
|
|
9342
|
-
if (styles) {
|
|
9343
|
-
styles.forEach((css) => {
|
|
9344
|
-
const s = document.createElement("style");
|
|
9345
|
-
s.textContent = css;
|
|
9346
|
-
this.shadowRoot.appendChild(s);
|
|
9347
|
-
});
|
|
9348
|
-
}
|
|
9349
|
-
}
|
|
9350
|
-
}
|
|
9351
|
-
|
|
9352
|
-
function useCssModule(name = "$style") {
|
|
9353
|
-
{
|
|
9354
|
-
const instance = getCurrentInstance();
|
|
9355
|
-
if (!instance) {
|
|
9356
|
-
return EMPTY_OBJ;
|
|
9357
|
-
}
|
|
9358
|
-
const modules = instance.type.__cssModules;
|
|
9359
|
-
if (!modules) {
|
|
9360
|
-
return EMPTY_OBJ;
|
|
9361
|
-
}
|
|
9362
|
-
const mod = modules[name];
|
|
9363
|
-
if (!mod) {
|
|
9364
|
-
return EMPTY_OBJ;
|
|
9365
|
-
}
|
|
9366
|
-
return mod;
|
|
9490
|
+
if (key === "form") {
|
|
9491
|
+
return false;
|
|
9367
9492
|
}
|
|
9493
|
+
if (key === "list" && el.tagName === "INPUT") {
|
|
9494
|
+
return false;
|
|
9495
|
+
}
|
|
9496
|
+
if (key === "type" && el.tagName === "TEXTAREA") {
|
|
9497
|
+
return false;
|
|
9498
|
+
}
|
|
9499
|
+
if (nativeOnRE.test(key) && isString(value)) {
|
|
9500
|
+
return false;
|
|
9501
|
+
}
|
|
9502
|
+
return key in el;
|
|
9368
9503
|
}
|
|
9369
9504
|
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
{
|
|
9379
|
-
Transition.__isBuiltIn = true;
|
|
9380
|
-
}
|
|
9381
|
-
const DOMTransitionPropsValidators = {
|
|
9382
|
-
name: String,
|
|
9383
|
-
type: String,
|
|
9384
|
-
css: {
|
|
9385
|
-
type: Boolean,
|
|
9386
|
-
default: true
|
|
9387
|
-
},
|
|
9388
|
-
duration: [String, Number, Object],
|
|
9389
|
-
enterFromClass: String,
|
|
9390
|
-
enterActiveClass: String,
|
|
9391
|
-
enterToClass: String,
|
|
9392
|
-
appearFromClass: String,
|
|
9393
|
-
appearActiveClass: String,
|
|
9394
|
-
appearToClass: String,
|
|
9395
|
-
leaveFromClass: String,
|
|
9396
|
-
leaveActiveClass: String,
|
|
9397
|
-
leaveToClass: String
|
|
9398
|
-
};
|
|
9399
|
-
const TransitionPropsValidators = Transition.props = /* @__PURE__ */ extend(
|
|
9400
|
-
{},
|
|
9401
|
-
BaseTransitionPropsValidators,
|
|
9402
|
-
DOMTransitionPropsValidators
|
|
9403
|
-
);
|
|
9404
|
-
const callHook = (hook, args = []) => {
|
|
9405
|
-
if (isArray(hook)) {
|
|
9406
|
-
hook.forEach((h2) => h2(...args));
|
|
9407
|
-
} else if (hook) {
|
|
9408
|
-
hook(...args);
|
|
9505
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
9506
|
+
// @__NO_SIDE_EFFECTS__
|
|
9507
|
+
function defineCustomElement(options, hydrate2) {
|
|
9508
|
+
const Comp = defineComponent(options);
|
|
9509
|
+
class VueCustomElement extends VueElement {
|
|
9510
|
+
constructor(initialProps) {
|
|
9511
|
+
super(Comp, initialProps, hydrate2);
|
|
9512
|
+
}
|
|
9409
9513
|
}
|
|
9514
|
+
VueCustomElement.def = Comp;
|
|
9515
|
+
return VueCustomElement;
|
|
9516
|
+
}
|
|
9517
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
9518
|
+
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options) => {
|
|
9519
|
+
return /* @__PURE__ */ defineCustomElement(options, hydrate);
|
|
9410
9520
|
};
|
|
9411
|
-
const
|
|
9412
|
-
return hook ? isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
9521
|
+
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
9413
9522
|
};
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9523
|
+
class VueElement extends BaseClass {
|
|
9524
|
+
constructor(_def, _props = {}, hydrate2) {
|
|
9525
|
+
super();
|
|
9526
|
+
this._def = _def;
|
|
9527
|
+
this._props = _props;
|
|
9528
|
+
/**
|
|
9529
|
+
* @internal
|
|
9530
|
+
*/
|
|
9531
|
+
this._instance = null;
|
|
9532
|
+
this._connected = false;
|
|
9533
|
+
this._resolved = false;
|
|
9534
|
+
this._numberProps = null;
|
|
9535
|
+
this._ob = null;
|
|
9536
|
+
if (this.shadowRoot && hydrate2) {
|
|
9537
|
+
hydrate2(this._createVNode(), this.shadowRoot);
|
|
9538
|
+
} else {
|
|
9539
|
+
this.attachShadow({ mode: "open" });
|
|
9540
|
+
if (!this._def.__asyncLoader) {
|
|
9541
|
+
this._resolveProps(this._def);
|
|
9542
|
+
}
|
|
9419
9543
|
}
|
|
9420
9544
|
}
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
enterActiveClass = `${name}-enter-active`,
|
|
9430
|
-
enterToClass = `${name}-enter-to`,
|
|
9431
|
-
appearFromClass = enterFromClass,
|
|
9432
|
-
appearActiveClass = enterActiveClass,
|
|
9433
|
-
appearToClass = enterToClass,
|
|
9434
|
-
leaveFromClass = `${name}-leave-from`,
|
|
9435
|
-
leaveActiveClass = `${name}-leave-active`,
|
|
9436
|
-
leaveToClass = `${name}-leave-to`
|
|
9437
|
-
} = rawProps;
|
|
9438
|
-
const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES", null);
|
|
9439
|
-
let legacyEnterFromClass;
|
|
9440
|
-
let legacyAppearFromClass;
|
|
9441
|
-
let legacyLeaveFromClass;
|
|
9442
|
-
if (legacyClassEnabled) {
|
|
9443
|
-
const toLegacyClass = (cls) => cls.replace(/-from$/, "");
|
|
9444
|
-
if (!rawProps.enterFromClass) {
|
|
9445
|
-
legacyEnterFromClass = toLegacyClass(enterFromClass);
|
|
9446
|
-
}
|
|
9447
|
-
if (!rawProps.appearFromClass) {
|
|
9448
|
-
legacyAppearFromClass = toLegacyClass(appearFromClass);
|
|
9545
|
+
connectedCallback() {
|
|
9546
|
+
this._connected = true;
|
|
9547
|
+
if (!this._instance) {
|
|
9548
|
+
if (this._resolved) {
|
|
9549
|
+
this._update();
|
|
9550
|
+
} else {
|
|
9551
|
+
this._resolveDef();
|
|
9552
|
+
}
|
|
9449
9553
|
}
|
|
9450
|
-
|
|
9451
|
-
|
|
9554
|
+
}
|
|
9555
|
+
disconnectedCallback() {
|
|
9556
|
+
this._connected = false;
|
|
9557
|
+
if (this._ob) {
|
|
9558
|
+
this._ob.disconnect();
|
|
9559
|
+
this._ob = null;
|
|
9452
9560
|
}
|
|
9561
|
+
nextTick(() => {
|
|
9562
|
+
if (!this._connected) {
|
|
9563
|
+
render(null, this.shadowRoot);
|
|
9564
|
+
this._instance = null;
|
|
9565
|
+
}
|
|
9566
|
+
});
|
|
9453
9567
|
}
|
|
9454
|
-
|
|
9455
|
-
|
|
9456
|
-
|
|
9457
|
-
|
|
9458
|
-
|
|
9459
|
-
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9476
|
-
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
const makeEnterHook = (isAppear) => {
|
|
9480
|
-
return (el, done) => {
|
|
9481
|
-
const hook = isAppear ? onAppear : onEnter;
|
|
9482
|
-
const resolve = () => finishEnter(el, isAppear, done);
|
|
9483
|
-
callHook(hook, [el, resolve]);
|
|
9484
|
-
nextFrame(() => {
|
|
9485
|
-
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
9486
|
-
if (legacyClassEnabled) {
|
|
9487
|
-
const legacyClass = isAppear ? legacyAppearFromClass : legacyEnterFromClass;
|
|
9488
|
-
if (legacyClass) {
|
|
9489
|
-
removeTransitionClass(el, legacyClass);
|
|
9568
|
+
/**
|
|
9569
|
+
* resolve inner component definition (handle possible async component)
|
|
9570
|
+
*/
|
|
9571
|
+
_resolveDef() {
|
|
9572
|
+
this._resolved = true;
|
|
9573
|
+
for (let i = 0; i < this.attributes.length; i++) {
|
|
9574
|
+
this._setAttr(this.attributes[i].name);
|
|
9575
|
+
}
|
|
9576
|
+
this._ob = new MutationObserver((mutations) => {
|
|
9577
|
+
for (const m of mutations) {
|
|
9578
|
+
this._setAttr(m.attributeName);
|
|
9579
|
+
}
|
|
9580
|
+
});
|
|
9581
|
+
this._ob.observe(this, { attributes: true });
|
|
9582
|
+
const resolve = (def, isAsync = false) => {
|
|
9583
|
+
const { props, styles } = def;
|
|
9584
|
+
let numberProps;
|
|
9585
|
+
if (props && !isArray(props)) {
|
|
9586
|
+
for (const key in props) {
|
|
9587
|
+
const opt = props[key];
|
|
9588
|
+
if (opt === Number || opt && opt.type === Number) {
|
|
9589
|
+
if (key in this._props) {
|
|
9590
|
+
this._props[key] = toNumber(this._props[key]);
|
|
9591
|
+
}
|
|
9592
|
+
(numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[camelize(key)] = true;
|
|
9490
9593
|
}
|
|
9491
9594
|
}
|
|
9492
|
-
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
9493
|
-
if (!hasExplicitCallback(hook)) {
|
|
9494
|
-
whenTransitionEnds(el, type, enterDuration, resolve);
|
|
9495
|
-
}
|
|
9496
|
-
});
|
|
9497
|
-
};
|
|
9498
|
-
};
|
|
9499
|
-
return extend(baseProps, {
|
|
9500
|
-
onBeforeEnter(el) {
|
|
9501
|
-
callHook(onBeforeEnter, [el]);
|
|
9502
|
-
addTransitionClass(el, enterFromClass);
|
|
9503
|
-
if (legacyClassEnabled && legacyEnterFromClass) {
|
|
9504
|
-
addTransitionClass(el, legacyEnterFromClass);
|
|
9505
|
-
}
|
|
9506
|
-
addTransitionClass(el, enterActiveClass);
|
|
9507
|
-
},
|
|
9508
|
-
onBeforeAppear(el) {
|
|
9509
|
-
callHook(onBeforeAppear, [el]);
|
|
9510
|
-
addTransitionClass(el, appearFromClass);
|
|
9511
|
-
if (legacyClassEnabled && legacyAppearFromClass) {
|
|
9512
|
-
addTransitionClass(el, legacyAppearFromClass);
|
|
9513
9595
|
}
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
onAppear: makeEnterHook(true),
|
|
9518
|
-
onLeave(el, done) {
|
|
9519
|
-
el._isLeaving = true;
|
|
9520
|
-
const resolve = () => finishLeave(el, done);
|
|
9521
|
-
addTransitionClass(el, leaveFromClass);
|
|
9522
|
-
if (legacyClassEnabled && legacyLeaveFromClass) {
|
|
9523
|
-
addTransitionClass(el, legacyLeaveFromClass);
|
|
9596
|
+
this._numberProps = numberProps;
|
|
9597
|
+
if (isAsync) {
|
|
9598
|
+
this._resolveProps(def);
|
|
9524
9599
|
}
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9600
|
+
this._applyStyles(styles);
|
|
9601
|
+
this._update();
|
|
9602
|
+
};
|
|
9603
|
+
const asyncDef = this._def.__asyncLoader;
|
|
9604
|
+
if (asyncDef) {
|
|
9605
|
+
asyncDef().then((def) => resolve(def, true));
|
|
9606
|
+
} else {
|
|
9607
|
+
resolve(this._def);
|
|
9608
|
+
}
|
|
9609
|
+
}
|
|
9610
|
+
_resolveProps(def) {
|
|
9611
|
+
const { props } = def;
|
|
9612
|
+
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
9613
|
+
for (const key of Object.keys(this)) {
|
|
9614
|
+
if (key[0] !== "_" && declaredPropKeys.includes(key)) {
|
|
9615
|
+
this._setProp(key, this[key], true, false);
|
|
9616
|
+
}
|
|
9617
|
+
}
|
|
9618
|
+
for (const key of declaredPropKeys.map(camelize)) {
|
|
9619
|
+
Object.defineProperty(this, key, {
|
|
9620
|
+
get() {
|
|
9621
|
+
return this._getProp(key);
|
|
9622
|
+
},
|
|
9623
|
+
set(val) {
|
|
9624
|
+
this._setProp(key, val);
|
|
9538
9625
|
}
|
|
9539
9626
|
});
|
|
9540
|
-
callHook(onLeave, [el, resolve]);
|
|
9541
|
-
},
|
|
9542
|
-
onEnterCancelled(el) {
|
|
9543
|
-
finishEnter(el, false);
|
|
9544
|
-
callHook(onEnterCancelled, [el]);
|
|
9545
|
-
},
|
|
9546
|
-
onAppearCancelled(el) {
|
|
9547
|
-
finishEnter(el, true);
|
|
9548
|
-
callHook(onAppearCancelled, [el]);
|
|
9549
|
-
},
|
|
9550
|
-
onLeaveCancelled(el) {
|
|
9551
|
-
finishLeave(el);
|
|
9552
|
-
callHook(onLeaveCancelled, [el]);
|
|
9553
9627
|
}
|
|
9554
|
-
});
|
|
9555
|
-
}
|
|
9556
|
-
function normalizeDuration(duration) {
|
|
9557
|
-
if (duration == null) {
|
|
9558
|
-
return null;
|
|
9559
|
-
} else if (isObject(duration)) {
|
|
9560
|
-
return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
9561
|
-
} else {
|
|
9562
|
-
const n = NumberOf(duration);
|
|
9563
|
-
return [n, n];
|
|
9564
9628
|
}
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
function addTransitionClass(el, cls) {
|
|
9571
|
-
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
9572
|
-
(el._vtc || (el._vtc = /* @__PURE__ */ new Set())).add(cls);
|
|
9573
|
-
}
|
|
9574
|
-
function removeTransitionClass(el, cls) {
|
|
9575
|
-
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
9576
|
-
const { _vtc } = el;
|
|
9577
|
-
if (_vtc) {
|
|
9578
|
-
_vtc.delete(cls);
|
|
9579
|
-
if (!_vtc.size) {
|
|
9580
|
-
el._vtc = void 0;
|
|
9629
|
+
_setAttr(key) {
|
|
9630
|
+
let value = this.getAttribute(key);
|
|
9631
|
+
const camelKey = camelize(key);
|
|
9632
|
+
if (this._numberProps && this._numberProps[camelKey]) {
|
|
9633
|
+
value = toNumber(value);
|
|
9581
9634
|
}
|
|
9635
|
+
this._setProp(camelKey, value, false);
|
|
9582
9636
|
}
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
}
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
if (
|
|
9594
|
-
|
|
9637
|
+
/**
|
|
9638
|
+
* @internal
|
|
9639
|
+
*/
|
|
9640
|
+
_getProp(key) {
|
|
9641
|
+
return this._props[key];
|
|
9642
|
+
}
|
|
9643
|
+
/**
|
|
9644
|
+
* @internal
|
|
9645
|
+
*/
|
|
9646
|
+
_setProp(key, val, shouldReflect = true, shouldUpdate = true) {
|
|
9647
|
+
if (val !== this._props[key]) {
|
|
9648
|
+
this._props[key] = val;
|
|
9649
|
+
if (shouldUpdate && this._instance) {
|
|
9650
|
+
this._update();
|
|
9651
|
+
}
|
|
9652
|
+
if (shouldReflect) {
|
|
9653
|
+
if (val === true) {
|
|
9654
|
+
this.setAttribute(hyphenate(key), "");
|
|
9655
|
+
} else if (typeof val === "string" || typeof val === "number") {
|
|
9656
|
+
this.setAttribute(hyphenate(key), val + "");
|
|
9657
|
+
} else if (!val) {
|
|
9658
|
+
this.removeAttribute(hyphenate(key));
|
|
9659
|
+
}
|
|
9660
|
+
}
|
|
9595
9661
|
}
|
|
9596
|
-
};
|
|
9597
|
-
if (explicitTimeout) {
|
|
9598
|
-
return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
9599
9662
|
}
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
return resolve();
|
|
9663
|
+
_update() {
|
|
9664
|
+
render(this._createVNode(), this.shadowRoot);
|
|
9603
9665
|
}
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9666
|
+
_createVNode() {
|
|
9667
|
+
const vnode = createVNode(this._def, extend({}, this._props));
|
|
9668
|
+
if (!this._instance) {
|
|
9669
|
+
vnode.ce = (instance) => {
|
|
9670
|
+
this._instance = instance;
|
|
9671
|
+
instance.isCE = true;
|
|
9672
|
+
const dispatch = (event, args) => {
|
|
9673
|
+
this.dispatchEvent(
|
|
9674
|
+
new CustomEvent(event, {
|
|
9675
|
+
detail: args
|
|
9676
|
+
})
|
|
9677
|
+
);
|
|
9678
|
+
};
|
|
9679
|
+
instance.emit = (event, ...args) => {
|
|
9680
|
+
dispatch(event, args);
|
|
9681
|
+
if (hyphenate(event) !== event) {
|
|
9682
|
+
dispatch(hyphenate(event), args);
|
|
9683
|
+
}
|
|
9684
|
+
};
|
|
9685
|
+
let parent = this;
|
|
9686
|
+
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
9687
|
+
if (parent instanceof VueElement) {
|
|
9688
|
+
instance.parent = parent._instance;
|
|
9689
|
+
instance.provides = parent._instance.provides;
|
|
9690
|
+
break;
|
|
9691
|
+
}
|
|
9692
|
+
}
|
|
9693
|
+
};
|
|
9613
9694
|
}
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9695
|
+
return vnode;
|
|
9696
|
+
}
|
|
9697
|
+
_applyStyles(styles) {
|
|
9698
|
+
if (styles) {
|
|
9699
|
+
styles.forEach((css) => {
|
|
9700
|
+
const s = document.createElement("style");
|
|
9701
|
+
s.textContent = css;
|
|
9702
|
+
this.shadowRoot.appendChild(s);
|
|
9703
|
+
});
|
|
9618
9704
|
}
|
|
9619
|
-
}
|
|
9620
|
-
el.addEventListener(endEvent, onEnd);
|
|
9705
|
+
}
|
|
9621
9706
|
}
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
9629
|
-
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
9630
|
-
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
9631
|
-
let type = null;
|
|
9632
|
-
let timeout = 0;
|
|
9633
|
-
let propCount = 0;
|
|
9634
|
-
if (expectedType === TRANSITION$1) {
|
|
9635
|
-
if (transitionTimeout > 0) {
|
|
9636
|
-
type = TRANSITION$1;
|
|
9637
|
-
timeout = transitionTimeout;
|
|
9638
|
-
propCount = transitionDurations.length;
|
|
9707
|
+
|
|
9708
|
+
function useCssModule(name = "$style") {
|
|
9709
|
+
{
|
|
9710
|
+
const instance = getCurrentInstance();
|
|
9711
|
+
if (!instance) {
|
|
9712
|
+
return EMPTY_OBJ;
|
|
9639
9713
|
}
|
|
9640
|
-
|
|
9641
|
-
if (
|
|
9642
|
-
|
|
9643
|
-
timeout = animationTimeout;
|
|
9644
|
-
propCount = animationDurations.length;
|
|
9714
|
+
const modules = instance.type.__cssModules;
|
|
9715
|
+
if (!modules) {
|
|
9716
|
+
return EMPTY_OBJ;
|
|
9645
9717
|
}
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
const hasTransform = type === TRANSITION$1 && /\b(transform|all)(,|$)/.test(
|
|
9652
|
-
getStyleProperties(`${TRANSITION$1}Property`).toString()
|
|
9653
|
-
);
|
|
9654
|
-
return {
|
|
9655
|
-
type,
|
|
9656
|
-
timeout,
|
|
9657
|
-
propCount,
|
|
9658
|
-
hasTransform
|
|
9659
|
-
};
|
|
9660
|
-
}
|
|
9661
|
-
function getTimeout(delays, durations) {
|
|
9662
|
-
while (delays.length < durations.length) {
|
|
9663
|
-
delays = delays.concat(delays);
|
|
9718
|
+
const mod = modules[name];
|
|
9719
|
+
if (!mod) {
|
|
9720
|
+
return EMPTY_OBJ;
|
|
9721
|
+
}
|
|
9722
|
+
return mod;
|
|
9664
9723
|
}
|
|
9665
|
-
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
9666
|
-
}
|
|
9667
|
-
function toMs(s) {
|
|
9668
|
-
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
9669
9724
|
}
|
|
9670
|
-
|
|
9671
|
-
|
|
9725
|
+
|
|
9726
|
+
function useCssVars(getter) {
|
|
9727
|
+
return;
|
|
9672
9728
|
}
|
|
9673
9729
|
|
|
9674
9730
|
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
9675
9731
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
9732
|
+
const moveCbKey = Symbol("_moveCb");
|
|
9733
|
+
const enterCbKey = Symbol("_enterCb");
|
|
9676
9734
|
const TransitionGroupImpl = {
|
|
9677
9735
|
name: "TransitionGroup",
|
|
9678
9736
|
props: /* @__PURE__ */ extend({}, TransitionPropsValidators, {
|
|
@@ -9705,13 +9763,13 @@ const TransitionGroupImpl = {
|
|
|
9705
9763
|
const style = el.style;
|
|
9706
9764
|
addTransitionClass(el, moveClass);
|
|
9707
9765
|
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
9708
|
-
const cb = el
|
|
9766
|
+
const cb = el[moveCbKey] = (e) => {
|
|
9709
9767
|
if (e && e.target !== el) {
|
|
9710
9768
|
return;
|
|
9711
9769
|
}
|
|
9712
9770
|
if (!e || /transform$/.test(e.propertyName)) {
|
|
9713
9771
|
el.removeEventListener("transitionend", cb);
|
|
9714
|
-
el
|
|
9772
|
+
el[moveCbKey] = null;
|
|
9715
9773
|
removeTransitionClass(el, moveClass);
|
|
9716
9774
|
}
|
|
9717
9775
|
};
|
|
@@ -9761,11 +9819,11 @@ const removeMode = (props) => delete props.mode;
|
|
|
9761
9819
|
const TransitionGroup = TransitionGroupImpl;
|
|
9762
9820
|
function callPendingCbs(c) {
|
|
9763
9821
|
const el = c.el;
|
|
9764
|
-
if (el
|
|
9765
|
-
el
|
|
9822
|
+
if (el[moveCbKey]) {
|
|
9823
|
+
el[moveCbKey]();
|
|
9766
9824
|
}
|
|
9767
|
-
if (el
|
|
9768
|
-
el
|
|
9825
|
+
if (el[enterCbKey]) {
|
|
9826
|
+
el[enterCbKey]();
|
|
9769
9827
|
}
|
|
9770
9828
|
}
|
|
9771
9829
|
function recordPosition(c) {
|
|
@@ -9785,8 +9843,9 @@ function applyTranslation(c) {
|
|
|
9785
9843
|
}
|
|
9786
9844
|
function hasCSSTransform(el, root, moveClass) {
|
|
9787
9845
|
const clone = el.cloneNode();
|
|
9788
|
-
|
|
9789
|
-
|
|
9846
|
+
const _vtc = el[vtcKey];
|
|
9847
|
+
if (_vtc) {
|
|
9848
|
+
_vtc.forEach((cls) => {
|
|
9790
9849
|
cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
|
|
9791
9850
|
});
|
|
9792
9851
|
}
|
|
@@ -9813,9 +9872,10 @@ function onCompositionEnd(e) {
|
|
|
9813
9872
|
target.dispatchEvent(new Event("input"));
|
|
9814
9873
|
}
|
|
9815
9874
|
}
|
|
9875
|
+
const assignKey = Symbol("_assign");
|
|
9816
9876
|
const vModelText = {
|
|
9817
9877
|
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
9818
|
-
el
|
|
9878
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
9819
9879
|
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
9820
9880
|
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
9821
9881
|
if (e.target.composing)
|
|
@@ -9827,7 +9887,7 @@ const vModelText = {
|
|
|
9827
9887
|
if (castToNumber) {
|
|
9828
9888
|
domValue = looseToNumber(domValue);
|
|
9829
9889
|
}
|
|
9830
|
-
el
|
|
9890
|
+
el[assignKey](domValue);
|
|
9831
9891
|
});
|
|
9832
9892
|
if (trim) {
|
|
9833
9893
|
addEventListener(el, "change", () => {
|
|
@@ -9845,7 +9905,7 @@ const vModelText = {
|
|
|
9845
9905
|
el.value = value == null ? "" : value;
|
|
9846
9906
|
},
|
|
9847
9907
|
beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
|
|
9848
|
-
el
|
|
9908
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
9849
9909
|
if (el.composing)
|
|
9850
9910
|
return;
|
|
9851
9911
|
if (document.activeElement === el && el.type !== "range") {
|
|
@@ -9869,12 +9929,12 @@ const vModelCheckbox = {
|
|
|
9869
9929
|
// #4096 array checkboxes need to be deep traversed
|
|
9870
9930
|
deep: true,
|
|
9871
9931
|
created(el, _, vnode) {
|
|
9872
|
-
el
|
|
9932
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
9873
9933
|
addEventListener(el, "change", () => {
|
|
9874
9934
|
const modelValue = el._modelValue;
|
|
9875
9935
|
const elementValue = getValue(el);
|
|
9876
9936
|
const checked = el.checked;
|
|
9877
|
-
const assign = el
|
|
9937
|
+
const assign = el[assignKey];
|
|
9878
9938
|
if (isArray(modelValue)) {
|
|
9879
9939
|
const index = looseIndexOf(modelValue, elementValue);
|
|
9880
9940
|
const found = index !== -1;
|
|
@@ -9901,7 +9961,7 @@ const vModelCheckbox = {
|
|
|
9901
9961
|
// set initial checked on mount to wait for true-value/false-value
|
|
9902
9962
|
mounted: setChecked,
|
|
9903
9963
|
beforeUpdate(el, binding, vnode) {
|
|
9904
|
-
el
|
|
9964
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
9905
9965
|
setChecked(el, binding, vnode);
|
|
9906
9966
|
}
|
|
9907
9967
|
};
|
|
@@ -9918,13 +9978,13 @@ function setChecked(el, { value, oldValue }, vnode) {
|
|
|
9918
9978
|
const vModelRadio = {
|
|
9919
9979
|
created(el, { value }, vnode) {
|
|
9920
9980
|
el.checked = looseEqual(value, vnode.props.value);
|
|
9921
|
-
el
|
|
9981
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
9922
9982
|
addEventListener(el, "change", () => {
|
|
9923
|
-
el
|
|
9983
|
+
el[assignKey](getValue(el));
|
|
9924
9984
|
});
|
|
9925
9985
|
},
|
|
9926
9986
|
beforeUpdate(el, { value, oldValue }, vnode) {
|
|
9927
|
-
el
|
|
9987
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
9928
9988
|
if (value !== oldValue) {
|
|
9929
9989
|
el.checked = looseEqual(value, vnode.props.value);
|
|
9930
9990
|
}
|
|
@@ -9939,11 +9999,11 @@ const vModelSelect = {
|
|
|
9939
9999
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
|
|
9940
10000
|
(o) => number ? looseToNumber(getValue(o)) : getValue(o)
|
|
9941
10001
|
);
|
|
9942
|
-
el
|
|
10002
|
+
el[assignKey](
|
|
9943
10003
|
el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
|
|
9944
10004
|
);
|
|
9945
10005
|
});
|
|
9946
|
-
el
|
|
10006
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
9947
10007
|
},
|
|
9948
10008
|
// set value in mounted & updated because <select> relies on its children
|
|
9949
10009
|
// <option>s.
|
|
@@ -9951,7 +10011,7 @@ const vModelSelect = {
|
|
|
9951
10011
|
setSelected(el, value);
|
|
9952
10012
|
},
|
|
9953
10013
|
beforeUpdate(el, _binding, vnode) {
|
|
9954
|
-
el
|
|
10014
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
9955
10015
|
},
|
|
9956
10016
|
updated(el, { value }) {
|
|
9957
10017
|
setSelected(el, value);
|
|
@@ -10139,52 +10199,6 @@ const withKeys = (fn, modifiers) => {
|
|
|
10139
10199
|
};
|
|
10140
10200
|
};
|
|
10141
10201
|
|
|
10142
|
-
const vShow = {
|
|
10143
|
-
beforeMount(el, { value }, { transition }) {
|
|
10144
|
-
el._vod = el.style.display === "none" ? "" : el.style.display;
|
|
10145
|
-
if (transition && value) {
|
|
10146
|
-
transition.beforeEnter(el);
|
|
10147
|
-
} else {
|
|
10148
|
-
setDisplay(el, value);
|
|
10149
|
-
}
|
|
10150
|
-
},
|
|
10151
|
-
mounted(el, { value }, { transition }) {
|
|
10152
|
-
if (transition && value) {
|
|
10153
|
-
transition.enter(el);
|
|
10154
|
-
}
|
|
10155
|
-
},
|
|
10156
|
-
updated(el, { value, oldValue }, { transition }) {
|
|
10157
|
-
if (!value === !oldValue)
|
|
10158
|
-
return;
|
|
10159
|
-
if (transition) {
|
|
10160
|
-
if (value) {
|
|
10161
|
-
transition.beforeEnter(el);
|
|
10162
|
-
setDisplay(el, true);
|
|
10163
|
-
transition.enter(el);
|
|
10164
|
-
} else {
|
|
10165
|
-
transition.leave(el, () => {
|
|
10166
|
-
setDisplay(el, false);
|
|
10167
|
-
});
|
|
10168
|
-
}
|
|
10169
|
-
} else {
|
|
10170
|
-
setDisplay(el, value);
|
|
10171
|
-
}
|
|
10172
|
-
},
|
|
10173
|
-
beforeUnmount(el, { value }) {
|
|
10174
|
-
setDisplay(el, value);
|
|
10175
|
-
}
|
|
10176
|
-
};
|
|
10177
|
-
function setDisplay(el, value) {
|
|
10178
|
-
el.style.display = value ? el._vod : "none";
|
|
10179
|
-
}
|
|
10180
|
-
function initVShowForSSR() {
|
|
10181
|
-
vShow.getSSRProps = ({ value }) => {
|
|
10182
|
-
if (!value) {
|
|
10183
|
-
return { style: { display: "none" } };
|
|
10184
|
-
}
|
|
10185
|
-
};
|
|
10186
|
-
}
|
|
10187
|
-
|
|
10188
10202
|
const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
|
|
10189
10203
|
let renderer;
|
|
10190
10204
|
let enabledHydration = false;
|
|
@@ -11078,7 +11092,7 @@ function parseChildren(context, mode, ancestors) {
|
|
|
11078
11092
|
continue;
|
|
11079
11093
|
} else if (/[a-z]/i.test(s[2])) {
|
|
11080
11094
|
emitError(context, 23);
|
|
11081
|
-
parseTag(context,
|
|
11095
|
+
parseTag(context, 1 /* End */, parent);
|
|
11082
11096
|
continue;
|
|
11083
11097
|
} else {
|
|
11084
11098
|
emitError(
|
|
@@ -11234,7 +11248,7 @@ function parseElement(context, ancestors) {
|
|
|
11234
11248
|
const wasInPre = context.inPre;
|
|
11235
11249
|
const wasInVPre = context.inVPre;
|
|
11236
11250
|
const parent = last(ancestors);
|
|
11237
|
-
const element = parseTag(context,
|
|
11251
|
+
const element = parseTag(context, 0 /* Start */, parent);
|
|
11238
11252
|
const isPreBoundary = context.inPre && !wasInPre;
|
|
11239
11253
|
const isVPreBoundary = context.inVPre && !wasInVPre;
|
|
11240
11254
|
if (element.isSelfClosing || context.options.isVoidTag(element.tag)) {
|
|
@@ -11269,7 +11283,7 @@ function parseElement(context, ancestors) {
|
|
|
11269
11283
|
}
|
|
11270
11284
|
element.children = children;
|
|
11271
11285
|
if (startsWithEndTagOpen(context.source, element.tag)) {
|
|
11272
|
-
parseTag(context,
|
|
11286
|
+
parseTag(context, 1 /* End */, parent);
|
|
11273
11287
|
} else {
|
|
11274
11288
|
emitError(context, 24, 0, element.loc.start);
|
|
11275
11289
|
if (context.source.length === 0 && element.tag.toLowerCase() === "script") {
|
|
@@ -11288,11 +11302,6 @@ function parseElement(context, ancestors) {
|
|
|
11288
11302
|
}
|
|
11289
11303
|
return element;
|
|
11290
11304
|
}
|
|
11291
|
-
var TagType = /* @__PURE__ */ ((TagType2) => {
|
|
11292
|
-
TagType2[TagType2["Start"] = 0] = "Start";
|
|
11293
|
-
TagType2[TagType2["End"] = 1] = "End";
|
|
11294
|
-
return TagType2;
|
|
11295
|
-
})(TagType || {});
|
|
11296
11305
|
const isSpecialTemplateDirective = /* @__PURE__ */ makeMap(
|
|
11297
11306
|
`if,else,else-if,for,slot`
|
|
11298
11307
|
);
|
|
@@ -13352,7 +13361,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
13352
13361
|
const bailConstant = constantBailRE.test(rawExp);
|
|
13353
13362
|
if (isSimpleIdentifier(rawExp)) {
|
|
13354
13363
|
const isScopeVarReference = context.identifiers[rawExp];
|
|
13355
|
-
const isAllowedGlobal =
|
|
13364
|
+
const isAllowedGlobal = isGloballyAllowed(rawExp);
|
|
13356
13365
|
const isLiteral = isLiteralWhitelisted(rawExp);
|
|
13357
13366
|
if (!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) {
|
|
13358
13367
|
if (isConst(bindingMetadata[node.content])) {
|
|
@@ -13454,7 +13463,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
13454
13463
|
return ret;
|
|
13455
13464
|
}
|
|
13456
13465
|
function canPrefix(id) {
|
|
13457
|
-
if (
|
|
13466
|
+
if (isGloballyAllowed(id.name)) {
|
|
13458
13467
|
return false;
|
|
13459
13468
|
}
|
|
13460
13469
|
if (id.name === "require") {
|