diff --git a/vendors/scrolloverflow.js b/vendors/scrolloverflow.js index 7c6c78fd7..7321ca1a2 100644 --- a/vendors/scrolloverflow.js +++ b/vendors/scrolloverflow.js @@ -636,8 +636,17 @@ IScroll.prototype = { // start momentum animation if needed if ( this.options.momentum && duration < 300 ) { - momentumX = this.hasHorizontalScroll ? utils.momentum(this.x, this.startX, duration, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : { destination: newX, duration: 0 }; - momentumY = this.hasVerticalScroll ? utils.momentum(this.y, this.startY, duration, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : { destination: newY, duration: 0 }; + + // only the first step in section is deceleration; + var deceleration = this.options.deceleration; + if (this.options.firstStepDeceleration) { + if (this.absStartY !== 0 || this.absStartX !== 0) { + deceleration = null; + } + } + + momentumX = this.hasHorizontalScroll ? utils.momentum(this.x, this.startX, duration, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, deceleration) : { destination: newX, duration: 0 }; + momentumY = this.hasVerticalScroll ? utils.momentum(this.y, this.startY, duration, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, deceleration) : { destination: newY, duration: 0 }; newX = momentumX.destination; newY = momentumY.destination; time = Math.max(momentumX.duration, momentumY.duration); diff --git a/vendors/scrolloverflow.min.js b/vendors/scrolloverflow.min.js index ca3c2d66f..5d428943f 100644 --- a/vendors/scrolloverflow.min.js +++ b/vendors/scrolloverflow.min.js @@ -3,7 +3,7 @@ * It fixes bugs affecting its integration with fullpage.js * @license */ -!function(t,i,s){var e=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(i){t.setTimeout(i,1e3/60)},o=function(){var e={},o=i.createElement("div").style,n=function(){for(var t=["t","webkitT","MozT","msT","OT"],i=0,s=t.length;i0&&(h=n?n/2.5*(c/8):0,a=(l=s.abs(t)+h)/c),{destination:s.round(h),duration:a}};var h=r("transform");return e.extend(e,{hasTransform:!1!==h,hasPerspective:r("perspective")in o,hasTouch:"ontouchstart"in t,hasPointer:!(!t.PointerEvent&&!t.MSPointerEvent),hasTransition:r("transition")in o}),e.isBadAndroid=function(){var i=t.navigator.appVersion;if(/Android/.test(i)&&!/Chrome\/\d/.test(i)){var s=i.match(/Safari\/(\d+.\d)/);return!(s&&"object"==typeof s&&s.length>=2)||parseFloat(s[1])<535.19}return!1}(),e.extend(e.style={},{transform:h,transitionTimingFunction:r("transitionTimingFunction"),transitionDuration:r("transitionDuration"),transitionDelay:r("transitionDelay"),transformOrigin:r("transformOrigin")}),e.hasClass=function(t,i){return new RegExp("(^|\\s)"+i+"(\\s|$)").test(t.className)},e.addClass=function(t,i){if(!e.hasClass(t,i)){var s=t.className.split(" ");s.push(i),t.className=s.join(" ")}},e.removeClass=function(t,i){if(e.hasClass(t,i)){var s=new RegExp("(^|\\s)"+i+"(\\s|$)","g");t.className=t.className.replace(s," ")}},e.offset=function(t){for(var i=-t.offsetLeft,s=-t.offsetTop;t=t.offsetParent;)i-=t.offsetLeft,s-=t.offsetTop;return{left:i,top:s}},e.preventDefaultException=function(t,i){for(var s in i)if(i[s].test(t[s]))return!0;return!1},e.extend(e.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),e.extend(e.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(t){return s.sqrt(1- --t*t)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(t){return(t-=1)*t*(5*t+4)+1}},bounce:{style:"",fn:function(t){return(t/=1)<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},elastic:{style:"",fn:function(t){return 0===t?0:1==t?1:.4*s.pow(2,-10*t)*s.sin((t-.055)*(2*s.PI)/.22)+1}}}),e.tap=function(t,s){var e=i.createEvent("Event");e.initEvent(s,!0,!0),e.pageX=t.pageX,e.pageY=t.pageY,t.target.dispatchEvent(e)},e.click=function(s){var e,o=s.target;/(SELECT|INPUT|TEXTAREA)/i.test(o.tagName)||((e=i.createEvent(t.MouseEvent?"MouseEvents":"Event")).initEvent("click",!0,!0),e.view=s.view||t,e.detail=1,e.screenX=o.screenX||0,e.screenY=o.screenY||0,e.clientX=o.clientX||0,e.clientY=o.clientY||0,e.ctrlKey=!!s.ctrlKey,e.altKey=!!s.altKey,e.shiftKey=!!s.shiftKey,e.metaKey=!!s.metaKey,e.button=0,e.relatedTarget=null,e._constructed=!0,o.dispatchEvent(e))},e}();function n(s,e){for(var n in this.wrapper="string"==typeof s?i.querySelector(s):s,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!o.hasPointer,disableTouch:o.hasPointer||!o.hasTouch,disableMouse:o.hasPointer||o.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|LABEL)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:void 0===t.onmousedown},e)this.options[n]=e[n];this.translateZ=this.options.HWCompositing&&o.hasPerspective?" translateZ(0)":"",this.options.useTransition=o.hasTransition&&this.options.useTransition,this.options.useTransform=o.hasTransform&&this.options.useTransform,this.options.eventPassthrough=!0===this.options.eventPassthrough?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"!=this.options.eventPassthrough&&this.options.scrollY,this.options.scrollX="horizontal"!=this.options.eventPassthrough&&this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?o.ease[this.options.bounceEasing]||o.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,!0===this.options.tap&&(this.options.tap="tap"),this.options.useTransition||this.options.useTransform||/relative|absolute/i.test(this.scrollerStyle.position)||(this.scrollerStyle.position="relative"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function r(t,s,e){var o=i.createElement("div"),n=i.createElement("div");return!0===e&&(o.style.cssText="position:absolute;z-index:9999",n.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),n.className="iScrollIndicator","h"==t?(!0===e&&(o.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",n.style.height="100%"),o.className="iScrollHorizontalScrollbar"):(!0===e&&(o.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",n.style.width="100%"),o.className="iScrollVerticalScrollbar"),o.style.cssText+=";overflow:hidden",s||(o.style.pointerEvents="none"),o.appendChild(n),o}function h(s,n){for(var r in this.wrapper="string"==typeof n.el?i.querySelector(n.el):n.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=s,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0},n)this.options[r]=n[r];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(o.addEvent(this.indicator,"touchstart",this),o.addEvent(t,"touchend",this)),this.options.disablePointer||(o.addEvent(this.indicator,o.prefixPointerEvent("pointerdown"),this),o.addEvent(t,o.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(o.addEvent(this.indicator,"mousedown",this),o.addEvent(t,"mouseup",this))),this.options.fade){this.wrapperStyle[o.style.transform]=this.scroller.translateZ;var h=o.style.transitionDuration;if(!h)return;this.wrapperStyle[h]=o.isBadAndroid?"0.0001ms":"0ms";var a=this;o.isBadAndroid&&e(function(){"0.0001ms"===a.wrapperStyle[h]&&(a.wrapperStyle[h]="0s")}),this.wrapperStyle.opacity="0"}}n.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(t){t.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(t){if(1!=o.eventType[t.type]&&0!==(t.which?t.button:t.button<2?0:4==t.button?1:2))return;if(this.enabled&&(!this.initiated||o.eventType[t.type]===this.initiated)){!this.options.preventDefault||o.isBadAndroid||o.preventDefaultException(t.target,this.options.preventDefaultException)||t.preventDefault();var i,e=t.touches?t.touches[0]:t;this.initiated=o.eventType[t.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=o.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,i=this.getComputedPosition(),this._translate(s.round(i.x),s.round(i.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=e.pageX,this.pointY=e.pageY,this._execEvent("beforeScrollStart")}},_move:function(t){if(this.enabled&&o.eventType[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault();var i,e,n,r,h=t.touches?t.touches[0]:t,a=h.pageX-this.pointX,l=h.pageY-this.pointY,c=o.getTime();if(this.pointX=h.pageX,this.pointY=h.pageY,this.distX+=a,this.distY+=l,n=s.abs(this.distX),r=s.abs(this.distY),!(c-this.endTime>300&&n<10&&r<10)){if(this.directionLocked||this.options.freeScroll||(n>r+this.options.directionLockThreshold?this.directionLocked="h":r>=n+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)t.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);l=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)t.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);a=0}a=this.hasHorizontalScroll?a:0,l=this.hasVerticalScroll?l:0,i=this.x+a,e=this.y+l,(i>0||i0?0:this.maxScrollX),(e>0||e0?0:this.maxScrollY),this.directionX=a>0?-1:a<0?1:0,this.directionY=l>0?-1:l<0?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(i,e),c-this.startTime>300&&(this.startTime=c,this.startX=this.x,this.startY=this.y)}}},_end:function(t){if(this.enabled&&o.eventType[t.type]===this.initiated){this.options.preventDefault&&!o.preventDefaultException(t.target,this.options.preventDefaultException)&&t.preventDefault();t.changedTouches&&t.changedTouches[0];var i,e,n=o.getTime()-this.startTime,r=s.round(this.x),h=s.round(this.y),a=s.abs(r-this.startX),l=s.abs(h-this.startY),c=0,p="";if(this.isInTransition=0,this.initiated=0,this.endTime=o.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(r,h),!this.moved)return this.options.tap&&o.tap(t,this.options.tap),this.options.click&&o.click(t),void this._execEvent("scrollCancel");if(this._events.flick&&n<200&&a<100&&l<100)this._execEvent("flick");else{if(this.options.momentum&&n<300&&(i=this.hasHorizontalScroll?o.momentum(this.x,this.startX,n,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:r,duration:0},e=this.hasVerticalScroll?o.momentum(this.y,this.startY,n,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:h,duration:0},r=i.destination,h=e.destination,c=s.max(i.duration,e.duration),this.isInTransition=1),this.options.snap){var d=this._nearestSnap(r,h);this.currentPage=d,c=this.options.snapSpeed||s.max(s.max(s.min(s.abs(r-d.x),1e3),s.min(s.abs(h-d.y),1e3)),300),r=d.x,h=d.y,this.directionX=0,this.directionY=0,p=this.options.bounceEasing}if(r!=this.x||h!=this.y)return(r>0||r0||h0?i=0:this.x0?s=0:this.y-1&&this._events[t].splice(s,1)}},_execEvent:function(t){if(this._events[t]){var i=0,s=this._events[t].length;if(s)for(;i0;var n=this.options.useTransition&&e.style;!s||n?(n&&(this._transitionTimingFunction(e.style),this._transitionTime(s)),this._translate(t,i)):this._animate(t,i,s,e.fn)},scrollToElement:function(t,i,e,n,r){if(t=t.nodeType?t:this.scroller.querySelector(t)){var h=o.offset(t);h.left-=this.wrapperOffset.left,h.top-=this.wrapperOffset.top,!0===e&&(e=s.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===n&&(n=s.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),h.left-=e||0,h.top-=n||0,h.left=h.left>0?0:h.left0?0:h.top0?o--:i<0&&o++,e>0?n--:e<0&&n++,void this.goToPage(o,n);o=this.x+s.round(this.hasHorizontalScroll?i:0),n=this.y+s.round(this.hasVerticalScroll?e:0),this.directionX=i>0?-1:i<0?1:0,this.directionY=e>0?-1:e<0?1:0,o>0?o=0:o0?n=0:n-this.scrollerWidth;){for(this.pages[h]=[],t=0,n=0;n>-this.scrollerHeight;)this.pages[h][t]={x:s.max(l,this.maxScrollX),y:s.max(n,this.maxScrollY),width:c,height:p,cx:l-e,cy:n-o},n-=p,t++;l-=c,h++}else for(t=(r=this.options.snap).length,i=-1;hthis.maxScrollX&&a++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1==0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=s.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=s.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}}),this.on("flick",function(){var t=this.options.snapSpeed||s.max(s.max(s.min(s.abs(this.x-this.startX),1e3),s.min(s.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,t)})},_nearestSnap:function(t,i){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var e=0,o=this.pages.length,n=0;if(s.abs(t-this.absStartX)0?t=0:t0?i=0:i=this.pages[e][0].cx){t=this.pages[e][0].x;break}for(o=this.pages[e].length;n=this.pages[0][n].cy){i=this.pages[0][n].y;break}return e==this.currentPage.pageX&&((e+=this.directionX)<0?e=0:e>=this.pages.length&&(e=this.pages.length-1),t=this.pages[e][0].x),n==this.currentPage.pageY&&((n+=this.directionY)<0?n=0:n>=this.pages[0].length&&(n=this.pages[0].length-1),i=this.pages[0][n].y),{x:t,y:i,pageX:e,pageY:n}},goToPage:function(t,i,e,o){o=o||this.options.bounceEasing,t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),i>=this.pages[t].length?i=this.pages[t].length-1:i<0&&(i=0);var n=this.pages[t][i].x,r=this.pages[t][i].y;e=void 0===e?this.options.snapSpeed||s.max(s.max(s.min(s.abs(n-this.x),1e3),s.min(s.abs(r-this.y),1e3)),300):e,this.currentPage={x:n,y:r,pageX:t,pageY:i},this.scrollTo(n,r,e,o)},next:function(t,i){var s=this.currentPage.pageX,e=this.currentPage.pageY;++s>=this.pages.length&&this.hasVerticalScroll&&(s=0,e++),this.goToPage(s,e,t,i)},prev:function(t,i){var s=this.currentPage.pageX,e=this.currentPage.pageY;--s<0&&this.hasVerticalScroll&&(s=0,e--),this.goToPage(s,e,t,i)},_initKeys:function(i){var s,e={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(s in this.options.keyBindings)"string"==typeof this.options.keyBindings[s]&&(this.options.keyBindings[s]=this.options.keyBindings[s].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(s in e)this.options.keyBindings[s]=this.options.keyBindings[s]||e[s];o.addEvent(t,"keydown",this),this.on("destroy",function(){o.removeEvent(t,"keydown",this)})},_key:function(t){if(this.enabled){var i,e=this.options.snap,n=e?this.currentPage.pageX:this.x,r=e?this.currentPage.pageY:this.y,h=o.getTime(),a=this.keyTime||0;switch(this.options.useTransition&&this.isInTransition&&(i=this.getComputedPosition(),this._translate(s.round(i.x),s.round(i.y)),this.isInTransition=!1),this.keyAcceleration=h-a<200?s.min(this.keyAcceleration+.25,50):0,t.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?n+=e?1:this.wrapperWidth:r+=e?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?n-=e?1:this.wrapperWidth:r-=e?1:this.wrapperHeight;break;case this.options.keyBindings.end:n=e?this.pages.length-1:this.maxScrollX,r=e?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:n=0,r=0;break;case this.options.keyBindings.left:n+=e?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:r+=e?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:n-=e?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:r-=e?1:5+this.keyAcceleration>>0;break;default:return}e?this.goToPage(n,r):(n>0?(n=0,this.keyAcceleration=0):n0?(r=0,this.keyAcceleration=0):r=c)return r.isAnimating=!1,r._translate(t,i),void(r.resetPosition(r.options.bounceTime)||r._execEvent("scrollEnd"));f=n(m=(m-l)/s),d=(t-h)*f+h,u=(i-a)*f+a,r._translate(d,u),r.isAnimating&&e(p)}()},handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(t);break;case"keydown":this._key(t);break;case"click":this.enabled&&!t._constructed&&(t.preventDefault(),t.stopPropagation())}}},h.prototype={handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(o.removeEvent(this.indicator,"touchstart",this),o.removeEvent(this.indicator,o.prefixPointerEvent("pointerdown"),this),o.removeEvent(this.indicator,"mousedown",this),o.removeEvent(t,"touchmove",this),o.removeEvent(t,o.prefixPointerEvent("pointermove"),this),o.removeEvent(t,"mousemove",this),o.removeEvent(t,"touchend",this),o.removeEvent(t,o.prefixPointerEvent("pointerup"),this),o.removeEvent(t,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(i){var s=i.touches?i.touches[0]:i;i.preventDefault(),i.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=s.pageX,this.lastPointY=s.pageY,this.startTime=o.getTime(),this.options.disableTouch||o.addEvent(t,"touchmove",this),this.options.disablePointer||o.addEvent(t,o.prefixPointerEvent("pointermove"),this),this.options.disableMouse||o.addEvent(t,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(t){var i,s,e,n,r=t.touches?t.touches[0]:t;o.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,i=r.pageX-this.lastPointX,this.lastPointX=r.pageX,s=r.pageY-this.lastPointY,this.lastPointY=r.pageY,e=this.x+i,n=this.y+s,this._pos(e,n),t.preventDefault(),t.stopPropagation()},_end:function(i){if(this.initiated){if(this.initiated=!1,i.preventDefault(),i.stopPropagation(),o.removeEvent(t,"touchmove",this),o.removeEvent(t,o.prefixPointerEvent("pointermove"),this),o.removeEvent(t,"mousemove",this),this.scroller.options.snap){var e=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),n=this.options.snapSpeed||s.max(s.max(s.min(s.abs(this.scroller.x-e.x),1e3),s.min(s.abs(this.scroller.y-e.y),1e3)),300);this.scroller.x==e.x&&this.scroller.y==e.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=e,this.scroller.scrollTo(e.x,e.y,n,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(t){t=t||0;var i=o.style.transitionDuration;if(i&&(this.indicatorStyle[i]=t+"ms",!t&&o.isBadAndroid)){this.indicatorStyle[i]="0.0001ms";var s=this;e(function(){"0.0001ms"===s.indicatorStyle[i]&&(s.indicatorStyle[i]="0s")})}},transitionTimingFunction:function(t){this.indicatorStyle[o.style.transitionTimingFunction]=t},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(o.addClass(this.wrapper,"iScrollBothScrollbars"),o.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(o.removeClass(this.wrapper,"iScrollBothScrollbars"),o.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=s.max(s.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=8-this.indicatorWidth,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=s.max(s.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=8-this.indicatorHeight,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var t=this.options.listenX&&s.round(this.sizeRatioX*this.scroller.x)||0,i=this.options.listenY&&s.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(tthis.maxBoundaryX?"scale"==this.options.shrink?(this.width=s.max(this.indicatorWidth-(t-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",t=this.maxPosX+this.indicatorWidth-this.width):t=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),ithis.maxBoundaryY?"scale"==this.options.shrink?(this.height=s.max(this.indicatorHeight-3*(i-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",i=this.maxPosY+this.indicatorHeight-this.height):i=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=t,this.y=i,this.scroller.options.useTransform?this.indicatorStyle[o.style.transform]="translate("+t+"px,"+i+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=t+"px",this.indicatorStyle.top=i+"px")},_pos:function(t,i){t<0?t=0:t>this.maxPosX&&(t=this.maxPosX),i<0?i=0:i>this.maxPosY&&(i=this.maxPosY),t=this.options.listenX?s.round(t/this.sizeRatioX):this.scroller.x,i=this.options.listenY?s.round(i/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(t,i)},fade:function(t,i){if(!i||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var s=t?250:500,e=t?0:300;t=t?"1":"0",this.wrapperStyle[o.style.transitionDuration]=s+"ms",this.fadeTimeout=setTimeout(function(t){this.wrapperStyle.opacity=t,this.visible=+t}.bind(this,t),e)}}},n.utils=o,"undefined"!=typeof module&&module.exports?module.exports=n:"function"==typeof define&&define.amd?define(function(){return n}):t.IScroll=n}(window,document,Math), +!function(t,i,s){var e=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(i){t.setTimeout(i,1e3/60)},o=function(){var e={},o=i.createElement("div").style,n=function(){for(var t=["t","webkitT","MozT","msT","OT"],i=0,s=t.length;i0&&(h=n?n/2.5*(c/8):0,a=(l=s.abs(t)+h)/c),{destination:s.round(h),duration:a}};var h=r("transform");return e.extend(e,{hasTransform:!1!==h,hasPerspective:r("perspective")in o,hasTouch:"ontouchstart"in t,hasPointer:!(!t.PointerEvent&&!t.MSPointerEvent),hasTransition:r("transition")in o}),e.isBadAndroid=function(){var i=t.navigator.appVersion;if(/Android/.test(i)&&!/Chrome\/\d/.test(i)){var s=i.match(/Safari\/(\d+.\d)/);return!(s&&"object"==typeof s&&s.length>=2)||parseFloat(s[1])<535.19}return!1}(),e.extend(e.style={},{transform:h,transitionTimingFunction:r("transitionTimingFunction"),transitionDuration:r("transitionDuration"),transitionDelay:r("transitionDelay"),transformOrigin:r("transformOrigin")}),e.hasClass=function(t,i){return new RegExp("(^|\\s)"+i+"(\\s|$)").test(t.className)},e.addClass=function(t,i){if(!e.hasClass(t,i)){var s=t.className.split(" ");s.push(i),t.className=s.join(" ")}},e.removeClass=function(t,i){if(e.hasClass(t,i)){var s=new RegExp("(^|\\s)"+i+"(\\s|$)","g");t.className=t.className.replace(s," ")}},e.offset=function(t){for(var i=-t.offsetLeft,s=-t.offsetTop;t=t.offsetParent;)i-=t.offsetLeft,s-=t.offsetTop;return{left:i,top:s}},e.preventDefaultException=function(t,i){for(var s in i)if(i[s].test(t[s]))return!0;return!1},e.extend(e.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,pointerdown:3,pointermove:3,pointerup:3,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),e.extend(e.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(t){return s.sqrt(1- --t*t)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(t){return(t-=1)*t*(5*t+4)+1}},bounce:{style:"",fn:function(t){return(t/=1)<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},elastic:{style:"",fn:function(t){return 0===t?0:1==t?1:.4*s.pow(2,-10*t)*s.sin((t-.055)*(2*s.PI)/.22)+1}}}),e.tap=function(t,s){var e=i.createEvent("Event");e.initEvent(s,!0,!0),e.pageX=t.pageX,e.pageY=t.pageY,t.target.dispatchEvent(e)},e.click=function(s){var e,o=s.target;/(SELECT|INPUT|TEXTAREA)/i.test(o.tagName)||((e=i.createEvent(t.MouseEvent?"MouseEvents":"Event")).initEvent("click",!0,!0),e.view=s.view||t,e.detail=1,e.screenX=o.screenX||0,e.screenY=o.screenY||0,e.clientX=o.clientX||0,e.clientY=o.clientY||0,e.ctrlKey=!!s.ctrlKey,e.altKey=!!s.altKey,e.shiftKey=!!s.shiftKey,e.metaKey=!!s.metaKey,e.button=0,e.relatedTarget=null,e._constructed=!0,o.dispatchEvent(e))},e}();function n(s,e){for(var n in this.wrapper="string"==typeof s?i.querySelector(s):s,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,disablePointer:!o.hasPointer,disableTouch:o.hasPointer||!o.hasTouch,disableMouse:o.hasPointer||o.hasTouch,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|LABEL)$/},HWCompositing:!0,useTransition:!0,useTransform:!0,bindToWrapper:void 0===t.onmousedown},e)this.options[n]=e[n];this.translateZ=this.options.HWCompositing&&o.hasPerspective?" translateZ(0)":"",this.options.useTransition=o.hasTransition&&this.options.useTransition,this.options.useTransform=o.hasTransform&&this.options.useTransform,this.options.eventPassthrough=!0===this.options.eventPassthrough?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"!=this.options.eventPassthrough&&this.options.scrollY,this.options.scrollX="horizontal"!=this.options.eventPassthrough&&this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?o.ease[this.options.bounceEasing]||o.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,!0===this.options.tap&&(this.options.tap="tap"),this.options.useTransition||this.options.useTransform||/relative|absolute/i.test(this.scrollerStyle.position)||(this.scrollerStyle.position="relative"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function r(t,s,e){var o=i.createElement("div"),n=i.createElement("div");return!0===e&&(o.style.cssText="position:absolute;z-index:9999",n.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),n.className="iScrollIndicator","h"==t?(!0===e&&(o.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",n.style.height="100%"),o.className="iScrollHorizontalScrollbar"):(!0===e&&(o.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",n.style.width="100%"),o.className="iScrollVerticalScrollbar"),o.style.cssText+=";overflow:hidden",s||(o.style.pointerEvents="none"),o.appendChild(n),o}function h(s,n){for(var r in this.wrapper="string"==typeof n.el?i.querySelector(n.el):n.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=s,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0},n)this.options[r]=n[r];if(this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(o.addEvent(this.indicator,"touchstart",this),o.addEvent(t,"touchend",this)),this.options.disablePointer||(o.addEvent(this.indicator,o.prefixPointerEvent("pointerdown"),this),o.addEvent(t,o.prefixPointerEvent("pointerup"),this)),this.options.disableMouse||(o.addEvent(this.indicator,"mousedown",this),o.addEvent(t,"mouseup",this))),this.options.fade){this.wrapperStyle[o.style.transform]=this.scroller.translateZ;var h=o.style.transitionDuration;if(!h)return;this.wrapperStyle[h]=o.isBadAndroid?"0.0001ms":"0ms";var a=this;o.isBadAndroid&&e(function(){"0.0001ms"===a.wrapperStyle[h]&&(a.wrapperStyle[h]="0s")}),this.wrapperStyle.opacity="0"}}n.prototype={version:"5.2.0",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),clearTimeout(this.resizeTimeout),this.resizeTimeout=null,this._execEvent("destroy")},_transitionEnd:function(t){t.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(t){if(1!=o.eventType[t.type]&&0!==(t.which?t.button:t.button<2?0:4==t.button?1:2))return;if(this.enabled&&(!this.initiated||o.eventType[t.type]===this.initiated)){!this.options.preventDefault||o.isBadAndroid||o.preventDefaultException(t.target,this.options.preventDefaultException)||t.preventDefault();var i,e=t.touches?t.touches[0]:t;this.initiated=o.eventType[t.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this.startTime=o.getTime(),this.options.useTransition&&this.isInTransition?(this._transitionTime(),this.isInTransition=!1,i=this.getComputedPosition(),this._translate(s.round(i.x),s.round(i.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=e.pageX,this.pointY=e.pageY,this._execEvent("beforeScrollStart")}},_move:function(t){if(this.enabled&&o.eventType[t.type]===this.initiated){this.options.preventDefault&&t.preventDefault();var i,e,n,r,h=t.touches?t.touches[0]:t,a=h.pageX-this.pointX,l=h.pageY-this.pointY,c=o.getTime();if(this.pointX=h.pageX,this.pointY=h.pageY,this.distX+=a,this.distY+=l,n=s.abs(this.distX),r=s.abs(this.distY),!(c-this.endTime>300&&n<10&&r<10)){if(this.directionLocked||this.options.freeScroll||(n>r+this.options.directionLockThreshold?this.directionLocked="h":r>=n+this.options.directionLockThreshold?this.directionLocked="v":this.directionLocked="n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)t.preventDefault();else if("horizontal"==this.options.eventPassthrough)return void(this.initiated=!1);l=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)t.preventDefault();else if("vertical"==this.options.eventPassthrough)return void(this.initiated=!1);a=0}a=this.hasHorizontalScroll?a:0,l=this.hasVerticalScroll?l:0,i=this.x+a,e=this.y+l,(i>0||i0?0:this.maxScrollX),(e>0||e0?0:this.maxScrollY),this.directionX=a>0?-1:a<0?1:0,this.directionY=l>0?-1:l<0?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(i,e),c-this.startTime>300&&(this.startTime=c,this.startX=this.x,this.startY=this.y)}}},_end:function(t){if(this.enabled&&o.eventType[t.type]===this.initiated){this.options.preventDefault&&!o.preventDefaultException(t.target,this.options.preventDefaultException)&&t.preventDefault();t.changedTouches&&t.changedTouches[0];var i,e,n=o.getTime()-this.startTime,r=s.round(this.x),h=s.round(this.y),a=s.abs(r-this.startX),l=s.abs(h-this.startY),c=0,p="";if(this.isInTransition=0,this.initiated=0,this.endTime=o.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(r,h),!this.moved)return this.options.tap&&o.tap(t,this.options.tap),this.options.click&&o.click(t),void this._execEvent("scrollCancel");if(this._events.flick&&n<200&&a<100&&l<100)this._execEvent("flick");else{if(this.options.momentum&&n<300){var d=this.options.deceleration;this.options.firstStepDeceleration&&(0===this.absStartY&&0===this.absStartX||(d=null)),i=this.hasHorizontalScroll?o.momentum(this.x,this.startX,n,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,d):{destination:r,duration:0},e=this.hasVerticalScroll?o.momentum(this.y,this.startY,n,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,d):{destination:h,duration:0},r=i.destination,h=e.destination,c=s.max(i.duration,e.duration),this.isInTransition=1}if(this.options.snap){var u=this._nearestSnap(r,h);this.currentPage=u,c=this.options.snapSpeed||s.max(s.max(s.min(s.abs(r-u.x),1e3),s.min(s.abs(h-u.y),1e3)),300),r=u.x,h=u.y,this.directionX=0,this.directionY=0,p=this.options.bounceEasing}if(r!=this.x||h!=this.y)return(r>0||r0||h0?i=0:this.x0?s=0:this.y-1&&this._events[t].splice(s,1)}},_execEvent:function(t){if(this._events[t]){var i=0,s=this._events[t].length;if(s)for(;i0;var n=this.options.useTransition&&e.style;!s||n?(n&&(this._transitionTimingFunction(e.style),this._transitionTime(s)),this._translate(t,i)):this._animate(t,i,s,e.fn)},scrollToElement:function(t,i,e,n,r){if(t=t.nodeType?t:this.scroller.querySelector(t)){var h=o.offset(t);h.left-=this.wrapperOffset.left,h.top-=this.wrapperOffset.top,!0===e&&(e=s.round(t.offsetWidth/2-this.wrapper.offsetWidth/2)),!0===n&&(n=s.round(t.offsetHeight/2-this.wrapper.offsetHeight/2)),h.left-=e||0,h.top-=n||0,h.left=h.left>0?0:h.left0?0:h.top0?o--:i<0&&o++,e>0?n--:e<0&&n++,void this.goToPage(o,n);o=this.x+s.round(this.hasHorizontalScroll?i:0),n=this.y+s.round(this.hasVerticalScroll?e:0),this.directionX=i>0?-1:i<0?1:0,this.directionY=e>0?-1:e<0?1:0,o>0?o=0:o0?n=0:n-this.scrollerWidth;){for(this.pages[h]=[],t=0,n=0;n>-this.scrollerHeight;)this.pages[h][t]={x:s.max(l,this.maxScrollX),y:s.max(n,this.maxScrollY),width:c,height:p,cx:l-e,cy:n-o},n-=p,t++;l-=c,h++}else for(t=(r=this.options.snap).length,i=-1;hthis.maxScrollX&&a++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),this.options.snapThreshold%1==0?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=s.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=s.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}}),this.on("flick",function(){var t=this.options.snapSpeed||s.max(s.max(s.min(s.abs(this.x-this.startX),1e3),s.min(s.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,t)})},_nearestSnap:function(t,i){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var e=0,o=this.pages.length,n=0;if(s.abs(t-this.absStartX)0?t=0:t0?i=0:i=this.pages[e][0].cx){t=this.pages[e][0].x;break}for(o=this.pages[e].length;n=this.pages[0][n].cy){i=this.pages[0][n].y;break}return e==this.currentPage.pageX&&((e+=this.directionX)<0?e=0:e>=this.pages.length&&(e=this.pages.length-1),t=this.pages[e][0].x),n==this.currentPage.pageY&&((n+=this.directionY)<0?n=0:n>=this.pages[0].length&&(n=this.pages[0].length-1),i=this.pages[0][n].y),{x:t,y:i,pageX:e,pageY:n}},goToPage:function(t,i,e,o){o=o||this.options.bounceEasing,t>=this.pages.length?t=this.pages.length-1:t<0&&(t=0),i>=this.pages[t].length?i=this.pages[t].length-1:i<0&&(i=0);var n=this.pages[t][i].x,r=this.pages[t][i].y;e=void 0===e?this.options.snapSpeed||s.max(s.max(s.min(s.abs(n-this.x),1e3),s.min(s.abs(r-this.y),1e3)),300):e,this.currentPage={x:n,y:r,pageX:t,pageY:i},this.scrollTo(n,r,e,o)},next:function(t,i){var s=this.currentPage.pageX,e=this.currentPage.pageY;++s>=this.pages.length&&this.hasVerticalScroll&&(s=0,e++),this.goToPage(s,e,t,i)},prev:function(t,i){var s=this.currentPage.pageX,e=this.currentPage.pageY;--s<0&&this.hasVerticalScroll&&(s=0,e--),this.goToPage(s,e,t,i)},_initKeys:function(i){var s,e={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(s in this.options.keyBindings)"string"==typeof this.options.keyBindings[s]&&(this.options.keyBindings[s]=this.options.keyBindings[s].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(s in e)this.options.keyBindings[s]=this.options.keyBindings[s]||e[s];o.addEvent(t,"keydown",this),this.on("destroy",function(){o.removeEvent(t,"keydown",this)})},_key:function(t){if(this.enabled){var i,e=this.options.snap,n=e?this.currentPage.pageX:this.x,r=e?this.currentPage.pageY:this.y,h=o.getTime(),a=this.keyTime||0;switch(this.options.useTransition&&this.isInTransition&&(i=this.getComputedPosition(),this._translate(s.round(i.x),s.round(i.y)),this.isInTransition=!1),this.keyAcceleration=h-a<200?s.min(this.keyAcceleration+.25,50):0,t.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?n+=e?1:this.wrapperWidth:r+=e?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?n-=e?1:this.wrapperWidth:r-=e?1:this.wrapperHeight;break;case this.options.keyBindings.end:n=e?this.pages.length-1:this.maxScrollX,r=e?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:n=0,r=0;break;case this.options.keyBindings.left:n+=e?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:r+=e?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:n-=e?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:r-=e?1:5+this.keyAcceleration>>0;break;default:return}e?this.goToPage(n,r):(n>0?(n=0,this.keyAcceleration=0):n0?(r=0,this.keyAcceleration=0):r=c)return r.isAnimating=!1,r._translate(t,i),void(r.resetPosition(r.options.bounceTime)||r._execEvent("scrollEnd"));f=n(m=(m-l)/s),d=(t-h)*f+h,u=(i-a)*f+a,r._translate(d,u),r.isAnimating&&e(p)}()},handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(t);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(t);break;case"keydown":this._key(t);break;case"click":this.enabled&&!t._constructed&&(t.preventDefault(),t.stopPropagation())}}},h.prototype={handleEvent:function(t){switch(t.type){case"touchstart":case"pointerdown":case"MSPointerDown":case"mousedown":this._start(t);break;case"touchmove":case"pointermove":case"MSPointerMove":case"mousemove":this._move(t);break;case"touchend":case"pointerup":case"MSPointerUp":case"mouseup":case"touchcancel":case"pointercancel":case"MSPointerCancel":case"mousecancel":this._end(t)}},destroy:function(){this.options.fadeScrollbars&&(clearTimeout(this.fadeTimeout),this.fadeTimeout=null),this.options.interactive&&(o.removeEvent(this.indicator,"touchstart",this),o.removeEvent(this.indicator,o.prefixPointerEvent("pointerdown"),this),o.removeEvent(this.indicator,"mousedown",this),o.removeEvent(t,"touchmove",this),o.removeEvent(t,o.prefixPointerEvent("pointermove"),this),o.removeEvent(t,"mousemove",this),o.removeEvent(t,"touchend",this),o.removeEvent(t,o.prefixPointerEvent("pointerup"),this),o.removeEvent(t,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(i){var s=i.touches?i.touches[0]:i;i.preventDefault(),i.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=s.pageX,this.lastPointY=s.pageY,this.startTime=o.getTime(),this.options.disableTouch||o.addEvent(t,"touchmove",this),this.options.disablePointer||o.addEvent(t,o.prefixPointerEvent("pointermove"),this),this.options.disableMouse||o.addEvent(t,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(t){var i,s,e,n,r=t.touches?t.touches[0]:t;o.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,i=r.pageX-this.lastPointX,this.lastPointX=r.pageX,s=r.pageY-this.lastPointY,this.lastPointY=r.pageY,e=this.x+i,n=this.y+s,this._pos(e,n),t.preventDefault(),t.stopPropagation()},_end:function(i){if(this.initiated){if(this.initiated=!1,i.preventDefault(),i.stopPropagation(),o.removeEvent(t,"touchmove",this),o.removeEvent(t,o.prefixPointerEvent("pointermove"),this),o.removeEvent(t,"mousemove",this),this.scroller.options.snap){var e=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),n=this.options.snapSpeed||s.max(s.max(s.min(s.abs(this.scroller.x-e.x),1e3),s.min(s.abs(this.scroller.y-e.y),1e3)),300);this.scroller.x==e.x&&this.scroller.y==e.y||(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=e,this.scroller.scrollTo(e.x,e.y,n,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(t){t=t||0;var i=o.style.transitionDuration;if(i&&(this.indicatorStyle[i]=t+"ms",!t&&o.isBadAndroid)){this.indicatorStyle[i]="0.0001ms";var s=this;e(function(){"0.0001ms"===s.indicatorStyle[i]&&(s.indicatorStyle[i]="0s")})}},transitionTimingFunction:function(t){this.indicatorStyle[o.style.transitionTimingFunction]=t},refresh:function(){this.transitionTime(),this.options.listenX&&!this.options.listenY?this.indicatorStyle.display=this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.indicatorStyle.display=this.scroller.hasVerticalScroll?"block":"none":this.indicatorStyle.display=this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(o.addClass(this.wrapper,"iScrollBothScrollbars"),o.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(o.removeClass(this.wrapper,"iScrollBothScrollbars"),o.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px"));this.wrapper.offsetHeight;this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=s.max(s.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=8-this.indicatorWidth,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=s.max(s.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=8-this.indicatorHeight,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var t=this.options.listenX&&s.round(this.sizeRatioX*this.scroller.x)||0,i=this.options.listenY&&s.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(tthis.maxBoundaryX?"scale"==this.options.shrink?(this.width=s.max(this.indicatorWidth-(t-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",t=this.maxPosX+this.indicatorWidth-this.width):t=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),ithis.maxBoundaryY?"scale"==this.options.shrink?(this.height=s.max(this.indicatorHeight-3*(i-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",i=this.maxPosY+this.indicatorHeight-this.height):i=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=t,this.y=i,this.scroller.options.useTransform?this.indicatorStyle[o.style.transform]="translate("+t+"px,"+i+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=t+"px",this.indicatorStyle.top=i+"px")},_pos:function(t,i){t<0?t=0:t>this.maxPosX&&(t=this.maxPosX),i<0?i=0:i>this.maxPosY&&(i=this.maxPosY),t=this.options.listenX?s.round(t/this.sizeRatioX):this.scroller.x,i=this.options.listenY?s.round(i/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(t,i)},fade:function(t,i){if(!i||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var s=t?250:500,e=t?0:300;t=t?"1":"0",this.wrapperStyle[o.style.transitionDuration]=s+"ms",this.fadeTimeout=setTimeout(function(t){this.wrapperStyle.opacity=t,this.visible=+t}.bind(this,t),e)}}},n.utils=o,"undefined"!=typeof module&&module.exports?module.exports=n:"function"==typeof define&&define.amd?define(function(){return n}):t.IScroll=n}(window,document,Math), /*! * Scrolloverflow module for fullPage.js * https://github.com/alvarotrigo/fullPage.js diff --git a/vendors/scrolloverflow.min.js.map b/vendors/scrolloverflow.min.js.map index c7b2a21cb..119de641c 100644 --- a/vendors/scrolloverflow.min.js.map +++ b/vendors/scrolloverflow.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["scrolloverflow.js"],"names":["window","document","Math","IScroll","el","options","this","wrapper","querySelector","scroller","children","scrollerStyle","style","resizeScrollbars","mouseWheelSpeed","snapThreshold","disablePointer","utils","hasPointer","disableTouch","hasTouch","disableMouse","startX","startY","scrollY","directionLockThreshold","momentum","bounce","bounceTime","bounceEasing","preventDefault","preventDefaultException","tagName","HWCompositing","useTransition","useTransform","bindToWrapper","onmousedown","i","translateZ","hasPerspective","hasTransition","hasTransform","eventPassthrough","scrollX","freeScroll","ease","circular","resizePolling","undefined","tap","test","position","shrinkScrollbars","invertWheelDirection","x","y","directionX","directionY","_events","_init","refresh","scrollTo","enable","createDefaultScrollbar","direction","interactive","type","scrollbar","createElement","indicator","cssText","className","height","width","pointerEvents","appendChild","Indicator","wrapperStyle","indicatorStyle","listenX","listenY","resize","defaultScrollbars","shrink","fade","speedRatioX","speedRatioY","sizeRatioX","sizeRatioY","maxPosX","maxPosY","addEvent","prefixPointerEvent","transform","durationProp","transitionDuration","isBadAndroid","self","rAF","opacity","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","callback","setTimeout","_prefixStyle","_vendor","charAt","toUpperCase","substr","me","_elementStyle","vendors","l","length","getTime","Date","now","extend","target","obj","fn","capture","addEventListener","removeEvent","removeEventListener","pointerEvent","MSPointerEvent","current","start","time","lowerMargin","wrapperSize","deceleration","destination","duration","distance","speed","abs","round","_transform","PointerEvent","appVersion","navigator","safariVersion","match","parseFloat","transitionTimingFunction","transitionDelay","transformOrigin","hasClass","e","c","re","RegExp","addClass","newclass","split","push","join","removeClass","replace","offset","left","offsetLeft","top","offsetTop","offsetParent","exceptions","eventType","touchstart","touchmove","touchend","mousedown","mousemove","mouseup","pointerdown","pointermove","pointerup","MSPointerDown","MSPointerMove","MSPointerUp","quadratic","k","sqrt","back","b","elastic","f","pow","sin","PI","eventName","ev","createEvent","initEvent","pageX","pageY","dispatchEvent","click","MouseEvent","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","_constructed","prototype","version","_initEvents","scrollbars","indicators","_initIndicators","mouseWheel","_initWheel","snap","_initSnap","keyBindings","_initKeys","destroy","clearTimeout","resizeTimeout","_execEvent","_transitionEnd","isInTransition","_transitionTime","resetPosition","_start","which","enabled","initiated","pos","point","touches","moved","distX","distY","directionLocked","startTime","getComputedPosition","_translate","isAnimating","absStartX","absStartY","pointX","pointY","_move","newX","newY","absDistX","absDistY","deltaX","deltaY","timestamp","endTime","hasHorizontalScroll","hasVerticalScroll","maxScrollX","maxScrollY","_end","momentumX","momentumY","changedTouches","distanceX","distanceY","easing","flick","wrapperWidth","wrapperHeight","max","_nearestSnap","currentPage","snapSpeed","min","_resize","that","disable","offsetHeight","clientWidth","clientHeight","scrollerWidth","offsetWidth","scrollerHeight","wrapperOffset","on","off","index","indexOf","splice","apply","slice","call","arguments","scrollBy","transitionType","_transitionTimingFunction","_animate","scrollToElement","offsetX","offsetY","nodeType","transitionTime","updatePosition","remove","matrix","getComputedStyle","_indicatorsMap","interactiveScrollbars","customStyle","fadeScrollbars","concat","wheelTimeout","_wheel","wheelDeltaX","wheelDeltaY","deltaMode","wheelDelta","goToPage","querySelectorAll","n","cx","cy","m","stepX","snapStepX","stepY","snapStepY","pages","snapThresholdX","snapThresholdY","posX","posY","next","prev","keys","pageUp","pageDown","end","home","up","right","down","charCodeAt","_key","prevTime","keyTime","acceleration","keyAcceleration","keyCode","destX","destY","easingFn","step","destTime","handleEvent","stopPropagation","fadeTimeout","parentNode","removeChild","lastPointX","lastPointY","_pos","display","bottom","indicatorWidth","minBoundaryX","maxBoundaryX","indicatorHeight","minBoundaryY","maxBoundaryY","ignoreBoundaries","val","hold","visible","delay","bind","module","exports","define","amd","$","ACTIVE","ACTIVE_SEL","SECTION","SECTION_SEL","SECTION_ACTIVE_SEL","SLIDE","SLIDE_SEL","SLIDE_ACTIVE_SEL","SLIDES_WRAPPER","SLIDES_WRAPPER_SEL","SCROLLABLE","SCROLLABLE_SEL","wheelOn","wheelOff","iscrollHandler","refreshId","iScrollInstances","toggleWheel","value","scrollable","find","each","iScrollInstance","data","onLeave","beforeLeave","afterLoad","create","element","scrollHeight","scrollOverflowOptions","$this","get","isScrolled","scrollTop","innerHeight","activeSection","first","unwrap","update","css","parent","wrapContent","jQuery","fp_scrolloverflow","scrollBarHandler","createScrollBarForAll","RESPONSIVE","removeResponsiveScrollOverflows","forEachSectionAndSlide","createScrollBar","getPaddings","section","closest","parseInt","contentHeight","scrollOverflowHandler","wrap","paddings","verticalCentered","TABLE_CELL_SEL","wrapInner","iscrollOptions","slides","AUTO_HEIGHT_RESPONSIVE","init","readyState","fullpage","shared","afterRenderActions","TABLE_CELL","hideScrollbars","isTouch","msMaxTouchPoints","silentMoveTo"],"mappings":";;;;;CAKA,SAAWA,EAAQC,EAAUC,GAyR7B,QAASC,GAASC,EAAIC,GAClBC,KAAKC,QAAuB,gBAANH,GAAiBH,EAASO,cAAcJ,GAAMA,EACpEE,KAAKG,SAAWH,KAAKC,QAAQG,SAAS,GACtCJ,KAAKK,cAAgBL,KAAKG,SAASG,MAEnCN,KAAKD,SAEDQ,kBAAkB,EAElBC,gBAAiB,GAEjBC,cAAe,KAGfC,gBAAkBC,EAAMC,WACxBC,aAAeF,EAAMC,aAAeD,EAAMG,SAC1CC,aAAeJ,EAAMC,YAAcD,EAAMG,SACzCE,OAAQ,EACRC,OAAQ,EACRC,SAAS,EACTC,uBAAwB,EACxBC,UAAU,EAEVC,QAAQ,EACRC,WAAY,IACZC,aAAc,GAEdC,gBAAgB,EAChBC,yBAA2BC,QAAS,0CAEpCC,eAAe,EACfC,eAAe,EACfC,cAAc,EACdC,cAA6C,mBAAvBpC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rZ,OAAQC,SAAUib","file":"scrolloverflow.min.js","sourcesContent":["/*!\n* Customized version of iScroll.js 0.0.5\n* It fixes bugs affecting its integration with fullpage.js\n*/\n/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */\n(function (window, document, Math) {\nvar rAF = window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.oRequestAnimationFrame ||\n window.msRequestAnimationFrame ||\n function (callback) { window.setTimeout(callback, 1000 / 60); };\n\nvar utils = (function () {\n var me = {};\n\n var _elementStyle = document.createElement('div').style;\n var _vendor = (function () {\n var vendors = ['t', 'webkitT', 'MozT', 'msT', 'OT'],\n transform,\n i = 0,\n l = vendors.length;\n\n for ( ; i < l; i++ ) {\n transform = vendors[i] + 'ransform';\n if ( transform in _elementStyle ) return vendors[i].substr(0, vendors[i].length-1);\n }\n\n return false;\n })();\n\n function _prefixStyle (style) {\n if ( _vendor === false ) return false;\n if ( _vendor === '' ) return style;\n return _vendor + style.charAt(0).toUpperCase() + style.substr(1);\n }\n\n me.getTime = Date.now || function getTime () { return new Date().getTime(); };\n\n me.extend = function (target, obj) {\n for ( var i in obj ) {\n target[i] = obj[i];\n }\n };\n\n me.addEvent = function (el, type, fn, capture) {\n el.addEventListener(type, fn, !!capture);\n };\n\n me.removeEvent = function (el, type, fn, capture) {\n el.removeEventListener(type, fn, !!capture);\n };\n\n me.prefixPointerEvent = function (pointerEvent) {\n return window.MSPointerEvent ?\n 'MSPointer' + pointerEvent.charAt(7).toUpperCase() + pointerEvent.substr(8):\n pointerEvent;\n };\n\n me.momentum = function (current, start, time, lowerMargin, wrapperSize, deceleration) {\n var distance = current - start,\n speed = Math.abs(distance) / time,\n destination,\n duration;\n\n deceleration = deceleration === undefined ? 0.0006 : deceleration;\n\n destination = current + ( speed * speed ) / ( 2 * deceleration ) * ( distance < 0 ? -1 : 1 );\n duration = speed / deceleration;\n\n if ( destination < lowerMargin ) {\n destination = wrapperSize ? lowerMargin - ( wrapperSize / 2.5 * ( speed / 8 ) ) : lowerMargin;\n distance = Math.abs(destination - current);\n duration = distance / speed;\n } else if ( destination > 0 ) {\n destination = wrapperSize ? wrapperSize / 2.5 * ( speed / 8 ) : 0;\n distance = Math.abs(current) + destination;\n duration = distance / speed;\n }\n\n return {\n destination: Math.round(destination),\n duration: duration\n };\n };\n\n var _transform = _prefixStyle('transform');\n\n me.extend(me, {\n hasTransform: _transform !== false,\n hasPerspective: _prefixStyle('perspective') in _elementStyle,\n hasTouch: 'ontouchstart' in window,\n hasPointer: !!(window.PointerEvent || window.MSPointerEvent), // IE10 is prefixed\n hasTransition: _prefixStyle('transition') in _elementStyle\n });\n\n /*\n This should find all Android browsers lower than build 535.19 (both stock browser and webview)\n - galaxy S2 is ok\n - 2.3.6 : `AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1`\n - 4.0.4 : `AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30`\n - galaxy S3 is badAndroid (stock brower, webview)\n `AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30`\n - galaxy S4 is badAndroid (stock brower, webview)\n `AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30`\n - galaxy S5 is OK\n `AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Mobile Safari/537.36 (Chrome/)`\n - galaxy S6 is OK\n `AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Mobile Safari/537.36 (Chrome/)`\n */\n me.isBadAndroid = (function() {\n var appVersion = window.navigator.appVersion;\n // Android browser is not a chrome browser.\n if (/Android/.test(appVersion) && !(/Chrome\\/\\d/.test(appVersion))) {\n var safariVersion = appVersion.match(/Safari\\/(\\d+.\\d)/);\n if(safariVersion && typeof safariVersion === \"object\" && safariVersion.length >= 2) {\n return parseFloat(safariVersion[1]) < 535.19;\n } else {\n return true;\n }\n } else {\n return false;\n }\n })();\n\n me.extend(me.style = {}, {\n transform: _transform,\n transitionTimingFunction: _prefixStyle('transitionTimingFunction'),\n transitionDuration: _prefixStyle('transitionDuration'),\n transitionDelay: _prefixStyle('transitionDelay'),\n transformOrigin: _prefixStyle('transformOrigin')\n });\n\n me.hasClass = function (e, c) {\n var re = new RegExp(\"(^|\\\\s)\" + c + \"(\\\\s|$)\");\n return re.test(e.className);\n };\n\n me.addClass = function (e, c) {\n if ( me.hasClass(e, c) ) {\n return;\n }\n\n var newclass = e.className.split(' ');\n newclass.push(c);\n e.className = newclass.join(' ');\n };\n\n me.removeClass = function (e, c) {\n if ( !me.hasClass(e, c) ) {\n return;\n }\n\n var re = new RegExp(\"(^|\\\\s)\" + c + \"(\\\\s|$)\", 'g');\n e.className = e.className.replace(re, ' ');\n };\n\n me.offset = function (el) {\n var left = -el.offsetLeft,\n top = -el.offsetTop;\n\n // jshint -W084\n while (el = el.offsetParent) {\n left -= el.offsetLeft;\n top -= el.offsetTop;\n }\n // jshint +W084\n\n return {\n left: left,\n top: top\n };\n };\n\n me.preventDefaultException = function (el, exceptions) {\n for ( var i in exceptions ) {\n if ( exceptions[i].test(el[i]) ) {\n return true;\n }\n }\n\n return false;\n };\n\n me.extend(me.eventType = {}, {\n touchstart: 1,\n touchmove: 1,\n touchend: 1,\n\n mousedown: 2,\n mousemove: 2,\n mouseup: 2,\n\n pointerdown: 3,\n pointermove: 3,\n pointerup: 3,\n\n MSPointerDown: 3,\n MSPointerMove: 3,\n MSPointerUp: 3\n });\n\n me.extend(me.ease = {}, {\n quadratic: {\n style: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',\n fn: function (k) {\n return k * ( 2 - k );\n }\n },\n circular: {\n style: 'cubic-bezier(0.1, 0.57, 0.1, 1)', // Not properly \"circular\" but this looks better, it should be (0.075, 0.82, 0.165, 1)\n fn: function (k) {\n return Math.sqrt( 1 - ( --k * k ) );\n }\n },\n back: {\n style: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',\n fn: function (k) {\n var b = 4;\n return ( k = k - 1 ) * k * ( ( b + 1 ) * k + b ) + 1;\n }\n },\n bounce: {\n style: '',\n fn: function (k) {\n if ( ( k /= 1 ) < ( 1 / 2.75 ) ) {\n return 7.5625 * k * k;\n } else if ( k < ( 2 / 2.75 ) ) {\n return 7.5625 * ( k -= ( 1.5 / 2.75 ) ) * k + 0.75;\n } else if ( k < ( 2.5 / 2.75 ) ) {\n return 7.5625 * ( k -= ( 2.25 / 2.75 ) ) * k + 0.9375;\n } else {\n return 7.5625 * ( k -= ( 2.625 / 2.75 ) ) * k + 0.984375;\n }\n }\n },\n elastic: {\n style: '',\n fn: function (k) {\n var f = 0.22,\n e = 0.4;\n\n if ( k === 0 ) { return 0; }\n if ( k == 1 ) { return 1; }\n\n return ( e * Math.pow( 2, - 10 * k ) * Math.sin( ( k - f / 4 ) * ( 2 * Math.PI ) / f ) + 1 );\n }\n }\n });\n\n me.tap = function (e, eventName) {\n var ev = document.createEvent('Event');\n ev.initEvent(eventName, true, true);\n ev.pageX = e.pageX;\n ev.pageY = e.pageY;\n e.target.dispatchEvent(ev);\n };\n\n me.click = function (e) {\n var target = e.target,\n ev;\n\n if ( !(/(SELECT|INPUT|TEXTAREA)/i).test(target.tagName) ) {\n // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent\n // initMouseEvent is deprecated.\n ev = document.createEvent(window.MouseEvent ? 'MouseEvents' : 'Event');\n ev.initEvent('click', true, true);\n ev.view = e.view || window;\n ev.detail = 1;\n ev.screenX = target.screenX || 0;\n ev.screenY = target.screenY || 0;\n ev.clientX = target.clientX || 0;\n ev.clientY = target.clientY || 0;\n ev.ctrlKey = !!e.ctrlKey;\n ev.altKey = !!e.altKey;\n ev.shiftKey = !!e.shiftKey;\n ev.metaKey = !!e.metaKey;\n ev.button = 0;\n ev.relatedTarget = null;\n ev._constructed = true;\n target.dispatchEvent(ev);\n }\n };\n\n return me;\n})();\nfunction IScroll (el, options) {\n this.wrapper = typeof el == 'string' ? document.querySelector(el) : el;\n this.scroller = this.wrapper.children[0];\n this.scrollerStyle = this.scroller.style; // cache style for better performance\n\n this.options = {\n\n resizeScrollbars: true,\n\n mouseWheelSpeed: 20,\n\n snapThreshold: 0.334,\n\n// INSERT POINT: OPTIONS\n disablePointer : !utils.hasPointer,\n disableTouch : utils.hasPointer || !utils.hasTouch,\n disableMouse : utils.hasPointer || utils.hasTouch,\n startX: 0,\n startY: 0,\n scrollY: true,\n directionLockThreshold: 5,\n momentum: true,\n\n bounce: true,\n bounceTime: 600,\n bounceEasing: '',\n\n preventDefault: true,\n preventDefaultException: { tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT|LABEL)$/ },\n\n HWCompositing: true,\n useTransition: true,\n useTransform: true,\n bindToWrapper: typeof window.onmousedown === \"undefined\"\n };\n\n for ( var i in options ) {\n this.options[i] = options[i];\n }\n\n // Normalize options\n this.translateZ = this.options.HWCompositing && utils.hasPerspective ? ' translateZ(0)' : '';\n\n this.options.useTransition = utils.hasTransition && this.options.useTransition;\n this.options.useTransform = utils.hasTransform && this.options.useTransform;\n\n this.options.eventPassthrough = this.options.eventPassthrough === true ? 'vertical' : this.options.eventPassthrough;\n this.options.preventDefault = !this.options.eventPassthrough && this.options.preventDefault;\n\n // If you want eventPassthrough I have to lock one of the axes\n this.options.scrollY = this.options.eventPassthrough == 'vertical' ? false : this.options.scrollY;\n this.options.scrollX = this.options.eventPassthrough == 'horizontal' ? false : this.options.scrollX;\n\n // With eventPassthrough we also need lockDirection mechanism\n this.options.freeScroll = this.options.freeScroll && !this.options.eventPassthrough;\n this.options.directionLockThreshold = this.options.eventPassthrough ? 0 : this.options.directionLockThreshold;\n\n this.options.bounceEasing = typeof this.options.bounceEasing == 'string' ? utils.ease[this.options.bounceEasing] || utils.ease.circular : this.options.bounceEasing;\n\n this.options.resizePolling = this.options.resizePolling === undefined ? 60 : this.options.resizePolling;\n\n if ( this.options.tap === true ) {\n this.options.tap = 'tap';\n }\n\n // https://github.com/cubiq/iscroll/issues/1029\n if (!this.options.useTransition && !this.options.useTransform) {\n if(!(/relative|absolute/i).test(this.scrollerStyle.position)) {\n this.scrollerStyle.position = \"relative\";\n }\n }\n\n if ( this.options.shrinkScrollbars == 'scale' ) {\n this.options.useTransition = false;\n }\n\n this.options.invertWheelDirection = this.options.invertWheelDirection ? -1 : 1;\n\n// INSERT POINT: NORMALIZATION\n\n // Some defaults\n this.x = 0;\n this.y = 0;\n this.directionX = 0;\n this.directionY = 0;\n this._events = {};\n\n// INSERT POINT: DEFAULTS\n\n this._init();\n this.refresh();\n\n this.scrollTo(this.options.startX, this.options.startY);\n this.enable();\n}\n\nIScroll.prototype = {\n version: '5.2.0',\n\n _init: function () {\n this._initEvents();\n\n if ( this.options.scrollbars || this.options.indicators ) {\n this._initIndicators();\n }\n\n if ( this.options.mouseWheel ) {\n this._initWheel();\n }\n\n if ( this.options.snap ) {\n this._initSnap();\n }\n\n if ( this.options.keyBindings ) {\n this._initKeys();\n }\n\n// INSERT POINT: _init\n\n },\n\n destroy: function () {\n this._initEvents(true);\n clearTimeout(this.resizeTimeout);\n this.resizeTimeout = null;\n this._execEvent('destroy');\n },\n\n _transitionEnd: function (e) {\n if ( e.target != this.scroller || !this.isInTransition ) {\n return;\n }\n\n this._transitionTime();\n if ( !this.resetPosition(this.options.bounceTime) ) {\n this.isInTransition = false;\n this._execEvent('scrollEnd');\n }\n },\n\n _start: function (e) {\n // React to left mouse button only\n if ( utils.eventType[e.type] != 1 ) {\n // for button property\n // http://unixpapa.com/js/mouse.html\n var button;\n if (!e.which) {\n /* IE case */\n button = (e.button < 2) ? 0 :\n ((e.button == 4) ? 1 : 2);\n } else {\n /* All others */\n button = e.button;\n }\n if ( button !== 0 ) {\n return;\n }\n }\n\n if ( !this.enabled || (this.initiated && utils.eventType[e.type] !== this.initiated) ) {\n return;\n }\n\n if ( this.options.preventDefault && !utils.isBadAndroid && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) {\n e.preventDefault();\n }\n\n var point = e.touches ? e.touches[0] : e,\n pos;\n\n this.initiated = utils.eventType[e.type];\n this.moved = false;\n this.distX = 0;\n this.distY = 0;\n this.directionX = 0;\n this.directionY = 0;\n this.directionLocked = 0;\n\n this.startTime = utils.getTime();\n\n if ( this.options.useTransition && this.isInTransition ) {\n this._transitionTime();\n this.isInTransition = false;\n pos = this.getComputedPosition();\n this._translate(Math.round(pos.x), Math.round(pos.y));\n this._execEvent('scrollEnd');\n } else if ( !this.options.useTransition && this.isAnimating ) {\n this.isAnimating = false;\n this._execEvent('scrollEnd');\n }\n\n this.startX = this.x;\n this.startY = this.y;\n this.absStartX = this.x;\n this.absStartY = this.y;\n this.pointX = point.pageX;\n this.pointY = point.pageY;\n\n this._execEvent('beforeScrollStart');\n },\n\n _move: function (e) {\n if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) {\n return;\n }\n\n if ( this.options.preventDefault ) { // increases performance on Android? TODO: check!\n e.preventDefault();\n }\n\n var point = e.touches ? e.touches[0] : e,\n deltaX = point.pageX - this.pointX,\n deltaY = point.pageY - this.pointY,\n timestamp = utils.getTime(),\n newX, newY,\n absDistX, absDistY;\n\n this.pointX = point.pageX;\n this.pointY = point.pageY;\n\n this.distX += deltaX;\n this.distY += deltaY;\n absDistX = Math.abs(this.distX);\n absDistY = Math.abs(this.distY);\n\n // We need to move at least 10 pixels for the scrolling to initiate\n if ( timestamp - this.endTime > 300 && (absDistX < 10 && absDistY < 10) ) {\n return;\n }\n\n // If you are scrolling in one direction lock the other\n if ( !this.directionLocked && !this.options.freeScroll ) {\n if ( absDistX > absDistY + this.options.directionLockThreshold ) {\n this.directionLocked = 'h'; // lock horizontally\n } else if ( absDistY >= absDistX + this.options.directionLockThreshold ) {\n this.directionLocked = 'v'; // lock vertically\n } else {\n this.directionLocked = 'n'; // no lock\n }\n }\n\n if ( this.directionLocked == 'h' ) {\n if ( this.options.eventPassthrough == 'vertical' ) {\n e.preventDefault();\n } else if ( this.options.eventPassthrough == 'horizontal' ) {\n this.initiated = false;\n return;\n }\n\n deltaY = 0;\n } else if ( this.directionLocked == 'v' ) {\n if ( this.options.eventPassthrough == 'horizontal' ) {\n e.preventDefault();\n } else if ( this.options.eventPassthrough == 'vertical' ) {\n this.initiated = false;\n return;\n }\n\n deltaX = 0;\n }\n\n deltaX = this.hasHorizontalScroll ? deltaX : 0;\n deltaY = this.hasVerticalScroll ? deltaY : 0;\n\n newX = this.x + deltaX;\n newY = this.y + deltaY;\n\n // Slow down if outside of the boundaries\n if ( newX > 0 || newX < this.maxScrollX ) {\n newX = this.options.bounce ? this.x + deltaX / 3 : newX > 0 ? 0 : this.maxScrollX;\n }\n if ( newY > 0 || newY < this.maxScrollY ) {\n newY = this.options.bounce ? this.y + deltaY / 3 : newY > 0 ? 0 : this.maxScrollY;\n }\n\n this.directionX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0;\n this.directionY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0;\n\n if ( !this.moved ) {\n this._execEvent('scrollStart');\n }\n\n this.moved = true;\n\n this._translate(newX, newY);\n\n/* REPLACE START: _move */\n\n if ( timestamp - this.startTime > 300 ) {\n this.startTime = timestamp;\n this.startX = this.x;\n this.startY = this.y;\n }\n\n/* REPLACE END: _move */\n\n },\n\n _end: function (e) {\n if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) {\n return;\n }\n\n if ( this.options.preventDefault && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) {\n e.preventDefault();\n }\n\n var point = e.changedTouches ? e.changedTouches[0] : e,\n momentumX,\n momentumY,\n duration = utils.getTime() - this.startTime,\n newX = Math.round(this.x),\n newY = Math.round(this.y),\n distanceX = Math.abs(newX - this.startX),\n distanceY = Math.abs(newY - this.startY),\n time = 0,\n easing = '';\n\n this.isInTransition = 0;\n this.initiated = 0;\n this.endTime = utils.getTime();\n\n // reset if we are outside of the boundaries\n if ( this.resetPosition(this.options.bounceTime) ) {\n return;\n }\n\n this.scrollTo(newX, newY); // ensures that the last position is rounded\n\n // we scrolled less than 10 pixels\n if ( !this.moved ) {\n if ( this.options.tap ) {\n utils.tap(e, this.options.tap);\n }\n\n if ( this.options.click ) {\n utils.click(e);\n }\n\n this._execEvent('scrollCancel');\n return;\n }\n\n if ( this._events.flick && duration < 200 && distanceX < 100 && distanceY < 100 ) {\n this._execEvent('flick');\n return;\n }\n\n // start momentum animation if needed\n if ( this.options.momentum && duration < 300 ) {\n momentumX = this.hasHorizontalScroll ? utils.momentum(this.x, this.startX, duration, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options.deceleration) : { destination: newX, duration: 0 };\n momentumY = this.hasVerticalScroll ? utils.momentum(this.y, this.startY, duration, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options.deceleration) : { destination: newY, duration: 0 };\n newX = momentumX.destination;\n newY = momentumY.destination;\n time = Math.max(momentumX.duration, momentumY.duration);\n this.isInTransition = 1;\n }\n\n\n if ( this.options.snap ) {\n var snap = this._nearestSnap(newX, newY);\n this.currentPage = snap;\n time = this.options.snapSpeed || Math.max(\n Math.max(\n Math.min(Math.abs(newX - snap.x), 1000),\n Math.min(Math.abs(newY - snap.y), 1000)\n ), 300);\n newX = snap.x;\n newY = snap.y;\n\n this.directionX = 0;\n this.directionY = 0;\n easing = this.options.bounceEasing;\n }\n\n// INSERT POINT: _end\n\n if ( newX != this.x || newY != this.y ) {\n // change easing function when scroller goes out of the boundaries\n if ( newX > 0 || newX < this.maxScrollX || newY > 0 || newY < this.maxScrollY ) {\n easing = utils.ease.quadratic;\n }\n\n this.scrollTo(newX, newY, time, easing);\n return;\n }\n\n this._execEvent('scrollEnd');\n },\n\n _resize: function () {\n var that = this;\n\n clearTimeout(this.resizeTimeout);\n\n this.resizeTimeout = setTimeout(function () {\n that.refresh();\n }, this.options.resizePolling);\n },\n\n resetPosition: function (time) {\n var x = this.x,\n y = this.y;\n\n time = time || 0;\n\n if ( !this.hasHorizontalScroll || this.x > 0 ) {\n x = 0;\n } else if ( this.x < this.maxScrollX ) {\n x = this.maxScrollX;\n }\n\n if ( !this.hasVerticalScroll || this.y > 0 ) {\n y = 0;\n } else if ( this.y < this.maxScrollY ) {\n y = this.maxScrollY;\n }\n\n if ( x == this.x && y == this.y ) {\n return false;\n }\n\n this.scrollTo(x, y, time, this.options.bounceEasing);\n\n return true;\n },\n\n disable: function () {\n this.enabled = false;\n },\n\n enable: function () {\n this.enabled = true;\n },\n\n refresh: function () {\n var rf = this.wrapper.offsetHeight; // Force reflow\n\n this.wrapperWidth = this.wrapper.clientWidth;\n this.wrapperHeight = this.wrapper.clientHeight;\n\n/* REPLACE START: refresh */\n\n this.scrollerWidth = this.scroller.offsetWidth;\n this.scrollerHeight = this.scroller.offsetHeight;\n\n this.maxScrollX = this.wrapperWidth - this.scrollerWidth;\n this.maxScrollY = this.wrapperHeight - this.scrollerHeight;\n\n/* REPLACE END: refresh */\n\n this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0;\n this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0;\n\n if ( !this.hasHorizontalScroll ) {\n this.maxScrollX = 0;\n this.scrollerWidth = this.wrapperWidth;\n }\n\n if ( !this.hasVerticalScroll ) {\n this.maxScrollY = 0;\n this.scrollerHeight = this.wrapperHeight;\n }\n\n this.endTime = 0;\n this.directionX = 0;\n this.directionY = 0;\n\n this.wrapperOffset = utils.offset(this.wrapper);\n\n this._execEvent('refresh');\n\n this.resetPosition();\n\n// INSERT POINT: _refresh\n\n },\n\n on: function (type, fn) {\n if ( !this._events[type] ) {\n this._events[type] = [];\n }\n\n this._events[type].push(fn);\n },\n\n off: function (type, fn) {\n if ( !this._events[type] ) {\n return;\n }\n\n var index = this._events[type].indexOf(fn);\n\n if ( index > -1 ) {\n this._events[type].splice(index, 1);\n }\n },\n\n _execEvent: function (type) {\n if ( !this._events[type] ) {\n return;\n }\n\n var i = 0,\n l = this._events[type].length;\n\n if ( !l ) {\n return;\n }\n\n for ( ; i < l; i++ ) {\n this._events[type][i].apply(this, [].slice.call(arguments, 1));\n }\n },\n\n scrollBy: function (x, y, time, easing) {\n x = this.x + x;\n y = this.y + y;\n time = time || 0;\n\n this.scrollTo(x, y, time, easing);\n },\n\n scrollTo: function (x, y, time, easing) {\n easing = easing || utils.ease.circular;\n\n this.isInTransition = this.options.useTransition && time > 0;\n var transitionType = this.options.useTransition && easing.style;\n if ( !time || transitionType ) {\n if(transitionType) {\n this._transitionTimingFunction(easing.style);\n this._transitionTime(time);\n }\n this._translate(x, y);\n } else {\n this._animate(x, y, time, easing.fn);\n }\n },\n\n scrollToElement: function (el, time, offsetX, offsetY, easing) {\n el = el.nodeType ? el : this.scroller.querySelector(el);\n\n if ( !el ) {\n return;\n }\n\n var pos = utils.offset(el);\n\n pos.left -= this.wrapperOffset.left;\n pos.top -= this.wrapperOffset.top;\n\n // if offsetX/Y are true we center the element to the screen\n if ( offsetX === true ) {\n offsetX = Math.round(el.offsetWidth / 2 - this.wrapper.offsetWidth / 2);\n }\n if ( offsetY === true ) {\n offsetY = Math.round(el.offsetHeight / 2 - this.wrapper.offsetHeight / 2);\n }\n\n pos.left -= offsetX || 0;\n pos.top -= offsetY || 0;\n\n pos.left = pos.left > 0 ? 0 : pos.left < this.maxScrollX ? this.maxScrollX : pos.left;\n pos.top = pos.top > 0 ? 0 : pos.top < this.maxScrollY ? this.maxScrollY : pos.top;\n\n time = time === undefined || time === null || time === 'auto' ? Math.max(Math.abs(this.x-pos.left), Math.abs(this.y-pos.top)) : time;\n\n this.scrollTo(pos.left, pos.top, time, easing);\n },\n\n _transitionTime: function (time) {\n if (!this.options.useTransition) {\n return;\n }\n time = time || 0;\n var durationProp = utils.style.transitionDuration;\n if(!durationProp) {\n return;\n }\n\n this.scrollerStyle[durationProp] = time + 'ms';\n\n if ( !time && utils.isBadAndroid ) {\n this.scrollerStyle[durationProp] = '0.0001ms';\n // remove 0.0001ms\n var self = this;\n rAF(function() {\n if(self.scrollerStyle[durationProp] === '0.0001ms') {\n self.scrollerStyle[durationProp] = '0s';\n }\n });\n }\n\n\n if ( this.indicators ) {\n for ( var i = this.indicators.length; i--; ) {\n this.indicators[i].transitionTime(time);\n }\n }\n\n\n// INSERT POINT: _transitionTime\n\n },\n\n _transitionTimingFunction: function (easing) {\n this.scrollerStyle[utils.style.transitionTimingFunction] = easing;\n\n\n if ( this.indicators ) {\n for ( var i = this.indicators.length; i--; ) {\n this.indicators[i].transitionTimingFunction(easing);\n }\n }\n\n\n// INSERT POINT: _transitionTimingFunction\n\n },\n\n _translate: function (x, y) {\n if ( this.options.useTransform ) {\n\n/* REPLACE START: _translate */\n\n this.scrollerStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.translateZ;\n\n/* REPLACE END: _translate */\n\n } else {\n x = Math.round(x);\n y = Math.round(y);\n this.scrollerStyle.left = x + 'px';\n this.scrollerStyle.top = y + 'px';\n }\n\n this.x = x;\n this.y = y;\n\n\n if ( this.indicators ) {\n for ( var i = this.indicators.length; i--; ) {\n this.indicators[i].updatePosition();\n }\n }\n\n\n// INSERT POINT: _translate\n\n },\n\n _initEvents: function (remove) {\n var eventType = remove ? utils.removeEvent : utils.addEvent,\n target = this.options.bindToWrapper ? this.wrapper : window;\n\n eventType(window, 'orientationchange', this);\n eventType(window, 'resize', this);\n\n if ( this.options.click ) {\n eventType(this.wrapper, 'click', this, true);\n }\n\n if ( !this.options.disableMouse ) {\n eventType(this.wrapper, 'mousedown', this);\n eventType(target, 'mousemove', this);\n eventType(target, 'mousecancel', this);\n eventType(target, 'mouseup', this);\n }\n\n if ( utils.hasPointer && !this.options.disablePointer ) {\n eventType(this.wrapper, utils.prefixPointerEvent('pointerdown'), this);\n eventType(target, utils.prefixPointerEvent('pointermove'), this);\n eventType(target, utils.prefixPointerEvent('pointercancel'), this);\n eventType(target, utils.prefixPointerEvent('pointerup'), this);\n }\n\n if ( utils.hasTouch && !this.options.disableTouch ) {\n eventType(this.wrapper, 'touchstart', this);\n eventType(target, 'touchmove', this);\n eventType(target, 'touchcancel', this);\n eventType(target, 'touchend', this);\n }\n\n eventType(this.scroller, 'transitionend', this);\n eventType(this.scroller, 'webkitTransitionEnd', this);\n eventType(this.scroller, 'oTransitionEnd', this);\n eventType(this.scroller, 'MSTransitionEnd', this);\n },\n\n getComputedPosition: function () {\n var matrix = window.getComputedStyle(this.scroller, null),\n x, y;\n\n if ( this.options.useTransform ) {\n matrix = matrix[utils.style.transform].split(')')[0].split(', ');\n x = +(matrix[12] || matrix[4]);\n y = +(matrix[13] || matrix[5]);\n } else {\n x = +matrix.left.replace(/[^-\\d.]/g, '');\n y = +matrix.top.replace(/[^-\\d.]/g, '');\n }\n\n return { x: x, y: y };\n },\n _initIndicators: function () {\n var interactive = this.options.interactiveScrollbars,\n customStyle = typeof this.options.scrollbars != 'string',\n indicators = [],\n indicator;\n\n var that = this;\n\n this.indicators = [];\n\n if ( this.options.scrollbars ) {\n // Vertical scrollbar\n if ( this.options.scrollY ) {\n indicator = {\n el: createDefaultScrollbar('v', interactive, this.options.scrollbars),\n interactive: interactive,\n defaultScrollbars: true,\n customStyle: customStyle,\n resize: this.options.resizeScrollbars,\n shrink: this.options.shrinkScrollbars,\n fade: this.options.fadeScrollbars,\n listenX: false\n };\n\n this.wrapper.appendChild(indicator.el);\n indicators.push(indicator);\n }\n\n // Horizontal scrollbar\n if ( this.options.scrollX ) {\n indicator = {\n el: createDefaultScrollbar('h', interactive, this.options.scrollbars),\n interactive: interactive,\n defaultScrollbars: true,\n customStyle: customStyle,\n resize: this.options.resizeScrollbars,\n shrink: this.options.shrinkScrollbars,\n fade: this.options.fadeScrollbars,\n listenY: false\n };\n\n this.wrapper.appendChild(indicator.el);\n indicators.push(indicator);\n }\n }\n\n if ( this.options.indicators ) {\n // TODO: check concat compatibility\n indicators = indicators.concat(this.options.indicators);\n }\n\n for ( var i = indicators.length; i--; ) {\n this.indicators.push( new Indicator(this, indicators[i]) );\n }\n\n // TODO: check if we can use array.map (wide compatibility and performance issues)\n function _indicatorsMap (fn) {\n if (that.indicators) {\n for ( var i = that.indicators.length; i--; ) {\n fn.call(that.indicators[i]);\n }\n }\n }\n\n if ( this.options.fadeScrollbars ) {\n this.on('scrollEnd', function () {\n _indicatorsMap(function () {\n this.fade();\n });\n });\n\n this.on('scrollCancel', function () {\n _indicatorsMap(function () {\n this.fade();\n });\n });\n\n this.on('scrollStart', function () {\n _indicatorsMap(function () {\n this.fade(1);\n });\n });\n\n this.on('beforeScrollStart', function () {\n _indicatorsMap(function () {\n this.fade(1, true);\n });\n });\n }\n\n\n this.on('refresh', function () {\n _indicatorsMap(function () {\n this.refresh();\n });\n });\n\n this.on('destroy', function () {\n _indicatorsMap(function () {\n this.destroy();\n });\n\n delete this.indicators;\n });\n },\n\n _initWheel: function () {\n utils.addEvent(this.wrapper, 'wheel', this);\n utils.addEvent(this.wrapper, 'mousewheel', this);\n utils.addEvent(this.wrapper, 'DOMMouseScroll', this);\n\n this.on('destroy', function () {\n clearTimeout(this.wheelTimeout);\n this.wheelTimeout = null;\n utils.removeEvent(this.wrapper, 'wheel', this);\n utils.removeEvent(this.wrapper, 'mousewheel', this);\n utils.removeEvent(this.wrapper, 'DOMMouseScroll', this);\n });\n },\n\n _wheel: function (e) {\n if ( !this.enabled ) {\n return;\n }\n\n var wheelDeltaX, wheelDeltaY,\n newX, newY,\n that = this;\n\n if ( this.wheelTimeout === undefined ) {\n that._execEvent('scrollStart');\n }\n\n // Execute the scrollEnd event after 400ms the wheel stopped scrolling\n clearTimeout(this.wheelTimeout);\n this.wheelTimeout = setTimeout(function () {\n if(!that.options.snap) {\n that._execEvent('scrollEnd');\n }\n that.wheelTimeout = undefined;\n }, 400);\n\n if ( 'deltaX' in e ) {\n if (e.deltaMode === 1) {\n wheelDeltaX = -e.deltaX * this.options.mouseWheelSpeed;\n wheelDeltaY = -e.deltaY * this.options.mouseWheelSpeed;\n } else {\n wheelDeltaX = -e.deltaX;\n wheelDeltaY = -e.deltaY;\n }\n } else if ( 'wheelDeltaX' in e ) {\n wheelDeltaX = e.wheelDeltaX / 120 * this.options.mouseWheelSpeed;\n wheelDeltaY = e.wheelDeltaY / 120 * this.options.mouseWheelSpeed;\n } else if ( 'wheelDelta' in e ) {\n wheelDeltaX = wheelDeltaY = e.wheelDelta / 120 * this.options.mouseWheelSpeed;\n } else if ( 'detail' in e ) {\n wheelDeltaX = wheelDeltaY = -e.detail / 3 * this.options.mouseWheelSpeed;\n } else {\n return;\n }\n\n wheelDeltaX *= this.options.invertWheelDirection;\n wheelDeltaY *= this.options.invertWheelDirection;\n\n if ( !this.hasVerticalScroll ) {\n wheelDeltaX = wheelDeltaY;\n wheelDeltaY = 0;\n }\n\n if ( this.options.snap ) {\n newX = this.currentPage.pageX;\n newY = this.currentPage.pageY;\n\n if ( wheelDeltaX > 0 ) {\n newX--;\n } else if ( wheelDeltaX < 0 ) {\n newX++;\n }\n\n if ( wheelDeltaY > 0 ) {\n newY--;\n } else if ( wheelDeltaY < 0 ) {\n newY++;\n }\n\n this.goToPage(newX, newY);\n\n return;\n }\n\n newX = this.x + Math.round(this.hasHorizontalScroll ? wheelDeltaX : 0);\n newY = this.y + Math.round(this.hasVerticalScroll ? wheelDeltaY : 0);\n\n this.directionX = wheelDeltaX > 0 ? -1 : wheelDeltaX < 0 ? 1 : 0;\n this.directionY = wheelDeltaY > 0 ? -1 : wheelDeltaY < 0 ? 1 : 0;\n\n if ( newX > 0 ) {\n newX = 0;\n } else if ( newX < this.maxScrollX ) {\n newX = this.maxScrollX;\n }\n\n if ( newY > 0 ) {\n newY = 0;\n } else if ( newY < this.maxScrollY ) {\n newY = this.maxScrollY;\n }\n\n this.scrollTo(newX, newY, 0);\n\n// INSERT POINT: _wheel\n },\n\n _initSnap: function () {\n this.currentPage = {};\n\n if ( typeof this.options.snap == 'string' ) {\n this.options.snap = this.scroller.querySelectorAll(this.options.snap);\n }\n\n this.on('refresh', function () {\n var i = 0, l,\n m = 0, n,\n cx, cy,\n x = 0, y,\n stepX = this.options.snapStepX || this.wrapperWidth,\n stepY = this.options.snapStepY || this.wrapperHeight,\n el;\n\n this.pages = [];\n\n if ( !this.wrapperWidth || !this.wrapperHeight || !this.scrollerWidth || !this.scrollerHeight ) {\n return;\n }\n\n if ( this.options.snap === true ) {\n cx = Math.round( stepX / 2 );\n cy = Math.round( stepY / 2 );\n\n while ( x > -this.scrollerWidth ) {\n this.pages[i] = [];\n l = 0;\n y = 0;\n\n while ( y > -this.scrollerHeight ) {\n this.pages[i][l] = {\n x: Math.max(x, this.maxScrollX),\n y: Math.max(y, this.maxScrollY),\n width: stepX,\n height: stepY,\n cx: x - cx,\n cy: y - cy\n };\n\n y -= stepY;\n l++;\n }\n\n x -= stepX;\n i++;\n }\n } else {\n el = this.options.snap;\n l = el.length;\n n = -1;\n\n for ( ; i < l; i++ ) {\n if ( i === 0 || el[i].offsetLeft <= el[i-1].offsetLeft ) {\n m = 0;\n n++;\n }\n\n if ( !this.pages[m] ) {\n this.pages[m] = [];\n }\n\n x = Math.max(-el[i].offsetLeft, this.maxScrollX);\n y = Math.max(-el[i].offsetTop, this.maxScrollY);\n cx = x - Math.round(el[i].offsetWidth / 2);\n cy = y - Math.round(el[i].offsetHeight / 2);\n\n this.pages[m][n] = {\n x: x,\n y: y,\n width: el[i].offsetWidth,\n height: el[i].offsetHeight,\n cx: cx,\n cy: cy\n };\n\n if ( x > this.maxScrollX ) {\n m++;\n }\n }\n }\n\n this.goToPage(this.currentPage.pageX || 0, this.currentPage.pageY || 0, 0);\n\n // Update snap threshold if needed\n if ( this.options.snapThreshold % 1 === 0 ) {\n this.snapThresholdX = this.options.snapThreshold;\n this.snapThresholdY = this.options.snapThreshold;\n } else {\n this.snapThresholdX = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width * this.options.snapThreshold);\n this.snapThresholdY = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height * this.options.snapThreshold);\n }\n });\n\n this.on('flick', function () {\n var time = this.options.snapSpeed || Math.max(\n Math.max(\n Math.min(Math.abs(this.x - this.startX), 1000),\n Math.min(Math.abs(this.y - this.startY), 1000)\n ), 300);\n\n this.goToPage(\n this.currentPage.pageX + this.directionX,\n this.currentPage.pageY + this.directionY,\n time\n );\n });\n },\n\n _nearestSnap: function (x, y) {\n if ( !this.pages.length ) {\n return { x: 0, y: 0, pageX: 0, pageY: 0 };\n }\n\n var i = 0,\n l = this.pages.length,\n m = 0;\n\n // Check if we exceeded the snap threshold\n if ( Math.abs(x - this.absStartX) < this.snapThresholdX &&\n Math.abs(y - this.absStartY) < this.snapThresholdY ) {\n return this.currentPage;\n }\n\n if ( x > 0 ) {\n x = 0;\n } else if ( x < this.maxScrollX ) {\n x = this.maxScrollX;\n }\n\n if ( y > 0 ) {\n y = 0;\n } else if ( y < this.maxScrollY ) {\n y = this.maxScrollY;\n }\n\n for ( ; i < l; i++ ) {\n if ( x >= this.pages[i][0].cx ) {\n x = this.pages[i][0].x;\n break;\n }\n }\n\n l = this.pages[i].length;\n\n for ( ; m < l; m++ ) {\n if ( y >= this.pages[0][m].cy ) {\n y = this.pages[0][m].y;\n break;\n }\n }\n\n if ( i == this.currentPage.pageX ) {\n i += this.directionX;\n\n if ( i < 0 ) {\n i = 0;\n } else if ( i >= this.pages.length ) {\n i = this.pages.length - 1;\n }\n\n x = this.pages[i][0].x;\n }\n\n if ( m == this.currentPage.pageY ) {\n m += this.directionY;\n\n if ( m < 0 ) {\n m = 0;\n } else if ( m >= this.pages[0].length ) {\n m = this.pages[0].length - 1;\n }\n\n y = this.pages[0][m].y;\n }\n\n return {\n x: x,\n y: y,\n pageX: i,\n pageY: m\n };\n },\n\n goToPage: function (x, y, time, easing) {\n easing = easing || this.options.bounceEasing;\n\n if ( x >= this.pages.length ) {\n x = this.pages.length - 1;\n } else if ( x < 0 ) {\n x = 0;\n }\n\n if ( y >= this.pages[x].length ) {\n y = this.pages[x].length - 1;\n } else if ( y < 0 ) {\n y = 0;\n }\n\n var posX = this.pages[x][y].x,\n posY = this.pages[x][y].y;\n\n time = time === undefined ? this.options.snapSpeed || Math.max(\n Math.max(\n Math.min(Math.abs(posX - this.x), 1000),\n Math.min(Math.abs(posY - this.y), 1000)\n ), 300) : time;\n\n this.currentPage = {\n x: posX,\n y: posY,\n pageX: x,\n pageY: y\n };\n\n this.scrollTo(posX, posY, time, easing);\n },\n\n next: function (time, easing) {\n var x = this.currentPage.pageX,\n y = this.currentPage.pageY;\n\n x++;\n\n if ( x >= this.pages.length && this.hasVerticalScroll ) {\n x = 0;\n y++;\n }\n\n this.goToPage(x, y, time, easing);\n },\n\n prev: function (time, easing) {\n var x = this.currentPage.pageX,\n y = this.currentPage.pageY;\n\n x--;\n\n if ( x < 0 && this.hasVerticalScroll ) {\n x = 0;\n y--;\n }\n\n this.goToPage(x, y, time, easing);\n },\n\n _initKeys: function (e) {\n // default key bindings\n var keys = {\n pageUp: 33,\n pageDown: 34,\n end: 35,\n home: 36,\n left: 37,\n up: 38,\n right: 39,\n down: 40\n };\n var i;\n\n // if you give me characters I give you keycode\n if ( typeof this.options.keyBindings == 'object' ) {\n for ( i in this.options.keyBindings ) {\n if ( typeof this.options.keyBindings[i] == 'string' ) {\n this.options.keyBindings[i] = this.options.keyBindings[i].toUpperCase().charCodeAt(0);\n }\n }\n } else {\n this.options.keyBindings = {};\n }\n\n for ( i in keys ) {\n this.options.keyBindings[i] = this.options.keyBindings[i] || keys[i];\n }\n\n utils.addEvent(window, 'keydown', this);\n\n this.on('destroy', function () {\n utils.removeEvent(window, 'keydown', this);\n });\n },\n\n _key: function (e) {\n if ( !this.enabled ) {\n return;\n }\n\n var snap = this.options.snap, // we are using this alot, better to cache it\n newX = snap ? this.currentPage.pageX : this.x,\n newY = snap ? this.currentPage.pageY : this.y,\n now = utils.getTime(),\n prevTime = this.keyTime || 0,\n acceleration = 0.250,\n pos;\n\n if ( this.options.useTransition && this.isInTransition ) {\n pos = this.getComputedPosition();\n\n this._translate(Math.round(pos.x), Math.round(pos.y));\n this.isInTransition = false;\n }\n\n this.keyAcceleration = now - prevTime < 200 ? Math.min(this.keyAcceleration + acceleration, 50) : 0;\n\n switch ( e.keyCode ) {\n case this.options.keyBindings.pageUp:\n if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) {\n newX += snap ? 1 : this.wrapperWidth;\n } else {\n newY += snap ? 1 : this.wrapperHeight;\n }\n break;\n case this.options.keyBindings.pageDown:\n if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) {\n newX -= snap ? 1 : this.wrapperWidth;\n } else {\n newY -= snap ? 1 : this.wrapperHeight;\n }\n break;\n case this.options.keyBindings.end:\n newX = snap ? this.pages.length-1 : this.maxScrollX;\n newY = snap ? this.pages[0].length-1 : this.maxScrollY;\n break;\n case this.options.keyBindings.home:\n newX = 0;\n newY = 0;\n break;\n case this.options.keyBindings.left:\n newX += snap ? -1 : 5 + this.keyAcceleration>>0;\n break;\n case this.options.keyBindings.up:\n newY += snap ? 1 : 5 + this.keyAcceleration>>0;\n break;\n case this.options.keyBindings.right:\n newX -= snap ? -1 : 5 + this.keyAcceleration>>0;\n break;\n case this.options.keyBindings.down:\n newY -= snap ? 1 : 5 + this.keyAcceleration>>0;\n break;\n default:\n return;\n }\n\n if ( snap ) {\n this.goToPage(newX, newY);\n return;\n }\n\n if ( newX > 0 ) {\n newX = 0;\n this.keyAcceleration = 0;\n } else if ( newX < this.maxScrollX ) {\n newX = this.maxScrollX;\n this.keyAcceleration = 0;\n }\n\n if ( newY > 0 ) {\n newY = 0;\n this.keyAcceleration = 0;\n } else if ( newY < this.maxScrollY ) {\n newY = this.maxScrollY;\n this.keyAcceleration = 0;\n }\n\n this.scrollTo(newX, newY, 0);\n\n this.keyTime = now;\n },\n\n _animate: function (destX, destY, duration, easingFn) {\n var that = this,\n startX = this.x,\n startY = this.y,\n startTime = utils.getTime(),\n destTime = startTime + duration;\n\n function step () {\n var now = utils.getTime(),\n newX, newY,\n easing;\n\n if ( now >= destTime ) {\n that.isAnimating = false;\n that._translate(destX, destY);\n\n if ( !that.resetPosition(that.options.bounceTime) ) {\n that._execEvent('scrollEnd');\n }\n\n return;\n }\n\n now = ( now - startTime ) / duration;\n easing = easingFn(now);\n newX = ( destX - startX ) * easing + startX;\n newY = ( destY - startY ) * easing + startY;\n that._translate(newX, newY);\n\n if ( that.isAnimating ) {\n rAF(step);\n }\n }\n\n this.isAnimating = true;\n step();\n },\n handleEvent: function (e) {\n switch ( e.type ) {\n case 'touchstart':\n case 'pointerdown':\n case 'MSPointerDown':\n case 'mousedown':\n this._start(e);\n break;\n case 'touchmove':\n case 'pointermove':\n case 'MSPointerMove':\n case 'mousemove':\n this._move(e);\n break;\n case 'touchend':\n case 'pointerup':\n case 'MSPointerUp':\n case 'mouseup':\n case 'touchcancel':\n case 'pointercancel':\n case 'MSPointerCancel':\n case 'mousecancel':\n this._end(e);\n break;\n case 'orientationchange':\n case 'resize':\n this._resize();\n break;\n case 'transitionend':\n case 'webkitTransitionEnd':\n case 'oTransitionEnd':\n case 'MSTransitionEnd':\n this._transitionEnd(e);\n break;\n case 'wheel':\n case 'DOMMouseScroll':\n case 'mousewheel':\n this._wheel(e);\n break;\n case 'keydown':\n this._key(e);\n break;\n case 'click':\n if ( this.enabled && !e._constructed ) {\n e.preventDefault();\n e.stopPropagation();\n }\n break;\n }\n }\n};\nfunction createDefaultScrollbar (direction, interactive, type) {\n var scrollbar = document.createElement('div'),\n indicator = document.createElement('div');\n\n if ( type === true ) {\n scrollbar.style.cssText = 'position:absolute;z-index:9999';\n indicator.style.cssText = '-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px';\n }\n\n indicator.className = 'iScrollIndicator';\n\n if ( direction == 'h' ) {\n if ( type === true ) {\n scrollbar.style.cssText += ';height:7px;left:2px;right:2px;bottom:0';\n indicator.style.height = '100%';\n }\n scrollbar.className = 'iScrollHorizontalScrollbar';\n } else {\n if ( type === true ) {\n scrollbar.style.cssText += ';width:7px;bottom:2px;top:2px;right:1px';\n indicator.style.width = '100%';\n }\n scrollbar.className = 'iScrollVerticalScrollbar';\n }\n\n scrollbar.style.cssText += ';overflow:hidden';\n\n if ( !interactive ) {\n scrollbar.style.pointerEvents = 'none';\n }\n\n scrollbar.appendChild(indicator);\n\n return scrollbar;\n}\n\nfunction Indicator (scroller, options) {\n this.wrapper = typeof options.el == 'string' ? document.querySelector(options.el) : options.el;\n this.wrapperStyle = this.wrapper.style;\n this.indicator = this.wrapper.children[0];\n this.indicatorStyle = this.indicator.style;\n this.scroller = scroller;\n\n this.options = {\n listenX: true,\n listenY: true,\n interactive: false,\n resize: true,\n defaultScrollbars: false,\n shrink: false,\n fade: false,\n speedRatioX: 0,\n speedRatioY: 0\n };\n\n for ( var i in options ) {\n this.options[i] = options[i];\n }\n\n this.sizeRatioX = 1;\n this.sizeRatioY = 1;\n this.maxPosX = 0;\n this.maxPosY = 0;\n\n if ( this.options.interactive ) {\n if ( !this.options.disableTouch ) {\n utils.addEvent(this.indicator, 'touchstart', this);\n utils.addEvent(window, 'touchend', this);\n }\n if ( !this.options.disablePointer ) {\n utils.addEvent(this.indicator, utils.prefixPointerEvent('pointerdown'), this);\n utils.addEvent(window, utils.prefixPointerEvent('pointerup'), this);\n }\n if ( !this.options.disableMouse ) {\n utils.addEvent(this.indicator, 'mousedown', this);\n utils.addEvent(window, 'mouseup', this);\n }\n }\n\n if ( this.options.fade ) {\n this.wrapperStyle[utils.style.transform] = this.scroller.translateZ;\n var durationProp = utils.style.transitionDuration;\n if(!durationProp) {\n return;\n }\n this.wrapperStyle[durationProp] = utils.isBadAndroid ? '0.0001ms' : '0ms';\n // remove 0.0001ms\n var self = this;\n if(utils.isBadAndroid) {\n rAF(function() {\n if(self.wrapperStyle[durationProp] === '0.0001ms') {\n self.wrapperStyle[durationProp] = '0s';\n }\n });\n }\n this.wrapperStyle.opacity = '0';\n }\n}\n\nIndicator.prototype = {\n handleEvent: function (e) {\n switch ( e.type ) {\n case 'touchstart':\n case 'pointerdown':\n case 'MSPointerDown':\n case 'mousedown':\n this._start(e);\n break;\n case 'touchmove':\n case 'pointermove':\n case 'MSPointerMove':\n case 'mousemove':\n this._move(e);\n break;\n case 'touchend':\n case 'pointerup':\n case 'MSPointerUp':\n case 'mouseup':\n case 'touchcancel':\n case 'pointercancel':\n case 'MSPointerCancel':\n case 'mousecancel':\n this._end(e);\n break;\n }\n },\n\n destroy: function () {\n if ( this.options.fadeScrollbars ) {\n clearTimeout(this.fadeTimeout);\n this.fadeTimeout = null;\n }\n if ( this.options.interactive ) {\n utils.removeEvent(this.indicator, 'touchstart', this);\n utils.removeEvent(this.indicator, utils.prefixPointerEvent('pointerdown'), this);\n utils.removeEvent(this.indicator, 'mousedown', this);\n\n utils.removeEvent(window, 'touchmove', this);\n utils.removeEvent(window, utils.prefixPointerEvent('pointermove'), this);\n utils.removeEvent(window, 'mousemove', this);\n\n utils.removeEvent(window, 'touchend', this);\n utils.removeEvent(window, utils.prefixPointerEvent('pointerup'), this);\n utils.removeEvent(window, 'mouseup', this);\n }\n\n if ( this.options.defaultScrollbars ) {\n this.wrapper.parentNode.removeChild(this.wrapper);\n }\n },\n\n _start: function (e) {\n var point = e.touches ? e.touches[0] : e;\n\n e.preventDefault();\n e.stopPropagation();\n\n this.transitionTime();\n\n this.initiated = true;\n this.moved = false;\n this.lastPointX = point.pageX;\n this.lastPointY = point.pageY;\n\n this.startTime = utils.getTime();\n\n if ( !this.options.disableTouch ) {\n utils.addEvent(window, 'touchmove', this);\n }\n if ( !this.options.disablePointer ) {\n utils.addEvent(window, utils.prefixPointerEvent('pointermove'), this);\n }\n if ( !this.options.disableMouse ) {\n utils.addEvent(window, 'mousemove', this);\n }\n\n this.scroller._execEvent('beforeScrollStart');\n },\n\n _move: function (e) {\n var point = e.touches ? e.touches[0] : e,\n deltaX, deltaY,\n newX, newY,\n timestamp = utils.getTime();\n\n if ( !this.moved ) {\n this.scroller._execEvent('scrollStart');\n }\n\n this.moved = true;\n\n deltaX = point.pageX - this.lastPointX;\n this.lastPointX = point.pageX;\n\n deltaY = point.pageY - this.lastPointY;\n this.lastPointY = point.pageY;\n\n newX = this.x + deltaX;\n newY = this.y + deltaY;\n\n this._pos(newX, newY);\n\n// INSERT POINT: indicator._move\n\n e.preventDefault();\n e.stopPropagation();\n },\n\n _end: function (e) {\n if ( !this.initiated ) {\n return;\n }\n\n this.initiated = false;\n\n e.preventDefault();\n e.stopPropagation();\n\n utils.removeEvent(window, 'touchmove', this);\n utils.removeEvent(window, utils.prefixPointerEvent('pointermove'), this);\n utils.removeEvent(window, 'mousemove', this);\n\n if ( this.scroller.options.snap ) {\n var snap = this.scroller._nearestSnap(this.scroller.x, this.scroller.y);\n\n var time = this.options.snapSpeed || Math.max(\n Math.max(\n Math.min(Math.abs(this.scroller.x - snap.x), 1000),\n Math.min(Math.abs(this.scroller.y - snap.y), 1000)\n ), 300);\n\n if ( this.scroller.x != snap.x || this.scroller.y != snap.y ) {\n this.scroller.directionX = 0;\n this.scroller.directionY = 0;\n this.scroller.currentPage = snap;\n this.scroller.scrollTo(snap.x, snap.y, time, this.scroller.options.bounceEasing);\n }\n }\n\n if ( this.moved ) {\n this.scroller._execEvent('scrollEnd');\n }\n },\n\n transitionTime: function (time) {\n time = time || 0;\n var durationProp = utils.style.transitionDuration;\n if(!durationProp) {\n return;\n }\n\n this.indicatorStyle[durationProp] = time + 'ms';\n\n if ( !time && utils.isBadAndroid ) {\n this.indicatorStyle[durationProp] = '0.0001ms';\n // remove 0.0001ms\n var self = this;\n rAF(function() {\n if(self.indicatorStyle[durationProp] === '0.0001ms') {\n self.indicatorStyle[durationProp] = '0s';\n }\n });\n }\n },\n\n transitionTimingFunction: function (easing) {\n this.indicatorStyle[utils.style.transitionTimingFunction] = easing;\n },\n\n refresh: function () {\n this.transitionTime();\n\n if ( this.options.listenX && !this.options.listenY ) {\n this.indicatorStyle.display = this.scroller.hasHorizontalScroll ? 'block' : 'none';\n } else if ( this.options.listenY && !this.options.listenX ) {\n this.indicatorStyle.display = this.scroller.hasVerticalScroll ? 'block' : 'none';\n } else {\n this.indicatorStyle.display = this.scroller.hasHorizontalScroll || this.scroller.hasVerticalScroll ? 'block' : 'none';\n }\n\n if ( this.scroller.hasHorizontalScroll && this.scroller.hasVerticalScroll ) {\n utils.addClass(this.wrapper, 'iScrollBothScrollbars');\n utils.removeClass(this.wrapper, 'iScrollLoneScrollbar');\n\n if ( this.options.defaultScrollbars && this.options.customStyle ) {\n if ( this.options.listenX ) {\n this.wrapper.style.right = '8px';\n } else {\n this.wrapper.style.bottom = '8px';\n }\n }\n } else {\n utils.removeClass(this.wrapper, 'iScrollBothScrollbars');\n utils.addClass(this.wrapper, 'iScrollLoneScrollbar');\n\n if ( this.options.defaultScrollbars && this.options.customStyle ) {\n if ( this.options.listenX ) {\n this.wrapper.style.right = '2px';\n } else {\n this.wrapper.style.bottom = '2px';\n }\n }\n }\n\n var r = this.wrapper.offsetHeight; // force refresh\n\n if ( this.options.listenX ) {\n this.wrapperWidth = this.wrapper.clientWidth;\n if ( this.options.resize ) {\n this.indicatorWidth = Math.max(Math.round(this.wrapperWidth * this.wrapperWidth / (this.scroller.scrollerWidth || this.wrapperWidth || 1)), 8);\n this.indicatorStyle.width = this.indicatorWidth + 'px';\n } else {\n this.indicatorWidth = this.indicator.clientWidth;\n }\n\n this.maxPosX = this.wrapperWidth - this.indicatorWidth;\n\n if ( this.options.shrink == 'clip' ) {\n this.minBoundaryX = -this.indicatorWidth + 8;\n this.maxBoundaryX = this.wrapperWidth - 8;\n } else {\n this.minBoundaryX = 0;\n this.maxBoundaryX = this.maxPosX;\n }\n\n this.sizeRatioX = this.options.speedRatioX || (this.scroller.maxScrollX && (this.maxPosX / this.scroller.maxScrollX));\n }\n\n if ( this.options.listenY ) {\n this.wrapperHeight = this.wrapper.clientHeight;\n if ( this.options.resize ) {\n this.indicatorHeight = Math.max(Math.round(this.wrapperHeight * this.wrapperHeight / (this.scroller.scrollerHeight || this.wrapperHeight || 1)), 8);\n this.indicatorStyle.height = this.indicatorHeight + 'px';\n } else {\n this.indicatorHeight = this.indicator.clientHeight;\n }\n\n this.maxPosY = this.wrapperHeight - this.indicatorHeight;\n\n if ( this.options.shrink == 'clip' ) {\n this.minBoundaryY = -this.indicatorHeight + 8;\n this.maxBoundaryY = this.wrapperHeight - 8;\n } else {\n this.minBoundaryY = 0;\n this.maxBoundaryY = this.maxPosY;\n }\n\n this.maxPosY = this.wrapperHeight - this.indicatorHeight;\n this.sizeRatioY = this.options.speedRatioY || (this.scroller.maxScrollY && (this.maxPosY / this.scroller.maxScrollY));\n }\n\n this.updatePosition();\n },\n\n updatePosition: function () {\n var x = this.options.listenX && Math.round(this.sizeRatioX * this.scroller.x) || 0,\n y = this.options.listenY && Math.round(this.sizeRatioY * this.scroller.y) || 0;\n\n if ( !this.options.ignoreBoundaries ) {\n if ( x < this.minBoundaryX ) {\n if ( this.options.shrink == 'scale' ) {\n this.width = Math.max(this.indicatorWidth + x, 8);\n this.indicatorStyle.width = this.width + 'px';\n }\n x = this.minBoundaryX;\n } else if ( x > this.maxBoundaryX ) {\n if ( this.options.shrink == 'scale' ) {\n this.width = Math.max(this.indicatorWidth - (x - this.maxPosX), 8);\n this.indicatorStyle.width = this.width + 'px';\n x = this.maxPosX + this.indicatorWidth - this.width;\n } else {\n x = this.maxBoundaryX;\n }\n } else if ( this.options.shrink == 'scale' && this.width != this.indicatorWidth ) {\n this.width = this.indicatorWidth;\n this.indicatorStyle.width = this.width + 'px';\n }\n\n if ( y < this.minBoundaryY ) {\n if ( this.options.shrink == 'scale' ) {\n this.height = Math.max(this.indicatorHeight + y * 3, 8);\n this.indicatorStyle.height = this.height + 'px';\n }\n y = this.minBoundaryY;\n } else if ( y > this.maxBoundaryY ) {\n if ( this.options.shrink == 'scale' ) {\n this.height = Math.max(this.indicatorHeight - (y - this.maxPosY) * 3, 8);\n this.indicatorStyle.height = this.height + 'px';\n y = this.maxPosY + this.indicatorHeight - this.height;\n } else {\n y = this.maxBoundaryY;\n }\n } else if ( this.options.shrink == 'scale' && this.height != this.indicatorHeight ) {\n this.height = this.indicatorHeight;\n this.indicatorStyle.height = this.height + 'px';\n }\n }\n\n this.x = x;\n this.y = y;\n\n if ( this.scroller.options.useTransform ) {\n this.indicatorStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.scroller.translateZ;\n } else {\n this.indicatorStyle.left = x + 'px';\n this.indicatorStyle.top = y + 'px';\n }\n },\n\n _pos: function (x, y) {\n if ( x < 0 ) {\n x = 0;\n } else if ( x > this.maxPosX ) {\n x = this.maxPosX;\n }\n\n if ( y < 0 ) {\n y = 0;\n } else if ( y > this.maxPosY ) {\n y = this.maxPosY;\n }\n\n x = this.options.listenX ? Math.round(x / this.sizeRatioX) : this.scroller.x;\n y = this.options.listenY ? Math.round(y / this.sizeRatioY) : this.scroller.y;\n\n this.scroller.scrollTo(x, y);\n },\n\n fade: function (val, hold) {\n if ( hold && !this.visible ) {\n return;\n }\n\n clearTimeout(this.fadeTimeout);\n this.fadeTimeout = null;\n\n var time = val ? 250 : 500,\n delay = val ? 0 : 300;\n\n val = val ? '1' : '0';\n\n this.wrapperStyle[utils.style.transitionDuration] = time + 'ms';\n\n this.fadeTimeout = setTimeout((function (val) {\n this.wrapperStyle.opacity = val;\n this.visible = +val;\n }).bind(this, val), delay);\n }\n};\n\nIScroll.utils = utils;\n\nif ( typeof module != 'undefined' && module.exports ) {\n module.exports = IScroll;\n} else if ( typeof define == 'function' && define.amd ) {\n define( function () { return IScroll; } );\n} else {\n window.IScroll = IScroll;\n}\n\n})(window, document, Math);\n\n/*!\n * fullPage ScrollOverflow\n * https://github.com/alvarotrigo/fullPage.js\n * @license MIT licensed\n *\n * Copyright (C) 2015 alvarotrigo.com - A project by Alvaro Trigo\n */\n(function(window, $) {\n var ACTIVE = 'active';\n var ACTIVE_SEL = '.' + ACTIVE;\n\n var SECTION = 'fp-section';\n var SECTION_SEL = '.' + SECTION;\n var SECTION_ACTIVE_SEL = SECTION_SEL + ACTIVE_SEL;\n\n var SLIDE = 'fp-slide';\n var SLIDE_SEL = '.' + SLIDE;\n var SLIDE_ACTIVE_SEL = SLIDE_SEL + ACTIVE_SEL;\n var SLIDES_WRAPPER = 'fp-slides';\n var SLIDES_WRAPPER_SEL = '.' + SLIDES_WRAPPER;\n\n // scrolloverflow\n var SCROLLABLE = 'fp-scrollable';\n var SCROLLABLE_SEL = '.' + SCROLLABLE;\n\n if(typeof IScroll !== 'undefined'){\n /*\n * Turns iScroll `mousewheel` option off dynamically\n * https://github.com/cubiq/iscroll/issues/1036\n */\n IScroll.prototype.wheelOn = function () {\n this.wrapper.addEventListener('wheel', this);\n this.wrapper.addEventListener('mousewheel', this);\n this.wrapper.addEventListener('DOMMouseScroll', this);\n };\n\n /*\n * Turns iScroll `mousewheel` option on dynamically\n * https://github.com/cubiq/iscroll/issues/1036\n */\n IScroll.prototype.wheelOff = function () {\n this.wrapper.removeEventListener('wheel', this);\n this.wrapper.removeEventListener('mousewheel', this);\n this.wrapper.removeEventListener('DOMMouseScroll', this);\n };\n }\n\n /**\n * An object to handle overflow scrolling.\n * This uses jquery.slimScroll to accomplish overflow scrolling.\n * It is possible to pass in an alternate scrollOverflowHandler\n * to the fullpage.js option that implements the same functions\n * as this handler.\n *\n * @type {Object}\n */\n window.iscrollHandler = {\n refreshId: null,\n iScrollInstances: [],\n\n // Enables or disables the mouse wheel for the active section or all slides in it\n toggleWheel: function(value){\n var scrollable = $(SECTION_ACTIVE_SEL).find(SCROLLABLE_SEL);\n scrollable.each(function(){\n var iScrollInstance = $(this).data('iscrollInstance');\n if(typeof iScrollInstance !== 'undefined' && iScrollInstance){\n if(value){\n iScrollInstance.wheelOn();\n }\n else{\n iScrollInstance.wheelOff();\n }\n }\n });\n },\n\n /**\n * Turns off iScroll for the destination section.\n * When scrolling very fast on some trackpads (and Apple laptops) the inertial scrolling would\n * scroll the destination section/slide before the sections animations ends.\n */\n onLeave: function(){\n iscrollHandler.toggleWheel(false);\n },\n\n // Turns off iScroll for the leaving section\n beforeLeave: function(){\n iscrollHandler.onLeave()\n },\n\n // Turns on iScroll on section load\n afterLoad: function(){\n iscrollHandler.toggleWheel(true);\n },\n\n /**\n * Called when overflow scrolling is needed for a section.\n *\n * @param {Object} element jQuery object containing current section\n * @param {Number} scrollHeight Current window height in pixels\n */\n create: function(element, scrollHeight, scrollOverflowOptions) {\n var scrollable = element.find(SCROLLABLE_SEL);\n\n scrollable.height(scrollHeight);\n scrollable.each(function() {\n var $this = $(this);\n var iScrollInstance = $this.data('iscrollInstance');\n if (iScrollInstance) {\n $.each(iscrollHandler.iScrollInstances, function(){\n $(this).destroy();\n });\n }\n\n iScrollInstance = new IScroll($this.get(0), scrollOverflowOptions);\n\n iScrollInstance.on('scrollEnd', function() {\n this['fp_isAtTop'] = this.y > -30;\n this['fp_isAtEnd'] = this.y - this.maxScrollY < 30;\n });\n\n iscrollHandler.iScrollInstances.push(iScrollInstance);\n\n //off by default until the section gets active\n iScrollInstance.wheelOff();\n\n $this.data('iscrollInstance', iScrollInstance);\n });\n },\n\n /**\n * Return a boolean depending on whether the scrollable element is a\n * the end or at the start of the scrolling depending on the given type.\n *\n * @param {String} type Either 'top' or 'bottom'\n * @param {Object} scrollable jQuery object for the scrollable element\n * @return {Boolean}\n */\n isScrolled: function(type, scrollable) {\n var scroller = scrollable.data('iscrollInstance');\n\n //no scroller?\n if (!scroller) {\n return true;\n }\n\n if (type === 'top') {\n return scroller.y >= 0 && !scrollable.scrollTop();\n } else if (type === 'bottom') {\n return (0 - scroller.y) + scrollable.scrollTop() + 1 + scrollable.innerHeight() >= scrollable[0].scrollHeight;\n }\n },\n\n /**\n * Returns the scrollable element for the given section.\n * If there are landscape slides, will only return a scrollable element\n * if it is in the active slide.\n *\n * @param {Object} activeSection jQuery object containing current section\n * @return {Boolean}\n */\n scrollable: function(activeSection){\n // if there are landscape slides, we check if the scrolling bar is in the current one or not\n if (activeSection.find(SLIDES_WRAPPER_SEL).length) {\n return activeSection.find(SLIDE_ACTIVE_SEL).find(SCROLLABLE_SEL);\n }\n return activeSection.find(SCROLLABLE_SEL);\n },\n\n /**\n * Returns the scroll height of the wrapped content.\n * If this is larger than the window height minus section padding,\n * overflow scrolling is needed.\n *\n * @param {Object} element jQuery object containing current section\n * @return {Number}\n */\n scrollHeight: function(element) {\n return element.find(SCROLLABLE_SEL).children().first().get(0).scrollHeight;\n },\n\n /**\n * Called when overflow scrolling is no longer needed for a section.\n *\n * @param {Object} element jQuery object containing current section\n */\n remove: function(element) {\n var scrollable = element.find(SCROLLABLE_SEL);\n if (scrollable.length) {\n var iScrollInstance = scrollable.data('iscrollInstance');\n if(iScrollInstance){\n iScrollInstance.destroy();\n }\n\n scrollable.data('iscrollInstance', null);\n }\n element.find(SCROLLABLE_SEL).children().first().children().first().unwrap().unwrap();\n },\n\n /**\n * Called when overflow scrolling has already been setup but the\n * window height has potentially changed.\n *\n * @param {Object} element jQuery object containing current section\n * @param {Number} scrollHeight Current window height in pixels\n */\n update: function(element, scrollHeight) {\n //using a timeout in order to execute the refresh function only once when `update` is called multiple times in a\n //short period of time.\n //it also comes on handy because iScroll requires the use of timeout when using `refresh`.\n clearTimeout(iscrollHandler.refreshId);\n iscrollHandler.refreshId = setTimeout(function(){\n $.each(iscrollHandler.iScrollInstances, function(){\n $(this).get(0).refresh();\n });\n }, 150);\n\n //updating the wrappers height\n element.find(SCROLLABLE_SEL).css('height', scrollHeight + 'px').parent().css('height', scrollHeight + 'px');\n },\n\n /**\n * Called to get any additional elements needed to wrap the section\n * content in order to facilitate overflow scrolling.\n *\n * @return {String|Object} Can be a string containing HTML,\n * a DOM element, or jQuery object.\n */\n wrapContent: function() {\n return '
';\n }\n };\n})(window, jQuery);\n\n\n// scrolloverflow module\n(function (window, document, $) {\n $.fn.fp_scrolloverflow = (function() {\n\n // keeping central set of classnames and selectors\n var SCROLLABLE = 'fp-scrollable';\n var SCROLLABLE_SEL = '.' + SCROLLABLE;\n\n var ACTIVE = 'active';\n var ACTIVE_SEL = '.' + ACTIVE;\n\n var SECTION = 'fp-section';\n var SECTION_SEL = '.' + SECTION;\n var SECTION_ACTIVE_SEL = SECTION_SEL + ACTIVE_SEL;\n\n var SLIDE = 'fp-slide';\n var SLIDE_SEL = '.' + SLIDE;\n var SLIDE_ACTIVE_SEL = SLIDE_SEL + ACTIVE_SEL;\n\n var SLIDES_WRAPPER = 'fp-slides';\n var SLIDES_WRAPPER_SEL = '.' + SLIDES_WRAPPER;\n\n var TABLE_CELL = 'fp-tableCell';\n var TABLE_CELL_SEL = '.' + TABLE_CELL;\n\n var RESPONSIVE = 'fp-responsive';\n var AUTO_HEIGHT_RESPONSIVE= 'fp-auto-height-responsive';\n\n /*\n * Turns iScroll `mousewheel` option off dynamically\n * https://github.com/cubiq/iscroll/issues/1036\n */\n IScroll.prototype.wheelOn = function () {\n this.wrapper.addEventListener('wheel', this);\n this.wrapper.addEventListener('mousewheel', this);\n this.wrapper.addEventListener('DOMMouseScroll', this);\n };\n\n /*\n * Turns iScroll `mousewheel` option on dynamically\n * https://github.com/cubiq/iscroll/issues/1036\n */\n IScroll.prototype.wheelOff = function () {\n this.wrapper.removeEventListener('wheel', this);\n this.wrapper.removeEventListener('mousewheel', this);\n this.wrapper.removeEventListener('DOMMouseScroll', this);\n };\n\n\n function scrollBarHandler(){\n var self = this;\n self.options = null;\n\n self.init = function(options, iscrollOptions){\n self.options = options;\n self.iscrollOptions = iscrollOptions;\n\n if(document.readyState === 'complete'){\n createScrollBarForAll();\n $.fn.fullpage.shared.afterRenderActions();\n }\n //after DOM and images are loaded\n $(window).on('load', function(){\n createScrollBarForAll();\n $.fn.fullpage.shared.afterRenderActions();\n });\n\n return self;\n };\n\n /**\n * Creates the scrollbar for the sections and slides in the site\n */\n function createScrollBarForAll(){\n if($('body').hasClass(RESPONSIVE)){\n removeResponsiveScrollOverflows();\n }\n else{\n forEachSectionAndSlide(createScrollBar);\n }\n }\n\n /**\n * Returns an integer representing the padding dimensions in px.\n */\n function getPaddings(element){\n var section = element.closest(SECTION_SEL);\n if(section.length){\n return parseInt(section.css('padding-bottom')) + parseInt(section.css('padding-top'));\n }\n return 0;\n }\n\n /**\n * Checks if the element needs scrollbar and if the user wants to apply it.\n * If so it creates it.\n *\n * @param {Object} element jQuery object of the section or slide\n */\n function createScrollBar(element){\n //User doesn't want scrollbar here? Sayonara baby!\n if(element.hasClass('fp-noscroll')) return;\n\n //necessary to make `scrollHeight` work under Opera 12\n element.css('overflow', 'hidden');\n\n var scrollOverflowHandler = self.options.scrollOverflowHandler;\n var wrap = scrollOverflowHandler.wrapContent();\n var section = element.closest(SECTION_SEL); //in case element is a slide\n var scrollable = scrollOverflowHandler.scrollable(element);\n var contentHeight;\n var paddings = getPaddings(section);\n\n //if there was scroll, the contentHeight will be the one in the scrollable section\n if(scrollable.length){\n contentHeight = scrollOverflowHandler.scrollHeight(element);\n }\n else{\n contentHeight = element.get(0).scrollHeight - paddings;\n if(self.options.verticalCentered){\n contentHeight = element.find(TABLE_CELL_SEL).get(0).scrollHeight - paddings;\n }\n }\n\n var scrollHeight = $(window).height() - paddings;\n\n //needs scroll?\n if ( contentHeight > scrollHeight) {\n //did we already have an scrollbar ? Updating it\n if(scrollable.length){\n scrollOverflowHandler.update(element, scrollHeight);\n }\n //creating the scrolling\n else{\n if(self.options.verticalCentered){\n element.find(TABLE_CELL_SEL).wrapInner(wrap);\n }else{\n element.wrapInner(wrap);\n }\n scrollOverflowHandler.create(element, scrollHeight, self.iscrollOptions);\n }\n }\n //removing the scrolling when it is not necessary anymore\n else{\n scrollOverflowHandler.remove(element);\n }\n\n //undo\n element.css('overflow', '');\n }\n\n /**\n * Applies a callback function to each section in the site\n * or the slides within them\n */\n function forEachSectionAndSlide(callback){\n $(SECTION_SEL).each(function(){\n var slides = $(this).find(SLIDE_SEL);\n\n if(slides.length){\n slides.each(function(){\n callback($(this));\n });\n }else{\n callback($(this));\n }\n });\n }\n\n /**\n * Removes scrollOverflow for sections using the class `fp-auto-height-responsive`\n */\n function removeResponsiveScrollOverflows(){\n var scrollOverflowHandler = self.options.scrollOverflowHandler;\n forEachSectionAndSlide(function(element){\n if(element.closest(SECTION_SEL).hasClass(AUTO_HEIGHT_RESPONSIVE)){\n scrollOverflowHandler.remove(element);\n }\n });\n }\n\n //public functions\n self.createScrollBarForAll = createScrollBarForAll;\n }\n\n /**\n * An object to handle overflow scrolling.\n * This uses jquery.slimScroll to accomplish overflow scrolling.\n * It is possible to pass in an alternate scrollOverflowHandler\n * to the fullpage.js option that implements the same functions\n * as this handler.\n *\n * @type {Object}\n */\n var iscrollHandler = {\n refreshId: null,\n iScrollInstances: [],\n\n // Default options for iScroll.js used when using scrollOverflow\n iscrollOptions: {\n scrollbars: true,\n mouseWheel: true,\n hideScrollbars: false,\n fadeScrollbars: false,\n disableMouse: true,\n interactiveScrollbars: true\n },\n\n init: function(options){\n var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0) || (navigator.maxTouchPoints));\n\n //fixing bug in iScroll with links: https://github.com/cubiq/iscroll/issues/783\n iscrollHandler.iscrollOptions.click = isTouch; // see #2035\n\n //extending iScroll options with the user custom ones\n iscrollHandler.iscrollOptions = $.extend(iscrollHandler.iscrollOptions, options.scrollOverflowOptions);\n\n return new scrollBarHandler().init(options, iscrollHandler.iscrollOptions);\n },\n\n // Enables or disables the mouse wheel for the active section or all slides in it\n toggleWheel: function(value){\n var scrollable = $(SECTION_ACTIVE_SEL).find(SCROLLABLE_SEL);\n scrollable.each(function(){\n var iScrollInstance = $(this).data('iscrollInstance');\n if(typeof iScrollInstance !== 'undefined' && iScrollInstance){\n if(value){\n iScrollInstance.wheelOn();\n }\n else{\n iScrollInstance.wheelOff();\n }\n }\n });\n },\n\n /**\n * Turns off iScroll for the destination section.\n * When scrolling very fast on some trackpads (and Apple laptops) the inertial scrolling would\n * scroll the destination section/slide before the sections animations ends.\n */\n onLeave: function(){\n iscrollHandler.toggleWheel(false);\n },\n\n // Turns off iScroll for the leaving section\n beforeLeave: function(){\n iscrollHandler.onLeave()\n },\n\n // Turns on iScroll on section load\n afterLoad: function(){\n iscrollHandler.toggleWheel(true);\n },\n\n /**\n * Called when overflow scrolling is needed for a section.\n *\n * @param {Object} element jQuery object containing current section\n * @param {Number} scrollHeight Current window height in pixels\n */\n create: function(element, scrollHeight, iscrollOptions) {\n var scrollable = element.find(SCROLLABLE_SEL);\n\n scrollable.height(scrollHeight);\n scrollable.each(function() {\n var $this = $(this);\n var iScrollInstance = $this.data('iscrollInstance');\n if (iScrollInstance) {\n $.each(iscrollHandler.iScrollInstances, function(){\n $(this).destroy();\n });\n }\n\n iScrollInstance = new IScroll($this.get(0), iscrollOptions);\n iscrollHandler.iScrollInstances.push(iScrollInstance);\n\n //off by default until the section gets active\n iScrollInstance.wheelOff();\n\n $this.data('iscrollInstance', iScrollInstance);\n });\n },\n\n /**\n * Return a boolean depending on whether the scrollable element is a\n * the end or at the start of the scrolling depending on the given type.\n *\n * @param {String} type Either 'top' or 'bottom'\n * @param {Object} scrollable jQuery object for the scrollable element\n * @return {Boolean}\n */\n isScrolled: function(type, scrollable) {\n var scroller = scrollable.data('iscrollInstance');\n\n //no scroller?\n if (!scroller) {\n return true;\n }\n\n if (type === 'top') {\n return scroller.y >= 0 && !scrollable.scrollTop();\n } else if (type === 'bottom') {\n return (0 - scroller.y) + scrollable.scrollTop() + 1 + scrollable.innerHeight() >= scrollable[0].scrollHeight;\n }\n },\n\n /**\n * Returns the scrollable element for the given section.\n * If there are landscape slides, will only return a scrollable element\n * if it is in the active slide.\n *\n * @param {Object} activeSection jQuery object containing current section\n * @return {Boolean}\n */\n scrollable: function(activeSection){\n // if there are landscape slides, we check if the scrolling bar is in the current one or not\n if (activeSection.find(SLIDES_WRAPPER_SEL).length) {\n return activeSection.find(SLIDE_ACTIVE_SEL).find(SCROLLABLE_SEL);\n }\n return activeSection.find(SCROLLABLE_SEL);\n },\n\n /**\n * Returns the scroll height of the wrapped content.\n * If this is larger than the window height minus section padding,\n * overflow scrolling is needed.\n *\n * @param {Object} element jQuery object containing current section\n * @return {Number}\n */\n scrollHeight: function(element) {\n return element.find(SCROLLABLE_SEL).children().first().get(0).scrollHeight;\n },\n\n /**\n * Called when overflow scrolling is no longer needed for a section.\n *\n * @param {Object} element jQuery object containing current section\n */\n remove: function(element) {\n var scrollable = element.find(SCROLLABLE_SEL);\n if (scrollable.length) {\n var iScrollInstance = scrollable.data('iscrollInstance');\n iScrollInstance.destroy();\n\n scrollable.data('iscrollInstance', null);\n }\n element.find(SCROLLABLE_SEL).children().first().children().first().unwrap().unwrap();\n },\n\n /**\n * Called when overflow scrolling has already been setup but the\n * window height has potentially changed.\n *\n * @param {Object} element jQuery object containing current section\n * @param {Number} scrollHeight Current window height in pixels\n */\n update: function(element, scrollHeight) {\n //using a timeout in order to execute the refresh function only once when `update` is called multiple times in a\n //short period of time.\n //it also comes on handy because iScroll requires the use of timeout when using `refresh`.\n clearTimeout(iscrollHandler.refreshId);\n iscrollHandler.refreshId = setTimeout(function(){\n $.each(iscrollHandler.iScrollInstances, function(){\n $(this).get(0).refresh();\n\n //ugly hack that we are forced to use due to the timeout delay\n //otherwise done on the fullpage.js reBuild function\n $.fn.fullpage.silentMoveTo($(SECTION_ACTIVE_SEL).index() + 1);\n });\n }, 150);\n\n //updating the wrappers height\n element.find(SCROLLABLE_SEL)\n .css('height', scrollHeight + 'px')\n .parent().css('height', scrollHeight + getPaddings(element) + 'px');\n },\n\n /**\n * Called to get any additional elements needed to wrap the section\n * content in order to facilitate overflow scrolling.\n *\n * @return {String|Object} Can be a string containing HTML,\n * a DOM element, or jQuery object.\n */\n wrapContent: function() {\n return '
';\n }\n };\n\n return {\n iscrollHandler: iscrollHandler\n };\n })();\n})(window, document, jQuery);"]} \ No newline at end of file +{"version":3,"sources":["scrolloverflow.js"],"names":["window","document","Math","rAF","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","callback","setTimeout","utils","me","_elementStyle","createElement","style","_vendor","vendors","i","l","length","substr","_prefixStyle","charAt","toUpperCase","getTime","Date","now","extend","target","obj","addEvent","el","type","fn","capture","addEventListener","removeEvent","removeEventListener","prefixPointerEvent","pointerEvent","MSPointerEvent","momentum","current","start","time","lowerMargin","wrapperSize","deceleration","destination","duration","distance","speed","abs","undefined","round","_transform","hasTransform","hasPerspective","hasTouch","hasPointer","PointerEvent","hasTransition","isBadAndroid","appVersion","navigator","test","safariVersion","match","parseFloat","transform","transitionTimingFunction","transitionDuration","transitionDelay","transformOrigin","hasClass","e","c","RegExp","className","addClass","newclass","split","push","join","removeClass","re","replace","offset","left","offsetLeft","top","offsetTop","offsetParent","preventDefaultException","exceptions","eventType","touchstart","touchmove","touchend","mousedown","mousemove","mouseup","pointerdown","pointermove","pointerup","MSPointerDown","MSPointerMove","MSPointerUp","ease","quadratic","k","circular","sqrt","back","bounce","elastic","pow","sin","f","PI","tap","eventName","ev","createEvent","initEvent","pageX","pageY","dispatchEvent","click","tagName","MouseEvent","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","_constructed","IScroll","options","this","wrapper","querySelector","scroller","children","scrollerStyle","resizeScrollbars","mouseWheelSpeed","snapThreshold","disablePointer","disableTouch","disableMouse","startX","startY","scrollY","directionLockThreshold","bounceTime","bounceEasing","preventDefault","HWCompositing","useTransition","useTransform","bindToWrapper","onmousedown","translateZ","eventPassthrough","scrollX","freeScroll","resizePolling","position","shrinkScrollbars","invertWheelDirection","x","y","directionX","directionY","_events","_init","refresh","scrollTo","enable","createDefaultScrollbar","direction","interactive","scrollbar","indicator","cssText","height","width","pointerEvents","appendChild","Indicator","wrapperStyle","indicatorStyle","listenX","listenY","resize","defaultScrollbars","shrink","fade","speedRatioX","speedRatioY","sizeRatioX","sizeRatioY","maxPosX","maxPosY","durationProp","self","opacity","prototype","version","_initEvents","scrollbars","indicators","_initIndicators","mouseWheel","_initWheel","snap","_initSnap","keyBindings","_initKeys","destroy","clearTimeout","resizeTimeout","_execEvent","_transitionEnd","isInTransition","_transitionTime","resetPosition","_start","which","enabled","initiated","pos","point","touches","moved","distX","distY","directionLocked","startTime","getComputedPosition","_translate","isAnimating","absStartX","absStartY","pointX","pointY","_move","newX","newY","absDistX","absDistY","deltaX","deltaY","timestamp","endTime","hasHorizontalScroll","hasVerticalScroll","maxScrollX","maxScrollY","_end","changedTouches","momentumX","momentumY","distanceX","distanceY","easing","flick","firstStepDeceleration","wrapperWidth","wrapperHeight","max","_nearestSnap","currentPage","snapSpeed","min","_resize","that","disable","offsetHeight","clientWidth","clientHeight","scrollerWidth","offsetWidth","scrollerHeight","wrapperOffset","on","off","index","indexOf","splice","apply","slice","call","arguments","scrollBy","transitionType","_transitionTimingFunction","_animate","scrollToElement","offsetX","offsetY","nodeType","transitionTime","updatePosition","remove","matrix","getComputedStyle","interactiveScrollbars","customStyle","fadeScrollbars","concat","_indicatorsMap","wheelTimeout","_wheel","wheelDeltaX","wheelDeltaY","deltaMode","wheelDelta","goToPage","querySelectorAll","n","cx","cy","m","stepX","snapStepX","stepY","snapStepY","pages","snapThresholdX","snapThresholdY","posX","posY","next","prev","keys","pageUp","pageDown","end","home","up","right","down","charCodeAt","_key","prevTime","keyTime","keyAcceleration","keyCode","destX","destY","easingFn","destTime","step","handleEvent","stopPropagation","fadeTimeout","parentNode","removeChild","lastPointX","lastPointY","_pos","display","bottom","indicatorWidth","minBoundaryX","maxBoundaryX","indicatorHeight","minBoundaryY","maxBoundaryY","ignoreBoundaries","val","hold","visible","delay","bind","module","exports","define","amd","$","fp_scrolloverflow","SCROLLABLE","SCROLLABLE_SEL","ACTIVE_SEL","SECTION_SEL","SECTION_ACTIVE_SEL","SLIDE_SEL","SLIDE_ACTIVE_SEL","TABLE_CELL_SEL","RESPONSIVE","AUTO_HEIGHT_RESPONSIVE","getPaddings","element","section","closest","parseInt","css","scrollBarHandler","createScrollBarForAll","scrollOverflowHandler","forEachSectionAndSlide","createScrollBar","contentHeight","wrap","wrapContent","scrollable","paddings","scrollHeight","get","verticalCentered","find","update","wrapInner","create","iscrollOptions","each","slides","init","readyState","fullpage","shared","afterRenderActions","wheelOn","wheelOff","iscrollHandler","refreshId","iScrollInstances","hideScrollbars","isTouch","msMaxTouchPoints","scrollOverflowOptions","toggleWheel","value","iScrollInstance","data","onLeave","beforeLeave","afterLoad","$this","isScrolled","scrollTop","innerHeight","activeSection","first","unwrap","silentMoveTo","parent","jQuery"],"mappings":";;;;;CAMA,SAAWA,EAAQC,EAAUC,GAC7B,IAAIC,EAAMH,EAAOI,uBACbJ,EAAOK,6BACPL,EAAOM,0BACPN,EAAOO,wBACPP,EAAOQ,yBACP,SAAUC,GAAYT,EAAOU,WAAWD,EAAU,IAAO,KAEzDE,EAAQ,WACR,IAAIC,KAEAC,EAAgBZ,EAASa,cAAc,OAAOC,MAC9CC,EAAU,WAMV,IALA,IAAIC,GAAW,IAAK,UAAW,OAAQ,MAAO,MAE1CC,EAAI,EACJC,EAAIF,EAAQG,OAERF,EAAIC,EAAGD,IAEX,GADYD,EAAQC,GAAK,aACPL,EAAgB,OAAOI,EAAQC,GAAGG,OAAO,EAAGJ,EAAQC,GAAGE,OAAO,GAGpF,OAAO,EAXG,GAcd,SAASE,EAAcP,GACnB,OAAiB,IAAZC,IACY,KAAZA,EAAwBD,EACtBC,EAAUD,EAAMQ,OAAO,GAAGC,cAAgBT,EAAMM,OAAO,IAGlET,EAAGa,QAAUC,KAAKC,KAAO,WAAsB,OAAO,IAAID,MAAOD,WAEjEb,EAAGgB,OAAS,SAAUC,EAAQC,GAC1B,IAAM,IAAIZ,KAAKY,EACXD,EAAOX,GAAKY,EAAIZ,IAIxBN,EAAGmB,SAAW,SAAUC,EAAIC,EAAMC,EAAIC,GAClCH,EAAGI,iBAAiBH,EAAMC,IAAMC,IAGpCvB,EAAGyB,YAAc,SAAUL,EAAIC,EAAMC,EAAIC,GACrCH,EAAGM,oBAAoBL,EAAMC,IAAMC,IAGvCvB,EAAG2B,mBAAqB,SAAUC,GAC9B,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AEvC1C,EAAQkB,KAAK5B,GAAgBjP,WAAW8S,QAAQ9S,WAAW8S,QAAQC,SAASA,UAUhFjC,OAAQ,SAASnB,EAASe,GAItB5L,aAAa6M,EAAeC,WAC5BD,EAAeC,UAAYza,WAAW,WAClC2X,EAAEoC,KAAKS,EAAeE,iBAAkB,WACpC/C,EAAElP,MAAM+Q,IAAI,GAAGzO,UAIf4M,EAAEnW,GAAG2Y,SAAS0B,aAAalE,EAAEM,GAAoBnG,QAAU,MAEhE,KAGH0G,EAAQkB,KAAK5B,GACRc,IAAI,SAAUW,EAAe,MAC7BuC,SAASlD,IAAI,SAAUW,EAAehB,EAAYC,GAAW,OAUtEY,YAAa,WACT,MAAO,eAAiBvB,EAAa,4CAI7C,OACI2C,eAAgBA,GAzYC,GAD7B,CA6YGlb,OAAQC,SAAUwc","file":"scrolloverflow.min.js","sourcesContent":["/**\n* Customized version of iScroll.js 0.0.8\n* It fixes bugs affecting its integration with fullpage.js\n* @license\n*/\n/*! iScroll v5.2.0 ~ (c) 2008-2016 Matteo Spinelli ~ http://cubiq.org/license */\n(function (window, document, Math) {\nvar rAF = window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.oRequestAnimationFrame ||\n window.msRequestAnimationFrame ||\n function (callback) { window.setTimeout(callback, 1000 / 60); };\n\nvar utils = (function () {\n var me = {};\n\n var _elementStyle = document.createElement('div').style;\n var _vendor = (function () {\n var vendors = ['t', 'webkitT', 'MozT', 'msT', 'OT'],\n transform,\n i = 0,\n l = vendors.length;\n\n for ( ; i < l; i++ ) {\n transform = vendors[i] + 'ransform';\n if ( transform in _elementStyle ) return vendors[i].substr(0, vendors[i].length-1);\n }\n\n return false;\n })();\n\n function _prefixStyle (style) {\n if ( _vendor === false ) return false;\n if ( _vendor === '' ) return style;\n return _vendor + style.charAt(0).toUpperCase() + style.substr(1);\n }\n\n me.getTime = Date.now || function getTime () { return new Date().getTime(); };\n\n me.extend = function (target, obj) {\n for ( var i in obj ) {\n target[i] = obj[i];\n }\n };\n\n me.addEvent = function (el, type, fn, capture) {\n el.addEventListener(type, fn, !!capture);\n };\n\n me.removeEvent = function (el, type, fn, capture) {\n el.removeEventListener(type, fn, !!capture);\n };\n\n me.prefixPointerEvent = function (pointerEvent) {\n return window.MSPointerEvent ?\n 'MSPointer' + pointerEvent.charAt(7).toUpperCase() + pointerEvent.substr(8):\n pointerEvent;\n };\n\n me.momentum = function (current, start, time, lowerMargin, wrapperSize, deceleration) {\n var distance = current - start,\n speed = Math.abs(distance) / time,\n destination,\n duration;\n\n deceleration = deceleration === undefined ? 0.0006 : deceleration;\n\n destination = current + ( speed * speed ) / ( 2 * deceleration ) * ( distance < 0 ? -1 : 1 );\n duration = speed / deceleration;\n\n if ( destination < lowerMargin ) {\n destination = wrapperSize ? lowerMargin - ( wrapperSize / 2.5 * ( speed / 8 ) ) : lowerMargin;\n distance = Math.abs(destination - current);\n duration = distance / speed;\n } else if ( destination > 0 ) {\n destination = wrapperSize ? wrapperSize / 2.5 * ( speed / 8 ) : 0;\n distance = Math.abs(current) + destination;\n duration = distance / speed;\n }\n\n return {\n destination: Math.round(destination),\n duration: duration\n };\n };\n\n var _transform = _prefixStyle('transform');\n\n me.extend(me, {\n hasTransform: _transform !== false,\n hasPerspective: _prefixStyle('perspective') in _elementStyle,\n hasTouch: 'ontouchstart' in window,\n hasPointer: !!(window.PointerEvent || window.MSPointerEvent), // IE10 is prefixed\n hasTransition: _prefixStyle('transition') in _elementStyle\n });\n\n /*\n This should find all Android browsers lower than build 535.19 (both stock browser and webview)\n - galaxy S2 is ok\n - 2.3.6 : `AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1`\n - 4.0.4 : `AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30`\n - galaxy S3 is badAndroid (stock brower, webview)\n `AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30`\n - galaxy S4 is badAndroid (stock brower, webview)\n `AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30`\n - galaxy S5 is OK\n `AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Mobile Safari/537.36 (Chrome/)`\n - galaxy S6 is OK\n `AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Mobile Safari/537.36 (Chrome/)`\n */\n me.isBadAndroid = (function() {\n var appVersion = window.navigator.appVersion;\n // Android browser is not a chrome browser.\n if (/Android/.test(appVersion) && !(/Chrome\\/\\d/.test(appVersion))) {\n var safariVersion = appVersion.match(/Safari\\/(\\d+.\\d)/);\n if(safariVersion && typeof safariVersion === \"object\" && safariVersion.length >= 2) {\n return parseFloat(safariVersion[1]) < 535.19;\n } else {\n return true;\n }\n } else {\n return false;\n }\n })();\n\n me.extend(me.style = {}, {\n transform: _transform,\n transitionTimingFunction: _prefixStyle('transitionTimingFunction'),\n transitionDuration: _prefixStyle('transitionDuration'),\n transitionDelay: _prefixStyle('transitionDelay'),\n transformOrigin: _prefixStyle('transformOrigin')\n });\n\n me.hasClass = function (e, c) {\n var re = new RegExp(\"(^|\\\\s)\" + c + \"(\\\\s|$)\");\n return re.test(e.className);\n };\n\n me.addClass = function (e, c) {\n if ( me.hasClass(e, c) ) {\n return;\n }\n\n var newclass = e.className.split(' ');\n newclass.push(c);\n e.className = newclass.join(' ');\n };\n\n me.removeClass = function (e, c) {\n if ( !me.hasClass(e, c) ) {\n return;\n }\n\n var re = new RegExp(\"(^|\\\\s)\" + c + \"(\\\\s|$)\", 'g');\n e.className = e.className.replace(re, ' ');\n };\n\n me.offset = function (el) {\n var left = -el.offsetLeft,\n top = -el.offsetTop;\n\n // jshint -W084\n while (el = el.offsetParent) {\n left -= el.offsetLeft;\n top -= el.offsetTop;\n }\n // jshint +W084\n\n return {\n left: left,\n top: top\n };\n };\n\n me.preventDefaultException = function (el, exceptions) {\n for ( var i in exceptions ) {\n if ( exceptions[i].test(el[i]) ) {\n return true;\n }\n }\n\n return false;\n };\n\n me.extend(me.eventType = {}, {\n touchstart: 1,\n touchmove: 1,\n touchend: 1,\n\n mousedown: 2,\n mousemove: 2,\n mouseup: 2,\n\n pointerdown: 3,\n pointermove: 3,\n pointerup: 3,\n\n MSPointerDown: 3,\n MSPointerMove: 3,\n MSPointerUp: 3\n });\n\n me.extend(me.ease = {}, {\n quadratic: {\n style: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',\n fn: function (k) {\n return k * ( 2 - k );\n }\n },\n circular: {\n style: 'cubic-bezier(0.1, 0.57, 0.1, 1)', // Not properly \"circular\" but this looks better, it should be (0.075, 0.82, 0.165, 1)\n fn: function (k) {\n return Math.sqrt( 1 - ( --k * k ) );\n }\n },\n back: {\n style: 'cubic-bezier(0.175, 0.885, 0.32, 1.275)',\n fn: function (k) {\n var b = 4;\n return ( k = k - 1 ) * k * ( ( b + 1 ) * k + b ) + 1;\n }\n },\n bounce: {\n style: '',\n fn: function (k) {\n if ( ( k /= 1 ) < ( 1 / 2.75 ) ) {\n return 7.5625 * k * k;\n } else if ( k < ( 2 / 2.75 ) ) {\n return 7.5625 * ( k -= ( 1.5 / 2.75 ) ) * k + 0.75;\n } else if ( k < ( 2.5 / 2.75 ) ) {\n return 7.5625 * ( k -= ( 2.25 / 2.75 ) ) * k + 0.9375;\n } else {\n return 7.5625 * ( k -= ( 2.625 / 2.75 ) ) * k + 0.984375;\n }\n }\n },\n elastic: {\n style: '',\n fn: function (k) {\n var f = 0.22,\n e = 0.4;\n\n if ( k === 0 ) { return 0; }\n if ( k == 1 ) { return 1; }\n\n return ( e * Math.pow( 2, - 10 * k ) * Math.sin( ( k - f / 4 ) * ( 2 * Math.PI ) / f ) + 1 );\n }\n }\n });\n\n me.tap = function (e, eventName) {\n var ev = document.createEvent('Event');\n ev.initEvent(eventName, true, true);\n ev.pageX = e.pageX;\n ev.pageY = e.pageY;\n e.target.dispatchEvent(ev);\n };\n\n me.click = function (e) {\n var target = e.target,\n ev;\n\n if ( !(/(SELECT|INPUT|TEXTAREA)/i).test(target.tagName) ) {\n // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent\n // initMouseEvent is deprecated.\n ev = document.createEvent(window.MouseEvent ? 'MouseEvents' : 'Event');\n ev.initEvent('click', true, true);\n ev.view = e.view || window;\n ev.detail = 1;\n ev.screenX = target.screenX || 0;\n ev.screenY = target.screenY || 0;\n ev.clientX = target.clientX || 0;\n ev.clientY = target.clientY || 0;\n ev.ctrlKey = !!e.ctrlKey;\n ev.altKey = !!e.altKey;\n ev.shiftKey = !!e.shiftKey;\n ev.metaKey = !!e.metaKey;\n ev.button = 0;\n ev.relatedTarget = null;\n ev._constructed = true;\n target.dispatchEvent(ev);\n }\n };\n\n return me;\n})();\nfunction IScroll (el, options) {\n this.wrapper = typeof el == 'string' ? document.querySelector(el) : el;\n this.scroller = this.wrapper.children[0];\n this.scrollerStyle = this.scroller.style; // cache style for better performance\n\n this.options = {\n\n resizeScrollbars: true,\n\n mouseWheelSpeed: 20,\n\n snapThreshold: 0.334,\n\n// INSERT POINT: OPTIONS\n disablePointer : !utils.hasPointer,\n disableTouch : utils.hasPointer || !utils.hasTouch,\n disableMouse : utils.hasPointer || utils.hasTouch,\n startX: 0,\n startY: 0,\n scrollY: true,\n directionLockThreshold: 5,\n momentum: true,\n\n bounce: true,\n bounceTime: 600,\n bounceEasing: '',\n\n preventDefault: true,\n preventDefaultException: { tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT|LABEL)$/ },\n\n HWCompositing: true,\n useTransition: true,\n useTransform: true,\n bindToWrapper: typeof window.onmousedown === \"undefined\"\n };\n\n for ( var i in options ) {\n this.options[i] = options[i];\n }\n\n // Normalize options\n this.translateZ = this.options.HWCompositing && utils.hasPerspective ? ' translateZ(0)' : '';\n\n this.options.useTransition = utils.hasTransition && this.options.useTransition;\n this.options.useTransform = utils.hasTransform && this.options.useTransform;\n\n this.options.eventPassthrough = this.options.eventPassthrough === true ? 'vertical' : this.options.eventPassthrough;\n this.options.preventDefault = !this.options.eventPassthrough && this.options.preventDefault;\n\n // If you want eventPassthrough I have to lock one of the axes\n this.options.scrollY = this.options.eventPassthrough == 'vertical' ? false : this.options.scrollY;\n this.options.scrollX = this.options.eventPassthrough == 'horizontal' ? false : this.options.scrollX;\n\n // With eventPassthrough we also need lockDirection mechanism\n this.options.freeScroll = this.options.freeScroll && !this.options.eventPassthrough;\n this.options.directionLockThreshold = this.options.eventPassthrough ? 0 : this.options.directionLockThreshold;\n\n this.options.bounceEasing = typeof this.options.bounceEasing == 'string' ? utils.ease[this.options.bounceEasing] || utils.ease.circular : this.options.bounceEasing;\n\n this.options.resizePolling = this.options.resizePolling === undefined ? 60 : this.options.resizePolling;\n\n if ( this.options.tap === true ) {\n this.options.tap = 'tap';\n }\n\n // https://github.com/cubiq/iscroll/issues/1029\n if (!this.options.useTransition && !this.options.useTransform) {\n if(!(/relative|absolute/i).test(this.scrollerStyle.position)) {\n this.scrollerStyle.position = \"relative\";\n }\n }\n\n if ( this.options.shrinkScrollbars == 'scale' ) {\n this.options.useTransition = false;\n }\n\n this.options.invertWheelDirection = this.options.invertWheelDirection ? -1 : 1;\n\n// INSERT POINT: NORMALIZATION\n\n // Some defaults\n this.x = 0;\n this.y = 0;\n this.directionX = 0;\n this.directionY = 0;\n this._events = {};\n\n// INSERT POINT: DEFAULTS\n\n this._init();\n this.refresh();\n\n this.scrollTo(this.options.startX, this.options.startY);\n this.enable();\n}\n\nIScroll.prototype = {\n version: '5.2.0',\n\n _init: function () {\n this._initEvents();\n\n if ( this.options.scrollbars || this.options.indicators ) {\n this._initIndicators();\n }\n\n if ( this.options.mouseWheel ) {\n this._initWheel();\n }\n\n if ( this.options.snap ) {\n this._initSnap();\n }\n\n if ( this.options.keyBindings ) {\n this._initKeys();\n }\n\n// INSERT POINT: _init\n\n },\n\n destroy: function () {\n this._initEvents(true);\n clearTimeout(this.resizeTimeout);\n this.resizeTimeout = null;\n this._execEvent('destroy');\n },\n\n _transitionEnd: function (e) {\n if ( e.target != this.scroller || !this.isInTransition ) {\n return;\n }\n\n this._transitionTime();\n if ( !this.resetPosition(this.options.bounceTime) ) {\n this.isInTransition = false;\n this._execEvent('scrollEnd');\n }\n },\n\n _start: function (e) {\n // React to left mouse button only\n if ( utils.eventType[e.type] != 1 ) {\n // for button property\n // http://unixpapa.com/js/mouse.html\n var button;\n if (!e.which) {\n /* IE case */\n button = (e.button < 2) ? 0 :\n ((e.button == 4) ? 1 : 2);\n } else {\n /* All others */\n button = e.button;\n }\n if ( button !== 0 ) {\n return;\n }\n }\n\n if ( !this.enabled || (this.initiated && utils.eventType[e.type] !== this.initiated) ) {\n return;\n }\n\n if ( this.options.preventDefault && !utils.isBadAndroid && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) {\n e.preventDefault();\n }\n\n var point = e.touches ? e.touches[0] : e,\n pos;\n\n this.initiated = utils.eventType[e.type];\n this.moved = false;\n this.distX = 0;\n this.distY = 0;\n this.directionX = 0;\n this.directionY = 0;\n this.directionLocked = 0;\n\n this.startTime = utils.getTime();\n\n if ( this.options.useTransition && this.isInTransition ) {\n this._transitionTime();\n this.isInTransition = false;\n pos = this.getComputedPosition();\n this._translate(Math.round(pos.x), Math.round(pos.y));\n this._execEvent('scrollEnd');\n } else if ( !this.options.useTransition && this.isAnimating ) {\n this.isAnimating = false;\n this._execEvent('scrollEnd');\n }\n\n this.startX = this.x;\n this.startY = this.y;\n this.absStartX = this.x;\n this.absStartY = this.y;\n this.pointX = point.pageX;\n this.pointY = point.pageY;\n\n this._execEvent('beforeScrollStart');\n },\n\n _move: function (e) {\n if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) {\n return;\n }\n\n if ( this.options.preventDefault ) { // increases performance on Android? TODO: check!\n e.preventDefault();\n }\n\n var point = e.touches ? e.touches[0] : e,\n deltaX = point.pageX - this.pointX,\n deltaY = point.pageY - this.pointY,\n timestamp = utils.getTime(),\n newX, newY,\n absDistX, absDistY;\n\n this.pointX = point.pageX;\n this.pointY = point.pageY;\n\n this.distX += deltaX;\n this.distY += deltaY;\n absDistX = Math.abs(this.distX);\n absDistY = Math.abs(this.distY);\n\n // We need to move at least 10 pixels for the scrolling to initiate\n if ( timestamp - this.endTime > 300 && (absDistX < 10 && absDistY < 10) ) {\n return;\n }\n\n // If you are scrolling in one direction lock the other\n if ( !this.directionLocked && !this.options.freeScroll ) {\n if ( absDistX > absDistY + this.options.directionLockThreshold ) {\n this.directionLocked = 'h'; // lock horizontally\n } else if ( absDistY >= absDistX + this.options.directionLockThreshold ) {\n this.directionLocked = 'v'; // lock vertically\n } else {\n this.directionLocked = 'n'; // no lock\n }\n }\n\n if ( this.directionLocked == 'h' ) {\n if ( this.options.eventPassthrough == 'vertical' ) {\n e.preventDefault();\n } else if ( this.options.eventPassthrough == 'horizontal' ) {\n this.initiated = false;\n return;\n }\n\n deltaY = 0;\n } else if ( this.directionLocked == 'v' ) {\n if ( this.options.eventPassthrough == 'horizontal' ) {\n e.preventDefault();\n } else if ( this.options.eventPassthrough == 'vertical' ) {\n this.initiated = false;\n return;\n }\n\n deltaX = 0;\n }\n\n deltaX = this.hasHorizontalScroll ? deltaX : 0;\n deltaY = this.hasVerticalScroll ? deltaY : 0;\n\n newX = this.x + deltaX;\n newY = this.y + deltaY;\n\n // Slow down if outside of the boundaries\n if ( newX > 0 || newX < this.maxScrollX ) {\n newX = this.options.bounce ? this.x + deltaX / 3 : newX > 0 ? 0 : this.maxScrollX;\n }\n if ( newY > 0 || newY < this.maxScrollY ) {\n newY = this.options.bounce ? this.y + deltaY / 3 : newY > 0 ? 0 : this.maxScrollY;\n }\n\n this.directionX = deltaX > 0 ? -1 : deltaX < 0 ? 1 : 0;\n this.directionY = deltaY > 0 ? -1 : deltaY < 0 ? 1 : 0;\n\n if ( !this.moved ) {\n this._execEvent('scrollStart');\n }\n\n this.moved = true;\n\n this._translate(newX, newY);\n\n/* REPLACE START: _move */\n\n if ( timestamp - this.startTime > 300 ) {\n this.startTime = timestamp;\n this.startX = this.x;\n this.startY = this.y;\n }\n\n/* REPLACE END: _move */\n\n },\n\n _end: function (e) {\n if ( !this.enabled || utils.eventType[e.type] !== this.initiated ) {\n return;\n }\n\n if ( this.options.preventDefault && !utils.preventDefaultException(e.target, this.options.preventDefaultException) ) {\n e.preventDefault();\n }\n\n var point = e.changedTouches ? e.changedTouches[0] : e,\n momentumX,\n momentumY,\n duration = utils.getTime() - this.startTime,\n newX = Math.round(this.x),\n newY = Math.round(this.y),\n distanceX = Math.abs(newX - this.startX),\n distanceY = Math.abs(newY - this.startY),\n time = 0,\n easing = '';\n\n this.isInTransition = 0;\n this.initiated = 0;\n this.endTime = utils.getTime();\n\n // reset if we are outside of the boundaries\n if ( this.resetPosition(this.options.bounceTime) ) {\n return;\n }\n\n this.scrollTo(newX, newY); // ensures that the last position is rounded\n\n // we scrolled less than 10 pixels\n if ( !this.moved ) {\n if ( this.options.tap ) {\n utils.tap(e, this.options.tap);\n }\n\n if ( this.options.click ) {\n utils.click(e);\n }\n\n this._execEvent('scrollCancel');\n return;\n }\n\n if ( this._events.flick && duration < 200 && distanceX < 100 && distanceY < 100 ) {\n this._execEvent('flick');\n return;\n }\n\n // start momentum animation if needed\n if ( this.options.momentum && duration < 300 ) {\n\n // only the first step in section is deceleration;\n var deceleration = this.options.deceleration;\n if (this.options.firstStepDeceleration) {\n if (this.absStartY !== 0 || this.absStartX !== 0) {\n deceleration = null;\n }\n }\n\n momentumX = this.hasHorizontalScroll ? utils.momentum(this.x, this.startX, duration, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, deceleration) : { destination: newX, duration: 0 };\n momentumY = this.hasVerticalScroll ? utils.momentum(this.y, this.startY, duration, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, deceleration) : { destination: newY, duration: 0 };\n newX = momentumX.destination;\n newY = momentumY.destination;\n time = Math.max(momentumX.duration, momentumY.duration);\n this.isInTransition = 1;\n }\n\n\n if ( this.options.snap ) {\n var snap = this._nearestSnap(newX, newY);\n this.currentPage = snap;\n time = this.options.snapSpeed || Math.max(\n Math.max(\n Math.min(Math.abs(newX - snap.x), 1000),\n Math.min(Math.abs(newY - snap.y), 1000)\n ), 300);\n newX = snap.x;\n newY = snap.y;\n\n this.directionX = 0;\n this.directionY = 0;\n easing = this.options.bounceEasing;\n }\n\n// INSERT POINT: _end\n\n if ( newX != this.x || newY != this.y ) {\n // change easing function when scroller goes out of the boundaries\n if ( newX > 0 || newX < this.maxScrollX || newY > 0 || newY < this.maxScrollY ) {\n easing = utils.ease.quadratic;\n }\n\n this.scrollTo(newX, newY, time, easing);\n return;\n }\n\n this._execEvent('scrollEnd');\n },\n\n _resize: function () {\n var that = this;\n\n clearTimeout(this.resizeTimeout);\n\n this.resizeTimeout = setTimeout(function () {\n that.refresh();\n }, this.options.resizePolling);\n },\n\n resetPosition: function (time) {\n var x = this.x,\n y = this.y;\n\n time = time || 0;\n\n if ( !this.hasHorizontalScroll || this.x > 0 ) {\n x = 0;\n } else if ( this.x < this.maxScrollX ) {\n x = this.maxScrollX;\n }\n\n if ( !this.hasVerticalScroll || this.y > 0 ) {\n y = 0;\n } else if ( this.y < this.maxScrollY ) {\n y = this.maxScrollY;\n }\n\n if ( x == this.x && y == this.y ) {\n return false;\n }\n\n this.scrollTo(x, y, time, this.options.bounceEasing);\n\n return true;\n },\n\n disable: function () {\n this.enabled = false;\n },\n\n enable: function () {\n this.enabled = true;\n },\n\n refresh: function () {\n var rf = this.wrapper.offsetHeight; // Force reflow\n\n this.wrapperWidth = this.wrapper.clientWidth;\n this.wrapperHeight = this.wrapper.clientHeight;\n\n/* REPLACE START: refresh */\n\n this.scrollerWidth = this.scroller.offsetWidth;\n this.scrollerHeight = this.scroller.offsetHeight;\n\n this.maxScrollX = this.wrapperWidth - this.scrollerWidth;\n this.maxScrollY = this.wrapperHeight - this.scrollerHeight;\n\n/* REPLACE END: refresh */\n\n this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0;\n this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0;\n\n if ( !this.hasHorizontalScroll ) {\n this.maxScrollX = 0;\n this.scrollerWidth = this.wrapperWidth;\n }\n\n if ( !this.hasVerticalScroll ) {\n this.maxScrollY = 0;\n this.scrollerHeight = this.wrapperHeight;\n }\n\n this.endTime = 0;\n this.directionX = 0;\n this.directionY = 0;\n\n this.wrapperOffset = utils.offset(this.wrapper);\n\n this._execEvent('refresh');\n\n this.resetPosition();\n\n// INSERT POINT: _refresh\n\n },\n\n on: function (type, fn) {\n if ( !this._events[type] ) {\n this._events[type] = [];\n }\n\n this._events[type].push(fn);\n },\n\n off: function (type, fn) {\n if ( !this._events[type] ) {\n return;\n }\n\n var index = this._events[type].indexOf(fn);\n\n if ( index > -1 ) {\n this._events[type].splice(index, 1);\n }\n },\n\n _execEvent: function (type) {\n if ( !this._events[type] ) {\n return;\n }\n\n var i = 0,\n l = this._events[type].length;\n\n if ( !l ) {\n return;\n }\n\n for ( ; i < l; i++ ) {\n this._events[type][i].apply(this, [].slice.call(arguments, 1));\n }\n },\n\n scrollBy: function (x, y, time, easing) {\n x = this.x + x;\n y = this.y + y;\n time = time || 0;\n\n this.scrollTo(x, y, time, easing);\n },\n\n scrollTo: function (x, y, time, easing) {\n easing = easing || utils.ease.circular;\n\n this.isInTransition = this.options.useTransition && time > 0;\n var transitionType = this.options.useTransition && easing.style;\n if ( !time || transitionType ) {\n if(transitionType) {\n this._transitionTimingFunction(easing.style);\n this._transitionTime(time);\n }\n this._translate(x, y);\n } else {\n this._animate(x, y, time, easing.fn);\n }\n },\n\n scrollToElement: function (el, time, offsetX, offsetY, easing) {\n el = el.nodeType ? el : this.scroller.querySelector(el);\n\n if ( !el ) {\n return;\n }\n\n var pos = utils.offset(el);\n\n pos.left -= this.wrapperOffset.left;\n pos.top -= this.wrapperOffset.top;\n\n // if offsetX/Y are true we center the element to the screen\n if ( offsetX === true ) {\n offsetX = Math.round(el.offsetWidth / 2 - this.wrapper.offsetWidth / 2);\n }\n if ( offsetY === true ) {\n offsetY = Math.round(el.offsetHeight / 2 - this.wrapper.offsetHeight / 2);\n }\n\n pos.left -= offsetX || 0;\n pos.top -= offsetY || 0;\n\n pos.left = pos.left > 0 ? 0 : pos.left < this.maxScrollX ? this.maxScrollX : pos.left;\n pos.top = pos.top > 0 ? 0 : pos.top < this.maxScrollY ? this.maxScrollY : pos.top;\n\n time = time === undefined || time === null || time === 'auto' ? Math.max(Math.abs(this.x-pos.left), Math.abs(this.y-pos.top)) : time;\n\n this.scrollTo(pos.left, pos.top, time, easing);\n },\n\n _transitionTime: function (time) {\n if (!this.options.useTransition) {\n return;\n }\n time = time || 0;\n var durationProp = utils.style.transitionDuration;\n if(!durationProp) {\n return;\n }\n\n this.scrollerStyle[durationProp] = time + 'ms';\n\n if ( !time && utils.isBadAndroid ) {\n this.scrollerStyle[durationProp] = '0.0001ms';\n // remove 0.0001ms\n var self = this;\n rAF(function() {\n if(self.scrollerStyle[durationProp] === '0.0001ms') {\n self.scrollerStyle[durationProp] = '0s';\n }\n });\n }\n\n\n if ( this.indicators ) {\n for ( var i = this.indicators.length; i--; ) {\n this.indicators[i].transitionTime(time);\n }\n }\n\n\n// INSERT POINT: _transitionTime\n\n },\n\n _transitionTimingFunction: function (easing) {\n this.scrollerStyle[utils.style.transitionTimingFunction] = easing;\n\n\n if ( this.indicators ) {\n for ( var i = this.indicators.length; i--; ) {\n this.indicators[i].transitionTimingFunction(easing);\n }\n }\n\n\n// INSERT POINT: _transitionTimingFunction\n\n },\n\n _translate: function (x, y) {\n if ( this.options.useTransform ) {\n\n/* REPLACE START: _translate */\n\n this.scrollerStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.translateZ;\n\n/* REPLACE END: _translate */\n\n } else {\n x = Math.round(x);\n y = Math.round(y);\n this.scrollerStyle.left = x + 'px';\n this.scrollerStyle.top = y + 'px';\n }\n\n this.x = x;\n this.y = y;\n\n\n if ( this.indicators ) {\n for ( var i = this.indicators.length; i--; ) {\n this.indicators[i].updatePosition();\n }\n }\n\n\n// INSERT POINT: _translate\n\n },\n\n _initEvents: function (remove) {\n var eventType = remove ? utils.removeEvent : utils.addEvent,\n target = this.options.bindToWrapper ? this.wrapper : window;\n\n eventType(window, 'orientationchange', this);\n eventType(window, 'resize', this);\n\n if ( this.options.click ) {\n eventType(this.wrapper, 'click', this, true);\n }\n\n if ( !this.options.disableMouse ) {\n eventType(this.wrapper, 'mousedown', this);\n eventType(target, 'mousemove', this);\n eventType(target, 'mousecancel', this);\n eventType(target, 'mouseup', this);\n }\n\n if ( utils.hasPointer && !this.options.disablePointer ) {\n eventType(this.wrapper, utils.prefixPointerEvent('pointerdown'), this);\n eventType(target, utils.prefixPointerEvent('pointermove'), this);\n eventType(target, utils.prefixPointerEvent('pointercancel'), this);\n eventType(target, utils.prefixPointerEvent('pointerup'), this);\n }\n\n if ( utils.hasTouch && !this.options.disableTouch ) {\n eventType(this.wrapper, 'touchstart', this);\n eventType(target, 'touchmove', this);\n eventType(target, 'touchcancel', this);\n eventType(target, 'touchend', this);\n }\n\n eventType(this.scroller, 'transitionend', this);\n eventType(this.scroller, 'webkitTransitionEnd', this);\n eventType(this.scroller, 'oTransitionEnd', this);\n eventType(this.scroller, 'MSTransitionEnd', this);\n },\n\n getComputedPosition: function () {\n var matrix = window.getComputedStyle(this.scroller, null),\n x, y;\n\n if ( this.options.useTransform ) {\n matrix = matrix[utils.style.transform].split(')')[0].split(', ');\n x = +(matrix[12] || matrix[4]);\n y = +(matrix[13] || matrix[5]);\n } else {\n x = +matrix.left.replace(/[^-\\d.]/g, '');\n y = +matrix.top.replace(/[^-\\d.]/g, '');\n }\n\n return { x: x, y: y };\n },\n _initIndicators: function () {\n var interactive = this.options.interactiveScrollbars,\n customStyle = typeof this.options.scrollbars != 'string',\n indicators = [],\n indicator;\n\n var that = this;\n\n this.indicators = [];\n\n if ( this.options.scrollbars ) {\n // Vertical scrollbar\n if ( this.options.scrollY ) {\n indicator = {\n el: createDefaultScrollbar('v', interactive, this.options.scrollbars),\n interactive: interactive,\n defaultScrollbars: true,\n customStyle: customStyle,\n resize: this.options.resizeScrollbars,\n shrink: this.options.shrinkScrollbars,\n fade: this.options.fadeScrollbars,\n listenX: false\n };\n\n this.wrapper.appendChild(indicator.el);\n indicators.push(indicator);\n }\n\n // Horizontal scrollbar\n if ( this.options.scrollX ) {\n indicator = {\n el: createDefaultScrollbar('h', interactive, this.options.scrollbars),\n interactive: interactive,\n defaultScrollbars: true,\n customStyle: customStyle,\n resize: this.options.resizeScrollbars,\n shrink: this.options.shrinkScrollbars,\n fade: this.options.fadeScrollbars,\n listenY: false\n };\n\n this.wrapper.appendChild(indicator.el);\n indicators.push(indicator);\n }\n }\n\n if ( this.options.indicators ) {\n // TODO: check concat compatibility\n indicators = indicators.concat(this.options.indicators);\n }\n\n for ( var i = indicators.length; i--; ) {\n this.indicators.push( new Indicator(this, indicators[i]) );\n }\n\n // TODO: check if we can use array.map (wide compatibility and performance issues)\n function _indicatorsMap (fn) {\n if (that.indicators) {\n for ( var i = that.indicators.length; i--; ) {\n fn.call(that.indicators[i]);\n }\n }\n }\n\n if ( this.options.fadeScrollbars ) {\n this.on('scrollEnd', function () {\n _indicatorsMap(function () {\n this.fade();\n });\n });\n\n this.on('scrollCancel', function () {\n _indicatorsMap(function () {\n this.fade();\n });\n });\n\n this.on('scrollStart', function () {\n _indicatorsMap(function () {\n this.fade(1);\n });\n });\n\n this.on('beforeScrollStart', function () {\n _indicatorsMap(function () {\n this.fade(1, true);\n });\n });\n }\n\n\n this.on('refresh', function () {\n _indicatorsMap(function () {\n this.refresh();\n });\n });\n\n this.on('destroy', function () {\n _indicatorsMap(function () {\n this.destroy();\n });\n\n delete this.indicators;\n });\n },\n\n _initWheel: function () {\n utils.addEvent(this.wrapper, 'wheel', this);\n utils.addEvent(this.wrapper, 'mousewheel', this);\n utils.addEvent(this.wrapper, 'DOMMouseScroll', this);\n\n this.on('destroy', function () {\n clearTimeout(this.wheelTimeout);\n this.wheelTimeout = null;\n utils.removeEvent(this.wrapper, 'wheel', this);\n utils.removeEvent(this.wrapper, 'mousewheel', this);\n utils.removeEvent(this.wrapper, 'DOMMouseScroll', this);\n });\n },\n\n _wheel: function (e) {\n if ( !this.enabled ) {\n return;\n }\n\n var wheelDeltaX, wheelDeltaY,\n newX, newY,\n that = this;\n\n if ( this.wheelTimeout === undefined ) {\n that._execEvent('scrollStart');\n }\n\n // Execute the scrollEnd event after 400ms the wheel stopped scrolling\n clearTimeout(this.wheelTimeout);\n this.wheelTimeout = setTimeout(function () {\n if(!that.options.snap) {\n that._execEvent('scrollEnd');\n }\n that.wheelTimeout = undefined;\n }, 400);\n\n if ( 'deltaX' in e ) {\n if (e.deltaMode === 1) {\n wheelDeltaX = -e.deltaX * this.options.mouseWheelSpeed;\n wheelDeltaY = -e.deltaY * this.options.mouseWheelSpeed;\n } else {\n wheelDeltaX = -e.deltaX;\n wheelDeltaY = -e.deltaY;\n }\n } else if ( 'wheelDeltaX' in e ) {\n wheelDeltaX = e.wheelDeltaX / 120 * this.options.mouseWheelSpeed;\n wheelDeltaY = e.wheelDeltaY / 120 * this.options.mouseWheelSpeed;\n } else if ( 'wheelDelta' in e ) {\n wheelDeltaX = wheelDeltaY = e.wheelDelta / 120 * this.options.mouseWheelSpeed;\n } else if ( 'detail' in e ) {\n wheelDeltaX = wheelDeltaY = -e.detail / 3 * this.options.mouseWheelSpeed;\n } else {\n return;\n }\n\n wheelDeltaX *= this.options.invertWheelDirection;\n wheelDeltaY *= this.options.invertWheelDirection;\n\n if ( !this.hasVerticalScroll ) {\n wheelDeltaX = wheelDeltaY;\n wheelDeltaY = 0;\n }\n\n if ( this.options.snap ) {\n newX = this.currentPage.pageX;\n newY = this.currentPage.pageY;\n\n if ( wheelDeltaX > 0 ) {\n newX--;\n } else if ( wheelDeltaX < 0 ) {\n newX++;\n }\n\n if ( wheelDeltaY > 0 ) {\n newY--;\n } else if ( wheelDeltaY < 0 ) {\n newY++;\n }\n\n this.goToPage(newX, newY);\n\n return;\n }\n\n newX = this.x + Math.round(this.hasHorizontalScroll ? wheelDeltaX : 0);\n newY = this.y + Math.round(this.hasVerticalScroll ? wheelDeltaY : 0);\n\n this.directionX = wheelDeltaX > 0 ? -1 : wheelDeltaX < 0 ? 1 : 0;\n this.directionY = wheelDeltaY > 0 ? -1 : wheelDeltaY < 0 ? 1 : 0;\n\n if ( newX > 0 ) {\n newX = 0;\n } else if ( newX < this.maxScrollX ) {\n newX = this.maxScrollX;\n }\n\n if ( newY > 0 ) {\n newY = 0;\n } else if ( newY < this.maxScrollY ) {\n newY = this.maxScrollY;\n }\n\n this.scrollTo(newX, newY, 0);\n\n// INSERT POINT: _wheel\n },\n\n _initSnap: function () {\n this.currentPage = {};\n\n if ( typeof this.options.snap == 'string' ) {\n this.options.snap = this.scroller.querySelectorAll(this.options.snap);\n }\n\n this.on('refresh', function () {\n var i = 0, l,\n m = 0, n,\n cx, cy,\n x = 0, y,\n stepX = this.options.snapStepX || this.wrapperWidth,\n stepY = this.options.snapStepY || this.wrapperHeight,\n el;\n\n this.pages = [];\n\n if ( !this.wrapperWidth || !this.wrapperHeight || !this.scrollerWidth || !this.scrollerHeight ) {\n return;\n }\n\n if ( this.options.snap === true ) {\n cx = Math.round( stepX / 2 );\n cy = Math.round( stepY / 2 );\n\n while ( x > -this.scrollerWidth ) {\n this.pages[i] = [];\n l = 0;\n y = 0;\n\n while ( y > -this.scrollerHeight ) {\n this.pages[i][l] = {\n x: Math.max(x, this.maxScrollX),\n y: Math.max(y, this.maxScrollY),\n width: stepX,\n height: stepY,\n cx: x - cx,\n cy: y - cy\n };\n\n y -= stepY;\n l++;\n }\n\n x -= stepX;\n i++;\n }\n } else {\n el = this.options.snap;\n l = el.length;\n n = -1;\n\n for ( ; i < l; i++ ) {\n if ( i === 0 || el[i].offsetLeft <= el[i-1].offsetLeft ) {\n m = 0;\n n++;\n }\n\n if ( !this.pages[m] ) {\n this.pages[m] = [];\n }\n\n x = Math.max(-el[i].offsetLeft, this.maxScrollX);\n y = Math.max(-el[i].offsetTop, this.maxScrollY);\n cx = x - Math.round(el[i].offsetWidth / 2);\n cy = y - Math.round(el[i].offsetHeight / 2);\n\n this.pages[m][n] = {\n x: x,\n y: y,\n width: el[i].offsetWidth,\n height: el[i].offsetHeight,\n cx: cx,\n cy: cy\n };\n\n if ( x > this.maxScrollX ) {\n m++;\n }\n }\n }\n\n this.goToPage(this.currentPage.pageX || 0, this.currentPage.pageY || 0, 0);\n\n // Update snap threshold if needed\n if ( this.options.snapThreshold % 1 === 0 ) {\n this.snapThresholdX = this.options.snapThreshold;\n this.snapThresholdY = this.options.snapThreshold;\n } else {\n this.snapThresholdX = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width * this.options.snapThreshold);\n this.snapThresholdY = Math.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height * this.options.snapThreshold);\n }\n });\n\n this.on('flick', function () {\n var time = this.options.snapSpeed || Math.max(\n Math.max(\n Math.min(Math.abs(this.x - this.startX), 1000),\n Math.min(Math.abs(this.y - this.startY), 1000)\n ), 300);\n\n this.goToPage(\n this.currentPage.pageX + this.directionX,\n this.currentPage.pageY + this.directionY,\n time\n );\n });\n },\n\n _nearestSnap: function (x, y) {\n if ( !this.pages.length ) {\n return { x: 0, y: 0, pageX: 0, pageY: 0 };\n }\n\n var i = 0,\n l = this.pages.length,\n m = 0;\n\n // Check if we exceeded the snap threshold\n if ( Math.abs(x - this.absStartX) < this.snapThresholdX &&\n Math.abs(y - this.absStartY) < this.snapThresholdY ) {\n return this.currentPage;\n }\n\n if ( x > 0 ) {\n x = 0;\n } else if ( x < this.maxScrollX ) {\n x = this.maxScrollX;\n }\n\n if ( y > 0 ) {\n y = 0;\n } else if ( y < this.maxScrollY ) {\n y = this.maxScrollY;\n }\n\n for ( ; i < l; i++ ) {\n if ( x >= this.pages[i][0].cx ) {\n x = this.pages[i][0].x;\n break;\n }\n }\n\n l = this.pages[i].length;\n\n for ( ; m < l; m++ ) {\n if ( y >= this.pages[0][m].cy ) {\n y = this.pages[0][m].y;\n break;\n }\n }\n\n if ( i == this.currentPage.pageX ) {\n i += this.directionX;\n\n if ( i < 0 ) {\n i = 0;\n } else if ( i >= this.pages.length ) {\n i = this.pages.length - 1;\n }\n\n x = this.pages[i][0].x;\n }\n\n if ( m == this.currentPage.pageY ) {\n m += this.directionY;\n\n if ( m < 0 ) {\n m = 0;\n } else if ( m >= this.pages[0].length ) {\n m = this.pages[0].length - 1;\n }\n\n y = this.pages[0][m].y;\n }\n\n return {\n x: x,\n y: y,\n pageX: i,\n pageY: m\n };\n },\n\n goToPage: function (x, y, time, easing) {\n easing = easing || this.options.bounceEasing;\n\n if ( x >= this.pages.length ) {\n x = this.pages.length - 1;\n } else if ( x < 0 ) {\n x = 0;\n }\n\n if ( y >= this.pages[x].length ) {\n y = this.pages[x].length - 1;\n } else if ( y < 0 ) {\n y = 0;\n }\n\n var posX = this.pages[x][y].x,\n posY = this.pages[x][y].y;\n\n time = time === undefined ? this.options.snapSpeed || Math.max(\n Math.max(\n Math.min(Math.abs(posX - this.x), 1000),\n Math.min(Math.abs(posY - this.y), 1000)\n ), 300) : time;\n\n this.currentPage = {\n x: posX,\n y: posY,\n pageX: x,\n pageY: y\n };\n\n this.scrollTo(posX, posY, time, easing);\n },\n\n next: function (time, easing) {\n var x = this.currentPage.pageX,\n y = this.currentPage.pageY;\n\n x++;\n\n if ( x >= this.pages.length && this.hasVerticalScroll ) {\n x = 0;\n y++;\n }\n\n this.goToPage(x, y, time, easing);\n },\n\n prev: function (time, easing) {\n var x = this.currentPage.pageX,\n y = this.currentPage.pageY;\n\n x--;\n\n if ( x < 0 && this.hasVerticalScroll ) {\n x = 0;\n y--;\n }\n\n this.goToPage(x, y, time, easing);\n },\n\n _initKeys: function (e) {\n // default key bindings\n var keys = {\n pageUp: 33,\n pageDown: 34,\n end: 35,\n home: 36,\n left: 37,\n up: 38,\n right: 39,\n down: 40\n };\n var i;\n\n // if you give me characters I give you keycode\n if ( typeof this.options.keyBindings == 'object' ) {\n for ( i in this.options.keyBindings ) {\n if ( typeof this.options.keyBindings[i] == 'string' ) {\n this.options.keyBindings[i] = this.options.keyBindings[i].toUpperCase().charCodeAt(0);\n }\n }\n } else {\n this.options.keyBindings = {};\n }\n\n for ( i in keys ) {\n this.options.keyBindings[i] = this.options.keyBindings[i] || keys[i];\n }\n\n utils.addEvent(window, 'keydown', this);\n\n this.on('destroy', function () {\n utils.removeEvent(window, 'keydown', this);\n });\n },\n\n _key: function (e) {\n if ( !this.enabled ) {\n return;\n }\n\n var snap = this.options.snap, // we are using this alot, better to cache it\n newX = snap ? this.currentPage.pageX : this.x,\n newY = snap ? this.currentPage.pageY : this.y,\n now = utils.getTime(),\n prevTime = this.keyTime || 0,\n acceleration = 0.250,\n pos;\n\n if ( this.options.useTransition && this.isInTransition ) {\n pos = this.getComputedPosition();\n\n this._translate(Math.round(pos.x), Math.round(pos.y));\n this.isInTransition = false;\n }\n\n this.keyAcceleration = now - prevTime < 200 ? Math.min(this.keyAcceleration + acceleration, 50) : 0;\n\n switch ( e.keyCode ) {\n case this.options.keyBindings.pageUp:\n if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) {\n newX += snap ? 1 : this.wrapperWidth;\n } else {\n newY += snap ? 1 : this.wrapperHeight;\n }\n break;\n case this.options.keyBindings.pageDown:\n if ( this.hasHorizontalScroll && !this.hasVerticalScroll ) {\n newX -= snap ? 1 : this.wrapperWidth;\n } else {\n newY -= snap ? 1 : this.wrapperHeight;\n }\n break;\n case this.options.keyBindings.end:\n newX = snap ? this.pages.length-1 : this.maxScrollX;\n newY = snap ? this.pages[0].length-1 : this.maxScrollY;\n break;\n case this.options.keyBindings.home:\n newX = 0;\n newY = 0;\n break;\n case this.options.keyBindings.left:\n newX += snap ? -1 : 5 + this.keyAcceleration>>0;\n break;\n case this.options.keyBindings.up:\n newY += snap ? 1 : 5 + this.keyAcceleration>>0;\n break;\n case this.options.keyBindings.right:\n newX -= snap ? -1 : 5 + this.keyAcceleration>>0;\n break;\n case this.options.keyBindings.down:\n newY -= snap ? 1 : 5 + this.keyAcceleration>>0;\n break;\n default:\n return;\n }\n\n if ( snap ) {\n this.goToPage(newX, newY);\n return;\n }\n\n if ( newX > 0 ) {\n newX = 0;\n this.keyAcceleration = 0;\n } else if ( newX < this.maxScrollX ) {\n newX = this.maxScrollX;\n this.keyAcceleration = 0;\n }\n\n if ( newY > 0 ) {\n newY = 0;\n this.keyAcceleration = 0;\n } else if ( newY < this.maxScrollY ) {\n newY = this.maxScrollY;\n this.keyAcceleration = 0;\n }\n\n this.scrollTo(newX, newY, 0);\n\n this.keyTime = now;\n },\n\n _animate: function (destX, destY, duration, easingFn) {\n var that = this,\n startX = this.x,\n startY = this.y,\n startTime = utils.getTime(),\n destTime = startTime + duration;\n\n function step () {\n var now = utils.getTime(),\n newX, newY,\n easing;\n\n if ( now >= destTime ) {\n that.isAnimating = false;\n that._translate(destX, destY);\n\n if ( !that.resetPosition(that.options.bounceTime) ) {\n that._execEvent('scrollEnd');\n }\n\n return;\n }\n\n now = ( now - startTime ) / duration;\n easing = easingFn(now);\n newX = ( destX - startX ) * easing + startX;\n newY = ( destY - startY ) * easing + startY;\n that._translate(newX, newY);\n\n if ( that.isAnimating ) {\n rAF(step);\n }\n }\n\n this.isAnimating = true;\n step();\n },\n handleEvent: function (e) {\n switch ( e.type ) {\n case 'touchstart':\n case 'pointerdown':\n case 'MSPointerDown':\n case 'mousedown':\n this._start(e);\n break;\n case 'touchmove':\n case 'pointermove':\n case 'MSPointerMove':\n case 'mousemove':\n this._move(e);\n break;\n case 'touchend':\n case 'pointerup':\n case 'MSPointerUp':\n case 'mouseup':\n case 'touchcancel':\n case 'pointercancel':\n case 'MSPointerCancel':\n case 'mousecancel':\n this._end(e);\n break;\n case 'orientationchange':\n case 'resize':\n this._resize();\n break;\n case 'transitionend':\n case 'webkitTransitionEnd':\n case 'oTransitionEnd':\n case 'MSTransitionEnd':\n this._transitionEnd(e);\n break;\n case 'wheel':\n case 'DOMMouseScroll':\n case 'mousewheel':\n this._wheel(e);\n break;\n case 'keydown':\n this._key(e);\n break;\n case 'click':\n if ( this.enabled && !e._constructed ) {\n e.preventDefault();\n e.stopPropagation();\n }\n break;\n }\n }\n};\nfunction createDefaultScrollbar (direction, interactive, type) {\n var scrollbar = document.createElement('div'),\n indicator = document.createElement('div');\n\n if ( type === true ) {\n scrollbar.style.cssText = 'position:absolute;z-index:9999';\n indicator.style.cssText = '-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px';\n }\n\n indicator.className = 'iScrollIndicator';\n\n if ( direction == 'h' ) {\n if ( type === true ) {\n scrollbar.style.cssText += ';height:7px;left:2px;right:2px;bottom:0';\n indicator.style.height = '100%';\n }\n scrollbar.className = 'iScrollHorizontalScrollbar';\n } else {\n if ( type === true ) {\n scrollbar.style.cssText += ';width:7px;bottom:2px;top:2px;right:1px';\n indicator.style.width = '100%';\n }\n scrollbar.className = 'iScrollVerticalScrollbar';\n }\n\n scrollbar.style.cssText += ';overflow:hidden';\n\n if ( !interactive ) {\n scrollbar.style.pointerEvents = 'none';\n }\n\n scrollbar.appendChild(indicator);\n\n return scrollbar;\n}\n\nfunction Indicator (scroller, options) {\n this.wrapper = typeof options.el == 'string' ? document.querySelector(options.el) : options.el;\n this.wrapperStyle = this.wrapper.style;\n this.indicator = this.wrapper.children[0];\n this.indicatorStyle = this.indicator.style;\n this.scroller = scroller;\n\n this.options = {\n listenX: true,\n listenY: true,\n interactive: false,\n resize: true,\n defaultScrollbars: false,\n shrink: false,\n fade: false,\n speedRatioX: 0,\n speedRatioY: 0\n };\n\n for ( var i in options ) {\n this.options[i] = options[i];\n }\n\n this.sizeRatioX = 1;\n this.sizeRatioY = 1;\n this.maxPosX = 0;\n this.maxPosY = 0;\n\n if ( this.options.interactive ) {\n if ( !this.options.disableTouch ) {\n utils.addEvent(this.indicator, 'touchstart', this);\n utils.addEvent(window, 'touchend', this);\n }\n if ( !this.options.disablePointer ) {\n utils.addEvent(this.indicator, utils.prefixPointerEvent('pointerdown'), this);\n utils.addEvent(window, utils.prefixPointerEvent('pointerup'), this);\n }\n if ( !this.options.disableMouse ) {\n utils.addEvent(this.indicator, 'mousedown', this);\n utils.addEvent(window, 'mouseup', this);\n }\n }\n\n if ( this.options.fade ) {\n this.wrapperStyle[utils.style.transform] = this.scroller.translateZ;\n var durationProp = utils.style.transitionDuration;\n if(!durationProp) {\n return;\n }\n this.wrapperStyle[durationProp] = utils.isBadAndroid ? '0.0001ms' : '0ms';\n // remove 0.0001ms\n var self = this;\n if(utils.isBadAndroid) {\n rAF(function() {\n if(self.wrapperStyle[durationProp] === '0.0001ms') {\n self.wrapperStyle[durationProp] = '0s';\n }\n });\n }\n this.wrapperStyle.opacity = '0';\n }\n}\n\nIndicator.prototype = {\n handleEvent: function (e) {\n switch ( e.type ) {\n case 'touchstart':\n case 'pointerdown':\n case 'MSPointerDown':\n case 'mousedown':\n this._start(e);\n break;\n case 'touchmove':\n case 'pointermove':\n case 'MSPointerMove':\n case 'mousemove':\n this._move(e);\n break;\n case 'touchend':\n case 'pointerup':\n case 'MSPointerUp':\n case 'mouseup':\n case 'touchcancel':\n case 'pointercancel':\n case 'MSPointerCancel':\n case 'mousecancel':\n this._end(e);\n break;\n }\n },\n\n destroy: function () {\n if ( this.options.fadeScrollbars ) {\n clearTimeout(this.fadeTimeout);\n this.fadeTimeout = null;\n }\n if ( this.options.interactive ) {\n utils.removeEvent(this.indicator, 'touchstart', this);\n utils.removeEvent(this.indicator, utils.prefixPointerEvent('pointerdown'), this);\n utils.removeEvent(this.indicator, 'mousedown', this);\n\n utils.removeEvent(window, 'touchmove', this);\n utils.removeEvent(window, utils.prefixPointerEvent('pointermove'), this);\n utils.removeEvent(window, 'mousemove', this);\n\n utils.removeEvent(window, 'touchend', this);\n utils.removeEvent(window, utils.prefixPointerEvent('pointerup'), this);\n utils.removeEvent(window, 'mouseup', this);\n }\n\n if ( this.options.defaultScrollbars ) {\n this.wrapper.parentNode.removeChild(this.wrapper);\n }\n },\n\n _start: function (e) {\n var point = e.touches ? e.touches[0] : e;\n\n e.preventDefault();\n e.stopPropagation();\n\n this.transitionTime();\n\n this.initiated = true;\n this.moved = false;\n this.lastPointX = point.pageX;\n this.lastPointY = point.pageY;\n\n this.startTime = utils.getTime();\n\n if ( !this.options.disableTouch ) {\n utils.addEvent(window, 'touchmove', this);\n }\n if ( !this.options.disablePointer ) {\n utils.addEvent(window, utils.prefixPointerEvent('pointermove'), this);\n }\n if ( !this.options.disableMouse ) {\n utils.addEvent(window, 'mousemove', this);\n }\n\n this.scroller._execEvent('beforeScrollStart');\n },\n\n _move: function (e) {\n var point = e.touches ? e.touches[0] : e,\n deltaX, deltaY,\n newX, newY,\n timestamp = utils.getTime();\n\n if ( !this.moved ) {\n this.scroller._execEvent('scrollStart');\n }\n\n this.moved = true;\n\n deltaX = point.pageX - this.lastPointX;\n this.lastPointX = point.pageX;\n\n deltaY = point.pageY - this.lastPointY;\n this.lastPointY = point.pageY;\n\n newX = this.x + deltaX;\n newY = this.y + deltaY;\n\n this._pos(newX, newY);\n\n// INSERT POINT: indicator._move\n\n e.preventDefault();\n e.stopPropagation();\n },\n\n _end: function (e) {\n if ( !this.initiated ) {\n return;\n }\n\n this.initiated = false;\n\n e.preventDefault();\n e.stopPropagation();\n\n utils.removeEvent(window, 'touchmove', this);\n utils.removeEvent(window, utils.prefixPointerEvent('pointermove'), this);\n utils.removeEvent(window, 'mousemove', this);\n\n if ( this.scroller.options.snap ) {\n var snap = this.scroller._nearestSnap(this.scroller.x, this.scroller.y);\n\n var time = this.options.snapSpeed || Math.max(\n Math.max(\n Math.min(Math.abs(this.scroller.x - snap.x), 1000),\n Math.min(Math.abs(this.scroller.y - snap.y), 1000)\n ), 300);\n\n if ( this.scroller.x != snap.x || this.scroller.y != snap.y ) {\n this.scroller.directionX = 0;\n this.scroller.directionY = 0;\n this.scroller.currentPage = snap;\n this.scroller.scrollTo(snap.x, snap.y, time, this.scroller.options.bounceEasing);\n }\n }\n\n if ( this.moved ) {\n this.scroller._execEvent('scrollEnd');\n }\n },\n\n transitionTime: function (time) {\n time = time || 0;\n var durationProp = utils.style.transitionDuration;\n if(!durationProp) {\n return;\n }\n\n this.indicatorStyle[durationProp] = time + 'ms';\n\n if ( !time && utils.isBadAndroid ) {\n this.indicatorStyle[durationProp] = '0.0001ms';\n // remove 0.0001ms\n var self = this;\n rAF(function() {\n if(self.indicatorStyle[durationProp] === '0.0001ms') {\n self.indicatorStyle[durationProp] = '0s';\n }\n });\n }\n },\n\n transitionTimingFunction: function (easing) {\n this.indicatorStyle[utils.style.transitionTimingFunction] = easing;\n },\n\n refresh: function () {\n this.transitionTime();\n\n if ( this.options.listenX && !this.options.listenY ) {\n this.indicatorStyle.display = this.scroller.hasHorizontalScroll ? 'block' : 'none';\n } else if ( this.options.listenY && !this.options.listenX ) {\n this.indicatorStyle.display = this.scroller.hasVerticalScroll ? 'block' : 'none';\n } else {\n this.indicatorStyle.display = this.scroller.hasHorizontalScroll || this.scroller.hasVerticalScroll ? 'block' : 'none';\n }\n\n if ( this.scroller.hasHorizontalScroll && this.scroller.hasVerticalScroll ) {\n utils.addClass(this.wrapper, 'iScrollBothScrollbars');\n utils.removeClass(this.wrapper, 'iScrollLoneScrollbar');\n\n if ( this.options.defaultScrollbars && this.options.customStyle ) {\n if ( this.options.listenX ) {\n this.wrapper.style.right = '8px';\n } else {\n this.wrapper.style.bottom = '8px';\n }\n }\n } else {\n utils.removeClass(this.wrapper, 'iScrollBothScrollbars');\n utils.addClass(this.wrapper, 'iScrollLoneScrollbar');\n\n if ( this.options.defaultScrollbars && this.options.customStyle ) {\n if ( this.options.listenX ) {\n this.wrapper.style.right = '2px';\n } else {\n this.wrapper.style.bottom = '2px';\n }\n }\n }\n\n var r = this.wrapper.offsetHeight; // force refresh\n\n if ( this.options.listenX ) {\n this.wrapperWidth = this.wrapper.clientWidth;\n if ( this.options.resize ) {\n this.indicatorWidth = Math.max(Math.round(this.wrapperWidth * this.wrapperWidth / (this.scroller.scrollerWidth || this.wrapperWidth || 1)), 8);\n this.indicatorStyle.width = this.indicatorWidth + 'px';\n } else {\n this.indicatorWidth = this.indicator.clientWidth;\n }\n\n this.maxPosX = this.wrapperWidth - this.indicatorWidth;\n\n if ( this.options.shrink == 'clip' ) {\n this.minBoundaryX = -this.indicatorWidth + 8;\n this.maxBoundaryX = this.wrapperWidth - 8;\n } else {\n this.minBoundaryX = 0;\n this.maxBoundaryX = this.maxPosX;\n }\n\n this.sizeRatioX = this.options.speedRatioX || (this.scroller.maxScrollX && (this.maxPosX / this.scroller.maxScrollX));\n }\n\n if ( this.options.listenY ) {\n this.wrapperHeight = this.wrapper.clientHeight;\n if ( this.options.resize ) {\n this.indicatorHeight = Math.max(Math.round(this.wrapperHeight * this.wrapperHeight / (this.scroller.scrollerHeight || this.wrapperHeight || 1)), 8);\n this.indicatorStyle.height = this.indicatorHeight + 'px';\n } else {\n this.indicatorHeight = this.indicator.clientHeight;\n }\n\n this.maxPosY = this.wrapperHeight - this.indicatorHeight;\n\n if ( this.options.shrink == 'clip' ) {\n this.minBoundaryY = -this.indicatorHeight + 8;\n this.maxBoundaryY = this.wrapperHeight - 8;\n } else {\n this.minBoundaryY = 0;\n this.maxBoundaryY = this.maxPosY;\n }\n\n this.maxPosY = this.wrapperHeight - this.indicatorHeight;\n this.sizeRatioY = this.options.speedRatioY || (this.scroller.maxScrollY && (this.maxPosY / this.scroller.maxScrollY));\n }\n\n this.updatePosition();\n },\n\n updatePosition: function () {\n var x = this.options.listenX && Math.round(this.sizeRatioX * this.scroller.x) || 0,\n y = this.options.listenY && Math.round(this.sizeRatioY * this.scroller.y) || 0;\n\n if ( !this.options.ignoreBoundaries ) {\n if ( x < this.minBoundaryX ) {\n if ( this.options.shrink == 'scale' ) {\n this.width = Math.max(this.indicatorWidth + x, 8);\n this.indicatorStyle.width = this.width + 'px';\n }\n x = this.minBoundaryX;\n } else if ( x > this.maxBoundaryX ) {\n if ( this.options.shrink == 'scale' ) {\n this.width = Math.max(this.indicatorWidth - (x - this.maxPosX), 8);\n this.indicatorStyle.width = this.width + 'px';\n x = this.maxPosX + this.indicatorWidth - this.width;\n } else {\n x = this.maxBoundaryX;\n }\n } else if ( this.options.shrink == 'scale' && this.width != this.indicatorWidth ) {\n this.width = this.indicatorWidth;\n this.indicatorStyle.width = this.width + 'px';\n }\n\n if ( y < this.minBoundaryY ) {\n if ( this.options.shrink == 'scale' ) {\n this.height = Math.max(this.indicatorHeight + y * 3, 8);\n this.indicatorStyle.height = this.height + 'px';\n }\n y = this.minBoundaryY;\n } else if ( y > this.maxBoundaryY ) {\n if ( this.options.shrink == 'scale' ) {\n this.height = Math.max(this.indicatorHeight - (y - this.maxPosY) * 3, 8);\n this.indicatorStyle.height = this.height + 'px';\n y = this.maxPosY + this.indicatorHeight - this.height;\n } else {\n y = this.maxBoundaryY;\n }\n } else if ( this.options.shrink == 'scale' && this.height != this.indicatorHeight ) {\n this.height = this.indicatorHeight;\n this.indicatorStyle.height = this.height + 'px';\n }\n }\n\n this.x = x;\n this.y = y;\n\n if ( this.scroller.options.useTransform ) {\n this.indicatorStyle[utils.style.transform] = 'translate(' + x + 'px,' + y + 'px)' + this.scroller.translateZ;\n } else {\n this.indicatorStyle.left = x + 'px';\n this.indicatorStyle.top = y + 'px';\n }\n },\n\n _pos: function (x, y) {\n if ( x < 0 ) {\n x = 0;\n } else if ( x > this.maxPosX ) {\n x = this.maxPosX;\n }\n\n if ( y < 0 ) {\n y = 0;\n } else if ( y > this.maxPosY ) {\n y = this.maxPosY;\n }\n\n x = this.options.listenX ? Math.round(x / this.sizeRatioX) : this.scroller.x;\n y = this.options.listenY ? Math.round(y / this.sizeRatioY) : this.scroller.y;\n\n this.scroller.scrollTo(x, y);\n },\n\n fade: function (val, hold) {\n if ( hold && !this.visible ) {\n return;\n }\n\n clearTimeout(this.fadeTimeout);\n this.fadeTimeout = null;\n\n var time = val ? 250 : 500,\n delay = val ? 0 : 300;\n\n val = val ? '1' : '0';\n\n this.wrapperStyle[utils.style.transitionDuration] = time + 'ms';\n\n this.fadeTimeout = setTimeout((function (val) {\n this.wrapperStyle.opacity = val;\n this.visible = +val;\n }).bind(this, val), delay);\n }\n};\n\nIScroll.utils = utils;\n\nif ( typeof module != 'undefined' && module.exports ) {\n module.exports = IScroll;\n} else if ( typeof define == 'function' && define.amd ) {\n define( function () { return IScroll; } );\n} else {\n window.IScroll = IScroll;\n}\n\n})(window, document, Math);\n\n\n/*!\n* Scrolloverflow module for fullPage.js\n* https://github.com/alvarotrigo/fullPage.js\n* @license MIT licensed\n*\n* Copyright (C) 2015 alvarotrigo.com - A project by Alvaro Trigo\n*/\n(function (window, document, $) {\n $.fn.fp_scrolloverflow = (function() {\n\n // keeping central set of classnames and selectors\n var SCROLLABLE = 'fp-scrollable';\n var SCROLLABLE_SEL = '.' + SCROLLABLE;\n\n var ACTIVE = 'active';\n var ACTIVE_SEL = '.' + ACTIVE;\n\n var SECTION = 'fp-section';\n var SECTION_SEL = '.' + SECTION;\n var SECTION_ACTIVE_SEL = SECTION_SEL + ACTIVE_SEL;\n\n var SLIDE = 'fp-slide';\n var SLIDE_SEL = '.' + SLIDE;\n var SLIDE_ACTIVE_SEL = SLIDE_SEL + ACTIVE_SEL;\n\n var SLIDES_WRAPPER = 'fp-slides';\n var SLIDES_WRAPPER_SEL = '.' + SLIDES_WRAPPER;\n\n var TABLE_CELL = 'fp-tableCell';\n var TABLE_CELL_SEL = '.' + TABLE_CELL;\n\n var RESPONSIVE = 'fp-responsive';\n var AUTO_HEIGHT_RESPONSIVE= 'fp-auto-height-responsive';\n\n /*\n * Turns iScroll `mousewheel` option off dynamically\n * https://github.com/cubiq/iscroll/issues/1036\n */\n IScroll.prototype.wheelOn = function () {\n this.wrapper.addEventListener('wheel', this);\n this.wrapper.addEventListener('mousewheel', this);\n this.wrapper.addEventListener('DOMMouseScroll', this);\n };\n\n /*\n * Turns iScroll `mousewheel` option on dynamically\n * https://github.com/cubiq/iscroll/issues/1036\n */\n IScroll.prototype.wheelOff = function () {\n this.wrapper.removeEventListener('wheel', this);\n this.wrapper.removeEventListener('mousewheel', this);\n this.wrapper.removeEventListener('DOMMouseScroll', this);\n };\n\n /**\n * Returns an integer representing the padding dimensions in px.\n */\n function getPaddings(element){\n var section = element.closest(SECTION_SEL);\n if(section.length){\n return parseInt(section.css('padding-bottom')) + parseInt(section.css('padding-top'));\n }\n return 0;\n }\n\n function scrollBarHandler(){\n var self = this;\n self.options = null;\n\n self.init = function(options, iscrollOptions){\n self.options = options;\n self.iscrollOptions = iscrollOptions;\n\n if(document.readyState === 'complete'){\n createScrollBarForAll();\n $.fn.fullpage.shared.afterRenderActions();\n }\n //after DOM and images are loaded\n $(window).on('load', function(){\n createScrollBarForAll();\n $.fn.fullpage.shared.afterRenderActions();\n });\n\n return self;\n };\n\n /**\n * Creates the scrollbar for the sections and slides in the site\n */\n function createScrollBarForAll(){\n if($('body').hasClass(RESPONSIVE)){\n removeResponsiveScrollOverflows();\n }\n else{\n forEachSectionAndSlide(createScrollBar);\n }\n }\n\n /**\n * Checks if the element needs scrollbar and if the user wants to apply it.\n * If so it creates it.\n *\n * @param {Object} element jQuery object of the section or slide\n */\n function createScrollBar(element){\n //User doesn't want scrollbar here? Sayonara baby!\n if(element.hasClass('fp-noscroll')) return;\n\n //necessary to make `scrollHeight` work under Opera 12\n element.css('overflow', 'hidden');\n\n var scrollOverflowHandler = self.options.scrollOverflowHandler;\n var wrap = scrollOverflowHandler.wrapContent();\n var section = element.closest(SECTION_SEL); //in case element is a slide\n var scrollable = scrollOverflowHandler.scrollable(element);\n var contentHeight;\n var paddings = getPaddings(section);\n\n //if there was scroll, the contentHeight will be the one in the scrollable section\n if(scrollable.length){\n contentHeight = scrollOverflowHandler.scrollHeight(element);\n }\n else{\n contentHeight = element.get(0).scrollHeight - paddings;\n if(self.options.verticalCentered){\n contentHeight = element.find(TABLE_CELL_SEL).get(0).scrollHeight - paddings;\n }\n }\n\n var scrollHeight = $(window).height() - paddings;\n\n //needs scroll?\n if ( contentHeight > scrollHeight) {\n //did we already have an scrollbar ? Updating it\n if(scrollable.length){\n scrollOverflowHandler.update(element, scrollHeight);\n }\n //creating the scrolling\n else{\n if(self.options.verticalCentered){\n element.find(TABLE_CELL_SEL).wrapInner(wrap);\n }else{\n element.wrapInner(wrap);\n }\n scrollOverflowHandler.create(element, scrollHeight, self.iscrollOptions);\n }\n }\n //removing the scrolling when it is not necessary anymore\n else{\n scrollOverflowHandler.remove(element);\n }\n\n //undo\n element.css('overflow', '');\n }\n\n /**\n * Applies a callback function to each section in the site\n * or the slides within them\n */\n function forEachSectionAndSlide(callback){\n $(SECTION_SEL).each(function(){\n var slides = $(this).find(SLIDE_SEL);\n\n if(slides.length){\n slides.each(function(){\n callback($(this));\n });\n }else{\n callback($(this));\n }\n });\n }\n\n /**\n * Removes scrollOverflow for sections using the class `fp-auto-height-responsive`\n */\n function removeResponsiveScrollOverflows(){\n var scrollOverflowHandler = self.options.scrollOverflowHandler;\n forEachSectionAndSlide(function(element){\n if(element.closest(SECTION_SEL).hasClass(AUTO_HEIGHT_RESPONSIVE)){\n scrollOverflowHandler.remove(element);\n }\n });\n }\n\n //public functions\n self.createScrollBarForAll = createScrollBarForAll;\n }\n\n /**\n * An object to handle overflow scrolling.\n * This uses jquery.slimScroll to accomplish overflow scrolling.\n * It is possible to pass in an alternate scrollOverflowHandler\n * to the fullpage.js option that implements the same functions\n * as this handler.\n *\n * @type {Object}\n */\n var iscrollHandler = {\n refreshId: null,\n iScrollInstances: [],\n\n // Default options for iScroll.js used when using scrollOverflow\n iscrollOptions: {\n scrollbars: true,\n mouseWheel: true,\n hideScrollbars: false,\n fadeScrollbars: false,\n disableMouse: true,\n interactiveScrollbars: true\n },\n\n init: function(options){\n var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0) || (navigator.maxTouchPoints));\n\n //fixing bug in iScroll with links: https://github.com/cubiq/iscroll/issues/783\n iscrollHandler.iscrollOptions.click = isTouch; // see #2035\n\n //extending iScroll options with the user custom ones\n iscrollHandler.iscrollOptions = $.extend(iscrollHandler.iscrollOptions, options.scrollOverflowOptions);\n\n return new scrollBarHandler().init(options, iscrollHandler.iscrollOptions);\n },\n\n // Enables or disables the mouse wheel for the active section or all slides in it\n toggleWheel: function(value){\n var scrollable = $(SECTION_ACTIVE_SEL).find(SCROLLABLE_SEL);\n scrollable.each(function(){\n var iScrollInstance = $(this).data('iscrollInstance');\n if(typeof iScrollInstance !== 'undefined' && iScrollInstance){\n if(value){\n iScrollInstance.wheelOn();\n }\n else{\n iScrollInstance.wheelOff();\n }\n }\n });\n },\n\n /**\n * Turns off iScroll for the destination section.\n * When scrolling very fast on some trackpads (and Apple laptops) the inertial scrolling would\n * scroll the destination section/slide before the sections animations ends.\n */\n onLeave: function(){\n iscrollHandler.toggleWheel(false);\n },\n\n // Turns off iScroll for the leaving section\n beforeLeave: function(){\n iscrollHandler.onLeave()\n },\n\n // Turns on iScroll on section load\n afterLoad: function(){\n iscrollHandler.toggleWheel(true);\n },\n\n /**\n * Called when overflow scrolling is needed for a section.\n *\n * @param {Object} element jQuery object containing current section\n * @param {Number} scrollHeight Current window height in pixels\n */\n create: function(element, scrollHeight, iscrollOptions) {\n var scrollable = element.find(SCROLLABLE_SEL);\n\n scrollable.height(scrollHeight);\n scrollable.each(function() {\n var $this = $(this);\n var iScrollInstance = $this.data('iscrollInstance');\n if (iScrollInstance) {\n $.each(iscrollHandler.iScrollInstances, function(){\n $(this).destroy();\n });\n }\n\n iScrollInstance = new IScroll($this.get(0), iscrollOptions);\n iscrollHandler.iScrollInstances.push(iScrollInstance);\n\n if(!element.closest(SECTION_SEL).hasClass(ACTIVE)){\n //off by default until the section gets active\n iScrollInstance.wheelOff();\n }\n\n $this.data('iscrollInstance', iScrollInstance);\n });\n },\n\n /**\n * Return a boolean depending on whether the scrollable element is a\n * the end or at the start of the scrolling depending on the given type.\n *\n * @param {String} type Either 'top' or 'bottom'\n * @param {Object} scrollable jQuery object for the scrollable element\n * @return {Boolean}\n */\n isScrolled: function(type, scrollable) {\n var scroller = scrollable.data('iscrollInstance');\n\n //no scroller?\n if (!scroller) {\n return true;\n }\n\n if (type === 'top') {\n return scroller.y >= 0 && !scrollable.scrollTop();\n } else if (type === 'bottom') {\n return (0 - scroller.y) + scrollable.scrollTop() + 1 + scrollable.innerHeight() >= scrollable[0].scrollHeight;\n }\n },\n\n /**\n * Returns the scrollable element for the given section.\n * If there are landscape slides, will only return a scrollable element\n * if it is in the active slide.\n *\n * @param {Object} activeSection jQuery object containing current section\n * @return {Boolean}\n */\n scrollable: function(activeSection){\n // if there are landscape slides, we check if the scrolling bar is in the current one or not\n if (activeSection.find(SLIDES_WRAPPER_SEL).length) {\n return activeSection.find(SLIDE_ACTIVE_SEL).find(SCROLLABLE_SEL);\n }\n return activeSection.find(SCROLLABLE_SEL);\n },\n\n /**\n * Returns the scroll height of the wrapped content.\n * If this is larger than the window height minus section padding,\n * overflow scrolling is needed.\n *\n * @param {Object} element jQuery object containing current section\n * @return {Number}\n */\n scrollHeight: function(element) {\n return element.find(SCROLLABLE_SEL).children().first().get(0).scrollHeight;\n },\n\n /**\n * Called when overflow scrolling is no longer needed for a section.\n *\n * @param {Object} element jQuery object containing current section\n */\n remove: function(element) {\n var scrollable = element.find(SCROLLABLE_SEL);\n if (scrollable.length) {\n var iScrollInstance = scrollable.data('iscrollInstance');\n if(iScrollInstance){\n iScrollInstance.destroy();\n }\n\n scrollable.data('iscrollInstance', null);\n }\n element.find(SCROLLABLE_SEL).children().first().children().first().unwrap().unwrap();\n },\n\n /**\n * Called when overflow scrolling has already been setup but the\n * window height has potentially changed.\n *\n * @param {Object} element jQuery object containing current section\n * @param {Number} scrollHeight Current window height in pixels\n */\n update: function(element, scrollHeight) {\n //using a timeout in order to execute the refresh function only once when `update` is called multiple times in a\n //short period of time.\n //it also comes on handy because iScroll requires the use of timeout when using `refresh`.\n clearTimeout(iscrollHandler.refreshId);\n iscrollHandler.refreshId = setTimeout(function(){\n $.each(iscrollHandler.iScrollInstances, function(){\n $(this).get(0).refresh();\n\n //ugly hack that we are forced to use due to the timeout delay\n //otherwise done on the fullpage.js reBuild function\n $.fn.fullpage.silentMoveTo($(SECTION_ACTIVE_SEL).index() + 1);\n });\n }, 150);\n\n //updating the wrappers height\n element.find(SCROLLABLE_SEL)\n .css('height', scrollHeight + 'px')\n .parent().css('height', scrollHeight + getPaddings(element) + 'px');\n },\n\n /**\n * Called to get any additional elements needed to wrap the section\n * content in order to facilitate overflow scrolling.\n *\n * @return {String|Object} Can be a string containing HTML,\n * a DOM element, or jQuery object.\n */\n wrapContent: function() {\n return '
';\n }\n };\n\n return {\n iscrollHandler: iscrollHandler\n };\n })();\n})(window, document, jQuery);"]} \ No newline at end of file