!function(){var s,l,i,r,o={frameRate:150,animationTime:400,stepSize:100,pulseAlgorithm:!0,pulseScale:4,pulseNormalize:1,accelerationDelta:50,accelerationMax:3,keyboardSupport:!0,arrowScroll:50},m=o,c=!1,u=!1,n={x:0,y:0},d=!1,f=document.documentElement,a=[],w=/^Mac/.test(navigator.platform),h={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},p={37:1,38:1,39:1,40:1};function v(){var e,t,o,n,r,a;!d&&document.body&&(d=!0,e=document.body,t=document.documentElement,a=window.innerHeight,o=e.scrollHeight,f=0<=document.compatMode.indexOf("CSS")?t:e,s=e,m.keyboardSupport&&Y("keydown",x),top!=self?u=!0:Q&&a<o&&(e.offsetHeight<=a||t.offsetHeight<=a)&&((n=document.createElement("div")).style.cssText="position:absolute; z-index:-10000; top:0; left:0; right:0; height:"+f.scrollHeight+"px",document.body.appendChild(n),i=function(){r=r||setTimeout(function(){c||(n.style.height="0",n.style.height=f.scrollHeight+"px",r=null)},500)},setTimeout(i,10),Y("resize",i),(l=new R(i)).observe(e,{attributes:!0,childList:!0,characterData:!1}),f.offsetHeight<=a&&((a=document.createElement("div")).style.clear="both",e.appendChild(a))))}var y=[],b=!1,g=Date.now();function S(s,u,d){var e,t,o,f,w;e=0<(e=u)?1:-1,t=0<(t=d)?1:-1,n.x===e&&n.y===t||(n.x=e,n.y=t,y=[],g=0),1!=m.accelerationMax&&((t=Date.now()-g)<m.accelerationDelta&&(1<(o=(1+50/t)/2)&&(o=Math.min(o,m.accelerationMax),u*=o,d*=o)),g=Date.now()),y.push({x:u,y:d,lastX:u<0?.99:-.99,lastY:d<0?.99:-.99,start:Date.now()}),b||(o=q(),f=s===o||s===document.body,null==s.$scrollBehavior&&function(e){var t=B(e);null==T[t]&&(e=getComputedStyle(e,"")["scroll-behavior"],T[t]="smooth"==e);return T[t]}(s)&&(s.$scrollBehavior=s.style.scrollBehavior,s.style.scrollBehavior="auto"),w=function(e){for(var t=Date.now(),o=0,n=0,r=0;r<y.length;r++){var a=y[r],l=t-a.start,i=l>=m.animationTime,c=i?1:l/m.animationTime;m.pulseAlgorithm&&(c=function(e){if(1<=e)return 1;if(e<=0)return 0;1==m.pulseNormalize&&(m.pulseNormalize/=F(1));return F(e)}(c));l=a.x*c-a.lastX>>0,c=a.y*c-a.lastY>>0;o+=l,n+=c,a.lastX+=l,a.lastY+=c,i&&(y.splice(r,1),r--)}f?window.scrollBy(o,n):(o&&(s.scrollLeft+=o),n&&(s.scrollTop+=n)),(y=!u&&!d?[]:y).length?A(w,s,1e3/m.frameRate+1):(b=!1,null!=s.$scrollBehavior&&(s.style.scrollBehavior=s.$scrollBehavior,s.$scrollBehavior=null))},A(w,s,0),b=!0)}function e(e){d||v();var t=e.target;if(e.defaultPrevented||e.ctrlKey)return!0;if(K(s,"embed")||K(t,"embed")&&/\.pdf/i.test(t.src)||K(s,"object")||t.shadowRoot)return!0;var o=-e.wheelDeltaX||e.deltaX||0,n=-e.wheelDeltaY||e.deltaY||0;w&&(e.wheelDeltaX&&P(e.wheelDeltaX,120)&&(o=e.wheelDeltaX/Math.abs(e.wheelDeltaX)*-120),e.wheelDeltaY&&P(e.wheelDeltaY,120)&&(n=e.wheelDeltaY/Math.abs(e.wheelDeltaY)*-120)),o||n||(n=-e.wheelDelta||0),1===e.deltaMode&&(o*=40,n*=40);t=H(t);return t?!!function(e){if(e){a.length||(a=[e,e,e]),e=Math.abs(e),a.push(e),a.shift(),clearTimeout(r),r=setTimeout(function(){try{localStorage.SS_deltaBuffer=a.join(",")}catch(e){}},1e3);var t=120<e&&$(e),t=!$(120)&&!$(100)&&!t;return e<50||t}}(n)||(1.2<Math.abs(o)&&(o*=m.stepSize/120),1.2<Math.abs(n)&&(n*=m.stepSize/120),S(t,o,n),e.preventDefault(),void O()):!u||!W||(Object.defineProperty(e,"target",{value:window.frameElement}),parent.wheel(e))}function x(e){var t=e.target,o=e.ctrlKey||e.altKey||e.metaKey||e.shiftKey&&e.keyCode!==h.spacebar;document.body.contains(s)||(s=document.activeElement);var n=/^(button|submit|radio|checkbox|file|color|image)$/i;if(e.defaultPrevented||/^(textarea|select|embed|object)$/i.test(t.nodeName)||K(t,"input")&&!n.test(t.type)||K(s,"video")||function(e){var t=e.target,o=!1;if(-1!=document.URL.indexOf("www.youtube.com/watch"))do{if(o=t.classList&&t.classList.contains("html5-video-controls"))break}while(t=t.parentNode);return o}(e)||t.isContentEditable||o)return!0;if((K(t,"button")||K(t,"input")&&n.test(t.type))&&e.keyCode===h.spacebar)return!0;if(K(t,"input")&&"radio"==t.type&&p[e.keyCode])return!0;var r=0,a=0,l=H(s);if(!l)return!u||!W||parent.keydown(e);var i=l.clientHeight;switch(l==document.body&&(i=window.innerHeight),e.keyCode){case h.up:a=-m.arrowScroll;break;case h.down:a=m.arrowScroll;break;case h.spacebar:a=-(e.shiftKey?1:-1)*i*.9;break;case h.pageup:a=.9*-i;break;case h.pagedown:a=.9*i;break;case h.home:a=-(l=l==document.body&&document.scrollingElement?document.scrollingElement:l).scrollTop;break;case h.end:var c=l.scrollHeight-l.scrollTop-i,a=0<c?10+c:0;break;case h.left:r=-m.arrowScroll;break;case h.right:r=m.arrowScroll;break;default:return!0}S(l,r,a),e.preventDefault(),O()}function t(e){s=e.target}var D,k,B=(D=0,function(e){return e.uniqueID||(e.uniqueID=D++)}),E={},M={},T={};function O(){clearTimeout(k),k=setInterval(function(){E=M=T={}},1e3)}function C(e,t,o){for(var n=o?E:M,r=e.length;r--;)n[B(e[r])]=t;return t}function H(e){var t=[],o=document.body,n=f.scrollHeight;do{var r=(!1?E:M)[B(e)];if(r)return C(t,r);if(t.push(e),n===e.scrollHeight){r=L(f)&&L(o)||X(f);if(u&&z(f)||!u&&r)return C(t,q())}else if(z(e)&&X(e))return C(t,e)}while(e=e.parentElement)}function z(e){return e.clientHeight+10<e.scrollHeight}function L(e){return"hidden"!==getComputedStyle(e,"").getPropertyValue("overflow-y")}function X(e){e=getComputedStyle(e,"").getPropertyValue("overflow-y");return"scroll"===e||"auto"===e}function Y(e,t,o){window.addEventListener(e,t,o||!1)}function N(e,t,o){window.removeEventListener(e,t,o||!1)}function K(e,t){return e&&(e.nodeName||"").toLowerCase()===t.toLowerCase()}if(window.localStorage&&localStorage.SS_deltaBuffer)try{a=localStorage.SS_deltaBuffer.split(",")}catch(e){}function P(e,t){return Math.floor(e/t)==e/t}function $(e){return P(a[0],e)&&P(a[1],e)&&P(a[2],e)}var j,A=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e,t,o){window.setTimeout(e,o||1e3/60)},R=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,q=(j=document.scrollingElement,function(){var e,t;return j||((e=document.createElement("div")).style.cssText="height:10000px;width:1px;",document.body.appendChild(e),t=document.body.scrollTop,document.documentElement.scrollTop,window.scrollBy(0,3),j=document.body.scrollTop!=t?document.body:document.documentElement,window.scrollBy(0,-3),document.body.removeChild(e)),j});function F(e){var t;return((e*=m.pulseScale)<1?e-(1-Math.exp(-e)):(--e,(t=Math.exp(-1))+(1-Math.exp(-e))*(1-t)))*m.pulseNormalize}var I=window.navigator.userAgent,V=/Edge/.test(I),W=/chrome/i.test(I)&&!V,_=/safari/i.test(I)&&!V,U=/firefox/i.test(I),G=/mobile/i.test(I),J=/Windows NT 6.1/i.test(I)&&/rv:11/i.test(I),Q=_&&(/Version\/8/i.test(I)||/Version\/9/i.test(I)),Z=function(){if(G)return~allowedBrowsers.indexOf("Mobile");return V?~allowedBrowsers.indexOf("Edge"):W?~allowedBrowsers.indexOf("Chrome"):_?~allowedBrowsers.indexOf("Safari"):U?~allowedBrowsers.indexOf("Firefox"):J?~allowedBrowsers.indexOf("IEWin7"):~allowedBrowsers.indexOf("other")}();var ee=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){ee=!0}}))}catch(e){}var I=!!ee&&{passive:!1},te="onwheel"in document.createElement("div")?"wheel":"mousewheel";function oe(e){for(var t in e)o.hasOwnProperty(t)&&(m[t]=e[t])}te&&Z&&(Y(te,e,I),Y("mousedown",t),Y("load",v)),oe.destroy=function(){l&&l.disconnect(),N(te,e),N("mousedown",t),N("keydown",x),N("resize",i),N("load",v)},window.SmoothScrollOptions&&oe(window.SmoothScrollOptions),"function"==typeof define&&define.amd?define(function(){return oe}):"object"==typeof exports?module.exports=oe:window.SmoothScroll=oe}();