/home/arranoyd/telegastro/wp-content/plugins/Ultimate_VC_Addons/assets/min-js/SmoothScroll.min.js
!function(){function i(){if(!H&&document.body){H=!0;var e=document.body,t=document.documentElement,o=window.innerHeight,n=e.scrollHeight;if(z=0<=document.compatMode.indexOf("CSS")?t:e,g=e,M.keyboardSupport&&p("keydown",l),top!=self)C=!0;else if(o<n&&(e.offsetHeight<=o||t.offsetHeight<=o)){var a,r=document.createElement("div");r.style.cssText="position:absolute; z-index:-10000; top:0; left:0; right:0; height:"+z.scrollHeight+"px",document.body.appendChild(r),x=function(){a||(a=setTimeout(function(){T||(r.style.height="0",r.style.height=z.scrollHeight+"px",a=null)},500))},setTimeout(x,10),p("resize",x);if((S=new j(x)).observe(e,{attributes:!0,childList:!0,characterData:!1}),z.offsetHeight<=o){var i=document.createElement("div");i.style.clear="both",e.appendChild(i)}}M.fixedBackground||T||(e.style.backgroundAttachment="scroll",t.style.backgroundAttachment="scroll")}}function u(m,f,h){if(o=0<(o=f)?1:-1,n=0<(n=h)?1:-1,(E.x!==o||E.y!==n)&&(E.x=o,E.y=n,B=[],K=0),1!=M.accelerationMax){var e=Date.now()-K;if(e<M.accelerationDelta){var t=(1+50/e)/2;1<t&&(t=Math.min(t,M.accelerationMax),f*=t,h*=t)}K=Date.now()}var o,n;if(B.push({x:f,y:h,lastX:f<0?.99:-.99,lastY:h<0?.99:-.99,start:Date.now()}),!O){var p=m===document.body,w=function(e){for(var t=Date.now(),o=0,n=0,a=0;a<B.length;a++){var r=B[a],i=t-r.start,l=i>=M.animationTime,c=l?1:i/M.animationTime;M.pulseAlgorithm&&(c=1<=(s=c)?1:s<=0?0:(1==M.pulseNormalize&&(M.pulseNormalize/=y(1)),y(s)));var u=r.x*c-r.lastX>>0,d=r.y*c-r.lastY>>0;o+=u,n+=d,r.lastX+=u,r.lastY+=d,l&&(B.splice(a,1),a--)}var s;p?window.scrollBy(o,n):(o&&(m.scrollLeft+=o),n&&(m.scrollTop+=n)),f||h||(B=[]),B.length?_(w,m,1e3/M.frameRate+1):O=!1};_(w,m,0),O=!0}}function e(e){H||i();var t=e.target,o=s(t);if(!o||e.defaultPrevented||e.ctrlKey)return!0;if(w(g,"embed")||w(t,"embed")&&/\.pdf/i.test(t.src)||w(g,"object")||t.shadowRoot)return!0;var n,a=-e.wheelDeltaX||e.deltaX||0,r=-e.wheelDeltaY||e.deltaY||0;return X&&(e.wheelDeltaX&&b(e.wheelDeltaX,120)&&(a=e.wheelDeltaX/Math.abs(e.wheelDeltaX)*-120),e.wheelDeltaY&&b(e.wheelDeltaY,120)&&(r=e.wheelDeltaY/Math.abs(e.wheelDeltaY)*-120)),a||r||(r=-e.wheelDelta||0),1===e.deltaMode&&(a*=40,r*=40),!(M.touchpadSupport||(!(n=r)||(L.length||(L=[n,n,n]),n=Math.abs(n),L.push(n),L.shift(),clearTimeout(k),k=setTimeout(function(){window.localStorage&&(localStorage.SS_deltaBuffer=L.join(","))},1e3),v(120)||v(100))))||(1.2<Math.abs(a)&&(a*=M.stepSize/120),1.2<Math.abs(r)&&(r*=M.stepSize/120),u(o,a,r),e.preventDefault(),void d())}function l(e){var t=e.target,o=e.ctrlKey||e.altKey||e.metaKey||e.shiftKey&&e.keyCode!==Y.spacebar;document.body.contains(g)||(g=document.activeElement);var n=/^(button|submit|radio|checkbox|file|color|image)$/i;if(e.defaultPrevented||/^(textarea|select|embed|object)$/i.test(t.nodeName)||w(t,"input")&&!n.test(t.type)||w(g,"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((w(t,"button")||w(t,"input")&&n.test(t.type))&&e.keyCode===Y.spacebar)return!0;if(w(t,"input")&&"radio"==t.type&&A[e.keyCode])return!0;var a=0,r=0,i=s(g),l=i.clientHeight;switch(i==document.body&&(l=window.innerHeight),e.keyCode){case Y.up:r=-M.arrowScroll;break;case Y.down:r=M.arrowScroll;break;case Y.spacebar:r=-(e.shiftKey?1:-1)*l*.9;break;case Y.pageup:r=.9*-l;break;case Y.pagedown:r=.9*l;break;case Y.home:r=-i.scrollTop;break;case Y.end:var c=i.scrollHeight-i.scrollTop-l;r=0<c?c+10:0;break;case Y.left:a=-M.arrowScroll;break;case Y.right:a=M.arrowScroll;break;default:return!0}u(i,a,r),e.preventDefault(),d()}function t(e){g=e.target}function d(){clearTimeout(a),a=setInterval(function(){R={}},1e3)}function c(e,t){for(var o=e.length;o--;)R[N(e[o])]=t;return t}function s(e){var t=[],o=document.body,n=z.scrollHeight;do{var a=R[N(e)];if(a)return c(t,a);if(t.push(e),n===e.scrollHeight){var r=f(z)&&f(o)||h(z);if(C&&m(z)||!C&&r)return c(t,F())}else if(m(e)&&h(e))return c(t,e)}while(e=e.parentElement)}function m(e){return e.clientHeight+10<e.scrollHeight}function f(e){return"hidden"!==getComputedStyle(e,"").getPropertyValue("overflow-y")}function h(e){var t=getComputedStyle(e,"").getPropertyValue("overflow-y");return"scroll"===t||"auto"===t}function p(e,t){window.addEventListener(e,t,!1)}function o(e,t){window.removeEventListener(e,t,!1)}function w(e,t){return(e.nodeName||"").toLowerCase()===t.toLowerCase()}function b(e,t){return Math.floor(e/t)==e/t}function v(e){return b(L[0],e)&&b(L[1],e)&&b(L[2],e)}function y(e){var t;return((e*=M.pulseScale)<1?e-(1-Math.exp(-e)):(e-=1,(t=Math.exp(-1))+(1-Math.exp(-e))*(1-t)))*M.pulseNormalize}function n(e){for(var t in e)D.hasOwnProperty(t)&&(M[t]=e[t])}var g,S,x,a,k,r,D={frameRate:150,animationTime:php_vars.speed,stepSize:php_vars.step,pulseAlgorithm:!0,pulseScale:4,pulseNormalize:1,accelerationDelta:50,accelerationMax:3,keyboardSupport:!0,arrowScroll:50,touchpadSupport:!1,fixedBackground:!0,excluded:""},M=D,T=!1,C=!1,E={x:0,y:0},H=!1,z=document.documentElement,L=[],X=/^Mac/.test(navigator.platform),Y={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},A={37:1,38:1,39:1,40:1},B=[],O=!1,K=Date.now(),N=(r=0,function(e){return e.uniqueID||(e.uniqueID=r++)}),R={};window.localStorage&&localStorage.SS_deltaBuffer&&(L=localStorage.SS_deltaBuffer.split(","));var q,P,_=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e,t,o){window.setTimeout(e,o||1e3/60)},j=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,F=function(){if(!P){var e=document.createElement("div");e.style.cssText="height:10000px;width:1px;",document.body.appendChild(e);var t=document.body.scrollTop;document.documentElement.scrollTop,window.scrollBy(0,3),P=document.body.scrollTop!=t?document.body:document.documentElement,window.scrollBy(0,-3),document.body.removeChild(e)}return P},I=window.navigator.userAgent,V=!/mobile/i.test(I);"onwheel"in document.createElement("div")?q="wheel":"onmousewheel"in document.createElement("div")&&(q="mousewheel"),q&&V&&(p(q,e),p("mousedown",t),p("load",i)),n.destroy=function(){S&&S.disconnect(),o(q,e),o("mousedown",t),o("keydown",l),o("resize",x),o("load",i)},window.SmoothScrollOptions&&n(window.SmoothScrollOptions),"function"==typeof define&&define.amd?define(function(){return n}):"object"==typeof exports?module.exports=n:window.SmoothScroll=n}();