You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
16 KiB
2 lines
16 KiB
import{k as $,D as F,a3 as ve,f as N,r as f,q as V,P as W,J as me,aH as pe,ej as X,b7 as ze,O as x,u as A,p as ge,aO as Le,d as z,b as p,aP as H,b3 as Me,bi as ye,s as he,v as Ee,ep as Ye,F as je}from"./index-f4658ae7.js";function Ve(){}const G=Object.assign,be=typeof window!="undefined",Z=e=>e!==null&&typeof e=="object",B=e=>e!=null,K=e=>typeof e=="function",He=e=>Z(e)&&K(e.then)&&K(e.catch),Wt=e=>Object.prototype.toString.call(e)==="[object Date]"&&!Number.isNaN(e.getTime()),we=e=>typeof e=="number"||/^\d+(\.\d+)?$/.test(e),Ke=()=>be?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1;function Q(e,t){const n=t.split(".");let o=e;return n.forEach(s=>{var a;o=Z(o)&&(a=o[s])!=null?a:""}),o}function Xt(e,t,n){return t.reduce((o,s)=>((!n||e[s]!==void 0)&&(o[s]=e[s]),o),{})}const Gt=(e,t)=>JSON.stringify(e)===JSON.stringify(t),Zt=e=>Array.isArray(e)?e:[e],Oe=null,h=[Number,String],C={type:Boolean,default:!0},qt=e=>({type:e,required:!0}),Jt=()=>({type:Array,default:()=>[]}),Qt=e=>({type:Number,default:e}),en=e=>({type:h,default:e}),P=e=>({type:String,default:e});var T=typeof window!="undefined";function ee(e){return T?requestAnimationFrame(e):-1}function tn(e){T&&cancelAnimationFrame(e)}function nn(e){ee(()=>ee(e))}var Ue=e=>e===window,te=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),We=e=>{const t=A(e);if(Ue(t)){const n=t.innerWidth,o=t.innerHeight;return te(n,o)}return t!=null&&t.getBoundingClientRect?t.getBoundingClientRect():te(0,0)};function on(e){const t=$(e,null);if(t){const n=F(),{link:o,unlink:s,internalChildren:a}=t;o(n),ve(()=>s(n));const i=N(()=>a.indexOf(n));return{parent:t,index:i}}return{parent:null,index:f(-1)}}function Xe(e){const t=[],n=o=>{Array.isArray(o)&&o.forEach(s=>{var a;Le(s)&&(t.push(s),(a=s.component)!=null&&a.subTree&&(t.push(s.component.subTree),n(s.component.subTree.children)),s.children&&n(s.children))})};return n(e),t}var ne=(e,t)=>{const n=e.indexOf(t);return n===-1?e.findIndex(o=>t.key!==void 0&&t.key!==null&&o.type===t.type&&o.key===t.key):n};function Ge(e,t,n){const o=Xe(e.subTree.children);n.sort((a,i)=>ne(o,a.vnode)-ne(o,i.vnode));const s=n.map(a=>a.proxy);t.sort((a,i)=>{const r=s.indexOf(a),u=s.indexOf(i);return r-u})}function sn(e){const t=V([]),n=V([]),o=F();return{children:t,linkChildren:a=>{ge(e,Object.assign({link:u=>{u.proxy&&(n.push(u),t.push(u.proxy),Ge(o,t,n))},unlink:u=>{const c=n.indexOf(u);t.splice(c,1),n.splice(c,1)},children:t,internalChildren:n},a))}}}function Ce(e){let t;W(()=>{e(),me(()=>{t=!0})}),pe(()=>{t&&e()})}function q(e,t,n={}){if(!T)return;const{target:o=window,passive:s=!1,capture:a=!1}=n;let i=!1,r;const u=l=>{if(i)return;const v=A(l);v&&!r&&(v.addEventListener(e,t,{capture:a,passive:s}),r=!0)},c=l=>{if(i)return;const v=A(l);v&&r&&(v.removeEventListener(e,t,a),r=!1)};ve(()=>c(o)),X(()=>c(o)),Ce(()=>u(o));let d;return ze(o)&&(d=x(o,(l,v)=>{c(v),u(l)})),()=>{d==null||d(),c(o),i=!0}}function an(e,t,n={}){if(!T)return;const{eventName:o="click"}=n;q(o,a=>{(Array.isArray(e)?e:[e]).every(u=>{const c=A(u);return c&&!c.contains(a.target)})&&t(a)},{target:document})}var _,Y;function Ze(){if(!_&&(_=f(0),Y=f(0),T)){const e=()=>{_.value=window.innerWidth,Y.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:_,height:Y}}var qe=/scroll|auto|overlay/i,Be=T?window:void 0;function Je(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function Te(e,t=Be){let n=e;for(;n&&n!==t&&Je(n);){const{overflowY:o}=window.getComputedStyle(n);if(qe.test(o))return n;n=n.parentNode}return t}function rn(e,t=Be){const n=f();return W(()=>{e.value&&(n.value=Te(e.value,t))}),n}var k;function un(){if(!k&&(k=f("visible"),T)){const e=()=>{k.value=document.hidden?"hidden":"visible"};e(),window.addEventListener("visibilitychange",e)}return k}var Qe=Symbol("van-field");function cn(e){const t=$(Qe,null);t&&!t.customValue.value&&(t.customValue.value=e,x(e,()=>{t.resetValidation(),t.validateWithTrigger("onChange")}))}function et(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function oe(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function Se(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function tt(e){oe(window,e),oe(document.body,e)}function ln(e,t){if(e===window)return 0;const n=t?et(t):Se();return We(e).top+n}const nt=Ke();function dn(){nt&&tt(Se())}const ot=e=>e.stopPropagation();function Pe(e,t){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),t&&ot(e)}function fn(e){const t=A(e);if(!t)return!1;const n=window.getComputedStyle(t),o=n.display==="none",s=t.offsetParent===null&&n.position!=="fixed";return o||s}const{width:st,height:at}=Ze();function y(e){if(B(e))return we(e)?`${e}px`:String(e)}function vn(e){if(B(e)){if(Array.isArray(e))return{width:y(e[0]),height:y(e[1])};const t=y(e);return{width:t,height:t}}}function rt(e){const t={};return e!==void 0&&(t.zIndex=+e),t}let j;function it(){if(!j){const e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;j=parseFloat(t)}return j}function ut(e){return e=e.replace(/rem/g,""),+e*it()}function ct(e){return e=e.replace(/vw/g,""),+e*st.value/100}function lt(e){return e=e.replace(/vh/g,""),+e*at.value/100}function mn(e){if(typeof e=="number")return e;if(be){if(e.includes("rem"))return ut(e);if(e.includes("vw"))return ct(e);if(e.includes("vh"))return lt(e)}return parseFloat(e)}const dt=/-(\w)/g,xe=e=>e.replace(dt,(t,n)=>n.toUpperCase());function pn(e,t=2){let n=e+"";for(;n.length<t;)n="0"+n;return n}const gn=(e,t,n)=>Math.min(Math.max(e,t),n);function se(e,t,n){const o=e.indexOf(t);return o===-1?e:t==="-"&&o!==0?e.slice(0,o):e.slice(0,o+1)+e.slice(o).replace(n,"")}function yn(e,t=!0,n=!0){t?e=se(e,".",/\./g):e=e.split(".")[0],n?e=se(e,"-",/-/g):e=e.replace(/-/,"");const o=t?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(o,"")}const{hasOwnProperty:ft}=Object.prototype;function vt(e,t,n){const o=t[n];B(o)&&(!ft.call(e,n)||!Z(o)?e[n]=o:e[n]=De(Object(e[n]),o))}function De(e,t){return Object.keys(t).forEach(n=>{vt(e,t,n)}),e}var mt={name:"\u59D3\u540D",tel:"\u7535\u8BDD",save:"\u4FDD\u5B58",clear:"\u6E05\u7A7A",cancel:"\u53D6\u6D88",confirm:"\u786E\u8BA4",delete:"\u5220\u9664",loading:"\u52A0\u8F7D\u4E2D...",noCoupon:"\u6682\u65E0\u4F18\u60E0\u5238",nameEmpty:"\u8BF7\u586B\u5199\u59D3\u540D",addContact:"\u6DFB\u52A0\u8054\u7CFB\u4EBA",telInvalid:"\u8BF7\u586B\u5199\u6B63\u786E\u7684\u7535\u8BDD",vanCalendar:{end:"\u7ED3\u675F",start:"\u5F00\u59CB",title:"\u65E5\u671F\u9009\u62E9",weekdays:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"],monthTitle:(e,t)=>`${e}\u5E74${t}\u6708`,rangePrompt:e=>`\u6700\u591A\u9009\u62E9 ${e} \u5929`},vanCascader:{select:"\u8BF7\u9009\u62E9"},vanPagination:{prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875"},vanPullRefresh:{pulling:"\u4E0B\u62C9\u5373\u53EF\u5237\u65B0...",loosing:"\u91CA\u653E\u5373\u53EF\u5237\u65B0..."},vanSubmitBar:{label:"\u5408\u8BA1:"},vanCoupon:{unlimited:"\u65E0\u95E8\u69DB",discount:e=>`${e}\u6298`,condition:e=>`\u6EE1${e}\u5143\u53EF\u7528`},vanCouponCell:{title:"\u4F18\u60E0\u5238",count:e=>`${e}\u5F20\u53EF\u7528`},vanCouponList:{exchange:"\u5151\u6362",close:"\u4E0D\u4F7F\u7528",enable:"\u53EF\u7528",disabled:"\u4E0D\u53EF\u7528",placeholder:"\u8F93\u5165\u4F18\u60E0\u7801"},vanAddressEdit:{area:"\u5730\u533A",areaEmpty:"\u8BF7\u9009\u62E9\u5730\u533A",addressEmpty:"\u8BF7\u586B\u5199\u8BE6\u7EC6\u5730\u5740",addressDetail:"\u8BE6\u7EC6\u5730\u5740",defaultAddress:"\u8BBE\u4E3A\u9ED8\u8BA4\u6536\u8D27\u5730\u5740"},vanAddressList:{add:"\u65B0\u589E\u5730\u5740"}};const ae=f("zh-CN"),re=V({"zh-CN":mt}),pt={messages(){return re[ae.value]},use(e,t){ae.value=e,this.add({[e]:t})},add(e={}){De(re,e)}};var gt=pt;function yt(e){const t=xe(e)+".";return(n,...o)=>{const s=gt.messages(),a=Q(s,t+n)||Q(s,n);return K(a)?a(...o):a}}function U(e,t){return t?typeof t=="string"?` ${e}--${t}`:Array.isArray(t)?t.reduce((n,o)=>n+U(e,o),""):Object.keys(t).reduce((n,o)=>n+(t[o]?U(e,o):""),""):""}function ht(e){return(t,n)=>(t&&typeof t!="string"&&(n=t,t=""),t=t?`${e}__${t}`:e,`${t}${U(t,n)}`)}function I(e){const t=`van-${e}`;return[t,ht(t),yt(t)]}const S="van-hairline",hn=`${S}--top`,En=`${S}--left`,bn=`${S}--right`,wn=`${S}--bottom`,On=`${S}--surround`,Cn=`${S}--top-bottom`,Bn=`${S}-unset--top-bottom`,Et="van-haptics-feedback",Tn=Symbol("van-form"),Sn=500,ie=5;function bt(e,{args:t=[],done:n,canceled:o,error:s}){if(e){const a=e.apply(null,t);He(a)?a.then(i=>{i?n():o&&o()}).catch(s||Ve):a?n():o&&o()}else n()}function L(e){return e.install=t=>{const{name:n}=e;n&&(t.component(n,e),t.component(xe(`-${n}`),e))},e}const Ae=Symbol();function Pn(e){const t=$(Ae,null);t&&x(t,n=>{n&&e()})}function wt(e){const t=F();t&&G(t.proxy,e)}const[Ot,ue]=I("badge"),Ct={dot:Boolean,max:h,tag:P("div"),color:String,offset:Array,content:h,showZero:C,position:P("top-right")};var Bt=z({name:Ot,props:Ct,setup(e,{slots:t}){const n=()=>{if(t.content)return!0;const{content:r,showZero:u}=e;return B(r)&&r!==""&&(u||r!==0&&r!=="0")},o=()=>{const{dot:r,max:u,content:c}=e;if(!r&&n())return t.content?t.content():B(u)&&we(c)&&+c>+u?`${u}+`:c},s=r=>r.startsWith("-")?r.replace("-",""):`-${r}`,a=N(()=>{const r={background:e.color};if(e.offset){const[u,c]=e.offset,{position:d}=e,[l,v]=d.split("-");t.default?(typeof c=="number"?r[l]=y(l==="top"?c:-c):r[l]=l==="top"?y(c):s(c),typeof u=="number"?r[v]=y(v==="left"?u:-u):r[v]=v==="left"?y(u):s(u)):(r.marginTop=y(c),r.marginLeft=y(u))}return r}),i=()=>{if(n()||e.dot)return p("div",{class:ue([e.position,{dot:e.dot,fixed:!!t.default}]),style:a.value},[o()])};return()=>{if(t.default){const{tag:r}=e;return p(r,{class:ue("wrapper")},{default:()=>[t.default(),i()]})}return i()}}});const Tt=L(Bt);let St=2e3;const Pt=()=>++St,[xt,xn]=I("config-provider"),Dt=Symbol(xt),[At,ce]=I("icon"),It=e=>e==null?void 0:e.includes("/"),Rt={dot:Boolean,tag:P("i"),name:String,size:h,badge:h,color:String,badgeProps:Object,classPrefix:String};var _t=z({name:At,props:Rt,setup(e,{slots:t}){const n=$(Dt,null),o=N(()=>e.classPrefix||(n==null?void 0:n.iconPrefix)||ce());return()=>{const{tag:s,dot:a,name:i,size:r,badge:u,color:c}=e,d=It(i);return p(Tt,H({dot:a,tag:s,class:[o.value,d?"":`${o.value}-${i}`],style:{color:c,fontSize:y(r)},content:u},e.badgeProps),{default:()=>{var l;return[(l=t.default)==null?void 0:l.call(t),d&&p("img",{class:ce("image"),src:i},null)]}})}}});const kt=L(_t),Ie={show:Boolean,zIndex:h,overlay:C,duration:h,teleport:[String,Object],lockScroll:C,lazyRender:C,beforeClose:Function,overlayStyle:Object,overlayClass:Oe,transitionAppear:Boolean,closeOnClickOverlay:C},Dn=Object.keys(Ie);function $t(e,t){return e>t?"horizontal":t>e?"vertical":""}function Ft(){const e=f(0),t=f(0),n=f(0),o=f(0),s=f(0),a=f(0),i=f(""),r=f(!0),u=()=>i.value==="vertical",c=()=>i.value==="horizontal",d=()=>{n.value=0,o.value=0,s.value=0,a.value=0,i.value="",r.value=!0};return{move:g=>{const E=g.touches[0];n.value=(E.clientX<0?0:E.clientX)-e.value,o.value=E.clientY-t.value,s.value=Math.abs(n.value),a.value=Math.abs(o.value);const O=10;(!i.value||s.value<O&&a.value<O)&&(i.value=$t(s.value,a.value)),r.value&&(s.value>ie||a.value>ie)&&(r.value=!1)},start:g=>{d(),e.value=g.touches[0].clientX,t.value=g.touches[0].clientY},reset:d,startX:e,startY:t,deltaX:n,deltaY:o,offsetX:s,offsetY:a,direction:i,isVertical:u,isHorizontal:c,isTap:r}}let D=0;const le="van-overflow-hidden";function Nt(e,t){const n=Ft(),o="01",s="10",a=d=>{n.move(d);const l=n.deltaY.value>0?s:o,v=Te(d.target,e.value),{scrollHeight:g,offsetHeight:E,scrollTop:O}=v;let b="11";O===0?b=E>=g?"00":"01":O+E>=g&&(b="10"),b!=="11"&&n.isVertical()&&!(parseInt(b,2)&parseInt(l,2))&&Pe(d,!0)},i=()=>{document.addEventListener("touchstart",n.start),document.addEventListener("touchmove",a,{passive:!1}),D||document.body.classList.add(le),D++},r=()=>{D&&(document.removeEventListener("touchstart",n.start),document.removeEventListener("touchmove",a),D--,D||document.body.classList.remove(le))},u=()=>t()&&i(),c=()=>t()&&r();Ce(u),X(c),Me(c),x(t,d=>{d?i():r()})}function Re(e){const t=f(!1);return x(e,n=>{n&&(t.value=n)},{immediate:!0}),n=>()=>t.value?n():null}const de=()=>{var e;const{scopeId:t}=((e=F())==null?void 0:e.vnode)||{};return t?{[t]:""}:null},[zt,Lt]=I("overlay"),Mt={show:Boolean,zIndex:h,duration:h,className:Oe,lockScroll:C,lazyRender:C,customStyle:Object};var Yt=z({name:zt,props:Mt,setup(e,{slots:t}){const n=f(),o=Re(()=>e.show||!e.lazyRender),s=i=>{e.lockScroll&&Pe(i,!0)},a=o(()=>{var i;const r=G(rt(e.zIndex),e.customStyle);return B(e.duration)&&(r.animationDuration=`${e.duration}s`),he(p("div",{ref:n,style:r,class:[Lt(),e.className]},[(i=t.default)==null?void 0:i.call(t)]),[[Ee,e.show]])});return q("touchmove",s,{target:n}),()=>p(ye,{name:"van-fade",appear:!0},{default:a})}});const jt=L(Yt),Vt=G({},Ie,{round:Boolean,position:P("center"),closeIcon:P("cross"),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:P("top-right"),safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[Ht,fe]=I("popup");var Kt=z({name:Ht,inheritAttrs:!1,props:Vt,emits:["open","close","opened","closed","keydown","update:show","clickOverlay","clickCloseIcon"],setup(e,{emit:t,attrs:n,slots:o}){let s,a;const i=f(),r=f(),u=Re(()=>e.show||!e.lazyRender),c=N(()=>{const m={zIndex:i.value};if(B(e.duration)){const w=e.position==="center"?"animationDuration":"transitionDuration";m[w]=`${e.duration}s`}return m}),d=()=>{s||(s=!0,i.value=e.zIndex!==void 0?+e.zIndex:Pt(),t("open"))},l=()=>{s&&bt(e.beforeClose,{done(){s=!1,t("close"),t("update:show",!1)}})},v=m=>{t("clickOverlay",m),e.closeOnClickOverlay&&l()},g=()=>{if(e.overlay)return p(jt,H({show:e.show,class:e.overlayClass,zIndex:i.value,duration:e.duration,customStyle:e.overlayStyle,role:e.closeOnClickOverlay?"button":void 0,tabindex:e.closeOnClickOverlay?0:void 0},de(),{onClick:v}),{default:o["overlay-content"]})},E=m=>{t("clickCloseIcon",m),l()},O=()=>{if(e.closeable)return p(kt,{role:"button",tabindex:0,name:e.closeIcon,class:[fe("close-icon",e.closeIconPosition),Et],classPrefix:e.iconPrefix,onClick:E},null)};let b;const _e=()=>{b&&clearTimeout(b),b=setTimeout(()=>{t("opened")})},ke=()=>t("closed"),$e=m=>t("keydown",m),Fe=u(()=>{var m;const{round:w,position:R,safeAreaInsetTop:M,safeAreaInsetBottom:Ne}=e;return he(p("div",H({ref:r,style:c.value,role:"dialog",tabindex:0,class:[fe({round:w,[R]:R}),{"van-safe-area-top":M,"van-safe-area-bottom":Ne}],onKeydown:$e},n,de()),[(m=o.default)==null?void 0:m.call(o),O()]),[[Ee,e.show]])}),J=()=>{const{position:m,transition:w,transitionAppear:R}=e,M=m==="center"?"van-fade":`van-popup-slide-${m}`;return p(ye,{name:w||M,appear:R,onAfterEnter:_e,onAfterLeave:ke},{default:Fe})};return x(()=>e.show,m=>{m&&!s&&(d(),n.tabindex===0&&me(()=>{var w;(w=r.value)==null||w.focus()})),!m&&s&&(s=!1,t("close"))}),wt({popupRef:r}),Nt(r,()=>e.show&&e.lockScroll),q("popstate",()=>{e.closeOnPopstate&&(l(),a=!1)}),W(()=>{e.show&&d()}),pe(()=>{a&&(t("update:show",!0),a=!1)}),X(()=>{e.show&&e.teleport&&(l(),a=!0)}),ge(Ae,()=>e.show),()=>e.teleport?p(Ye,{to:e.teleport},{default:()=>[g(),J()]}):p(je,null,[g(),J()])}});const An=L(Kt);export{bn as $,en as A,On as B,hn as C,on as D,S as E,Tn as F,Tt as G,Et as H,kt as I,Se as J,tt as K,He as L,K as M,Qe as N,q as O,An as P,Zt as Q,yn as R,dn as S,Ft as T,un as U,nn as V,fn as W,gn as X,qt as Y,Jt as Z,an as _,Z as a,Ie as a0,Dn as a1,Ve as a2,En as a3,bt as a4,pn as a5,Wt as a6,Gt as a7,rn as a8,Re as a9,ee as aa,et as ab,ie as ac,Sn as ad,tn as ae,oe as af,Ce as ag,mn as ah,ln as ai,Bn as aj,Qt as b,I as c,Oe as d,G as e,B as f,vn as g,y as h,be as i,Pe as j,sn as k,de as l,P as m,h as n,Cn as o,Xt as p,cn as q,Pn as r,st as s,C as t,wt as u,at as v,L as w,We as x,rt as y,wn as z};
|