1 |
- import{i as N,j as g,s as z,e as Y,r as c,x as C,b as B,n as it,p as ut,g as lt,a0 as ct,w as X,q as dt,a as y,aG as ft,d as pt,f as P,aH as vt}from"./index-b9299550.js";function ht(){}const H=Object.assign,O=typeof window<"u",w=t=>t!==null&&typeof t=="object",h=t=>t!=null,T=t=>typeof t=="function",mt=t=>Object.prototype.toString.call(t)==="[object Date]"&&!Number.isNaN(t.getTime()),M=t=>typeof t=="number"||/^\d+(\.\d+)?$/.test(t);function D(t,e){const n=e.split(".");let o=t;return n.forEach(s=>{var a;o=w(o)&&(a=o[s])!=null?a:""}),o}function gt(t,e,n){return e.reduce((o,s)=>(n&&t[s]===void 0||(o[s]=t[s]),o),{})}const yt=null,b=[Number,String],F={type:Boolean,default:!0},wt=t=>({type:t,required:!0}),bt=()=>({type:Array,default:()=>[]}),xt=t=>({type:Number,default:t}),$t=t=>({type:b,default:t}),k=t=>({type:String,default:t});var m=typeof window<"u";function A(t){return m?requestAnimationFrame(t):-1}function Ct(t){m&&cancelAnimationFrame(t)}function Ot(t){A(()=>A(t))}var q=(t,e)=>({top:0,left:0,right:t,bottom:e,width:t,height:e}),I=t=>{const e=y(t);if(e===window){const n=e.innerWidth,o=e.innerHeight;return q(n,o)}return e!=null&&e.getBoundingClientRect?e.getBoundingClientRect():q(0,0)};function Tt(t=!1){const e=c(t);return[e,(n=!e.value)=>{e.value=n}]}function kt(t){const e=N(t,null);if(e){const n=g(),{link:o,unlink:s,internalChildren:a}=e;return o(n),z(()=>s(n)),{parent:e,index:Y(()=>a.indexOf(n))}}return{parent:null,index:c(-1)}}var x,E,R=(t,e)=>{const n=t.indexOf(e);return n===-1?t.findIndex(o=>e.key!==void 0&&e.key!==null&&o.type===e.type&&o.key===e.key):n};function At(t,e,n){const o=function(a){const r=[],i=l=>{Array.isArray(l)&&l.forEach(u=>{var p;ft(u)&&(r.push(u),(p=u.component)!=null&&p.subTree&&(r.push(u.component.subTree),i(u.component.subTree.children)),u.children&&i(u.children))})};return i(a),r}(t.subTree.children);n.sort((a,r)=>R(o,a.vnode)-R(o,r.vnode));const s=n.map(a=>a.proxy);e.sort((a,r)=>s.indexOf(a)-s.indexOf(r))}function Et(t){const e=C([]),n=C([]),o=g();return{children:e,linkChildren:s=>{dt(t,Object.assign({link:a=>{a.proxy&&(n.push(a),e.push(a.proxy),At(o,e,n))},unlink:a=>{const r=n.indexOf(a);e.splice(r,1),n.splice(r,1)},children:e,internalChildren:n},s))}}}function W(t){let e;B(()=>{t(),it(()=>{e=!0})}),ut(()=>{e&&t()})}function St(t,e,n={}){if(!m)return;const{target:o=window,passive:s=!1,capture:a=!1}=n;let r,i=!1;const l=f=>{if(i)return;const d=y(f);d&&!r&&(d.addEventListener(t,e,{capture:a,passive:s}),r=!0)},u=f=>{if(i)return;const d=y(f);d&&r&&(d.removeEventListener(t,e,a),r=!1)};let p;return z(()=>u(o)),lt(()=>u(o)),W(()=>l(o)),ct(o)&&(p=X(o,(f,d)=>{u(d),l(f)})),()=>{p==null||p(),u(o),i=!0}}var $,jt=/scroll|auto|overlay/i,Z=m?window:void 0;function Lt(t){return t.tagName!=="HTML"&&t.tagName!=="BODY"&&t.nodeType===1}function _(t,e=Z){let n=t;for(;n&&n!==e&&Lt(n);){const{overflowY:o}=window.getComputedStyle(n);if(jt.test(o))return n;n=n.parentNode}return e}function Nt(t,e=Z){const n=c();return B(()=>{t.value&&(n.value=_(t.value,e))}),n}function zt(){if(!$&&($=c("visible"),m)){const t=()=>{$.value=document.hidden?"hidden":"visible"};t(),window.addEventListener("visibilitychange",t)}return $}function G(t){const e="scrollTop"in t?t.scrollTop:t.pageYOffset;return Math.max(e,0)}function S(t,e){"scrollTop"in t?t.scrollTop=e:t.scrollTo(t.scrollX,e)}function Yt(t){S(window,t),S(document.body,t)}function Bt(t,e){if(t===window)return 0;const n=e?G(e):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;return I(t).top+n}O&&/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());function Xt(t,e){(typeof t.cancelable!="boolean"||t.cancelable)&&t.preventDefault(),e&&(n=>{n.stopPropagation()})(t)}function Pt(t){const e=y(t);if(!e)return!1;const n=window.getComputedStyle(e),o=n.display==="none",s=e.offsetParent===null&&n.position!=="fixed";return o||s}const{width:U,height:V}=function(){if(!x&&(x=c(0),E=c(0),m)){const t=()=>{x.value=window.innerWidth,E.value=window.innerHeight};t(),window.addEventListener("resize",t,{passive:!0}),window.addEventListener("orientationchange",t,{passive:!0})}return{width:x,height:E}}();function v(t){if(h(t))return M(t)?`${t}px`:String(t)}function Ht(t){if(h(t)){if(Array.isArray(t))return{width:v(t[0]),height:v(t[1])};const e=v(t);return{width:e,height:e}}}function Mt(t){const e={};return t!==void 0&&(e.zIndex=+t),e}let j;function Dt(t){return+(t=t.replace(/rem/g,""))*function(){if(!j){const e=document.documentElement,n=e.style.fontSize||window.getComputedStyle(e).fontSize;j=parseFloat(n)}return j}()}function Ft(t){if(typeof t=="number")return t;if(O){if(t.includes("rem"))return Dt(t);if(t.includes("vw"))return function(e){return+(e=e.replace(/vw/g,""))*U.value/100}(t);if(t.includes("vh"))return function(e){return+(e=e.replace(/vh/g,""))*V.value/100}(t)}return parseFloat(t)}const qt=/-(\w)/g,J=t=>t.replace(qt,(e,n)=>n.toUpperCase()),It=(t,e,n)=>Math.min(Math.max(t,e),n),{hasOwnProperty:Rt}=Object.prototype;function K(t,e){return Object.keys(e).forEach(n=>{(function(o,s,a){const r=s[a];h(r)&&(Rt.call(o,a)&&w(r)?o[a]=K(Object(o[a]),r):o[a]=r)})(t,e,n)}),t}const Q=c("zh-CN"),tt=C({"zh-CN":{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:(t,e)=>`${t}\u5E74${e}\u6708`,rangePrompt:t=>`\u6700\u591A\u9009\u62E9 ${t} \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:t=>`${t}\u6298`,condition:t=>`\u6EE1${t}\u5143\u53EF\u7528`},vanCouponCell:{title:"\u4F18\u60E0\u5238",count:t=>`${t}\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"}}});var Wt={messages:()=>tt[Q.value],use(t,e){Q.value=t,this.add({[t]:e})},add(t={}){K(tt,t)}};function Zt(t){const e=J(t)+".";return(n,...o)=>{const s=Wt.messages(),a=D(s,e+n)||D(s,n);return T(a)?a(...o):a}}function L(t,e){return e?typeof e=="string"?` ${t}--${e}`:Array.isArray(e)?e.reduce((n,o)=>n+L(t,o),""):Object.keys(e).reduce((n,o)=>n+(e[o]?L(t,o):""),""):""}function _t(t){return(e,n)=>(e&&typeof e!="string"&&(n=e,e=""),`${e=e?`${t}__${e}`:t}${L(e,n)}`)}function et(t){const e=`van-${t}`;return[e,_t(e),Zt(e)]}const nt="van-hairline",Gt=`${nt}--surround`,Ut=`${nt}--top-bottom`,Vt="van-haptics-feedback";function Jt(t,{args:e=[],done:n,canceled:o,error:s}){if(t){const r=t.apply(null,e);w(a=r)&&T(a.then)&&T(a.catch)?r.then(i=>{i?n():o&&o()}).catch(s||ht):r?n():o&&o()}else n();var a}function ot(t){return t.install=e=>{const{name:n}=t;n&&(e.component(n,t),e.component(J(`-${n}`),t))},t}const at=Symbol();function Kt(t){const e=N(at,null);e&&X(e,n=>{n&&t()})}function Qt(t){const e=g();e&&H(e.proxy,t)}const te={to:[String,Object],url:String,replace:Boolean};function rt({to:t,url:e,replace:n,$router:o}){t&&o?o[n?"replace":"push"](t):e&&(n?location.replace(e):location.href=e)}function ee(){const t=g().proxy;return()=>rt(t)}const[ne,st]=et("badge"),oe=ot(pt({name:ne,props:{dot:Boolean,max:b,tag:k("div"),color:String,offset:Array,content:b,showZero:F,position:k("top-right")},setup(t,{slots:e}){const n=()=>{if(e.content)return!0;const{content:i,showZero:l}=t;return h(i)&&i!==""&&(l||i!==0&&i!=="0")},o=()=>{const{dot:i,max:l,content:u}=t;if(!i&&n())return e.content?e.content():h(l)&&M(u)&&+u>+l?`${l}+`:u},s=i=>i.startsWith("-")?i.replace("-",""):`-${i}`,a=Y(()=>{const i={background:t.color};if(t.offset){const[l,u]=t.offset,{position:p}=t,[f,d]=p.split("-");e.default?(i[f]=typeof u=="number"?v(f==="top"?u:-u):f==="top"?v(u):s(u),i[d]=typeof l=="number"?v(d==="left"?l:-l):d==="left"?v(l):s(l)):(i.marginTop=v(u),i.marginLeft=v(l))}return i}),r=()=>{if(n()||t.dot)return P("div",{class:st([t.position,{dot:t.dot,fixed:!!e.default}]),style:a.value},[o()])};return()=>{if(e.default){const{tag:i}=t;return P(i,{class:st("wrapper")},{default:()=>[e.default(),r()]})}return r()}}}));function ae(){const t=c(0),e=c(0),n=c(0),o=c(0),s=c(0),a=c(0),r=c(""),i=c(!0),l=()=>{n.value=0,o.value=0,s.value=0,a.value=0,r.value="",i.value=!0};return{move:u=>{const p=u.touches[0];n.value=(p.clientX<0?0:p.clientX)-t.value,o.value=p.clientY-e.value,s.value=Math.abs(n.value),a.value=Math.abs(o.value);var f,d;(!r.value||s.value<10&&a.value<10)&&(r.value=(f=s.value,d=a.value,f>d?"horizontal":d>f?"vertical":"")),i.value&&(s.value>5||a.value>5)&&(i.value=!1)},start:u=>{l(),t.value=u.touches[0].clientX,e.value=u.touches[0].clientY},reset:l,startX:t,startY:e,deltaX:n,deltaY:o,offsetX:s,offsetY:a,direction:r,isVertical:()=>r.value==="vertical",isHorizontal:()=>r.value==="horizontal",isTap:i}}function re(){const t=c([]),e=[];return vt(()=>{t.value=[]}),[t,n=>(e[n]||(e[n]=o=>{t.value[n]=o}),e[n])]}export{kt as $,bt as A,oe as B,gt as C,xt as D,O as E,w as F,wt as G,Vt as H,Tt as I,S as J,mt as K,re as L,A as M,G as N,Ct as O,at as P,Nt as Q,Ft as R,Pt as S,Et as T,zt as U,Ot as V,It as W,Ut as X,Yt as Y,Bt as Z,rt as _,V as a,v as b,et as c,ot as d,H as e,ee as f,Ht as g,Gt as h,yt as i,ae as j,W as k,_ as l,k as m,b as n,Kt as o,Xt as p,St as q,te as r,Mt as s,F as t,I as u,h as v,U as w,Qt as x,Jt as y,$t as z};
|