@zhangcf233/pay 1.0.2 → 1.0.4

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/pay.es.js CHANGED
@@ -1,3 +1,4 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@charset "UTF-8";.pay-error-container[data-v-0817c014]{position:relative}.pay-error-container .loading[data-v-0817c014]{width:100%;height:100%;position:absolute;background:#fff;z-index:1;transition:all .3s;justify-content:center;align-items:center}.pay-error-container .message[data-v-0817c014]{font-size:.1rem}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-75290345]{font-family:WeChat-Bold}.root[data-v-75290345]{text-align:center}.cell[data-v-be539772]{display:flex;align-items:center;justify-content:space-between;height:.3rem}.cell .name[data-v-be539772]{width:30vw;color:gray;font-size:.14rem;display:flex;align-items:center;justify-content:end}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-ea027830]{font-family:WeChat-Bold}.custom-price .input[data-v-ea027830]{font-size:.2rem}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-68d98a5c]{font-family:WeChat-Bold}.price-root[data-v-68d98a5c]{position:relative;text-align:center;background:#f3f3f3;border-radius:.08rem;padding:.1rem 0;display:flex;flex-direction:column;height:.6rem;box-sizing:border-box;justify-content:space-between;align-items:center}.price-root .gift[data-v-68d98a5c]{position:absolute;top:-.1rem;right:-.05rem;background:linear-gradient(248.45deg,#fa1e1e,#ff7752 99.44%);padding:0 .05rem;border-radius:.1rem .1rem .1rem 0;font-size:.1rem;border-width:.02rem;border-color:#fff;border-style:solid;box-sizing:border-box;color:#fff}.price-root .token-count[data-v-68d98a5c]{display:flex;justify-content:center;align-items:center;font-size:.2rem}.price-root .token-count img[data-v-68d98a5c]{width:.16rem;height:.16rem;margin-right:.02rem}.price-root .price[data-v-68d98a5c]{font-size:.14rem}.only-price[data-v-68d98a5c]{align-items:center;justify-content:center}.only-price .price[data-v-68d98a5c]{font-size:.2rem}.content[data-v-76333b1f]{width:100%;margin:.2rem 0;display:grid;grid-template-columns:repeat(3,1fr);gap:.1rem;box-sizing:border-box;font-weight:500}.loading[data-v-76333b1f]{display:flex;justify-content:center;align-items:center}.select[data-v-76333b1f]{color:#fff}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-20ed35e0]{font-family:WeChat-Bold}.pay-popup[data-v-20ed35e0]{display:flex;flex-direction:column;width:100vw;box-sizing:border-box;overflow:hidden;padding:0 .15rem .2rem;transition:all .3s}.title[data-v-20ed35e0]{text-align:center;margin:.16rem 0}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
1
2
  var Hl = Object.defineProperty;
2
3
  var jl = (e, t, i) => t in e ? Hl(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
4
  var B = (e, t, i) => (jl(e, typeof t != "symbol" ? t + "" : t, i), i);
package/dist/pay.umd.js CHANGED
@@ -1,3 +1,4 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@charset "UTF-8";.pay-error-container[data-v-0817c014]{position:relative}.pay-error-container .loading[data-v-0817c014]{width:100%;height:100%;position:absolute;background:#fff;z-index:1;transition:all .3s;justify-content:center;align-items:center}.pay-error-container .message[data-v-0817c014]{font-size:.1rem}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-75290345]{font-family:WeChat-Bold}.root[data-v-75290345]{text-align:center}.cell[data-v-be539772]{display:flex;align-items:center;justify-content:space-between;height:.3rem}.cell .name[data-v-be539772]{width:30vw;color:gray;font-size:.14rem;display:flex;align-items:center;justify-content:end}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-ea027830]{font-family:WeChat-Bold}.custom-price .input[data-v-ea027830]{font-size:.2rem}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-68d98a5c]{font-family:WeChat-Bold}.price-root[data-v-68d98a5c]{position:relative;text-align:center;background:#f3f3f3;border-radius:.08rem;padding:.1rem 0;display:flex;flex-direction:column;height:.6rem;box-sizing:border-box;justify-content:space-between;align-items:center}.price-root .gift[data-v-68d98a5c]{position:absolute;top:-.1rem;right:-.05rem;background:linear-gradient(248.45deg,#fa1e1e,#ff7752 99.44%);padding:0 .05rem;border-radius:.1rem .1rem .1rem 0;font-size:.1rem;border-width:.02rem;border-color:#fff;border-style:solid;box-sizing:border-box;color:#fff}.price-root .token-count[data-v-68d98a5c]{display:flex;justify-content:center;align-items:center;font-size:.2rem}.price-root .token-count img[data-v-68d98a5c]{width:.16rem;height:.16rem;margin-right:.02rem}.price-root .price[data-v-68d98a5c]{font-size:.14rem}.only-price[data-v-68d98a5c]{align-items:center;justify-content:center}.only-price .price[data-v-68d98a5c]{font-size:.2rem}.content[data-v-76333b1f]{width:100%;margin:.2rem 0;display:grid;grid-template-columns:repeat(3,1fr);gap:.1rem;box-sizing:border-box;font-weight:500}.loading[data-v-76333b1f]{display:flex;justify-content:center;align-items:center}.select[data-v-76333b1f]{color:#fff}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-20ed35e0]{font-family:WeChat-Bold}.pay-popup[data-v-20ed35e0]{display:flex;flex-direction:column;width:100vw;box-sizing:border-box;overflow:hidden;padding:0 .15rem .2rem;transition:all .3s}.title[data-v-20ed35e0]{text-align:center;margin:.16rem 0}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
1
2
  var eg=Object.defineProperty;var ig=(J,$,m)=>$ in J?eg(J,$,{enumerable:!0,configurable:!0,writable:!0,value:m}):J[$]=m;var E=(J,$,m)=>(ig(J,typeof $!="symbol"?$+"":$,m),m);(function(J,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],$):(J=typeof globalThis<"u"?globalThis:J||self,$(J.PayPlugin={},J.Vue))})(this,function(J,$){var Fl,Hl;"use strict";function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},m.apply(null,arguments)}function jl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mi(){return Mi=Object.assign?Object.assign.bind():function(e){for(var t,i=1;i<arguments.length;i++)for(var n in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},Mi.apply(this,arguments)}var Wl=["attrs","props","domProps"],Ul=["class","style","directives"],ql=["on","nativeOn"],Kl=function(e){return e.reduce(function(t,i){for(var n in i)if(!t[n])t[n]=i[n];else if(Wl.indexOf(n)!==-1)t[n]=Mi({},t[n],i[n]);else if(Ul.indexOf(n)!==-1){var r=t[n]instanceof Array?t[n]:[t[n]],a=i[n]instanceof Array?i[n]:[i[n]];t[n]=[].concat(r,a)}else if(ql.indexOf(n)!==-1)for(var s in i[n])if(t[n][s]){var o=t[n][s]instanceof Array?t[n][s]:[t[n][s]],l=i[n][s]instanceof Array?i[n][s]:[i[n][s]];t[n][s]=[].concat(o,l)}else t[n][s]=i[n][s];else if(n==="hook")for(var c in i[n])t[n][c]=t[n][c]?Yl(t[n][c],i[n][c]):i[n][c];else t[n]=i[n];return t},{})},Yl=function(e,t){return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}},Xl=Kl;const T=jl(Xl);function Li(e,t){return t?typeof t=="string"?" "+e+"--"+t:Array.isArray(t)?t.reduce(function(i,n){return i+Li(e,n)},""):Object.keys(t).reduce(function(i,n){return i+(t[n]?Li(e,n):"")},""):""}function Gl(e){return function(t,i){return t&&typeof t!="string"&&(i=t,t=""),t=t?e+"__"+t:e,""+t+Li(t,i)}}var Zl=Object.prototype.hasOwnProperty;function Jl(e,t,i){var n=t[i];_(n)&&(!Zl.call(e,i)||!ct(n)?e[i]=n:e[i]=Cr(Object(e[i]),t[i]))}function Cr(e,t){return Object.keys(t).forEach(function(i){Jl(e,t,i)}),e}const Ql={name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",complete:"完成",loading:"加载中...",telEmpty:"请填写电话",nameEmpty:"请填写姓名",nameInvalid:"请输入正确的姓名",confirmDelete:"确定要删除吗",telInvalid:"请输入正确的手机号",vanCalendar:{end:"结束",start:"开始",title:"日期选择",confirm:"确定",startEnd:"开始/结束",weekdays:["日","一","二","三","四","五","六"],monthTitle:function(t,i){return t+"年"+i+"月"},rangePrompt:function(t){return"选择天数不能超过 "+t+" 天"}},vanCascader:{select:"请选择"},vanContactCard:{addText:"添加联系人"},vanContactList:{addText:"新建联系人"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无使用门槛",discount:function(t){return t+"折"},condition:function(t){return"满"+t+"元可用"}},vanCouponCell:{title:"优惠券",tips:"暂无可用",count:function(t){return t+"张可用"}},vanCouponList:{empty:"暂无优惠券",exchange:"兑换",close:"不使用优惠券",enable:"可用",disabled:"不可用",placeholder:"请输入优惠码"},vanAddressEdit:{area:"地区",postal:"邮政编码",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",postalEmpty:"邮政编码格式不正确",defaultAddress:"设为默认收货地址",telPlaceholder:"收货人手机号",namePlaceholder:"收货人姓名",areaPlaceholder:"选择省 / 市 / 区"},vanAddressEditDetail:{label:"详细地址",placeholder:"街道门牌、楼层房间号等信息"},vanAddressList:{add:"新增地址"}};var ee=$.prototype,$r=$.util.defineReactive;$r(ee,"$vantLang","zh-CN"),$r(ee,"$vantMessages",{"zh-CN":Ql});const Ai={messages:function(){return ee.$vantMessages[ee.$vantLang]},use:function(t,i){var n;ee.$vantLang=t,this.add((n={},n[t]=i,n))},add:function(t){t===void 0&&(t={}),Cr(ee.$vantMessages,t)}};var tc=/-(\w)/g;function wr(e){return e.replace(tc,function(t,i){return i.toUpperCase()})}function N(e,t){t===void 0&&(t=2);for(var i=e+"";i.length<t;)i="0"+i;return i}var ec={methods:{slots:function(t,i){t===void 0&&(t="default");var n=this.$slots,r=this.$scopedSlots,a=r[t];return a?a(i):n[t]}}};function ic(e){var t=this.name;e.component(t,this),e.component(wr("-"+t),this)}function nc(e){var t=e.scopedSlots||e.data.scopedSlots||{},i=e.slots();return Object.keys(i).forEach(function(n){t[n]||(t[n]=function(){return i[n]})}),t}function rc(e){return{functional:!0,props:e.props,model:e.model,render:function(i,n){return e(i,n.props,nc(n),n)}}}function ac(e){return function(t){return ie(t)&&(t=rc(t)),t.functional||(t.mixins=t.mixins||[],t.mixins.push(ec)),t.name=e,t.install=ic,t}}function sc(e){var t=wr(e)+".";return function(i){for(var n=Ai.messages(),r=xr(n,t+i)||xr(n,i),a=arguments.length,s=new Array(a>1?a-1:0),o=1;o<a;o++)s[o-1]=arguments[o];return ie(r)?r.apply(void 0,s):r}}function p(e){return e="van-"+e,[ac(e),Gl(e),sc(e)]}function Ri(e){return/^\d+(\.\d+)?$/.test(e)}function Vi(e){return Number.isNaN?Number.isNaN(e):e!==e}function P(e){if(_(e))return e=String(e),Ri(e)?e+"px":e}var zi;function oc(){if(!zi){var e=document.documentElement,t=e.style.fontSize||window.getComputedStyle(e).fontSize;zi=parseFloat(t)}return zi}function lc(e){return e=e.replace(/rem/g,""),+e*oc()}function cc(e){return e=e.replace(/vw/g,""),+e*window.innerWidth/100}function uc(e){return e=e.replace(/vh/g,""),+e*window.innerHeight/100}function Fi(e){if(typeof e=="number")return e;if(Ae){if(e.indexOf("rem")!==-1)return lc(e);if(e.indexOf("vw")!==-1)return cc(e);if(e.indexOf("vh")!==-1)return uc(e)}return parseFloat(e)}var Ae=typeof window<"u",K=$.prototype.$isServer;function pe(){}function _(e){return e!=null}function ie(e){return typeof e=="function"}function ct(e){return e!==null&&typeof e=="object"}function Re(e){return ct(e)&&ie(e.then)&&ie(e.catch)}function xr(e,t){var i=t.split("."),n=e;return i.forEach(function(r){var a;n=ct(n)&&(a=n[r])!=null?a:""}),n}function Tr(e){return e==null||typeof e!="object"?!0:Object.keys(e).length===0}var hc=["ref","key","style","class","attrs","refInFor","nativeOn","directives","staticClass","staticStyle"],dc={nativeOn:"on"};function B(e,t){var i=hc.reduce(function(n,r){return e.data[r]&&(n[dc[r]||r]=e.data[r]),n},{});return t&&(i.on=i.on||{},m(i.on,e.data.on)),i}function I(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];var a=e.listeners[t];a&&(Array.isArray(a)?a.forEach(function(s){s.apply(void 0,n)}):a.apply(void 0,n))}function _r(e,t){var i=new $({el:document.createElement("div"),props:e.props,render:function(r){return r(e,m({props:this.$props},t))}});return document.body.appendChild(i.$el),i}var Y={zIndex:2e3,lockCount:0,stack:[],find:function(t){return this.stack.filter(function(i){return i.vm===t})[0]},remove:function(t){var i=this.find(t);if(i){i.vm=null,i.overlay=null;var n=this.stack.indexOf(i);this.stack.splice(n,1)}}},Ir=!1;if(!K)try{var Or={};Object.defineProperty(Or,"passive",{get:function(){Ir=!0}}),window.addEventListener("test-passive",null,Or)}catch{}function it(e,t,i,n){n===void 0&&(n=!1),K||e.addEventListener(t,i,Ir?{capture:!1,passive:n}:!1)}function Nt(e,t,i){K||e.removeEventListener(t,i)}function Pr(e){e.stopPropagation()}function z(e,t){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),t&&Pr(e)}var Br=p("overlay"),fc=Br[0],pc=Br[1];function vc(e){z(e,!0)}function Er(e,t,i,n){var r=m({zIndex:t.zIndex},t.customStyle);return _(t.duration)&&(r.animationDuration=t.duration+"s"),e("transition",{attrs:{name:"van-fade"}},[e("div",T([{directives:[{name:"show",value:t.show}],style:r,class:[pc(),t.className],on:{touchmove:t.lockScroll?vc:pe}},B(n,!0)]),[i.default==null?void 0:i.default()])])}Er.props={show:Boolean,zIndex:[Number,String],duration:[Number,String],className:null,customStyle:Object,lockScroll:{type:Boolean,default:!0}};const Dr=fc(Er);function Hi(e){var t=e.parentNode;t&&t.removeChild(e)}var mc={className:"",customStyle:{}};function gc(e){return _r(Dr,{on:{click:function(){e.$emit("click-overlay"),e.closeOnClickOverlay&&(e.onClickOverlay?e.onClickOverlay():e.close())}}})}function Nr(e){var t=Y.find(e);if(t){var i=e.$el,n=t.config,r=t.overlay;i&&i.parentNode&&i.parentNode.insertBefore(r.$el,i),m(r,mc,n,{show:!0})}}function yc(e,t){var i=Y.find(e);if(i)i.config=t;else{var n=gc(e);Y.stack.push({vm:e,config:t,overlay:n})}Nr(e)}function Mr(e){var t=Y.find(e);t&&(t.overlay.show=!1)}function bc(e){var t=Y.find(e);t&&(Hi(t.overlay.$el),Y.remove(e))}function ji(e){return e===window}var Sc=/scroll|auto|overlay/i;function Ut(e,t){t===void 0&&(t=window);for(var i=e;i&&i.tagName!=="HTML"&&i.tagName!=="BODY"&&i.nodeType===1&&i!==t;){var n=window.getComputedStyle(i),r=n.overflowY;if(Sc.test(r))return i;i=i.parentNode}return t}function qt(e){var t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}function Ve(e,t){"scrollTop"in e?e.scrollTop=t:e.scrollTo(e.scrollX,t)}function ve(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function ze(e){Ve(window,e),Ve(document.body,e)}function Wi(e,t){if(ji(e))return 0;var i=t?qt(t):ve();return e.getBoundingClientRect().top+i}function kc(e){return ji(e)?e.innerHeight:e.getBoundingClientRect().height}function Cc(e){return ji(e)?0:e.getBoundingClientRect().top}function $c(e,t){return e>t?"horizontal":t>e?"vertical":""}var nt={data:function(){return{direction:""}},methods:{touchStart:function(t){this.resetTouchStatus(),this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY},touchMove:function(t){var i=t.touches[0];this.deltaX=i.clientX<0?0:i.clientX-this.startX,this.deltaY=i.clientY-this.startY,this.offsetX=Math.abs(this.deltaX),this.offsetY=Math.abs(this.deltaY);var n=10;(!this.direction||this.offsetX<n&&this.offsetY<n)&&(this.direction=$c(this.offsetX,this.offsetY))},resetTouchStatus:function(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0},bindTouchEvent:function(t){var i=this.onTouchStart,n=this.onTouchMove,r=this.onTouchEnd;it(t,"touchstart",i),it(t,"touchmove",n),r&&(it(t,"touchend",r),it(t,"touchcancel",r))}}};function wc(e){return typeof e=="string"?document.querySelector(e):e()}function Ui(e){var t=e===void 0?{}:e,i=t.ref,n=t.afterPortal;return{props:{getContainer:[String,Function]},watch:{getContainer:"portal"},mounted:function(){this.getContainer&&this.portal()},methods:{portal:function(){var a=this.getContainer,s=i?this.$refs[i]:this.$el,o;a?o=wc(a):this.$parent&&(o=this.$parent.$el),o&&o!==s.parentNode&&o.appendChild(s),n&&n.call(this)}}}}var xc=0;function ut(e){var t="binded_"+xc++;function i(){this[t]||(e.call(this,it,!0),this[t]=!0)}function n(){this[t]&&(e.call(this,Nt,!1),this[t]=!1)}return{mounted:i,activated:i,deactivated:n,beforeDestroy:n}}var Tc={mixins:[ut(function(e,t){this.handlePopstate(t&&this.closeOnPopstate)})],props:{closeOnPopstate:Boolean},data:function(){return{bindStatus:!1}},watch:{closeOnPopstate:function(t){this.handlePopstate(t)}},methods:{onPopstate:function(){this.close(),this.shouldReopen=!1},handlePopstate:function(t){if(!this.$isServer&&this.bindStatus!==t){this.bindStatus=t;var i=t?it:Nt;i(window,"popstate",this.onPopstate)}}}},Fe={transitionAppear:Boolean,value:Boolean,overlay:Boolean,overlayStyle:Object,overlayClass:String,closeOnClickOverlay:Boolean,zIndex:[Number,String],lockScroll:{type:Boolean,default:!0},lazyRender:{type:Boolean,default:!0}};function He(e){return e===void 0&&(e={}),{mixins:[nt,Tc,Ui({afterPortal:function(){this.overlay&&Nr()}})],provide:function(){return{vanPopup:this}},props:Fe,data:function(){return this.onReopenCallback=[],{inited:this.value}},computed:{shouldRender:function(){return this.inited||!this.lazyRender}},watch:{value:function(i){var n=i?"open":"close";this.inited=this.inited||this.value,this[n](),e.skipToggleEvent||this.$emit(n)},overlay:"renderOverlay"},mounted:function(){this.value&&this.open()},activated:function(){this.shouldReopen&&(this.$emit("input",!0),this.shouldReopen=!1)},beforeDestroy:function(){bc(this),this.opened&&this.removeLock(),this.getContainer&&Hi(this.$el)},deactivated:function(){this.value&&(this.close(),this.shouldReopen=!0)},methods:{open:function(){this.$isServer||this.opened||(this.zIndex!==void 0&&(Y.zIndex=this.zIndex),this.opened=!0,this.renderOverlay(),this.addLock(),this.onReopenCallback.forEach(function(i){i()}))},addLock:function(){this.lockScroll&&(it(document,"touchstart",this.touchStart),it(document,"touchmove",this.onTouchMove),Y.lockCount||document.body.classList.add("van-overflow-hidden"),Y.lockCount++)},removeLock:function(){this.lockScroll&&Y.lockCount&&(Y.lockCount--,Nt(document,"touchstart",this.touchStart),Nt(document,"touchmove",this.onTouchMove),Y.lockCount||document.body.classList.remove("van-overflow-hidden"))},close:function(){this.opened&&(Mr(this),this.opened=!1,this.removeLock(),this.$emit("input",!1))},onTouchMove:function(i){this.touchMove(i);var n=this.deltaY>0?"10":"01",r=Ut(i.target,this.$el),a=r.scrollHeight,s=r.offsetHeight,o=r.scrollTop,l="11";o===0?l=s>=a?"00":"01":o+s>=a&&(l="10"),l!=="11"&&this.direction==="vertical"&&!(parseInt(l,2)&parseInt(n,2))&&z(i,!0)},renderOverlay:function(){var i=this;this.$isServer||!this.value||this.$nextTick(function(){i.updateZIndex(i.overlay?1:0),i.overlay?yc(i,{zIndex:Y.zIndex++,duration:i.duration,className:i.overlayClass,customStyle:i.overlayStyle}):Mr(i)})},updateZIndex:function(i){i===void 0&&(i=0),this.$el.style.zIndex=++Y.zIndex+i},onReopen:function(i){this.onReopenCallback.push(i)}}}}var Lr=p("info"),_c=Lr[0],Ic=Lr[1];function Ar(e,t,i,n){var r=t.dot,a=t.info,s=_(a)&&a!=="";if(!(!r&&!s))return e("div",T([{class:Ic({dot:r})},B(n,!0)]),[r?"":t.info])}Ar.props={dot:Boolean,info:[Number,String]};const Kt=_c(Ar);var Rr=p("icon"),Oc=Rr[0],Vr=Rr[1];function Pc(e){return e?e.indexOf("/")!==-1:!1}var Bc={medel:"medal","medel-o":"medal-o","calender-o":"calendar-o"};function Ec(e){return e&&Bc[e]||e}function zr(e,t,i,n){var r,a=Ec(t.name),s=Pc(a);return process.env.NODE_ENV==="development"&&t.info&&console.warn('[Vant] Icon: "info" prop is deprecated, use "badge" prop instead.'),e(t.tag,T([{class:[t.classPrefix,s?"":t.classPrefix+"-"+a],style:{color:t.color,fontSize:P(t.size)}},B(n,!0)]),[i.default&&i.default(),s&&e("img",{class:Vr("image"),attrs:{src:a}}),e(Kt,{attrs:{dot:t.dot,info:(r=t.badge)!=null?r:t.info}})])}zr.props={dot:Boolean,name:String,size:[Number,String],info:[Number,String],badge:[Number,String],color:String,tag:{type:String,default:"i"},classPrefix:{type:String,default:Vr()}};const w=Oc(zr);var Fr=p("popup"),Dc=Fr[0],Hr=Fr[1];const St=Dc({mixins:[He()],props:{round:Boolean,duration:[Number,String],closeable:Boolean,transition:String,safeAreaInsetBottom:Boolean,closeIcon:{type:String,default:"cross"},closeIconPosition:{type:String,default:"top-right"},position:{type:String,default:"center"},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}},beforeCreate:function(){var t=this,i=function(r){return function(a){return t.$emit(r,a)}};this.onClick=i("click"),this.onOpened=i("opened"),this.onClosed=i("closed")},methods:{onClickCloseIcon:function(t){this.$emit("click-close-icon",t),this.close()}},render:function(){var t,i=arguments[0];if(this.shouldRender){var n=this.round,r=this.position,a=this.duration,s=r==="center",o=this.transition||(s?"van-fade":"van-popup-slide-"+r),l={};if(_(a)){var c=s?"animationDuration":"transitionDuration";l[c]=a+"s"}return i("transition",{attrs:{appear:this.transitionAppear,name:o},on:{afterEnter:this.onOpened,afterLeave:this.onClosed}},[i("div",{directives:[{name:"show",value:this.value}],style:l,class:Hr((t={round:n},t[r]=r,t["safe-area-inset-bottom"]=this.safeAreaInsetBottom,t)),on:{click:this.onClick}},[this.slots(),this.closeable&&i(w,{attrs:{role:"button",tabindex:"0",name:this.closeIcon},class:Hr("close-icon",this.closeIconPosition),on:{click:this.onClickCloseIcon}})])])}}});var jr=p("loading"),Nc=jr[0],je=jr[1];function Mc(e,t){if(t.type==="spinner"){for(var i=[],n=0;n<12;n++)i.push(e("i"));return i}return e("svg",{class:je("circular"),attrs:{viewBox:"25 25 50 50"}},[e("circle",{attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})])}function Lc(e,t,i){if(i.default){var n,r={fontSize:P(t.textSize),color:(n=t.textColor)!=null?n:t.color};return e("span",{class:je("text"),style:r},[i.default()])}}function Wr(e,t,i,n){var r=t.color,a=t.size,s=t.type,o={color:r};if(a){var l=P(a);o.width=l,o.height=l}return e("div",T([{class:je([s,{vertical:t.vertical}])},B(n,!0)]),[e("span",{class:je("spinner",s),style:o},[Mc(e,t)]),Lc(e,t,i)])}Wr.props={color:String,size:[Number,String],vertical:Boolean,textSize:[Number,String],textColor:String,type:{type:String,default:"circular"}};const ht=Nc(Wr);var Ur=p("action-sheet"),Ac=Ur[0],dt=Ur[1];function qr(e,t,i,n){var r=t.title,a=t.cancelText,s=t.closeable;function o(){I(n,"input",!1),I(n,"cancel")}function l(){if(r)return e("div",{class:dt("header")},[r,s&&e(w,{attrs:{name:t.closeIcon},class:dt("close"),on:{click:o}})])}function c(d,f){var v=d.disabled,g=d.loading,y=d.callback;function b(x){x.stopPropagation(),!(v||g)&&(y&&y(d),t.closeOnClickAction&&I(n,"input",!1),$.nextTick(function(){I(n,"select",d,f)}))}function S(){return g?e(ht,{class:dt("loading-icon")}):[e("span",{class:dt("name")},[d.name]),d.subname&&e("div",{class:dt("subname")},[d.subname])]}return e("button",{attrs:{type:"button"},class:[dt("item",{disabled:v,loading:g}),d.className],style:{color:d.color},on:{click:b}},[S()])}function u(){if(a)return[e("div",{class:dt("gap")}),e("button",{attrs:{type:"button"},class:dt("cancel"),on:{click:o}},[a])]}function h(){var d=(i.description==null?void 0:i.description())||t.description;if(d)return e("div",{class:dt("description")},[d])}return e(St,T([{class:dt(),attrs:{position:"bottom",round:t.round,value:t.value,overlay:t.overlay,duration:t.duration,lazyRender:t.lazyRender,lockScroll:t.lockScroll,getContainer:t.getContainer,closeOnPopstate:t.closeOnPopstate,closeOnClickOverlay:t.closeOnClickOverlay,safeAreaInsetBottom:t.safeAreaInsetBottom}},B(n,!0)]),[l(),h(),e("div",{class:dt("content")},[t.actions&&t.actions.map(c),i.default==null?void 0:i.default()]),u()])}qr.props=m({},Fe,{title:String,actions:Array,duration:[Number,String],cancelText:String,description:String,getContainer:[String,Function],closeOnPopstate:Boolean,closeOnClickAction:Boolean,round:{type:Boolean,default:!0},closeable:{type:Boolean,default:!0},closeIcon:{type:String,default:"cross"},safeAreaInsetBottom:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}});const Rc=Ac(qr);function Kr(e){return e=e.replace(/[^-|\d]/g,""),/^((\+86)|(86))?(1)\d{10}$/.test(e)||/^0[0-9-]{10,13}$/.test(e)}var Vc=44,We={title:String,loading:Boolean,readonly:Boolean,itemHeight:[Number,String],showToolbar:Boolean,cancelButtonText:String,confirmButtonText:String,allowHtml:{type:Boolean,default:!0},visibleItemCount:{type:[Number,String],default:6},swipeDuration:{type:[Number,String],default:1e3}},Yr="#ee0a24",ft="van-hairline",qi=ft+"--top",Xr=ft+"--left",me=ft+"--bottom",Gr=ft+"--surround",Ue=ft+"--top-bottom",zc=ft+"-unset--top-bottom";function ge(e){if(!_(e))return e;if(Array.isArray(e))return e.map(function(i){return ge(i)});if(typeof e=="object"){var t={};return Object.keys(e).forEach(function(i){t[i]=ge(e[i])}),t}return e}function W(e,t,i){return Math.min(Math.max(e,t),i)}function Zr(e,t,i){var n=e.indexOf(t),r="";return n===-1?e:t==="-"&&n!==0?e.slice(0,n):(t==="."&&e.match(/^(\.|-\.)/)&&(r=n?"-0":"0"),r+e.slice(0,n+1)+e.slice(n).replace(i,""))}function Jr(e,t,i){t===void 0&&(t=!0),i===void 0&&(i=!0),t?e=Zr(e,".",/\./g):e=e.split(".")[0],i?e=Zr(e,"-",/-/g):e=e.replace(/-/,"");var n=t?/[^-0-9.]/g:/[^-0-9]/g;return e.replace(n,"")}function Qr(e,t){var i=Math.pow(10,10);return Math.round((e+t)*i)/i}var ta=200,Ki=300,Fc=15,ea=p("picker-column"),Hc=ea[0],Yi=ea[1];function ia(e){var t=window.getComputedStyle(e),i=t.transform||t.webkitTransform,n=i.slice(7,i.length-1).split(", ")[5];return Number(n)}function Xi(e){return ct(e)&&e.disabled}var na=Ae&&"onwheel"in window,Gi=null;const jc=Hc({mixins:[nt],props:{valueKey:String,readonly:Boolean,allowHtml:Boolean,className:String,itemHeight:Number,defaultIndex:Number,swipeDuration:[Number,String],visibleItemCount:[Number,String],initialOptions:{type:Array,default:function(){return[]}}},data:function(){return{offset:0,duration:0,options:ge(this.initialOptions),currentIndex:this.defaultIndex}},created:function(){this.$parent.children&&this.$parent.children.push(this),this.setIndex(this.currentIndex)},mounted:function(){this.bindTouchEvent(this.$el),na&&it(this.$el,"wheel",this.onMouseWheel,!1)},destroyed:function(){var t=this.$parent.children;t&&t.splice(t.indexOf(this),1),na&&Nt(this.$el,"wheel")},watch:{initialOptions:"setOptions",defaultIndex:function(t){this.setIndex(t)}},computed:{count:function(){return this.options.length},baseOffset:function(){return this.itemHeight*(this.visibleItemCount-1)/2}},methods:{setOptions:function(t){JSON.stringify(t)!==JSON.stringify(this.options)&&(this.options=ge(t),this.setIndex(this.defaultIndex))},onTouchStart:function(t){if(!this.readonly){if(this.touchStart(t),this.moving){var i=ia(this.$refs.wrapper);this.offset=Math.min(0,i-this.baseOffset),this.startOffset=this.offset}else this.startOffset=this.offset;this.duration=0,this.transitionEndTrigger=null,this.touchStartTime=Date.now(),this.momentumOffset=this.startOffset}},onTouchMove:function(t){if(!this.readonly){this.touchMove(t),this.direction==="vertical"&&(this.moving=!0,z(t,!0)),this.offset=W(this.startOffset+this.deltaY,-(this.count*this.itemHeight),this.itemHeight);var i=Date.now();i-this.touchStartTime>Ki&&(this.touchStartTime=i,this.momentumOffset=this.offset)}},onTouchEnd:function(){var t=this;if(!this.readonly){var i=this.offset-this.momentumOffset,n=Date.now()-this.touchStartTime,r=n<Ki&&Math.abs(i)>Fc;if(r){this.momentum(i,n);return}var a=this.getIndexByOffset(this.offset);this.duration=ta,this.setIndex(a,!0),setTimeout(function(){t.moving=!1},0)}},onMouseWheel:function(t){var i=this;if(!this.readonly){z(t,!0);var n=ia(this.$refs.wrapper);this.startOffset=Math.min(0,n-this.baseOffset),this.momentumOffset=this.startOffset,this.transitionEndTrigger=null;var r=t.deltaY;if(!(this.startOffset===0&&r<0)){var a=this.itemHeight*(r>0?-1:1);this.offset=W(this.startOffset+a,-(this.count*this.itemHeight),this.itemHeight),Gi&&clearTimeout(Gi),Gi=setTimeout(function(){i.onTouchEnd(),i.touchStartTime=0},Ki)}}},onTransitionEnd:function(){this.stopMomentum()},onClickItem:function(t){this.moving||this.readonly||(this.transitionEndTrigger=null,this.duration=ta,this.setIndex(t,!0))},adjustIndex:function(t){t=W(t,0,this.count);for(var i=t;i<this.count;i++)if(!Xi(this.options[i]))return i;for(var n=t-1;n>=0;n--)if(!Xi(this.options[n]))return n},getOptionText:function(t){return ct(t)&&this.valueKey in t?t[this.valueKey]:t},setIndex:function(t,i){var n=this;t=this.adjustIndex(t)||0;var r=-t*this.itemHeight,a=function(){t!==n.currentIndex&&(n.currentIndex=t,i&&n.$emit("change",t))};this.moving&&r!==this.offset?this.transitionEndTrigger=a:a(),this.offset=r},setValue:function(t){for(var i=this.options,n=0;n<i.length;n++)if(this.getOptionText(i[n])===t)return this.setIndex(n)},getValue:function(){return this.options[this.currentIndex]},getIndexByOffset:function(t){return W(Math.round(-t/this.itemHeight),0,this.count-1)},momentum:function(t,i){var n=Math.abs(t/i);t=this.offset+n/.003*(t<0?-1:1);var r=this.getIndexByOffset(t);this.duration=+this.swipeDuration,this.setIndex(r,!0)},stopMomentum:function(){this.moving=!1,this.duration=0,this.transitionEndTrigger&&(this.transitionEndTrigger(),this.transitionEndTrigger=null)},genOptions:function(){var t=this,i=this.$createElement,n={height:this.itemHeight+"px"};return this.options.map(function(r,a){var s,o=t.getOptionText(r),l=Xi(r),c={style:n,attrs:{role:"button",tabindex:l?-1:0},class:[Yi("item",{disabled:l,selected:a===t.currentIndex})],on:{click:function(){t.onClickItem(a)}}},u={class:"van-ellipsis",domProps:(s={},s[t.allowHtml?"innerHTML":"textContent"]=o,s)};return i("li",T([{},c]),[t.slots("option",r)||i("div",T([{},u]))])})}},render:function(){var t=arguments[0],i={transform:"translate3d(0, "+(this.offset+this.baseOffset)+"px, 0)",transitionDuration:this.duration+"ms",transitionProperty:this.duration?"all":"none"};return t("div",{class:[Yi(),this.className]},[t("ul",{ref:"wrapper",style:i,class:Yi("wrapper"),on:{transitionend:this.onTransitionEnd}},[this.genOptions()])])}});var Zi=p("picker"),Wc=Zi[0],It=Zi[1],ra=Zi[2];const Ji=Wc({props:m({},We,{defaultIndex:{type:[Number,String],default:0},columns:{type:Array,default:function(){return[]}},toolbarPosition:{type:String,default:"top"},valueKey:{type:String,default:"text"}}),data:function(){return{children:[],formattedColumns:[]}},computed:{itemPxHeight:function(){return this.itemHeight?Fi(this.itemHeight):Vc},dataType:function(){var t=this.columns,i=t[0]||{};return i.children?"cascade":i.values?"object":"text"}},watch:{columns:{handler:"format",immediate:!0}},methods:{format:function(){var t=this.columns,i=this.dataType;i==="text"?this.formattedColumns=[{values:t}]:i==="cascade"?this.formatCascade():this.formattedColumns=t},formatCascade:function(){for(var t=[],i={children:this.columns};i&&i.children;){for(var n,r=i,a=r.children,s=(n=i.defaultIndex)!=null?n:+this.defaultIndex;a[s]&&a[s].disabled;)if(s<a.length-1)s++;else{s=0;break}t.push({values:i.children,className:i.className,defaultIndex:s}),i=a[s]}this.formattedColumns=t},emit:function(t){var i=this;if(this.dataType==="text")this.$emit(t,this.getColumnValue(0),this.getColumnIndex(0));else{var n=this.getValues();this.dataType==="cascade"&&(n=n.map(function(r){return r[i.valueKey]})),this.$emit(t,n,this.getIndexes())}},onCascadeChange:function(t){for(var i={children:this.columns},n=this.getIndexes(),r=0;r<=t;r++)i=i.children[n[r]];for(;i&&i.children;)t++,this.setColumnValues(t,i.children),i=i.children[i.defaultIndex||0]},onChange:function(t){var i=this;if(this.dataType==="cascade"&&this.onCascadeChange(t),this.dataType==="text")this.$emit("change",this,this.getColumnValue(0),this.getColumnIndex(0));else{var n=this.getValues();this.dataType==="cascade"&&(n=n.map(function(r){return r[i.valueKey]})),this.$emit("change",this,n,t)}},getColumn:function(t){return this.children[t]},getColumnValue:function(t){var i=this.getColumn(t);return i&&i.getValue()},setColumnValue:function(t,i){var n=this.getColumn(t);n&&(n.setValue(i),this.dataType==="cascade"&&this.onCascadeChange(t))},getColumnIndex:function(t){return(this.getColumn(t)||{}).currentIndex},setColumnIndex:function(t,i){var n=this.getColumn(t);n&&(n.setIndex(i),this.dataType==="cascade"&&this.onCascadeChange(t))},getColumnValues:function(t){return(this.children[t]||{}).options},setColumnValues:function(t,i){var n=this.children[t];n&&n.setOptions(i)},getValues:function(){return this.children.map(function(t){return t.getValue()})},setValues:function(t){var i=this;t.forEach(function(n,r){i.setColumnValue(r,n)})},getIndexes:function(){return this.children.map(function(t){return t.currentIndex})},setIndexes:function(t){var i=this;t.forEach(function(n,r){i.setColumnIndex(r,n)})},confirm:function(){this.children.forEach(function(t){return t.stopMomentum()}),this.emit("confirm")},cancel:function(){this.emit("cancel")},genTitle:function(){var t=this.$createElement,i=this.slots("title");if(i)return i;if(this.title)return t("div",{class:["van-ellipsis",It("title")]},[this.title])},genCancel:function(){var t=this.$createElement;return t("button",{attrs:{type:"button"},class:It("cancel"),on:{click:this.cancel}},[this.slots("cancel")||this.cancelButtonText||ra("cancel")])},genConfirm:function(){var t=this.$createElement;return t("button",{attrs:{type:"button"},class:It("confirm"),on:{click:this.confirm}},[this.slots("confirm")||this.confirmButtonText||ra("confirm")])},genToolbar:function(){var t=this.$createElement;if(this.showToolbar)return t("div",{class:It("toolbar")},[this.slots()||[this.genCancel(),this.genTitle(),this.genConfirm()]])},genColumns:function(){var t=this.$createElement,i=this.itemPxHeight,n=i*this.visibleItemCount,r={height:i+"px"},a={height:n+"px"},s={backgroundSize:"100% "+(n-i)/2+"px"};return t("div",{class:It("columns"),style:a,on:{touchmove:z}},[this.genColumnItems(),t("div",{class:It("mask"),style:s}),t("div",{class:[zc,It("frame")],style:r})])},genColumnItems:function(){var t=this,i=this.$createElement;return this.formattedColumns.map(function(n,r){var a;return i(jc,{attrs:{readonly:t.readonly,valueKey:t.valueKey,allowHtml:t.allowHtml,className:n.className,itemHeight:t.itemPxHeight,defaultIndex:(a=n.defaultIndex)!=null?a:+t.defaultIndex,swipeDuration:t.swipeDuration,visibleItemCount:t.visibleItemCount,initialOptions:n.values},scopedSlots:{option:t.$scopedSlots.option},on:{change:function(){t.onChange(r)}}})})}},render:function(t){return t("div",{class:It()},[this.toolbarPosition==="top"?this.genToolbar():t(),this.loading?t(ht,{class:It("loading")}):t(),this.slots("columns-top"),this.genColumns(),this.slots("columns-bottom"),this.toolbarPosition==="bottom"?this.genToolbar():t()])}});var aa=p("area"),Uc=aa[0],qc=aa[1],Qi="000000";function Kc(e){return e[0]==="9"}function Yc(e,t){var i=e.$slots,n=e.$scopedSlots,r={};return t.forEach(function(a){n[a]?r[a]=n[a]:i[a]&&(r[a]=function(){return i[a]})}),r}const sa=Uc({props:m({},We,{value:String,areaList:{type:Object,default:function(){return{}}},columnsNum:{type:[Number,String],default:3},isOverseaCode:{type:Function,default:Kc},columnsPlaceholder:{type:Array,default:function(){return[]}}}),data:function(){return{code:this.value,columns:[{values:[]},{values:[]},{values:[]}]}},computed:{province:function(){return this.areaList.province_list||{}},city:function(){return this.areaList.city_list||{}},county:function(){return this.areaList.county_list||{}},displayColumns:function(){return this.columns.slice(0,+this.columnsNum)},placeholderMap:function(){return{province:this.columnsPlaceholder[0]||"",city:this.columnsPlaceholder[1]||"",county:this.columnsPlaceholder[2]||""}}},watch:{value:function(t){this.code=t,this.setValues()},areaList:{deep:!0,handler:"setValues"},columnsNum:function(){var t=this;this.$nextTick(function(){t.setValues()})}},mounted:function(){this.setValues()},methods:{getList:function(t,i){var n=[];if(t!=="province"&&!i)return n;var r=this[t];if(n=Object.keys(r).map(function(s){return{code:s,name:r[s]}}),i&&(this.isOverseaCode(i)&&t==="city"&&(i="9"),n=n.filter(function(s){return s.code.indexOf(i)===0})),this.placeholderMap[t]&&n.length){var a="";t==="city"?a=Qi.slice(2,4):t==="county"&&(a=Qi.slice(4,6)),n.unshift({code:""+i+a,name:this.placeholderMap[t]})}return n},getIndex:function(t,i){var n=t==="province"?2:t==="city"?4:6,r=this.getList(t,i.slice(0,n-2));this.isOverseaCode(i)&&t==="province"&&(n=1),i=i.slice(0,n);for(var a=0;a<r.length;a++)if(r[a].code.slice(0,n)===i)return a;return 0},parseOutputValues:function(t){var i=this;return t.map(function(n,r){return n&&(n=JSON.parse(JSON.stringify(n)),(!n.code||n.name===i.columnsPlaceholder[r])&&(n.code="",n.name=""),n)})},onChange:function(t,i,n){this.code=i[n].code,this.setValues();var r=this.parseOutputValues(t.getValues());this.$emit("change",t,r,n)},onConfirm:function(t,i){t=this.parseOutputValues(t),this.setValues(),this.$emit("confirm",t,i)},getDefaultCode:function(){if(this.columnsPlaceholder.length)return Qi;var t=Object.keys(this.county);if(t[0])return t[0];var i=Object.keys(this.city);return i[0]?i[0]:""},setValues:function(){var t=this.code;t||(t=this.getDefaultCode());var i=this.$refs.picker,n=this.getList("province"),r=this.getList("city",t.slice(0,2));i&&(i.setColumnValues(0,n),i.setColumnValues(1,r),r.length&&t.slice(2,4)==="00"&&!this.isOverseaCode(t)&&(t=r[0].code),i.setColumnValues(2,this.getList("county",t.slice(0,4))),i.setIndexes([this.getIndex("province",t),this.getIndex("city",t),this.getIndex("county",t)]))},getValues:function(){var t=this.$refs.picker,i=t?t.getValues().filter(function(n){return!!n}):[];return i=this.parseOutputValues(i),i},getArea:function(){var t=this.getValues(),i={code:"",country:"",province:"",city:"",county:""};if(!t.length)return i;var n=t.map(function(a){return a.name}),r=t.filter(function(a){return!!a.code});return i.code=r.length?r[r.length-1].code:"",this.isOverseaCode(i.code)?(i.country=n[1]||"",i.province=n[2]||""):(i.province=n[0]||"",i.city=n[1]||"",i.county=n[2]||""),i},reset:function(t){this.code=t||"",this.setValues()}},render:function(){var t=arguments[0],i=m({},this.$listeners,{change:this.onChange,confirm:this.onConfirm});return t(Ji,{ref:"picker",class:qc(),attrs:{showToolbar:!0,valueKey:"name",title:this.title,columns:this.displayColumns,loading:this.loading,readonly:this.readonly,itemHeight:this.itemHeight,swipeDuration:this.swipeDuration,visibleItemCount:this.visibleItemCount,cancelButtonText:this.cancelButtonText,confirmButtonText:this.confirmButtonText},scopedSlots:Yc(this,["title","columns-top","columns-bottom"]),on:m({},i)})}});function Xc(e){return e.name==="NavigationDuplicated"||e.message&&e.message.indexOf("redundant navigation")!==-1}function Yt(e,t){var i=t.to,n=t.url,r=t.replace;if(i&&e){var a=e[r?"replace":"push"](i);a&&a.catch&&a.catch(function(s){if(s&&!Xc(s))throw s})}else n&&(r?location.replace(n):location.href=n)}function oa(e){Yt(e.parent&&e.parent.$router,e.props)}var Mt={url:String,replace:Boolean,to:[String,Object]},tn={icon:String,size:String,center:Boolean,isLink:Boolean,required:Boolean,iconPrefix:String,titleStyle:null,titleClass:null,valueClass:null,labelClass:null,title:[Number,String],value:[Number,String],label:[Number,String],arrowDirection:String,border:{type:Boolean,default:!0},clickable:{type:Boolean,default:null}},la=p("cell"),Gc=la[0],ne=la[1];function ca(e,t,i,n){var r,a=t.icon,s=t.size,o=t.title,l=t.label,c=t.value,u=t.isLink,h=i.title||_(o);function d(){var k=i.label||_(l);if(k)return e("div",{class:[ne("label"),t.labelClass]},[i.label?i.label():l])}function f(){if(h)return e("div",{class:[ne("title"),t.titleClass],style:t.titleStyle},[i.title?i.title():e("span",[o]),d()])}function v(){var k=i.default||_(c);if(k)return e("div",{class:[ne("value",{alone:!h}),t.valueClass]},[i.default?i.default():e("span",[c])])}function g(){if(i.icon)return i.icon();if(a)return e(w,{class:ne("left-icon"),attrs:{name:a,classPrefix:t.iconPrefix}})}function y(){var k=i["right-icon"];if(k)return k();if(u){var C=t.arrowDirection;return e(w,{class:ne("right-icon"),attrs:{name:C?"arrow-"+C:"arrow"}})}}function b(k){I(n,"click",k),oa(n)}var S=(r=t.clickable)!=null?r:u,x={clickable:S,center:t.center,required:t.required,borderless:!t.border};return s&&(x[s]=s),e("div",T([{class:ne(x),attrs:{role:S?"button":null,tabindex:S?0:null},on:{click:b}},B(n)]),[g(),f(),v(),y(),i.extra==null?void 0:i.extra()])}ca.props=m({},tn,Mt);const q=Gc(ca);function Zc(){return K?!1:/android/.test(navigator.userAgent.toLowerCase())}function Jc(){return K?!1:/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase())}var Qc=Jc();function ua(){Qc&&ze(ve())}var ha=p("field"),tu=ha[0],Q=ha[1];const rt=tu({inheritAttrs:!1,provide:function(){return{vanField:this}},inject:{vanForm:{default:null}},props:m({},tn,{name:String,rules:Array,disabled:{type:Boolean,default:null},readonly:{type:Boolean,default:null},autosize:[Boolean,Object],leftIcon:String,rightIcon:String,clearable:Boolean,formatter:Function,maxlength:[Number,String],labelWidth:[Number,String],labelClass:null,labelAlign:String,inputAlign:String,placeholder:String,errorMessage:String,errorMessageAlign:String,showWordLimit:Boolean,value:{type:[Number,String],default:""},type:{type:String,default:"text"},error:{type:Boolean,default:null},colon:{type:Boolean,default:null},clearTrigger:{type:String,default:"focus"},formatTrigger:{type:String,default:"onChange"}}),data:function(){return{focused:!1,validateFailed:!1,validateMessage:""}},watch:{value:function(){this.updateValue(this.value),this.resetValidation(),this.validateWithTrigger("onChange"),this.$nextTick(this.adjustSize)}},mounted:function(){this.updateValue(this.value,this.formatTrigger),this.$nextTick(this.adjustSize),this.vanForm&&this.vanForm.addField(this)},beforeDestroy:function(){this.vanForm&&this.vanForm.removeField(this)},computed:{showClear:function(){var t=this.getProp("readonly");if(this.clearable&&!t){var i=_(this.value)&&this.value!=="",n=this.clearTrigger==="always"||this.clearTrigger==="focus"&&this.focused;return i&&n}},showError:function(){if(this.error!==null)return this.error;if(this.vanForm&&this.vanForm.showError&&this.validateFailed)return!0},listeners:function(){return m({},this.$listeners,{blur:this.onBlur,focus:this.onFocus,input:this.onInput,click:this.onClickInput,keypress:this.onKeypress})},labelStyle:function(){var t=this.getProp("labelWidth");if(t)return{width:P(t)}},formValue:function(){return this.children&&(this.$scopedSlots.input||this.$slots.input)?this.children.value:this.value}},methods:{focus:function(){this.$refs.input&&this.$refs.input.focus()},blur:function(){this.$refs.input&&this.$refs.input.blur()},runValidator:function(t,i){return new Promise(function(n){var r=i.validator(t,i);if(Re(r))return r.then(n);n(r)})},isEmptyValue:function(t){return Array.isArray(t)?!t.length:t===0?!1:!t},runSyncRule:function(t,i){return!(i.required&&this.isEmptyValue(t)||i.pattern&&!i.pattern.test(t))},getRuleMessage:function(t,i){var n=i.message;return ie(n)?n(t,i):n},runRules:function(t){var i=this;return t.reduce(function(n,r){return n.then(function(){if(!i.validateFailed){var a=i.formValue;if(r.formatter&&(a=r.formatter(a,r)),!i.runSyncRule(a,r)){i.validateFailed=!0,i.validateMessage=i.getRuleMessage(a,r);return}if(r.validator)return i.runValidator(a,r).then(function(s){s===!1&&(i.validateFailed=!0,i.validateMessage=i.getRuleMessage(a,r))})}})},Promise.resolve())},validate:function(t){var i=this;return t===void 0&&(t=this.rules),new Promise(function(n){t||n(),i.resetValidation(),i.runRules(t).then(function(){i.validateFailed?n({name:i.name,message:i.validateMessage}):n()})})},validateWithTrigger:function(t){if(this.vanForm&&this.rules){var i=this.vanForm.validateTrigger===t,n=this.rules.filter(function(r){return r.trigger?r.trigger===t:i});n.length&&this.validate(n)}},resetValidation:function(){this.validateFailed&&(this.validateFailed=!1,this.validateMessage="")},updateValue:function(t,i){i===void 0&&(i="onChange"),t=_(t)?String(t):"";var n=this.maxlength;if(_(n)&&t.length>n&&(this.value&&this.value.length===+n?t=this.value:t=t.slice(0,n)),this.type==="number"||this.type==="digit"){var r=this.type==="number";t=Jr(t,r,r)}this.formatter&&i===this.formatTrigger&&(t=this.formatter(t));var a=this.$refs.input;a&&t!==a.value&&(a.value=t),t!==this.value&&this.$emit("input",t)},onInput:function(t){t.target.composing||this.updateValue(t.target.value)},onFocus:function(t){this.focused=!0,this.$emit("focus",t),this.$nextTick(this.adjustSize),this.getProp("readonly")&&this.blur()},onBlur:function(t){this.getProp("readonly")||(this.focused=!1,this.updateValue(this.value,"onBlur"),this.$emit("blur",t),this.validateWithTrigger("onBlur"),this.$nextTick(this.adjustSize),ua())},onClick:function(t){this.$emit("click",t)},onClickInput:function(t){this.$emit("click-input",t)},onClickLeftIcon:function(t){this.$emit("click-left-icon",t)},onClickRightIcon:function(t){this.$emit("click-right-icon",t)},onClear:function(t){z(t),this.$emit("input",""),this.$emit("clear",t)},onKeypress:function(t){var i=13;if(t.keyCode===i){var n=this.getProp("submitOnEnter");!n&&this.type!=="textarea"&&z(t),this.type==="search"&&this.blur()}this.$emit("keypress",t)},adjustSize:function(){var t=this.$refs.input;if(!(!(this.type==="textarea"&&this.autosize)||!t)){var i=ve();t.style.height="auto";var n=t.scrollHeight;if(ct(this.autosize)){var r=this.autosize,a=r.maxHeight,s=r.minHeight;a&&(n=Math.min(n,a)),s&&(n=Math.max(n,s))}n&&(t.style.height=n+"px",ze(i))}},genInput:function(){var t=this.$createElement,i=this.type,n=this.getProp("disabled"),r=this.getProp("readonly"),a=this.slots("input"),s=this.getProp("inputAlign");if(a)return t("div",{class:Q("control",[s,"custom"]),on:{click:this.onClickInput}},[a]);var o={ref:"input",class:Q("control",s),domProps:{value:this.value},attrs:m({},this.$attrs,{name:this.name,disabled:n,readonly:r,placeholder:this.placeholder}),on:this.listeners,directives:[{name:"model",value:this.value}]};if(i==="textarea")return t("textarea",T([{},o]));var l=i,c;return i==="number"&&(l="text",c="decimal"),i==="digit"&&(l="tel",c="numeric"),t("input",T([{attrs:{type:l,inputmode:c}},o]))},genLeftIcon:function(){var t=this.$createElement,i=this.slots("left-icon")||this.leftIcon;if(i)return t("div",{class:Q("left-icon"),on:{click:this.onClickLeftIcon}},[this.slots("left-icon")||t(w,{attrs:{name:this.leftIcon,classPrefix:this.iconPrefix}})])},genRightIcon:function(){var t=this.$createElement,i=this.slots,n=i("right-icon")||this.rightIcon;if(n)return t("div",{class:Q("right-icon"),on:{click:this.onClickRightIcon}},[i("right-icon")||t(w,{attrs:{name:this.rightIcon,classPrefix:this.iconPrefix}})])},genWordLimit:function(){var t=this.$createElement;if(this.showWordLimit&&this.maxlength){var i=(this.value||"").length;return t("div",{class:Q("word-limit")},[t("span",{class:Q("word-num")},[i]),"/",this.maxlength])}},genMessage:function(){var t=this.$createElement;if(!(this.vanForm&&this.vanForm.showErrorMessage===!1)){var i=this.errorMessage||this.validateMessage;if(i){var n=this.getProp("errorMessageAlign");return t("div",{class:Q("error-message",n)},[i])}}},getProp:function(t){if(_(this[t]))return this[t];if(this.vanForm&&_(this.vanForm[t]))return this.vanForm[t]},genLabel:function(){var t=this.$createElement,i=this.getProp("colon")?":":"";if(this.slots("label"))return[this.slots("label"),i];if(this.label)return t("span",[this.label+i])}},render:function(){var t,i=arguments[0],n=this.slots,r=this.getProp("disabled"),a=this.getProp("labelAlign"),s={icon:this.genLeftIcon},o=this.genLabel();o&&(s.title=function(){return o});var l=this.slots("extra");return l&&(s.extra=function(){return l}),i(q,{attrs:{icon:this.leftIcon,size:this.size,center:this.center,border:this.border,isLink:this.isLink,required:this.required,clickable:this.clickable,titleStyle:this.labelStyle,valueClass:Q("value"),titleClass:[Q("label",a),this.labelClass],arrowDirection:this.arrowDirection},scopedSlots:s,class:Q((t={error:this.showError,disabled:r},t["label-"+a]=a,t["min-height"]=this.type==="textarea"&&!this.autosize,t)),on:{click:this.onClick}},[i("div",{class:Q("body")},[this.genInput(),this.showClear&&i(w,{attrs:{name:"clear"},class:Q("clear"),on:{touchstart:this.onClear}}),this.genRightIcon(),n("button")&&i("div",{class:Q("button")},[n("button")])]),this.genWordLimit(),this.genMessage()])}});var qe=0;function eu(e){e?(qe||document.body.classList.add("van-toast--unclickable"),qe++):(qe--,qe||document.body.classList.remove("van-toast--unclickable"))}var da=p("toast"),iu=da[0],ye=da[1];const fa=iu({mixins:[He()],props:{icon:String,className:null,iconPrefix:String,loadingType:String,forbidClick:Boolean,closeOnClick:Boolean,message:[Number,String],type:{type:String,default:"text"},position:{type:String,default:"middle"},transition:{type:String,default:"van-fade"},lockScroll:{type:Boolean,default:!1}},data:function(){return{clickable:!1}},mounted:function(){this.toggleClickable()},destroyed:function(){this.toggleClickable()},watch:{value:"toggleClickable",forbidClick:"toggleClickable"},methods:{onClick:function(){this.closeOnClick&&this.close()},toggleClickable:function(){var t=this.value&&this.forbidClick;this.clickable!==t&&(this.clickable=t,eu(t))},onAfterEnter:function(){this.$emit("opened"),this.onOpened&&this.onOpened()},onAfterLeave:function(){this.$emit("closed")},genIcon:function(){var t=this.$createElement,i=this.icon,n=this.type,r=this.iconPrefix,a=this.loadingType,s=i||n==="success"||n==="fail";if(s)return t(w,{class:ye("icon"),attrs:{classPrefix:r,name:i||n}});if(n==="loading")return t(ht,{class:ye("loading"),attrs:{type:a}})},genMessage:function(){var t=this.$createElement,i=this.type,n=this.message;if(!(!_(n)||n===""))return i==="html"?t("div",{class:ye("text"),domProps:{innerHTML:n}}):t("div",{class:ye("text")},[n])}},render:function(){var t,i=arguments[0];return i("transition",{attrs:{name:this.transition},on:{afterEnter:this.onAfterEnter,afterLeave:this.onAfterLeave}},[i("div",{directives:[{name:"show",value:this.value}],class:[ye([this.position,(t={},t[this.type]=!this.icon,t)]),this.className],on:{click:this.onClick}},[this.genIcon(),this.genMessage()])])}});var pa={icon:"",type:"text",mask:!1,value:!0,message:"",className:"",overlay:!1,onClose:null,onOpened:null,duration:2e3,iconPrefix:void 0,position:"middle",transition:"van-fade",forbidClick:!1,loadingType:void 0,getContainer:"body",overlayStyle:null,closeOnClick:!1,closeOnClickOverlay:!1},Ke={},tt=[],Ye=!1,Xe=m({},pa);function va(e){return ct(e)?e:{message:e}}function nu(e){return document.body.contains(e)}function ru(){if(K)return{};if(tt=tt.filter(function(t){return!t.$el.parentNode||nu(t.$el)}),!tt.length||Ye){var e=new($.extend(fa))({el:document.createElement("div")});e.$on("input",function(t){e.value=t}),tt.push(e)}return tt[tt.length-1]}function au(e){return m({},e,{overlay:e.mask||e.overlay,mask:void 0,duration:void 0})}function L(e){e===void 0&&(e={});var t=ru();return t.value&&t.updateZIndex(),e=va(e),e=m({},Xe,Ke[e.type||Xe.type],e),process.env.NODE_ENV==="development"&&e.mask&&console.warn('[Vant] Toast: "mask" option is deprecated, use "overlay" option instead.'),e.clear=function(){t.value=!1,e.onClose&&(e.onClose(),e.onClose=null),Ye&&!K&&t.$on("closed",function(){clearTimeout(t.timer),tt=tt.filter(function(i){return i!==t}),Hi(t.$el),t.$destroy()})},m(t,au(e)),clearTimeout(t.timer),e.duration>0&&(t.timer=setTimeout(function(){t.clear()},e.duration)),t}var su=function(t){return function(i){return L(m({type:t},va(i)))}};["loading","success","fail"].forEach(function(e){L[e]=su(e)}),L.clear=function(e){tt.length&&(e?(tt.forEach(function(t){t.clear()}),tt=[]):Ye?tt.shift().clear():tt[0].clear())},L.setDefaultOptions=function(e,t){typeof e=="string"?Ke[e]=t:m(Xe,e)},L.resetDefaultOptions=function(e){typeof e=="string"?Ke[e]=null:(Xe=m({},pa),Ke={})},L.allowMultiple=function(e){e===void 0&&(e=!0),Ye=e},L.install=function(){$.use(fa)},$.prototype.$toast=L;var ma=p("button"),ou=ma[0],re=ma[1];function ga(e,t,i,n){var r,a=t.tag,s=t.icon,o=t.type,l=t.color,c=t.plain,u=t.disabled,h=t.loading,d=t.hairline,f=t.loadingText,v=t.iconPosition,g={};l&&(g.color=c?l:"white",c||(g.background=l),l.indexOf("gradient")!==-1?g.border=0:g.borderColor=l);function y(C){t.loading&&C.preventDefault(),!h&&!u&&(I(n,"click",C),oa(n))}function b(C){I(n,"touchstart",C)}var S=[re([o,t.size,{plain:c,loading:h,disabled:u,hairline:d,block:t.block,round:t.round,square:t.square}]),(r={},r[Gr]=d,r)];function x(){if(h)return i.loading?i.loading():e(ht,{class:re("loading"),attrs:{size:t.loadingSize,type:t.loadingType,color:"currentColor"}});if(i.icon)return e("div",{class:re("icon")},[i.icon()]);if(s)return e(w,{attrs:{name:s,classPrefix:t.iconPrefix},class:re("icon")})}function k(){var C=[];v==="left"&&C.push(x());var O;return h?O=f:O=i.default?i.default():t.text,O&&C.push(e("span",{class:re("text")},[O])),v==="right"&&C.push(x()),C}return e(a,T([{style:g,class:S,attrs:{type:t.nativeType,disabled:u},on:{click:y,touchstart:b}},B(n)]),[e("div",{class:re("content")},[k()])])}ga.props=m({},Mt,{text:String,icon:String,color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:String,loadingText:String,loadingType:String,tag:{type:String,default:"button"},type:{type:String,default:"default"},size:{type:String,default:"normal"},loadingSize:{type:String,default:"20px"},iconPosition:{type:String,default:"left"}});const F=ou(ga);function lu(e){var t=[];function i(n){n.forEach(function(r){t.push(r),r.componentInstance&&i(r.componentInstance.$children.map(function(a){return a.$vnode})),r.children&&i(r.children)})}return i(e),t}function ya(e,t){var i=t.$vnode.componentOptions;if(!(!i||!i.children)){var n=lu(i.children);e.sort(function(r,a){return n.indexOf(r.$vnode)-n.indexOf(a.$vnode)})}}function X(e,t){var i,n;t===void 0&&(t={});var r=t.indexKey||"index";return{inject:(i={},i[e]={default:null},i),computed:(n={parent:function(){return this.disableBindRelation?null:this[e]}},n[r]=function(){return this.bindRelation(),this.parent?this.parent.children.indexOf(this):null},n),watch:{disableBindRelation:function(s){s||this.bindRelation()}},mounted:function(){this.bindRelation()},beforeDestroy:function(){var s=this;this.parent&&(this.parent.children=this.parent.children.filter(function(o){return o!==s}))},methods:{bindRelation:function(){if(!(!this.parent||this.parent.children.indexOf(this)!==-1)){var s=[].concat(this.parent.children,[this]);ya(s,this.parent),this.parent.children=s}}}}}function G(e){return{provide:function(){var i;return i={},i[e]=this,i},data:function(){return{children:[]}}}}var ba=p("goods-action"),cu=ba[0],uu=ba[1];const Sa=cu({mixins:[G("vanGoodsAction")],props:{safeAreaInsetBottom:{type:Boolean,default:!0}},render:function(){var t=arguments[0];return t("div",{class:uu({unfit:!this.safeAreaInsetBottom})},[this.slots()])}});var ka=p("goods-action-button"),hu=ka[0],du=ka[1];const en=hu({mixins:[X("vanGoodsAction")],props:m({},Mt,{type:String,text:String,icon:String,color:String,loading:Boolean,disabled:Boolean}),computed:{isFirst:function(){var t=this.parent&&this.parent.children[this.index-1];return!t||t.$options.name!==this.$options.name},isLast:function(){var t=this.parent&&this.parent.children[this.index+1];return!t||t.$options.name!==this.$options.name}},methods:{onClick:function(t){this.$emit("click",t),Yt(this.$router,this)}},render:function(){var t=arguments[0];return t(F,{class:du([{first:this.isFirst,last:this.isLast},this.type]),attrs:{size:"large",type:this.type,icon:this.icon,color:this.color,loading:this.loading,disabled:this.disabled},on:{click:this.onClick}},[this.slots()||this.text])}});var nn=p("dialog"),fu=nn[0],pt=nn[1],Ge=nn[2];const rn=fu({mixins:[He()],props:{title:String,theme:String,width:[Number,String],message:String,className:null,callback:Function,beforeClose:Function,messageAlign:String,cancelButtonText:String,cancelButtonColor:String,confirmButtonText:String,confirmButtonColor:String,showCancelButton:Boolean,overlay:{type:Boolean,default:!0},allowHtml:{type:Boolean,default:!0},transition:{type:String,default:"van-dialog-bounce"},showConfirmButton:{type:Boolean,default:!0},closeOnPopstate:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!1}},data:function(){return{loading:{confirm:!1,cancel:!1}}},methods:{onClickOverlay:function(){this.handleAction("overlay")},handleAction:function(t){var i=this;this.$emit(t),this.value&&(this.beforeClose?(this.loading[t]=!0,this.beforeClose(t,function(n){n!==!1&&i.loading[t]&&i.onClose(t),i.loading.confirm=!1,i.loading.cancel=!1})):this.onClose(t))},onClose:function(t){this.close(),this.callback&&this.callback(t)},onOpened:function(){var t=this;this.$emit("opened"),this.$nextTick(function(){var i;(i=t.$refs.dialog)==null||i.focus()})},onClosed:function(){this.$emit("closed")},onKeydown:function(t){var i=this;if(t.key==="Escape"||t.key==="Enter"){if(t.target!==this.$refs.dialog)return;var n={Enter:this.showConfirmButton?function(){return i.handleAction("confirm")}:pe,Escape:this.showCancelButton?function(){return i.handleAction("cancel")}:pe};n[t.key](),this.$emit("keydown",t)}},genRoundButtons:function(){var t=this,i=this.$createElement;return i(Sa,{class:pt("footer")},[this.showCancelButton&&i(en,{attrs:{size:"large",type:"warning",text:this.cancelButtonText||Ge("cancel"),color:this.cancelButtonColor,loading:this.loading.cancel},class:pt("cancel"),on:{click:function(){t.handleAction("cancel")}}}),this.showConfirmButton&&i(en,{attrs:{size:"large",type:"danger",text:this.confirmButtonText||Ge("confirm"),color:this.confirmButtonColor,loading:this.loading.confirm},class:pt("confirm"),on:{click:function(){t.handleAction("confirm")}}})])},genButtons:function(){var t=this,i,n=this.$createElement,r=this.showCancelButton&&this.showConfirmButton;return n("div",{class:[qi,pt("footer")]},[this.showCancelButton&&n(F,{attrs:{size:"large",loading:this.loading.cancel,text:this.cancelButtonText||Ge("cancel"),nativeType:"button"},class:pt("cancel"),style:{color:this.cancelButtonColor},on:{click:function(){t.handleAction("cancel")}}}),this.showConfirmButton&&n(F,{attrs:{size:"large",loading:this.loading.confirm,text:this.confirmButtonText||Ge("confirm"),nativeType:"button"},class:[pt("confirm"),(i={},i[Xr]=r,i)],style:{color:this.confirmButtonColor},on:{click:function(){t.handleAction("confirm")}}})])},genContent:function(t,i){var n=this.$createElement;if(i)return n("div",{class:pt("content")},[i]);var r=this.message,a=this.messageAlign;if(r){var s,o,l={class:pt("message",(s={"has-title":t},s[a]=a,s)),domProps:(o={},o[this.allowHtml?"innerHTML":"textContent"]=r,o)};return n("div",{class:pt("content",{isolated:!t})},[n("div",T([{},l]))])}}},render:function(){var t=arguments[0];if(this.shouldRender){var i=this.message,n=this.slots(),r=this.slots("title")||this.title,a=r&&t("div",{class:pt("header",{isolated:!i&&!n})},[r]);return t("transition",{attrs:{name:this.transition},on:{afterEnter:this.onOpened,afterLeave:this.onClosed}},[t("div",{directives:[{name:"show",value:this.value}],attrs:{role:"dialog","aria-labelledby":this.title||i,tabIndex:0},class:[pt([this.theme]),this.className],style:{width:P(this.width)},ref:"dialog",on:{keydown:this.onKeydown}},[a,this.genContent(r,n),this.theme==="round-button"?this.genRoundButtons():this.genButtons()])])}}});var vt;function pu(e){return document.body.contains(e)}function vu(){vt&&vt.$destroy(),vt=new($.extend(rn))({el:document.createElement("div"),propsData:{lazyRender:!1}}),vt.$on("input",function(e){vt.value=e})}function D(e){return K?Promise.resolve():new Promise(function(t,i){(!vt||!pu(vt.$el))&&vu(),m(vt,D.currentOptions,e,{resolve:t,reject:i})})}D.defaultOptions={value:!0,title:"",width:"",theme:null,message:"",overlay:!0,className:"",allowHtml:!0,lockScroll:!0,transition:"van-dialog-bounce",beforeClose:null,overlayClass:"",overlayStyle:null,messageAlign:"",getContainer:"body",cancelButtonText:"",cancelButtonColor:null,confirmButtonText:"",confirmButtonColor:null,showConfirmButton:!0,showCancelButton:!1,closeOnPopstate:!0,closeOnClickOverlay:!1,callback:function(t){vt[t==="confirm"?"resolve":"reject"](t)}},D.alert=D,D.confirm=function(e){return D(m({showCancelButton:!0},e))},D.close=function(){vt&&(vt.value=!1)},D.setDefaultOptions=function(e){m(D.currentOptions,e)},D.resetDefaultOptions=function(){D.currentOptions=m({},D.defaultOptions)},D.resetDefaultOptions(),D.install=function(){$.use(rn)},D.Component=rn,$.prototype.$dialog=D;var an=p("address-edit-detail"),mu=an[0],Ze=an[1],sn=an[2],Ca=Zc();const gu=mu({props:{value:String,errorMessage:String,focused:Boolean,detailRows:[Number,String],searchResult:Array,detailMaxlength:[Number,String],showSearchResult:Boolean},computed:{shouldShowSearchResult:function(){return this.focused&&this.searchResult&&this.showSearchResult}},methods:{onSelect:function(t){this.$emit("select-search",t),this.$emit("input",((t.address||"")+" "+(t.name||"")).trim())},onFinish:function(){this.$refs.field.blur()},genFinish:function(){var t=this.$createElement,i=this.value&&this.focused&&Ca;if(i)return t("div",{class:Ze("finish"),on:{click:this.onFinish}},[sn("complete")])},genSearchResult:function(){var t=this,i=this.$createElement,n=this.value,r=this.shouldShowSearchResult,a=this.searchResult;if(r)return a.map(function(s){return i(q,{key:s.name+s.address,attrs:{clickable:!0,border:!1,icon:"location-o",label:s.address},class:Ze("search-item"),on:{click:function(){t.onSelect(s)}},scopedSlots:{title:function(){if(s.name){var l=s.name.replace(n,"<span class="+Ze("keyword")+">"+n+"</span>");return i("div",{domProps:{innerHTML:l}})}}}})})}},render:function(){var t=arguments[0];return t(q,{class:Ze()},[t(rt,{attrs:{autosize:!0,rows:this.detailRows,clearable:!Ca,type:"textarea",value:this.value,errorMessage:this.errorMessage,border:!this.shouldShowSearchResult,label:sn("label"),maxlength:this.detailMaxlength,placeholder:sn("placeholder")},ref:"field",scopedSlots:{icon:this.genFinish},on:m({},this.$listeners)}),this.genSearchResult()])}});var $a={size:[Number,String],value:null,loading:Boolean,disabled:Boolean,activeColor:String,inactiveColor:String,activeValue:{type:null,default:!0},inactiveValue:{type:null,default:!1}},Lt={inject:{vanField:{default:null}},watch:{value:function(){var t=this.vanField;t&&(t.resetValidation(),t.validateWithTrigger("onChange"))}},created:function(){var t=this.vanField;t&&!t.children&&(t.children=this)}},wa=p("switch"),yu=wa[0],on=wa[1];const Je=yu({mixins:[Lt],props:$a,computed:{checked:function(){return this.value===this.activeValue},style:function(){return{fontSize:P(this.size),backgroundColor:this.checked?this.activeColor:this.inactiveColor}}},methods:{onClick:function(t){if(this.$emit("click",t),!this.disabled&&!this.loading){var i=this.checked?this.inactiveValue:this.activeValue;this.$emit("input",i),this.$emit("change",i)}},genLoading:function(){var t=this.$createElement;if(this.loading){var i=this.checked?this.activeColor:this.inactiveColor;return t(ht,{class:on("loading"),attrs:{color:i}})}}},render:function(){var t=arguments[0],i=this.checked,n=this.loading,r=this.disabled;return t("div",{class:on({on:i,loading:n,disabled:r}),attrs:{role:"switch","aria-checked":String(i)},style:this.style,on:{click:this.onClick}},[t("div",{class:on("node")},[this.genLoading()])])}});var ln=p("address-edit"),bu=ln[0],Qe=ln[1],V=ln[2],xa={name:"",tel:"",country:"",province:"",city:"",county:"",areaCode:"",postalCode:"",addressDetail:"",isDefault:!1};function Su(e){return/^\d{6}$/.test(e)}const ku=bu({props:{areaList:Object,isSaving:Boolean,isDeleting:Boolean,validator:Function,showDelete:Boolean,showPostal:Boolean,searchResult:Array,telMaxlength:[Number,String],showSetDefault:Boolean,saveButtonText:String,areaPlaceholder:String,deleteButtonText:String,showSearchResult:Boolean,showArea:{type:Boolean,default:!0},showDetail:{type:Boolean,default:!0},disableArea:Boolean,detailRows:{type:[Number,String],default:1},detailMaxlength:{type:[Number,String],default:200},addressInfo:{type:Object,default:function(){return m({},xa)}},telValidator:{type:Function,default:Kr},postalValidator:{type:Function,default:Su},areaColumnsPlaceholder:{type:Array,default:function(){return[]}}},data:function(){return{data:{},showAreaPopup:!1,detailFocused:!1,errorInfo:{tel:"",name:"",areaCode:"",postalCode:"",addressDetail:""}}},computed:{areaListLoaded:function(){return ct(this.areaList)&&Object.keys(this.areaList).length},areaText:function(){var t=this.data,i=t.country,n=t.province,r=t.city,a=t.county,s=t.areaCode;if(s){var o=[i,n,r,a];return n&&n===r&&o.splice(1,1),o.filter(function(l){return l}).join("/")}return""},hideBottomFields:function(){var t=this.searchResult;return t&&t.length&&this.detailFocused}},watch:{addressInfo:{handler:function(t){this.data=m({},xa,t),this.setAreaCode(t.areaCode)},deep:!0,immediate:!0},areaList:function(){this.setAreaCode(this.data.areaCode)}},methods:{onFocus:function(t){this.errorInfo[t]="",this.detailFocused=t==="addressDetail",this.$emit("focus",t)},onChangeDetail:function(t){this.data.addressDetail=t,this.$emit("change-detail",t)},onAreaConfirm:function(t){if(t=t.filter(function(i){return!!i}),t.some(function(i){return!i.code})){L(V("areaEmpty"));return}this.showAreaPopup=!1,this.assignAreaValues(),this.$emit("change-area",t)},assignAreaValues:function(){var t=this.$refs.area;if(t){var i=t.getArea();i.areaCode=i.code,delete i.code,m(this.data,i)}},onSave:function(){var t=this,i=["name","tel"];this.showArea&&i.push("areaCode"),this.showDetail&&i.push("addressDetail"),this.showPostal&&i.push("postalCode");var n=i.every(function(r){var a=t.getErrorMessage(r);return a&&(t.errorInfo[r]=a),!a});n&&!this.isSaving&&this.$emit("save",this.data)},getErrorMessage:function(t){var i=String(this.data[t]||"").trim();if(this.validator){var n=this.validator(t,i);if(n)return n}switch(t){case"name":return i?"":V("nameEmpty");case"tel":return this.telValidator(i)?"":V("telInvalid");case"areaCode":return i?"":V("areaEmpty");case"addressDetail":return i?"":V("addressEmpty");case"postalCode":return i&&!this.postalValidator(i)?V("postalEmpty"):""}},onDelete:function(){var t=this;D.confirm({title:V("confirmDelete")}).then(function(){t.$emit("delete",t.data)}).catch(function(){t.$emit("cancel-delete",t.data)})},getArea:function(){return this.$refs.area?this.$refs.area.getValues():[]},setAreaCode:function(t){this.data.areaCode=t||"",t&&this.$nextTick(this.assignAreaValues)},setAddressDetail:function(t){this.data.addressDetail=t},onDetailBlur:function(){var t=this;setTimeout(function(){t.detailFocused=!1})},genSetDefaultCell:function(t){var i=this;if(this.showSetDefault){var n={"right-icon":function(){return t(Je,{attrs:{size:"24"},on:{change:function(s){i.$emit("change-default",s)}},model:{value:i.data.isDefault,callback:function(s){i.$set(i.data,"isDefault",s)}}})}};return t(q,{directives:[{name:"show",value:!this.hideBottomFields}],attrs:{center:!0,title:V("defaultAddress")},class:Qe("default"),scopedSlots:n})}return t()}},render:function(t){var i=this,n=this.data,r=this.errorInfo,a=this.disableArea,s=this.hideBottomFields,o=function(c){return function(){return i.onFocus(c)}};return t("div",{class:Qe()},[t("div",{class:Qe("fields")},[t(rt,{attrs:{clearable:!0,label:V("name"),placeholder:V("namePlaceholder"),errorMessage:r.name},on:{focus:o("name")},model:{value:n.name,callback:function(c){i.$set(n,"name",c)}}}),t(rt,{attrs:{clearable:!0,type:"tel",label:V("tel"),maxlength:this.telMaxlength,placeholder:V("telPlaceholder"),errorMessage:r.tel},on:{focus:o("tel")},model:{value:n.tel,callback:function(c){i.$set(n,"tel",c)}}}),t(rt,{directives:[{name:"show",value:this.showArea}],attrs:{readonly:!0,clickable:!a,label:V("area"),placeholder:this.areaPlaceholder||V("areaPlaceholder"),errorMessage:r.areaCode,rightIcon:a?null:"arrow",value:this.areaText},on:{focus:o("areaCode"),click:function(){i.$emit("click-area"),i.showAreaPopup=!a}}}),t(gu,{directives:[{name:"show",value:this.showDetail}],attrs:{focused:this.detailFocused,value:n.addressDetail,errorMessage:r.addressDetail,detailRows:this.detailRows,detailMaxlength:this.detailMaxlength,searchResult:this.searchResult,showSearchResult:this.showSearchResult},on:{focus:o("addressDetail"),blur:this.onDetailBlur,input:this.onChangeDetail,"select-search":function(c){i.$emit("select-search",c)}}}),this.showPostal&&t(rt,{directives:[{name:"show",value:!s}],attrs:{type:"tel",maxlength:"6",label:V("postal"),placeholder:V("postal"),errorMessage:r.postalCode},on:{focus:o("postalCode")},model:{value:n.postalCode,callback:function(c){i.$set(n,"postalCode",c)}}}),this.slots()]),this.genSetDefaultCell(t),t("div",{directives:[{name:"show",value:!s}],class:Qe("buttons")},[t(F,{attrs:{block:!0,round:!0,loading:this.isSaving,type:"danger",text:this.saveButtonText||V("save")},on:{click:this.onSave}}),this.showDelete&&t(F,{attrs:{block:!0,round:!0,loading:this.isDeleting,text:this.deleteButtonText||V("delete")},on:{click:this.onDelete}})]),t(St,{attrs:{round:!0,position:"bottom",lazyRender:!1,getContainer:"body"},model:{value:i.showAreaPopup,callback:function(c){i.showAreaPopup=c}}},[t(sa,{ref:"area",attrs:{value:n.areaCode,loading:!this.areaListLoaded,areaList:this.areaList,columnsPlaceholder:this.areaColumnsPlaceholder},on:{confirm:this.onAreaConfirm,cancel:function(){i.showAreaPopup=!1}}})])])}});var Ta=p("radio-group"),Cu=Ta[0],$u=Ta[1];const cn=Cu({mixins:[G("vanRadio"),Lt],props:{value:null,disabled:Boolean,direction:String,checkedColor:String,iconSize:[Number,String]},watch:{value:function(t){this.$emit("change",t)}},render:function(){var t=arguments[0];return t("div",{class:$u([this.direction]),attrs:{role:"radiogroup"}},[this.slots()])}});var _a=p("tag"),wu=_a[0],Ia=_a[1];function Oa(e,t,i,n){var r,a=t.type,s=t.mark,o=t.plain,l=t.color,c=t.round,u=t.size,h=t.textColor,d=o?"color":"backgroundColor",f=(r={},r[d]=l,r);o?(f.color=h||l,f.borderColor=l):(f.color=h,f.background=l);var v={mark:s,plain:o,round:c};u&&(v[u]=u);var g=t.closeable&&e(w,{attrs:{name:"cross"},class:Ia("close"),on:{click:function(b){b.stopPropagation(),I(n,"close")}}});return e("transition",{attrs:{name:t.closeable?"van-fade":null}},[e("span",T([{key:"content",style:f,class:Ia([v,a])},B(n,!0)]),[i.default==null?void 0:i.default(),g])])}Oa.props={size:String,mark:Boolean,color:String,plain:Boolean,round:Boolean,textColor:String,closeable:Boolean,type:{type:String,default:"default"}};const ti=wu(Oa);var Pa=function(t){var i=t.parent,n=t.bem,r=t.role;return{mixins:[X(i),Lt],props:{name:null,value:null,disabled:Boolean,iconSize:[Number,String],checkedColor:String,labelPosition:String,labelDisabled:Boolean,shape:{type:String,default:"round"},bindGroup:{type:Boolean,default:!0}},computed:{disableBindRelation:function(){return!this.bindGroup},isDisabled:function(){return this.parent&&this.parent.disabled||this.disabled},direction:function(){return this.parent&&this.parent.direction||null},iconStyle:function(){var s=this.checkedColor||this.parent&&this.parent.checkedColor;if(s&&this.checked&&!this.isDisabled)return{borderColor:s,backgroundColor:s}},tabindex:function(){return this.isDisabled||r==="radio"&&!this.checked?-1:0}},methods:{onClick:function(s){var o=this,l=s.target,c=this.$refs.icon,u=c===l||(c==null?void 0:c.contains(l));!this.isDisabled&&(u||!this.labelDisabled)?(this.toggle(),setTimeout(function(){o.$emit("click",s)})):this.$emit("click",s)},genIcon:function(){var s=this.$createElement,o=this.checked,l=this.iconSize||this.parent&&this.parent.iconSize;return s("div",{ref:"icon",class:n("icon",[this.shape,{disabled:this.isDisabled,checked:o}]),style:{fontSize:P(l)}},[this.slots("icon",{checked:o})||s(w,{attrs:{name:"success"},style:this.iconStyle})])},genLabel:function(){var s=this.$createElement,o=this.slots();if(o)return s("span",{class:n("label",[this.labelPosition,{disabled:this.isDisabled}])},[o])}},render:function(){var s=arguments[0],o=[this.genIcon()];return this.labelPosition==="left"?o.unshift(this.genLabel()):o.push(this.genLabel()),s("div",{attrs:{role:r,tabindex:this.tabindex,"aria-checked":String(this.checked)},class:n([{disabled:this.isDisabled,"label-disabled":this.labelDisabled},this.direction]),on:{click:this.onClick}},[o])}}},Ba=p("radio"),xu=Ba[0],Tu=Ba[1];const un=xu({mixins:[Pa({bem:Tu,role:"radio",parent:"vanRadio"})],computed:{currentValue:{get:function(){return this.parent?this.parent.value:this.value},set:function(t){(this.parent||this).$emit("input",t)}},checked:function(){return this.currentValue===this.name}},methods:{toggle:function(){this.currentValue=this.name}}});var Ea=p("address-item"),_u=Ea[0],ae=Ea[1];function Da(e,t,i,n){var r=t.disabled,a=t.switchable;function s(){a&&I(n,"select"),I(n,"click")}var o=function(){return e(w,{attrs:{name:"edit"},class:ae("edit"),on:{click:function(d){d.stopPropagation(),I(n,"edit"),I(n,"click")}}})};function l(){if(i.tag)return i.tag(m({},t.data));if(t.data.isDefault&&t.defaultTagText)return e(ti,{attrs:{type:"danger",round:!0},class:ae("tag")},[t.defaultTagText])}function c(){var u=t.data,h=[e("div",{class:ae("name")},[u.name+" "+u.tel,l()]),e("div",{class:ae("address")},[u.address])];return a&&!r?e(un,{attrs:{name:u.id,iconSize:18}},[h]):h}return e("div",{class:ae({disabled:r}),on:{click:s}},[e(q,T([{attrs:{border:!1,valueClass:ae("value")},scopedSlots:{default:c,"right-icon":o}},B(n)])),i.bottom==null?void 0:i.bottom(m({},t.data,{disabled:r}))])}Da.props={data:Object,disabled:Boolean,switchable:Boolean,defaultTagText:String};const Iu=_u(Da);var hn=p("address-list"),Ou=hn[0],ei=hn[1],Pu=hn[2];function Na(e,t,i,n){function r(o,l){if(o)return o.map(function(c,u){return e(Iu,{attrs:{data:c,disabled:l,switchable:t.switchable,defaultTagText:t.defaultTagText},key:c.id,scopedSlots:{bottom:i["item-bottom"],tag:i.tag},on:{select:function(){I(n,l?"select-disabled":"select",c,u),l||I(n,"input",c.id)},edit:function(){I(n,l?"edit-disabled":"edit",c,u)},click:function(){I(n,"click-item",c,u)}}})})}var a=r(t.list),s=r(t.disabledList,!0);return e("div",T([{class:ei()},B(n)]),[i.top==null?void 0:i.top(),e(cn,{attrs:{value:t.value}},[a]),t.disabledText&&e("div",{class:ei("disabled-text")},[t.disabledText]),s,i.default==null?void 0:i.default(),e("div",{class:ei("bottom")},[e(F,{attrs:{round:!0,block:!0,type:"danger",text:t.addButtonText||Pu("add")},class:ei("add"),on:{click:function(){I(n,"add")}}})])])}Na.props={list:Array,value:[Number,String],disabledList:Array,disabledText:String,addButtonText:String,defaultTagText:String,switchable:{type:Boolean,default:!0}};const Bu=Ou(Na);var Ma=p("badge"),Eu=Ma[0],La=Ma[1];const Du=Eu({props:{dot:Boolean,max:[Number,String],color:String,content:[Number,String],tag:{type:String,default:"div"}},methods:{hasContent:function(){return!!(this.$scopedSlots.content||_(this.content)&&this.content!=="")},renderContent:function(){var t=this.dot,i=this.max,n=this.content;if(!t&&this.hasContent())return this.$scopedSlots.content?this.$scopedSlots.content():_(i)&&Ri(n)&&+n>i?i+"+":n},renderBadge:function(){var t=this.$createElement;if(this.hasContent()||this.dot)return t("div",{class:La({dot:this.dot,fixed:!!this.$scopedSlots.default}),style:{background:this.color}},[this.renderContent()])}},render:function(){var t=arguments[0];if(this.$scopedSlots.default){var i=this.tag;return t(i,{class:La("wrapper")},[this.$scopedSlots.default(),this.renderBadge()])}return this.renderBadge()}});var Aa=Date.now();function Nu(e){var t=Date.now(),i=Math.max(0,16-(t-Aa)),n=setTimeout(e,i);return Aa=t+i,n}var be=K?global:window,Mu=be.requestAnimationFrame||Nu,Lu=be.cancelAnimationFrame||be.clearTimeout;function at(e){return Mu.call(be,e)}function Xt(e){at(function(){at(e)})}function Ra(e){Lu.call(be,e)}function Se(e){return Object.prototype.toString.call(e)==="[object Date]"&&!Vi(e.getTime())}var dn=p("calendar"),Au=dn[0],A=dn[1],At=dn[2];function Ru(e){return At("monthTitle",e.getFullYear(),e.getMonth()+1)}function fn(e,t){var i=e.getFullYear(),n=t.getFullYear(),r=e.getMonth(),a=t.getMonth();return i===n?r===a?0:r>a?1:-1:i>n?1:-1}function kt(e,t){var i=fn(e,t);if(i===0){var n=e.getDate(),r=t.getDate();return n===r?0:n>r?1:-1}return i}function pn(e,t){return e=new Date(e),e.setDate(e.getDate()+t),e}function Vu(e){return pn(e,-1)}function Va(e){return pn(e,1)}function zu(e){var t=e[0].getTime(),i=e[1].getTime();return(i-t)/(1e3*60*60*24)+1}function vn(e){return new Date(e)}function za(e){return Array.isArray(e)?e.map(function(t){return t===null?t:vn(t)}):vn(e)}function Fu(e,t){if(e<0)return[];for(var i=-1,n=Array(e);++i<e;)n[i]=t(i);return n}function mn(e){if(!e)return 0;for(;Vi(parseInt(e,10));)if(e.length>1)e=e.slice(1);else return 0;return parseInt(e,10)}function gn(e,t){return 32-new Date(e,t-1,32).getDate()}var Hu=p("calendar-month"),ju=Hu[0];const Wu=ju({props:{date:Date,type:String,color:String,minDate:Date,maxDate:Date,showMark:Boolean,rowHeight:[Number,String],formatter:Function,lazyRender:Boolean,currentDate:[Date,Array],allowSameDay:Boolean,showSubtitle:Boolean,showMonthTitle:Boolean,firstDayOfWeek:Number},data:function(){return{visible:!1}},computed:{title:function(){return Ru(this.date)},rowHeightWithUnit:function(){return P(this.rowHeight)},offset:function(){var t=this.firstDayOfWeek,i=this.date.getDay();return t?(i+7-this.firstDayOfWeek)%7:i},totalDay:function(){return gn(this.date.getFullYear(),this.date.getMonth()+1)},shouldRender:function(){return this.visible||!this.lazyRender},placeholders:function(){for(var t=[],i=Math.ceil((this.totalDay+this.offset)/7),n=1;n<=i;n++)t.push({type:"placeholder"});return t},days:function(){for(var t=[],i=this.date.getFullYear(),n=this.date.getMonth(),r=1;r<=this.totalDay;r++){var a=new Date(i,n,r),s=this.getDayType(a),o={date:a,type:s,text:r,bottomInfo:this.getBottomInfo(s)};this.formatter&&(o=this.formatter(o)),t.push(o)}return t}},methods:{getHeight:function(){var t;return((t=this.$el)==null?void 0:t.getBoundingClientRect().height)||0},scrollIntoView:function(t){var i=this.$refs,n=i.days,r=i.month,a=this.showSubtitle?n:r,s=a.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop;Ve(t,s)},getMultipleDayType:function(t){var i=this,n=function(c){return i.currentDate.some(function(u){return kt(u,c)===0})};if(n(t)){var r=Vu(t),a=Va(t),s=n(r),o=n(a);return s&&o?"multiple-middle":s?"end":o?"start":"multiple-selected"}return""},getRangeDayType:function(t){var i=this.currentDate,n=i[0],r=i[1];if(!n)return"";var a=kt(t,n);if(!r)return a===0?"start":"";var s=kt(t,r);if(a===0&&s===0&&this.allowSameDay)return"start-end";if(a===0)return"start";if(s===0)return"end";if(a>0&&s<0)return"middle"},getDayType:function(t){var i=this.type,n=this.minDate,r=this.maxDate,a=this.currentDate;if(kt(t,n)<0||kt(t,r)>0)return"disabled";if(a!==null){if(i==="single")return kt(t,a)===0?"selected":"";if(i==="multiple")return this.getMultipleDayType(t);if(i==="range")return this.getRangeDayType(t)}},getBottomInfo:function(t){if(this.type==="range"){if(t==="start"||t==="end")return At(t);if(t==="start-end")return At("startEnd")}},getDayStyle:function(t,i){var n={height:this.rowHeightWithUnit};return t==="placeholder"?(n.width="100%",n):(i===0&&(n.marginLeft=100*this.offset/7+"%"),this.color&&(t==="start"||t==="end"||t==="start-end"||t==="multiple-selected"||t==="multiple-middle"?n.background=this.color:t==="middle"&&(n.color=this.color)),n)},genTitle:function(){var t=this.$createElement;if(this.showMonthTitle)return t("div",{class:A("month-title")},[this.title])},genMark:function(){var t=this.$createElement;if(this.showMark&&this.shouldRender)return t("div",{class:A("month-mark")},[this.date.getMonth()+1])},genDays:function(){var t=this.$createElement,i=this.shouldRender?this.days:this.placeholders;return t("div",{ref:"days",attrs:{role:"grid"},class:A("days")},[this.genMark(),i.map(this.genDay)])},genTopInfo:function(t){var i=this.$createElement,n=this.$scopedSlots["top-info"];if(t.topInfo||n)return i("div",{class:A("top-info")},[n?n(t):t.topInfo])},genBottomInfo:function(t){var i=this.$createElement,n=this.$scopedSlots["bottom-info"];if(t.bottomInfo||n)return i("div",{class:A("bottom-info")},[n?n(t):t.bottomInfo])},genDay:function(t,i){var n=this,r=this.$createElement,a=t.type,s=this.getDayStyle(a,i),o=a==="disabled",l=function(){o||n.$emit("click",t)};return a==="selected"?r("div",{attrs:{role:"gridcell",tabindex:-1},style:s,class:[A("day"),t.className],on:{click:l}},[r("div",{class:A("selected-day"),style:{width:this.rowHeightWithUnit,height:this.rowHeightWithUnit,background:this.color}},[this.genTopInfo(t),t.text,this.genBottomInfo(t)])]):r("div",{attrs:{role:"gridcell",tabindex:o?null:-1},style:s,class:[A("day",a),t.className],on:{click:l}},[this.genTopInfo(t),t.text,this.genBottomInfo(t)])}},render:function(){var t=arguments[0];return t("div",{class:A("month"),ref:"month"},[this.genTitle(),this.genDays()])}});var Uu=p("calendar-header"),qu=Uu[0];const Ku=qu({props:{title:String,subtitle:String,showTitle:Boolean,showSubtitle:Boolean,firstDayOfWeek:Number},methods:{genTitle:function(){var t=this.$createElement;if(this.showTitle){var i=this.slots("title")||this.title||At("title");return t("div",{class:A("header-title")},[i])}},genSubtitle:function(){var t=this.$createElement;if(this.showSubtitle)return t("div",{class:A("header-subtitle")},[this.subtitle])},genWeekDays:function(){var t=this.$createElement,i=At("weekdays"),n=this.firstDayOfWeek,r=[].concat(i.slice(n,7),i.slice(0,n));return t("div",{class:A("weekdays")},[r.map(function(a){return t("span",{class:A("weekday")},[a])})])}},render:function(){var t=arguments[0];return t("div",{class:A("header")},[this.genTitle(),this.genSubtitle(),this.genWeekDays()])}}),Yu=Au({props:{title:String,color:String,value:Boolean,readonly:Boolean,formatter:Function,rowHeight:[Number,String],confirmText:String,rangePrompt:String,defaultDate:[Date,Array],getContainer:[String,Function],allowSameDay:Boolean,confirmDisabledText:String,type:{type:String,default:"single"},round:{type:Boolean,default:!0},position:{type:String,default:"bottom"},poppable:{type:Boolean,default:!0},maxRange:{type:[Number,String],default:null},lazyRender:{type:Boolean,default:!0},showMark:{type:Boolean,default:!0},showTitle:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showSubtitle:{type:Boolean,default:!0},closeOnPopstate:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0},minDate:{type:Date,validator:Se,default:function(){return new Date}},maxDate:{type:Date,validator:Se,default:function(){var t=new Date;return new Date(t.getFullYear(),t.getMonth()+6,t.getDate())}},firstDayOfWeek:{type:[Number,String],default:0,validator:function(t){return t>=0&&t<=6}}},inject:{vanPopup:{default:null}},data:function(){return{subtitle:"",currentDate:this.getInitialDate()}},computed:{months:function(){var t=[],i=new Date(this.minDate);i.setDate(1);do t.push(new Date(i)),i.setMonth(i.getMonth()+1);while(fn(i,this.maxDate)!==1);return t},buttonDisabled:function(){var t=this.type,i=this.currentDate;if(i){if(t==="range")return!i[0]||!i[1];if(t==="multiple")return!i.length}return!i},dayOffset:function(){return this.firstDayOfWeek?this.firstDayOfWeek%7:0}},watch:{value:"init",type:function(){this.reset()},defaultDate:function(t){this.currentDate=t,this.scrollIntoView()}},mounted:function(){if(this.init(),!this.poppable){var t;(t=this.vanPopup)==null||t.$on("opened",this.onScroll)}},activated:function(){this.init()},methods:{reset:function(t){t===void 0&&(t=this.getInitialDate()),this.currentDate=t,this.scrollIntoView()},init:function(){var t=this;this.poppable&&!this.value||this.$nextTick(function(){t.bodyHeight=Math.floor(t.$refs.body.getBoundingClientRect().height),t.onScroll(),t.scrollIntoView()})},scrollToDate:function(t){var i=this;at(function(){var n=i.value||!i.poppable;!t||!n||(i.months.some(function(r,a){if(fn(r,t)===0){var s=i.$refs,o=s.body,l=s.months;return l[a].scrollIntoView(o),!0}return!1}),i.onScroll())})},scrollIntoView:function(){var t=this.currentDate;if(t){var i=this.type==="single"?t:t[0];this.scrollToDate(i)}},getInitialDate:function(){var t=this.type,i=this.minDate,n=this.maxDate,r=this.defaultDate;if(r===null)return r;var a=new Date;if(kt(a,i)===-1?a=i:kt(a,n)===1&&(a=n),t==="range"){var s=r||[],o=s[0],l=s[1];return[o||a,l||Va(a)]}return t==="multiple"?r||[a]:r||a},onScroll:function(){var t=this.$refs,i=t.body,n=t.months,r=qt(i),a=r+this.bodyHeight,s=n.map(function(f){return f.getHeight()}),o=s.reduce(function(f,v){return f+v},0);if(!(a>o&&r>0)){for(var l=0,c,u=[-1,-1],h=0;h<n.length;h++){var d=l<=a&&l+s[h]>=r;d&&(u[1]=h,c||(c=n[h],u[0]=h),n[h].showed||(n[h].showed=!0,this.$emit("month-show",{date:n[h].date,title:n[h].title}))),l+=s[h]}n.forEach(function(f,v){f.visible=v>=u[0]-1&&v<=u[1]+1}),c&&(this.subtitle=c.title)}},onClickDay:function(t){if(!this.readonly){var i=t.date,n=this.type,r=this.currentDate;if(n==="range"){if(!r){this.select([i,null]);return}var a=r[0],s=r[1];if(a&&!s){var o=kt(i,a);o===1?this.select([a,i],!0):o===-1?this.select([i,null]):this.allowSameDay&&this.select([i,i],!0)}else this.select([i,null])}else if(n==="multiple"){if(!r){this.select([i]);return}var l,c=this.currentDate.some(function(d,f){var v=kt(d,i)===0;return v&&(l=f),v});if(c){var u=r.splice(l,1),h=u[0];this.$emit("unselect",vn(h))}else this.maxRange&&r.length>=this.maxRange?L(this.rangePrompt||At("rangePrompt",this.maxRange)):this.select([].concat(r,[i]))}else this.select(i,!0)}},togglePopup:function(t){this.$emit("input",t)},select:function(t,i){var n=this,r=function(o){n.currentDate=o,n.$emit("select",za(n.currentDate))};if(i&&this.type==="range"){var a=this.checkRange(t);if(!a){this.showConfirm?r([t[0],pn(t[0],this.maxRange-1)]):r(t);return}}r(t),i&&!this.showConfirm&&this.onConfirm()},checkRange:function(t){var i=this.maxRange,n=this.rangePrompt;return i&&zu(t)>i?(L(n||At("rangePrompt",i)),!1):!0},onConfirm:function(){this.$emit("confirm",za(this.currentDate))},genMonth:function(t,i){var n=this.$createElement,r=i!==0||!this.showSubtitle;return n(Wu,{ref:"months",refInFor:!0,attrs:{date:t,type:this.type,color:this.color,minDate:this.minDate,maxDate:this.maxDate,showMark:this.showMark,formatter:this.formatter,rowHeight:this.rowHeight,lazyRender:this.lazyRender,currentDate:this.currentDate,showSubtitle:this.showSubtitle,allowSameDay:this.allowSameDay,showMonthTitle:r,firstDayOfWeek:this.dayOffset},scopedSlots:{"top-info":this.$scopedSlots["top-info"],"bottom-info":this.$scopedSlots["bottom-info"]},on:{click:this.onClickDay}})},genFooterContent:function(){var t=this.$createElement,i=this.slots("footer");if(i)return i;if(this.showConfirm){var n=this.buttonDisabled?this.confirmDisabledText:this.confirmText;return t(F,{attrs:{round:!0,block:!0,type:"danger",color:this.color,disabled:this.buttonDisabled,nativeType:"button"},class:A("confirm"),on:{click:this.onConfirm}},[n||At("confirm")])}},genFooter:function(){var t=this.$createElement;return t("div",{class:A("footer",{unfit:!this.safeAreaInsetBottom})},[this.genFooterContent()])},genCalendar:function(){var t=this,i=this.$createElement;return i("div",{class:A()},[i(Ku,{attrs:{title:this.title,showTitle:this.showTitle,subtitle:this.subtitle,showSubtitle:this.showSubtitle,firstDayOfWeek:this.dayOffset},scopedSlots:{title:function(){return t.slots("title")}}}),i("div",{ref:"body",class:A("body"),on:{scroll:this.onScroll}},[this.months.map(this.genMonth)]),this.genFooter()])}},render:function(){var t=this,i=arguments[0];if(this.poppable){var n,r=function(s){return function(){return t.$emit(s)}};return i(St,{attrs:(n={round:!0,value:this.value},n.round=this.round,n.position=this.position,n.closeable=this.showTitle||this.showSubtitle,n.getContainer=this.getContainer,n.closeOnPopstate=this.closeOnPopstate,n.closeOnClickOverlay=this.closeOnClickOverlay,n),class:A("popup"),on:{input:this.togglePopup,open:r("open"),opened:r("opened"),close:r("close"),closed:r("closed")}},[this.genCalendar()])}return this.genCalendar()}});var Fa=p("image"),Xu=Fa[0],se=Fa[1];const oe=Xu({props:{src:String,fit:String,alt:String,round:Boolean,width:[Number,String],height:[Number,String],radius:[Number,String],lazyLoad:Boolean,iconPrefix:String,showError:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},errorIcon:{type:String,default:"photo-fail"},loadingIcon:{type:String,default:"photo"}},data:function(){return{loading:!0,error:!1}},watch:{src:function(){this.loading=!0,this.error=!1}},computed:{style:function(){var t={};return _(this.width)&&(t.width=P(this.width)),_(this.height)&&(t.height=P(this.height)),_(this.radius)&&(t.overflow="hidden",t.borderRadius=P(this.radius)),t}},created:function(){var t=this.$Lazyload;t&&Ae&&(t.$on("loaded",this.onLazyLoaded),t.$on("error",this.onLazyLoadError))},beforeDestroy:function(){var t=this.$Lazyload;t&&(t.$off("loaded",this.onLazyLoaded),t.$off("error",this.onLazyLoadError))},methods:{onLoad:function(t){this.loading=!1,this.$emit("load",t)},onLazyLoaded:function(t){var i=t.el;i===this.$refs.image&&this.loading&&this.onLoad()},onLazyLoadError:function(t){var i=t.el;i===this.$refs.image&&!this.error&&this.onError()},onError:function(t){this.error=!0,this.loading=!1,this.$emit("error",t)},onClick:function(t){this.$emit("click",t)},genPlaceholder:function(){var t=this.$createElement;if(this.loading&&this.showLoading)return t("div",{class:se("loading")},[this.slots("loading")||t(w,{attrs:{name:this.loadingIcon,classPrefix:this.iconPrefix},class:se("loading-icon")})]);if(this.error&&this.showError)return t("div",{class:se("error")},[this.slots("error")||t(w,{attrs:{name:this.errorIcon,classPrefix:this.iconPrefix},class:se("error-icon")})])},genImage:function(){var t=this.$createElement,i={class:se("img"),attrs:{alt:this.alt},style:{objectFit:this.fit}};if(!this.error)return this.lazyLoad?t("img",T([{ref:"image",directives:[{name:"lazy",value:this.src}]},i])):t("img",T([{attrs:{src:this.src},on:{load:this.onLoad,error:this.onError}},i]))}},render:function(){var t=arguments[0];return t("div",{class:se({round:this.round}),style:this.style,on:{click:this.onClick}},[this.genImage(),this.genPlaceholder(),this.slots()])}});var Ha=p("card"),Gu=Ha[0],Z=Ha[1];function ja(e,t,i,n){var r,a=t.thumb,s=i.num||_(t.num),o=i.price||_(t.price),l=i["origin-price"]||_(t.originPrice),c=s||o||l||i.bottom;function u(k){I(n,"click-thumb",k)}function h(){if(i.tag||t.tag)return e("div",{class:Z("tag")},[i.tag?i.tag():e(ti,{attrs:{mark:!0,type:"danger"}},[t.tag])])}function d(){if(i.thumb||a)return e("a",{attrs:{href:t.thumbLink},class:Z("thumb"),on:{click:u}},[i.thumb?i.thumb():e(oe,{attrs:{src:a,width:"100%",height:"100%",fit:"cover","lazy-load":t.lazyLoad}}),h()])}function f(){if(i.title)return i.title();if(t.title)return e("div",{class:[Z("title"),"van-multi-ellipsis--l2"]},[t.title])}function v(){if(i.desc)return i.desc();if(t.desc)return e("div",{class:[Z("desc"),"van-ellipsis"]},[t.desc])}function g(){var k=t.price.toString().split(".");return e("div",[e("span",{class:Z("price-currency")},[t.currency]),e("span",{class:Z("price-integer")},[k[0]]),".",e("span",{class:Z("price-decimal")},[k[1]])])}function y(){if(o)return e("div",{class:Z("price")},[i.price?i.price():g()])}function b(){if(l){var k=i["origin-price"];return e("div",{class:Z("origin-price")},[k?k():t.currency+" "+t.originPrice])}}function S(){if(s)return e("div",{class:Z("num")},[i.num?i.num():"x"+t.num])}function x(){if(i.footer)return e("div",{class:Z("footer")},[i.footer()])}return e("div",T([{class:Z()},B(n,!0)]),[e("div",{class:Z("header")},[d(),e("div",{class:Z("content",{centered:t.centered})},[e("div",[f(),v(),i.tags==null?void 0:i.tags()]),c&&e("div",{class:"van-card__bottom"},[(r=i["price-top"])==null?void 0:r.call(i),y(),b(),S(),i.bottom==null?void 0:i.bottom()])])]),x()])}ja.props={tag:String,desc:String,thumb:String,title:String,centered:Boolean,lazyLoad:Boolean,thumbLink:String,num:[Number,String],price:[Number,String],originPrice:[Number,String],currency:{type:String,default:"¥"}};const Zu=Gu(ja);var Wa=p("tab"),Ju=Wa[0],yn=Wa[1];const ii=Ju({mixins:[X("vanTabs")],props:m({},Mt,{dot:Boolean,name:[Number,String],info:[Number,String],badge:[Number,String],title:String,titleStyle:null,titleClass:null,disabled:Boolean}),data:function(){return{inited:!1}},computed:{computedName:function(){var t;return(t=this.name)!=null?t:this.index},isActive:function(){var t=this.computedName===this.parent.currentName;return t&&(this.inited=!0),t}},watch:{title:function(){this.parent.setLine(),this.parent.scrollIntoView()},inited:function(t){var i=this;this.parent.lazyRender&&t&&this.$nextTick(function(){i.parent.$emit("rendered",i.computedName,i.title)})}},render:function(t){var i=this.slots,n=this.parent,r=this.isActive,a=i();if(process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] Tab: "info" prop is deprecated, use "badge" prop instead.'),!(!a&&!n.animated)){var s=n.scrollspy||r,o=this.inited||n.scrollspy||!n.lazyRender,l=o?a:t();return n.animated?t("div",{attrs:{role:"tabpanel","aria-hidden":!r},class:yn("pane-wrapper",{inactive:!r})},[t("div",{class:yn("pane")},[l])]):t("div",{directives:[{name:"show",value:s}],attrs:{role:"tabpanel"},class:yn("pane")},[l])}}});function Qu(e,t,i){var n=0,r=e.scrollLeft,a=i===0?1:Math.round(i*1e3/16);function s(){e.scrollLeft+=(t-r)/a,++n<a&&at(s)}s()}function th(e,t,i,n){var r=qt(e),a=r<t,s=i===0?1:Math.round(i*1e3/16),o=(t-r)/s;function l(){r+=o,(a&&r>t||!a&&r<t)&&(r=t),Ve(e,r),a&&r<t||!a&&r>t?at(l):n&&at(n)}l()}function ke(e){var t=window.getComputedStyle(e),i=t.display==="none",n=e.offsetParent===null&&t.position!=="fixed";return i||n}function Ua(e){var t=e.interceptor,i=e.args,n=e.done;if(t){var r=t.apply(void 0,i);Re(r)?r.then(function(a){a&&n()}).catch(pe):r&&n()}else n()}var qa=p("tab"),eh=qa[0],bn=qa[1];const ih=eh({props:{dot:Boolean,type:String,info:[Number,String],color:String,title:String,isActive:Boolean,disabled:Boolean,scrollable:Boolean,activeColor:String,inactiveColor:String},computed:{style:function(){var t={},i=this.color,n=this.isActive,r=this.type==="card";i&&r&&(t.borderColor=i,this.disabled||(n?t.backgroundColor=i:t.color=i));var a=n?this.activeColor:this.inactiveColor;return a&&(t.color=a),t}},methods:{onClick:function(){this.$emit("click")},genText:function(){var t=this.$createElement,i=t("span",{class:bn("text",{ellipsis:!this.scrollable})},[this.slots()||this.title]);return this.dot||_(this.info)&&this.info!==""?t("span",{class:bn("text-wrapper")},[i,t(Kt,{attrs:{dot:this.dot,info:this.info}})]):i}},render:function(){var t=arguments[0];return t("div",{attrs:{role:"tab","aria-selected":this.isActive},class:[bn({active:this.isActive,disabled:this.disabled})],style:this.style,on:{click:this.onClick}},[this.genText()])}});var Ka=p("sticky"),nh=Ka[0],rh=Ka[1];const Ya=nh({mixins:[ut(function(e,t){if(this.scroller||(this.scroller=Ut(this.$el)),this.observer){var i=t?"observe":"unobserve";this.observer[i](this.$el)}e(this.scroller,"scroll",this.onScroll,!0),this.onScroll()})],props:{zIndex:[Number,String],container:null,offsetTop:{type:[Number,String],default:0}},data:function(){return{fixed:!1,height:0,transform:0}},computed:{offsetTopPx:function(){return Fi(this.offsetTop)},style:function(){if(this.fixed){var t={};return _(this.zIndex)&&(t.zIndex=this.zIndex),this.offsetTopPx&&this.fixed&&(t.top=this.offsetTopPx+"px"),this.transform&&(t.transform="translate3d(0, "+this.transform+"px, 0)"),t}}},watch:{fixed:function(t){this.$emit("change",t)}},created:function(){var t=this;!K&&window.IntersectionObserver&&(this.observer=new IntersectionObserver(function(i){i[0].intersectionRatio>0&&t.onScroll()},{root:document.body}))},methods:{onScroll:function(){var t=this;if(!ke(this.$el)){this.height=this.$el.offsetHeight;var i=this.container,n=this.offsetTopPx,r=qt(window),a=Wi(this.$el),s=function(){t.$emit("scroll",{scrollTop:r,isFixed:t.fixed})};if(i){var o=a+i.offsetHeight;if(r+n+this.height>o){var l=this.height+r-o;l<this.height?(this.fixed=!0,this.transform=-(l+n)):this.fixed=!1,s();return}}r+n>a?(this.fixed=!0,this.transform=0):this.fixed=!1,s()}}},render:function(){var t=arguments[0],i=this.fixed,n={height:i?this.height+"px":null};return t("div",{style:n},[t("div",{class:rh({fixed:i}),style:this.style},[this.slots()])])}});var Xa=p("tabs"),ah=Xa[0],Ga=Xa[1],sh=50;const oh=ah({mixins:[nt],props:{count:Number,duration:[Number,String],animated:Boolean,swipeable:Boolean,currentIndex:Number},computed:{style:function(){if(this.animated)return{transform:"translate3d("+-1*this.currentIndex*100+"%, 0, 0)",transitionDuration:this.duration+"s"}},listeners:function(){if(this.swipeable)return{touchstart:this.touchStart,touchmove:this.touchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}}},methods:{onTouchEnd:function(){var t=this.direction,i=this.deltaX,n=this.currentIndex;t==="horizontal"&&this.offsetX>=sh&&(i>0&&n!==0?this.$emit("change",n-1):i<0&&n!==this.count-1&&this.$emit("change",n+1))},genChildren:function(){var t=this.$createElement;return this.animated?t("div",{class:Ga("track"),style:this.style},[this.slots()]):this.slots()}},render:function(){var t=arguments[0];return t("div",{class:Ga("content",{animated:this.animated}),on:m({},this.listeners)},[this.genChildren()])}});var Za=p("tabs"),lh=Za[0],ni=Za[1];const Sn=lh({mixins:[G("vanTabs"),ut(function(e){this.scroller||(this.scroller=Ut(this.$el)),e(window,"resize",this.resize,!0),this.scrollspy&&e(this.scroller,"scroll",this.onScroll,!0)})],inject:{vanPopup:{default:null}},model:{prop:"active"},props:{color:String,border:Boolean,sticky:Boolean,animated:Boolean,swipeable:Boolean,scrollspy:Boolean,background:String,lineWidth:[Number,String],lineHeight:[Number,String],beforeChange:Function,titleActiveColor:String,titleInactiveColor:String,type:{type:String,default:"line"},active:{type:[Number,String],default:0},ellipsis:{type:Boolean,default:!0},duration:{type:[Number,String],default:.3},offsetTop:{type:[Number,String],default:0},lazyRender:{type:Boolean,default:!0},swipeThreshold:{type:[Number,String],default:5}},data:function(){return{position:"",currentIndex:null,lineStyle:{backgroundColor:this.color}}},computed:{scrollable:function(){return this.children.length>this.swipeThreshold||!this.ellipsis},navStyle:function(){return{borderColor:this.color,background:this.background}},currentName:function(){var t=this.children[this.currentIndex];if(t)return t.computedName},offsetTopPx:function(){return Fi(this.offsetTop)},scrollOffset:function(){return this.sticky?this.offsetTopPx+this.tabHeight:0}},watch:{color:"setLine",active:function(t){t!==this.currentName&&this.setCurrentIndexByName(t)},children:function(){var t=this;this.setCurrentIndexByName(this.active),this.setLine(),this.$nextTick(function(){t.scrollIntoView(!0)})},currentIndex:function(){this.scrollIntoView(),this.setLine(),this.stickyFixed&&!this.scrollspy&&ze(Math.ceil(Wi(this.$el)-this.offsetTopPx))},scrollspy:function(t){t?it(this.scroller,"scroll",this.onScroll,!0):Nt(this.scroller,"scroll",this.onScroll)}},mounted:function(){var t=this;this.init(),this.vanPopup&&this.vanPopup.onReopen(function(){t.setLine()})},activated:function(){this.init(),this.setLine()},methods:{resize:function(){this.setLine()},init:function(){var t=this;this.$nextTick(function(){t.inited=!0,t.tabHeight=kc(t.$refs.wrap),t.scrollIntoView(!0)})},setLine:function(){var t=this,i=this.inited;this.$nextTick(function(){var n=t.$refs.titles;if(!(!n||!n[t.currentIndex]||t.type!=="line"||ke(t.$el))){var r=n[t.currentIndex].$el,a=t.lineWidth,s=t.lineHeight,o=r.offsetLeft+r.offsetWidth/2,l={width:P(a),backgroundColor:t.color,transform:"translateX("+o+"px) translateX(-50%)"};if(i&&(l.transitionDuration=t.duration+"s"),_(s)){var c=P(s);l.height=c,l.borderRadius=c}t.lineStyle=l}})},setCurrentIndexByName:function(t){var i=this.children.filter(function(r){return r.computedName===t}),n=(this.children[0]||{}).index||0;this.setCurrentIndex(i.length?i[0].index:n)},setCurrentIndex:function(t){var i=this.findAvailableTab(t);if(_(i)){var n=this.children[i],r=n.computedName,a=this.currentIndex!==null;this.currentIndex=i,r!==this.active&&(this.$emit("input",r),a&&this.$emit("change",r,n.title))}},findAvailableTab:function(t){for(var i=t<this.currentIndex?-1:1;t>=0&&t<this.children.length;){if(!this.children[t].disabled)return t;t+=i}},onClick:function(t,i){var n=this,r=this.children[i],a=r.title,s=r.disabled,o=r.computedName;s?this.$emit("disabled",o,a):(Ua({interceptor:this.beforeChange,args:[o],done:function(){n.setCurrentIndex(i),n.scrollToCurrentContent()}}),this.$emit("click",o,a),Yt(t.$router,t))},scrollIntoView:function(t){var i=this.$refs.titles;if(!(!this.scrollable||!i||!i[this.currentIndex])){var n=this.$refs.nav,r=i[this.currentIndex].$el,a=r.offsetLeft-(n.offsetWidth-r.offsetWidth)/2;Qu(n,a,t?0:+this.duration)}},onSticktScroll:function(t){this.stickyFixed=t.isFixed,this.$emit("scroll",t)},scrollTo:function(t){var i=this;this.$nextTick(function(){i.setCurrentIndexByName(t),i.scrollToCurrentContent(!0)})},scrollToCurrentContent:function(t){var i=this;if(t===void 0&&(t=!1),this.scrollspy){var n=this.children[this.currentIndex],r=n==null?void 0:n.$el;if(r){var a=Wi(r,this.scroller)-this.scrollOffset;this.lockScroll=!0,th(this.scroller,a,t?0:+this.duration,function(){i.lockScroll=!1})}}},onScroll:function(){if(this.scrollspy&&!this.lockScroll){var t=this.getCurrentIndexOnScroll();this.setCurrentIndex(t)}},getCurrentIndexOnScroll:function(){for(var t=this.children,i=0;i<t.length;i++){var n=Cc(t[i].$el);if(n>this.scrollOffset)return i===0?0:i-1}return t.length-1}},render:function(){var t=this,i,n=arguments[0],r=this.type,a=this.animated,s=this.scrollable,o=this.children.map(function(c,u){var h;return n(ih,{ref:"titles",refInFor:!0,attrs:{type:r,dot:c.dot,info:(h=c.badge)!=null?h:c.info,title:c.title,color:t.color,isActive:u===t.currentIndex,disabled:c.disabled,scrollable:s,activeColor:t.titleActiveColor,inactiveColor:t.titleInactiveColor},style:c.titleStyle,class:c.titleClass,scopedSlots:{default:function(){return c.slots("title")}},on:{click:function(){t.onClick(c,u)}}})}),l=n("div",{ref:"wrap",class:[ni("wrap",{scrollable:s}),(i={},i[Ue]=r==="line"&&this.border,i)]},[n("div",{ref:"nav",attrs:{role:"tablist"},class:ni("nav",[r,{complete:this.scrollable}]),style:this.navStyle},[this.slots("nav-left"),o,r==="line"&&n("div",{class:ni("line"),style:this.lineStyle}),this.slots("nav-right")])]);return n("div",{class:ni([r])},[this.sticky?n(Ya,{attrs:{container:this.$el,offsetTop:this.offsetTop},on:{scroll:this.onSticktScroll}},[l]):l,n(oh,{attrs:{count:this.children.length,animated:a,duration:this.duration,swipeable:this.swipeable,currentIndex:this.currentIndex},on:{change:this.setCurrentIndex}},[this.slots()])])}});var kn=p("cascader"),ch=kn[0],Ot=kn[1],uh=kn[2];const hh=ch({props:{title:String,value:[Number,String],fieldNames:Object,placeholder:String,activeColor:String,options:{type:Array,default:function(){return[]}},closeable:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0}},data:function(){return{tabs:[],activeTab:0}},computed:{textKey:function(){var t;return((t=this.fieldNames)==null?void 0:t.text)||"text"},valueKey:function(){var t;return((t=this.fieldNames)==null?void 0:t.value)||"value"},childrenKey:function(){var t;return((t=this.fieldNames)==null?void 0:t.children)||"children"}},watch:{options:{deep:!0,handler:"updateTabs"},value:function(t){var i=this;if(t||t===0){var n=this.tabs.map(function(r){var a;return(a=r.selectedOption)==null?void 0:a[i.valueKey]});if(n.indexOf(t)!==-1)return}this.updateTabs()}},created:function(){this.updateTabs()},methods:{getSelectedOptionsByValue:function(t,i){for(var n=0;n<t.length;n++){var r=t[n];if(r[this.valueKey]===i)return[r];if(r[this.childrenKey]){var a=this.getSelectedOptionsByValue(r[this.childrenKey],i);if(a)return[r].concat(a)}}},updateTabs:function(){var t=this;if(this.value||this.value===0){var i=this.getSelectedOptionsByValue(this.options,this.value);if(i){var n=this.options;this.tabs=i.map(function(r){var a={options:n,selectedOption:r},s=n.filter(function(o){return o[t.valueKey]===r[t.valueKey]});return s.length&&(n=s[0][t.childrenKey]),a}),n&&this.tabs.push({options:n,selectedOption:null}),this.$nextTick(function(){t.activeTab=t.tabs.length-1});return}}this.tabs=[{options:this.options,selectedOption:null}]},onSelect:function(t,i){var n=this;if(this.tabs[i].selectedOption=t,this.tabs.length>i+1&&(this.tabs=this.tabs.slice(0,i+1)),t[this.childrenKey]){var r={options:t[this.childrenKey],selectedOption:null};this.tabs[i+1]?this.$set(this.tabs,i+1,r):this.tabs.push(r),this.$nextTick(function(){n.activeTab++})}var a=this.tabs.map(function(o){return o.selectedOption}).filter(function(o){return!!o}),s={value:t[this.valueKey],tabIndex:i,selectedOptions:a};this.$emit("input",t[this.valueKey]),this.$emit("change",s),t[this.childrenKey]||this.$emit("finish",s)},onClose:function(){this.$emit("close")},renderHeader:function(){var t=this.$createElement;if(this.showHeader)return t("div",{class:Ot("header")},[t("h2",{class:Ot("title")},[this.slots("title")||this.title]),this.closeable?t(w,{attrs:{name:"cross"},class:Ot("close-icon"),on:{click:this.onClose}}):null])},renderOptions:function(t,i,n){var r=this,a=this.$createElement,s=function(l){var c=i&&l[r.valueKey]===i[r.valueKey],u=r.slots("option",{option:l,selected:c})||a("span",[l[r.textKey]]);return a("li",{class:Ot("option",{selected:c}),style:{color:c?r.activeColor:null},on:{click:function(){r.onSelect(l,n)}}},[u,c?a(w,{attrs:{name:"success"},class:Ot("selected-icon")}):null])};return a("ul",{class:Ot("options")},[t.map(s)])},renderTab:function(t,i){var n=this.$createElement,r=t.options,a=t.selectedOption,s=a?a[this.textKey]:this.placeholder||uh("select");return n(ii,{attrs:{title:s,titleClass:Ot("tab",{unselected:!a})}},[this.renderOptions(r,a,i)])},renderTabs:function(){var t=this,i=this.$createElement;return i(Sn,{attrs:{animated:!0,swipeable:!0,swipeThreshold:0,color:this.activeColor},class:Ot("tabs"),model:{value:t.activeTab,callback:function(r){t.activeTab=r}}},[this.tabs.map(this.renderTab)])}},render:function(){var t=arguments[0];return t("div",{class:Ot()},[this.renderHeader(),this.renderTabs()])}});var Ja=p("cell-group"),dh=Ja[0],Qa=Ja[1];function ts(e,t,i,n){var r,a=e("div",T([{class:[Qa({inset:t.inset}),(r={},r[Ue]=t.border,r)]},B(n,!0)]),[i.default==null?void 0:i.default()]);return t.title||i.title?e("div",{key:n.data.key},[e("div",{class:Qa("title",{inset:t.inset})},[i.title?i.title():t.title]),a]):a}ts.props={title:String,inset:Boolean,border:{type:Boolean,default:!0}};const es=dh(ts);var is=p("checkbox"),fh=is[0],ph=is[1];const ns=fh({mixins:[Pa({bem:ph,role:"checkbox",parent:"vanCheckbox"})],computed:{checked:{get:function(){return this.parent?this.parent.value.indexOf(this.name)!==-1:this.value},set:function(t){this.parent?this.setParentValue(t):this.$emit("input",t)}}},watch:{value:function(t){this.$emit("change",t)}},methods:{toggle:function(t){var i=this;t===void 0&&(t=!this.checked),clearTimeout(this.toggleTask),this.toggleTask=setTimeout(function(){i.checked=t})},setParentValue:function(t){var i=this.parent,n=i.value.slice();if(t){if(i.max&&n.length>=i.max)return;n.indexOf(this.name)===-1&&(n.push(this.name),i.$emit("input",n))}else{var r=n.indexOf(this.name);r!==-1&&(n.splice(r,1),i.$emit("input",n))}}}});var rs=p("checkbox-group"),vh=rs[0],mh=rs[1];const gh=vh({mixins:[G("vanCheckbox"),Lt],props:{max:[Number,String],disabled:Boolean,direction:String,iconSize:[Number,String],checkedColor:String,value:{type:Array,default:function(){return[]}}},watch:{value:function(t){this.$emit("change",t)}},methods:{toggleAll:function(t){t===void 0&&(t={}),typeof t=="boolean"&&(t={checked:t});var i=t,n=i.checked,r=i.skipDisabled,a=this.children.filter(function(o){return o.disabled&&r?o.checked:n??!o.checked}),s=a.map(function(o){return o.name});this.$emit("input",s)}},render:function(){var t=arguments[0];return t("div",{class:mh([this.direction])},[this.slots()])}});var as=p("circle"),yh=as[0],ri=as[1],ss=3140,bh=0;function os(e){return Math.min(Math.max(e,0),100)}function Sh(e,t){var i=e?1:0;return"M "+t/2+" "+t/2+" m 0, -500 a 500, 500 0 1, "+i+" 0, 1000 a 500, 500 0 1, "+i+" 0, -1000"}const kh=yh({props:{text:String,size:[Number,String],color:[String,Object],layerColor:String,strokeLinecap:String,value:{type:Number,default:0},speed:{type:[Number,String],default:0},fill:{type:String,default:"none"},rate:{type:[Number,String],default:100},strokeWidth:{type:[Number,String],default:40},clockwise:{type:Boolean,default:!0}},beforeCreate:function(){this.uid="van-circle-gradient-"+bh++},computed:{style:function(){var t=P(this.size);return{width:t,height:t}},path:function(){return Sh(this.clockwise,this.viewBoxSize)},viewBoxSize:function(){return+this.strokeWidth+1e3},layerStyle:function(){return{fill:""+this.fill,stroke:""+this.layerColor,strokeWidth:this.strokeWidth+"px"}},hoverStyle:function(){var t=ss*this.value/100;return{stroke:""+(this.gradient?"url(#"+this.uid+")":this.color),strokeWidth:+this.strokeWidth+1+"px",strokeLinecap:this.strokeLinecap,strokeDasharray:t+"px "+ss+"px"}},gradient:function(){return ct(this.color)},LinearGradient:function(){var t=this,i=this.$createElement;if(this.gradient){var n=Object.keys(this.color).sort(function(r,a){return parseFloat(r)-parseFloat(a)}).map(function(r,a){return i("stop",{key:a,attrs:{offset:r,"stop-color":t.color[r]}})});return i("defs",[i("linearGradient",{attrs:{id:this.uid,x1:"100%",y1:"0%",x2:"0%",y2:"0%"}},[n])])}}},watch:{rate:{handler:function(t){this.startTime=Date.now(),this.startRate=this.value,this.endRate=os(t),this.increase=this.endRate>this.startRate,this.duration=Math.abs((this.startRate-this.endRate)*1e3/this.speed),this.speed?(Ra(this.rafId),this.rafId=at(this.animate)):this.$emit("input",this.endRate)},immediate:!0}},methods:{animate:function(){var t=Date.now(),i=Math.min((t-this.startTime)/this.duration,1),n=i*(this.endRate-this.startRate)+this.startRate;this.$emit("input",os(parseFloat(n.toFixed(1)))),(this.increase?n<this.endRate:n>this.endRate)&&(this.rafId=at(this.animate))}},render:function(){var t=arguments[0];return t("div",{class:ri(),style:this.style},[t("svg",{attrs:{viewBox:"0 0 "+this.viewBoxSize+" "+this.viewBoxSize}},[this.LinearGradient,t("path",{class:ri("layer"),style:this.layerStyle,attrs:{d:this.path}}),t("path",{attrs:{d:this.path},class:ri("hover"),style:this.hoverStyle})]),this.slots()||this.text&&t("div",{class:ri("text")},[this.text])])}});var ls=p("col"),Ch=ls[0],$h=ls[1];const wh=Ch({mixins:[X("vanRow")],props:{span:[Number,String],offset:[Number,String],tag:{type:String,default:"div"}},computed:{style:function(){var t=this.index,i=this.parent||{},n=i.spaces;if(n&&n[t]){var r=n[t],a=r.left,s=r.right;return{paddingLeft:a?a+"px":null,paddingRight:s?s+"px":null}}}},methods:{onClick:function(t){this.$emit("click",t)}},render:function(){var t,i=arguments[0],n=this.span,r=this.offset;return i(this.tag,{style:this.style,class:$h((t={},t[n]=n,t["offset-"+r]=r,t)),on:{click:this.onClick}},[this.slots()])}});var cs=p("collapse"),xh=cs[0],Th=cs[1];const _h=xh({mixins:[G("vanCollapse")],props:{accordion:Boolean,value:[String,Number,Array],border:{type:Boolean,default:!0}},methods:{switch:function(t,i){this.accordion||(t=i?this.value.concat(t):this.value.filter(function(n){return n!==t})),this.$emit("change",t),this.$emit("input",t)}},render:function(){var t,i=arguments[0];return i("div",{class:[Th(),(t={},t[Ue]=this.border,t)]},[this.slots()])}});var us=p("collapse-item"),Ih=us[0],ai=us[1],Oh=["title","icon","right-icon"];const Ph=Ih({mixins:[X("vanCollapse")],props:m({},tn,{name:[Number,String],disabled:Boolean,lazyRender:{type:Boolean,default:!0},isLink:{type:Boolean,default:!0}}),data:function(){return{show:null,inited:null}},computed:{currentName:function(){var t;return(t=this.name)!=null?t:this.index},expanded:function(){var t=this;if(!this.parent)return null;var i=this.parent,n=i.value,r=i.accordion;if(process.env.NODE_ENV==="development"&&!r&&!Array.isArray(n)){console.error('[Vant] Collapse: type of prop "value" should be Array');return}return r?n===this.currentName:n.some(function(a){return a===t.currentName})}},created:function(){this.show=this.expanded,this.inited=this.expanded},watch:{expanded:function(t,i){var n=this;if(i!==null){t&&(this.show=!0,this.inited=!0);var r=t?this.$nextTick:at;r(function(){var a=n.$refs,s=a.content,o=a.wrapper;if(!(!s||!o)){var l=s.offsetHeight;if(l){var c=l+"px";o.style.height=t?0:c,Xt(function(){o.style.height=t?c:0})}else n.onTransitionEnd()}})}}},methods:{onClick:function(){this.disabled||this.toggle()},toggle:function(t){t===void 0&&(t=!this.expanded);var i=this.parent,n=this.currentName,r=i.accordion&&n===i.value,a=r?"":n;this.parent.switch(a,t)},onTransitionEnd:function(){this.expanded?this.$refs.wrapper.style.height="":this.show=!1},genTitle:function(){var t=this,i=this.$createElement,n=this.border,r=this.disabled,a=this.expanded,s=Oh.reduce(function(o,l){return t.slots(l)&&(o[l]=function(){return t.slots(l)}),o},{});return this.slots("value")&&(s.default=function(){return t.slots("value")}),i(q,{attrs:{role:"button",tabindex:r?-1:0,"aria-expanded":String(a)},class:ai("title",{disabled:r,expanded:a,borderless:!n}),on:{click:this.onClick},scopedSlots:s,props:m({},this.$props)})},genContent:function(){var t=this.$createElement;if(this.inited||!this.lazyRender)return t("div",{directives:[{name:"show",value:this.show}],ref:"wrapper",class:ai("wrapper"),on:{transitionend:this.onTransitionEnd}},[t("div",{ref:"content",class:ai("content")},[this.slots()])])}},render:function(){var t=arguments[0];return t("div",{class:[ai({border:this.index&&this.border})]},[this.genTitle(),this.genContent()])}});var Cn=p("contact-card"),Bh=Cn[0],hs=Cn[1],$n=Cn[2];function ds(e,t,i,n){var r=t.type,a=t.editable;function s(l){a&&I(n,"click",l)}function o(){return r==="add"?t.addText||$n("addText"):[e("div",[$n("name")+":"+t.name]),e("div",[$n("tel")+":"+t.tel])]}return e(q,T([{attrs:{center:!0,border:!1,isLink:a,valueClass:hs("value"),icon:r==="edit"?"contact":"add-square"},class:hs([r]),on:{click:s}},B(n)]),[o()])}ds.props={tel:String,name:String,addText:String,editable:{type:Boolean,default:!0},type:{type:String,default:"add"}};const Eh=Bh(ds);var wn=p("contact-edit"),Dh=wn[0],si=wn[1],Pt=wn[2],xn={tel:"",name:""};const Nh=Dh({props:{isEdit:Boolean,isSaving:Boolean,isDeleting:Boolean,showSetDefault:Boolean,setDefaultLabel:String,contactInfo:{type:Object,default:function(){return m({},xn)}},telValidator:{type:Function,default:Kr}},data:function(){return{data:m({},xn,this.contactInfo),errorInfo:{name:"",tel:""}}},watch:{contactInfo:function(t){this.data=m({},xn,t)}},methods:{onFocus:function(t){this.errorInfo[t]=""},getErrorMessageByKey:function(t){var i=this.data[t].trim();switch(t){case"name":return i?"":Pt("nameInvalid");case"tel":return this.telValidator(i)?"":Pt("telInvalid")}},onSave:function(){var t=this,i=["name","tel"].every(function(n){var r=t.getErrorMessageByKey(n);return r&&(t.errorInfo[n]=r),!r});i&&!this.isSaving&&this.$emit("save",this.data)},onDelete:function(){var t=this;D.confirm({title:Pt("confirmDelete")}).then(function(){t.$emit("delete",t.data)})}},render:function(){var t=this,i=arguments[0],n=this.data,r=this.errorInfo,a=function(o){return function(){return t.onFocus(o)}};return i("div",{class:si()},[i("div",{class:si("fields")},[i(rt,{attrs:{clearable:!0,maxlength:"30",label:Pt("name"),placeholder:Pt("nameEmpty"),errorMessage:r.name},on:{focus:a("name")},model:{value:n.name,callback:function(o){t.$set(n,"name",o)}}}),i(rt,{attrs:{clearable:!0,type:"tel",label:Pt("tel"),placeholder:Pt("telEmpty"),errorMessage:r.tel},on:{focus:a("tel")},model:{value:n.tel,callback:function(o){t.$set(n,"tel",o)}}})]),this.showSetDefault&&i(q,{attrs:{title:this.setDefaultLabel,border:!1},class:si("switch-cell")},[i(Je,{attrs:{size:24},slot:"right-icon",on:{change:function(o){t.$emit("change-default",o)}},model:{value:n.isDefault,callback:function(o){t.$set(n,"isDefault",o)}}})]),i("div",{class:si("buttons")},[i(F,{attrs:{block:!0,round:!0,type:"danger",text:Pt("save"),loading:this.isSaving},on:{click:this.onSave}}),this.isEdit&&i(F,{attrs:{block:!0,round:!0,text:Pt("delete"),loading:this.isDeleting},on:{click:this.onDelete}})])])}});var Tn=p("contact-list"),Mh=Tn[0],Rt=Tn[1],Lh=Tn[2];function fs(e,t,i,n){var r=t.list&&t.list.map(function(a,s){function o(){I(n,"input",a.id),I(n,"select",a,s)}function l(){return e(un,{attrs:{name:a.id,iconSize:16,checkedColor:Yr},on:{click:o}})}function c(){return e(w,{attrs:{name:"edit"},class:Rt("edit"),on:{click:function(d){d.stopPropagation(),I(n,"edit",a,s)}}})}function u(){var h=[a.name+","+a.tel];return a.isDefault&&t.defaultTagText&&h.push(e(ti,{attrs:{type:"danger",round:!0},class:Rt("item-tag")},[t.defaultTagText])),h}return e(q,{key:a.id,attrs:{isLink:!0,center:!0,valueClass:Rt("item-value")},class:Rt("item"),scopedSlots:{icon:c,default:u,"right-icon":l},on:{click:o}})});return e("div",T([{class:Rt()},B(n)]),[e(cn,{attrs:{value:t.value},class:Rt("group")},[r]),e("div",{class:Rt("bottom")},[e(F,{attrs:{round:!0,block:!0,type:"danger",text:t.addText||Lh("addText")},class:Rt("add"),on:{click:function(){I(n,"add")}}})])])}fs.props={value:null,list:Array,addText:String,defaultTagText:String};const Ah=Mh(fs);var _n=1e3,In=60*_n,On=60*In,ps=24*On;function Rh(e){var t=Math.floor(e/ps),i=Math.floor(e%ps/On),n=Math.floor(e%On/In),r=Math.floor(e%In/_n),a=Math.floor(e%_n);return{days:t,hours:i,minutes:n,seconds:r,milliseconds:a}}function Vh(e,t){var i=t.days,n=t.hours,r=t.minutes,a=t.seconds,s=t.milliseconds;if(e.indexOf("DD")===-1?n+=i*24:e=e.replace("DD",N(i)),e.indexOf("HH")===-1?r+=n*60:e=e.replace("HH",N(n)),e.indexOf("mm")===-1?a+=r*60:e=e.replace("mm",N(r)),e.indexOf("ss")===-1?s+=a*1e3:e=e.replace("ss",N(a)),e.indexOf("S")!==-1){var o=N(s,3);e.indexOf("SSS")!==-1?e=e.replace("SSS",o):e.indexOf("SS")!==-1?e=e.replace("SS",o.slice(0,2)):e=e.replace("S",o.charAt(0))}return e}function zh(e,t){return Math.floor(e/1e3)===Math.floor(t/1e3)}var vs=p("count-down"),Fh=vs[0],Hh=vs[1];const jh=Fh({props:{millisecond:Boolean,time:{type:[Number,String],default:0},format:{type:String,default:"HH:mm:ss"},autoStart:{type:Boolean,default:!0}},data:function(){return{remain:0}},computed:{timeData:function(){return Rh(this.remain)},formattedTime:function(){return Vh(this.format,this.timeData)}},watch:{time:{immediate:!0,handler:"reset"}},activated:function(){this.keepAlivePaused&&(this.counting=!0,this.keepAlivePaused=!1,this.tick())},deactivated:function(){this.counting&&(this.pause(),this.keepAlivePaused=!0)},beforeDestroy:function(){this.pause()},methods:{start:function(){this.counting||(this.counting=!0,this.endTime=Date.now()+this.remain,this.tick())},pause:function(){this.counting=!1,Ra(this.rafId)},reset:function(){this.pause(),this.remain=+this.time,this.autoStart&&this.start()},tick:function(){Ae&&(this.millisecond?this.microTick():this.macroTick())},microTick:function(){var t=this;this.rafId=at(function(){t.counting&&(t.setRemain(t.getRemain()),t.remain>0&&t.microTick())})},macroTick:function(){var t=this;this.rafId=at(function(){if(t.counting){var i=t.getRemain();(!zh(i,t.remain)||i===0)&&t.setRemain(i),t.remain>0&&t.macroTick()}})},getRemain:function(){return Math.max(this.endTime-Date.now(),0)},setRemain:function(t){this.remain=t,this.$emit("change",this.timeData),t===0&&(this.pause(),this.$emit("finish"))}},render:function(){var t=arguments[0];return t("div",{class:Hh()},[this.slots("default",this.timeData)||this.formattedTime])}});var Pn=p("coupon"),Wh=Pn[0],Ct=Pn[1],Bn=Pn[2];function Uh(e){return e<Math.pow(10,12)?e*1e3:+e}function ms(e){var t=new Date(Uh(e));return t.getFullYear()+"."+N(t.getMonth()+1)+"."+N(t.getDate())}function qh(e){return(e/10).toFixed(e%10===0?0:1)}function gs(e){return(e/100).toFixed(e%100===0?0:e%10===0?1:2)}const En=Wh({props:{coupon:Object,chosen:Boolean,disabled:Boolean,currency:{type:String,default:"¥"}},computed:{validPeriod:function(){var t=this.coupon,i=t.startAt,n=t.endAt,r=t.customValidPeriod;return r||ms(i)+" - "+ms(n)},faceAmount:function(){var t=this.coupon;if(t.valueDesc)return t.valueDesc+"<span>"+(t.unitDesc||"")+"</span>";if(t.denominations){var i=gs(t.denominations);return"<span>"+this.currency+"</span> "+i}return t.discount?Bn("discount",qh(t.discount)):""},conditionMessage:function(){var t=gs(this.coupon.originCondition);return t==="0"?Bn("unlimited"):Bn("condition",t)}},render:function(){var t=arguments[0],i=this.coupon,n=this.disabled,r=n&&i.reason||i.description;return t("div",{class:Ct({disabled:n})},[t("div",{class:Ct("content")},[t("div",{class:Ct("head")},[t("h2",{class:Ct("amount"),domProps:{innerHTML:this.faceAmount}}),t("p",{class:Ct("condition")},[this.coupon.condition||this.conditionMessage])]),t("div",{class:Ct("body")},[t("p",{class:Ct("name")},[i.name]),t("p",{class:Ct("valid")},[this.validPeriod]),!this.disabled&&t(ns,{attrs:{size:18,value:this.chosen,checkedColor:Yr},class:Ct("corner")})])]),r&&t("p",{class:Ct("description")},[r])])}});var Dn=p("coupon-cell"),Kh=Dn[0],ys=Dn[1],Nn=Dn[2];function Yh(e){var t=e.coupons,i=e.chosenCoupon,n=e.currency,r=t[+i];if(r){var a=0;return _(r.value)?a=r.value:_(r.denominations)&&(a=r.denominations),"-"+n+" "+(a/100).toFixed(2)}return t.length===0?Nn("tips"):Nn("count",t.length)}function Mn(e,t,i,n){var r=t.coupons[+t.chosenCoupon],a=Yh(t);return e(q,T([{class:ys(),attrs:{value:a,title:t.title||Nn("title"),border:t.border,isLink:t.editable,valueClass:ys("value",{selected:r})}},B(n,!0)]))}Mn.model={prop:"chosenCoupon"},Mn.props={title:String,coupons:{type:Array,default:function(){return[]}},currency:{type:String,default:"¥"},border:{type:Boolean,default:!0},editable:{type:Boolean,default:!0},chosenCoupon:{type:[Number,String],default:-1}};const Xh=Kh(Mn);var Ln=p("coupon-list"),Gh=Ln[0],$t=Ln[1],le=Ln[2],Zh="https://img01.yzcdn.cn/vant/coupon-empty.png";const Jh=Gh({model:{prop:"code"},props:{code:String,closeButtonText:String,inputPlaceholder:String,enabledTitle:String,disabledTitle:String,exchangeButtonText:String,exchangeButtonLoading:Boolean,exchangeButtonDisabled:Boolean,exchangeMinLength:{type:Number,default:1},chosenCoupon:{type:Number,default:-1},coupons:{type:Array,default:function(){return[]}},disabledCoupons:{type:Array,default:function(){return[]}},displayedCouponIndex:{type:Number,default:-1},showExchangeBar:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},showCount:{type:Boolean,default:!0},currency:{type:String,default:"¥"},emptyImage:{type:String,default:Zh}},data:function(){return{tab:0,winHeight:window.innerHeight,currentCode:this.code||""}},computed:{buttonDisabled:function(){return!this.exchangeButtonLoading&&(this.exchangeButtonDisabled||!this.currentCode||this.currentCode.length<this.exchangeMinLength)},listStyle:function(){return{height:this.winHeight-(this.showExchangeBar?140:94)+"px"}}},watch:{code:function(t){this.currentCode=t},currentCode:function(t){this.$emit("input",t)},displayedCouponIndex:"scrollToShowCoupon"},mounted:function(){this.scrollToShowCoupon(this.displayedCouponIndex)},methods:{onClickExchangeButton:function(){this.$emit("exchange",this.currentCode),this.code||(this.currentCode="")},scrollToShowCoupon:function(t){var i=this;t!==-1&&this.$nextTick(function(){var n=i.$refs,r=n.card,a=n.list;a&&r&&r[t]&&(a.scrollTop=r[t].$el.offsetTop-100)})},genEmpty:function(){var t=this.$createElement;return t("div",{class:$t("empty")},[t("img",{attrs:{src:this.emptyImage}}),t("p",[le("empty")])])},genExchangeButton:function(){var t=this.$createElement;return t(F,{attrs:{plain:!0,type:"danger",text:this.exchangeButtonText||le("exchange"),loading:this.exchangeButtonLoading,disabled:this.buttonDisabled},class:$t("exchange"),on:{click:this.onClickExchangeButton}})}},render:function(){var t=this,i=arguments[0],n=this.coupons,r=this.disabledCoupons,a=this.showCount?" ("+n.length+")":"",s=(this.enabledTitle||le("enable"))+a,o=this.showCount?" ("+r.length+")":"",l=(this.disabledTitle||le("disabled"))+o,c=this.showExchangeBar&&i("div",{class:$t("exchange-bar")},[i(rt,{attrs:{clearable:!0,border:!1,placeholder:this.inputPlaceholder||le("placeholder"),maxlength:"20"},class:$t("field"),model:{value:t.currentCode,callback:function(v){t.currentCode=v}}}),this.genExchangeButton()]),u=function(v){return function(){return t.$emit("change",v)}},h=i(ii,{attrs:{title:s}},[i("div",{class:$t("list",{"with-bottom":this.showCloseButton}),style:this.listStyle},[n.map(function(f,v){return i(En,{ref:"card",key:f.id,attrs:{coupon:f,currency:t.currency,chosen:v===t.chosenCoupon},nativeOn:{click:u(v)}})}),!n.length&&this.genEmpty(),this.slots("list-footer")])]),d=i(ii,{attrs:{title:l}},[i("div",{class:$t("list",{"with-bottom":this.showCloseButton}),style:this.listStyle},[r.map(function(f){return i(En,{attrs:{disabled:!0,coupon:f,currency:t.currency},key:f.id})}),!r.length&&this.genEmpty(),this.slots("disabled-list-footer")])]);return i("div",{class:$t()},[c,i(Sn,{class:$t("tab"),attrs:{border:!1},model:{value:t.tab,callback:function(v){t.tab=v}}},[h,d]),i("div",{class:$t("bottom")},[i(F,{directives:[{name:"show",value:this.showCloseButton}],attrs:{round:!0,type:"danger",block:!0,text:this.closeButtonText||le("close")},class:$t("close"),on:{click:u(-1)}})])])}});var bs=m({},We,{value:null,filter:Function,columnsOrder:Array,showToolbar:{type:Boolean,default:!0},formatter:{type:Function,default:function(t,i){return i}}}),Ss={data:function(){return{innerValue:this.formatValue(this.value)}},computed:{originColumns:function(){var t=this;return this.ranges.map(function(i){var n=i.type,r=i.range,a=Fu(r[1]-r[0]+1,function(s){var o=N(r[0]+s);return o});return t.filter&&(a=t.filter(n,a)),{type:n,values:a}})},columns:function(){var t=this;return this.originColumns.map(function(i){return{values:i.values.map(function(n){return t.formatter(i.type,n)})}})}},watch:{columns:"updateColumnValue",innerValue:function(t,i){i?this.$emit("input",t):this.$emit("input",null)}},mounted:function(){var t=this;this.updateColumnValue(),this.$nextTick(function(){t.updateInnerValue()})},methods:{getPicker:function(){return this.$refs.picker},getProxiedPicker:function(){var t=this,i=this.$refs.picker;if(i){var n=function(a){return function(){i[a].apply(i,arguments),t.updateInnerValue()}};return m({},i,{setValues:n("setValues"),setIndexes:n("setIndexes"),setColumnIndex:n("setColumnIndex"),setColumnValue:n("setColumnValue")})}},onConfirm:function(){this.$emit("input",this.innerValue),this.$emit("confirm",this.innerValue)},onCancel:function(){this.$emit("cancel")}},render:function(){var t=this,i=arguments[0],n={};return Object.keys(We).forEach(function(r){n[r]=t[r]}),i(Ji,{ref:"picker",attrs:{columns:this.columns,readonly:this.readonly},scopedSlots:this.$scopedSlots,on:{change:this.onChange,confirm:this.onConfirm,cancel:this.onCancel},props:m({},n)})}},Qh=p("time-picker"),td=Qh[0];const ks=td({mixins:[Ss],props:m({},bs,{minHour:{type:[Number,String],default:0},maxHour:{type:[Number,String],default:23},minMinute:{type:[Number,String],default:0},maxMinute:{type:[Number,String],default:59}}),computed:{ranges:function(){return[{type:"hour",range:[+this.minHour,+this.maxHour]},{type:"minute",range:[+this.minMinute,+this.maxMinute]}]}},watch:{filter:"updateInnerValue",minHour:function(){var t=this;this.$nextTick(function(){t.updateInnerValue()})},maxHour:function(t){var i=this.innerValue.split(":"),n=i[0],r=i[1];n>=t?(this.innerValue=this.formatValue(t+":"+r),this.updateColumnValue()):this.updateInnerValue()},minMinute:"updateInnerValue",maxMinute:function(t){var i=this.innerValue.split(":"),n=i[0],r=i[1];r>=t?(this.innerValue=this.formatValue(n+":"+t),this.updateColumnValue()):this.updateInnerValue()},value:function(t){t=this.formatValue(t),t!==this.innerValue&&(this.innerValue=t,this.updateColumnValue())}},methods:{formatValue:function(t){t||(t=N(this.minHour)+":"+N(this.minMinute));var i=t.split(":"),n=i[0],r=i[1];return n=N(W(n,this.minHour,this.maxHour)),r=N(W(r,this.minMinute,this.maxMinute)),n+":"+r},updateInnerValue:function(){var t=this.getPicker().getIndexes(),i=t[0],n=t[1],r=this.originColumns,a=r[0],s=r[1],o=a.values[i]||a.values[0],l=s.values[n]||s.values[0];this.innerValue=this.formatValue(o+":"+l),this.updateColumnValue()},onChange:function(t){var i=this;this.updateInnerValue(),this.$nextTick(function(){i.$nextTick(function(){i.updateInnerValue(),i.$emit("change",t)})})},updateColumnValue:function(){var t=this,i=this.formatter,n=this.innerValue.split(":"),r=[i("hour",n[0]),i("minute",n[1])];this.$nextTick(function(){t.getPicker().setValues(r)})}}});function Cs(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Cs=function(){return!!e})()}function An(e,t){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},An(e,t)}function $s(e,t,i){if(Cs())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var r=new(e.bind.apply(e,n));return i&&An(r,i.prototype),r}var ws=new Date().getFullYear(),ed=p("date-picker"),id=ed[0];const xs=id({mixins:[Ss],props:m({},bs,{type:{type:String,default:"datetime"},minDate:{type:Date,default:function(){return new Date(ws-10,0,1)},validator:Se},maxDate:{type:Date,default:function(){return new Date(ws+10,11,31)},validator:Se}}),watch:{filter:"updateInnerValue",minDate:function(){var t=this;this.$nextTick(function(){t.updateInnerValue()})},maxDate:function(t){this.innerValue.valueOf()>=t.valueOf()?this.innerValue=t:this.updateInnerValue()},value:function(t){t=this.formatValue(t),t&&t.valueOf()!==this.innerValue.valueOf()&&(this.innerValue=t)}},computed:{ranges:function(){var t=this.getBoundary("max",this.innerValue?this.innerValue:this.minDate),i=t.maxYear,n=t.maxDate,r=t.maxMonth,a=t.maxHour,s=t.maxMinute,o=this.getBoundary("min",this.innerValue?this.innerValue:this.minDate),l=o.minYear,c=o.minDate,u=o.minMonth,h=o.minHour,d=o.minMinute,f=[{type:"year",range:[l,i]},{type:"month",range:[u,r]},{type:"day",range:[c,n]},{type:"hour",range:[h,a]},{type:"minute",range:[d,s]}];switch(this.type){case"date":f=f.slice(0,3);break;case"year-month":f=f.slice(0,2);break;case"month-day":f=f.slice(1,3);break;case"datehour":f=f.slice(0,4);break}if(this.columnsOrder){var v=this.columnsOrder.concat(f.map(function(g){return g.type}));f.sort(function(g,y){return v.indexOf(g.type)-v.indexOf(y.type)})}return f}},methods:{formatValue:function(t){var i=this;if(!Se(t))return null;var n=new Date(this.minDate),r=new Date(this.maxDate),a={year:"getFullYear",month:"getMonth",day:"getDate",hour:"getHours",minute:"getMinutes"};if(this.originColumns){var s=this.originColumns.map(function(c,u){var h=c.type,d=c.values,f=i.ranges[u].range,v=n[a[h]](),g=r[a[h]](),y=h==="month"?+d[0]-1:+d[0],b=h==="month"?+d[d.length-1]-1:+d[d.length-1];return{type:h,values:[v<f[0]?Math.max(v,y):y||v,g>f[1]?Math.min(g,b):b||g]}});if(this.type==="month-day"){var o=(this.innerValue||this.minDate).getFullYear();s.unshift({type:"year",values:[o,o]})}var l=Object.keys(a).map(function(c){var u;return(u=s.filter(function(h){return h.type===c})[0])==null?void 0:u.values}).filter(function(c){return c});n=$s(Date,l.map(function(c){return mn(c[0])})),r=$s(Date,l.map(function(c){return mn(c[1])}))}return t=Math.max(t,n.getTime()),t=Math.min(t,r.getTime()),new Date(t)},getBoundary:function(t,i){var n,r=this[t+"Date"],a=r.getFullYear(),s=1,o=1,l=0,c=0;return t==="max"&&(s=12,o=gn(i.getFullYear(),i.getMonth()+1),l=23,c=59),i.getFullYear()===a&&(s=r.getMonth()+1,i.getMonth()+1===s&&(o=r.getDate(),i.getDate()===o&&(l=r.getHours(),i.getHours()===l&&(c=r.getMinutes())))),n={},n[t+"Year"]=a,n[t+"Month"]=s,n[t+"Date"]=o,n[t+"Hour"]=l,n[t+"Minute"]=c,n},updateInnerValue:function(){var t=this,i=this.type,n=this.getPicker().getIndexes(),r=function(f){var v=0;t.originColumns.forEach(function(y,b){f===y.type&&(v=b)});var g=t.originColumns[v].values;return mn(g[n[v]])},a,s,o;i==="month-day"?(a=(this.innerValue||this.minDate).getFullYear(),s=r("month"),o=r("day")):(a=r("year"),s=r("month"),o=i==="year-month"?1:r("day"));var l=gn(a,s);o=o>l?l:o;var c=0,u=0;i==="datehour"&&(c=r("hour")),i==="datetime"&&(c=r("hour"),u=r("minute"));var h=new Date(a,s-1,o,c,u);this.innerValue=this.formatValue(h)},onChange:function(t){var i=this;this.updateInnerValue(),this.$nextTick(function(){i.$nextTick(function(){i.updateInnerValue(),i.$emit("change",t)})})},updateColumnValue:function(){var t=this,i=this.innerValue?this.innerValue:this.minDate,n=this.formatter,r=this.originColumns.map(function(a){switch(a.type){case"year":return n("year",""+i.getFullYear());case"month":return n("month",N(i.getMonth()+1));case"day":return n("day",N(i.getDate()));case"hour":return n("hour",N(i.getHours()));case"minute":return n("minute",N(i.getMinutes()));default:return null}});this.$nextTick(function(){t.getPicker().setValues(r)})}}});var Ts=p("datetime-picker"),nd=Ts[0],rd=Ts[1];const _s=nd({props:m({},ks.props,xs.props),methods:{getPicker:function(){return this.$refs.root.getProxiedPicker()}},render:function(){var t=arguments[0],i=this.type==="time"?ks:xs;return t(i,{ref:"root",class:rd(),scopedSlots:this.$scopedSlots,props:m({},this.$props),on:m({},this.$listeners)})}});var Is=p("divider"),ad=Is[0],sd=Is[1];function Os(e,t,i,n){var r;return e("div",T([{attrs:{role:"separator"},style:{borderColor:t.borderColor},class:sd((r={dashed:t.dashed,hairline:t.hairline},r["content-"+t.contentPosition]=i.default,r))},B(n,!0)]),[i.default&&i.default()])}Os.props={dashed:Boolean,hairline:{type:Boolean,default:!0},contentPosition:{type:String,default:"center"}};const Ps=ad(Os);var Bs=p("dropdown-item"),od=Bs[0],oi=Bs[1];const ld=od({mixins:[Ui({ref:"wrapper"}),X("vanDropdownMenu")],props:{value:null,title:String,disabled:Boolean,titleClass:String,options:{type:Array,default:function(){return[]}},lazyRender:{type:Boolean,default:!0}},data:function(){return{transition:!0,showPopup:!1,showWrapper:!1}},computed:{displayTitle:function(){var t=this;if(this.title)return this.title;var i=this.options.filter(function(n){return n.value===t.value});return i.length?i[0].text:""}},watch:{showPopup:function(t){this.bindScroll(t)}},beforeCreate:function(){var t=this,i=function(r){return function(){return t.$emit(r)}};this.onOpen=i("open"),this.onClose=i("close"),this.onOpened=i("opened")},methods:{toggle:function(t,i){t===void 0&&(t=!this.showPopup),i===void 0&&(i={}),t!==this.showPopup&&(this.transition=!i.immediate,this.showPopup=t,t&&(this.parent.updateOffset(),this.showWrapper=!0))},bindScroll:function(t){var i=this.parent.scroller,n=t?it:Nt;n(i,"scroll",this.onScroll,!0)},onScroll:function(){this.parent.updateOffset()},onClickWrapper:function(t){this.getContainer&&t.stopPropagation()}},render:function(){var t=this,i=arguments[0],n=this.parent,r=n.zIndex,a=n.offset,s=n.overlay,o=n.duration,l=n.direction,c=n.activeColor,u=n.closeOnClickOverlay,h=this.options.map(function(f){var v=f.value===t.value;return i(q,{attrs:{clickable:!0,icon:f.icon,title:f.text},key:f.value,class:oi("option",{active:v}),style:{color:v?c:""},on:{click:function(){t.showPopup=!1,f.value!==t.value&&(t.$emit("input",f.value),t.$emit("change",f.value))}}},[v&&i(w,{class:oi("icon"),attrs:{color:c,name:"success"}})])}),d={zIndex:r};return l==="down"?d.top=a+"px":d.bottom=a+"px",i("div",[i("div",{directives:[{name:"show",value:this.showWrapper}],ref:"wrapper",style:d,class:oi([l]),on:{click:this.onClickWrapper}},[i(St,{attrs:{overlay:s,position:l==="down"?"top":"bottom",duration:this.transition?o:0,lazyRender:this.lazyRender,overlayStyle:{position:"absolute"},closeOnClickOverlay:u},class:oi("content"),on:{open:this.onOpen,close:this.onClose,opened:this.onOpened,closed:function(){t.showWrapper=!1,t.$emit("closed")}},model:{value:t.showPopup,callback:function(v){t.showPopup=v}}},[h,this.slots("default")])])])}});var Rn=function(t){return{props:{closeOnClickOutside:{type:Boolean,default:!0}},data:function(){var n=this,r=function(s){n.closeOnClickOutside&&!n.$el.contains(s.target)&&n[t.method]()};return{clickOutsideHandler:r}},mounted:function(){it(document,t.event,this.clickOutsideHandler)},beforeDestroy:function(){Nt(document,t.event,this.clickOutsideHandler)}}},Es=p("dropdown-menu"),cd=Es[0],li=Es[1];const ud=cd({mixins:[G("vanDropdownMenu"),Rn({event:"click",method:"onClickOutside"})],props:{zIndex:[Number,String],activeColor:String,overlay:{type:Boolean,default:!0},duration:{type:[Number,String],default:.2},direction:{type:String,default:"down"},closeOnClickOverlay:{type:Boolean,default:!0}},data:function(){return{offset:0}},computed:{scroller:function(){return Ut(this.$el)},opened:function(){return this.children.some(function(t){return t.showWrapper})},barStyle:function(){if(this.opened&&_(this.zIndex))return{zIndex:1+this.zIndex}}},methods:{updateOffset:function(){if(this.$refs.bar){var t=this.$refs.bar.getBoundingClientRect();this.direction==="down"?this.offset=t.bottom:this.offset=window.innerHeight-t.top}},toggleItem:function(t){this.children.forEach(function(i,n){n===t?i.toggle():i.showPopup&&i.toggle(!1,{immediate:!0})})},onClickOutside:function(){this.children.forEach(function(t){t.toggle(!1)})}},render:function(){var t=this,i=arguments[0],n=this.children.map(function(r,a){return i("div",{attrs:{role:"button",tabindex:r.disabled?-1:0},class:li("item",{disabled:r.disabled}),on:{click:function(){r.disabled||t.toggleItem(a)}}},[i("span",{class:[li("title",{active:r.showPopup,down:r.showPopup===(t.direction==="down")}),r.titleClass],style:{color:r.showPopup?t.activeColor:""}},[i("div",{class:"van-ellipsis"},[r.slots("title")||r.displayTitle])])])});return i("div",{class:li()},[i("div",{ref:"bar",style:this.barStyle,class:li("bar",{opened:this.opened})},[n]),this.slots("default")])}});var H="van-empty-network-";const hd={render:function(){var t=arguments[0],i=function(r,a,s){return t("stop",{attrs:{"stop-color":r,offset:a+"%","stop-opacity":s}})};return t("svg",{attrs:{viewBox:"0 0 160 160",xmlns:"http://www.w3.org/2000/svg"}},[t("defs",[t("linearGradient",{attrs:{id:H+"1",x1:"64.022%",y1:"100%",x2:"64.022%",y2:"0%"}},[i("#FFF",0,.5),i("#F2F3F5",100)]),t("linearGradient",{attrs:{id:H+"2",x1:"50%",y1:"0%",x2:"50%",y2:"84.459%"}},[i("#EBEDF0",0),i("#DCDEE0",100,0)]),t("linearGradient",{attrs:{id:H+"3",x1:"100%",y1:"0%",x2:"100%",y2:"100%"}},[i("#EAEDF0",0),i("#DCDEE0",100)]),t("linearGradient",{attrs:{id:H+"4",x1:"100%",y1:"100%",x2:"100%",y2:"0%"}},[i("#EAEDF0",0),i("#DCDEE0",100)]),t("linearGradient",{attrs:{id:H+"5",x1:"0%",y1:"43.982%",x2:"100%",y2:"54.703%"}},[i("#EAEDF0",0),i("#DCDEE0",100)]),t("linearGradient",{attrs:{id:H+"6",x1:"94.535%",y1:"43.837%",x2:"5.465%",y2:"54.948%"}},[i("#EAEDF0",0),i("#DCDEE0",100)]),t("radialGradient",{attrs:{id:H+"7",cx:"50%",cy:"0%",fx:"50%",fy:"0%",r:"100%",gradientTransform:"matrix(0 1 -.54835 0 .5 -.5)"}},[i("#EBEDF0",0),i("#FFF",100,0)])]),t("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[t("g",{attrs:{opacity:".8"}},[t("path",{attrs:{d:"M0 124V46h20v20h14v58H0z",fill:"url(#"+H+"1)",transform:"matrix(-1 0 0 1 36 7)"}}),t("path",{attrs:{d:"M121 8h22.231v14H152v77.37h-31V8z",fill:"url(#"+H+"1)",transform:"translate(2 7)"}})]),t("path",{attrs:{fill:"url(#"+H+"7)",d:"M0 139h160v21H0z"}}),t("path",{attrs:{d:"M37 18a7 7 0 013 13.326v26.742c0 1.23-.997 2.227-2.227 2.227h-1.546A2.227 2.227 0 0134 58.068V31.326A7 7 0 0137 18z",fill:"url(#"+H+"2)","fill-rule":"nonzero",transform:"translate(43 36)"}}),t("g",{attrs:{opacity:".6","stroke-linecap":"round","stroke-width":"7"}},[t("path",{attrs:{d:"M20.875 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",stroke:"url(#"+H+"3)",transform:"translate(43 36)"}}),t("path",{attrs:{d:"M9.849 0C3.756 6.225 0 14.747 0 24.146c0 9.398 3.756 17.92 9.849 24.145",stroke:"url(#"+H+"3)",transform:"translate(43 36)"}}),t("path",{attrs:{d:"M57.625 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12",stroke:"url(#"+H+"4)",transform:"rotate(-180 76.483 42.257)"}}),t("path",{attrs:{d:"M73.216 0c-6.093 6.225-9.849 14.747-9.849 24.146 0 9.398 3.756 17.92 9.849 24.145",stroke:"url(#"+H+"4)",transform:"rotate(-180 89.791 42.146)"}})]),t("g",{attrs:{transform:"translate(31 105)","fill-rule":"nonzero"}},[t("rect",{attrs:{fill:"url(#"+H+"5)",width:"98",height:"34",rx:"2"}}),t("rect",{attrs:{fill:"#FFF",x:"9",y:"8",width:"80",height:"18",rx:"1.114"}}),t("rect",{attrs:{fill:"url(#"+H+"6)",x:"15",y:"12",width:"18",height:"6",rx:"1.114"}})])])])}};var Ds=p("empty"),dd=Ds[0],ci=Ds[1],fd=["error","search","default"];const pd=dd({props:{imageSize:[Number,String],description:String,image:{type:String,default:"default"}},methods:{genImageContent:function(){var t=this.$createElement,i=this.slots("image");if(i)return i;if(this.image==="network")return t(hd);var n=this.image;return fd.indexOf(n)!==-1&&(n="https://img01.yzcdn.cn/vant/empty-image-"+n+".png"),t("img",{attrs:{src:n}})},genImage:function(){var t=this.$createElement,i={width:P(this.imageSize),height:P(this.imageSize)};return t("div",{class:ci("image"),style:i},[this.genImageContent()])},genDescription:function(){var t=this.$createElement,i=this.slots("description")||this.description;if(i)return t("p",{class:ci("description")},[i])},genBottom:function(){var t=this.$createElement,i=this.slots();if(i)return t("div",{class:ci("bottom")},[i])}},render:function(){var t=arguments[0];return t("div",{class:ci()},[this.genImage(),this.genDescription(),this.genBottom()])}});var Ns=p("form"),vd=Ns[0],md=Ns[1];const gd=vd({props:{colon:Boolean,disabled:Boolean,readonly:Boolean,labelWidth:[Number,String],labelAlign:String,inputAlign:String,scrollToError:Boolean,validateFirst:Boolean,errorMessageAlign:String,submitOnEnter:{type:Boolean,default:!0},validateTrigger:{type:String,default:"onBlur"},showError:{type:Boolean,default:!0},showErrorMessage:{type:Boolean,default:!0}},provide:function(){return{vanForm:this}},data:function(){return{fields:[]}},methods:{getFieldsByNames:function(t){return t?this.fields.filter(function(i){return t.indexOf(i.name)!==-1}):this.fields},validateSeq:function(t){var i=this;return new Promise(function(n,r){var a=[],s=i.getFieldsByNames(t);s.reduce(function(o,l){return o.then(function(){if(!a.length)return l.validate().then(function(c){c&&a.push(c)})})},Promise.resolve()).then(function(){a.length?r(a):n()})})},validateFields:function(t){var i=this;return new Promise(function(n,r){var a=i.getFieldsByNames(t);Promise.all(a.map(function(s){return s.validate()})).then(function(s){s=s.filter(function(o){return o}),s.length?r(s):n()})})},validate:function(t){return t&&!Array.isArray(t)?this.validateField(t):this.validateFirst?this.validateSeq(t):this.validateFields(t)},validateField:function(t){var i=this.fields.filter(function(n){return n.name===t});return i.length?new Promise(function(n,r){i[0].validate().then(function(a){a?r(a):n()})}):Promise.reject()},resetValidation:function(t){t&&!Array.isArray(t)&&(t=[t]);var i=this.getFieldsByNames(t);i.forEach(function(n){n.resetValidation()})},scrollToField:function(t,i){this.fields.some(function(n){return n.name===t?(n.$el.scrollIntoView(i),!0):!1})},addField:function(t){this.fields.push(t),ya(this.fields,this)},removeField:function(t){this.fields=this.fields.filter(function(i){return i!==t})},getValues:function(){return this.fields.reduce(function(t,i){return t[i.name]=i.formValue,t},{})},onSubmit:function(t){t.preventDefault(),this.submit()},submit:function(){var t=this,i=this.getValues();this.validate().then(function(){t.$emit("submit",i)}).catch(function(n){t.$emit("failed",{values:i,errors:n}),t.scrollToError&&t.scrollToField(n[0].name)})}},render:function(){var t=arguments[0];return t("form",{class:md(),on:{submit:this.onSubmit}},[this.slots()])}});var Ms=p("goods-action-icon"),yd=Ms[0],Vn=Ms[1];const bd=yd({mixins:[X("vanGoodsAction")],props:m({},Mt,{dot:Boolean,text:String,icon:String,color:String,info:[Number,String],badge:[Number,String],iconClass:null}),methods:{onClick:function(t){this.$emit("click",t),Yt(this.$router,this)},genIcon:function(){var t,i=this.$createElement,n=this.slots("icon"),r=(t=this.badge)!=null?t:this.info;return process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] GoodsActionIcon: "info" prop is deprecated, use "badge" prop instead.'),n?i("div",{class:Vn("icon")},[n,i(Kt,{attrs:{dot:this.dot,info:r}})]):i(w,{class:[Vn("icon"),this.iconClass],attrs:{tag:"div",dot:this.dot,name:this.icon,badge:r,color:this.color}})}},render:function(){var t=arguments[0];return t("div",{attrs:{role:"button",tabindex:"0"},class:Vn(),on:{click:this.onClick}},[this.genIcon(),this.slots()||this.text])}});var Ls=p("grid"),Sd=Ls[0],kd=Ls[1];const Cd=Sd({mixins:[G("vanGrid")],props:{square:Boolean,gutter:[Number,String],iconSize:[Number,String],direction:String,clickable:Boolean,columnNum:{type:[Number,String],default:4},center:{type:Boolean,default:!0},border:{type:Boolean,default:!0}},computed:{style:function(){var t=this.gutter;if(t)return{paddingLeft:P(t)}}},render:function(){var t,i=arguments[0];return i("div",{style:this.style,class:[kd(),(t={},t[qi]=this.border&&!this.gutter,t)]},[this.slots()])}});var As=p("grid-item"),$d=As[0],Ce=As[1];const wd=$d({mixins:[X("vanGrid")],props:m({},Mt,{dot:Boolean,text:String,icon:String,iconPrefix:String,info:[Number,String],badge:[Number,String]}),computed:{style:function(){var t=this.parent,i=t.square,n=t.gutter,r=t.columnNum,a=100/r+"%",s={flexBasis:a};if(i)s.paddingTop=a;else if(n){var o=P(n);s.paddingRight=o,this.index>=r&&(s.marginTop=o)}return s},contentStyle:function(){var t=this.parent,i=t.square,n=t.gutter;if(i&&n){var r=P(n);return{right:r,bottom:r,height:"auto"}}}},methods:{onClick:function(t){this.$emit("click",t),Yt(this.$router,this)},genIcon:function(){var t,i=this.$createElement,n=this.slots("icon"),r=(t=this.badge)!=null?t:this.info;if(process.env.NODE_ENV==="development"&&this.info&&console.warn('[Vant] GridItem: "info" prop is deprecated, use "badge" prop instead.'),n)return i("div",{class:Ce("icon-wrapper")},[n,i(Kt,{attrs:{dot:this.dot,info:r}})]);if(this.icon)return i(w,{attrs:{name:this.icon,dot:this.dot,badge:r,size:this.parent.iconSize,classPrefix:this.iconPrefix},class:Ce("icon")})},getText:function(){var t=this.$createElement,i=this.slots("text");if(i)return i;if(this.text)return t("span",{class:Ce("text")},[this.text])},genContent:function(){var t=this.slots();return t||[this.genIcon(),this.getText()]}},render:function(){var t,i=arguments[0],n=this.parent,r=n.center,a=n.border,s=n.square,o=n.gutter,l=n.direction,c=n.clickable;return i("div",{class:[Ce({square:s})],style:this.style},[i("div",{style:this.contentStyle,attrs:{role:c?"button":null,tabindex:c?0:null},class:[Ce("content",[l,{center:r,square:s,clickable:c,surround:a&&o}]),(t={},t[ft]=a,t)],on:{click:this.onClick}},[this.genContent()])])}});var Rs=p("image-preview"),xd=Rs[0],Vt=Rs[1],Vs=p("swipe"),Td=Vs[0],ui=Vs[1];const zs=Td({mixins:[nt,G("vanSwipe"),ut(function(e,t){e(window,"resize",this.resize,!0),e(window,"orientationchange",this.resize,!0),e(window,"visibilitychange",this.onVisibilityChange),t?this.initialize():this.clear()})],props:{width:[Number,String],height:[Number,String],autoplay:[Number,String],vertical:Boolean,lazyRender:Boolean,indicatorColor:String,loop:{type:Boolean,default:!0},duration:{type:[Number,String],default:500},touchable:{type:Boolean,default:!0},initialSwipe:{type:[Number,String],default:0},showIndicators:{type:Boolean,default:!0},stopPropagation:{type:Boolean,default:!0}},data:function(){return{rect:null,offset:0,active:0,deltaX:0,deltaY:0,swiping:!1,computedWidth:0,computedHeight:0}},watch:{children:function(){this.initialize()},initialSwipe:function(){this.initialize()},autoplay:function(t){t>0?this.autoPlay():this.clear()}},computed:{count:function(){return this.children.length},maxCount:function(){return Math.ceil(Math.abs(this.minOffset)/this.size)},delta:function(){return this.vertical?this.deltaY:this.deltaX},size:function(){return this[this.vertical?"computedHeight":"computedWidth"]},trackSize:function(){return this.count*this.size},activeIndicator:function(){return(this.active+this.count)%this.count},isCorrectDirection:function(){var t=this.vertical?"vertical":"horizontal";return this.direction===t},trackStyle:function(){var t={transitionDuration:(this.swiping?0:this.duration)+"ms",transform:"translate"+(this.vertical?"Y":"X")+"("+this.offset+"px)"};if(this.size){var i=this.vertical?"height":"width",n=this.vertical?"width":"height";t[i]=this.trackSize+"px",t[n]=this[n]?this[n]+"px":""}return t},indicatorStyle:function(){return{backgroundColor:this.indicatorColor}},minOffset:function(){return(this.vertical?this.rect.height:this.rect.width)-this.size*this.count}},mounted:function(){this.bindTouchEvent(this.$refs.track)},methods:{initialize:function(t){if(t===void 0&&(t=+this.initialSwipe),!(!this.$el||ke(this.$el))){clearTimeout(this.timer);var i={width:this.$el.offsetWidth,height:this.$el.offsetHeight};this.rect=i,this.swiping=!0,this.active=t,this.computedWidth=+this.width||i.width,this.computedHeight=+this.height||i.height,this.offset=this.getTargetOffset(t),this.children.forEach(function(n){n.offset=0}),this.autoPlay()}},resize:function(){this.initialize(this.activeIndicator)},onVisibilityChange:function(){document.hidden?this.clear():this.autoPlay()},onTouchStart:function(t){this.touchable&&(this.clear(),this.touchStartTime=Date.now(),this.touchStart(t),this.correctPosition())},onTouchMove:function(t){!this.touchable||!this.swiping||(this.touchMove(t),this.isCorrectDirection&&(z(t,this.stopPropagation),this.move({offset:this.delta})))},onTouchEnd:function(){if(!(!this.touchable||!this.swiping)){var t=this.size,i=this.delta,n=Date.now()-this.touchStartTime,r=i/n,a=Math.abs(r)>.25||Math.abs(i)>t/2;if(a&&this.isCorrectDirection){var s=this.vertical?this.offsetY:this.offsetX,o=0;this.loop?o=s>0?i>0?-1:1:0:o=-Math[i>0?"ceil":"floor"](i/t),this.move({pace:o,emitChange:!0})}else i&&this.move({pace:0});this.swiping=!1,this.autoPlay()}},getTargetActive:function(t){var i=this.active,n=this.count,r=this.maxCount;return t?this.loop?W(i+t,-1,n):W(i+t,0,r):i},getTargetOffset:function(t,i){i===void 0&&(i=0);var n=t*this.size;this.loop||(n=Math.min(n,-this.minOffset));var r=i-n;return this.loop||(r=W(r,this.minOffset,0)),r},move:function(t){var i=t.pace,n=i===void 0?0:i,r=t.offset,a=r===void 0?0:r,s=t.emitChange,o=this.loop,l=this.count,c=this.active,u=this.children,h=this.trackSize,d=this.minOffset;if(!(l<=1)){var f=this.getTargetActive(n),v=this.getTargetOffset(f,a);if(o){if(u[0]&&v!==d){var g=v<d;u[0].offset=g?h:0}if(u[l-1]&&v!==0){var y=v>0;u[l-1].offset=y?-h:0}}this.active=f,this.offset=v,s&&f!==c&&this.$emit("change",this.activeIndicator)}},prev:function(){var t=this;this.correctPosition(),this.resetTouchStatus(),Xt(function(){t.swiping=!1,t.move({pace:-1,emitChange:!0})})},next:function(){var t=this;this.correctPosition(),this.resetTouchStatus(),Xt(function(){t.swiping=!1,t.move({pace:1,emitChange:!0})})},swipeTo:function(t,i){var n=this;i===void 0&&(i={}),this.correctPosition(),this.resetTouchStatus(),Xt(function(){var r;n.loop&&t===n.count?r=n.active===0?0:t:r=t%n.count,i.immediate?Xt(function(){n.swiping=!1}):n.swiping=!1,n.move({pace:r-n.active,emitChange:!0})})},correctPosition:function(){this.swiping=!0,this.active<=-1&&this.move({pace:this.count}),this.active>=this.count&&this.move({pace:-this.count})},clear:function(){clearTimeout(this.timer)},autoPlay:function(){var t=this,i=this.autoplay;i>0&&this.count>1&&(this.clear(),this.timer=setTimeout(function(){t.next(),t.autoPlay()},i))},genIndicator:function(){var t=this,i=this.$createElement,n=this.count,r=this.activeIndicator,a=this.slots("indicator");if(a)return a;if(this.showIndicators&&n>1)return i("div",{class:ui("indicators",{vertical:this.vertical})},[Array.apply(void 0,Array(n)).map(function(s,o){return i("i",{class:ui("indicator",{active:o===r}),style:o===r?t.indicatorStyle:null})})])}},render:function(){var t=arguments[0];return t("div",{class:ui()},[t("div",{ref:"track",style:this.trackStyle,class:ui("track",{vertical:this.vertical})},[this.slots()]),this.genIndicator()])}});var Fs=p("swipe-item"),_d=Fs[0],Id=Fs[1];const Hs=_d({mixins:[X("vanSwipe")],data:function(){return{offset:0,inited:!1,mounted:!1}},mounted:function(){var t=this;this.$nextTick(function(){t.mounted=!0})},computed:{style:function(){var t={},i=this.parent,n=i.size,r=i.vertical;return n&&(t[r?"height":"width"]=n+"px"),this.offset&&(t.transform="translate"+(r?"Y":"X")+"("+this.offset+"px)"),t},shouldRender:function(){var t=this.index,i=this.inited,n=this.parent,r=this.mounted;if(!n.lazyRender||i)return!0;if(!r)return!1;var a=n.activeIndicator,s=n.count-1,o=a===0&&n.loop?s:a-1,l=a===s&&n.loop?0:a+1,c=t===a||t===o||t===l;return c&&(this.inited=!0),c}},render:function(){var t=arguments[0];return t("div",{class:Id(),style:this.style,on:m({},this.$listeners)},[this.shouldRender&&this.slots()])}});function js(e){return Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2))}const Od={mixins:[nt],props:{src:String,show:Boolean,active:Number,minZoom:[Number,String],maxZoom:[Number,String],rootWidth:Number,rootHeight:Number},data:function(){return{scale:1,moveX:0,moveY:0,moving:!1,zooming:!1,imageRatio:0,displayWidth:0,displayHeight:0}},computed:{vertical:function(){var t=this.rootWidth,i=this.rootHeight,n=i/t;return this.imageRatio>n},imageStyle:function(){var t=this.scale,i={transitionDuration:this.zooming||this.moving?"0s":".3s"};if(t!==1){var n=this.moveX/t,r=this.moveY/t;i.transform="scale("+t+", "+t+") translate("+n+"px, "+r+"px)"}return i},maxMoveX:function(){if(this.imageRatio){var t=this.vertical?this.rootHeight/this.imageRatio:this.rootWidth;return Math.max(0,(this.scale*t-this.rootWidth)/2)}return 0},maxMoveY:function(){if(this.imageRatio){var t=this.vertical?this.rootHeight:this.rootWidth*this.imageRatio;return Math.max(0,(this.scale*t-this.rootHeight)/2)}return 0}},watch:{active:"resetScale",show:function(t){t||this.resetScale()}},mounted:function(){this.bindTouchEvent(this.$el)},methods:{resetScale:function(){this.setScale(1),this.moveX=0,this.moveY=0},setScale:function(t){t=W(t,+this.minZoom,+this.maxZoom),t!==this.scale&&(this.scale=t,this.$emit("scale",{scale:this.scale,index:this.active}))},toggleScale:function(){var t=this.scale>1?1:2;this.setScale(t),this.moveX=0,this.moveY=0},onTouchStart:function(t){var i=t.touches,n=this.offsetX,r=n===void 0?0:n;this.touchStart(t),this.touchStartTime=new Date,this.fingerNum=i.length,this.startMoveX=this.moveX,this.startMoveY=this.moveY,this.moving=this.fingerNum===1&&this.scale!==1,this.zooming=this.fingerNum===2&&!r,this.zooming&&(this.startScale=this.scale,this.startDistance=js(t.touches))},onTouchMove:function(t){var i=t.touches;if(this.touchMove(t),(this.moving||this.zooming)&&z(t,!0),this.moving){var n=this.deltaX+this.startMoveX,r=this.deltaY+this.startMoveY;this.moveX=W(n,-this.maxMoveX,this.maxMoveX),this.moveY=W(r,-this.maxMoveY,this.maxMoveY)}if(this.zooming&&i.length===2){var a=js(i),s=this.startScale*a/this.startDistance;this.setScale(s)}},onTouchEnd:function(t){var i=!1;(this.moving||this.zooming)&&(i=!0,this.moving&&this.startMoveX===this.moveX&&this.startMoveY===this.moveY&&(i=!1),t.touches.length||(this.zooming&&(this.moveX=W(this.moveX,-this.maxMoveX,this.maxMoveX),this.moveY=W(this.moveY,-this.maxMoveY,this.maxMoveY),this.zooming=!1),this.moving=!1,this.startMoveX=0,this.startMoveY=0,this.startScale=1,this.scale<1&&this.resetScale())),z(t,i),this.checkTap(),this.resetTouchStatus()},checkTap:function(){var t=this;if(!(this.fingerNum>1)){var i=this.offsetX,n=i===void 0?0:i,r=this.offsetY,a=r===void 0?0:r,s=new Date-this.touchStartTime,o=250,l=5;n<l&&a<l&&s<o&&(this.doubleTapTimer?(clearTimeout(this.doubleTapTimer),this.doubleTapTimer=null,this.toggleScale()):this.doubleTapTimer=setTimeout(function(){t.$emit("close"),t.doubleTapTimer=null},o))}},onLoad:function(t){var i=t.target,n=i.naturalWidth,r=i.naturalHeight;this.imageRatio=r/n}},render:function(){var t=arguments[0],i={loading:function(){return t(ht,{attrs:{type:"spinner"}})}};return t(Hs,{class:Vt("swipe-item")},[t(oe,{attrs:{src:this.src,fit:"contain"},class:Vt("image",{vertical:this.vertical}),style:this.imageStyle,scopedSlots:i,on:{load:this.onLoad}})])}},zn=xd({mixins:[nt,He({skipToggleEvent:!0}),ut(function(e){e(window,"resize",this.resize,!0),e(window,"orientationchange",this.resize,!0)})],props:{className:null,closeable:Boolean,asyncClose:Boolean,overlayStyle:Object,showIndicators:Boolean,images:{type:Array,default:function(){return[]}},loop:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},minZoom:{type:[Number,String],default:1/3},maxZoom:{type:[Number,String],default:3},transition:{type:String,default:"van-fade"},showIndex:{type:Boolean,default:!0},swipeDuration:{type:[Number,String],default:300},startPosition:{type:[Number,String],default:0},overlayClass:{type:String,default:Vt("overlay")},closeIcon:{type:String,default:"clear"},closeOnPopstate:{type:Boolean,default:!0},closeIconPosition:{type:String,default:"top-right"}},data:function(){return{active:0,rootWidth:0,rootHeight:0,doubleClickTimer:null}},mounted:function(){this.resize()},watch:{startPosition:"setActive",value:function(t){var i=this;t?(this.setActive(+this.startPosition),this.$nextTick(function(){i.resize(),i.$refs.swipe.swipeTo(+i.startPosition,{immediate:!0})})):this.$emit("close",{index:this.active,url:this.images[this.active]})}},methods:{resize:function(){if(this.$el&&this.$el.getBoundingClientRect){var t=this.$el.getBoundingClientRect();this.rootWidth=t.width,this.rootHeight=t.height}},emitClose:function(){this.asyncClose||this.$emit("input",!1)},emitScale:function(t){this.$emit("scale",t)},setActive:function(t){t!==this.active&&(this.active=t,this.$emit("change",t))},genIndex:function(){var t=this.$createElement;if(this.showIndex)return t("div",{class:Vt("index")},[this.slots("index",{index:this.active})||this.active+1+" / "+this.images.length])},genCover:function(){var t=this.$createElement,i=this.slots("cover");if(i)return t("div",{class:Vt("cover")},[i])},genImages:function(){var t=this,i=this.$createElement;return i(zs,{ref:"swipe",attrs:{lazyRender:!0,loop:this.loop,duration:this.swipeDuration,initialSwipe:this.startPosition,showIndicators:this.showIndicators,indicatorColor:"white"},class:Vt("swipe"),on:{change:this.setActive}},[this.images.map(function(n){return i(Od,{attrs:{src:n,show:t.value,active:t.active,maxZoom:t.maxZoom,minZoom:t.minZoom,rootWidth:t.rootWidth,rootHeight:t.rootHeight},on:{scale:t.emitScale,close:t.emitClose}})})])},genClose:function(){var t=this.$createElement;if(this.closeable)return t(w,{attrs:{role:"button",name:this.closeIcon},class:Vt("close-icon",this.closeIconPosition),on:{click:this.emitClose}})},onClosed:function(){this.$emit("closed")},swipeTo:function(t,i){this.$refs.swipe&&this.$refs.swipe.swipeTo(t,i)}},render:function(){var t=arguments[0];return t("transition",{attrs:{name:this.transition},on:{afterLeave:this.onClosed}},[this.shouldRender?t("div",{directives:[{name:"show",value:this.value}],class:[Vt(),this.className]},[this.genClose(),this.genImages(),this.genIndex(),this.genCover()]):null])}});var j,Pd={loop:!0,value:!0,images:[],maxZoom:3,minZoom:1/3,onClose:null,onChange:null,className:"",showIndex:!0,closeable:!1,closeIcon:"clear",asyncClose:!1,transition:"van-fade",getContainer:"body",overlayStyle:null,startPosition:0,swipeDuration:300,showIndicators:!1,closeOnPopstate:!0,closeIconPosition:"top-right"},Bd=function(){j=new($.extend(zn))({el:document.createElement("div")}),document.body.appendChild(j.$el),j.$on("change",function(t){j.onChange&&j.onChange(t)}),j.$on("scale",function(t){j.onScale&&j.onScale(t)})},Fn=function(t,i){if(i===void 0&&(i=0),!K){j||Bd();var n=Array.isArray(t)?{images:t,startPosition:i}:t;return m(j,Pd,n),j.$once("input",function(r){j.value=r}),j.$once("closed",function(){j.images=[]}),n.onClose&&(j.$off("close"),j.$once("close",n.onClose)),j}};Fn.Component=zn,Fn.install=function(){$.use(zn)};const Hn=Fn;var Ws=p("index-anchor"),Ed=Ws[0],Dd=Ws[1];const Nd=Ed({mixins:[X("vanIndexBar",{indexKey:"childrenIndex"})],props:{index:[Number,String]},data:function(){return{top:0,left:null,rect:{top:0,height:0},width:null,active:!1}},computed:{sticky:function(){return this.active&&this.parent.sticky},anchorStyle:function(){if(this.sticky)return{zIndex:""+this.parent.zIndex,left:this.left?this.left+"px":null,width:this.width?this.width+"px":null,transform:"translate3d(0, "+this.top+"px, 0)",color:this.parent.highlightColor}}},mounted:function(){var t=this.$el.getBoundingClientRect();this.rect.height=t.height},methods:{scrollIntoView:function(){this.$el.scrollIntoView()},getRect:function(t,i){var n=this.$el,r=n.getBoundingClientRect();return this.rect.height=r.height,t===window||t===document.body?this.rect.top=r.top+ve():this.rect.top=r.top+qt(t)-i.top,this.rect}},render:function(){var t,i=arguments[0],n=this.sticky;return i("div",{style:{height:n?this.rect.height+"px":null}},[i("div",{style:this.anchorStyle,class:[Dd({sticky:n}),(t={},t[me]=n,t)]},[this.slots("default")||this.index])])}});function Md(){for(var e=[],t="A".charCodeAt(0),i=0;i<26;i++)e.push(String.fromCharCode(t+i));return e}var Us=p("index-bar"),Ld=Us[0],jn=Us[1];const Ad=Ld({mixins:[nt,G("vanIndexBar"),ut(function(e){this.scroller||(this.scroller=Ut(this.$el)),e(this.scroller,"scroll",this.onScroll)})],props:{zIndex:[Number,String],highlightColor:String,sticky:{type:Boolean,default:!0},stickyOffsetTop:{type:Number,default:0},indexList:{type:Array,default:Md}},data:function(){return{activeAnchorIndex:null}},computed:{sidebarStyle:function(){if(_(this.zIndex))return{zIndex:this.zIndex+1}},highlightStyle:function(){var t=this.highlightColor;if(t)return{color:t}}},watch:{indexList:function(){this.$nextTick(this.onScroll)},activeAnchorIndex:function(t){t&&this.$emit("change",t)}},methods:{onScroll:function(){var t=this;if(!ke(this.$el)){var i=qt(this.scroller),n=this.getScrollerRect(),r=this.children.map(function(s){return s.getRect(t.scroller,n)}),a=this.getActiveAnchorIndex(i,r);this.activeAnchorIndex=this.indexList[a],this.sticky&&this.children.forEach(function(s,o){if(o===a||o===a-1){var l=s.$el.getBoundingClientRect();s.left=l.left,s.width=l.width}else s.left=null,s.width=null;if(o===a)s.active=!0,s.top=Math.max(t.stickyOffsetTop,r[o].top-i)+n.top;else if(o===a-1){var c=r[a].top-i;s.active=c>0,s.top=c+n.top-r[o].height}else s.active=!1})}},getScrollerRect:function(){return this.scroller.getBoundingClientRect?this.scroller.getBoundingClientRect():{top:0,left:0}},getActiveAnchorIndex:function(t,i){for(var n=this.children.length-1;n>=0;n--){var r=n>0?i[n-1].height:0,a=this.sticky?r+this.stickyOffsetTop:0;if(t+a>=i[n].top)return n}return-1},onClick:function(t){this.scrollToElement(t.target)},onTouchMove:function(t){if(this.touchMove(t),this.direction==="vertical"){z(t);var i=t.touches[0],n=i.clientX,r=i.clientY,a=document.elementFromPoint(n,r);if(a){var s=a.dataset.index;this.touchActiveIndex!==s&&(this.touchActiveIndex=s,this.scrollToElement(a))}}},scrollTo:function(t){var i=this.children.filter(function(n){return String(n.index)===t});i[0]&&(i[0].scrollIntoView(),this.sticky&&this.stickyOffsetTop&&ze(ve()-this.stickyOffsetTop),this.$emit("select",i[0].index))},scrollToElement:function(t){var i=t.dataset.index;this.scrollTo(i)},onTouchEnd:function(){this.active=null}},render:function(){var t=this,i=arguments[0],n=this.indexList.map(function(r){var a=r===t.activeAnchorIndex;return i("span",{class:jn("index",{active:a}),style:a?t.highlightStyle:null,attrs:{"data-index":r}},[r])});return i("div",{class:jn()},[i("div",{class:jn("sidebar"),style:this.sidebarStyle,on:{click:this.onClick,touchstart:this.touchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[n]),this.slots("default")])}});var Wn=p("list"),Rd=Wn[0],$e=Wn[1],Vd=Wn[2];const zd=Rd({mixins:[ut(function(e){this.scroller||(this.scroller=Ut(this.$el)),e(this.scroller,"scroll",this.check)})],model:{prop:"loading"},props:{error:Boolean,loading:Boolean,finished:Boolean,errorText:String,loadingText:String,finishedText:String,immediateCheck:{type:Boolean,default:!0},offset:{type:[Number,String],default:300},direction:{type:String,default:"down"}},data:function(){return{innerLoading:this.loading}},updated:function(){this.innerLoading=this.loading},mounted:function(){this.immediateCheck&&this.check()},watch:{loading:"check",finished:"check"},methods:{check:function(){var t=this;this.$nextTick(function(){if(!(t.innerLoading||t.finished||t.error)){var i=t.$el,n=t.scroller,r=t.offset,a=t.direction,s;n.getBoundingClientRect?s=n.getBoundingClientRect():s={top:0,bottom:n.innerHeight};var o=s.bottom-s.top;if(!o||ke(i))return!1;var l=!1,c=t.$refs.placeholder.getBoundingClientRect();a==="up"?l=s.top-c.top<=r:l=c.bottom-s.bottom<=r,l&&(t.innerLoading=!0,t.$emit("input",!0),t.$emit("load"))}})},clickErrorText:function(){this.$emit("update:error",!1),this.check()},genLoading:function(){var t=this.$createElement;if(this.innerLoading&&!this.finished)return t("div",{key:"loading",class:$e("loading")},[this.slots("loading")||t(ht,{attrs:{size:"16"}},[this.loadingText||Vd("loading")])])},genFinishedText:function(){var t=this.$createElement;if(this.finished){var i=this.slots("finished")||this.finishedText;if(i)return t("div",{class:$e("finished-text")},[i])}},genErrorText:function(){var t=this.$createElement;if(this.error){var i=this.slots("error")||this.errorText;if(i)return t("div",{on:{click:this.clickErrorText},class:$e("error-text")},[i])}}},render:function(){var t=arguments[0],i=t("div",{ref:"placeholder",key:"placeholder",class:$e("placeholder")});return t("div",{class:$e(),attrs:{role:"feed","aria-busy":this.innerLoading}},[this.direction==="down"?this.slots():i,this.genLoading(),this.genFinishedText(),this.genErrorText(),this.direction==="up"?this.slots():i])}});var qs=p("nav-bar"),Fd=qs[0],Bt=qs[1];const Hd=Fd({props:{title:String,fixed:Boolean,zIndex:[Number,String],leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,border:{type:Boolean,default:!0}},data:function(){return{height:null}},mounted:function(){var t=this;if(this.placeholder&&this.fixed){var i=function(){t.height=t.$refs.navBar.getBoundingClientRect().height};i(),setTimeout(i,100)}},methods:{genLeft:function(){var t=this.$createElement,i=this.slots("left");return i||[this.leftArrow&&t(w,{class:Bt("arrow"),attrs:{name:"arrow-left"}}),this.leftText&&t("span",{class:Bt("text")},[this.leftText])]},genRight:function(){var t=this.$createElement,i=this.slots("right");if(i)return i;if(this.rightText)return t("span",{class:Bt("text")},[this.rightText])},genNavBar:function(){var t,i=this.$createElement;return i("div",{ref:"navBar",style:{zIndex:this.zIndex},class:[Bt({fixed:this.fixed,"safe-area-inset-top":this.safeAreaInsetTop}),(t={},t[me]=this.border,t)]},[i("div",{class:Bt("content")},[this.hasLeft()&&i("div",{class:Bt("left"),on:{click:this.onClickLeft}},[this.genLeft()]),i("div",{class:[Bt("title"),"van-ellipsis"]},[this.slots("title")||this.title]),this.hasRight()&&i("div",{class:Bt("right"),on:{click:this.onClickRight}},[this.genRight()])])])},hasLeft:function(){return this.leftArrow||this.leftText||this.slots("left")},hasRight:function(){return this.rightText||this.slots("right")},onClickLeft:function(t){this.$emit("click-left",t)},onClickRight:function(t){this.$emit("click-right",t)}},render:function(){var t=arguments[0];return this.placeholder&&this.fixed?t("div",{class:Bt("placeholder"),style:{height:this.height+"px"}},[this.genNavBar()]):this.genNavBar()}});var Ks=p("notice-bar"),jd=Ks[0],we=Ks[1];const Wd=jd({mixins:[ut(function(e){e(window,"pageshow",this.reset)})],inject:{vanPopup:{default:null}},props:{text:String,mode:String,color:String,leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,default:null},delay:{type:[Number,String],default:1},speed:{type:[Number,String],default:60}},data:function(){return{show:!0,offset:0,duration:0,wrapWidth:0,contentWidth:0}},watch:{scrollable:"reset",text:{handler:"reset",immediate:!0}},created:function(){this.vanPopup&&this.vanPopup.onReopen(this.reset)},activated:function(){this.reset()},methods:{onClickIcon:function(t){this.mode==="closeable"&&(this.show=!1,this.$emit("close",t))},onTransitionEnd:function(){var t=this;this.offset=this.wrapWidth,this.duration=0,at(function(){Xt(function(){t.offset=-t.contentWidth,t.duration=(t.contentWidth+t.wrapWidth)/t.speed,t.$emit("replay")})})},start:function(){this.reset()},reset:function(){var t=this,i=_(this.delay)?this.delay*1e3:0;this.offset=0,this.duration=0,this.wrapWidth=0,this.contentWidth=0,clearTimeout(this.startTimer),this.startTimer=setTimeout(function(){var n=t.$refs,r=n.wrap,a=n.content;if(!(!r||!a||t.scrollable===!1)){var s=r.getBoundingClientRect().width,o=a.getBoundingClientRect().width;(t.scrollable||o>s)&&Xt(function(){t.offset=-o,t.duration=o/t.speed,t.wrapWidth=s,t.contentWidth=o})}},i)}},render:function(){var t=this,i=arguments[0],n=this.slots,r=this.mode,a=this.leftIcon,s=this.onClickIcon,o={color:this.color,background:this.background},l={transform:this.offset?"translateX("+this.offset+"px)":"",transitionDuration:this.duration+"s"};function c(){var h=n("left-icon");if(h)return h;if(a)return i(w,{class:we("left-icon"),attrs:{name:a}})}function u(){var h=n("right-icon");if(h)return h;var d;if(r==="closeable"?d="cross":r==="link"&&(d="arrow"),d)return i(w,{class:we("right-icon"),attrs:{name:d},on:{click:s}})}return i("div",{attrs:{role:"alert"},directives:[{name:"show",value:this.show}],class:we({wrapable:this.wrapable}),style:o,on:{click:function(d){t.$emit("click",d)}}},[c(),i("div",{ref:"wrap",class:we("wrap"),attrs:{role:"marquee"}},[i("div",{ref:"content",class:[we("content"),{"van-ellipsis":this.scrollable===!1&&!this.wrapable}],style:l,on:{transitionend:this.onTransitionEnd}},[this.slots()||this.text])]),u()])}});var Ys=p("notify"),Ud=Ys[0],qd=Ys[1];function Xs(e,t,i,n){var r={color:t.color,background:t.background};return e(St,T([{attrs:{value:t.value,position:"top",overlay:!1,duration:.2,lockScroll:!1},style:r,class:[qd([t.type]),t.className]},B(n,!0)]),[(i.default==null?void 0:i.default())||t.message])}Xs.props=m({},Fe,{color:String,message:[Number,String],duration:[Number,String],className:null,background:String,getContainer:[String,Function],type:{type:String,default:"danger"}});const Un=Ud(Xs);var Gs,st;function Kd(e){return ct(e)?e:{message:e}}function ot(e){if(!K)return st||(st=_r(Un,{on:{click:function(i){st.onClick&&st.onClick(i)},close:function(){st.onClose&&st.onClose()},opened:function(){st.onOpened&&st.onOpened()}}})),e=m({},ot.currentOptions,Kd(e)),m(st,e),clearTimeout(Gs),e.duration&&e.duration>0&&(Gs=setTimeout(ot.clear,e.duration)),st}function Zs(){return{type:"danger",value:!0,message:"",color:void 0,background:void 0,duration:3e3,className:"",onClose:null,onClick:null,onOpened:null}}ot.clear=function(){st&&(st.value=!1)},ot.currentOptions=Zs(),ot.setDefaultOptions=function(e){m(ot.currentOptions,e)},ot.resetDefaultOptions=function(){ot.currentOptions=Zs()},ot.install=function(){$.use(Un)},ot.Component=Un,$.prototype.$notify=ot;const Yd={render:function(){var t=arguments[0];return t("svg",{attrs:{viewBox:"0 0 32 22",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M28.016 0A3.991 3.991 0 0132 3.987v14.026c0 2.2-1.787 3.987-3.98 3.987H10.382c-.509 0-.996-.206-1.374-.585L.89 13.09C.33 12.62 0 11.84 0 11.006c0-.86.325-1.62.887-2.08L9.01.585A1.936 1.936 0 0110.383 0zm0 1.947H10.368L2.24 10.28c-.224.226-.312.432-.312.73 0 .287.094.51.312.729l8.128 8.333h17.648a2.041 2.041 0 002.037-2.04V3.987c0-1.127-.915-2.04-2.037-2.04zM23.028 6a.96.96 0 01.678.292.95.95 0 01-.003 1.377l-3.342 3.348 3.326 3.333c.189.188.292.43.292.679 0 .248-.103.49-.292.679a.96.96 0 01-.678.292.959.959 0 01-.677-.292L18.99 12.36l-3.343 3.345a.96.96 0 01-.677.292.96.96 0 01-.678-.292.962.962 0 01-.292-.68c0-.248.104-.49.292-.679l3.342-3.348-3.342-3.348A.963.963 0 0114 6.971c0-.248.104-.49.292-.679A.96.96 0 0114.97 6a.96.96 0 01.677.292l3.358 3.348 3.345-3.348A.96.96 0 0123.028 6z",fill:"currentColor"}})])}},Xd={render:function(){var t=arguments[0];return t("svg",{attrs:{viewBox:"0 0 30 24",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M25.877 12.843h-1.502c-.188 0-.188 0-.188.19v1.512c0 .188 0 .188.188.188h1.5c.187 0 .187 0 .187-.188v-1.511c0-.19 0-.191-.185-.191zM17.999 10.2c0 .188 0 .188.188.188h1.687c.188 0 .188 0 .188-.188V8.688c0-.187.004-.187-.186-.19h-1.69c-.187 0-.187 0-.187.19V10.2zm2.25-3.967h1.5c.188 0 .188 0 .188-.188v-1.7c0-.19 0-.19-.188-.19h-1.5c-.189 0-.189 0-.189.19v1.7c0 .188 0 .188.19.188zm2.063 4.157h3.563c.187 0 .187 0 .187-.189V4.346c0-.19.004-.19-.185-.19h-1.69c-.187 0-.187 0-.187.188v4.155h-1.688c-.187 0-.187 0-.187.189v1.514c0 .19 0 .19.187.19zM14.812 24l2.812-3.4H12l2.813 3.4zm-9-11.157H4.31c-.188 0-.188 0-.188.19v1.512c0 .188 0 .188.188.188h1.502c.187 0 .187 0 .187-.188v-1.511c0-.19.01-.191-.189-.191zm15.937 0H8.25c-.188 0-.188 0-.188.19v1.512c0 .188 0 .188.188.188h13.5c.188 0 .188 0 .188-.188v-1.511c0-.19 0-.191-.188-.191zm-11.438-2.454h1.5c.188 0 .188 0 .188-.188V8.688c0-.187 0-.187-.188-.189h-1.5c-.187 0-.187 0-.187.189V10.2c0 .188 0 .188.187.188zM27.94 0c.563 0 .917.21 1.313.567.518.466.748.757.748 1.51v14.92c0 .567-.188 1.134-.562 1.512-.376.378-.938.566-1.313.566H2.063c-.563 0-.938-.188-1.313-.566-.562-.378-.75-.945-.75-1.511V2.078C0 1.51.188.944.562.567.938.189 1.5 0 1.875 0zm-.062 2H2v14.92h25.877V2zM5.81 4.157c.19 0 .19 0 .19.189v1.762c-.003.126-.024.126-.188.126H4.249c-.126-.003-.126-.023-.126-.188v-1.7c-.187-.19 0-.19.188-.19zm10.5 2.077h1.503c.187 0 .187 0 .187-.188v-1.7c0-.19 0-.19-.187-.19h-1.502c-.188 0-.188.001-.188.19v1.7c0 .188 0 .188.188.188zM7.875 8.5c.187 0 .187.002.187.189V10.2c0 .188 0 .188-.187.188H4.249c-.126-.002-.126-.023-.126-.188V8.625c.003-.126.024-.126.188-.126zm7.875 0c.19.002.19.002.19.189v1.575c-.003.126-.024.126-.19.126h-1.563c-.126-.002-.126-.023-.126-.188V8.625c.002-.126.023-.126.189-.126zm-6-4.342c.187 0 .187 0 .187.189v1.7c0 .188 0 .188-.187.188H8.187c-.126-.003-.126-.023-.126-.188V4.283c.003-.126.024-.126.188-.126zm3.94 0c.185 0 .372 0 .372.189v1.762c-.002.126-.023.126-.187.126h-1.75C12 6.231 12 6.211 12 6.046v-1.7c0-.19.187-.19.187-.19z",fill:"currentColor"}})])}};var Js=p("key"),Gd=Js[0],xe=Js[1];const qn=Gd({mixins:[nt],props:{type:String,text:[Number,String],color:String,wider:Boolean,large:Boolean,loading:Boolean},data:function(){return{active:!1}},mounted:function(){this.bindTouchEvent(this.$el)},methods:{onTouchStart:function(t){t.stopPropagation(),this.touchStart(t),this.active=!0},onTouchMove:function(t){this.touchMove(t),this.direction&&(this.active=!1)},onTouchEnd:function(t){this.active&&(this.slots("default")||t.preventDefault(),this.active=!1,this.$emit("press",this.text,this.type))},genContent:function(){var t=this.$createElement,i=this.type==="extra",n=this.type==="delete",r=this.slots("default")||this.text;return this.loading?t(ht,{class:xe("loading-icon")}):n?r||t(Yd,{class:xe("delete-icon")}):i?r||t(Xd,{class:xe("collapse-icon")}):r}},render:function(){var t=arguments[0];return t("div",{class:xe("wrapper",{wider:this.wider})},[t("div",{attrs:{role:"button",tabindex:"0"},class:xe([this.color,{large:this.large,active:this.active,delete:this.type==="delete"}])},[this.genContent()])])}});var Qs=p("number-keyboard"),Zd=Qs[0],zt=Qs[1];const Jd=Zd({mixins:[Ui(),ut(function(e){this.hideOnClickOutside&&e(document.body,"touchstart",this.onBlur)})],model:{event:"update:value"},props:{show:Boolean,title:String,zIndex:[Number,String],randomKeyOrder:Boolean,closeButtonText:String,deleteButtonText:String,closeButtonLoading:Boolean,theme:{type:String,default:"default"},value:{type:String,default:""},extraKey:{type:[String,Array],default:""},maxlength:{type:[Number,String],default:Number.MAX_VALUE},transition:{type:Boolean,default:!0},showDeleteKey:{type:Boolean,default:!0},hideOnClickOutside:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0}},watch:{show:function(t){this.transition||this.$emit(t?"show":"hide")}},computed:{keys:function(){return this.theme==="custom"?this.genCustomKeys():this.genDefaultKeys()}},methods:{genBasicKeys:function(){for(var t=[],i=1;i<=9;i++)t.push({text:i});return this.randomKeyOrder&&t.sort(function(){return Math.random()>.5?1:-1}),t},genDefaultKeys:function(){return[].concat(this.genBasicKeys(),[{text:this.extraKey,type:"extra"},{text:0},{text:this.showDeleteKey?this.deleteButtonText:"",type:this.showDeleteKey?"delete":""}])},genCustomKeys:function(){var t=this.genBasicKeys(),i=this.extraKey,n=Array.isArray(i)?i:[i];return n.length===1?t.push({text:0,wider:!0},{text:n[0],type:"extra"}):n.length===2&&t.push({text:n[0],type:"extra"},{text:0},{text:n[1],type:"extra"}),t},onBlur:function(){this.show&&this.$emit("blur")},onClose:function(){this.$emit("close"),this.onBlur()},onAnimationEnd:function(){this.$emit(this.show?"show":"hide")},onPress:function(t,i){if(t===""){i==="extra"&&this.onBlur();return}var n=this.value;i==="delete"?(this.$emit("delete"),this.$emit("update:value",n.slice(0,n.length-1))):i==="close"?this.onClose():n.length<this.maxlength&&(this.$emit("input",t),this.$emit("update:value",n+t))},genTitle:function(){var t=this.$createElement,i=this.title,n=this.theme,r=this.closeButtonText,a=this.slots("title-left"),s=r&&n==="default",o=i||s||a;if(o)return t("div",{class:zt("header")},[a&&t("span",{class:zt("title-left")},[a]),i&&t("h2",{class:zt("title")},[i]),s&&t("button",{attrs:{type:"button"},class:zt("close"),on:{click:this.onClose}},[r])])},genKeys:function(){var t=this,i=this.$createElement;return this.keys.map(function(n){return i(qn,{key:n.text,attrs:{text:n.text,type:n.type,wider:n.wider,color:n.color},on:{press:t.onPress}},[n.type==="delete"&&t.slots("delete"),n.type==="extra"&&t.slots("extra-key")])})},genSidebar:function(){var t=this.$createElement;if(this.theme==="custom")return t("div",{class:zt("sidebar")},[this.showDeleteKey&&t(qn,{attrs:{large:!0,text:this.deleteButtonText,type:"delete"},on:{press:this.onPress}},[this.slots("delete")]),t(qn,{attrs:{large:!0,text:this.closeButtonText,type:"close",color:"blue",loading:this.closeButtonLoading},on:{press:this.onPress}})])}},render:function(){var t=arguments[0],i=this.genTitle();return t("transition",{attrs:{name:this.transition?"van-slide-up":""}},[t("div",{directives:[{name:"show",value:this.show}],style:{zIndex:this.zIndex},class:zt({unfit:!this.safeAreaInsetBottom,"with-title":i}),on:{touchstart:Pr,animationend:this.onAnimationEnd,webkitAnimationEnd:this.onAnimationEnd}},[i,t("div",{class:zt("body")},[t("div",{class:zt("keys")},[this.genKeys()]),this.genSidebar()])])])}});var Kn=p("pagination"),Qd=Kn[0],Ft=Kn[1],to=Kn[2];function Yn(e,t,i){return{number:e,text:t,active:i}}const tf=Qd({props:{prevText:String,nextText:String,forceEllipses:Boolean,mode:{type:String,default:"multi"},value:{type:Number,default:0},pageCount:{type:[Number,String],default:0},totalItems:{type:[Number,String],default:0},itemsPerPage:{type:[Number,String],default:10},showPageSize:{type:[Number,String],default:5}},computed:{count:function(){var t=this.pageCount||Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(1,t)},pages:function(){var t=[],i=this.count,n=+this.showPageSize;if(this.mode!=="multi")return t;var r=1,a=i,s=n<i;s&&(r=Math.max(this.value-Math.floor(n/2),1),a=r+n-1,a>i&&(a=i,r=a-n+1));for(var o=r;o<=a;o++){var l=Yn(o,o,o===this.value);t.push(l)}if(s&&n>0&&this.forceEllipses){if(r>1){var c=Yn(r-1,"...",!1);t.unshift(c)}if(a<i){var u=Yn(a+1,"...",!1);t.push(u)}}return t}},watch:{value:{handler:function(t){this.select(t||this.value)},immediate:!0}},methods:{select:function(t,i){t=Math.min(this.count,Math.max(1,t)),this.value!==t&&(this.$emit("input",t),i&&this.$emit("change",t))}},render:function(){var t=this,i,n,r=arguments[0],a=this.value,s=this.mode!=="multi",o=function(c){return function(){t.select(c,!0)}};return r("ul",{class:Ft({simple:s})},[r("li",{class:[Ft("item",{disabled:a===1}),Ft("prev"),ft],on:{click:o(a-1)}},[((i=this.slots("prev-text"))!=null?i:this.prevText)||to("prev")]),this.pages.map(function(l){var c;return r("li",{class:[Ft("item",{active:l.active}),Ft("page"),ft],on:{click:o(l.number)}},[(c=t.slots("page",l))!=null?c:l.text])}),s&&r("li",{class:Ft("page-desc")},[this.slots("pageDesc")||a+"/"+this.count]),r("li",{class:[Ft("item",{disabled:a===this.count}),Ft("next"),ft],on:{click:o(a+1)}},[((n=this.slots("next-text"))!=null?n:this.nextText)||to("next")])])}});var eo=p("panel"),ef=eo[0],Te=eo[1];function io(e,t,i,n){var r=function(){return[i.header?i.header():e(q,{attrs:{icon:t.icon,label:t.desc,title:t.title,value:t.status,valueClass:Te("header-value")},class:Te("header")}),e("div",{class:Te("content")},[i.default&&i.default()]),i.footer&&e("div",{class:[Te("footer"),qi]},[i.footer()])]};return e(es,T([{class:Te(),scopedSlots:{default:r}},B(n,!0)]))}io.props={icon:String,desc:String,title:String,status:String};const nf=ef(io);var no=p("password-input"),rf=no[0],_e=no[1];function ro(e,t,i,n){for(var r,a=t.mask,s=t.value,o=t.length,l=t.gutter,c=t.focused,u=t.errorInfo,h=u||t.info,d=[],f=0;f<o;f++){var v,g=s[f],y=f!==0&&!l,b=c&&f===s.length,S=void 0;f!==0&&l&&(S={marginLeft:P(l)}),d.push(e("li",{class:[(v={},v[Xr]=y,v),_e("item",{focus:b})],style:S},[a?e("i",{style:{visibility:g?"visible":"hidden"}}):g,b&&e("div",{class:_e("cursor")})]))}return e("div",{class:_e()},[e("ul",T([{class:[_e("security"),(r={},r[Gr]=!l,r)],on:{touchstart:function(k){k.stopPropagation(),I(n,"focus",k)}}},B(n,!0)]),[d]),h&&e("div",{class:_e(u?"error-info":"info")},[h])])}ro.props={info:String,gutter:[Number,String],focused:Boolean,errorInfo:String,mask:{type:Boolean,default:!0},value:{type:String,default:""},length:{type:[Number,String],default:6}};const af=rf(ro);function mt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xn(e){var t=mt(e).Element;return e instanceof t||e instanceof Element}function gt(e){var t=mt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function ao(e){if(typeof ShadowRoot>"u")return!1;var t=mt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var ce=Math.round;function Gn(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function sf(){return!/^((?!chrome|android).)*safari/i.test(Gn())}function hi(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var n=e.getBoundingClientRect(),r=1,a=1;t&&gt(e)&&(r=e.offsetWidth>0&&ce(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&ce(n.height)/e.offsetHeight||1);var s=Xn(e)?mt(e):window,o=s.visualViewport,l=!sf()&&i,c=(n.left+(l&&o?o.offsetLeft:0))/r,u=(n.top+(l&&o?o.offsetTop:0))/a,h=n.width/r,d=n.height/a;return{width:h,height:d,top:u,right:c+h,bottom:u+d,left:c,x:c,y:u}}function so(e){var t=mt(e),i=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:i,scrollTop:n}}function of(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lf(e){return e===mt(e)||!gt(e)?so(e):of(e)}function Et(e){return e?(e.nodeName||"").toLowerCase():null}function di(e){return((Xn(e)?e.ownerDocument:e.document)||window.document).documentElement}function cf(e){return hi(di(e)).left+so(e).scrollLeft}function Dt(e){return mt(e).getComputedStyle(e)}function Zn(e){var t=Dt(e),i=t.overflow,n=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function uf(e){var t=e.getBoundingClientRect(),i=ce(t.width)/e.offsetWidth||1,n=ce(t.height)/e.offsetHeight||1;return i!==1||n!==1}function hf(e,t,i){i===void 0&&(i=!1);var n=gt(t),r=gt(t)&&uf(t),a=di(t),s=hi(e,r,i),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!i)&&((Et(t)!=="body"||Zn(a))&&(o=lf(t)),gt(t)?(l=hi(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=cf(a))),{x:s.left+o.scrollLeft-l.x,y:s.top+o.scrollTop-l.y,width:s.width,height:s.height}}function df(e){var t=hi(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function Jn(e){return Et(e)==="html"?e:e.assignedSlot||e.parentNode||(ao(e)?e.host:null)||di(e)}function oo(e){return["html","body","#document"].indexOf(Et(e))>=0?e.ownerDocument.body:gt(e)&&Zn(e)?e:oo(Jn(e))}function fi(e,t){var i;t===void 0&&(t=[]);var n=oo(e),r=n===((i=e.ownerDocument)==null?void 0:i.body),a=mt(n),s=r?[a].concat(a.visualViewport||[],Zn(n)?n:[]):n,o=t.concat(s);return r?o:o.concat(fi(Jn(s)))}function ff(e){return["table","td","th"].indexOf(Et(e))>=0}function lo(e){return!gt(e)||Dt(e).position==="fixed"?null:e.offsetParent}function pf(e){var t=/firefox/i.test(Gn()),i=/Trident/i.test(Gn());if(i&&gt(e)){var n=Dt(e);if(n.position==="fixed")return null}var r=Jn(e);for(ao(r)&&(r=r.host);gt(r)&&["html","body"].indexOf(Et(r))<0;){var a=Dt(r);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return r;r=r.parentNode}return null}function co(e){for(var t=mt(e),i=lo(e);i&&ff(i)&&Dt(i).position==="static";)i=lo(i);return i&&(Et(i)==="html"||Et(i)==="body"&&Dt(i).position==="static")?t:i||pf(e)||t}var ue="top",pi="bottom",Ie="right",Gt="left",uo="auto",vf=[ue,pi,Ie,Gt],ho="start",vi="end",mf=[].concat(vf,[uo]).reduce(function(e,t){return e.concat([t,t+"-"+ho,t+"-"+vi])},[]),gf="beforeRead",yf="read",bf="afterRead",Sf="beforeMain",kf="main",Cf="afterMain",$f="beforeWrite",wf="write",xf="afterWrite",Qn=[gf,yf,bf,Sf,kf,Cf,$f,wf,xf];function Tf(e){var t=new Map,i=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function r(a){i.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(o){if(!i.has(o)){var l=t.get(o);l&&r(l)}}),n.push(a)}return e.forEach(function(a){i.has(a.name)||r(a)}),n}function _f(e){var t=Tf(e);return Qn.reduce(function(i,n){return i.concat(t.filter(function(r){return r.phase===n}))},[])}function If(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function Ht(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return[].concat(i).reduce(function(r,a){return r.replace(/%s/,a)},e)}var Zt='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',Of='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',fo=["name","enabled","phase","fn","effect","requires","options"];function Pf(e){e.forEach(function(t){[].concat(Object.keys(t),fo).filter(function(i,n,r){return r.indexOf(i)===n}).forEach(function(i){switch(i){case"name":typeof t.name!="string"&&console.error(Ht(Zt,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":typeof t.enabled!="boolean"&&console.error(Ht(Zt,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":Qn.indexOf(t.phase)<0&&console.error(Ht(Zt,t.name,'"phase"',"either "+Qn.join(", "),'"'+String(t.phase)+'"'));break;case"fn":typeof t.fn!="function"&&console.error(Ht(Zt,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":t.effect!=null&&typeof t.effect!="function"&&console.error(Ht(Zt,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":t.requires!=null&&!Array.isArray(t.requires)&&console.error(Ht(Zt,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(Ht(Zt,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+fo.map(function(n){return'"'+n+'"'}).join(", ")+'; but "'+i+'" was provided.')}t.requires&&t.requires.forEach(function(n){e.find(function(r){return r.name===n})==null&&console.error(Ht(Of,String(t.name),n,n))})})})}function Bf(e,t){var i=new Set;return e.filter(function(n){var r=t(n);if(!i.has(r))return i.add(r),!0})}function mi(e){return e.split("-")[0]}function Ef(e){var t=e.reduce(function(i,n){var r=i[n.name];return i[n.name]=r?Object.assign({},r,n,{options:Object.assign({},r.options,n.options),data:Object.assign({},r.data,n.data)}):n,i},{});return Object.keys(t).map(function(i){return t[i]})}function po(e){return e.split("-")[1]}function Df(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Nf(e){var t=e.reference,i=e.element,n=e.placement,r=n?mi(n):null,a=n?po(n):null,s=t.x+t.width/2-i.width/2,o=t.y+t.height/2-i.height/2,l;switch(r){case ue:l={x:s,y:t.y-i.height};break;case pi:l={x:s,y:t.y+t.height};break;case Ie:l={x:t.x+t.width,y:o};break;case Gt:l={x:t.x-i.width,y:o};break;default:l={x:t.x,y:t.y}}var c=r?Df(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(a){case ho:l[c]=l[c]-(t[u]/2-i[u]/2);break;case vi:l[c]=l[c]+(t[u]/2-i[u]/2);break}}return l}var vo="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Mf="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",mo={placement:"bottom",modifiers:[],strategy:"absolute"};function go(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function Lf(e){e===void 0&&(e={});var t=e,i=t.defaultModifiers,n=i===void 0?[]:i,r=t.defaultOptions,a=r===void 0?mo:r;return function(o,l,c){c===void 0&&(c=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},mo,a),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},h=[],d=!1,f={state:u,setOptions:function(b){var S=typeof b=="function"?b(u.options):b;g(),u.options=Object.assign({},a,u.options,S),u.scrollParents={reference:Xn(o)?fi(o):o.contextElement?fi(o.contextElement):[],popper:fi(l)};var x=_f(Ef([].concat(n,u.options.modifiers)));u.orderedModifiers=x.filter(function(et){return et.enabled});{var k=Bf([].concat(x,u.options.modifiers),function(et){var fe=et.name;return fe});if(Pf(k),mi(u.options.placement)===uo){var C=u.orderedModifiers.find(function(et){var fe=et.name;return fe==="flip"});C||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var O=Dt(l),_t=O.marginTop,M=O.marginRight,U=O.marginBottom,Me=O.marginLeft;[_t,M,U,Me].some(function(et){return parseFloat(et)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return v(),f.update()},forceUpdate:function(){if(!d){var b=u.elements,S=b.reference,x=b.popper;if(!go(S,x)){console.error(vo);return}u.rects={reference:hf(S,co(x),u.options.strategy==="fixed"),popper:df(x)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(et){return u.modifiersData[et.name]=Object.assign({},et.data)});for(var k=0,C=0;C<u.orderedModifiers.length;C++){if(k+=1,k>100){console.error(Mf);break}if(u.reset===!0){u.reset=!1,C=-1;continue}var O=u.orderedModifiers[C],_t=O.fn,M=O.options,U=M===void 0?{}:M,Me=O.name;typeof _t=="function"&&(u=_t({state:u,options:U,name:Me,instance:f})||u)}}},update:If(function(){return new Promise(function(y){f.forceUpdate(),y(u)})}),destroy:function(){g(),d=!0}};if(!go(o,l))return console.error(vo),f;f.setOptions(c).then(function(y){!d&&c.onFirstUpdate&&c.onFirstUpdate(y)});function v(){u.orderedModifiers.forEach(function(y){var b=y.name,S=y.options,x=S===void 0?{}:S,k=y.effect;if(typeof k=="function"){var C=k({state:u,name:b,instance:f,options:x}),O=function(){};h.push(C||O)}})}function g(){h.forEach(function(y){return y()}),h=[]}return f}}var gi={passive:!0};function Af(e){var t=e.state,i=e.instance,n=e.options,r=n.scroll,a=r===void 0?!0:r,s=n.resize,o=s===void 0?!0:s,l=mt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(u){u.addEventListener("scroll",i.update,gi)}),o&&l.addEventListener("resize",i.update,gi),function(){a&&c.forEach(function(u){u.removeEventListener("scroll",i.update,gi)}),o&&l.removeEventListener("resize",i.update,gi)}}var Rf={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Af,data:{}};function Vf(e){var t=e.state,i=e.name;t.modifiersData[i]=Nf({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var zf={name:"popperOffsets",enabled:!0,phase:"read",fn:Vf,data:{}},Ff={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Hf(e){var t=e.x,i=e.y,n=window,r=n.devicePixelRatio||1;return{x:ce(t*r)/r||0,y:ce(i*r)/r||0}}function yo(e){var t,i=e.popper,n=e.popperRect,r=e.placement,a=e.variation,s=e.offsets,o=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,h=e.isFixed,d=s.x,f=d===void 0?0:d,v=s.y,g=v===void 0?0:v,y=typeof u=="function"?u({x:f,y:g}):{x:f,y:g};f=y.x,g=y.y;var b=s.hasOwnProperty("x"),S=s.hasOwnProperty("y"),x=Gt,k=ue,C=window;if(c){var O=co(i),_t="clientHeight",M="clientWidth";if(O===mt(i)&&(O=di(i),Dt(O).position!=="static"&&o==="absolute"&&(_t="scrollHeight",M="scrollWidth")),O=O,r===ue||(r===Gt||r===Ie)&&a===vi){k=pi;var U=h&&O===C&&C.visualViewport?C.visualViewport.height:O[_t];g-=U-n.height,g*=l?1:-1}if(r===Gt||(r===ue||r===pi)&&a===vi){x=Ie;var Me=h&&O===C&&C.visualViewport?C.visualViewport.width:O[M];f-=Me-n.width,f*=l?1:-1}}var et=Object.assign({position:o},c&&Ff),fe=u===!0?Hf({x:f,y:g}):{x:f,y:g};if(f=fe.x,g=fe.y,l){var Le;return Object.assign({},et,(Le={},Le[k]=S?"0":"",Le[x]=b?"0":"",Le.transform=(C.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",Le))}return Object.assign({},et,(t={},t[k]=S?g+"px":"",t[x]=b?f+"px":"",t.transform="",t))}function jf(e){var t=e.state,i=e.options,n=i.gpuAcceleration,r=n===void 0?!0:n,a=i.adaptive,s=a===void 0?!0:a,o=i.roundOffsets,l=o===void 0?!0:o;{var c=Dt(t.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some(function(h){return c.indexOf(h)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
2
3
 
3
4
  `,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhangcf233/pay",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "main": "dist/pay.umd.js",
5
5
  "module": "dist/pay.es.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -10,7 +10,8 @@
10
10
  ],
11
11
  "scripts": {
12
12
  "build:types": "vue-tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
13
- "build": " vite build && npm run build:types"
13
+ "build": " vite build && npm run build:types",
14
+ "publish": "npm publish --access public"
14
15
  },
15
16
  "peerDependencies": {
16
17
  "vant": "^2.13.9"
@@ -27,6 +28,7 @@
27
28
  "vue-tsc": "^3.0.5"
28
29
  },
29
30
  "dependencies": {
31
+ "vite-plugin-css-injected-by-js": "^3.5.2",
30
32
  "vue": "^2.7.16"
31
33
  },
32
34
  "exports": {
@@ -34,6 +36,7 @@
34
36
  "import": "./dist/pay.es.js",
35
37
  "require": "./dist/pay.umd.js",
36
38
  "types": "./dist/types/index.d.ts"
37
- }
39
+ },
40
+ "./style.css": "./dist/style.css"
38
41
  }
39
- }
42
+ }
package/dist/style.css DELETED
@@ -1 +0,0 @@
1
- @charset "UTF-8";.pay-error-container[data-v-0817c014]{position:relative}.pay-error-container .loading[data-v-0817c014]{width:100%;height:100%;position:absolute;background:#fff;z-index:1;transition:all .3s;justify-content:center;align-items:center}.pay-error-container .message[data-v-0817c014]{font-size:.1rem}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-75290345]{font-family:WeChat-Bold}.root[data-v-75290345]{text-align:center}.cell[data-v-be539772]{display:flex;align-items:center;justify-content:space-between;height:.3rem}.cell .name[data-v-be539772]{width:30vw;color:gray;font-size:.14rem;display:flex;align-items:center;justify-content:end}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-ea027830]{font-family:WeChat-Bold}.custom-price .input[data-v-ea027830]{font-size:.2rem}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-68d98a5c]{font-family:WeChat-Bold}.price-root[data-v-68d98a5c]{position:relative;text-align:center;background:#f3f3f3;border-radius:.08rem;padding:.1rem 0;display:flex;flex-direction:column;height:.6rem;box-sizing:border-box;justify-content:space-between;align-items:center}.price-root .gift[data-v-68d98a5c]{position:absolute;top:-.1rem;right:-.05rem;background:linear-gradient(248.45deg,#fa1e1e,#ff7752 99.44%);padding:0 .05rem;border-radius:.1rem .1rem .1rem 0;font-size:.1rem;border-width:.02rem;border-color:#fff;border-style:solid;box-sizing:border-box;color:#fff}.price-root .token-count[data-v-68d98a5c]{display:flex;justify-content:center;align-items:center;font-size:.2rem}.price-root .token-count img[data-v-68d98a5c]{width:.16rem;height:.16rem;margin-right:.02rem}.price-root .price[data-v-68d98a5c]{font-size:.14rem}.only-price[data-v-68d98a5c]{align-items:center;justify-content:center}.only-price .price[data-v-68d98a5c]{font-size:.2rem}.content[data-v-76333b1f]{width:100%;margin:.2rem 0;display:grid;grid-template-columns:repeat(3,1fr);gap:.1rem;box-sizing:border-box;font-weight:500}.loading[data-v-76333b1f]{display:flex;justify-content:center;align-items:center}.select[data-v-76333b1f]{color:#fff}@font-face{font-family:WeChat-Bold;src:url(https://shangrao-qqzh.oss-cn-hangzhou.aliyuncs.com/pay/fonts/WeChatSansStd-Bold.ttf)}.wechat-font[data-v-20ed35e0]{font-family:WeChat-Bold}.pay-popup[data-v-20ed35e0]{display:flex;flex-direction:column;width:100vw;box-sizing:border-box;overflow:hidden;padding:0 .15rem .2rem;transition:all .3s}.title[data-v-20ed35e0]{text-align:center;margin:.16rem 0}