/*! * ScrollSmoother 3.10.4 * https://greensock.com * * @license Copyright 2022, GreenSock. All rights reserved. * This plugin is a membership benefit of Club GreenSock and is only authorized for use in sites/apps/products developed by individuals/companies with an active Club GreenSock membership. See https://greensock.com/club * @author: Jack Doyle, jack@greensock.com */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function _defineProperties(e,t){for(var r=0;rMath.abs(l)?a:l)/(1-t),u=-c*t;return 0=t.start&&r<=t.end)return void(l&&(t.trig.progress+=t.trig.direction<0?.001:-.001,t.trig.update(0,0,1),l.resetTo("y",parseFloat(d.y),-C,!0),P&&l.progress(1)));r>t.end&&(s+=t.distance),n-=t.distance}o=h+s+v*((B.utils.clamp(e.start,e.end,r)-e.start-s)/(n-e.start)-c)}o=function _round(e){return Math.round(1e5*e)/1e5||0}(o+u),p.length&&!a&&p.forEach(function(e){return e(o-s)}),l?(l.resetTo("y",o,-C,!0),P&&l.progress(1)):(d.y=o+"px",d.renderTransform(1))}}})),B.core.getCache(i.trigger).stRevert=Da,i.startY=h,i.pins=g,i.markers=p,i.ratio=o,i.autoSpeed=a,r.style.willChange="transform"),i}var n,m,t,i,w,s,a,l,c,u,r,f,h,d,g=e.smoothTouch,p=e.onUpdate,v=e.onStop,b=e.smooth,S=e.onFocusIn,T=e.normalizeScroll,x=L.getScrollFunc(F),E=1===L.isTouch?!0===g?.8:parseFloat(g)||0:0===b||!1===b?0:parseFloat(b)||.8,k=0,C=0,P=1,_=V(0),R={y:0};function refreshHeight(){return t=n.clientHeight,n.style.overflow="visible",I.style.height=t+"px",t-F.innerHeight}L.addEventListener("refresh",Ba),B.delayedCall(.5,function(){return P=0}),this.scrollTop=xa,this.scrollTo=function(e,t,r){var n=B.utils.clamp(0,L.maxScroll(F),isNaN(e)?o.offset(e,r):+e);t?u?B.to(o,{duration:E,scrollTop:n,overwrite:"auto",ease:O}):x(n):xa(n)},this.offset=function(e,t){var r,n=(e=U(e)[0]).style.cssText,o=L.create({trigger:e,start:t||"top top"});return w&&Aa([o]),r=o.start,o.kill(!1),e.style.cssText=n,B.core.getCache(e).uncache=1,r},this.content=function(e){if(arguments.length){var t=U(e||"#smooth-content")[0]||I.children[0];return t!==n&&(c=(n=t).getAttribute("style")||"",B.set(n,{overflow:"visible",width:"100%",boxSizing:"border-box"})),this}return n},this.wrapper=function(e){return arguments.length?(m=U(e||"#smooth-wrapper")[0]||function _wrap(e){var t=z.querySelector(".ScrollSmoother-wrapper");return t||((t=z.createElement("div")).classList.add("ScrollSmoother-wrapper"),e.parentNode.insertBefore(t,e),t.appendChild(e)),t}(n),l=m.getAttribute("style")||"",refreshHeight(),B.set(m,E?{overflow:"hidden",position:"fixed",height:"100%",width:"100%",top:0,left:0,right:0,bottom:0}:{overflow:"visible",position:"relative",width:"100%",height:"auto",top:"auto",bottom:"auto",left:"auto",right:"auto"}),this):m},this.effects=function(e,t){if(w=w||[],!e)return w.slice(0);(e=U(e)).forEach(function(e){for(var t=w.length;t--;)w[t].trigger===e&&(w[t].kill(),w.splice(t,1))});t=t||{};var r,n,o=t.speed,i=t.lag,s=[];for(r=0;r