UNPKG

youzanyun-devtool-worker

Version:

- web - ws - proxy

7 lines 221 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define("vant",["vue"],e):"object"==typeof exports?exports.vant=e(require("vue")):t.vant=e(t.Vue)}("undefined"!=typeof self?self:this,function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=12)}([function(t,e,i){"use strict";i.d(e,"f",function(){return s}),i.d(e,"g",function(){return r}),i.d(e,"b",function(){return o}),i.d(e,"c",function(){return a}),i.d(e,"d",function(){return l}),i.d(e,"e",function(){return u}),i.d(e,"a",function(){return c});var n=i(2),s=i.n(n).a.prototype.$isServer;function r(){}function o(t){return null!=t}function a(t){return"function"==typeof t}function l(t){return null!==t&&"object"==typeof t}function u(t){return l(t)&&a(t.then)&&a(t.catch)}function c(t,e){var i=e.split("."),n=t;return i.forEach(function(t){n=o(n[t])?n[t]:""}),n}},function(t,e,i){"use strict";function n(){return(n=Object.assign||function(t){for(var e,i=1;i<arguments.length;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)}var s=["attrs","props","domProps"],r=["class","style","directives"],o=["on","nativeOn"],a=function(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}};t.exports=function(t){return t.reduce(function(t,e){for(var i in e)if(t[i])if(-1!==s.indexOf(i))t[i]=n({},t[i],e[i]);else if(-1!==r.indexOf(i)){var l=t[i]instanceof Array?t[i]:[t[i]],u=e[i]instanceof Array?e[i]:[e[i]];t[i]=l.concat(u)}else if(-1!==o.indexOf(i))for(var c in e[i])if(t[i][c]){var h=t[i][c]instanceof Array?t[i][c]:[t[i][c]],d=e[i][c]instanceof Array?e[i][c]:[e[i][c]];t[i][c]=h.concat(d)}else t[i][c]=e[i][c];else if("hook"==i)for(var f in e[i])t[i][f]=t[i][f]?a(t[i][f],e[i][f]):e[i][f];else t[i]=e[i];else t[i]=e[i];return t},{})}},function(e,i){e.exports=t},function(t,e,i){"use strict";i.d(e,"a",function(){return s}),i.d(e,"b",function(){return r});var n=/-(\w)/g;function s(t){return t.replace(n,function(t,e){return e.toUpperCase()})}function r(t,e){void 0===e&&(e=2);for(var i=t+"";i.length<e;)i="0"+i;return i}},function(t,e,i){"use strict";(function(t){i.d(e,"c",function(){return l}),i.d(e,"b",function(){return u}),i.d(e,"a",function(){return c});var n=i(0),s=Date.now();var r=n.f?t:window,o=r.requestAnimationFrame||function(t){var e=Date.now(),i=Math.max(0,16-(e-s)),n=setTimeout(t,i);return s=e+i,n},a=r.cancelAnimationFrame||r.clearTimeout;function l(t){return o.call(r,t)}function u(t){l(function(){l(t)})}function c(t){a.call(r,t)}}).call(this,i(11))},function(t,e,i){"use strict";var n=i(2),s=i.n(n),r=i(7),o=s.a.prototype,a=s.a.util.defineReactive;a(o,"$vantLang","zh-CN"),a(o,"$vantMessages",{"zh-CN":{name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",complete:"完成",loading:"加载中...",telEmpty:"请填写电话",nameEmpty:"请填写姓名",nameInvalid:"请输入正确的姓名",confirmDelete:"确定要删除吗",telInvalid:"请输入正确的手机号",vanCalendar:{end:"结束",start:"开始",title:"日期选择",confirm:"确定",weekdays:["日","一","二","三","四","五","六"],monthTitle:function(t,e){return t+"年"+e+"月"},rangePrompt:function(t){return"选择天数不能超过 "+t+" 天"}},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:"新增地址"}}});e.a={messages:function(){return o.$vantMessages[o.$vantLang]},use:function(t,e){var i;o.$vantLang=t,this.add(((i={})[t]=e,i))},add:function(t){void 0===t&&(t={}),Object(r.a)(o.$vantMessages,t)}}},function(t,e,i){"use strict";function n(t){return/^\d+(\.\d+)?$/.test(t)}function s(t){return Number.isNaN?Number.isNaN(t):t!=t}i.d(e,"b",function(){return n}),i.d(e,"a",function(){return s})},function(t,e,i){"use strict";i.d(e,"a",function(){return r});var n=i(0),s=Object.prototype.hasOwnProperty;function r(t,e){return Object.keys(e).forEach(function(i){!function(t,e,i){var o=e[i];Object(n.b)(o)&&(s.call(t,i)&&Object(n.d)(o)?t[i]=r(Object(t[i]),e[i]):t[i]=o)}(t,e,i)}),t}},function(t,e,i){"use strict";i.d(e,"a",function(){return r});var n=i(0),s=i(6);function r(t){if(Object(n.b)(t))return t=String(t),Object(s.b)(t)?t+"px":t}},function(t,e,i){"use strict";var n="__",s="--";function r(t,e,i){return e?t+i+e:t}function o(t,e){if("string"==typeof e)return r(t,e,s);if(Array.isArray(e))return e.map(function(e){return o(t,e)});var i={};return e&&Object.keys(e).forEach(function(n){i[t+s+n]=e[n]}),i}function a(t){return function(e,i){return e&&"string"!=typeof e&&(i=e,e=""),e=r(t,e,n),i?[e,o(e,i)]:e}}var l=i(0),u=i(3),c=i(2),h=i.n(c).a.extend({methods:{slots:function(t,e){void 0===t&&(t="default");var i=this.$slots,n=this.$scopedSlots[t];return n?n(e):i[t]}}});function d(t){var e=this.name;t.component(e,this),t.component(Object(u.a)("-"+e),this)}function f(t){return{functional:!0,props:t.props,model:t.model,render:function(e,i){return t(e,i.props,function(t){var e=t.scopedSlots||t.data.scopedSlots||{},i=t.slots();return Object.keys(i).forEach(function(t){e[t]||(e[t]=function(){return i[t]})}),e}(i),i)}}}function p(t){return function(e){return Object(l.c)(e)&&(e=f(e)),e.functional||(e.mixins=e.mixins||[],e.mixins.push(h)),e.name=t,e.install=d,e}}var m=i(5);function v(t){var e=Object(u.a)(t)+".";return function(t){for(var i=m.a.messages(),n=Object(l.a)(i,e+t)||Object(l.a)(i,t),s=arguments.length,r=new Array(s>1?s-1:0),o=1;o<s;o++)r[o-1]=arguments[o];return Object(l.c)(n)?n.apply(void 0,r):n}}function g(t){return[p(t="van-"+t),a(t),v(t)]}i.d(e,"a",function(){return g})},function(t,e,i){ /*! * Vue-Lazyload.js v1.2.3 * (c) 2018 Awe <hilongjw@gmail.com> * Released under the MIT License. */ t.exports=function(){"use strict";function t(t){t=t||{};var n=arguments.length,s=0;if(1===n)return t;for(;++s<n;){var r=arguments[s];d(t)&&(t=r),i(r)&&e(t,r)}return t}function e(e,s){for(var r in f(e,s),s)if("__proto__"!==r&&n(s,r)){var o=s[r];i(o)?("undefined"===m(e[r])&&"function"===m(o)&&(e[r]=o),e[r]=t(e[r]||{},o)):e[r]=o}return e}function i(t){return"object"===m(t)||"function"===m(t)}function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function s(t,e){if(t.length){var i=t.indexOf(e);return i>-1?t.splice(i,1):void 0}}function r(t,e){if("IMG"===t.tagName&&t.getAttribute("data-srcset")){var i=t.getAttribute("data-srcset"),n=[],s=t.parentNode,r=s.offsetWidth*e,o=void 0,a=void 0,l=void 0;(i=i.trim().split(",")).map(function(t){t=t.trim(),-1===(o=t.lastIndexOf(" "))?(a=t,l=999998):(a=t.substr(0,o),l=parseInt(t.substr(o+1,t.length-o-2),10)),n.push([l,a])}),n.sort(function(t,e){if(t[0]<e[0])return-1;if(t[0]>e[0])return 1;if(t[0]===e[0]){if(-1!==e[1].indexOf(".webp",e[1].length-5))return 1;if(-1!==t[1].indexOf(".webp",t[1].length-5))return-1}return 0});for(var u="",c=void 0,h=n.length,d=0;d<h;d++)if((c=n[d])[0]>=r){u=c[1];break}return u}}function o(t,e){for(var i=void 0,n=0,s=t.length;n<s;n++)if(e(t[n])){i=t[n];break}return i}function a(){if(!g)return!1;var t=!0,e=document;try{var i=e.createElement("object");i.type="image/webp",i.style.visibility="hidden",i.innerHTML="!",e.body.appendChild(i),t=!i.offsetWidth,e.body.removeChild(i)}catch(e){t=!1}return t}function l(){}var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},h=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),d=function(t){return null==t||"function"!=typeof t&&"object"!==(void 0===t?"undefined":u(t))},f=function(t,e){if(null==t)throw new TypeError("expected first argument to be an object.");if(void 0===e||"undefined"==typeof Symbol)return t;if("function"!=typeof Object.getOwnPropertySymbols)return t;for(var i=Object.prototype.propertyIsEnumerable,n=Object(t),s=arguments.length,r=0;++r<s;)for(var o=Object(arguments[r]),a=Object.getOwnPropertySymbols(o),l=0;l<a.length;l++){var u=a[l];i.call(o,u)&&(n[u]=o[u])}return n},p=Object.prototype.toString,m=function(t){var e=void 0===t?"undefined":u(t);return"undefined"===e?"undefined":null===t?"null":!0===t||!1===t||t instanceof Boolean?"boolean":"string"===e||t instanceof String?"string":"number"===e||t instanceof Number?"number":"function"===e||t instanceof Function?void 0!==t.constructor.name&&"Generator"===t.constructor.name.slice(0,9)?"generatorfunction":"function":void 0!==Array.isArray&&Array.isArray(t)?"array":t instanceof RegExp?"regexp":t instanceof Date?"date":"[object RegExp]"===(e=p.call(t))?"regexp":"[object Date]"===e?"date":"[object Arguments]"===e?"arguments":"[object Error]"===e?"error":"[object Promise]"===e?"promise":function(t){return t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}(t)?"buffer":"[object Set]"===e?"set":"[object WeakSet]"===e?"weakset":"[object Map]"===e?"map":"[object WeakMap]"===e?"weakmap":"[object Symbol]"===e?"symbol":"[object Map Iterator]"===e?"mapiterator":"[object Set Iterator]"===e?"setiterator":"[object String Iterator]"===e?"stringiterator":"[object Array Iterator]"===e?"arrayiterator":"[object Int8Array]"===e?"int8array":"[object Uint8Array]"===e?"uint8array":"[object Uint8ClampedArray]"===e?"uint8clampedarray":"[object Int16Array]"===e?"int16array":"[object Uint16Array]"===e?"uint16array":"[object Int32Array]"===e?"int32array":"[object Uint32Array]"===e?"uint32array":"[object Float32Array]"===e?"float32array":"[object Float64Array]"===e?"float64array":"object"},v=t,g="undefined"!=typeof window,b=g&&"IntersectionObserver"in window,y={event:"event",observer:"observer"},S=function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}if(g)return"function"==typeof window.CustomEvent?window.CustomEvent:(t.prototype=window.Event.prototype,t)}(),k=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return g&&window.devicePixelRatio||t},x=function(){if(g){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}}(),w={on:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];x?t.addEventListener(e,i,{capture:n,passive:!0}):t.addEventListener(e,i,n)},off:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.removeEventListener(e,i,n)}},C=function(t,e,i){var n=new Image;n.src=t.src,n.onload=function(){e({naturalHeight:n.naturalHeight,naturalWidth:n.naturalWidth,src:n.src})},n.onerror=function(t){i(t)}},O=function(t,e){return"undefined"!=typeof getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.style[e]},T=function(t){return O(t,"overflow")+O(t,"overflow-y")+O(t,"overflow-x")},$={},I=function(){function t(e){var i=e.el,n=e.src,s=e.error,r=e.loading,o=e.bindType,a=e.$parent,l=e.options,u=e.elRenderer;c(this,t),this.el=i,this.src=n,this.error=s,this.loading=r,this.bindType=o,this.attempt=0,this.naturalHeight=0,this.naturalWidth=0,this.options=l,this.rect=null,this.$parent=a,this.elRenderer=u,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}return h(t,[{key:"initState",value:function(){this.el.dataset.src=this.src,this.state={error:!1,loaded:!1,rendered:!1}}},{key:"record",value:function(t){this.performanceData[t]=Date.now()}},{key:"update",value:function(t){var e=t.src,i=t.loading,n=t.error,s=this.src;this.src=e,this.loading=i,this.error=n,this.filter(),s!==this.src&&(this.attempt=0,this.initState())}},{key:"getRect",value:function(){this.rect=this.el.getBoundingClientRect()}},{key:"checkInView",value:function(){return this.getRect(),this.rect.top<window.innerHeight*this.options.preLoad&&this.rect.bottom>this.options.preLoadTop&&this.rect.left<window.innerWidth*this.options.preLoad&&this.rect.right>0}},{key:"filter",value:function(){var t=this;(function(t){if(!(t instanceof Object))return[];if(Object.keys)return Object.keys(t);var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e})(this.options.filter).map(function(e){t.options.filter[e](t,t.options)})}},{key:"renderLoading",value:function(t){var e=this;C({src:this.loading},function(i){e.render("loading",!1),t()},function(){t(),e.options.silent||console.warn("VueLazyload log: load failed with loading image("+e.loading+")")})}},{key:"load",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;return this.attempt>this.options.attempt-1&&this.state.error?(this.options.silent||console.log("VueLazyload log: "+this.src+" tried too more than "+this.options.attempt+" times"),void e()):this.state.loaded||$[this.src]?(this.state.loaded=!0,e(),this.render("loaded",!0)):void this.renderLoading(function(){t.attempt++,t.record("loadStart"),C({src:t.src},function(i){t.naturalHeight=i.naturalHeight,t.naturalWidth=i.naturalWidth,t.state.loaded=!0,t.state.error=!1,t.record("loadEnd"),t.render("loaded",!1),$[t.src]=1,e()},function(e){!t.options.silent&&console.error(e),t.state.error=!0,t.state.loaded=!1,t.render("error",!1)})})}},{key:"render",value:function(t,e){this.elRenderer(this,t,e)}},{key:"performance",value:function(){var t="loading",e=0;return this.state.loaded&&(t="loaded",e=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(t="error"),{src:this.src,state:t,time:e}}},{key:"destroy",value:function(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}]),t}(),B="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",j=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],N={rootMargin:"0px",threshold:0},D=function(t){return function(){function e(t){var i=t.preLoad,n=t.error,s=t.throttleWait,r=t.preLoadTop,o=t.dispatchEvent,l=t.loading,u=t.attempt,h=t.silent,d=void 0===h||h,f=t.scale,p=t.listenEvents,m=(t.hasbind,t.filter),v=t.adapter,g=t.observer,b=t.observerOptions;c(this,e),this.version="1.2.3",this.mode=y.event,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:d,dispatchEvent:!!o,throttleWait:s||200,preLoad:i||1.3,preLoadTop:r||0,error:n||B,loading:l||B,attempt:u||3,scale:f||k(f),ListenEvents:p||j,hasbind:!1,supportWebp:a(),filter:m||{},adapter:v||{},observer:!!g,observerOptions:b||N},this._initEvent(),this.lazyLoadHandler=function(t,e){var i=null,n=0;return function(){if(!i){var s=Date.now()-n,r=this,o=arguments,a=function(){n=Date.now(),i=!1,t.apply(r,o)};s>=e?a():i=setTimeout(a,e)}}}(this._lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?y.observer:y.event)}return h(e,[{key:"config",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v(this.options,t)}},{key:"performance",value:function(){var t=[];return this.ListenerQueue.map(function(e){t.push(e.performance())}),t}},{key:"addLazyBox",value:function(t){this.ListenerQueue.push(t),g&&(this._addListenerTarget(window),this._observer&&this._observer.observe(t.el),t.$el&&t.$el.parentNode&&this._addListenerTarget(t.$el.parentNode))}},{key:"add",value:function(e,i,n){var s=this;if(function(t,e){for(var i=!1,n=0,s=t.length;n<s;n++)if(e(t[n])){i=!0;break}return i}(this.ListenerQueue,function(t){return t.el===e}))return this.update(e,i),t.nextTick(this.lazyLoadHandler);var o=this._valueFormatter(i.value),a=o.src,l=o.loading,u=o.error;t.nextTick(function(){a=r(e,s.options.scale)||a,s._observer&&s._observer.observe(e);var o=Object.keys(i.modifiers)[0],c=void 0;o&&(c=(c=n.context.$refs[o])?c.$el||c:document.getElementById(o)),c||(c=function(t){if(g){if(!(t instanceof HTMLElement))return window;for(var e=t;e&&e!==document.body&&e!==document.documentElement&&e.parentNode;){if(/(scroll|auto)/.test(T(e)))return e;e=e.parentNode}return window}}(e));var h=new I({bindType:i.arg,$parent:c,el:e,loading:l,error:u,src:a,elRenderer:s._elRenderer.bind(s),options:s.options});s.ListenerQueue.push(h),g&&(s._addListenerTarget(window),s._addListenerTarget(c)),s.lazyLoadHandler(),t.nextTick(function(){return s.lazyLoadHandler()})})}},{key:"update",value:function(e,i){var n=this,s=this._valueFormatter(i.value),a=s.src,l=s.loading,u=s.error;a=r(e,this.options.scale)||a;var c=o(this.ListenerQueue,function(t){return t.el===e});c&&c.update({src:a,loading:l,error:u}),this._observer&&(this._observer.unobserve(e),this._observer.observe(e)),this.lazyLoadHandler(),t.nextTick(function(){return n.lazyLoadHandler()})}},{key:"remove",value:function(t){if(t){this._observer&&this._observer.unobserve(t);var e=o(this.ListenerQueue,function(e){return e.el===t});e&&(this._removeListenerTarget(e.$parent),this._removeListenerTarget(window),s(this.ListenerQueue,e)&&e.destroy())}}},{key:"removeComponent",value:function(t){t&&(s(this.ListenerQueue,t),this._observer&&this._observer.unobserve(t.el),t.$parent&&t.$el.parentNode&&this._removeListenerTarget(t.$el.parentNode),this._removeListenerTarget(window))}},{key:"setMode",value:function(t){var e=this;b||t!==y.observer||(t=y.event),this.mode=t,t===y.event?(this._observer&&(this.ListenerQueue.forEach(function(t){e._observer.unobserve(t.el)}),this._observer=null),this.TargetQueue.forEach(function(t){e._initListen(t.el,!0)})):(this.TargetQueue.forEach(function(t){e._initListen(t.el,!1)}),this._initIntersectionObserver())}},{key:"_addListenerTarget",value:function(t){if(t){var e=o(this.TargetQueue,function(e){return e.el===t});return e?e.childrenCount++:(e={el:t,id:++this.TargetIndex,childrenCount:1,listened:!0},this.mode===y.event&&this._initListen(e.el,!0),this.TargetQueue.push(e)),this.TargetIndex}}},{key:"_removeListenerTarget",value:function(t){var e=this;this.TargetQueue.forEach(function(i,n){i.el===t&&(--i.childrenCount||(e._initListen(i.el,!1),e.TargetQueue.splice(n,1),i=null))})}},{key:"_initListen",value:function(t,e){var i=this;this.options.ListenEvents.forEach(function(n){return w[e?"on":"off"](t,n,i.lazyLoadHandler)})}},{key:"_initEvent",value:function(){var t=this;this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=function(e,i){t.Event.listeners[e].push(i)},this.$once=function(e,i){var n=t;t.$on(e,function t(){n.$off(e,t),i.apply(n,arguments)})},this.$off=function(e,i){i?s(t.Event.listeners[e],i):t.Event.listeners[e]=[]},this.$emit=function(e,i,n){t.Event.listeners[e].forEach(function(t){return t(i,n)})}}},{key:"_lazyLoadHandler",value:function(){var t=this;this.ListenerQueue.forEach(function(e,i){e.state.loaded||e.checkInView()&&e.load(function(){!e.error&&e.loaded&&t.ListenerQueue.splice(i,1)})})}},{key:"_initIntersectionObserver",value:function(){var t=this;b&&(this._observer=new IntersectionObserver(this._observerHandler.bind(this),this.options.observerOptions),this.ListenerQueue.length&&this.ListenerQueue.forEach(function(e){t._observer.observe(e.el)}))}},{key:"_observerHandler",value:function(t,e){var i=this;t.forEach(function(t){t.isIntersecting&&i.ListenerQueue.forEach(function(e){if(e.el===t.target){if(e.state.loaded)return i._observer.unobserve(e.el);e.load()}})})}},{key:"_elRenderer",value:function(t,e,i){if(t.el){var n=t.el,s=t.bindType,r=void 0;switch(e){case"loading":r=t.loading;break;case"error":r=t.error;break;default:r=t.src}if(s?n.style[s]='url("'+r+'")':n.getAttribute("src")!==r&&n.setAttribute("src",r),n.setAttribute("lazy",e),this.$emit(e,t,i),this.options.adapter[e]&&this.options.adapter[e](t,this.options),this.options.dispatchEvent){var o=new S(e,{detail:t});n.dispatchEvent(o)}}}},{key:"_valueFormatter",value:function(t){var e=t,i=this.options.loading,n=this.options.error;return function(t){return null!==t&&"object"===(void 0===t?"undefined":u(t))}(t)&&(t.src||this.options.silent||console.error("Vue Lazyload warning: miss src with "+t),e=t.src,i=t.loading||this.options.loading,n=t.error||this.options.error),{src:e,loading:i,error:n}}}]),e}()},E=function(t){return{props:{tag:{type:String,default:"div"}},render:function(t){return!1===this.show?t(this.tag):t(this.tag,null,this.$slots.default)},data:function(){return{el:null,state:{loaded:!1},rect:{},show:!1}},mounted:function(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeDestroy:function(){t.removeComponent(this)},methods:{getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),g&&this.rect.top<window.innerHeight*t.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*t.options.preLoad&&this.rect.right>0},load:function(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)}}}},L=function(){function t(e){var i=e.lazy;c(this,t),this.lazy=i,i.lazyContainerMananger=this,this._queue=[]}return h(t,[{key:"bind",value:function(t,e,i){var n=new P({el:t,binding:e,vnode:i,lazy:this.lazy});this._queue.push(n)}},{key:"update",value:function(t,e,i){var n=o(this._queue,function(e){return e.el===t});n&&n.update({el:t,binding:e,vnode:i})}},{key:"unbind",value:function(t,e,i){var n=o(this._queue,function(e){return e.el===t});n&&(n.clear(),s(this._queue,n))}}]),t}(),A={selector:"img"},P=function(){function t(e){var i=e.el,n=e.binding,s=e.vnode,r=e.lazy;c(this,t),this.el=null,this.vnode=s,this.binding=n,this.options={},this.lazy=r,this._queue=[],this.update({el:i,binding:n})}return h(t,[{key:"update",value:function(t){var e=this,i=t.el,n=t.binding;this.el=i,this.options=v({},A,n.value),this.getImgs().forEach(function(t){e.lazy.add(t,v({},e.binding,{value:{src:t.dataset.src,error:t.dataset.error,loading:t.dataset.loading}}),e.vnode)})}},{key:"getImgs",value:function(){return function(t){for(var e=t.length,i=[],n=0;n<e;n++)i.push(t[n]);return i}(this.el.querySelectorAll(this.options.selector))}},{key:"clear",value:function(){var t=this;this.getImgs().forEach(function(e){return t.lazy.remove(e)}),this.vnode=null,this.binding=null,this.lazy=null}}]),t}();return{install:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=D(t),n=new i(e),s=new L({lazy:n}),r="2"===t.version.split(".")[0];t.prototype.$Lazyload=n,e.lazyComponent&&t.component("lazy-component",E(n)),r?(t.directive("lazy",{bind:n.add.bind(n),update:n.update.bind(n),componentUpdated:n.lazyLoadHandler.bind(n),unbind:n.remove.bind(n)}),t.directive("lazy-container",{bind:s.bind.bind(s),update:s.update.bind(s),unbind:s.unbind.bind(s)})):(t.directive("lazy",{bind:n.lazyLoadHandler.bind(n),update:function(t,e){v(this.vm.$refs,this.vm.$els),n.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){n.remove(this.el)}}),t.directive("lazy-container",{update:function(t,e){s.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){s.unbind(this.el)}}))}}}()},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";function n(){return(n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}i.r(e);var s=i(1),r=i.n(s),o=i(9),a=i(2),l=i.n(a),u=["ref","style","class","attrs","nativeOn","directives","staticClass","staticStyle"],c={nativeOn:"on"};function h(t,e){var i=u.reduce(function(e,i){return t.data[i]&&(e[c[i]||i]=t.data[i]),e},{});return e&&(i.on=i.on||{},n(i.on,t.data.on)),i}function d(t,e){for(var i=arguments.length,n=new Array(i>2?i-2:0),s=2;s<i;s++)n[s-2]=arguments[s];var r=t.listeners[e];r&&(Array.isArray(r)?r.forEach(function(t){t.apply(void 0,n)}):r.apply(void 0,n))}function f(t,e){var i=new l.a({el:document.createElement("div"),props:t.props,render:function(i){return i(t,n({props:this.$props},e))}});return document.body.appendChild(i.$el),i}var p="#ee0a24",m="#fff",v="van-hairline",g=v+"--top",b=v+"--left",y=v+"--bottom",S=v+"--surround",k=v+"--top-bottom",x={zIndex:2e3,lockCount:0,stack:[],get top(){return this.stack[this.stack.length-1]}},w=i(0),C=!1;if(!w.f)try{var O={};Object.defineProperty(O,"passive",{get:function(){C=!0}}),window.addEventListener("test-passive",null,O)}catch(t){}function T(t,e,i,n){void 0===n&&(n=!1),w.f||t.addEventListener(e,i,!!C&&{capture:!1,passive:n})}function $(t,e,i){w.f||t.removeEventListener(e,i)}function I(t){t.stopPropagation()}function B(t,e){("boolean"!=typeof t.cancelable||t.cancelable)&&t.preventDefault(),e&&I(t)}var j=Object(o.a)("overlay"),N=j[0],D=j[1];function E(t){B(t,!0)}function L(t,e,i,s){var o=n({zIndex:e.zIndex},e.customStyle);return Object(w.b)(e.duration)&&(o.animationDuration=e.duration+"s"),t("transition",{attrs:{name:"van-fade"}},[t("div",r()([{directives:[{name:"show",value:e.show}],style:o,class:[D(),e.className],on:{touchmove:E}},h(s,!0)]),[i.default&&i.default()])])}L.props={show:Boolean,zIndex:[Number,String],duration:[Number,String],className:null,customStyle:Object};var A,P=N(L),M={className:"",customStyle:{}};function z(){if(x.top){var t=x.top.vm;t.$emit("click-overlay"),t.closeOnClickOverlay&&(t.onClickOverlay?t.onClickOverlay():t.close())}}function F(){if(A||(A=f(P,{on:{click:z}})),x.top){var t=x.top,e=t.vm,i=t.config,s=e.$el;s&&s.parentNode?s.parentNode.insertBefore(A.$el,s):document.body.appendChild(A.$el),n(A,M,i,{show:!0})}else A.show=!1}function V(t){var e=x.stack;e.length&&(x.top.vm===t?(e.pop(),F()):x.stack=e.filter(function(e){return e.vm!==t}))}function R(t){var e=t.parentNode;e&&e.removeChild(t)}function _(t){return t===window}var H=/scroll|auto/i;function W(t,e){void 0===e&&(e=window);for(var i=t;i&&"HTML"!==i.tagName&&1===i.nodeType&&i!==e;){var n=window.getComputedStyle(i).overflowY;if(H.test(n)){if("BODY"!==i.tagName)return i;var s=window.getComputedStyle(i.parentNode).overflowY;if(H.test(s))return i}i=i.parentNode}return e}function q(t){return"scrollTop"in t?t.scrollTop:t.pageYOffset}function Y(t,e){"scrollTop"in t?t.scrollTop=e:t.scrollTo(t.scrollX,e)}function U(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}function X(t){Y(window,t),Y(document.body,t)}function K(t){return _(t)?0:t.getBoundingClientRect().top+U()}var Q=10;var G=l.a.extend({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 e,i,n=t.touches[0];this.deltaX=n.clientX-this.startX,this.deltaY=n.clientY-this.startY,this.offsetX=Math.abs(this.deltaX),this.offsetY=Math.abs(this.deltaY),this.direction=this.direction||(e=this.offsetX,i=this.offsetY,e>i&&e>Q?"horizontal":i>e&&i>Q?"vertical":"")},resetTouchStatus:function(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0},bindTouchEvent:function(t){var e=this.onTouchStart,i=this.onTouchMove,n=this.onTouchEnd;T(t,"touchstart",e),T(t,"touchmove",i),n&&(T(t,"touchend",n),T(t,"touchcancel",n))}}});function Z(t){var e=t.ref,i=t.afterPortal;return l.a.extend({props:{getContainer:[String,Function]},watch:{getContainer:"portal"},mounted:function(){this.getContainer&&this.portal()},methods:{portal:function(){var t,n,s=this.getContainer,r=e?this.$refs[e]:this.$el;s?t="string"==typeof(n=s)?document.querySelector(n):n():this.$parent&&(t=this.$parent.$el),t&&t!==r.parentNode&&t.appendChild(r),i&&i.call(this)}}})}function J(t){function e(){this.binded||(t.call(this,T,!0),this.binded=!0)}function i(){this.binded&&(t.call(this,$,!1),this.binded=!1)}return{mounted:e,activated:e,deactivated:i,beforeDestroy:i}}var tt=l.a.extend({mixins:[J(function(t,e){this.handlePopstate(e&&this.closeOnPopstate)})],props:{closeOnPopstate:Boolean},data:function(){return{bindStatus:!1}},watch:{closeOnPopstate:function(t){this.handlePopstate(t)}},methods:{handlePopstate:function(t){this.$isServer||this.bindStatus!==t&&(this.bindStatus=t,(t?T:$)(window,"popstate",this.close))}}}),et={value:Boolean,overlay:Boolean,overlayStyle:Object,overlayClass:String,closeOnClickOverlay:Boolean,zIndex:[Number,String],lockScroll:{type:Boolean,default:!0},lazyRender:{type:Boolean,default:!0}};function it(t){return void 0===t&&(t={}),{mixins:[G,tt,Z({afterPortal:function(){this.overlay&&F()}})],props:et,data:function(){return{inited:this.value}},computed:{shouldRender:function(){return this.inited||!this.lazyRender}},watch:{value:function(e){var i=e?"open":"close";this.inited=this.inited||this.value,this[i](),t.skipToggleEvent||this.$emit(i)},overlay:"renderOverlay"},mounted:function(){this.value&&this.open()},activated:function(){this.shouldReopen&&(this.$emit("input",!0),this.shouldReopen=!1)},beforeDestroy:function(){this.close(),this.getContainer&&R(this.$el)},deactivated:function(){this.value&&(this.close(),this.shouldReopen=!0)},methods:{open:function(){this.$isServer||this.opened||(void 0!==this.zIndex&&(x.zIndex=this.zIndex),this.opened=!0,this.renderOverlay(),this.lockScroll&&(T(document,"touchstart",this.touchStart),T(document,"touchmove",this.onTouchMove),x.lockCount||document.body.classList.add("van-overflow-hidden"),x.lockCount++))},close:function(){this.opened&&(this.lockScroll&&(x.lockCount--,$(document,"touchstart",this.touchStart),$(document,"touchmove",this.onTouchMove),x.lockCount||document.body.classList.remove("van-overflow-hidden")),this.opened=!1,V(this),this.$emit("input",!1))},onTouchMove:function(t){this.touchMove(t);var e=this.deltaY>0?"10":"01",i=W(t.target,this.$el),n=i.scrollHeight,s=i.offsetHeight,r=i.scrollTop,o="11";0===r?o=s>=n?"00":"01":r+s>=n&&(o="10"),"11"===o||"vertical"!==this.direction||parseInt(o,2)&parseInt(e,2)||B(t,!0)},renderOverlay:function(){var t=this;!this.$isServer&&this.value&&this.$nextTick(function(){var e,i;t.updateZIndex(t.overlay?1:0),t.overlay?(e=t,i={zIndex:x.zIndex++,duration:t.duration,className:t.overlayClass,customStyle:t.overlayStyle},x.stack.some(function(t){return t.vm===e})||(x.stack.push({vm:e,config:i}),F())):V(t)})},updateZIndex:function(t){void 0===t&&(t=0),this.$el.style.zIndex=++x.zIndex+t}}}}var nt=i(8),st=Object(o.a)("info"),rt=st[0],ot=st[1];function at(t,e,i,n){var s=e.dot,o=e.info,a=Object(w.b)(o)&&""!==o;if(s||a)return t("div",r()([{class:ot({dot:s})},h(n,!0)]),[s?"":e.info])}at.props={dot:Boolean,info:[Number,String]};var lt=rt(at),ut=Object(o.a)("icon"),ct=ut[0],ht=ut[1];var dt={medel:"medal","medel-o":"medal-o"};function ft(t,e,i,n){var s=function(t){return t&&dt[t]||t}(e.name),o=function(t){return!!t&&-1!==t.indexOf("/")}(s);return t(e.tag,r()([{class:[e.classPrefix,o?"":e.classPrefix+"-"+s],style:{color:e.color,fontSize:Object(nt.a)(e.size)}},h(n,!0)]),[i.default&&i.default(),o&&t("img",{class:ht("image"),attrs:{src:s}}),t(lt,{attrs:{dot:e.dot,info:e.info}})])}ft.props={dot:Boolean,name:String,size:[Number,String],info:[Number,String],color:String,tag:{type:String,default:"i"},classPrefix:{type:String,default:ht()}};var pt=ct(ft),mt=Object(o.a)("popup"),vt=mt[0],gt=mt[1],bt=vt({mixins:[it()],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,e=function(e){return function(i){return t.$emit(e,i)}};this.onClick=e("click"),this.onOpened=e("opened"),this.onClosed=e("closed")},render:function(){var t,e=arguments[0];if(this.shouldRender){var i=this.round,n=this.position,s=this.duration,r="center"===n,o=this.transition||(r?"van-fade":"van-popup-slide-"+n),a={};if(Object(w.b)(s)){var l=r?"animationDuration":"transitionDuration";a[l]=s+"s"}return e("transition",{attrs:{name:o},on:{afterEnter:this.onOpened,afterLeave:this.onClosed}},[e("div",{directives:[{name:"show",value:this.value}],style:a,class:gt((t={round:i},t[n]=n,t["safe-area-inset-bottom"]=this.safeAreaInsetBottom,t)),on:{click:this.onClick}},[this.slots(),this.closeable&&e(pt,{attrs:{role:"button",tabindex:"0",name:this.closeIcon},class:gt("close-icon",this.closeIconPosition),on:{click:this.close}})])])}}}),yt=Object(o.a)("loading"),St=yt[0],kt=yt[1];function xt(t,e){if("spinner"===e.type){for(var i=[],n=0;n<12;n++)i.push(t("i"));return i}return t("svg",{class:kt("circular"),attrs:{viewBox:"25 25 50 50"}},[t("circle",{attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})])}function wt(t,e,i){if(i.default){var n=e.textSize&&{fontSize:Object(nt.a)(e.textSize)};return t("span",{class:kt("text"),style:n},[i.default()])}}function Ct(t,e,i,n){var s=e.color,o=e.size,a=e.type,l={color:s};if(o){var u=Object(nt.a)(o);l.width=u,l.height=u}return t("div",r()([{class:kt([a,{vertical:e.vertical}])},h(n,!0)]),[t("span",{class:kt("spinner",a),style:l},[xt(t,e)]),wt(t,e,i)])}Ct.props={color:String,size:[Number,String],vertical:Boolean,textSize:[Number,String],type:{type:String,default:"circular"}};var Ot=St(Ct),Tt=Object(o.a)("action-sheet"),$t=Tt[0],It=Tt[1];function Bt(t,e,i,n){var s=e.title,o=e.cancelText;function a(){d(n,"input",!1),d(n,"cancel")}var l=e.description&&t("div",{class:It("description")},[e.description]);return t(bt,r()([{class:It(),attrs:{position:"bottom",round:e.round,value:e.value,overlay:e.overlay,duration:e.duration,lazyRender:e.lazyRender,lockScroll:e.lockScroll,getContainer:e.getContainer,closeOnClickOverlay:e.closeOnClickOverlay,safeAreaInsetBottom:e.safeAreaInsetBottom}},h(n,!0)]),[function(){if(s)return t("div",{class:It("header")},[s,t(pt,{attrs:{name:e.closeIcon},class:It("close"),on:{click:a}})])}(),l,e.actions&&e.actions.map(function(i,s){var r=i.disabled,o=i.loading,a=i.callback;return t("button",{attrs:{type:"button"},class:[It("item",{disabled:r,loading:o}),i.className,g],style:{color:i.color},on:{click:function(t){t.stopPropagation(),r||o||(a&&a(i),d(n,"select",i,s),e.closeOnClickAction&&d(n,"input",!1))}}},[o?t(Ot,{attrs:{size:"20px"}}):[t("span",{class:It("name")},[i.name]),i.subname&&t("span",{class:It("subname")},[i.subname])]])}),function(){if(i.default)return t("div",{class:It("content")},[i.default()])}(),function(){if(o)return t("button",{attrs:{type:"button"},class:It("cancel"),on:{click:a}},[o])}()])}Bt.props=n({},et,{title:String,actions:Array,duration:[Number,String],cancelText:String,description:String,getContainer:[String,Function],closeOnClickAction:Boolean,round:{type:Boolean,default:!0},closeIcon:{type:String,default:"cross"},safeAreaInsetBottom:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}});var jt=$t(Bt);function Nt(t){return t=t.replace(/[^-|\d]/g,""),/^((\+86)|(86))?(1)\d{10}$/.test(t)||/^0[0-9-]{10,13}$/.test(t)}var Dt={title:String,loading:Boolean,showToolbar:Boolean,cancelButtonText:String,confirmButtonText:String,allowHtml:{type:Boolean,default:!0},visibleItemCount:{type:[Number,String],default:5},itemHeight:{type:[Number,String],default:44},swipeDuration:{type:[Number,String],default:1e3}},Et=i(7);function Lt(t){return Array.isArray(t)?t.map(function(t){return Lt(t)}):"object"==typeof t?Object(Et.a)({},t):t}function At(t,e,i){return Math.min(Math.max(t,e),i)}var Pt=Object(o.a)("picker-column"),Mt=Pt[0],zt=Pt[1];function Ft(t){return Object(w.d)(t)&&t.disabled}var Vt=Mt({mixins:[G],props:{valueKey:String,allowHtml:Boolean,className:String,itemHeight:[Number,String],defaultIndex:Number,swipeDuration:[Number,String],visibleItemCount:[Number,String],initialOptions:{type:Array,default:function(){return[]}}},data:function(){return{offset:0,duration:0,options:Lt(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)},destroyed:function(){var t=this.$parent.children;t&&t.splice(t.indexOf(this),1)},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=Lt(t),this.setIndex(this.defaultIndex))},onTouchStart:function(t){if(this.touchStart(t),this.moving){var e=function(t){var e=window.getComputedStyle(t),i=e.transform||e.webkitTransform,n=i.slice(7,i.length-1).split(", ")[5];return Number(n)}(this.$refs.wrapper);this.offset=Math.min(0,e-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){this.touchMove(t),"vertical"===this.direction&&(this.moving=!0,B(t,!0)),this.offset=At(this.startOffset+this.deltaY,-this.count*this.itemHeight,this.itemHeight);var e=Date.now();e-this.touchStartTime>300&&(this.touchStartTime=e,this.momentumOffset=this.offset)},onTouchEnd:function(){var t=this,e=this.offset-this.momentumOffset,i=Date.now()-this.touchStartTime;if(i<300&&Math.abs(e)>15)this.momentum(e,i);else{var n=this.getIndexByOffset(this.offset);this.duration=200,this.setIndex(n,!0),setTimeout(function(){t.moving=!1},0)}},onTransitionEnd:function(){this.stopMomentum()},onClickItem:function(t){this.moving||(this.duration=200,this.setIndex(t,!0))},adjustIndex:function(t){for(var e=t=At(t,0,this.count);e<this.count;e++)if(!Ft(this.options[e]))return e;for(var i=t-1;i>=0;i--)if(!Ft(this.options[i]))return i},getOptionText:function(t){return Object(w.d)(t)&&this.valueKey in t?t[this.valueKey]:t},setIndex:function(t,e){var i=this,n=-(t=this.adjustIndex(t)||0)*this.itemHeight,s=function(){t!==i.currentIndex&&(i.currentIndex=t,e&&i.$emit("change",t))};this.moving&&n!==this.offset?this.transitionEndTrigger=s:s(),this.offset=n},setValue:function(t){for(var e=this.options,i=0;i<e.length;i++)if(this.getOptionText(e[i])===t)return this.setIndex(i)},getValue:function(){return this.options[this.currentIndex]},getIndexByOffset:function(t){return At(Math.round(-t/this.itemHeight),0,this.count-1)},momentum:function(t,e){var i=Math.abs(t/e);t=this.offset+i/.002*(t<0?-1:1);var n=this.getIndexByOffset(t);this.duration=+this.swipeDuration,this.setIndex(n,!0)},stopMomentum:function(){this.moving=!1,this.duration=0,this.transitionEndTrigger&&(this.transitionEndTrigger(),this.transitionEndTrigger=null)},genOptions:function(){var t=this,e=this.$createElement,i={height:this.itemHeight+"px"};return this.options.map(function(n,s){var o=t.getOptionText(n),a=Ft(n),l={style:i,attrs:{role:"button",tabindex:a?-1:0},class:["van-ellipsis",zt("item",{disabled:a,selected:s===t.currentIndex})],on:{click:function(){t.onClickItem(s)}}};return t.allowHtml&&(l.domProps={innerHTML:o}),e("li",r()([{},l]),[t.allowHtml?"":o])})}},render:function(){var t=arguments[0],e={transform:"translate3d(0, "+(this.offset+this.baseOffset)+"px, 0)",transitionDuration:this.duration+"ms",transitionProperty:this.duration?"all":"none",lineHeight:this.itemHeight+"px"};return t("div",{class:[zt(),this.className]},[t("ul",{ref:"wrapper",style:e,class:zt("wrapper"),on:{transitionend:this.onTransitionEnd}},[this.genOptions()])])}}),Rt=Object(o.a)("picker"),_t=Rt[0],Ht=Rt[1],Wt=Rt[2],qt=_t({props:n({},Dt,{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:{dataType:function(){var t=this.columns[0]||{};return t.children?"cascade":t.values?"object":"text"}},watch:{columns:{handler:"format",immediate:!0}},methods:{format:function(){var t=this.columns,e=this.dataType;"text"===e?this.formattedColumns=[{values:t}]:"cascade"===e?this.formatCascade():this.formattedColumns=t},formatCascade:function(){for(var t=this,e=[],i={children:this.columns};i&&i.children;){var n=i.defaultIndex||+this.defaultIndex;e.push({values:i.children.map(function(e){return e[t.valueKey]}),className:i.className,defaultIndex:n}),i=i.children[n]}this.formattedColumns=e},emit:function(t){"text"===this.dataType?this.$emit(t,this.getColumnValue(0),this.getColumnIndex(0)):this.$emit(t,this.getValues(),this.getIndexes())},onCascadeChange:function(t){for(var e=this,i={children:this.columns},n=this.getIndexes(),s=0;s<=t;s++)i=i.children[n[s]];for(;i.children;)t++,this.setColumnValues(t,i.children.map(function(t){return t[e.valueKey]})),i=i.children[i.defaultIndex||0]},onChange:function(t){"cascade"===this.dataType&&this.onCascadeChange(t),"text"===this.dataType?this.$emit("change",this,this.getColumnValue(0),this.getColumnIndex(0)):this.$emit("change",this,this.getValues(),t)},getColumn:function(t){return this.children[t]},getColumnValue:function(t){var e=this.getColumn(t);return e&&e.getValue()},setColumnValue:function(t,e){var i=this.getColumn(t);i&&i.setValue(e)},getColumnIndex:function(t){return(this.getColumn(t)||{}).currentIndex},setColumnIndex:function(t,e){var i=this.getColumn(t);i&&i.setIndex(e)},getColumnValues:function(t){return(this.children[t]||{}).options},setColumnValues:function(t,e){var i=this.children[t];i&&i.setOptions(e)},getValues:function(){return this.children.map(function(t){return t.getValue()})},setValues:function(t){var e=this;t.forEach(function(t,i){e.setColumnValue(i,t)})},getIndexes:function(){return this.children.map(function(t){return t.currentIndex})},setIndexes:function(t){var e=this;t.forEach(function(t,i){e.setColumnIndex(i,t)})},confirm:function(){this.children.forEach(function(t){return t.stopMomentum()}),this.emit("confirm")},cancel:function(){this.emit("cancel")},genTitle:function(){var t=this.$createElement,e=this.slots("title");return e||(this.title?t("div",{class:["van-ellipsis",Ht("title")]},[this.title]):void 0)},genToolbar:function(){var t=this.$createElement;if(this.showToolbar)return t("div",{class:[k,Ht("toolbar")]},[this.slots()||[t("button",{attrs:{type:"button"},class:Ht("cancel"),on:{click:this.cancel}},[this.cancelButtonText||Wt("cancel")]),this.genTitle(),t("button",{attrs:{type:"button"},class:Ht("confirm"),on:{click:this.confirm}},[this.confirmButtonText||Wt("confirm")])]])},genColumns:function(){var t=this,e=this.$createElement;return this.formattedColumns.map(function(i,n){return e(Vt,{attrs:{valueKey:t.valueKey,allowHtml:t.allowHtml,className:i.className,itemHeight:t.itemHeight,defaultIndex:i.defaultIndex||+t.defaultIndex,swipeDuration:t.swipeDuration,visibleItemCount:t.visibleItemCount,initialOptions:i.values},on:{change:function(){t.onChange(n)}}})})}},render:function(t){var e=+this.itemHeight,i=e*this.visibleItemCount,n={height:e+"px"},s={height:i+"px"},r={backgroundSize:"100% "+(i-e)/2+"px"};return t("div",{class:Ht()},["top"===this.toolbarPosition?this.genToolbar():t(),this.loading?t(Ot,{class:Ht("loading")}):t(),this.slots("columns-top"),t("div",{class:Ht("columns"),style:s,on:{touchmove:B}},[this.genColumns(),t("div",{class:Ht("mask"),style:r}),t("div",{class:["van-hairline-unset--top-bottom",Ht("frame")],style:n})]),this.slots("columns-bottom"),"bottom"===this.toolbarPosition?this.genToolbar():t()])}}),Yt=Object(o.a)("area"),Ut=Yt[0],Xt=Yt[1];var Kt=Ut({props:n({},Dt,{value:String,areaList:{type:Object,default:function(){return{}}},columnsNum:{type:[Number,String],default:3},isOverseaCode:{type:Function,default:function(t){return"9"===t[0]}},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,e){var i=[];if("province"!==t&&!e)return i;var n=this[t];if(i=Object.keys(n).map(function(t){return{code:t,name:n[t]}}),e&&(this.isOverseaCode(e)&&"city"===t&&(e="9"),i=i.filter(function(t){return 0===t.code.indexOf(e)})),this.placeholderMap[t]&&i.length){var s="";"city"===t?s="000000".slice(2,4):"county"===t&&(s="000000".slice(4,6)),i.unshift({code:""+e+s,name:this.placeholderMap[t]})}return i},getIndex:function(t,e){var i="province"===t?2:"city"===t?4:6,n=this.getList(t,e.slice(0,i-2));this.isOverseaCode(e)&&"province"===t&&(i=1),e=e.slice(0,i);for(var s=0;s<n.length;s++)if(n[s].code.slice(0,i)===e)return s;return 0},parseOutputValues:function(t){var e=this;return t.map(function(t,i){return t?((t=JSON.parse(JSON.stringify(t))).code&&t.name!==e.columnsPlaceholder[i]||(t.code="",t.name=""),t):t})},onChange:function(t,e,i){this.code=e[i].code,this.setValues();var n=t.getValues();n=this.parseOutputValues(n),this.$emit("change",t,n,i)},onConfirm:function(t,e){t=this.parseOutputValues(t),this.setValues(),this.$emit("confirm",t,e)},setValues:function(){var t=this.code;t||(t=this.columnsPlaceholder.length?"000000":Object.keys(this.county)[0]?Object.keys(this.county)[0]:"");var e=this.$refs.picker,i=this.getList("province"),n=this.getList("city",t.slice(0,2));e&&(e.setColumnValues(0,i),e.setColumnValues(1,n),n.length&&"00"===t.slice(2,4)&&!this.isOverseaCode(t)&&(t=n[0].code),e.setColumnValues(2,this.getList("county",t.slice(0,4))),e.setIndexes([this.getIndex("province",t),this.getIndex("city",t),this.getIndex("county",t)]))},getValues:function(){var t=this.$refs.picker,e=t?t.getValues().filter(function(t){return!!t}):[];return e=this.parseOutputValues(e),e},getArea:function(){var t=this.getValues(),e={code:"",country:"",province:"",city:"",county:""};if(!t.length)return e;var i=t.map(function(t){return t.name}),n=t.filter(function(t){return!!t.code});return e.code=n.length?n[n.length-1].code:"",this.isOverseaCode(e.code)?(e.country=i[1]||"",e.province=i[2]||""):(e.province=i[0]||"",e.city=i[1]||"",e.county=i[2]||""),e},reset:function(t){this.code=t||"",this.setValues()}},render:function(){var t=arguments[0],e=n({},this.$listeners,{change:this.onChange,confirm:this.onConfirm});return t(qt,{ref:"picker",class:Xt(),attrs:{showToolbar:!0,valueKey:"name",title:this.title,loading:this.loading,columns:this.displayColumns,itemHeight:this.itemHeight,swipeDuration:this.swipeDuration,visibleItemCount:this.visibleItemCount,cancelButtonText:this.cancelButtonText,confirmButtonText:this.confirmButtonText},on:n({},e)})}});function Qt(){return!w.f&&/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase())}var Gt=Qt();function Zt(){Gt&&X(U())}function Jt(t,e){var i=e.to,n=e.url,s=e.replace;if(i&&t){var r=t[s?"replace":"push"](i);r&&r.catch&&r.catch(function(t){if(t&&"NavigationDuplicated"!==t.name)throw t})}else n&&(s?location.replace(n):location.href=n)}function te(t){Jt(t.parent&&t.parent.$router,t.props)}var ee={url:String,replace:Boolean,to:[String,Object]},ie={icon:String,size:String,center:Boolean,isLink:Boolean,required:Boolean,clickable:Boolean,titleStyle:null,titleClass:null,valueClass:null,labelClass:null,title:[Number,String],value:[Number,String],label:[Number,String],arrowDirection:String,border:{type:Boolean,default:!0}},ne=Object(o.a)("cell"),se=ne[0],re=ne[1];function oe(t,e,i,n){var s=e.icon,o=e.size,a=e.title,l=e.label,u=e.value,c=e.isLink,f=i.title||Object(w.b)(a);function p(){if(i.label||Object(w.b)(l))return t("div",{class:[re("label"),e.labelClass]},[i.label?i.label():l])}var m=c||e.clickable,v={clickable:m,center:e.center,required:e.required,borderless:!e.border};return o&&(v[o]=o),t("div",r()([{class:re(v),attrs:{role:m?"button":null,tabindex:m?0:null},on:{click:function(t){d(n,"click",t),te(n)}}},h(n)]),[i.icon?i.icon():s?t(pt,{class:re("left-icon"),attrs:{name:s}}):void 0,function(){if(f)return t("div",{class:[re("title"),e.titleClass],style:e.titleStyle},[i.title?i.title():t("span",[a]),p()])}(),function(){if(i.default||Object(w.b)(u))return t("div",{class:[re("value",{alone:!f}),e.valueClass]},[i.default?i.default():t("span",[u])])}(),function(){var n=i["right-icon"];if(n)return n();if(