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