(function(c,b,e){var d={touchstart:"_onStart",touchmove:"_onMove",touchend:"_onEnd",touchcancel:"_onEnd",click:"_onClick"},h,g,f,a;b.extend(c.Slider.options,{stopPropagation:false,disableScroll:false});c.Slider.register("touch",{_init:function(){var j=this,i=j.getEl();j._handler=function(k){j._options.stopPropagation&&k.stopPropagation();return d[k.type]&&j[d[k.type]].call(j,k)};j.on("ready",function(){i.on("touchstart"+j.eventNs,j._handler);j._container.on("click"+j.eventNs,j._handler)})},_onClick:function(){return !a},_onStart:function(m){if(m.touches.length>1){return false}var l=this,n=m.touches[0],k=l._options,i=l.eventNs,j;g={x:n.pageX,y:n.pageY,time:+new Date()};f={};a=false;h=e;j=k.viewNum||1;l._move(k.loop?l._circle(l.index-j):l.index-j,-l.width,0,true);l._move(k.loop?l._circle(l.index+j):l.index+j,l.width,0,true);l.$el.on("touchmove"+i+" touchend"+i+" touchcancel"+i,l._handler)},_onMove:function(o){if(o.touches.length>1||o.scale&&o.scale!==1){return false}var j=this._options,r=j.viewNum||1,k=o.touches[0],m=this.index,l,n,p,q;j.disableScroll&&o.preventDefault();f.x=k.pageX-g.x;f.y=k.pageY-g.y;if(typeof h==="undefined"){h=Math.abs(f.x)<Math.abs(f.y)}if(!h){o.preventDefault();if(!j.loop){f.x/=(!m&&f.x>0||m===this._items.length-1&&f.x<0)?(Math.abs(f.x)/this.width+1):1}q=this._slidePos;for(l=m-r,n=m+2*r;l<n;l++){p=j.loop?this._circle(l):l;this._translate(p,f.x+q[p],0)}a=true}},_onEnd:function(){this.$el.off("touchmove"+this.eventNs+" touchend"+this.eventNs+" touchcancel"+this.eventNs,this._handler);if(!a){return}var s=this,j=s._options,w=j.viewNum||1,r=s.index,v=s._slidePos,o=+new Date()-g.time,n=Math.abs(f.x),k=!j.loop&&(!r&&f.x>0||r===v.length-w&&f.x<0),m=f.x>0?1:-1,l,u,p,q,t;if(o<250){l=n/o;u=Math.min(Math.round(l*w*1.2),w)}else{u=Math.round(n/(s.perWidth||s.width))}if(u&&!k){s._slide(r,u,m,s.width,j.speed,j,true);if(w>1&&o>=250&&Math.ceil(n/s.perWidth)!==u){s.index<r?s._move(s.index-1,-s.perWidth,j.speed):s._move(s.index+w,s.width,j.speed)}}else{for(p=r-w,q=r+2*w;p<q;p++){t=j.loop?s._circle(p):p;s._translate(t,v[t],j.speed)}}}})})(gmu,gmu.$);