vant 2.12.46 → 2.12.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +11 -11
  2. package/README.zh-CN.md +9 -9
  3. package/changelog.generated.md +17 -5
  4. package/es/button/index.less +1 -1
  5. package/es/calendar/index.js +2 -2
  6. package/es/collapse-item/index.less +1 -1
  7. package/es/count-down/index.js +1 -1
  8. package/es/datetime-picker/DatePicker.js +1 -1
  9. package/es/datetime-picker/TimePicker.js +1 -1
  10. package/es/datetime-picker/shared.js +1 -1
  11. package/es/dialog/Dialog.js +4 -2
  12. package/es/field/index.js +3 -3
  13. package/es/grid-item/index.less +1 -1
  14. package/es/index.js +1 -1
  15. package/es/locale/lang/vi-VN.js +91 -0
  16. package/es/mixins/touch.js +1 -1
  17. package/es/nav-bar/index.js +1 -1
  18. package/es/notice-bar/index.js +1 -1
  19. package/es/number-keyboard/Key.js +1 -1
  20. package/es/picker/index.js +2 -2
  21. package/es/sidebar-item/index.less +1 -1
  22. package/es/step/index.js +26 -13
  23. package/es/stepper/index.js +1 -1
  24. package/es/steps/index.js +1 -0
  25. package/es/swipe/index.less +1 -1
  26. package/es/switch/index.less +1 -1
  27. package/es/switch-cell/index.js +1 -1
  28. package/es/tabbar/index.js +1 -1
  29. package/es/tabs/index.js +1 -1
  30. package/es/toast/index.less +1 -1
  31. package/es/utils/dom/scroll.js +2 -2
  32. package/es/utils/index.js +1 -1
  33. package/lib/button/index.less +1 -1
  34. package/lib/calendar/index.js +2 -2
  35. package/lib/collapse-item/index.less +1 -1
  36. package/lib/count-down/index.js +1 -1
  37. package/lib/datetime-picker/DatePicker.js +1 -1
  38. package/lib/datetime-picker/TimePicker.js +1 -1
  39. package/lib/datetime-picker/shared.js +1 -1
  40. package/lib/dialog/Dialog.js +4 -2
  41. package/lib/field/index.js +3 -3
  42. package/lib/grid-item/index.less +1 -1
  43. package/lib/index.js +1 -1
  44. package/lib/locale/lang/vi-VN.js +96 -0
  45. package/lib/mixins/touch.js +1 -1
  46. package/lib/nav-bar/index.js +1 -1
  47. package/lib/notice-bar/index.js +1 -1
  48. package/lib/number-keyboard/Key.js +1 -1
  49. package/lib/picker/index.js +2 -2
  50. package/lib/sidebar-item/index.less +1 -1
  51. package/lib/step/index.js +26 -13
  52. package/lib/stepper/index.js +1 -1
  53. package/lib/steps/index.js +1 -0
  54. package/lib/swipe/index.less +1 -1
  55. package/lib/switch/index.less +1 -1
  56. package/lib/switch-cell/index.js +1 -1
  57. package/lib/tabbar/index.js +1 -1
  58. package/lib/tabs/index.js +1 -1
  59. package/lib/toast/index.less +1 -1
  60. package/lib/utils/dom/scroll.js +2 -2
  61. package/lib/utils/index.js +1 -1
  62. package/lib/vant.js +999 -86
  63. package/lib/vant.min.js +2 -2
  64. package/package.json +3 -3
  65. package/vetur/attributes.json +328 -412
  66. package/vetur/tags.json +105 -171
  67. package/vetur/web-types.json +1068 -1182
package/lib/vant.js CHANGED
@@ -135,7 +135,7 @@ function get(object, path) {
135
135
  keys.forEach(function (key) {
136
136
  var _result$key;
137
137
 
138
- result = (_result$key = result[key]) != null ? _result$key : '';
138
+ result = isObject(result) ? (_result$key = result[key]) != null ? _result$key : '' : '';
139
139
  });
140
140
  return result;
141
141
  }
@@ -187,9 +187,54 @@ function isEmpty(value) {
187
187
  /***/ (function(module, exports, __webpack_require__) {
188
188
 
189
189
  "use strict";
190
- function _extends(){return _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}var normalMerge=["attrs","props","domProps"],toArrayMerge=["class","style","directives"],functionalMerge=["on","nativeOn"],mergeJsxProps=function(a){return a.reduce(function(c,a){for(var b in a)if(!c[b])c[b]=a[b];else if(-1!==normalMerge.indexOf(b))c[b]=_extends({},c[b],a[b]);else if(-1!==toArrayMerge.indexOf(b)){var d=c[b]instanceof Array?c[b]:[c[b]],e=a[b]instanceof Array?a[b]:[a[b]];c[b]=d.concat(e)}else if(-1!==functionalMerge.indexOf(b)){for(var f in a[b])if(c[b][f]){var g=c[b][f]instanceof Array?c[b][f]:[c[b][f]],h=a[b][f]instanceof Array?a[b][f]:[a[b][f]];c[b][f]=g.concat(h)}else c[b][f]=a[b][f];}else if("hook"==b)for(var i in a[b])c[b][i]=c[b][i]?mergeFn(c[b][i],a[b][i]):a[b][i];else c[b]=a[b];return c},{})},mergeFn=function(a,b){return function(){a&&a.apply(this,arguments),b&&b.apply(this,arguments)}};module.exports=mergeJsxProps;
191
190
 
192
191
 
192
+ function _extends() {
193
+ return _extends = Object.assign || function (a) {
194
+ for (var b, c = 1; c < arguments.length; c++) {
195
+ for (var d in b = arguments[c], b) {
196
+ Object.prototype.hasOwnProperty.call(b, d) && (a[d] = b[d]);
197
+ }
198
+ }
199
+
200
+ return a;
201
+ }, _extends.apply(this, arguments);
202
+ }
203
+
204
+ var normalMerge = ["attrs", "props", "domProps"],
205
+ toArrayMerge = ["class", "style", "directives"],
206
+ functionalMerge = ["on", "nativeOn"],
207
+ mergeJsxProps = function mergeJsxProps(a) {
208
+ return a.reduce(function (c, a) {
209
+ for (var b in a) {
210
+ if (!c[b]) c[b] = a[b];else if (-1 !== normalMerge.indexOf(b)) c[b] = _extends({}, c[b], a[b]);else if (-1 !== toArrayMerge.indexOf(b)) {
211
+ var d = c[b] instanceof Array ? c[b] : [c[b]],
212
+ e = a[b] instanceof Array ? a[b] : [a[b]];
213
+ c[b] = d.concat(e);
214
+ } else if (-1 !== functionalMerge.indexOf(b)) {
215
+ for (var f in a[b]) {
216
+ if (c[b][f]) {
217
+ var g = c[b][f] instanceof Array ? c[b][f] : [c[b][f]],
218
+ h = a[b][f] instanceof Array ? a[b][f] : [a[b][f]];
219
+ c[b][f] = g.concat(h);
220
+ } else c[b][f] = a[b][f];
221
+ }
222
+ } else if ("hook" == b) for (var i in a[b]) {
223
+ c[b][i] = c[b][i] ? mergeFn(c[b][i], a[b][i]) : a[b][i];
224
+ } else c[b] = a[b];
225
+ }
226
+
227
+ return c;
228
+ }, {});
229
+ },
230
+ mergeFn = function mergeFn(a, b) {
231
+ return function () {
232
+ a && a.apply(this, arguments), b && b.apply(this, arguments);
233
+ };
234
+ };
235
+
236
+ module.exports = mergeJsxProps;
237
+
193
238
  /***/ }),
194
239
  /* 2 */
195
240
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
@@ -695,34 +740,887 @@ function createNamespace(name) {
695
740
  * (c) 2018 Awe <hilongjw@gmail.com>
696
741
  * Released under the MIT License.
697
742
  */
698
- !function(e,t){ true?module.exports=t():undefined}(this,function(){"use strict";function e(e){return e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function t(e){e=e||{};var t=arguments.length,i=0;if(1===t)return e;for(;++i<t;){var o=arguments[i];g(e)&&(e=o),r(o)&&n(e,o)}return e}function n(e,n){m(e,n);for(var o in n)if("__proto__"!==o&&i(n,o)){var a=n[o];r(a)?("undefined"===L(e[o])&&"function"===L(a)&&(e[o]=a),e[o]=t(e[o]||{},a)):e[o]=a}return e}function r(e){return"object"===L(e)||"function"===L(e)}function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e,t){if(e.length){var n=e.indexOf(t);return n>-1?e.splice(n,1):void 0}}function a(e,t){for(var n=!1,r=0,i=e.length;r<i;r++)if(t(e[r])){n=!0;break}return n}function s(e,t){if("IMG"===e.tagName&&e.getAttribute("data-srcset")){var n=e.getAttribute("data-srcset"),r=[],i=e.parentNode,o=i.offsetWidth*t,a=void 0,s=void 0,u=void 0;n=n.trim().split(","),n.map(function(e){e=e.trim(),a=e.lastIndexOf(" "),-1===a?(s=e,u=999998):(s=e.substr(0,a),u=parseInt(e.substr(a+1,e.length-a-2),10)),r.push([u,s])}),r.sort(function(e,t){if(e[0]<t[0])return-1;if(e[0]>t[0])return 1;if(e[0]===t[0]){if(-1!==t[1].indexOf(".webp",t[1].length-5))return 1;if(-1!==e[1].indexOf(".webp",e[1].length-5))return-1}return 0});for(var l="",d=void 0,c=r.length,h=0;h<c;h++)if(d=r[h],d[0]>=o){l=d[1];break}return l}}function u(e,t){for(var n=void 0,r=0,i=e.length;r<i;r++)if(t(e[r])){n=e[r];break}return n}function l(){if(!k)return!1;var e=!0,t=document;try{var n=t.createElement("object");n.type="image/webp",n.style.visibility="hidden",n.innerHTML="!",t.body.appendChild(n),e=!n.offsetWidth,t.body.removeChild(n)}catch(t){e=!1}return e}function d(e,t){var n=null,r=0;return function(){if(!n){var i=Date.now()-r,o=this,a=arguments,s=function(){r=Date.now(),n=!1,e.apply(o,a)};i>=t?s():n=setTimeout(s,t)}}}function c(e){return null!==e&&"object"===(void 0===e?"undefined":p(e))}function h(e){if(!(e instanceof Object))return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function f(e){for(var t=e.length,n=[],r=0;r<t;r++)n.push(e[r]);return n}function v(){}var p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=function(e){return null==e||"function"!=typeof e&&"object"!==(void 0===e?"undefined":p(e))},m=function(e,t){if(null===e||void 0===e)throw new TypeError("expected first argument to be an object.");if(void 0===t||"undefined"==typeof Symbol)return e;if("function"!=typeof Object.getOwnPropertySymbols)return e;for(var n=Object.prototype.propertyIsEnumerable,r=Object(e),i=arguments.length,o=0;++o<i;)for(var a=Object(arguments[o]),s=Object.getOwnPropertySymbols(a),u=0;u<s.length;u++){var l=s[u];n.call(a,l)&&(r[l]=a[l])}return r},w=Object.prototype.toString,L=function(t){var n=void 0===t?"undefined":p(t);return"undefined"===n?"undefined":null===t?"null":!0===t||!1===t||t instanceof Boolean?"boolean":"string"===n||t instanceof String?"string":"number"===n||t instanceof Number?"number":"function"===n||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":(n=w.call(t),"[object RegExp]"===n?"regexp":"[object Date]"===n?"date":"[object Arguments]"===n?"arguments":"[object Error]"===n?"error":"[object Promise]"===n?"promise":e(t)?"buffer":"[object Set]"===n?"set":"[object WeakSet]"===n?"weakset":"[object Map]"===n?"map":"[object WeakMap]"===n?"weakmap":"[object Symbol]"===n?"symbol":"[object Map Iterator]"===n?"mapiterator":"[object Set Iterator]"===n?"setiterator":"[object String Iterator]"===n?"stringiterator":"[object Array Iterator]"===n?"arrayiterator":"[object Int8Array]"===n?"int8array":"[object Uint8Array]"===n?"uint8array":"[object Uint8ClampedArray]"===n?"uint8clampedarray":"[object Int16Array]"===n?"int16array":"[object Uint16Array]"===n?"uint16array":"[object Int32Array]"===n?"int32array":"[object Uint32Array]"===n?"uint32array":"[object Float32Array]"===n?"float32array":"[object Float64Array]"===n?"float64array":"object")},_=t,k="undefined"!=typeof window,E=k&&"IntersectionObserver"in window,A={event:"event",observer:"observer"},j=function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}if(k)return"function"==typeof window.CustomEvent?window.CustomEvent:(e.prototype=window.Event.prototype,e)}(),z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return k?window.devicePixelRatio||e:e},T=function(){if(k){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}}(),O={on:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];T?e.addEventListener(t,n,{capture:r,passive:!0}):e.addEventListener(t,n,r)},off:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.removeEventListener(t,n,r)}},I=function(e,t,n){var r=new Image;r.src=e.src,r.onload=function(){t({naturalHeight:r.naturalHeight,naturalWidth:r.naturalWidth,src:r.src})},r.onerror=function(e){n(e)}},x=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},S=function(e){return x(e,"overflow")+x(e,"overflow-y")+x(e,"overflow-x")},$=function(e){if(k){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(S(t)))return t;t=t.parentNode}return window}},H={},Q=function(){function e(t){var n=t.el,r=t.src,i=t.error,o=t.loading,a=t.bindType,s=t.$parent,u=t.options,l=t.elRenderer;b(this,e),this.el=n,this.src=r,this.error=i,this.loading=o,this.bindType=a,this.attempt=0,this.naturalHeight=0,this.naturalWidth=0,this.options=u,this.rect=null,this.$parent=s,this.elRenderer=l,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}return y(e,[{key:"initState",value:function(){this.el.dataset.src=this.src,this.state={error:!1,loaded:!1,rendered:!1}}},{key:"record",value:function(e){this.performanceData[e]=Date.now()}},{key:"update",value:function(e){var t=e.src,n=e.loading,r=e.error,i=this.src;this.src=t,this.loading=n,this.error=r,this.filter(),i!==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 e=this;h(this.options.filter).map(function(t){e.options.filter[t](e,e.options)})}},{key:"renderLoading",value:function(e){var t=this;I({src:this.loading},function(n){t.render("loading",!1),e()},function(){e(),t.options.silent||console.warn("VueLazyload log: load failed with loading image("+t.loading+")")})}},{key:"load",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;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 t()):this.state.loaded||H[this.src]?(this.state.loaded=!0,t(),this.render("loaded",!0)):void this.renderLoading(function(){e.attempt++,e.record("loadStart"),I({src:e.src},function(n){e.naturalHeight=n.naturalHeight,e.naturalWidth=n.naturalWidth,e.state.loaded=!0,e.state.error=!1,e.record("loadEnd"),e.render("loaded",!1),H[e.src]=1,t()},function(t){!e.options.silent&&console.error(t),e.state.error=!0,e.state.loaded=!1,e.render("error",!1)})})}},{key:"render",value:function(e,t){this.elRenderer(this,e,t)}},{key:"performance",value:function(){var e="loading",t=0;return this.state.loaded&&(e="loaded",t=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(e="error"),{src:this.src,state:e,time:t}}},{key:"destroy",value:function(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}]),e}(),C="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",R=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],W={rootMargin:"0px",threshold:0},D=function(e){return function(){function t(e){var n=e.preLoad,r=e.error,i=e.throttleWait,o=e.preLoadTop,a=e.dispatchEvent,s=e.loading,u=e.attempt,c=e.silent,h=void 0===c||c,f=e.scale,v=e.listenEvents,p=(e.hasbind,e.filter),y=e.adapter,g=e.observer,m=e.observerOptions;b(this,t),this.version="1.2.3",this.mode=A.event,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:h,dispatchEvent:!!a,throttleWait:i||200,preLoad:n||1.3,preLoadTop:o||0,error:r||C,loading:s||C,attempt:u||3,scale:f||z(f),ListenEvents:v||R,hasbind:!1,supportWebp:l(),filter:p||{},adapter:y||{},observer:!!g,observerOptions:m||W},this._initEvent(),this.lazyLoadHandler=d(this._lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?A.observer:A.event)}return y(t,[{key:"config",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_(this.options,e)}},{key:"performance",value:function(){var e=[];return this.ListenerQueue.map(function(t){e.push(t.performance())}),e}},{key:"addLazyBox",value:function(e){this.ListenerQueue.push(e),k&&(this._addListenerTarget(window),this._observer&&this._observer.observe(e.el),e.$el&&e.$el.parentNode&&this._addListenerTarget(e.$el.parentNode))}},{key:"add",value:function(t,n,r){var i=this;if(a(this.ListenerQueue,function(e){return e.el===t}))return this.update(t,n),e.nextTick(this.lazyLoadHandler);var o=this._valueFormatter(n.value),u=o.src,l=o.loading,d=o.error;e.nextTick(function(){u=s(t,i.options.scale)||u,i._observer&&i._observer.observe(t);var o=Object.keys(n.modifiers)[0],a=void 0;o&&(a=r.context.$refs[o],a=a?a.$el||a:document.getElementById(o)),a||(a=$(t));var c=new Q({bindType:n.arg,$parent:a,el:t,loading:l,error:d,src:u,elRenderer:i._elRenderer.bind(i),options:i.options});i.ListenerQueue.push(c),k&&(i._addListenerTarget(window),i._addListenerTarget(a)),i.lazyLoadHandler(),e.nextTick(function(){return i.lazyLoadHandler()})})}},{key:"update",value:function(t,n){var r=this,i=this._valueFormatter(n.value),o=i.src,a=i.loading,l=i.error;o=s(t,this.options.scale)||o;var d=u(this.ListenerQueue,function(e){return e.el===t});d&&d.update({src:o,loading:a,error:l}),this._observer&&(this._observer.unobserve(t),this._observer.observe(t)),this.lazyLoadHandler(),e.nextTick(function(){return r.lazyLoadHandler()})}},{key:"remove",value:function(e){if(e){this._observer&&this._observer.unobserve(e);var t=u(this.ListenerQueue,function(t){return t.el===e});t&&(this._removeListenerTarget(t.$parent),this._removeListenerTarget(window),o(this.ListenerQueue,t)&&t.destroy())}}},{key:"removeComponent",value:function(e){e&&(o(this.ListenerQueue,e),this._observer&&this._observer.unobserve(e.el),e.$parent&&e.$el.parentNode&&this._removeListenerTarget(e.$el.parentNode),this._removeListenerTarget(window))}},{key:"setMode",value:function(e){var t=this;E||e!==A.observer||(e=A.event),this.mode=e,e===A.event?(this._observer&&(this.ListenerQueue.forEach(function(e){t._observer.unobserve(e.el)}),this._observer=null),this.TargetQueue.forEach(function(e){t._initListen(e.el,!0)})):(this.TargetQueue.forEach(function(e){t._initListen(e.el,!1)}),this._initIntersectionObserver())}},{key:"_addListenerTarget",value:function(e){if(e){var t=u(this.TargetQueue,function(t){return t.el===e});return t?t.childrenCount++:(t={el:e,id:++this.TargetIndex,childrenCount:1,listened:!0},this.mode===A.event&&this._initListen(t.el,!0),this.TargetQueue.push(t)),this.TargetIndex}}},{key:"_removeListenerTarget",value:function(e){var t=this;this.TargetQueue.forEach(function(n,r){n.el===e&&(--n.childrenCount||(t._initListen(n.el,!1),t.TargetQueue.splice(r,1),n=null))})}},{key:"_initListen",value:function(e,t){var n=this;this.options.ListenEvents.forEach(function(r){return O[t?"on":"off"](e,r,n.lazyLoadHandler)})}},{key:"_initEvent",value:function(){var e=this;this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=function(t,n){e.Event.listeners[t].push(n)},this.$once=function(t,n){function r(){i.$off(t,r),n.apply(i,arguments)}var i=e;e.$on(t,r)},this.$off=function(t,n){if(!n)return void(e.Event.listeners[t]=[]);o(e.Event.listeners[t],n)},this.$emit=function(t,n,r){e.Event.listeners[t].forEach(function(e){return e(n,r)})}}},{key:"_lazyLoadHandler",value:function(){var e=this,t=!1;this.ListenerQueue.forEach(function(n,r){n.state.loaded||(t=n.checkInView())&&n.load(function(){!n.error&&n.loaded&&e.ListenerQueue.splice(r,1)})})}},{key:"_initIntersectionObserver",value:function(){var e=this;E&&(this._observer=new IntersectionObserver(this._observerHandler.bind(this),this.options.observerOptions),this.ListenerQueue.length&&this.ListenerQueue.forEach(function(t){e._observer.observe(t.el)}))}},{key:"_observerHandler",value:function(e,t){var n=this;e.forEach(function(e){e.isIntersecting&&n.ListenerQueue.forEach(function(t){if(t.el===e.target){if(t.state.loaded)return n._observer.unobserve(t.el);t.load()}})})}},{key:"_elRenderer",value:function(e,t,n){if(e.el){var r=e.el,i=e.bindType,o=void 0;switch(t){case"loading":o=e.loading;break;case"error":o=e.error;break;default:o=e.src}if(i?r.style[i]='url("'+o+'")':r.getAttribute("src")!==o&&r.setAttribute("src",o),r.setAttribute("lazy",t),this.$emit(t,e,n),this.options.adapter[t]&&this.options.adapter[t](e,this.options),this.options.dispatchEvent){var a=new j(t,{detail:e});r.dispatchEvent(a)}}}},{key:"_valueFormatter",value:function(e){var t=e,n=this.options.loading,r=this.options.error;return c(e)&&(e.src||this.options.silent||console.error("Vue Lazyload warning: miss src with "+e),t=e.src,n=e.loading||this.options.loading,r=e.error||this.options.error),{src:t,loading:n,error:r}}}]),t}()},B=function(e){return{props:{tag:{type:String,default:"div"}},render:function(e){return!1===this.show?e(this.tag):e(this.tag,null,this.$slots.default)},data:function(){return{el:null,state:{loaded:!1},rect:{},show:!1}},mounted:function(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeDestroy:function(){e.removeComponent(this)},methods:{getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),k&&this.rect.top<window.innerHeight*e.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*e.options.preLoad&&this.rect.right>0},load:function(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)}}}},V=function(){function e(t){var n=t.lazy;b(this,e),this.lazy=n,n.lazyContainerMananger=this,this._queue=[]}return y(e,[{key:"bind",value:function(e,t,n){var r=new N({el:e,binding:t,vnode:n,lazy:this.lazy});this._queue.push(r)}},{key:"update",value:function(e,t,n){var r=u(this._queue,function(t){return t.el===e});r&&r.update({el:e,binding:t,vnode:n})}},{key:"unbind",value:function(e,t,n){var r=u(this._queue,function(t){return t.el===e});r&&(r.clear(),o(this._queue,r))}}]),e}(),M={selector:"img"},N=function(){function e(t){var n=t.el,r=t.binding,i=t.vnode,o=t.lazy;b(this,e),this.el=null,this.vnode=i,this.binding=r,this.options={},this.lazy=o,this._queue=[],this.update({el:n,binding:r})}return y(e,[{key:"update",value:function(e){var t=this,n=e.el,r=e.binding;this.el=n,this.options=_({},M,r.value),this.getImgs().forEach(function(e){t.lazy.add(e,_({},t.binding,{value:{src:e.dataset.src,error:e.dataset.error,loading:e.dataset.loading}}),t.vnode)})}},{key:"getImgs",value:function(){return f(this.el.querySelectorAll(this.options.selector))}},{key:"clear",value:function(){var e=this;this.getImgs().forEach(function(t){return e.lazy.remove(t)}),this.vnode=null,this.binding=null,this.lazy=null}}]),e}();return{install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=D(e),r=new n(t),i=new V({lazy:r}),o="2"===e.version.split(".")[0];e.prototype.$Lazyload=r,t.lazyComponent&&e.component("lazy-component",B(r)),o?(e.directive("lazy",{bind:r.add.bind(r),update:r.update.bind(r),componentUpdated:r.lazyLoadHandler.bind(r),unbind:r.remove.bind(r)}),e.directive("lazy-container",{bind:i.bind.bind(i),update:i.update.bind(i),unbind:i.unbind.bind(i)})):(e.directive("lazy",{bind:r.lazyLoadHandler.bind(r),update:function(e,t){_(this.vm.$refs,this.vm.$els),r.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:e,oldValue:t},{context:this.vm})},unbind:function(){r.remove(this.el)}}),e.directive("lazy-container",{update:function(e,t){i.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:e,oldValue:t},{context:this.vm})},unbind:function(){i.unbind(this.el)}}))}}});
743
+ !function (e, t) {
744
+ true ? module.exports = t() : undefined;
745
+ }(this, function () {
746
+ "use strict";
747
+
748
+ function e(e) {
749
+ return e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e);
750
+ }
751
+
752
+ function t(e) {
753
+ e = e || {};
754
+ var t = arguments.length,
755
+ i = 0;
756
+ if (1 === t) return e;
757
+
758
+ for (; ++i < t;) {
759
+ var o = arguments[i];
760
+ g(e) && (e = o), r(o) && n(e, o);
761
+ }
762
+
763
+ return e;
764
+ }
765
+
766
+ function n(e, n) {
767
+ m(e, n);
768
+
769
+ for (var o in n) {
770
+ if ("__proto__" !== o && i(n, o)) {
771
+ var a = n[o];
772
+ r(a) ? ("undefined" === L(e[o]) && "function" === L(a) && (e[o] = a), e[o] = t(e[o] || {}, a)) : e[o] = a;
773
+ }
774
+ }
775
+
776
+ return e;
777
+ }
778
+
779
+ function r(e) {
780
+ return "object" === L(e) || "function" === L(e);
781
+ }
782
+
783
+ function i(e, t) {
784
+ return Object.prototype.hasOwnProperty.call(e, t);
785
+ }
786
+
787
+ function o(e, t) {
788
+ if (e.length) {
789
+ var n = e.indexOf(t);
790
+ return n > -1 ? e.splice(n, 1) : void 0;
791
+ }
792
+ }
793
+
794
+ function a(e, t) {
795
+ for (var n = !1, r = 0, i = e.length; r < i; r++) {
796
+ if (t(e[r])) {
797
+ n = !0;
798
+ break;
799
+ }
800
+ }
801
+
802
+ return n;
803
+ }
804
+
805
+ function s(e, t) {
806
+ if ("IMG" === e.tagName && e.getAttribute("data-srcset")) {
807
+ var n = e.getAttribute("data-srcset"),
808
+ r = [],
809
+ i = e.parentNode,
810
+ o = i.offsetWidth * t,
811
+ a = void 0,
812
+ s = void 0,
813
+ u = void 0;
814
+ n = n.trim().split(","), n.map(function (e) {
815
+ e = e.trim(), a = e.lastIndexOf(" "), -1 === a ? (s = e, u = 999998) : (s = e.substr(0, a), u = parseInt(e.substr(a + 1, e.length - a - 2), 10)), r.push([u, s]);
816
+ }), r.sort(function (e, t) {
817
+ if (e[0] < t[0]) return -1;
818
+ if (e[0] > t[0]) return 1;
819
+
820
+ if (e[0] === t[0]) {
821
+ if (-1 !== t[1].indexOf(".webp", t[1].length - 5)) return 1;
822
+ if (-1 !== e[1].indexOf(".webp", e[1].length - 5)) return -1;
823
+ }
824
+
825
+ return 0;
826
+ });
827
+
828
+ for (var l = "", d = void 0, c = r.length, h = 0; h < c; h++) {
829
+ if (d = r[h], d[0] >= o) {
830
+ l = d[1];
831
+ break;
832
+ }
833
+ }
834
+
835
+ return l;
836
+ }
837
+ }
838
+
839
+ function u(e, t) {
840
+ for (var n = void 0, r = 0, i = e.length; r < i; r++) {
841
+ if (t(e[r])) {
842
+ n = e[r];
843
+ break;
844
+ }
845
+ }
846
+
847
+ return n;
848
+ }
849
+
850
+ function l() {
851
+ if (!k) return !1;
852
+ var e = !0,
853
+ t = document;
854
+
855
+ try {
856
+ var n = t.createElement("object");
857
+ n.type = "image/webp", n.style.visibility = "hidden", n.innerHTML = "!", t.body.appendChild(n), e = !n.offsetWidth, t.body.removeChild(n);
858
+ } catch (t) {
859
+ e = !1;
860
+ }
861
+
862
+ return e;
863
+ }
864
+
865
+ function d(e, t) {
866
+ var n = null,
867
+ r = 0;
868
+ return function () {
869
+ if (!n) {
870
+ var i = Date.now() - r,
871
+ o = this,
872
+ a = arguments,
873
+ s = function s() {
874
+ r = Date.now(), n = !1, e.apply(o, a);
875
+ };
876
+
877
+ i >= t ? s() : n = setTimeout(s, t);
878
+ }
879
+ };
880
+ }
881
+
882
+ function c(e) {
883
+ return null !== e && "object" === (void 0 === e ? "undefined" : p(e));
884
+ }
885
+
886
+ function h(e) {
887
+ if (!(e instanceof Object)) return [];
888
+ if (Object.keys) return Object.keys(e);
889
+ var t = [];
890
+
891
+ for (var n in e) {
892
+ e.hasOwnProperty(n) && t.push(n);
893
+ }
894
+
895
+ return t;
896
+ }
897
+
898
+ function f(e) {
899
+ for (var t = e.length, n = [], r = 0; r < t; r++) {
900
+ n.push(e[r]);
901
+ }
902
+
903
+ return n;
904
+ }
905
+
906
+ function v() {}
907
+
908
+ var p = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {
909
+ return typeof e;
910
+ } : function (e) {
911
+ return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
912
+ },
913
+ b = function b(e, t) {
914
+ if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
915
+ },
916
+ y = function () {
917
+ function e(e, t) {
918
+ for (var n = 0; n < t.length; n++) {
919
+ var r = t[n];
920
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
921
+ }
922
+ }
923
+
924
+ return function (t, n, r) {
925
+ return n && e(t.prototype, n), r && e(t, r), t;
926
+ };
927
+ }(),
928
+ g = function g(e) {
929
+ return null == e || "function" != typeof e && "object" !== (void 0 === e ? "undefined" : p(e));
930
+ },
931
+ m = function m(e, t) {
932
+ if (null === e || void 0 === e) throw new TypeError("expected first argument to be an object.");
933
+ if (void 0 === t || "undefined" == typeof Symbol) return e;
934
+ if ("function" != typeof Object.getOwnPropertySymbols) return e;
935
+
936
+ for (var n = Object.prototype.propertyIsEnumerable, r = Object(e), i = arguments.length, o = 0; ++o < i;) {
937
+ for (var a = Object(arguments[o]), s = Object.getOwnPropertySymbols(a), u = 0; u < s.length; u++) {
938
+ var l = s[u];
939
+ n.call(a, l) && (r[l] = a[l]);
940
+ }
941
+ }
942
+
943
+ return r;
944
+ },
945
+ w = Object.prototype.toString,
946
+ L = function L(t) {
947
+ var n = void 0 === t ? "undefined" : p(t);
948
+ return "undefined" === n ? "undefined" : null === t ? "null" : !0 === t || !1 === t || t instanceof Boolean ? "boolean" : "string" === n || t instanceof String ? "string" : "number" === n || t instanceof Number ? "number" : "function" === n || 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" : (n = w.call(t), "[object RegExp]" === n ? "regexp" : "[object Date]" === n ? "date" : "[object Arguments]" === n ? "arguments" : "[object Error]" === n ? "error" : "[object Promise]" === n ? "promise" : e(t) ? "buffer" : "[object Set]" === n ? "set" : "[object WeakSet]" === n ? "weakset" : "[object Map]" === n ? "map" : "[object WeakMap]" === n ? "weakmap" : "[object Symbol]" === n ? "symbol" : "[object Map Iterator]" === n ? "mapiterator" : "[object Set Iterator]" === n ? "setiterator" : "[object String Iterator]" === n ? "stringiterator" : "[object Array Iterator]" === n ? "arrayiterator" : "[object Int8Array]" === n ? "int8array" : "[object Uint8Array]" === n ? "uint8array" : "[object Uint8ClampedArray]" === n ? "uint8clampedarray" : "[object Int16Array]" === n ? "int16array" : "[object Uint16Array]" === n ? "uint16array" : "[object Int32Array]" === n ? "int32array" : "[object Uint32Array]" === n ? "uint32array" : "[object Float32Array]" === n ? "float32array" : "[object Float64Array]" === n ? "float64array" : "object");
949
+ },
950
+ _ = t,
951
+ k = "undefined" != typeof window,
952
+ E = k && "IntersectionObserver" in window,
953
+ A = {
954
+ event: "event",
955
+ observer: "observer"
956
+ },
957
+ j = function () {
958
+ function e(e, t) {
959
+ t = t || {
960
+ bubbles: !1,
961
+ cancelable: !1,
962
+ detail: void 0
963
+ };
964
+ var n = document.createEvent("CustomEvent");
965
+ return n.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), n;
966
+ }
967
+
968
+ if (k) return "function" == typeof window.CustomEvent ? window.CustomEvent : (e.prototype = window.Event.prototype, e);
969
+ }(),
970
+ z = function z() {
971
+ var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1;
972
+ return k ? window.devicePixelRatio || e : e;
973
+ },
974
+ T = function () {
975
+ if (k) {
976
+ var e = !1;
977
+
978
+ try {
979
+ var t = Object.defineProperty({}, "passive", {
980
+ get: function get() {
981
+ e = !0;
982
+ }
983
+ });
984
+ window.addEventListener("test", null, t);
985
+ } catch (e) {}
986
+
987
+ return e;
988
+ }
989
+ }(),
990
+ O = {
991
+ on: function on(e, t, n) {
992
+ var r = arguments.length > 3 && void 0 !== arguments[3] && arguments[3];
993
+ T ? e.addEventListener(t, n, {
994
+ capture: r,
995
+ passive: !0
996
+ }) : e.addEventListener(t, n, r);
997
+ },
998
+ off: function off(e, t, n) {
999
+ var r = arguments.length > 3 && void 0 !== arguments[3] && arguments[3];
1000
+ e.removeEventListener(t, n, r);
1001
+ }
1002
+ },
1003
+ I = function I(e, t, n) {
1004
+ var r = new Image();
1005
+ r.src = e.src, r.onload = function () {
1006
+ t({
1007
+ naturalHeight: r.naturalHeight,
1008
+ naturalWidth: r.naturalWidth,
1009
+ src: r.src
1010
+ });
1011
+ }, r.onerror = function (e) {
1012
+ n(e);
1013
+ };
1014
+ },
1015
+ x = function x(e, t) {
1016
+ return "undefined" != typeof getComputedStyle ? getComputedStyle(e, null).getPropertyValue(t) : e.style[t];
1017
+ },
1018
+ S = function S(e) {
1019
+ return x(e, "overflow") + x(e, "overflow-y") + x(e, "overflow-x");
1020
+ },
1021
+ $ = function $(e) {
1022
+ if (k) {
1023
+ if (!(e instanceof HTMLElement)) return window;
1024
+
1025
+ for (var t = e; t && t !== document.body && t !== document.documentElement && t.parentNode;) {
1026
+ if (/(scroll|auto)/.test(S(t))) return t;
1027
+ t = t.parentNode;
1028
+ }
1029
+
1030
+ return window;
1031
+ }
1032
+ },
1033
+ H = {},
1034
+ Q = function () {
1035
+ function e(t) {
1036
+ var n = t.el,
1037
+ r = t.src,
1038
+ i = t.error,
1039
+ o = t.loading,
1040
+ a = t.bindType,
1041
+ s = t.$parent,
1042
+ u = t.options,
1043
+ l = t.elRenderer;
1044
+ b(this, e), this.el = n, this.src = r, this.error = i, this.loading = o, this.bindType = a, this.attempt = 0, this.naturalHeight = 0, this.naturalWidth = 0, this.options = u, this.rect = null, this.$parent = s, this.elRenderer = l, this.performanceData = {
1045
+ init: Date.now(),
1046
+ loadStart: 0,
1047
+ loadEnd: 0
1048
+ }, this.filter(), this.initState(), this.render("loading", !1);
1049
+ }
1050
+
1051
+ return y(e, [{
1052
+ key: "initState",
1053
+ value: function value() {
1054
+ this.el.dataset.src = this.src, this.state = {
1055
+ error: !1,
1056
+ loaded: !1,
1057
+ rendered: !1
1058
+ };
1059
+ }
1060
+ }, {
1061
+ key: "record",
1062
+ value: function value(e) {
1063
+ this.performanceData[e] = Date.now();
1064
+ }
1065
+ }, {
1066
+ key: "update",
1067
+ value: function value(e) {
1068
+ var t = e.src,
1069
+ n = e.loading,
1070
+ r = e.error,
1071
+ i = this.src;
1072
+ this.src = t, this.loading = n, this.error = r, this.filter(), i !== this.src && (this.attempt = 0, this.initState());
1073
+ }
1074
+ }, {
1075
+ key: "getRect",
1076
+ value: function value() {
1077
+ this.rect = this.el.getBoundingClientRect();
1078
+ }
1079
+ }, {
1080
+ key: "checkInView",
1081
+ value: function value() {
1082
+ 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;
1083
+ }
1084
+ }, {
1085
+ key: "filter",
1086
+ value: function value() {
1087
+ var e = this;
1088
+ h(this.options.filter).map(function (t) {
1089
+ e.options.filter[t](e, e.options);
1090
+ });
1091
+ }
1092
+ }, {
1093
+ key: "renderLoading",
1094
+ value: function value(e) {
1095
+ var t = this;
1096
+ I({
1097
+ src: this.loading
1098
+ }, function (n) {
1099
+ t.render("loading", !1), e();
1100
+ }, function () {
1101
+ e(), t.options.silent || console.warn("VueLazyload log: load failed with loading image(" + t.loading + ")");
1102
+ });
1103
+ }
1104
+ }, {
1105
+ key: "load",
1106
+ value: function value() {
1107
+ var e = this,
1108
+ t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : v;
1109
+ 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 t()) : this.state.loaded || H[this.src] ? (this.state.loaded = !0, t(), this.render("loaded", !0)) : void this.renderLoading(function () {
1110
+ e.attempt++, e.record("loadStart"), I({
1111
+ src: e.src
1112
+ }, function (n) {
1113
+ e.naturalHeight = n.naturalHeight, e.naturalWidth = n.naturalWidth, e.state.loaded = !0, e.state.error = !1, e.record("loadEnd"), e.render("loaded", !1), H[e.src] = 1, t();
1114
+ }, function (t) {
1115
+ !e.options.silent && console.error(t), e.state.error = !0, e.state.loaded = !1, e.render("error", !1);
1116
+ });
1117
+ });
1118
+ }
1119
+ }, {
1120
+ key: "render",
1121
+ value: function value(e, t) {
1122
+ this.elRenderer(this, e, t);
1123
+ }
1124
+ }, {
1125
+ key: "performance",
1126
+ value: function value() {
1127
+ var e = "loading",
1128
+ t = 0;
1129
+ return this.state.loaded && (e = "loaded", t = (this.performanceData.loadEnd - this.performanceData.loadStart) / 1e3), this.state.error && (e = "error"), {
1130
+ src: this.src,
1131
+ state: e,
1132
+ time: t
1133
+ };
1134
+ }
1135
+ }, {
1136
+ key: "destroy",
1137
+ value: function value() {
1138
+ this.el = null, this.src = null, this.error = null, this.loading = null, this.bindType = null, this.attempt = 0;
1139
+ }
1140
+ }]), e;
1141
+ }(),
1142
+ C = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
1143
+ R = ["scroll", "wheel", "mousewheel", "resize", "animationend", "transitionend", "touchmove"],
1144
+ W = {
1145
+ rootMargin: "0px",
1146
+ threshold: 0
1147
+ },
1148
+ D = function D(e) {
1149
+ return function () {
1150
+ function t(e) {
1151
+ var n = e.preLoad,
1152
+ r = e.error,
1153
+ i = e.throttleWait,
1154
+ o = e.preLoadTop,
1155
+ a = e.dispatchEvent,
1156
+ s = e.loading,
1157
+ u = e.attempt,
1158
+ c = e.silent,
1159
+ h = void 0 === c || c,
1160
+ f = e.scale,
1161
+ v = e.listenEvents,
1162
+ p = (e.hasbind, e.filter),
1163
+ y = e.adapter,
1164
+ g = e.observer,
1165
+ m = e.observerOptions;
1166
+ b(this, t), this.version = "1.2.3", this.mode = A.event, this.ListenerQueue = [], this.TargetIndex = 0, this.TargetQueue = [], this.options = {
1167
+ silent: h,
1168
+ dispatchEvent: !!a,
1169
+ throttleWait: i || 200,
1170
+ preLoad: n || 1.3,
1171
+ preLoadTop: o || 0,
1172
+ error: r || C,
1173
+ loading: s || C,
1174
+ attempt: u || 3,
1175
+ scale: f || z(f),
1176
+ ListenEvents: v || R,
1177
+ hasbind: !1,
1178
+ supportWebp: l(),
1179
+ filter: p || {},
1180
+ adapter: y || {},
1181
+ observer: !!g,
1182
+ observerOptions: m || W
1183
+ }, this._initEvent(), this.lazyLoadHandler = d(this._lazyLoadHandler.bind(this), this.options.throttleWait), this.setMode(this.options.observer ? A.observer : A.event);
1184
+ }
1185
+
1186
+ return y(t, [{
1187
+ key: "config",
1188
+ value: function value() {
1189
+ var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
1190
+
1191
+ _(this.options, e);
1192
+ }
1193
+ }, {
1194
+ key: "performance",
1195
+ value: function value() {
1196
+ var e = [];
1197
+ return this.ListenerQueue.map(function (t) {
1198
+ e.push(t.performance());
1199
+ }), e;
1200
+ }
1201
+ }, {
1202
+ key: "addLazyBox",
1203
+ value: function value(e) {
1204
+ this.ListenerQueue.push(e), k && (this._addListenerTarget(window), this._observer && this._observer.observe(e.el), e.$el && e.$el.parentNode && this._addListenerTarget(e.$el.parentNode));
1205
+ }
1206
+ }, {
1207
+ key: "add",
1208
+ value: function value(t, n, r) {
1209
+ var i = this;
1210
+ if (a(this.ListenerQueue, function (e) {
1211
+ return e.el === t;
1212
+ })) return this.update(t, n), e.nextTick(this.lazyLoadHandler);
1213
+
1214
+ var o = this._valueFormatter(n.value),
1215
+ u = o.src,
1216
+ l = o.loading,
1217
+ d = o.error;
1218
+
1219
+ e.nextTick(function () {
1220
+ u = s(t, i.options.scale) || u, i._observer && i._observer.observe(t);
1221
+ var o = Object.keys(n.modifiers)[0],
1222
+ a = void 0;
1223
+ o && (a = r.context.$refs[o], a = a ? a.$el || a : document.getElementById(o)), a || (a = $(t));
1224
+ var c = new Q({
1225
+ bindType: n.arg,
1226
+ $parent: a,
1227
+ el: t,
1228
+ loading: l,
1229
+ error: d,
1230
+ src: u,
1231
+ elRenderer: i._elRenderer.bind(i),
1232
+ options: i.options
1233
+ });
1234
+ i.ListenerQueue.push(c), k && (i._addListenerTarget(window), i._addListenerTarget(a)), i.lazyLoadHandler(), e.nextTick(function () {
1235
+ return i.lazyLoadHandler();
1236
+ });
1237
+ });
1238
+ }
1239
+ }, {
1240
+ key: "update",
1241
+ value: function value(t, n) {
1242
+ var r = this,
1243
+ i = this._valueFormatter(n.value),
1244
+ o = i.src,
1245
+ a = i.loading,
1246
+ l = i.error;
1247
+
1248
+ o = s(t, this.options.scale) || o;
1249
+ var d = u(this.ListenerQueue, function (e) {
1250
+ return e.el === t;
1251
+ });
1252
+ d && d.update({
1253
+ src: o,
1254
+ loading: a,
1255
+ error: l
1256
+ }), this._observer && (this._observer.unobserve(t), this._observer.observe(t)), this.lazyLoadHandler(), e.nextTick(function () {
1257
+ return r.lazyLoadHandler();
1258
+ });
1259
+ }
1260
+ }, {
1261
+ key: "remove",
1262
+ value: function value(e) {
1263
+ if (e) {
1264
+ this._observer && this._observer.unobserve(e);
1265
+ var t = u(this.ListenerQueue, function (t) {
1266
+ return t.el === e;
1267
+ });
1268
+ t && (this._removeListenerTarget(t.$parent), this._removeListenerTarget(window), o(this.ListenerQueue, t) && t.destroy());
1269
+ }
1270
+ }
1271
+ }, {
1272
+ key: "removeComponent",
1273
+ value: function value(e) {
1274
+ e && (o(this.ListenerQueue, e), this._observer && this._observer.unobserve(e.el), e.$parent && e.$el.parentNode && this._removeListenerTarget(e.$el.parentNode), this._removeListenerTarget(window));
1275
+ }
1276
+ }, {
1277
+ key: "setMode",
1278
+ value: function value(e) {
1279
+ var t = this;
1280
+ E || e !== A.observer || (e = A.event), this.mode = e, e === A.event ? (this._observer && (this.ListenerQueue.forEach(function (e) {
1281
+ t._observer.unobserve(e.el);
1282
+ }), this._observer = null), this.TargetQueue.forEach(function (e) {
1283
+ t._initListen(e.el, !0);
1284
+ })) : (this.TargetQueue.forEach(function (e) {
1285
+ t._initListen(e.el, !1);
1286
+ }), this._initIntersectionObserver());
1287
+ }
1288
+ }, {
1289
+ key: "_addListenerTarget",
1290
+ value: function value(e) {
1291
+ if (e) {
1292
+ var t = u(this.TargetQueue, function (t) {
1293
+ return t.el === e;
1294
+ });
1295
+ return t ? t.childrenCount++ : (t = {
1296
+ el: e,
1297
+ id: ++this.TargetIndex,
1298
+ childrenCount: 1,
1299
+ listened: !0
1300
+ }, this.mode === A.event && this._initListen(t.el, !0), this.TargetQueue.push(t)), this.TargetIndex;
1301
+ }
1302
+ }
1303
+ }, {
1304
+ key: "_removeListenerTarget",
1305
+ value: function value(e) {
1306
+ var t = this;
1307
+ this.TargetQueue.forEach(function (n, r) {
1308
+ n.el === e && (--n.childrenCount || (t._initListen(n.el, !1), t.TargetQueue.splice(r, 1), n = null));
1309
+ });
1310
+ }
1311
+ }, {
1312
+ key: "_initListen",
1313
+ value: function value(e, t) {
1314
+ var n = this;
1315
+ this.options.ListenEvents.forEach(function (r) {
1316
+ return O[t ? "on" : "off"](e, r, n.lazyLoadHandler);
1317
+ });
1318
+ }
1319
+ }, {
1320
+ key: "_initEvent",
1321
+ value: function value() {
1322
+ var e = this;
1323
+ this.Event = {
1324
+ listeners: {
1325
+ loading: [],
1326
+ loaded: [],
1327
+ error: []
1328
+ }
1329
+ }, this.$on = function (t, n) {
1330
+ e.Event.listeners[t].push(n);
1331
+ }, this.$once = function (t, n) {
1332
+ function r() {
1333
+ i.$off(t, r), n.apply(i, arguments);
1334
+ }
1335
+
1336
+ var i = e;
1337
+ e.$on(t, r);
1338
+ }, this.$off = function (t, n) {
1339
+ if (!n) return void (e.Event.listeners[t] = []);
1340
+ o(e.Event.listeners[t], n);
1341
+ }, this.$emit = function (t, n, r) {
1342
+ e.Event.listeners[t].forEach(function (e) {
1343
+ return e(n, r);
1344
+ });
1345
+ };
1346
+ }
1347
+ }, {
1348
+ key: "_lazyLoadHandler",
1349
+ value: function value() {
1350
+ var e = this,
1351
+ t = !1;
1352
+ this.ListenerQueue.forEach(function (n, r) {
1353
+ n.state.loaded || (t = n.checkInView()) && n.load(function () {
1354
+ !n.error && n.loaded && e.ListenerQueue.splice(r, 1);
1355
+ });
1356
+ });
1357
+ }
1358
+ }, {
1359
+ key: "_initIntersectionObserver",
1360
+ value: function value() {
1361
+ var e = this;
1362
+ E && (this._observer = new IntersectionObserver(this._observerHandler.bind(this), this.options.observerOptions), this.ListenerQueue.length && this.ListenerQueue.forEach(function (t) {
1363
+ e._observer.observe(t.el);
1364
+ }));
1365
+ }
1366
+ }, {
1367
+ key: "_observerHandler",
1368
+ value: function value(e, t) {
1369
+ var n = this;
1370
+ e.forEach(function (e) {
1371
+ e.isIntersecting && n.ListenerQueue.forEach(function (t) {
1372
+ if (t.el === e.target) {
1373
+ if (t.state.loaded) return n._observer.unobserve(t.el);
1374
+ t.load();
1375
+ }
1376
+ });
1377
+ });
1378
+ }
1379
+ }, {
1380
+ key: "_elRenderer",
1381
+ value: function value(e, t, n) {
1382
+ if (e.el) {
1383
+ var r = e.el,
1384
+ i = e.bindType,
1385
+ o = void 0;
1386
+
1387
+ switch (t) {
1388
+ case "loading":
1389
+ o = e.loading;
1390
+ break;
1391
+
1392
+ case "error":
1393
+ o = e.error;
1394
+ break;
1395
+
1396
+ default:
1397
+ o = e.src;
1398
+ }
1399
+
1400
+ if (i ? r.style[i] = 'url("' + o + '")' : r.getAttribute("src") !== o && r.setAttribute("src", o), r.setAttribute("lazy", t), this.$emit(t, e, n), this.options.adapter[t] && this.options.adapter[t](e, this.options), this.options.dispatchEvent) {
1401
+ var a = new j(t, {
1402
+ detail: e
1403
+ });
1404
+ r.dispatchEvent(a);
1405
+ }
1406
+ }
1407
+ }
1408
+ }, {
1409
+ key: "_valueFormatter",
1410
+ value: function value(e) {
1411
+ var t = e,
1412
+ n = this.options.loading,
1413
+ r = this.options.error;
1414
+ return c(e) && (e.src || this.options.silent || console.error("Vue Lazyload warning: miss src with " + e), t = e.src, n = e.loading || this.options.loading, r = e.error || this.options.error), {
1415
+ src: t,
1416
+ loading: n,
1417
+ error: r
1418
+ };
1419
+ }
1420
+ }]), t;
1421
+ }();
1422
+ },
1423
+ B = function B(e) {
1424
+ return {
1425
+ props: {
1426
+ tag: {
1427
+ type: String,
1428
+ default: "div"
1429
+ }
1430
+ },
1431
+ render: function render(e) {
1432
+ return !1 === this.show ? e(this.tag) : e(this.tag, null, this.$slots.default);
1433
+ },
1434
+ data: function data() {
1435
+ return {
1436
+ el: null,
1437
+ state: {
1438
+ loaded: !1
1439
+ },
1440
+ rect: {},
1441
+ show: !1
1442
+ };
1443
+ },
1444
+ mounted: function mounted() {
1445
+ this.el = this.$el, e.addLazyBox(this), e.lazyLoadHandler();
1446
+ },
1447
+ beforeDestroy: function beforeDestroy() {
1448
+ e.removeComponent(this);
1449
+ },
1450
+ methods: {
1451
+ getRect: function getRect() {
1452
+ this.rect = this.$el.getBoundingClientRect();
1453
+ },
1454
+ checkInView: function checkInView() {
1455
+ return this.getRect(), k && this.rect.top < window.innerHeight * e.options.preLoad && this.rect.bottom > 0 && this.rect.left < window.innerWidth * e.options.preLoad && this.rect.right > 0;
1456
+ },
1457
+ load: function load() {
1458
+ this.show = !0, this.state.loaded = !0, this.$emit("show", this);
1459
+ }
1460
+ }
1461
+ };
1462
+ },
1463
+ V = function () {
1464
+ function e(t) {
1465
+ var n = t.lazy;
1466
+ b(this, e), this.lazy = n, n.lazyContainerMananger = this, this._queue = [];
1467
+ }
1468
+
1469
+ return y(e, [{
1470
+ key: "bind",
1471
+ value: function value(e, t, n) {
1472
+ var r = new N({
1473
+ el: e,
1474
+ binding: t,
1475
+ vnode: n,
1476
+ lazy: this.lazy
1477
+ });
1478
+
1479
+ this._queue.push(r);
1480
+ }
1481
+ }, {
1482
+ key: "update",
1483
+ value: function value(e, t, n) {
1484
+ var r = u(this._queue, function (t) {
1485
+ return t.el === e;
1486
+ });
1487
+ r && r.update({
1488
+ el: e,
1489
+ binding: t,
1490
+ vnode: n
1491
+ });
1492
+ }
1493
+ }, {
1494
+ key: "unbind",
1495
+ value: function value(e, t, n) {
1496
+ var r = u(this._queue, function (t) {
1497
+ return t.el === e;
1498
+ });
1499
+ r && (r.clear(), o(this._queue, r));
1500
+ }
1501
+ }]), e;
1502
+ }(),
1503
+ M = {
1504
+ selector: "img"
1505
+ },
1506
+ N = function () {
1507
+ function e(t) {
1508
+ var n = t.el,
1509
+ r = t.binding,
1510
+ i = t.vnode,
1511
+ o = t.lazy;
1512
+ b(this, e), this.el = null, this.vnode = i, this.binding = r, this.options = {}, this.lazy = o, this._queue = [], this.update({
1513
+ el: n,
1514
+ binding: r
1515
+ });
1516
+ }
699
1517
 
1518
+ return y(e, [{
1519
+ key: "update",
1520
+ value: function value(e) {
1521
+ var t = this,
1522
+ n = e.el,
1523
+ r = e.binding;
1524
+ this.el = n, this.options = _({}, M, r.value), this.getImgs().forEach(function (e) {
1525
+ t.lazy.add(e, _({}, t.binding, {
1526
+ value: {
1527
+ src: e.dataset.src,
1528
+ error: e.dataset.error,
1529
+ loading: e.dataset.loading
1530
+ }
1531
+ }), t.vnode);
1532
+ });
1533
+ }
1534
+ }, {
1535
+ key: "getImgs",
1536
+ value: function value() {
1537
+ return f(this.el.querySelectorAll(this.options.selector));
1538
+ }
1539
+ }, {
1540
+ key: "clear",
1541
+ value: function value() {
1542
+ var e = this;
1543
+ this.getImgs().forEach(function (t) {
1544
+ return e.lazy.remove(t);
1545
+ }), this.vnode = null, this.binding = null, this.lazy = null;
1546
+ }
1547
+ }]), e;
1548
+ }();
1549
+
1550
+ return {
1551
+ install: function install(e) {
1552
+ var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
1553
+ n = D(e),
1554
+ r = new n(t),
1555
+ i = new V({
1556
+ lazy: r
1557
+ }),
1558
+ o = "2" === e.version.split(".")[0];
1559
+ e.prototype.$Lazyload = r, t.lazyComponent && e.component("lazy-component", B(r)), o ? (e.directive("lazy", {
1560
+ bind: r.add.bind(r),
1561
+ update: r.update.bind(r),
1562
+ componentUpdated: r.lazyLoadHandler.bind(r),
1563
+ unbind: r.remove.bind(r)
1564
+ }), e.directive("lazy-container", {
1565
+ bind: i.bind.bind(i),
1566
+ update: i.update.bind(i),
1567
+ unbind: i.unbind.bind(i)
1568
+ })) : (e.directive("lazy", {
1569
+ bind: r.lazyLoadHandler.bind(r),
1570
+ update: function update(e, t) {
1571
+ _(this.vm.$refs, this.vm.$els), r.add(this.el, {
1572
+ modifiers: this.modifiers || {},
1573
+ arg: this.arg,
1574
+ value: e,
1575
+ oldValue: t
1576
+ }, {
1577
+ context: this.vm
1578
+ });
1579
+ },
1580
+ unbind: function unbind() {
1581
+ r.remove(this.el);
1582
+ }
1583
+ }), e.directive("lazy-container", {
1584
+ update: function update(e, t) {
1585
+ i.update(this.el, {
1586
+ modifiers: this.modifiers || {},
1587
+ arg: this.arg,
1588
+ value: e,
1589
+ oldValue: t
1590
+ }, {
1591
+ context: this.vm
1592
+ });
1593
+ },
1594
+ unbind: function unbind() {
1595
+ i.unbind(this.el);
1596
+ }
1597
+ }));
1598
+ }
1599
+ };
1600
+ });
700
1601
 
701
1602
  /***/ }),
702
1603
  /* 10 */
703
1604
  /***/ (function(module, exports) {
704
1605
 
705
- var g;
1606
+ var g; // This works in non-strict mode
706
1607
 
707
- // This works in non-strict mode
708
- g = (function() {
709
- return this;
710
- })();
1608
+ g = function () {
1609
+ return this;
1610
+ }();
711
1611
 
712
1612
  try {
713
- // This works if eval is allowed (see CSP)
714
- g = g || new Function("return this")();
1613
+ // This works if eval is allowed (see CSP)
1614
+ g = g || new Function("return this")();
715
1615
  } catch (e) {
716
- // This works if the window reference is available
717
- if (typeof window === "object") g = window;
718
- }
719
-
720
- // g can still be undefined, but nothing to do about it...
1616
+ // This works if the window reference is available
1617
+ if (typeof window === "object") g = window;
1618
+ } // g can still be undefined, but nothing to do about it...
721
1619
  // We return undefined, instead of nothing here, so it's
722
1620
  // easier to handle this case. if(!global) { ...}
723
1621
 
724
- module.exports = g;
725
1622
 
1623
+ module.exports = g;
726
1624
 
727
1625
  /***/ }),
728
1626
  /* 11 */
@@ -1126,10 +2024,10 @@ function removeOverlay(vm) {
1126
2024
  function isWindow(val) {
1127
2025
  return val === window;
1128
2026
  } // get nearest scroll element
1129
- // https://github.com/youzan/vant/issues/3823
2027
+ // https://github.com/vant-ui/vant/issues/3823
1130
2028
 
1131
2029
 
1132
- var overflowScrollReg = /scroll|auto/i;
2030
+ var overflowScrollReg = /scroll|auto|overlay/i;
1133
2031
  function getScroller(el, root) {
1134
2032
  if (root === void 0) {
1135
2033
  root = window;
@@ -1241,7 +2139,7 @@ var TouchMixin = {
1241
2139
  this.offsetY = 0;
1242
2140
  },
1243
2141
  // avoid Vue 2.6 event bubble issues by manually binding events
1244
- // https://github.com/youzan/vant/issues/3015
2142
+ // https://github.com/vant-ui/vant/issues/3015
1245
2143
  bindTouchEvent: function bindTouchEvent(el) {
1246
2144
  var onTouchStart = this.onTouchStart,
1247
2145
  onTouchMove = this.onTouchMove,
@@ -2671,7 +3569,7 @@ var picker_createNamespace = Object(create["a" /* createNamespace */])('picker')
2671
3569
  } else {
2672
3570
  var values = this.getValues(); // compatible with old version of wrong parameters
2673
3571
  // should be removed in next major version
2674
- // see: https://github.com/youzan/vant/issues/5905
3572
+ // see: https://github.com/vant-ui/vant/issues/5905
2675
3573
 
2676
3574
  if (this.dataType === 'cascade') {
2677
3575
  values = values.map(function (item) {
@@ -2710,7 +3608,7 @@ var picker_createNamespace = Object(create["a" /* createNamespace */])('picker')
2710
3608
  } else {
2711
3609
  var values = this.getValues(); // compatible with old version of wrong parameters
2712
3610
  // should be removed in next major version
2713
- // see: https://github.com/youzan/vant/issues/5905
3611
+ // see: https://github.com/vant-ui/vant/issues/5905
2714
3612
 
2715
3613
  if (this.dataType === 'cascade') {
2716
3614
  values = values.map(function (item) {
@@ -3757,7 +4655,7 @@ var field_createNamespace = Object(create["a" /* createNamespace */])('field'),
3757
4655
  }
3758
4656
 
3759
4657
  value = Object(utils["c" /* isDef */])(value) ? String(value) : ''; // native maxlength have incorrect line-break counting
3760
- // see: https://github.com/youzan/vant/issues/5033
4658
+ // see: https://github.com/vant-ui/vant/issues/5033
3761
4659
 
3762
4660
  var maxlength = this.maxlength;
3763
4661
 
@@ -3798,7 +4696,7 @@ var field_createNamespace = Object(create["a" /* createNamespace */])('field'),
3798
4696
  },
3799
4697
  onFocus: function onFocus(event) {
3800
4698
  this.focused = true;
3801
- this.$emit('focus', event); // https://github.com/youzan/vant/issues/9715
4699
+ this.$emit('focus', event); // https://github.com/vant-ui/vant/issues/9715
3802
4700
 
3803
4701
  this.$nextTick(this.adjustSize); // readonly not work in legacy mobile safari
3804
4702
 
@@ -3881,7 +4779,7 @@ var field_createNamespace = Object(create["a" /* createNamespace */])('field'),
3881
4779
  }
3882
4780
 
3883
4781
  if (height) {
3884
- input.style.height = height + 'px'; // https://github.com/youzan/vant/issues/9178
4782
+ input.style.height = height + 'px'; // https://github.com/vant-ui/vant/issues/9178
3885
4783
 
3886
4784
  setRootScrollTop(scrollTop);
3887
4785
  }
@@ -4277,7 +5175,7 @@ var Toast_createNamespace = Object(create["a" /* createNamespace */])('toast'),
4277
5175
 
4278
5176
 
4279
5177
 
4280
- var defaultOptions = {
5178
+ var toast_defaultOptions = {
4281
5179
  icon: '',
4282
5180
  type: 'text',
4283
5181
  // @deprecated
@@ -4304,7 +5202,7 @@ var defaultOptionsMap = {};
4304
5202
  var queue = [];
4305
5203
  var toast_multiple = false;
4306
5204
 
4307
- var currentOptions = _extends({}, defaultOptions);
5205
+ var currentOptions = _extends({}, toast_defaultOptions);
4308
5206
 
4309
5207
  function parseOptions(message) {
4310
5208
  if (Object(utils["f" /* isObject */])(message)) {
@@ -4440,7 +5338,7 @@ toast_Toast.resetDefaultOptions = function (type) {
4440
5338
  if (typeof type === 'string') {
4441
5339
  defaultOptionsMap[type] = null;
4442
5340
  } else {
4443
- currentOptions = _extends({}, defaultOptions);
5341
+ currentOptions = _extends({}, toast_defaultOptions);
4444
5342
  defaultOptionsMap = {};
4445
5343
  }
4446
5344
  };
@@ -5017,7 +5915,8 @@ var Dialog_createNamespace = Object(create["a" /* createNamespace */])('dialog')
5017
5915
  "attrs": {
5018
5916
  "size": "large",
5019
5917
  "loading": this.loading.cancel,
5020
- "text": this.cancelButtonText || Dialog_t('cancel')
5918
+ "text": this.cancelButtonText || Dialog_t('cancel'),
5919
+ "nativeType": "button"
5021
5920
  },
5022
5921
  "class": Dialog_bem('cancel'),
5023
5922
  "style": {
@@ -5032,7 +5931,8 @@ var Dialog_createNamespace = Object(create["a" /* createNamespace */])('dialog')
5032
5931
  "attrs": {
5033
5932
  "size": "large",
5034
5933
  "loading": this.loading.confirm,
5035
- "text": this.confirmButtonText || Dialog_t('confirm')
5934
+ "text": this.confirmButtonText || Dialog_t('confirm'),
5935
+ "nativeType": "button"
5036
5936
  },
5037
5937
  "class": [Dialog_bem('confirm'), (_ref = {}, _ref[BORDER_LEFT] = multiple, _ref)],
5038
5938
  "style": {
@@ -7173,7 +8073,7 @@ var Header_createNamespace = Object(create["a" /* createNamespace */])('calendar
7173
8073
  mounted: function mounted() {
7174
8074
  var _this$vanPopup;
7175
8075
 
7176
- this.init(); // https://github.com/youzan/vant/issues/9845
8076
+ this.init(); // https://github.com/vant-ui/vant/issues/9845
7177
8077
 
7178
8078
  (_this$vanPopup = this.vanPopup) == null ? void 0 : _this$vanPopup.$on('opened', this.onScroll);
7179
8079
  },
@@ -7201,7 +8101,7 @@ var Header_createNamespace = Object(create["a" /* createNamespace */])('calendar
7201
8101
 
7202
8102
  this.$nextTick(function () {
7203
8103
  // add Math.floor to avoid decimal height issues
7204
- // https://github.com/youzan/vant/issues/5640
8104
+ // https://github.com/vant-ui/vant/issues/5640
7205
8105
  _this.bodyHeight = Math.floor(_this.$refs.body.getBoundingClientRect().height);
7206
8106
 
7207
8107
  _this.onScroll();
@@ -8574,7 +9474,7 @@ var tabs_createNamespace = Object(create["a" /* createNamespace */])('tabs'),
8574
9474
  mounted: function mounted() {
8575
9475
  var _this2 = this;
8576
9476
 
8577
- this.init(); // https://github.com/youzan/vant/issues/7959
9477
+ this.init(); // https://github.com/vant-ui/vant/issues/7959
8578
9478
 
8579
9479
  if (this.vanPopup) {
8580
9480
  this.vanPopup.onReopen(function () {
@@ -10326,7 +11226,7 @@ var count_down_createNamespace = Object(create["a" /* createNamespace */])('coun
10326
11226
  },
10327
11227
  tick: function tick() {
10328
11228
  // should not start counting in server
10329
- // see: https://github.com/youzan/vant/issues/7807
11229
+ // see: https://github.com/vant-ui/vant/issues/7807
10330
11230
  if (!utils["b" /* inBrowser */]) {
10331
11231
  return;
10332
11232
  }
@@ -10936,7 +11836,7 @@ var TimePickerMixin = {
10936
11836
  getPicker: function getPicker() {
10937
11837
  return this.$refs.picker;
10938
11838
  },
10939
- // https://github.com/youzan/vant/issues/10013
11839
+ // https://github.com/vant-ui/vant/issues/10013
10940
11840
  getProxiedPicker: function getProxiedPicker() {
10941
11841
  var _this4 = this;
10942
11842
 
@@ -11108,7 +12008,7 @@ var TimePicker_createNamespace = Object(create["a" /* createNamespace */])('time
11108
12008
  this.updateInnerValue();
11109
12009
  this.$nextTick(function () {
11110
12010
  _this2.$nextTick(function () {
11111
- // https://github.com/youzan/vant/issues/9775
12011
+ // https://github.com/vant-ui/vant/issues/9775
11112
12012
  _this2.updateInnerValue();
11113
12013
 
11114
12014
  _this2.$emit('change', picker);
@@ -11443,7 +12343,7 @@ var DatePicker_createNamespace = Object(create["a" /* createNamespace */])('date
11443
12343
  this.updateInnerValue();
11444
12344
  this.$nextTick(function () {
11445
12345
  _this4.$nextTick(function () {
11446
- // https://github.com/youzan/vant/issues/9775
12346
+ // https://github.com/vant-ui/vant/issues/9775
11447
12347
  _this4.updateInnerValue();
11448
12348
 
11449
12349
  _this4.$emit('change', picker);
@@ -14304,7 +15204,7 @@ var nav_bar_createNamespace = Object(create["a" /* createNamespace */])('nav-bar
14304
15204
  _this.height = _this.$refs.navBar.getBoundingClientRect().height;
14305
15205
  };
14306
15206
 
14307
- setHeight(); // https://github.com/youzan/vant/issues/10131
15207
+ setHeight(); // https://github.com/vant-ui/vant/issues/10131
14308
15208
 
14309
15209
  setTimeout(setHeight, 100);
14310
15210
  }
@@ -14456,7 +15356,7 @@ var notice_bar_createNamespace = Object(create["a" /* createNamespace */])('noti
14456
15356
  }
14457
15357
  },
14458
15358
  created: function created() {
14459
- // https://github.com/youzan/vant/issues/8634
15359
+ // https://github.com/vant-ui/vant/issues/8634
14460
15360
  if (this.vanPopup) {
14461
15361
  this.vanPopup.onReopen(this.reset);
14462
15362
  }
@@ -14842,7 +15742,7 @@ var Key_createNamespace = Object(create["a" /* createNamespace */])('key'),
14842
15742
  onTouchEnd: function onTouchEnd(event) {
14843
15743
  if (this.active) {
14844
15744
  // eliminate tap delay on safari
14845
- // see: https://github.com/youzan/vant/issues/6836
15745
+ // see: https://github.com/vant-ui/vant/issues/6836
14846
15746
  if (!this.slots('default')) {
14847
15747
  event.preventDefault();
14848
15748
  }
@@ -15472,6 +16372,8 @@ PasswordInput.props = {
15472
16372
  };
15473
16373
  /* harmony default export */ var password_input = (password_input_createComponent(PasswordInput));
15474
16374
  // CONCATENATED MODULE: ./node_modules/@vant/popperjs/dist/esm/index.js
16375
+
16376
+
15475
16377
  function getBoundingClientRect(element) {
15476
16378
  var rect = element.getBoundingClientRect();
15477
16379
  return {
@@ -15577,9 +16479,8 @@ function isScrollParent(element) {
15577
16479
  overflowY = _getComputedStyle.overflowY;
15578
16480
 
15579
16481
  return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
15580
- }
16482
+ } // Composite means it takes into account transforms as well as layout.
15581
16483
 
15582
- // Composite means it takes into account transforms as well as layout.
15583
16484
 
15584
16485
  function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
15585
16486
  if (isFixed === void 0) {
@@ -15619,9 +16520,8 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
15619
16520
  width: rect.width,
15620
16521
  height: rect.height
15621
16522
  };
15622
- }
16523
+ } // means it doesn't take into account transforms.
15623
16524
 
15624
- // means it doesn't take into account transforms.
15625
16525
 
15626
16526
  function getLayoutRect(element) {
15627
16527
  var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
@@ -15675,7 +16575,6 @@ function getScrollParent(node) {
15675
16575
 
15676
16576
  return getScrollParent(getParentNode(node));
15677
16577
  }
15678
-
15679
16578
  /*
15680
16579
  given a DOM element, return the list of all scroll parents, up the list of ancesors
15681
16580
  until we get to the top window object. This list is what we attach scroll listeners
@@ -15683,6 +16582,7 @@ to, because if any of these parent elements scroll, we'll need to re-calculate t
15683
16582
  reference element's position.
15684
16583
  */
15685
16584
 
16585
+
15686
16586
  function listScrollParents(element, list) {
15687
16587
  var _element$ownerDocumen;
15688
16588
 
@@ -15858,6 +16758,7 @@ function esm_format(str) {
15858
16758
  var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
15859
16759
  var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
15860
16760
  var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
16761
+
15861
16762
  function validateModifiers(modifiers) {
15862
16763
  modifiers.forEach(function (modifier) {
15863
16764
  Object.keys(modifier).forEach(function (key) {
@@ -15949,9 +16850,9 @@ function getBasePlacement(placement) {
15949
16850
  function mergeByName(modifiers) {
15950
16851
  var merged = modifiers.reduce(function (merged, current) {
15951
16852
  var existing = merged[current.name];
15952
- merged[current.name] = existing ? Object.assign({}, existing, current, {
15953
- options: Object.assign({}, existing.options, current.options),
15954
- data: Object.assign({}, existing.data, current.data)
16853
+ merged[current.name] = existing ? _extends({}, existing, current, {
16854
+ options: _extends({}, existing.options, current.options),
16855
+ data: _extends({}, existing.data, current.data)
15955
16856
  }) : current;
15956
16857
  return merged;
15957
16858
  }, {}); // IE11 does not support Object.values
@@ -16072,7 +16973,7 @@ function popperGenerator(generatorOptions) {
16072
16973
  var state = {
16073
16974
  placement: 'bottom',
16074
16975
  orderedModifiers: [],
16075
- options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
16976
+ options: _extends({}, DEFAULT_OPTIONS, defaultOptions),
16076
16977
  modifiersData: {},
16077
16978
  elements: {
16078
16979
  reference: reference,
@@ -16087,7 +16988,7 @@ function popperGenerator(generatorOptions) {
16087
16988
  state: state,
16088
16989
  setOptions: function setOptions(options) {
16089
16990
  cleanupModifierEffects();
16090
- state.options = Object.assign({}, defaultOptions, state.options, options);
16991
+ state.options = _extends({}, defaultOptions, state.options, options);
16091
16992
  state.scrollParents = {
16092
16993
  reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
16093
16994
  popper: listScrollParents(popper)
@@ -16144,7 +17045,7 @@ function popperGenerator(generatorOptions) {
16144
17045
  // To ensure persistent data, use `${name}#persistent`
16145
17046
 
16146
17047
  state.orderedModifiers.forEach(function (modifier) {
16147
- return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
17048
+ return state.modifiersData[modifier.name] = _extends({}, modifier.data);
16148
17049
  });
16149
17050
  var __debug_loops__ = 0;
16150
17051
 
@@ -16307,7 +17208,6 @@ var popperOffsets$1 = {
16307
17208
  fn: popperOffsets,
16308
17209
  data: {}
16309
17210
  };
16310
-
16311
17211
  var unsetSides = {
16312
17212
  top: 'auto',
16313
17213
  right: 'auto',
@@ -16384,17 +17284,17 @@ function mapToStyles(_ref2) {
16384
17284
  }
16385
17285
  }
16386
17286
 
16387
- var commonStyles = Object.assign({
17287
+ var commonStyles = _extends({
16388
17288
  position: position
16389
17289
  }, adaptive && unsetSides);
16390
17290
 
16391
17291
  if (gpuAcceleration) {
16392
17292
  var _Object$assign;
16393
17293
 
16394
- return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
17294
+ return _extends({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
16395
17295
  }
16396
17296
 
16397
- return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
17297
+ return _extends({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
16398
17298
  }
16399
17299
 
16400
17300
  function computeStyles(_ref4) {
@@ -16417,7 +17317,7 @@ function computeStyles(_ref4) {
16417
17317
  };
16418
17318
 
16419
17319
  if (state.modifiersData.popperOffsets != null) {
16420
- state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
17320
+ state.styles.popper = _extends({}, state.styles.popper, mapToStyles(_extends({}, commonStyles, {
16421
17321
  offsets: state.modifiersData.popperOffsets,
16422
17322
  position: state.options.strategy,
16423
17323
  adaptive: adaptive,
@@ -16426,7 +17326,7 @@ function computeStyles(_ref4) {
16426
17326
  }
16427
17327
 
16428
17328
  if (state.modifiersData.arrow != null) {
16429
- state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
17329
+ state.styles.arrow = _extends({}, state.styles.arrow, mapToStyles(_extends({}, commonStyles, {
16430
17330
  offsets: state.modifiersData.arrow,
16431
17331
  position: 'absolute',
16432
17332
  adaptive: false,
@@ -16434,7 +17334,7 @@ function computeStyles(_ref4) {
16434
17334
  })));
16435
17335
  }
16436
17336
 
16437
- state.attributes.popper = Object.assign({}, state.attributes.popper, {
17337
+ state.attributes.popper = _extends({}, state.attributes.popper, {
16438
17338
  'data-popper-placement': state.placement
16439
17339
  });
16440
17340
  } // eslint-disable-next-line import/no-unused-modules
@@ -16446,9 +17346,7 @@ var computeStyles$1 = {
16446
17346
  phase: 'beforeWrite',
16447
17347
  fn: computeStyles,
16448
17348
  data: {}
16449
- };
16450
-
16451
- // and applies them to the HTMLElements such as popper and arrow
17349
+ }; // and applies them to the HTMLElements such as popper and arrow
16452
17350
 
16453
17351
  function applyStyles(_ref) {
16454
17352
  var state = _ref.state;
@@ -16464,7 +17362,8 @@ function applyStyles(_ref) {
16464
17362
  // $FlowFixMe[cannot-write]
16465
17363
 
16466
17364
 
16467
- Object.assign(element.style, style);
17365
+ _extends(element.style, style);
17366
+
16468
17367
  Object.keys(attributes).forEach(function (name) {
16469
17368
  var value = attributes[name];
16470
17369
 
@@ -16491,11 +17390,13 @@ function effect$1(_ref2) {
16491
17390
  },
16492
17391
  reference: {}
16493
17392
  };
16494
- Object.assign(state.elements.popper.style, initialStyles.popper);
17393
+
17394
+ _extends(state.elements.popper.style, initialStyles.popper);
17395
+
16495
17396
  state.styles = initialStyles;
16496
17397
 
16497
17398
  if (state.elements.arrow) {
16498
- Object.assign(state.elements.arrow.style, initialStyles.arrow);
17399
+ _extends(state.elements.arrow.style, initialStyles.arrow);
16499
17400
  }
16500
17401
 
16501
17402
  return function () {
@@ -16513,7 +17414,8 @@ function effect$1(_ref2) {
16513
17414
  return;
16514
17415
  }
16515
17416
 
16516
- Object.assign(element.style, style);
17417
+ _extends(element.style, style);
17418
+
16517
17419
  Object.keys(attributes).forEach(function (attribute) {
16518
17420
  element.removeAttribute(attribute);
16519
17421
  });
@@ -16530,17 +17432,16 @@ var applyStyles$1 = {
16530
17432
  effect: effect$1,
16531
17433
  requires: ['computeStyles']
16532
17434
  };
16533
-
16534
- var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];
17435
+ var esm_defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];
16535
17436
  var esm_createPopper = /*#__PURE__*/popperGenerator({
16536
- defaultModifiers: defaultModifiers
17437
+ defaultModifiers: esm_defaultModifiers
16537
17438
  }); // eslint-disable-next-line import/no-unused-modules
16538
17439
 
16539
17440
  function distanceAndSkiddingToXY(placement, rects, offset) {
16540
17441
  var basePlacement = getBasePlacement(placement);
16541
17442
  var invertDistance = [esm_left, esm_top].indexOf(basePlacement) >= 0 ? -1 : 1;
16542
17443
 
16543
- var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
17444
+ var _ref = typeof offset === 'function' ? offset(_extends({}, rects, {
16544
17445
  placement: placement
16545
17446
  })) : offset,
16546
17447
  skidding = _ref[0],
@@ -16588,8 +17489,6 @@ var offset$1 = {
16588
17489
  fn: esm_offset
16589
17490
  };
16590
17491
 
16591
-
16592
-
16593
17492
  // CONCATENATED MODULE: ./es/popover/index.js
16594
17493
 
16595
17494
 
@@ -18797,7 +19696,7 @@ function stepper_equal(value1, value2) {
18797
19696
  },
18798
19697
  onMousedown: function onMousedown(event) {
18799
19698
  // fix mobile safari page scroll down issue
18800
- // see: https://github.com/youzan/vant/issues/7690
19699
+ // see: https://github.com/vant-ui/vant/issues/7690
18801
19700
  if (this.disableInput) {
18802
19701
  event.preventDefault();
18803
19702
  }
@@ -21273,15 +22172,27 @@ var step_createNamespace = Object(create["a" /* createNamespace */])('step'),
21273
22172
  return this.status === 'process';
21274
22173
  },
21275
22174
  lineStyle: function lineStyle() {
21276
- if (this.status === 'finish') {
22175
+ var _this$parent = this.parent,
22176
+ activeColor = _this$parent.activeColor,
22177
+ inactiveColor = _this$parent.inactiveColor,
22178
+ center = _this$parent.center,
22179
+ direction = _this$parent.direction;
22180
+ var style = {
22181
+ background: this.status === 'finish' ? activeColor : inactiveColor
22182
+ };
22183
+
22184
+ if (center && direction === 'vertical') {
22185
+ style.top = '50%';
22186
+ }
22187
+
22188
+ return style;
22189
+ },
22190
+ circleContainerStyle: function circleContainerStyle() {
22191
+ if (this.parent.center && this.parent.direction === 'vertical') {
21277
22192
  return {
21278
- background: this.parent.activeColor
22193
+ top: '50%'
21279
22194
  };
21280
22195
  }
21281
-
21282
- return {
21283
- background: this.parent.inactiveColor
21284
- };
21285
22196
  },
21286
22197
  titleStyle: function titleStyle() {
21287
22198
  if (this.active) {
@@ -21300,12 +22211,12 @@ var step_createNamespace = Object(create["a" /* createNamespace */])('step'),
21300
22211
  methods: {
21301
22212
  genCircle: function genCircle() {
21302
22213
  var h = this.$createElement;
21303
- var _this$parent = this.parent,
21304
- activeIcon = _this$parent.activeIcon,
21305
- iconPrefix = _this$parent.iconPrefix,
21306
- activeColor = _this$parent.activeColor,
21307
- finishIcon = _this$parent.finishIcon,
21308
- inactiveIcon = _this$parent.inactiveIcon;
22214
+ var _this$parent2 = this.parent,
22215
+ activeIcon = _this$parent2.activeIcon,
22216
+ iconPrefix = _this$parent2.iconPrefix,
22217
+ activeColor = _this$parent2.activeColor,
22218
+ finishIcon = _this$parent2.finishIcon,
22219
+ inactiveIcon = _this$parent2.inactiveIcon;
21309
22220
 
21310
22221
  if (this.active) {
21311
22222
  return this.slots('active-icon') || h(es_icon, {
@@ -21373,7 +22284,8 @@ var step_createNamespace = Object(create["a" /* createNamespace */])('step'),
21373
22284
  "class": step_bem('circle-container'),
21374
22285
  "on": {
21375
22286
  "click": this.onClickStep
21376
- }
22287
+ },
22288
+ "style": this.circleContainerStyle
21377
22289
  }, [this.genCircle()]), h("div", {
21378
22290
  "class": step_bem('line'),
21379
22291
  "style": this.lineStyle
@@ -21391,6 +22303,7 @@ var steps_createNamespace = Object(create["a" /* createNamespace */])('steps'),
21391
22303
  /* harmony default export */ var steps = (steps_createComponent({
21392
22304
  mixins: [ParentMixin('vanSteps')],
21393
22305
  props: {
22306
+ center: Boolean,
21394
22307
  iconPrefix: String,
21395
22308
  finishIcon: String,
21396
22309
  activeColor: String,
@@ -21853,7 +22766,7 @@ var tabbar_createNamespace = Object(create["a" /* createNamespace */])('tabbar')
21853
22766
  _this.height = _this.$refs.tabbar.getBoundingClientRect().height;
21854
22767
  };
21855
22768
 
21856
- setHeight(); // https://github.com/youzan/vant/issues/10131
22769
+ setHeight(); // https://github.com/vant-ui/vant/issues/10131
21857
22770
 
21858
22771
  setTimeout(setHeight, 100);
21859
22772
  }
@@ -22261,7 +23174,7 @@ TreeSelect.props = {
22261
23174
 
22262
23175
 
22263
23176
 
22264
- var version = '2.12.46';
23177
+ var version = '2.12.49';
22265
23178
 
22266
23179
  function install(Vue) {
22267
23180
  var components = [action_sheet, address_edit, address_list, es_area, badge, es_button, calendar, card, cascader, cell, cell_group, es_checkbox, checkbox_group, circle, col, collapse, collapse_item, contact_card, contact_edit, contact_list, count_down, es_coupon, coupon_cell, coupon_list, datetime_picker, dialog, divider, dropdown_item, dropdown_menu, empty, es_field, es_form, goods_action, goods_action_button, goods_action_icon, grid, grid_item, es_icon, es_image, image_preview, index_anchor, index_bar, es_info, es_list, es_loading, locale["a" /* default */], nav_bar, notice_bar, notify, number_keyboard, es_overlay, pagination, panel, password_input, es_picker, popover, popup, es_progress, pull_refresh, es_radio, radio_group, es_rate, row, search, share_sheet, sidebar, sidebar_item, skeleton, es_sku, slider, es_step, stepper, steps, es_sticky, submit_bar, swipe, swipe_cell, swipe_item, es_switch, switch_cell, tab, tabbar, tabbar_item, tabs, es_tag, es_toast, tree_select, uploader];