!function(){function t(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var a,i,r,u,o=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(o.push(a.value),o.length!==e);l=!0);}catch(v){c=!0,i=v}finally{try{if(!l&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(c)throw i}}return o}}(t,n)||function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return e(t,n)}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:0,a=e*H.value;t.loop||(a=Math.min(a,-K.value));var i=n-a;return t.loop||(i=j(i,K.value,0)),i},J=function(e){var n=e.pace,a=void 0===n?0:n,r=e.offset,u=void 0===r?0:r,o=e.emitChange;if(!(G.value<=1)){var l=z.active,c=function(e){var n=z.active;return e?t.loop?j(n+e,-1,G.value):j(n+e,0,U.value):n}(a),v=F(c,u);if(t.loop){if(P[0]&&v!==K.value){var f=v0;P[G.value-1].setOffset(s?-V.value:0)}}z.active=c,z.offset=v,o&&c!==l&&i("change",W.value)}},L=function(){z.swiping=!0,z.active<=-1?J({pace:G.value}):z.active>=G.value&&J({pace:-G.value})},N=function(){L(),E.reset(),O((function(){z.swiping=!1,J({pace:1,emitChange:!0})}))},Q=function(){return clearTimeout(n)},Z=function e(){Q(),+t.autoplay>0&&G.value>1&&(n=setTimeout((function(){N(),e()}),+t.autoplay))},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:+t.initialSwipe;if(u.value){var n=function(){var n,a;if(!I(u)){var i={width:u.value.offsetWidth,height:u.value.offsetHeight};z.rect=i,z.width=+(null!=(n=t.width)?n:i.width),z.height=+(null!=(a=t.height)?a:i.height)}G.value&&-1===(e=Math.min(G.value-1,e))&&(e=G.value-1),z.active=e,z.swiping=!0,z.offset=F(e),P.forEach((function(t){t.setOffset(0)})),Z()};I(u)?M().then(n):n()}},tt=function(){return _(z.active)},et=function(e){!t.touchable||e.touches.length>1||(E.start(e),D=!1,a=Date.now(),Q(),L())},nt=function(){if(t.touchable&&z.swiping){var e=Date.now()-a,n=R.value/e;if((Math.abs(n)>.25||Math.abs(R.value)>H.value/2)&&$.value){var r=t.vertical?E.offsetY.value:E.offsetX.value,u=0;u=t.loop?r>0?R.value>0?-1:1:0:-Math[R.value>0?"ceil":"floor"](R.value/H.value),J({pace:u,emitChange:!0})}else R.value&&J({pace:0});D=!1,z.swiping=!1,i("dragEnd",{index:W.value}),Z()}},at=function(e,n){var a=n===W.value,i=a?{backgroundColor:t.indicatorColor}:void 0;return A("i",{style:i,class:X("indicator",{active:a})},null)};return h({prev:function(){L(),E.reset(),O((function(){z.swiping=!1,J({pace:-1,emitChange:!0})}))},next:N,state:z,resize:tt,swipeTo:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};L(),E.reset(),O((function(){var a;a=t.loop&&e===G.value?0===z.active?0:e:e%G.value,n.immediate?O((function(){z.swiping=!1})):z.swiping=!1,J({pace:a-z.active,emitChange:!0})}))}}),B({size:H,props:t,count:G,activeIndicator:W}),d((function(){return t.initialSwipe}),(function(t){return _(+t)})),d(G,(function(){return _(z.active)})),d((function(){return t.autoplay}),Z),d([p,g,function(){return t.width},function(){return t.height}],tt),d(m(),(function(t){"visible"===t?Z():Q()})),w(_),y((function(){return _(z.active)})),b((function(){return _(z.active)})),S(Q),x(Q),C("touchmove",(function(e){t.touchable&&z.swiping&&(E.move(e),$.value&&(!t.loop&&(0===z.active&&R.value>0||z.active===G.value-1&&R.value<0)||(T(e,t.stopPropagation),J({offset:R.value}),D||(i("dragStart",{index:W.value}),D=!0))))}),{target:o}),function(){var e;return A("div",{ref:u,class:X()},[A("div",{ref:o,style:q.value,class:X("track",{vertical:t.vertical}),onTouchstartPassive:et,onTouchend:nt,onTouchcancel:nt},[null==(e=r.default)?void 0:e.call(r)]),r.indicator?r.indicator({active:W.value,total:G.value}):t.showIndicators&&G.value>1?A("div",{class:X("indicators",{vertical:t.vertical})},[Array(G.value).fill("").map(at)]):void 0])}}}),B=(e("S",z(P)),t(a("swipe-item"),2)),G=B[0],H=B[1],R=o({name:G,setup:function(t,e){var n,a=e.slots,i=c({offset:0,inited:!1,mounted:!1}),r=D(k),u=r.parent,o=r.index;if(u){var l=s((function(){var t={},e=u.props.vertical;return u.size.value&&(t[e?"height":"width"]="".concat(u.size.value,"px")),i.offset&&(t.transform="translate".concat(e?"Y":"X","(").concat(i.offset,"px)")),t})),v=s((function(){var t=u.props,e=t.loop;if(!t.lazyRender||n)return!0;if(!i.mounted)return!1;var a=u.activeIndicator.value,r=u.count.value-1,l=0===a&&e?r:a-1,c=a===r&&e?0:a+1;return n=o.value===a||o.value===l||o.value===c}));return w((function(){M((function(){i.mounted=!0}))})),h({setOffset:function(t){i.offset=t}}),function(){var t;return A("div",{class:H(),style:l.value},[v.value?null==(t=a.default)?void 0:t.call(a):null])}}console.error("[Vant] must be a child component of .")}});e("a",z(R))}}}))}();