wevu 1.0.7 → 1.1.0
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/index.d.mts +7 -5
- package/package.json +3 -15
- package/dist/compiler.cjs +0 -1
- package/dist/compiler.d.cts +0 -26
- package/dist/index.cjs +0 -1
- package/dist/index.d.cts +0 -1198
- package/dist/jsx-runtime.cjs +0 -0
- package/dist/jsx-runtime.d.cts +0 -586
package/dist/index.d.mts
CHANGED
|
@@ -895,15 +895,17 @@ declare function registerApp<D extends object, C extends ComputedDefinitions, M
|
|
|
895
895
|
declare function registerComponent<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'], mpOptions: MiniProgramComponentRawOptions): void;
|
|
896
896
|
//#endregion
|
|
897
897
|
//#region src/runtime/register/runtimeInstance.d.ts
|
|
898
|
-
type RuntimeSetupFunction
|
|
899
|
-
declare function mountRuntimeInstance<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(target: InternalRuntimeState, runtimeApp: RuntimeApp<D, C, M>, watchMap: WatchMap | undefined, setup?: RuntimeSetupFunction
|
|
898
|
+
type RuntimeSetupFunction<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> = DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'] | DefineAppOptions<D, C, M>['setup'];
|
|
899
|
+
declare function mountRuntimeInstance<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(target: InternalRuntimeState, runtimeApp: RuntimeApp<D, C, M>, watchMap: WatchMap | undefined, setup?: RuntimeSetupFunction<D, C, M>, options?: {
|
|
900
900
|
deferSetData?: boolean;
|
|
901
901
|
}): RuntimeInstance<D, C, M>;
|
|
902
902
|
declare function teardownRuntimeInstance(target: InternalRuntimeState): void;
|
|
903
903
|
//#endregion
|
|
904
904
|
//#region src/runtime/register/setup.d.ts
|
|
905
|
-
type
|
|
906
|
-
|
|
905
|
+
type SetupRunner = {
|
|
906
|
+
bivarianceHack: (...args: any[]) => any;
|
|
907
|
+
}['bivarianceHack'];
|
|
908
|
+
declare function runSetupFunction(setup: SetupRunner | undefined, props: Record<string, any>, context: any): unknown;
|
|
907
909
|
//#endregion
|
|
908
910
|
//#region src/runtime/template.d.ts
|
|
909
911
|
declare function normalizeStyle(value: any): string;
|
|
@@ -1079,7 +1081,7 @@ type ScriptSetupDefineOptions<D extends object = Record<string, any>, C extends
|
|
|
1079
1081
|
};
|
|
1080
1082
|
/**
|
|
1081
1083
|
* defineOptions 设置组件选项。
|
|
1082
|
-
* 适合声明组件名、样式隔离等静态选项(仅
|
|
1084
|
+
* 适合声明组件名、样式隔离等静态选项(仅 `<script setup>` 宏)。
|
|
1083
1085
|
*
|
|
1084
1086
|
* 仅用于无法通过 Composition API / 其他宏表达的选项,如:
|
|
1085
1087
|
* - `name`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wevu",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -32,10 +32,6 @@
|
|
|
32
32
|
"import": {
|
|
33
33
|
"types": "./dist/index.d.mts",
|
|
34
34
|
"default": "./dist/index.mjs"
|
|
35
|
-
},
|
|
36
|
-
"require": {
|
|
37
|
-
"types": "./dist/index.d.cts",
|
|
38
|
-
"default": "./dist/index.cjs"
|
|
39
35
|
}
|
|
40
36
|
},
|
|
41
37
|
"./compiler": {
|
|
@@ -43,10 +39,6 @@
|
|
|
43
39
|
"import": {
|
|
44
40
|
"types": "./dist/compiler.d.mts",
|
|
45
41
|
"default": "./dist/compiler.mjs"
|
|
46
|
-
},
|
|
47
|
-
"require": {
|
|
48
|
-
"types": "./dist/compiler.d.cts",
|
|
49
|
-
"default": "./dist/compiler.cjs"
|
|
50
42
|
}
|
|
51
43
|
},
|
|
52
44
|
"./jsx-runtime": {
|
|
@@ -54,14 +46,10 @@
|
|
|
54
46
|
"import": {
|
|
55
47
|
"types": "./dist/jsx-runtime.d.mts",
|
|
56
48
|
"default": "./dist/jsx-runtime.mjs"
|
|
57
|
-
},
|
|
58
|
-
"require": {
|
|
59
|
-
"types": "./dist/jsx-runtime.d.cts",
|
|
60
|
-
"default": "./dist/jsx-runtime.cjs"
|
|
61
49
|
}
|
|
62
50
|
}
|
|
63
51
|
},
|
|
64
|
-
"main": "./dist/index.
|
|
52
|
+
"main": "./dist/index.mjs",
|
|
65
53
|
"module": "./dist/index.mjs",
|
|
66
54
|
"types": "./dist/index.d.mts",
|
|
67
55
|
"files": [
|
|
@@ -72,7 +60,7 @@
|
|
|
72
60
|
"registry": "https://registry.npmjs.org"
|
|
73
61
|
},
|
|
74
62
|
"engines": {
|
|
75
|
-
"node": "
|
|
63
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
76
64
|
},
|
|
77
65
|
"peerDependencies": {
|
|
78
66
|
"miniprogram-api-typings": "^4.1.2"
|
package/dist/compiler.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={onPageScroll:`enableOnPageScroll`,onPullDownRefresh:`enableOnPullDownRefresh`,onReachBottom:`enableOnReachBottom`,onRouteDone:`enableOnRouteDone`,onTabItemTap:`enableOnTabItemTap`,onResize:`enableOnResize`,onShareAppMessage:`enableOnShareAppMessage`,onShareTimeline:`enableOnShareTimeline`,onAddToFavorites:`enableOnAddToFavorites`,onSaveExitState:`enableOnSaveExitState`},t=`wevu`,n={createApp:`createApp`,createWevuComponent:`createWevuComponent`,createWevuScopedSlotComponent:`createWevuScopedSlotComponent`,defineComponent:`defineComponent`,setWevuDefaults:`setWevuDefaults`};exports.WE_VU_MODULE_ID=`wevu`,exports.WE_VU_PAGE_HOOK_TO_FEATURE=e,exports.WE_VU_RUNTIME_APIS=n;
|
package/dist/compiler.d.cts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
//#region src/compiler/index.d.ts
|
|
2
|
-
declare const WE_VU_PAGE_HOOK_TO_FEATURE: {
|
|
3
|
-
readonly onPageScroll: "enableOnPageScroll";
|
|
4
|
-
readonly onPullDownRefresh: "enableOnPullDownRefresh";
|
|
5
|
-
readonly onReachBottom: "enableOnReachBottom";
|
|
6
|
-
readonly onRouteDone: "enableOnRouteDone";
|
|
7
|
-
readonly onTabItemTap: "enableOnTabItemTap";
|
|
8
|
-
readonly onResize: "enableOnResize";
|
|
9
|
-
readonly onShareAppMessage: "enableOnShareAppMessage";
|
|
10
|
-
readonly onShareTimeline: "enableOnShareTimeline";
|
|
11
|
-
readonly onAddToFavorites: "enableOnAddToFavorites";
|
|
12
|
-
readonly onSaveExitState: "enableOnSaveExitState";
|
|
13
|
-
};
|
|
14
|
-
type WevuPageHookName = keyof typeof WE_VU_PAGE_HOOK_TO_FEATURE;
|
|
15
|
-
type WevuPageFeatureFlag = (typeof WE_VU_PAGE_HOOK_TO_FEATURE)[WevuPageHookName];
|
|
16
|
-
declare const WE_VU_MODULE_ID: "wevu";
|
|
17
|
-
declare const WE_VU_RUNTIME_APIS: {
|
|
18
|
-
readonly createApp: "createApp";
|
|
19
|
-
readonly createWevuComponent: "createWevuComponent";
|
|
20
|
-
readonly createWevuScopedSlotComponent: "createWevuScopedSlotComponent";
|
|
21
|
-
readonly defineComponent: "defineComponent";
|
|
22
|
-
readonly setWevuDefaults: "setWevuDefaults";
|
|
23
|
-
};
|
|
24
|
-
type WevuRuntimeApiName = (typeof WE_VU_RUNTIME_APIS)[keyof typeof WE_VU_RUNTIME_APIS];
|
|
25
|
-
//#endregion
|
|
26
|
-
export { WE_VU_MODULE_ID, WE_VU_PAGE_HOOK_TO_FEATURE, WE_VU_RUNTIME_APIS, WevuPageFeatureFlag, WevuPageHookName, WevuRuntimeApiName };
|
package/dist/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=Promise.resolve(),t=new Set;let n=!1,r=!1;function i(){r=!1,n=!0;try{t.forEach(e=>e())}finally{t.clear(),n=!1}}function a(a){t.add(a),!n&&!r&&(r=!0,e.then(i))}function o(t){return t?e.then(t):e}const s=new WeakMap;let c=null;const l=[];let u=0;const d=new Set;function f(){u++}function p(){for(;d.size;){let e=Array.from(d);d.clear();for(let t of e)t()}}function m(){u!==0&&(u--,u===0&&p())}function h(e){f();try{return e()}finally{m()}}function g(e){let{deps:t}=e;for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}function _(e){e.active&&(e.active=!1,g(e),e.onStop?.())}let v;var y=class{active=!0;effects=[];cleanups=[];parent;scopes;constructor(e=!1){this.detached=e,!e&&v&&(this.parent=v,(v.scopes||=[]).push(this))}run(e){if(!this.active)return;let t=v;v=this;try{return e()}finally{v=t}}stop(){if(this.active){this.active=!1;for(let e of this.effects)_(e);this.effects.length=0;for(let e of this.cleanups)e();if(this.cleanups.length=0,this.scopes){for(let e of this.scopes)e.stop();this.scopes.length=0}if(this.parent?.scopes){let e=this.parent.scopes.indexOf(this);e>=0&&this.parent.scopes.splice(e,1)}this.parent=void 0}}};function b(e=!1){return new y(e)}function x(){return v}function S(e){v?.active&&v.cleanups.push(e)}function C(e){v?.active&&v.effects.push(e)}function w(e,t={}){let n=function(){if(!n.active||n._running)return e();g(n);try{return n._running=!0,l.push(n),c=n,e()}finally{l.pop(),c=l[l.length-1]??null,n._running=!1}};return n.deps=[],n.scheduler=t.scheduler,n.onStop=t.onStop,n.active=!0,n._running=!1,n._fn=e,n}function T(e,t={}){let n=w(e,t);return C(n),t.lazy||n(),n}function E(e,t){if(!c)return;let n=s.get(e);n||(n=new Map,s.set(e,n));let r=n.get(t);r||(r=new Set,n.set(t,r)),r.has(c)||(r.add(c),c.deps.push(r))}function D(e){if(e.scheduler){e.scheduler();return}if(u>0){d.add(e);return}e()}function O(e,t){let n=s.get(e);if(!n)return;let r=n.get(t);if(!r)return;let i=new Set;r.forEach(e=>{e!==c&&i.add(e)}),i.forEach(D)}function k(e){c&&(e.has(c)||(e.add(c),c.deps.push(e)))}function A(e){new Set(e).forEach(D)}const j=new Set;function M(e){j.add(e)}function N(e){j.delete(e)}const P=new WeakMap,F=new WeakMap,I=new WeakMap,L=new WeakMap,R=new WeakSet,z=new WeakMap,B=new WeakMap;function ee(e){let t=B.get(e);return t||(t=new Set,B.set(e,t)),t}function V(e,t){ee(e).add(t)}function H(e){F.set(e,(F.get(e)??0)+1)}function te(e){return F.get(e)??0}function ne(e){let t=new Set,n=[e];for(let e=0;e<2e3&&n.length;e++){let e=n.pop(),r=L.get(e);if(r)for(let e of r.keys())t.has(e)||(t.add(e),H(e),n.push(e))}}function re(e){let t=L.get(e);if(!t){R.delete(e),I.delete(e);return}let n,r,i=0;for(let[e,a]of t){for(let t of a){if(i+=1,i>1)break;n=e,r=t}if(i>1)break}if(i===1&&n&&r){R.delete(e),I.set(e,{parent:n,key:r});return}R.add(e),I.delete(e)}function ie(e,t,n){if(typeof n!=`string`){R.add(e),I.delete(e);return}if(j.size){let n=P.get(t)??t;V(n,t),V(n,e)}let r=L.get(e);r||(r=new Map,L.set(e,r));let i=r.get(t);i||(i=new Set,r.set(t,i)),i.add(n),re(e)}function ae(e,t,n){let r=L.get(e);if(!r)return;let i=r.get(t);i&&(i.delete(n),i.size||r.delete(t),r.size||L.delete(e),re(e))}function oe(e,t){if(t===e)return[];if(R.has(t))return;let n=[],r=t;for(let t=0;t<2e3;t++){if(r===e)return n.reverse();if(R.has(r))return;let t=I.get(r);if(!t||typeof t.key!=`string`)return;n.push(t.key),r=t.parent}}let U=function(e){return e.IS_REACTIVE=`__r_isReactive`,e.RAW=`__r_raw`,e.SKIP=`__r_skip`,e}({});function W(e){return typeof e==`object`&&!!e}const G=Symbol(`wevu.version`);function se(e){if(!e)return!1;let t=e.charCodeAt(0);if(t<48||t>57)return!1;let n=Number(e);return Number.isInteger(n)&&n>=0&&String(n)===e}function K(e){return e?.[U.RAW]??e}const ce=new WeakMap,le=new WeakMap,ue=new WeakMap;function de(e,t){let n=K(e);z.set(n,``),V(n,n);let r=t?.shouldIncludeTopKey,i=typeof t?.maxDepth==`number`?Math.max(0,Math.floor(t.maxDepth)):1/0,a=typeof t?.maxKeys==`number`?Math.max(0,Math.floor(t.maxKeys)):1/0,o=new WeakSet,s=[{current:n,path:``,depth:0}],c=0;for(;s.length;){let e=s.pop();if(o.has(e.current)||(o.add(e.current),z.set(e.current,e.path),V(n,e.current),c+=1,c>=a)||e.depth>=i||Array.isArray(e.current))continue;let t=Object.entries(e.current);for(let[i,a]of t){if(e.path===``&&r&&!r(i)||!W(a)||a[U.SKIP])continue;let t=K(a);if(P.has(t)||P.set(t,n),ie(t,e.current,i),!R.has(t)){let n=e.path?`${e.path}.${i}`:i;z.set(t,n)}V(n,t),s.push({current:t,path:e.path?`${e.path}.${i}`:i,depth:e.depth+1})}}}function fe(e){let t=K(e),n=B.get(t);if(!n){z.delete(t);return}for(let e of n)I.delete(e),L.delete(e),z.delete(e),R.delete(e),P.delete(e),F.delete(e);B.delete(t)}function pe(e){E(K(e),G)}const me={get(e,t,n){if(t===U.IS_REACTIVE)return!0;if(t===U.RAW)return e;let r=Reflect.get(e,t,n);return E(e,t),r},set(e,t,n,r){let i=Reflect.get(e,t,r),a=Reflect.set(e,t,n,r);return Object.is(i,n)||(O(e,t),O(e,G),H(e)),a},deleteProperty(e,t){let n=Object.prototype.hasOwnProperty.call(e,t),r=Reflect.deleteProperty(e,t);return n&&r&&(O(e,t),O(e,G),H(e)),r},ownKeys(e){return E(e,Symbol.iterator),E(e,G),Reflect.ownKeys(e)}};function he(e){if(!W(e))return e;let t=ue.get(e);if(t)return t;if(e[U.IS_REACTIVE])return e;let n=new Proxy(e,me);return ue.set(e,n),le.set(n,e),F.has(e)||F.set(e,0),n}function ge(e){let t=K(e);return ue.has(t)}function _e(e){return te(K(e))}function ve(e,t,n){if(!j.size||typeof t!=`string`||t.startsWith(`__r_`))return;let r=P.get(e)??e,i=Array.isArray(e)&&(t===`length`||se(t))?`array`:`property`,a=oe(r,e);if(!a){let a=new Set,o=L.get(e);if(o)for(let[e,t]of o){let n=z.get(e),i=n?n.split(`.`,1)[0]:void 0,o=i?void 0:oe(r,e)?.[0];for(let e of t)typeof e==`string`&&a.add(i??o??e)}else a.add(t);for(let e of j)e({root:r,kind:i,op:n,path:void 0,fallbackTopKeys:a.size?Array.from(a):void 0});return}let o=a.findIndex(e=>se(e));if(o!==-1){let e=a.slice(0,o).join(`.`)||void 0;for(let t of j)t({root:r,kind:`array`,op:n,path:e});return}let s=a.length?a.join(`.`):``,c=i===`array`?s||void 0:s?`${s}.${t}`:t;for(let e of j)e({root:r,kind:i,op:n,path:c})}const ye={get(e,t,n){if(t===U.IS_REACTIVE)return!0;if(t===U.RAW)return e;let r=Reflect.get(e,t,n);if(E(e,t),W(r)){if(r[U.SKIP])return r;let n=P.get(e)??e,i=r?.[U.RAW]??r;P.has(i)||P.set(i,n),ie(i,e,t);let a=z.get(e);if(j.size&&typeof t==`string`&&a!=null&&!R.has(i)){let e=a?`${a}.${t}`:t;z.set(i,e)}return be(r)}return r},set(e,t,n,r){let i=Array.isArray(e),a=i?e.length:0,o=Reflect.get(e,t,r),s=Reflect.set(e,t,n,r);if(!Object.is(o,n)){let r=W(o)?o?.[U.RAW]??o:void 0;if(r&&ae(r,e,t),W(n)&&!n[U.SKIP]){let r=P.get(e)??e,i=n?.[U.RAW]??n;P.has(i)||P.set(i,r),ie(i,e,t);let a=z.get(e);if(j.size&&typeof t==`string`&&a!=null&&!R.has(i)){let e=a?`${a}.${t}`:t;z.set(i,e)}}O(e,t),i&&typeof t==`string`&&se(t)&&Number(t)>=a&&O(e,`length`),O(e,G),H(e),ne(e);let s=P.get(e);s&&s!==e&&(O(s,G),H(s)),ve(e,t,`set`)}return s},deleteProperty(e,t){let n=Object.prototype.hasOwnProperty.call(e,t),r=n?e[t]:void 0,i=Reflect.deleteProperty(e,t);if(n&&i){let n=W(r)?r?.[U.RAW]??r:void 0;n&&ae(n,e,t),O(e,t),O(e,G),H(e),ne(e);let i=P.get(e);i&&i!==e&&(O(i,G),H(i)),ve(e,t,`delete`)}return i},ownKeys(e){return E(e,Symbol.iterator),E(e,G),Reflect.ownKeys(e)}};function be(e){if(!W(e))return e;let t=ce.get(e);if(t)return t;if(e[U.IS_REACTIVE])return e;let n=new Proxy(e,ye);return ce.set(e,n),le.set(n,e),F.has(e)||F.set(e,0),P.has(e)||P.set(e,e),n}function q(e){return!!(e&&e[U.IS_REACTIVE])}function xe(e){return W(e)?be(e):e}function Se(e){return W(e)&&Object.defineProperty(e,U.SKIP,{value:!0,configurable:!0,enumerable:!1,writable:!0}),e}function Ce(e){return W(e)&&U.SKIP in e}const we=`__v_isRef`;function Te(e){try{Object.defineProperty(e,we,{value:!0,configurable:!0})}catch{e[we]=!0}return e}function J(e){return!!(e&&typeof e==`object`&&e[we]===!0)}var Ee=class{_value;_rawValue;dep;constructor(e){Te(this),this._rawValue=e,this._value=xe(e)}get value(){return this.dep||=new Set,k(this.dep),this._value}set value(e){Object.is(e,this._rawValue)||(this._rawValue=e,this._value=xe(e),this.dep&&A(this.dep))}};function De(e){return J(e)?e:Se(new Ee(e))}function Oe(e){return J(e)?e.value:e}var ke=class{_getValue;_setValue;dep;constructor(e,t){Te(this);let n=t,r=()=>{this.dep||=new Set,k(this.dep)},i=()=>{this.dep&&A(this.dep)},a=e=>e===void 0&&n!==void 0?n:e;if(typeof e==`function`){let t=e(r,i);this._getValue=()=>a(t.get()),this._setValue=e=>t.set(e);return}let o=e;this._getValue=()=>(r(),a(o.get())),this._setValue=e=>{o.set(e),i()}}get value(){return this._getValue()}set value(e){this._setValue(e)}};function Ae(e,t){return Se(new ke(e,t))}function je(e){let t,n;typeof e==`function`?(t=e,n=()=>{throw Error(`计算属性是只读的`)}):(t=e.get,n=e.set);let r,i=!0,a,o={get value(){return i&&=(r=a(),!1),E(o,`value`),r},set value(e){n(e)}};return Te(o),a=T(t,{lazy:!0,scheduler:()=>{i||(i=!0,O(o,`value`))}}),o}function Me(e){if(J(e)){let t=e;return Te({get value(){return t.value},set value(e){throw Error(`无法给只读 ref 赋值`)}})}return W(e)?new Proxy(e,{set(){throw Error(`无法在只读对象上设置属性`)},deleteProperty(){throw Error(`无法在只读对象上删除属性`)},defineProperty(){throw Error(`无法在只读对象上定义属性`)},get(e,t,n){return Reflect.get(e,t,n)}}):e}function Ne(e,t){return Ae((t,n)=>({get(){return t(),e},set(t){Object.is(e,t)||(e=t,n())}}),t)}function Pe(e){return J(e)&&typeof e.value!=`function`}function Fe(e){if(J(e)){let t=e.dep;if(t){A(t);return}e.value=e.value}}function Ie(e,t,n){let r=e[t];return J(r)?r:Ae((n,r)=>({get(){return n(),e[t]},set(n){e[t]=n,r()}}),n)}function Le(e){q(e)||console.warn(`toRefs() 需要响应式对象,但收到的是普通对象。`);let t=Array.isArray(e)?Array.from({length:e.length}):{};for(let n in e)t[n]=Ie(e,n);return t}function Re(e,t=new Set){if(!W(e)||t.has(e))return e;for(let n in t.add(e),e)Re(e[n],t);return e}let ze=`version`;function Be(e){ze=e}function Ve(){return ze}function He(e,t,n={}){let r,i=q(e),o=Array.isArray(e)&&!i,s=e=>{if(typeof e==`function`)return e();if(J(e))return e.value;if(q(e))return e;throw Error(`无效的 watch 源`)};if(o){let t=e;r=()=>t.map(e=>s(e))}else if(typeof e==`function`)r=e;else if(J(e))r=()=>e.value;else if(i)r=()=>e;else throw Error(`无效的 watch 源`);let c=o?e.some(e=>q(e)):i;if(n.deep??c){let e=r;r=()=>{let t=e();return o&&Array.isArray(t)?t.map(e=>ze===`version`&&q(e)?(pe(e),e):Re(e)):ze===`version`&&q(t)?(pe(t),t):Re(t)}}let l,u=e=>{l=e},d,f,p=()=>{if(!f.active)return;let e=f();l?.(),t(e,d,u),d=e};f=T(()=>r(),{scheduler:()=>a(p),lazy:!0}),n.immediate?p():d=f();let m=()=>{l?.(),l=void 0,_(f)};return S(m),m}function Ue(e){let t,n=e=>{t=e},r,i=()=>{r.active&&r()};r=T(()=>{t?.(),t=void 0,e(n)},{lazy:!0,scheduler:()=>a(i)}),r();let o=()=>{t?.(),t=void 0,_(r)};return S(o),o}function We(e,t,n){let r=e[t];if(!r)throw Error(`计算属性 "${t}" 是只读的`);r(n)}function Ge(e){if(e==null)return e;if(typeof e==`object`){if(`detail`in e&&e.detail&&`value`in e.detail)return e.detail.value;if(`target`in e&&e.target&&`value`in e.target)return e.target.value}return e}function Ke(e){let t=Object.create(null),n=Object.create(null),r=new Set;return{computedRefs:t,computedSetters:n,dirtyComputedKeys:r,createTrackedComputed:(t,n,i)=>{let a,o=!0,s,c={get value(){return o&&=(a=s(),!1),E(c,`value`),a},set value(e){if(!i)throw Error(`计算属性是只读的`);i(e)}};return Te(c),s=T(n,{lazy:!0,scheduler:()=>{o||(o=!0,e.setDataStrategy===`patch`&&e.includeComputed&&r.add(t),O(c,`value`))}}),c},computedProxy:new Proxy({},{get(e,n){if(typeof n==`string`&&t[n])return t[n].value},has(e,n){return typeof n==`string`&&!!t[n]},ownKeys(){return Object.keys(t)},getOwnPropertyDescriptor(e,n){if(typeof n==`string`&&t[n])return{configurable:!0,enumerable:!0,value:t[n].value}}})}}function qe(e){let{state:t,computedDefs:n,methodDefs:r,appConfig:i,includeComputed:a,setDataStrategy:o}=e,s={},{computedRefs:c,computedSetters:l,dirtyComputedKeys:u,createTrackedComputed:d,computedProxy:f}=Ke({includeComputed:a,setDataStrategy:o}),p=new Proxy(t,{get(e,n,r){if(typeof n==`string`){if(n===`$state`)return t;if(n===`$computed`)return f;if(Object.prototype.hasOwnProperty.call(s,n))return s[n];if(c[n])return c[n].value;if(Object.prototype.hasOwnProperty.call(i.globalProperties,n))return i.globalProperties[n]}return Reflect.get(e,n,r)},set(e,t,n,r){return typeof t==`string`&&c[t]?(We(l,t,n),!0):Reflect.set(e,t,n,r)},has(e,t){return typeof t==`string`&&(c[t]||Object.prototype.hasOwnProperty.call(s,t))?!0:Reflect.has(e,t)},ownKeys(e){let t=new Set;return Reflect.ownKeys(e).forEach(e=>{t.add(e)}),Object.keys(s).forEach(e=>t.add(e)),Object.keys(c).forEach(e=>t.add(e)),Array.from(t)},getOwnPropertyDescriptor(e,t){if(Reflect.has(e,t))return Object.getOwnPropertyDescriptor(e,t);if(typeof t==`string`){if(c[t])return{configurable:!0,enumerable:!0,get(){return c[t].value},set(e){We(l,t,e)}};if(Object.prototype.hasOwnProperty.call(s,t))return{configurable:!0,enumerable:!1,value:s[t]}}}});return Object.keys(r).forEach(e=>{let t=r[e];typeof t==`function`&&(s[e]=(...e)=>t.apply(p,e))}),Object.keys(n).forEach(e=>{let t=n[e];if(typeof t==`function`)c[e]=d(e,()=>t.call(p));else{let n=t.get?.bind(p);if(!n)throw Error(`计算属性 "${e}" 需要提供 getter`);let r=t.set?.bind(p);r?(l[e]=r,c[e]=d(e,n,r)):c[e]=d(e,n)}}),{boundMethods:s,computedRefs:c,computedSetters:l,dirtyComputedKeys:u,computedProxy:f,publicInstance:p}}const Je=Symbol(`wevu.noSetData`);function Ye(e){return Object.defineProperty(e,Je,{value:!0,configurable:!0,enumerable:!1,writable:!1}),e}function Xe(e){return typeof e==`object`&&!!e&&e[Je]===!0}function Ze(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Y(e,t=new WeakMap,n){let r=Oe(e);if(typeof r==`bigint`){let e=Number(r);return Number.isSafeInteger(e)?e:r.toString()}if(typeof r==`symbol`)return r.toString();if(typeof r==`function`)return;if(typeof r!=`object`||!r)return r;if(Xe(r))return;let i=q(r)?K(r):r,a=n?._depth??(typeof n?.maxDepth==`number`?Math.max(0,Math.floor(n.maxDepth)):1/0),o=n?._budget??(typeof n?.maxKeys==`number`?{keys:Math.max(0,Math.floor(n.maxKeys))}:{keys:1/0});if(a<=0||o.keys<=0)return i;let s=n?.cache;if(s){let e=_e(i),t=s.get(i);if(t&&t.version===e)return t.value}if(t.has(i))return t.get(i);if(i instanceof Date)return i.getTime();if(i instanceof RegExp)return i.toString();if(i instanceof Map){let e=[];return t.set(i,e),i.forEach((n,r)=>{e.push([Y(r,t),Y(n,t)])}),e}if(i instanceof Set){let e=[];return t.set(i,e),i.forEach(n=>{e.push(Y(n,t))}),e}if(typeof ArrayBuffer<`u`){if(i instanceof ArrayBuffer)return i.byteLength;if(ArrayBuffer.isView(i)){let e=i;if(typeof e[Symbol.iterator]==`function`){let n=Array.from(e);return t.set(i,n),n.map(e=>Y(e,t))}let n=Array.from(new Uint8Array(e.buffer,e.byteOffset,e.byteLength));return t.set(i,n),n}}if(i instanceof Error)return{name:i.name,message:i.message};if(Array.isArray(i)){let e=[];return t.set(i,e),i.forEach((r,i)=>{let s=Y(r,t,{...n,_depth:a-1,_budget:o});e[i]=s===void 0?null:s}),s&&s.set(i,{version:_e(i),value:e}),e}let c={};return t.set(i,c),Object.keys(i).forEach(e=>{if(--o.keys,o.keys<=0)return;let r=Y(i[e],t,{...n,_depth:a-1,_budget:o});r!==void 0&&(c[e]=r)}),s&&s.set(i,{version:_e(i),value:c}),c}function Qe(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function $e(e,t,n){let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let i of r)if(!Object.prototype.hasOwnProperty.call(t,i)||!n(e[i],t[i]))return!1;return!0}function et(e,t){return Object.is(e,t)?!0:Array.isArray(e)&&Array.isArray(t)?Qe(e,t,et):Ze(e)&&Ze(t)?$e(e,t,et):!1}function tt(e){return e===void 0?null:e}function nt(e,t,n,r){if(!et(e,t)){if(Ze(e)&&Ze(t)){for(let i of Object.keys(t)){if(!Object.prototype.hasOwnProperty.call(e,i)){r[`${n}.${i}`]=tt(t[i]);continue}nt(e[i],t[i],`${n}.${i}`,r)}for(let i of Object.keys(e))Object.prototype.hasOwnProperty.call(t,i)||(r[`${n}.${i}`]=null);return}if(Array.isArray(e)&&Array.isArray(t)){Qe(e,t,et)||(r[n]=tt(t));return}r[n]=tt(t)}}function rt(e,t){let n={};for(let r of Object.keys(t))nt(e[r],t[r],r,n);for(let r of Object.keys(e))Object.prototype.hasOwnProperty.call(t,r)||(n[r]=null);return n}function it(e){let t=Object.keys(e).sort();if(t.length<=1)return e;let n=Object.create(null),r=[];for(let i of t){for(;r.length;){let e=r[r.length-1];if(i.startsWith(e))break;r.pop()}r.length||(n[i]=e[i],r.push(`${i}.`))}return n}function at(e,t,n){if(t<=0)return t+1;if(e===null)return 4;let r=typeof e;if(r===`string`)return 2+e.length;if(r===`number`)return Number.isFinite(e)?String(e).length:4;if(r===`boolean`)return e?4:5;if(r===`undefined`||r===`function`||r===`symbol`||r!==`object`||n.has(e))return 4;if(n.add(e),Array.isArray(e)){let r=2;for(let i=0;i<e.length;i++)if(i&&(r+=1),r+=at(e[i],t-r,n),r>t)return r;return r}let i=2;for(let[r,a]of Object.entries(e))if(i>2&&(i+=1),i+=2+r.length+1,i+=at(a,t-i,n),i>t)return i;return i}function ot(e,t){if(t===1/0)return{fallback:!1,estimatedBytes:void 0,bytes:void 0};let n=t,r=Object.keys(e).length,i=at(e,n+1,new WeakSet);if(i>n)return{fallback:!0,estimatedBytes:i,bytes:void 0};if(i>=n*.85&&r>2)try{let t=JSON.stringify(e).length;return{fallback:t>n,estimatedBytes:i,bytes:t}}catch{return{fallback:!1,estimatedBytes:i,bytes:void 0}}return{fallback:!1,estimatedBytes:i,bytes:void 0}}function st(e){let{input:t,entryMap:n,getPlainByPath:r,mergeSiblingThreshold:i,mergeSiblingSkipArray:a,mergeSiblingMaxParentBytes:o,mergeSiblingMaxInflationRatio:s}=e;if(!i)return{out:t,merged:0};let c=Object.keys(t);if(c.length<i)return{out:t,merged:0};let l=new Map,u=new Set;for(let e of c){let r=n.get(e);if(!r)continue;if(t[e]===null||r.op===`delete`){let t=e.lastIndexOf(`.`);t>0&&u.add(e.slice(0,t));continue}let i=e.lastIndexOf(`.`);if(i<=0)continue;let a=e.slice(0,i),o=l.get(a)??[];o.push(e),l.set(a,o)}let d=Array.from(l.entries()).filter(([e,t])=>t.length>=i&&!u.has(e)).sort((e,t)=>t[0].split(`.`).length-e[0].split(`.`).length);if(!d.length)return{out:t,merged:0};let f=Object.create(null);Object.assign(f,t);let p=0,m=new WeakMap,h=e=>{if(e&&typeof e==`object`){let t=m.get(e);if(t!==void 0)return t;let n=at(e,1/0,new WeakSet);return m.set(e,n),n}return at(e,1/0,new WeakSet)},g=(e,t)=>2+e.length+1+h(t);for(let[e,t]of d){if(Object.prototype.hasOwnProperty.call(f,e))continue;let n=t.filter(e=>Object.prototype.hasOwnProperty.call(f,e));if(n.length<i)continue;let c=r(e);if(!(a&&Array.isArray(c))&&!(o!==1/0&&g(e,c)>o)){if(s!==1/0){let t=0;for(let e of n)t+=g(e,f[e]);if(g(e,c)>t*s)continue}f[e]=c;for(let e of n)delete f[e];p+=1}}return{out:f,merged:p}}function ct(e){return e===void 0?null:e}function lt(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ut(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}if(!lt(e)||!lt(t))return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}function dt(e,t,n,r){if(Object.is(e,t))return!0;if(n<=0)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!dt(e[i],t[i],n-1,r))return!1;return!0}if(!lt(e)||!lt(t))return!1;let i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(let a of i)if(--r.keys,r.keys<=0||!Object.prototype.hasOwnProperty.call(t,a)||!dt(e[a],t[a],n-1,r))return!1;return!0}function ft(e,t,n,r){let i=t.split(`.`).filter(Boolean);if(!i.length)return;let a=e;for(let e=0;e<i.length-1;e++){let t=i[e];(!Object.prototype.hasOwnProperty.call(a,t)||a[t]==null||typeof a[t]!=`object`)&&(a[t]=Object.create(null)),a=a[t]}let o=i[i.length-1];if(r===`delete`)try{delete a[o]}catch{a[o]=null}else a[o]=n}function pt(e){let{state:t,computedRefs:n,includeComputed:r,shouldIncludeKey:i,plainCache:a,toPlainMaxDepth:o,toPlainMaxKeys:s}=e,c=new WeakMap,l=Object.create(null),u=Number.isFinite(s)?{keys:s}:void 0,d=q(t)?K(t):t,f=Object.keys(d),p=r?Object.keys(n):[];for(let e of f)i(e)&&(l[e]=Y(d[e],c,{cache:a,maxDepth:o,_budget:u}));for(let e of p)i(e)&&(l[e]=Y(n[e].value,c,{cache:a,maxDepth:o,_budget:u}));return l}function mt(e){let{state:t,computedRefs:n,dirtyComputedKeys:r,includeComputed:i,computedCompare:a,computedCompareMaxDepth:o,computedCompareMaxKeys:s,currentAdapter:c,shouldIncludeKey:l,maxPatchKeys:u,maxPayloadBytes:d,mergeSiblingThreshold:f,mergeSiblingMaxInflationRatio:p,mergeSiblingMaxParentBytes:m,mergeSiblingSkipArray:h,elevateTopKeyThreshold:g,toPlainMaxDepth:_,toPlainMaxKeys:v,plainCache:y,pendingPatches:b,fallbackTopKeys:x,latestSnapshot:S,latestComputedSnapshot:C,needsFullSnapshot:w,emitDebug:T,runDiffUpdate:E}=e;if(b.size>u){w.value=!0;let e=b.size;b.clear(),r.clear(),T({mode:`diff`,reason:`maxPatchKeys`,pendingPatchKeys:e,payloadKeys:0}),E(`maxPatchKeys`);return}let D=new WeakMap,O=new Map,k=Object.create(null),A=Array.from(b.entries());if(Number.isFinite(g)&&g>0){let e=new Map;for(let[t]of A){let n=t.split(`.`,1)[0];e.set(n,(e.get(n)??0)+1)}for(let[t,n]of e)n>=g&&x.add(t)}let j=A.filter(([e])=>{for(let t of x)if(e===t||e.startsWith(`${t}.`))return!1;return!0}),M=new Map(j);b.clear();let N=e=>{let n=e.split(`.`).filter(Boolean),r=t;for(let e of n){if(r==null)return r;r=r[e]}return r},P=e=>{if(O.has(e))return O.get(e);let t=ct(Y(N(e),D,{cache:y,maxDepth:_,maxKeys:v}));return O.set(e,t),t};if(x.size){for(let e of x)l(e)&&(k[e]=P(e),M.set(e,{kind:`property`,op:`set`}));x.clear()}for(let[e,t]of j){if((t.kind===`array`?`set`:t.op)===`delete`){k[e]=null;continue}k[e]=P(e)}let F=0;if(i&&r.size){let e=Object.create(null),t=Array.from(r);r.clear(),F=t.length;for(let r of t){if(!l(r))continue;let t=Y(n[r].value,D,{cache:y,maxDepth:_,maxKeys:v}),i=C[r];(a===`deep`?dt(i,t,o,{keys:s}):a===`shallow`?ut(i,t):Object.is(i,t))||(e[r]=ct(t),C[r]=t)}Object.assign(k,e)}let I=it(k),L=0;if(f){let e=st({input:I,entryMap:M,getPlainByPath:P,mergeSiblingThreshold:f,mergeSiblingSkipArray:h,mergeSiblingMaxParentBytes:m,mergeSiblingMaxInflationRatio:p});L=e.merged,I=it(e.out)}let R=ot(I,d),z=R.fallback;if(T({mode:z?`diff`:`patch`,reason:z?`maxPayloadBytes`:`patch`,pendingPatchKeys:j.length,payloadKeys:Object.keys(I).length,mergedSiblingParents:L||void 0,computedDirtyKeys:F||void 0,estimatedBytes:R.estimatedBytes,bytes:R.bytes}),z){w.value=!0,b.clear(),r.clear(),E(`maxPayloadBytes`);return}if(Object.keys(I).length){for(let[e,t]of Object.entries(I)){let n=M.get(e);n?ft(S,e,t,n.kind===`array`?`set`:n.op):ft(S,e,t,`set`)}if(typeof c.setData==`function`){let e=c.setData(I);e&&typeof e.then==`function`&&e.catch(()=>{})}T({mode:`patch`,reason:`patch`,pendingPatchKeys:j.length,payloadKeys:Object.keys(I).length})}}function ht(e){let{state:t,computedRefs:n,dirtyComputedKeys:r,includeComputed:i,setDataStrategy:a,computedCompare:o,computedCompareMaxDepth:s,computedCompareMaxKeys:c,currentAdapter:l,shouldIncludeKey:u,maxPatchKeys:d,maxPayloadBytes:f,mergeSiblingThreshold:p,mergeSiblingMaxInflationRatio:m,mergeSiblingMaxParentBytes:h,mergeSiblingSkipArray:g,elevateTopKeyThreshold:_,toPlainMaxDepth:v,toPlainMaxKeys:y,debug:b,debugWhen:x,debugSampleRate:S,runTracker:C,isMounted:w}=e,T=new WeakMap,E={},D=Object.create(null),O={value:a===`patch`},k=new Map,A=new Set,j=e=>{if(!b)return;let t=e.reason!==`patch`&&e.reason!==`diff`;if(!(x===`fallback`&&!t)&&!(S<1&&Math.random()>S))try{b(e)}catch{}},M=()=>pt({state:t,computedRefs:n,includeComputed:i,shouldIncludeKey:u,plainCache:T,toPlainMaxDepth:v,toPlainMaxKeys:y}),N=(e=`diff`)=>{let t=M(),o=rt(E,t);if(E=t,O.value=!1,k.clear(),a===`patch`&&i){D=Object.create(null);for(let e of Object.keys(n))u(e)&&(D[e]=t[e]);r.clear()}if(Object.keys(o).length){if(typeof l.setData==`function`){let e=l.setData(o);e&&typeof e.then==`function`&&e.catch(()=>{})}j({mode:`diff`,reason:e,pendingPatchKeys:0,payloadKeys:Object.keys(o).length})}};return{job:e=>{w()&&(C(),a===`patch`&&!O.value?mt({state:t,computedRefs:n,dirtyComputedKeys:r,includeComputed:i,computedCompare:o,computedCompareMaxDepth:s,computedCompareMaxKeys:c,currentAdapter:l,shouldIncludeKey:u,maxPatchKeys:d,maxPayloadBytes:f,mergeSiblingThreshold:p,mergeSiblingMaxInflationRatio:m,mergeSiblingMaxParentBytes:h,mergeSiblingSkipArray:g,elevateTopKeyThreshold:_,toPlainMaxDepth:v,toPlainMaxKeys:y,plainCache:T,pendingPatches:k,fallbackTopKeys:A,latestSnapshot:E,latestComputedSnapshot:D,needsFullSnapshot:O,emitDebug:j,runDiffUpdate:N}):N(O.value?`needsFullSnapshot`:`diff`))},mutationRecorder:(e,t)=>{if(!w()||e.root!==t)return;if(!e.path){if(Array.isArray(e.fallbackTopKeys)&&e.fallbackTopKeys.length)for(let t of e.fallbackTopKeys)A.add(t);else O.value=!0;return}let n=e.path.split(`.`,1)[0];u(n)&&k.set(e.path,{kind:e.kind,op:e.op})},snapshot:()=>a===`patch`?M():{...E},getLatestSnapshot:()=>E}}function gt(e){let t=e?.includeComputed??!0,n=e?.strategy??`diff`,r=typeof e?.maxPatchKeys==`number`?Math.max(0,e.maxPatchKeys):1/0,i=typeof e?.maxPayloadBytes==`number`?Math.max(0,e.maxPayloadBytes):1/0,a=typeof e?.mergeSiblingThreshold==`number`?Math.max(2,Math.floor(e.mergeSiblingThreshold)):0,o=typeof e?.mergeSiblingMaxInflationRatio==`number`?Math.max(0,e.mergeSiblingMaxInflationRatio):1.25,s=typeof e?.mergeSiblingMaxParentBytes==`number`?Math.max(0,e.mergeSiblingMaxParentBytes):1/0,c=e?.mergeSiblingSkipArray??!0,l=e?.computedCompare??(n===`patch`?`deep`:`reference`),u=typeof e?.computedCompareMaxDepth==`number`?Math.max(0,Math.floor(e.computedCompareMaxDepth)):4,d=typeof e?.computedCompareMaxKeys==`number`?Math.max(0,Math.floor(e.computedCompareMaxKeys)):200,f=e?.prelinkMaxDepth,p=e?.prelinkMaxKeys,m=e?.debug,h=e?.debugWhen??`fallback`,g=typeof e?.debugSampleRate==`number`?Math.min(1,Math.max(0,e.debugSampleRate)):1,_=typeof e?.elevateTopKeyThreshold==`number`?Math.max(0,Math.floor(e.elevateTopKeyThreshold)):1/0,v=typeof e?.toPlainMaxDepth==`number`?Math.max(0,Math.floor(e.toPlainMaxDepth)):1/0,y=typeof e?.toPlainMaxKeys==`number`?Math.max(0,Math.floor(e.toPlainMaxKeys)):1/0,b=Array.isArray(e?.pick)&&e.pick.length>0?new Set(e.pick):void 0,x=Array.isArray(e?.omit)&&e.omit.length>0?new Set(e.omit):void 0;return{includeComputed:t,setDataStrategy:n,maxPatchKeys:r,maxPayloadBytes:i,mergeSiblingThreshold:a,mergeSiblingMaxInflationRatio:o,mergeSiblingMaxParentBytes:s,mergeSiblingSkipArray:c,computedCompare:l,computedCompareMaxDepth:u,computedCompareMaxKeys:d,prelinkMaxDepth:f,prelinkMaxKeys:p,debug:m,debugWhen:h,debugSampleRate:g,elevateTopKeyThreshold:_,toPlainMaxDepth:v,toPlainMaxKeys:y,pickSet:b,omitSet:x,shouldIncludeKey:e=>!(b&&!b.has(e)||x&&x.has(e))}}function _t(e){return e?e.charAt(0).toUpperCase()+e.slice(1):``}function vt(e){return e?e.split(`.`).map(e=>e.trim()).filter(Boolean):[]}function yt(e,t,n){let r=e;for(let e=0;e<t.length-1;e++){let n=t[e];(r[n]==null||typeof r[n]!=`object`)&&(r[n]={}),r=r[n]}r[t[t.length-1]]=n}function bt(e,t,n,r,i){if(!r.length)return;let[a,...o]=r;if(!o.length){if(t[a])We(n,a,i);else{let t=e[a];J(t)?t.value=i:e[a]=i}return}if(t[a]){We(n,a,i);return}(e[a]==null||typeof e[a]!=`object`)&&(e[a]={}),yt(e[a],o,i)}function xt(e,t){return t.reduce((e,t)=>e==null?e:e[t],e)}function St(e){return Ge(e)}function Ct(e,t,n,r){return(i,a)=>{let o=vt(i);if(!o.length)throw Error(`bindModel 需要非空路径`);let s=()=>xt(e,o),c=e=>{bt(t,n,r,o,e)},l={event:`input`,valueProp:`value`,parser:St,formatter:e=>e,...a};return{get value(){return s()},set value(e){c(e)},update(e){c(e)},model(e){let t={...l,...e},n=`on${_t(t.event)}`,r=e=>{c(t.parser(e))};return{[t.valueProp]:t.formatter(s()),[n]:r}}}}}const wt=`__wevuDefaultsScope`;let Tt={};function Et(e){if(!(!e||typeof e!=`object`||Array.isArray(e)))return e}function Dt(e,t){if(!e)return t;if(!t)return e;let n={...e,...t},r=Et(e.setData),i=Et(t.setData);(r||i)&&(n.setData={...r??{},...i??{}});let a=Et(e.options),o=Et(t.options);return(a||o)&&(n.options={...a??{},...o??{}}),n}function Ot(e,t){return Dt(e,t)}function kt(e,t){return{app:Dt(e.app,t.app),component:Dt(e.component,t.component)}}function At(e){Tt=kt(Tt,e)}function jt(){Tt={}}function Mt(e){return Ot(Tt.app,e)}function Nt(e){return Ot(Tt.component,e)}let Pt,Ft;function It(){return Pt}function Lt(e){Pt=e}function Rt(){return Ft}function zt(e){Ft=e}function X(e){if(!Pt)throw Error(`${e}() 必须在 setup() 的同步阶段调用`);return Pt}function Bt(e){return e.__wevuHooks||=Object.create(null),e.__wevuHooks}function Z(e,t,n,{single:r=!1}={}){let i=Bt(e);r?i[t]=n:(i[t]??(i[t]=[])).push(n)}function Q(e,t,n=[]){let r=e.__wevuHooks;if(!r)return;let i=r[t];if(!i)return;let a=e.__wevu?.proxy??e;if(Array.isArray(i))for(let e of i)try{e.apply(a,n)}catch{}else if(typeof i==`function`)try{i.apply(a,n)}catch{}}function Vt(e,t,n=[]){let r=e.__wevuHooks;if(!r)return;let i=r[t];if(!i)return;let a=e.__wevu?.proxy??e;if(typeof i==`function`)try{return i.apply(a,n)}catch{return}if(Array.isArray(i)){let e;for(let t of i)try{e=t.apply(a,n)}catch{}return e}}function Ht(e){Z(X(`onLaunch`),`onLaunch`,e)}function Ut(e){Z(X(`onPageNotFound`),`onPageNotFound`,e)}function Wt(e){Z(X(`onUnhandledRejection`),`onUnhandledRejection`,e)}function Gt(e){Z(X(`onThemeChange`),`onThemeChange`,e)}function Kt(e){Z(X(`onShow`),`onShow`,e)}function qt(e){Z(X(`onLoad`),`onLoad`,e)}function Jt(e){Z(X(`onHide`),`onHide`,e)}function Yt(e){Z(X(`onUnload`),`onUnload`,e)}function Xt(e){Z(X(`onReady`),`onReady`,e)}function Zt(e){Z(X(`onPullDownRefresh`),`onPullDownRefresh`,e)}function Qt(e){Z(X(`onReachBottom`),`onReachBottom`,e)}function $t(e){Z(X(`onPageScroll`),`onPageScroll`,e)}function en(e){Z(X(`onRouteDone`),`onRouteDone`,e)}function tn(e){Z(X(`onTabItemTap`),`onTabItemTap`,e)}function nn(e){Z(X(`onResize`),`onResize`,e)}function rn(e){Z(X(`onMoved`),`onMoved`,e)}function an(e){Z(X(`onError`),`onError`,e)}function on(e){Z(X(`onSaveExitState`),`onSaveExitState`,e,{single:!0})}function sn(e){Z(X(`onShareAppMessage`),`onShareAppMessage`,e,{single:!0})}function cn(e){Z(X(`onShareTimeline`),`onShareTimeline`,e,{single:!0})}function ln(e){Z(X(`onAddToFavorites`),`onAddToFavorites`,e,{single:!0})}function un(e){Z(X(`onMounted`),`onReady`,e)}function dn(e){Z(X(`onUpdated`),`__wevuOnUpdated`,e)}function fn(e){X(`onBeforeUnmount`),e()}function pn(e){Z(X(`onUnmounted`),`onUnload`,e)}function mn(e){X(`onBeforeMount`),e()}function hn(e){Z(X(`onBeforeUpdate`),`__wevuOnBeforeUpdate`,e)}function gn(e){let t=X(`onErrorCaptured`);Z(t,`onError`,n=>e(n,t,``))}function _n(e){Z(X(`onActivated`),`onShow`,e)}function vn(e){Z(X(`onDeactivated`),`onHide`,e)}function yn(e){X(`onServerPrefetch`)}function bn(e,t){Q(e,t===`before`?`__wevuOnBeforeUpdate`:`__wevuOnUpdated`)}function xn(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`)}function Sn(e,t,n){let r=typeof t==`string`?t:void 0;if(!r)return;let i=(n?.currentTarget)?.dataset?.wvArgs??(n?.target)?.dataset?.wvArgs,a=[];if(typeof i==`string`)try{a=JSON.parse(i)}catch{try{a=JSON.parse(xn(i))}catch{a=[]}}Array.isArray(a)||(a=[]);let o=a.map(e=>e===`$event`?n:e),s=e?.[r];if(typeof s==`function`)return s.apply(e,o)}const $=new Map;let Cn=0;function wn(){return Cn+=1,`wv${Cn}`}function Tn(e,t,n){let r=$.get(e)??{snapshot:{},proxy:n,subscribers:new Set};if(r.snapshot=t,r.proxy=n,$.set(e,r),r.subscribers.size)for(let e of r.subscribers)try{e(t,n)}catch{}}function En(e){$.delete(e)}function Dn(e,t){let n=$.get(e)??{snapshot:{},proxy:void 0,subscribers:new Set};return n.subscribers.add(t),$.set(e,n),()=>{let n=$.get(e);n&&n.subscribers.delete(t)}}function On(e){return $.get(e)?.proxy}function kn(e){return $.get(e)?.snapshot}function An(e,t,n){try{t.state.__wvOwnerId=n}catch{}try{e.__wvOwnerId=n}catch{}let r=typeof t.snapshot==`function`?t.snapshot():{},i=e.__wevuProps??e.properties;if(i&&typeof i==`object`)for(let[e,t]of Object.entries(i))r[e]=t;Tn(n,r,t.proxy)}function jn(e,t,n){if(typeof e!=`function`)return;let r=n?.runtime??{methods:Object.create(null),state:{},proxy:{},watch:()=>()=>{},bindModel:()=>{}};n&&(n.runtime=r);let i={...n??{},runtime:r};return e.length>=2?e(t,i):e(i)}function Mn(e,t,n){if(typeof e==`function`)return{handler:e.bind(t.proxy),options:{}};if(typeof e==`string`){let r=t.methods?.[e]??n[e];return typeof r==`function`?{handler:r.bind(t.proxy),options:{}}:void 0}if(!e||typeof e!=`object`)return;let r=Mn(e.handler,t,n);if(!r)return;let i={...r.options};return e.immediate!==void 0&&(i.immediate=e.immediate),e.deep!==void 0&&(i.deep=e.deep),{handler:r.handler,options:i}}function Nn(e,t){let n=t.split(`.`).map(e=>e.trim()).filter(Boolean);return n.length?()=>{let t=e;for(let e of n){if(t==null)return t;t=t[e]}return t}:()=>e}function Pn(e,t,n){let r=[],i=e.proxy;for(let[a,o]of Object.entries(t)){let t=Mn(o,e,n);if(!t)continue;let s=Nn(i,a),c=e.watch(s,t.handler,t.options);r.push(c)}return r}function Fn(e,t,n,r,i){if(e.__wevu)return e.__wevu;let a=wn(),o=i?.deferSetData?(e=>{let t,n=!1,r={setData(r){if(!n){t={...t??{},...r};return}if(typeof e.setData==`function`)return e.setData(r)}};return r.__wevu_enableSetData=()=>{if(n=!0,t&&Object.keys(t).length&&typeof e.setData==`function`){let n=t;t=void 0,e.setData(n)}},r})(e):{setData(t){if(typeof e.setData==`function`)return e.setData(t)}},s,c=()=>{if(!s||typeof s.snapshot!=`function`)return;let t=s.snapshot(),n=e.__wevuProps??e.properties;if(n&&typeof n==`object`)for(let[e,r]of Object.entries(n))t[e]=r;Tn(a,t,s.proxy)},l={...o,setData(e){let t=o.setData(e);return c(),t}},u=t.mount({...l});s=u;let d=u?.proxy??{},f=u?.state??{};if(!u?.methods)try{u.methods=Object.create(null)}catch{}let p=u?.methods??Object.create(null),m=u?.watch??(()=>()=>{}),h=u?.bindModel??(()=>{}),g={...u??{},state:f,proxy:d,methods:p,watch:m,bindModel:h};if(Object.defineProperty(e,`$wevu`,{value:g,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=g,An(e,g,a),n){let t=Pn(g,n,e);t.length&&(e.__wevuWatchStops=t)}if(r){let t=he({...e.properties||{}});try{Object.defineProperty(e,`__wevuProps`,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch{e.__wevuProps=t}let n={props:t,runtime:g,state:f,proxy:d,bindModel:h.bind(g),watch:m.bind(g),instance:e,emit:(t,n,r)=>{typeof e.triggerEvent==`function`&&e.triggerEvent(t,n,r)},expose:t=>{e.__wevuExposed=t},attrs:{},slots:Object.create(null)};Lt(e),zt(n);try{let e=jn(r,t,n);e&&typeof e==`object`&&Object.keys(e).forEach(t=>{let n=e[t];typeof n==`function`?u.methods[t]=(...e)=>n.apply(u.proxy,e):u.state[t]=n})}finally{zt(void 0),Lt(void 0)}}try{let t=u.methods;for(let n of Object.keys(t))typeof e[n]!=`function`&&(e[n]=function(...e){let t=this.$wevu?.methods?.[n];if(typeof t==`function`)return t.apply(this.$wevu.proxy,e)})}catch{}return u}function In(e){let t=e.__wevu?.adapter;t&&typeof t.__wevu_enableSetData==`function`&&t.__wevu_enableSetData()}function Ln(e){let t=e.__wevu,n=e.__wvOwnerId;n&&En(n),t&&e.__wevuHooks&&Q(e,`onUnload`,[]),e.__wevuHooks&&=void 0;let r=e.__wevuWatchStops;if(Array.isArray(r))for(let e of r)try{e()}catch{}e.__wevuWatchStops=void 0,t&&t.unmount(),delete e.__wevu,`$wevu`in e&&delete e.$wevu}function Rn(e,t,n,r,i){if(typeof App!=`function`)throw TypeError(`createApp 需要全局 App 构造器可用`);let a=Object.keys(t??{}),o={...i};o.globalData=o.globalData??{},o.__weapp_vite_inline||=function(e){let t=e?.currentTarget?.dataset?.wvHandler??e?.target?.dataset?.wvHandler;return Sn(this.__wevu?.proxy??this,t,e)};let s=o.onLaunch;o.onLaunch=function(...t){Fn(this,e,n,r),Q(this,`onLaunch`,t),typeof s==`function`&&s.apply(this,t)};let c=o.onShow;o.onShow=function(...e){Q(this,`onShow`,e),typeof c==`function`&&c.apply(this,e)};let l=o.onHide;o.onHide=function(...e){Q(this,`onHide`,e),typeof l==`function`&&l.apply(this,e)};let u=o.onError;o.onError=function(...e){Q(this,`onError`,e),typeof u==`function`&&u.apply(this,e)};let d=o.onPageNotFound;o.onPageNotFound=function(...e){Q(this,`onPageNotFound`,e),typeof d==`function`&&d.apply(this,e)};let f=o.onUnhandledRejection;o.onUnhandledRejection=function(...e){Q(this,`onUnhandledRejection`,e),typeof f==`function`&&f.apply(this,e)};let p=o.onThemeChange;o.onThemeChange=function(...e){Q(this,`onThemeChange`,e),typeof p==`function`&&p.apply(this,e)};for(let e of a){let t=o[e];o[e]=function(...n){let r=this.__wevu,i,a=r?.methods?.[e];return a&&(i=a.apply(r.proxy,n)),typeof t==`function`?t.apply(this,n):i}}App(o)}function zn(e){let{features:t,userOnSaveExitState:n,userOnPullDownRefresh:r,userOnReachBottom:i,userOnPageScroll:a,userOnRouteDone:o,userOnTabItemTap:s,userOnResize:c,userOnShareAppMessage:l,userOnShareTimeline:u,userOnAddToFavorites:d}=e,f=typeof r==`function`||!!t.enableOnPullDownRefresh,p=typeof i==`function`||!!t.enableOnReachBottom,m=typeof a==`function`||!!t.enableOnPageScroll,h=typeof o==`function`||!!t.enableOnRouteDone,g=typeof s==`function`||!!t.enableOnTabItemTap,_=typeof c==`function`||!!t.enableOnResize,v=typeof l==`function`||!!t.enableOnShareAppMessage,y=typeof u==`function`||!!t.enableOnShareTimeline,b=typeof d==`function`||!!t.enableOnAddToFavorites,x=typeof n==`function`||!!t.enableOnSaveExitState,S=()=>{};return{enableOnPullDownRefresh:f,enableOnReachBottom:p,enableOnPageScroll:m,enableOnRouteDone:h,enableOnTabItemTap:g,enableOnResize:_,enableOnShareAppMessage:v,enableOnShareTimeline:y,enableOnAddToFavorites:b,enableOnSaveExitState:x,effectiveOnSaveExitState:typeof n==`function`?n:(()=>({data:void 0})),effectiveOnPullDownRefresh:typeof r==`function`?r:S,effectiveOnReachBottom:typeof i==`function`?i:S,effectiveOnPageScroll:typeof a==`function`?a:S,effectiveOnRouteDone:typeof o==`function`?o:S,effectiveOnTabItemTap:typeof s==`function`?s:S,effectiveOnResize:typeof c==`function`?c:S,effectiveOnShareAppMessage:typeof l==`function`?l:()=>({}),effectiveOnShareTimeline:typeof u==`function`?u:()=>({}),effectiveOnAddToFavorites:typeof d==`function`?d:(()=>({}))}}function Bn(e){let{runtimeApp:t,watch:n,setup:r,userOnLoad:i,userOnUnload:a,userOnShow:o,userOnHide:s,userOnReady:c,enableOnSaveExitState:l,enableOnPullDownRefresh:u,enableOnReachBottom:d,enableOnPageScroll:f,enableOnRouteDone:p,enableOnTabItemTap:m,enableOnResize:h,enableOnShareAppMessage:g,enableOnShareTimeline:_,enableOnAddToFavorites:v,effectiveOnSaveExitState:y,effectiveOnPullDownRefresh:b,effectiveOnReachBottom:x,effectiveOnPageScroll:S,effectiveOnRouteDone:C,effectiveOnTabItemTap:w,effectiveOnResize:T,effectiveOnShareAppMessage:E,effectiveOnShareTimeline:D,effectiveOnAddToFavorites:O,hasHook:k}=e,A={onLoad(...e){if(Fn(this,t,n,r),In(this),Q(this,`onLoad`,e),typeof i==`function`)return i.apply(this,e)},onUnload(...e){if(Ln(this),typeof a==`function`)return a.apply(this,e)},onShow(...e){if(Q(this,`onShow`,e),typeof o==`function`)return o.apply(this,e)},onHide(...e){if(Q(this,`onHide`,e),typeof s==`function`)return s.apply(this,e)},onReady(...e){if(this.__wevuReadyCalled||(this.__wevuReadyCalled=!0,Q(this,`onReady`,e)),typeof c==`function`)return c.apply(this,e)}};return l&&(A.onSaveExitState=function(...e){let t=Vt(this,`onSaveExitState`,e);return t===void 0?y.apply(this,e):t}),u&&(A.onPullDownRefresh=function(...e){if(Q(this,`onPullDownRefresh`,e),!k(this,`onPullDownRefresh`))return b.apply(this,e)}),d&&(A.onReachBottom=function(...e){if(Q(this,`onReachBottom`,e),!k(this,`onReachBottom`))return x.apply(this,e)}),f&&(A.onPageScroll=function(...e){if(Q(this,`onPageScroll`,e),!k(this,`onPageScroll`))return S.apply(this,e)}),p&&(A.onRouteDone=function(...e){if(Q(this,`onRouteDone`,e),!k(this,`onRouteDone`))return C.apply(this,e)}),m&&(A.onTabItemTap=function(...e){if(Q(this,`onTabItemTap`,e),!k(this,`onTabItemTap`))return w.apply(this,e)}),h&&(A.onResize=function(...e){if(Q(this,`onResize`,e),!k(this,`onResize`))return T.apply(this,e)}),g&&(A.onShareAppMessage=function(...e){let t=Vt(this,`onShareAppMessage`,e);return t===void 0?E.apply(this,e):t}),_&&(A.onShareTimeline=function(...e){let t=Vt(this,`onShareTimeline`,e);return t===void 0?D.apply(this,e):t}),v&&(A.onAddToFavorites=function(...e){let t=Vt(this,`onAddToFavorites`,e);return t===void 0?O.apply(this,e):t}),A}function Vn(e){let{userMethods:t,runtimeMethods:n}=e,r={...t};r.__weapp_vite_inline||=function(e){let t=e?.currentTarget?.dataset?.wvHandler??e?.target?.dataset?.wvHandler;return Sn(this.__wevu?.proxy??this,t,e)},r.__weapp_vite_model||=function(e){let t=e?.currentTarget?.dataset?.wvModel??e?.target?.dataset?.wvModel;if(typeof t!=`string`||!t)return;let n=this.__wevu;if(!n||typeof n.bindModel!=`function`)return;let r=Ge(e);try{n.bindModel(t).update(r)}catch{}},!r.__weapp_vite_owner&&typeof n?.__weapp_vite_owner==`function`&&(r.__weapp_vite_owner=n.__weapp_vite_owner);let i=Object.keys(n??{});for(let e of i){if(e.startsWith(`__weapp_vite_`))continue;let t=r[e];r[e]=function(...n){let r=this.__wevu,i,a=r?.methods?.[e];if(a&&(i=a.apply(r.proxy,n)),typeof t==`function`){let e=t.apply(this,n);return e===void 0?i:e}return i}}return{finalMethods:r}}function Hn(e){let t=e.__wevu,n=e.__wvOwnerId;if(!t||!n||typeof t.snapshot!=`function`)return;let r=t.snapshot(),i=e.__wevuProps??e.properties;if(i&&typeof i==`object`)for(let[e,t]of Object.entries(i))r[e]=t;Tn(n,r,t.proxy)}function Un(e){let{restOptions:t,userObservers:n}=e,r=e=>{let t=e.__wevuProps,n=e.properties;if(!t||typeof t!=`object`||!n||typeof n!=`object`)return;let r=n,i=Object.keys(t);for(let e of i)if(!Object.prototype.hasOwnProperty.call(r,e))try{delete t[e]}catch{}for(let[e,n]of Object.entries(r))try{t[e]=n}catch{}Hn(e)},i=(e,t,n)=>{let r=e.__wevuProps;if(!(!r||typeof r!=`object`)){try{r[t]=n}catch{}Hn(e)}},a=t.properties&&typeof t.properties==`object`?Object.keys(t.properties):[],o={};if(a.length)for(let e of a)o[e]=function(t){i(this,e,t)};let s={...n??{}};for(let[e,t]of Object.entries(o)){let n=s[e];typeof n==`function`?s[e]=function(...e){n.apply(this,e),t.apply(this,e)}:s[e]=t}return{syncWevuPropsFromInstance:r,finalObservers:s}}function Wn(e,t,n,r,i){let{methods:a={},lifetimes:o={},pageLifetimes:s={},options:c={},...l}=i,u=l.onLoad,d=l.onUnload,f=l.onShow,p=l.onHide,m=l.onReady,h=l.onSaveExitState,g=l.onPullDownRefresh,_=l.onReachBottom,v=l.onPageScroll,y=l.onRouteDone,b=l.onTabItemTap,x=l.onResize,S=l.onShareAppMessage,C=l.onShareTimeline,w=l.onAddToFavorites,T=l.features??{},E={...l},D=E.observers,O=E.created;delete E.features,delete E.created,delete E.onLoad,delete E.onUnload,delete E.onShow,delete E.onHide,delete E.onReady;let{enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:M,enableOnTabItemTap:N,enableOnResize:P,enableOnShareAppMessage:F,enableOnShareTimeline:I,enableOnAddToFavorites:L,enableOnSaveExitState:R,effectiveOnSaveExitState:z,effectiveOnPullDownRefresh:B,effectiveOnReachBottom:ee,effectiveOnPageScroll:V,effectiveOnRouteDone:H,effectiveOnTabItemTap:te,effectiveOnResize:ne,effectiveOnShareAppMessage:re,effectiveOnShareTimeline:ie,effectiveOnAddToFavorites:ae}=zn({features:T,userOnSaveExitState:h,userOnPullDownRefresh:g,userOnReachBottom:_,userOnPageScroll:v,userOnRouteDone:y,userOnTabItemTap:b,userOnResize:x,userOnShareAppMessage:S,userOnShareTimeline:C,userOnAddToFavorites:w}),oe=(e,t)=>{let n=e.__wevuHooks;if(!n)return!1;let r=n[t];return r?Array.isArray(r)?r.length>0:typeof r==`function`:!1};{let e=E.export;E.export=function(){let t=this.__wevuExposed??{},n=typeof e==`function`?e.call(this):{};return n&&typeof n==`object`&&!Array.isArray(n)?{...t,...n}:n??t}}let U={multipleSlots:c.multipleSlots??!0,...c},{syncWevuPropsFromInstance:W,finalObservers:G}=Un({restOptions:E,userObservers:D}),{finalMethods:se}=Vn({userMethods:a,runtimeMethods:t}),K=Bn({runtimeApp:e,watch:n,setup:r,userOnLoad:u,userOnUnload:d,userOnShow:f,userOnHide:p,userOnReady:m,enableOnSaveExitState:R,enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:M,enableOnTabItemTap:N,enableOnResize:P,enableOnShareAppMessage:F,enableOnShareTimeline:I,enableOnAddToFavorites:L,effectiveOnSaveExitState:z,effectiveOnPullDownRefresh:B,effectiveOnReachBottom:ee,effectiveOnPageScroll:V,effectiveOnRouteDone:H,effectiveOnTabItemTap:te,effectiveOnResize:ne,effectiveOnShareAppMessage:re,effectiveOnShareTimeline:ie,effectiveOnAddToFavorites:ae,hasHook:oe});Component({...E,...K,observers:G,lifetimes:{...o,created:function(...t){Fn(this,e,n,r,{deferSetData:!0}),W(this),typeof O==`function`&&O.apply(this,t),typeof o.created==`function`&&o.created.apply(this,t)},moved:function(...e){Q(this,`onMoved`,e),typeof o.moved==`function`&&o.moved.apply(this,e)},attached:function(...t){Fn(this,e,n,r),W(this),In(this),typeof o.attached==`function`&&o.attached.apply(this,t)},ready:function(...e){this.__wevuReadyCalled||(this.__wevuReadyCalled=!0,W(this),Q(this,`onReady`,e)),typeof o.ready==`function`&&o.ready.apply(this,e)},detached:function(...e){Ln(this),typeof o.detached==`function`&&o.detached.apply(this,e)},error:function(...e){Q(this,`onError`,e),typeof o.error==`function`&&o.error.apply(this,e)}},pageLifetimes:{...s,show:function(...e){Q(this,`onShow`,e),typeof s.show==`function`&&s.show.apply(this,e)},hide:function(...e){Q(this,`onHide`,e),typeof s.hide==`function`&&s.hide.apply(this,e)},resize:function(...e){Q(this,`onResize`,e),typeof s.resize==`function`&&s.resize.apply(this,e)}},methods:se,options:U})}function Gn(e){let{[wt]:t,data:n,computed:r,methods:i,setData:o,watch:s,setup:c,...l}=e[wt]===`component`?e:Mt(e),u=i??{},d=r??{},f=new Set,p={globalProperties:{}},m={mount(e){let t=be((n??(()=>({})))()),r=d,i=u,s=!0,c=[],{includeComputed:l,setDataStrategy:f,maxPatchKeys:m,maxPayloadBytes:h,mergeSiblingThreshold:g,mergeSiblingMaxInflationRatio:v,mergeSiblingMaxParentBytes:y,mergeSiblingSkipArray:b,computedCompare:x,computedCompareMaxDepth:S,computedCompareMaxKeys:C,prelinkMaxDepth:w,prelinkMaxKeys:E,debug:D,debugWhen:O,debugSampleRate:k,elevateTopKeyThreshold:A,toPlainMaxDepth:j,toPlainMaxKeys:P,shouldIncludeKey:F}=gt(o),{boundMethods:I,computedRefs:L,computedSetters:R,dirtyComputedKeys:z,computedProxy:B,publicInstance:ee}=qe({state:t,computedDefs:r,methodDefs:i,appConfig:p,includeComputed:l,setDataStrategy:f}),V=e??{setData:()=>{}},H=K(t),te,ne=ht({state:t,computedRefs:L,dirtyComputedKeys:z,includeComputed:l,setDataStrategy:f,computedCompare:x,computedCompareMaxDepth:S,computedCompareMaxKeys:C,currentAdapter:V,shouldIncludeKey:F,maxPatchKeys:m,maxPayloadBytes:h,mergeSiblingThreshold:g,mergeSiblingMaxInflationRatio:v,mergeSiblingMaxParentBytes:y,mergeSiblingSkipArray:b,elevateTopKeyThreshold:A,toPlainMaxDepth:j,toPlainMaxKeys:P,debug:D,debugWhen:O,debugSampleRate:k,runTracker:()=>te?.(),isMounted:()=>s}),re=()=>ne.job(H),ie=e=>ne.mutationRecorder(e,H);te=T(()=>{pe(t),Object.keys(t).forEach(e=>{let n=t[e];J(n)?n.value:q(n)&&pe(n)})},{lazy:!0,scheduler:()=>a(re)}),re(),c.push(()=>_(te)),f===`patch`&&(de(t,{shouldIncludeTopKey:F,maxDepth:w,maxKeys:E}),M(ie),c.push(()=>N(ie)),c.push(()=>fe(t)));function ae(e,t,n){let r=He(e,(e,n)=>t(e,n),n);return c.push(r),()=>{r();let e=c.indexOf(r);e>=0&&c.splice(e,1)}}return{get state(){return t},get proxy(){return ee},get methods(){return I},get computed(){return B},get adapter(){return V},bindModel:Ct(ee,t,L,R),watch:ae,snapshot:()=>ne.snapshot(),unmount:()=>{s&&(s=!1,c.forEach(e=>{try{e()}catch{}}),c.length=0)}}},use(e,...t){if(!e||f.has(e))return m;if(f.add(e),typeof e==`function`)e(m,...t);else if(typeof e.install==`function`)e.install(m,...t);else throw TypeError(`插件必须是函数,或包含 install 方法的对象`);return m},config:p};if(typeof globalThis.App==`function`){let e=globalThis,t=e.__wxConfig!==void 0,n=`__wevuAppRegistered`;(!t||!e[n])&&(t&&(e[n]=!0),Rn(m,i??{},s,c,l))}return m}function Kn(e,t,n){let r=e.properties,i=n??(r&&typeof r==`object`?r:void 0),a=e=>{let t={...e??{}};return Object.prototype.hasOwnProperty.call(t,`__wvSlotOwnerId`)||(t.__wvSlotOwnerId={type:String,value:``}),Object.prototype.hasOwnProperty.call(t,`__wvSlotScope`)||(t.__wvSlotScope={type:null,value:null}),t};if(i||!t){let{properties:t,...n}=e;return{...n,properties:a(i)}}let o={};return Object.entries(t).forEach(([e,t])=>{if(t!=null){if(Array.isArray(t)||typeof t==`function`){o[e]={type:t};return}if(typeof t==`object`){if(e.endsWith(`Modifiers`)&&Object.keys(t).length===0){o[e]={type:Object,value:{}};return}let n={};`type`in t&&t.type!==void 0&&(n.type=t.type);let r=`default`in t?t.default:t.value;r!==void 0&&(n.value=typeof r==`function`?r():r),o[e]=n}}}),{...e,properties:a(o)}}function qn(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`)}function Jn(e){let t=e?.currentTarget?.dataset?.wvArgs??e?.target?.dataset?.wvArgs,n=[];if(typeof t==`string`)try{n=JSON.parse(t)}catch{try{n=JSON.parse(qn(t))}catch{n=[]}}return Array.isArray(n)||(n=[]),n.map(t=>t===`$event`?e:t)}function Yn(e){if(!e||typeof e!=`object`)return{};if(Array.isArray(e)){let t={};for(let n=0;n<e.length;n+=2){let r=e[n];typeof r==`string`&&r&&(t[r]=e[n+1])}return t}return e}function Xn(e,t){let n=Object.prototype.hasOwnProperty.call(t??{},`__wvSlotScope`)?t.__wvSlotScope:e?.properties?.__wvSlotScope,r=Object.prototype.hasOwnProperty.call(t??{},`__wvSlotProps`)?t.__wvSlotProps:e?.properties?.__wvSlotProps,i=Yn(n),a=Yn(r),o={...i,...a};typeof e?.setData==`function`&&e.setData({__wvSlotPropsData:o})}function Zn(e){let t={properties:{__wvOwnerId:{type:String,value:``},__wvSlotProps:{type:null,value:null,observer(e){Xn(this,{__wvSlotProps:e})}},__wvSlotScope:{type:null,value:null,observer(e){Xn(this,{__wvSlotScope:e})}}},data:()=>({__wvOwner:{},__wvSlotPropsData:{}}),lifetimes:{attached(){let e=this.properties?.__wvOwnerId??``;if(Xn(this),!e)return;let t=(e,t)=>{this.__wvOwnerProxy=t,typeof this.setData==`function`&&this.setData({__wvOwner:e||{}})};this.__wvOwnerUnsub=Dn(e,t);let n=kn(e);n&&t(n,On(e))},detached(){typeof this.__wvOwnerUnsub==`function`&&this.__wvOwnerUnsub(),this.__wvOwnerUnsub=void 0,this.__wvOwnerProxy=void 0}},methods:{__weapp_vite_owner(e){let t=e?.currentTarget?.dataset?.wvHandler??e?.target?.dataset?.wvHandler;if(typeof t!=`string`||!t)return;let n=this.__wvOwnerProxy,r=n?.[t];if(typeof r!=`function`)return;let i=Jn(e);return r.apply(n,i)}}};return e?.computed&&Object.keys(e.computed).length>0&&(t.computed=e.computed),t}function Qn(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function $n(e){return typeof e!=`object`||!e||J(e)||q(e)||Array.isArray(e)?!0:Qn(e)}function er(e,t,n){let r=e?.methods??Object.create(null),i=e?.state??Object.create(null),a=q(i)?K(i):i;if(e&&!e.methods)try{e.methods=r}catch{}if(e&&!e.state)try{e.state=i}catch{}Object.keys(n).forEach(o=>{let s=n[o];if(typeof s==`function`)r[o]=(...t)=>s.apply(e?.proxy??e,t);else if(s===t||!$n(s))try{Object.defineProperty(a,o,{value:s,configurable:!0,enumerable:!1,writable:!0})}catch{i[o]=s}else i[o]=s}),e&&(e.methods=e.methods??r,e.state=e.state??i)}let tr;function nr(){let e=typeof globalThis<`u`?globalThis:void 0;if(!e)return;let t=e;!t.__weapp_vite_createScopedSlotComponent&&tr&&(t.__weapp_vite_createScopedSlotComponent=tr)}function rr(e){nr();let{data:t,computed:n,methods:r,setData:i,watch:a,setup:o,props:s,...c}=Nt(e),l=Gn({data:t,computed:n,methods:r,setData:i,[wt]:`component`}),u=e=>{let t=jn(o,e?.props??{},e);t&&er(e.runtime,e.instance,t)},d=Kn(c,s),f={data:t,computed:n,methods:r,setData:i,watch:a,setup:u,mpOptions:d};return Wn(l,r??{},a,u,d),{__wevu_runtime:l,__wevu_options:f}}function ir(e){nr();let{properties:t,props:n,...r}=e;rr(Kn(r,n,t))}function ar(e){ir(Zn(e))}tr=ar,nr();const or=Symbol(`wevu.provideScope`),sr=new Map;function cr(e,t){let n=It();if(n){let r=n[or];r||(r=new Map,n[or]=r),r.set(e,t)}else sr.set(e,t)}function lr(e,t){let n=It();if(n){let t=n;for(;t;){let n=t[or];if(n&&n.has(e))return n.get(e);t=null}}if(sr.has(e))return sr.get(e);if(arguments.length>=2)return t;throw Error(`wevu.inject:未找到对应 key 的值`)}function ur(e,t){sr.set(e,t)}function dr(e,t){if(sr.has(e))return sr.get(e);if(arguments.length>=2)return t;throw Error(`injectGlobal():未找到对应 key 的 provider:${String(e)}`)}const fr=/\B([A-Z])/g;function pr(e){return e?e.startsWith(`--`)?e:e.replace(fr,`-$1`).toLowerCase():``}function mr(e,t){if(!t)return e;if(!e)return t;let n=e;n.endsWith(`;`)||(n+=`;`);let r=t.startsWith(`;`)?t.slice(1):t;return n+r}function hr(e){let t=``;for(let n of Object.keys(e)){let r=e[n];if(r==null)continue;let i=pr(n);if(Array.isArray(r))for(let e of r)e!=null&&(t=mr(t,`${i}:${e}`));else t=mr(t,`${i}:${r}`)}return t}function gr(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e)){let t=``;for(let n of e){let e=gr(n);e&&(t=mr(t,e))}return t}return typeof e==`object`?hr(e):``}function _r(e){let t=``;if(!e)return t;if(typeof e==`string`)return e;if(Array.isArray(e)){for(let n of e){let e=_r(n);e&&(t+=`${e} `)}return t.trim()}if(typeof e==`object`){for(let n of Object.keys(e))e[n]&&(t+=`${n} `);return t.trim()}return t}function vr(){let e=Rt();if(!e)throw Error(`useAttrs() 必须在 setup() 的同步阶段调用`);return e.attrs??{}}function yr(){let e=Rt();if(!e)throw Error(`useSlots() 必须在 setup() 的同步阶段调用`);return e.slots??Object.create(null)}function br(e,t){let n=Rt();if(!n)throw Error(`useModel() 必须在 setup() 的同步阶段调用`);let r=n.emit,i=`update:${t}`;return Ae({get:()=>e?.[t],set:e=>{r?.(i,e)}})}function xr(e){let t=It();if(!t?.__wevu||typeof t.__wevu.bindModel!=`function`)throw Error(`useBindModel() 必须在 setup() 的同步阶段调用`);let n=t.__wevu.bindModel.bind(t.__wevu),r=((t,r)=>e?n(t,{...e,...r}):n(t,r));return r.model=(e,t)=>r(e).model(t),r.value=(t,n)=>{let i={...e,...n}?.valueProp??`value`;return r.model(t,n)[i]},r.on=(t,n)=>{let i=`on${_t({...e,...n}?.event??`input`)}`;return r.model(t,n)[i]},r}function Sr(e,t){return e==null?t:t==null?e:Array.isArray(e)&&Array.isArray(t)?Array.from(new Set([...e,...t])):typeof e==`object`&&typeof t==`object`?{...e,...t}:t}function Cr(e,t,n,r){return function(...i){let a=[],o=[],s=e=>a.push(e),c=e=>o.push(e);r.forEach(n=>{try{n({name:t,store:e,args:i,after:s,onError:c})}catch{}});let l;try{l=n.apply(e,i)}catch(e){throw o.forEach(t=>t(e)),e}let u=e=>(a.forEach(t=>t(e)),e);return l&&typeof l.then==`function`?l.then(e=>u(e),e=>(o.forEach(t=>t(e)),Promise.reject(e))):u(l)}}function wr(e){return typeof e==`object`&&!!e}function Tr(e,t){for(let n in t)e[n]=t[n]}function Er(e,t,n,r){let i={$id:e};Object.defineProperty(i,`$state`,{get(){return t},set(e){t&&wr(e)&&(Tr(t,e),n(`patch object`))}}),i.$patch=e=>{if(!t){typeof e==`function`?(e(i),n(`patch function`)):(Tr(i,e),n(`patch object`));return}typeof e==`function`?(e(t),n(`patch function`)):(Tr(t,e),n(`patch object`))},r&&(i.$reset=()=>r());let a=new Set;i.$subscribe=(e,t)=>(a.add(e),()=>a.delete(e));let o=new Set;return i.$onAction=e=>(o.add(e),()=>o.delete(e)),{api:i,subs:a,actionSubs:o}}function Dr(){let e={_stores:new Map,_plugins:[],install(e){},use(t){return typeof t==`function`&&e._plugins.push(t),e}};return Dr._instance=e,e}function Or(e,t){let n,r=!1,i=Dr._instance;return function(){if(r&&n)return n;if(r=!0,typeof t==`function`){let r=t(),a=()=>{},o=Er(e,void 0,e=>a(e));a=t=>{o.subs.forEach(r=>{try{r({type:t,storeId:e},n)}catch{}})},n=Object.assign({},r);for(let e of Object.getOwnPropertyNames(o.api)){let t=Object.getOwnPropertyDescriptor(o.api,e);t&&Object.defineProperty(n,e,t)}Object.keys(r).forEach(e=>{let t=r[e];typeof t==`function`&&!e.startsWith(`$`)&&(n[e]=Cr(n,e,t,o.actionSubs))});let s=i?._plugins??[];for(let e of s)try{e({store:n})}catch{}return n}let a=t,o=a.state?a.state():{},s=be(o),c={...K(o)},l=()=>{},u=Er(e,s,e=>l(e),()=>{Tr(s,c),l(`patch object`)});l=t=>{u.subs.forEach(n=>{try{n({type:t,storeId:e},s)}catch{}})};let d={};for(let e of Object.getOwnPropertyNames(u.api)){let t=Object.getOwnPropertyDescriptor(u.api,e);t&&Object.defineProperty(d,e,t)}let f=a.getters??{},p={};Object.keys(f).forEach(e=>{let t=f[e];if(typeof t==`function`){let n=je(()=>t.call(d,s));p[e]=n,Object.defineProperty(d,e,{enumerable:!0,configurable:!0,get(){return n.value}})}});let m=a.actions??{};Object.keys(m).forEach(e=>{let t=m[e];typeof t==`function`&&(d[e]=Cr(d,e,(...e)=>t.apply(d,e),u.actionSubs))}),Object.keys(s).forEach(e=>{Object.defineProperty(d,e,{enumerable:!0,configurable:!0,get(){return s[e]},set(t){s[e]=t}})}),n=d;let h=i?._plugins??[];for(let e of h)try{e({store:n})}catch{}return n}}function kr(e){let t={};for(let n in e){let r=e[n];if(typeof r==`function`){t[n]=r;continue}J(r)?t[n]=r:t[n]=je({get:()=>e[n],set:t=>{e[n]=t}})}return t}exports.addMutationRecorder=M,exports.batch=h,exports.callHookList=Q,exports.callHookReturn=Vt,exports.callUpdateHooks=bn,exports.computed=je,exports.createApp=Gn,exports.createStore=Dr,exports.createWevuComponent=ir,exports.createWevuScopedSlotComponent=ar,exports.defineComponent=rr,exports.defineStore=Or,exports.effect=T,exports.effectScope=b,exports.endBatch=m,exports.getCurrentInstance=It,exports.getCurrentScope=x,exports.getCurrentSetupContext=Rt,exports.getDeepWatchStrategy=Ve,exports.getReactiveVersion=_e,exports.inject=lr,exports.injectGlobal=dr,exports.isNoSetData=Xe,exports.isRaw=Ce,exports.isReactive=q,exports.isRef=J,exports.isShallowReactive=ge,exports.isShallowRef=Pe,exports.markNoSetData=Ye,exports.markRaw=Se,exports.mergeModels=Sr,exports.mountRuntimeInstance=Fn,exports.nextTick=o,exports.normalizeClass=_r,exports.normalizeStyle=gr,exports.onActivated=_n,exports.onAddToFavorites=ln,exports.onBeforeMount=mn,exports.onBeforeUnmount=fn,exports.onBeforeUpdate=hn,exports.onDeactivated=vn,exports.onError=an,exports.onErrorCaptured=gn,exports.onHide=Jt,exports.onLaunch=Ht,exports.onLoad=qt,exports.onMounted=un,exports.onMoved=rn,exports.onPageNotFound=Ut,exports.onPageScroll=$t,exports.onPullDownRefresh=Zt,exports.onReachBottom=Qt,exports.onReady=Xt,exports.onResize=nn,exports.onRouteDone=en,exports.onSaveExitState=on,exports.onScopeDispose=S,exports.onServerPrefetch=yn,exports.onShareAppMessage=sn,exports.onShareTimeline=cn,exports.onShow=Kt,exports.onTabItemTap=tn,exports.onThemeChange=Gt,exports.onUnhandledRejection=Wt,exports.onUnload=Yt,exports.onUnmounted=pn,exports.onUpdated=dn,exports.prelinkReactiveTree=de,exports.provide=cr,exports.provideGlobal=ur,exports.reactive=be,exports.readonly=Me,exports.ref=De,exports.registerApp=Rn,exports.registerComponent=Wn,exports.removeMutationRecorder=N,exports.resetWevuDefaults=jt,exports.runSetupFunction=jn,exports.setCurrentInstance=Lt,exports.setCurrentSetupContext=zt,exports.setDeepWatchStrategy=Be,exports.setWevuDefaults=At,exports.shallowReactive=he,exports.shallowRef=Ne,exports.startBatch=f,exports.stop=_,exports.storeToRefs=kr,exports.teardownRuntimeInstance=Ln,exports.toRaw=K,exports.toRef=Ie,exports.toRefs=Le,exports.touchReactive=pe,exports.traverse=Re,exports.triggerRef=Fe,exports.unref=Oe,exports.useAttrs=vr,exports.useBindModel=xr,exports.useModel=br,exports.useSlots=yr,exports.watch=He,exports.watchEffect=Ue;
|