text: /**
   *  YouScroll v0.0.0
   *
   *  youscroll.js
   *
   *  @license    MIT License
   *  @author     Salim Salici <https://github.com/salimsalici/>
   *  @copyright  Author
   */
  !function(e,n){"function"==typeof define&&define.amd?define([],n(e)):"object"==typeof exports?module.exports=n(e):e.youScroll=n(e)}("undefined"!=typeof global?global:this.window||this.global,function(e){"use strict";function n(n,t,r,o,i,c,u,l){function f(){var e=y(m,t,r,c.duration),n=y(m,o,i,c.duration);a(e,n),(m+=c.intervalTime)>=c.duration&&(e=t+r,n=o+i,a(e,n),b.end())}function a(t,r){n?(n.scrollLeft=t,n.scrollTop=r):e.scrollTo(t,r)}function s(){var t=n||e;t.addEventListener("wheel",g),t.addEventListener("mousewheel",g)}function d(){var t=n||e;t.removeEventListener("wheel",g),t.removeEventListener("mousewheel",g)}function g(e){c.force?e.preventDefault():b.end()}var h,m,b={},y=p[c.easing];return b.end=function(){clearInterval(h),"function"==typeof c.endCallback&&c.endCallback(),v.splice(v.indexOf(b),1),d(),u()},b.getFocus=function(){return n},b.getForce=function(){return c.force},function(){m=0,h=setInterval(f,c.intervalTime),s()}(),b}function t(e){for(var n=0;n<v.length;n++)if(v[n].getFocus()==e)return!0!==v[n].getForce()&&(v[n].end(),!0);return!0}function r(e){return Math.round(e.getBoundingClientRect().top)}function o(e){return Math.round(e.getBoundingClientRect().left)}function i(){var n=f+a,t=u+l;if(t<0)l+=-t;else{var r=c?c.clientHeight:e.innerHeight,o=c?c.scrollHeight:document.body.scrollHeight;t+r>o&&(l-=t+r-o)}if(n<0)a+=-n;else{var i=c?c.clientWidth:e.innerWidth,s=c?c.scrollWidth:document.body.scrollWidth;n+i>s&&(a-=n+i-s)}}var c,u,l,f,a,s={},d={duration:1200,easing:"easeInOutQuad",force:!1,intervalTime:5,endCallback:void 0},v=[],g=Object.create(d);s.start=function(){var e,r={and:void 0,instance:void 0},o=new Promise(function(r,o){t(c)?(i(),e=n(c,f,a,u,l,g,r,o),v.push(e)):o("Cannot start a new scroll if the element is already scrolling.")});return c=void 0,g=Object.create(d),r.and=o,r.instance=e,r},s.focus=function(e){return c=document.querySelector(e),s},s.to=function(n,t,i){if(!0===t)t=0;else if(arguments.length<=2)return s.ver(n,t);var d=document.querySelector(n);return u=c?c.scrollTop:e.pageYOffset,l=c?r(d)-r(c):r(d),l+=i||0,f=c?c.scrollLeft:e.pageXOffset,a=c?o(d)-o(c):o(d),a+=t||0,s},s.hor=function(n,t){var r=document.querySelector(n);return u=c?c.scrollTop:e.pageYOffset,l=0,f=c?c.scrollLeft:e.pageXOffset,a=c?o(r)-o(c):o(r),a+=t||0,s},s.ver=function(n,t){var o=document.querySelector(n);return u=c?c.scrollTop:e.pageYOffset,l=c?r(o)-r(c):r(o),l+=t||0,f=c?c.scrollLeft:e.pageXOffset,a=0,s},s.by=function(n,t){return void 0===t&&(t=n,n=0),f=c?c.scrollLeft:e.pageXOffset,a=n,u=c?c.scrollTop:e.pageYOffset,l=t,s},s.lasts=function(e){return g.duration=e,s},s.setCallback=function(e){return g.endCallback=e,s},s.force=function(e){return g.force=e,s},s.config=function(e){if("object"==typeof e)for(var n in e)d[n]=e[n]};var p={linear:function(e,n,t,r){return t*e/r+n},easeInOutQuad:function(e,n,t,r){return(e/=r/2)<1?t/2*e*e+n:(e--,-t/2*(e*(e-2)-1)+n)},easeOutCubic:function(e,n,t,r){return e/=r,e--,t*(e*e*e+1)+n}};return s});