wevu 1.3.0 → 2.0.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/README.md +1 -1
- package/dist/index.d.mts +12 -11
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -74,11 +74,11 @@ interface MutationRecord {
|
|
|
74
74
|
kind: MutationKind;
|
|
75
75
|
op: MutationOp;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* 点路径(例如 `a.b.c`);当路径不可靠时为 undefined。
|
|
78
78
|
*/
|
|
79
79
|
path?: string;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* 当路径不唯一时回退使用的顶层键列表。
|
|
82
82
|
*/
|
|
83
83
|
fallbackTopKeys?: string[];
|
|
84
84
|
}
|
|
@@ -643,13 +643,14 @@ interface DefineComponentOptions<P$1 extends ComponentPropsOptions = ComponentPr
|
|
|
643
643
|
methods?: M;
|
|
644
644
|
/**
|
|
645
645
|
* 透传/扩展字段:允许携带其他小程序原生 Component 选项或自定义字段。
|
|
646
|
-
*
|
|
646
|
+
* 说明:为保持兼容性保留索引签名,但仍会对已知字段提供智能提示。
|
|
647
647
|
*/
|
|
648
648
|
[key: string]: any;
|
|
649
649
|
}
|
|
650
|
+
type AppSetupProps = Record<string, never>;
|
|
650
651
|
interface DefineAppOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions> extends MiniProgramAppOptions {
|
|
651
652
|
watch?: Record<string, any>;
|
|
652
|
-
setup?: (ctx: SetupContext<D, C, M>) => Record<string, any> | void;
|
|
653
|
+
setup?: (props: AppSetupProps, ctx: SetupContext<D, C, M, AppSetupProps>) => Record<string, any> | void;
|
|
653
654
|
[key: string]: any;
|
|
654
655
|
}
|
|
655
656
|
interface CreateAppOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions> extends MiniProgramAppOptions {
|
|
@@ -658,7 +659,7 @@ interface CreateAppOptions<D extends object = Record<string, any>, C extends Com
|
|
|
658
659
|
methods?: M;
|
|
659
660
|
setData?: SetDataSnapshotOptions;
|
|
660
661
|
watch?: Record<string, any>;
|
|
661
|
-
setup?: (ctx: SetupContext<D, C, M>) => Record<string, any> | void;
|
|
662
|
+
setup?: (props: AppSetupProps, ctx: SetupContext<D, C, M, AppSetupProps>) => Record<string, any> | void;
|
|
662
663
|
[key: string]: any;
|
|
663
664
|
}
|
|
664
665
|
interface PageFeatures {
|
|
@@ -973,7 +974,7 @@ declare function teardownRuntimeInstance(target: InternalRuntimeState): void;
|
|
|
973
974
|
//#endregion
|
|
974
975
|
//#region src/runtime/register/setup.d.ts
|
|
975
976
|
type SetupRunner = {
|
|
976
|
-
bivarianceHack: (
|
|
977
|
+
bivarianceHack: (props: Record<string, any>, ctx: any) => any;
|
|
977
978
|
}['bivarianceHack'];
|
|
978
979
|
declare function runSetupFunction(setup: SetupRunner | undefined, props: Record<string, any>, context: any): unknown;
|
|
979
980
|
//#endregion
|
|
@@ -1132,23 +1133,23 @@ declare function defineEmits<T$1 extends (...args: any[]) => any>(): T$1;
|
|
|
1132
1133
|
declare function defineExpose<T$1 extends Record<string, any> = Record<string, any>>(exposed?: T$1): void;
|
|
1133
1134
|
type ScriptSetupDefineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions> = Omit<DefineComponentOptions<ComponentPropsOptions, D, C, M>, 'props' | 'options'> & {
|
|
1134
1135
|
/**
|
|
1135
|
-
* props
|
|
1136
|
+
* props 必须通过 defineProps() 声明。
|
|
1136
1137
|
*/
|
|
1137
1138
|
props?: never;
|
|
1138
1139
|
/**
|
|
1139
|
-
* emits
|
|
1140
|
+
* emits 必须通过 defineEmits() 声明。
|
|
1140
1141
|
*/
|
|
1141
1142
|
emits?: never;
|
|
1142
1143
|
/**
|
|
1143
|
-
* expose
|
|
1144
|
+
* expose 必须通过 defineExpose() 声明。
|
|
1144
1145
|
*/
|
|
1145
1146
|
expose?: never;
|
|
1146
1147
|
/**
|
|
1147
|
-
* slots
|
|
1148
|
+
* slots 必须通过 defineSlots() 声明。
|
|
1148
1149
|
*/
|
|
1149
1150
|
slots?: never;
|
|
1150
1151
|
/**
|
|
1151
|
-
*
|
|
1152
|
+
* 小程序 Component 选项(multipleSlots/styleIsolation 等)。
|
|
1152
1153
|
*/
|
|
1153
1154
|
options?: WechatMiniprogram.Component.ComponentOptions;
|
|
1154
1155
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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 ee(e){v?.active&&v.effects.push(e)}function C(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 w(e,t={}){let n=C(e,t);return ee(n),t.lazy||n(),n}function T(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 E(e){if(e.scheduler){e.scheduler();return}if(u>0){d.add(e);return}e()}function D(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(E)}function O(e){c&&(e.has(c)||(e.add(c),c.deps.push(e)))}function k(e){new Set(e).forEach(E)}const A=new Set;function j(e){A.add(e)}function te(e){A.delete(e)}const M=new WeakMap,N=new WeakMap,P=new WeakMap,F=new WeakMap,I=new WeakSet,L=new WeakMap,ne=new WeakMap;function re(e){let t=ne.get(e);return t||(t=new Set,ne.set(e,t)),t}function R(e,t){re(e).add(t)}function z(e){N.set(e,(N.get(e)??0)+1)}function ie(e){return N.get(e)??0}function ae(e){let t=new Set,n=[e];for(let e=0;e<2e3&&n.length;e++){let e=n.pop(),r=F.get(e);if(r)for(let e of r.keys())t.has(e)||(t.add(e),z(e),n.push(e))}}function oe(e){let t=F.get(e);if(!t){I.delete(e),P.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){I.delete(e),P.set(e,{parent:n,key:r});return}I.add(e),P.delete(e)}function se(e,t,n){if(typeof n!=`string`){I.add(e),P.delete(e);return}if(A.size){let n=M.get(t)??t;R(n,t),R(n,e)}let r=F.get(e);r||(r=new Map,F.set(e,r));let i=r.get(t);i||(i=new Set,r.set(t,i)),i.add(n),oe(e)}function ce(e,t,n){let r=F.get(e);if(!r)return;let i=r.get(t);i&&(i.delete(n),i.size||r.delete(t),r.size||F.delete(e),oe(e))}function le(e,t){if(t===e)return[];if(I.has(t))return;let n=[],r=t;for(let t=0;t<2e3;t++){if(r===e)return n.reverse();if(I.has(r))return;let t=P.get(r);if(!t||typeof t.key!=`string`)return;n.push(t.key),r=t.parent}}let B=function(e){return e.IS_REACTIVE=`__r_isReactive`,e.RAW=`__r_raw`,e.SKIP=`__r_skip`,e}({});function V(e){return typeof e==`object`&&!!e}const H=Symbol(`wevu.version`);function ue(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 U(e){return e?.[B.RAW]??e}const de=new WeakMap,fe=new WeakMap,pe=new WeakMap;function me(e,t){let n=U(e);L.set(n,``),R(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),L.set(e.current,e.path),R(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)||!V(a)||a[B.SKIP])continue;let t=U(a);if(M.has(t)||M.set(t,n),se(t,e.current,i),!I.has(t)){let n=e.path?`${e.path}.${i}`:i;L.set(t,n)}R(n,t),s.push({current:t,path:e.path?`${e.path}.${i}`:i,depth:e.depth+1})}}}function he(e){let t=U(e),n=ne.get(t);if(!n){L.delete(t);return}for(let e of n)P.delete(e),F.delete(e),L.delete(e),I.delete(e),M.delete(e),N.delete(e);ne.delete(t)}function W(e){T(U(e),H)}const ge={get(e,t,n){if(t===B.IS_REACTIVE)return!0;if(t===B.RAW)return e;let r=Reflect.get(e,t,n);return T(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)||(D(e,t),D(e,H),z(e)),a},deleteProperty(e,t){let n=Object.prototype.hasOwnProperty.call(e,t),r=Reflect.deleteProperty(e,t);return n&&r&&(D(e,t),D(e,H),z(e)),r},ownKeys(e){return T(e,Symbol.iterator),T(e,H),Reflect.ownKeys(e)}};function _e(e){if(!V(e))return e;let t=pe.get(e);if(t)return t;if(e[B.IS_REACTIVE])return e;let n=new Proxy(e,ge);return pe.set(e,n),fe.set(n,e),N.has(e)||N.set(e,0),n}function ve(e){let t=U(e);return pe.has(t)}function ye(e){return ie(U(e))}function be(e,t,n){if(!A.size||typeof t!=`string`||t.startsWith(`__r_`))return;let r=M.get(e)??e,i=Array.isArray(e)&&(t===`length`||ue(t))?`array`:`property`,a=le(r,e);if(!a){let a=new Set,o=F.get(e);if(o)for(let[e,t]of o){let n=L.get(e),i=n?n.split(`.`,1)[0]:void 0,o=i?void 0:le(r,e)?.[0];for(let e of t)typeof e==`string`&&a.add(i??o??e)}else a.add(t);for(let e of A)e({root:r,kind:i,op:n,path:void 0,fallbackTopKeys:a.size?Array.from(a):void 0});return}let o=a.findIndex(e=>ue(e));if(o!==-1){let e=a.slice(0,o).join(`.`)||void 0;for(let t of A)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 A)e({root:r,kind:i,op:n,path:c})}const xe={get(e,t,n){if(t===B.IS_REACTIVE)return!0;if(t===B.RAW)return e;let r=Reflect.get(e,t,n);if(T(e,t),V(r)){if(r[B.SKIP])return r;let n=M.get(e)??e,i=r?.[B.RAW]??r;M.has(i)||M.set(i,n),se(i,e,t);let a=L.get(e);if(A.size&&typeof t==`string`&&a!=null&&!I.has(i)){let e=a?`${a}.${t}`:t;L.set(i,e)}return Se(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=V(o)?o?.[B.RAW]??o:void 0;if(r&&ce(r,e,t),V(n)&&!n[B.SKIP]){let r=M.get(e)??e,i=n?.[B.RAW]??n;M.has(i)||M.set(i,r),se(i,e,t);let a=L.get(e);if(A.size&&typeof t==`string`&&a!=null&&!I.has(i)){let e=a?`${a}.${t}`:t;L.set(i,e)}}D(e,t),i&&typeof t==`string`&&ue(t)&&Number(t)>=a&&D(e,`length`),D(e,H),z(e),ae(e);let s=M.get(e);s&&s!==e&&(D(s,H),z(s)),be(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=V(r)?r?.[B.RAW]??r:void 0;n&&ce(n,e,t),D(e,t),D(e,H),z(e),ae(e);let i=M.get(e);i&&i!==e&&(D(i,H),z(i)),be(e,t,`delete`)}return i},ownKeys(e){return T(e,Symbol.iterator),T(e,H),Reflect.ownKeys(e)}};function Se(e){if(!V(e))return e;let t=de.get(e);if(t)return t;if(e[B.IS_REACTIVE])return e;let n=new Proxy(e,xe);return de.set(e,n),fe.set(n,e),N.has(e)||N.set(e,0),M.has(e)||M.set(e,e),n}function G(e){return!!(e&&e[B.IS_REACTIVE])}function Ce(e){return V(e)?Se(e):e}function we(e){return V(e)&&Object.defineProperty(e,B.SKIP,{value:!0,configurable:!0,enumerable:!1,writable:!0}),e}function Te(e){return V(e)&&B.SKIP in e}const Ee=`__v_isRef`;function De(e){try{Object.defineProperty(e,Ee,{value:!0,configurable:!0})}catch{e[Ee]=!0}return e}function K(e){return!!(e&&typeof e==`object`&&e[Ee]===!0)}var Oe=class{_value;_rawValue;dep;constructor(e){De(this),this._rawValue=e,this._value=Ce(e)}get value(){return this.dep||=new Set,O(this.dep),this._value}set value(e){Object.is(e,this._rawValue)||(this._rawValue=e,this._value=Ce(e),this.dep&&k(this.dep))}};function ke(e){return K(e)?e:we(new Oe(e))}function Ae(e){return K(e)?e.value:e}function je(e){return typeof e==`function`?e():Ae(e)}var Me=class{_getValue;_setValue;dep;constructor(e,t){De(this);let n=t,r=()=>{this.dep||=new Set,O(this.dep)},i=()=>{this.dep&&k(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 Ne(e,t){return we(new Me(e,t))}function Pe(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),T(o,`value`),r},set value(e){n(e)}};return De(o),a=w(t,{lazy:!0,scheduler:()=>{i||(i=!0,D(o,`value`))}}),o}function Fe(e){if(K(e)){let t=e;return De({get value(){return t.value},set value(e){throw Error(`无法给只读 ref 赋值`)}})}return V(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 Ie(e,t){return Ne((t,n)=>({get(){return t(),e},set(t){Object.is(e,t)||(e=t,n())}}),t)}function Le(e){return K(e)&&typeof e.value!=`function`}function Re(e){if(K(e)){let t=e.dep;if(t){k(t);return}e.value=e.value}}function ze(e,t,n){let r=e[t];return K(r)?r:Ne((n,r)=>({get(){return n(),e[t]},set(n){e[t]=n,r()}}),n)}function Be(e){G(e)||console.warn(`toRefs() 需要响应式对象,但收到的是普通对象。`);let t=Array.isArray(e)?Array.from({length:e.length}):{};for(let n in e)t[n]=ze(e,n);return t}function Ve(e,t=new Set){if(!V(e)||t.has(e))return e;for(let n in t.add(e),e)Ve(e[n],t);return e}let He=`version`;function Ue(e){He=e}function We(){return He}function Ge(e,t,n={}){let r,i=G(e),o=Array.isArray(e)&&!i,s=e=>{if(typeof e==`function`)return e();if(K(e))return e.value;if(G(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(K(e))r=()=>e.value;else if(i)r=()=>e;else throw Error(`无效的 watch 源`);let c=o?e.some(e=>G(e)):i;if(n.deep??c){let e=r;r=()=>{let t=e();return o&&Array.isArray(t)?t.map(e=>He===`version`&&G(e)?(W(e),e):Ve(e)):He===`version`&&G(t)?(W(t),t):Ve(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=w(()=>r(),{scheduler:()=>a(p),lazy:!0}),n.immediate?p():d=f();let m=()=>{l?.(),l=void 0,_(f)};return S(m),m}function Ke(e){let t,n=e=>{t=e},r,i=()=>{r.active&&r()};r=w(()=>{t?.(),t=void 0,e(n)},{lazy:!0,scheduler:()=>a(i)}),r();let o=()=>{t?.(),t=void 0,_(r)};return S(o),o}function qe(e,t,n){let r=e[t];if(!r)throw Error(`计算属性 "${t}" 是只读的`);r(n)}function Je(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 Ye(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),T(c,`value`),a},set value(e){if(!i)throw Error(`计算属性是只读的`);i(e)}};return De(c),s=w(n,{lazy:!0,scheduler:()=>{o||(o=!0,e.setDataStrategy===`patch`&&e.includeComputed&&r.add(t),D(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 Xe(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}=Ye({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]?(qe(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){qe(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 Ze=Symbol(`wevu.noSetData`);function q(e){return Object.defineProperty(e,Ze,{value:!0,configurable:!0,enumerable:!1,writable:!1}),e}function Qe(e){return typeof e==`object`&&!!e&&e[Ze]===!0}function $e(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function J(e,t=new WeakMap,n){let r=Ae(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(Qe(r))return;let i=G(r)?U(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=ye(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([J(r,t),J(n,t)])}),e}if(i instanceof Set){let e=[];return t.set(i,e),i.forEach(n=>{e.push(J(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=>J(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=J(r,t,{...n,_depth:a-1,_budget:o});e[i]=s===void 0?null:s}),s&&s.set(i,{version:ye(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=J(i[e],t,{...n,_depth:a-1,_budget:o});r!==void 0&&(c[e]=r)}),s&&s.set(i,{version:ye(i),value:c}),c}function et(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 tt(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 nt(e,t){return Object.is(e,t)?!0:Array.isArray(e)&&Array.isArray(t)?et(e,t,nt):$e(e)&&$e(t)?tt(e,t,nt):!1}function rt(e){return e===void 0?null:e}function it(e,t,n,r){if(!nt(e,t)){if($e(e)&&$e(t)){for(let i of Object.keys(t)){if(!Object.prototype.hasOwnProperty.call(e,i)){r[`${n}.${i}`]=rt(t[i]);continue}it(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)){et(e,t,nt)||(r[n]=rt(t));return}r[n]=rt(t)}}function at(e,t){let n={};for(let r of Object.keys(t))it(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 ot(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 st(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+=st(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+=st(a,t-i,n),i>t)return i;return i}function ct(e,t){if(t===1/0)return{fallback:!1,estimatedBytes:void 0,bytes:void 0};let n=t,r=Object.keys(e).length,i=st(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 lt(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=st(e,1/0,new WeakSet);return m.set(e,n),n}return st(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 ut(e){return e===void 0?null:e}function dt(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ft(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(!dt(e)||!dt(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 pt(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(!pt(e[i],t[i],n-1,r))return!1;return!0}if(!dt(e)||!dt(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)||!pt(e[a],t[a],n-1,r))return!1;return!0}function mt(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 ht(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=G(t)?U(t):t,f=Object.keys(d),p=r?Object.keys(n):[];for(let e of f)i(e)&&(l[e]=J(d[e],c,{cache:a,maxDepth:o,_budget:u}));for(let e of p)i(e)&&(l[e]=J(n[e].value,c,{cache:a,maxDepth:o,_budget:u}));return l}function gt(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:ee,needsFullSnapshot:C,emitDebug:w,runDiffUpdate:T}=e;if(b.size>u){C.value=!0;let e=b.size;b.clear(),r.clear(),w({mode:`diff`,reason:`maxPatchKeys`,pendingPatchKeys:e,payloadKeys:0}),T(`maxPatchKeys`);return}let E=new WeakMap,D=new Map,O=Object.create(null),k=Array.from(b.entries());if(Number.isFinite(g)&&g>0){let e=new Map;for(let[t]of k){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 A=k.filter(([e])=>{for(let t of x)if(e===t||e.startsWith(`${t}.`))return!1;return!0}),j=new Map(A);b.clear();let te=e=>{let n=e.split(`.`).filter(Boolean),r=t;for(let e of n){if(r==null)return r;r=r[e]}return r},M=e=>{if(D.has(e))return D.get(e);let t=ut(J(te(e),E,{cache:y,maxDepth:_,maxKeys:v}));return D.set(e,t),t};if(x.size){for(let e of x)l(e)&&(O[e]=M(e),j.set(e,{kind:`property`,op:`set`}));x.clear()}for(let[e,t]of A){if((t.kind===`array`?`set`:t.op)===`delete`){O[e]=null;continue}O[e]=M(e)}let N=0;if(i&&r.size){let e=Object.create(null),t=Array.from(r);r.clear(),N=t.length;for(let r of t){if(!l(r))continue;let t=J(n[r].value,E,{cache:y,maxDepth:_,maxKeys:v}),i=ee[r];(a===`deep`?pt(i,t,o,{keys:s}):a===`shallow`?ft(i,t):Object.is(i,t))||(e[r]=ut(t),ee[r]=t)}Object.assign(O,e)}let P=ot(O),F=0;if(f){let e=lt({input:P,entryMap:j,getPlainByPath:M,mergeSiblingThreshold:f,mergeSiblingSkipArray:h,mergeSiblingMaxParentBytes:m,mergeSiblingMaxInflationRatio:p});F=e.merged,P=ot(e.out)}let I=ct(P,d),L=I.fallback;if(w({mode:L?`diff`:`patch`,reason:L?`maxPayloadBytes`:`patch`,pendingPatchKeys:A.length,payloadKeys:Object.keys(P).length,mergedSiblingParents:F||void 0,computedDirtyKeys:N||void 0,estimatedBytes:I.estimatedBytes,bytes:I.bytes}),L){C.value=!0,b.clear(),r.clear(),T(`maxPayloadBytes`);return}if(Object.keys(P).length){for(let[e,t]of Object.entries(P)){let n=j.get(e);n?mt(S,e,t,n.kind===`array`?`set`:n.op):mt(S,e,t,`set`)}if(typeof c.setData==`function`){let e=c.setData(P);e&&typeof e.then==`function`&&e.catch(()=>{})}w({mode:`patch`,reason:`patch`,pendingPatchKeys:A.length,payloadKeys:Object.keys(P).length})}}function _t(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:ee,isMounted:C}=e,w=new WeakMap,T={},E=Object.create(null),D={value:a===`patch`},O=new Map,k=new Set,A=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{}},j=()=>ht({state:t,computedRefs:n,includeComputed:i,shouldIncludeKey:u,plainCache:w,toPlainMaxDepth:v,toPlainMaxKeys:y}),te=(e=`diff`)=>{let t=j(),o=at(T,t);if(T=t,D.value=!1,O.clear(),a===`patch`&&i){E=Object.create(null);for(let e of Object.keys(n))u(e)&&(E[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(()=>{})}A({mode:`diff`,reason:e,pendingPatchKeys:0,payloadKeys:Object.keys(o).length})}};return{job:e=>{C()&&(ee(),a===`patch`&&!D.value?gt({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:w,pendingPatches:O,fallbackTopKeys:k,latestSnapshot:T,latestComputedSnapshot:E,needsFullSnapshot:D,emitDebug:A,runDiffUpdate:te}):te(D.value?`needsFullSnapshot`:`diff`))},mutationRecorder:(e,t)=>{if(!C()||e.root!==t)return;if(!e.path){if(Array.isArray(e.fallbackTopKeys)&&e.fallbackTopKeys.length)for(let t of e.fallbackTopKeys)k.add(t);else D.value=!0;return}let n=e.path.split(`.`,1)[0];u(n)&&O.set(e.path,{kind:e.kind,op:e.op})},snapshot:()=>a===`patch`?j():{...T},getLatestSnapshot:()=>T}}function vt(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 yt(e){return e?e.charAt(0).toUpperCase()+e.slice(1):``}function bt(e){return e?e.split(`.`).map(e=>e.trim()).filter(Boolean):[]}function xt(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 St(e,t,n,r,i){if(!r.length)return;let[a,...o]=r;if(!o.length){if(t[a])qe(n,a,i);else{let t=e[a];K(t)?t.value=i:e[a]=i}return}if(t[a]){qe(n,a,i);return}(e[a]==null||typeof e[a]!=`object`)&&(e[a]={}),xt(e[a],o,i)}function Ct(e,t){return t.reduce((e,t)=>e==null?e:e[t],e)}function wt(e){return Je(e)}function Tt(e,t,n,r){return(i,a)=>{let o=bt(i);if(!o.length)throw Error(`bindModel 需要非空路径`);let s=()=>Ct(e,o),c=e=>{St(t,n,r,o,e)},l={event:`input`,valueProp:`value`,parser:wt,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${yt(t.event)}`,r=e=>{c(t.parser(e))};return{[t.valueProp]:t.formatter(s()),[n]:r}}}}}const Et=`__wevuDefaultsScope`;let Dt={};function Ot(e){if(!(!e||typeof e!=`object`||Array.isArray(e)))return e}function kt(e,t){if(!e)return t;if(!t)return e;let n={...e,...t},r=Ot(e.setData),i=Ot(t.setData);(r||i)&&(n.setData={...r??{},...i??{}});let a=Ot(e.options),o=Ot(t.options);return(a||o)&&(n.options={...a??{},...o??{}}),n}function At(e,t){return kt(e,t)}function jt(e,t){return{app:kt(e.app,t.app),component:kt(e.component,t.component)}}function Mt(e){Dt=jt(Dt,e)}function Nt(){Dt={}}function Pt(e){return At(Dt.app,e)}function Ft(e){return At(Dt.component,e)}let It,Lt;function Rt(){return It}function zt(e){It=e}function Bt(){return Lt}function Vt(e){Lt=e}function Y(e){if(!It)throw Error(`${e}() 必须在 setup() 的同步阶段调用`);return It}function Ht(e){return e.__wevuHooks||=Object.create(null),e.__wevuHooks}function X(e,t,n,{single:r=!1}={}){let i=Ht(e);r?i[t]=n:(i[t]??(i[t]=[])).push(n)}function Z(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 Ut(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 Wt(e){X(Y(`onLaunch`),`onLaunch`,e)}function Gt(e){X(Y(`onPageNotFound`),`onPageNotFound`,e)}function Kt(e){X(Y(`onUnhandledRejection`),`onUnhandledRejection`,e)}function qt(e){X(Y(`onThemeChange`),`onThemeChange`,e)}function Jt(e){X(Y(`onShow`),`onShow`,e)}function Yt(e){X(Y(`onLoad`),`onLoad`,e)}function Xt(e){X(Y(`onHide`),`onHide`,e)}function Zt(e){X(Y(`onUnload`),`onUnload`,e)}function Qt(e){X(Y(`onReady`),`onReady`,e)}function $t(e){X(Y(`onPullDownRefresh`),`onPullDownRefresh`,e)}function en(e){X(Y(`onReachBottom`),`onReachBottom`,e)}function tn(e){X(Y(`onPageScroll`),`onPageScroll`,e)}function nn(e){X(Y(`onRouteDone`),`onRouteDone`,e)}function rn(e){X(Y(`onTabItemTap`),`onTabItemTap`,e)}function an(e){X(Y(`onResize`),`onResize`,e)}function on(e){X(Y(`onMoved`),`onMoved`,e)}function sn(e){X(Y(`onError`),`onError`,e)}function cn(e){X(Y(`onSaveExitState`),`onSaveExitState`,e,{single:!0})}function ln(e){X(Y(`onShareAppMessage`),`onShareAppMessage`,e,{single:!0})}function un(e){X(Y(`onShareTimeline`),`onShareTimeline`,e,{single:!0})}function dn(e){X(Y(`onAddToFavorites`),`onAddToFavorites`,e,{single:!0})}function fn(e){X(Y(`onMounted`),`onReady`,e)}function pn(e){X(Y(`onUpdated`),`__wevuOnUpdated`,e)}function mn(e){Y(`onBeforeUnmount`),e()}function hn(e){X(Y(`onUnmounted`),`onUnload`,e)}function gn(e){Y(`onBeforeMount`),e()}function _n(e){X(Y(`onBeforeUpdate`),`__wevuOnBeforeUpdate`,e)}function vn(e){let t=Y(`onErrorCaptured`);X(t,`onError`,n=>e(n,t,``))}function yn(e){X(Y(`onActivated`),`onShow`,e)}function bn(e){X(Y(`onDeactivated`),`onHide`,e)}function xn(e){Y(`onServerPrefetch`)}function Sn(e,t){Z(e,t===`before`?`__wevuOnBeforeUpdate`:`__wevuOnUpdated`)}function Cn(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`)}function wn(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(Cn(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 Q=new Map;let Tn=0;function En(){return Tn+=1,`wv${Tn}`}function Dn(e,t,n){let r=Q.get(e)??{snapshot:{},proxy:n,subscribers:new Set};if(r.snapshot=t,r.proxy=n,Q.set(e,r),r.subscribers.size)for(let e of r.subscribers)try{e(t,n)}catch{}}function On(e){Q.delete(e)}function kn(e,t){let n=Q.get(e)??{snapshot:{},proxy:void 0,subscribers:new Set};return n.subscribers.add(t),Q.set(e,n),()=>{let n=Q.get(e);n&&n.subscribers.delete(t)}}function An(e){return Q.get(e)?.proxy}function jn(e){return Q.get(e)?.snapshot}function Mn(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;Dn(n,r,t.proxy)}function Nn(e){return e.kind===`component`}function Pn(e){return new Proxy(e,{get(e,t,n){let r=Reflect.get(e,t,n);return K(r)?r.value:r},set(e,t,n,r){let i=e[t];return K(i)&&!K(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}})}function Fn(e,t){let n=e.__wevuExposeProxy;if(n&&e.__wevuExposeRaw===t)return n;let r=Pn(t);try{Object.defineProperty(e,`__wevuExposeProxy`,{value:r,configurable:!0,enumerable:!1,writable:!1}),Object.defineProperty(e,`__wevuExposeRaw`,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch{e.__wevuExposeProxy=r,e.__wevuExposeRaw=t}return r}function In(e,t){if(!t||typeof t!=`object`)return e;let n=t;return q(new Proxy(e,{get(e,t,r){return Reflect.has(e,t)?Reflect.get(e,t,r):n[t]},set(e,t,r,i){return t in n?(n[t]=r,!0):Reflect.set(e,t,r,i)},has(e,t){return Reflect.has(e,t)||t in n},ownKeys(e){return Array.from(new Set([...Reflect.ownKeys(e),...Reflect.ownKeys(n)]))},getOwnPropertyDescriptor(e,t){return Reflect.has(e,t)?Object.getOwnPropertyDescriptor(e,t):Object.getOwnPropertyDescriptor(n,t)}}))}function Ln(e){if(!e||typeof e!=`object`)return e??null;let t=e,n=t.__wevuExposed;return n&&typeof n==`object`?Fn(t,n):t.__wevu?.proxy?t.__wevu.proxy:e}function Rn(e){return e.__wevuTemplateRefMap}function zn(e,t,n){if(!e)return;let r=e.get(t);r&&(r.value=n)}function Bn(e,t){let n=e.__wevu?.proxy??e,r;if(t.get)try{r=t.get.call(n)}catch{r=void 0}return r==null&&t.name&&(r=t.name),typeof r==`function`?{type:`function`,fn:r}:K(r)?{type:`ref`,ref:r}:typeof r==`string`&&r?{type:`name`,name:r}:t.name?{type:`name`,name:t.name}:{type:`skip`}}function Vn(e){let t=e.__wevu?.state??e,n=t.$refs;if(n&&typeof n==`object`)return n;let r=q(Object.create(null));return Object.defineProperty(t,`$refs`,{value:r,configurable:!0,enumerable:!1,writable:!1}),r}function Hn(e){let t=e;return t&&typeof t.createSelectorQuery==`function`?t.createSelectorQuery():typeof wx<`u`&&typeof wx.createSelectorQuery==`function`?wx.createSelectorQuery().in(t):null}function Un(e,t,n,r,i){let a=Hn(e);return a?(r(n.multiple?a.selectAll(t):a.select(t)),new Promise(e=>{a.exec(t=>{let r=Array.isArray(t)?t[0]:null;n.index!=null&&Array.isArray(r)&&(r=r[n.index]??null),i&&i(r??null),e(r??null)})})):(i&&i(null),Promise.resolve(null))}function Wn(e,t,n){return q({selector:t,boundingClientRect:r=>Un(e,t,n,e=>e.boundingClientRect(),r),scrollOffset:r=>Un(e,t,n,e=>e.scrollOffset(),r),fields:(r,i)=>Un(e,t,n,e=>e.fields(r),i),node:r=>Un(e,t,n,e=>e.node(),r)})}function Gn(e,t){let n=e;if(!n)return t.inFor?q([]):null;if(t.inFor){if(typeof n.selectAllComponents==`function`){let r=n.selectAllComponents(t.selector);return q((Array.isArray(r)?r:[]).map((n,r)=>In(Wn(e,t.selector,{multiple:!0,index:r}),Ln(n))))}return q([])}let r=Wn(e,t.selector,{multiple:!1});return typeof n.selectComponent==`function`?In(r,Ln(n.selectComponent(t.selector))):r}function Kn(e,t,n){return t.inFor?q((Array.isArray(n)?n:[]).map((n,r)=>Wn(e,t.selector,{multiple:!0,index:r}))):n?Wn(e,t.selector,{multiple:!1}):null}function qn(e,t){let n=e.__wevuTemplateRefs;if(!n||!n.length){t?.();return}if(!e.__wevuReadyCalled){t?.();return}if(!e.__wevu){t?.();return}let r=Rn(e),i=n.filter(e=>!Nn(e)),a=n.filter(e=>Nn(e)).map(t=>({binding:t,value:Gn(e,t)})),o=n=>{let i=Vn(e),a=new Map,o=new Set,s=e.__wevu?.proxy??e;n.forEach(t=>{let n=t.binding,r=t.value,i=Bn(e,n);if(i.type===`function`){n.inFor&&Array.isArray(r)?r.length?r.forEach(e=>i.fn.call(s,e)):i.fn.call(s,null):i.fn.call(s,r??null);return}if(i.type===`ref`){i.ref.value=r;return}if(i.type===`name`){o.add(i.name);let e=a.get(i.name)??{values:[],count:0,hasFor:!1};e.count+=1,e.hasFor=e.hasFor||n.inFor,n.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),a.set(i.name,e)}});for(let[e,t]of a){let n;n=t.values.length?t.hasFor||t.values.length>1||t.count>1?q(t.values):t.values[0]:t.hasFor?q([]):null,i[e]=n,zn(r,e,n)}for(let e of Object.keys(i))o.has(e)||delete i[e];t?.()};if(!i.length){o(a);return}let s=Hn(e);if(!s){o(a);return}let c=[];for(let e of i)(e.inFor?s.selectAll(e.selector):s.select(e.selector)).boundingClientRect(),c.push({binding:e});s.exec(t=>{let n=c.map((n,r)=>{let i=Array.isArray(t)?t[r]:null;return{binding:n.binding,value:Kn(e,n.binding,i)}});o([...a,...n])})}function Jn(e,t){let n=e.__wevuTemplateRefs;if(!n||!n.length){t?.();return}if(t){let n=e.__wevuTemplateRefsCallbacks??[];n.push(t),e.__wevuTemplateRefsCallbacks||Object.defineProperty(e,`__wevuTemplateRefsCallbacks`,{value:n,configurable:!0,enumerable:!1,writable:!0})}e.__wevuTemplateRefsPending||(e.__wevuTemplateRefsPending=!0,o(()=>{e.__wevuTemplateRefsPending=!1,qn(e,()=>{let t=e.__wevuTemplateRefsCallbacks;!t||!t.length||t.splice(0).forEach(e=>{try{e()}catch{}})})}))}function Yn(e){let t=e.__wevuTemplateRefs;if(!t||!t.length)return;let n=Vn(e),r=e.__wevu?.proxy??e,i=new Set,a=Rn(e);for(let o of t){let t=Bn(e,o),s=o.inFor?q([]):null;if(t.type===`function`){t.fn.call(r,null);continue}if(t.type===`ref`){t.ref.value=s;continue}t.type===`name`&&(i.add(t.name),n[t.name]=s,zn(a,t.name,s))}for(let e of Object.keys(n))i.has(e)||delete n[e]}function Xn(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 Zn(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=Zn(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 Qn(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 $n(e,t,n){let r=[],i=e.proxy;for(let[a,o]of Object.entries(t)){let t=Zn(o,e,n);if(!t)continue;let s=Qn(i,a),c=e.watch(s,t.handler,t.options);r.push(c)}return r}function er(e,t,n,r,i){if(e.__wevu)return e.__wevu;let a=En(),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;Dn(a,t,s.proxy)},l={...o,setData(t){let n=o.setData(t);return c(),Jn(e),n}},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,Mn(e,g,a),n){let t=$n(g,n,e);t.length&&(e.__wevuWatchStops=t)}if(r){let t=_e({...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)};zt(e),Vt(n);try{let e=Xn(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{Vt(void 0),zt(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 tr(e){let t=e.__wevu?.adapter;t&&typeof t.__wevu_enableSetData==`function`&&t.__wevu_enableSetData()}function nr(e){let t=e.__wevu,n=e.__wvOwnerId;n&&On(n),Yn(e),t&&e.__wevuHooks&&Z(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 rr(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 wn(this.__wevu?.proxy??this,t,e)};let s=o.onLaunch;o.onLaunch=function(...t){er(this,e,n,r),Z(this,`onLaunch`,t),typeof s==`function`&&s.apply(this,t)};let c=o.onShow;o.onShow=function(...e){Z(this,`onShow`,e),typeof c==`function`&&c.apply(this,e)};let l=o.onHide;o.onHide=function(...e){Z(this,`onHide`,e),typeof l==`function`&&l.apply(this,e)};let u=o.onError;o.onError=function(...e){Z(this,`onError`,e),typeof u==`function`&&u.apply(this,e)};let d=o.onPageNotFound;o.onPageNotFound=function(...e){Z(this,`onPageNotFound`,e),typeof d==`function`&&d.apply(this,e)};let f=o.onUnhandledRejection;o.onUnhandledRejection=function(...e){Z(this,`onUnhandledRejection`,e),typeof f==`function`&&f.apply(this,e)};let p=o.onThemeChange;o.onThemeChange=function(...e){Z(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 ir(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 ar(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:ee,effectiveOnTabItemTap:C,effectiveOnResize:w,effectiveOnShareAppMessage:T,effectiveOnShareTimeline:E,effectiveOnAddToFavorites:D,hasHook:O}=e,k={onLoad(...e){if(er(this,t,n,r),tr(this),Z(this,`onLoad`,e),typeof i==`function`)return i.apply(this,e)},onUnload(...e){if(nr(this),typeof a==`function`)return a.apply(this,e)},onShow(...e){if(Z(this,`onShow`,e),typeof o==`function`)return o.apply(this,e)},onHide(...e){if(Z(this,`onHide`,e),typeof s==`function`)return s.apply(this,e)},onReady(...e){if(!this.__wevuReadyCalled){this.__wevuReadyCalled=!0,Jn(this,()=>{Z(this,`onReady`,e),typeof c==`function`&&c.apply(this,e)});return}if(typeof c==`function`)return c.apply(this,e)}};return l&&(k.onSaveExitState=function(...e){let t=Ut(this,`onSaveExitState`,e);return t===void 0?y.apply(this,e):t}),u&&(k.onPullDownRefresh=function(...e){if(Z(this,`onPullDownRefresh`,e),!O(this,`onPullDownRefresh`))return b.apply(this,e)}),d&&(k.onReachBottom=function(...e){if(Z(this,`onReachBottom`,e),!O(this,`onReachBottom`))return x.apply(this,e)}),f&&(k.onPageScroll=function(...e){if(Z(this,`onPageScroll`,e),!O(this,`onPageScroll`))return S.apply(this,e)}),p&&(k.onRouteDone=function(...e){if(Z(this,`onRouteDone`,e),!O(this,`onRouteDone`))return ee.apply(this,e)}),m&&(k.onTabItemTap=function(...e){if(Z(this,`onTabItemTap`,e),!O(this,`onTabItemTap`))return C.apply(this,e)}),h&&(k.onResize=function(...e){if(Z(this,`onResize`,e),!O(this,`onResize`))return w.apply(this,e)}),g&&(k.onShareAppMessage=function(...e){let t=Ut(this,`onShareAppMessage`,e);return t===void 0?T.apply(this,e):t}),_&&(k.onShareTimeline=function(...e){let t=Ut(this,`onShareTimeline`,e);return t===void 0?E.apply(this,e):t}),v&&(k.onAddToFavorites=function(...e){let t=Ut(this,`onAddToFavorites`,e);return t===void 0?D.apply(this,e):t}),k}function or(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 wn(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=Je(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 sr(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;Dn(n,r,t.proxy)}function cr(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{}sr(e)},i=(e,t,n)=>{let r=e.__wevuProps;if(!(!r||typeof r!=`object`)){try{r[t]=n}catch{}sr(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 lr(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,ee=l.onShareTimeline,C=l.onAddToFavorites,w=l.features??{},T={...l},E=T.__wevuTemplateRefs;delete T.__wevuTemplateRefs;let D=T.observers,O=T.created;delete T.features,delete T.created,delete T.onLoad,delete T.onUnload,delete T.onShow,delete T.onHide,delete T.onReady;let{enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:te,enableOnTabItemTap:M,enableOnResize:N,enableOnShareAppMessage:P,enableOnShareTimeline:F,enableOnAddToFavorites:I,enableOnSaveExitState:L,effectiveOnSaveExitState:ne,effectiveOnPullDownRefresh:re,effectiveOnReachBottom:R,effectiveOnPageScroll:z,effectiveOnRouteDone:ie,effectiveOnTabItemTap:ae,effectiveOnResize:oe,effectiveOnShareAppMessage:se,effectiveOnShareTimeline:ce,effectiveOnAddToFavorites:le}=ir({features:w,userOnSaveExitState:h,userOnPullDownRefresh:g,userOnReachBottom:_,userOnPageScroll:v,userOnRouteDone:y,userOnTabItemTap:b,userOnResize:x,userOnShareAppMessage:S,userOnShareTimeline:ee,userOnAddToFavorites:C}),B=(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=T.export;T.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 V={multipleSlots:c.multipleSlots??!0,...c},{syncWevuPropsFromInstance:H,finalObservers:ue}=cr({restOptions:T,userObservers:D}),{finalMethods:U}=or({userMethods:a,runtimeMethods:t}),de=ar({runtimeApp:e,watch:n,setup:r,userOnLoad:u,userOnUnload:d,userOnShow:f,userOnHide:p,userOnReady:m,enableOnSaveExitState:L,enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:te,enableOnTabItemTap:M,enableOnResize:N,enableOnShareAppMessage:P,enableOnShareTimeline:F,enableOnAddToFavorites:I,effectiveOnSaveExitState:ne,effectiveOnPullDownRefresh:re,effectiveOnReachBottom:R,effectiveOnPageScroll:z,effectiveOnRouteDone:ie,effectiveOnTabItemTap:ae,effectiveOnResize:oe,effectiveOnShareAppMessage:se,effectiveOnShareTimeline:ce,effectiveOnAddToFavorites:le,hasHook:B});Component({...T,...de,observers:ue,lifetimes:{...o,created:function(...t){Array.isArray(E)&&E.length&&Object.defineProperty(this,`__wevuTemplateRefs`,{value:E,configurable:!0,enumerable:!1,writable:!1}),er(this,e,n,r,{deferSetData:!0}),H(this),typeof O==`function`&&O.apply(this,t),typeof o.created==`function`&&o.created.apply(this,t)},moved:function(...e){Z(this,`onMoved`,e),typeof o.moved==`function`&&o.moved.apply(this,e)},attached:function(...t){Array.isArray(E)&&E.length&&!this.__wevuTemplateRefs&&Object.defineProperty(this,`__wevuTemplateRefs`,{value:E,configurable:!0,enumerable:!1,writable:!1}),er(this,e,n,r),H(this),tr(this),typeof o.attached==`function`&&o.attached.apply(this,t)},ready:function(...e){if(!this.__wevuReadyCalled){this.__wevuReadyCalled=!0,H(this),Jn(this,()=>{Z(this,`onReady`,e),typeof o.ready==`function`&&o.ready.apply(this,e)});return}typeof o.ready==`function`&&o.ready.apply(this,e)},detached:function(...e){Yn(this),nr(this),typeof o.detached==`function`&&o.detached.apply(this,e)},error:function(...e){Z(this,`onError`,e),typeof o.error==`function`&&o.error.apply(this,e)}},pageLifetimes:{...s,show:function(...e){Z(this,`onShow`,e),typeof s.show==`function`&&s.show.apply(this,e)},hide:function(...e){Z(this,`onHide`,e),typeof s.hide==`function`&&s.hide.apply(this,e)},resize:function(...e){Z(this,`onResize`,e),typeof s.resize==`function`&&s.resize.apply(this,e)}},methods:U,options:V})}function ur(e){let{[Et]:t,data:n,computed:r,methods:i,setData:o,watch:s,setup:c,...l}=e[Et]===`component`?e:Pt(e),u=i??{},d=r??{},f=new Set,p={globalProperties:{}},m={mount(e){let t=Se((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:ee,prelinkMaxDepth:C,prelinkMaxKeys:T,debug:E,debugWhen:D,debugSampleRate:O,elevateTopKeyThreshold:k,toPlainMaxDepth:A,toPlainMaxKeys:M,shouldIncludeKey:N}=vt(o),{boundMethods:P,computedRefs:F,computedSetters:I,dirtyComputedKeys:L,computedProxy:ne,publicInstance:re}=Xe({state:t,computedDefs:r,methodDefs:i,appConfig:p,includeComputed:l,setDataStrategy:f}),R=e??{setData:()=>{}},z=U(t),ie,ae=_t({state:t,computedRefs:F,dirtyComputedKeys:L,includeComputed:l,setDataStrategy:f,computedCompare:x,computedCompareMaxDepth:S,computedCompareMaxKeys:ee,currentAdapter:R,shouldIncludeKey:N,maxPatchKeys:m,maxPayloadBytes:h,mergeSiblingThreshold:g,mergeSiblingMaxInflationRatio:v,mergeSiblingMaxParentBytes:y,mergeSiblingSkipArray:b,elevateTopKeyThreshold:k,toPlainMaxDepth:A,toPlainMaxKeys:M,debug:E,debugWhen:D,debugSampleRate:O,runTracker:()=>ie?.(),isMounted:()=>s}),oe=()=>ae.job(z),se=e=>ae.mutationRecorder(e,z);ie=w(()=>{W(t),Object.keys(t).forEach(e=>{let n=t[e];K(n)?n.value:G(n)&&W(n)})},{lazy:!0,scheduler:()=>a(oe)}),oe(),c.push(()=>_(ie)),f===`patch`&&(me(t,{shouldIncludeTopKey:N,maxDepth:C,maxKeys:T}),j(se),c.push(()=>te(se)),c.push(()=>he(t)));function ce(e,t,n){let r=Ge(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 re},get methods(){return P},get computed(){return ne},get adapter(){return R},bindModel:Tt(re,t,F,I),watch:ce,snapshot:()=>ae.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),rr(m,i??{},s,c,l))}return m}function dr(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 fr(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`)}function pr(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(fr(t))}catch{n=[]}}return Array.isArray(n)||(n=[]),n.map(t=>t===`$event`?e:t)}function mr(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 hr(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=mr(n),a=mr(r),o={...i,...a};typeof e?.setData==`function`&&e.setData({__wvSlotPropsData:o})}function gr(e){let t={properties:{__wvOwnerId:{type:String,value:``},__wvSlotProps:{type:null,value:null,observer(e){hr(this,{__wvSlotProps:e})}},__wvSlotScope:{type:null,value:null,observer(e){hr(this,{__wvSlotScope:e})}}},data:()=>({__wvOwner:{},__wvSlotPropsData:{}}),lifetimes:{attached(){let e=this.properties?.__wvOwnerId??``;if(hr(this),!e)return;let t=(e,t)=>{this.__wvOwnerProxy=t,typeof this.setData==`function`&&this.setData({__wvOwner:e||{}})};this.__wvOwnerUnsub=kn(e,t);let n=jn(e);n&&t(n,An(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=pr(e);return r.apply(n,i)}}};return e?.computed&&Object.keys(e.computed).length>0&&(t.computed=e.computed),t}function _r(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function vr(e){return typeof e!=`object`||!e||K(e)||G(e)||Array.isArray(e)?!0:_r(e)}function yr(e,t,n){let r=e?.methods??Object.create(null),i=e?.state??Object.create(null),a=G(i)?U(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||!vr(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 br;function xr(){let e=typeof globalThis<`u`?globalThis:void 0;if(!e)return;let t=e;!t.__weapp_vite_createScopedSlotComponent&&br&&(t.__weapp_vite_createScopedSlotComponent=br)}function Sr(e){xr();let{__typeProps:t,data:n,computed:r,methods:i,setData:a,watch:o,setup:s,props:c,...l}=Ft(e),u=ur({data:n,computed:r,methods:i,setData:a,[Et]:`component`}),d=(e,t)=>{let n=Xn(s,e,t);return n&&t&&yr(t.runtime,t.instance,n),n},f=dr(l,c),p={data:n,computed:r,methods:i,setData:a,watch:o,setup:d,mpOptions:f};return lr(u,i??{},o,d,f),{__wevu_runtime:u,__wevu_options:p}}function Cr(e){xr();let{properties:t,props:n,...r}=e;Sr(dr(r,n,t))}function wr(e){Cr(gr(e))}br=wr,xr();const Tr=Symbol(`wevu.provideScope`),Er=new Map;function Dr(e,t){let n=Rt();if(n){let r=n[Tr];r||(r=new Map,n[Tr]=r),r.set(e,t)}else Er.set(e,t)}function Or(e,t){let n=Rt();if(n){let t=n;for(;t;){let n=t[Tr];if(n&&n.has(e))return n.get(e);t=null}}if(Er.has(e))return Er.get(e);if(arguments.length>=2)return t;throw Error(`wevu.inject:未找到对应 key 的值`)}function kr(e,t){Er.set(e,t)}function Ar(e,t){if(Er.has(e))return Er.get(e);if(arguments.length>=2)return t;throw Error(`injectGlobal():未找到对应 key 的 provider:${String(e)}`)}const jr=/\B([A-Z])/g;function Mr(e){return e?e.startsWith(`--`)?e:e.replace(jr,`-$1`).toLowerCase():``}function Nr(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 Pr(e){let t=``;for(let n of Object.keys(e)){let r=e[n];if(r==null)continue;let i=Mr(n);if(Array.isArray(r))for(let e of r)e!=null&&(t=Nr(t,`${i}:${e}`));else t=Nr(t,`${i}:${r}`)}return t}function Fr(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e)){let t=``;for(let n of e){let e=Fr(n);e&&(t=Nr(t,e))}return t}return typeof e==`object`?Pr(e):``}function Ir(e){let t=``;if(!e)return t;if(typeof e==`string`)return e;if(Array.isArray(e)){for(let n of e){let e=Ir(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 Lr(){let e=Bt();if(!e)throw Error(`useAttrs() 必须在 setup() 的同步阶段调用`);return e.attrs??{}}function Rr(){let e=Bt();if(!e)throw Error(`useSlots() 必须在 setup() 的同步阶段调用`);return e.slots??Object.create(null)}function zr(e){let t=e.__wevuTemplateRefMap;if(t)return t;let n=new Map;try{Object.defineProperty(e,`__wevuTemplateRefMap`,{value:n,configurable:!0,enumerable:!1,writable:!1})}catch{e.__wevuTemplateRefMap=n}return n}function Br(e){let t=Rt();if(!t)throw Error(`useTemplateRef() 必须在 setup() 的同步阶段调用`);let n=typeof e==`string`?e.trim():``;if(!n)throw Error(`useTemplateRef() 需要传入有效的模板 ref 名称`);let r=zr(t),i=r.get(n);if(i)return i;let a=Ie(null);return r.set(n,a),a}function Vr(e,t){let n=Bt();if(!n)throw Error(`useModel() 必须在 setup() 的同步阶段调用`);let r=n.emit,i=`update:${t}`;return Ne({get:()=>e?.[t],set:e=>{r?.(i,e)}})}function Hr(e){let t=Rt();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${yt({...e,...n}?.event??`input`)}`;return r.model(t,n)[i]},r}function Ur(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 Wr(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 Gr(e){return typeof e==`object`&&!!e}function Kr(e){if(!Gr(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function qr(e,t){for(let n in t)e[n]=t[n]}function $(e){if(Array.isArray(e))return e.map(e=>$(e));if(Kr(e)){let t={};for(let n in e)t[n]=$(e[n]);return t}return e}function Jr(e,t){if(Array.isArray(e)&&Array.isArray(t)){e.length=0,t.forEach((t,n)=>{e[n]=$(t)});return}if(Gr(t)){for(let n in e)n in t||delete e[n];for(let n in t){let r=t[n],i=e[n];if(Array.isArray(r)&&Array.isArray(i)){Jr(i,r);continue}if(Kr(r)&&Kr(i)){Jr(i,r);continue}e[n]=$(r)}}}function Yr(e,t,n,r){let i={$id:e};Object.defineProperty(i,`$state`,{get(){return t},set(e){t&&Gr(e)&&(qr(t,e),n(`patch object`))}}),i.$patch=e=>{if(!t){typeof e==`function`?(e(i),n(`patch function`)):(qr(i,e),n(`patch object`));return}typeof e==`function`?(e(t),n(`patch function`)):(qr(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 Xr(){let e={_stores:new Map,_plugins:[],install(e){},use(t){return typeof t==`function`&&e._plugins.push(t),e}};return Xr._instance=e,e}const Zr=Object.prototype.hasOwnProperty;function Qr(e){return K(e)&&Zr.call(e,`dep`)}function $r(e){return G(e)?$(U(e)):Qr(e)?$(e.value):$(e)}function ei(e,t){let n,r=!1,i=Xr._instance;return function(){if(r&&n)return n;if(r=!0,typeof t==`function`){let r=t(),a=()=>{},o=new Map;Object.keys(r).forEach(e=>{let t=r[e];typeof t==`function`||e.startsWith(`$`)||K(t)&&!Qr(t)||o.set(e,$r(t))});let s=Yr(e,void 0,e=>a(e),()=>{o.forEach((e,t)=>{let r=n[t];if(Qr(r)){r.value=$(e);return}if(G(r)){Jr(r,e);return}K(r)||(n[t]=$(e))}),a(`patch object`)}),c=!1,l=s.api.$patch;if(s.api.$patch=e=>{c=!0;try{l(e)}finally{c=!1}},typeof s.api.$reset==`function`){let e=s.api.$reset;s.api.$reset=()=>{c=!0;try{e()}finally{c=!1}}}a=t=>{s.subs.forEach(r=>{try{r({type:t,storeId:e},n)}catch{}})},n=Object.assign({},r);for(let e of Object.getOwnPropertyNames(s.api)){let t=Object.getOwnPropertyDescriptor(s.api,e);t&&(e===`$state`?Object.defineProperty(n,e,{enumerable:t.enumerable,configurable:t.configurable,get(){return s.api.$state},set(e){c=!0;try{s.api.$state=e}finally{c=!1}}}):Object.defineProperty(n,e,t))}let u=[];if(Object.keys(r).forEach(e=>{let t=r[e];if(typeof t==`function`&&!e.startsWith(`$`)){n[e]=Wr(n,e,t,s.actionSubs);return}if(Qr(t)){u.push(t);return}if(G(t)){u.push(t);return}if(!K(t)&&!e.startsWith(`$`)){let r=t;Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get(){return r},set(e){r=e,c||a(`direct`)}})}}),u.length>0){let e=!1;w(()=>{if(u.forEach(e=>{Qr(e)?e.value:W(e)}),!e){e=!0;return}c||a(`direct`)})}let d=i?._plugins??[];for(let e of d)try{e({store:n})}catch{}return n}let a=t,o=a.state?a.state():{},s=Se(o),c=$(U(o)),l=()=>{},u=Yr(e,s,e=>l(e),()=>{Jr(s,c),l(`patch object`)}),d=!1,f=u.api.$patch;if(u.api.$patch=e=>{d=!0;try{f(e)}finally{d=!1}},typeof u.api.$reset==`function`){let e=u.api.$reset;u.api.$reset=()=>{d=!0;try{e()}finally{d=!1}}}l=t=>{u.subs.forEach(n=>{try{n({type:t,storeId:e},s)}catch{}})};let p={};for(let e of Object.getOwnPropertyNames(u.api)){let t=Object.getOwnPropertyDescriptor(u.api,e);t&&(e===`$state`?Object.defineProperty(p,e,{enumerable:t.enumerable,configurable:t.configurable,get(){return u.api.$state},set(e){d=!0;try{u.api.$state=e}finally{d=!1}}}):Object.defineProperty(p,e,t))}let m=a.getters??{},h={};Object.keys(m).forEach(e=>{let t=m[e];if(typeof t==`function`){let n=Pe(()=>t.call(p,s));h[e]=n,Object.defineProperty(p,e,{enumerable:!0,configurable:!0,get(){return n.value}})}});let g=a.actions??{};Object.keys(g).forEach(e=>{let t=g[e];typeof t==`function`&&(p[e]=Wr(p,e,(...e)=>t.apply(p,e),u.actionSubs))}),Object.keys(s).forEach(e=>{Object.defineProperty(p,e,{enumerable:!0,configurable:!0,get(){return s[e]},set(t){s[e]=t}})});let _=!1;w(()=>{if(W(s),!_){_=!0;return}d||l(`direct`)}),n=p;let v=i?._plugins??[];for(let e of v)try{e({store:n})}catch{}return n}}function ti(e){let t={};for(let n in e){let r=e[n];if(typeof r==`function`){t[n]=r;continue}K(r)?t[n]=r:t[n]=Pe({get:()=>e[n],set:t=>{e[n]=t}})}return t}export{j as addMutationRecorder,h as batch,Z as callHookList,Ut as callHookReturn,Sn as callUpdateHooks,Pe as computed,ur as createApp,Xr as createStore,Cr as createWevuComponent,wr as createWevuScopedSlotComponent,Sr as defineComponent,ei as defineStore,w as effect,b as effectScope,m as endBatch,Rt as getCurrentInstance,x as getCurrentScope,Bt as getCurrentSetupContext,We as getDeepWatchStrategy,ye as getReactiveVersion,Or as inject,Ar as injectGlobal,Qe as isNoSetData,Te as isRaw,G as isReactive,K as isRef,ve as isShallowReactive,Le as isShallowRef,q as markNoSetData,we as markRaw,Ur as mergeModels,er as mountRuntimeInstance,o as nextTick,Ir as normalizeClass,Fr as normalizeStyle,yn as onActivated,dn as onAddToFavorites,gn as onBeforeMount,mn as onBeforeUnmount,_n as onBeforeUpdate,bn as onDeactivated,sn as onError,vn as onErrorCaptured,Xt as onHide,Wt as onLaunch,Yt as onLoad,fn as onMounted,on as onMoved,Gt as onPageNotFound,tn as onPageScroll,$t as onPullDownRefresh,en as onReachBottom,Qt as onReady,an as onResize,nn as onRouteDone,cn as onSaveExitState,S as onScopeDispose,xn as onServerPrefetch,ln as onShareAppMessage,un as onShareTimeline,Jt as onShow,rn as onTabItemTap,qt as onThemeChange,Kt as onUnhandledRejection,Zt as onUnload,hn as onUnmounted,pn as onUpdated,me as prelinkReactiveTree,Dr as provide,kr as provideGlobal,Se as reactive,Fe as readonly,ke as ref,rr as registerApp,lr as registerComponent,te as removeMutationRecorder,Nt as resetWevuDefaults,Xn as runSetupFunction,zt as setCurrentInstance,Vt as setCurrentSetupContext,Ue as setDeepWatchStrategy,Mt as setWevuDefaults,_e as shallowReactive,Ie as shallowRef,f as startBatch,_ as stop,ti as storeToRefs,nr as teardownRuntimeInstance,U as toRaw,ze as toRef,Be as toRefs,je as toValue,W as touchReactive,Ve as traverse,Re as triggerRef,Ae as unref,Lr as useAttrs,Hr as useBindModel,Vr as useModel,Rr as useSlots,Br as useTemplateRef,Ge as watch,Ke as watchEffect};
|
|
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 ee(e){v?.active&&v.effects.push(e)}function C(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 w(e,t={}){let n=C(e,t);return ee(n),t.lazy||n(),n}function T(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 E(e){if(e.scheduler){e.scheduler();return}if(u>0){d.add(e);return}e()}function D(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(E)}function O(e){c&&(e.has(c)||(e.add(c),c.deps.push(e)))}function k(e){new Set(e).forEach(E)}const A=new Set;function j(e){A.add(e)}function te(e){A.delete(e)}const M=new WeakMap,N=new WeakMap,P=new WeakMap,F=new WeakMap,I=new WeakSet,L=new WeakMap,ne=new WeakMap;function re(e){let t=ne.get(e);return t||(t=new Set,ne.set(e,t)),t}function R(e,t){re(e).add(t)}function z(e){N.set(e,(N.get(e)??0)+1)}function ie(e){return N.get(e)??0}function ae(e){let t=new Set,n=[e];for(let e=0;e<2e3&&n.length;e++){let e=n.pop(),r=F.get(e);if(r)for(let e of r.keys())t.has(e)||(t.add(e),z(e),n.push(e))}}function oe(e){let t=F.get(e);if(!t){I.delete(e),P.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){I.delete(e),P.set(e,{parent:n,key:r});return}I.add(e),P.delete(e)}function se(e,t,n){if(typeof n!=`string`){I.add(e),P.delete(e);return}if(A.size){let n=M.get(t)??t;R(n,t),R(n,e)}let r=F.get(e);r||(r=new Map,F.set(e,r));let i=r.get(t);i||(i=new Set,r.set(t,i)),i.add(n),oe(e)}function ce(e,t,n){let r=F.get(e);if(!r)return;let i=r.get(t);i&&(i.delete(n),i.size||r.delete(t),r.size||F.delete(e),oe(e))}function le(e,t){if(t===e)return[];if(I.has(t))return;let n=[],r=t;for(let t=0;t<2e3;t++){if(r===e)return n.reverse();if(I.has(r))return;let t=P.get(r);if(!t||typeof t.key!=`string`)return;n.push(t.key),r=t.parent}}let B=function(e){return e.IS_REACTIVE=`__r_isReactive`,e.RAW=`__r_raw`,e.SKIP=`__r_skip`,e}({});function V(e){return typeof e==`object`&&!!e}const H=Symbol(`wevu.version`);function ue(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 U(e){return e?.[B.RAW]??e}const de=new WeakMap,fe=new WeakMap,pe=new WeakMap;function me(e,t){let n=U(e);L.set(n,``),R(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),L.set(e.current,e.path),R(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)||!V(a)||a[B.SKIP])continue;let t=U(a);if(M.has(t)||M.set(t,n),se(t,e.current,i),!I.has(t)){let n=e.path?`${e.path}.${i}`:i;L.set(t,n)}R(n,t),s.push({current:t,path:e.path?`${e.path}.${i}`:i,depth:e.depth+1})}}}function he(e){let t=U(e),n=ne.get(t);if(!n){L.delete(t);return}for(let e of n)P.delete(e),F.delete(e),L.delete(e),I.delete(e),M.delete(e),N.delete(e);ne.delete(t)}function W(e){T(U(e),H)}const ge={get(e,t,n){if(t===B.IS_REACTIVE)return!0;if(t===B.RAW)return e;let r=Reflect.get(e,t,n);return T(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)||(D(e,t),D(e,H),z(e)),a},deleteProperty(e,t){let n=Object.prototype.hasOwnProperty.call(e,t),r=Reflect.deleteProperty(e,t);return n&&r&&(D(e,t),D(e,H),z(e)),r},ownKeys(e){return T(e,Symbol.iterator),T(e,H),Reflect.ownKeys(e)}};function _e(e){if(!V(e))return e;let t=pe.get(e);if(t)return t;if(e[B.IS_REACTIVE])return e;let n=new Proxy(e,ge);return pe.set(e,n),fe.set(n,e),N.has(e)||N.set(e,0),n}function ve(e){let t=U(e);return pe.has(t)}function ye(e){return ie(U(e))}function be(e,t,n){if(!A.size||typeof t!=`string`||t.startsWith(`__r_`))return;let r=M.get(e)??e,i=Array.isArray(e)&&(t===`length`||ue(t))?`array`:`property`,a=le(r,e);if(!a){let a=new Set,o=F.get(e);if(o)for(let[e,t]of o){let n=L.get(e),i=n?n.split(`.`,1)[0]:void 0,o=i?void 0:le(r,e)?.[0];for(let e of t)typeof e==`string`&&a.add(i??o??e)}else a.add(t);for(let e of A)e({root:r,kind:i,op:n,path:void 0,fallbackTopKeys:a.size?Array.from(a):void 0});return}let o=a.findIndex(e=>ue(e));if(o!==-1){let e=a.slice(0,o).join(`.`)||void 0;for(let t of A)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 A)e({root:r,kind:i,op:n,path:c})}const xe={get(e,t,n){if(t===B.IS_REACTIVE)return!0;if(t===B.RAW)return e;let r=Reflect.get(e,t,n);if(T(e,t),V(r)){if(r[B.SKIP])return r;let n=M.get(e)??e,i=r?.[B.RAW]??r;M.has(i)||M.set(i,n),se(i,e,t);let a=L.get(e);if(A.size&&typeof t==`string`&&a!=null&&!I.has(i)){let e=a?`${a}.${t}`:t;L.set(i,e)}return Se(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=V(o)?o?.[B.RAW]??o:void 0;if(r&&ce(r,e,t),V(n)&&!n[B.SKIP]){let r=M.get(e)??e,i=n?.[B.RAW]??n;M.has(i)||M.set(i,r),se(i,e,t);let a=L.get(e);if(A.size&&typeof t==`string`&&a!=null&&!I.has(i)){let e=a?`${a}.${t}`:t;L.set(i,e)}}D(e,t),i&&typeof t==`string`&&ue(t)&&Number(t)>=a&&D(e,`length`),D(e,H),z(e),ae(e);let s=M.get(e);s&&s!==e&&(D(s,H),z(s)),be(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=V(r)?r?.[B.RAW]??r:void 0;n&&ce(n,e,t),D(e,t),D(e,H),z(e),ae(e);let i=M.get(e);i&&i!==e&&(D(i,H),z(i)),be(e,t,`delete`)}return i},ownKeys(e){return T(e,Symbol.iterator),T(e,H),Reflect.ownKeys(e)}};function Se(e){if(!V(e))return e;let t=de.get(e);if(t)return t;if(e[B.IS_REACTIVE])return e;let n=new Proxy(e,xe);return de.set(e,n),fe.set(n,e),N.has(e)||N.set(e,0),M.has(e)||M.set(e,e),n}function G(e){return!!(e&&e[B.IS_REACTIVE])}function Ce(e){return V(e)?Se(e):e}function we(e){return V(e)&&Object.defineProperty(e,B.SKIP,{value:!0,configurable:!0,enumerable:!1,writable:!0}),e}function Te(e){return V(e)&&B.SKIP in e}const Ee=`__v_isRef`;function De(e){try{Object.defineProperty(e,Ee,{value:!0,configurable:!0})}catch{e[Ee]=!0}return e}function K(e){return!!(e&&typeof e==`object`&&e[Ee]===!0)}var Oe=class{_value;_rawValue;dep;constructor(e){De(this),this._rawValue=e,this._value=Ce(e)}get value(){return this.dep||=new Set,O(this.dep),this._value}set value(e){Object.is(e,this._rawValue)||(this._rawValue=e,this._value=Ce(e),this.dep&&k(this.dep))}};function ke(e){return K(e)?e:we(new Oe(e))}function Ae(e){return K(e)?e.value:e}function je(e){return typeof e==`function`?e():Ae(e)}var Me=class{_getValue;_setValue;dep;constructor(e,t){De(this);let n=t,r=()=>{this.dep||=new Set,O(this.dep)},i=()=>{this.dep&&k(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 Ne(e,t){return we(new Me(e,t))}function Pe(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),T(o,`value`),r},set value(e){n(e)}};return De(o),a=w(t,{lazy:!0,scheduler:()=>{i||(i=!0,D(o,`value`))}}),o}function Fe(e){if(K(e)){let t=e;return De({get value(){return t.value},set value(e){throw Error(`无法给只读 ref 赋值`)}})}return V(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 Ie(e,t){return Ne((t,n)=>({get(){return t(),e},set(t){Object.is(e,t)||(e=t,n())}}),t)}function Le(e){return K(e)&&typeof e.value!=`function`}function Re(e){if(K(e)){let t=e.dep;if(t){k(t);return}e.value=e.value}}function ze(e,t,n){let r=e[t];return K(r)?r:Ne((n,r)=>({get(){return n(),e[t]},set(n){e[t]=n,r()}}),n)}function Be(e){G(e)||console.warn(`toRefs() 需要响应式对象,但收到的是普通对象。`);let t=Array.isArray(e)?Array.from({length:e.length}):{};for(let n in e)t[n]=ze(e,n);return t}function Ve(e,t=new Set){if(!V(e)||t.has(e))return e;for(let n in t.add(e),e)Ve(e[n],t);return e}let He=`version`;function Ue(e){He=e}function We(){return He}function Ge(e,t,n={}){let r,i=G(e),o=Array.isArray(e)&&!i,s=e=>{if(typeof e==`function`)return e();if(K(e))return e.value;if(G(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(K(e))r=()=>e.value;else if(i)r=()=>e;else throw Error(`无效的 watch 源`);let c=o?e.some(e=>G(e)):i;if(n.deep??c){let e=r;r=()=>{let t=e();return o&&Array.isArray(t)?t.map(e=>He===`version`&&G(e)?(W(e),e):Ve(e)):He===`version`&&G(t)?(W(t),t):Ve(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=w(()=>r(),{scheduler:()=>a(p),lazy:!0}),n.immediate?p():d=f();let m=()=>{l?.(),l=void 0,_(f)};return S(m),m}function Ke(e){let t,n=e=>{t=e},r,i=()=>{r.active&&r()};r=w(()=>{t?.(),t=void 0,e(n)},{lazy:!0,scheduler:()=>a(i)}),r();let o=()=>{t?.(),t=void 0,_(r)};return S(o),o}function qe(e,t,n){let r=e[t];if(!r)throw Error(`计算属性 "${t}" 是只读的`);r(n)}function Je(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 Ye(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),T(c,`value`),a},set value(e){if(!i)throw Error(`计算属性是只读的`);i(e)}};return De(c),s=w(n,{lazy:!0,scheduler:()=>{o||(o=!0,e.setDataStrategy===`patch`&&e.includeComputed&&r.add(t),D(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 Xe(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}=Ye({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]?(qe(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){qe(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 Ze=Symbol(`wevu.noSetData`);function q(e){return Object.defineProperty(e,Ze,{value:!0,configurable:!0,enumerable:!1,writable:!1}),e}function Qe(e){return typeof e==`object`&&!!e&&e[Ze]===!0}function $e(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function J(e,t=new WeakMap,n){let r=Ae(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(Qe(r))return;let i=G(r)?U(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=ye(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([J(r,t),J(n,t)])}),e}if(i instanceof Set){let e=[];return t.set(i,e),i.forEach(n=>{e.push(J(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=>J(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=J(r,t,{...n,_depth:a-1,_budget:o});e[i]=s===void 0?null:s}),s&&s.set(i,{version:ye(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=J(i[e],t,{...n,_depth:a-1,_budget:o});r!==void 0&&(c[e]=r)}),s&&s.set(i,{version:ye(i),value:c}),c}function et(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 tt(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 nt(e,t){return Object.is(e,t)?!0:Array.isArray(e)&&Array.isArray(t)?et(e,t,nt):$e(e)&&$e(t)?tt(e,t,nt):!1}function rt(e){return e===void 0?null:e}function it(e,t,n,r){if(!nt(e,t)){if($e(e)&&$e(t)){for(let i of Object.keys(t)){if(!Object.prototype.hasOwnProperty.call(e,i)){r[`${n}.${i}`]=rt(t[i]);continue}it(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)){et(e,t,nt)||(r[n]=rt(t));return}r[n]=rt(t)}}function at(e,t){let n={};for(let r of Object.keys(t))it(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 ot(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 st(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+=st(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+=st(a,t-i,n),i>t)return i;return i}function ct(e,t){if(t===1/0)return{fallback:!1,estimatedBytes:void 0,bytes:void 0};let n=t,r=Object.keys(e).length,i=st(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 lt(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=st(e,1/0,new WeakSet);return m.set(e,n),n}return st(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 ut(e){return e===void 0?null:e}function dt(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function ft(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(!dt(e)||!dt(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 pt(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(!pt(e[i],t[i],n-1,r))return!1;return!0}if(!dt(e)||!dt(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)||!pt(e[a],t[a],n-1,r))return!1;return!0}function mt(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 ht(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=G(t)?U(t):t,f=Object.keys(d),p=r?Object.keys(n):[];for(let e of f)i(e)&&(l[e]=J(d[e],c,{cache:a,maxDepth:o,_budget:u}));for(let e of p)i(e)&&(l[e]=J(n[e].value,c,{cache:a,maxDepth:o,_budget:u}));return l}function gt(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:ee,needsFullSnapshot:C,emitDebug:w,runDiffUpdate:T}=e;if(b.size>u){C.value=!0;let e=b.size;b.clear(),r.clear(),w({mode:`diff`,reason:`maxPatchKeys`,pendingPatchKeys:e,payloadKeys:0}),T(`maxPatchKeys`);return}let E=new WeakMap,D=new Map,O=Object.create(null),k=Array.from(b.entries());if(Number.isFinite(g)&&g>0){let e=new Map;for(let[t]of k){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 A=k.filter(([e])=>{for(let t of x)if(e===t||e.startsWith(`${t}.`))return!1;return!0}),j=new Map(A);b.clear();let te=e=>{let n=e.split(`.`).filter(Boolean),r=t;for(let e of n){if(r==null)return r;r=r[e]}return r},M=e=>{if(D.has(e))return D.get(e);let t=ut(J(te(e),E,{cache:y,maxDepth:_,maxKeys:v}));return D.set(e,t),t};if(x.size){for(let e of x)l(e)&&(O[e]=M(e),j.set(e,{kind:`property`,op:`set`}));x.clear()}for(let[e,t]of A){if((t.kind===`array`?`set`:t.op)===`delete`){O[e]=null;continue}O[e]=M(e)}let N=0;if(i&&r.size){let e=Object.create(null),t=Array.from(r);r.clear(),N=t.length;for(let r of t){if(!l(r))continue;let t=J(n[r].value,E,{cache:y,maxDepth:_,maxKeys:v}),i=ee[r];(a===`deep`?pt(i,t,o,{keys:s}):a===`shallow`?ft(i,t):Object.is(i,t))||(e[r]=ut(t),ee[r]=t)}Object.assign(O,e)}let P=ot(O),F=0;if(f){let e=lt({input:P,entryMap:j,getPlainByPath:M,mergeSiblingThreshold:f,mergeSiblingSkipArray:h,mergeSiblingMaxParentBytes:m,mergeSiblingMaxInflationRatio:p});F=e.merged,P=ot(e.out)}let I=ct(P,d),L=I.fallback;if(w({mode:L?`diff`:`patch`,reason:L?`maxPayloadBytes`:`patch`,pendingPatchKeys:A.length,payloadKeys:Object.keys(P).length,mergedSiblingParents:F||void 0,computedDirtyKeys:N||void 0,estimatedBytes:I.estimatedBytes,bytes:I.bytes}),L){C.value=!0,b.clear(),r.clear(),T(`maxPayloadBytes`);return}if(Object.keys(P).length){for(let[e,t]of Object.entries(P)){let n=j.get(e);n?mt(S,e,t,n.kind===`array`?`set`:n.op):mt(S,e,t,`set`)}if(typeof c.setData==`function`){let e=c.setData(P);e&&typeof e.then==`function`&&e.catch(()=>{})}w({mode:`patch`,reason:`patch`,pendingPatchKeys:A.length,payloadKeys:Object.keys(P).length})}}function _t(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:ee,isMounted:C}=e,w=new WeakMap,T={},E=Object.create(null),D={value:a===`patch`},O=new Map,k=new Set,A=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{}},j=()=>ht({state:t,computedRefs:n,includeComputed:i,shouldIncludeKey:u,plainCache:w,toPlainMaxDepth:v,toPlainMaxKeys:y}),te=(e=`diff`)=>{let t=j(),o=at(T,t);if(T=t,D.value=!1,O.clear(),a===`patch`&&i){E=Object.create(null);for(let e of Object.keys(n))u(e)&&(E[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(()=>{})}A({mode:`diff`,reason:e,pendingPatchKeys:0,payloadKeys:Object.keys(o).length})}};return{job:e=>{C()&&(ee(),a===`patch`&&!D.value?gt({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:w,pendingPatches:O,fallbackTopKeys:k,latestSnapshot:T,latestComputedSnapshot:E,needsFullSnapshot:D,emitDebug:A,runDiffUpdate:te}):te(D.value?`needsFullSnapshot`:`diff`))},mutationRecorder:(e,t)=>{if(!C()||e.root!==t)return;if(!e.path){if(Array.isArray(e.fallbackTopKeys)&&e.fallbackTopKeys.length)for(let t of e.fallbackTopKeys)k.add(t);else D.value=!0;return}let n=e.path.split(`.`,1)[0];u(n)&&O.set(e.path,{kind:e.kind,op:e.op})},snapshot:()=>a===`patch`?j():{...T},getLatestSnapshot:()=>T}}function vt(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 yt(e){return e?e.charAt(0).toUpperCase()+e.slice(1):``}function bt(e){return e?e.split(`.`).map(e=>e.trim()).filter(Boolean):[]}function xt(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 St(e,t,n,r,i){if(!r.length)return;let[a,...o]=r;if(!o.length){if(t[a])qe(n,a,i);else{let t=e[a];K(t)?t.value=i:e[a]=i}return}if(t[a]){qe(n,a,i);return}(e[a]==null||typeof e[a]!=`object`)&&(e[a]={}),xt(e[a],o,i)}function Ct(e,t){return t.reduce((e,t)=>e==null?e:e[t],e)}function wt(e){return Je(e)}function Tt(e,t,n,r){return(i,a)=>{let o=bt(i);if(!o.length)throw Error(`bindModel 需要非空路径`);let s=()=>Ct(e,o),c=e=>{St(t,n,r,o,e)},l={event:`input`,valueProp:`value`,parser:wt,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${yt(t.event)}`,r=e=>{c(t.parser(e))};return{[t.valueProp]:t.formatter(s()),[n]:r}}}}}const Et=`__wevuDefaultsScope`;let Dt={};function Ot(e){if(!(!e||typeof e!=`object`||Array.isArray(e)))return e}function kt(e,t){if(!e)return t;if(!t)return e;let n={...e,...t},r=Ot(e.setData),i=Ot(t.setData);(r||i)&&(n.setData={...r??{},...i??{}});let a=Ot(e.options),o=Ot(t.options);return(a||o)&&(n.options={...a??{},...o??{}}),n}function At(e,t){return kt(e,t)}function jt(e,t){return{app:kt(e.app,t.app),component:kt(e.component,t.component)}}function Mt(e){Dt=jt(Dt,e)}function Nt(){Dt={}}function Pt(e){return At(Dt.app,e)}function Ft(e){return At(Dt.component,e)}let It,Lt;function Rt(){return It}function zt(e){It=e}function Bt(){return Lt}function Vt(e){Lt=e}function Y(e){if(!It)throw Error(`${e}() 必须在 setup() 的同步阶段调用`);return It}function Ht(e){return e.__wevuHooks||=Object.create(null),e.__wevuHooks}function X(e,t,n,{single:r=!1}={}){let i=Ht(e);r?i[t]=n:(i[t]??(i[t]=[])).push(n)}function Z(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 Ut(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 Wt(e){X(Y(`onLaunch`),`onLaunch`,e)}function Gt(e){X(Y(`onPageNotFound`),`onPageNotFound`,e)}function Kt(e){X(Y(`onUnhandledRejection`),`onUnhandledRejection`,e)}function qt(e){X(Y(`onThemeChange`),`onThemeChange`,e)}function Jt(e){X(Y(`onShow`),`onShow`,e)}function Yt(e){X(Y(`onLoad`),`onLoad`,e)}function Xt(e){X(Y(`onHide`),`onHide`,e)}function Zt(e){X(Y(`onUnload`),`onUnload`,e)}function Qt(e){X(Y(`onReady`),`onReady`,e)}function $t(e){X(Y(`onPullDownRefresh`),`onPullDownRefresh`,e)}function en(e){X(Y(`onReachBottom`),`onReachBottom`,e)}function tn(e){X(Y(`onPageScroll`),`onPageScroll`,e)}function nn(e){X(Y(`onRouteDone`),`onRouteDone`,e)}function rn(e){X(Y(`onTabItemTap`),`onTabItemTap`,e)}function an(e){X(Y(`onResize`),`onResize`,e)}function on(e){X(Y(`onMoved`),`onMoved`,e)}function sn(e){X(Y(`onError`),`onError`,e)}function cn(e){X(Y(`onSaveExitState`),`onSaveExitState`,e,{single:!0})}function ln(e){X(Y(`onShareAppMessage`),`onShareAppMessage`,e,{single:!0})}function un(e){X(Y(`onShareTimeline`),`onShareTimeline`,e,{single:!0})}function dn(e){X(Y(`onAddToFavorites`),`onAddToFavorites`,e,{single:!0})}function fn(e){X(Y(`onMounted`),`onReady`,e)}function pn(e){X(Y(`onUpdated`),`__wevuOnUpdated`,e)}function mn(e){Y(`onBeforeUnmount`),e()}function hn(e){X(Y(`onUnmounted`),`onUnload`,e)}function gn(e){Y(`onBeforeMount`),e()}function _n(e){X(Y(`onBeforeUpdate`),`__wevuOnBeforeUpdate`,e)}function vn(e){let t=Y(`onErrorCaptured`);X(t,`onError`,n=>e(n,t,``))}function yn(e){X(Y(`onActivated`),`onShow`,e)}function bn(e){X(Y(`onDeactivated`),`onHide`,e)}function xn(e){Y(`onServerPrefetch`)}function Sn(e,t){Z(e,t===`before`?`__wevuOnBeforeUpdate`:`__wevuOnUpdated`)}function Cn(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`)}function wn(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(Cn(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 Q=new Map;let Tn=0;function En(){return Tn+=1,`wv${Tn}`}function Dn(e,t,n){let r=Q.get(e)??{snapshot:{},proxy:n,subscribers:new Set};if(r.snapshot=t,r.proxy=n,Q.set(e,r),r.subscribers.size)for(let e of r.subscribers)try{e(t,n)}catch{}}function On(e){Q.delete(e)}function kn(e,t){let n=Q.get(e)??{snapshot:{},proxy:void 0,subscribers:new Set};return n.subscribers.add(t),Q.set(e,n),()=>{let n=Q.get(e);n&&n.subscribers.delete(t)}}function An(e){return Q.get(e)?.proxy}function jn(e){return Q.get(e)?.snapshot}function Mn(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;Dn(n,r,t.proxy)}function Nn(e){return e.kind===`component`}function Pn(e){return new Proxy(e,{get(e,t,n){let r=Reflect.get(e,t,n);return K(r)?r.value:r},set(e,t,n,r){let i=e[t];return K(i)&&!K(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}})}function Fn(e,t){let n=e.__wevuExposeProxy;if(n&&e.__wevuExposeRaw===t)return n;let r=Pn(t);try{Object.defineProperty(e,`__wevuExposeProxy`,{value:r,configurable:!0,enumerable:!1,writable:!1}),Object.defineProperty(e,`__wevuExposeRaw`,{value:t,configurable:!0,enumerable:!1,writable:!1})}catch{e.__wevuExposeProxy=r,e.__wevuExposeRaw=t}return r}function In(e,t){if(!t||typeof t!=`object`)return e;let n=t;return q(new Proxy(e,{get(e,t,r){return Reflect.has(e,t)?Reflect.get(e,t,r):n[t]},set(e,t,r,i){return t in n?(n[t]=r,!0):Reflect.set(e,t,r,i)},has(e,t){return Reflect.has(e,t)||t in n},ownKeys(e){return Array.from(new Set([...Reflect.ownKeys(e),...Reflect.ownKeys(n)]))},getOwnPropertyDescriptor(e,t){return Reflect.has(e,t)?Object.getOwnPropertyDescriptor(e,t):Object.getOwnPropertyDescriptor(n,t)}}))}function Ln(e){if(!e||typeof e!=`object`)return e??null;let t=e,n=t.__wevuExposed;return n&&typeof n==`object`?Fn(t,n):t.__wevu?.proxy?t.__wevu.proxy:e}function Rn(e){return e.__wevuTemplateRefMap}function zn(e,t,n){if(!e)return;let r=e.get(t);r&&(r.value=n)}function Bn(e,t){let n=e.__wevu?.proxy??e,r;if(t.get)try{r=t.get.call(n)}catch{r=void 0}return r==null&&t.name&&(r=t.name),typeof r==`function`?{type:`function`,fn:r}:K(r)?{type:`ref`,ref:r}:typeof r==`string`&&r?{type:`name`,name:r}:t.name?{type:`name`,name:t.name}:{type:`skip`}}function Vn(e){let t=e.__wevu?.state??e,n=t.$refs;if(n&&typeof n==`object`)return n;let r=q(Object.create(null));return Object.defineProperty(t,`$refs`,{value:r,configurable:!0,enumerable:!1,writable:!1}),r}function Hn(e){let t=e;return t&&typeof t.createSelectorQuery==`function`?t.createSelectorQuery():typeof wx<`u`&&typeof wx.createSelectorQuery==`function`?wx.createSelectorQuery().in(t):null}function Un(e,t,n,r,i){let a=Hn(e);return a?(r(n.multiple?a.selectAll(t):a.select(t)),new Promise(e=>{a.exec(t=>{let r=Array.isArray(t)?t[0]:null;n.index!=null&&Array.isArray(r)&&(r=r[n.index]??null),i&&i(r??null),e(r??null)})})):(i&&i(null),Promise.resolve(null))}function Wn(e,t,n){return q({selector:t,boundingClientRect:r=>Un(e,t,n,e=>e.boundingClientRect(),r),scrollOffset:r=>Un(e,t,n,e=>e.scrollOffset(),r),fields:(r,i)=>Un(e,t,n,e=>e.fields(r),i),node:r=>Un(e,t,n,e=>e.node(),r)})}function Gn(e,t){let n=e;if(!n)return t.inFor?q([]):null;if(t.inFor){if(typeof n.selectAllComponents==`function`){let r=n.selectAllComponents(t.selector);return q((Array.isArray(r)?r:[]).map((n,r)=>In(Wn(e,t.selector,{multiple:!0,index:r}),Ln(n))))}return q([])}let r=Wn(e,t.selector,{multiple:!1});return typeof n.selectComponent==`function`?In(r,Ln(n.selectComponent(t.selector))):r}function Kn(e,t,n){return t.inFor?q((Array.isArray(n)?n:[]).map((n,r)=>Wn(e,t.selector,{multiple:!0,index:r}))):n?Wn(e,t.selector,{multiple:!1}):null}function qn(e,t){let n=e.__wevuTemplateRefs;if(!n||!n.length){t?.();return}if(!e.__wevuReadyCalled){t?.();return}if(!e.__wevu){t?.();return}let r=Rn(e),i=n.filter(e=>!Nn(e)),a=n.filter(e=>Nn(e)).map(t=>({binding:t,value:Gn(e,t)})),o=n=>{let i=Vn(e),a=new Map,o=new Set,s=e.__wevu?.proxy??e;n.forEach(t=>{let n=t.binding,r=t.value,i=Bn(e,n);if(i.type===`function`){n.inFor&&Array.isArray(r)?r.length?r.forEach(e=>i.fn.call(s,e)):i.fn.call(s,null):i.fn.call(s,r??null);return}if(i.type===`ref`){i.ref.value=r;return}if(i.type===`name`){o.add(i.name);let e=a.get(i.name)??{values:[],count:0,hasFor:!1};e.count+=1,e.hasFor=e.hasFor||n.inFor,n.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),a.set(i.name,e)}});for(let[e,t]of a){let n;n=t.values.length?t.hasFor||t.values.length>1||t.count>1?q(t.values):t.values[0]:t.hasFor?q([]):null,i[e]=n,zn(r,e,n)}for(let e of Object.keys(i))o.has(e)||delete i[e];t?.()};if(!i.length){o(a);return}let s=Hn(e);if(!s){o(a);return}let c=[];for(let e of i)(e.inFor?s.selectAll(e.selector):s.select(e.selector)).boundingClientRect(),c.push({binding:e});s.exec(t=>{let n=c.map((n,r)=>{let i=Array.isArray(t)?t[r]:null;return{binding:n.binding,value:Kn(e,n.binding,i)}});o([...a,...n])})}function Jn(e,t){let n=e.__wevuTemplateRefs;if(!n||!n.length){t?.();return}if(t){let n=e.__wevuTemplateRefsCallbacks??[];n.push(t),e.__wevuTemplateRefsCallbacks||Object.defineProperty(e,`__wevuTemplateRefsCallbacks`,{value:n,configurable:!0,enumerable:!1,writable:!0})}e.__wevuTemplateRefsPending||(e.__wevuTemplateRefsPending=!0,o(()=>{e.__wevuTemplateRefsPending=!1,qn(e,()=>{let t=e.__wevuTemplateRefsCallbacks;!t||!t.length||t.splice(0).forEach(e=>{try{e()}catch{}})})}))}function Yn(e){let t=e.__wevuTemplateRefs;if(!t||!t.length)return;let n=Vn(e),r=e.__wevu?.proxy??e,i=new Set,a=Rn(e);for(let o of t){let t=Bn(e,o),s=o.inFor?q([]):null;if(t.type===`function`){t.fn.call(r,null);continue}if(t.type===`ref`){t.ref.value=s;continue}t.type===`name`&&(i.add(t.name),n[t.name]=s,zn(a,t.name,s))}for(let e of Object.keys(n))i.has(e)||delete n[e]}function Xn(e,t,n){if(typeof e!=`function`)return;let r=n?.runtime??{methods:Object.create(null),state:{},proxy:{},watch:()=>()=>{},bindModel:()=>{}};return n&&(n.runtime=r),e(t,{...n??{},runtime:r})}function Zn(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=Zn(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 Qn(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 $n(e,t,n){let r=[],i=e.proxy;for(let[a,o]of Object.entries(t)){let t=Zn(o,e,n);if(!t)continue;let s=Qn(i,a),c=e.watch(s,t.handler,t.options);r.push(c)}return r}function er(e,t,n,r,i){if(e.__wevu)return e.__wevu;let a=En(),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;Dn(a,t,s.proxy)},l={...o,setData(t){let n=o.setData(t);return c(),Jn(e),n}},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,Mn(e,g,a),n){let t=$n(g,n,e);t.length&&(e.__wevuWatchStops=t)}if(r){let t=_e({...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)};zt(e),Vt(n);try{let e=Xn(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{Vt(void 0),zt(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 tr(e){let t=e.__wevu?.adapter;t&&typeof t.__wevu_enableSetData==`function`&&t.__wevu_enableSetData()}function nr(e){let t=e.__wevu,n=e.__wvOwnerId;n&&On(n),Yn(e),t&&e.__wevuHooks&&Z(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 rr(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 wn(this.__wevu?.proxy??this,t,e)};let s=o.onLaunch;o.onLaunch=function(...t){er(this,e,n,r),Z(this,`onLaunch`,t),typeof s==`function`&&s.apply(this,t)};let c=o.onShow;o.onShow=function(...e){Z(this,`onShow`,e),typeof c==`function`&&c.apply(this,e)};let l=o.onHide;o.onHide=function(...e){Z(this,`onHide`,e),typeof l==`function`&&l.apply(this,e)};let u=o.onError;o.onError=function(...e){Z(this,`onError`,e),typeof u==`function`&&u.apply(this,e)};let d=o.onPageNotFound;o.onPageNotFound=function(...e){Z(this,`onPageNotFound`,e),typeof d==`function`&&d.apply(this,e)};let f=o.onUnhandledRejection;o.onUnhandledRejection=function(...e){Z(this,`onUnhandledRejection`,e),typeof f==`function`&&f.apply(this,e)};let p=o.onThemeChange;o.onThemeChange=function(...e){Z(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 ir(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 ar(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:ee,effectiveOnTabItemTap:C,effectiveOnResize:w,effectiveOnShareAppMessage:T,effectiveOnShareTimeline:E,effectiveOnAddToFavorites:D,hasHook:O}=e,k={onLoad(...e){if(er(this,t,n,r),tr(this),Z(this,`onLoad`,e),typeof i==`function`)return i.apply(this,e)},onUnload(...e){if(nr(this),typeof a==`function`)return a.apply(this,e)},onShow(...e){if(Z(this,`onShow`,e),typeof o==`function`)return o.apply(this,e)},onHide(...e){if(Z(this,`onHide`,e),typeof s==`function`)return s.apply(this,e)},onReady(...e){if(!this.__wevuReadyCalled){this.__wevuReadyCalled=!0,Jn(this,()=>{Z(this,`onReady`,e),typeof c==`function`&&c.apply(this,e)});return}if(typeof c==`function`)return c.apply(this,e)}};return l&&(k.onSaveExitState=function(...e){let t=Ut(this,`onSaveExitState`,e);return t===void 0?y.apply(this,e):t}),u&&(k.onPullDownRefresh=function(...e){if(Z(this,`onPullDownRefresh`,e),!O(this,`onPullDownRefresh`))return b.apply(this,e)}),d&&(k.onReachBottom=function(...e){if(Z(this,`onReachBottom`,e),!O(this,`onReachBottom`))return x.apply(this,e)}),f&&(k.onPageScroll=function(...e){if(Z(this,`onPageScroll`,e),!O(this,`onPageScroll`))return S.apply(this,e)}),p&&(k.onRouteDone=function(...e){if(Z(this,`onRouteDone`,e),!O(this,`onRouteDone`))return ee.apply(this,e)}),m&&(k.onTabItemTap=function(...e){if(Z(this,`onTabItemTap`,e),!O(this,`onTabItemTap`))return C.apply(this,e)}),h&&(k.onResize=function(...e){if(Z(this,`onResize`,e),!O(this,`onResize`))return w.apply(this,e)}),g&&(k.onShareAppMessage=function(...e){let t=Ut(this,`onShareAppMessage`,e);return t===void 0?T.apply(this,e):t}),_&&(k.onShareTimeline=function(...e){let t=Ut(this,`onShareTimeline`,e);return t===void 0?E.apply(this,e):t}),v&&(k.onAddToFavorites=function(...e){let t=Ut(this,`onAddToFavorites`,e);return t===void 0?D.apply(this,e):t}),k}function or(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 wn(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=Je(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 sr(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;Dn(n,r,t.proxy)}function cr(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{}sr(e)},i=(e,t,n)=>{let r=e.__wevuProps;if(!(!r||typeof r!=`object`)){try{r[t]=n}catch{}sr(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 lr(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,ee=l.onShareTimeline,C=l.onAddToFavorites,w=l.features??{},T={...l},E=T.__wevuTemplateRefs;delete T.__wevuTemplateRefs;let D=T.observers,O=T.created;delete T.features,delete T.created,delete T.onLoad,delete T.onUnload,delete T.onShow,delete T.onHide,delete T.onReady;let{enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:te,enableOnTabItemTap:M,enableOnResize:N,enableOnShareAppMessage:P,enableOnShareTimeline:F,enableOnAddToFavorites:I,enableOnSaveExitState:L,effectiveOnSaveExitState:ne,effectiveOnPullDownRefresh:re,effectiveOnReachBottom:R,effectiveOnPageScroll:z,effectiveOnRouteDone:ie,effectiveOnTabItemTap:ae,effectiveOnResize:oe,effectiveOnShareAppMessage:se,effectiveOnShareTimeline:ce,effectiveOnAddToFavorites:le}=ir({features:w,userOnSaveExitState:h,userOnPullDownRefresh:g,userOnReachBottom:_,userOnPageScroll:v,userOnRouteDone:y,userOnTabItemTap:b,userOnResize:x,userOnShareAppMessage:S,userOnShareTimeline:ee,userOnAddToFavorites:C}),B=(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=T.export;T.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 V={multipleSlots:c.multipleSlots??!0,...c},{syncWevuPropsFromInstance:H,finalObservers:ue}=cr({restOptions:T,userObservers:D}),{finalMethods:U}=or({userMethods:a,runtimeMethods:t}),de=ar({runtimeApp:e,watch:n,setup:r,userOnLoad:u,userOnUnload:d,userOnShow:f,userOnHide:p,userOnReady:m,enableOnSaveExitState:L,enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:te,enableOnTabItemTap:M,enableOnResize:N,enableOnShareAppMessage:P,enableOnShareTimeline:F,enableOnAddToFavorites:I,effectiveOnSaveExitState:ne,effectiveOnPullDownRefresh:re,effectiveOnReachBottom:R,effectiveOnPageScroll:z,effectiveOnRouteDone:ie,effectiveOnTabItemTap:ae,effectiveOnResize:oe,effectiveOnShareAppMessage:se,effectiveOnShareTimeline:ce,effectiveOnAddToFavorites:le,hasHook:B});Component({...T,...de,observers:ue,lifetimes:{...o,created:function(...t){Array.isArray(E)&&E.length&&Object.defineProperty(this,`__wevuTemplateRefs`,{value:E,configurable:!0,enumerable:!1,writable:!1}),er(this,e,n,r,{deferSetData:!0}),H(this),typeof O==`function`&&O.apply(this,t),typeof o.created==`function`&&o.created.apply(this,t)},moved:function(...e){Z(this,`onMoved`,e),typeof o.moved==`function`&&o.moved.apply(this,e)},attached:function(...t){Array.isArray(E)&&E.length&&!this.__wevuTemplateRefs&&Object.defineProperty(this,`__wevuTemplateRefs`,{value:E,configurable:!0,enumerable:!1,writable:!1}),er(this,e,n,r),H(this),tr(this),typeof o.attached==`function`&&o.attached.apply(this,t)},ready:function(...e){if(!this.__wevuReadyCalled){this.__wevuReadyCalled=!0,H(this),Jn(this,()=>{Z(this,`onReady`,e),typeof o.ready==`function`&&o.ready.apply(this,e)});return}typeof o.ready==`function`&&o.ready.apply(this,e)},detached:function(...e){Yn(this),nr(this),typeof o.detached==`function`&&o.detached.apply(this,e)},error:function(...e){Z(this,`onError`,e),typeof o.error==`function`&&o.error.apply(this,e)}},pageLifetimes:{...s,show:function(...e){Z(this,`onShow`,e),typeof s.show==`function`&&s.show.apply(this,e)},hide:function(...e){Z(this,`onHide`,e),typeof s.hide==`function`&&s.hide.apply(this,e)},resize:function(...e){Z(this,`onResize`,e),typeof s.resize==`function`&&s.resize.apply(this,e)}},methods:U,options:V})}function ur(e){let{[Et]:t,data:n,computed:r,methods:i,setData:o,watch:s,setup:c,...l}=e[Et]===`component`?e:Pt(e),u=i??{},d=r??{},f=new Set,p={globalProperties:{}},m={mount(e){let t=Se((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:ee,prelinkMaxDepth:C,prelinkMaxKeys:T,debug:E,debugWhen:D,debugSampleRate:O,elevateTopKeyThreshold:k,toPlainMaxDepth:A,toPlainMaxKeys:M,shouldIncludeKey:N}=vt(o),{boundMethods:P,computedRefs:F,computedSetters:I,dirtyComputedKeys:L,computedProxy:ne,publicInstance:re}=Xe({state:t,computedDefs:r,methodDefs:i,appConfig:p,includeComputed:l,setDataStrategy:f}),R=e??{setData:()=>{}},z=U(t),ie,ae=_t({state:t,computedRefs:F,dirtyComputedKeys:L,includeComputed:l,setDataStrategy:f,computedCompare:x,computedCompareMaxDepth:S,computedCompareMaxKeys:ee,currentAdapter:R,shouldIncludeKey:N,maxPatchKeys:m,maxPayloadBytes:h,mergeSiblingThreshold:g,mergeSiblingMaxInflationRatio:v,mergeSiblingMaxParentBytes:y,mergeSiblingSkipArray:b,elevateTopKeyThreshold:k,toPlainMaxDepth:A,toPlainMaxKeys:M,debug:E,debugWhen:D,debugSampleRate:O,runTracker:()=>ie?.(),isMounted:()=>s}),oe=()=>ae.job(z),se=e=>ae.mutationRecorder(e,z);ie=w(()=>{W(t),Object.keys(t).forEach(e=>{let n=t[e];K(n)?n.value:G(n)&&W(n)})},{lazy:!0,scheduler:()=>a(oe)}),oe(),c.push(()=>_(ie)),f===`patch`&&(me(t,{shouldIncludeTopKey:N,maxDepth:C,maxKeys:T}),j(se),c.push(()=>te(se)),c.push(()=>he(t)));function ce(e,t,n){let r=Ge(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 re},get methods(){return P},get computed(){return ne},get adapter(){return R},bindModel:Tt(re,t,F,I),watch:ce,snapshot:()=>ae.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),rr(m,i??{},s,c,l))}return m}function dr(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 fr(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`)}function pr(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(fr(t))}catch{n=[]}}return Array.isArray(n)||(n=[]),n.map(t=>t===`$event`?e:t)}function mr(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 hr(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=mr(n),a=mr(r),o={...i,...a};typeof e?.setData==`function`&&e.setData({__wvSlotPropsData:o})}function gr(e){let t={properties:{__wvOwnerId:{type:String,value:``},__wvSlotProps:{type:null,value:null,observer(e){hr(this,{__wvSlotProps:e})}},__wvSlotScope:{type:null,value:null,observer(e){hr(this,{__wvSlotScope:e})}}},data:()=>({__wvOwner:{},__wvSlotPropsData:{}}),lifetimes:{attached(){let e=this.properties?.__wvOwnerId??``;if(hr(this),!e)return;let t=(e,t)=>{this.__wvOwnerProxy=t,typeof this.setData==`function`&&this.setData({__wvOwner:e||{}})};this.__wvOwnerUnsub=kn(e,t);let n=jn(e);n&&t(n,An(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=pr(e);return r.apply(n,i)}}};return e?.computed&&Object.keys(e.computed).length>0&&(t.computed=e.computed),t}function _r(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function vr(e){return typeof e!=`object`||!e||K(e)||G(e)||Array.isArray(e)?!0:_r(e)}function yr(e,t,n){let r=e?.methods??Object.create(null),i=e?.state??Object.create(null),a=G(i)?U(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||!vr(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 br;function xr(){let e=typeof globalThis<`u`?globalThis:void 0;if(!e)return;let t=e;!t.__weapp_vite_createScopedSlotComponent&&br&&(t.__weapp_vite_createScopedSlotComponent=br)}function Sr(e){xr();let{__typeProps:t,data:n,computed:r,methods:i,setData:a,watch:o,setup:s,props:c,...l}=Ft(e),u=ur({data:n,computed:r,methods:i,setData:a,[Et]:`component`}),d=(e,t)=>{let n=Xn(s,e,t);return n&&t&&yr(t.runtime,t.instance,n),n},f=dr(l,c),p={data:n,computed:r,methods:i,setData:a,watch:o,setup:d,mpOptions:f};return lr(u,i??{},o,d,f),{__wevu_runtime:u,__wevu_options:p}}function Cr(e){xr();let{properties:t,props:n,...r}=e;Sr(dr(r,n,t))}function wr(e){Cr(gr(e))}br=wr,xr();const Tr=Symbol(`wevu.provideScope`),Er=new Map;function Dr(e,t){let n=Rt();if(n){let r=n[Tr];r||(r=new Map,n[Tr]=r),r.set(e,t)}else Er.set(e,t)}function Or(e,t){let n=Rt();if(n){let t=n;for(;t;){let n=t[Tr];if(n&&n.has(e))return n.get(e);t=null}}if(Er.has(e))return Er.get(e);if(arguments.length>=2)return t;throw Error(`wevu.inject:未找到对应 key 的值`)}function kr(e,t){Er.set(e,t)}function Ar(e,t){if(Er.has(e))return Er.get(e);if(arguments.length>=2)return t;throw Error(`injectGlobal():未找到对应 key 的 provider:${String(e)}`)}const jr=/\B([A-Z])/g;function Mr(e){return e?e.startsWith(`--`)?e:e.replace(jr,`-$1`).toLowerCase():``}function Nr(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 Pr(e){let t=``;for(let n of Object.keys(e)){let r=e[n];if(r==null)continue;let i=Mr(n);if(Array.isArray(r))for(let e of r)e!=null&&(t=Nr(t,`${i}:${e}`));else t=Nr(t,`${i}:${r}`)}return t}function Fr(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e)){let t=``;for(let n of e){let e=Fr(n);e&&(t=Nr(t,e))}return t}return typeof e==`object`?Pr(e):``}function Ir(e){let t=``;if(!e)return t;if(typeof e==`string`)return e;if(Array.isArray(e)){for(let n of e){let e=Ir(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 Lr(){let e=Bt();if(!e)throw Error(`useAttrs() 必须在 setup() 的同步阶段调用`);return e.attrs??{}}function Rr(){let e=Bt();if(!e)throw Error(`useSlots() 必须在 setup() 的同步阶段调用`);return e.slots??Object.create(null)}function zr(e){let t=e.__wevuTemplateRefMap;if(t)return t;let n=new Map;try{Object.defineProperty(e,`__wevuTemplateRefMap`,{value:n,configurable:!0,enumerable:!1,writable:!1})}catch{e.__wevuTemplateRefMap=n}return n}function Br(e){let t=Rt();if(!t)throw Error(`useTemplateRef() 必须在 setup() 的同步阶段调用`);let n=typeof e==`string`?e.trim():``;if(!n)throw Error(`useTemplateRef() 需要传入有效的模板 ref 名称`);let r=zr(t),i=r.get(n);if(i)return i;let a=Ie(null);return r.set(n,a),a}function Vr(e,t){let n=Bt();if(!n)throw Error(`useModel() 必须在 setup() 的同步阶段调用`);let r=n.emit,i=`update:${t}`;return Ne({get:()=>e?.[t],set:e=>{r?.(i,e)}})}function Hr(e){let t=Rt();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${yt({...e,...n}?.event??`input`)}`;return r.model(t,n)[i]},r}function Ur(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 Wr(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 Gr(e){return typeof e==`object`&&!!e}function Kr(e){if(!Gr(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function qr(e,t){for(let n in t)e[n]=t[n]}function $(e){if(Array.isArray(e))return e.map(e=>$(e));if(Kr(e)){let t={};for(let n in e)t[n]=$(e[n]);return t}return e}function Jr(e,t){if(Array.isArray(e)&&Array.isArray(t)){e.length=0,t.forEach((t,n)=>{e[n]=$(t)});return}if(Gr(t)){for(let n in e)n in t||delete e[n];for(let n in t){let r=t[n],i=e[n];if(Array.isArray(r)&&Array.isArray(i)){Jr(i,r);continue}if(Kr(r)&&Kr(i)){Jr(i,r);continue}e[n]=$(r)}}}function Yr(e,t,n,r){let i={$id:e};Object.defineProperty(i,`$state`,{get(){return t},set(e){t&&Gr(e)&&(qr(t,e),n(`patch object`))}}),i.$patch=e=>{if(!t){typeof e==`function`?(e(i),n(`patch function`)):(qr(i,e),n(`patch object`));return}typeof e==`function`?(e(t),n(`patch function`)):(qr(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 Xr(){let e={_stores:new Map,_plugins:[],install(e){},use(t){return typeof t==`function`&&e._plugins.push(t),e}};return Xr._instance=e,e}const Zr=Object.prototype.hasOwnProperty;function Qr(e){return K(e)&&Zr.call(e,`dep`)}function $r(e){return G(e)?$(U(e)):Qr(e)?$(e.value):$(e)}function ei(e,t){let n,r=!1,i=Xr._instance;return function(){if(r&&n)return n;if(r=!0,typeof t==`function`){let r=t(),a=()=>{},o=new Map;Object.keys(r).forEach(e=>{let t=r[e];typeof t==`function`||e.startsWith(`$`)||K(t)&&!Qr(t)||o.set(e,$r(t))});let s=Yr(e,void 0,e=>a(e),()=>{o.forEach((e,t)=>{let r=n[t];if(Qr(r)){r.value=$(e);return}if(G(r)){Jr(r,e);return}K(r)||(n[t]=$(e))}),a(`patch object`)}),c=!1,l=s.api.$patch;if(s.api.$patch=e=>{c=!0;try{l(e)}finally{c=!1}},typeof s.api.$reset==`function`){let e=s.api.$reset;s.api.$reset=()=>{c=!0;try{e()}finally{c=!1}}}a=t=>{s.subs.forEach(r=>{try{r({type:t,storeId:e},n)}catch{}})},n=Object.assign({},r);for(let e of Object.getOwnPropertyNames(s.api)){let t=Object.getOwnPropertyDescriptor(s.api,e);t&&(e===`$state`?Object.defineProperty(n,e,{enumerable:t.enumerable,configurable:t.configurable,get(){return s.api.$state},set(e){c=!0;try{s.api.$state=e}finally{c=!1}}}):Object.defineProperty(n,e,t))}let u=[];if(Object.keys(r).forEach(e=>{let t=r[e];if(typeof t==`function`&&!e.startsWith(`$`)){n[e]=Wr(n,e,t,s.actionSubs);return}if(Qr(t)){u.push(t);return}if(G(t)){u.push(t);return}if(!K(t)&&!e.startsWith(`$`)){let r=t;Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get(){return r},set(e){r=e,c||a(`direct`)}})}}),u.length>0){let e=!1;w(()=>{if(u.forEach(e=>{Qr(e)?e.value:W(e)}),!e){e=!0;return}c||a(`direct`)})}let d=i?._plugins??[];for(let e of d)try{e({store:n})}catch{}return n}let a=t,o=a.state?a.state():{},s=Se(o),c=$(U(o)),l=()=>{},u=Yr(e,s,e=>l(e),()=>{Jr(s,c),l(`patch object`)}),d=!1,f=u.api.$patch;if(u.api.$patch=e=>{d=!0;try{f(e)}finally{d=!1}},typeof u.api.$reset==`function`){let e=u.api.$reset;u.api.$reset=()=>{d=!0;try{e()}finally{d=!1}}}l=t=>{u.subs.forEach(n=>{try{n({type:t,storeId:e},s)}catch{}})};let p={};for(let e of Object.getOwnPropertyNames(u.api)){let t=Object.getOwnPropertyDescriptor(u.api,e);t&&(e===`$state`?Object.defineProperty(p,e,{enumerable:t.enumerable,configurable:t.configurable,get(){return u.api.$state},set(e){d=!0;try{u.api.$state=e}finally{d=!1}}}):Object.defineProperty(p,e,t))}let m=a.getters??{},h={};Object.keys(m).forEach(e=>{let t=m[e];if(typeof t==`function`){let n=Pe(()=>t.call(p,s));h[e]=n,Object.defineProperty(p,e,{enumerable:!0,configurable:!0,get(){return n.value}})}});let g=a.actions??{};Object.keys(g).forEach(e=>{let t=g[e];typeof t==`function`&&(p[e]=Wr(p,e,(...e)=>t.apply(p,e),u.actionSubs))}),Object.keys(s).forEach(e=>{Object.defineProperty(p,e,{enumerable:!0,configurable:!0,get(){return s[e]},set(t){s[e]=t}})});let _=!1;w(()=>{if(W(s),!_){_=!0;return}d||l(`direct`)}),n=p;let v=i?._plugins??[];for(let e of v)try{e({store:n})}catch{}return n}}function ti(e){let t={};for(let n in e){let r=e[n];if(typeof r==`function`){t[n]=r;continue}K(r)?t[n]=r:t[n]=Pe({get:()=>e[n],set:t=>{e[n]=t}})}return t}export{j as addMutationRecorder,h as batch,Z as callHookList,Ut as callHookReturn,Sn as callUpdateHooks,Pe as computed,ur as createApp,Xr as createStore,Cr as createWevuComponent,wr as createWevuScopedSlotComponent,Sr as defineComponent,ei as defineStore,w as effect,b as effectScope,m as endBatch,Rt as getCurrentInstance,x as getCurrentScope,Bt as getCurrentSetupContext,We as getDeepWatchStrategy,ye as getReactiveVersion,Or as inject,Ar as injectGlobal,Qe as isNoSetData,Te as isRaw,G as isReactive,K as isRef,ve as isShallowReactive,Le as isShallowRef,q as markNoSetData,we as markRaw,Ur as mergeModels,er as mountRuntimeInstance,o as nextTick,Ir as normalizeClass,Fr as normalizeStyle,yn as onActivated,dn as onAddToFavorites,gn as onBeforeMount,mn as onBeforeUnmount,_n as onBeforeUpdate,bn as onDeactivated,sn as onError,vn as onErrorCaptured,Xt as onHide,Wt as onLaunch,Yt as onLoad,fn as onMounted,on as onMoved,Gt as onPageNotFound,tn as onPageScroll,$t as onPullDownRefresh,en as onReachBottom,Qt as onReady,an as onResize,nn as onRouteDone,cn as onSaveExitState,S as onScopeDispose,xn as onServerPrefetch,ln as onShareAppMessage,un as onShareTimeline,Jt as onShow,rn as onTabItemTap,qt as onThemeChange,Kt as onUnhandledRejection,Zt as onUnload,hn as onUnmounted,pn as onUpdated,me as prelinkReactiveTree,Dr as provide,kr as provideGlobal,Se as reactive,Fe as readonly,ke as ref,rr as registerApp,lr as registerComponent,te as removeMutationRecorder,Nt as resetWevuDefaults,Xn as runSetupFunction,zt as setCurrentInstance,Vt as setCurrentSetupContext,Ue as setDeepWatchStrategy,Mt as setWevuDefaults,_e as shallowReactive,Ie as shallowRef,f as startBatch,_ as stop,ti as storeToRefs,nr as teardownRuntimeInstance,U as toRaw,ze as toRef,Be as toRefs,je as toValue,W as touchReactive,Ve as traverse,Re as triggerRef,Ae as unref,Lr as useAttrs,Hr as useBindModel,Vr as useModel,Rr as useSlots,Br as useTemplateRef,Ge as watch,Ke as watchEffect};
|