@delta-comic/ui 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};let n=require(`vue`),r=require(`@delta-comic/model`),i=require(`naive-ui`),a=require(`@delta-comic/utils`),o=require(`@delta-comic/core`),s=require(`vue-router`),c=require(`vant`);function l(e){return e[e.length-1]}function u(e,t){let n=e.slice(),r=[],i=0;for(let a=0;a<e.length;a++){if(t(e[a],a,n)){r.push(e[a]);continue}if(!Object.hasOwn(e,a)){delete e[i++];continue}e[i++]=e[a]}return e.length=i,r}var d=class extends Error{constructor(e=`The operation was aborted`){super(e),this.name=`AbortError`}};function f(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function p(e){return e}function m(){}function h(e,{signal:t}={}){return new Promise((n,r)=>{let i=()=>{r(new d)},a=()=>{clearTimeout(o),i()};if(t?.aborted)return i();let o=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e);t?.addEventListener(`abort`,a,{once:!0})})}function g(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function _(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function v(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function y(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var b=`[object RegExp]`,x=`[object String]`,S=`[object Number]`,C=`[object Boolean]`,w=`[object Arguments]`,ee=`[object Symbol]`,te=`[object Date]`,T=`[object Map]`,ne=`[object Set]`,E=`[object Array]`,re=`[object ArrayBuffer]`,ie=`[object Object]`,ae=`[object DataView]`,oe=`[object Uint8Array]`,se=`[object Uint8ClampedArray]`,ce=`[object Uint16Array]`,le=`[object Uint32Array]`,ue=`[object Int8Array]`,de=`[object Int16Array]`,fe=`[object Int32Array]`,pe=`[object Float32Array]`,me=`[object Float64Array]`;function he(e,t){return ge(e,void 0,e,new Map,t)}function ge(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(g(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=ge(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,ge(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(ge(a,void 0,n,r,i));return t}if(typeof Buffer<`u`&&Buffer.isBuffer(e))return e.subarray();if(_(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=ge(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),D(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),D(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),D(t,e,n,r,i),t}if(e instanceof Error){let t=new e.constructor;return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,D(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),D(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),D(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),D(t,e,n,r,i),t}if(typeof e==`object`&&_e(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),D(t,e,n,r,i),t}return e}function D(e,t,n=e,r,i){let a=[...Object.keys(t),...v(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=ge(t[s],s,n,r,i))}}function _e(e){switch(y(e)){case w:case E:case re:case ae:case C:case te:case pe:case me:case ue:case de:case fe:case T:case S:case ie:case b:case ne:case x:case ee:case oe:case se:case ce:case le:return!0;default:return!1}}function ve(e){return ge(e,void 0,e,new Map,void 0)}function ye(e){return e===`__proto__`}function be(e){return Array.isArray(e)}function xe(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Se(e){return e instanceof Error}function Ce(e){return typeof e==`function`}function we(e){return Number.isSafeInteger(e)&&e>=0}function Te(e){return typeof e==`string`}function Ee(e){return e===void 0}function De(){}var Oe=Object.assign,ke=typeof window<`u`,Ae=e=>typeof e==`object`&&!!e,je=e=>e!=null,Me=e=>typeof e==`function`,Ne=e=>Ae(e)&&Me(e.then)&&Me(e.catch),Pe=e=>typeof e==`number`||/^\d+(\.\d+)?$/.test(e),Fe=()=>ke?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1;function Ie(e,t){let n=t.split(`.`),r=e;return n.forEach(e=>{r=Ae(r)?r[e]??``:``}),r}function Le(e,t,n){return t.reduce((t,r)=>((!n||e[r]!==void 0)&&(t[r]=e[r]),t),{})}var O=[Number,String],k={type:Boolean,default:!0},Re=e=>({type:e,required:!0}),ze=()=>({type:Array,default:()=>[]}),A=e=>({type:O,default:e}),j=e=>({type:String,default:e}),Be=typeof window<`u`;function Ve(e){return Be?requestAnimationFrame(e):-1}function He(e){Be&&cancelAnimationFrame(e)}function Ue(e){Ve(()=>Ve(e))}var We=e=>e===window,Ge=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),Ke=e=>{let t=(0,n.unref)(e);if(We(t)){let e=t.innerWidth,n=t.innerHeight;return Ge(e,n)}return t?.getBoundingClientRect?t.getBoundingClientRect():Ge(0,0)};function qe(e){let t=(0,n.inject)(e,null);if(t){let e=(0,n.getCurrentInstance)(),{link:r,unlink:i,internalChildren:a}=t;return r(e),(0,n.onUnmounted)(()=>i(e)),{parent:t,index:(0,n.computed)(()=>a.indexOf(e))}}return{parent:null,index:(0,n.ref)(-1)}}function Je(e){let t=[],r=e=>{Array.isArray(e)&&e.forEach(e=>{(0,n.isVNode)(e)&&(t.push(e),e.component?.subTree&&(t.push(e.component.subTree),r(e.component.subTree.children)),e.children&&r(e.children))})};return r(e),t}var Ye=(e,t)=>{let n=e.indexOf(t);return n===-1?e.findIndex(e=>t.key!==void 0&&t.key!==null&&e.type===t.type&&e.key===t.key):n};function Xe(e,t,n){let r=Je(e.subTree.children);n.sort((e,t)=>Ye(r,e.vnode)-Ye(r,t.vnode));let i=n.map(e=>e.proxy);t.sort((e,t)=>i.indexOf(e)-i.indexOf(t))}function Ze(e){let t=(0,n.reactive)([]),r=(0,n.reactive)([]),i=(0,n.getCurrentInstance)();return{children:t,linkChildren:a=>{(0,n.provide)(e,Object.assign({link:e=>{e.proxy&&(r.push(e),t.push(e.proxy),Xe(i,t,r))},unlink:e=>{let n=r.indexOf(e);t.splice(n,1),r.splice(n,1)},children:t,internalChildren:r},a))}}}function Qe(e){let t;(0,n.onMounted)(()=>{e(),(0,n.nextTick)(()=>{t=!0})}),(0,n.onActivated)(()=>{t&&e()})}function $e(e,t,r={}){if(!Be)return;let{target:i=window,passive:a=!1,capture:o=!1}=r,s=!1,c,l=r=>{if(s)return;let i=(0,n.unref)(r);i&&!c&&(i.addEventListener(e,t,{capture:o,passive:a}),c=!0)},u=r=>{if(s)return;let i=(0,n.unref)(r);i&&c&&(i.removeEventListener(e,t,o),c=!1)};(0,n.onUnmounted)(()=>u(i)),(0,n.onDeactivated)(()=>u(i)),Qe(()=>l(i));let d;return(0,n.isRef)(i)&&(d=(0,n.watch)(i,(e,t)=>{u(t),l(e)})),()=>{d?.(),u(i),s=!0}}var et,tt;function nt(){if(!et&&(et=(0,n.ref)(0),tt=(0,n.ref)(0),Be)){let e=()=>{et.value=window.innerWidth,tt.value=window.innerHeight};e(),window.addEventListener(`resize`,e,{passive:!0}),window.addEventListener(`orientationchange`,e,{passive:!0})}return{width:et,height:tt}}var rt=/scroll|auto|overlay/i,it=Be?window:void 0;function at(e){return e.tagName!==`HTML`&&e.tagName!==`BODY`&&e.nodeType===1}function ot(e,t=it){let n=e;for(;n&&n!==t&&at(n);){let{overflowY:e}=window.getComputedStyle(n);if(rt.test(e))return n;n=n.parentNode}return t}function st(e,t=it){let r=(0,n.ref)();return(0,n.onMounted)(()=>{e.value&&(r.value=ot(e.value,t))}),r}var ct;function lt(){if(!ct&&(ct=(0,n.ref)(`visible`),Be)){let e=()=>{ct.value=document.hidden?`hidden`:`visible`};e(),window.addEventListener(`visibilitychange`,e)}return ct}function ut(e){let t=`scrollTop`in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function dt(e,t){`scrollTop`in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function ft(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function pt(e){dt(window,e),dt(document.body,e)}function mt(e,t){if(e===window)return 0;let n=t?ut(t):ft();return Ke(e).top+n}Fe();var ht=e=>e.stopPropagation();function gt(e,t){(typeof e.cancelable!=`boolean`||e.cancelable)&&e.preventDefault(),t&&ht(e)}function _t(e){let t=(0,n.unref)(e);if(!t)return!1;let r=window.getComputedStyle(t),i=r.display===`none`,a=t.offsetParent===null&&r.position!==`fixed`;return i||a}var{width:vt,height:yt}=nt();function M(e){if(je(e))return Pe(e)?`${e}px`:String(e)}function bt(e){if(je(e)){if(Array.isArray(e))return{width:M(e[0]),height:M(e[1])};let t=M(e);return{width:t,height:t}}}function xt(e){let t={};return e!==void 0&&(t.zIndex=+e),t}var St;function Ct(){if(!St){let e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;St=parseFloat(t)}return St}function wt(e){return e=e.replace(/rem/g,``),+e*Ct()}function Tt(e){return e=e.replace(/vw/g,``),+e*vt.value/100}function Et(e){return e=e.replace(/vh/g,``),+e*yt.value/100}function Dt(e){if(typeof e==`number`)return e;if(ke){if(e.includes(`rem`))return wt(e);if(e.includes(`vw`))return Tt(e);if(e.includes(`vh`))return Et(e)}return parseFloat(e)}var Ot=/-(\w)/g,kt=e=>e.replace(Ot,(e,t)=>t.toUpperCase()),At=e=>e.replace(/([A-Z])/g,`-$1`).toLowerCase().replace(/^-/,``),jt=(e,t,n)=>Math.min(Math.max(e,t),n),{hasOwnProperty:Mt}=Object.prototype;function Nt(e,t,n){let r=t[n];je(r)&&(!Mt.call(e,n)||!Ae(r)?e[n]=r:e[n]=Pt(Object(e[n]),r))}function Pt(e,t){return Object.keys(t).forEach(n=>{Nt(e,t,n)}),e}var Ft={name:`姓名`,tel:`电话`,save:`保存`,clear:`清空`,cancel:`取消`,confirm:`确认`,delete:`删除`,loading:`加载中...`,noCoupon:`暂无优惠券`,nameEmpty:`请填写姓名`,addContact:`添加联系人`,telInvalid:`请填写正确的电话`,vanCalendar:{end:`结束`,start:`开始`,title:`日期选择`,weekdays:[`日`,`一`,`二`,`三`,`四`,`五`,`六`],monthTitle:(e,t)=>`${e}\u5E74${t}\u6708`,rangePrompt:e=>`\u6700\u591A\u9009\u62E9 ${e} \u5929`},vanCascader:{select:`请选择`},vanPagination:{prev:`上一页`,next:`下一页`},vanPullRefresh:{pulling:`下拉即可刷新...`,loosing:`释放即可刷新...`},vanSubmitBar:{label:`合计:`},vanCoupon:{unlimited:`无门槛`,discount:e=>`${e}\u6298`,condition:e=>`\u6EE1${e}\u5143\u53EF\u7528`},vanCouponCell:{title:`优惠券`,count:e=>`${e}\u5F20\u53EF\u7528`},vanCouponList:{exchange:`兑换`,close:`不使用`,enable:`可用`,disabled:`不可用`,placeholder:`输入优惠码`},vanAddressEdit:{area:`地区`,areaEmpty:`请选择地区`,addressEmpty:`请填写详细地址`,addressDetail:`详细地址`,defaultAddress:`设为默认收货地址`},vanAddressList:{add:`新增地址`}},It=(0,n.ref)(`zh-CN`),Lt=(0,n.reactive)({"zh-CN":Ft}),Rt={messages(){return Lt[It.value]},use(e,t){It.value=e,this.add({[e]:t})},add(e={}){Pt(Lt,e)}};function zt(e){let t=kt(e)+`.`;return(e,...n)=>{let r=Rt.messages(),i=Ie(r,t+e)||Ie(r,e);return Me(i)?i(...n):i}}function Bt(e,t){return t?typeof t==`string`?` ${e}--${t}`:Array.isArray(t)?t.reduce((t,n)=>t+Bt(e,n),``):Object.keys(t).reduce((n,r)=>n+(t[r]?Bt(e,r):``),``):``}function Vt(e){return(t,n)=>(t&&typeof t!=`string`&&(n=t,t=``),t=t?`${e}__${t}`:e,`${t}${Bt(t,n)}`)}function N(e){let t=`van-${e}`;return[t,Vt(t),zt(t)]}var Ht=`van-hairline`;`${Ht}`,`${Ht}`,`${Ht}`,`${Ht}`,`${Ht}`;var Ut=`${Ht}--top-bottom`;`${Ht}`;var Wt=`van-haptics-feedback`;function Gt(e,{args:t=[],done:n,canceled:r,error:i}){if(e){let a=e.apply(null,t);Ne(a)?a.then(e=>{e?n():r&&r()}).catch(i||De):a?n():r&&r()}else n()}function P(e){return e.install=t=>{let{name:n}=e;n&&(t.component(n,e),t.component(kt(`-${n}`),e))},e}function Kt(e,t){return e.reduce((e,n)=>Math.abs(e-t)<Math.abs(n-t)?e:n)}var qt=Symbol();function Jt(e){let t=(0,n.inject)(qt,null);t&&(0,n.watch)(t,t=>{t&&e()})}function Yt(e){let t=(0,n.getCurrentInstance)();t&&Oe(t.proxy,e)}var Xt={to:[String,Object],url:String,replace:Boolean};function Zt({to:e,url:t,replace:n,$router:r}){e&&r?r[n?`replace`:`push`](e):t&&(n?location.replace(t):location.href=t)}var[Qt,$t]=N(`badge`),en={dot:Boolean,max:O,tag:j(`div`),color:String,offset:Array,content:O,showZero:k,position:j(`top-right`)},tn=P((0,n.defineComponent)({name:Qt,props:en,setup(e,{slots:t}){let r=()=>{if(t.content)return!0;let{content:n,showZero:r}=e;return je(n)&&n!==``&&(r||n!==0&&n!==`0`)},i=()=>{let{dot:n,max:i,content:a}=e;if(!n&&r())return t.content?t.content():je(i)&&Pe(a)&&+a>+i?`${i}+`:a},a=e=>e.startsWith(`-`)?e.replace(`-`,``):`-${e}`,o=(0,n.computed)(()=>{let n={background:e.color};if(e.offset){let[r,i]=e.offset,{position:o}=e,[s,c]=o.split(`-`);t.default?(typeof i==`number`?n[s]=M(s===`top`?i:-i):n[s]=s===`top`?M(i):a(i),typeof r==`number`?n[c]=M(c===`left`?r:-r):n[c]=c===`left`?M(r):a(r)):(n.marginTop=M(i),n.marginLeft=M(r))}return n}),s=()=>{if(r()||e.dot)return(0,n.createVNode)(`div`,{class:$t([e.position,{dot:e.dot,fixed:!!t.default}]),style:o.value},[i()])};return()=>{if(t.default){let{tag:r}=e;return(0,n.createVNode)(r,{class:$t(`wrapper`)},{default:()=>[t.default(),s()]})}return s()}}})),nn=2e3,rn=()=>++nn,an=e=>{nn=e},[on,sn]=N(`config-provider`),cn=Symbol(on),ln={tag:j(`div`),theme:j(`light`),zIndex:Number,themeVars:Object,themeVarsDark:Object,themeVarsLight:Object,themeVarsScope:j(`local`),iconPrefix:String};function un(e){return e.replace(/([a-zA-Z])(\d)/g,`$1-$2`)}function dn(e){let t={};return Object.keys(e).forEach(n=>{let r=un(At(n));t[`--van-${r}`]=e[n]}),t}function fn(e={},t={}){Object.keys(e).forEach(n=>{e[n]!==t[n]&&document.documentElement.style.setProperty(n,e[n])}),Object.keys(t).forEach(t=>{e[t]||document.documentElement.style.removeProperty(t)})}(0,n.defineComponent)({name:on,props:ln,setup(e,{slots:t}){let r=(0,n.computed)(()=>dn(Oe({},e.themeVars,e.theme===`dark`?e.themeVarsDark:e.themeVarsLight)));if(ke){let t=()=>{document.documentElement.classList.add(`van-theme-${e.theme}`)},i=(t=e.theme)=>{document.documentElement.classList.remove(`van-theme-${t}`)};(0,n.watch)(()=>e.theme,(e,n)=>{n&&i(n),t()},{immediate:!0}),(0,n.onActivated)(t),(0,n.onDeactivated)(i),(0,n.onBeforeUnmount)(i),(0,n.watch)(r,(t,n)=>{e.themeVarsScope===`global`&&fn(t,n)}),(0,n.watch)(()=>e.themeVarsScope,(e,t)=>{t===`global`&&fn({},r.value),e===`global`&&fn(r.value,{})}),e.themeVarsScope===`global`&&fn(r.value,{})}return(0,n.provide)(cn,e),(0,n.watchEffect)(()=>{e.zIndex!==void 0&&an(e.zIndex)}),()=>(0,n.createVNode)(e.tag,{class:sn(),style:e.themeVarsScope===`local`?r.value:void 0},{default:()=>[t.default?.call(t)]})}});var[pn,mn]=N(`icon`),hn=e=>e?.includes(`/`),gn={dot:Boolean,tag:j(`i`),name:String,size:O,badge:O,color:String,badgeProps:Object,classPrefix:String},_n=P((0,n.defineComponent)({name:pn,props:gn,setup(e,{slots:t}){let r=(0,n.inject)(cn,null),i=(0,n.computed)(()=>e.classPrefix||r?.iconPrefix||mn());return()=>{let{tag:r,dot:a,name:o,size:s,badge:c,color:l}=e,u=hn(o);return(0,n.createVNode)(tn,(0,n.mergeProps)({dot:a,tag:r,class:[i.value,u?``:`${i.value}-${o}`],style:{color:l,fontSize:M(s)},content:c},e.badgeProps),{default:()=>[t.default?.call(t),u&&(0,n.createVNode)(`img`,{class:mn(`image`),src:o},null)]})}}})),[vn,yn]=N(`loading`),bn=Array(12).fill(null).map((e,t)=>(0,n.createVNode)(`i`,{class:yn(`line`,String(t+1))},null)),xn=(0,n.createVNode)(`svg`,{class:yn(`circular`),viewBox:`25 25 50 50`},[(0,n.createVNode)(`circle`,{cx:`50`,cy:`50`,r:`20`,fill:`none`},null)]),Sn={size:O,type:j(`circular`),color:String,vertical:Boolean,textSize:O,textColor:String},Cn=P((0,n.defineComponent)({name:vn,props:Sn,setup(e,{slots:t}){let r=(0,n.computed)(()=>Oe({color:e.color},bt(e.size))),i=()=>{let i=e.type===`spinner`?bn:xn;return(0,n.createVNode)(`span`,{class:yn(`spinner`,e.type),style:r.value},[t.icon?t.icon():i])},a=()=>{if(t.default)return(0,n.createVNode)(`span`,{class:yn(`text`),style:{fontSize:M(e.textSize),color:e.textColor??e.color}},[t.default()])};return()=>{let{type:t,vertical:r}=e;return(0,n.createVNode)(`div`,{class:yn([t,{vertical:r}]),"aria-live":`polite`,"aria-busy":!0},[i(),a()])}}})),wn={show:Boolean,zIndex:O,overlay:k,duration:O,teleport:[String,Object],lockScroll:k,lazyRender:k,beforeClose:Function,overlayProps:Object,overlayStyle:Object,overlayClass:null,transitionAppear:Boolean,closeOnClickOverlay:k};function Tn(e,t){return e>t?`horizontal`:t>e?`vertical`:``}function En(){let e=(0,n.ref)(0),t=(0,n.ref)(0),r=(0,n.ref)(0),i=(0,n.ref)(0),a=(0,n.ref)(0),o=(0,n.ref)(0),s=(0,n.ref)(``),c=(0,n.ref)(!0),l=()=>s.value===`vertical`,u=()=>s.value===`horizontal`,d=()=>{r.value=0,i.value=0,a.value=0,o.value=0,s.value=``,c.value=!0};return{move:(n=>{let l=n.touches[0];r.value=(l.clientX<0?0:l.clientX)-e.value,i.value=l.clientY-t.value,a.value=Math.abs(r.value),o.value=Math.abs(i.value),(!s.value||a.value<10&&o.value<10)&&(s.value=Tn(a.value,o.value)),c.value&&(a.value>5||o.value>5)&&(c.value=!1)}),start:(n=>{d(),e.value=n.touches[0].clientX,t.value=n.touches[0].clientY}),reset:d,startX:e,startY:t,deltaX:r,deltaY:i,offsetX:a,offsetY:o,direction:s,isVertical:l,isHorizontal:u,isTap:c}}var Dn=0,On=`van-overflow-hidden`;function kn(e,t){let r=En(),i=t=>{r.move(t);let n=r.deltaY.value>0?`10`:`01`,{scrollHeight:i,offsetHeight:a,scrollTop:o}=ot(t.target,e.value),s=`11`;o===0?s=a>=i?`00`:`01`:o+a>=i&&(s=`10`),s!==`11`&&r.isVertical()&&!(parseInt(s,2)&parseInt(n,2))&&gt(t,!0)},a=()=>{document.addEventListener(`touchstart`,r.start),document.addEventListener(`touchmove`,i,{passive:!1}),Dn||document.body.classList.add(On),Dn++},o=()=>{Dn&&(document.removeEventListener(`touchstart`,r.start),document.removeEventListener(`touchmove`,i),Dn--,Dn||document.body.classList.remove(On))},s=()=>t()&&a(),c=()=>t()&&o();Qe(s),(0,n.onDeactivated)(c),(0,n.onBeforeUnmount)(c),(0,n.watch)(t,e=>{e?a():o()})}function An(e){let t=(0,n.ref)(!1);return(0,n.watch)(e,e=>{e&&(t.value=e)},{immediate:!0}),e=>()=>t.value?e():null}var jn=()=>{let{scopeId:e}=(0,n.getCurrentInstance)()?.vnode||{};return e?{[e]:``}:null},[Mn,Nn]=N(`overlay`),Pn={show:Boolean,zIndex:O,duration:O,className:null,lockScroll:k,lazyRender:k,customStyle:Object,teleport:[String,Object]},Fn=P((0,n.defineComponent)({name:Mn,inheritAttrs:!1,props:Pn,setup(e,{attrs:t,slots:r}){let i=(0,n.ref)(),a=An(()=>e.show||!e.lazyRender),o=t=>{e.lockScroll&&gt(t,!0)},s=a(()=>{let a=Oe(xt(e.zIndex),e.customStyle);return je(e.duration)&&(a.animationDuration=`${e.duration}s`),(0,n.withDirectives)((0,n.createVNode)(`div`,(0,n.mergeProps)({ref:i,style:a,class:[Nn(),e.className]},t),[r.default?.call(r)]),[[n.vShow,e.show]])});return $e(`touchmove`,o,{target:i}),()=>{let t=(0,n.createVNode)(n.Transition,{name:`van-fade`,appear:!0},{default:s});return e.teleport?(0,n.createVNode)(n.Teleport,{to:e.teleport},{default:()=>[t]}):t}}})),In=Oe({},wn,{round:Boolean,position:j(`center`),closeIcon:j(`cross`),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:j(`top-right`),destroyOnClose:Boolean,safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[Ln,Rn]=N(`popup`),zn=P((0,n.defineComponent)({name:Ln,inheritAttrs:!1,props:In,emits:[`open`,`close`,`opened`,`closed`,`keydown`,`update:show`,`clickOverlay`,`clickCloseIcon`],setup(e,{emit:t,attrs:r,slots:i}){let a,o,s=(0,n.ref)(),c=(0,n.ref)(),l=An(()=>e.show||!e.lazyRender),u=(0,n.computed)(()=>{let t={zIndex:s.value};if(je(e.duration)){let n=e.position===`center`?`animationDuration`:`transitionDuration`;t[n]=`${e.duration}s`}return t}),d=()=>{a||(a=!0,s.value=e.zIndex===void 0?rn():+e.zIndex,t(`open`))},f=()=>{a&&Gt(e.beforeClose,{done(){a=!1,t(`close`),t(`update:show`,!1)}})},p=n=>{t(`clickOverlay`,n),e.closeOnClickOverlay&&f()},m=()=>{if(e.overlay)return(0,n.createVNode)(Fn,(0,n.mergeProps)(Oe({show:e.show,class:e.overlayClass,zIndex:s.value,duration:e.duration,customStyle:e.overlayStyle,role:e.closeOnClickOverlay?`button`:void 0,tabindex:e.closeOnClickOverlay?0:void 0},e.overlayProps),jn(),{onClick:p}),{default:i[`overlay-content`]})},h=e=>{t(`clickCloseIcon`,e),f()},g=()=>{if(e.closeable)return(0,n.createVNode)(_n,{role:`button`,tabindex:0,name:e.closeIcon,class:[Rn(`close-icon`,e.closeIconPosition),Wt],classPrefix:e.iconPrefix,onClick:h},null)},_,v=()=>{_&&clearTimeout(_),_=setTimeout(()=>{t(`opened`)})},y=()=>t(`closed`),b=e=>t(`keydown`,e),x=l(()=>{let{destroyOnClose:t,round:a,position:o,safeAreaInsetTop:s,safeAreaInsetBottom:l,show:d}=e;if(!(!d&&t))return(0,n.withDirectives)((0,n.createVNode)(`div`,(0,n.mergeProps)({ref:c,style:u.value,role:`dialog`,tabindex:0,class:[Rn({round:a,[o]:o}),{"van-safe-area-top":s,"van-safe-area-bottom":l}],onKeydown:b},r,jn()),[i.default?.call(i),g()]),[[n.vShow,d]])}),S=()=>{let{position:t,transition:r,transitionAppear:i}=e,a=t===`center`?`van-fade`:`van-popup-slide-${t}`;return(0,n.createVNode)(n.Transition,{name:r||a,appear:i,onAfterEnter:v,onAfterLeave:y},{default:x})};return(0,n.watch)(()=>e.show,e=>{e&&!a&&(d(),r.tabindex===0&&(0,n.nextTick)(()=>{var e;(e=c.value)==null||e.focus()})),!e&&a&&(a=!1,t(`close`))}),Yt({popupRef:c}),kn(c,()=>e.show&&e.lockScroll),$e(`popstate`,()=>{e.closeOnPopstate&&(f(),o=!1)}),(0,n.onMounted)(()=>{e.show&&d()}),(0,n.onActivated)(()=>{o&&=(t(`update:show`,!0),!1)}),(0,n.onDeactivated)(()=>{e.show&&e.teleport&&(f(),o=!0)}),(0,n.provide)(qt,()=>e.show),()=>e.teleport?(0,n.createVNode)(n.Teleport,{to:e.teleport},{default:()=>[m(),S()]}):(0,n.createVNode)(n.Fragment,null,[m(),S()])}})),Bn=(e,t)=>{let r=(0,n.ref)(e());return(0,n.watch)(e,e=>{e!==r.value&&(r.value=e)}),(0,n.watch)(r,n=>{n!==e()&&t(n)}),r};process.env.NODE_ENV===`production`||Object.freeze({}),process.env.NODE_ENV===`production`||Object.freeze([]);var Vn=Array.isArray,Hn=e=>typeof e==`string`,Un=e=>typeof e==`object`&&!!e,Wn=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Gn=/\B([A-Z])/g,Kn=Wn(e=>e.replace(Gn,`-$1`).toLowerCase());function qn(e){if(Vn(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=Hn(r)?Zn(r):qn(r);if(i)for(let e in i)t[e]=i[e]}return t}else if(Hn(e)||Un(e))return e}var Jn=/;(?![^(]*\))/g,Yn=/:([^]+)/,Xn=/\/\*[^]*?\*\//g;function Zn(e){let t={};return e.replace(Xn,``).split(Jn).forEach(e=>{if(e){let n=e.split(Yn);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Qn(e){if(!e)return``;if(Hn(e))return e;let t=``;for(let n in e){let r=e[n];if(Hn(r)||typeof r==`number`){let e=n.startsWith(`--`)?n:Kn(n);t+=`${e}:${r};`}}return t}function $n(e){let t=``;if(Hn(e))t=e;else if(Vn(e))for(let n=0;n<e.length;n++){let r=$n(e[n]);r&&(t+=r+` `)}else if(Un(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}function er(e,t,n){let r,i=0,a=e.scrollLeft,o=n===0?1:Math.round(n*1e3/16),s=a;function c(){He(r)}function l(){s+=(t-a)/o,e.scrollLeft=s,++i<o&&(r=Ve(l))}return l(),c}function tr(e,t,n,r){let i,a=ut(e),o=a<t,s=n===0?1:Math.round(n*1e3/16),c=(t-a)/s;function l(){He(i)}function u(){a+=c,(o&&a>t||!o&&a<t)&&(a=t),dt(e,a),o&&a<t||!o&&a>t?i=Ve(u):r&&(i=Ve(r))}return u(),l}var nr=0;function rr(){let{name:e=`unknown`}=(0,n.getCurrentInstance)()?.type||{};return process.env.NODE_ENV===`test`?e:`${e}-${++nr}`}function ir(){let e=(0,n.ref)([]),t=[];return(0,n.onBeforeUpdate)(()=>{e.value=[]}),[e,n=>(t[n]||(t[n]=t=>{e.value[n]=t}),t[n])]}function ar(e,t){if(!ke||!window.IntersectionObserver)return;let r=new IntersectionObserver(e=>{t(e[0].intersectionRatio>0)},{root:document.body}),i=()=>{e.value&&r.observe(e.value)},a=()=>{e.value&&r.unobserve(e.value)};(0,n.onDeactivated)(a),(0,n.onBeforeUnmount)(a),Qe(i)}var[or,sr]=N(`sticky`),cr={zIndex:O,position:j(`top`),container:Object,offsetTop:A(0),offsetBottom:A(0)},lr=P((0,n.defineComponent)({name:or,props:cr,emits:[`scroll`,`change`],setup(e,{emit:t,slots:r}){let i=(0,n.ref)(),a=st(i),o=(0,n.reactive)({fixed:!1,width:0,height:0,transform:0}),s=(0,n.ref)(!1),c=(0,n.computed)(()=>Dt(e.position===`top`?e.offsetTop:e.offsetBottom)),l=(0,n.computed)(()=>{if(s.value)return;let{fixed:e,height:t,width:n}=o;if(e)return{width:`${n}px`,height:`${t}px`}}),u=(0,n.computed)(()=>{if(!o.fixed||s.value)return;let t=Oe(xt(e.zIndex),{width:`${o.width}px`,height:`${o.height}px`,[e.position]:`${c.value}px`});return o.transform&&(t.transform=`translate3d(0, ${o.transform}px, 0)`),t}),d=e=>t(`scroll`,{scrollTop:e,isFixed:o.fixed}),f=()=>{if(!i.value||_t(i))return;let{container:t,position:n}=e,r=Ke(i),a=ut(window);if(o.width=r.width,o.height=r.height,n===`top`)if(t){let e=Ke(t),n=e.bottom-c.value-o.height;o.fixed=c.value>r.top&&e.bottom>0,o.transform=n<0?n:0}else o.fixed=c.value>r.top;else{let{clientHeight:e}=document.documentElement;if(t){let n=Ke(t),i=e-n.top-c.value-o.height;o.fixed=e-c.value<r.bottom&&e>n.top,o.transform=i<0?-i:0}else o.fixed=e-c.value<r.bottom}d(a)};return(0,n.watch)(()=>o.fixed,e=>t(`change`,e)),$e(`scroll`,f,{target:a,passive:!0}),ar(i,f),(0,n.watch)([vt,yt],()=>{!i.value||_t(i)||!o.fixed||(s.value=!0,(0,n.nextTick)(()=>{let e=Ke(i);o.width=e.width,o.height=e.height,s.value=!1}))}),()=>(0,n.createVNode)(`div`,{ref:i,style:l.value},[(0,n.createVNode)(`div`,{class:sr({fixed:o.fixed&&!s.value}),style:u.value},[r.default?.call(r)])])}})),[ur,dr]=N(`swipe`),fr={loop:k,width:O,height:O,vertical:Boolean,autoplay:A(0),duration:A(500),touchable:k,lazyRender:Boolean,initialSwipe:A(0),indicatorColor:String,showIndicators:k,stopPropagation:k},pr=Symbol(ur),mr=P((0,n.defineComponent)({name:ur,props:fr,emits:[`change`,`dragStart`,`dragEnd`],setup(e,{emit:t,slots:r}){let i=(0,n.ref)(),a=(0,n.ref)(),o=(0,n.reactive)({rect:null,width:0,height:0,offset:0,active:0,swiping:!1}),s=!1,c=En(),{children:l,linkChildren:u}=Ze(pr),d=(0,n.computed)(()=>l.length),f=(0,n.computed)(()=>o[e.vertical?`height`:`width`]),p=(0,n.computed)(()=>e.vertical?c.deltaY.value:c.deltaX.value),m=(0,n.computed)(()=>o.rect?(e.vertical?o.rect.height:o.rect.width)-f.value*d.value:0),h=(0,n.computed)(()=>f.value?Math.ceil(Math.abs(m.value)/f.value):d.value),g=(0,n.computed)(()=>d.value*f.value),_=(0,n.computed)(()=>(o.active+d.value)%d.value),v=(0,n.computed)(()=>{let t=e.vertical?`vertical`:`horizontal`;return c.direction.value===t}),y=(0,n.computed)(()=>{let t={transitionDuration:`${o.swiping?0:e.duration}ms`,transform:`translate${e.vertical?`Y`:`X`}(${+o.offset.toFixed(2)}px)`};if(f.value){let n=e.vertical?`height`:`width`,r=e.vertical?`width`:`height`;t[n]=`${g.value}px`,t[r]=e[r]?`${e[r]}px`:``}return t}),b=t=>{let{active:n}=o;return t?e.loop?jt(n+t,-1,d.value):jt(n+t,0,h.value):n},x=(t,n=0)=>{let r=t*f.value;e.loop||(r=Math.min(r,-m.value));let i=n-r;return e.loop||(i=jt(i,m.value,0)),i},S=({pace:n=0,offset:r=0,emitChange:i})=>{if(d.value<=1)return;let{active:a}=o,s=b(n),c=x(s,r);if(e.loop){if(l[0]&&c!==m.value){let e=c<m.value;l[0].setOffset(e?g.value:0)}if(l[d.value-1]&&c!==0){let e=c>0;l[d.value-1].setOffset(e?-g.value:0)}}o.active=s,o.offset=c,i&&s!==a&&t(`change`,_.value)},C=()=>{o.swiping=!0,o.active<=-1?S({pace:d.value}):o.active>=d.value&&S({pace:-d.value})},w=()=>{C(),c.reset(),Ue(()=>{o.swiping=!1,S({pace:-1,emitChange:!0})})},ee=()=>{C(),c.reset(),Ue(()=>{o.swiping=!1,S({pace:1,emitChange:!0})})},te,T=()=>clearTimeout(te),ne=()=>{T(),+e.autoplay>0&&d.value>1&&(te=setTimeout(()=>{ee(),ne()},+e.autoplay))},E=(t=+e.initialSwipe)=>{if(!i.value)return;let r=()=>{if(!_t(i)){let t={width:i.value.offsetWidth,height:i.value.offsetHeight};o.rect=t,o.width=+(e.width??t.width),o.height=+(e.height??t.height)}d.value&&(t=Math.min(d.value-1,t),t===-1&&(t=d.value-1)),o.active=t,o.swiping=!0,o.offset=x(t),l.forEach(e=>{e.setOffset(0)}),ne()};_t(i)?(0,n.nextTick)().then(r):r()},re=()=>E(o.active),ie,ae=t=>{!e.touchable||t.touches.length>1||(c.start(t),s=!1,ie=Date.now(),T(),C())},oe=n=>{e.touchable&&o.swiping&&(c.move(n),v.value&&(!e.loop&&(o.active===0&&p.value>0||o.active===d.value-1&&p.value<0)||(gt(n,e.stopPropagation),S({offset:p.value}),s||=(t(`dragStart`,{index:_.value}),!0))))},se=()=>{if(!e.touchable||!o.swiping)return;let n=Date.now()-ie,r=p.value/n;if((Math.abs(r)>.25||Math.abs(p.value)>f.value/2)&&v.value){let t=e.vertical?c.offsetY.value:c.offsetX.value,n=0;n=e.loop?t>0?p.value>0?-1:1:0:-Math[p.value>0?`ceil`:`floor`](p.value/f.value),S({pace:n,emitChange:!0})}else p.value&&S({pace:0});s=!1,o.swiping=!1,t(`dragEnd`,{index:_.value}),ne()},ce=(t,n={})=>{C(),c.reset(),Ue(()=>{let r;r=e.loop&&t===d.value?o.active===0?0:t:t%d.value,n.immediate?Ue(()=>{o.swiping=!1}):o.swiping=!1,S({pace:r-o.active,emitChange:!0})})},le=(t,r)=>{let i=r===_.value,a=i?{backgroundColor:e.indicatorColor}:void 0;return(0,n.createVNode)(`i`,{style:a,class:dr(`indicator`,{active:i})},null)},ue=()=>{if(r.indicator)return r.indicator({active:_.value,total:d.value});if(e.showIndicators&&d.value>1)return(0,n.createVNode)(`div`,{class:dr(`indicators`,{vertical:e.vertical})},[Array(d.value).fill(``).map(le)])};return Yt({prev:w,next:ee,state:o,resize:re,swipeTo:ce}),u({size:f,props:e,count:d,activeIndicator:_}),(0,n.watch)(()=>e.initialSwipe,e=>E(+e)),(0,n.watch)(d,()=>E(o.active)),(0,n.watch)(()=>e.autoplay,ne),(0,n.watch)([vt,yt,()=>e.width,()=>e.height],re),(0,n.watch)(lt(),e=>{e===`visible`?ne():T()}),(0,n.onMounted)(E),(0,n.onActivated)(()=>E(o.active)),Jt(()=>E(o.active)),(0,n.onDeactivated)(T),(0,n.onBeforeUnmount)(T),$e(`touchmove`,oe,{target:a}),()=>(0,n.createVNode)(`div`,{ref:i,class:dr()},[(0,n.createVNode)(`div`,{ref:a,style:y.value,class:dr(`track`,{vertical:e.vertical}),onTouchstartPassive:ae,onTouchend:se,onTouchcancel:se},[r.default?.call(r)]),ue()])}})),[hr,gr]=N(`tabs`),_r=(0,n.defineComponent)({name:hr,props:{count:Re(Number),inited:Boolean,animated:Boolean,duration:Re(O),swipeable:Boolean,lazyRender:Boolean,currentIndex:Re(Number)},emits:[`change`],setup(e,{emit:t,slots:r}){let i=(0,n.ref)(),a=e=>t(`change`,e),o=()=>{let t=r.default?.call(r);return e.animated||e.swipeable?(0,n.createVNode)(mr,{ref:i,loop:!1,class:gr(`track`),duration:e.duration*1e3,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:a},{default:()=>[t]}):t},s=t=>{let n=i.value;n&&n.state.active!==t&&n.swipeTo(t,{immediate:!e.inited})};return(0,n.watch)(()=>e.currentIndex,s),(0,n.onMounted)(()=>{s(e.currentIndex)}),Yt({swipeRef:i}),()=>(0,n.createVNode)(`div`,{class:gr(`content`,{animated:e.animated||e.swipeable})},[o()])}}),[vr,yr]=N(`tabs`),br={type:j(`line`),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:A(0),duration:A(.3),animated:Boolean,ellipsis:k,swipeable:Boolean,scrollspy:Boolean,offsetTop:A(0),background:String,lazyRender:k,showHeader:k,lineWidth:O,lineHeight:O,beforeChange:Function,swipeThreshold:A(5),titleActiveColor:String,titleInactiveColor:String},xr=Symbol(vr),Sr=(0,n.defineComponent)({name:vr,props:br,emits:[`change`,`scroll`,`rendered`,`clickTab`,`update:active`],setup(e,{emit:t,slots:r}){let i,a,o,s,c,l=(0,n.ref)(),u=(0,n.ref)(),d=(0,n.ref)(),f=(0,n.ref)(),p=rr(),m=st(l),[h,g]=ir(),{children:_,linkChildren:v}=Ze(xr),y=(0,n.reactive)({inited:!1,position:``,lineStyle:{},currentIndex:-1}),b=(0,n.computed)(()=>_.length>+e.swipeThreshold||!e.ellipsis||e.shrink),x=(0,n.computed)(()=>({borderColor:e.color,background:e.background})),S=(e,t)=>e.name??t,C=(0,n.computed)(()=>{let e=_[y.currentIndex];if(e)return S(e,y.currentIndex)}),w=(0,n.computed)(()=>Dt(e.offsetTop)),ee=(0,n.computed)(()=>e.sticky?w.value+i:0),te=t=>{let n=u.value,r=h.value;if(!b.value||!n||!r||!r[y.currentIndex])return;let i=r[y.currentIndex].$el,a=i.offsetLeft-(n.offsetWidth-i.offsetWidth)/2;s&&s(),s=er(n,a,t?0:+e.duration)},T=()=>{let t=y.inited;(0,n.nextTick)(()=>{let n=h.value;if(!n||!n[y.currentIndex]||e.type!==`line`||_t(l.value))return;let r=n[y.currentIndex].$el,{lineWidth:i,lineHeight:a}=e,o=r.offsetLeft+r.offsetWidth/2,s={width:M(i),backgroundColor:e.color,transform:`translateX(${o}px) translateX(-50%)`};if(t&&(s.transitionDuration=`${e.duration}s`),je(a)){let e=M(a);s.height=e,s.borderRadius=e}y.lineStyle=s})},ne=e=>{let t=e<y.currentIndex?-1:1;for(;e>=0&&e<_.length;){if(!_[e].disabled)return e;e+=t}},E=(n,r)=>{let i=ne(n);if(!je(i))return;let a=_[i],s=S(a,i),c=y.currentIndex!==null;y.currentIndex!==i&&(y.currentIndex=i,r||te(),T()),s!==e.active&&(t(`update:active`,s),c&&t(`change`,s,a.title)),o&&!e.scrollspy&&pt(Math.ceil(mt(l.value)-w.value))},re=(e,t)=>{let n=_.findIndex((t,n)=>S(t,n)===e);E(n===-1?0:n,t)},ie=(t=!1)=>{if(e.scrollspy){let n=_[y.currentIndex].$el;if(n&&m.value){let r=mt(n,m.value)-ee.value;a=!0,c&&c(),c=tr(m.value,r,t?0:+e.duration,()=>{a=!1})}}},ae=(n,r,i)=>{let{title:a,disabled:o}=_[r],s=S(_[r],r);o||(Gt(e.beforeChange,{args:[s],done:()=>{E(r),ie()}}),Zt(n)),t(`clickTab`,{name:s,title:a,event:i,disabled:o})},oe=e=>{o=e.isFixed,t(`scroll`,e)},se=e=>{(0,n.nextTick)(()=>{re(e),ie(!0)})},ce=()=>{for(let e=0;e<_.length;e++){let{top:t}=Ke(_[e].$el);if(t>ee.value)return e===0?0:e-1}return _.length-1},le=()=>{e.scrollspy&&!a&&E(ce())},ue=()=>{if(e.type===`line`&&_.length)return(0,n.createVNode)(`div`,{class:yr(`line`),style:y.lineStyle},null)},de=()=>{let{type:t,border:i,sticky:a}=e,o=[(0,n.createVNode)(`div`,{ref:a?void 0:d,class:[yr(`wrap`),{[Ut]:t===`line`&&i}]},[(0,n.createVNode)(`div`,{ref:u,role:`tablist`,class:yr(`nav`,[t,{shrink:e.shrink,complete:b.value}]),style:x.value,"aria-orientation":`horizontal`},[r[`nav-left`]?.call(r),_.map(e=>e.renderTitle(ae)),ue(),r[`nav-right`]?.call(r)])]),r[`nav-bottom`]?.call(r)];return a?(0,n.createVNode)(`div`,{ref:d},[o]):o},fe=()=>{T(),(0,n.nextTick)(()=>{var e;te(!0),(e=f.value?.swipeRef.value)==null||e.resize()})};return(0,n.watch)(()=>[e.color,e.duration,e.lineWidth,e.lineHeight],T),(0,n.watch)(vt,fe),(0,n.watch)(()=>e.active,e=>{e!==C.value&&re(e)}),(0,n.watch)(()=>_.length,()=>{y.inited&&(re(e.active),T(),(0,n.nextTick)(()=>{te(!0)}))}),Yt({resize:fe,scrollTo:se}),(0,n.onActivated)(T),Jt(T),Qe(()=>{re(e.active,!0),(0,n.nextTick)(()=>{y.inited=!0,d.value&&(i=Ke(d.value).height),te(!0)})}),ar(l,T),$e(`scroll`,le,{target:m,passive:!0}),v({id:p,props:e,setLine:T,scrollable:b,onRendered:(e,n)=>t(`rendered`,e,n),currentName:C,setTitleRefs:g,scrollIntoView:te}),()=>(0,n.createVNode)(`div`,{ref:l,class:yr([e.type])},[e.showHeader?e.sticky?(0,n.createVNode)(lr,{container:l.value,offsetTop:w.value,onScroll:oe},{default:()=>[de()]}):de():null,(0,n.createVNode)(_r,{ref:f,count:_.length,inited:y.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:y.currentIndex,onChange:E},{default:()=>[r.default?.call(r)]})])}}),Cr=Symbol(),wr=Symbol(),Tr=()=>(0,n.inject)(wr,null),Er=e=>{let t=Tr();(0,n.provide)(Cr,e),(0,n.provide)(wr,(0,n.computed)(()=>(t==null||t.value)&&e.value))},[Dr,Or]=N(`tab`),kr=(0,n.defineComponent)({name:Dr,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:O,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:k},setup(e,{slots:t}){let r=(0,n.computed)(()=>{let t={},{type:n,color:r,disabled:i,isActive:a,activeColor:o,inactiveColor:s}=e;r&&n===`card`&&(t.borderColor=r,i||(a?t.backgroundColor=r:t.color=r));let c=a?o:s;return c&&(t.color=c),t}),i=()=>{let r=(0,n.createVNode)(`span`,{class:Or(`text`,{ellipsis:!e.scrollable})},[t.title?t.title():e.title]);return e.dot||je(e.badge)&&e.badge!==``?(0,n.createVNode)(tn,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:()=>[r]}):r};return()=>(0,n.createVNode)(`div`,{id:e.id,role:`tab`,class:[Or([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:r.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls,"data-allow-mismatch":`attribute`},[i()])}}),[Ar,jr]=N(`swipe-item`),Mr=P((0,n.defineComponent)({name:Ar,setup(e,{slots:t}){let r,i=(0,n.reactive)({offset:0,inited:!1,mounted:!1}),{parent:a,index:o}=qe(pr);if(!a){process.env.NODE_ENV!==`production`&&console.error(`[Vant] <SwipeItem> must be a child component of <Swipe>.`);return}let s=(0,n.computed)(()=>{let e={},{vertical:t}=a.props;return a.size.value&&(e[t?`height`:`width`]=`${a.size.value}px`),i.offset&&(e.transform=`translate${t?`Y`:`X`}(${i.offset}px)`),e}),c=(0,n.computed)(()=>{let{loop:e,lazyRender:t}=a.props;if(!t||r)return!0;if(!i.mounted)return!1;let n=a.activeIndicator.value,s=a.count.value-1,c=n===0&&e?s:n-1,l=n===s&&e?0:n+1;return r=o.value===n||o.value===c||o.value===l,r});return(0,n.onMounted)(()=>{(0,n.nextTick)(()=>{i.mounted=!0})}),Yt({setOffset:e=>{i.offset=e}}),()=>(0,n.createVNode)(`div`,{class:jr(),style:s.value},[c.value?t.default?.call(t):null])}})),[Nr,Pr]=N(`tab`),Fr=Oe({},Xt,{dot:Boolean,name:O,badge:O,title:String,disabled:Boolean,titleClass:null,titleStyle:[String,Object],showZeroBadge:k}),Ir=P((0,n.defineComponent)({name:Nr,props:Fr,setup(e,{slots:t}){let r=rr(),i=(0,n.ref)(!1),a=(0,n.getCurrentInstance)(),{parent:o,index:s}=qe(xr);if(!o){process.env.NODE_ENV!==`production`&&console.error(`[Vant] <Tab> must be a child component of <Tabs>.`);return}let c=()=>e.name??s.value,l=()=>{i.value=!0,o.props.lazyRender&&(0,n.nextTick)(()=>{o.onRendered(c(),e.title)})},u=(0,n.computed)(()=>{let e=c()===o.currentName.value;return e&&!i.value&&l(),e}),d=(0,n.ref)(``),f=(0,n.ref)(``);(0,n.watchEffect)(()=>{let{titleClass:t,titleStyle:n}=e;d.value=t?$n(t):``,f.value=n&&typeof n!=`string`?Qn(qn(n)):n});let p=i=>(0,n.createVNode)(kr,(0,n.mergeProps)({key:r,id:`${o.id}-${s.value}`,ref:o.setTitleRefs(s.value),style:f.value,class:d.value,isActive:u.value,controls:r,scrollable:o.scrollable.value,activeColor:o.props.titleActiveColor,inactiveColor:o.props.titleInactiveColor,onClick:e=>i(a.proxy,s.value,e)},Le(o.props,[`type`,`color`,`shrink`]),Le(e,[`dot`,`badge`,`title`,`disabled`,`showZeroBadge`])),{title:t.title}),m=(0,n.ref)(!u.value);return(0,n.watch)(u,e=>{e?m.value=!1:Ue(()=>{m.value=!0})}),(0,n.watch)(()=>e.title,()=>{o.setLine(),o.scrollIntoView()}),Er(u),Yt({id:r,renderTitle:p}),()=>{let e=`${o.id}-${s.value}`,{animated:a,swipeable:c,scrollspy:l,lazyRender:d}=o.props;if(!t.default&&!a)return;let f=l||u.value;if(a||c)return(0,n.createVNode)(Mr,{id:r,role:`tabpanel`,class:Pr(`panel-wrapper`,{inactive:m.value}),tabindex:u.value?0:-1,"aria-hidden":!u.value,"aria-labelledby":e,"data-allow-mismatch":`attribute`},{default:()=>[(0,n.createVNode)(`div`,{class:Pr(`panel`)},[t.default?.call(t)])]});let p=i.value||l||!d?t.default?.call(t):null;return(0,n.withDirectives)((0,n.createVNode)(`div`,{id:r,role:`tabpanel`,class:Pr(`panel`),tabindex:f?0:-1,"aria-labelledby":e,"data-allow-mismatch":`attribute`},[p]),[[n.vShow,f]])}}})),Lr=P(Sr),Rr={height:A(0),anchors:ze(),duration:A(.3),magnetic:k,contentDraggable:k,lockScroll:Boolean,safeAreaInsetBottom:k},[zr,Br]=N(`floating-panel`),Vr=P((0,n.defineComponent)({name:zr,props:Rr,emits:[`heightChange`,`update:height`],setup(e,{emit:t,slots:r}){let i=.2,a=(0,n.ref)(),o=(0,n.ref)(),s=Bn(()=>+e.height,e=>t(`update:height`,e)),c=(0,n.computed)(()=>({min:e.anchors[0]??100,max:e.anchors[e.anchors.length-1]??Math.round(yt.value*.6)})),l=(0,n.computed)(()=>e.anchors.length>=2?e.anchors:[c.value.min,c.value.max]),u=(0,n.ref)(!1),d=(0,n.computed)(()=>({height:M(c.value.max),transform:`translateY(calc(100% + ${M(-s.value)}))`,transition:u.value?`none`:`transform ${e.duration}s cubic-bezier(0.18, 0.89, 0.32, 1.28)`})),f=e=>{let t=Math.abs(e),{min:n,max:r}=c.value;return t>r?-(r+(t-r)*i):t<n?-(n-(n-t)*i):e},p,m=-1,h=En(),g=e=>{h.start(e),u.value=!0,p=-s.value,m=-1},_=t=>{h.move(t);let n=t.target;if(o.value===n||o.value?.contains(n)){let{scrollTop:n}=o.value;if(m=Math.max(m,n),!e.contentDraggable)return;if(-p<c.value.max)gt(t,!0);else if(!(n<=0&&h.deltaY.value>0)||m>0)return}s.value=-f(h.deltaY.value+p)},v=()=>{if(m=-1,u.value=!1,e.magnetic)s.value=Kt(l.value,s.value);else{let{min:e,max:t}=c.value;s.value=Math.max(e,Math.min(t,s.value))}s.value!==-p&&t(`heightChange`,{height:s.value})};(0,n.watch)(c,()=>{s.value=Kt(l.value,s.value)},{immediate:!0}),kn(a,()=>e.lockScroll||u.value),$e(`touchmove`,_,{target:a});let y=()=>r.header?r.header():(0,n.createVNode)(`div`,{class:Br(`header`)},[(0,n.createVNode)(`div`,{class:Br(`header-bar`)},null)]);return()=>(0,n.createVNode)(`div`,{class:[Br(),{"van-safe-area-bottom":e.safeAreaInsetBottom}],ref:a,style:d.value,onTouchstartPassive:g,onTouchend:v,onTouchcancel:v},[y(),(0,n.createVNode)(`div`,{class:Br(`content`),ref:o,style:{paddingBottom:M(c.value.max-s.value)}},[r.default?.call(r)])])}})),[Hr,Ur,Wr]=N(`pull-refresh`),Gr=50,Kr=[`pulling`,`loosing`,`success`],qr={disabled:Boolean,modelValue:Boolean,headHeight:A(Gr),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:O,successDuration:A(500),animationDuration:A(300)},Jr=P((0,n.defineComponent)({name:Hr,props:qr,emits:[`change`,`refresh`,`update:modelValue`],setup(e,{emit:t,slots:r}){let i,a=(0,n.ref)(),o=(0,n.ref)(),s=st(a),c=(0,n.reactive)({status:`normal`,distance:0,duration:0}),l=En(),u=()=>{if(e.headHeight!==Gr)return{height:`${e.headHeight}px`}},d=()=>c.status!==`loading`&&c.status!==`success`&&!e.disabled,f=t=>{let n=+(e.pullDistance||e.headHeight);return t>n&&(t=t<n*2?n+(t-n)/2:n*1.5+(t-n*2)/4),Math.round(t)},p=(n,r)=>{let i=+(e.pullDistance||e.headHeight);c.distance=n,r?c.status=`loading`:n===0?c.status=`normal`:n<i?c.status=`pulling`:c.status=`loosing`,t(`change`,{status:c.status,distance:n})},m=()=>{let{status:t}=c;return t===`normal`?``:e[`${t}Text`]||Wr(t)},h=()=>{let{status:e,distance:t}=c;if(r[e])return r[e]({distance:t});let i=[];return Kr.includes(e)&&i.push((0,n.createVNode)(`div`,{class:Ur(`text`)},[m()])),e===`loading`&&i.push((0,n.createVNode)(Cn,{class:Ur(`loading`)},{default:m})),i},g=()=>{c.status=`success`,setTimeout(()=>{p(0)},+e.successDuration)},_=e=>{i=ut(s.value)===0,i&&(c.duration=0,l.start(e))},v=e=>{d()&&_(e)},y=e=>{if(d()){i||_(e);let{deltaY:t}=l;l.move(e),i&&t.value>=0&&l.isVertical()&&(gt(e),p(f(t.value)))}},b=()=>{i&&l.deltaY.value&&d()&&(c.duration=+e.animationDuration,c.status===`loosing`?(p(+e.headHeight,!0),t(`update:modelValue`,!0),(0,n.nextTick)(()=>t(`refresh`))):p(0))};return(0,n.watch)(()=>e.modelValue,t=>{c.duration=+e.animationDuration,t?p(+e.headHeight,!0):r.success||e.successText?g():p(0,!1)}),$e(`touchmove`,y,{target:o}),()=>{let e={transitionDuration:`${c.duration}ms`,transform:c.distance?`translate3d(0,${c.distance}px, 0)`:``};return(0,n.createVNode)(`div`,{ref:a,class:Ur()},[(0,n.createVNode)(`div`,{ref:o,class:Ur(`track`),style:e,onTouchstartPassive:v,onTouchend:b,onTouchcancel:b},[(0,n.createVNode)(`div`,{class:Ur(`head`),style:u()},[h()]),r.default?.call(r)])])}}}));function Yr(e){return Array.isArray(e)?e:Array.from(e)}function Xr(e){return e!=null&&typeof e!=`function`&&we(e.length)}function Zr(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function Qr(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function $r(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map($r).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function ei(e){if(Array.isArray(e))return e.map(Qr);if(typeof e==`symbol`)return[e];e=$r(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&(t.push(``),r++);r<n;){let s=e[r];a?s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s:o?s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s:s===`[`?(o=!0,i&&=(t.push(i),``)):s===`.`?i&&=(t.push(i),``):i+=s,r++}return i&&t.push(i),t}function ti(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(ye(t))return n;let r=e[t];return r===void 0?Zr(t)?ti(e,ei(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=Qr(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return ni(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),ye(t))return n;let r=e[t];return r===void 0?n:r}}}function ni(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||ye(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function ri(e){return function(t){return ti(t,e)}}function ii(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function ai(e,t,n){return typeof n==`function`?oi(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?oi(t,r,e,s):!!c},new Map):di(e,t)}function oi(e,t,n,r){if(t===e)return!0;switch(typeof t){case`object`:return si(e,t,n,r);case`function`:return Object.keys(t).length>0?oi(e,{...t},n,r):xe(e,t);default:return ii(e)?typeof t==`string`?t===``:!0:xe(e,t)}}function si(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return li(e,t,n,r);if(t instanceof Map)return ci(e,t,n,r);if(t instanceof Set)return ui(e,t,n,r);let i=Object.keys(t);if(e==null)return i.length===0;if(i.length===0)return!0;if(r&&r.has(t))return r.get(t)===e;r&&r.set(t,e);try{for(let a=0;a<i.length;a++){let o=i[a];if(!g(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r&&r.delete(t)}}function ci(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function li(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function ui(e,t,n,r){return t.size===0?!0:e instanceof Set?li([...e],[...t],n,r):!1}function di(e,t){return ai(e,t,()=>void 0)}function fi(e){return e=ve(e),t=>di(t,e)}function pi(e,t){return he(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`)switch(Object.prototype.toString.call(e)){case S:case x:case C:{let t=new e.constructor(e?.valueOf());return D(t,e),t}case w:{let t={};return D(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}})}function mi(e){return pi(e)}var hi=/^(?:0|[1-9]\d*)$/;function gi(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return hi.test(e)}}function _i(e){return typeof e==`object`&&!!e&&y(e)===`[object Arguments]`}function vi(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&Zr(t)&&e?.[t]==null?ei(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||_i(r))&&gi(t)&&t<r.length))return!1;r=r[t]}return!0}function yi(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=Qr(e);break}return t=mi(t),function(n){let r=ti(n,e);return r===void 0?vi(n,e):t===void 0?r===void 0:di(r,t)}}function bi(e){if(e==null)return p;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?yi(e[0],e[1]):fi(e);case`string`:case`symbol`:case`number`:return ri(e)}}function xi(e){if(Xr(e))return l(Yr(e))}function Si(e){return typeof e==`string`||e instanceof String}function Ci(e,t=p){return u(e,bi(t))}function wi(e){return typeof e==`number`||e instanceof Number}function Ti(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=f(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function Ei(e,t,n=0){if(t=Number(t),Object.is(t,-0)&&(t=`-0`),n=Math.min(Number.parseInt(n,10),292),n){let[r,i=0]=t.toString().split(`e`),a=Math[e](Number(`${r}e${Number(i)+n}`));Object.is(a,-0)&&(a=`-0`);let[o,s=0]=a.toString().split(`e`);return Number(`${o}e${Number(s)-n}`)}return Math[e](Number(t))}function Di(e,t=0){return Ei(`ceil`,e,t)}function Oi(...e){}function ki(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function Ai(e){return _(e)}function ji(e){if(e==null)return!0;if(Xr(e))return typeof e.splice!=`function`&&typeof e!=`string`&&(typeof Buffer>`u`||!Buffer.isBuffer(e))&&!Ai(e)&&!_i(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return ki(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}function Mi(e,t){return(0,n.getCurrentScope)()?((0,n.onScopeDispose)(e,t),!0):!1}var Ni=new WeakMap,Pi=(...e)=>{let t=e[0],r=(0,n.getCurrentInstance)()?.proxy??(0,n.getCurrentScope)();if(r==null&&!(0,n.hasInjectionContext)())throw Error(`injectLocal must be called in setup`);return r&&Ni.has(r)&&t in Ni.get(r)?Ni.get(r)[t]:(0,n.inject)(...e)},Fi=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var Ii=e=>e!==void 0,Li=e=>e!=null,Ri=Object.prototype.toString,zi=e=>Ri.call(e)===`[object Object]`,Bi=()=>{};function Vi(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function Hi(e,t={}){let r,i,a=Bi,o=e=>{clearTimeout(e),a(),a=Bi},s;return c=>{let l=(0,n.toValue)(e),u=(0,n.toValue)(t.maxWait);return r&&o(r),l<=0||u!==void 0&&u<=0?(i&&=(o(i),void 0),Promise.resolve(c())):new Promise((e,n)=>{a=t.rejectOnCancel?n:e,s=c,u&&!i&&(i=setTimeout(()=>{r&&o(r),i=void 0,e(s())},u)),r=setTimeout(()=>{i&&o(i),i=void 0,e(c())},l)})}}function Ui(...e){let t=0,r,i=!0,a=Bi,o,s,c,l,u;!(0,n.isRef)(e[0])&&typeof e[0]==`object`?{delay:s,trailing:c=!0,leading:l=!0,rejectOnCancel:u=!1}=e[0]:[s,c=!0,l=!0,u=!1]=e;let d=()=>{r&&(clearTimeout(r),r=void 0,a(),a=Bi)};return e=>{let f=(0,n.toValue)(s),p=Date.now()-t,m=()=>o=e();return d(),f<=0?(t=Date.now(),m()):(p>f?(t=Date.now(),(l||!i)&&m()):c&&(o=new Promise((e,n)=>{a=u?n:e,r=setTimeout(()=>{t=Date.now(),i=!0,e(m()),d()},Math.max(0,f-p))})),!l&&!r&&(r=setTimeout(()=>i=!0,f)),i=!1,o)}}function Wi(e,t=!1,n=`Timeout`){return new Promise((r,i)=>{t?setTimeout(()=>i(n),e):setTimeout(r,e)})}function Gi(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function Ki(e){return Array.isArray(e)?e:[e]}function qi(e){return e||(0,n.getCurrentInstance)()}function Ji(e,t=200,n={}){return Vi(Hi(t,n),e)}function Yi(e,t=200,n=!1,r=!0,i=!1){return Vi(Ui(t,n,r,i),e)}function Xi(e,t=!0,r){qi(r)?(0,n.onMounted)(e,r):t?e():(0,n.nextTick)(e)}function Zi(e,t=!1){function r(r,{flush:i=`sync`,deep:a=!1,timeout:o,throwOnTimeout:s}={}){let c=null,l=[new Promise(o=>{c=(0,n.watch)(e,e=>{r(e)!==t&&(c?c():(0,n.nextTick)(()=>c?.()),o(e))},{flush:i,deep:a,immediate:!0})})];return o!=null&&l.push(Wi(o,s).then(()=>(0,n.toValue)(e)).finally(()=>c?.())),Promise.race(l)}function i(i,a){if(!(0,n.isRef)(i))return r(e=>e===i,a);let{flush:o=`sync`,deep:s=!1,timeout:c,throwOnTimeout:l}=a??{},u=null,d=[new Promise(r=>{u=(0,n.watch)([e,i],([e,i])=>{t!==(e===i)&&(u?u():(0,n.nextTick)(()=>u?.()),r(e))},{flush:o,deep:s,immediate:!0})})];return c!=null&&d.push(Wi(c,l).then(()=>(0,n.toValue)(e)).finally(()=>(u?.(),(0,n.toValue)(e)))),Promise.race(d)}function a(e){return r(e=>!!e,e)}function o(e){return i(null,e)}function s(e){return i(void 0,e)}function c(e){return r(Number.isNaN,e)}function l(e,t){return r(t=>{let r=Array.from(t);return r.includes(e)||r.includes((0,n.toValue)(e))},t)}function u(e){return d(1,e)}function d(e=1,t){let n=-1;return r(()=>(n+=1,n>=e),t)}return Array.isArray((0,n.toValue)(e))?{toMatch:r,toContains:l,changed:u,changedTimes:d,get not(){return Zi(e,!t)}}:{toMatch:r,toBe:i,toBeTruthy:a,toBeNull:o,toBeNaN:c,toBeUndefined:s,changed:u,changedTimes:d,get not(){return Zi(e,!t)}}}function Qi(e){return Zi(e)}function $i(e,t,r){return(0,n.watch)(e,t,{...r,immediate:!0})}function ea(e,t,r){return(0,n.watch)(e,t,{...r,once:!0})}function ta(e,t,r){let i;i=(0,n.isRef)(r)?{evaluating:r}:r||{};let{lazy:a=!1,flush:o=`sync`,evaluating:s=void 0,shallow:c=!0,onError:l=globalThis.reportError??Bi}=i,u=(0,n.shallowRef)(!a),d=c?(0,n.shallowRef)(t):(0,n.ref)(t),f=0;return(0,n.watchEffect)(async t=>{if(!u.value)return;f++;let n=f,r=!1;s&&Promise.resolve().then(()=>{s.value=!0});try{let i=await e(e=>{t(()=>{s&&(s.value=!1),r||e()})});n===f&&(d.value=i)}catch(e){l(e)}finally{s&&n===f&&(s.value=!1),r=!0}},{flush:o}),a?(0,n.computed)(()=>(u.value=!0,d.value)):d}var na=Fi?window:void 0;Fi&&window.document,Fi&&window.navigator,Fi&&window.location;function ra(e){let t=(0,n.toValue)(e);return t?.$el??t}function ia(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),r=(0,n.computed)(()=>{let t=Ki((0,n.toValue)(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return $i(()=>[r.value?.map(e=>ra(e))??[na].filter(e=>e!=null),Ki((0,n.toValue)(r.value?e[1]:e[0])),Ki((0,n.unref)(r.value?e[2]:e[1])),(0,n.toValue)(r.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=zi(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function aa(){let e=(0,n.shallowRef)(!1),t=(0,n.getCurrentInstance)();return t&&(0,n.onMounted)(()=>{e.value=!0},t),e}function oa(e){let t=aa();return(0,n.computed)(()=>(t.value,!!e()))}function sa(e,t,r={}){let{window:i=na,...a}=r,o,s=oa(()=>i&&`MutationObserver`in i),c=()=>{o&&=(o.disconnect(),void 0)},l=(0,n.watch)((0,n.computed)(()=>{let t=Ki((0,n.toValue)(e)).map(ra).filter(Li);return new Set(t)}),e=>{c(),s.value&&e.size&&(o=new MutationObserver(t),e.forEach(e=>o.observe(e,a)))},{immediate:!0,flush:`post`}),u=()=>o?.takeRecords(),d=()=>{l(),c()};return Mi(d),{isSupported:s,stop:d,takeRecords:u}}var ca=500,la=10;function ua(e,t,r){var i,a;let o=(0,n.computed)(()=>ra(e)),s,c,l,u=!1;function d(){s&&=(clearTimeout(s),void 0),c=void 0,l=void 0,u=!1}function f(e){let t=r?.delay;return typeof t==`function`?t(e):t??ca}function p(e){var t,n,i;let[a,s,f]=[l,c,u];if(d(),!r?.onMouseUp||!s||!a||!(r==null||(t=r.modifiers)==null)&&t.self&&e.target!==o.value)return;!(r==null||(n=r.modifiers)==null)&&n.prevent&&e.preventDefault(),!(r==null||(i=r.modifiers)==null)&&i.stop&&e.stopPropagation();let p=e.x-s.x,m=e.y-s.y,h=Math.sqrt(p*p+m*m);r.onMouseUp(e.timeStamp-a,h,f)}function m(e){var n,i,a;!(r==null||(n=r.modifiers)==null)&&n.self&&e.target!==o.value||(d(),!(r==null||(i=r.modifiers)==null)&&i.prevent&&e.preventDefault(),!(r==null||(a=r.modifiers)==null)&&a.stop&&e.stopPropagation(),c={x:e.x,y:e.y},l=e.timeStamp,s=setTimeout(()=>{u=!0,t(e)},f(e)))}function h(e){var t,n,i;if(!(r==null||(t=r.modifiers)==null)&&t.self&&e.target!==o.value||!c||r?.distanceThreshold===!1)return;!(r==null||(n=r.modifiers)==null)&&n.prevent&&e.preventDefault(),!(r==null||(i=r.modifiers)==null)&&i.stop&&e.stopPropagation();let a=e.x-c.x,s=e.y-c.y;Math.sqrt(a*a+s*s)>=(r?.distanceThreshold??la)&&d()}let g={capture:r==null||(i=r.modifiers)==null?void 0:i.capture,once:r==null||(a=r.modifiers)==null?void 0:a.once},_=[ia(o,`pointerdown`,m,g),ia(o,`pointermove`,h,g),ia(o,[`pointerup`,`pointerleave`],p,g)];return()=>_.forEach(e=>e())}var da=Symbol(`vueuse-ssr-width`);function fa(){let e=(0,n.hasInjectionContext)()?Pi(da,null):null;return typeof e==`number`?e:void 0}function pa(e,t={}){let{window:r=na,ssrWidth:i=fa()}=t,a=oa(()=>r&&`matchMedia`in r&&typeof r.matchMedia==`function`),o=(0,n.shallowRef)(typeof i==`number`),s=(0,n.shallowRef)(),c=(0,n.shallowRef)(!1);return(0,n.watchEffect)(()=>{if(o.value){o.value=!a.value,c.value=(0,n.toValue)(e).split(`,`).some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),r=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||r);return n&&a&&(a=i>=Gi(n[1])),r&&a&&(a=i<=Gi(r[1])),t?!a:a});return}a.value&&(s.value=r.matchMedia((0,n.toValue)(e)),c.value=s.value.matches)}),ia(s,`change`,e=>{c.value=e.matches},{passive:!0}),(0,n.computed)(()=>c.value)}function ma(e,t,r={}){let{window:i=na,...a}=r,o,s=oa(()=>i&&`ResizeObserver`in i),c=()=>{o&&=(o.disconnect(),void 0)},l=(0,n.watch)((0,n.computed)(()=>{let t=(0,n.toValue)(e);return Array.isArray(t)?t.map(e=>ra(e)):[ra(t)]}),e=>{if(c(),s.value&&i){o=new ResizeObserver(t);for(let t of e)t&&o.observe(t,a)}},{immediate:!0,flush:`post`}),u=()=>{c(),l()};return Mi(u),{isSupported:s,stop:u}}var ha=1;function ga(e,t={}){let{throttle:r=0,idle:i=200,onStop:a=Bi,onScroll:o=Bi,offset:s={left:0,right:0,top:0,bottom:0},observe:c={mutation:!1},eventListenerOptions:l={capture:!1,passive:!0},behavior:u=`auto`,window:d=na,onError:f=e=>{console.error(e)}}=t,p=typeof c==`boolean`?{mutation:c}:c,m=(0,n.shallowRef)(0),h=(0,n.shallowRef)(0),g=(0,n.computed)({get(){return m.value},set(e){v(e,void 0)}}),_=(0,n.computed)({get(){return h.value},set(e){v(void 0,e)}});function v(t,r){var i,a;if(!d)return;let o=(0,n.toValue)(e);if(!o)return;(i=o instanceof Document?d.document.body:o)==null||i.scrollTo({top:(0,n.toValue)(r)??_.value,left:(0,n.toValue)(t)??g.value,behavior:(0,n.toValue)(u)});let s=(o==null||(a=o.document)==null?void 0:a.documentElement)||o?.documentElement||o;g!=null&&(m.value=s.scrollLeft),_!=null&&(h.value=s.scrollTop)}let y=(0,n.shallowRef)(!1),b=(0,n.reactive)({left:!0,right:!1,top:!0,bottom:!1}),x=(0,n.reactive)({left:!1,right:!1,top:!1,bottom:!1}),S=e=>{y.value&&(y.value=!1,x.left=!1,x.right=!1,x.top=!1,x.bottom=!1,a(e))},C=Ji(S,r+i),w=e=>{var t;if(!d)return;let n=(e==null||(t=e.document)==null?void 0:t.documentElement)||e?.documentElement||ra(e),{display:r,flexDirection:i,direction:a}=d.getComputedStyle(n),o=a===`rtl`?-1:1,c=n.scrollLeft;x.left=c<m.value,x.right=c>m.value;let l=Math.abs(c*o)<=(s.left||0),u=Math.abs(c*o)+n.clientWidth>=n.scrollWidth-(s.right||0)-ha;r===`flex`&&i===`row-reverse`?(b.left=u,b.right=l):(b.left=l,b.right=u),m.value=c;let f=n.scrollTop;e===d.document&&!f&&(f=d.document.body.scrollTop),x.top=f<h.value,x.bottom=f>h.value;let p=Math.abs(f)<=(s.top||0),g=Math.abs(f)+n.clientHeight>=n.scrollHeight-(s.bottom||0)-ha;r===`flex`&&i===`column-reverse`?(b.top=g,b.bottom=p):(b.top=p,b.bottom=g),h.value=f},ee=e=>{d&&(w(e.target.documentElement??e.target),y.value=!0,C(e),o(e))};return ia(e,`scroll`,r?Yi(ee,r,!0,!1):ee,l),Xi(()=>{try{let t=(0,n.toValue)(e);if(!t)return;w(t)}catch(e){f(e)}}),p?.mutation&&e!=null&&e!==d&&e!==document&&sa(e,()=>{let t=(0,n.toValue)(e);t&&w(t)},{attributes:!0,childList:!0,subtree:!0}),ia(e,`scrollend`,S,l),{x:g,y:_,isScrolling:y,arrivedState:b,directions:x,measure(){let t=(0,n.toValue)(e);d&&t&&w(t)}}}function _a(e={}){let{window:t=na,initialWidth:r=1/0,initialHeight:i=1/0,listenOrientation:a=!0,includeScrollbar:o=!0,type:s=`inner`}=e,c=(0,n.shallowRef)(r),l=(0,n.shallowRef)(i),u=()=>{if(t)if(s===`outer`)c.value=t.outerWidth,l.value=t.outerHeight;else if(s===`visual`&&t.visualViewport){let{width:e,height:n,scale:r}=t.visualViewport;c.value=Math.round(e*r),l.value=Math.round(n*r)}else o?(c.value=t.innerWidth,l.value=t.innerHeight):(c.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight)};u(),Xi(u);let d={passive:!0};return ia(`resize`,u,d),t&&s===`visual`&&t.visualViewport&&ia(t.visualViewport,`resize`,u,d),a&&(0,n.watch)(pa(`(orientation: portrait)`),()=>u()),{width:c,height:l}}var va=(0,a.useGlobalVar)((0,n.shallowReactive)([]),`utils/layers`);const ya=e=>{let t=Symbol(`layer`),r=(0,n.watch)((0,n.toRef)(e),e=>{e?va.push(t):Ci(va,e=>e===t)},{immediate:!0});try{(0,n.onUnmounted)(r)}catch{}return[(0,n.computed)(()=>(va.indexOf(t)+1)*10),(0,n.computed)(()=>xi(va)===t),r]},ba=(e,t={})=>{let r=(0,n.shallowRef)(!0),[,,i]=ya(r),a=window.$api.showImagePreview({images:e,...t,overlayClass:`!z-2147483646`,className:`!z-2147483646`,onClose(){r.value=!1},showIndex:e.length>1,teleport:`#popups`}),o=window.$router.beforeEach(()=>r.value=!1);return ea(r,()=>{o(),i(),a.show=!1}),{isShowing:(0,n.computed)(()=>a.show),close:()=>{r.value=!1}}};var xa=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,n.defineComponent)({__name:`DcLoading`,props:{size:{},type:{},color:{},vertical:{type:Boolean},textSize:{},textColor:{}},setup(e){(0,n.useCssVars)(e=>({f9087f1c:r.value}));let t=e,r=(0,n.computed)(()=>wi(t.size)?`${t.size}px`:t.size);return(e,r)=>{let i=Cn;return(0,n.openBlock)(),(0,n.createBlock)(i,(0,n.normalizeProps)((0,n.guardReactiveProps)(t)),{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`default`,{},void 0,!0)]),_:3},16)}}}),[[`__scopeId`,`data-v-356358f0`]]),Sa=(0,n.defineComponent)({__name:`DcImage`,props:{src:{},alt:{},previewable:{type:Boolean},retryMax:{default:2},round:{type:Boolean},fit:{},class:{},hideLoading:{type:Boolean},hideError:{type:Boolean},inline:{type:Boolean},style:{type:[Boolean,null,String,Object,Array]},imgProp:{},useList:{},fetchpriority:{default:`auto`},fallback:{}},emits:[`load`,`click`,`error`],setup(e,{expose:t,emit:i}){let a=e,s=ta(async()=>{try{return a.src?Si(a.src)?a.src:await a.src.getUrl():``}catch(e){console.error(e)}return``},``),c=i,l=0,u=!1,d=async()=>{if(u)return p.error.add(s.value),c(`error`);if(l++,m.value=!1,l>a.retryMax){if(!r.uni.resource.Resource.is(a.src)){u=!0,d();return}if(!a.src.localChangeFork()){u=!0,d();return}l=0}await(0,n.nextTick)(),m.value=!0},f=(0,o.useTemp)().$apply(`imageState`,()=>({loaded:new Set,error:new Set})),p=a.useList??f,m=(0,n.shallowRef)(!0),h=()=>{u=!1,l=0,d()};(0,n.watch)(s,h);let g=(0,n.computed)(()=>p.loaded.has(s.value)),_=ta(async()=>{try{return a.fallback?Si(a.fallback)?a.fallback:await a.fallback.getUrl():``}catch(e){console.error(e)}return``},``),v=e=>{c(`click`),a.previewable&&(e.stopPropagation(),ba([s.value],{closeable:!0}))},y=(...e)=>{c(`load`,...e),p.loaded.add(s.value)},b=(0,n.useTemplateRef)(`img`);t({isLoaded:g,imageEl:(0,n.computed)(()=>b.value?.imageRef),imageIns:b});let x=window.$api.NImage;return(t,r)=>{let i=_n;return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[m.value?(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(x),(0,n.mergeProps)({key:0,onError:d},a,{"object-fit":e.fit,"preview-disabled":``,alt:e.alt,ref_key:`img`,ref:b,"img-props":{...e.imgProp??{},class:`w-full`,fetchpriority:a.fetchpriority},class:[{"rounded-full!":!!e.round},e.inline?`inline-flex`:`flex`,a.class],style:e.style,onLoad:y,onClick:v,src:(0,n.unref)(s)}),null,16,[`object-fit`,`alt`,`img-props`,`class`,`style`,`src`])),[[n.vShow,!(0,n.unref)(p).error.has((0,n.unref)(s))&&(0,n.unref)(p).loaded.has((0,n.unref)(s))]]):(0,n.createCommentVNode)(``,!0),!(0,n.unref)(p).loaded.has((0,n.unref)(s))&&!(0,n.unref)(p).error.has((0,n.unref)(s))&&!e.hideLoading?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:1,class:(0,n.normalizeClass)([`items-center justify-center`,[{"rounded-full!":!!e.round},e.inline?`inline-flex`:`flex`,a.class]]),style:(0,n.normalizeStyle)(e.style),onClick:r[0]||=e=>c(`click`)},[t.$slots.loading?(0,n.renderSlot)(t.$slots,`loading`,{key:0}):((0,n.openBlock)(),(0,n.createBlock)(xa,{key:1}))],6)):(0,n.createCommentVNode)(``,!0),(0,n.unref)(p).error.has((0,n.unref)(s))&&!e.hideError?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:2},[e.fallback?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(x),(0,n.mergeProps)({key:0,onError:d},a,{"object-fit":e.fit,"preview-disabled":``,alt:e.alt,"img-props":{...e.imgProp??{},class:`w-full`,fetchpriority:a.fetchpriority},class:[{"rounded-full!":!!e.round},e.inline?`inline-flex`:`flex`,a.class],style:e.style,src:(0,n.unref)(_)}),null,16,[`object-fit`,`alt`,`img-props`,`class`,`style`,`src`])):((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:1,class:(0,n.normalizeClass)([`flex-col items-center justify-center`,[{"rounded-full!":!!e.round},e.inline?`inline-flex`:`flex`,a.class]]),onClick:r[1]||=(0,n.withModifiers)(()=>{(0,n.unref)(p).error.delete((0,n.unref)(s)),h()},[`stop`])},[t.$slots.loading?(0,n.renderSlot)(t.$slots,`loading`,{key:0}):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createVNode)(i,{name:`warning-o`,size:`2.5rem`,color:`var(--van-text-color-2)`}),r[2]||=(0,n.createElementVNode)(`div`,{class:`text-sm text-(--van-text-color-2)`},`点击重试`,-1)],64))],2))],64)):(0,n.createCommentVNode)(``,!0)],64)}}}),Ca=(0,n.defineComponent)({__name:`DcImagedIcon`,props:{icon:{},bgColor:{},sizeSpacing:{}},setup(e){return(t,a)=>{let o=i.NIcon;return(0,n.unref)(r.uni).image.Image.is(e.icon)||(0,n.unref)(r.uni).resource.Resource.is(e.icon)?((0,n.openBlock)(),(0,n.createBlock)(Sa,{key:0,class:`aspect-square size-[calc(var(--spacing)*var(--box-size))] shrink-0`,src:(0,n.unref)(r.uni).resource.Resource.is(e.icon)?(0,n.unref)(r.uni).image.Image.create(e.icon):e.icon,round:``,fit:`cover`,style:(0,n.normalizeStyle)(`--box-size:${e.sizeSpacing};background-color:${e.bgColor??` var(--color-gray-200)`};`)},null,8,[`src`,`style`])):((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:1,class:`flex aspect-square size-[calc(var(--spacing)*var(--box-size))] items-center justify-center rounded-full bg-gray-200`,style:(0,n.normalizeStyle)(`--box-size:${e.sizeSpacing};background-color:${e.bgColor??` var(--color-gray-200)`};`)},[(0,n.createVNode)(o,{color:`var(--p-color)`,size:`calc(var(--spacing) * ${e.sizeSpacing/10*6.5})`},{default:(0,n.withCtx)(()=>[((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.icon)))]),_:1},8,[`size`])],4))}}}),wa=(0,n.defineComponent)({__name:`DcAuthorIcon`,props:{author:{},sizeSpacing:{}},setup(e){let t=e,i=(0,n.computed)(()=>Te(t.author.icon)?r.uni.item.Item.authorIcon.get([t.author.$$plugin,t.author.icon]):r.uni.image.Image.create(t.author.icon));return(t,r)=>((0,n.openBlock)(),(0,n.createBlock)(Ca,{icon:i.value,sizeSpacing:e.sizeSpacing},null,8,[`icon`,`sizeSpacing`]))}}),Ta=(0,n.defineComponent)({__name:`DcAwait`,props:{promise:{type:Function},autoLoad:{type:Boolean}},setup(e){let t=e,r=(0,n.shallowRef)(),i=async()=>r.value=await t.promise();return(0,n.watch)(()=>[t.promise,t.autoLoad],e=>{t.autoLoad&&i()},{immediate:!0}),(e,t)=>(0,n.renderSlot)(e.$slots,`default`,{load:i,result:r.value})}}),Ea=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],F={value:null,addProjectionMetrics:null};function Da(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),t&&F.value&&F.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Oa={},ka=40;function Aa(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ea.reduce((e,n)=>(e[n]=Da(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=Oa.useManualTiming?i.timestamp:performance.now();n=!1,Oa.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,ka),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Ea.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Ea.length;t++)o[Ea[t]].cancel(e)},state:i,steps:o}}var I=e=>e,{schedule:L,cancel:ja,state:R,steps:Ma}=Aa(typeof requestAnimationFrame<`u`?requestAnimationFrame:I,!0),Na;function Pa(){Na=void 0}var z={now:()=>(Na===void 0&&z.set(R.isProcessing||Oa.useManualTiming?R.timestamp:performance.now()),Na),set:e=>{Na=e,queueMicrotask(Pa)}},B=e=>e*1e3,V=e=>e/1e3;function Fa(e,t){let n=z.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(ja(r),e(a-t))};return L.setup(r,!0),()=>ja(r)}var Ia=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),La=Ia(`deg`),H=Ia(`%`),U=Ia(`px`),Ra=Ia(`vh`),za=Ia(`vw`),Ba={...H,parse:e=>H.parse(e)/100,transform:e=>H.transform(e*100)};function Va(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var W={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(U.test(e))e=parseFloat(e);else return e;return`${Va(e,t.target.x)}% ${Va(e,t.target.y)}%`}},G=(e,t,n)=>n>t?t:n<e?e:n,Ha={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Ua={...Ha,transform:e=>G(0,1,e)},Wa={...Ha,default:1},Ga=e=>Math.round(e*1e5)/1e5,Ka=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function qa(e){return e==null}var Ja=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ya=(e,t)=>n=>!!(typeof n==`string`&&Ja.test(n)&&n.startsWith(e)||t&&!qa(n)&&Object.prototype.hasOwnProperty.call(n,t)),Xa=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Ka);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Za=e=>G(0,255,e),Qa={...Ha,transform:e=>Math.round(Za(e))},$a={test:Ya(`rgb`,`red`),parse:Xa(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Qa.transform(e)+`, `+Qa.transform(t)+`, `+Qa.transform(n)+`, `+Ga(Ua.transform(r))+`)`};function eo(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var to={test:Ya(`#`),parse:eo,transform:$a.transform},no={test:Ya(`hsl`,`hue`),parse:Xa(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+H.transform(Ga(t))+`, `+H.transform(Ga(n))+`, `+Ga(Ua.transform(r))+`)`},K={test:e=>$a.test(e)||to.test(e)||no.test(e),parse:e=>$a.test(e)?$a.parse(e):no.test(e)?no.parse(e):to.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?$a.transform(e):no.transform(e),getAnimatableNone:e=>{let t=K.parse(e);return t.alpha=0,K.transform(t)}},ro=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function io(e){return isNaN(e)&&typeof e==`string`&&(e.match(Ka)?.length||0)+(e.match(ro)?.length||0)>0}var ao=`number`,oo=`color`,so=`var`,co=`var(`,lo="${}",uo=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function fo(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(uo,e=>(K.test(e)?(r.color.push(a),i.push(oo),n.push(K.parse(e))):e.startsWith(co)?(r.var.push(a),i.push(so),n.push(e)):(r.number.push(a),i.push(ao),n.push(parseFloat(e))),++a,lo)).split(lo),indexes:r,types:i}}function po(e){return fo(e).values}function mo(e){let{split:t,types:n}=fo(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];t===ao?i+=Ga(e[a]):t===oo?i+=K.transform(e[a]):i+=e[a]}return i}}var ho=e=>typeof e==`number`?0:K.test(e)?K.getAnimatableNone(e):e;function go(e){let t=po(e);return mo(e)(t.map(ho))}var _o={test:io,parse:po,createTransformer:mo,getAnimatableNone:go},q=(e,t,n)=>e+(t-e)*n,vo={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=_o.parse(e);if(i.length>5)return r;let a=_o.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=q(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},yo=e=>t=>typeof t==`string`&&t.startsWith(e),bo=yo(`--`),xo=yo(`var(--`),So=e=>xo(e)?Co.test(e.split(`/*`)[0].trim()):!1,Co=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function wo(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var To={borderRadius:{...W,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomLeftRadius:W,borderBottomRightRadius:W,boxShadow:vo};function Eo(e){for(let t in e)To[t]=e[t],bo(t)&&(To[t].isCSSVariable=!0)}function Do(e,t){let r=typeof e==`string`&&!t?`${e}Context`:t,i=Symbol(r);return[t=>{let r=(0,n.inject)(i,t);if(r===void 0)throw Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`);return r},e=>((0,n.provide)(i,e),e)]}var[Oo,ko]=Do(`Motion`),[Ao,jo]=Do(`LayoutGroup`);function Mo(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}var No=class{constructor(e){this.state=e}beforeMount(){}mount(){}unmount(){}update(){}beforeUpdate(e){}beforeUnmount(){}},Po=function(){},Fo=function(){};process.env.NODE_ENV!==`production`&&(Po=function(e,t){!e&&typeof console<`u`&&console.warn(t)},Fo=function(e,t){if(!e)throw Error(t)});function Io(e,t,n){if(Array.isArray(e))return e.reduce((e,r)=>{let i=Io(r,t,n);return i?{...e,...i}:e},{});if(typeof e==`object`)return e;if(e&&t){let r=t[e];return typeof r==`function`?r(n):r}}function Lo(e,t){return typeof e==typeof t?Array.isArray(e)&&Array.isArray(t)?!Ro(e,t):e!==t:!0}function Ro(e,t){let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function zo(e){return e?.startsWith(`--`)}var Bo=e=>e;function Vo(e){return typeof e==`number`}var Ho=`animate.circle.defs.desc.ellipse.g.image.line.filter.marker.mask.metadata.path.pattern.polygon.polyline.rect.stop.svg.switch.symbol.text.tspan.use.view.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath`.split(`.`),Uo=new Set(Ho);function Wo(e){return Uo.has(e)}var Go=class{constructor(e){this.features=[];let{features:t=[],lazyMotionContext:r}=e.options,i=t.concat(r.features.value);this.features=i.map(t=>new t(e));let a=this.features;(0,n.watch)(r.features,t=>{t.forEach(t=>{if(!i.includes(t)){i.push(t);let n=new t(e);a.push(n),e.isMounted()&&(n.beforeMount(),n.mount())}})},{flush:`pre`})}mount(){this.features.forEach(e=>e.mount())}beforeMount(){this.features.forEach(e=>e.beforeMount?.call(e))}unmount(){this.features.forEach(e=>e.unmount())}update(){this.features.forEach(e=>e.update?.call(e))}beforeUpdate(e){this.features.forEach(t=>t.beforeUpdate?.call(t,e))}beforeUnmount(){this.features.forEach(e=>e.beforeUnmount())}};function Ko(e){return typeof e==`string`||e===!1||Array.isArray(e)}var qo=new WeakMap,Jo=0,Yo=class{constructor(e,t){var n;this.element=null,this.isExiting=!1,this.presenceContainer=null,this.children=new Set,this.activeStates={initial:!0,animate:!0},this.currentProcess=null,this._context=null,this.animateUpdates=I,this.id=`motion-state-${Jo++}`,this.options=e,this.parent=t,(n=t?.children)==null||n.add(this);let r=(e.initial===void 0&&e.variants?this.context.initial:e.initial)===!1?[`initial`,`animate`]:[`initial`];this.initTarget(r),this.featureManager=new Go(this),this.type=Wo(this.options.as)?`svg`:`html`}get context(){return this._context||=new Proxy({},{get:(e,t)=>Ko(this.options[t])?this.options[t]:this.parent?.context[t]}),this._context}initTarget(e){let t=this.options.custom??this.options.animatePresenceContext?.custom;this.baseTarget=e.reduce((e,n)=>({...e,...Io(this.options[n]||this.context[n],this.options.variants,t)}),{}),this.target={}}updateOptions(e){var t;this.options=e,(t=this.visualElement)==null||t.update({...this.options,whileTap:this.options.whilePress},null)}beforeMount(){this.featureManager.beforeMount()}mount(e,t,n=!1){var r;Fo(!!e,`Animation state must be mounted with valid Element`),this.element=e,this.updateOptions(t),this.featureManager.mount(),!n&&this.options.animate&&((r=this.startAnimation)==null||r.call(this))}clearAnimation(){var e;this.currentProcess&&ja(this.currentProcess),this.currentProcess=null,(e=this.visualElement?.variantChildren)==null||e.forEach(e=>{e.state.clearAnimation()})}startAnimation(){this.clearAnimation(),this.currentProcess=L.render(()=>{this.currentProcess=null,this.animateUpdates()})}beforeUnmount(){this.featureManager.beforeUnmount()}unmount(){var e,t;(e=this.parent?.children)==null||e.delete(this),qo.delete(this.element),this.featureManager.unmount(),(t=this.visualElement)==null||t.unmount(),this.clearAnimation()}beforeUpdate(e){this.featureManager.beforeUpdate(e)}update(e){this.updateOptions(e),this.featureManager.update(),this.startAnimation()}setActive(e,t,n=!0){var r;!this.element||this.activeStates[e]===t||(this.activeStates[e]=t,(r=this.visualElement.variantChildren)==null||r.forEach(n=>{n.state.setActive(e,t,!1)}),n&&this.animateUpdates({isExit:e===`exit`&&this.activeStates.exit}))}isMounted(){return!!this.element}getSnapshot(e,t){}didUpdate(e){}},Xo=new WeakMap;function Zo(e,t,n){return new CustomEvent(e,{detail:{target:t,isExit:n}})}var Qo={syntax:`<angle>`,initialValue:`0deg`,toDefaultUnit:e=>`${e}deg`},$o={translate:{syntax:`<length-percentage>`,initialValue:`0px`,toDefaultUnit:e=>`${e}px`},rotate:Qo,scale:{syntax:`<number>`,initialValue:1,toDefaultUnit:Bo},skew:Qo},es=[`translate`,`scale`,`rotate`,`skew`],ts=[``,`X`,`Y`,`Z`],ns=new Map,rs=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`];es.forEach(e=>{ts.forEach(t=>{rs.push(e+t),ns.set(e+t,$o[e])})});var is=new Set(rs),as=e=>is.has(e),os={x:`translateX`,y:`translateY`,z:`translateZ`};function ss([e],[t]){return rs.indexOf(e)-rs.indexOf(t)}function cs(e,[t,n]){return`${e} ${t}(${n})`}function ls(e){return e.sort(ss).reduce(cs,``).trim()}var us={translate:[0,0],rotate:0,scale:1,skew:0,x:0,y:0,z:0},J=e=>!!(e&&e.getVelocity),ds={get:(e,t)=>{let n=zo(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!n&&n!==`0`){let e=ns.get(t);e&&(n=e.initialValue)}return n},set:(e,t,n)=>{zo(t)?e.style.setProperty(t,n):e.style[t]=n}};function fs(e){let t={},n=[];for(let r in e){let i=e[r];i=J(i)?i.get():i,as(r)&&r in os&&(r=os[r]);let a=Array.isArray(i)?i[0]:i,o=ns.get(r);o?(a=Vo(i)?o.toDefaultUnit?.call(o,i):i,n.push([r,a])):t[r]=a}return n.length&&(t.transform=ls(n)),Object.keys(t).length===0?null:t}var ps={fill:!0,stroke:!0,opacity:!0,"stroke-width":!0,"fill-opacity":!0,"stroke-opacity":!0,"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,cx:!0,cy:!0,r:!0,d:!0,x1:!0,y1:!0,x2:!0,y2:!0,points:!0,"path-length":!0,viewBox:!0,width:!0,height:!0,"preserve-aspect-ratio":!0,"clip-path":!0,filter:!0,mask:!0,"stop-color":!0,"stop-opacity":!0,"gradient-transform":!0,"gradient-units":!0,"spread-method":!0,"marker-end":!0,"marker-mid":!0,"marker-start":!0,"text-anchor":!0,"dominant-baseline":!0,"font-family":!0,"font-size":!0,"font-weight":!0,"letter-spacing":!0,"vector-effect":!0};function ms(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}function hs(e,t,n=1,r=0){e.pathLength=1,delete e[`path-length`],e[`stroke-dashoffset`]=U.transform(-r),e[`stroke-dasharray`]=`${U.transform(t)} ${U.transform(n)}`}function gs(e){let t={},n={};for(let r in e){let i=ms(r);if(i in ps){let n=e[r];t[i]=J(n)?n.get():n}else n[r]=e[r]}return t[`path-length`]!==void 0&&hs(t,t[`path-length`],t[`path-spacing`],t[`path-offset`]),{attrs:t,style:n}}function _s({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function vs(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ys(e,t){return _s(vs(e.getBoundingClientRect(),t))}var bs={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},xs={};for(let e in bs)xs[e]={isEnabled:t=>bs[e].some(e=>!!t[e])};var Ss=()=>({translate:0,scale:1,origin:0,originPoint:0}),Cs=()=>({x:Ss(),y:Ss()}),ws=()=>({min:0,max:0}),Y=()=>({x:ws(),y:ws()}),Ts=typeof window<`u`,Es={current:null},Ds={current:!1};function Os(){if(Ds.current=!0,Ts)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Es.current=e.matches;e.addEventListener(`change`,t),t()}else Es.current=!1}function ks(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function As(e){return typeof e==`string`||Array.isArray(e)}var js=[`initial`,...[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`]];function Ms(e){return ks(e.animate)||js.some(t=>As(e[t]))}function Ns(e){return!!(Ms(e)||e.variants)}function Ps(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var Fs=new Set;function Is(e,t,n){e||Fs.has(t)||(console.warn(Ps(t,n)),Fs.add(t))}function Ls(e,t){e.indexOf(t)===-1&&e.push(t)}function Rs(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var zs=class{constructor(){this.subscriptions=[]}add(e){return Ls(this.subscriptions,e),()=>Rs(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function Bs(e,t){return t?1e3/t*e:0}var Vs=30,Hs=e=>!isNaN(parseFloat(e)),Us={current:void 0},Ws=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{var t;let n=z.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&((t=this.events.change)==null||t.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=z.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Hs(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&Is(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new zs);let n=this.events[e].add(t);return e===`change`?()=>{n(),L.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Us.current&&Us.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Vs)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Vs);return Bs(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,t;(e=this.dependents)==null||e.clear(),(t=this.events.destroy)==null||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Gs(e,t){return new Ws(e,t)}function Ks(e,t,n){for(let r in t){let i=t[r],a=n[r];if(J(i))e.addValue(r,i);else if(J(a))e.addValue(r,Gs(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Gs(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}function qs(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Js(e,t,n,r){if(typeof t==`function`){let[i,a]=qs(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=qs(r);t=t(n===void 0?e.custom:n,i,a)}return t}function Ys(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Xs=e=>e*180/Math.PI,Zs=e=>$s(Xs(Math.atan2(e[1],e[0]))),Qs={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Zs,rotateZ:Zs,skewX:e=>Xs(Math.atan(e[1])),skewY:e=>Xs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$s=e=>(e%=360,e<0&&(e+=360),e),ec=Zs,tc=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),nc=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),rc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:tc,scaleY:nc,scale:e=>(tc(e)+nc(e))/2,rotateX:e=>$s(Xs(Math.atan2(e[6],e[5]))),rotateY:e=>$s(Xs(Math.atan2(-e[2],e[0]))),rotateZ:ec,rotate:ec,skewX:e=>Xs(Math.atan(e[4])),skewY:e=>Xs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ic(e){return e.includes(`scale`)?1:0}function ac(e,t){if(!e||e===`none`)return ic(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=rc,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Qs,i=t}if(!i)return ic(t);let a=r[t],o=i[1].split(`,`).map(sc);return typeof a==`function`?a(o):o[a]}var oc=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return ac(n,t)};function sc(e){return parseFloat(e.trim())}var cc=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],lc=new Set(cc),uc=e=>e===Ha||e===U,dc=new Set([`x`,`y`,`z`]),fc=cc.filter(e=>!dc.has(e));function pc(e){let t=[];return fc.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var mc={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ac(t,`x`),y:(e,{transform:t})=>ac(t,`y`)};mc.translateX=mc.x,mc.translateY=mc.y;var hc=new Set,gc=!1,_c=!1,vc=!1;function yc(){if(_c){let e=Array.from(hc).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=pc(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{var r;(r=e.getValue(t))==null||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}_c=!1,gc=!1,hc.forEach(e=>e.complete(vc)),hc.clear()}function bc(){hc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_c=!0)})}function xc(){vc=!0,bc(),yc(),vc=!1}var Sc=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(hc.add(this),gc||(gc=!0,L.read(bc),L.resolveKeyframes(yc))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Ys(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),hc.delete(this)}cancel(){this.state===`scheduled`&&(hc.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Cc=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),wc=e=>/^0[^.\s]+$/u.test(e),Tc={test:e=>e===`auto`,parse:e=>e},Ec=e=>t=>t.test(e),Dc=[Ha,U,H,La,za,Ra,Tc],Oc=e=>Dc.find(Ec(e)),kc=[...Dc,K,_o],Ac=e=>kc.find(Ec(e)),jc=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Mc(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Ka)||[];if(!r)return e;let i=n.replace(r,``),a=jc.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var Nc=/\b([a-z-]*)\(.*?\)/gu,Pc={..._o,getAnimatableNone:e=>{let t=e.match(Nc);return t?t.map(Mc).join(` `):e}},Fc={...Ha,transform:Math.round},Ic={borderWidth:U,borderTopWidth:U,borderRightWidth:U,borderBottomWidth:U,borderLeftWidth:U,borderRadius:U,radius:U,borderTopLeftRadius:U,borderTopRightRadius:U,borderBottomRightRadius:U,borderBottomLeftRadius:U,width:U,maxWidth:U,height:U,maxHeight:U,top:U,right:U,bottom:U,left:U,inset:U,insetBlock:U,insetBlockStart:U,insetBlockEnd:U,insetInline:U,insetInlineStart:U,insetInlineEnd:U,padding:U,paddingTop:U,paddingRight:U,paddingBottom:U,paddingLeft:U,paddingBlock:U,paddingBlockStart:U,paddingBlockEnd:U,paddingInline:U,paddingInlineStart:U,paddingInlineEnd:U,margin:U,marginTop:U,marginRight:U,marginBottom:U,marginLeft:U,marginBlock:U,marginBlockStart:U,marginBlockEnd:U,marginInline:U,marginInlineStart:U,marginInlineEnd:U,backgroundPositionX:U,backgroundPositionY:U,rotate:La,rotateX:La,rotateY:La,rotateZ:La,scale:Wa,scaleX:Wa,scaleY:Wa,scaleZ:Wa,skew:La,skewX:La,skewY:La,distance:U,translateX:U,translateY:U,translateZ:U,x:U,y:U,z:U,perspective:U,transformPerspective:U,opacity:Ua,originX:Ba,originY:Ba,originZ:U,zIndex:Fc,fillOpacity:Ua,strokeOpacity:Ua,numOctaves:Fc},Lc={...Ic,color:K,backgroundColor:K,outlineColor:K,fill:K,stroke:K,borderColor:K,borderTopColor:K,borderRightColor:K,borderBottomColor:K,borderLeftColor:K,filter:Pc,WebkitFilter:Pc},Rc=e=>Lc[e];function zc(e,t){let n=Rc(e);return n!==Pc&&(n=_o),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var{schedule:Bc,cancel:Vc}=Aa(queueMicrotask,!0),Hc=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Uc=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Sc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=z.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,L.render(this.render,!1,!0))};let{latestValues:s,renderState:c}=a;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=Ms(t),this.isVariantNode=Ns(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:l,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in u){let t=u[e];s[e]!==void 0&&J(t)&&t.set(s[e])}}mount(e){var t;this.current=e,Xo.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Ds.current||Os(),this.shouldReduceMotion=Es.current),process.env.NODE_ENV!==`production`&&Is(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),(t=this.parent)==null||t.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),ja(this.notifyUpdate),ja(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=lc.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&L.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in xs){let t=xs[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Y()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Hc.length;t++){let n=Hc[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Ks(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Gs(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Cc(n)||wc(n))?n=parseFloat(n):!Ac(n)&&_o.test(t)&&(n=zc(e,t)),this.setBaseTarget(e,J(n)?n.get():n)),J(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Js(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!J(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new zs),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Bc.render(this.render)}},Wc=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...cc]),Gc=()=>{},Kc=()=>{};typeof process<`u`&&process.env?.NODE_ENV!==`production`&&(Gc=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(Ps(t,n))},Kc=(e,t,n)=>{if(!e)throw Error(Ps(t,n))});var qc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Jc(e){let t=qc.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var Yc=4;function Xc(e,t,n=1){Kc(n<=Yc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=Jc(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Cc(e)?parseFloat(e):e}return So(i)?Xc(i,t,n+1):i}function Zc(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||wc(e)}var Qc=new Set([`auto`,`none`,`0`]);function $c(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Qc.has(t)&&fo(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=zc(n,i)}var el=class extends Sc{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),So(r))){let i=Xc(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Wc.has(n)||e.length!==2)return;let[r,i]=e,a=Oc(r),o=Oc(i);if(wo(r)!==wo(i)&&mc[n]){this.needsMeasurement=!0;return}if(a!==o)if(uc(a)&&uc(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else mc[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Zc(e[t]))&&n.push(t);n.length&&$c(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=mc[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=mc[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},tl=class extends Uc{constructor(){super(...arguments),this.KeyframeResolver=el}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;J(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},nl=(e,t)=>t&&typeof e==`number`?t.transform(e):e,rl={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},il=cc.length;function al(e,t,n){let r=``,i=!0;for(let a=0;a<il;a++){let o=cc[a],s=e[o];if(s===void 0)continue;let c=!0;if(c=typeof s==`number`?s===(o.startsWith(`scale`)?1:0):parseFloat(s)===0,!c||n){let e=nl(s,Ic[o]);if(!c){i=!1;let t=rl[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function ol(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(lc.has(e)){o=!0;continue}else if(bo(e)){i[e]=n;continue}else{let t=nl(n,Ic[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=al(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function sl(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function cl(e,{layout:t,layoutId:n}){return lc.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!To[e]||e===`opacity`)}function ll(e,t,n){let{style:r}=e,i={};for(let a in r)(J(r[a])||t.style&&J(t.style[a])||cl(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function ul(e){return window.getComputedStyle(e)}var dl=class extends tl{constructor(){super(...arguments),this.type=`html`,this.renderInstance=sl}readValueFromInstance(e,t){if(lc.has(t))return this.projection?.isProjecting?ic(t):oc(e,t);{let n=ul(e),r=(bo(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return ys(e,t)}build(e,t,n){ol(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return ll(e,t,n)}},fl=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),pl={offset:`stroke-dashoffset`,array:`stroke-dasharray`},ml={offset:`strokeDashoffset`,array:`strokeDasharray`};function hl(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?pl:ml;e[a.offset]=U.transform(-r);let o=U.transform(t),s=U.transform(n);e[a.array]=`${o} ${s}`}var gl=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function _l(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(ol(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of gl)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&hl(d,i,a,o,!1)}var vl=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),yl=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function bl(e,t,n,r){sl(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(vl.has(n)?n:fl(n),t.attrs[n])}function xl(e,t,n){let r=ll(e,t,n);for(let n in e)if(J(e[n])||J(t[n])){let t=cc.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Sl=class extends tl{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Y}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(lc.has(t)){let e=Rc(t);return e&&e.default||0}return t=vl.has(t)?t:fl(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return xl(e,t,n)}build(e,t,n){_l(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){bl(e,t,n,r)}mount(e){this.isSVGTag=yl(e.tagName),super.mount(e)}};function Cl(e,t){return Wo(e)?new Sl(t):new dl(t)}function wl(e,t,n,r=0,i=1){let a=Array.from(e),o=a.indexOf(t),s=e.size,c=(s-1)*r,l=typeof n==`function`;return o===a.length-1&&(t.parent.enteringChildren=void 0),l?n(o,s):i===1?o*r:c-o*r}function Tl(e){return typeof e==`object`&&!Array.isArray(e)}function El(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Dl(e,t,n,r){return typeof e==`string`&&Tl(t)?El(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Ol(e,t,n){return e*(t+1)}function kl(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}var Al=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},jl=e=>Array.isArray(e)&&typeof e[0]!=`number`;function Ml(e,t){return jl(e)?e[Al(0,e.length,t)]:e}function Nl(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(Rs(e,i),r--)}}function Pl(e,t,n,r,i,a){Nl(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:q(i,a,r[o]),easing:Ml(n,o)})}function Fl(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function Il(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var Ll=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r};function Rl(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Ll(0,t,r);e.push(q(n,1,i))}}function zl(e){let t=[0];return Rl(t,e.length-1),t}var Bl=2e4;function Vl(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function Hl(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Vl(r),Bl);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:V(i)}}function Ul(e){return typeof e==`function`&&`applyToOptions`in e}var Wl=`easeInOut`,Gl=20;function Kl(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}else if(!Array.isArray(o)){l.set(o.name,kl(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=kl(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Yl(e),{delay:l=0,times:u=zl(c),type:p=`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=Ul(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&Ql(c)){let t=c[1]-c[0];e=Math.abs(t)}let t={...v};b!==void 0&&(t.duration=B(b));let n=Hl(t,e,C);y=n.ease,b=n.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let ee=u.length-c.length;if(ee>0&&Rl(u,ee),c.length===1&&c.unshift(null),m){Kc(m<Gl,`Repeat count too high, must be less than 20`,`repeat-count-high`),b=Ol(b,m);let e=[...c],t=[...u];y=Array.isArray(y)?[...y]:[y];let n=[...y];for(let r=0;r<m;r++){c.push(...e);for(let i=0;i<e.length;i++)u.push(t[i]+(r+1)),y.push(i===0?`linear`:Ml(n,i-1))}Fl(u,m)}let te=w+b;Pl(r,c,y,u,w,te),g=Math.max(x+b,g),f=Math.max(te,f)};if(J(p)){let e=ql(p,s);_(m,h,Jl(`default`,e))}else{let e=Dl(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=ql(r,s);for(let e in m)_(m[e],Xl(h,e),Jl(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Il);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(Ll(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(Wl)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s,u.transition[i]={...t,duration:f,ease:l,times:c,...n}}}),o}function ql(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Jl(e,t){return t[e]||(t[e]=[]),t[e]}function Yl(e){return Array.isArray(e)?e:[e]}function Xl(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Zl=e=>typeof e==`number`,Ql=e=>e.every(Zl),$l=e=>Array.isArray(e);function eu(e,t,n){let r=e.getProps();return Js(r,t,r.custom,e)}function tu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Gs(n))}function nu(e){return $l(e)?e[e.length-1]||0:e}function ru(e,t){let{transitionEnd:n={},transition:r={},...i}=eu(e,t)||{};i={...i,...n};for(let t in i)tu(e,t,nu(i[t]))}function iu(e){return!!(J(e)&&e.add)}function au(e,t){let n=e.getValue(`willChange`);if(iu(n))return n.add(t);if(!n&&Oa.WillChange){let n=new Oa.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var ou=`data-`+fl(`framerAppearId`);function su(e){return e.props[ou]}var cu=e=>e!==null;function lu(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(cu),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var uu={type:`spring`,stiffness:500,damping:25,restSpeed:10},du=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),fu={type:`keyframes`,duration:.8},pu={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},mu=(e,{keyframes:t})=>t.length>2?fu:lc.has(e)?e.startsWith(`scale`)?du(t[1]):uu:pu;function hu({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function gu(e,t){return e?.[t]??e?.default??e}function _u(e){e.duration=0,e.type=`keyframes`}var vu={layout:0,mainThread:0,waapi:0};function yu(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function bu({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=yu(s,r,e+1/3),a=yu(s,r,e),o=yu(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function xu(e,t){return n=>n>0?t:e}var Su=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Cu=[to,$a,no],wu=e=>Cu.find(t=>t.test(e));function Tu(e){let t=wu(e);if(Gc(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===no&&(n=bu(n)),n}var Eu=(e,t)=>{let n=Tu(e),r=Tu(t);if(!n||!r)return xu(e,t);let i={...n};return e=>(i.red=Su(n.red,r.red,e),i.green=Su(n.green,r.green,e),i.blue=Su(n.blue,r.blue,e),i.alpha=q(n.alpha,r.alpha,e),$a.transform(i))},Du=new Set([`none`,`hidden`]);function Ou(e,t){return Du.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}var ku=(e,t)=>n=>t(e(n)),Au=(...e)=>e.reduce(ku);function ju(e,t){return n=>q(e,t,n)}function Mu(e){return typeof e==`number`?ju:typeof e==`string`?So(e)?xu:K.test(e)?Eu:Iu:Array.isArray(e)?Nu:typeof e==`object`?K.test(e)?Eu:Pu:xu}function Nu(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Mu(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Pu(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Mu(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Fu(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var Iu=(e,t)=>{let n=_o.createTransformer(t),r=fo(e),i=fo(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Du.has(e)&&!i.values.length||Du.has(t)&&!r.values.length?Ou(e,t):Au(Nu(Fu(r,i),i.values),n):(Gc(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),xu(e,t))};function Lu(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?q(e,t,n):Mu(e)(e,t)}var Ru=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>L.update(t,e),stop:()=>ja(t),now:()=>R.isProcessing?R.timestamp:z.now()}},zu=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Bu=5;function Vu(e,t,n){let r=Math.max(t-Bu,0);return Bs(n-e(r),t-r)}var X={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Hu=.001;function Uu({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:r=X.mass}){let i,a;Gc(e<=B(X.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=G(X.minDamping,X.maxDamping,o),e=G(X.minDuration,X.maxDuration,V(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Ku(t,o),c=Math.exp(-i);return Hu-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Ku(t**2,o);return(-i(t)+Hu>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Hu+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Gu(i,a,s);if(e=B(e),isNaN(c))return{stiffness:X.stiffness,damping:X.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Wu=12;function Gu(e,t,n){let r=n;for(let n=1;n<Wu;n++)r-=e(r)/t(r);return r}function Ku(e,t){return e*Math.sqrt(1-t*t)}var qu=[`duration`,`bounce`],Ju=[`stiffness`,`damping`,`mass`];function Yu(e,t){return t.some(t=>e[t]!==void 0)}function Xu(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!Yu(e,Ju)&&Yu(e,qu))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*G(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:X.mass,stiffness:i,damping:a}}else{let n=Uu(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Zu(e=X.visualDuration,t=X.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Xu({...n,velocity:-V(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=V(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?X.restSpeed.granular:X.restSpeed.default,i||=v?X.restDelta.granular:X.restDelta.default;let y;if(h<1){let e=Ku(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=e===0?m:0;h<1&&(n=e===0?B(m):Vu(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Vl(b),Bl),t=zu(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}Zu.applyToOptions=e=>{let t=Hl(e,100,Zu);return e.ease=t.ease,e.duration=B(t.duration),e.type=`keyframes`,e};function Qu({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Zu({keyframes:[f.value,m(f.value)],velocity:Vu(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function $u(e,t,n){let r=[],i=n||Oa.mix||Lu,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=Au(Array.isArray(t)?t[n]||I:t,a)),r.push(a)}return r}function ed(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(Kc(a===t.length,`Both input and output ranges must be the same length`,`range-length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=$u(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=Ll(e[r],e[r+1],n);return s[r](i)};return n?t=>l(G(e[0],e[a-1],t)):l}function td(e,t){return e.map(e=>e*t)}var nd=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rd=1e-7,id=12;function ad(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=nd(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>rd&&++s<id);return o}function od(e,t,n,r){if(e===t&&n===r)return I;let i=t=>ad(t,0,1,e,n);return e=>e===0||e===1?e:nd(i(e),t,r)}var sd=od(.42,0,1,1),cd=od(0,0,.58,1),ld=od(.42,0,.58,1),ud=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,dd=e=>t=>1-e(1-t),fd=od(.33,1.53,.69,.99),pd=dd(fd),md=ud(pd),hd=e=>(e*=2)<1?.5*pd(e):.5*(2-2**(-10*(e-1))),gd=e=>1-Math.sin(Math.acos(e)),_d=dd(gd),vd=ud(gd),yd=e=>Array.isArray(e)&&typeof e[0]==`number`,bd={linear:I,easeIn:sd,easeInOut:ld,easeOut:cd,circIn:gd,circInOut:vd,circOut:_d,backIn:pd,backInOut:md,backOut:fd,anticipate:hd},xd=e=>typeof e==`string`,Sd=e=>{if(yd(e)){Kc(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return od(t,n,r,i)}else if(xd(e))return Kc(bd[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),bd[e];return e};function Cd(e,t){return e.map(()=>t||ld).splice(0,e.length-1)}function wd({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=jl(r)?r.map(Sd):Sd(r),a={done:!1,value:t[0]},o=ed(td(n&&n.length===t.length?n:zl(t),e),t,{ease:Array.isArray(i)?i:Cd(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Td=e=>e!==null;function Ed(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Td),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Dd={decay:Qu,inertia:Qu,tween:wd,keyframes:wd,spring:Zu};function Od(e){typeof e.type==`string`&&(e.type=Dd[e.type])}var kd=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Ad=e=>e/100,jd=class extends kd{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var e,t;let{motionValue:n}=this.options;n&&n.updatedAt!==z.now()&&this.tick(z.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),(t=(e=this.options).onStop)==null||t.call(e))},vu.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Od(e);let{type:t=wd,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||wd;process.env.NODE_ENV!==`production`&&s!==wd&&Kc(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==wd&&typeof o[0]!=`number`&&(this.mixKeyframes=Au(Ad,Lu(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Vl(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=G(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Qu&&(b.value=Ed(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return V(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+V(e)}get time(){return V(this.currentTime)}set time(e){var t;e=B(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(t=this.driver)==null||t.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(z.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=V(this.currentTime))}play(){var e,t;if(this.isStopped)return;let{driver:n=Ru,startTime:r}=this.options;this.driver||=n(e=>this.tick(e)),(t=(e=this.options).onPlay)==null||t.call(e);let i=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=i):this.holdTime===null?this.startTime||=r??i:this.startTime=i-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(z.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state=`finished`,(t=(e=this.options).onComplete)==null||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(t=(e=this.options).onCancel)==null||t.call(e)}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,vu.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),(t=this.driver)==null||t.stop(),e.observe(this)}},Md=e=>e.startsWith(`--`);function Nd(e,t,n){Md(t)?e.style.setProperty(t,n):e.style[t]=n}function Pd(e){let t;return()=>(t===void 0&&(t=e()),t)}var Fd=Pd(()=>window.ScrollTimeline!==void 0),Id={};function Ld(e,t){let n=Pd(e);return()=>Id[t]??n()}var Rd=Ld(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),zd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Bd={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:zd([0,.65,.55,1]),circOut:zd([.55,0,1,.45]),backIn:zd([.31,.01,.66,-.59]),backOut:zd([.33,1.53,.69,.99])};function Vd(e,t){if(e)return typeof e==`function`?Rd()?zu(e,t):`ease-out`:yd(e)?zd(e):Array.isArray(e)?e.map(e=>Vd(e,t)||Bd.easeOut):Bd[e]}function Hd(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Vd(s,i);Array.isArray(d)&&(u.easing=d),F.value&&vu.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return F.value&&p.finished.finally(()=>{vu.waapi--}),p}function Ud({type:e,...t}){return Ul(e)&&Rd()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Wd=class extends kd{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,Kc(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=Ud(e);this.animation=Hd(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Ed(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):Nd(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;(t=(e=this.animation).finish)==null||t.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t;this.isPseudoElement||(t=(e=this.animation).commitStyles)==null||t.call(e)}get duration(){var e;let t=((e=this.animation.effect)?.getComputedTiming)?.call(e).duration||0;return V(Number(t))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+V(e)}get time(){return V(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=B(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:`linear`})),this.animation.onfinish=null,e&&Fd()?(this.animation.timeline=e,I):t(this)}},Gd={anticipate:hd,backInOut:md,circInOut:vd};function Kd(e){return e in Gd}function qd(e){typeof e.ease==`string`&&Kd(e.ease)&&(e.ease=Gd[e.ease])}var Jd=10,Yd=class extends Wd{constructor(e){qd(e),Od(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new jd({...a,autoplay:!1}),s=Math.max(Jd,z.now()-this.startTime),c=G(0,Jd,s-Jd);t.setWithVelocity(o.sample(Math.max(0,s-c)).value,o.sample(s).value,c),o.stop()}},Xd=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(_o.test(e)||e===`0`)&&!e.startsWith(`url(`));function Zd(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Qd(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Xd(i,t),s=Xd(a,t);return Gc(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:Zd(e)||(n===`spring`||Ul(n))&&r}var $d=new Set([`opacity`,`clipPath`,`filter`,`transform`]),ef=Pd(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function tf(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return ef()&&n&&$d.has(n)&&(n!==`transform`||!c)&&!s&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var nf=40,rf=class extends kd{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){var d;super(),this.stop=()=>{var e,t;this._animation&&(this._animation.stop(),(e=this.stopTimeline)==null||e.call(this)),(t=this.keyframeResolver)==null||t.cancel()},this.createdAt=z.now();let f={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||Sc)(o,(e,t,n)=>this.onKeyframesResolved(e,t,f,!n),s,c,l),(d=this.keyframeResolver)==null||d.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=z.now(),Qd(e,i,a,o)||((Oa.instantAnimations||!s)&&l?.(Ed(e,n,t)),e[0]=e[e.length-1],_u(n),n.repeat=0);let u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>nf?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!c&&tf(u)?new Yd({...u,element:u.motionValue.owner.current}):new jd(u);d.finished.then(()=>this.notifyFinished()).catch(I),this.pendingTimeline&&=(this.stopTimeline=d.attachTimeline(this.pendingTimeline),void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),xc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}},af=(e,t,n,r={},i,a)=>o=>{let s=gu(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=B(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};hu(s)||Object.assign(u,mu(e,u)),u.duration&&=B(u.duration),u.repeatDelay&&=B(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(_u(u),u.delay===0&&(d=!0)),(Oa.instantAnimations||Oa.skipAnimations)&&(d=!0,_u(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=lu(u.keyframes,s);if(e!==void 0){L.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new jd(u):new rf(u)};function of({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function sf(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&of(l,t))continue;let o={delay:n,...gu(a||{},t)},u=r.get();if(u!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===u&&!o.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){let n=su(e);if(n){let e=window.MotionHandoffAnimation(n,t,L);e!==null&&(o.startTime=e,d=!0)}}au(e,t),r.start(af(t,r,i,e.shouldReduceMotion&&Wc.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{L.update(()=>{o&&ru(e,o)})}),c}function cf(e,t){return e in t}var lf=class extends Uc{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(cf(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return Y()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}};function uf(e){return typeof e==`object`&&!!e}function df(e){return uf(e)&&`ownerSVGElement`in e}function ff(e){return df(e)&&e.tagName===`svg`}function pf(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=df(e)&&!ff(e)?new Sl(t):new dl(t);n.mount(e),Xo.set(e,n)}function mf(e){let t=new lf({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),Xo.set(e,t)}function hf(e,t,n){let r=J(e)?e:Gs(e);return r.start(af(``,r,t,n)),r.animation}function gf(e,t){return J(e)||typeof e==`number`||typeof e==`string`&&!Tl(t)}function _f(e,t,n,r){let i=[];if(gf(e,t))i.push(hf(e,Tl(t)&&t.default||t,n&&(n.default||n)));else{let a=Dl(e,t,r),o=a.length;Kc(!!o,`No valid elements provided.`,`no-valid-elements`);for(let e=0;e<o;e++){let r=a[e];Kc(r!==null,`You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.`,`animate-null`);let s=r instanceof Element?pf:mf;Xo.has(r)||s(r);let c=Xo.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...sf(c,{...t,transition:l},{}))}}return i}function vf(e,t,n){let r=[];return Kl(e,t,n,{spring:Zu}).forEach(({keyframes:e,transition:t},n)=>{r.push(..._f(n,e,t))}),r}var yf=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return bf(this.animations,`duration`)}get iterationDuration(){return bf(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function bf(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var xf=class extends yf{then(e,t){return this.finished.finally(e).then(()=>{})}};function Sf(e){return Array.isArray(e)&&e.some(Array.isArray)}function Cf(e){function t(t,n,r){let i=[],a;if(Sf(t))i=vf(t,n,e);else{let{onComplete:o,...s}=r||{};typeof o==`function`&&(a=o),i=_f(t,n,s,e)}let o=new xf(i);return a&&o.finished.then(a),e&&(e.animations.push(o),o.finished.then(()=>{Rs(e.animations,o)})),o}return t}var wf=Cf(),Tf=[`initial`,`animate`,`whileInView`,`whileHover`,`whilePress`,`whileDrag`,`whileFocus`,`exit`],Ef=class extends No{constructor(e){var t;super(e),this.animateUpdates=({controlActiveState:e,directAnimate:t,directTransition:n,controlDelay:r=0,isExit:i}={})=>{let{reducedMotion:a}=this.state.options.motionConfig;this.state.visualElement.shouldReduceMotion=a===`always`||a===`user`&&!!Es.current;let o=this.state.target;this.state.target={...this.state.baseTarget};let s={};s=this.resolveStateAnimation({controlActiveState:e,directAnimate:t,directTransition:n}),this.state.finalTransition=s;let c=this.createAnimationFactories(o,s,r),{getChildAnimations:l}=this.setupChildAnimations(s,this.state.activeStates);return this.executeAnimations({factories:c,getChildAnimations:l,transition:s,controlActiveState:e,isExit:i})},this.state.visualElement=Cl(this.state.options.as,{presenceContext:null,parent:this.state.parent?.visualElement,props:{...this.state.options,whileTap:this.state.options.whilePress},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{...this.state.baseTarget}},reducedMotionConfig:this.state.options.motionConfig.reducedMotion}),(t=this.state.visualElement.parent)==null||t.addChild(this.state.visualElement),this.state.animateUpdates=this.animateUpdates,this.state.isMounted()&&this.state.startAnimation()}updateAnimationControlsSubscription(){let{animate:e}=this.state.options;Mo(e)&&(this.unmountControls=e.subscribe(this.state))}executeAnimations({factories:e,getChildAnimations:t,transition:n,controlActiveState:r,isExit:i=!1}){let a=()=>Promise.all(e.map(e=>e()).filter(Boolean)),o={...this.state.target},s=this.state.element,c=e=>{var t,n;i&&(this.state.isExiting=!0),s.dispatchEvent(Zo(`motionstart`,o)),(n=(t=this.state.options).onAnimationStart)==null||n.call(t,o),e.then(()=>{var e,t;if(i){this.state.isExiting=!1;let e=this.state.options.animatePresenceContext;if(e?.onMotionExitComplete&&this.state.presenceContainer){let t=this.state,n=t.visualElement.projection;t.options?.layoutId&&n.currentAnimation?.state===`running`&&!t.options.exit||e.onMotionExitComplete(t.presenceContainer,t)}}s.dispatchEvent(Zo(`motioncomplete`,o,i)),(t=(e=this.state.options).onAnimationComplete)==null||t.call(e,o)}).catch(I)},l=()=>{let e=n?.when?(n.when===`beforeChildren`?a():t()).then(()=>n.when===`beforeChildren`?t():a()):Promise.all([a(),t()]);return c(e),e};return r?l:l()}setupChildAnimations(e,t){let n=this.state.visualElement;if(!n.variantChildren?.size||!t)return{getChildAnimations:()=>Promise.resolve()};let{staggerChildren:r=0,staggerDirection:i=1,delayChildren:a=0}=e||{},o=n.variantChildren.size,s=(o-1)*r,c=typeof a==`function`,l=c?e=>a(e,o):i===1?(e=0)=>e*r:(e=0)=>s-e*r,u=Array.from(n.variantChildren).map((e,n)=>e.state.animateUpdates({controlActiveState:t,controlDelay:(c?0:a)+l(n)}));return{getChildAnimations:()=>Promise.all(u.map(e=>e()))}}createAnimationFactories(e,t,n){let r=[];return Object.keys(this.state.target).forEach(i=>{var a;if(!Lo(e[i],this.state.target[i]))return;(a=this.state.baseTarget)[i]??(a[i]=ds.get(this.state.element,i));let o=this.state.target[i]===`none`&&Ii(us[i])?us[i]:this.state.target[i];r.push(()=>wf(this.state.element,{[i]:o},{...t?.[i]||t,delay:(t?.[i]?.delay||t?.delay||0)+n}))}),r}resolveStateAnimation({controlActiveState:e,directAnimate:t,directTransition:n}){let r=this.state.options.transition,i={},{variants:a,custom:o,transition:s,animatePresenceContext:c}=this.state.options,l=o??c?.custom;return this.state.activeStates={...this.state.activeStates,...e},Tf.forEach(e=>{if(!this.state.activeStates[e]||Mo(this.state.options[e]))return;let t=this.state.options[e],n=Ii(t)?Io(t,a,l):void 0;if(this.state.visualElement.isVariantNode){let t=Io(this.state.context[e],a,l);n=t?Object.assign(t||{},n):Object.assign(i,n)}n&&(e!==`initial`&&(r=n.transition||this.state.options.transition||{}),i=Object.assign(i,n))}),t&&(i=Io(t,a,l),r=i.transition||n||s),Object.entries(i).forEach(([e,t])=>{e!==`transition`&&(this.state.target[e]=t)}),r}mount(){let{element:e}=this.state;qo.set(e,this.state),Xo.get(e)||(this.state.visualElement.mount(e),Xo.set(e,this.state.visualElement)),this.state.visualElement.state=this.state,this.updateAnimationControlsSubscription();let t=this.state.visualElement,n=t.parent;if(t.enteringChildren=void 0,this.state.parent?.isMounted()&&!t.isControllingVariants&&(n?.enteringChildren)?.has(t)){let{delayChildren:e}=this.state.parent.finalTransition||{};this.animateUpdates({controlActiveState:this.state.parent.activeStates,controlDelay:wl(n.enteringChildren,t,e)})()}}update(){let{animate:e}=this.state.options,{animate:t}=this.state.visualElement.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;(e=this.unmountControls)==null||e.call(this)}};function Df(e){return uf(e)&&`offsetHeight`in e}var Of={x:!1,y:!1};function kf(){return Of.x||Of.y}var Af=(e,t)=>t?e===t?!0:Af(e,t.parentElement):!1,jf=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function Mf(e,t){let n=El(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}var Nf=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Pf(e){return Nf.has(e.tagName)||e.isContentEditable===!0}var Ff=new WeakSet;function If(e){return t=>{t.key===`Enter`&&e(t)}}function Lf(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Rf=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=If(()=>{if(Ff.has(n))return;Lf(n,`down`);let e=If(()=>{Lf(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Lf(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function zf(e){return jf(e)&&!kf()}function Bf(e,t,n={}){let[r,i,a]=Mf(e,n),o=e=>{let r=e.currentTarget;if(!zf(e))return;Ff.add(r);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),Ff.has(r)&&Ff.delete(r),zf(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Af(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Df(e)&&(e.addEventListener(`focus`,e=>Rf(e,i)),!Pf(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Vf(e){return{point:{x:e.pageX,y:e.pageY}}}function Hf(e,t,n){let r=e.options;r.whilePress&&e.setActive(`whilePress`,n===`Start`);let i=r[`onPress${n===`End`?``:n}`];i&&L.postRender(()=>i(t,Vf(t)))}var Uf=class extends No{isActive(){let{whilePress:e,onPress:t,onPressCancel:n,onPressStart:r}=this.state.options;return!!(e||t||n||r)}constructor(e){super(e)}mount(){this.register()}update(){let{whilePress:e,onPress:t,onPressCancel:n,onPressStart:r}=this.state.options;e||t||n||r||this.register()}register(){let e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=Bf(e,(e,t)=>(Hf(this.state,t,`Start`),(e,{success:t})=>Hf(this.state,e,t?`End`:`Cancel`)),{useGlobalTarget:this.state.options.globalPressTarget}))}};function Wf(e){return!(e.pointerType===`touch`||kf())}function Gf(e,t,n={}){let[r,i,a]=Mf(e,n),o=e=>{if(!Wf(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{Wf(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}function Kf(e,t,n){let r=e.options;r.whileHover&&e.setActive(`whileHover`,n===`Start`);let i=r[`onHover${n}`];i&&L.postRender(()=>i(t,Vf(t)))}var qf=class extends No{isActive(){let{whileHover:e,onHoverStart:t,onHoverEnd:n}=this.state.options;return!!(e||t||n)}constructor(e){super(e)}mount(){this.register()}update(){let{whileHover:e,onHoverStart:t,onHoverEnd:n}=this.state.visualElement.prevProps;e||t||n||this.register()}register(){let e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=Gf(e,(e,t)=>(Kf(this.state,t,`Start`),e=>{Kf(this.state,e,`End`)})))}},Jf={some:0,all:1};function Yf(e,t,{root:n,margin:r,amount:i=`some`}={}){let a=El(e),o=new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{let n=o.get(e.target);if(e.isIntersecting!==!!n)if(e.isIntersecting){let n=t(e.target,e);typeof n==`function`?o.set(e.target,n):s.unobserve(e.target)}else typeof n==`function`&&(n(e),o.delete(e.target))})},{root:n,rootMargin:r,threshold:typeof i==`number`?i:Jf[i]});return a.forEach(e=>s.observe(e)),()=>s.disconnect()}function Xf(e,t,n){let r=e.options;r.whileInView&&e.setActive(`whileInView`,n===`Enter`);let i=r[`onViewport${n}`];i&&L.postRender(()=>i(t))}var Zf=class extends No{isActive(){let{whileInView:e,onViewportEnter:t,onViewportLeave:n}=this.state.options;return!!(e||t||n)}constructor(e){super(e)}startObserver(){let e=this.state.element;if(!e||!this.isActive())return;this.unmount();let{once:t,...n}=this.state.options.inViewOptions||{};this.unmount=Yf(e,(e,n)=>{if(Xf(this.state,n,`Enter`),!t)return e=>{Xf(this.state,n,`Leave`)}},n)}mount(){this.startObserver()}update(){let{props:e,prevProps:t}=this.state.visualElement;[`amount`,`margin`,`root`].some(Qf(e,t))&&this.startObserver()}};function Qf({inViewOptions:e={}},{inViewOptions:t={}}={}){return n=>e[n]!==t[n]}function $f(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var ep=class extends No{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.state.element.matches(`:focus-visible`)}catch{e=!0}e&&(this.state.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&=(this.state.setActive(`whileFocus`,!1),!1)}mount(){this.unmount=Au($f(this.state.element,`focus`,()=>this.onFocus()),$f(this.state.element,`blur`,()=>this.onBlur()))}},tp=(e,t)=>e.depth-t.depth,np=class{constructor(){this.children=[],this.isDirty=!1}add(e){Ls(this.children,e),this.isDirty=!0}remove(e){Rs(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(tp),this.isDirty=!1,this.children.forEach(e)}};function rp(e){return J(e)?e.get():e}var ip=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],ap=ip.length,op=e=>typeof e==`string`?parseFloat(e):e,sp=e=>typeof e==`number`||U.test(e);function cp(e,t,n,r,i,a){i?(e.opacity=q(0,n.opacity??1,up(r)),e.opacityExit=q(t.opacity??1,0,dp(r))):a&&(e.opacity=q(t.opacity??1,n.opacity??1,r));for(let i=0;i<ap;i++){let a=`border${ip[i]}Radius`,o=lp(t,a),s=lp(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||sp(o)===sp(s)?(e[a]=Math.max(q(op(o),op(s),r),0),(H.test(s)||H.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=q(t.rotate||0,n.rotate||0,r))}function lp(e,t){return e[t]===void 0?e.borderRadius:e[t]}var up=fp(0,.5,_d),dp=fp(.5,.95,I);function fp(e,t,n){return r=>r<e?0:r>t?1:n(Ll(e,t,r))}function pp(e,t){e.min=t.min,e.max=t.max}function Z(e,t){pp(e.x,t.x),pp(e.y,t.y)}function mp(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function hp(e){return e===void 0||e===1}function gp({scale:e,scaleX:t,scaleY:n}){return!hp(e)||!hp(t)||!hp(n)}function _p(e){return gp(e)||vp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function vp(e){return yp(e.x)||yp(e.y)}function yp(e){return e&&e!==`0%`}function bp(e,t,n){return n+t*(e-n)}function xp(e,t,n,r,i){return i!==void 0&&(e=bp(e,i,r)),bp(e,n,r)+t}function Sp(e,t=0,n=1,r,i){e.min=xp(e.min,t,n,r,i),e.max=xp(e.max,t,n,r,i)}function Cp(e,{x:t,y:n}){Sp(e.x,t.translate,t.scale,t.originPoint),Sp(e.y,n.translate,n.scale,n.originPoint)}var wp=.999999999999,Tp=1.0000000000001;function Ep(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&kp(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Cp(e,o)),r&&_p(a.latestValues)&&kp(e,a.latestValues))}t.x<Tp&&t.x>wp&&(t.x=1),t.y<Tp&&t.y>wp&&(t.y=1)}function Dp(e,t){e.min+=t,e.max+=t}function Op(e,t,n,r,i=.5){Sp(e,t,n,q(e.min,e.max,i),r)}function kp(e,t){Op(e.x,t.x,t.scaleX,t.scale,t.originX),Op(e.y,t.y,t.scaleY,t.scale,t.originY)}var Ap=1e-4,jp=1-Ap,Mp=1+Ap,Np=.01,Pp=0-Np,Fp=0+Np;function Q(e){return e.max-e.min}function Ip(e,t,n){return Math.abs(e-t)<=n}function Lp(e,t,n,r=.5){e.origin=r,e.originPoint=q(t.min,t.max,e.origin),e.scale=Q(n)/Q(t),e.translate=q(n.min,n.max,e.origin)-e.originPoint,(e.scale>=jp&&e.scale<=Mp||isNaN(e.scale))&&(e.scale=1),(e.translate>=Pp&&e.translate<=Fp||isNaN(e.translate))&&(e.translate=0)}function Rp(e,t,n,r){Lp(e.x,t.x,n.x,r?r.originX:void 0),Lp(e.y,t.y,n.y,r?r.originY:void 0)}function zp(e,t,n){e.min=n.min+t.min,e.max=e.min+Q(t)}function Bp(e,t,n){zp(e.x,t.x,n.x),zp(e.y,t.y,n.y)}function Vp(e,t,n){e.min=t.min-n.min,e.max=e.min+Q(t)}function Hp(e,t,n){Vp(e.x,t.x,n.x),Vp(e.y,t.y,n.y)}function Up(e,t,n,r,i){return e-=t,e=bp(e,1/n,r),i!==void 0&&(e=bp(e,1/i,r)),e}function Wp(e,t=0,n=1,r=.5,i,a=e,o=e){if(H.test(t)&&(t=parseFloat(t),t=q(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=q(a.min,a.max,r);e===a&&(s-=t),e.min=Up(e.min,t,n,s,i),e.max=Up(e.max,t,n,s,i)}function Gp(e,t,[n,r,i],a,o){Wp(e,t[n],t[r],t[i],t.scale,a,o)}var Kp=[`x`,`scaleX`,`originX`],qp=[`y`,`scaleY`,`originY`];function Jp(e,t,n,r){Gp(e.x,t,Kp,n?n.x:void 0,r?r.x:void 0),Gp(e.y,t,qp,n?n.y:void 0,r?r.y:void 0)}function Yp(e){return e.translate===0&&e.scale===1}function Xp(e){return Yp(e.x)&&Yp(e.y)}function Zp(e,t){return e.min===t.min&&e.max===t.max}function Qp(e,t){return Zp(e.x,t.x)&&Zp(e.y,t.y)}function $p(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function em(e,t){return $p(e.x,t.x)&&$p(e.y,t.y)}function tm(e){return Q(e.x)/Q(e.y)}function nm(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var rm=class{constructor(){this.members=[]}add(e){Ls(this.members,e),e.scheduleRender()}remove(e){if(Rs(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function im(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}function am(e){return[e(`x`),e(`y`)]}var om={hasAnimatedSinceResize:!0,hasEverUpdated:!1},sm={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},cm=[``,`X`,`Y`,`Z`],lm=1e3,um=0;function dm(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function fm(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=su(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,L,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&fm(r)}function pm({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=um++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,F.value&&(sm.nodes=sm.calculatedTargetDeltas=sm.calculatedProjections=0),this.nodes.forEach(gm),this.nodes.forEach(Cm),this.nodes.forEach(wm),this.nodes.forEach(_m),F.addProjectionMetrics&&F.addProjectionMetrics(sm)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new np)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new zs),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=df(t)&&!ff(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;L.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Fa(i,250),om.hasAnimatedSinceResize&&(om.hasAnimatedSinceResize=!1,this.nodes.forEach(Sm)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||jm,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!em(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...gu(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Sm(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ja(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Tm),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&fm(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ym);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(bm);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xm),this.nodes.forEach(mm),this.nodes.forEach(hm)):this.nodes.forEach(bm),this.clearAllSnapshots();let e=z.now();R.delta=G(0,1e3/60,e-R.timestamp),R.timestamp=e,R.isProcessing=!0,Ma.update.process(R),Ma.preRender.process(R),Ma.render.process(R),R.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vm),this.sharedNodes.forEach(Em)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Q(this.snapshot.measuredBox.x)&&!Q(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Y(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Xp(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||_p(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Fm(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Y();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Lm))){let{scroll:e}=this.root;e&&(Dp(t.x,e.offset.x),Dp(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Y();if(Z(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Z(t,e),Dp(t.x,i.offset.x),Dp(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=Y();Z(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&kp(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),_p(r.latestValues)&&kp(n,r.latestValues)}return _p(this.latestValues)&&kp(n,this.latestValues),n}removeTransform(e){let t=Y();Z(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!_p(n.latestValues))continue;gp(n.latestValues)&&n.updateSnapshot();let r=Y();Z(r,n.measurePageBox()),Jp(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return _p(this.latestValues)&&Jp(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==R.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=R.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Y(),this.targetWithTransforms=Y()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bp(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Z(this.target,this.layout.layoutBox),Cp(this.target,this.targetDelta)):Z(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),F.value&&sm.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||gp(this.parent.latestValues)||vp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Y(),this.relativeTargetOrigin=Y(),Hp(this.relativeTargetOrigin,t,n),Z(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===R.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Z(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Ep(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Y());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(mp(this.prevProjectionDelta.x,this.projectionDelta.x),mp(this.prevProjectionDelta.y,this.projectionDelta.y)),Rp(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!nm(this.projectionDelta.x,this.prevProjectionDelta.x)||!nm(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),F.value&&sm.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if((t=this.options.visualElement)==null||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Cs(),this.projectionDelta=Cs(),this.projectionDeltaWithTransform=Cs()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Cs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Y(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(Am));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;Dm(a.x,e.x,n),Dm(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Hp(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),km(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&Qp(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Y(),Z(d,this.relativeTarget)),s&&(this.animationValues=i,cp(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){var t,n;this.notifyListeners(`animationStart`),(t=this.currentAnimation)==null||t.stop(),(n=this.resumingFrom?.currentAnimation)==null||n.stop(),this.pendingAnimation&&=(ja(this.pendingAnimation),void 0),this.pendingAnimation=L.update(()=>{om.hasAnimatedSinceResize=!0,vu.layout++,this.motionValue||=Gs(0),this.currentAnimation=hf(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{vu.layout--},onComplete:()=>{vu.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(lm),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Im(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Y();let t=Q(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Q(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Z(t,n),kp(t,i),Rp(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new rm),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&dm(`z`,e,r,this.animationValues);for(let t=0;t<cm.length;t++)dm(`rotate${cm[t]}`,e,r,this.animationValues),dm(`skew${cm[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=rp(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=rp(t?.pointerEvents)||``),this.hasProjected&&!_p(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=im(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in To){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=To[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?rp(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(ym),this.root.sharedNodes.clear()}}}function mm(e){e.updateLayout()}function hm(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?am(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Q(r);r.min=n[e].min,r.max=r.min+i}):Im(i,t.layoutBox,n)&&am(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Q(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Cs();Rp(o,n,t.layoutBox);let s=Cs();a?Rp(s,e.applyTransform(r,!0),t.measuredBox):Rp(s,n,t.layoutBox);let c=!Xp(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=Y();Hp(o,t.layoutBox,i.layoutBox);let s=Y();Hp(s,n,a.layoutBox),em(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function gm(e){F.value&&sm.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function _m(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vm(e){e.clearSnapshot()}function ym(e){e.clearMeasurements()}function bm(e){e.isLayoutDirty=!1}function xm(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Sm(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Cm(e){e.resolveTargetDelta()}function wm(e){e.calcProjection()}function Tm(e){e.resetSkewAndRotation()}function Em(e){e.removeLeadSnapshot()}function Dm(e,t,n){e.translate=q(t.translate,0,n),e.scale=q(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Om(e,t,n,r){e.min=q(t.min,n.min,r),e.max=q(t.max,n.max,r)}function km(e,t,n,r){Om(e.x,t.x,n.x,r),Om(e.y,t.y,n.y,r)}function Am(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var jm={duration:.45,ease:[.4,0,.1,1]},Mm=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Nm=Mm(`applewebkit/`)&&!Mm(`chrome/`)?Math.round:I;function Pm(e){e.min=Nm(e.min),e.max=Nm(e.max)}function Fm(e){Pm(e.x),Pm(e.y)}function Im(e,t,n){return e===`position`||e===`preserve-aspect`&&!Ip(tm(t),tm(n),.2)}function Lm(e){return e!==e.root&&e.scroll?.wasRoot}function Rm(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var zm=pm({attachResizeListener:(e,t)=>Rm(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bm={current:void 0},Vm=pm({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Bm.current){let e=new zm({});e.mount(window),e.setOptions({layoutScroll:!0}),Bm.current=e}return Bm.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`});function Hm(e){if(e)return e.options.allowProjection===!1?Hm(e.parent):e.projection}var Um={borderRadius:{...W,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomLeftRadius:W,borderBottomRightRadius:W,boxShadow:vo};function Wm(e){return typeof e==`object`&&!!e&&`nodeType`in e}var Gm=class extends No{constructor(e){super(e),Eo(Um)}initProjection(){let e=this.state.options;this.state.visualElement.projection=new Vm(this.state.visualElement.latestValues,e[`data-framer-portal-id`]?void 0:Hm(this.state.visualElement.parent)),this.state.visualElement.projection.isPresent=!0,this.setOptions()}beforeMount(){this.initProjection()}setOptions(){let e=this.state.options,{layoutId:t,layout:n,drag:r=!1,dragConstraints:i=!1}=e;this.state.visualElement.projection.setOptions({layout:n,layoutId:t,alwaysMeasureLayout:!!t||!!r||i&&Wm(i),visualElement:this.state.visualElement,animationType:typeof e.layout==`string`?e.layout:`both`,layoutRoot:e.layoutRoot,layoutScroll:e.layoutScroll,crossfade:e.crossfade,onExitComplete:()=>{var e;!this.state.visualElement.projection?.isPresent&&this.state.options.layoutId&&!this.state.isExiting&&((e=this.state.options.animatePresenceContext)==null||e.onMotionExitComplete(this.state.presenceContainer,this.state))}})}update(){this.setOptions()}mount(){var e;(e=this.state.visualElement.projection)==null||e.mount(this.state.element)}};function Km(e){return e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1}function qm(e,t=`page`){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}function Jm(e){return t=>Km(t)&&e(t,qm(t))}function Ym(e,t,n,r){return $f(e,t,Jm(n),r)}function Xm(e){let t=null;return()=>t===null?(t=e,()=>{t=null}):!1}var Zm=Xm(`dragHorizontal`),Qm=Xm(`dragVertical`);function $m(e){let t=!1;if(e===`y`)t=Qm();else if(e===`x`)t=Zm();else{let e=Zm(),n=Qm();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function eh(e){return e.max-e.min}function th(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?q(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?q(n,e,r.max):Math.min(e,n)),e}var nh=.35;function rh(e,{top:t,left:n,bottom:r,right:i}){return{x:ih(e.x,n,i),y:ih(e.y,t,r)}}function ih(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function ah(e=nh){return e===!1?e=0:e===!0&&(e=nh),{x:oh(e,`left`,`right`),y:oh(e,`top`,`bottom`)}}function oh(e,t,n){return{min:sh(e,t),max:sh(e,n)}}function sh(e,t){return typeof e==`number`?e:e[t]||0}function ch(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}function lh(e,t){return{x:uh(e.x,t.x),y:uh(e.y,t.y)}}function uh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function dh(e,t){let n=.5,r=eh(e),i=eh(t);return i>r?n=Ll(t.min,t.max-r,e.min):r>i&&(n=Ll(e.min,e.max-i,t.min)),G(0,1,n)}var fh=(e,t)=>Math.abs(e-t);function ph(e,t){let n=fh(e.x,t.x),r=fh(e.y,t.y);return Math.sqrt(n**2+r**2)}var mh=new Set([`auto`,`scroll`]),hh=class{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=vh(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=ph(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=R;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=gh(t,this.transformPagePoint),L.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=vh(e.type===`pointercancel`?this.lastMoveEventInfo:gh(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Km(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let o=gh(qm(e),this.transformPagePoint),{point:s}=o,{timestamp:c}=R;this.history=[{...s,timestamp:c}];let{onSessionStart:l}=t;l&&l(e,vh(o,this.history)),this.removeListeners=Au(Ym(this.contextWindow,`pointermove`,this.handlePointerMove),Ym(this.contextWindow,`pointerup`,this.handlePointerUp),Ym(this.contextWindow,`pointercancel`,this.handlePointerUp)),a&&this.startScrollTracking(a)}isScrollable(e){let t=window.getComputedStyle(e);return t.overflow===`auto`||t.overflow===`scroll`||t.overflowX===`auto`||t.overflowX===`scroll`||t.overflowY===`auto`||t.overflowY===`scroll`}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(mh.has(e.overflowX)||mh.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener(`scroll`,this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),L.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){var e;this.removeListeners&&this.removeListeners(),(e=this.removeScrollListeners)==null||e.call(this),this.scrollPositions.clear(),ja(this.updatePoint)}};function gh(e,t){return t?{point:t(e.point)}:e}function _h(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vh({point:e},t){return{point:e,delta:_h(e,bh(t)),offset:_h(e,yh(t)),velocity:xh(t,.1)}}function yh(e){return e[0]}function bh(e){return e[e.length-1]}function xh(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=bh(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>B(t)));)n--;if(!r)return{x:0,y:0};let a=V(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var Sh=()=>({min:0,max:0});function Ch(){return{x:Sh(),y:Sh()}}function wh(e){return[e(`x`),e(`y`)]}function Th(e){return!!(J(e)&&e.add)}function Eh(e,t){let n=e.getValue(`willChange`);if(Th(n))return n.add(t)}function Dh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Oh(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function kh({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ah(e,t){e.min+=t,e.max+=t}function jh(e,t){return Dh(Oh(e.getBoundingClientRect(),t))}function Mh(e,t,n){let r=jh(e,n),{scroll:i}=t;return i&&(Ah(r.x,i.offset.x),Ah(r.y,i.offset.y)),r}function Nh(e){return e.projection?.isPresent}function Ph({current:e}){return e?e.ownerDocument.defaultView:null}var Fh=new WeakMap,Ih=class{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ch(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let n=e=>{t?this.stopAnimation():this.pauseAnimation(),t&&this.snapToCursor(qm(e,`page`).point)},r=(e,t)=>{this.stopAnimation();let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=$m(n),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),wh(e=>{let t=this.getAxisMotionValue(e).get()||0;if(H.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=eh(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&L.postRender(()=>i(e,t)),Eh(this.visualElement,`transform`),this.visualElement.state.setActive(`whileDrag`,!0))},i=(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openGlobalLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Rh(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},a=(e,t)=>this.stop(e,t),o=()=>wh(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:s}=this.getProps();this.panSession=new hh(e,{onSessionStart:n,onStart:r,onMove:i,onSessionEnd:a,resumeAnimation:o},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:Ph(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i&&L.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),this.visualElement.state.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Lh(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=th(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Wm(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=rh(n.layoutBox,e):this.constraints=!1,this.elastic=ah(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&wh(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=ch(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Wm(e))return!1;let n=e;Fo(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Mh(n,r.root,this.visualElement.getTransformPagePoint()),a=lh(r.layout.layoutBox,i);if(t){let e=t(kh(a));this.hasMutatedConstraints=!!e,e&&(a=Dh(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=wh(o=>{if(!Lh(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Eh(this.visualElement,e),n.start(af(e,n,0,t,this.visualElement,!1))}stopAnimation(){Nh(this.visualElement)&&wh(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){wh(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){wh(t=>{let{drag:n}=this.getProps();if(!Lh(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-q(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Wm(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};wh(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=dh({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),wh(t=>{if(!Lh(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(q(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;Fh.set(this.visualElement,this);let e=this.visualElement.current,t=Ym(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();Wm(e)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),L.read(n);let a=$f(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(wh(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=nh,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Lh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Rh(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var zh=class extends No{constructor(e){super(e),this.removeGroupControls=I,this.removeListeners=I,this.controls=new Ih(e.visualElement)}mount(){let{dragControls:e}=this.state.options;e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||I}unmount(){this.removeGroupControls(),this.removeListeners()}},Bh=!1,Vh=class extends No{constructor(e){super(e),Eo(Um),e.getSnapshot=this.getSnapshot.bind(this),e.didUpdate=this.didUpdate.bind(this)}beforeUpdate(e){this.getSnapshot(e,void 0)}update(){this.didUpdate()}didUpdate(){var e;Bh&&(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&(Bh=!1,(e=this.state.visualElement.projection?.root)==null||e.didUpdate())}mount(){var e;let t=this.state.options,n=this.state.options.layoutGroup;if(t.layout||t.layoutId){let t=this.state.visualElement.projection;if(t){t.promote();let r=t.getStack();r?.prevLead&&!r.prevLead.snapshot&&(r.prevLead.willUpdate(),Bh=!0),(e=n?.group)==null||e.add(t)}om.hasEverUpdated=!0}this.didUpdate()}beforeUnmount(){this.getSnapshot(this.state.options,!1)}unmount(){let e=this.state.options.layoutGroup,t=this.state.visualElement.projection;t&&(e?.group&&(this.state.options.layout||this.state.options.layoutId)&&e.group.remove(t),this.state.options.layoutId&&(Bh=!0),this.didUpdate())}getSnapshot(e,t){let n=this.state.visualElement.projection,{drag:r,layoutDependency:i,layout:a,layoutId:o}=e;if(!n||!a&&!o&&!r)return;Bh=!0;let s=this.state.options;(r||s.layoutDependency!==i||i===void 0||Ii(t)&&n.isPresent!==t)&&n.willUpdate(),Ii(t)&&t!==n.isPresent&&(n.isPresent=t,t?n.promote():n.relegate())}};function Hh(e){return(t,n)=>{e&&L.postRender(()=>e(t,n))}}var Uh=[Ef,Uf,qf,Zf,ep,Gm,class extends No{constructor(){super(...arguments),this.removePointerDownListener=I}onPointerDown(e){this.session=new hh(e,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:Ph(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:Hh((e,t)=>{let{onPanSessionStart:n}=this.state.options;n&&n(e,t)}),onStart:Hh((e,t)=>{let{onPanStart:n}=this.state.options;n&&n(e,t)}),onMove:(e,t)=>{let{onPan:n}=this.state.options;n&&n(e,t)},onEnd:(e,t)=>{let{onPanEnd:n}=this.state.options;delete this.session,n&&L.postRender(()=>n(e,t))}}}mount(){this.removePointerDownListener=Ym(this.state.element,`pointerdown`,this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},zh,Vh],Wh={reducedMotion:`never`,transition:void 0,nonce:void 0},[Gh,Kh]=Do(`MotionConfig`);function qh(){return Gh((0,n.computed)(()=>Wh))}var Jh=0;function Yh(e){let t=new WeakMap,n=qh();function r(r){if(e.mode!==`popLayout`)return;let i=r.offsetParent,a=i instanceof HTMLElement&&i.offsetWidth||0,o={height:r.offsetHeight||0,width:r.offsetWidth||0,top:r.offsetTop,left:r.offsetLeft,right:0};o.right=a-o.width-o.left;let s=e.anchorX===`left`?`left: ${o.left}px`:`right: ${o.right}px`,c=`pop-${Jh++}`;r.dataset.motionPopId=c;let l=document.createElement(`style`);n.value.nonce&&(l.nonce=n.value.nonce),t.set(r,l),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};let n=require(`vue`),r=require(`@delta-comic/model`),i=require(`naive-ui`),a=require(`@delta-comic/utils`),o=require(`@delta-comic/core`),s=require(`vue-router`),c=require(`vant`);function l(e){return e[e.length-1]}function u(e,t){let n=e.slice(),r=[],i=0;for(let a=0;a<e.length;a++){if(t(e[a],a,n)){r.push(e[a]);continue}if(!Object.hasOwn(e,a)){delete e[i++];continue}e[i++]=e[a]}return e.length=i,r}var d=class extends Error{constructor(e=`The operation was aborted`){super(e),this.name=`AbortError`}};function f(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function p(e){return e}function m(){}function h(e,{signal:t}={}){return new Promise((n,r)=>{let i=()=>{r(new d)},a=()=>{clearTimeout(o),i()};if(t?.aborted)return i();let o=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e);t?.addEventListener(`abort`,a,{once:!0})})}function g(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function _(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function v(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function y(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var b=`[object RegExp]`,x=`[object String]`,S=`[object Number]`,C=`[object Boolean]`,w=`[object Arguments]`,ee=`[object Symbol]`,te=`[object Date]`,T=`[object Map]`,ne=`[object Set]`,E=`[object Array]`,re=`[object ArrayBuffer]`,ie=`[object Object]`,ae=`[object DataView]`,oe=`[object Uint8Array]`,se=`[object Uint8ClampedArray]`,ce=`[object Uint16Array]`,le=`[object Uint32Array]`,ue=`[object Int8Array]`,de=`[object Int16Array]`,fe=`[object Int32Array]`,pe=`[object Float32Array]`,me=`[object Float64Array]`;function he(e,t){return ge(e,void 0,e,new Map,t)}function ge(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(g(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=ge(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,ge(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(ge(a,void 0,n,r,i));return t}if(typeof Buffer<`u`&&Buffer.isBuffer(e))return e.subarray();if(_(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=ge(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),D(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),D(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),D(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,D(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),D(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),D(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),D(t,e,n,r,i),t}if(typeof e==`object`&&_e(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),D(t,e,n,r,i),t}return e}function D(e,t,n=e,r,i){let a=[...Object.keys(t),...v(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=ge(t[s],s,n,r,i))}}function _e(e){switch(y(e)){case w:case E:case re:case ae:case C:case te:case pe:case me:case ue:case de:case fe:case T:case S:case ie:case b:case ne:case x:case ee:case oe:case se:case ce:case le:return!0;default:return!1}}function ve(e){return ge(e,void 0,e,new Map,void 0)}function ye(e){return e===`__proto__`}function be(e){return Array.isArray(e)}function xe(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Se(e){return e instanceof Error}function Ce(e){return typeof e==`function`}function we(e){return Number.isSafeInteger(e)&&e>=0}function Te(e){return typeof e==`string`}function Ee(e){return e===void 0}function De(){}var Oe=Object.assign,ke=typeof window<`u`,Ae=e=>typeof e==`object`&&!!e,je=e=>e!=null,Me=e=>typeof e==`function`,Ne=e=>Ae(e)&&Me(e.then)&&Me(e.catch),Pe=e=>typeof e==`number`||/^\d+(\.\d+)?$/.test(e),Fe=()=>ke?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1;function Ie(e,t){let n=t.split(`.`),r=e;return n.forEach(e=>{r=Ae(r)?r[e]??``:``}),r}function Le(e,t,n){return t.reduce((t,r)=>((!n||e[r]!==void 0)&&(t[r]=e[r]),t),{})}var O=[Number,String],k={type:Boolean,default:!0},Re=e=>({type:e,required:!0}),ze=()=>({type:Array,default:()=>[]}),A=e=>({type:O,default:e}),j=e=>({type:String,default:e}),Be=typeof window<`u`;function Ve(e){return Be?requestAnimationFrame(e):-1}function He(e){Be&&cancelAnimationFrame(e)}function Ue(e){Ve(()=>Ve(e))}var We=e=>e===window,Ge=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),Ke=e=>{let t=(0,n.unref)(e);if(We(t)){let e=t.innerWidth,n=t.innerHeight;return Ge(e,n)}return t?.getBoundingClientRect?t.getBoundingClientRect():Ge(0,0)};function qe(e){let t=(0,n.inject)(e,null);if(t){let e=(0,n.getCurrentInstance)(),{link:r,unlink:i,internalChildren:a}=t;return r(e),(0,n.onUnmounted)(()=>i(e)),{parent:t,index:(0,n.computed)(()=>a.indexOf(e))}}return{parent:null,index:(0,n.ref)(-1)}}function Je(e){let t=[],r=e=>{Array.isArray(e)&&e.forEach(e=>{(0,n.isVNode)(e)&&(t.push(e),e.component?.subTree&&(t.push(e.component.subTree),r(e.component.subTree.children)),e.children&&r(e.children))})};return r(e),t}var Ye=(e,t)=>{let n=e.indexOf(t);return n===-1?e.findIndex(e=>t.key!==void 0&&t.key!==null&&e.type===t.type&&e.key===t.key):n};function Xe(e,t,n){let r=Je(e.subTree.children);n.sort((e,t)=>Ye(r,e.vnode)-Ye(r,t.vnode));let i=n.map(e=>e.proxy);t.sort((e,t)=>i.indexOf(e)-i.indexOf(t))}function Ze(e){let t=(0,n.reactive)([]),r=(0,n.reactive)([]),i=(0,n.getCurrentInstance)();return{children:t,linkChildren:a=>{(0,n.provide)(e,Object.assign({link:e=>{e.proxy&&(r.push(e),t.push(e.proxy),Xe(i,t,r))},unlink:e=>{let n=r.indexOf(e);t.splice(n,1),r.splice(n,1)},children:t,internalChildren:r},a))}}}function Qe(e){let t;(0,n.onMounted)(()=>{e(),(0,n.nextTick)(()=>{t=!0})}),(0,n.onActivated)(()=>{t&&e()})}function $e(e,t,r={}){if(!Be)return;let{target:i=window,passive:a=!1,capture:o=!1}=r,s=!1,c,l=r=>{if(s)return;let i=(0,n.unref)(r);i&&!c&&(i.addEventListener(e,t,{capture:o,passive:a}),c=!0)},u=r=>{if(s)return;let i=(0,n.unref)(r);i&&c&&(i.removeEventListener(e,t,o),c=!1)};(0,n.onUnmounted)(()=>u(i)),(0,n.onDeactivated)(()=>u(i)),Qe(()=>l(i));let d;return(0,n.isRef)(i)&&(d=(0,n.watch)(i,(e,t)=>{u(t),l(e)})),()=>{d?.(),u(i),s=!0}}var et,tt;function nt(){if(!et&&(et=(0,n.ref)(0),tt=(0,n.ref)(0),Be)){let e=()=>{et.value=window.innerWidth,tt.value=window.innerHeight};e(),window.addEventListener(`resize`,e,{passive:!0}),window.addEventListener(`orientationchange`,e,{passive:!0})}return{width:et,height:tt}}var rt=/scroll|auto|overlay/i,it=Be?window:void 0;function at(e){return e.tagName!==`HTML`&&e.tagName!==`BODY`&&e.nodeType===1}function ot(e,t=it){let n=e;for(;n&&n!==t&&at(n);){let{overflowY:e}=window.getComputedStyle(n);if(rt.test(e))return n;n=n.parentNode}return t}function st(e,t=it){let r=(0,n.ref)();return(0,n.onMounted)(()=>{e.value&&(r.value=ot(e.value,t))}),r}var ct;function lt(){if(!ct&&(ct=(0,n.ref)(`visible`),Be)){let e=()=>{ct.value=document.hidden?`hidden`:`visible`};e(),window.addEventListener(`visibilitychange`,e)}return ct}function ut(e){let t=`scrollTop`in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function dt(e,t){`scrollTop`in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function ft(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function pt(e){dt(window,e),dt(document.body,e)}function mt(e,t){if(e===window)return 0;let n=t?ut(t):ft();return Ke(e).top+n}Fe();var ht=e=>e.stopPropagation();function gt(e,t){(typeof e.cancelable!=`boolean`||e.cancelable)&&e.preventDefault(),t&&ht(e)}function _t(e){let t=(0,n.unref)(e);if(!t)return!1;let r=window.getComputedStyle(t),i=r.display===`none`,a=t.offsetParent===null&&r.position!==`fixed`;return i||a}var{width:vt,height:yt}=nt();function M(e){if(je(e))return Pe(e)?`${e}px`:String(e)}function bt(e){if(je(e)){if(Array.isArray(e))return{width:M(e[0]),height:M(e[1])};let t=M(e);return{width:t,height:t}}}function xt(e){let t={};return e!==void 0&&(t.zIndex=+e),t}var St;function Ct(){if(!St){let e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;St=parseFloat(t)}return St}function wt(e){return e=e.replace(/rem/g,``),+e*Ct()}function Tt(e){return e=e.replace(/vw/g,``),+e*vt.value/100}function Et(e){return e=e.replace(/vh/g,``),+e*yt.value/100}function Dt(e){if(typeof e==`number`)return e;if(ke){if(e.includes(`rem`))return wt(e);if(e.includes(`vw`))return Tt(e);if(e.includes(`vh`))return Et(e)}return parseFloat(e)}var Ot=/-(\w)/g,kt=e=>e.replace(Ot,(e,t)=>t.toUpperCase()),At=e=>e.replace(/([A-Z])/g,`-$1`).toLowerCase().replace(/^-/,``),jt=(e,t,n)=>Math.min(Math.max(e,t),n),{hasOwnProperty:Mt}=Object.prototype;function Nt(e,t,n){let r=t[n];je(r)&&(!Mt.call(e,n)||!Ae(r)?e[n]=r:e[n]=Pt(Object(e[n]),r))}function Pt(e,t){return Object.keys(t).forEach(n=>{Nt(e,t,n)}),e}var Ft={name:`姓名`,tel:`电话`,save:`保存`,clear:`清空`,cancel:`取消`,confirm:`确认`,delete:`删除`,loading:`加载中...`,noCoupon:`暂无优惠券`,nameEmpty:`请填写姓名`,addContact:`添加联系人`,telInvalid:`请填写正确的电话`,vanCalendar:{end:`结束`,start:`开始`,title:`日期选择`,weekdays:[`日`,`一`,`二`,`三`,`四`,`五`,`六`],monthTitle:(e,t)=>`${e}\u5E74${t}\u6708`,rangePrompt:e=>`\u6700\u591A\u9009\u62E9 ${e} \u5929`},vanCascader:{select:`请选择`},vanPagination:{prev:`上一页`,next:`下一页`},vanPullRefresh:{pulling:`下拉即可刷新...`,loosing:`释放即可刷新...`},vanSubmitBar:{label:`合计:`},vanCoupon:{unlimited:`无门槛`,discount:e=>`${e}\u6298`,condition:e=>`\u6EE1${e}\u5143\u53EF\u7528`},vanCouponCell:{title:`优惠券`,count:e=>`${e}\u5F20\u53EF\u7528`},vanCouponList:{exchange:`兑换`,close:`不使用`,enable:`可用`,disabled:`不可用`,placeholder:`输入优惠码`},vanAddressEdit:{area:`地区`,areaEmpty:`请选择地区`,addressEmpty:`请填写详细地址`,addressDetail:`详细地址`,defaultAddress:`设为默认收货地址`},vanAddressList:{add:`新增地址`}},It=(0,n.ref)(`zh-CN`),Lt=(0,n.reactive)({"zh-CN":Ft}),Rt={messages(){return Lt[It.value]},use(e,t){It.value=e,this.add({[e]:t})},add(e={}){Pt(Lt,e)}};function zt(e){let t=kt(e)+`.`;return(e,...n)=>{let r=Rt.messages(),i=Ie(r,t+e)||Ie(r,e);return Me(i)?i(...n):i}}function Bt(e,t){return t?typeof t==`string`?` ${e}--${t}`:Array.isArray(t)?t.reduce((t,n)=>t+Bt(e,n),``):Object.keys(t).reduce((n,r)=>n+(t[r]?Bt(e,r):``),``):``}function Vt(e){return(t,n)=>(t&&typeof t!=`string`&&(n=t,t=``),t=t?`${e}__${t}`:e,`${t}${Bt(t,n)}`)}function N(e){let t=`van-${e}`;return[t,Vt(t),zt(t)]}var Ht=`van-hairline`;`${Ht}`,`${Ht}`,`${Ht}`,`${Ht}`,`${Ht}`;var Ut=`${Ht}--top-bottom`;`${Ht}`;var Wt=`van-haptics-feedback`;function Gt(e,{args:t=[],done:n,canceled:r,error:i}){if(e){let a=e.apply(null,t);Ne(a)?a.then(e=>{e?n():r&&r()}).catch(i||De):a?n():r&&r()}else n()}function P(e){return e.install=t=>{let{name:n}=e;n&&(t.component(n,e),t.component(kt(`-${n}`),e))},e}function Kt(e,t){return e.reduce((e,n)=>Math.abs(e-t)<Math.abs(n-t)?e:n)}var qt=Symbol();function Jt(e){let t=(0,n.inject)(qt,null);t&&(0,n.watch)(t,t=>{t&&e()})}function Yt(e){let t=(0,n.getCurrentInstance)();t&&Oe(t.proxy,e)}var Xt={to:[String,Object],url:String,replace:Boolean};function Zt({to:e,url:t,replace:n,$router:r}){e&&r?r[n?`replace`:`push`](e):t&&(n?location.replace(t):location.href=t)}var[Qt,$t]=N(`badge`),en={dot:Boolean,max:O,tag:j(`div`),color:String,offset:Array,content:O,showZero:k,position:j(`top-right`)},tn=P((0,n.defineComponent)({name:Qt,props:en,setup(e,{slots:t}){let r=()=>{if(t.content)return!0;let{content:n,showZero:r}=e;return je(n)&&n!==``&&(r||n!==0&&n!==`0`)},i=()=>{let{dot:n,max:i,content:a}=e;if(!n&&r())return t.content?t.content():je(i)&&Pe(a)&&+a>+i?`${i}+`:a},a=e=>e.startsWith(`-`)?e.replace(`-`,``):`-${e}`,o=(0,n.computed)(()=>{let n={background:e.color};if(e.offset){let[r,i]=e.offset,{position:o}=e,[s,c]=o.split(`-`);t.default?(typeof i==`number`?n[s]=M(s===`top`?i:-i):n[s]=s===`top`?M(i):a(i),typeof r==`number`?n[c]=M(c===`left`?r:-r):n[c]=c===`left`?M(r):a(r)):(n.marginTop=M(i),n.marginLeft=M(r))}return n}),s=()=>{if(r()||e.dot)return(0,n.createVNode)(`div`,{class:$t([e.position,{dot:e.dot,fixed:!!t.default}]),style:o.value},[i()])};return()=>{if(t.default){let{tag:r}=e;return(0,n.createVNode)(r,{class:$t(`wrapper`)},{default:()=>[t.default(),s()]})}return s()}}})),nn=2e3,rn=()=>++nn,an=e=>{nn=e},[on,sn]=N(`config-provider`),cn=Symbol(on),ln={tag:j(`div`),theme:j(`light`),zIndex:Number,themeVars:Object,themeVarsDark:Object,themeVarsLight:Object,themeVarsScope:j(`local`),iconPrefix:String};function un(e){return e.replace(/([a-zA-Z])(\d)/g,`$1-$2`)}function dn(e){let t={};return Object.keys(e).forEach(n=>{let r=un(At(n));t[`--van-${r}`]=e[n]}),t}function fn(e={},t={}){Object.keys(e).forEach(n=>{e[n]!==t[n]&&document.documentElement.style.setProperty(n,e[n])}),Object.keys(t).forEach(t=>{e[t]||document.documentElement.style.removeProperty(t)})}(0,n.defineComponent)({name:on,props:ln,setup(e,{slots:t}){let r=(0,n.computed)(()=>dn(Oe({},e.themeVars,e.theme===`dark`?e.themeVarsDark:e.themeVarsLight)));if(ke){let t=()=>{document.documentElement.classList.add(`van-theme-${e.theme}`)},i=(t=e.theme)=>{document.documentElement.classList.remove(`van-theme-${t}`)};(0,n.watch)(()=>e.theme,(e,n)=>{n&&i(n),t()},{immediate:!0}),(0,n.onActivated)(t),(0,n.onDeactivated)(i),(0,n.onBeforeUnmount)(i),(0,n.watch)(r,(t,n)=>{e.themeVarsScope===`global`&&fn(t,n)}),(0,n.watch)(()=>e.themeVarsScope,(e,t)=>{t===`global`&&fn({},r.value),e===`global`&&fn(r.value,{})}),e.themeVarsScope===`global`&&fn(r.value,{})}return(0,n.provide)(cn,e),(0,n.watchEffect)(()=>{e.zIndex!==void 0&&an(e.zIndex)}),()=>(0,n.createVNode)(e.tag,{class:sn(),style:e.themeVarsScope===`local`?r.value:void 0},{default:()=>[t.default?.call(t)]})}});var[pn,mn]=N(`icon`),hn=e=>e?.includes(`/`),gn={dot:Boolean,tag:j(`i`),name:String,size:O,badge:O,color:String,badgeProps:Object,classPrefix:String},_n=P((0,n.defineComponent)({name:pn,props:gn,setup(e,{slots:t}){let r=(0,n.inject)(cn,null),i=(0,n.computed)(()=>e.classPrefix||r?.iconPrefix||mn());return()=>{let{tag:r,dot:a,name:o,size:s,badge:c,color:l}=e,u=hn(o);return(0,n.createVNode)(tn,(0,n.mergeProps)({dot:a,tag:r,class:[i.value,u?``:`${i.value}-${o}`],style:{color:l,fontSize:M(s)},content:c},e.badgeProps),{default:()=>[t.default?.call(t),u&&(0,n.createVNode)(`img`,{class:mn(`image`),src:o},null)]})}}})),[vn,yn]=N(`loading`),bn=Array(12).fill(null).map((e,t)=>(0,n.createVNode)(`i`,{class:yn(`line`,String(t+1))},null)),xn=(0,n.createVNode)(`svg`,{class:yn(`circular`),viewBox:`25 25 50 50`},[(0,n.createVNode)(`circle`,{cx:`50`,cy:`50`,r:`20`,fill:`none`},null)]),Sn={size:O,type:j(`circular`),color:String,vertical:Boolean,textSize:O,textColor:String},Cn=P((0,n.defineComponent)({name:vn,props:Sn,setup(e,{slots:t}){let r=(0,n.computed)(()=>Oe({color:e.color},bt(e.size))),i=()=>{let i=e.type===`spinner`?bn:xn;return(0,n.createVNode)(`span`,{class:yn(`spinner`,e.type),style:r.value},[t.icon?t.icon():i])},a=()=>{if(t.default)return(0,n.createVNode)(`span`,{class:yn(`text`),style:{fontSize:M(e.textSize),color:e.textColor??e.color}},[t.default()])};return()=>{let{type:t,vertical:r}=e;return(0,n.createVNode)(`div`,{class:yn([t,{vertical:r}]),"aria-live":`polite`,"aria-busy":!0},[i(),a()])}}})),wn={show:Boolean,zIndex:O,overlay:k,duration:O,teleport:[String,Object],lockScroll:k,lazyRender:k,beforeClose:Function,overlayProps:Object,overlayStyle:Object,overlayClass:null,transitionAppear:Boolean,closeOnClickOverlay:k};function Tn(e,t){return e>t?`horizontal`:t>e?`vertical`:``}function En(){let e=(0,n.ref)(0),t=(0,n.ref)(0),r=(0,n.ref)(0),i=(0,n.ref)(0),a=(0,n.ref)(0),o=(0,n.ref)(0),s=(0,n.ref)(``),c=(0,n.ref)(!0),l=()=>s.value===`vertical`,u=()=>s.value===`horizontal`,d=()=>{r.value=0,i.value=0,a.value=0,o.value=0,s.value=``,c.value=!0};return{move:(n=>{let l=n.touches[0];r.value=(l.clientX<0?0:l.clientX)-e.value,i.value=l.clientY-t.value,a.value=Math.abs(r.value),o.value=Math.abs(i.value),(!s.value||a.value<10&&o.value<10)&&(s.value=Tn(a.value,o.value)),c.value&&(a.value>5||o.value>5)&&(c.value=!1)}),start:(n=>{d(),e.value=n.touches[0].clientX,t.value=n.touches[0].clientY}),reset:d,startX:e,startY:t,deltaX:r,deltaY:i,offsetX:a,offsetY:o,direction:s,isVertical:l,isHorizontal:u,isTap:c}}var Dn=0,On=`van-overflow-hidden`;function kn(e,t){let r=En(),i=t=>{r.move(t);let n=r.deltaY.value>0?`10`:`01`,{scrollHeight:i,offsetHeight:a,scrollTop:o}=ot(t.target,e.value),s=`11`;o===0?s=a>=i?`00`:`01`:o+a>=i&&(s=`10`),s!==`11`&&r.isVertical()&&!(parseInt(s,2)&parseInt(n,2))&&gt(t,!0)},a=()=>{document.addEventListener(`touchstart`,r.start),document.addEventListener(`touchmove`,i,{passive:!1}),Dn||document.body.classList.add(On),Dn++},o=()=>{Dn&&(document.removeEventListener(`touchstart`,r.start),document.removeEventListener(`touchmove`,i),Dn--,Dn||document.body.classList.remove(On))},s=()=>t()&&a(),c=()=>t()&&o();Qe(s),(0,n.onDeactivated)(c),(0,n.onBeforeUnmount)(c),(0,n.watch)(t,e=>{e?a():o()})}function An(e){let t=(0,n.ref)(!1);return(0,n.watch)(e,e=>{e&&(t.value=e)},{immediate:!0}),e=>()=>t.value?e():null}var jn=()=>{let{scopeId:e}=(0,n.getCurrentInstance)()?.vnode||{};return e?{[e]:``}:null},[Mn,Nn]=N(`overlay`),Pn={show:Boolean,zIndex:O,duration:O,className:null,lockScroll:k,lazyRender:k,customStyle:Object,teleport:[String,Object]},Fn=P((0,n.defineComponent)({name:Mn,inheritAttrs:!1,props:Pn,setup(e,{attrs:t,slots:r}){let i=(0,n.ref)(),a=An(()=>e.show||!e.lazyRender),o=t=>{e.lockScroll&&gt(t,!0)},s=a(()=>{let a=Oe(xt(e.zIndex),e.customStyle);return je(e.duration)&&(a.animationDuration=`${e.duration}s`),(0,n.withDirectives)((0,n.createVNode)(`div`,(0,n.mergeProps)({ref:i,style:a,class:[Nn(),e.className]},t),[r.default?.call(r)]),[[n.vShow,e.show]])});return $e(`touchmove`,o,{target:i}),()=>{let t=(0,n.createVNode)(n.Transition,{name:`van-fade`,appear:!0},{default:s});return e.teleport?(0,n.createVNode)(n.Teleport,{to:e.teleport},{default:()=>[t]}):t}}})),In=Oe({},wn,{round:Boolean,position:j(`center`),closeIcon:j(`cross`),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:j(`top-right`),destroyOnClose:Boolean,safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[Ln,Rn]=N(`popup`),zn=P((0,n.defineComponent)({name:Ln,inheritAttrs:!1,props:In,emits:[`open`,`close`,`opened`,`closed`,`keydown`,`update:show`,`clickOverlay`,`clickCloseIcon`],setup(e,{emit:t,attrs:r,slots:i}){let a,o,s=(0,n.ref)(),c=(0,n.ref)(),l=An(()=>e.show||!e.lazyRender),u=(0,n.computed)(()=>{let t={zIndex:s.value};if(je(e.duration)){let n=e.position===`center`?`animationDuration`:`transitionDuration`;t[n]=`${e.duration}s`}return t}),d=()=>{a||(a=!0,s.value=e.zIndex===void 0?rn():+e.zIndex,t(`open`))},f=()=>{a&&Gt(e.beforeClose,{done(){a=!1,t(`close`),t(`update:show`,!1)}})},p=n=>{t(`clickOverlay`,n),e.closeOnClickOverlay&&f()},m=()=>{if(e.overlay)return(0,n.createVNode)(Fn,(0,n.mergeProps)(Oe({show:e.show,class:e.overlayClass,zIndex:s.value,duration:e.duration,customStyle:e.overlayStyle,role:e.closeOnClickOverlay?`button`:void 0,tabindex:e.closeOnClickOverlay?0:void 0},e.overlayProps),jn(),{onClick:p}),{default:i[`overlay-content`]})},h=e=>{t(`clickCloseIcon`,e),f()},g=()=>{if(e.closeable)return(0,n.createVNode)(_n,{role:`button`,tabindex:0,name:e.closeIcon,class:[Rn(`close-icon`,e.closeIconPosition),Wt],classPrefix:e.iconPrefix,onClick:h},null)},_,v=()=>{_&&clearTimeout(_),_=setTimeout(()=>{t(`opened`)})},y=()=>t(`closed`),b=e=>t(`keydown`,e),x=l(()=>{let{destroyOnClose:t,round:a,position:o,safeAreaInsetTop:s,safeAreaInsetBottom:l,show:d}=e;if(!(!d&&t))return(0,n.withDirectives)((0,n.createVNode)(`div`,(0,n.mergeProps)({ref:c,style:u.value,role:`dialog`,tabindex:0,class:[Rn({round:a,[o]:o}),{"van-safe-area-top":s,"van-safe-area-bottom":l}],onKeydown:b},r,jn()),[i.default?.call(i),g()]),[[n.vShow,d]])}),S=()=>{let{position:t,transition:r,transitionAppear:i}=e,a=t===`center`?`van-fade`:`van-popup-slide-${t}`;return(0,n.createVNode)(n.Transition,{name:r||a,appear:i,onAfterEnter:v,onAfterLeave:y},{default:x})};return(0,n.watch)(()=>e.show,e=>{e&&!a&&(d(),r.tabindex===0&&(0,n.nextTick)(()=>{var e;(e=c.value)==null||e.focus()})),!e&&a&&(a=!1,t(`close`))}),Yt({popupRef:c}),kn(c,()=>e.show&&e.lockScroll),$e(`popstate`,()=>{e.closeOnPopstate&&(f(),o=!1)}),(0,n.onMounted)(()=>{e.show&&d()}),(0,n.onActivated)(()=>{o&&=(t(`update:show`,!0),!1)}),(0,n.onDeactivated)(()=>{e.show&&e.teleport&&(f(),o=!0)}),(0,n.provide)(qt,()=>e.show),()=>e.teleport?(0,n.createVNode)(n.Teleport,{to:e.teleport},{default:()=>[m(),S()]}):(0,n.createVNode)(n.Fragment,null,[m(),S()])}})),Bn=(e,t)=>{let r=(0,n.ref)(e());return(0,n.watch)(e,e=>{e!==r.value&&(r.value=e)}),(0,n.watch)(r,n=>{n!==e()&&t(n)}),r};function Vn(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}process.env.NODE_ENV===`production`||Object.freeze({}),process.env.NODE_ENV===`production`||Object.freeze([]);var Hn=Array.isArray,Un=e=>typeof e==`string`,Wn=e=>typeof e==`object`&&!!e,Gn=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Kn=/\B([A-Z])/g,qn=Gn(e=>e.replace(Kn,`-$1`).toLowerCase());function Jn(e){if(Hn(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=Un(r)?Qn(r):Jn(r);if(i)for(let e in i)t[e]=i[e]}return t}else if(Un(e)||Wn(e))return e}var Yn=/;(?![^(]*\))/g,Xn=/:([^]+)/,Zn=/\/\*[^]*?\*\//g;function Qn(e){let t={};return e.replace(Zn,``).split(Yn).forEach(e=>{if(e){let n=e.split(Xn);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function $n(e){if(!e)return``;if(Un(e))return e;let t=``;for(let n in e){let r=e[n];if(Un(r)||typeof r==`number`){let e=n.startsWith(`--`)?n:qn(n);t+=`${e}:${r};`}}return t}function er(e){let t=``;if(Un(e))t=e;else if(Hn(e))for(let n=0;n<e.length;n++){let r=er(e[n]);r&&(t+=r+` `)}else if(Wn(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}Vn(`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);function tr(e,t,n){let r,i=0,a=e.scrollLeft,o=n===0?1:Math.round(n*1e3/16),s=a;function c(){He(r)}function l(){s+=(t-a)/o,e.scrollLeft=s,++i<o&&(r=Ve(l))}return l(),c}function nr(e,t,n,r){let i,a=ut(e),o=a<t,s=n===0?1:Math.round(n*1e3/16),c=(t-a)/s;function l(){He(i)}function u(){a+=c,(o&&a>t||!o&&a<t)&&(a=t),dt(e,a),o&&a<t||!o&&a>t?i=Ve(u):r&&(i=Ve(r))}return u(),l}var rr=0;function ir(){let{name:e=`unknown`}=(0,n.getCurrentInstance)()?.type||{};return process.env.NODE_ENV===`test`?e:`${e}-${++rr}`}function ar(){let e=(0,n.ref)([]),t=[];return(0,n.onBeforeUpdate)(()=>{e.value=[]}),[e,n=>(t[n]||(t[n]=t=>{e.value[n]=t}),t[n])]}function or(e,t){if(!ke||!window.IntersectionObserver)return;let r=new IntersectionObserver(e=>{t(e[0].intersectionRatio>0)},{root:document.body}),i=()=>{e.value&&r.observe(e.value)},a=()=>{e.value&&r.unobserve(e.value)};(0,n.onDeactivated)(a),(0,n.onBeforeUnmount)(a),Qe(i)}var[sr,cr]=N(`sticky`),lr={zIndex:O,position:j(`top`),container:Object,offsetTop:A(0),offsetBottom:A(0)},ur=P((0,n.defineComponent)({name:sr,props:lr,emits:[`scroll`,`change`],setup(e,{emit:t,slots:r}){let i=(0,n.ref)(),a=st(i),o=(0,n.reactive)({fixed:!1,width:0,height:0,transform:0}),s=(0,n.ref)(!1),c=(0,n.computed)(()=>Dt(e.position===`top`?e.offsetTop:e.offsetBottom)),l=(0,n.computed)(()=>{if(s.value)return;let{fixed:e,height:t,width:n}=o;if(e)return{width:`${n}px`,height:`${t}px`}}),u=(0,n.computed)(()=>{if(!o.fixed||s.value)return;let t=Oe(xt(e.zIndex),{width:`${o.width}px`,height:`${o.height}px`,[e.position]:`${c.value}px`});return o.transform&&(t.transform=`translate3d(0, ${o.transform}px, 0)`),t}),d=e=>t(`scroll`,{scrollTop:e,isFixed:o.fixed}),f=()=>{if(!i.value||_t(i))return;let{container:t,position:n}=e,r=Ke(i),a=ut(window);if(o.width=r.width,o.height=r.height,n===`top`)if(t){let e=Ke(t),n=e.bottom-c.value-o.height;o.fixed=c.value>r.top&&e.bottom>0,o.transform=n<0?n:0}else o.fixed=c.value>r.top;else{let{clientHeight:e}=document.documentElement;if(t){let n=Ke(t),i=e-n.top-c.value-o.height;o.fixed=e-c.value<r.bottom&&e>n.top,o.transform=i<0?-i:0}else o.fixed=e-c.value<r.bottom}d(a)};return(0,n.watch)(()=>o.fixed,e=>t(`change`,e)),$e(`scroll`,f,{target:a,passive:!0}),or(i,f),(0,n.watch)([vt,yt],()=>{!i.value||_t(i)||!o.fixed||(s.value=!0,(0,n.nextTick)(()=>{let e=Ke(i);o.width=e.width,o.height=e.height,s.value=!1}))}),()=>(0,n.createVNode)(`div`,{ref:i,style:l.value},[(0,n.createVNode)(`div`,{class:cr({fixed:o.fixed&&!s.value}),style:u.value},[r.default?.call(r)])])}})),[dr,fr]=N(`swipe`),pr={loop:k,width:O,height:O,vertical:Boolean,autoplay:A(0),duration:A(500),touchable:k,lazyRender:Boolean,initialSwipe:A(0),indicatorColor:String,showIndicators:k,stopPropagation:k},mr=Symbol(dr),hr=P((0,n.defineComponent)({name:dr,props:pr,emits:[`change`,`dragStart`,`dragEnd`],setup(e,{emit:t,slots:r}){let i=(0,n.ref)(),a=(0,n.ref)(),o=(0,n.reactive)({rect:null,width:0,height:0,offset:0,active:0,swiping:!1}),s=!1,c=En(),{children:l,linkChildren:u}=Ze(mr),d=(0,n.computed)(()=>l.length),f=(0,n.computed)(()=>o[e.vertical?`height`:`width`]),p=(0,n.computed)(()=>e.vertical?c.deltaY.value:c.deltaX.value),m=(0,n.computed)(()=>o.rect?(e.vertical?o.rect.height:o.rect.width)-f.value*d.value:0),h=(0,n.computed)(()=>f.value?Math.ceil(Math.abs(m.value)/f.value):d.value),g=(0,n.computed)(()=>d.value*f.value),_=(0,n.computed)(()=>(o.active+d.value)%d.value),v=(0,n.computed)(()=>{let t=e.vertical?`vertical`:`horizontal`;return c.direction.value===t}),y=(0,n.computed)(()=>{let t={transitionDuration:`${o.swiping?0:e.duration}ms`,transform:`translate${e.vertical?`Y`:`X`}(${+o.offset.toFixed(2)}px)`};if(f.value){let n=e.vertical?`height`:`width`,r=e.vertical?`width`:`height`;t[n]=`${g.value}px`,t[r]=e[r]?`${e[r]}px`:``}return t}),b=t=>{let{active:n}=o;return t?e.loop?jt(n+t,-1,d.value):jt(n+t,0,h.value):n},x=(t,n=0)=>{let r=t*f.value;e.loop||(r=Math.min(r,-m.value));let i=n-r;return e.loop||(i=jt(i,m.value,0)),i},S=({pace:n=0,offset:r=0,emitChange:i})=>{if(d.value<=1)return;let{active:a}=o,s=b(n),c=x(s,r);if(e.loop){if(l[0]&&c!==m.value){let e=c<m.value;l[0].setOffset(e?g.value:0)}if(l[d.value-1]&&c!==0){let e=c>0;l[d.value-1].setOffset(e?-g.value:0)}}o.active=s,o.offset=c,i&&s!==a&&t(`change`,_.value)},C=()=>{o.swiping=!0,o.active<=-1?S({pace:d.value}):o.active>=d.value&&S({pace:-d.value})},w=()=>{C(),c.reset(),Ue(()=>{o.swiping=!1,S({pace:-1,emitChange:!0})})},ee=()=>{C(),c.reset(),Ue(()=>{o.swiping=!1,S({pace:1,emitChange:!0})})},te,T=()=>clearTimeout(te),ne=()=>{T(),+e.autoplay>0&&d.value>1&&(te=setTimeout(()=>{ee(),ne()},+e.autoplay))},E=(t=+e.initialSwipe)=>{if(!i.value)return;let r=()=>{if(!_t(i)){let t={width:i.value.offsetWidth,height:i.value.offsetHeight};o.rect=t,o.width=+(e.width??t.width),o.height=+(e.height??t.height)}d.value&&(t=Math.min(d.value-1,t),t===-1&&(t=d.value-1)),o.active=t,o.swiping=!0,o.offset=x(t),l.forEach(e=>{e.setOffset(0)}),ne()};_t(i)?(0,n.nextTick)().then(r):r()},re=()=>E(o.active),ie,ae=t=>{!e.touchable||t.touches.length>1||(c.start(t),s=!1,ie=Date.now(),T(),C())},oe=n=>{e.touchable&&o.swiping&&(c.move(n),v.value&&(!e.loop&&(o.active===0&&p.value>0||o.active===d.value-1&&p.value<0)||(gt(n,e.stopPropagation),S({offset:p.value}),s||=(t(`dragStart`,{index:_.value}),!0))))},se=()=>{if(!e.touchable||!o.swiping)return;let n=Date.now()-ie,r=p.value/n;if((Math.abs(r)>.25||Math.abs(p.value)>f.value/2)&&v.value){let t=e.vertical?c.offsetY.value:c.offsetX.value,n=0;n=e.loop?t>0?p.value>0?-1:1:0:-Math[p.value>0?`ceil`:`floor`](p.value/f.value),S({pace:n,emitChange:!0})}else p.value&&S({pace:0});s=!1,o.swiping=!1,t(`dragEnd`,{index:_.value}),ne()},ce=(t,n={})=>{C(),c.reset(),Ue(()=>{let r;r=e.loop&&t===d.value?o.active===0?0:t:t%d.value,n.immediate?Ue(()=>{o.swiping=!1}):o.swiping=!1,S({pace:r-o.active,emitChange:!0})})},le=(t,r)=>{let i=r===_.value,a=i?{backgroundColor:e.indicatorColor}:void 0;return(0,n.createVNode)(`i`,{style:a,class:fr(`indicator`,{active:i})},null)},ue=()=>{if(r.indicator)return r.indicator({active:_.value,total:d.value});if(e.showIndicators&&d.value>1)return(0,n.createVNode)(`div`,{class:fr(`indicators`,{vertical:e.vertical})},[Array(d.value).fill(``).map(le)])};return Yt({prev:w,next:ee,state:o,resize:re,swipeTo:ce}),u({size:f,props:e,count:d,activeIndicator:_}),(0,n.watch)(()=>e.initialSwipe,e=>E(+e)),(0,n.watch)(d,()=>E(o.active)),(0,n.watch)(()=>e.autoplay,ne),(0,n.watch)([vt,yt,()=>e.width,()=>e.height],re),(0,n.watch)(lt(),e=>{e===`visible`?ne():T()}),(0,n.onMounted)(E),(0,n.onActivated)(()=>E(o.active)),Jt(()=>E(o.active)),(0,n.onDeactivated)(T),(0,n.onBeforeUnmount)(T),$e(`touchmove`,oe,{target:a}),()=>(0,n.createVNode)(`div`,{ref:i,class:fr()},[(0,n.createVNode)(`div`,{ref:a,style:y.value,class:fr(`track`,{vertical:e.vertical}),onTouchstartPassive:ae,onTouchend:se,onTouchcancel:se},[r.default?.call(r)]),ue()])}})),[gr,_r]=N(`tabs`),vr=(0,n.defineComponent)({name:gr,props:{count:Re(Number),inited:Boolean,animated:Boolean,duration:Re(O),swipeable:Boolean,lazyRender:Boolean,currentIndex:Re(Number)},emits:[`change`],setup(e,{emit:t,slots:r}){let i=(0,n.ref)(),a=e=>t(`change`,e),o=()=>{let t=r.default?.call(r);return e.animated||e.swipeable?(0,n.createVNode)(hr,{ref:i,loop:!1,class:_r(`track`),duration:e.duration*1e3,touchable:e.swipeable,lazyRender:e.lazyRender,showIndicators:!1,onChange:a},{default:()=>[t]}):t},s=t=>{let n=i.value;n&&n.state.active!==t&&n.swipeTo(t,{immediate:!e.inited})};return(0,n.watch)(()=>e.currentIndex,s),(0,n.onMounted)(()=>{s(e.currentIndex)}),Yt({swipeRef:i}),()=>(0,n.createVNode)(`div`,{class:_r(`content`,{animated:e.animated||e.swipeable})},[o()])}}),[yr,br]=N(`tabs`),xr={type:j(`line`),color:String,border:Boolean,sticky:Boolean,shrink:Boolean,active:A(0),duration:A(.3),animated:Boolean,ellipsis:k,swipeable:Boolean,scrollspy:Boolean,offsetTop:A(0),background:String,lazyRender:k,showHeader:k,lineWidth:O,lineHeight:O,beforeChange:Function,swipeThreshold:A(5),titleActiveColor:String,titleInactiveColor:String},Sr=Symbol(yr),Cr=(0,n.defineComponent)({name:yr,props:xr,emits:[`change`,`scroll`,`rendered`,`clickTab`,`update:active`],setup(e,{emit:t,slots:r}){let i,a,o,s,c,l=(0,n.ref)(),u=(0,n.ref)(),d=(0,n.ref)(),f=(0,n.ref)(),p=ir(),m=st(l),[h,g]=ar(),{children:_,linkChildren:v}=Ze(Sr),y=(0,n.reactive)({inited:!1,position:``,lineStyle:{},currentIndex:-1}),b=(0,n.computed)(()=>_.length>+e.swipeThreshold||!e.ellipsis||e.shrink),x=(0,n.computed)(()=>({borderColor:e.color,background:e.background})),S=(e,t)=>e.name??t,C=(0,n.computed)(()=>{let e=_[y.currentIndex];if(e)return S(e,y.currentIndex)}),w=(0,n.computed)(()=>Dt(e.offsetTop)),ee=(0,n.computed)(()=>e.sticky?w.value+i:0),te=t=>{let n=u.value,r=h.value;if(!b.value||!n||!r||!r[y.currentIndex])return;let i=r[y.currentIndex].$el,a=i.offsetLeft-(n.offsetWidth-i.offsetWidth)/2;s&&s(),s=tr(n,a,t?0:+e.duration)},T=()=>{let t=y.inited;(0,n.nextTick)(()=>{let n=h.value;if(!n||!n[y.currentIndex]||e.type!==`line`||_t(l.value))return;let r=n[y.currentIndex].$el,{lineWidth:i,lineHeight:a}=e,o=r.offsetLeft+r.offsetWidth/2,s={width:M(i),backgroundColor:e.color,transform:`translateX(${o}px) translateX(-50%)`};if(t&&(s.transitionDuration=`${e.duration}s`),je(a)){let e=M(a);s.height=e,s.borderRadius=e}y.lineStyle=s})},ne=e=>{let t=e<y.currentIndex?-1:1;for(;e>=0&&e<_.length;){if(!_[e].disabled)return e;e+=t}},E=(n,r)=>{let i=ne(n);if(!je(i))return;let a=_[i],s=S(a,i),c=y.currentIndex!==null;y.currentIndex!==i&&(y.currentIndex=i,r||te(),T()),s!==e.active&&(t(`update:active`,s),c&&t(`change`,s,a.title)),o&&!e.scrollspy&&pt(Math.ceil(mt(l.value)-w.value))},re=(e,t)=>{let n=_.findIndex((t,n)=>S(t,n)===e);E(n===-1?0:n,t)},ie=(t=!1)=>{if(e.scrollspy){let n=_[y.currentIndex].$el;if(n&&m.value){let r=mt(n,m.value)-ee.value;a=!0,c&&c(),c=nr(m.value,r,t?0:+e.duration,()=>{a=!1})}}},ae=(n,r,i)=>{let{title:a,disabled:o}=_[r],s=S(_[r],r);o||(Gt(e.beforeChange,{args:[s],done:()=>{E(r),ie()}}),Zt(n)),t(`clickTab`,{name:s,title:a,event:i,disabled:o})},oe=e=>{o=e.isFixed,t(`scroll`,e)},se=e=>{(0,n.nextTick)(()=>{re(e),ie(!0)})},ce=()=>{for(let e=0;e<_.length;e++){let{top:t}=Ke(_[e].$el);if(t>ee.value)return e===0?0:e-1}return _.length-1},le=()=>{e.scrollspy&&!a&&E(ce())},ue=()=>{if(e.type===`line`&&_.length)return(0,n.createVNode)(`div`,{class:br(`line`),style:y.lineStyle},null)},de=()=>{let{type:t,border:i,sticky:a}=e,o=[(0,n.createVNode)(`div`,{ref:a?void 0:d,class:[br(`wrap`),{[Ut]:t===`line`&&i}]},[(0,n.createVNode)(`div`,{ref:u,role:`tablist`,class:br(`nav`,[t,{shrink:e.shrink,complete:b.value}]),style:x.value,"aria-orientation":`horizontal`},[r[`nav-left`]?.call(r),_.map(e=>e.renderTitle(ae)),ue(),r[`nav-right`]?.call(r)])]),r[`nav-bottom`]?.call(r)];return a?(0,n.createVNode)(`div`,{ref:d},[o]):o},fe=()=>{T(),(0,n.nextTick)(()=>{var e;te(!0),(e=f.value?.swipeRef.value)==null||e.resize()})};return(0,n.watch)(()=>[e.color,e.duration,e.lineWidth,e.lineHeight],T),(0,n.watch)(vt,fe),(0,n.watch)(()=>e.active,e=>{e!==C.value&&re(e)}),(0,n.watch)(()=>_.length,()=>{y.inited&&(re(e.active),T(),(0,n.nextTick)(()=>{te(!0)}))}),Yt({resize:fe,scrollTo:se}),(0,n.onActivated)(T),Jt(T),Qe(()=>{re(e.active,!0),(0,n.nextTick)(()=>{y.inited=!0,d.value&&(i=Ke(d.value).height),te(!0)})}),or(l,T),$e(`scroll`,le,{target:m,passive:!0}),v({id:p,props:e,setLine:T,scrollable:b,onRendered:(e,n)=>t(`rendered`,e,n),currentName:C,setTitleRefs:g,scrollIntoView:te}),()=>(0,n.createVNode)(`div`,{ref:l,class:br([e.type])},[e.showHeader?e.sticky?(0,n.createVNode)(ur,{container:l.value,offsetTop:w.value,onScroll:oe},{default:()=>[de()]}):de():null,(0,n.createVNode)(vr,{ref:f,count:_.length,inited:y.inited,animated:e.animated,duration:e.duration,swipeable:e.swipeable,lazyRender:e.lazyRender,currentIndex:y.currentIndex,onChange:E},{default:()=>[r.default?.call(r)]})])}}),wr=Symbol(),Tr=Symbol(),Er=()=>(0,n.inject)(Tr,null),Dr=e=>{let t=Er();(0,n.provide)(wr,e),(0,n.provide)(Tr,(0,n.computed)(()=>(t==null||t.value)&&e.value))},[Or,kr]=N(`tab`),Ar=(0,n.defineComponent)({name:Or,props:{id:String,dot:Boolean,type:String,color:String,title:String,badge:O,shrink:Boolean,isActive:Boolean,disabled:Boolean,controls:String,scrollable:Boolean,activeColor:String,inactiveColor:String,showZeroBadge:k},setup(e,{slots:t}){let r=(0,n.computed)(()=>{let t={},{type:n,color:r,disabled:i,isActive:a,activeColor:o,inactiveColor:s}=e;r&&n===`card`&&(t.borderColor=r,i||(a?t.backgroundColor=r:t.color=r));let c=a?o:s;return c&&(t.color=c),t}),i=()=>{let r=(0,n.createVNode)(`span`,{class:kr(`text`,{ellipsis:!e.scrollable})},[t.title?t.title():e.title]);return e.dot||je(e.badge)&&e.badge!==``?(0,n.createVNode)(tn,{dot:e.dot,content:e.badge,showZero:e.showZeroBadge},{default:()=>[r]}):r};return()=>(0,n.createVNode)(`div`,{id:e.id,role:`tab`,class:[kr([e.type,{grow:e.scrollable&&!e.shrink,shrink:e.shrink,active:e.isActive,disabled:e.disabled}])],style:r.value,tabindex:e.disabled?void 0:e.isActive?0:-1,"aria-selected":e.isActive,"aria-disabled":e.disabled||void 0,"aria-controls":e.controls,"data-allow-mismatch":`attribute`},[i()])}}),[jr,Mr]=N(`swipe-item`),Nr=P((0,n.defineComponent)({name:jr,setup(e,{slots:t}){let r,i=(0,n.reactive)({offset:0,inited:!1,mounted:!1}),{parent:a,index:o}=qe(mr);if(!a){process.env.NODE_ENV!==`production`&&console.error(`[Vant] <SwipeItem> must be a child component of <Swipe>.`);return}let s=(0,n.computed)(()=>{let e={},{vertical:t}=a.props;return a.size.value&&(e[t?`height`:`width`]=`${a.size.value}px`),i.offset&&(e.transform=`translate${t?`Y`:`X`}(${i.offset}px)`),e}),c=(0,n.computed)(()=>{let{loop:e,lazyRender:t}=a.props;if(!t||r)return!0;if(!i.mounted)return!1;let n=a.activeIndicator.value,s=a.count.value-1,c=n===0&&e?s:n-1,l=n===s&&e?0:n+1;return r=o.value===n||o.value===c||o.value===l,r});return(0,n.onMounted)(()=>{(0,n.nextTick)(()=>{i.mounted=!0})}),Yt({setOffset:e=>{i.offset=e}}),()=>(0,n.createVNode)(`div`,{class:Mr(),style:s.value},[c.value?t.default?.call(t):null])}})),[Pr,Fr]=N(`tab`),Ir=Oe({},Xt,{dot:Boolean,name:O,badge:O,title:String,disabled:Boolean,titleClass:null,titleStyle:[String,Object],showZeroBadge:k}),Lr=P((0,n.defineComponent)({name:Pr,props:Ir,setup(e,{slots:t}){let r=ir(),i=(0,n.ref)(!1),a=(0,n.getCurrentInstance)(),{parent:o,index:s}=qe(Sr);if(!o){process.env.NODE_ENV!==`production`&&console.error(`[Vant] <Tab> must be a child component of <Tabs>.`);return}let c=()=>e.name??s.value,l=()=>{i.value=!0,o.props.lazyRender&&(0,n.nextTick)(()=>{o.onRendered(c(),e.title)})},u=(0,n.computed)(()=>{let e=c()===o.currentName.value;return e&&!i.value&&l(),e}),d=(0,n.ref)(``),f=(0,n.ref)(``);(0,n.watchEffect)(()=>{let{titleClass:t,titleStyle:n}=e;d.value=t?er(t):``,f.value=n&&typeof n!=`string`?$n(Jn(n)):n});let p=i=>(0,n.createVNode)(Ar,(0,n.mergeProps)({key:r,id:`${o.id}-${s.value}`,ref:o.setTitleRefs(s.value),style:f.value,class:d.value,isActive:u.value,controls:r,scrollable:o.scrollable.value,activeColor:o.props.titleActiveColor,inactiveColor:o.props.titleInactiveColor,onClick:e=>i(a.proxy,s.value,e)},Le(o.props,[`type`,`color`,`shrink`]),Le(e,[`dot`,`badge`,`title`,`disabled`,`showZeroBadge`])),{title:t.title}),m=(0,n.ref)(!u.value);return(0,n.watch)(u,e=>{e?m.value=!1:Ue(()=>{m.value=!0})}),(0,n.watch)(()=>e.title,()=>{o.setLine(),o.scrollIntoView()}),Dr(u),Yt({id:r,renderTitle:p}),()=>{let e=`${o.id}-${s.value}`,{animated:a,swipeable:c,scrollspy:l,lazyRender:d}=o.props;if(!t.default&&!a)return;let f=l||u.value;if(a||c)return(0,n.createVNode)(Nr,{id:r,role:`tabpanel`,class:Fr(`panel-wrapper`,{inactive:m.value}),tabindex:u.value?0:-1,"aria-hidden":!u.value,"aria-labelledby":e,"data-allow-mismatch":`attribute`},{default:()=>[(0,n.createVNode)(`div`,{class:Fr(`panel`)},[t.default?.call(t)])]});let p=i.value||l||!d?t.default?.call(t):null;return(0,n.withDirectives)((0,n.createVNode)(`div`,{id:r,role:`tabpanel`,class:Fr(`panel`),tabindex:f?0:-1,"aria-labelledby":e,"data-allow-mismatch":`attribute`},[p]),[[n.vShow,f]])}}})),Rr=P(Cr),zr={height:A(0),anchors:ze(),duration:A(.3),magnetic:k,contentDraggable:k,lockScroll:Boolean,safeAreaInsetBottom:k},[Br,Vr]=N(`floating-panel`),Hr=P((0,n.defineComponent)({name:Br,props:zr,emits:[`heightChange`,`update:height`],setup(e,{emit:t,slots:r}){let i=.2,a=(0,n.ref)(),o=(0,n.ref)(),s=Bn(()=>+e.height,e=>t(`update:height`,e)),c=(0,n.computed)(()=>({min:e.anchors[0]??100,max:e.anchors[e.anchors.length-1]??Math.round(yt.value*.6)})),l=(0,n.computed)(()=>e.anchors.length>=2?e.anchors:[c.value.min,c.value.max]),u=(0,n.ref)(!1),d=(0,n.computed)(()=>({height:M(c.value.max),transform:`translateY(calc(100% + ${M(-s.value)}))`,transition:u.value?`none`:`transform ${e.duration}s cubic-bezier(0.18, 0.89, 0.32, 1.28)`})),f=e=>{let t=Math.abs(e),{min:n,max:r}=c.value;return t>r?-(r+(t-r)*i):t<n?-(n-(n-t)*i):e},p,m=-1,h=En(),g=e=>{h.start(e),u.value=!0,p=-s.value,m=-1},_=t=>{h.move(t);let n=t.target;if(o.value===n||o.value?.contains(n)){let{scrollTop:n}=o.value;if(m=Math.max(m,n),!e.contentDraggable)return;if(-p<c.value.max)gt(t,!0);else if(!(n<=0&&h.deltaY.value>0)||m>0)return}s.value=-f(h.deltaY.value+p)},v=()=>{if(m=-1,u.value=!1,e.magnetic)s.value=Kt(l.value,s.value);else{let{min:e,max:t}=c.value;s.value=Math.max(e,Math.min(t,s.value))}s.value!==-p&&t(`heightChange`,{height:s.value})};(0,n.watch)(c,()=>{s.value=Kt(l.value,s.value)},{immediate:!0}),kn(a,()=>e.lockScroll||u.value),$e(`touchmove`,_,{target:a});let y=()=>r.header?r.header():(0,n.createVNode)(`div`,{class:Vr(`header`)},[(0,n.createVNode)(`div`,{class:Vr(`header-bar`)},null)]);return()=>(0,n.createVNode)(`div`,{class:[Vr(),{"van-safe-area-bottom":e.safeAreaInsetBottom}],ref:a,style:d.value,onTouchstartPassive:g,onTouchend:v,onTouchcancel:v},[y(),(0,n.createVNode)(`div`,{class:Vr(`content`),ref:o,style:{paddingBottom:M(c.value.max-s.value)}},[r.default?.call(r)])])}})),[Ur,Wr,Gr]=N(`pull-refresh`),Kr=50,qr=[`pulling`,`loosing`,`success`],Jr={disabled:Boolean,modelValue:Boolean,headHeight:A(Kr),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:O,successDuration:A(500),animationDuration:A(300)},Yr=P((0,n.defineComponent)({name:Ur,props:Jr,emits:[`change`,`refresh`,`update:modelValue`],setup(e,{emit:t,slots:r}){let i,a=(0,n.ref)(),o=(0,n.ref)(),s=st(a),c=(0,n.reactive)({status:`normal`,distance:0,duration:0}),l=En(),u=()=>{if(e.headHeight!==Kr)return{height:`${e.headHeight}px`}},d=()=>c.status!==`loading`&&c.status!==`success`&&!e.disabled,f=t=>{let n=+(e.pullDistance||e.headHeight);return t>n&&(t=t<n*2?n+(t-n)/2:n*1.5+(t-n*2)/4),Math.round(t)},p=(n,r)=>{let i=+(e.pullDistance||e.headHeight);c.distance=n,r?c.status=`loading`:n===0?c.status=`normal`:n<i?c.status=`pulling`:c.status=`loosing`,t(`change`,{status:c.status,distance:n})},m=()=>{let{status:t}=c;return t===`normal`?``:e[`${t}Text`]||Gr(t)},h=()=>{let{status:e,distance:t}=c;if(r[e])return r[e]({distance:t});let i=[];return qr.includes(e)&&i.push((0,n.createVNode)(`div`,{class:Wr(`text`)},[m()])),e===`loading`&&i.push((0,n.createVNode)(Cn,{class:Wr(`loading`)},{default:m})),i},g=()=>{c.status=`success`,setTimeout(()=>{p(0)},+e.successDuration)},_=e=>{i=ut(s.value)===0,i&&(c.duration=0,l.start(e))},v=e=>{d()&&_(e)},y=e=>{if(d()){i||_(e);let{deltaY:t}=l;l.move(e),i&&t.value>=0&&l.isVertical()&&(gt(e),p(f(t.value)))}},b=()=>{i&&l.deltaY.value&&d()&&(c.duration=+e.animationDuration,c.status===`loosing`?(p(+e.headHeight,!0),t(`update:modelValue`,!0),(0,n.nextTick)(()=>t(`refresh`))):p(0))};return(0,n.watch)(()=>e.modelValue,t=>{c.duration=+e.animationDuration,t?p(+e.headHeight,!0):r.success||e.successText?g():p(0,!1)}),$e(`touchmove`,y,{target:o}),()=>{let e={transitionDuration:`${c.duration}ms`,transform:c.distance?`translate3d(0,${c.distance}px, 0)`:``};return(0,n.createVNode)(`div`,{ref:a,class:Wr()},[(0,n.createVNode)(`div`,{ref:o,class:Wr(`track`),style:e,onTouchstartPassive:v,onTouchend:b,onTouchcancel:b},[(0,n.createVNode)(`div`,{class:Wr(`head`),style:u()},[h()]),r.default?.call(r)])])}}}));function Xr(e){return Array.isArray(e)?e:Array.from(e)}function Zr(e){return e!=null&&typeof e!=`function`&&we(e.length)}function Qr(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function $r(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function ei(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(ei).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function ti(e){if(Array.isArray(e))return e.map($r);if(typeof e==`symbol`)return[e];e=ei(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&(t.push(``),r++);r<n;){let s=e[r];a?s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s:o?s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s:s===`[`?(o=!0,i&&=(t.push(i),``)):s===`.`?i&&=(t.push(i),``):i+=s,r++}return i&&t.push(i),t}function ni(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(ye(t))return n;let r=e[t];return r===void 0?Qr(t)?ni(e,ti(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=$r(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return ri(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),ye(t))return n;let r=e[t];return r===void 0?n:r}}}function ri(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||ye(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function ii(e){return function(t){return ni(t,e)}}function ai(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function oi(e,t,n){return typeof n==`function`?si(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?si(t,r,e,s):!!c},new Map):oi(e,t,()=>void 0)}function si(e,t,n,r){if(t===e)return!0;switch(typeof t){case`object`:return ci(e,t,n,r);case`function`:return Object.keys(t).length>0?si(e,{...t},n,r):xe(e,t);default:return ai(e)?typeof t==`string`?t===``:!0:xe(e,t)}}function ci(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return ui(e,t,n,r);if(t instanceof Map)return li(e,t,n,r);if(t instanceof Set)return di(e,t,n,r);let i=Object.keys(t);if(e==null||g(e))return i.length===0;if(i.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let a=0;a<i.length;a++){let o=i[a];if(!g(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function li(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function ui(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function di(e,t,n,r){return t.size===0?!0:e instanceof Set?ui([...e],[...t],n,r):!1}function fi(e,t){return oi(e,t,()=>void 0)}function pi(e){return e=ve(e),t=>fi(t,e)}function mi(e,t){return he(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(y(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),D(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case S:case x:case C:{let t=new e.constructor(e?.valueOf());return D(t,e),t}case w:{let t={};return D(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function hi(e){return mi(e)}var gi=/^(?:0|[1-9]\d*)$/;function _i(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return gi.test(e)}}function vi(e){return typeof e==`object`&&!!e&&y(e)===`[object Arguments]`}function yi(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&Qr(t)&&e?.[t]==null?ti(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||vi(r))&&_i(t)&&t<r.length))return!1;r=r[t]}return!0}function bi(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=$r(e);break}return t=hi(t),function(n){let r=ni(n,e);return r===void 0?yi(n,e):t===void 0?r===void 0:fi(r,t)}}function xi(e){if(e==null)return p;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?bi(e[0],e[1]):pi(e);case`string`:case`symbol`:case`number`:return ii(e)}}function Si(e){if(Zr(e))return l(Xr(e))}function Ci(e){return typeof e==`string`||e instanceof String}function wi(e,t=p){return u(e,xi(t))}function Ti(e){return typeof e==`number`||e instanceof Number}function Ei(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=f(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function Di(e,t,n=0){if(t=Number(t),Object.is(t,-0)&&(t=`-0`),n=Math.min(Number.parseInt(n,10),292),n){let[r,i=0]=t.toString().split(`e`),a=Math[e](Number(`${r}e${Number(i)+n}`));Object.is(a,-0)&&(a=`-0`);let[o,s=0]=a.toString().split(`e`);return Number(`${o}e${Number(s)-n}`)}return Math[e](Number(t))}function Oi(e,t=0){return Di(`ceil`,e,t)}function ki(...e){}function Ai(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function ji(e){return _(e)}function Mi(e){if(e==null)return!0;if(Zr(e))return typeof e.splice!=`function`&&typeof e!=`string`&&(typeof Buffer>`u`||!Buffer.isBuffer(e))&&!ji(e)&&!vi(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Ai(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}function Ni(e,t){return(0,n.getCurrentScope)()?((0,n.onScopeDispose)(e,t),!0):!1}var Pi=new WeakMap,Fi=(...e)=>{let t=e[0],r=(0,n.getCurrentInstance)()?.proxy??(0,n.getCurrentScope)();if(r==null&&!(0,n.hasInjectionContext)())throw Error(`injectLocal must be called in setup`);return r&&Pi.has(r)&&t in Pi.get(r)?Pi.get(r)[t]:(0,n.inject)(...e)},Ii=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var Li=e=>e!==void 0,Ri=e=>e!=null,zi=Object.prototype.toString,Bi=e=>zi.call(e)===`[object Object]`,Vi=()=>{};function Hi(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function Ui(e,t={}){let r,i,a=Vi,o=e=>{clearTimeout(e),a(),a=Vi},s;return c=>{let l=(0,n.toValue)(e),u=(0,n.toValue)(t.maxWait);return r&&o(r),l<=0||u!==void 0&&u<=0?(i&&=(o(i),void 0),Promise.resolve(c())):new Promise((e,n)=>{a=t.rejectOnCancel?n:e,s=c,u&&!i&&(i=setTimeout(()=>{r&&o(r),i=void 0,e(s())},u)),r=setTimeout(()=>{i&&o(i),i=void 0,e(c())},l)})}}function Wi(...e){let t=0,r,i=!0,a=Vi,o,s,c,l,u;!(0,n.isRef)(e[0])&&typeof e[0]==`object`?{delay:s,trailing:c=!0,leading:l=!0,rejectOnCancel:u=!1}=e[0]:[s,c=!0,l=!0,u=!1]=e;let d=()=>{r&&(clearTimeout(r),r=void 0,a(),a=Vi)};return e=>{let f=(0,n.toValue)(s),p=Date.now()-t,m=()=>o=e();return d(),f<=0?(t=Date.now(),m()):(p>f?(t=Date.now(),(l||!i)&&m()):c&&(o=new Promise((e,n)=>{a=u?n:e,r=setTimeout(()=>{t=Date.now(),i=!0,e(m()),d()},Math.max(0,f-p))})),!l&&!r&&(r=setTimeout(()=>i=!0,f)),i=!1,o)}}function Gi(e,t=!1,n=`Timeout`){return new Promise((r,i)=>{t?setTimeout(()=>i(n),e):setTimeout(r,e)})}function Ki(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function qi(e){return Array.isArray(e)?e:[e]}function Ji(e){return e||(0,n.getCurrentInstance)()}function Yi(e,t=200,n={}){return Hi(Ui(t,n),e)}function Xi(e,t=200,n=!1,r=!0,i=!1){return Hi(Wi(t,n,r,i),e)}function Zi(e,t=!0,r){Ji(r)?(0,n.onMounted)(e,r):t?e():(0,n.nextTick)(e)}function Qi(e,t=!1){function r(r,{flush:i=`sync`,deep:a=!1,timeout:o,throwOnTimeout:s}={}){let c=null,l=[new Promise(o=>{c=(0,n.watch)(e,e=>{r(e)!==t&&(c?c():(0,n.nextTick)(()=>c?.()),o(e))},{flush:i,deep:a,immediate:!0})})];return o!=null&&l.push(Gi(o,s).then(()=>(0,n.toValue)(e)).finally(()=>c?.())),Promise.race(l)}function i(i,a){if(!(0,n.isRef)(i))return r(e=>e===i,a);let{flush:o=`sync`,deep:s=!1,timeout:c,throwOnTimeout:l}=a??{},u=null,d=[new Promise(r=>{u=(0,n.watch)([e,i],([e,i])=>{t!==(e===i)&&(u?u():(0,n.nextTick)(()=>u?.()),r(e))},{flush:o,deep:s,immediate:!0})})];return c!=null&&d.push(Gi(c,l).then(()=>(0,n.toValue)(e)).finally(()=>(u?.(),(0,n.toValue)(e)))),Promise.race(d)}function a(e){return r(e=>!!e,e)}function o(e){return i(null,e)}function s(e){return i(void 0,e)}function c(e){return r(Number.isNaN,e)}function l(e,t){return r(t=>{let r=Array.from(t);return r.includes(e)||r.includes((0,n.toValue)(e))},t)}function u(e){return d(1,e)}function d(e=1,t){let n=-1;return r(()=>(n+=1,n>=e),t)}return Array.isArray((0,n.toValue)(e))?{toMatch:r,toContains:l,changed:u,changedTimes:d,get not(){return Qi(e,!t)}}:{toMatch:r,toBe:i,toBeTruthy:a,toBeNull:o,toBeNaN:c,toBeUndefined:s,changed:u,changedTimes:d,get not(){return Qi(e,!t)}}}function $i(e){return Qi(e)}function ea(e,t,r){return(0,n.watch)(e,t,{...r,immediate:!0})}function ta(e,t,r){return(0,n.watch)(e,t,{...r,once:!0})}function na(e,t,r){let i;i=(0,n.isRef)(r)?{evaluating:r}:r||{};let{lazy:a=!1,flush:o=`sync`,evaluating:s=void 0,shallow:c=!0,onError:l=globalThis.reportError??Vi}=i,u=(0,n.shallowRef)(!a),d=c?(0,n.shallowRef)(t):(0,n.ref)(t),f=0;return(0,n.watchEffect)(async t=>{if(!u.value)return;f++;let n=f,r=!1;s&&Promise.resolve().then(()=>{s.value=!0});try{let i=await e(e=>{t(()=>{s&&(s.value=!1),r||e()})});n===f&&(d.value=i)}catch(e){l(e)}finally{s&&n===f&&(s.value=!1),r=!0}},{flush:o}),a?(0,n.computed)(()=>(u.value=!0,d.value)):d}var ra=Ii?window:void 0;Ii&&window.document,Ii&&window.navigator,Ii&&window.location;function ia(e){let t=(0,n.toValue)(e);return t?.$el??t}function aa(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),r=(0,n.computed)(()=>{let t=qi((0,n.toValue)(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return ea(()=>[r.value?.map(e=>ia(e))??[ra].filter(e=>e!=null),qi((0,n.toValue)(r.value?e[1]:e[0])),qi((0,n.unref)(r.value?e[2]:e[1])),(0,n.toValue)(r.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=Bi(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function oa(){let e=(0,n.shallowRef)(!1),t=(0,n.getCurrentInstance)();return t&&(0,n.onMounted)(()=>{e.value=!0},t),e}function sa(e){let t=oa();return(0,n.computed)(()=>(t.value,!!e()))}function ca(e,t,r={}){let{window:i=ra,...a}=r,o,s=sa(()=>i&&`MutationObserver`in i),c=()=>{o&&=(o.disconnect(),void 0)},l=(0,n.watch)((0,n.computed)(()=>{let t=qi((0,n.toValue)(e)).map(ia).filter(Ri);return new Set(t)}),e=>{c(),s.value&&e.size&&(o=new MutationObserver(t),e.forEach(e=>o.observe(e,a)))},{immediate:!0,flush:`post`}),u=()=>o?.takeRecords(),d=()=>{l(),c()};return Ni(d),{isSupported:s,stop:d,takeRecords:u}}var la=500,ua=10;function da(e,t,r){var i,a;let o=(0,n.computed)(()=>ia(e)),s,c,l,u=!1;function d(){s&&=(clearTimeout(s),void 0),c=void 0,l=void 0,u=!1}function f(e){let t=r?.delay;return typeof t==`function`?t(e):t??la}function p(e){var t,n,i;let[a,s,f]=[l,c,u];if(d(),!r?.onMouseUp||!s||!a||!(r==null||(t=r.modifiers)==null)&&t.self&&e.target!==o.value)return;!(r==null||(n=r.modifiers)==null)&&n.prevent&&e.preventDefault(),!(r==null||(i=r.modifiers)==null)&&i.stop&&e.stopPropagation();let p=e.x-s.x,m=e.y-s.y,h=Math.sqrt(p*p+m*m);r.onMouseUp(e.timeStamp-a,h,f)}function m(e){var n,i,a;!(r==null||(n=r.modifiers)==null)&&n.self&&e.target!==o.value||(d(),!(r==null||(i=r.modifiers)==null)&&i.prevent&&e.preventDefault(),!(r==null||(a=r.modifiers)==null)&&a.stop&&e.stopPropagation(),c={x:e.x,y:e.y},l=e.timeStamp,s=setTimeout(()=>{u=!0,t(e)},f(e)))}function h(e){var t,n,i;if(!(r==null||(t=r.modifiers)==null)&&t.self&&e.target!==o.value||!c||r?.distanceThreshold===!1)return;!(r==null||(n=r.modifiers)==null)&&n.prevent&&e.preventDefault(),!(r==null||(i=r.modifiers)==null)&&i.stop&&e.stopPropagation();let a=e.x-c.x,s=e.y-c.y;Math.sqrt(a*a+s*s)>=(r?.distanceThreshold??ua)&&d()}let g={capture:r==null||(i=r.modifiers)==null?void 0:i.capture,once:r==null||(a=r.modifiers)==null?void 0:a.once},_=[aa(o,`pointerdown`,m,g),aa(o,`pointermove`,h,g),aa(o,[`pointerup`,`pointerleave`],p,g)];return()=>_.forEach(e=>e())}var fa=Symbol(`vueuse-ssr-width`);function pa(){let e=(0,n.hasInjectionContext)()?Fi(fa,null):null;return typeof e==`number`?e:void 0}function ma(e,t={}){let{window:r=ra,ssrWidth:i=pa()}=t,a=sa(()=>r&&`matchMedia`in r&&typeof r.matchMedia==`function`),o=(0,n.shallowRef)(typeof i==`number`),s=(0,n.shallowRef)(),c=(0,n.shallowRef)(!1);return(0,n.watchEffect)(()=>{if(o.value){o.value=!a.value,c.value=(0,n.toValue)(e).split(`,`).some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),r=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||r);return n&&a&&(a=i>=Ki(n[1])),r&&a&&(a=i<=Ki(r[1])),t?!a:a});return}a.value&&(s.value=r.matchMedia((0,n.toValue)(e)),c.value=s.value.matches)}),aa(s,`change`,e=>{c.value=e.matches},{passive:!0}),(0,n.computed)(()=>c.value)}function ha(e,t,r={}){let{window:i=ra,...a}=r,o,s=sa(()=>i&&`ResizeObserver`in i),c=()=>{o&&=(o.disconnect(),void 0)},l=(0,n.watch)((0,n.computed)(()=>{let t=(0,n.toValue)(e);return Array.isArray(t)?t.map(e=>ia(e)):[ia(t)]}),e=>{if(c(),s.value&&i){o=new ResizeObserver(t);for(let t of e)t&&o.observe(t,a)}},{immediate:!0,flush:`post`}),u=()=>{c(),l()};return Ni(u),{isSupported:s,stop:u}}var ga=1;function _a(e,t={}){let{throttle:r=0,idle:i=200,onStop:a=Vi,onScroll:o=Vi,offset:s={left:0,right:0,top:0,bottom:0},observe:c={mutation:!1},eventListenerOptions:l={capture:!1,passive:!0},behavior:u=`auto`,window:d=ra,onError:f=e=>{console.error(e)}}=t,p=typeof c==`boolean`?{mutation:c}:c,m=(0,n.shallowRef)(0),h=(0,n.shallowRef)(0),g=(0,n.computed)({get(){return m.value},set(e){v(e,void 0)}}),_=(0,n.computed)({get(){return h.value},set(e){v(void 0,e)}});function v(t,r){var i,a;if(!d)return;let o=(0,n.toValue)(e);if(!o)return;(i=o instanceof Document?d.document.body:o)==null||i.scrollTo({top:(0,n.toValue)(r)??_.value,left:(0,n.toValue)(t)??g.value,behavior:(0,n.toValue)(u)});let s=(o==null||(a=o.document)==null?void 0:a.documentElement)||o?.documentElement||o;g!=null&&(m.value=s.scrollLeft),_!=null&&(h.value=s.scrollTop)}let y=(0,n.shallowRef)(!1),b=(0,n.reactive)({left:!0,right:!1,top:!0,bottom:!1}),x=(0,n.reactive)({left:!1,right:!1,top:!1,bottom:!1}),S=e=>{y.value&&(y.value=!1,x.left=!1,x.right=!1,x.top=!1,x.bottom=!1,a(e))},C=Yi(S,r+i),w=e=>{var t;if(!d)return;let n=(e==null||(t=e.document)==null?void 0:t.documentElement)||e?.documentElement||ia(e),{display:r,flexDirection:i,direction:a}=d.getComputedStyle(n),o=a===`rtl`?-1:1,c=n.scrollLeft;x.left=c<m.value,x.right=c>m.value;let l=Math.abs(c*o)<=(s.left||0),u=Math.abs(c*o)+n.clientWidth>=n.scrollWidth-(s.right||0)-ga;r===`flex`&&i===`row-reverse`?(b.left=u,b.right=l):(b.left=l,b.right=u),m.value=c;let f=n.scrollTop;e===d.document&&!f&&(f=d.document.body.scrollTop),x.top=f<h.value,x.bottom=f>h.value;let p=Math.abs(f)<=(s.top||0),g=Math.abs(f)+n.clientHeight>=n.scrollHeight-(s.bottom||0)-ga;r===`flex`&&i===`column-reverse`?(b.top=g,b.bottom=p):(b.top=p,b.bottom=g),h.value=f},ee=e=>{d&&(w(e.target.documentElement??e.target),y.value=!0,C(e),o(e))};return aa(e,`scroll`,r?Xi(ee,r,!0,!1):ee,l),Zi(()=>{try{let t=(0,n.toValue)(e);if(!t)return;w(t)}catch(e){f(e)}}),p?.mutation&&e!=null&&e!==d&&e!==document&&ca(e,()=>{let t=(0,n.toValue)(e);t&&w(t)},{attributes:!0,childList:!0,subtree:!0}),aa(e,`scrollend`,S,l),{x:g,y:_,isScrolling:y,arrivedState:b,directions:x,measure(){let t=(0,n.toValue)(e);d&&t&&w(t)}}}function va(e={}){let{window:t=ra,initialWidth:r=1/0,initialHeight:i=1/0,listenOrientation:a=!0,includeScrollbar:o=!0,type:s=`inner`}=e,c=(0,n.shallowRef)(r),l=(0,n.shallowRef)(i),u=()=>{if(t)if(s===`outer`)c.value=t.outerWidth,l.value=t.outerHeight;else if(s===`visual`&&t.visualViewport){let{width:e,height:n,scale:r}=t.visualViewport;c.value=Math.round(e*r),l.value=Math.round(n*r)}else o?(c.value=t.innerWidth,l.value=t.innerHeight):(c.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight)};u(),Zi(u);let d={passive:!0};return aa(`resize`,u,d),t&&s===`visual`&&t.visualViewport&&aa(t.visualViewport,`resize`,u,d),a&&(0,n.watch)(ma(`(orientation: portrait)`),()=>u()),{width:c,height:l}}var ya=(0,a.useGlobalVar)((0,n.shallowReactive)([]),`utils/layers`);const ba=e=>{let t=Symbol(`layer`),r=(0,n.watch)((0,n.toRef)(e),e=>{e?ya.push(t):wi(ya,e=>e===t)},{immediate:!0});try{(0,n.onUnmounted)(r)}catch{}return[(0,n.computed)(()=>(ya.indexOf(t)+1)*10),(0,n.computed)(()=>Si(ya)===t),r]},xa=(e,t={})=>{let r=(0,n.shallowRef)(!0),[,,i]=ba(r),a=window.$api.showImagePreview({images:e,...t,overlayClass:`!z-2147483646`,className:`!z-2147483646`,onClose(){r.value=!1},showIndex:e.length>1,teleport:`#popups`}),o=window.$router.beforeEach(()=>r.value=!1);return ta(r,()=>{o(),i(),a.show=!1}),{isShowing:(0,n.computed)(()=>a.show),close:()=>{r.value=!1}}};var Sa=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})((0,n.defineComponent)({__name:`DcLoading`,props:{size:{},type:{},color:{},vertical:{type:Boolean},textSize:{},textColor:{}},setup(e){(0,n.useCssVars)(e=>({f9087f1c:r.value}));let t=e,r=(0,n.computed)(()=>Ti(t.size)?`${t.size}px`:t.size);return(e,r)=>{let i=Cn;return(0,n.openBlock)(),(0,n.createBlock)(i,(0,n.normalizeProps)((0,n.guardReactiveProps)(t)),{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`default`,{},void 0,!0)]),_:3},16)}}}),[[`__scopeId`,`data-v-356358f0`]]),Ca=(0,n.defineComponent)({__name:`DcImage`,props:{src:{},alt:{},previewable:{type:Boolean},retryMax:{default:2},round:{type:Boolean},fit:{},class:{},hideLoading:{type:Boolean},hideError:{type:Boolean},inline:{type:Boolean},style:{type:[Boolean,null,String,Object,Array]},imgProp:{},useList:{},fetchpriority:{default:`auto`},fallback:{}},emits:[`load`,`click`,`error`],setup(e,{expose:t,emit:i}){let a=e,s=na(async()=>{try{return a.src?Ci(a.src)?a.src:await a.src.getUrl():``}catch(e){console.error(e)}return``},``),c=i,l=0,u=!1,d=async()=>{if(u)return p.error.add(s.value),c(`error`);if(l++,m.value=!1,l>a.retryMax){if(!r.uni.resource.Resource.is(a.src)){u=!0,d();return}if(!a.src.localChangeFork()){u=!0,d();return}l=0}await(0,n.nextTick)(),m.value=!0},f=(0,o.useTemp)().$apply(`imageState`,()=>({loaded:new Set,error:new Set})),p=a.useList??f,m=(0,n.shallowRef)(!0),h=()=>{u=!1,l=0,d()};(0,n.watch)(s,h);let g=(0,n.computed)(()=>p.loaded.has(s.value)),_=na(async()=>{try{return a.fallback?Ci(a.fallback)?a.fallback:await a.fallback.getUrl():``}catch(e){console.error(e)}return``},``),v=e=>{c(`click`),a.previewable&&(e.stopPropagation(),xa([s.value],{closeable:!0}))},y=(...e)=>{c(`load`,...e),p.loaded.add(s.value)},b=(0,n.useTemplateRef)(`img`);t({isLoaded:g,imageEl:(0,n.computed)(()=>b.value?.imageRef),imageIns:b});let x=window.$api.NImage;return(t,r)=>{let i=_n;return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[m.value?(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(x),(0,n.mergeProps)({key:0,onError:d},a,{"object-fit":e.fit,"preview-disabled":``,alt:e.alt,ref_key:`img`,ref:b,"img-props":{...e.imgProp??{},class:`w-full`,fetchpriority:a.fetchpriority},class:[{"rounded-full!":!!e.round},e.inline?`inline-flex`:`flex`,a.class],style:e.style,onLoad:y,onClick:v,src:(0,n.unref)(s)}),null,16,[`object-fit`,`alt`,`img-props`,`class`,`style`,`src`])),[[n.vShow,!(0,n.unref)(p).error.has((0,n.unref)(s))&&(0,n.unref)(p).loaded.has((0,n.unref)(s))]]):(0,n.createCommentVNode)(``,!0),!(0,n.unref)(p).loaded.has((0,n.unref)(s))&&!(0,n.unref)(p).error.has((0,n.unref)(s))&&!e.hideLoading?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:1,class:(0,n.normalizeClass)([`items-center justify-center`,[{"rounded-full!":!!e.round},e.inline?`inline-flex`:`flex`,a.class]]),style:(0,n.normalizeStyle)(e.style),onClick:r[0]||=e=>c(`click`)},[t.$slots.loading?(0,n.renderSlot)(t.$slots,`loading`,{key:0}):((0,n.openBlock)(),(0,n.createBlock)(Sa,{key:1}))],6)):(0,n.createCommentVNode)(``,!0),(0,n.unref)(p).error.has((0,n.unref)(s))&&!e.hideError?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:2},[e.fallback?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(x),(0,n.mergeProps)({key:0,onError:d},a,{"object-fit":e.fit,"preview-disabled":``,alt:e.alt,"img-props":{...e.imgProp??{},class:`w-full`,fetchpriority:a.fetchpriority},class:[{"rounded-full!":!!e.round},e.inline?`inline-flex`:`flex`,a.class],style:e.style,src:(0,n.unref)(_)}),null,16,[`object-fit`,`alt`,`img-props`,`class`,`style`,`src`])):((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:1,class:(0,n.normalizeClass)([`flex-col items-center justify-center`,[{"rounded-full!":!!e.round},e.inline?`inline-flex`:`flex`,a.class]]),onClick:r[1]||=(0,n.withModifiers)(()=>{(0,n.unref)(p).error.delete((0,n.unref)(s)),h()},[`stop`])},[t.$slots.loading?(0,n.renderSlot)(t.$slots,`loading`,{key:0}):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createVNode)(i,{name:`warning-o`,size:`2.5rem`,color:`var(--van-text-color-2)`}),r[2]||=(0,n.createElementVNode)(`div`,{class:`text-sm text-(--van-text-color-2)`},`点击重试`,-1)],64))],2))],64)):(0,n.createCommentVNode)(``,!0)],64)}}}),wa=(0,n.defineComponent)({__name:`DcImagedIcon`,props:{icon:{},bgColor:{},sizeSpacing:{}},setup(e){return(t,a)=>{let o=i.NIcon;return(0,n.unref)(r.uni).image.Image.is(e.icon)||(0,n.unref)(r.uni).resource.Resource.is(e.icon)?((0,n.openBlock)(),(0,n.createBlock)(Ca,{key:0,class:`aspect-square size-[calc(var(--spacing)*var(--box-size))] shrink-0`,src:(0,n.unref)(r.uni).resource.Resource.is(e.icon)?(0,n.unref)(r.uni).image.Image.create(e.icon):e.icon,round:``,fit:`cover`,style:(0,n.normalizeStyle)(`--box-size:${e.sizeSpacing};background-color:${e.bgColor??` var(--color-gray-200)`};`)},null,8,[`src`,`style`])):((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:1,class:`flex aspect-square size-[calc(var(--spacing)*var(--box-size))] items-center justify-center rounded-full bg-gray-200`,style:(0,n.normalizeStyle)(`--box-size:${e.sizeSpacing};background-color:${e.bgColor??` var(--color-gray-200)`};`)},[(0,n.createVNode)(o,{color:`var(--p-color)`,size:`calc(var(--spacing) * ${e.sizeSpacing/10*6.5})`},{default:(0,n.withCtx)(()=>[((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.icon)))]),_:1},8,[`size`])],4))}}}),Ta=(0,n.defineComponent)({__name:`DcAuthorIcon`,props:{author:{},sizeSpacing:{}},setup(e){let t=e,i=(0,n.computed)(()=>Te(t.author.icon)?r.uni.item.Item.authorIcon.get([t.author.$$plugin,t.author.icon]):r.uni.image.Image.create(t.author.icon));return(t,r)=>((0,n.openBlock)(),(0,n.createBlock)(wa,{icon:i.value,sizeSpacing:e.sizeSpacing},null,8,[`icon`,`sizeSpacing`]))}}),Ea=(0,n.defineComponent)({__name:`DcAwait`,props:{promise:{type:Function},autoLoad:{type:Boolean}},setup(e){let t=e,r=(0,n.shallowRef)(),i=async()=>r.value=await t.promise();return(0,n.watch)(()=>[t.promise,t.autoLoad],e=>{t.autoLoad&&i()},{immediate:!0}),(e,t)=>(0,n.renderSlot)(e.$slots,`default`,{load:i,result:r.value})}});function Da(e,t){let r=typeof e==`string`&&!t?`${e}Context`:t,i=Symbol(r);return[t=>{let r=(0,n.inject)(i,t);if(r===void 0)throw Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`);return r},e=>((0,n.provide)(i,e),e),i]}function Oa(e,t){let{layoutGroup:n,presenceContext:r,config:i}=t,a=n.id&&e.layoutId?`${n.id}-${e.layoutId}`:e.layoutId||void 0;return{...e,layoutId:a,transition:e.transition??i.transition,layoutGroup:n,motionConfig:i,inViewOptions:e.inViewOptions??i.inViewOptions,presenceContext:r,initial:r.initial===!1?r.initial:e.initial===!0?void 0:e.initial}}function ka(e,t){e.indexOf(t)===-1&&e.push(t)}function Aa(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var F=(e,t,n)=>n>t?t:n<e?e:n;function ja(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var Ma=()=>{},Na=()=>{};typeof process<`u`&&process.env.NODE_ENV!==`production`&&(Ma=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(ja(t,n))},Na=(e,t,n)=>{if(!e)throw Error(ja(t,n))});var Pa={},Fa=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ia(e){return typeof e==`object`&&!!e}var La=e=>/^0[^.\s]+$/u.test(e);function Ra(e){let t;return()=>(t===void 0&&(t=e()),t)}var I=e=>e,za=(e,t)=>n=>t(e(n)),Ba=(...e)=>e.reduce(za),Va=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},Ha=class{constructor(){this.subscriptions=[]}add(e){return ka(this.subscriptions,e),()=>Aa(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},L=e=>e*1e3,R=e=>e/1e3;function Ua(e,t){return t?1e3/t*e:0}var Wa=new Set;function Ga(e,t,n){e||Wa.has(t)||(console.warn(ja(t,n)),Wa.add(t))}var Ka=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,qa=1e-7,Ja=12;function Ya(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Ka(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>qa&&++s<Ja);return o}function Xa(e,t,n,r){if(e===t&&n===r)return I;let i=t=>Ya(t,0,1,e,n);return e=>e===0||e===1?e:Ka(i(e),t,r)}var Za=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Qa=e=>t=>1-e(1-t),$a=Xa(.33,1.53,.69,.99),eo=Qa($a),to=Za(eo),no=e=>(e*=2)<1?.5*eo(e):.5*(2-2**(-10*(e-1))),ro=e=>1-Math.sin(Math.acos(e)),io=Qa(ro),ao=Za(ro),oo=Xa(.42,0,1,1),so=Xa(0,0,.58,1),co=Xa(.42,0,.58,1),lo=e=>Array.isArray(e)&&typeof e[0]!=`number`,uo=e=>Array.isArray(e)&&typeof e[0]==`number`,fo={linear:I,easeIn:oo,easeInOut:co,easeOut:so,circIn:ro,circInOut:ao,circOut:io,backIn:eo,backInOut:to,backOut:$a,anticipate:no},po=e=>typeof e==`string`,mo=e=>{if(uo(e)){Na(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return Xa(t,n,r,i)}else if(po(e))return Na(fo[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),fo[e];return e},ho=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],z={value:null,addProjectionMetrics:null};function go(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),t&&z.value&&z.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var _o=40;function vo(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=ho.reduce((e,n)=>(e[n]=go(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=Pa.useManualTiming?i.timestamp:performance.now();n=!1,Pa.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,_o),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:ho.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<ho.length;t++)o[ho[t]].cancel(e)},state:i,steps:o}}var{schedule:B,cancel:yo,state:V,steps:bo}=vo(typeof requestAnimationFrame<`u`?requestAnimationFrame:I,!0),xo;function So(){xo=void 0}var H={now:()=>(xo===void 0&&H.set(V.isProcessing||Pa.useManualTiming?V.timestamp:performance.now()),xo),set:e=>{xo=e,queueMicrotask(So)}},Co={layout:0,mainThread:0,waapi:0},wo=e=>t=>typeof t==`string`&&t.startsWith(e),To=wo(`--`),Eo=wo(`var(--`),Do=e=>Eo(e)?Oo.test(e.split(`/*`)[0].trim()):!1,Oo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ko(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var Ao={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},jo={...Ao,transform:e=>F(0,1,e)},Mo={...Ao,default:1},No=e=>Math.round(e*1e5)/1e5,Po=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Fo(e){return e==null}var Io=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Lo=(e,t)=>n=>!!(typeof n==`string`&&Io.test(n)&&n.startsWith(e)||t&&!Fo(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ro=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Po);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},zo=e=>F(0,255,e),Bo={...Ao,transform:e=>Math.round(zo(e))},Vo={test:Lo(`rgb`,`red`),parse:Ro(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Bo.transform(e)+`, `+Bo.transform(t)+`, `+Bo.transform(n)+`, `+No(jo.transform(r))+`)`};function Ho(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Uo={test:Lo(`#`),parse:Ho,transform:Vo.transform},Wo=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Go=Wo(`deg`),U=Wo(`%`),W=Wo(`px`),Ko=Wo(`vh`),qo=Wo(`vw`),Jo={...U,parse:e=>U.parse(e)/100,transform:e=>U.transform(e*100)},Yo={test:Lo(`hsl`,`hue`),parse:Ro(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+U.transform(No(t))+`, `+U.transform(No(n))+`, `+No(jo.transform(r))+`)`},G={test:e=>Vo.test(e)||Uo.test(e)||Yo.test(e),parse:e=>Vo.test(e)?Vo.parse(e):Yo.test(e)?Yo.parse(e):Uo.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Vo.transform(e):Yo.transform(e),getAnimatableNone:e=>{let t=G.parse(e);return t.alpha=0,G.transform(t)}},Xo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Zo(e){return isNaN(e)&&typeof e==`string`&&(e.match(Po)?.length||0)+(e.match(Xo)?.length||0)>0}var Qo=`number`,$o=`color`,es=`var`,ts=`var(`,ns="${}",rs=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function is(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(rs,e=>(G.test(e)?(r.color.push(a),i.push($o),n.push(G.parse(e))):e.startsWith(ts)?(r.var.push(a),i.push(es),n.push(e)):(r.number.push(a),i.push(Qo),n.push(parseFloat(e))),++a,ns)).split(ns),indexes:r,types:i}}function as(e){return is(e).values}function os(e){let{split:t,types:n}=is(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];t===Qo?i+=No(e[a]):t===$o?i+=G.transform(e[a]):i+=e[a]}return i}}var ss=e=>typeof e==`number`?0:G.test(e)?G.getAnimatableNone(e):e;function cs(e){let t=as(e);return os(e)(t.map(ss))}var K={test:Zo,parse:as,createTransformer:os,getAnimatableNone:cs};function ls(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function us({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=ls(s,r,e+1/3),a=ls(s,r,e),o=ls(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function ds(e,t){return n=>n>0?t:e}var q=(e,t,n)=>e+(t-e)*n,fs=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},ps=[Uo,Vo,Yo],ms=e=>ps.find(t=>t.test(e));function hs(e){let t=ms(e);if(Ma(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===Yo&&(n=us(n)),n}var gs=(e,t)=>{let n=hs(e),r=hs(t);if(!n||!r)return ds(e,t);let i={...n};return e=>(i.red=fs(n.red,r.red,e),i.green=fs(n.green,r.green,e),i.blue=fs(n.blue,r.blue,e),i.alpha=q(n.alpha,r.alpha,e),Vo.transform(i))},_s=new Set([`none`,`hidden`]);function vs(e,t){return _s.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function ys(e,t){return n=>q(e,t,n)}function bs(e){return typeof e==`number`?ys:typeof e==`string`?Do(e)?ds:G.test(e)?gs:ws:Array.isArray(e)?xs:typeof e==`object`?G.test(e)?gs:Ss:ds}function xs(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>bs(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Ss(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=bs(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Cs(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var ws=(e,t)=>{let n=K.createTransformer(t),r=is(e),i=is(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?_s.has(e)&&!i.values.length||_s.has(t)&&!r.values.length?vs(e,t):Ba(xs(Cs(r,i),i.values),n):(Ma(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),ds(e,t))};function Ts(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?q(e,t,n):bs(e)(e,t)}var Es=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>B.update(t,e),stop:()=>yo(t),now:()=>V.isProcessing?V.timestamp:H.now()}},Ds=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Os=2e4;function ks(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function As(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(ks(r),Os);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:R(i)}}var js=5;function Ms(e,t,n){let r=Math.max(t-js,0);return Ua(n-e(r),t-r)}var J={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ns=.001;function Ps({duration:e=J.duration,bounce:t=J.bounce,velocity:n=J.velocity,mass:r=J.mass}){let i,a;Ma(e<=L(J.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=F(J.minDamping,J.maxDamping,o),e=F(J.minDuration,J.maxDuration,R(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Ls(t,o),c=Math.exp(-i);return Ns-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Ls(t**2,o);return(-i(t)+Ns>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Ns+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Is(i,a,s);if(e=L(e),isNaN(c))return{stiffness:J.stiffness,damping:J.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Fs=12;function Is(e,t,n){let r=n;for(let n=1;n<Fs;n++)r-=e(r)/t(r);return r}function Ls(e,t){return e*Math.sqrt(1-t*t)}var Rs=[`duration`,`bounce`],zs=[`stiffness`,`damping`,`mass`];function Bs(e,t){return t.some(t=>e[t]!==void 0)}function Vs(e){let t={velocity:J.velocity,stiffness:J.stiffness,damping:J.damping,mass:J.mass,isResolvedFromDuration:!1,...e};if(!Bs(e,zs)&&Bs(e,Rs))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*F(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:J.mass,stiffness:i,damping:a}}else{let n=Ps({...e,velocity:0});t={...t,...n,mass:J.mass},t.isResolvedFromDuration=!0}return t}function Hs(e=J.visualDuration,t=J.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Vs({...n,velocity:-R(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=R(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?J.restSpeed.granular:J.restSpeed.default,i||=v?J.restDelta.granular:J.restDelta.default;let y;if(h<1){let e=Ls(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=e===0?m:0;h<1&&(n=e===0?L(m):Ms(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(ks(b),Os),t=Ds(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}Hs.applyToOptions=e=>{let t=As(e,100,Hs);return e.ease=t.ease,e.duration=L(t.duration),e.type=`keyframes`,e};function Us({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Hs({keyframes:[f.value,m(f.value)],velocity:Ms(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Ws(e,t,n){let r=[],i=n||Pa.mix||Ts,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=Ba(Array.isArray(t)?t[n]||I:t,a)),r.push(a)}return r}function Gs(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(Na(a===t.length,`Both input and output ranges must be the same length`,`range-length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Ws(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=Va(e[r],e[r+1],n);return s[r](i)};return n?t=>l(F(e[0],e[a-1],t)):l}function Ks(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Va(0,t,r);e.push(q(n,1,i))}}function qs(e){let t=[0];return Ks(t,e.length-1),t}function Js(e,t){return e.map(e=>e*t)}function Ys(e,t){return e.map(()=>t||co).splice(0,e.length-1)}function Xs({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=lo(r)?r.map(mo):mo(r),a={done:!1,value:t[0]},o=Gs(Js(n&&n.length===t.length?n:qs(t),e),t,{ease:Array.isArray(i)?i:Ys(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Zs=e=>e!==null;function Qs(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Zs),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var $s={decay:Us,inertia:Us,tween:Xs,keyframes:Xs,spring:Hs};function ec(e){typeof e.type==`string`&&(e.type=$s[e.type])}var tc=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},nc=e=>e/100,rc=class extends tc{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==H.now()&&this.tick(H.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Co.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;ec(e);let{type:t=Xs,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Xs;process.env.NODE_ENV!==`production`&&s!==Xs&&Na(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==Xs&&typeof o[0]!=`number`&&(this.mixKeyframes=Ba(nc,Ts(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=ks(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=F(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Us&&(b.value=Qs(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return R(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+R(e)}get time(){return R(this.currentTime)}set time(e){e=L(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(H.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=R(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Es,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(H.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Co.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function ic(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var ac=e=>e*180/Math.PI,oc=e=>cc(ac(Math.atan2(e[1],e[0]))),sc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:oc,rotateZ:oc,skewX:e=>ac(Math.atan(e[1])),skewY:e=>ac(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},cc=e=>(e%=360,e<0&&(e+=360),e),lc=oc,uc=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),dc=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),fc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:uc,scaleY:dc,scale:e=>(uc(e)+dc(e))/2,rotateX:e=>cc(ac(Math.atan2(e[6],e[5]))),rotateY:e=>cc(ac(Math.atan2(-e[2],e[0]))),rotateZ:lc,rotate:lc,skewX:e=>ac(Math.atan(e[4])),skewY:e=>ac(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function pc(e){return e.includes(`scale`)?1:0}function mc(e,t){if(!e||e===`none`)return pc(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=fc,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=sc,i=t}if(!i)return pc(t);let a=r[t],o=i[1].split(`,`).map(gc);return typeof a==`function`?a(o):o[a]}var hc=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return mc(n,t)};function gc(e){return parseFloat(e.trim())}var _c=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],vc=new Set(_c),yc=e=>e===Ao||e===W,bc=new Set([`x`,`y`,`z`]),xc=_c.filter(e=>!bc.has(e));function Sc(e){let t=[];return xc.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}var Cc={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>mc(t,`x`),y:(e,{transform:t})=>mc(t,`y`)};Cc.translateX=Cc.x,Cc.translateY=Cc.y;var wc=new Set,Tc=!1,Ec=!1,Dc=!1;function Oc(){if(Ec){let e=Array.from(wc).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Sc(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Ec=!1,Tc=!1,wc.forEach(e=>e.complete(Dc)),wc.clear()}function kc(){wc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ec=!0)})}function Ac(){Dc=!0,kc(),Oc(),Dc=!1}var jc=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(wc.add(this),Tc||(Tc=!0,B.read(kc),B.resolveKeyframes(Oc))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}ic(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),wc.delete(this)}cancel(){this.state===`scheduled`&&(wc.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Mc=e=>e.startsWith(`--`);function Nc(e,t,n){Mc(t)?e.style.setProperty(t,n):e.style[t]=n}var Pc={};function Fc(e,t){let n=Ra(e);return()=>Pc[t]??n()}var Ic=Fc(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Lc=Fc(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Rc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,zc={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Rc([0,.65,.55,1]),circOut:Rc([.55,0,1,.45]),backIn:Rc([.31,.01,.66,-.59]),backOut:Rc([.33,1.53,.69,.99])};function Bc(e,t){if(e)return typeof e==`function`?Lc()?Ds(e,t):`ease-out`:uo(e)?Rc(e):Array.isArray(e)?e.map(e=>Bc(e,t)||zc.easeOut):zc[e]}function Vc(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Bc(s,i);Array.isArray(d)&&(u.easing=d),z.value&&Co.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return z.value&&p.finished.finally(()=>{Co.waapi--}),p}function Hc(e){return typeof e==`function`&&`applyToOptions`in e}function Uc({type:e,...t}){return Hc(e)&&Lc()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Wc=class extends tc{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,Na(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=Uc(e);this.animation=Vc(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Qs(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):Nc(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return R(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+R(e)}get time(){return R(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=L(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Ic()?(this.animation.timeline=e,I):t(this)}},Gc={anticipate:no,backInOut:to,circInOut:ao};function Kc(e){return e in Gc}function qc(e){typeof e.ease==`string`&&Kc(e.ease)&&(e.ease=Gc[e.ease])}var Jc=10,Yc=class extends Wc{constructor(e){qc(e),ec(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new rc({...a,autoplay:!1}),s=Math.max(Jc,H.now()-this.startTime),c=F(0,Jc,s-Jc);t.setWithVelocity(o.sample(Math.max(0,s-c)).value,o.sample(s).value,c),o.stop()}},Xc=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(K.test(e)||e===`0`)&&!e.startsWith(`url(`));function Zc(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Qc(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Xc(i,t),s=Xc(a,t);return Ma(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:Zc(e)||(n===`spring`||Hc(n))&&r}function $c(e){e.duration=0,e.type=`keyframes`}var el=new Set([`opacity`,`clipPath`,`filter`,`transform`]),tl=Ra(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function nl(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return tl()&&n&&el.has(n)&&(n!==`transform`||!c)&&!s&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var rl=40,il=class extends tc{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=H.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||jc)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=H.now(),Qc(e,i,a,o)||((Pa.instantAnimations||!s)&&l?.(Qs(e,n,t)),e[0]=e[e.length-1],$c(n),n.repeat=0);let u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>rl?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!c&&nl(u),f=u.motionValue?.owner?.current,p=d?new Yc({...u,element:f}):new rc(u);p.finished.then(()=>{this.notifyFinished()}).catch(I),this.pendingTimeline&&=(this.stopTimeline=p.attachTimeline(this.pendingTimeline),void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ac()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function al(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var ol=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sl(e){let t=ol.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var cl=4;function ll(e,t,n=1){Na(n<=cl,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=sl(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Fa(e)?parseFloat(e):e}return Do(i)?ll(i,t,n+1):i}var ul={type:`spring`,stiffness:500,damping:25,restSpeed:10},dl=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),fl={type:`keyframes`,duration:.8},pl={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},ml=(e,{keyframes:t})=>t.length>2?fl:vc.has(e)?e.startsWith(`scale`)?dl(t[1]):ul:pl,hl=e=>e!==null;function gl(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(hl),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}function _l(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function vl(e,t){let n=e?.[t]??e?.default??e;return n===e?n:_l(n,e)}function yl({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}var bl=(e,t,n,r={},i,a)=>o=>{let s=vl(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=L(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};yl(s)||Object.assign(u,ml(e,u)),u.duration&&=L(u.duration),u.repeatDelay&&=L(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&($c(u),u.delay===0&&(d=!0)),(Pa.instantAnimations||Pa.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,$c(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=gl(u.keyframes,s);if(e!==void 0){B.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new rc(u):new il(u)};function xl(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Sl(e,t,n,r){if(typeof t==`function`){let[i,a]=xl(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=xl(r);t=t(n===void 0?e.custom:n,i,a)}return t}function Cl(e,t,n){let r=e.getProps();return Sl(r,t,n===void 0?r.custom:n,e)}var wl=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,..._c]),Tl=30,El=e=>!isNaN(parseFloat(e)),Dl={current:void 0},Ol=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=H.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=H.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=El(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&Ga(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new Ha);let n=this.events[e].add(t);return e===`change`?()=>{n(),B.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Dl.current&&Dl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=H.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Tl)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Tl);return Ua(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function kl(e,t){return new Ol(e,t)}var Al=e=>Array.isArray(e);function jl(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,kl(n))}function Ml(e){return Al(e)?e[e.length-1]||0:e}function Nl(e,t){let{transitionEnd:n={},transition:r={},...i}=Cl(e,t)||{};i={...i,...n};for(let t in i)jl(e,t,Ml(i[t]))}var Y=e=>!!(e&&e.getVelocity);function Pl(e){return!!(Y(e)&&e.add)}function Fl(e,t){let n=e.getValue(`willChange`);if(Pl(n))return n.add(t);if(!n&&Pa.WillChange){let n=new Pa.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Il(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Ll=`data-`+Il(`framerAppearId`);function Rl(e){return e.props[Ll]}function zl({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Bl(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?_l(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&zl(d,t))continue;let o={delay:n,...vl(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===c&&!o.velocity)continue;let f=!1;if(window.MotionHandoffAnimation){let n=Rl(e);if(n){let e=window.MotionHandoffAnimation(n,t,B);e!==null&&(o.startTime=e,f=!0)}}Fl(e,t);let p=l??e.shouldReduceMotion;r.start(bl(t,r,i,p&&wl.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>B.update(()=>{o&&Nl(e,o)});u.length?Promise.all(u).then(t):t()}return u}function Vl(e,t,n={}){let r=Cl(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Bl(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Hl(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Hl(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Vl(c,t,{...o,delay:n+(typeof r==`function`?0:r)+al(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Ul(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Vl(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Vl(e,t,n);else{let i=typeof t==`function`?Cl(e,t,n.custom):t;r=Promise.all(Bl(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Wl={test:e=>e===`auto`,parse:e=>e},Gl=e=>t=>t.test(e),Kl=[Ao,W,U,Go,qo,Ko,Wl],ql=e=>Kl.find(Gl(e));function Jl(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||La(e)}var Yl=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Xl(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Po)||[];if(!r)return e;let i=n.replace(r,``),a=Yl.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}var Zl=/\b([a-z-]*)\(.*?\)/gu,Ql={...K,getAnimatableNone:e=>{let t=e.match(Zl);return t?t.map(Xl).join(` `):e}},$l={...K,getAnimatableNone:e=>{let t=K.parse(e);return K.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},eu={...Ao,transform:Math.round},tu={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,fontSize:W,backgroundPositionX:W,backgroundPositionY:W,rotate:Go,rotateX:Go,rotateY:Go,rotateZ:Go,scale:Mo,scaleX:Mo,scaleY:Mo,scaleZ:Mo,skew:Go,skewX:Go,skewY:Go,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:jo,originX:Jo,originY:Jo,originZ:W,zIndex:eu,fillOpacity:jo,strokeOpacity:jo,numOctaves:eu},nu={...tu,color:G,backgroundColor:G,outlineColor:G,fill:G,stroke:G,borderColor:G,borderTopColor:G,borderRightColor:G,borderBottomColor:G,borderLeftColor:G,filter:Ql,WebkitFilter:Ql,mask:$l,WebkitMask:$l},ru=e=>nu[e],iu=new Set([Ql,$l]);function au(e,t){let n=ru(e);return iu.has(n)||(n=K),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var ou=new Set([`auto`,`none`,`0`]);function su(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!ou.has(t)&&is(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=au(n,i)}var cu=class extends jc{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Do(r))){let i=ll(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!wl.has(n)||e.length!==2)return;let[r,i]=e,a=ql(r),o=ql(i);if(ko(r)!==ko(i)&&Cc[n]){this.needsMeasurement=!0;return}if(a!==o)if(yc(a)&&yc(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Cc[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Jl(e[t]))&&n.push(t);n.length&&su(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Cc[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=Cc[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},lu=new Set([`opacity`,`clipPath`,`filter`,`transform`]);function uu(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var du=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function fu(e){return Ia(e)&&`offsetHeight`in e}var{schedule:pu,cancel:mu}=vo(queueMicrotask,!1),hu={x:!1,y:!1};function gu(){return hu.x||hu.y}function _u(e,t){let n=uu(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function vu(e){return!(e.pointerType===`touch`||gu())}function yu(e,t,n={}){let[r,i,a]=_u(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!vu(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var bu=(e,t)=>t?e===t?!0:bu(e,t.parentElement):!1,xu=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Su=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Cu(e){return Su.has(e.tagName)||e.isContentEditable===!0}var wu=new WeakSet;function Tu(e){return t=>{t.key===`Enter`&&e(t)}}function Eu(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Du=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Tu(()=>{if(wu.has(n))return;Eu(n,`down`);let e=Tu(()=>{Eu(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Eu(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Ou(e){return xu(e)&&!gu()}var ku=new WeakSet;function Au(e,t,n={}){let[r,i,a]=_u(e,n),o=e=>{let r=e.currentTarget;if(!Ou(e)||ku.has(e))return;wu.add(r),n.stopPropagation&&ku.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),wu.has(r)&&wu.delete(r),Ou(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||bu(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),fu(e)&&(e.addEventListener(`focus`,e=>Du(e,i)),!Cu(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function ju(e){return Ia(e)&&`ownerSVGElement`in e}function Mu(e){return ju(e)&&e.tagName===`svg`}var Nu=[...Kl,G,K],Pu=e=>Nu.find(Gl(e)),Fu=()=>({translate:0,scale:1,origin:0,originPoint:0}),Iu=()=>({x:Fu(),y:Fu()}),Lu=()=>({min:0,max:0}),X=()=>({x:Lu(),y:Lu()}),Ru=new WeakMap;function zu(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Bu(e){return typeof e==`string`||Array.isArray(e)}var Vu=[`initial`,...[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`]];function Hu(e){return zu(e.animate)||Vu.some(t=>Bu(e[t]))}function Uu(e){return!!(Hu(e)||e.variants)}function Wu(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Y(i))e.addValue(r,i);else if(Y(a))e.addValue(r,kl(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,kl(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Gu={current:null},Ku={current:!1},qu=typeof window<`u`;function Ju(){if(Ku.current=!0,qu)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Gu.current=e.matches;e.addEventListener(`change`,t),t()}else Gu.current=!1}var Yu=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Xu={},Zu=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=jc,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=H.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,B.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Hu(t),this.isVariantNode=Uu(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Y(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Ru.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(Ku.current||Ju(),this.shouldReduceMotion=Gu.current),process.env.NODE_ENV!==`production`&&Ga(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),yo(this.notifyUpdate),yo(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&lu.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Wc({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:L(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=vc.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&B.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Xu){let t=Xu[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):X()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Yu.length;t++){let n=Yu[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Wu(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=kl(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Fa(n)||La(n))?n=parseFloat(n):!Pu(n)&&K.test(t)&&(n=au(e,t)),this.setBaseTarget(e,Y(n)?n.get():n)),Y(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Sl(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!Y(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new Ha),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){pu.render(this.render)}},Qu=class extends Zu{constructor(){super(...arguments),this.KeyframeResolver=cu}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Y(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function $u({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ed({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function td(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function nd(e){return e===void 0||e===1}function rd({scale:e,scaleX:t,scaleY:n}){return!nd(e)||!nd(t)||!nd(n)}function id(e){return rd(e)||ad(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ad(e){return od(e.x)||od(e.y)}function od(e){return e&&e!==`0%`}function sd(e,t,n){return n+t*(e-n)}function cd(e,t,n,r,i){return i!==void 0&&(e=sd(e,i,r)),sd(e,n,r)+t}function ld(e,t=0,n=1,r,i){e.min=cd(e.min,t,n,r,i),e.max=cd(e.max,t,n,r,i)}function ud(e,{x:t,y:n}){ld(e.x,t.translate,t.scale,t.originPoint),ld(e.y,n.translate,n.scale,n.originPoint)}var dd=.999999999999,fd=1.0000000000001;function pd(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&gd(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ud(e,o)),r&&id(a.latestValues)&&gd(e,a.latestValues))}t.x<fd&&t.x>dd&&(t.x=1),t.y<fd&&t.y>dd&&(t.y=1)}function md(e,t){e.min+=t,e.max+=t}function hd(e,t,n,r,i=.5){ld(e,t,n,q(e.min,e.max,i),r)}function gd(e,t){hd(e.x,t.x,t.scaleX,t.scale,t.originX),hd(e.y,t.y,t.scaleY,t.scale,t.originY)}function _d(e,t){return $u(td(e.getBoundingClientRect(),t))}function vd(e,t,n){let r=_d(e,n),{scroll:i}=t;return i&&(md(r.x,i.offset.x),md(r.y,i.offset.y)),r}var yd={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},bd=_c.length;function xd(e,t,n){let r=``,i=!0;for(let a=0;a<bd;a++){let o=_c[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===(o.startsWith(`scale`)?1:0);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=du(s,tu[o]);if(!c){i=!1;let t=yd[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Sd(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(vc.has(e)){o=!0;continue}else if(To(e)){i[e]=n;continue}else{let t=du(n,tu[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=xd(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Cd(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function wd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Td={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(W.test(e))e=parseFloat(e);else return e;return`${wd(e,t.target.x)}% ${wd(e,t.target.y)}%`}},Ed={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=K.parse(e);if(i.length>5)return r;let a=K.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=q(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Dd={borderRadius:{...Td,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Td,borderTopRightRadius:Td,borderBottomLeftRadius:Td,borderBottomRightRadius:Td,boxShadow:Ed};function Od(e){for(let t in e)Dd[t]=e[t],To(t)&&(Dd[t].isCSSVariable=!0)}function kd(e,{layout:t,layoutId:n}){return vc.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Dd[e]||e===`opacity`)}function Ad(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Y(r[t])||i&&Y(i[t])||kd(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function jd(e){return window.getComputedStyle(e)}var Md=class extends Qu{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Cd}readValueFromInstance(e,t){if(vc.has(t))return this.projection?.isProjecting?pc(t):hc(e,t);{let n=jd(e),r=(To(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return _d(e,t)}build(e,t,n){Sd(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ad(e,t,n)}},Nd={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Pd={offset:`strokeDashoffset`,array:`strokeDasharray`};function Fd(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Nd:Pd;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Id=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Ld(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Sd(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of Id)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Fd(d,i,a,o,!1)}var Rd=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),zd=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Bd(e,t,n,r){Cd(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Rd.has(n)?n:Il(n),t.attrs[n])}function Vd(e,t,n){let r=Ad(e,t,n);for(let n in e)if(Y(e[n])||Y(t[n])){let t=_c.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Hd=class extends Qu{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=X}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(vc.has(t)){let e=ru(t);return e&&e.default||0}return t=Rd.has(t)?t:Il(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Vd(e,t,n)}build(e,t,n){Ld(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Bd(e,t,n,r)}mount(e){this.isSVGTag=zd(e.tagName),super.mount(e)}};function Ud(e,t){e.min=t.min,e.max=t.max}function Z(e,t){Ud(e.x,t.x),Ud(e.y,t.y)}function Wd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Gd=1e-4,Kd=1-Gd,qd=1+Gd,Jd=.01,Yd=0-Jd,Xd=0+Jd;function Q(e){return e.max-e.min}function Zd(e,t,n){return Math.abs(e-t)<=n}function Qd(e,t,n,r=.5){e.origin=r,e.originPoint=q(t.min,t.max,e.origin),e.scale=Q(n)/Q(t),e.translate=q(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Kd&&e.scale<=qd||isNaN(e.scale))&&(e.scale=1),(e.translate>=Yd&&e.translate<=Xd||isNaN(e.translate))&&(e.translate=0)}function $d(e,t,n,r){Qd(e.x,t.x,n.x,r?r.originX:void 0),Qd(e.y,t.y,n.y,r?r.originY:void 0)}function ef(e,t,n){e.min=n.min+t.min,e.max=e.min+Q(t)}function tf(e,t,n){ef(e.x,t.x,n.x),ef(e.y,t.y,n.y)}function nf(e,t,n){e.min=t.min-n.min,e.max=e.min+Q(t)}function rf(e,t,n){nf(e.x,t.x,n.x),nf(e.y,t.y,n.y)}function af(e,t,n,r,i){return e-=t,e=sd(e,1/n,r),i!==void 0&&(e=sd(e,1/i,r)),e}function of(e,t=0,n=1,r=.5,i,a=e,o=e){if(U.test(t)&&(t=parseFloat(t),t=q(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=q(a.min,a.max,r);e===a&&(s-=t),e.min=af(e.min,t,n,s,i),e.max=af(e.max,t,n,s,i)}function sf(e,t,[n,r,i],a,o){of(e,t[n],t[r],t[i],t.scale,a,o)}var cf=[`x`,`scaleX`,`originX`],lf=[`y`,`scaleY`,`originY`];function uf(e,t,n,r){sf(e.x,t,cf,n?n.x:void 0,r?r.x:void 0),sf(e.y,t,lf,n?n.y:void 0,r?r.y:void 0)}function df(e){return e.translate===0&&e.scale===1}function ff(e){return df(e.x)&&df(e.y)}function pf(e,t){return e.min===t.min&&e.max===t.max}function mf(e,t){return pf(e.x,t.x)&&pf(e.y,t.y)}function hf(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function gf(e,t){return hf(e.x,t.x)&&hf(e.y,t.y)}function _f(e){return Q(e.x)/Q(e.y)}function vf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function $(e){return[e(`x`),e(`y`)]}function yf(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var bf=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],xf=bf.length,Sf=e=>typeof e==`string`?parseFloat(e):e,Cf=e=>typeof e==`number`||W.test(e);function wf(e,t,n,r,i,a){i?(e.opacity=q(0,n.opacity??1,Ef(r)),e.opacityExit=q(t.opacity??1,0,Df(r))):a&&(e.opacity=q(t.opacity??1,n.opacity??1,r));for(let i=0;i<xf;i++){let a=`border${bf[i]}Radius`,o=Tf(t,a),s=Tf(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Cf(o)===Cf(s)?(e[a]=Math.max(q(Sf(o),Sf(s),r),0),(U.test(s)||U.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=q(t.rotate||0,n.rotate||0,r))}function Tf(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Ef=Of(0,.5,io),Df=Of(.5,.95,I);function Of(e,t,n){return r=>r<e?0:r>t?1:n(Va(e,t,r))}function kf(e,t,n){let r=Y(e)?e:kl(e);return r.start(bl(``,r,t,n)),r.animation}function Af(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var jf=(e,t)=>e.depth-t.depth,Mf=class{constructor(){this.children=[],this.isDirty=!1}add(e){ka(this.children,e),this.isDirty=!0}remove(e){Aa(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(jf),this.isDirty=!1,this.children.forEach(e)}};function Nf(e,t){let n=H.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(yo(r),e(a-t))};return B.setup(r,!0),()=>yo(r)}function Pf(e){return Y(e)?e.get():e}var Ff=class{constructor(){this.members=[]}add(e){ka(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected===!1&&n.isPresent!==!1&&!n.snapshot&&Aa(this.members,n)}e.scheduleRender()}remove(e){if(Aa(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e],r=t.instance;if(t.isPresent!==!1&&(!r||r.isConnected!==!1)){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender();let r=n.options.layoutDependency,i=e.options.layoutDependency;if(!(r!==void 0&&i!==void 0&&r===i)){let r=n.instance;r&&r.isConnected===!1&&!n.snapshot||(e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}let{crossfade:a}=e.options;a===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}},If={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Lf={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Rf=[``,`X`,`Y`,`Z`],zf=1e3,Bf=0;function Vf(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Hf(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Rl(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,B,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Hf(r)}function Uf({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Bf++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,z.value&&(Lf.nodes=Lf.calculatedTargetDeltas=Lf.calculatedProjections=0),this.nodes.forEach(Kf),this.nodes.forEach($f),this.nodes.forEach(ep),this.nodes.forEach(qf),z.addProjectionMetrics&&z.addProjectionMetrics(Lf)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Mf)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Ha),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=ju(t)&&!Mu(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;B.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Nf(i,250),If.hasAnimatedSinceResize&&(If.hasAnimatedSinceResize=!1,this.nodes.forEach(Qf)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||sp,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!gf(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...vl(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Qf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),yo(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(tp),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Hf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Yf);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Xf);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Zf),this.nodes.forEach(Wf),this.nodes.forEach(Gf)):this.nodes.forEach(Xf),this.clearAllSnapshots();let e=H.now();V.delta=F(0,1e3/60,e-V.timestamp),V.timestamp=e,V.isProcessing=!0,bo.update.process(V),bo.preRender.process(V),bo.render.process(V),V.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Jf),this.sharedNodes.forEach(np)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,B.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){B.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Q(this.snapshot.measuredBox.x)&&!Q(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=X(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!ff(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||id(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),dp(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return X();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(pp))){let{scroll:e}=this.root;e&&(md(t.x,e.offset.x),md(t.y,e.offset.y))}return t}removeElementScroll(e){let t=X();if(Z(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Z(t,e),md(t.x,i.offset.x),md(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=X();Z(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&gd(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),id(r.latestValues)&&gd(n,r.latestValues)}return id(this.latestValues)&&gd(n,this.latestValues),n}removeTransform(e){let t=X();Z(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!id(n.latestValues))continue;rd(n.latestValues)&&n.updateSnapshot();let r=X();Z(r,n.measurePageBox()),uf(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return id(this.latestValues)&&uf(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==V.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=V.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=X(),this.targetWithTransforms=X()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Z(this.target,this.layout.layoutBox),ud(this.target,this.targetDelta)):Z(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),z.value&&Lf.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||rd(this.parent.latestValues)||ad(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=X(),this.relativeTargetOrigin=X(),rf(this.relativeTargetOrigin,t,n),Z(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===V.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Z(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;pd(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=X());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Wd(this.prevProjectionDelta.x,this.projectionDelta.x),Wd(this.prevProjectionDelta.y,this.projectionDelta.y)),$d(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!vf(this.projectionDelta.x,this.prevProjectionDelta.x)||!vf(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),z.value&&Lf.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Iu(),this.projectionDelta=Iu(),this.projectionDeltaWithTransform=Iu()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=Iu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=X(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(op));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;rp(a.x,e.x,n),rp(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(rf(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ap(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&mf(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=X(),Z(d,this.relativeTarget)),s&&(this.animationValues=i,wf(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(yo(this.pendingAnimation),void 0),this.pendingAnimation=B.update(()=>{If.hasAnimatedSinceResize=!0,Co.layout++,this.motionValue||=kl(0),this.motionValue.jump(0,!1),this.currentAnimation=kf(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Co.layout--},onComplete:()=>{Co.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(zf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&fp(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||X();let t=Q(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Q(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Z(t,n),gd(t,i),$d(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ff),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Vf(`z`,e,r,this.animationValues);for(let t=0;t<Rf.length;t++)Vf(`rotate${Rf[t]}`,e,r,this.animationValues),Vf(`skew${Rf[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Pf(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Pf(t?.pointerEvents)||``),this.hasProjected&&!id(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=yf(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Dd){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Dd[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Pf(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Yf),this.root.sharedNodes.clear()}}}function Wf(e){e.updateLayout()}function Gf(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?$(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Q(r);r.min=n[e].min,r.max=r.min+i}):fp(i,t.layoutBox,n)&&$(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Q(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Iu();$d(o,n,t.layoutBox);let s=Iu();a?$d(s,e.applyTransform(r,!0),t.measuredBox):$d(s,n,t.layoutBox);let c=!ff(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=X();rf(o,t.layoutBox,i.layoutBox);let s=X();rf(s,n,a.layoutBox),gf(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Kf(e){z.value&&Lf.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function qf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Jf(e){e.clearSnapshot()}function Yf(e){e.clearMeasurements()}function Xf(e){e.isLayoutDirty=!1}function Zf(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Qf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function $f(e){e.resolveTargetDelta()}function ep(e){e.calcProjection()}function tp(e){e.resetSkewAndRotation()}function np(e){e.removeLeadSnapshot()}function rp(e,t,n){e.translate=q(t.translate,0,n),e.scale=q(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ip(e,t,n,r){e.min=q(t.min,n.min,r),e.max=q(t.max,n.max,r)}function ap(e,t,n,r){ip(e.x,t.x,n.x,r),ip(e.y,t.y,n.y,r)}function op(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var sp={duration:.45,ease:[.4,0,.1,1]},cp=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),lp=cp(`applewebkit/`)&&!cp(`chrome/`)?Math.round:I;function up(e){e.min=lp(e.min),e.max=lp(e.max)}function dp(e){up(e.x),up(e.y)}function fp(e,t,n){return e===`position`||e===`preserve-aspect`&&!Zd(_f(t),_f(n),.2)}function pp(e){return e!==e.root&&e.scroll?.wasRoot}var mp=Uf({attachResizeListener:(e,t)=>Af(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),hp={current:void 0},gp=Uf({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!hp.current){let e=new mp({});e.mount(window),e.setOptions({layoutScroll:!0}),hp.current=e}return hp.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),_p={some:0,all:1};function vp(e,t,{root:n,margin:r,amount:i=`some`}={}){let a=uu(e),o=new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{let n=o.get(e.target);if(e.isIntersecting!==!!n)if(e.isIntersecting){let n=t(e.target,e);typeof n==`function`?o.set(e.target,n):s.unobserve(e.target)}else typeof n==`function`&&(n(e),o.delete(e.target))})},{root:n,rootMargin:r,threshold:typeof i==`number`?i:_p[i]});return a.forEach(e=>s.observe(e)),()=>s.disconnect()}var yp=(e,t)=>Math.abs(e-t);function bp(e,t){let n=yp(e.x,t.x),r=yp(e.y,t.y);return Math.sqrt(n**2+r**2)}function xp({current:e}){return e?e.ownerDocument.defaultView:null}function Sp(e){if(e)return e.nodeType===3||e.nodeType===8?Sp(e.nextSibling):e}var[Cp,wp,Tp]=Da(`Motion`),[Ep,Dp,Op]=Da(`LayoutGroup`),kp={reducedMotion:`never`,transition:void 0,nonce:void 0},[Ap,jp,Mp]=Da(`MotionConfig`);function Np(){return Ap((0,n.computed)(()=>kp))}var Pp=function(){},Fp=function(){};process.env.NODE_ENV!==`production`&&(Pp=function(e,t){!e&&typeof console<`u`&&console.warn(t)},Fp=function(e,t){if(!e)throw Error(t)});var Ip={motionAttribute:`data-ap`},Lp=[];function Rp(e){for(let t of e)t&&!Lp.includes(t)&&Lp.push(t)}function zp(e,t,n){if(Array.isArray(e))return e.reduce((e,r)=>{let i=zp(r,t,n);return i?{...e,...i}:e},{});if(typeof e==`object`)return e;if(e&&t){let r=t[e];return typeof r==`function`?r(n):r}}function Bp(e,t,n){let r=zp(e,t,n);if(!r)return;let{transition:i,transitionEnd:a,...o}=r;return{...o,...a}}function Vp(e,t){let n=(e.initial===void 0&&e.variants?t?.initial:e.initial)===!1?[`initial`,`animate`]:[`initial`],r=e.custom??e.presenceContext?.custom;return n.reduce((n,i)=>({...n,...Bp(e[i]||t?.[i],e.variants,r)}),{})}function Hp(e,t){let n=t?.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Up=new Set(`animate.circle.defs.desc.ellipse.g.image.line.filter.marker.mask.metadata.path.pattern.polygon.polyline.rect.stop.svg.switch.symbol.text.tspan.use.view.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath`.split(`.`));function Wp(e){return Up.has(e)}var Gp=new WeakMap,Kp=class{constructor(e,t){this.element=null,this.isExiting=!1,this.presenceContainer=null,this.children=new Set,this.features=new Map,this._context=null,this.options=e,this.parent=t,t?.children?.add(this),this.latestValues=Vp(e,this.context),this.type=Wp(this.options.as)?`svg`:`html`}get context(){return this._context||=new Proxy({},{get:(e,t)=>{let n=this.options[t];return Bu(n)||t===`initial`&&n===!1?n:this.parent?.context[t]}}),this._context}updateFeatures(){if(this.visualElement)for(let e of Lp){this.features.has(e.key)||this.features.set(e.key,new e(this));let t=this.features.get(e.key);this.isMounted()&&(t.isMount?t.update():(t.mount(),t.isMount=!0))}}updateOptions(e){this.options=e,this.visualElement?.update({...this.options,whileTap:this.options.whilePress},null)}mount(e){Fp(!!e,`Animation state must be mounted with valid Element`),Gp.set(e,this),this.element=e,e.setAttribute(Ip.motionAttribute,this.options.presenceContext?.presenceId??``),this.visualElement?.mount(e),this.updateFeatures()}beforeUnmount(){this.getSnapshot(this.options,!1)}unmount(){this.parent?.children?.delete(this),Gp.delete(this.element),this.features.forEach(e=>e.unmount?.()),this.visualElement?.unmount()}beforeUpdate(){this.getSnapshot(this.options,void 0)}update(){this.updateFeatures(),this.didUpdate()}tryExitComplete(){this.isExiting||this.options?.layoutId&&this.visualElement.projection?.currentAnimation?.state===`running`||this.options.presenceContext?.onMotionExitComplete?.(this.presenceContainer,this)}setActive(e,t){e===`exit`&&t&&(this.isExiting=!0),this.visualElement?.animationState?.setActive(e,t).then(()=>{e===`exit`&&t&&(this.isExiting=!1,this.options?.layoutId?B.postRender(()=>this.tryExitComplete()):this.tryExitComplete())})}isMounted(){return!!this.element}initVisualElement(e){this.visualElement||(this.visualElement=e(this.options.as,{presenceContext:null,parent:this.parent?.visualElement,props:{...this.options,whileTap:this.options.whilePress},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{...this.latestValues}},reducedMotionConfig:this.options.motionConfig?.reducedMotion}),this.visualElement.parent?.addChild(this.visualElement),this.isMounted()&&this.visualElement.mount(this.element))}getSnapshot(e,t){}didUpdate(){}},qp=class{constructor(e){this.state=e}mount(){}unmount(){}update(){}},Jp=[`initial`,`animate`,`exit`,`whileHover`,`whileDrag`,`whileFocus`,`whilePress`],Yp=Jp.length;function Xp(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&Xp(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<Yp;n++){let r=Jp[n],i=e.props[r];(Bu(i)||i===!1)&&(t[r]=i)}return t}var Zp=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whilePress`,`whileDrag`,`exit`],Qp=[...Zp].reverse(),$p=Zp.length;function em(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function tm(){return{animate:em(!0),whileInView:em(),whileHover:em(),whilePress:em(),whileDrag:em(),whileFocus:em(),exit:em()}}function nm(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Hp(t,e):!1}function rm(e){return Array.isArray(e)}function im(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Ul(e,t,n)))}function am(e){let t=im(e),n=tm(),r=!0,i=t=>(n,r)=>{let i=Cl(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=Xp(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<$p;t++){let f=Qp[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=Bu(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||zu(m)||typeof m==`boolean`)continue;let v=nm(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},ee=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(Object.hasOwnProperty.call(u,e))continue;let r=!1;r=rm(t)&&rm(n)?!Hp(t,n):t!==n,r?t==null?l.add(e):ee(e):t!==void 0&&l.has(e)?ee(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1);let te=_&&v;y&&(!te||b)&&c.push(...x.map(t=>{let n={type:f};if(typeof t==`string`&&r&&!te&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=Cl(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=al(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=Cl(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>{e.animationState?.setActive(t,r)}),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=tm(),r=!0}}}function om(e){return e.style.display===`none`||e.offsetParent===null&&window.getComputedStyle(e).position!==`fixed`}var sm=class extends qp{static#e=this.key=`animation`;constructor(e){super(e);let t=e.visualElement;t.animationState||=am(t)}updateAnimationControlsSubscription(){let{animate:e}=this.state.options;zu(e)&&(this.unmountControls=e.subscribe(this.state.visualElement))}mount(){om(this.state.element)?this.state.setActive(`exit`,!0):this.state.visualElement.animationState?.animateChanges(),this.updateAnimationControlsSubscription()}update(){this.state.visualElement.animationState?.animateChanges();let{animate:e}=this.state.visualElement.getProps(),{animate:t}=this.state.visualElement.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.state.visualElement.animationState.reset(),this.unmountControls?.()}};function cm(e,t){return Wp(e)?new Hd(t):new Md(t)}function lm(e){return{point:{x:e.pageX,y:e.pageY}}}var um=class extends qp{static#e=this.key=`press`;constructor(e){super(e)}isActive(){let{whilePress:e,onPress:t,onPressCancel:n,onPressStart:r}=this.state.options;return!!(e||t||n||r)}register(){let e=this.state.element;!e||!this.isActive()||(this.removePress?.(),this.removePress=Au(e,(e,t)=>{let n=this.state.options;return this.state.setActive(`whilePress`,!0),n.onPressStart&&B.postRender(()=>n.onPressStart(t,lm(t))),(e,{success:t})=>{this.state.setActive(`whilePress`,!1);let n=t?`onPress`:`onPressCancel`,r=this.state.options[n];r&&B.postRender(()=>r(e,lm(e)))}},{useGlobalTarget:this.state.options.globalPressTarget}))}mount(){this.register()}update(){let e=this.state.visualElement.prevProps;!(e?.whilePress||e?.whileTap||e?.onPress||e?.onPressCancel||e?.onPressStart)&&this.isActive()&&this.register()}unmount(){this.removePress?.(),this.removePress=void 0}};function dm(e){return e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1}function fm(e,t=`page`){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}function pm(e){return t=>dm(t)&&e(t,fm(t))}var mm=class extends qp{static#e=this.key=`hover`;constructor(e){super(e)}isActive(){let{whileHover:e,onHoverStart:t,onHoverEnd:n}=this.state.options;return!!(e||t||n)}register(){let e=this.state.element;!e||!this.isActive()||(this.removeHover?.(),this.removeHover=yu(e,(e,t)=>{let n=this.state.options;return this.state.setActive(`whileHover`,!0),n.onHoverStart&&B.postRender(()=>n.onHoverStart(t,fm(t))),e=>{this.state.setActive(`whileHover`,!1);let t=this.state.options.onHoverEnd;t&&B.postRender(()=>t(e,fm(e)))}}))}mount(){this.register()}update(){let e=this.state.visualElement.prevProps;!(e?.whileHover||e?.onHoverStart||e?.onHoverEnd)&&this.isActive()&&this.register()}unmount(){this.removeHover?.(),this.removeHover=void 0}},hm=class extends qp{static#e=this.key=`inView`;constructor(e){super(e)}isActive(){let{whileInView:e,onViewportEnter:t,onViewportLeave:n}=this.state.options;return!!(e||t||n)}startObserver(){let e=this.state.element;if(!e||!this.isActive())return;this.removeObserver?.();let{once:t,...n}=this.state.options.inViewOptions||{};this.removeObserver=vp(e,(e,n)=>{let r=this.state.options;if(this.state.setActive(`whileInView`,!0),r.onViewportEnter&&B.postRender(()=>r.onViewportEnter(n)),!t)return()=>{this.state.setActive(`whileInView`,!1);let e=this.state.options.onViewportLeave;e&&B.postRender(()=>e(n))}},n)}mount(){this.startObserver()}update(){let{props:e,prevProps:t}=this.state.visualElement;[`amount`,`margin`,`root`].some(n=>e.inViewOptions?.[n]!==t?.inViewOptions?.[n])&&this.startObserver()}unmount(){this.removeObserver?.(),this.removeObserver=void 0}};function gm(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var _m=class extends qp{static#e=this.key=`focus`;constructor(e){super(e),this.isFocused=!1}onFocus(){let e=!1;try{e=this.state.element.matches(`:focus-visible`)}catch{e=!0}e&&(this.state.setActive(`whileFocus`,!0),this.isFocused=!0)}onBlur(){this.isFocused&&=(this.state.setActive(`whileFocus`,!1),!1)}mount(){let e=this.state.element;this.removeFocus=Ba(gm(e,`focus`,()=>this.onFocus()),gm(e,`blur`,()=>this.onBlur()))}unmount(){this.removeFocus?.(),this.removeFocus=void 0}};function vm(e){if(e)return e.options.allowProjection===!1?vm(e.parent):e.projection}var ym={borderRadius:{...Td,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Td,borderTopRightRadius:Td,borderBottomLeftRadius:Td,borderBottomRightRadius:Td,boxShadow:Ed};function bm(e){return typeof e==`object`&&!!e&&`nodeType`in e}var xm=typeof window>`u`,Sm=class extends qp{static#e=this.key=`projection`;constructor(e){super(e),Od(ym),xm||this.initProjection()}initProjection(){let e=this.state.options;this.state.visualElement.projection=new gp(this.state.visualElement.latestValues,e[`data-framer-portal-id`]?void 0:vm(this.state.visualElement.parent)),this.projection=this.state.visualElement.projection,this.projection.isPresent=!0,this.setOptions()}setOptions(){let e=this.state.options,{layoutId:t,layout:n,drag:r=!1,dragConstraints:i=!1}=e;this.projection?.setOptions({layout:n,layoutId:t,alwaysMeasureLayout:!!t||!!r||i&&bm(i),visualElement:this.state.visualElement,animationType:typeof e.layout==`string`?e.layout:`both`,layoutRoot:e.layoutRoot,layoutScroll:e.layoutScroll,crossfade:e.crossfade,onExitComplete:()=>{!this.projection?.isPresent&&this.state.options.layoutId&&!this.state.isExiting&&queueMicrotask(()=>{this.state.options.presenceContext?.onMotionExitComplete?.(this.state.presenceContainer,this.state)})}})}update(){this.setOptions()}mount(){this.projection?.mount(this.state.element)}};function Cm(e,t,n,r){return gm(e,t,pm(n),r)}var wm=new Set([`auto`,`scroll`]),Tm=class{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=Om(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=bp(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=V;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Em(t,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Om(e.type===`pointercancel`?this.lastMoveEventInfo:Em(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!dm(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let o=Em(fm(e),this.transformPagePoint),{point:s}=o,{timestamp:c}=V;this.history=[{...s,timestamp:c}];let{onSessionStart:l}=t;l&&l(e,Om(o,this.history)),this.removeListeners=Ba(Cm(this.contextWindow,`pointermove`,this.handlePointerMove),Cm(this.contextWindow,`pointerup`,this.handlePointerUp),Cm(this.contextWindow,`pointercancel`,this.handlePointerUp)),a&&this.startScrollTracking(a)}isScrollable(e){let t=window.getComputedStyle(e);return t.overflow===`auto`||t.overflow===`scroll`||t.overflowX===`auto`||t.overflowX===`scroll`||t.overflowY===`auto`||t.overflowY===`scroll`}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(wm.has(e.overflowX)||wm.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener(`scroll`,this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),B.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners?.(),this.scrollPositions.clear(),yo(this.updatePoint)}};function Em(e,t){return t?{point:t(e.point)}:e}function Dm(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Om({point:e},t){return{point:e,delta:Dm(e,Am(t)),offset:Dm(e,km(t)),velocity:jm(t,.1)}}function km(e){return e[0]}function Am(e){return e[e.length-1]}function jm(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Am(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>L(t)));)n--;if(!r)return{x:0,y:0};let a=R(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Mm(e){return(t,n)=>{e&&B.postRender(()=>e(t,n))}}var Nm=class extends qp{constructor(...e){super(...e),this.removePointerDownListener=I}static#e=this.key=`pan`;onPointerDown(e){this.session=new Tm(e,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:xp(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:Mm((e,t)=>{let{onPanSessionStart:n}=this.state.options;n&&n(e,t)}),onStart:Mm((e,t)=>{let{onPanStart:n}=this.state.options;n&&n(e,t)}),onMove:(e,t)=>{let{onPan:n}=this.state.options;n&&n(e,t)},onEnd:(e,t)=>{let{onPanEnd:n}=this.state.options;delete this.session,n&&B.postRender(()=>n(e,t))}}}mount(){this.removePointerDownListener=Cm(this.state.element,`pointerdown`,this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};function Pm(e){let t=null;return()=>t===null?(t=e,()=>{t=null}):!1}var Fm=Pm(`dragHorizontal`),Im=Pm(`dragVertical`);function Lm(e){let t=!1;if(e===`y`)t=Im();else if(e===`x`)t=Fm();else{let e=Fm(),n=Im();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Rm(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?q(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?q(n,e,r.max):Math.min(e,n)),e}var zm=.35;function Bm(e,{top:t,left:n,bottom:r,right:i}){return{x:Vm(e.x,n,i),y:Vm(e.y,t,r)}}function Vm(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Hm(e=zm){return e===!1?e=0:e===!0&&(e=zm),{x:Um(e,`left`,`right`),y:Um(e,`top`,`bottom`)}}function Um(e,t,n){return{min:Wm(e,t),max:Wm(e,n)}}function Wm(e,t){return typeof e==`number`?e:e[t]||0}function Gm(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}function Km(e,t){return{x:qm(e.x,t.x),y:qm(e.y,t.y)}}function qm(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Jm(e,t){let n=.5,r=Q(e),i=Q(t);return i>r?n=Va(t.min,t.max-r,e.min):r>i&&(n=Va(e.min,e.max-i,t.min)),F(0,1,n)}var Ym=new WeakMap,Xm=class{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=X(),this.state=e}get visualElement(){return this.state.visualElement}start(e,{snapToCursor:t=!1}={}){let n=e=>{t?this.stopAnimation():this.pauseAnimation(),t&&this.snapToCursor(fm(e,`page`).point)},r=(e,t)=>{this.stopAnimation();let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Lm(n),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$(e=>{let t=this.getAxisMotionValue(e).get()||0;if(U.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Q(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&B.postRender(()=>i(e,t)),Fl(this.visualElement,`transform`),this.state.setActive(`whileDrag`,!0))},i=(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openGlobalLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Qm(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},a=(e,t)=>this.stop(e,t),o=()=>$(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:s}=this.getProps();this.panSession=new Tm(e,{onSessionStart:n,onStart:r,onMove:i,onSessionEnd:a,resumeAnimation:o},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:xp(this.visualElement),element:this.state.element})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i&&B.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:t}=this.getProps();!t&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),this.state.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Zm(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Rm(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&bm(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Bm(n.layoutBox,e):this.constraints=!1,this.elastic=Hm(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&$(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Gm(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!bm(e))return!1;let n=e;Fp(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=vd(n,r.root,this.visualElement.getTransformPagePoint()),a=Km(r.layout.layoutBox,i);if(t){let e=t(ed(a));this.hasMutatedConstraints=!!e,e&&(a=$u(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=$(o=>{if(!Zm(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Fl(this.visualElement,e),n.start(bl(e,n,0,t,this.visualElement,!1))}stopAnimation(){this.visualElement.projection?.isPresent&&$(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){$(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){$(t=>{let{drag:n}=this.getProps();if(!Zm(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-q(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!bm(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};$(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Jm({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.state.element.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),$(t=>{if(!Zm(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(q(i,a,r[t]))})}addListeners(){if(!this.state.element)return;Ym.set(this.visualElement,this);let e=this.state.element,t=Cm(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();bm(e)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),B.read(n);let a=gm(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&($(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=zm,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Zm(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Qm(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var $m=class extends qp{static#e=this.key=`drag`;constructor(e){super(e),this.removeGroupControls=I,this.removeListeners=I,this.controls=new Xm(e)}mount(){let{dragControls:e}=this.state.options;e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||I}unmount(){this.removeGroupControls(),this.removeListeners()}},eh=!1,th={renderer:cm,features:[sm,um,mm,hm,_m,Sm,Nm,$m,class extends qp{static#e=this.key=`layout`;constructor(e){super(e),this.hasMountSettled=!1,Od(ym),e.getSnapshot=this.getSnapshot.bind(this),e.didUpdate=this.didUpdate.bind(this)}updatePrevLead(e){let t=e.getStack();t?.prevLead&&!t.prevLead.snapshot&&(t.prevLead.willUpdate(),eh=!0)}didUpdate(){eh&&(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&(eh=!1,this.state.visualElement.projection?.root?.didUpdate())}mount(){let e=this.state.options,t=this.state.options.layoutGroup;if(e.layout||e.layoutId){let n=this.state.visualElement.projection;if(e.layoutId){let e=!om(this.state.element);n.isPresent=e,e?n.promote():n.relegate(),this.updatePrevLead(n)}t?.group?.add(n),If.hasEverUpdated=!0}this.didUpdate(),B.postRender(()=>{this.hasMountSettled=!0})}unmount(){let e=this.state.options.layoutGroup,t=this.state.visualElement.projection;t&&(e?.group&&(this.state.options.layout||this.state.options.layoutId)&&e.group.remove(t),this.state.options.layoutId&&(eh=!0),this.didUpdate())}getSnapshot(e,t){let n=this.state.visualElement.projection,{drag:r,layoutDependency:i,layout:a,layoutId:o}=e;if(!n||!a&&!o&&!r||!this.hasMountSettled)return;eh=!0;let s=this.state.options;(r||s.layoutDependency!==i||i===void 0||Li(t)&&n.isPresent!==t)&&n.willUpdate(),Li(t)&&t!==n.isPresent&&(n.isPresent=t,t?(n.promote(),this.updatePrevLead(n)):n.relegate())}}]},[nh,rh]=Da(`LazyMotionContext`),[ih,ah,oh]=Da(`AnimatePresenceContext`);function sh(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function ch(){return{transform:{},transformOrigin:{},style:{},vars:{}}}function lh(){return{...ch(),attrs:{}}}function uh(e){let t=ch();Sd(t,e);let n={...t.style};for(let e in t.vars)n[e]=t.vars[e];return Object.keys(n).length===0?null:n}function dh(e,t,n){let r=lh();Ld(r,e,zd(t),void 0,n);let i={};for(let e in r.attrs){let t=Rd.has(e)?e:sh(e);i[t]=r.attrs[e]}return{attrs:i,style:{...r.style,...r.vars}}}function fh(e,t){let r=Cp(null),i=Ep({}),a=Np(),o=ih({}),s=nh({features:(0,n.ref)({}),strict:!1});if(process.env.NODE_ENV!==`production`&&t&&s.strict){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Pp(!1,t):Fp(!1,t)}let c=(0,n.useAttrs)();function l(){return Oa(e,{layoutGroup:i,presenceContext:o,config:a.value})}function u(){return{...c,...l()}}let d=new Kp(u(),r);wp(d),t&&d.initVisualElement(t),(0,n.watch)(s.features,e=>{e.features?.length&&Rp(e.features),e.renderer&&d.initVisualElement(e.renderer),d.updateFeatures()},{immediate:!0,flush:`pre`});function f(){let t=d.type===`svg`,n={...c};Object.keys(c).forEach(e=>{Y(c[e])&&(n[e]=c[e].get())});let r=d.visualElement?.latestValues||d.latestValues,i={...e.style,...t?{}:r};for(let e in i)Y(i[e])&&(i[e]=i[e].get());if(t){let{attrs:t,style:a}=dh({...r,...i},d.options.as,e.style);Object.assign(n,t),i=a}e.drag&&e.dragListener!==!1&&Object.assign(i,{userSelect:`none`,WebkitUserSelect:`none`,WebkitTouchCallout:`none`,touchAction:e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`});let a=uh(i);return a&&(n.style=a),n}let p=(0,n.getCurrentInstance)().proxy;return(0,n.onMounted)(()=>{let e=Sp(p.$el);d.mount(e)}),(0,n.onBeforeUnmount)(()=>d.beforeUnmount()),(0,n.onUnmounted)(()=>{Sp(p.$el)?.isConnected||d.unmount()}),(0,n.onBeforeUpdate)(()=>{d.beforeUpdate(),d.updateOptions(u())}),(0,n.onUpdated)(()=>{d.update()}),{getProps:l,getAttrs:f,layoutGroup:i,state:d}}var ph={ignoreStrict:{type:Boolean},forwardMotionProps:{type:Boolean,default:!1},asChild:{type:Boolean,default:!1},whileDrag:{type:[String,Array,Object]},whileHover:{type:[String,Array,Object]},whilePress:{type:[String,Array,Object]},whileInView:{type:[String,Array,Object]},whileFocus:{type:[String,Array,Object]},custom:{type:[String,Number,Object,Array]},initial:{type:[String,Array,Object,Boolean],default:void 0},animate:{type:[String,Array,Object],default:void 0},exit:{type:[String,Array,Object]},variants:{type:Object},inherit:{type:Boolean},style:{type:Object},transformTemplate:{type:Function},transition:{type:Object},onAnimationComplete:{type:Function},onUpdate:{type:Function},layout:{type:[Boolean,String],default:!1},layoutId:{type:String,default:void 0},layoutScroll:{type:Boolean,default:!1},layoutRoot:{type:Boolean,default:!1},"data-framer-portal-id":{type:String},crossfade:{type:Boolean,default:!0},layoutDependency:{type:null,default:void 0},onBeforeLayoutMeasure:{type:Function},onLayoutMeasure:{type:Function},onLayoutAnimationStart:{type:Function},onLayoutAnimationComplete:{type:Function},globalPressTarget:{type:Boolean},onPressStart:{type:Function},onPress:{type:Function},onPressCancel:{type:Function},onHoverStart:{type:Function},onHoverEnd:{type:Function},inViewOptions:{type:Object},onViewportEnter:{type:Function},onViewportLeave:{type:Function},drag:{type:[Boolean,String]},dragSnapToOrigin:{type:Boolean},dragDirectionLock:{type:Boolean},dragPropagation:{type:Boolean},dragConstraints:{type:[Boolean,Object]},dragElastic:{type:[Boolean,Number,Object],default:.5},dragMomentum:{type:Boolean,default:!0},dragTransition:{type:Object},dragListener:{type:Boolean,default:!0},dragControls:{type:Object},onDragStart:{type:Function},onDragEnd:{type:Function},onDrag:{type:Function},onDirectionLock:{type:Function},onDragTransitionEnd:{type:Function},onMeasureDragConstraints:{type:Function},onPanSessionStart:{type:Function},onPanStart:{type:Function},onPan:{type:Function},onPanEnd:{type:Function}},mh=new Map,hh=new Map;function gh(e){if(!Array.isArray(e))return[e];let t=[];for(let n of e)Array.isArray(n)?t.push(...n):t.push(n);return t}var _h=[`area`,`img`,`input`];function vh(e,t,r){if(typeof e==`string`&&_h.includes(e))return(0,n.h)(e,t);if(e===`template`){if(!r.default)return null;let e=gh(r.default()),i=e.findIndex(e=>e.type!==n.Comment);if(i===-1)return e;let a=e[i];delete a.props?.ref;let o=a.props?(0,n.mergeProps)(t,a.props):t;t.class&&a.props?.class&&delete a.props.class;let s=(0,n.cloneVNode)(a,o);for(let e in o)e.startsWith(`on`)&&(s.props||={},s.props[e]=o[e]);return e.length===1?s:(e[i]=s,e)}return null}function yh(e,t={}){let r=typeof e==`string`,i=r?e:e.name||``,a=t.renderer?mh:hh;if(r&&a?.has(e))return a.get(e);let o=(0,n.defineComponent)({inheritAttrs:!1,props:{...ph,as:{type:[String,Object],default:e||`div`}},name:i?`motion.${i}`:`Motion`,setup(e,{slots:r}){let{getProps:i,getAttrs:a,state:o}=fh(e,t.renderer);function s(){let t=o.element;if((typeof e.as!=`object`||e.asChild)&&t){let{style:e}=a();if(e)for(let[n,r]of Object.entries(e))t.style[n]=r}}return()=>{let t=i(),o=a(),c=e.asChild?`template`:e.as,l={...e.forwardMotionProps?t:{},...o,onVnodeUpdated:s},u=vh(c,l,r);return u===null?(0,n.h)(c,{...l},r):u}}});return r&&a?.set(e,o),o}function bh(e){let t=e?.renderer;return Rp(e?.features||[]),new Proxy({},{get(e,n){return n===`create`?(e,n)=>yh(e,{...n,renderer:t}):yh(n,{renderer:t})}})}var xh=bh(th);xh.create(`div`);var Sh=0;function Ch(e){let t=new WeakMap,n=Np();function r(r){if(e.mode!==`popLayout`)return;let i=r.offsetParent,a=i instanceof HTMLElement&&i.offsetWidth||0,o={height:r.offsetHeight||0,width:r.offsetWidth||0,top:r.offsetTop,left:r.offsetLeft,right:0};o.right=a-o.width-o.left;let s=e.anchorX===`left`?`left: ${o.left}px`:`right: ${o.right}px`,c=`pop-${Sh++}`;r.dataset.motionPopId=c;let l=document.createElement(`style`);n.value.nonce&&(l.nonce=n.value.nonce),t.set(r,l),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`
2
2
  [data-motion-pop-id="${c}"] {
3
3
  position: absolute !important;
4
4
  width: ${o.width}px !important;
@@ -6,6 +6,6 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.
6
6
  top: ${o.top}px !important;
7
7
  ${s} !important;
8
8
  }
9
- `)}function i(e){let n=t.get(e);n&&(t.delete(e),L.render(()=>{document.head.removeChild(n)}))}return{addPopStyle:r,removePopStyle:i}}var Xh=`data-ap-child`,[Zh,Qh]=Do(`AnimatePresenceContext`);function $h(e){let t=new Map,r=new Set,{addPopStyle:i,removePopStyle:a}=Yh(e);function o(e,n){let r=t.get(e);r||(r={motions:new Set,exitingMotions:new Set,el:e},t.set(e,r)),r.motions.add(n)}function s(e,n){let r=t.get(e);r&&(r.exitingMotions.delete(n),r.exitingMotions.size===0&&r.done&&f(r))}function c(e){r.add(e)}function l(e){r.delete(e)}let u={initial:e.initial,custom:e.custom,register:o,onMotionExitComplete:s,registerPending:c,unregisterPending:l};(0,n.watch)(()=>e.custom,e=>{u.custom=e},{flush:`pre`}),Qh(u),(0,n.onMounted)(()=>{u.initial=void 0});function d(e){if(e instanceof HTMLElement&&!e.hasAttribute(`data-ap-child`)){e.setAttribute(Xh,``);let t=qo.get(e);t&&!t.presenceContainer&&(t.presenceContainer=e,o(e,t))}}function f(t){var n,r,i;a(t.el),t.motions.forEach(e=>{e.getSnapshot(e.options,!1)}),(n=t.done)==null||n.call(t),t.done=void 0,t.el?.isConnected?(r=t.motions.values().next()?.value)==null||r.didUpdate():(t.motions.forEach(e=>{e.unmount()}),t.motions.clear()),(i=e.onExitComplete)==null||i.call(e)}function p(e,n){d(e);let r=t.get(e);r&&(r.exitingMotions.clear(),r.motions.forEach(e=>{e.setActive(`exit`,!1),e.getSnapshot(e.options,!0)})),n()}function m(n,a){var s,c;let l=n;d(l),r.forEach(e=>{e.element&&l.contains(e.element)&&(e.presenceContainer=l,o(l,e),r.delete(e))});let u=t.get(l),f=qo.get(l);if((!u||u.motions.size===0)&&!f){a(),(s=e.onExitComplete)==null||s.call(e);return}u.done=a,i(l),u.motions.forEach(e=>{u.exitingMotions.add(e),e.setActive(`exit`,!0),e.getSnapshot(e.options,!1)}),(c=u.motions.values().next()?.value)==null||c.didUpdate()}return(0,n.onUnmounted)(()=>{t.forEach(e=>{e.motions.forEach(e=>{e.unmount()})}),t.clear()}),{enter:p,exit:m}}var eg=(0,n.defineComponent)({name:`AnimatePresence`,inheritAttrs:!0,__name:`AnimatePresence`,props:{mode:{default:`sync`},initial:{type:Boolean,default:!0},as:{},custom:{},onExitComplete:{},anchorX:{default:`left`}},setup(e){let t=e,{enter:r,exit:i}=$h(t),a=(0,n.computed)(()=>t.mode===`wait`?{mode:t.mode===`wait`?`out-in`:void 0}:{tag:t.as});return(e,t)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.mode===`wait`?n.Transition:n.TransitionGroup),(0,n.mergeProps)(a.value,{appear:``,onLeave:(0,n.unref)(i),onEnter:(0,n.unref)(r)}),{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`default`)]),_:3},16,[`onLeave`,`onEnter`]))}});function tg(e){if(e)return e.nodeType===3||e.nodeType===8?tg(e.nextSibling):e}var[ng,rg]=Do(`LazyMotionContext`);function ig(e){let t=Oo(null),r=Ao({}),i=qh(),a=Zh({}),o=ng({features:(0,n.ref)([]),strict:!1});if(process.env.NODE_ENV!==`production`&&e.features?.length&&o.strict){let t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Po(!1,t):Fo(!1,t)}let s=(0,n.useAttrs)();function c(){return r.id&&e.layoutId?`${r.id}-${e.layoutId}`:e.layoutId||void 0}function l(){return{...e,lazyMotionContext:o,layoutId:c(),transition:e.transition??i.value.transition,layoutGroup:r,motionConfig:i.value,inViewOptions:e.inViewOptions??i.value.inViewOptions,animatePresenceContext:a,initial:a.initial===!1?a.initial:e.initial===!0?void 0:e.initial}}function u(){return{...s,...l()}}let d=new Yo(u(),t);ko(d);function f(){let t=d.type===`svg`,n={...s};Object.keys(s).forEach(e=>{J(s[e])&&(n[e]=s[e].get())});let r={...e.style,...t?{}:d.visualElement?.latestValues||d.baseTarget};if(t){let{attrs:e,style:t}=gs({...d.isMounted()?d.target:d.baseTarget,...r});(t.transform||e.transformOrigin)&&(t.transformOrigin=e.transformOrigin??`50% 50%`,delete e.transformOrigin),t.transform&&(t.transformBox=t.transformBox??`fill-box`,delete e.transformBox),Object.assign(n,e),r=t}e.drag&&e.dragListener!==!1&&Object.assign(r,{userSelect:`none`,WebkitUserSelect:`none`,WebkitTouchCallout:`none`,touchAction:e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`});let i=fs(r);return i&&(n.style=i),n}let p=(0,n.getCurrentInstance)().proxy;return(0,n.onBeforeMount)(()=>{d.beforeMount()}),(0,n.onMounted)(()=>{if(d.mount(tg(p.$el),u(),og(p)),a.register&&d.element){let e=d.element.closest(`[${Xh}]`);e?(d.presenceContainer=e,a.register(e,d)):a.registerPending&&a.registerPending(d)}}),(0,n.onBeforeUnmount)(()=>d.beforeUnmount()),(0,n.onUnmounted)(()=>{a.unregisterPending&&a.unregisterPending(d),tg(p.$el)?.isConnected||d.unmount()}),(0,n.onBeforeUpdate)(()=>{d.beforeUpdate(u())}),(0,n.onUpdated)(()=>{d.update(u())}),{getProps:l,getAttrs:f,layoutGroup:r,state:d}}var ag={ignoreStrict:{type:Boolean},forwardMotionProps:{type:Boolean,default:!1},asChild:{type:Boolean,default:!1},hover:{type:[String,Array,Object]},press:{type:[String,Array,Object]},inView:{type:[String,Array,Object]},focus:{type:[String,Array,Object]},whileDrag:{type:[String,Array,Object]},whileHover:{type:[String,Array,Object],default:({hover:e})=>(process.env.NODE_ENV===`development`&&e&&Po(!0,`hover is deprecated. Use whileHover instead.`),e)},whilePress:{type:[String,Array,Object],default:({press:e})=>(process.env.NODE_ENV===`development`&&e&&Po(!0,`press is deprecated. Use whilePress instead.`),e)},whileInView:{type:[String,Array,Object],default:({inView:e})=>(process.env.NODE_ENV===`development`&&e&&Po(!0,`inView is deprecated. Use whileInView instead.`),e)},whileFocus:{type:[String,Array,Object],default:({focus:e})=>(process.env.NODE_ENV===`development`&&e&&Po(!0,`focus is deprecated. Use whileFocus instead.`),e)},custom:{type:[String,Number,Object,Array]},initial:{type:[String,Array,Object,Boolean],default:void 0},animate:{type:[String,Array,Object],default:void 0},exit:{type:[String,Array,Object]},variants:{type:Object},inherit:{type:Boolean},style:{type:Object},transformTemplate:{type:Function},transition:{type:Object},layoutGroup:{type:Object},motionConfig:{type:Object},onAnimationComplete:{type:Function},onUpdate:{type:Function},layout:{type:[Boolean,String],default:!1},layoutId:{type:String,default:void 0},layoutScroll:{type:Boolean,default:!1},layoutRoot:{type:Boolean,default:!1},"data-framer-portal-id":{type:String},crossfade:{type:Boolean,default:!0},layoutDependency:{type:null,default:void 0},onBeforeLayoutMeasure:{type:Function},onLayoutMeasure:{type:Function},onLayoutAnimationStart:{type:Function},onLayoutAnimationComplete:{type:Function},globalPressTarget:{type:Boolean},onPressStart:{type:Function},onPress:{type:Function},onPressCancel:{type:Function},onHoverStart:{type:Function},onHoverEnd:{type:Function},inViewOptions:{type:Object},onViewportEnter:{type:Function},onViewportLeave:{type:Function},drag:{type:[Boolean,String]},dragSnapToOrigin:{type:Boolean},dragDirectionLock:{type:Boolean},dragPropagation:{type:Boolean},dragConstraints:{type:[Boolean,Object]},dragElastic:{type:[Boolean,Number,Object],default:.5},dragMomentum:{type:Boolean,default:!0},dragTransition:{type:Object},dragListener:{type:Boolean,default:!0},dragControls:{type:Object},onDragStart:{type:Function},onDragEnd:{type:Function},onDrag:{type:Function},onDirectionLock:{type:Function},onDragTransitionEnd:{type:Function},onMeasureDragConstraints:{type:Function},onPanSessionStart:{type:Function},onPanStart:{type:Function},onPan:{type:Function},onPanEnd:{type:Function}};function og(e){let t=tg(e.$el)?.style.display===`none`;return e.$.vnode.transition&&t}var sg=new Map,cg=new Map;function lg(e){if(!Array.isArray(e))return[e];let t=[];for(let n of e)Array.isArray(n)?t.push(...n):t.push(n);return t}var ug=[`area`,`img`,`input`];function dg(e,t,r){var i;if(typeof e==`string`&&ug.includes(e))return(0,n.h)(e,t);if(e===`template`){if(!r.default)return null;let e=lg(r.default()),a=e.findIndex(e=>e.type!==n.Comment);if(a===-1)return e;let o=e[a];(i=o.props)==null||delete i.ref;let s=o.props?(0,n.mergeProps)(t,o.props):t;t.class&&o.props?.class&&delete o.props.class;let c=(0,n.cloneVNode)(o,s);for(let e in s)e.startsWith(`on`)&&(c.props||={},c.props[e]=s[e]);return e.length===1?c:(e[a]=c,e)}return null}function fg(e,t={}){let r=typeof e==`string`,i=r?e:e.name||``,a=t.features?.length>0?sg:cg;if(r&&a?.has(e))return a.get(e);let o=(0,n.defineComponent)({inheritAttrs:!1,props:{...ag,features:{type:Object,default:()=>t.features||[]},as:{type:[String,Object],default:e||`div`}},name:i?`motion.${i}`:`Motion`,setup(e,{slots:r}){let{getProps:i,getAttrs:a,state:o}=ig(e);function s(){let t=o.element;if((typeof e.as!=`object`||e.asChild)&&t){let{style:e}=a();if(e)for(let[n,r]of Object.entries(e))t.style[n]=r}}return()=>{let o=i(),c=a(),l=e.asChild?`template`:e.as,u={...t.forwardMotionProps||e.forwardMotionProps?o:{},...c,onVnodeUpdated:s},d=dg(l,u,r);return d===null?(0,n.h)(l,{...u},r):d}}});return r&&a?.set(e,o),o}function pg(e=[]){return new Proxy({},{get(t,n){return n===`create`?(t,n)=>fg(t,{...n,features:e}):fg(n,{features:e})}})}var mg=pg(Uh);mg.create(`div`);const hg=()=>(0,n.createVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,viewBox:`0 0 1024 1024`},[(0,n.createVNode)(`path`,{d:`M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92C290 92 102.3 279.5 102 511.5C101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1c1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 0 0-10.1 4.8c-1.8 5-3.8 10-5.9 14.9c-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 0 1 655.9 829c-42.3 17.9-87.4 27-133.8 27c-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 0 1 279 755.2a342.16 342.16 0 0 1-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4c31.6-31.6 68.4-56.4 109.3-73.8c42.3-17.9 87.4-27 133.8-27c46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 0 1 109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 0 0 3 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z`,fill:`currentColor`},null)]),gg=()=>(0,n.createVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},[(0,n.createVNode)(`path`,{d:`M10.66 7.14c-2.24.48-4.04 2.3-4.52 4.54c-.37 1.75.02 3.38.89 4.66c.34.51 1.08.55 1.51.11c.35-.35.37-.88.1-1.28c-.5-.76-.75-1.71-.61-2.73c.23-1.74 1.67-3.17 3.41-3.4A4.003 4.003 0 0 1 16 13c0 .8-.24 1.54-.64 2.16c-.27.41-.25.95.1 1.29c.43.43 1.17.4 1.51-.11C17.62 15.4 18 14.25 18 13c0-3.75-3.45-6.7-7.34-5.86zm-.41-3.99c-4.05.69-7.19 3.69-8.03 7.72c-.66 3.17.2 6.16 1.97 8.38c.37.46 1.07.49 1.49.07c.36-.36.39-.93.07-1.32a8.004 8.004 0 0 1-1.66-6.28c.55-3.47 3.42-6.24 6.92-6.65c2.76-.33 5.27.74 6.93 2.59c.2.21.47.34.76.34c.85 0 1.34-1.01.77-1.65c-2.19-2.45-5.56-3.82-9.22-3.2zM12 11c-1.1 0-2 .9-2 2c0 .55.23 1.05.59 1.41c.36.36.86.59 1.41.59s1.05-.23 1.41-.59c.36-.36.59-.86.59-1.41c0-1.1-.9-2-2-2zm9-1c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1s-1-.45-1-1v-4c0-.55.45-1 1-1zm0 8c.55 0 1 .45 1 1s-.45 1-1 1s-1-.45-1-1s.45-1 1-1z`,fill:`currentColor`},null)]),_g=()=>(0,n.createVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},[(0,n.createVNode)(`path`,{d:`M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59L7.11 5.7A.996.996 0 1 0 5.7 7.11L10.59 12L5.7 16.89a.996.996 0 1 0 1.41 1.41L12 13.41l4.89 4.89a.996.996 0 1 0 1.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z`,fill:`currentColor`},null)]),vg=()=>(0,n.createVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},[(0,n.createVNode)(`path`,{d:`M9 16.2l-3.5-3.5a.984.984 0 0 0-1.4 0a.984.984 0 0 0 0 1.4l4.19 4.19c.39.39 1.02.39 1.41 0L20.3 7.7a.984.984 0 0 0 0-1.4a.984.984 0 0 0-1.4 0L9 16.2z`,fill:`currentColor`},null)]),yg=()=>(0,n.createVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},[(0,n.createVNode)(`path`,{d:`M16.59 9H15V4c0-.55-.45-1-1-1h-4c-.55 0-1 .45-1 1v5H7.41c-.89 0-1.34 1.08-.71 1.71l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.63-.63.19-1.71-.7-1.71zM5 19c0 .55.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1H6c-.55 0-1 .45-1 1z`,fill:`currentColor`},null)]);var bg={class:`relative size-full overflow-hidden`},xg={key:2},Sg={key:3,class:`size-full`},Cg={key:4,class:`flex items-center justify-around gap-3`},wg={class:`flex flex-col justify-center gap-2 text-white`},Tg={class:`text-xs text-wrap`},Eg=(0,n.defineComponent)({__name:`DcContent`,props:{retriable:{type:Boolean},hideError:{type:Boolean},hideEmpty:{type:Boolean},hideLoading:{type:Boolean},source:{},class:{},classError:{},classEmpty:{},classLoading:{},style:{type:[Boolean,null,String,Object,Array]},styleError:{type:[Boolean,null,String,Object,Array]},styleEmpty:{type:[Boolean,null,String,Object,Array]},styleLoading:{type:[Boolean,null,String,Object,Array]}},emits:[`retry`,`resetRetry`],setup(e,{expose:t}){let a=e,o=(0,n.computed)(()=>r.Stream.isStream(a.source)?{isLoading:a.source.isRequesting.value,isError:a.source.error.value,errorCause:a.source.error.value?.message,isEmpty:a.source.isEmpty.value,data:a.source.data.value,isNoResult:a.source.isNoData.value}:r.PromiseContent.isPromiseContent(a.source)?{isLoading:a.source.isLoading.value,isError:a.source.isError.value,errorCause:a.source.errorCause.value?.message,isEmpty:a.source.isEmpty.value,data:a.source.data.value,isNoResult:a.source.isEmpty.value}:{isLoading:!1,isError:!1,errorCause:void 0,isEmpty:ji(a.source),data:a.source,isNoResult:ji(a.source)}),s={isLoadingNoData:{opacity:1,translateY:0,width:`2.5rem`,height:`2.5rem`,paddingBlock:`2px`,paddingInline:`2px`,left:`50%`,top:`8px`,translateX:`-50%`,backgroundColor:`var(--van-background-2)`,borderRadius:`100%`},isErrorNoData:{opacity:1,translateY:`-50%`,width:`70%`,minHeight:a.retriable?`22rem`:`20rem`,paddingBlock:`2px`,paddingInline:`2px`,left:`50%`,top:`50%`,translateX:`-50%`,backgroundColor:`var(--van-background-2)`,borderRadius:`4px`},isLoadingData:{opacity:.7,translateY:`0%`,width:`4rem`,height:`1.3rem`,paddingBlock:`2px`,paddingInline:`8px`,left:`4px`,top:`calc(100% - 8px - 1rem)`,translateX:`0%`,backgroundColor:`var(--p-color)`,borderRadius:`1.3rem`},isErrorData:{opacity:.7,translateY:`0%`,width:`fit-content`,height:`4rem`,paddingBlock:`2px`,paddingInline:`8px`,left:`4px`,top:`calc(100% - 8px - 4rem)`,translateX:`0%`,backgroundColor:`var(--p-color)`,borderRadius:`4px`},isEmpty:{opacity:1,translateY:`-50%`,width:`90%`,height:`10rem`,paddingBlock:`2px`,paddingInline:`2px`,left:`50%`,top:`50%`,translateX:`-50%`,backgroundColor:`var(--van-background-2)`,borderRadius:`4px`},done:{width:`4rem`,height:`1.3rem`,opacity:0,translateY:`100%`,paddingBlock:`0px`,paddingInline:`0px`,left:`4px`,top:`calc(100% - 8px - 1rem)`,translateX:`0%`,backgroundColor:`var(--p-color)`,borderRadius:`4px`}},c=(0,n.computed)(()=>!a.hideLoading&&o.value.isLoading?o.value.isEmpty?`isLoadingNoData`:`isLoadingData`:!a.hideError&&o.value.isError?o.value.isEmpty?`isErrorNoData`:`isErrorData`:!a.hideEmpty&&o.value.isNoResult?`isEmpty`:`done`),l=(0,n.useTemplateRef)(`cont`);return t({cont:l}),(t,r)=>{let u=Cn,d=i.NEmpty,f=i.NButton,p=i.NIcon,m=i.NResult,h=eg;return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,bg,[(0,n.createElementVNode)(`div`,{class:(0,n.normalizeClass)([`relative size-full`,[a.class]]),ref_key:`cont`,ref:l},[o.value.isEmpty?(0,n.createCommentVNode)(``,!0):(0,n.renderSlot)(t.$slots,`default`,{key:0,data:o.value.data})],2),(0,n.createVNode)(h,null,{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(mg).div,{initial:{opacity:0,translateY:`-100%`,left:`50%`,translateX:`-50%`},variants:s,animate:c.value,class:`absolute flex scale-100 items-center justify-center whitespace-nowrap shadow`},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(n.Transition,{name:`van-fade`},{default:(0,n.withCtx)(()=>[c.value===`isLoadingNoData`?((0,n.openBlock)(),(0,n.createBlock)(u,{key:0,size:`25px`,color:`var(--p-color)`})):c.value===`isLoadingData`?((0,n.openBlock)(),(0,n.createBlock)(xa,{key:1,size:`10px`,color:`white`},{default:(0,n.withCtx)(()=>[...r[2]||=[(0,n.createTextVNode)(`加载中`,-1)]]),_:1})):c.value===`isEmpty`?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,xg,[(0,n.createVNode)(d,{description:`无结果`,class:(0,n.normalizeClass)([`w-full justify-center!`,[e.classEmpty]]),style:(0,n.normalizeStyle)([e.style,e.styleEmpty])},null,8,[`class`,`style`])])):c.value===`isErrorNoData`?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Sg,[(0,n.createVNode)(m,{class:(0,n.normalizeClass)([`flex size-full! flex-col items-center! justify-center! text-wrap *:w-full`,[e.classError]]),status:`error`,title:`网络错误`,style:(0,n.normalizeStyle)([e.style,e.styleError]),description:o.value.errorCause??`未知原因`},{footer:(0,n.withCtx)(()=>[e.retriable?((0,n.openBlock)(),(0,n.createBlock)(f,{key:0,onClick:r[0]||=e=>t.$emit(`resetRetry`),type:`primary`},{default:(0,n.withCtx)(()=>[...r[3]||=[(0,n.createTextVNode)(`重试`,-1)]]),_:1})):(0,n.createCommentVNode)(``,!0)]),icon:(0,n.withCtx)(()=>[(0,n.createVNode)(p,{size:`10rem`,color:`var(--nui-error-color)`},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(gg))]),_:1})]),_:1},8,[`class`,`style`,`description`])])):c.value===`isErrorData`?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Cg,[(0,n.createVNode)(p,{size:`3rem`,color:`white`},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(gg))]),_:1}),(0,n.createElementVNode)(`div`,wg,[r[4]||=(0,n.createElementVNode)(`div`,{class:`text-sm`},`网络错误`,-1),(0,n.createElementVNode)(`div`,Tg,(0,n.toDisplayString)(o.value.errorCause??`未知原因`),1)]),(0,n.createVNode)(f,{circle:``,type:`error`,size:`large`,onClick:r[1]||=e=>t.$emit(`retry`)},{icon:(0,n.withCtx)(()=>[(0,n.createVNode)(p,{color:`white`},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(hg))]),_:1})]),_:1})])):(0,n.createCommentVNode)(``,!0)]),_:1})]),_:1},8,[`animate`])]),_:1})])}}}),Dg=(0,n.defineComponent)({__name:`DcFloatPopup`,props:{anchors:{default:`high`},lockScroll:{type:Boolean,default:!1},class:{},style:{type:[Boolean,null,String,Object,Array]},overlay:{type:Boolean}},setup(e,{expose:t}){let r=(0,s.useRouter)(),i=e,a=(0,n.shallowRef)(!1),{height:o}=_a(),c=(0,n.computed)(()=>be(i.anchors)?i.anchors:i.anchors===`high`?[0,Math.round(.4*o.value),Math.round(.7*o.value),o.value]:[0,Math.round(.3*o.value),Math.round(.6*o.value),Math.round(.9*o.value)]),l=(0,n.shallowRef)(0),[u,d]=ya(()=>l.value>0),f=Oi;return(0,n.watch)(a,()=>{a.value?f=r.beforeEach(()=>d.value?a.value=!1:void 0):f()}),(0,s.onBeforeRouteLeave)(f),t({show(e=2){l.value=c.value[e],a.value=!0},close(){a.value=!1},isShowing:(0,n.shallowReadonly)(a),height:(0,n.shallowReadonly)(l)}),(t,r)=>{let i=Fn,o=Vr;return(0,n.openBlock)(),(0,n.createBlock)(n.Teleport,{to:`#popups`},[e.overlay?((0,n.openBlock)(),(0,n.createBlock)(i,{key:0,zIndex:(0,n.unref)(u),show:a.value,onClick:r[0]||=e=>a.value=!1},null,8,[`zIndex`,`show`])):(0,n.createCommentVNode)(``,!0),(0,n.createVNode)(n.Transition,{onAfterLeave:r[3]||=e=>l.value=0,name:`van-slide-up`},{default:(0,n.withCtx)(()=>[(0,n.withDirectives)((0,n.createVNode)(o,{onHeightChange:r[1]||=({height:e})=>e<=0&&(a.value=!1),anchors:c.value,height:l.value,"onUpdate:height":r[2]||=e=>l.value=e,"content-draggable":!1,"lock-scroll":e.lockScroll,style:(0,n.normalizeStyle)([e.style,{zIndex:(0,n.unref)(u)}]),class:(0,n.normalizeClass)([e.class,`overflow-hidden border-0 border-t border-solid border-(--van-border-color)`])},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`div`,{class:`w-full bg-(--van-background)`,style:(0,n.normalizeStyle)({height:`calc(${l.value}px - var(--van-floating-panel-header-height))`})},[l.value==0?(0,n.createCommentVNode)(``,!0):(0,n.renderSlot)(t.$slots,`default`,{key:0,height:l.value})],4)]),_:3},8,[`anchors`,`height`,`lock-scroll`,`style`,`class`]),[[n.vShow,a.value]])]),_:3})])}}}),Og=(0,n.defineComponent)({__name:`DcVar`,props:{value:{}},setup(e){let t=e;return(e,r)=>(0,n.renderSlot)(e.$slots,`default`,{value:t.value})}}),kg=(0,n.defineComponent)({__name:`DcList`,props:{source:{},itemHeight:{},listProp:{},goBottom:{type:Boolean},itemResizable:{type:Boolean},dataProcessor:{},unReloadable:{type:Boolean},style:{type:[Boolean,null,String,Object,Array]},class:{}},emits:[`next`,`reset`,`retry`],setup(e,{expose:t,emit:a}){let o=e,s=a,c=e=>o.dataProcessor?.(e)??e,l=(0,n.computed)(()=>({...r.Stream.isStream(o.source)?{data:c(o.source.data.value),isDone:o.source.isDone.value,isRequesting:o.source.isRequesting.value,isError:!!o.source.error.value,length:c(o.source.data.value).length,isEmpty:o.source.isEmpty.value,source:o.source}:be(o.source)?{data:c(o.source),isDone:!0,isRequesting:!1,isError:!1,length:c(o.source).length,isEmpty:ji(o.source),source:o.source}:{data:c(o.source.data.data.value??[]),isDone:o.source.isEnd,isRequesting:o.source.data.isLoading.value,isError:o.source.data.isError.value,length:c(o.source.data.data.value??[]).length,isEmpty:o.source.data.isEmpty.value,source:o.source.data},next:()=>r.Stream.isStream(o.source)?o.source.next():(0,r.callbackToPromise)(e=>s(`next`,e)),retry:()=>r.Stream.isStream(o.source)?o.source.retry():(0,r.callbackToPromise)(e=>s(`retry`,e)),reset:()=>r.Stream.isStream(o.source)?o.source.reset():s(`reset`)}));(0,n.watch)(()=>l.value.data,()=>{o.goBottom&&u.value?.scrollTo({position:`bottom`,behavior:`instant`})},{flush:`post`,deep:!0,immediate:!0}),(0,n.watch)(l,e=>{e.isRequesting||Di(window.innerHeight/o.itemHeight)+2>e.length&&!e.isDone&&(e.isError?e.retry():e.next())},{immediate:!0});let u=(0,n.useTemplateRef)(`vList`),{y:d}=ga(()=>u.value?.getScrollContainer()),f=Ti(async()=>{let e=u.value?.virtualListInstRef?.itemsElRef?.querySelector(` .v-vl-visible-items`);if(!e)return;let{itemHeight:t}=o,{data:n,isDone:r,isError:i,isRequesting:a,retry:s,next:c,length:f}=l.value;n&&!a&&!r&&t*(f-2)<d.value+(e?.children?.length??window.innerHeight/t)*t&&(i?s():c())},200),p=(0,n.shallowRef)(!1),m=(0,n.shallowRef)(!1),h=async()=>{l.value.reset(),console.log(`reset done`),await l.value.next(),m.value=!1};return t({scrollTop:d,listInstance:u}),(t,a)=>{let s=Jr;return(0,n.openBlock)(),(0,n.createBlock)(s,{modelValue:m.value,"onUpdate:modelValue":a[1]||=e=>m.value=e,class:(0,n.normalizeClass)([`relative`,o.class]),onRefresh:h,disabled:e.unReloadable||((0,n.unref)(r.Stream).isStream(e.source)?!1:(0,n.unref)(be)(e.source)?!0:e.source.reloadable??!0)||l.value.isError||l.value.isRequesting||!!(0,n.unref)(d)&&!p.value,onChange:a[2]||=({distance:e})=>p.value=!!e,style:(0,n.normalizeStyle)(e.style)},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(Eg,{retriable:``,source:(0,n.unref)(r.Stream).isStream(e.source)||(0,n.unref)(be)(e.source)?e.source:e.source.data,"class-loading":`mt-2 !h-[24px]`,"class-empty":`!h-full`,"class-error":`!h-full`,onResetRetry:h,"hide-loading":p.value&&l.value.isRequesting,onRetry:a[0]||=e=>l.value.retry()},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(Og,{value:l.value.data},{default:(0,n.withCtx)(({value:r})=>[(0,n.createVNode)((0,n.unref)(i.NVirtualList),(0,n.mergeProps)(e.listProp??{},{"item-resizable":e.itemResizable,"item-size":e.itemHeight,onScroll:(0,n.unref)(f),class:[`h-full overflow-x-hidden`,[p.value?`overflow-y-hidden`:`overflow-y-auto`]],items:r,ref_key:`vList`,ref:u}),{default:(0,n.withCtx)(({item:i})=>[(0,n.renderSlot)(t.$slots,`default`,{height:e.itemHeight,data:{item:i,index:r.indexOf(i)}})]),_:2},1040,[`item-resizable`,`item-size`,`onScroll`,`items`,`class`])]),_:3},8,[`value`])]),_:3},8,[`source`,`hide-loading`])]),_:3},8,[`modelValue`,`class`,`disabled`,`style`])}}}),Ag=(0,n.defineComponent)({__name:`DcPopup`,props:(0,n.mergeModels)({show:{type:Boolean},zIndex:{},overlay:{type:Boolean,default:!0},duration:{},teleport:{},lockScroll:{type:Boolean},lazyRender:{type:Boolean},beforeClose:{},overlayProps:{},overlayStyle:{},overlayClass:{},transitionAppear:{type:Boolean},closeOnClickOverlay:{type:Boolean,default:!0},round:{type:Boolean},position:{default:`center`},closeIcon:{},closeable:{type:Boolean},transition:{},iconPrefix:{},closeOnPopstate:{type:Boolean},closeIconPosition:{},destroyOnClose:{type:Boolean},safeAreaInsetTop:{type:Boolean},safeAreaInsetBottom:{type:Boolean},noBorder:{type:Boolean,default:!1},useTrulyShow:{type:Boolean},style:{type:[Boolean,null,String,Object,Array]}},{show:{type:Boolean,required:!0},showModifiers:{}}),emits:(0,n.mergeModels)([`closed`],[`update:show`]),setup(e,{expose:t}){let r=(0,s.useRouter)(),i=e,a=(0,n.useModel)(e,`show`),o=(0,n.shallowRef)(a.value),[c,l]=ya((0,n.computed)(()=>i.useTrulyShow?o.value:a.value)),u=Oi;return(0,n.watch)(a,e=>{e?u=r.beforeEach(()=>{if(console.log(`popup:
10
- `,`isLast:`,l.value,`show:`,a.value),l.value)return a.value?a.value=!1:void 0}):u()},{immediate:!0}),t({zIndex:c,trulyShow:o}),(t,r)=>{let s=zn;return(0,n.openBlock)(),(0,n.createBlock)(s,(0,n.mergeProps)(i,{show:a.value,"onUpdate:show":r[0]||=e=>a.value=e,"z-index":(0,n.unref)(c),teleport:`#popups`,onOpen:r[1]||=e=>o.value=!0,onClosed:r[2]||=()=>{o.value=!1,t.$emit(`closed`)},class:[`max-h-screen overflow-hidden overflow-y-auto!`,!e.noBorder&&`border-0 border-t border-solid border-(--van-border-color)`]}),{default:(0,n.withCtx)(()=>[o.value?(0,n.renderSlot)(t.$slots,`default`,{key:0}):(0,n.createCommentVNode)(``,!0)]),_:3},16,[`show`,`z-index`,`class`])}}}),jg=(0,n.defineComponent)({__name:`DcRouterTab`,props:{items:{},routerBase:{}},setup(e){let t=e,r=(0,s.useRoute)(),i=(0,n.ref)(decodeURI(r.path.replaceAll(t.routerBase+`/`,``).split(`/`)[0])),a=(0,s.useRouter)(),o=async e=>{let n=`?`,r=t.items.find(t=>t.name==e);for(let e in r.queries??{})if(Object.prototype.hasOwnProperty.call(r.queries??{},e)){let t=(r.queries??{})[e];n+=`${e}=${t}&`}return n=n.replace(/&$/,``),await a.force.replace(`${t.routerBase}/${e.split(`/`).map(encodeURI).join(`/`)}${n}`),!0};(0,n.watch)(()=>t.items,e=>{e.find(e=>e.name.startsWith(i.value))||console.log(i.value,e)});let c=a.afterEach(e=>{if(e.path.startsWith(t.routerBase)){let n=e.path.replaceAll(t.routerBase+`/`,``).split(`/`)[0];n!==i.value&&(i.value=n)}});return(0,n.onUnmounted)(()=>{c()}),(t,r)=>{let a=Ir,s=Lr;return(0,n.openBlock)(),(0,n.createBlock)(s,{ref:`tab`,shrink:``,active:i.value,"onUpdate:active":r[0]||=e=>i.value=e,beforeChange:o,class:`w-full`},{"nav-left":(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`left`)]),"nav-right":(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`right`)]),"nav-bottom":(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`bottom`)]),default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.items,e=>((0,n.openBlock)(),(0,n.createBlock)(a,{title:e.title,onClick:t=>i.value=e.name,name:e.name},null,8,[`title`,`onClick`,`name`]))),256))]),_:3},8,[`active`])}}}),Mg=(0,n.defineComponent)({__name:`DcText`,props:{text:{default:``},ellipsis:{}},setup(e){let t=e,r=(0,n.computed)(()=>t.text.replace(/(http(s?):\/\/)?([\w-]+\.)+(\.?[a-z]+)+(:\d+)?(\/[\w-.\/?%&=]*)?/gi,e=>`\u1145[[${e}]]\u1145`).split(`ᅅ`).filter(Boolean).map(e=>/\[\[[^\[\]]+\]\]/g.test(e)?{value:e.substring(2,e.length-2),mode:`link`}:{value:e,mode:`text`}));return(t,a)=>{let o=i.NButton;return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)([[(0,n.unref)(wi)(e.ellipsis)&&`overflow-hidden overflow-ellipsis`],`whitespace-pre-wrap text-(--van-text-color)`]),style:(0,n.normalizeStyle)([(0,n.unref)(wi)(e.ellipsis)&&`line-break: anywhere;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: ${e.ellipsis};`])},[(0,n.renderSlot)(t.$slots,`default`),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.value,e=>((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[e.mode===`link`?((0,n.openBlock)(),(0,n.createBlock)(o,{key:0,tag:`a`,class:`underline`,onClick:a[0]||=(0,n.withModifiers)(()=>{},[`stop`]),text:``,type:`primary`,target:`_blank`,href:/http(s?):\/\/.+/.test(e.value)?e.value:`https://${e.value}`},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.value),1)]),_:2},1032,[`href`])):e.mode===`text`?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createTextVNode)((0,n.toDisplayString)(e.value),1)],64)):(0,n.createCommentVNode)(``,!0)],64))),256))],6)}}}),Ng={class:`mt-1 text-xs text-(--van-text-color-2)`},Pg=(0,n.defineComponent)({__name:`DcToggleIcon`,props:(0,n.mergeModels)({icon:{},size:{},disChanged:{type:Boolean},rowMode:{type:Boolean},padding:{type:Boolean}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:(0,n.mergeModels)([`change`,`click`,`longClick`],[`update:modelValue`]),setup(e,{emit:t}){let r=e,a=t,o=(0,n.useModel)(e,`modelValue`);(0,n.watch)(o,e=>a(`change`,e));let s=()=>{a(`click`,!o.value),r.disChanged||(o.value=!o.value)},c=(0,n.useTemplateRef)(`htmlRefHook`);return ua(c,()=>{a(`longClick`)},{modifiers:{prevent:!0}}),(t,r)=>{let a=i.NIcon;return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)([`flex items-center justify-center **:transition-colors!`,[e.rowMode||`flex-col`,e.padding&&`px-4`]]),onClick:(0,n.withModifiers)(s,[`stop`]),ref_key:`htmlRefHook`,ref:c},[(0,n.createVNode)(a,{size:e.size,color:o.value?`var(--p-color)`:`var(--van-gray-7)`},{default:(0,n.withCtx)(()=>[((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.icon)))]),_:1},8,[`size`,`color`]),(0,n.createElementVNode)(`span`,Ng,[(0,n.renderSlot)(t.$slots,`default`)])],2)}}}),Fg=Object.defineProperty,Ig=Object.defineProperties,Lg=Object.getOwnPropertyDescriptors,Rg=Object.getOwnPropertySymbols,zg=Object.prototype.hasOwnProperty,Bg=Object.prototype.propertyIsEnumerable,Vg=(e,t,n)=>t in e?Fg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hg=(e,t)=>{for(var n in t||={})zg.call(t,n)&&Vg(e,n,t[n]);if(Rg)for(var n of Rg(t))Bg.call(t,n)&&Vg(e,n,t[n]);return e},Ug=(e,t)=>Ig(e,Lg(t)),Wg=(e,t)=>{var n={};for(var r in e)zg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Rg)for(var r of Rg(e))t.indexOf(r)<0&&Bg.call(e,r)&&(n[r]=e[r]);return n};function Gg(e){return(0,n.getCurrentScope)()?((0,n.onScopeDispose)(e),!0):!1}var Kg=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var qg=e=>e!=null,Jg=Object.prototype.toString,Yg=e=>Jg.call(e)===`[object Object]`;function Xg(e){return Array.isArray(e)?e:[e]}function Zg(e){return(0,n.getCurrentInstance)()}function Qg(e,t=!0,r){Zg()?(0,n.onMounted)(e,r):t?e():(0,n.nextTick)(e)}function $g(e,t,r){return(0,n.watch)(e,t,Ug(Hg({},r),{immediate:!0}))}var e_=Kg?window:void 0;function $(e){let t=(0,n.toValue)(e);return t?.$el??t}function t_(...e){let t=[],r=()=>{t.forEach(e=>e()),t.length=0},i=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),a=(0,n.computed)(()=>{let t=Xg((0,n.toValue)(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0}),o=$g(()=>[a.value?.map(e=>$(e))??[e_].filter(e=>e!=null),Xg((0,n.toValue)(a.value?e[1]:e[0])),Xg((0,n.unref)(a.value?e[2]:e[1])),(0,n.toValue)(a.value?e[3]:e[2])],([e,n,a,o])=>{if(r(),!(e!=null&&e.length)||!(n!=null&&n.length)||!(a!=null&&a.length))return;let s=Yg(o)?Hg({},o):o;t.push(...e.flatMap(e=>n.flatMap(t=>a.map(n=>i(e,t,n,s)))))},{flush:`post`});return Gg(r),()=>{o(),r()}}function n_(){let e=(0,n.shallowRef)(!1),t=(0,n.getCurrentInstance)();return t&&(0,n.onMounted)(()=>{e.value=!0},t),e}function r_(e){let t=n_();return(0,n.computed)(()=>(t.value,!!e()))}function i_(e,t,r={}){let i=r,{window:a=e_}=i,o=Wg(i,[`window`]),s,c=r_(()=>a&&`MutationObserver`in a),l=()=>{s&&=(s.disconnect(),void 0)},u=(0,n.computed)(()=>{let t=Xg((0,n.toValue)(e)).map($).filter(qg);return new Set(t)}),d=(0,n.watch)(()=>u.value,e=>{l(),c.value&&e.size&&(s=new MutationObserver(t),e.forEach(e=>s.observe(e,o)))},{immediate:!0,flush:`post`}),f=()=>s?.takeRecords(),p=()=>{d(),l()};return Gg(p),{isSupported:c,stop:p,takeRecords:f}}function a_(e,t,r={}){let i=r,{window:a=e_}=i,o=Wg(i,[`window`]),s,c=r_(()=>a&&`ResizeObserver`in a),l=()=>{s&&=(s.disconnect(),void 0)},u=(0,n.watch)((0,n.computed)(()=>{let t=(0,n.toValue)(e);return Array.isArray(t)?t.map(e=>$(e)):[$(t)]}),e=>{if(l(),c.value&&a){s=new ResizeObserver(t);for(let t of e)t&&s.observe(t,o)}},{immediate:!0,flush:`post`}),d=()=>{l(),u()};return Gg(d),{isSupported:c,stop:d}}function o_(e,t={}){let{reset:r=!0,windowResize:i=!0,windowScroll:a=!0,immediate:o=!0,updateTiming:s=`sync`}=t,c=(0,n.shallowRef)(0),l=(0,n.shallowRef)(0),u=(0,n.shallowRef)(0),d=(0,n.shallowRef)(0),f=(0,n.shallowRef)(0),p=(0,n.shallowRef)(0),m=(0,n.shallowRef)(0),h=(0,n.shallowRef)(0);function g(){let t=$(e);if(!t){r&&(c.value=0,l.value=0,u.value=0,d.value=0,f.value=0,p.value=0,m.value=0,h.value=0);return}let n=t.getBoundingClientRect();c.value=n.height,l.value=n.bottom,u.value=n.left,d.value=n.right,f.value=n.top,p.value=n.width,m.value=n.x,h.value=n.y}function _(){s===`sync`?g():s===`next-frame`&&requestAnimationFrame(()=>g())}return a_(e,_),(0,n.watch)(()=>$(e),e=>!e&&_()),i_(e,_,{attributeFilter:[`style`,`class`]}),a&&t_(`scroll`,_,{capture:!0,passive:!0}),i&&t_(`resize`,_,{passive:!0}),Qg(()=>{o&&_()}),{height:c,bottom:l,left:u,right:d,top:f,width:p,x:m,y:h,update:_}}function s_(e,t={width:0,height:0},r={}){let{window:i=e_,box:a=`content-box`}=r,o=(0,n.computed)(()=>($(e)?.namespaceURI)?.includes(`svg`)),s=(0,n.shallowRef)(t.width),c=(0,n.shallowRef)(t.height),{stop:l}=a_(e,([t])=>{let n=a===`border-box`?t.borderBoxSize:a===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(i&&o.value){let t=$(e);if(t){let e=t.getBoundingClientRect();s.value=e.width,c.value=e.height}}else if(n){let e=Xg(n);s.value=e.reduce((e,{inlineSize:t})=>e+t,0),c.value=e.reduce((e,{blockSize:t})=>e+t,0)}else s.value=t.contentRect.width,c.value=t.contentRect.height},r);Qg(()=>{let n=$(e);n&&(s.value=`offsetWidth`in n?n.offsetWidth:t.width,c.value=`offsetHeight`in n?n.offsetHeight:t.height)});let u=(0,n.watch)(()=>$(e),e=>{s.value=e?t.width:0,c.value=e?t.height:0});function d(){l(),u()}return{width:s,height:c,stop:d}}var c_=[`data-index`],l_=(0,n.defineComponent)({name:`VirtualWaterfall`,__name:`virtual-waterfall`,props:{virtual:{type:Boolean,default:!0},rowKey:{default:`id`},enableCache:{type:Boolean,default:!0},gap:{default:15},padding:{default:15},preloadScreenCount:{default:()=>[0,0]},itemMinWidth:{default:220},maxColumnCount:{default:10},minColumnCount:{default:2},items:{default:()=>[]},calcItemHeight:{type:Function,default:(e,t)=>250}},setup(e,{expose:t}){let r=e,i=(0,n.ref)(),{width:a}=s_(i),{top:o}=o_(i);(0,n.onMounted)(()=>{a.value===0&&(a.value=Number.parseInt(window.getComputedStyle(i.value).width))});function s(e){return Object.prototype.toString.call(e)===`[object Number]`}let c=(0,n.computed)(()=>{if(!a.value)return 0;let e=a.value;if(e>=r.itemMinWidth*2){let t=Math.floor(e/r.itemMinWidth);return r.maxColumnCount&&t>r.maxColumnCount?r.maxColumnCount:t}return r.minColumnCount}),l=(0,n.ref)(Array(c.value).fill(0)),u=(0,n.computed)(()=>{if(!a.value||c.value<=0)return 0;let e=(c.value-1)*r.gap;return Math.ceil((a.value-e)/c.value)}),d=(0,n.shallowRef)([]);t({withItemSpaces:e=>{e((0,n.readonly)(d).value)}}),(0,n.watchEffect)(()=>{let e=r.items.length;if(!c.value||!e){d.value=[];return}let t=Array(e),n=0,i=r.enableCache&&d.value.length&&e>d.value.length;i?n=d.value.length:l.value=Array(c.value).fill(0);for(let a=0;a<e;a++){if(i&&a<n){t[a]=d.value[a];continue}let e=p(),o=r.calcItemHeight(r.items[a],u.value),s=l.value[e],c=(u.value+r.gap)*e,f={index:a,item:r.items[a],column:e,top:s,left:c,bottom:s+o,height:o};l.value[e]+=o+r.gap,t[a]=f}d.value=t});let f=(0,n.computed)(()=>{let e=d.value.length;if(!e)return[];if(!r.virtual)return d.value;let t=i.value.parentElement.offsetTop,n=-o.value+t,[a,s]=r.preloadScreenCount,c=i.value.parentElement.clientHeight,l=n-a*c,u=n+(s+1)*c,f=[];for(let t=0;t<e;t++){let e=d.value[t],n=e.top,r=e.bottom;(n>=l&&n<=u||r>=l&&r<=u||n<l&&r>u)&&f.push(e)}return f}),p=()=>l.value.indexOf(Math.min(...l.value));return(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{ref_key:`content`,ref:i,style:(0,n.normalizeStyle)({position:`relative`,willChange:`height`,height:`${Math.max(...l.value)}px`,padding:`${s(e.padding)?e.padding+`px`:e.padding}`})},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(f.value,t=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:t.item[e.rowKey]??t.index,style:(0,n.normalizeStyle)({position:`absolute`,contentVisibility:`auto`,width:`${u.value}px`,height:`${t.height}px`,transform:`translate(${t.left}px, ${t.top}px)`,containIntrinsicSize:`${u.value}px ${t.height}px`}),"data-index":t.index},[(0,n.renderSlot)(e.$slots,`default`,{item:t.item,index:t.index})],12,c_))),128))],4))}}),u_=(0,n.defineComponent)({__name:`DcWaterfall`,props:{source:{},style:{type:[Boolean,null,String,Object,Array]},class:{},col:{default:2},padding:{default:4},gap:{default:4},minHeight:{default:0},dataProcessor:{},unReloadable:{type:Boolean}},emits:[`next`,`reset`,`retry`,`col`],setup(e,{expose:t,emit:i}){let a=e,s=i,c=e=>a.dataProcessor?.(e)??e,l=(0,n.computed)(()=>be(a.col)?a.col:[a.col,a.col]),u=(0,n.computed)(()=>({...r.Stream.isStream(a.source)?{data:c(a.source.data.value),isDone:a.source.isDone.value,isRequesting:a.source.isRequesting.value,isError:!!a.source.error.value,length:c(a.source.data.value).length,isEmpty:a.source.isEmpty.value,source:a.source}:{data:c(a.source.data.data.value??[]),isDone:a.source.isEnd,isRequesting:a.source.data.isLoading.value,isError:a.source.data.isError.value,length:c(a.source.data.data.value??[]).length,isEmpty:a.source.data.isEmpty.value,source:a.source.data},next:()=>r.Stream.isStream(a.source)?a.source.next():(0,r.callbackToPromise)(e=>s(`next`,e)),retry:()=>r.Stream.isStream(a.source)?a.source.retry():(0,r.callbackToPromise)(e=>s(`retry`,e)),reset:()=>r.Stream.isStream(a.source)?a.source.reset():s(`reset`)})),d=(0,n.shallowRef)(!1),f=(0,n.shallowRef)(!1),p=async()=>{u.value.reset(),console.log(`reset done`),await u.value.next(),f.value=!1},m=(0,n.useTemplateRef)(`content`),h=(0,n.computed)(()=>m.value?.cont),{y:g}=ga(h);$e(`scroll`,()=>{let{isDone:e,isError:t,isRequesting:n,retry:r,next:i}=u.value;if(n||e)return;let a=h.value;if(!a)return;let o=a.scrollHeight,s=a.scrollTop,c=a.clientHeight;o-s-c<=100&&(t?r():i())},{target:h}),(0,n.watch)(()=>a.source,()=>{let{isError:e,retry:t,next:n,isEmpty:r}=u.value;r&&(e?t():n())},{deep:1,immediate:!0});let _=(0,n.useTemplateRef)(`waterfallEl`),v=(0,o.useTemp)().$apply(`waterfall`,()=>({top:0})),y=v.top++,b=(0,o.useTemp)().$applyRaw(`waterfall:${y}`,()=>(0,n.shallowReactive)(new Map)),x=[],S=new MutationObserver(([e])=>{for(let e of x)e();if(!(e.target instanceof HTMLDivElement)||!u.value.data)return;let t=[...e.target.children];for(let e of t){let t=Number(e.dataset.index),n=u.value.data[t],r=()=>{let t=e.firstElementChild?.getBoundingClientRect();b.set(n,t?.height??a.minHeight)},i=ma(e.firstElementChild,r);r(),x.push(()=>i.stop())}});(0,n.watch)(_,e=>{if(!e)return S.disconnect();S.observe(e.$el,{childList:!0})}),(0,n.onUnmounted)(()=>{S.disconnect();for(let e of x)e()});let C=(0,n.shallowRef)(!0);return t({scrollTop:g,scrollParent:h,async reloadList(){C.value=!1,b.clear(),await(0,n.nextTick)(),C.value=!0}}),(t,i)=>{let o=Jr;return C.value?((0,n.openBlock)(),(0,n.createBlock)(o,{key:0,modelValue:f.value,"onUpdate:modelValue":i[1]||=e=>f.value=e,class:(0,n.normalizeClass)([`relative h-full`,a.class]),disabled:e.unReloadable||u.value.isRequesting||!!(0,n.unref)(g)&&!d.value,onRefresh:p,onChange:i[2]||=({distance:e})=>d.value=!!e,style:(0,n.normalizeStyle)(e.style)},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(Eg,{retriable:``,source:(0,n.unref)(r.Stream).isStream(e.source)?e.source:e.source.data,"class-loading":`mt-2 !h-[24px]`,"class-empty":`h-full!`,"class-error":`h-full!`,class:`h-full w-full overflow-auto`,onRetry:i[0]||=e=>u.value.retry(),onResetRetry:p,"hide-loading":d.value&&u.value.isRequesting,ref_key:`content`,ref:m},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(l_),{items:u.value.data,gap:e.gap,padding:e.padding,"preload-screen-count":[0,1],ref_key:`waterfallEl`,ref:_,"calc-item-height":t=>(0,n.unref)(b).get(t)??e.minHeight,class:`waterfall`,"min-column-count":l.value[0],"max-column-count":l.value[1]},{default:(0,n.withCtx)(({item:r,index:i})=>[(0,n.renderSlot)(t.$slots,`default`,{item:r,index:i,height:(0,n.unref)(b).get(r),length:u.value.length,minHeight:e.minHeight})]),_:3},8,[`items`,`gap`,`padding`,`calc-item-height`,`min-column-count`,`max-column-count`])]),_:3},8,[`source`,`hide-loading`])]),_:3},8,[`modelValue`,`class`,`disabled`,`style`])):(0,n.createCommentVNode)(``,!0)}}}),d_=(0,n.defineComponent)({__name:`DcFormSwitch`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NSwitch),{defaultValue:e.config.defaultValue,value:t.value,"onUpdate:value":a[0]||=e=>t.value=e},(0,n.createSlots)({_:2},[e.config.open?{name:`checked`,fn:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.config.open),1)]),key:`0`}:void 0,e.config.close?{name:`unchecked`,fn:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.config.close),1)]),key:`1`}:void 0]),1032,[`defaultValue`,`value`]))}}),f_=(0,n.defineComponent)({__name:`DcFormString`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NInput),{clearable:``,allowInput:t=>e.config.patten?e.config.patten.test(t)||(0,n.unref)(ji)(t):!0,defaultValue:e.config.defaultValue,placeholder:e.config.placeholder,value:t.value,"onUpdate:value":a[0]||=e=>t.value=e},null,8,[`allowInput`,`defaultValue`,`placeholder`,`value`]))}}),p_=(0,n.defineComponent)({__name:`DcFormNumber`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NInputNumber),{precision:e.config.float?void 0:0,clearable:``,min:e.config.range?.[0],max:e.config.range?.[1],defaultValue:e.config.defaultValue,placeholder:e.config.placeholder,value:t.value,"onUpdate:value":a[0]||=e=>t.value=e},null,8,[`precision`,`min`,`max`,`defaultValue`,`placeholder`,`value`]))}}),m_=(0,n.defineComponent)({__name:`DcFormRadio`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>e.config.comp===`radio`?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NRadioGroup),{key:0,value:t.value,"onUpdate:value":a[0]||=e=>t.value=e,name:e.config.info,defaultValue:e.config.defaultValue},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(i.NSpace),null,{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.config.selects,e=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NRadio),{key:e.value,value:e.value},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`value`,`name`,`defaultValue`])):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NSelect),{key:1,virtualScroll:``,options:e.config.selects,defaultValue:e.config.defaultValue,value:t.value,"onUpdate:value":a[1]||=e=>t.value=e,placeholder:e.config.placeholder,filterable:``},null,8,[`options`,`defaultValue`,`value`,`placeholder`]))}}),h_=(0,n.defineComponent)({__name:`DcFormCheckbox`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>e.config.comp===`checkbox`?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NCheckboxGroup),{key:0,value:t.value,"onUpdate:value":a[0]||=e=>t.value=e,name:e.config.info,defaultValue:e.config.defaultValue},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(i.NSpace),null,{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.config.selects,e=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NCheckbox),{key:e.value,value:e.value},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`value`,`name`,`defaultValue`])):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NSelect),{key:1,virtualScroll:``,multiple:``,options:e.config.selects,defaultValue:e.config.defaultValue,value:t.value,"onUpdate:value":a[1]||=e=>t.value=e,placeholder:e.config.placeholder,filterable:``},null,8,[`options`,`defaultValue`,`value`,`placeholder`]))}}),g_=(0,n.defineComponent)({__name:`DcFormDate`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NDatePicker),{"input-readonly":``,format:e.config.format,type:e.config.time?`date`:`datetime`,"formatted-value":t.value,"onUpdate:formattedValue":a[0]||=e=>t.value=e},null,8,[`format`,`type`,`formatted-value`]))}}),__=(0,n.defineComponent)({__name:`DcFormDateRange`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NDatePicker),{"input-readonly":``,format:e.config.format,type:e.config.time?`daterange`:`datetimerange`,"formatted-value":t.value,"onUpdate:formattedValue":a[0]||=e=>t.value=e},null,8,[`format`,`type`,`formatted-value`]))}}),v_={class:`w-full items-center`},y_=(0,n.defineComponent)({__name:`DcFormPairs`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,r=()=>(t.config.defaultValue??[{key:``,value:``}])[0],a=(0,n.useModel)(e,`modelValue`);return(0,n.watch)(a,e=>{if(t.config.noMultiple&&e.length!=1){if(e.length>0)return e.push(r());e.pop()}}),(e,t)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NDynamicInput),{value:a.value,"onUpdate:value":t[0]||=e=>a.value=e,"on-create":()=>r(),"show-sort-button":``},{default:(0,n.withCtx)(({value:e})=>[(0,n.createElementVNode)(`div`,v_,[(0,n.createVNode)((0,n.unref)(i.NInput),{value:e.key,"onUpdate:value":t=>e.key=t,class:`w-2/3!`,type:`text`,placeholder:`插件ID`},null,8,[`value`,`onUpdate:value`]),(0,n.createVNode)((0,n.unref)(i.NInput),{value:e.value,"onUpdate:value":t=>e.value=t,type:`text`,class:`my-2`,placeholder:`下载语句`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`,`on-create`]))}}),b_=(0,n.defineComponent)({__name:`DcFormItem`,props:(0,n.mergeModels)({config:{},path:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NFormItem),{label:e.config.info,path:e.path,required:e.config.required??!0},{default:(0,n.withCtx)(()=>[e.config.type==`switch`?((0,n.openBlock)(),(0,n.createBlock)(d_,{key:0,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[0]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`string`?((0,n.openBlock)(),(0,n.createBlock)(f_,{key:1,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[1]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`number`?((0,n.openBlock)(),(0,n.createBlock)(p_,{key:2,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[2]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`radio`?((0,n.openBlock)(),(0,n.createBlock)(m_,{key:3,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[3]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`checkbox`?((0,n.openBlock)(),(0,n.createBlock)(h_,{key:4,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[4]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`date`?((0,n.openBlock)(),(0,n.createBlock)(g_,{key:5,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[5]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`dateRange`?((0,n.openBlock)(),(0,n.createBlock)(__,{key:6,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[6]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`pairs`?((0,n.openBlock)(),(0,n.createBlock)(y_,{key:7,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[7]||=e=>t.value=e},null,8,[`config`,`modelValue`])):(0,n.createCommentVNode)(``,!0)]),_:1},8,[`label`,`path`,`required`]))}}),x_=(0,n.defineComponent)({__name:`DcForm`,props:(0,n.mergeModels)({configs:{},overrideRow:{type:Boolean}},{modelValue:{default:{}},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`),r=(0,n.useSlots)();return(a,o)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NForm),{model:t.value},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(a.$slots,`top`,{config:e.configs}),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(Object.entries(e.configs),([i,o])=>((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[r.row&&((0,n.unref)(be)(e.overrideRow)?e.overrideRow.includes(i):e.overrideRow)?(0,n.renderSlot)(a.$slots,`row`,{key:0,modelValue:t.value[i],setModelValue:e=>t.value[i]=e,path:i,config:o}):((0,n.openBlock)(),(0,n.createBlock)(b_,{key:1,modelValue:t.value[i],"onUpdate:modelValue":e=>t.value[i]=e,path:i,config:o},null,8,[`modelValue`,`onUpdate:modelValue`,`path`,`config`]))],64))),256)),(0,n.renderSlot)(a.$slots,`bottom`,{config:e.configs})]),_:3},8,[`model`]))}}),S_=t({}),C_=t({Type:()=>S_});const w_=e=>{let t=(0,n.ref)({}),r=Promise.withResolvers();for(let n in e){if(!Object.hasOwn(e,n))continue;let r=e[n];switch(r.type){case`string`:t.value[n]=r.defaultValue??``;break;case`number`:t.value[n]=r.defaultValue??void 0;break;case`radio`:t.value[n]=r.defaultValue??void 0;break;case`checkbox`:t.value[n]=r.defaultValue??void 0;break;case`switch`:t.value[n]=r.defaultValue??!1;break;case`date`:t.value[n]=r.defaultValue??void 0;break}}return{comp:(0,n.createVNode)(x_,{configs:e,modelValue:t.value,"onUpdate:modelValue":e=>t.value=e},{bottom:()=>(0,n.createVNode)(i.NButton,{type:`primary`,onClick:async()=>{try{r.resolve(t.value)}catch(e){window.$message.error(String(e))}}},{default:()=>[(0,n.createTextVNode)(`提交`)]})}),data:r.promise}},T_=e=>{let t=m,r=m,i=new Promise((e,n)=>{t=e,r=n}),a=(0,n.shallowRef)(!0),[o,s,c]=ya(a),l=(0,n.watch)(o,e=>h.style.zIndex=e),u=window.$router.beforeEach(()=>s?f():!0),d=()=>(l(),c(),u(),h.destroy(),a.value=!1),f=()=>(r(),d(),!1),p=()=>{t(),d()},h=window.$dialog.create({positiveText:`确定`,negativeText:`取消`,...e,style:{...e.style,zIndex:o.value},async onClose(){if(await e.onClose?.()===!1)return!1;a.value=!1,f()},async onPositiveClick(t){if(await(e.onPositiveClick??m)(t)===!1)return!1;p()},async onNegativeClick(t){let n=await(e.onNegativeClick??m)(t);if(n)return n;f()},onEsc(){e.onEsc?.(),f()},onMaskClick(t){e.onMaskClick?.(t),f()},onAfterLeave(){e.onAfterLeave?.(),d()}});return i.ins=h,i};function E_(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!(0,n.isVNode)(e)}var D_=(0,a.useGlobalVar)((0,n.reactive)([]),`utils/message/allDownloadMessagesIsMinsize`);const O_=async(e,t)=>{let r=D_.length;D_[r]=!1;let a=(0,n.ref)(!1),o=(0,n.reactive)([]),s=(0,n.ref)(!1),l=(0,n.watch)(s,e=>{e?D_[r]=!0:D_[r]=!1},{immediate:!0}),u=(0,n.computed)(()=>D_.slice(0,r).filter(e=>e).length),d=window.$message.create(e,{render:e=>{let t;return(0,n.createVNode)(mg.div,{drag:`y`,dragConstraints:{top:0,right:0,bottom:0,left:0},dragTransition:{bounceStiffness:500,bounceDamping:15},variants:{minsize:{borderRadius:`100%`,width:`30px`,height:`30px`,paddingInline:`2px`,paddingBlock:`2px`,position:`fixed`,left:`${u.value*40+8}px`,top:`calc(var(--safe-area-inset-top) + 4px)`},maxsize:{borderRadius:`8px`,width:`90vw`,paddingInline:`8px`,paddingBlock:`12px`,height:`fit-content`}},onDragEnd:(e,{offset:t})=>t.y<-30&&(s.value=!0),animate:s.value?`minsize`:`maxsize`,class:`overflow-hidden bg-(--n-color)`,style:{boxShadow:`var(--n-box-shadow)`}},{default:()=>[(0,n.createVNode)(n.Transition,{name:`van-fade`},{default:()=>[s.value?(0,n.createVNode)(`div`,{class:`relative size-full`,onClick:()=>s.value=!1},[(0,n.createVNode)(c.Loading,{class:`absolute top-0 left-0 size-full`,color:`var(--p-color)`},null),(0,n.createVNode)(i.NIcon,{class:`absolute! top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2`,size:`18px`,color:`var(--p-color)`},{default:()=>[o.some(e=>e.state==`error`)?(0,n.createVNode)(c.Icon,{name:`cross`},null):(0,n.createVNode)(yg,null,null)]})]):(0,n.createVNode)(`div`,{class:`relative w-full`},[(0,n.createVNode)(`div`,{class:`flex items-center gap-2 text-base font-semibold`},[(0,n.createVNode)(`span`,null,[e.content]),a.value&&(0,n.createVNode)(i.NIconWrapper,{size:18,color:`var(--nui-success-color)`,borderRadius:114514},{default:()=>[(0,n.createVNode)(i.NIcon,{size:12},{default:()=>[(0,n.createVNode)(vg,null,null)]})]})]),(0,n.createVNode)(n.TransitionGroup,{name:`list`,tag:`ul`,class:`ml-1! h-fit w-full!`},E_(t=o.map((e,t)=>{let r;return(0,n.createVNode)(`div`,{class:`van-hairline--bottom w-full py-1`,key:t},[(0,n.createVNode)(`span`,{class:`text-sm font-semibold`},[e.title]),(0,n.createVNode)(`div`,{class:`relative h-fit w-full`},[(0,n.createVNode)(i.NProgress,{percentage:wi(e.progress)?e.progress:100,indicatorPlacement:`inside`,processing:Ee(e.state),type:`line`,showIndicator:!1,"show-indicator":!1,class:[`transition-all **:in-[.n-progress-graph-line-fill]:hidden!`,e.state==`error`&&e.retry?`w-[60%]!`:`w-[95%]!`],height:7,status:e.state},null),(0,n.createVNode)(n.Transition,{name:`van-slide-right`},E_(r=(0,n.withDirectives)((0,n.createVNode)(`div`,{class:`absolute! top-1/2 right-[4%] flex -translate-y-1/2 gap-3 ease-in-out!`},[(0,n.createVNode)(i.NButton,{tertiary:!0,circle:!0,onClick:()=>{e.state==`error`&&(e.retry=void 0,e.pc.reject(e.error))},class:`size-10!`},{icon:()=>(0,n.createVNode)(i.NIcon,null,{default:()=>[(0,n.createVNode)(_g,null,null)]})}),(0,n.createVNode)(i.NButton,{tertiary:!0,circle:!0,onClick:e.retry,class:`size-10!`},{icon:()=>(0,n.createVNode)(i.NIcon,null,{default:()=>[(0,n.createVNode)(hg,null,null)]})})]),[[n.vShow,e.state==`error`&&e.retry]]))?r:{default:()=>[r]})]),(0,n.createVNode)(`div`,{class:`h-4! text-xs text-(--van-text-color-2)`},[e.state==`error`&&`${e.error.name}: ${e.error.message}`||e.description||`...`])])}))?t:{default:()=>[t]}),(0,n.createVNode)(`div`,{class:`absolute -bottom-2 left-1/2 h-1 w-10 -translate-x-1/2 rounded-lg bg-(--nui-divider-color)`},null)])]})]})},duration:0}),f=(e,t,r)=>{let i=Promise.withResolvers(),a=(0,n.ref)(),s=(0,n.reactive)({description:``,retryable:!1,...t}),c=Error(),l=o.length,u=(0,n.watch)([s,a],([,t])=>{o[l]={title:e,state:t,error:c,pc:i,retry:s.retryable?d:void 0,...s}},{immediate:!0}),d=async()=>{a.value=void 0,s.description=``,s.retryable=!1;for(let e in t)Object.hasOwn(t,e)&&(s[e]=t[e]);try{let e=await r(s);a.value=`success`,await(0,n.nextTick)(),u.stop(),i.resolve(e)}catch(e){c=Se(e)?e:Error($r(e)),a.value=`error`,await(0,n.nextTick)(),s.retryable||(u.stop(),i.reject(e))}};return d(),i.promise},p=t({createProgress:(e,t)=>f(e,{progress:0},t),createLoading:(e,t)=>f(e,{},t)}),m=Promise.withResolvers();return p.then(async e=>{s.value=!1,a.value=!0;let t=o.find(e=>e.state==`error`);if(t)throw t.error;m.resolve(e),h(3e3).then(()=>{s.value=!0}),await(0,n.nextTick)(),await Qi(s).toBeTruthy(),l.stop(),d.destroy(),D_[r]=void 0}),p.catch(async e=>{m.reject(e),s.value=!1,h(3e3).then(()=>{s.value=!0}),await(0,n.nextTick)(),await Qi(s).toBeTruthy(),l.stop(),d.destroy(),D_[r]=void 0}),m.promise},k_=(e=`加载中`,t=window.$message)=>{let r=(0,n.computed)(()=>(0,n.isRef)(e)?e.value:Ce(e)?e():e),i=t.loading(r.value,{duration:0}),a=(0,n.watch)(r,e=>{i.content=e}),o=!1;async function s(e,t=!0,n,r){try{let t=await e;return c.success(n),t}catch(e){if(c.fail(r),t)throw e;return}}let c={bind:s,async success(e=`成功!`,t=500){a(),!(o||!i)&&(o=!0,i.type=`success`,i.content=e,await h(t),i.destroy())},async fail(e=`失败!`,t=500){a(),!(o||!i)&&(o=!0,i.type=`error`,i.content=e,await h(t),i.destroy())},async info(e,t=500){a(),!(o||!i)&&(o=!0,i.type=`info`,i.content=e,await h(t),i.destroy())},destroy(){a(),!(o||!i)&&(o=!0,i.destroy())},[Symbol.dispose](){this.destroy()},instance:i};return c};exports.DcAuthorIcon=wa,exports.DcAwait=Ta,exports.DcContent=Eg,exports.DcFloatPopup=Dg,exports.DcForm=x_,exports.DcFormCheckbox=h_,exports.DcFormDate=g_,exports.DcFormDateRange=__,exports.DcFormItem=b_,exports.DcFormNumber=p_,exports.DcFormPairs=y_,exports.DcFormRadio=m_,exports.DcFormString=f_,exports.DcFormSwitch=d_,exports.DcImage=Sa,exports.DcImagedIcon=Ca,exports.DcList=kg,exports.DcLoading=xa,exports.DcPopup=Ag,exports.DcRouterTab=jg,exports.DcText=Mg,exports.DcToggleIcon=Pg,exports.DcVar=Og,exports.DcWaterfall=u_,Object.defineProperty(exports,`FormType`,{enumerable:!0,get:function(){return C_}}),exports.createDialog=T_,exports.createDownloadMessage=O_,exports.createForm=w_,exports.createLoadingMessage=k_,exports.showImagePreview=ba,exports.useZIndex=ya;
9
+ `)}function i(e){let n=t.get(e);n&&(t.delete(e),B.render(()=>{document.head.removeChild(n)}))}return{addPopStyle:r,removePopStyle:i}}var wh=0;function Th(e){let t=String(wh++),r=new Map,{addPopStyle:i,removePopStyle:a}=Ch(e);function o(e){let n=[],r=Gp.get(e);r&&e.getAttribute(Ip.motionAttribute)===t&&n.push(r);let i=Array.from(e.querySelectorAll(`[${Ip.motionAttribute}="${t}"]`));for(let e of i){let t=Gp.get(e);t&&n.push(t)}return n}function s(e,t){let n=r.get(e);n&&(n.remaining.delete(t),n.remaining.size===0&&l(n))}let c={initial:e.initial,custom:e.custom,presenceId:t,onMotionExitComplete:s};(0,n.watch)(()=>e.custom,e=>{c.custom=e},{flush:`pre`}),ah(c),(0,n.onMounted)(()=>{c.initial=void 0});function l(t){a(t.el),t.states.forEach(e=>{e.getSnapshot(e.options,!1)}),t.done(),r.delete(t.el),t.el?.isConnected?t.states[0]?.didUpdate():t.states.forEach(e=>{e.unmount()}),e.onExitComplete?.()}function u(e,t){o(e).forEach(e=>{e.setActive(`exit`,!1),e.getSnapshot(e.options,!0)}),t()}function d(t,n){let a=t,s=o(a);if(s.length===0){n(),e.onExitComplete?.();return}let c={remaining:new Set(s),states:s,done:n,el:a};r.set(a,c),i(a),s.forEach(e=>{e.presenceContainer=a,e.setActive(`exit`,!0),e.getSnapshot(e.options,!1)}),s[0]?.didUpdate()}return(0,n.onUnmounted)(()=>{r.forEach(e=>{e.states.forEach(e=>{e.unmount()})}),r.clear()}),{enter:u,exit:d}}var Eh=(0,n.defineComponent)({name:`AnimatePresence`,inheritAttrs:!0,__name:`AnimatePresence`,props:{mode:{default:`sync`},initial:{type:Boolean,default:!0},as:{},custom:{},onExitComplete:{},anchorX:{default:`left`}},setup(e){let t=e,{enter:r,exit:i}=Th(t),a=(0,n.computed)(()=>t.mode===`wait`?{mode:t.mode===`wait`?`out-in`:void 0}:{tag:t.as});return(e,t)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.mode===`wait`?n.Transition:n.TransitionGroup),(0,n.mergeProps)(a.value,{appear:``,css:!1,onLeave:(0,n.unref)(i),onEnter:(0,n.unref)(r)}),{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`default`)]),_:3},16,[`onLeave`,`onEnter`]))}});const Dh=()=>(0,n.createVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,viewBox:`0 0 1024 1024`},[(0,n.createVNode)(`path`,{d:`M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92C290 92 102.3 279.5 102 511.5C101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1c1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 0 0-10.1 4.8c-1.8 5-3.8 10-5.9 14.9c-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 0 1 655.9 829c-42.3 17.9-87.4 27-133.8 27c-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 0 1 279 755.2a342.16 342.16 0 0 1-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4c31.6-31.6 68.4-56.4 109.3-73.8c42.3-17.9 87.4-27 133.8-27c46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 0 1 109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 0 0 3 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z`,fill:`currentColor`},null)]),Oh=()=>(0,n.createVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},[(0,n.createVNode)(`path`,{d:`M10.66 7.14c-2.24.48-4.04 2.3-4.52 4.54c-.37 1.75.02 3.38.89 4.66c.34.51 1.08.55 1.51.11c.35-.35.37-.88.1-1.28c-.5-.76-.75-1.71-.61-2.73c.23-1.74 1.67-3.17 3.41-3.4A4.003 4.003 0 0 1 16 13c0 .8-.24 1.54-.64 2.16c-.27.41-.25.95.1 1.29c.43.43 1.17.4 1.51-.11C17.62 15.4 18 14.25 18 13c0-3.75-3.45-6.7-7.34-5.86zm-.41-3.99c-4.05.69-7.19 3.69-8.03 7.72c-.66 3.17.2 6.16 1.97 8.38c.37.46 1.07.49 1.49.07c.36-.36.39-.93.07-1.32a8.004 8.004 0 0 1-1.66-6.28c.55-3.47 3.42-6.24 6.92-6.65c2.76-.33 5.27.74 6.93 2.59c.2.21.47.34.76.34c.85 0 1.34-1.01.77-1.65c-2.19-2.45-5.56-3.82-9.22-3.2zM12 11c-1.1 0-2 .9-2 2c0 .55.23 1.05.59 1.41c.36.36.86.59 1.41.59s1.05-.23 1.41-.59c.36-.36.59-.86.59-1.41c0-1.1-.9-2-2-2zm9-1c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1s-1-.45-1-1v-4c0-.55.45-1 1-1zm0 8c.55 0 1 .45 1 1s-.45 1-1 1s-1-.45-1-1s.45-1 1-1z`,fill:`currentColor`},null)]),kh=()=>(0,n.createVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},[(0,n.createVNode)(`path`,{d:`M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59L7.11 5.7A.996.996 0 1 0 5.7 7.11L10.59 12L5.7 16.89a.996.996 0 1 0 1.41 1.41L12 13.41l4.89 4.89a.996.996 0 1 0 1.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z`,fill:`currentColor`},null)]),Ah=()=>(0,n.createVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},[(0,n.createVNode)(`path`,{d:`M9 16.2l-3.5-3.5a.984.984 0 0 0-1.4 0a.984.984 0 0 0 0 1.4l4.19 4.19c.39.39 1.02.39 1.41 0L20.3 7.7a.984.984 0 0 0 0-1.4a.984.984 0 0 0-1.4 0L9 16.2z`,fill:`currentColor`},null)]),jh=()=>(0,n.createVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},[(0,n.createVNode)(`path`,{d:`M16.59 9H15V4c0-.55-.45-1-1-1h-4c-.55 0-1 .45-1 1v5H7.41c-.89 0-1.34 1.08-.71 1.71l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.63-.63.19-1.71-.7-1.71zM5 19c0 .55.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1H6c-.55 0-1 .45-1 1z`,fill:`currentColor`},null)]);var Mh={class:`relative size-full overflow-hidden`},Nh={key:2},Ph={key:3,class:`size-full`},Fh={key:4,class:`flex items-center justify-around gap-3`},Ih={class:`flex flex-col justify-center gap-2 text-white`},Lh={class:`text-xs text-wrap`},Rh=(0,n.defineComponent)({__name:`DcContent`,props:{retriable:{type:Boolean},hideError:{type:Boolean},hideEmpty:{type:Boolean},hideLoading:{type:Boolean},source:{},class:{},classError:{},classEmpty:{},classLoading:{},style:{type:[Boolean,null,String,Object,Array]},styleError:{type:[Boolean,null,String,Object,Array]},styleEmpty:{type:[Boolean,null,String,Object,Array]},styleLoading:{type:[Boolean,null,String,Object,Array]}},emits:[`retry`,`resetRetry`],setup(e,{expose:t}){let a=e,o=(0,n.computed)(()=>r.Stream.isStream(a.source)?{isLoading:a.source.isRequesting.value,isError:a.source.error.value,errorCause:a.source.error.value?.message,isEmpty:a.source.isEmpty.value,data:a.source.data.value,isNoResult:a.source.isNoData.value}:r.PromiseContent.isPromiseContent(a.source)?{isLoading:a.source.isLoading.value,isError:a.source.isError.value,errorCause:a.source.errorCause.value?.message,isEmpty:a.source.isEmpty.value,data:a.source.data.value,isNoResult:a.source.isEmpty.value}:{isLoading:!1,isError:!1,errorCause:void 0,isEmpty:Mi(a.source),data:a.source,isNoResult:Mi(a.source)}),s={isLoadingNoData:{opacity:1,translateY:0,width:`2.5rem`,height:`2.5rem`,paddingBlock:`2px`,paddingInline:`2px`,left:`50%`,top:`8px`,translateX:`-50%`,backgroundColor:`var(--van-background-2)`,borderRadius:`100%`},isErrorNoData:{opacity:1,translateY:`-50%`,width:`70%`,minHeight:a.retriable?`22rem`:`20rem`,paddingBlock:`2px`,paddingInline:`2px`,left:`50%`,top:`50%`,translateX:`-50%`,backgroundColor:`var(--van-background-2)`,borderRadius:`4px`},isLoadingData:{opacity:.7,translateY:`0%`,width:`4rem`,height:`1.3rem`,paddingBlock:`2px`,paddingInline:`8px`,left:`4px`,top:`calc(100% - 8px - 1rem)`,translateX:`0%`,backgroundColor:`var(--p-color)`,borderRadius:`1.3rem`},isErrorData:{opacity:.7,translateY:`0%`,width:`fit-content`,height:`4rem`,paddingBlock:`2px`,paddingInline:`8px`,left:`4px`,top:`calc(100% - 8px - 4rem)`,translateX:`0%`,backgroundColor:`var(--p-color)`,borderRadius:`4px`},isEmpty:{opacity:1,translateY:`-50%`,width:`90%`,height:`10rem`,paddingBlock:`2px`,paddingInline:`2px`,left:`50%`,top:`50%`,translateX:`-50%`,backgroundColor:`var(--van-background-2)`,borderRadius:`4px`},done:{width:`4rem`,height:`1.3rem`,opacity:0,translateY:`100%`,paddingBlock:`0px`,paddingInline:`0px`,left:`4px`,top:`calc(100% - 8px - 1rem)`,translateX:`0%`,backgroundColor:`var(--p-color)`,borderRadius:`4px`}},c=(0,n.computed)(()=>!a.hideLoading&&o.value.isLoading?o.value.isEmpty?`isLoadingNoData`:`isLoadingData`:!a.hideError&&o.value.isError?o.value.isEmpty?`isErrorNoData`:`isErrorData`:!a.hideEmpty&&o.value.isNoResult?`isEmpty`:`done`),l=(0,n.useTemplateRef)(`cont`);return t({cont:l}),(t,r)=>{let u=Cn,d=i.NEmpty,f=i.NButton,p=i.NIcon,m=i.NResult,h=Eh;return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,Mh,[(0,n.createElementVNode)(`div`,{class:(0,n.normalizeClass)([`relative size-full`,[a.class]]),ref_key:`cont`,ref:l},[o.value.isEmpty?(0,n.createCommentVNode)(``,!0):(0,n.renderSlot)(t.$slots,`default`,{key:0,data:o.value.data})],2),(0,n.createVNode)(h,null,{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(xh).div,{initial:{opacity:0,translateY:`-100%`,left:`50%`,translateX:`-50%`},variants:s,animate:c.value,class:`absolute flex scale-100 items-center justify-center whitespace-nowrap shadow`},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(n.Transition,{name:`van-fade`},{default:(0,n.withCtx)(()=>[c.value===`isLoadingNoData`?((0,n.openBlock)(),(0,n.createBlock)(u,{key:0,size:`25px`,color:`var(--p-color)`})):c.value===`isLoadingData`?((0,n.openBlock)(),(0,n.createBlock)(Sa,{key:1,size:`10px`,color:`white`},{default:(0,n.withCtx)(()=>[...r[2]||=[(0,n.createTextVNode)(`加载中`,-1)]]),_:1})):c.value===`isEmpty`?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Nh,[(0,n.createVNode)(d,{description:`无结果`,class:(0,n.normalizeClass)([`w-full justify-center!`,[e.classEmpty]]),style:(0,n.normalizeStyle)([e.style,e.styleEmpty])},null,8,[`class`,`style`])])):c.value===`isErrorNoData`?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Ph,[(0,n.createVNode)(m,{class:(0,n.normalizeClass)([`flex size-full! flex-col items-center! justify-center! text-wrap *:w-full`,[e.classError]]),status:`error`,title:`网络错误`,style:(0,n.normalizeStyle)([e.style,e.styleError]),description:o.value.errorCause??`未知原因`},{footer:(0,n.withCtx)(()=>[e.retriable?((0,n.openBlock)(),(0,n.createBlock)(f,{key:0,onClick:r[0]||=e=>t.$emit(`resetRetry`),type:`primary`},{default:(0,n.withCtx)(()=>[...r[3]||=[(0,n.createTextVNode)(`重试`,-1)]]),_:1})):(0,n.createCommentVNode)(``,!0)]),icon:(0,n.withCtx)(()=>[(0,n.createVNode)(p,{size:`10rem`,color:`var(--nui-error-color)`},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(Oh))]),_:1})]),_:1},8,[`class`,`style`,`description`])])):c.value===`isErrorData`?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,Fh,[(0,n.createVNode)(p,{size:`3rem`,color:`white`},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(Oh))]),_:1}),(0,n.createElementVNode)(`div`,Ih,[r[4]||=(0,n.createElementVNode)(`div`,{class:`text-sm`},`网络错误`,-1),(0,n.createElementVNode)(`div`,Lh,(0,n.toDisplayString)(o.value.errorCause??`未知原因`),1)]),(0,n.createVNode)(f,{circle:``,type:`error`,size:`large`,onClick:r[1]||=e=>t.$emit(`retry`)},{icon:(0,n.withCtx)(()=>[(0,n.createVNode)(p,{color:`white`},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(Dh))]),_:1})]),_:1})])):(0,n.createCommentVNode)(``,!0)]),_:1})]),_:1},8,[`animate`])]),_:1})])}}}),zh=(0,n.defineComponent)({__name:`DcFloatPopup`,props:{anchors:{default:`high`},lockScroll:{type:Boolean,default:!1},class:{},style:{type:[Boolean,null,String,Object,Array]},overlay:{type:Boolean}},setup(e,{expose:t}){let r=(0,s.useRouter)(),i=e,a=(0,n.shallowRef)(!1),{height:o}=va(),c=(0,n.computed)(()=>be(i.anchors)?i.anchors:i.anchors===`high`?[0,Math.round(.4*o.value),Math.round(.7*o.value),o.value]:[0,Math.round(.3*o.value),Math.round(.6*o.value),Math.round(.9*o.value)]),l=(0,n.shallowRef)(0),[u,d]=ba(()=>l.value>0),f=ki;return(0,n.watch)(a,()=>{a.value?f=r.beforeEach(()=>d.value?a.value=!1:void 0):f()}),(0,s.onBeforeRouteLeave)(f),t({show(e=2){l.value=c.value[e],a.value=!0},close(){a.value=!1},isShowing:(0,n.shallowReadonly)(a),height:(0,n.shallowReadonly)(l)}),(t,r)=>{let i=Fn,o=Hr;return(0,n.openBlock)(),(0,n.createBlock)(n.Teleport,{to:`#popups`},[e.overlay?((0,n.openBlock)(),(0,n.createBlock)(i,{key:0,zIndex:(0,n.unref)(u),show:a.value,onClick:r[0]||=e=>a.value=!1},null,8,[`zIndex`,`show`])):(0,n.createCommentVNode)(``,!0),(0,n.createVNode)(n.Transition,{onAfterLeave:r[3]||=e=>l.value=0,name:`van-slide-up`},{default:(0,n.withCtx)(()=>[(0,n.withDirectives)((0,n.createVNode)(o,{onHeightChange:r[1]||=({height:e})=>e<=0&&(a.value=!1),anchors:c.value,height:l.value,"onUpdate:height":r[2]||=e=>l.value=e,"content-draggable":!1,"lock-scroll":e.lockScroll,style:(0,n.normalizeStyle)([e.style,{zIndex:(0,n.unref)(u)}]),class:(0,n.normalizeClass)([e.class,`overflow-hidden border-0 border-t border-solid border-(--van-border-color)`])},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`div`,{class:`w-full bg-(--van-background)`,style:(0,n.normalizeStyle)({height:`calc(${l.value}px - var(--van-floating-panel-header-height))`})},[l.value==0?(0,n.createCommentVNode)(``,!0):(0,n.renderSlot)(t.$slots,`default`,{key:0,height:l.value})],4)]),_:3},8,[`anchors`,`height`,`lock-scroll`,`style`,`class`]),[[n.vShow,a.value]])]),_:3})])}}}),Bh=(0,n.defineComponent)({__name:`DcVar`,props:{value:{}},setup(e){let t=e;return(e,r)=>(0,n.renderSlot)(e.$slots,`default`,{value:t.value})}}),Vh=(0,n.defineComponent)({__name:`DcList`,props:{source:{},itemHeight:{},listProp:{},goBottom:{type:Boolean},itemResizable:{type:Boolean},dataProcessor:{},unReloadable:{type:Boolean},style:{type:[Boolean,null,String,Object,Array]},class:{}},emits:[`next`,`reset`,`retry`],setup(e,{expose:t,emit:a}){let o=e,s=a,c=e=>o.dataProcessor?.(e)??e,l=(0,n.computed)(()=>({...r.Stream.isStream(o.source)?{data:c(o.source.data.value),isDone:o.source.isDone.value,isRequesting:o.source.isRequesting.value,isError:!!o.source.error.value,length:c(o.source.data.value).length,isEmpty:o.source.isEmpty.value,source:o.source}:be(o.source)?{data:c(o.source),isDone:!0,isRequesting:!1,isError:!1,length:c(o.source).length,isEmpty:Mi(o.source),source:o.source}:{data:c(o.source.data.data.value??[]),isDone:o.source.isEnd,isRequesting:o.source.data.isLoading.value,isError:o.source.data.isError.value,length:c(o.source.data.data.value??[]).length,isEmpty:o.source.data.isEmpty.value,source:o.source.data},next:()=>r.Stream.isStream(o.source)?o.source.next():(0,r.callbackToPromise)(e=>s(`next`,e)),retry:()=>r.Stream.isStream(o.source)?o.source.retry():(0,r.callbackToPromise)(e=>s(`retry`,e)),reset:()=>r.Stream.isStream(o.source)?o.source.reset():s(`reset`)}));(0,n.watch)(()=>l.value.data,()=>{o.goBottom&&u.value?.scrollTo({position:`bottom`,behavior:`instant`})},{flush:`post`,deep:!0,immediate:!0}),(0,n.watch)(l,e=>{e.isRequesting||Oi(window.innerHeight/o.itemHeight)+2>e.length&&!e.isDone&&(e.isError?e.retry():e.next())},{immediate:!0});let u=(0,n.useTemplateRef)(`vList`),{y:d}=_a(()=>u.value?.getScrollContainer()),f=Ei(async()=>{let e=u.value?.virtualListInstRef?.itemsElRef?.querySelector(` .v-vl-visible-items`);if(!e)return;let{itemHeight:t}=o,{data:n,isDone:r,isError:i,isRequesting:a,retry:s,next:c,length:f}=l.value;n&&!a&&!r&&t*(f-2)<d.value+(e?.children?.length??window.innerHeight/t)*t&&(i?s():c())},200),p=(0,n.shallowRef)(!1),m=(0,n.shallowRef)(!1),h=async()=>{l.value.reset(),console.log(`reset done`),await l.value.next(),m.value=!1};return t({scrollTop:d,listInstance:u}),(t,a)=>{let s=Yr;return(0,n.openBlock)(),(0,n.createBlock)(s,{modelValue:m.value,"onUpdate:modelValue":a[1]||=e=>m.value=e,class:(0,n.normalizeClass)([`relative`,o.class]),onRefresh:h,disabled:e.unReloadable||((0,n.unref)(r.Stream).isStream(e.source)?!1:(0,n.unref)(be)(e.source)?!0:e.source.reloadable??!0)||l.value.isError||l.value.isRequesting||!!(0,n.unref)(d)&&!p.value,onChange:a[2]||=({distance:e})=>p.value=!!e,style:(0,n.normalizeStyle)(e.style)},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(Rh,{retriable:``,source:(0,n.unref)(r.Stream).isStream(e.source)||(0,n.unref)(be)(e.source)?e.source:e.source.data,"class-loading":`mt-2 !h-[24px]`,"class-empty":`!h-full`,"class-error":`!h-full`,onResetRetry:h,"hide-loading":p.value&&l.value.isRequesting,onRetry:a[0]||=e=>l.value.retry()},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(Bh,{value:l.value.data},{default:(0,n.withCtx)(({value:r})=>[(0,n.createVNode)((0,n.unref)(i.NVirtualList),(0,n.mergeProps)(e.listProp??{},{"item-resizable":e.itemResizable,"item-size":e.itemHeight,onScroll:(0,n.unref)(f),class:[`h-full overflow-x-hidden`,[p.value?`overflow-y-hidden`:`overflow-y-auto`]],items:r,ref_key:`vList`,ref:u}),{default:(0,n.withCtx)(({item:i})=>[(0,n.renderSlot)(t.$slots,`default`,{height:e.itemHeight,data:{item:i,index:r.indexOf(i)}})]),_:2},1040,[`item-resizable`,`item-size`,`onScroll`,`items`,`class`])]),_:3},8,[`value`])]),_:3},8,[`source`,`hide-loading`])]),_:3},8,[`modelValue`,`class`,`disabled`,`style`])}}}),Hh=(0,n.defineComponent)({__name:`DcPopup`,props:(0,n.mergeModels)({show:{type:Boolean},zIndex:{},overlay:{type:Boolean,default:!0},duration:{},teleport:{},lockScroll:{type:Boolean},lazyRender:{type:Boolean},beforeClose:{},overlayProps:{},overlayStyle:{},overlayClass:{},transitionAppear:{type:Boolean},closeOnClickOverlay:{type:Boolean,default:!0},round:{type:Boolean},position:{default:`center`},closeIcon:{},closeable:{type:Boolean},transition:{},iconPrefix:{},closeOnPopstate:{type:Boolean},closeIconPosition:{},destroyOnClose:{type:Boolean},safeAreaInsetTop:{type:Boolean},safeAreaInsetBottom:{type:Boolean},noBorder:{type:Boolean,default:!1},useTrulyShow:{type:Boolean},style:{type:[Boolean,null,String,Object,Array]}},{show:{type:Boolean,required:!0},showModifiers:{}}),emits:(0,n.mergeModels)([`closed`],[`update:show`]),setup(e,{expose:t}){let r=(0,s.useRouter)(),i=e,a=(0,n.useModel)(e,`show`),o=(0,n.shallowRef)(a.value),[c,l]=ba((0,n.computed)(()=>i.useTrulyShow?o.value:a.value)),u=ki;return(0,n.watch)(a,e=>{e?u=r.beforeEach(()=>{if(console.log(`popup:
10
+ `,`isLast:`,l.value,`show:`,a.value),l.value)return a.value?a.value=!1:void 0}):u()},{immediate:!0}),t({zIndex:c,trulyShow:o}),(t,r)=>{let s=zn;return(0,n.openBlock)(),(0,n.createBlock)(s,(0,n.mergeProps)(i,{show:a.value,"onUpdate:show":r[0]||=e=>a.value=e,"z-index":(0,n.unref)(c),teleport:`#popups`,onOpen:r[1]||=e=>o.value=!0,onClosed:r[2]||=()=>{o.value=!1,t.$emit(`closed`)},class:[`max-h-screen overflow-hidden overflow-y-auto!`,!e.noBorder&&`border-0 border-t border-solid border-(--van-border-color)`]}),{default:(0,n.withCtx)(()=>[o.value?(0,n.renderSlot)(t.$slots,`default`,{key:0}):(0,n.createCommentVNode)(``,!0)]),_:3},16,[`show`,`z-index`,`class`])}}}),Uh=(0,n.defineComponent)({__name:`DcRouterTab`,props:{items:{},routerBase:{}},setup(e){let t=e,r=(0,s.useRoute)(),i=(0,n.ref)(decodeURI(r.path.replaceAll(t.routerBase+`/`,``).split(`/`)[0])),a=(0,s.useRouter)(),o=async e=>{let n=`?`,r=t.items.find(t=>t.name==e);for(let e in r.queries??{})if(Object.prototype.hasOwnProperty.call(r.queries??{},e)){let t=(r.queries??{})[e];n+=`${e}=${t}&`}return n=n.replace(/&$/,``),await a.force.replace(`${t.routerBase}/${e.split(`/`).map(encodeURI).join(`/`)}${n}`),!0};(0,n.watch)(()=>t.items,e=>{e.find(e=>e.name.startsWith(i.value))||console.log(i.value,e)});let c=a.afterEach(e=>{if(e.path.startsWith(t.routerBase)){let n=e.path.replaceAll(t.routerBase+`/`,``).split(`/`)[0];n!==i.value&&(i.value=n)}});return(0,n.onUnmounted)(()=>{c()}),(t,r)=>{let a=Lr,s=Rr;return(0,n.openBlock)(),(0,n.createBlock)(s,{ref:`tab`,shrink:``,active:i.value,"onUpdate:active":r[0]||=e=>i.value=e,beforeChange:o,class:`w-full`},{"nav-left":(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`left`)]),"nav-right":(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`right`)]),"nav-bottom":(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`bottom`)]),default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.items,e=>((0,n.openBlock)(),(0,n.createBlock)(a,{title:e.title,onClick:t=>i.value=e.name,name:e.name},null,8,[`title`,`onClick`,`name`]))),256))]),_:3},8,[`active`])}}}),Wh=(0,n.defineComponent)({__name:`DcText`,props:{text:{default:``},ellipsis:{}},setup(e){let t=e,r=(0,n.computed)(()=>t.text.replace(/(http(s?):\/\/)?([\w-]+\.)+(\.?[a-z]+)+(:\d+)?(\/[\w-.\/?%&=]*)?/gi,e=>`\u1145[[${e}]]\u1145`).split(`ᅅ`).filter(Boolean).map(e=>/\[\[[^\[\]]+\]\]/g.test(e)?{value:e.substring(2,e.length-2),mode:`link`}:{value:e,mode:`text`}));return(t,a)=>{let o=i.NButton;return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)([[(0,n.unref)(Ti)(e.ellipsis)&&`overflow-hidden overflow-ellipsis`],`whitespace-pre-wrap text-(--van-text-color)`]),style:(0,n.normalizeStyle)([(0,n.unref)(Ti)(e.ellipsis)&&`line-break: anywhere;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: ${e.ellipsis};`])},[(0,n.renderSlot)(t.$slots,`default`),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.value,e=>((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[e.mode===`link`?((0,n.openBlock)(),(0,n.createBlock)(o,{key:0,tag:`a`,class:`underline`,onClick:a[0]||=(0,n.withModifiers)(()=>{},[`stop`]),text:``,type:`primary`,target:`_blank`,href:/http(s?):\/\/.+/.test(e.value)?e.value:`https://${e.value}`},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.value),1)]),_:2},1032,[`href`])):e.mode===`text`?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[(0,n.createTextVNode)((0,n.toDisplayString)(e.value),1)],64)):(0,n.createCommentVNode)(``,!0)],64))),256))],6)}}}),Gh={class:`mt-1 text-xs text-(--van-text-color-2)`},Kh=(0,n.defineComponent)({__name:`DcToggleIcon`,props:(0,n.mergeModels)({icon:{},size:{},disChanged:{type:Boolean},rowMode:{type:Boolean},padding:{type:Boolean}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:(0,n.mergeModels)([`change`,`click`,`longClick`],[`update:modelValue`]),setup(e,{emit:t}){let r=e,a=t,o=(0,n.useModel)(e,`modelValue`);(0,n.watch)(o,e=>a(`change`,e));let s=()=>{a(`click`,!o.value),r.disChanged||(o.value=!o.value)},c=(0,n.useTemplateRef)(`htmlRefHook`);return da(c,()=>{a(`longClick`)},{modifiers:{prevent:!0}}),(t,r)=>{let a=i.NIcon;return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)([`flex items-center justify-center **:transition-colors!`,[e.rowMode||`flex-col`,e.padding&&`px-4`]]),onClick:(0,n.withModifiers)(s,[`stop`]),ref_key:`htmlRefHook`,ref:c},[(0,n.createVNode)(a,{size:e.size,color:o.value?`var(--p-color)`:`var(--van-gray-7)`},{default:(0,n.withCtx)(()=>[((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.icon)))]),_:1},8,[`size`,`color`]),(0,n.createElementVNode)(`span`,Gh,[(0,n.renderSlot)(t.$slots,`default`)])],2)}}}),qh=Object.defineProperty,Jh=Object.defineProperties,Yh=Object.getOwnPropertyDescriptors,Xh=Object.getOwnPropertySymbols,Zh=Object.prototype.hasOwnProperty,Qh=Object.prototype.propertyIsEnumerable,$h=(e,t,n)=>t in e?qh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eg=(e,t)=>{for(var n in t||={})Zh.call(t,n)&&$h(e,n,t[n]);if(Xh)for(var n of Xh(t))Qh.call(t,n)&&$h(e,n,t[n]);return e},tg=(e,t)=>Jh(e,Yh(t)),ng=(e,t)=>{var n={};for(var r in e)Zh.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xh)for(var r of Xh(e))t.indexOf(r)<0&&Qh.call(e,r)&&(n[r]=e[r]);return n};function rg(e,t){return(0,n.getCurrentScope)()?((0,n.onScopeDispose)(e,t),!0):!1}var ig=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var ag=e=>e!=null,og=Object.prototype.toString,sg=e=>og.call(e)===`[object Object]`;function cg(e){return Array.isArray(e)?e:[e]}function lg(e){return(0,n.getCurrentInstance)()}function ug(e,t=!0,r){lg()?(0,n.onMounted)(e,r):t?e():(0,n.nextTick)(e)}function dg(e,t,r){return(0,n.watch)(e,t,tg(eg({},r),{immediate:!0}))}var fg=ig?window:void 0;function pg(e){let t=(0,n.toValue)(e);return t?.$el??t}function mg(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),r=(0,n.computed)(()=>{let t=cg((0,n.toValue)(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return dg(()=>[r.value?.map(e=>pg(e))??[fg].filter(e=>e!=null),cg((0,n.toValue)(r.value?e[1]:e[0])),cg((0,n.unref)(r.value?e[2]:e[1])),(0,n.toValue)(r.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!(e!=null&&e.length)||!(n!=null&&n.length)||!(r!=null&&r.length))return;let s=sg(i)?eg({},i):i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function hg(){let e=(0,n.shallowRef)(!1),t=(0,n.getCurrentInstance)();return t&&(0,n.onMounted)(()=>{e.value=!0},t),e}function gg(e){let t=hg();return(0,n.computed)(()=>(t.value,!!e()))}function _g(e,t,r={}){let i=r,{window:a=fg}=i,o=ng(i,[`window`]),s,c=gg(()=>a&&`MutationObserver`in a),l=()=>{s&&=(s.disconnect(),void 0)},u=(0,n.watch)((0,n.computed)(()=>{let t=cg((0,n.toValue)(e)).map(pg).filter(ag);return new Set(t)}),e=>{l(),c.value&&e.size&&(s=new MutationObserver(t),e.forEach(e=>s.observe(e,o)))},{immediate:!0,flush:`post`}),d=()=>s?.takeRecords(),f=()=>{u(),l()};return rg(f),{isSupported:c,stop:f,takeRecords:d}}function vg(e,t,r={}){let i=r,{window:a=fg}=i,o=ng(i,[`window`]),s,c=gg(()=>a&&`ResizeObserver`in a),l=()=>{s&&=(s.disconnect(),void 0)},u=(0,n.watch)((0,n.computed)(()=>{let t=(0,n.toValue)(e);return Array.isArray(t)?t.map(e=>pg(e)):[pg(t)]}),e=>{if(l(),c.value&&a){s=new ResizeObserver(t);for(let t of e)t&&s.observe(t,o)}},{immediate:!0,flush:`post`}),d=()=>{l(),u()};return rg(d),{isSupported:c,stop:d}}function yg(e,t={}){let{reset:r=!0,windowResize:i=!0,windowScroll:a=!0,immediate:o=!0,updateTiming:s=`sync`}=t,c=(0,n.shallowRef)(0),l=(0,n.shallowRef)(0),u=(0,n.shallowRef)(0),d=(0,n.shallowRef)(0),f=(0,n.shallowRef)(0),p=(0,n.shallowRef)(0),m=(0,n.shallowRef)(0),h=(0,n.shallowRef)(0);function g(){let t=pg(e);if(!t){r&&(c.value=0,l.value=0,u.value=0,d.value=0,f.value=0,p.value=0,m.value=0,h.value=0);return}let n=t.getBoundingClientRect();c.value=n.height,l.value=n.bottom,u.value=n.left,d.value=n.right,f.value=n.top,p.value=n.width,m.value=n.x,h.value=n.y}function _(){s===`sync`?g():s===`next-frame`&&requestAnimationFrame(()=>g())}return vg(e,_),(0,n.watch)(()=>pg(e),e=>!e&&_()),_g(e,_,{attributeFilter:[`style`,`class`]}),a&&mg(`scroll`,_,{capture:!0,passive:!0}),i&&mg(`resize`,_,{passive:!0}),ug(()=>{o&&_()}),{height:c,bottom:l,left:u,right:d,top:f,width:p,x:m,y:h,update:_}}function bg(e,t={width:0,height:0},r={}){let{window:i=fg,box:a=`content-box`}=r,o=(0,n.computed)(()=>{var t;return(t=pg(e))==null||(t=t.namespaceURI)==null?void 0:t.includes(`svg`)}),s=(0,n.shallowRef)(t.width),c=(0,n.shallowRef)(t.height),{stop:l}=vg(e,([t])=>{let n=a===`border-box`?t.borderBoxSize:a===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(i&&o.value){let t=pg(e);if(t){let e=t.getBoundingClientRect();s.value=e.width,c.value=e.height}}else if(n){let e=cg(n);s.value=e.reduce((e,{inlineSize:t})=>e+t,0),c.value=e.reduce((e,{blockSize:t})=>e+t,0)}else s.value=t.contentRect.width,c.value=t.contentRect.height},r);ug(()=>{let n=pg(e);n&&(s.value=`offsetWidth`in n?n.offsetWidth:t.width,c.value=`offsetHeight`in n?n.offsetHeight:t.height)});let u=(0,n.watch)(()=>pg(e),e=>{s.value=e?t.width:0,c.value=e?t.height:0});function d(){l(),u()}return{width:s,height:c,stop:d}}var xg=[`data-index`],Sg=(0,n.defineComponent)({name:`VirtualWaterfall`,__name:`virtual-waterfall`,props:{virtual:{type:Boolean,default:!0},rowKey:{default:`id`},enableCache:{type:Boolean,default:!0},gap:{default:15},padding:{default:15},preloadScreenCount:{default:()=>[0,0]},itemMinWidth:{default:220},maxColumnCount:{default:10},minColumnCount:{default:2},items:{default:()=>[]},calcItemHeight:{type:Function,default:(e,t)=>250}},setup(e,{expose:t}){let r=e,i=(0,n.ref)(),{width:a}=bg(i),{top:o}=yg(i);(0,n.onMounted)(()=>{a.value===0&&i.value&&(a.value=Number.parseInt(window.getComputedStyle(i.value).width))});let s=(0,n.computed)(()=>typeof r.padding==`number`?`${r.padding}px`:r.padding),c=(0,n.computed)(()=>{if(!a.value)return 0;let e=a.value;if(e>=r.itemMinWidth*2){let t=Math.floor(e/r.itemMinWidth);return r.maxColumnCount&&t>r.maxColumnCount?r.maxColumnCount:t}return r.minColumnCount}),l=(0,n.shallowRef)(Array.from({length:c.value},()=>0)),u=()=>l.value.indexOf(Math.min(...l.value)),d=(0,n.computed)(()=>Math.max(...l.value)),f=(0,n.computed)(()=>{if(!a.value||c.value<=0)return 0;let e=(c.value-1)*r.gap;return Math.ceil((a.value-e)/c.value)}),p=(0,n.shallowRef)([]);t({withItemSpaces:e=>{e((0,n.readonly)(p).value)}}),(0,n.watchEffect)(()=>{let e=r.items.length;if(!c.value||!e){p.value=[];return}let t=Array.from({length:e}),i=0,a=r.enableCache&&p.value.length&&e>p.value.length;a?i=p.value.length:l.value=Array.from({length:c.value},()=>0);for(let n=0;n<e;n++){if(a&&n<i){t[n]=p.value[n];continue}let e=u(),o=r.calcItemHeight(r.items[n],f.value),s=l.value[e]??0,c=(f.value+r.gap)*e,d={index:n,item:r.items[n],column:e,top:s,left:c,bottom:s+o,height:o};l.value[e]+=o+r.gap,t[n]=d}p.value=t,(0,n.triggerRef)(l)});let m=(0,n.computed)(()=>{let e=p.value.length;if(!e)return[];if(!r.virtual)return p.value;let t=i.value?.parentElement?.offsetTop??0,n=-o.value+t,[a,s]=r.preloadScreenCount,c=i.value?.parentElement?.clientHeight??0,l=n-a*c,u=n+(s+1)*c,d=[];for(let t=0;t<e;t++){let e=p.value[t],n=e.top,r=e.bottom;(n>=l&&n<=u||r>=l&&r<=u||n<l&&r>u)&&d.push(e)}return d});return(t,r)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{ref_key:`content`,ref:i,style:(0,n.normalizeStyle)({position:`relative`,willChange:`height`,height:`${d.value}px`,padding:s.value})},[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(m.value,r=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:r.item[e.rowKey]??r.index,style:(0,n.normalizeStyle)({position:`absolute`,contentVisibility:`auto`,width:`${f.value}px`,height:`${r.height}px`,transform:`translate(${r.left}px, ${r.top}px)`,containIntrinsicSize:`${f.value}px ${r.height}px`}),"data-index":r.index},[(0,n.renderSlot)(t.$slots,`default`,{item:r.item,index:r.index})],12,xg))),128))],4))}}),Cg=(0,n.defineComponent)({__name:`DcWaterfall`,props:{source:{},style:{type:[Boolean,null,String,Object,Array]},class:{},col:{default:2},padding:{default:4},gap:{default:4},minHeight:{default:0},dataProcessor:{},unReloadable:{type:Boolean}},emits:[`next`,`reset`,`retry`,`col`],setup(e,{expose:t,emit:i}){let a=e,s=i,c=e=>a.dataProcessor?.(e)??e,l=(0,n.computed)(()=>be(a.col)?a.col:[a.col,a.col]),u=(0,n.computed)(()=>({...r.Stream.isStream(a.source)?{data:c(a.source.data.value),isDone:a.source.isDone.value,isRequesting:a.source.isRequesting.value,isError:!!a.source.error.value,length:c(a.source.data.value).length,isEmpty:a.source.isEmpty.value,source:a.source}:{data:c(a.source.data.data.value??[]),isDone:a.source.isEnd,isRequesting:a.source.data.isLoading.value,isError:a.source.data.isError.value,length:c(a.source.data.data.value??[]).length,isEmpty:a.source.data.isEmpty.value,source:a.source.data},next:()=>r.Stream.isStream(a.source)?a.source.next():(0,r.callbackToPromise)(e=>s(`next`,e)),retry:()=>r.Stream.isStream(a.source)?a.source.retry():(0,r.callbackToPromise)(e=>s(`retry`,e)),reset:()=>r.Stream.isStream(a.source)?a.source.reset():s(`reset`)})),d=(0,n.shallowRef)(!1),f=(0,n.shallowRef)(!1),p=async()=>{u.value.reset(),console.log(`reset done`),await u.value.next(),f.value=!1},m=(0,n.useTemplateRef)(`content`),h=(0,n.computed)(()=>m.value?.cont),{y:g}=_a(h);$e(`scroll`,()=>{let{isDone:e,isError:t,isRequesting:n,retry:r,next:i}=u.value;if(n||e)return;let a=h.value;if(!a)return;let o=a.scrollHeight,s=a.scrollTop,c=a.clientHeight;o-s-c<=100&&(t?r():i())},{target:h}),(0,n.watch)(()=>a.source,()=>{let{isError:e,retry:t,next:n,isEmpty:r}=u.value;r&&(e?t():n())},{deep:1,immediate:!0});let _=(0,n.useTemplateRef)(`waterfallEl`),v=(0,o.useTemp)().$apply(`waterfall`,()=>({top:0})),y=v.top++,b=(0,o.useTemp)().$applyRaw(`waterfall:${y}`,()=>(0,n.shallowReactive)(new Map)),x=[],S=new MutationObserver(([e])=>{for(let e of x)e();if(!(e.target instanceof HTMLDivElement)||!u.value.data)return;let t=[...e.target.children];for(let e of t){let t=Number(e.dataset.index),n=u.value.data[t],r=()=>{let t=e.firstElementChild?.getBoundingClientRect();b.set(n,t?.height??a.minHeight)},i=ha(e.firstElementChild,r);r(),x.push(()=>i.stop())}});(0,n.watch)(_,e=>{if(!e)return S.disconnect();S.observe(e.$el,{childList:!0})}),(0,n.onUnmounted)(()=>{S.disconnect();for(let e of x)e()});let C=(0,n.shallowRef)(!0);return t({scrollTop:g,scrollParent:h,async reloadList(){C.value=!1,b.clear(),await(0,n.nextTick)(),C.value=!0}}),(t,i)=>{let o=Yr;return C.value?((0,n.openBlock)(),(0,n.createBlock)(o,{key:0,modelValue:f.value,"onUpdate:modelValue":i[1]||=e=>f.value=e,class:(0,n.normalizeClass)([`relative h-full`,a.class]),disabled:e.unReloadable||u.value.isRequesting||!!(0,n.unref)(g)&&!d.value,onRefresh:p,onChange:i[2]||=({distance:e})=>d.value=!!e,style:(0,n.normalizeStyle)(e.style)},{default:(0,n.withCtx)(()=>[(0,n.createVNode)(Rh,{retriable:``,source:(0,n.unref)(r.Stream).isStream(e.source)?e.source:e.source.data,"class-loading":`mt-2 !h-[24px]`,"class-empty":`h-full!`,"class-error":`h-full!`,class:`h-full w-full overflow-auto`,onRetry:i[0]||=e=>u.value.retry(),onResetRetry:p,"hide-loading":d.value&&u.value.isRequesting,ref_key:`content`,ref:m},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(Sg),{items:u.value.data,gap:e.gap,padding:e.padding,"preload-screen-count":[0,1],ref_key:`waterfallEl`,ref:_,"calc-item-height":t=>(0,n.unref)(b).get(t)??e.minHeight,class:`waterfall`,"min-column-count":l.value[0],"max-column-count":l.value[1]},{default:(0,n.withCtx)(({item:r,index:i})=>[(0,n.renderSlot)(t.$slots,`default`,{item:r,index:i,height:(0,n.unref)(b).get(r),length:u.value.length,minHeight:e.minHeight})]),_:3},8,[`items`,`gap`,`padding`,`calc-item-height`,`min-column-count`,`max-column-count`])]),_:3},8,[`source`,`hide-loading`])]),_:3},8,[`modelValue`,`class`,`disabled`,`style`])):(0,n.createCommentVNode)(``,!0)}}}),wg=(0,n.defineComponent)({__name:`DcFormSwitch`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NSwitch),{defaultValue:e.config.defaultValue,value:t.value,"onUpdate:value":a[0]||=e=>t.value=e},(0,n.createSlots)({_:2},[e.config.open?{name:`checked`,fn:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.config.open),1)]),key:`0`}:void 0,e.config.close?{name:`unchecked`,fn:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.config.close),1)]),key:`1`}:void 0]),1032,[`defaultValue`,`value`]))}}),Tg=(0,n.defineComponent)({__name:`DcFormString`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NInput),{clearable:``,allowInput:t=>e.config.patten?e.config.patten.test(t)||(0,n.unref)(Mi)(t):!0,defaultValue:e.config.defaultValue,placeholder:e.config.placeholder,value:t.value,"onUpdate:value":a[0]||=e=>t.value=e},null,8,[`allowInput`,`defaultValue`,`placeholder`,`value`]))}}),Eg=(0,n.defineComponent)({__name:`DcFormNumber`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NInputNumber),{precision:e.config.float?void 0:0,clearable:``,min:e.config.range?.[0],max:e.config.range?.[1],defaultValue:e.config.defaultValue,placeholder:e.config.placeholder,value:t.value,"onUpdate:value":a[0]||=e=>t.value=e},null,8,[`precision`,`min`,`max`,`defaultValue`,`placeholder`,`value`]))}}),Dg=(0,n.defineComponent)({__name:`DcFormRadio`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>e.config.comp===`radio`?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NRadioGroup),{key:0,value:t.value,"onUpdate:value":a[0]||=e=>t.value=e,name:e.config.info,defaultValue:e.config.defaultValue},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(i.NSpace),null,{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.config.selects,e=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NRadio),{key:e.value,value:e.value},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`value`,`name`,`defaultValue`])):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NSelect),{key:1,virtualScroll:``,options:e.config.selects,defaultValue:e.config.defaultValue,value:t.value,"onUpdate:value":a[1]||=e=>t.value=e,placeholder:e.config.placeholder,filterable:``},null,8,[`options`,`defaultValue`,`value`,`placeholder`]))}}),Og=(0,n.defineComponent)({__name:`DcFormCheckbox`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>e.config.comp===`checkbox`?((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NCheckboxGroup),{key:0,value:t.value,"onUpdate:value":a[0]||=e=>t.value=e,name:e.config.info,defaultValue:e.config.defaultValue},{default:(0,n.withCtx)(()=>[(0,n.createVNode)((0,n.unref)(i.NSpace),null,{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.config.selects,e=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NCheckbox),{key:e.value,value:e.value},{default:(0,n.withCtx)(()=>[(0,n.createTextVNode)((0,n.toDisplayString)(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`value`,`name`,`defaultValue`])):((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NSelect),{key:1,virtualScroll:``,multiple:``,options:e.config.selects,defaultValue:e.config.defaultValue,value:t.value,"onUpdate:value":a[1]||=e=>t.value=e,placeholder:e.config.placeholder,filterable:``},null,8,[`options`,`defaultValue`,`value`,`placeholder`]))}}),kg=(0,n.defineComponent)({__name:`DcFormDate`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NDatePicker),{"input-readonly":``,format:e.config.format,type:e.config.time?`date`:`datetime`,"formatted-value":t.value,"onUpdate:formattedValue":a[0]||=e=>t.value=e},null,8,[`format`,`type`,`formatted-value`]))}}),Ag=(0,n.defineComponent)({__name:`DcFormDateRange`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NDatePicker),{"input-readonly":``,format:e.config.format,type:e.config.time?`daterange`:`datetimerange`,"formatted-value":t.value,"onUpdate:formattedValue":a[0]||=e=>t.value=e},null,8,[`format`,`type`,`formatted-value`]))}}),jg={class:`w-full items-center`},Mg=(0,n.defineComponent)({__name:`DcFormPairs`,props:(0,n.mergeModels)({config:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,r=()=>(t.config.defaultValue??[{key:``,value:``}])[0],a=(0,n.useModel)(e,`modelValue`);return(0,n.watch)(a,e=>{if(t.config.noMultiple&&e.length!=1){if(e.length>0)return e.push(r());e.pop()}}),(e,t)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NDynamicInput),{value:a.value,"onUpdate:value":t[0]||=e=>a.value=e,"on-create":()=>r(),"show-sort-button":``},{default:(0,n.withCtx)(({value:e})=>[(0,n.createElementVNode)(`div`,jg,[(0,n.createVNode)((0,n.unref)(i.NInput),{value:e.key,"onUpdate:value":t=>e.key=t,class:`w-2/3!`,type:`text`,placeholder:`插件ID`},null,8,[`value`,`onUpdate:value`]),(0,n.createVNode)((0,n.unref)(i.NInput),{value:e.value,"onUpdate:value":t=>e.value=t,type:`text`,class:`my-2`,placeholder:`下载语句`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`,`on-create`]))}}),Ng=(0,n.defineComponent)({__name:`DcFormItem`,props:(0,n.mergeModels)({config:{},path:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`);return(r,a)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NFormItem),{label:e.config.info,path:e.path,required:e.config.required??!0},{default:(0,n.withCtx)(()=>[e.config.type==`switch`?((0,n.openBlock)(),(0,n.createBlock)(wg,{key:0,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[0]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`string`?((0,n.openBlock)(),(0,n.createBlock)(Tg,{key:1,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[1]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`number`?((0,n.openBlock)(),(0,n.createBlock)(Eg,{key:2,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[2]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`radio`?((0,n.openBlock)(),(0,n.createBlock)(Dg,{key:3,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[3]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`checkbox`?((0,n.openBlock)(),(0,n.createBlock)(Og,{key:4,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[4]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`date`?((0,n.openBlock)(),(0,n.createBlock)(kg,{key:5,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[5]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`dateRange`?((0,n.openBlock)(),(0,n.createBlock)(Ag,{key:6,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[6]||=e=>t.value=e},null,8,[`config`,`modelValue`])):e.config.type==`pairs`?((0,n.openBlock)(),(0,n.createBlock)(Mg,{key:7,config:e.config,modelValue:t.value,"onUpdate:modelValue":a[7]||=e=>t.value=e},null,8,[`config`,`modelValue`])):(0,n.createCommentVNode)(``,!0)]),_:1},8,[`label`,`path`,`required`]))}}),Pg=(0,n.defineComponent)({__name:`DcForm`,props:(0,n.mergeModels)({configs:{},overrideRow:{type:Boolean}},{modelValue:{default:{}},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=(0,n.useModel)(e,`modelValue`),r=(0,n.useSlots)();return(a,o)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.unref)(i.NForm),{model:t.value},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(a.$slots,`top`,{config:e.configs}),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(Object.entries(e.configs),([i,o])=>((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[r.row&&((0,n.unref)(be)(e.overrideRow)?e.overrideRow.includes(i):e.overrideRow)?(0,n.renderSlot)(a.$slots,`row`,{key:0,modelValue:t.value[i],setModelValue:e=>t.value[i]=e,path:i,config:o}):((0,n.openBlock)(),(0,n.createBlock)(Ng,{key:1,modelValue:t.value[i],"onUpdate:modelValue":e=>t.value[i]=e,path:i,config:o},null,8,[`modelValue`,`onUpdate:modelValue`,`path`,`config`]))],64))),256)),(0,n.renderSlot)(a.$slots,`bottom`,{config:e.configs})]),_:3},8,[`model`]))}}),Fg=t({}),Ig=t({Type:()=>Fg});const Lg=e=>{let t=(0,n.ref)({}),r=Promise.withResolvers();for(let n in e){if(!Object.hasOwn(e,n))continue;let r=e[n];switch(r.type){case`string`:t.value[n]=r.defaultValue??``;break;case`number`:t.value[n]=r.defaultValue??void 0;break;case`radio`:t.value[n]=r.defaultValue??void 0;break;case`checkbox`:t.value[n]=r.defaultValue??void 0;break;case`switch`:t.value[n]=r.defaultValue??!1;break;case`date`:t.value[n]=r.defaultValue??void 0;break}}return{comp:(0,n.createVNode)(Pg,{configs:e,modelValue:t.value,"onUpdate:modelValue":e=>t.value=e},{bottom:()=>(0,n.createVNode)(i.NButton,{type:`primary`,onClick:async()=>{try{r.resolve(t.value)}catch(e){window.$message.error(String(e))}}},{default:()=>[(0,n.createTextVNode)(`提交`)]})}),data:r.promise}},Rg=e=>{let t=m,r=m,i=new Promise((e,n)=>{t=e,r=n}),a=(0,n.shallowRef)(!0),[o,s,c]=ba(a),l=(0,n.watch)(o,e=>h.style.zIndex=e),u=window.$router.beforeEach(()=>s?f():!0),d=()=>(l(),c(),u(),h.destroy(),a.value=!1),f=()=>(r(),d(),!1),p=()=>{t(),d()},h=window.$dialog.create({positiveText:`确定`,negativeText:`取消`,...e,style:{...e.style,zIndex:o.value},async onClose(){if(await e.onClose?.()===!1)return!1;a.value=!1,f()},async onPositiveClick(t){if(await(e.onPositiveClick??m)(t)===!1)return!1;p()},async onNegativeClick(t){let n=await(e.onNegativeClick??m)(t);if(n)return n;f()},onEsc(){e.onEsc?.(),f()},onMaskClick(t){e.onMaskClick?.(t),f()},onAfterLeave(){e.onAfterLeave?.(),d()}});return i.ins=h,i};function zg(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!(0,n.isVNode)(e)}var Bg=(0,a.useGlobalVar)((0,n.reactive)([]),`utils/message/allDownloadMessagesIsMinsize`);const Vg=async(e,t)=>{let r=Bg.length;Bg[r]=!1;let a=(0,n.ref)(!1),o=(0,n.reactive)([]),s=(0,n.ref)(!1),l=(0,n.watch)(s,e=>{e?Bg[r]=!0:Bg[r]=!1},{immediate:!0}),u=(0,n.computed)(()=>Bg.slice(0,r).filter(e=>e).length),d=window.$message.create(e,{render:e=>{let t;return(0,n.createVNode)(xh.div,{drag:`y`,dragConstraints:{top:0,right:0,bottom:0,left:0},dragTransition:{bounceStiffness:500,bounceDamping:15},variants:{minsize:{borderRadius:`100%`,width:`30px`,height:`30px`,paddingInline:`2px`,paddingBlock:`2px`,position:`fixed`,left:`${u.value*40+8}px`,top:`calc(var(--safe-area-inset-top) + 4px)`},maxsize:{borderRadius:`8px`,width:`90vw`,paddingInline:`8px`,paddingBlock:`12px`,height:`fit-content`}},onDragEnd:(e,{offset:t})=>t.y<-30&&(s.value=!0),animate:s.value?`minsize`:`maxsize`,class:`overflow-hidden bg-(--n-color)`,style:{boxShadow:`var(--n-box-shadow)`}},{default:()=>[(0,n.createVNode)(n.Transition,{name:`van-fade`},{default:()=>[s.value?(0,n.createVNode)(`div`,{class:`relative size-full`,onClick:()=>s.value=!1},[(0,n.createVNode)(c.Loading,{class:`absolute top-0 left-0 size-full`,color:`var(--p-color)`},null),(0,n.createVNode)(i.NIcon,{class:`absolute! top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2`,size:`18px`,color:`var(--p-color)`},{default:()=>[o.some(e=>e.state==`error`)?(0,n.createVNode)(c.Icon,{name:`cross`},null):(0,n.createVNode)(jh,null,null)]})]):(0,n.createVNode)(`div`,{class:`relative w-full`},[(0,n.createVNode)(`div`,{class:`flex items-center gap-2 text-base font-semibold`},[(0,n.createVNode)(`span`,null,[e.content]),a.value&&(0,n.createVNode)(i.NIconWrapper,{size:18,color:`var(--nui-success-color)`,borderRadius:114514},{default:()=>[(0,n.createVNode)(i.NIcon,{size:12},{default:()=>[(0,n.createVNode)(Ah,null,null)]})]})]),(0,n.createVNode)(n.TransitionGroup,{name:`list`,tag:`ul`,class:`ml-1! h-fit w-full!`},zg(t=o.map((e,t)=>{let r;return(0,n.createVNode)(`div`,{class:`van-hairline--bottom w-full py-1`,key:t},[(0,n.createVNode)(`span`,{class:`text-sm font-semibold`},[e.title]),(0,n.createVNode)(`div`,{class:`relative h-fit w-full`},[(0,n.createVNode)(i.NProgress,{percentage:Ti(e.progress)?e.progress:100,indicatorPlacement:`inside`,processing:Ee(e.state),type:`line`,showIndicator:!1,"show-indicator":!1,class:[`transition-all **:in-[.n-progress-graph-line-fill]:hidden!`,e.state==`error`&&e.retry?`w-[60%]!`:`w-[95%]!`],height:7,status:e.state},null),(0,n.createVNode)(n.Transition,{name:`van-slide-right`},zg(r=(0,n.withDirectives)((0,n.createVNode)(`div`,{class:`absolute! top-1/2 right-[4%] flex -translate-y-1/2 gap-3 ease-in-out!`},[(0,n.createVNode)(i.NButton,{tertiary:!0,circle:!0,onClick:()=>{e.state==`error`&&(e.retry=void 0,e.pc.reject(e.error))},class:`size-10!`},{icon:()=>(0,n.createVNode)(i.NIcon,null,{default:()=>[(0,n.createVNode)(kh,null,null)]})}),(0,n.createVNode)(i.NButton,{tertiary:!0,circle:!0,onClick:e.retry,class:`size-10!`},{icon:()=>(0,n.createVNode)(i.NIcon,null,{default:()=>[(0,n.createVNode)(Dh,null,null)]})})]),[[n.vShow,e.state==`error`&&e.retry]]))?r:{default:()=>[r]})]),(0,n.createVNode)(`div`,{class:`h-4! text-xs text-(--van-text-color-2)`},[e.state==`error`&&`${e.error.name}: ${e.error.message}`||e.description||`...`])])}))?t:{default:()=>[t]}),(0,n.createVNode)(`div`,{class:`absolute -bottom-2 left-1/2 h-1 w-10 -translate-x-1/2 rounded-lg bg-(--nui-divider-color)`},null)])]})]})},duration:0}),f=(e,t,r)=>{let i=Promise.withResolvers(),a=(0,n.ref)(),s=(0,n.reactive)({description:``,retryable:!1,...t}),c=Error(),l=o.length,u=(0,n.watch)([s,a],([,t])=>{o[l]={title:e,state:t,error:c,pc:i,retry:s.retryable?d:void 0,...s}},{immediate:!0}),d=async()=>{a.value=void 0,s.description=``,s.retryable=!1;for(let e in t)Object.hasOwn(t,e)&&(s[e]=t[e]);try{let e=await r(s);a.value=`success`,await(0,n.nextTick)(),u.stop(),i.resolve(e)}catch(e){c=Se(e)?e:Error(ei(e)),a.value=`error`,await(0,n.nextTick)(),s.retryable||(u.stop(),i.reject(e))}};return d(),i.promise},p=t({createProgress:(e,t)=>f(e,{progress:0},t),createLoading:(e,t)=>f(e,{},t)}),m=Promise.withResolvers();return p.then(async e=>{s.value=!1,a.value=!0;let t=o.find(e=>e.state==`error`);if(t)throw t.error;m.resolve(e),h(3e3).then(()=>{s.value=!0}),await(0,n.nextTick)(),await $i(s).toBeTruthy(),l.stop(),d.destroy(),Bg[r]=void 0}),p.catch(async e=>{m.reject(e),s.value=!1,h(3e3).then(()=>{s.value=!0}),await(0,n.nextTick)(),await $i(s).toBeTruthy(),l.stop(),d.destroy(),Bg[r]=void 0}),m.promise},Hg=(e=`加载中`,t=window.$message)=>{let r=(0,n.computed)(()=>(0,n.isRef)(e)?e.value:Ce(e)?e():e),i=t.loading(r.value,{duration:0}),a=(0,n.watch)(r,e=>{i.content=e}),o=!1;async function s(e,t=!0,n,r){try{let t=await e;return c.success(n),t}catch(e){if(c.fail(r),t)throw e;return}}let c={bind:s,async success(e=`成功!`,t=500){a(),!(o||!i)&&(o=!0,i.type=`success`,i.content=e,await h(t),i.destroy())},async fail(e=`失败!`,t=500){a(),!(o||!i)&&(o=!0,i.type=`error`,i.content=e,await h(t),i.destroy())},async info(e,t=500){a(),!(o||!i)&&(o=!0,i.type=`info`,i.content=e,await h(t),i.destroy())},destroy(){a(),!(o||!i)&&(o=!0,i.destroy())},[Symbol.dispose](){this.destroy()},instance:i};return c};exports.DcAuthorIcon=Ta,exports.DcAwait=Ea,exports.DcContent=Rh,exports.DcFloatPopup=zh,exports.DcForm=Pg,exports.DcFormCheckbox=Og,exports.DcFormDate=kg,exports.DcFormDateRange=Ag,exports.DcFormItem=Ng,exports.DcFormNumber=Eg,exports.DcFormPairs=Mg,exports.DcFormRadio=Dg,exports.DcFormString=Tg,exports.DcFormSwitch=wg,exports.DcImage=Ca,exports.DcImagedIcon=wa,exports.DcList=Vh,exports.DcLoading=Sa,exports.DcPopup=Hh,exports.DcRouterTab=Uh,exports.DcText=Wh,exports.DcToggleIcon=Kh,exports.DcVar=Bh,exports.DcWaterfall=Cg,Object.defineProperty(exports,`FormType`,{enumerable:!0,get:function(){return Ig}}),exports.createDialog=Rg,exports.createDownloadMessage=Vg,exports.createForm=Lg,exports.createLoadingMessage=Hg,exports.showImagePreview=xa,exports.useZIndex=ba;
11
11
  //# sourceMappingURL=index.cjs.map