lulouis-vant
Version:
Lightweight Mobile UI Components built on Vue
7 lines • 150 kB
JavaScript
!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)}(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=10)}([function(t,e,i){"use strict";var n=i(1),s=i.n(n),o=i(5),r=i(6),a=i(3),u=function(t){var e=v(t)+".";return function(t){for(var i=f(a.c[a.b],e+t)||f(a.c[a.b],t),n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];return"function"==typeof i?i.apply(void 0,s):i}},l=function(t){return t="van-"+t,[Object(r.a)(t),Object(o.a)(t),u(t)]};i.d(e,"b",function(){return f}),i.d(e,"g",function(){return g}),i.d(e,"e",function(){return d}),i.d(e,"d",function(){return h}),i.d(e,"f",function(){return c}),i.d(e,"a",function(){return v}),i.d(e,"c",function(){return m}),i.d(e,"h",function(){return l});var c=s.a.prototype.$isServer;function h(t){return null!=t}function d(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function f(t,e){var i=e.split("."),n=t;return i.forEach(function(t){n=h(n[t])?n[t]:""}),n}var p=/-(\w)/g;function v(t){return t.replace(p,function(t,e){return e.toUpperCase()})}function m(){return!c&&/android/.test(navigator.userAgent.toLowerCase())}function g(t,e,i){return Math.min(Math.max(t,e),i)}},function(e,i){e.exports=t},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"],o=["class","style","directives"],r=["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!==o.indexOf(i)){var u=t[i]instanceof Array?t[i]:[t[i]],l=e[i]instanceof Array?e[i]:[e[i]];t[i]=u.concat(l)}else if(-1!==r.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(t,e,i){"use strict";var n,s=i(1),o=i.n(s),r=i(7);i.d(e,"b",function(){return a}),i.d(e,"c",function(){return l});var a="zh-CN",u=o.a.prototype,l=((n={})[a]={name:"姓名",tel:"电话",save:"保存",confirm:"确认",cancel:"取消",delete:"删除",complete:"完成",loading:"加载中...",telEmpty:"请填写电话",nameEmpty:"请填写姓名",confirmDelete:"确定要删除么",telInvalid:"请填写正确的电话",vanContactCard:{addText:"添加联系人"},vanContactList:{addText:"新建联系人"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{valid:"有效期",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:"新增地址"}},n),c={install:function(){u.$vantLang||(o.a.util.defineReactive(u,"$vantLang",a),o.a.util.defineReactive(u,"$vantMessages",l))},use:function(t,e){var i;a=t,u.$vantLang=a,this.add(((i={})[a]=e,i))},add:function(t){void 0===t&&(t={}),Object(r.a)(u.$vantMessages,t)}};c.install();e.a=c},function(t,e,i){"use strict";(function(t){i.d(e,"b",function(){return u}),i.d(e,"a",function(){return l});var n=i(0),s=Date.now();var o=n.f?t:window,r=o.requestAnimationFrame||o.webkitRequestAnimationFrame||function(t){var e=Date.now(),i=Math.max(0,16-(e-s)),n=setTimeout(t,i);return s=e+i,n},a=o.cancelAnimationFrame||o.webkitCancelAnimationFrame||o.clearTimeout;function u(t){return r.call(o,t)}function l(t){a.call(o,t)}}).call(this,i(9))},function(t,e,i){"use strict";var n=function(t,e,i){return e?t+i+e:t},s=function t(e,i){if("string"==typeof i)return n(e,i,"--");if(Array.isArray(i))return i.map(function(i){return t(e,i)});var s={};return i&&Object.keys(i).forEach(function(t){s[e+"--"+t]=i[t]}),s};e.a=function(t){return function(e,i){return e&&"string"!=typeof e&&(i=e,e=""),e=n(t,e,"__"),i?[e,s(e,i)]:e}}},function(t,e,i){"use strict";i(3);var n=i(0),s={type:Array,default:function(){return[]}},o={type:Number,default:0};function r(t){var e=this.name;t.component(e,this),t.component(Object(n.a)("-"+e),this)}e.a=function(t){return function(e){var i;return e.name=t,e.install=r,e.props&&(i=e.props,Object.keys(i).forEach(function(t){i[t]===Array?i[t]=s:i[t]===Number&&(i[t]=o)})),e}}},function(t,e,i){"use strict";i.d(e,"a",function(){return o});var n=i(0),s=Object.prototype.hasOwnProperty;function o(t,e){return Object.keys(e).forEach(function(i){!function(t,e,i){var r=e[i];!Object(n.d)(r)||s.call(t,i)&&!Object(n.d)(t[i])||(s.call(t,i)&&Object(n.e)(r)?t[i]=o(Object(t[i]),e[i]):t[i]=r)}(t,e,i)}),t}},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 o=arguments[s];d(t)&&(t=o),i(o)&&e(t,o)}return t}function e(e,s){for(var o in f(e,s),s)if("__proto__"!==o&&n(s,o)){var r=s[o];i(r)?("undefined"===v(e[o])&&"function"===v(r)&&(e[o]=r),e[o]=t(e[o]||{},r)):e[o]=r}return e}function i(t){return"object"===v(t)||"function"===v(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 o(t,e){if("IMG"===t.tagName&&t.getAttribute("data-srcset")){var i=t.getAttribute("data-srcset"),n=[],s=t.parentNode,o=s.offsetWidth*e,r=void 0,a=void 0,u=void 0;(i=i.trim().split(",")).map(function(t){t=t.trim(),-1===(r=t.lastIndexOf(" "))?(a=t,u=999998):(a=t.substr(0,r),u=parseInt(t.substr(r+1,t.length-r-2),10)),n.push([u,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 l="",c=void 0,h=n.length,d=0;d<h;d++)if((c=n[d])[0]>=o){l=c[1];break}return l}}function r(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 u(){}var l="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":l(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,o=0;++o<s;)for(var r=Object(arguments[o]),a=Object.getOwnPropertySymbols(r),u=0;u<a.length;u++){var l=a[u];i.call(r,l)&&(n[l]=r[l])}return n},p=Object.prototype.toString,v=function(t){var e=void 0===t?"undefined":l(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"},m=t,g="undefined"!=typeof window,b=g&&"IntersectionObserver"in window,y={event:"event",observer:"observer"},k=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)}(),S=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)}},$=function(t,e){return"undefined"!=typeof getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.style[e]},T=function(t){return $(t,"overflow")+$(t,"overflow-y")+$(t,"overflow-x")},O={},B=function(){function t(e){var i=e.el,n=e.src,s=e.error,o=e.loading,r=e.bindType,a=e.$parent,u=e.options,l=e.elRenderer;c(this,t),this.el=i,this.src=n,this.error=s,this.loading=o,this.bindType=r,this.attempt=0,this.naturalHeight=0,this.naturalWidth=0,this.options=u,this.rect=null,this.$parent=a,this.elRenderer=l,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]:u;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||O[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),O[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}(),I="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",E=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],A={rootMargin:"0px",threshold:0},j=function(t){return function(){function e(t){var i=t.preLoad,n=t.error,s=t.throttleWait,o=t.preLoadTop,r=t.dispatchEvent,u=t.loading,l=t.attempt,h=t.silent,d=void 0===h||h,f=t.scale,p=t.listenEvents,v=(t.hasbind,t.filter),m=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:!!r,throttleWait:s||200,preLoad:i||1.3,preLoadTop:o||0,error:n||I,loading:u||I,attempt:l||3,scale:f||S(f),ListenEvents:p||E,hasbind:!1,supportWebp:a(),filter:v||{},adapter:m||{},observer:!!g,observerOptions:b||A},this._initEvent(),this.lazyLoadHandler=function(t,e){var i=null,n=0;return function(){if(!i){var s=Date.now()-n,o=this,r=arguments,a=function(){n=Date.now(),i=!1,t.apply(o,r)};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]:{};m(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 r=this._valueFormatter(i.value),a=r.src,u=r.loading,l=r.error;t.nextTick(function(){a=o(e,s.options.scale)||a,s._observer&&s._observer.observe(e);var r=Object.keys(i.modifiers)[0],c=void 0;r&&(c=(c=n.context.$refs[r])?c.$el||c:document.getElementById(r)),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 B({bindType:i.arg,$parent:c,el:e,loading:u,error:l,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,u=s.loading,l=s.error;a=o(e,this.options.scale)||a;var c=r(this.ListenerQueue,function(t){return t.el===e});c&&c.update({src:a,loading:u,error:l}),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=r(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=r(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,o=void 0;switch(e){case"loading":o=t.loading;break;case"error":o=t.error;break;default:o=t.src}if(s?n.style[s]='url("'+o+'")':n.getAttribute("src")!==o&&n.setAttribute("src",o),n.setAttribute("lazy",e),this.$emit(e,t,i),this.options.adapter[e]&&this.options.adapter[e](t,this.options),this.options.dispatchEvent){var r=new k(e,{detail:t});n.dispatchEvent(r)}}}},{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":l(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}()},_=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 L({el:t,binding:e,vnode:i,lazy:this.lazy});this._queue.push(n)}},{key:"update",value:function(t,e,i){var n=r(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=r(this._queue,function(e){return e.el===t});n&&(n.clear(),s(this._queue,n))}}]),t}(),D={selector:"img"},L=function(){function t(e){var i=e.el,n=e.binding,s=e.vnode,o=e.lazy;c(this,t),this.el=null,this.vnode=s,this.binding=n,this.options={},this.lazy=o,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=m({},D,n.value),this.getImgs().forEach(function(t){e.lazy.add(t,m({},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=j(t),n=new i(e),s=new _({lazy:n}),o="2"===t.version.split(".")[0];t.prototype.$Lazyload=n,e.lazyComponent&&t.component("lazy-component",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)}}}}(n)),o?(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){m(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";i.r(e);var n=i(0);function s(){return(s=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)}var o=Object(n.h)("info"),r=o[0],a=o[1],u=r({props:{info:[String,Number]},render:function(t){return Object(n.d)(this.info)&&t("div",{class:a()},[this.info])}});var l=(0,Object(n.h)("icon")[0])({props:{name:String,size:String,color:String,info:[String,Number],classPrefix:{type:String,default:"van-icon"}},computed:{isSrc:function(){return t=this.name,/^(https?:)?\/\/|data:image/.test(t);var t}},render:function(t){return t("i",{class:[this.classPrefix,this.isSrc?"van-icon--image":this.classPrefix+"-"+this.name],style:{color:this.color,fontSize:this.size},on:s({},this.$listeners)},[this.$slots.default,this.isSrc&&t("img",{attrs:{src:this.name}}),t(u,{attrs:{info:this.info}})])}}),c=Object(n.h)("loading"),h=c[0],d=c[1],f=h({props:{size:String,type:{type:String,default:"circular"},color:{type:String,default:"#c9c9c9"}},render:function(t){var e=this.color,i=this.size,n=this.type,s="white"===e||"black"===e?e:"",o={color:"black"===e?"#c9c9c9":e,width:i,height:i},r=[];if("spinner"===n)for(var a=0;a<12;a++)r.push(t("i"));var u="circular"===n&&t("svg",{class:d("circular"),attrs:{viewBox:"25 25 50 50"}},[t("circle",{attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]);return t("div",{class:d([n,s]),style:o},[t("span",{class:d("spinner",n)},[r,u])])}}),p=i(1),v=i.n(p),m={zIndex:2e3,stack:[],lockCount:0,get top(){return this.stack[this.stack.length-1]}},g=Object(n.h)("overlay"),b=g[0],y=g[1],k=b({props:{zIndex:Number,visible:Boolean,className:String,customStyle:Object},render:function(t){var e=this,i=s({zIndex:this.zIndex},this.customStyle);return t("transition",{attrs:{name:"van-fade"}},[t("div",{directives:[{name:"show",value:this.visible}],style:i,class:[y(),this.className],on:{touchmove:function(t){t.preventDefault(),t.stopPropagation()},click:function(t){e.$emit("click",t)}}})])}}),S={className:"",customStyle:{}},x={open:function(t,e){if(!m.stack.some(function(e){return e.vm===t})){var i=t.$el,n=i&&i.parentNode?i.parentNode:document.body;m.stack.push({vm:t,config:e,target:n}),this.update()}},close:function(t){var e=m.stack;e.length&&(m.top.vm===t?(e.pop(),this.update()):m.stack=e.filter(function(e){return e.vm!==t}))},update:function(){var t=m.modal;if(t||((t=new(v.a.extend(k))({el:document.createElement("div")})).$on("click",this.onClick),m.modal=t),t.$el.parentNode&&(t.visible=!1),m.top){var e=m.top,i=e.target,n=e.config;i.appendChild(t.$el),s(t,S,n,{visible:!0})}},onClick:function(){if(m.top){var t=m.top.vm;t.$emit("click-overlay"),t.closeOnClickOverlay&&t.$emit("input",!1)}}},w={getScrollEventTarget:function(t,e){void 0===e&&(e=window);for(var i=t;i&&"HTML"!==i.tagName&&"BODY"!==i.tagName&&1===i.nodeType&&i!==e;){var n=this.getComputedStyle(i).overflowY;if("scroll"===n||"auto"===n)return i;i=i.parentNode}return e},getScrollTop:function(t){return"scrollTop"in t?t.scrollTop:t.pageYOffset},setScrollTop:function(t,e){"scrollTop"in t?t.scrollTop=e:t.scrollTo(t.scrollX,e)},getElementTop:function(t){return(t===window?0:t.getBoundingClientRect().top)+this.getScrollTop(window)},getVisibleHeight:function(t){return t===window?t.innerHeight:t.getBoundingClientRect().height},getComputedStyle:!n.f&&document.defaultView.getComputedStyle.bind(document.defaultView)},C=!1;if(!n.f)try{var $={};Object.defineProperty($,"passive",{get:function(){C=!0}}),window.addEventListener("test-passive",null,$)}catch(t){}function T(t,e,i,s){void 0===s&&(s=!1),!n.f&&t.addEventListener(e,i,!!C&&{capture:!1,passive:s})}function O(t,e,i){!n.f&&t.removeEventListener(e,i)}function B(t){t.stopPropagation()}function I(t){t.preventDefault()}var E=10;var A={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>E?"horizontal":i>e&&i>E?"vertical":"")},resetTouchStatus:function(){this.direction="",this.deltaX=0,this.deltaY=0,this.offsetX=0,this.offsetY=0}}},j={mixins:[A],props:{value:Boolean,overlay:Boolean,overlayStyle:Object,overlayClass:String,closeOnClickOverlay:Boolean,zIndex:[String,Number],getContainer:[String,Function],lockScroll:{type:Boolean,default:!0},lazyRender:{type:Boolean,default:!0}},data:function(){return{inited:this.value}},computed:{shouldRender:function(){return this.inited||!this.lazyRender}},watch:{value:function(t){this.inited=this.inited||this.value,this[t?"open":"close"]()},getContainer:function(){this.move()},overlay:function(){this.renderOverlay()}},mounted:function(){this.getContainer&&this.move(),this.value&&this.open()},activated:function(){this.value&&this.open()},beforeDestroy:function(){this.close(),this.getContainer&&this.$parent.$el.appendChild(this.$el)},deactivated:function(){this.close()},methods:{open:function(){this.$isServer||this.opened||(void 0!==this.zIndex&&(m.zIndex=this.zIndex),this.opened=!0,this.renderOverlay(),this.lockScroll&&(T(document,"touchstart",this.touchStart),T(document,"touchmove",this.onTouchMove),m.lockCount||document.body.classList.add("van-overflow-hidden"),m.lockCount++))},close:function(){this.opened&&(this.lockScroll&&(m.lockCount--,O(document,"touchstart",this.touchStart),O(document,"touchmove",this.onTouchMove),m.lockCount||document.body.classList.remove("van-overflow-hidden")),this.opened=!1,x.close(this),this.$emit("input",!1))},move:function(){var t,e=this.getContainer;e?t="string"==typeof e?document.querySelector(e):e():this.$parent&&(t=this.$parent.$el),t&&t.appendChild(this.$el)},onTouchMove:function(t){this.touchMove(t);var e=this.deltaY>0?"10":"01",i=w.getScrollEventTarget(t.target,this.$el),n=i.scrollHeight,s=i.offsetHeight,o=i.scrollTop,r="11";0===o?r=s>=n?"00":"01":o+s>=n&&(r="10"),"11"!==r&&"vertical"===this.direction&&(parseInt(r,2),parseInt(e,2))},renderOverlay:function(){var t=this;this.overlay?x.open(this,{zIndex:m.zIndex++,className:this.overlayClass,customStyle:this.overlayStyle}):x.close(this),this.$nextTick(function(){t.$el.style.zIndex=m.zIndex++})}}},_=Object(n.h)("actionsheet"),D=_[0],L=_[1],N=D({mixins:[j],props:{title:String,value:Boolean,actions:Array,cancelText:String,overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}},methods:{onSelect:function(t,e){t.stopPropagation(),e.disabled||e.loading||(e.callback&&e.callback(e),this.$emit("select",e))},onCancel:function(){this.$emit("input",!1),this.$emit("cancel")}},render:function(t){var e=this;if(this.shouldRender){var i=this.title,n=this.cancelText,s=this.onCancel,o=n?t("div",{class:L("cancel"),on:{click:s}},[n]):t("div",{class:L("content")},[this.$slots.default]);return t("transition",{attrs:{name:"van-slide-up"}},[t("div",{directives:[{name:"show",value:this.value}],class:L({withtitle:i})},[i?t("div",{class:[L("header"),"van-hairline--top-bottom"]},[i,t(l,{attrs:{name:"close"},on:{click:s}})]):this.actions.map(function(i){return t("div",{class:[L("item",{disabled:i.disabled||i.loading}),i.className,"van-hairline--top"],on:{click:function(t){e.onSelect(t,i)}}},[i.loading?t(f,{class:L("loading"),attrs:{size:"20px"}}):[t("span",{class:L("name")},[i.name]),i.subname&&t("span",{class:L("subname")},[i.subname])]])}),o])])}}}),F=i(7);function z(t){return Array.isArray(t)?t.map(function(t){return z(t)}):"object"==typeof t?Object(F.a)({},t):t}var M=Object(n.h)("picker-column"),V=M[0],P=M[1],H=V({props:{valueKey:String,className:String,itemHeight:Number,defaultIndex:Number,initialOptions:Array,visibleItemCount:Number},data:function(){return{startY:0,offset:0,duration:0,startOffset:0,options:z(this.initialOptions),currentIndex:this.defaultIndex}},created:function(){this.$parent.children&&this.$parent.children.push(this),this.setIndex(this.currentIndex)},destroyed:function(){var t=this.$parent.children;t&&t.splice(t.indexOf(this),1)},watch:{defaultIndex:function(){this.setIndex(this.defaultIndex)}},computed:{count:function(){return this.options.length}},methods:{onTouchStart:function(t){this.startY=t.touches[0].clientY,this.startOffset=this.offset,this.duration=0},onTouchMove:function(t){t.preventDefault();var e=t.touches[0].clientY-this.startY;this.offset=Object(n.g)(this.startOffset+e,-this.count*this.itemHeight,this.itemHeight)},onTouchEnd:function(){if(this.offset!==this.startOffset){this.duration=200;var t=Object(n.g)(Math.round(-this.offset/this.itemHeight),0,this.count-1);this.setIndex(t,!0)}},adjustIndex:function(t){for(var e=t=Object(n.g)(t,0,this.count);e<this.count;e++)if(!this.isDisabled(this.options[e]))return e;for(var i=t-1;i>=0;i--)if(!this.isDisabled(this.options[i]))return i},isDisabled:function(t){return Object(n.e)(t)&&t.disabled},getOptionText:function(t){return Object(n.e)(t)&&this.valueKey in t?t[this.valueKey]:t},setIndex:function(t,e){t=this.adjustIndex(t)||0,this.offset=-t*this.itemHeight,t!==this.currentIndex&&(this.currentIndex=t,e&&this.$emit("change",t))},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]}},render:function(t){var e=this,i=this.itemHeight,n=this.visibleItemCount,s={height:i*n+"px"},o=i*(n-1)/2,r={transition:this.duration+"ms",transform:"translate3d(0, "+(this.offset+o)+"px, 0)",lineHeight:i+"px"},a={height:i+"px"};return t("div",{style:s,class:[P(),this.className],on:{touchstart:this.onTouchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[t("ul",{style:r},[this.options.map(function(i,n){return t("li",{style:a,class:["van-ellipsis",P("item",{disabled:e.isDisabled(i),selected:n===e.currentIndex})],domProps:{innerHTML:e.getOptionText(i)},on:{click:function(){e.setIndex(n,!0)}}})})])])}}),R={props:{title:String,loading:Boolean,showToolbar:Boolean,cancelButtonText:String,confirmButtonText:String,visibleItemCount:{type:Number,default:5},itemHeight:{type:Number,default:44}}},W=Object(n.h)("picker"),Y=W[0],q=W[1],X=W[2],K=Y({mixins:[R],props:{columns:Array,valueKey:{type:String,default:"text"}},data:function(){return{children:[]}},computed:{simple:function(){return this.columns.length&&!this.columns[0].values}},watch:{columns:function(){this.setColumns()}},methods:{setColumns:function(){var t=this;(this.simple?[{values:this.columns}]:this.columns).forEach(function(e,i){t.setColumnValues(i,z(e.values))})},emit:function(t){this.simple?this.$emit(t,this.getColumnValue(0),this.getColumnIndex(0)):this.$emit(t,this.getValues(),this.getIndexes())},onChange:function(t){this.simple?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&&JSON.stringify(i.options)!==JSON.stringify(e)&&(i.options=e,i.setIndex(0))},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)})},onConfirm:function(){this.emit("confirm")},onCancel:function(){this.emit("cancel")}},render:function(t){var e=this,i=this.itemHeight,n=this.simple?[this.columns]:this.columns,s={height:i+"px"},o={height:i*this.visibleItemCount+"px"},r=this.showToolbar&&t("div",{class:["van-hairline--top-bottom",q("toolbar")]},[this.$slots.default||[t("div",{class:q("cancel"),on:{click:this.onCancel}},[this.cancelButtonText||X("cancel")]),this.title&&t("div",{class:["van-ellipsis",q("title")]},[this.title]),t("div",{class:q("confirm"),on:{click:this.onConfirm}},[this.confirmButtonText||X("confirm")])]]);return t("div",{class:q()},[r,this.loading&&t("div",{class:q("loading")},[t(f)]),t("div",{class:q("columns"),style:o,on:{touchmove:I}},[n.map(function(i,n){return t(H,{attrs:{valueKey:e.valueKey,className:i.className,itemHeight:e.itemHeight,defaultIndex:i.defaultIndex,visibleItemCount:e.visibleItemCount,initialOptions:e.simple?i:i.values},on:{change:function(){e.onChange(n)}}})}),t("div",{class:["van-hairline--top-bottom",q("frame")],style:s})])])}}),Q=Object(n.h)("area"),U=Q[0],G=Q[1],J=U({mixins:[R],props:{value:String,areaList:{type:Object,default:function(){return{}}},columnsNum:{type:[String,Number],default:3}},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)}},watch:{value:function(){this.code=this.value,this.setValues()},areaList:{deep:!0,handler:function(){this.setValues()}}},mounted:function(){this.setValues()},methods:{getList:function(t,e){var i=[];if("province"!==t&&!e)return i;var n=this[t];return i=Object.keys(n).map(function(t){return{code:t,name:n[t]}}),e&&("9"===e[0]&&"city"===t&&(e="9"),i=i.filter(function(t){return 0===t.code.indexOf(e)})),i},getIndex:function(t,e){var i="province"===t?2:"city"===t?4:6,n=this.getList(t,e.slice(0,i-2));"9"===e[0]&&"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},onChange:function(t,e,i){this.code=e[i].code,this.setValues(),this.$emit("change",t,e,i)},setValues:function(){var t=this.code||Object.keys(this.county)[0]||"",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)&&(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(){return this.$refs.picker?this.$refs.picker.getValues().filter(function(t){return!!t}):[]},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});return e.code=t[t.length-1].code,"9"===e.code[0]?(e.country=i[1]||"",e.province=i[2]||""):(e.province=i[0]||"",e.city=i[1]||"",e.county=i[2]||""),e},reset:function(){this.code="",this.setValues()}},render:function(t){var e=s({},this.$listeners,{change:this.onChange});return t(K,{ref:"picker",class:G(),attrs:{showToolbar:!0,valueKey:"name",title:this.title,loading:this.loading,columns:this.displayColumns,itemHeight:this.itemHeight,visibleItemCount:this.visibleItemCount,cancelButtonText:this.cancelButtonText,confirmButtonText:this.confirmButtonText},on:s({},e)})}}),Z=i(2),tt=i.n(Z),et={props:{icon:String,center:Boolean,isLink:Boolean,required:Boolean,titleClass:String,valueClass:String,labelClass:String,title:[String,Number],value:[String,Number],label:[String,Number],border:{type:Boolean,default:!0}}},it={props:{url:String,replace:Boolean,to:[String,Object]},methods:{routerLink:function(){var t=this.to,e=this.url,i=this.$router,n=this.replace;t&&i?i[n?"replace":"push"](t):e&&(n?location.replace(e):location.href=e)}}},nt=Object(n.h)("cell"),st=nt[0],ot=nt[1],rt=st({mixins:[et,it],props:{size:String,clickable:Boolean,arrowDirection:String},methods:{onClick:function(){this.$emit("click"),this.routerLink()}},render:function(t){var e,i=this.$slots,s=i.title||Object(n.d)(this.title),o=i.default||Object(n.d)(this.value),r=s&&t("div",{class:[ot("title"),this.titleClass]},[i.title||t("span",[this.title]),this.label&&t("div",{class:[ot("label"),this.labelClass]},[this.label])]),a=o&&t("div",{class:[ot("value",{alone:!i.title&&!this.title}),this.valueClass]},[i.default||t("span",[this.value])]),u=i.icon||this.icon&&t(l,{class:ot("left-icon"),attrs:{name:this.icon}}),c=this.arrowDirection?"arrow-"+this.arrowDirection:"arrow",h=i["right-icon"]||this.isLink&&t(l,{class:ot("right-icon"),attrs:{name:c}});return t("div",{class:ot((e={center:this.center,required:this.required,borderless:!this.border,clickable:this.isLink||this.clickable},e[this.size]=this.size,e)),on:{click:this.onClick}},[u,r,a,h,i.extra])}}),at=Object(n.h)("field"),ut=at[0],lt=at[1],ct=ut({inheritAttrs:!1,mixins:[et],props:{error:Boolean,leftIcon:String,rightIcon:String,readonly:Boolean,clearable:Boolean,labelAlign:String,inputAlign:String,onIconClick:Function,autosize:[Boolean,Object],errorMessage:String,type:{type:String,default:"text"}},data:function(){return{focused:!1}},watch:{value:function(){this.$nextTick(this.adjustSize)}},mounted:function(){this.format(),this.$nextTick(this.adjustSize)},computed:{showClear:function(){return this.clearable&&this.focused&&""!==this.value&&Object(n.d)(this.value)&&!this.readonly},listeners:function(){return s({},this.$listeners,{input:this.onInput,keypress:this.onKeypress,focus:this.onFocus,blur:this.onBlur})}},methods:{focus:function(){this.$refs.input&&this.$refs.input.focus()},blur:function(){this.$refs.input&&this.$refs.input.blur()},format:function(t){void 0===t&&(t=this.$refs.input);var e=t.value,i=this.$attrs.maxlength;return"number"===this.type&&Object(n.d)(i)&&e.length>i&&(e=e.slice(0,i),t.value=e),e},onInput:function(t){this.$emit("input",this.format(t.target))},onFocus:function(t){this.focused=!0,this.$emit("focus",t),this.readonly&&this.blur()},onBlur:function(t){this.focused=!1,this.$emit("blur",t)},onClickLeftIcon:function(){this.$emit("click-left-icon")},onClickRightIcon:function(){this.$emit("click-icon"),this.$emit("click-right-icon"),this.onIconClick&&this.onIconClick()},onClear:function(t){t.preventDefault(),this.$emit("input",""),this.$emit("clear")},onKeypress:function(t){if("number"===this.type){var e=t.keyCode,i=-1===String(this.value).indexOf(".");e>=48&&e<=57||46===e&&i||45===e||t.preventDefault()}"search"===this.type&&13===t.keyCode&&this.blur(),this.$emit("keypress",t)},adjustSize:function(){var t=this.$refs.input;if("textarea"===this.type&&this.autosize&&t){t.style.height="auto";var e=t.scrollHeight;if(Object(n.e)(this.autosize)){var i=this.autosize,s=i.maxHeight,o=i.minHeight;s&&(e=Math.min(e,s)),o&&(e=Math.max(e,o))}e&&(t.style.height=e+"px")}}},render:function(t){var e,i=this.type,n=this.labelAlign,o=this.$slots,r=o["left-icon"]||this.leftIcon,a=o["right-icon"]||o.icon||this.rightIcon||this.icon,u=r&&t("div",{slot:"icon",class:lt("left-icon"),on:{click:this.onClickLeftIcon}},[o["left-icon"]||t(l,{attrs:{name:this.leftIcon}})]),c=a&&t("div",{class:lt("right-icon"),on:{click:this.onClickRightIcon}},[o["right-icon"]||o.icon||t(l,{attrs:{name:this.rightIcon||this.icon}})]),h={ref:"input",class:lt("control",this.inputAlign),domProps:{value:this.value},attrs:s({},this.$attrs,{readonly:this.readonly}),on:this.listeners},d="textarea"===i?t("textarea",tt()([{},h])):t("input",tt()([{attrs:{type:i}},h]));return t(rt,{attrs:{icon:this.leftIcon,title:this.label,center:this.center,border:this.border,isLink:this.isLink,required:this.required},class:lt((e={error:this.error,disabled:this.$attrs.disabled},e["label-"+n]=n,e["min-height"]="textarea"===i&&!this.autosize,e))},[u,t("template",{slot:"title"},o.label),t("div",{class:lt("body")},[d,this.showClear&&t(l,{attrs:{name:"clear"},class:lt("clear"),on:{touchstart:this.onClear}}),c,o.button&&t("div",{class:lt("button")},[o.button])]),this.errorMessage&&t("div",{class:lt("error-message")},[this.errorMessage])])}}),ht=Object(n.h)("popup"),dt=ht[0],ft=ht[1],pt=dt({mixins:[j],props:{position:String,transition:String,overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!0}},render:function(t){var e;if(this.shouldRender){var i=this.position;return t("transition",{attrs:{name:this.transition||(i?"van-popup-slide-"+i:"van-fade")}},[t("div",{directives:[{name:"show",value:this.value}],class:ft((e={},e[i]=i,e))},[this.$slots.default])])}}}),vt=i(6),mt=i(5),gt={computed:{$t:function(){var t=this.$options.name,e=t?Object(n.a)(t)+".":"";if(!this.$vantMessages)return function(){return""};var i=this.$vantMessages[this.$vantLang];return function(t){for(var s=Object(n.b)(i,e+t)||Object(n.b)(i,t),o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];return"function"==typeof s?s.apply(void 0,r):s}}}},bt=Object(n.h)("cell-group"),yt=bt[0],kt=bt[1],St=yt({props:{border:{type:Boolean,default:!0}},render:function(t){return t("div",{class:[kt(),{"van-hairline--top-bottom":this.border}]},[this.$slots.default])}}),xt=function(t){return t.components=s(t.components||{},{Icon:l,Loading:f,Cell:rt,CellGroup:St}),function(t){return(t=Object(vt.a)("van-"+t.name)(t)).mixins=t.mixins||[],t.mixins.push(gt),t.methods=t.methods||{},t.methods.isDef=n.d,t.methods.b=Object(mt.a)(t.name),t}(t)},wt=["success","fail","loading"],Ct=xt({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("transition",{attrs:{name:"van-fade"}},[i("div",{directives:[{name:"show",rawName:"v-show",value:t.value,expression:"value"}],class:t.b([t.style,t.position])},["text"===t.style?i("div",{domProps:{textContent:t._s(t.message)}}):t._e(),"html"===t.style?i("div",{domProps:{innerHTML:t._s(t.message)}}):t._e(),"default"===t.style?["loading"===t.type?i("loading",{attrs:{color:"white",type:t.loadingType}}):i("icon",{class:t.b("icon"),attrs:{name:t.type}}),t.isDef(t.message)?i("div",{class:t.b("text"),domProps:{textContent:t._s(t.message)}}):t._e()]:t._e()],2)])},name:"toast",mixins:[j],props:{forbidClick:Boolean,message:[String,Number],type:{type:String,default:"text"},loadingType:{type:String,default:"circular"},position:{type:String,default:"middle"},lockScroll:{type:Boolean,default:!1}},data:function(){return{clickable:!1}},computed:{style:function(){return-1!==wt.indexOf(this.type)?"default":this.type}},mounted:function(){this.toggleClickale()},destroyed:function(){this.toggleClickale()},watch:{value:function(){this.toggleClickale()},forbidClick:function(){this.toggleClickale()}},methods:{toggleClickale:function(){var t=this.value&&this.forbidClick;if(this.clickable!==t){this.clickable=t;var e=t?"add":"remove";document.body.classList[e]("van-toast--unclickable")}}}}),$t={type:"text",mask:!1,message:"",value:!0,duration:3e3,position:"middle",loadingType:"circular",forbidClick:!1,overlayStyle:{}},Tt=function(t){return Object(n.e)(t)?t:{message:t}},Ot=[],Bt=!0,It=s({},$t);function Et(t){void 0===t&&(t={});var e=function(){if(n.f)return{};if(!Ot.length||!Bt){var t=new(v.a.extend(Ct))({el:document.createElement("div")});document.body.appendChild(t.$el),Ot.push(t)}return Ot[Ot.length-1]}();return t=s({},It,Tt(t),{clear:function(){e.value=!1,Bt||n.f||(clearTimeout(e.timer),Ot=Ot.filter(function(t){return t!==e}),document.body.removeChild(e.$el),e.$destroy())}}),s(e,function(t){return t.overlay=t.mask,t}(t)),clearTimeout(e.timer),t.duration>0&&(e.timer=setTimeout(function(){e.clear()},t.duration)),e}["loading","success","fail"].forEach(function(t){var e;Et[t]=(e=t,function(t){return Et(s({type:e},Tt(t)))})}),Et.clear=function(t){Ot.length&&(t?(Ot.forEach(function(t){t.clear()}),Ot=[]):Bt?Ot[0].clear():Ot.shift().clear())},Et.setDefaultOptions=function(t){s(It,t)},Et.resetDefaultOptions=function(){It=s({},$t)},Et.allowMultiple=function(t){void 0===t&&(t=!0),Bt=!t},Et.install=function(){v.a.use(Ct)},v.a.prototype.$toast=Et;var At,jt=Et,_t=Object(n.h)("button"),Dt=_t[0],Lt=_t[1],Nt=Dt({props:{text:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,disabled:Boolean,nativeType:String,bottomAction:Boolean,tag:{type:String,default:"button"},type:{type:String,default:"default"},size:{type:String,default:"normal"}},methods:{onClick:function(t){this.loading||this.disabled||this.$emit("click",t)}},render:function(t){return t(this.tag,{attrs:{type:this.nativeType,disabled:this.disabled},class:Lt([this.type,this.size,{block:this.block,plain:this.plain,round:this.round,square:this.square,loading:this.loading,disabled:this.disabled,"bottom-action":this.bottomAction}]),on:{click:this.onClick}},[this.loading?t(f,{attrs:{size:"20px",color:"default"===this.type?void 0:""}}):t("span",{class:Lt("text")},[this.$slots.default||this.text])])}}),Ft=Object(n.h)("dialog"),zt=Ft[0],Mt=Ft[1],Vt=Ft[2],Pt=zt({mixins:[j],props:{title:String,message:String,callback:Function,className:[String,Object,Array],beforeClose:Function,messageAlign:String,confirmButtonText:String,cancelButtonText:String,showCancelButton:Boolean,showConfirmButton:{type:Boolean,default:!0},overlay:{type:Boolean,default:!0},closeOnClickOverlay:{type:Boolean,default:!1}},data:function(){return{loading:{confirm:!1,cancel:!1}}},methods:{handleAction:function(t){var e=this;this.$emit(t),this.beforeClose?(this.loading[t]=!0,this.beforeClose(t,function(i){!1!==i&&e.onClose(t),e.loading[t]=!1})):this.onClose(t)},onClose:function(t){this.$emit("input",!1),this.callback&&this.callback(t)}},render:function(t){var e,i=this;if(this.shouldRender){var n=this.title,s=this.message,o=this.messageAlign,r=this.$slots.default,a=n&&t("div",{class:Mt("header",{isolated:!s&&!r})},[n]),u=(r||s)&&t("div",{class:Mt("content")},[r||t("div",{domProps:{innerHTML:s},class:Mt("message",(e={"has-title":n},e[o]=o,e))})]),l=this.showCancelButton&&this.showConfirmButton,c=t("div",{class:["van-hairline--top",Mt("footer",{buttons:l})]},[t(Nt,{directives:[{name:"show",value:this.showCancelButton}],attrs:{size:"large",loading:this.loading.cancel,text:this.cancelButtonText||Vt("cancel")},class:Mt("cancel"),on:{click:function(){i.handleAction("cancel")}}}),t(Nt,{directives:[{name:"show",value:this.showConfirmButton}],attrs:{size:"large",loading:th