/*! * customized version of iscroll.js 0.0.5 * it fixes bugs affecting its integration with fullpage.js */ /*! iscroll v5.2.0 ~ (c) 2008-2016 matteo spinelli ~ http://cubiq.org/license */ !function(t,i,e){function s(e,s){this.wrapper="string"==typeof e?i.queryselector(e):e,this.scroller=this.wrapper.children[0],this.scrollerstyle=this.scroller.style,this.options={resizescrollbars:!0,mousewheelspeed:20,snapthreshold:.334,disablepointer:!h.haspointer,disabletouch:h.haspointer||!h.hastouch,disablemouse:h.haspointer||h.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:"undefined"==typeof t.onmousedown};for(var o in s)this.options[o]=s[o];this.translatez=this.options.hwcompositing&&h.hasperspective?" translatez(0)":"",this.options.usetransition=h.hastransition&&this.options.usetransition,this.options.usetransform=h.hastransform&&this.options.usetransform,this.options.eventpassthrough=this.options.eventpassthrough===!0?"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?h.ease[this.options.bounceeasing]||h.ease.circular:this.options.bounceeasing,this.options.resizepolling=void 0===this.options.resizepolling?60:this.options.resizepolling,this.options.tap===!0&&(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 o(t,e,s){var o=i.createelement("div"),n=i.createelement("div");return s===!0&&(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?(s===!0&&(o.style.csstext+=";height:7px;left:2px;right:2px;bottom:0",n.style.height="100%"),o.classname="iscrollhorizontalscrollbar"):(s===!0&&(o.style.csstext+=";width:7px;bottom:2px;top:2px;right:1px",n.style.width="100%"),o.classname="iscrollverticalscrollbar"),o.style.csstext+=";overflow:hidden",e||(o.style.pointerevents="none"),o.appendchild(n),o}function n(e,s){this.wrapper="string"==typeof s.el?i.queryselector(s.el):s.el,this.wrapperstyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorstyle=this.indicator.style,this.scroller=e,this.options={listenx:!0,listeny:!0,interactive:!1,resize:!0,defaultscrollbars:!1,shrink:!1,fade:!1,speedratiox:0,speedratioy:0};for(var o in s)this.options[o]=s[o];if(this.sizeratiox=1,this.sizeratioy=1,this.maxposx=0,this.maxposy=0,this.options.interactive&&(this.options.disabletouch||(h.addevent(this.indicator,"touchstart",this),h.addevent(t,"touchend",this)),this.options.disablepointer||(h.addevent(this.indicator,h.prefixpointerevent("pointerdown"),this),h.addevent(t,h.prefixpointerevent("pointerup"),this)),this.options.disablemouse||(h.addevent(this.indicator,"mousedown",this),h.addevent(t,"mouseup",this))),this.options.fade){this.wrapperstyle[h.style.transform]=this.scroller.translatez;var n=h.style.transitionduration;if(!n)return;this.wrapperstyle[n]=h.isbadandroid?"0.0001ms":"0ms";var a=this;h.isbadandroid&&r(function(){"0.0001ms"===a.wrapperstyle[n]&&(a.wrapperstyle[n]="0s")}),this.wrapperstyle.opacity="0"}}var r=t.requestanimationframe||t.webkitrequestanimationframe||t.mozrequestanimationframe||t.orequestanimationframe||t.msrequestanimationframe||function(i){t.settimeout(i,1e3/60)},h=function(){function s(t){return r!==!1&&(""===r?t:r+t.charat(0).touppercase()+t.substr(1))}var o={},n=i.createelement("div").style,r=function(){for(var t,i=["t","webkitt","mozt","mst","ot"],e=0,s=i.length;e0&&(h=n?n/2.5*(c/8):0,l=e.abs(t)+h,a=l/c),{destination:e.round(h),duration:a}};var h=s("transform");return o.extend(o,{hastransform:h!==!1,hasperspective:s("perspective")in n,hastouch:"ontouchstart"in t,haspointer:!(!t.pointerevent&&!t.mspointerevent),hastransition:s("transition")in n}),o.isbadandroid=function(){var i=t.navigator.appversion;if(/android/.test(i)&&!/chrome\/\d/.test(i)){var e=i.match(/safari\/(\d+.\d)/);return!(e&&"object"==typeof e&&e.length>=2)||parsefloat(e[1])<535.19}return!1}(),o.extend(o.style={},{transform:h,transitiontimingfunction:s("transitiontimingfunction"),transitionduration:s("transitionduration"),transitiondelay:s("transitiondelay"),transformorigin:s("transformorigin")}),o.hasclass=function(t,i){var e=new regexp("(^|\\s)"+i+"(\\s|$)");return e.test(t.classname)},o.addclass=function(t,i){if(!o.hasclass(t,i)){var e=t.classname.split(" ");e.push(i),t.classname=e.join(" ")}},o.removeclass=function(t,i){if(o.hasclass(t,i)){var e=new regexp("(^|\\s)"+i+"(\\s|$)","g");t.classname=t.classname.replace(e," ")}},o.offset=function(t){for(var i=-t.offsetleft,e=-t.offsettop;t=t.offsetparent;)i-=t.offsetleft,e-=t.offsettop;return{left:i,top:e}},o.preventdefaultexception=function(t,i){for(var e in i)if(i[e].test(t[e]))return!0;return!1},o.extend(o.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}),o.extend(o.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 e.sqrt(1- --t*t)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(t){var i=4;return(t-=1)*t*((i+1)*t+i)+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){var i=.22,s=.4;return 0===t?0:1==t?1:s*e.pow(2,-10*t)*e.sin((t-i/4)*(2*e.pi)/i)+1}}}),o.tap=function(t,e){var s=i.createevent("event");s.initevent(e,!0,!0),s.pagex=t.pagex,s.pagey=t.pagey,t.target.dispatchevent(s)},o.click=function(e){var s,o=e.target;/(select|input|textarea)/i.test(o.tagname)||(s=i.createevent(t.mouseevent?"mouseevents":"event"),s.initevent("click",!0,!0),s.view=e.view||t,s.detail=1,s.screenx=o.screenx||0,s.screeny=o.screeny||0,s.clientx=o.clientx||0,s.clienty=o.clienty||0,s.ctrlkey=!!e.ctrlkey,s.altkey=!!e.altkey,s.shiftkey=!!e.shiftkey,s.metakey=!!e.metakey,s.button=0,s.relatedtarget=null,s._constructed=!0,o.dispatchevent(s))},o}();s.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!=h.eventtype[t.type]){var i;if(i=t.which?t.button:t.button<2?0:4==t.button?1:2,0!==i)return}if(this.enabled&&(!this.initiated||h.eventtype[t.type]===this.initiated)){!this.options.preventdefault||h.isbadandroid||h.preventdefaultexception(t.target,this.options.preventdefaultexception)||t.preventdefault();var s,o=t.touches?t.touches[0]:t;this.initiated=h.eventtype[t.type],this.moved=!1,this.distx=0,this.disty=0,this.directionx=0,this.directiony=0,this.directionlocked=0,this.starttime=h.gettime(),this.options.usetransition&&this.isintransition?(this._transitiontime(),this.isintransition=!1,s=this.getcomputedposition(),this._translate(e.round(s.x),e.round(s.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=o.pagex,this.pointy=o.pagey,this._execevent("beforescrollstart")}},_move:function(t){if(this.enabled&&h.eventtype[t.type]===this.initiated){this.options.preventdefault&&t.preventdefault();var i,s,o,n,r=t.touches?t.touches[0]:t,a=r.pagex-this.pointx,l=r.pagey-this.pointy,c=h.gettime();if(this.pointx=r.pagex,this.pointy=r.pagey,this.distx+=a,this.disty+=l,o=e.abs(this.distx),n=e.abs(this.disty),!(c-this.endtime>300&&o<10&&n<10)){if(this.directionlocked||this.options.freescroll||(o>n+this.options.directionlockthreshold?this.directionlocked="h":n>=o+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,s=this.y+l,(i>0||i0?0:this.maxscrollx),(s>0||s0?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,s),c-this.starttime>300&&(this.starttime=c,this.startx=this.x,this.starty=this.y)}}},_end:function(t){if(this.enabled&&h.eventtype[t.type]===this.initiated){this.options.preventdefault&&!h.preventdefaultexception(t.target,this.options.preventdefaultexception)&&t.preventdefault();var i,s,o=(t.changedtouches?t.changedtouches[0]:t,h.gettime()-this.starttime),n=e.round(this.x),r=e.round(this.y),a=e.abs(n-this.startx),l=e.abs(r-this.starty),c=0,p="";if(this.isintransition=0,this.initiated=0,this.endtime=h.gettime(),!this.resetposition(this.options.bouncetime)){if(this.scrollto(n,r),!this.moved)return this.options.tap&&h.tap(t,this.options.tap),this.options.click&&h.click(t),void this._execevent("scrollcancel");if(this._events.flick&&o<200&&a<100&&l<100)return void this._execevent("flick");if(this.options.momentum&&o<300&&(i=this.hashorizontalscroll?h.momentum(this.x,this.startx,o,this.maxscrollx,this.options.bounce?this.wrapperwidth:0,this.options.deceleration):{destination:n,duration:0},s=this.hasverticalscroll?h.momentum(this.y,this.starty,o,this.maxscrolly,this.options.bounce?this.wrapperheight:0,this.options.deceleration):{destination:r,duration:0},n=i.destination,r=s.destination,c=e.max(i.duration,s.duration),this.isintransition=1),this.options.snap){var d=this._nearestsnap(n,r);this.currentpage=d,c=this.options.snapspeed||e.max(e.max(e.min(e.abs(n-d.x),1e3),e.min(e.abs(r-d.y),1e3)),300),n=d.x,r=d.y,this.directionx=0,this.directiony=0,p=this.options.bounceeasing}return n!=this.x||r!=this.y?((n>0||n0||r0?i=0:this.x0?e=0:this.y-1&&this._events[t].splice(e,1)}},_execevent:function(t){if(this._events[t]){var i=0,e=this._events[t].length;if(e)for(;i0;var o=this.options.usetransition&&s.style;!e||o?(o&&(this._transitiontimingfunction(s.style),this._transitiontime(e)),this._translate(t,i)):this._animate(t,i,e,s.fn)},scrolltoelement:function(t,i,s,o,n){if(t=t.nodetype?t:this.scroller.queryselector(t)){var r=h.offset(t);r.left-=this.wrapperoffset.left,r.top-=this.wrapperoffset.top,s===!0&&(s=e.round(t.offsetwidth/2-this.wrapper.offsetwidth/2)),o===!0&&(o=e.round(t.offsetheight/2-this.wrapper.offsetheight/2)),r.left-=s||0,r.top-=o||0,r.left=r.left>0?0:r.left0?0:r.top0?o--:i<0&&o++,s>0?n--:s<0&&n++,void this.gotopage(o,n);o=this.x+e.round(this.hashorizontalscroll?i:0),n=this.y+e.round(this.hasverticalscroll?s:0),this.directionx=i>0?-1:i<0?1:0,this.directiony=s>0?-1:s<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:e.max(l,this.maxscrollx),y:e.max(n,this.maxscrolly),width:c,height:p,cx:l-s,cy:n-o},n-=p,t++;l-=c,h++}else for(r=this.options.snap,t=r.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=e.round(this.pages[this.currentpage.pagex][this.currentpage.pagey].width*this.options.snapthreshold),this.snapthresholdy=e.round(this.pages[this.currentpage.pagex][this.currentpage.pagey].height*this.options.snapthreshold))}}),this.on("flick",function(){var t=this.options.snapspeed||e.max(e.max(e.min(e.abs(this.x-this.startx),1e3),e.min(e.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 s=0,o=this.pages.length,n=0;if(e.abs(t-this.absstartx)0?t=0:t0?i=0:i=this.pages[s][0].cx){t=this.pages[s][0].x;break}for(o=this.pages[s].length;n=this.pages[0][n].cy){i=this.pages[0][n].y;break}return s==this.currentpage.pagex&&(s+=this.directionx,s<0?s=0:s>=this.pages.length&&(s=this.pages.length-1),t=this.pages[s][0].x),n==this.currentpage.pagey&&(n+=this.directiony,n<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:s,pagey:n}},gotopage:function(t,i,s,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;s=void 0===s?this.options.snapspeed||e.max(e.max(e.min(e.abs(n-this.x),1e3),e.min(e.abs(r-this.y),1e3)),300):s,this.currentpage={x:n,y:r,pagex:t,pagey:i},this.scrollto(n,r,s,o)},next:function(t,i){var e=this.currentpage.pagex,s=this.currentpage.pagey;e++,e>=this.pages.length&&this.hasverticalscroll&&(e=0,s++),this.gotopage(e,s,t,i)},prev:function(t,i){var e=this.currentpage.pagex,s=this.currentpage.pagey;e--,e<0&&this.hasverticalscroll&&(e=0,s--),this.gotopage(e,s,t,i)},_initkeys:function(i){var e,s={pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keybindings)for(e in this.options.keybindings)"string"==typeof this.options.keybindings[e]&&(this.options.keybindings[e]=this.options.keybindings[e].touppercase().charcodeat(0));else this.options.keybindings={};for(e in s)this.options.keybindings[e]=this.options.keybindings[e]||s[e];h.addevent(t,"keydown",this),this.on("destroy",function(){h.removeevent(t,"keydown",this)})},_key:function(t){if(this.enabled){var i,s=this.options.snap,o=s?this.currentpage.pagex:this.x,n=s?this.currentpage.pagey:this.y,r=h.gettime(),a=this.keytime||0,l=.25;switch(this.options.usetransition&&this.isintransition&&(i=this.getcomputedposition(),this._translate(e.round(i.x),e.round(i.y)),this.isintransition=!1),this.keyacceleration=r-a<200?e.min(this.keyacceleration+l,50):0,t.keycode){case this.options.keybindings.pageup:this.hashorizontalscroll&&!this.hasverticalscroll?o+=s?1:this.wrapperwidth:n+=s?1:this.wrapperheight;break;case this.options.keybindings.pagedown:this.hashorizontalscroll&&!this.hasverticalscroll?o-=s?1:this.wrapperwidth:n-=s?1:this.wrapperheight;break;case this.options.keybindings.end:o=s?this.pages.length-1:this.maxscrollx,n=s?this.pages[0].length-1:this.maxscrolly;break;case this.options.keybindings.home:o=0,n=0;break;case this.options.keybindings.left:o+=s?-1:5+this.keyacceleration>>0;break;case this.options.keybindings.up:n+=s?1:5+this.keyacceleration>>0;break;case this.options.keybindings.right:o-=s?-1:5+this.keyacceleration>>0;break;case this.options.keybindings.down:n-=s?1:5+this.keyacceleration>>0;break;default:return}if(s)return void this.gotopage(o,n);o>0?(o=0,this.keyacceleration=0):o0?(n=0,this.keyacceleration=0):n=p?(n.isanimating=!1,n._translate(t,i),void(n.resetposition(n.options.bouncetime)||n._execevent("scrollend"))):(m=(m-c)/e,f=s(m),d=(t-a)*f+a,u=(i-l)*f+l,n._translate(d,u),void(n.isanimating&&r(o)))}var n=this,a=this.x,l=this.y,c=h.gettime(),p=c+e;this.isanimating=!0,o()},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())}}},n.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&&(h.removeevent(this.indicator,"touchstart",this),h.removeevent(this.indicator,h.prefixpointerevent("pointerdown"),this),h.removeevent(this.indicator,"mousedown",this),h.removeevent(t,"touchmove",this),h.removeevent(t,h.prefixpointerevent("pointermove"),this),h.removeevent(t,"mousemove",this),h.removeevent(t,"touchend",this),h.removeevent(t,h.prefixpointerevent("pointerup"),this),h.removeevent(t,"mouseup",this)),this.options.defaultscrollbars&&this.wrapper.parentnode.removechild(this.wrapper)},_start:function(i){var e=i.touches?i.touches[0]:i;i.preventdefault(),i.stoppropagation(),this.transitiontime(),this.initiated=!0,this.moved=!1,this.lastpointx=e.pagex,this.lastpointy=e.pagey,this.starttime=h.gettime(),this.options.disabletouch||h.addevent(t,"touchmove",this),this.options.disablepointer||h.addevent(t,h.prefixpointerevent("pointermove"),this),this.options.disablemouse||h.addevent(t,"mousemove",this),this.scroller._execevent("beforescrollstart")},_move:function(t){var i,e,s,o,n=t.touches?t.touches[0]:t;h.gettime();this.moved||this.scroller._execevent("scrollstart"),this.moved=!0,i=n.pagex-this.lastpointx,this.lastpointx=n.pagex,e=n.pagey-this.lastpointy,this.lastpointy=n.pagey,s=this.x+i,o=this.y+e,this._pos(s,o),t.preventdefault(),t.stoppropagation()},_end:function(i){if(this.initiated){if(this.initiated=!1,i.preventdefault(),i.stoppropagation(),h.removeevent(t,"touchmove",this),h.removeevent(t,h.prefixpointerevent("pointermove"),this),h.removeevent(t,"mousemove",this),this.scroller.options.snap){var s=this.scroller._nearestsnap(this.scroller.x,this.scroller.y),o=this.options.snapspeed||e.max(e.max(e.min(e.abs(this.scroller.x-s.x),1e3),e.min(e.abs(this.scroller.y-s.y),1e3)),300);this.scroller.x==s.x&&this.scroller.y==s.y||(this.scroller.directionx=0,this.scroller.directiony=0,this.scroller.currentpage=s,this.scroller.scrollto(s.x,s.y,o,this.scroller.options.bounceeasing))}this.moved&&this.scroller._execevent("scrollend")}},transitiontime:function(t){t=t||0;var i=h.style.transitionduration;if(i&&(this.indicatorstyle[i]=t+"ms",!t&&h.isbadandroid)){this.indicatorstyle[i]="0.0001ms";var e=this;r(function(){"0.0001ms"===e.indicatorstyle[i]&&(e.indicatorstyle[i]="0s")})}},transitiontimingfunction:function(t){this.indicatorstyle[h.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?(h.addclass(this.wrapper,"iscrollbothscrollbars"),h.removeclass(this.wrapper,"iscrolllonescrollbar"),this.options.defaultscrollbars&&this.options.customstyle&&(this.options.listenx?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(h.removeclass(this.wrapper,"iscrollbothscrollbars"),h.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=e.max(e.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=-this.indicatorwidth+8,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=e.max(e.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=-this.indicatorheight+8,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&&e.round(this.sizeratiox*this.scroller.x)||0,i=this.options.listeny&&e.round(this.sizeratioy*this.scroller.y)||0;this.options.ignoreboundaries||(tthis.maxboundaryx?"scale"==this.options.shrink?(this.width=e.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=e.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[h.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?e.round(t/this.sizeratiox):this.scroller.x,i=this.options.listeny?e.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 e=t?250:500,s=t?0:300;t=t?"1":"0",this.wrapperstyle[h.style.transitionduration]=e+"ms",this.fadetimeout=settimeout(function(t){this.wrapperstyle.opacity=t,this.visible=+t}.bind(this,t),s)}}},s.utils=h,"undefined"!=typeof module&&module.exports?module.exports=s:"function"==typeof define&&define.amd?define(function(){return s}):t.iscroll=s}(window,document,math),/*! * fullpage scrolloverflow * https://github.com/alvarotrigo/fullpage.js * @license mit licensed * * copyright (c) 2015 alvarotrigo.com - a project by alvaro trigo */ function(t,i){var e="active",s="."+e,o="fp-section",n="."+o,r=n+s,h="fp-slide",a="."+h,l=a+s,c="fp-slides",p="."+c,d="fp-scrollable",u="."+d;"undefined"!=typeof iscroll&&(iscroll.prototype.wheelon=function(){this.wrapper.addeventlistener("wheel",this),this.wrapper.addeventlistener("mousewheel",this),this.wrapper.addeventlistener("dommousescroll",this)},iscroll.prototype.wheeloff=function(){this.wrapper.removeeventlistener("wheel",this),this.wrapper.removeeventlistener("mousewheel",this),this.wrapper.removeeventlistener("dommousescroll",this)}),t.iscrollhandler={refreshid:null,iscrollinstances:[],togglewheel:function(t){var e=i(r).find(u);e.each(function(){var e=i(this).data("iscrollinstance");"undefined"!=typeof e&&e&&(t?e.wheelon():e.wheeloff())})},onleave:function(){iscrollhandler.togglewheel(!1)},beforeleave:function(){iscrollhandler.onleave()},afterload:function(){iscrollhandler.togglewheel(!0)},create:function(t,e,s){var o=t.find(u);o.height(e),o.each(function(){var t=i(this),e=t.data("iscrollinstance");e&&i.each(iscrollhandler.iscrollinstances,function(){i(this).destroy()}),e=new iscroll(t.get(0),s),e.on("scrollend",function(){this.fp_isattop=this.y>-30,this.fp_isatend=this.y-this.maxscrolly<30}),iscrollhandler.iscrollinstances.push(e),e.wheeloff(),t.data("iscrollinstance",e)})},isscrolled:function(t,i){var e=i.data("iscrollinstance");return!e||("top"===t?e.y>=0&&!i.scrolltop():"bottom"===t?0-e.y+i.scrolltop()+1+i.innerheight()>=i[0].scrollheight:void 0)},scrollable:function(t){return t.find(p).length?t.find(l).find(u):t.find(u)},scrollheight:function(t){return t.find(u).children().first().get(0).scrollheight},remove:function(t){var i=t.find(u);if(i.length){var e=i.data("iscrollinstance");e&&e.destroy(),i.data("iscrollinstance",null)}t.find(u).children().first().children().first().unwrap().unwrap()},update:function(t,e){cleartimeout(iscrollhandler.refreshid),iscrollhandler.refreshid=settimeout(function(){i.each(iscrollhandler.iscrollinstances,function(){i(this).get(0).refresh()})},150),t.find(u).css("height",e+"px").parent().css("height",e+"px")},wrapcontent:function(){return'
'}}}(window,jquery),function(t,i,e){e.fn.fp_scrolloverflow=function(){function s(){function s(){e("body").hasclass(y)?h():r(n)}function o(t){var i=t.closest(l);return i.length?parseint(i.css("padding-bottom"))+parseint(i.css("padding-top")):0}function n(i){if(!i.hasclass("fp-noscroll")){i.css("overflow","hidden");var s,n=a.options.scrolloverflowhandler,r=n.wrapcontent(),h=i.closest(l),c=n.scrollable(i),p=o(h);c.length?s=n.scrollheight(i):(s=i.get(0).scrollheight-p,a.options.verticalcentered&&(s=i.find(g).get(0).scrollheight-p));var d=e(t).height()-p;s>d?c.length?n.update(i,d):(a.options.verticalcentered?i.find(g).wrapinner(r):i.wrapinner(r),n.create(i,d,a.iscrolloptions)):n.remove(i),i.css("overflow","")}}function r(t){e(l).each(function(){var i=e(this).find(d);i.length?i.each(function(){t(e(this))}):t(e(this))})}function h(){var t=a.options.scrolloverflowhandler;r(function(i){i.closest(l).hasclass(x)&&t.remove(i)})}var a=this;a.options=null,a.init=function(o,n){return a.options=o,a.iscrolloptions=n,"complete"===i.readystate&&(s(),e.fn.fullpage.shared.afterrenderactions()),e(t).on("load",function(){s(),e.fn.fullpage.shared.afterrenderactions()}),a},a.createscrollbarforall=s}var o="fp-scrollable",n="."+o,r="active",h="."+r,a="fp-section",l="."+a,c=l+h,p="fp-slide",d="."+p,u=d+h,f="fp-slides",m="."+f,v="fp-tablecell",g="."+v,y="fp-responsive",x="fp-auto-height-responsive";iscroll.prototype.wheelon=function(){this.wrapper.addeventlistener("wheel",this),this.wrapper.addeventlistener("mousewheel",this),this.wrapper.addeventlistener("dommousescroll",this)},iscroll.prototype.wheeloff=function(){this.wrapper.removeeventlistener("wheel",this),this.wrapper.removeeventlistener("mousewheel",this),this.wrapper.removeeventlistener("dommousescroll",this)};var s={refreshid:null,iscrollinstances:[],iscrolloptions:{scrollbars:!0,mousewheel:!0,hidescrollbars:!1,fadescrollbars:!1,disablemouse:!0,interactivescrollbars:!0},init:function(i){var o="ontouchstart"in t||navigator.msmaxtouchpoints>0||navigator.maxtouchpoints;return s.iscrolloptions.click=o,s.iscrolloptions=e.extend(s.iscrolloptions,i.scrolloverflowoptions),(new s).init(i,s.iscrolloptions)},togglewheel:function(t){var i=e(c).find(n);i.each(function(){var i=e(this).data("iscrollinstance");"undefined"!=typeof i&&i&&(t?i.wheelon():i.wheeloff())})},onleave:function(){s.togglewheel(!1)},beforeleave:function(){s.onleave()},afterload:function(){s.togglewheel(!0)},create:function(t,i,s){var o=t.find(n);o.height(i),o.each(function(){var t=e(this),i=t.data("iscrollinstance");i&&e.each(s.iscrollinstances,function(){e(this).destroy()}),i=new iscroll(t.get(0),s),s.iscrollinstances.push(i),i.wheeloff(),t.data("iscrollinstance",i)})},isscrolled:function(t,i){var e=i.data("iscrollinstance");return!e||("top"===t?e.y>=0&&!i.scrolltop():"bottom"===t?0-e.y+i.scrolltop()+1+i.innerheight()>=i[0].scrollheight:void 0)},scrollable:function(t){return t.find(m).length?t.find(u).find(n):t.find(n)},scrollheight:function(t){return t.find(n).children().first().get(0).scrollheight},remove:function(t){var i=t.find(n);if(i.length){var e=i.data("iscrollinstance");e.destroy(),i.data("iscrollinstance",null)}t.find(n).children().first().children().first().unwrap().unwrap()},update:function(t,i){cleartimeout(s.refreshid),s.refreshid=settimeout(function(){e.each(s.iscrollinstances,function(){e(this).get(0).refresh(),e.fn.fullpage.silentmoveto(e(c).index()+1)})},150),t.find(n).css("height",i+"px").parent().css("height",i+getpaddings(t)+"px")},wrapcontent:function(){return'
'}};return{iscrollhandler:s}}()}(window,document,jquery); //# sourcemappingurl=scrolloverflow.min.js.map