p-tt&&!g?p:td&&(r=d)),(u=this._yoyo&&1&o)&&(h=this._yEase,r=d-r),a=pe(this._tTime,s),r===f&&!n&&this._initted)return this._tTime=m,this;o!==a&&(c&&this._yEase&&cn(c,u),!this.vars.repeatRefresh||u||this._lock||(this._lock=n=1,this.render(Ut(s*o),!0).invalidate()._lock=0))}if(!this._initted){if(we(this,g?t:r,n,e,m))return this._tTime=0,this;if(f!==this._time)return this;if(d!==this._dur)return this.render(t,e,n)}if(this._tTime=m,this._time=r,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=l=(h||this._ease)(r/d),this._from&&(this.ratio=l=1-l),r&&!f&&!e&&(qe(this,"onStart"),this._tTime!==m))return this;for(i=this._pt;i;)i.r(l,i.d),i=i._next;c&&c.render(t<0?t:!r&&u?-1e-8:c._dur*c._ease(r/this._dur),e,n)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(g&&ce(this,t,0,n),qe(this,"onUpdate")),this._repeat&&o!==a&&this.vars.onRepeat&&!e&&this.parent&&qe(this,"onRepeat"),m!==this._tDur&&m||this._tTime!==m||(g&&!this._onUpdate&&ce(this,t,0,!0),(t||!d)&&(m===this._tDur&&this._ts>0||!m&&this._ts<0)&&ae(this,1),e||g&&!f||!(m||f||u)||(qe(this,m===p?"onComplete":"onReverseComplete",!0),this._prom&&!(m0)&&this._prom()))}}else!function(t,e,n,r){var i,o,s,a=t.ratio,u=e<0||!e&&(!t._start&&be(t)&&(t._initted||!xe(t))||(t._ts<0||t._dp._ts<0)&&!xe(t))?0:1,l=t._rDelay,c=0;if(l&&t._repeat&&(c=Ce(0,t._tDur,e),o=pe(c,l),t._yoyo&&1&o&&(u=1-u),o!==pe(t._tTime,l)&&(a=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==a||x||r||t._zTime===tt||!e&&t._zTime){if(!t._initted&&we(t,e,r,n,c))return;for(s=t._zTime,t._zTime=e||(n?tt:0),n||(n=e&&!s),t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=c,i=t._pt;i;)i.r(u,i.d),i=i._next;e<0&&ce(t,e,0,!0),t._onUpdate&&!n&&qe(t,"onUpdate"),c&&t._repeat&&!n&&t.parent&&qe(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&ae(t,1),n||x||(qe(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,n);return this},n.targets=function(){return this._targets},n.invalidate=function(e){return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},n.resetTo=function(t,e,n,r){P||nn.wake(),this._ts||this.play();var i=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||On(this,i),function(t,e,n,r,i,o,s){var a,u,l,c,h=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!h)for(h=t._ptCache[e]=[],l=t._ptLookup,c=t._targets.length;c--;){if((a=l[c][e])&&a.d&&a.d._pt)for(a=a.d._pt;a&&a.p!==e&&a.fp!==e;)a=a._next;if(!a)return wn=1,t.vars[e]="+=0",On(t,s),wn=0,1;h.push(a)}for(c=h.length;c--;)(a=(u=h[c])._pt||u).s=!r&&0!==r||i?a.s+(r||0)+o*a.c:r,a.c=n-a.s,u.e&&(u.e=Ht(n)+De(u.e)),u.b&&(u.b=a.s+De(u.b))}(this,t,e,n,r,this._ease(i/this._dur),i)?this.resetTo(t,e,n,r):(me(this,0),this.parent||oe(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?je(this):this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,yn&&!0!==yn.vars.overwrite)._first||je(this),this.parent&&n!==this.timeline.totalDuration()&&Te(this,this._dur*this.timeline._tDur/n,0,1),this}var r,i,o,s,a,u,l,c=this._targets,h=t?Ie(t):c,f=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function(t,e){for(var n=t.length,r=n===e.length;r&&n--&&t[n]===e[n];);return n<0}(c,h))return"all"===e&&(this._pt=0),je(this);for(r=this._op=this._op||[],"all"!==e&&(at(e)&&(a={},jt(e,(function(t){return a[t]=1})),e=a),e=function(t,e){var n,r,i,o,s=t[0]?Wt(t[0]).harness:0,a=s&&s.aliases;if(!a)return e;for(r in n=ee({},e),a)if(r in n)for(i=(o=a[r].split(",")).length;i--;)n[o[i]]=n[r];return n}(c,e)),l=c.length;l--;)if(~h.indexOf(c[l]))for(a in i=f[l],"all"===e?(r[l]=e,s=i,o={}):(o=r[l]=r[l]||{},s=e),s)(u=i&&i[a])&&("kill"in u.d&&!0!==u.d.kill(a)||se(this,u,"_pt"),delete i[a]),"all"!==o&&(o[a]=1);return this._initted&&!this._pt&&p&&je(this),this},e.to=function(t,n){return new e(t,n,arguments[2])},e.from=function(t,e){return Se(1,arguments)},e.delayedCall=function(t,n,r,i){return new e(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},e.fromTo=function(t,e,n){return Se(2,arguments)},e.set=function(t,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new e(t,n)},e.killTweensOf=function(t,e,n){return O.killTweensOf(t,e,n)},e}(vn);te(Cn.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),jt("staggerTo,staggerFrom,staggerFromTo",(function(t){Cn[t]=function(){var e=new _n,n=Pe.call(arguments,0);return n.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,n)}}));var Dn=function(t,e,n){return t[e]=n},Pn=function(t,e,n){return t[e](n)},An=function(t,e,n,r){return t[e](r.fp,n)},In=function(t,e,n){return t.setAttribute(e,n)},Ln=function(t,e){return ut(t[e])?Pn:ct(t[e])&&t.setAttribute?In:Dn},Rn=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},Bn=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},zn=function(t,e){var n=e._pt,r="";if(!t&&e.b)r=e.b;else if(1===t&&e.e)r=e.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*t):Math.round(1e4*(n.s+n.c*t))/1e4)+r,n=n._next;r+=e.c}e.set(e.t,e.p,r,e)},Vn=function(t,e){for(var n=e._pt;n;)n.r(t,n.d),n=n._next},Nn=function(t,e,n,r){for(var i,o=this._pt;o;)i=o._next,o.p===r&&o.modifier(t,e,n),o=i},Yn=function(t){for(var e,n,r=this._pt;r;)n=r._next,r.p===t&&!r.op||r.op===t?se(this,r,"_pt"):r.dep||(e=1),r=n;return!e},Xn=function(t,e,n,r){r.mSet(t,e,r.m.call(r.tween,n,r.mt),r)},Fn=function(t){for(var e,n,r,i,o=t._pt;o;){for(e=o._next,n=r;n&&n.pr>o.pr;)n=n._next;(o._prev=n?n._prev:i)?o._prev._next=o:r=o,(o._next=n)?n._prev=o:i=o,o=e}t._pt=r},Wn=function(){function t(t,e,n,r,i,o,s,a,u){this.t=e,this.s=r,this.c=i,this.p=n,this.r=o||Rn,this.d=s||this,this.set=a||Dn,this.pr=u||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,n){this.mSet=this.mSet||this.set,this.set=Xn,this.m=t,this.mt=n,this.tween=e},t}();jt(Xt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(t){return Lt[t]=1})),Ot.TweenMax=Ot.TweenLite=Cn,Ot.TimelineLite=Ot.TimelineMax=_n,O=new _n({sortChildren:!1,defaults:Z,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),$.stringFilter=en;var qn=[],jn={},Hn=[],Un=0,Kn=function(t){return(jn[t]||Hn).map((function(t){return t()}))},Gn=function(){var t=Date.now(),e=[];t-Un>2&&(Kn("matchMediaInit"),qn.forEach((function(t){var n,r,i,o,s=t.queries,a=t.conditions;for(r in s)(n=M.matchMedia(s[r]).matches)&&(i=1),n!==a[r]&&(a[r]=n,o=1);o&&(t.revert(),i&&e.push(t))})),Kn("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t)})),Un=t,Kn("matchMedia"))},Qn=function(){function t(t,e){this.selector=e&&Le(e),this.data=[],this._r=[],this.isReverted=!1,t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,n){ut(t)&&(n=e,e=t,t=ut);var r=this,i=function(){var t,i=T,o=r.selector;return i&&i!==r&&i.data.push(r),n&&(r.selector=Le(n)),T=r,t=e.apply(r,arguments),ut(t)&&r._r.push(t),T=i,r.selector=o,r.isReverted=!1,t};return r.last=i,t===ut?i(r):t?r[t]=i:i},e.ignore=function(t){var e=T;T=null,t(this),T=e},e.getTweens=function(){var e=[];return this.data.forEach((function(n){return n instanceof t?e.push.apply(e,n.getTweens()):n instanceof Cn&&!(n.parent&&"nested"===n.parent.data)&&e.push(n)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var n=this;if(t){var r=this.getTweens();this.data.forEach((function(t){"isFlip"===t.data&&(t.revert(),t.getChildren(!0,!0,!1).forEach((function(t){return r.splice(r.indexOf(t),1)})))})),r.map((function(t){return{g:t.globalTime(0),t:t}})).sort((function(t,e){return e.g-t.g||-1})).forEach((function(e){return e.t.revert(t)})),this.data.forEach((function(e){return!(e instanceof vn)&&e.revert&&e.revert(t)})),this._r.forEach((function(e){return e(t,n)})),this.isReverted=!0}else this.data.forEach((function(t){return t.kill&&t.kill()}));if(this.clear(),e){var i=qn.indexOf(this);~i&&qn.splice(i,1)}},e.revert=function(t){this.kill(t||{})},t}(),$n=function(){function t(t){this.contexts=[],this.scope=t}var e=t.prototype;return e.add=function(t,e,n){ht(t)||(t={matches:t});var r,i,o,s=new Qn(0,n||this.scope),a=s.conditions={};for(i in this.contexts.push(s),e=s.add("onMatch",e),s.queries=t,t)"all"===i?o=1:(r=M.matchMedia(t[i]))&&(qn.indexOf(s)<0&&qn.push(s),(a[i]=r.matches)&&(o=1),r.addListener?r.addListener(Gn):r.addEventListener("change",Gn));return o&&e(s),this},e.revert=function(t){this.kill(t||{})},e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),Zn={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),n=0;n1){var r=t.map((function(t){return er.quickSetter(t,e,n)})),i=r.length;return function(t){for(var e=i;e--;)r[e](t)}}t=t[0]||{};var o=zt[e],s=Wt(t),a=s.harness&&(s.harness.aliases||{})[e]||e,u=o?function(e){var r=new o;D._pt=0,r.init(t,n?e+n:e,D,0,[t]),r.render(1,r),D._pt&&Vn(1,D)}:s.set(t,a);return o?u:function(e){return u(t,a,n?e+n:e,s,1)}},quickTo:function(t,e,n){var r,i=er.to(t,ee(((r={})[e]="+=0.1",r.paused=!0,r),n||{})),o=function(t,n,r){return i.resetTo(e,t,n,r)};return o.tween=i,o},isTweening:function(t){return O.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=hn(t.ease,Z.ease)),ne(Z,t||{})},config:function(t){return ne($,t||{})},registerEffect:function(t){var e=t.name,n=t.effect,r=t.plugins,i=t.defaults,o=t.extendTimeline;(r||"").split(",").forEach((function(t){return t&&!zt[t]&&!Ot[t]&&Et(e+" effect requires "+t+" plugin.")})),Vt[e]=function(t,e,r){return n(Ie(t),te(e||{},i),r)},o&&(_n.prototype[e]=function(t,n,r){return this.add(Vt[e](t,ht(n)?n:(r=n)&&{},this),r)})},registerEase:function(t,e){on[t]=hn(e)},parseEase:function(t,e){return arguments.length?hn(t,e):on},getById:function(t){return O.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var n,r,i=new _n(t);for(i.smoothChildTiming=ft(t.smoothChildTiming),O.remove(i),i._dp=0,i._time=i._tTime=O._time,n=O._first;n;)r=n._next,!e&&!n._dur&&n instanceof Cn&&n.vars.onComplete===n._targets[0]||_e(i,n,n._start-n._delay),n=r;return _e(O,i,0),i},context:function(t,e){return t?new Qn(t,e):T},matchMedia:function(t){return new $n(t)},matchMediaRefresh:function(){return qn.forEach((function(t){var e,n,r=t.conditions;for(n in r)r[n]&&(r[n]=!1,e=1);e&&t.revert()}))||Gn()},addEventListener:function(t,e){var n=jn[t]||(jn[t]=[]);~n.indexOf(e)||n.push(e)},removeEventListener:function(t,e){var n=jn[t],r=n&&n.indexOf(e);r>=0&&n.splice(r,1)},utils:{wrap:function t(e,n,r){var i=n-e;return mt(e)?Ye(e,t(0,e.length),n):Ee(r,(function(t){return(i+(t-e)%i)%i+e}))},wrapYoyo:function t(e,n,r){var i=n-e,o=2*i;return mt(e)?Ye(e,t(0,e.length-1),n):Ee(r,(function(t){return e+((t=(o+(t-e)%o)%o||0)>i?o-t:t)}))},distribute:Be,random:Ne,snap:Ve,normalize:function(t,e,n){return Fe(t,e,0,1,n)},getUnit:De,clamp:function(t,e,n){return Ee(n,(function(n){return Ce(t,e,n)}))},splitColor:Qe,toArray:Ie,selector:Le,mapRange:Fe,pipe:function(){for(var t=arguments.length,e=new Array(t),n=0;n=0)return;r._gsap.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(Pr,e,"")),t=Dr}(i||e)&&this.props.push(t,e,i[t])},Ir=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},Lr=function(){var t,e,n=this.props,r=this.target,i=r.style,o=r._gsap;for(t=0;t=0?Vr[i]:"")+t},Yr=function(){"undefined"!=typeof window&&window.document&&(nr=window,rr=nr.document,ir=rr.documentElement,sr=Br("div")||{style:{}},Br("div"),Dr=Nr(Dr),Pr=Dr+"Origin",sr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",lr=!!Nr("perspective"),ur=er.core.reverting,or=1)},Xr=function t(e){var n,r=Br("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,o=this.nextSibling,s=this.style.cssText;if(ir.appendChild(r),r.appendChild(this),this.style.display="block",e)try{n=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(n=this._gsapBBox());return i&&(o?i.insertBefore(this,o):i.appendChild(this)),ir.removeChild(r),this.style.cssText=s,n},Fr=function(t,e){for(var n=e.length;n--;)if(t.hasAttribute(e[n]))return t.getAttribute(e[n])},Wr=function(t){var e;try{e=t.getBBox()}catch(n){e=Xr.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===Xr||(e=Xr.call(t,!0)),!e||e.width||e.x||e.y?e:{x:+Fr(t,["x","cx","x1"])||0,y:+Fr(t,["y","cy","y1"])||0,width:0,height:0}},qr=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!Wr(t))},jr=function(t,e){if(e){var n=t.style;e in cr&&e!==Pr&&(e=Dr),n.removeProperty?("ms"!==e.substr(0,2)&&"webkit"!==e.substr(0,6)||(e="-"+e),n.removeProperty(e.replace(dr,"-$1").toLowerCase())):n.removeAttribute(e)}},Hr=function(t,e,n,r,i,o){var s=new Wn(t._pt,e,n,0,1,o?Tr:xr);return t._pt=s,s.b=r,s.e=i,t._props.push(n),s},Ur={deg:1,rad:1,turn:1},Kr={grid:1,flex:1},Gr=function t(e,n,r,i){var o,s,a,u,l=parseFloat(r)||0,c=(r+"").trim().substr((l+"").length)||"px",h=sr.style,f=gr.test(n),p="svg"===e.tagName.toLowerCase(),d=(p?"client":"offset")+(f?"Width":"Height"),g=100,m="px"===i,v="%"===i;return i===c||!l||Ur[i]||Ur[c]?l:("px"!==c&&!m&&(l=t(e,n,r,"px")),u=e.getCTM&&qr(e),!v&&"%"!==c||!cr[n]&&!~n.indexOf("adius")?(h[f?"width":"height"]=g+(m?c:i),s=~n.indexOf("adius")||"em"===i&&e.appendChild&&!p?e:e.parentNode,u&&(s=(e.ownerSVGElement||{}).parentNode),s&&s!==rr&&s.appendChild||(s=rr.body),(a=s._gsap)&&v&&a.width&&f&&a.time===nn.time&&!a.uncache?Ht(l/a.width*g):((v||"%"===c)&&!Kr[zr(s,"display")]&&(h.position=zr(e,"position")),s===e&&(h.position="static"),s.appendChild(sr),o=sr[d],s.removeChild(sr),h.position="absolute",f&&v&&((a=Wt(s)).time=nn.time,a.width=s[d]),Ht(m?o*l/g:o&&l?g/o*l:0))):(o=u?e.getBBox()[f?"width":"height"]:e[d],Ht(v?l/o*g:l/100*o)))},Qr=function(t,e,n,r){var i;return or||Yr(),e in vr&&"transform"!==e&&~(e=vr[e]).indexOf(",")&&(e=e.split(",")[0]),cr[e]&&"transform"!==e?(i=ai(t,r),i="transformOrigin"!==e?i[e]:i.svg?i.origin:ui(zr(t,Pr))+" "+i.zOrigin+"px"):(!(i=t.style[e])||"auto"===i||r||~(i+"").indexOf("calc("))&&(i=ti[e]&&ti[e](t,e,n)||zr(t,e)||qt(t,e)||("opacity"===e?1:0)),n&&!~(i+"").trim().indexOf(" ")?Gr(t,e,i,n)+n:i},$r=function(t,e,n,r){if(!n||"none"===n){var i=Nr(e,t,1),o=i&&zr(t,i,1);o&&o!==n?(e=i,n=o):"borderColor"===e&&(n=zr(t,"borderTopColor"))}var s,a,u,l,c,h,f,p,d,g,m,v=new Wn(this._pt,t.style,e,0,1,zn),_=0,y=0;if(v.b=n,v.e=r,n+="","auto"===(r+="")&&(t.style[e]=r,r=zr(t,e)||r,t.style[e]=n),en(s=[n,r]),r=s[1],u=(n=s[0]).match(yt)||[],(r.match(yt)||[]).length){for(;a=yt.exec(r);)f=a[0],d=r.substring(_,a.index),c?c=(c+1)%5:"rgba("!==d.substr(-5)&&"hsla("!==d.substr(-5)||(c=1),f!==(h=u[y++]||"")&&(l=parseFloat(h)||0,m=h.substr((l+"").length),"="===f.charAt(1)&&(f=Kt(l,f)+m),p=parseFloat(f),g=f.substr((p+"").length),_=yt.lastIndex-g.length,g||(g=g||$.units[e]||m,_===r.length&&(r+=g,v.e+=g)),m!==g&&(l=Gr(t,e,h,g)||0),v._pt={_next:v._pt,p:d||1===y?d:",",s:l,c:p-l,m:c&&c<4||"zIndex"===e?Math.round:0});v.c=_-1;)n=a[i],cr[n]&&(r=1,n="transformOrigin"===n?Pr:Dr),jr(o,n);r&&(jr(o,Dr),u&&(u.svg&&o.removeAttribute("transform"),ai(o,1),u.uncache=1,Ir(s)))}},ti={clearProps:function(t,e,n,r,i){if("isFromStart"!==i.data){var o=t._pt=new Wn(t._pt,e,n,0,0,Jr);return o.u=r,o.pr=-10,o.tween=i,t._props.push(n),1}}},ei=[1,0,0,1,0,0],ni={},ri=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},ii=function(t){var e=zr(t,Dr);return ri(e)?ei:e.substr(7).match(_t).map(Ht)},oi=function(t,e){var n,r,i,o,s=t._gsap||Wt(t),a=t.style,u=ii(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(i=t.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?ei:u:(u!==ei||t.offsetParent||t===ir||s.svg||(i=a.display,a.display="block",(n=t.parentNode)&&t.offsetParent||(o=1,r=t.nextElementSibling,ir.appendChild(t)),u=ii(t),i?a.display=i:jr(t,"display"),o&&(r?n.insertBefore(t,r):n?n.appendChild(t):ir.removeChild(t))),e&&u.length>6?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)},si=function(t,e,n,r,i,o){var s,a,u,l=t._gsap,c=i||oi(t,!0),h=l.xOrigin||0,f=l.yOrigin||0,p=l.xOffset||0,d=l.yOffset||0,g=c[0],m=c[1],v=c[2],_=c[3],y=c[4],w=c[5],b=e.split(" "),x=parseFloat(b[0])||0,T=parseFloat(b[1])||0;n?c!==ei&&(a=g*_-m*v)&&(u=x*(-m/a)+T*(g/a)-(g*w-m*y)/a,x=x*(_/a)+T*(-v/a)+(v*w-_*y)/a,T=u):(x=(s=Wr(t)).x+(~b[0].indexOf("%")?x/100*s.width:x),T=s.y+(~(b[1]||b[0]).indexOf("%")?T/100*s.height:T)),r||!1!==r&&l.smooth?(y=x-h,w=T-f,l.xOffset=p+(y*g+w*v)-y,l.yOffset=d+(y*m+w*_)-w):l.xOffset=l.yOffset=0,l.xOrigin=x,l.yOrigin=T,l.smooth=!!r,l.origin=e,l.originIsAbsolute=!!n,t.style[Pr]="0px 0px",o&&(Hr(o,l,"xOrigin",h,x),Hr(o,l,"yOrigin",f,T),Hr(o,l,"xOffset",p,l.xOffset),Hr(o,l,"yOffset",d,l.yOffset)),t.setAttribute("data-svg-origin",x+" "+T)},ai=function(t,e){var n=t._gsap||new mn(t);if("x"in n&&!e&&!n.uncache)return n;var r,i,o,s,a,u,l,c,h,f,p,d,g,m,v,_,y,w,b,x,T,O,M,k,S,E,C,D,P,A,I,L,R=t.style,B=n.scaleX<0,z="px",V="deg",N=getComputedStyle(t),Y=zr(t,Pr)||"0";return r=i=o=u=l=c=h=f=p=0,s=a=1,n.svg=!(!t.getCTM||!qr(t)),N.translate&&("none"===N.translate&&"none"===N.scale&&"none"===N.rotate||(R[Dr]=("none"!==N.translate?"translate3d("+(N.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==N.rotate?"rotate("+N.rotate+") ":"")+("none"!==N.scale?"scale("+N.scale.split(" ").join(",")+") ":"")+("none"!==N[Dr]?N[Dr]:"")),R.scale=R.rotate=R.translate="none"),m=oi(t,n.svg),n.svg&&(n.uncache?(S=t.getBBox(),Y=n.xOrigin-S.x+"px "+(n.yOrigin-S.y)+"px",k=""):k=!e&&t.getAttribute("data-svg-origin"),si(t,k||Y,!!k||n.originIsAbsolute,!1!==n.smooth,m)),d=n.xOrigin||0,g=n.yOrigin||0,m!==ei&&(w=m[0],b=m[1],x=m[2],T=m[3],r=O=m[4],i=M=m[5],6===m.length?(s=Math.sqrt(w*w+b*b),a=Math.sqrt(T*T+x*x),u=w||b?pr(b,w)*hr:0,(h=x||T?pr(x,T)*hr+u:0)&&(a*=Math.abs(Math.cos(h*fr))),n.svg&&(r-=d-(d*w+g*x),i-=g-(d*b+g*T))):(L=m[6],A=m[7],C=m[8],D=m[9],P=m[10],I=m[11],r=m[12],i=m[13],o=m[14],l=(v=pr(L,P))*hr,v&&(k=O*(_=Math.cos(-v))+C*(y=Math.sin(-v)),S=M*_+D*y,E=L*_+P*y,C=O*-y+C*_,D=M*-y+D*_,P=L*-y+P*_,I=A*-y+I*_,O=k,M=S,L=E),c=(v=pr(-x,P))*hr,v&&(_=Math.cos(-v),I=T*(y=Math.sin(-v))+I*_,w=k=w*_-C*y,b=S=b*_-D*y,x=E=x*_-P*y),u=(v=pr(b,w))*hr,v&&(k=w*(_=Math.cos(v))+b*(y=Math.sin(v)),S=O*_+M*y,b=b*_-w*y,M=M*_-O*y,w=k,O=S),l&&Math.abs(l)+Math.abs(u)>359.9&&(l=u=0,c=180-c),s=Ht(Math.sqrt(w*w+b*b+x*x)),a=Ht(Math.sqrt(M*M+L*L)),v=pr(O,M),h=Math.abs(v)>2e-4?v*hr:0,p=I?1/(I<0?-I:I):0),n.svg&&(k=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!ri(zr(t,Dr)),k&&t.setAttribute("transform",k))),Math.abs(h)>90&&Math.abs(h)<270&&(B?(s*=-1,h+=u<=0?180:-180,u+=u<=0?180:-180):(a*=-1,h+=h<=0?180:-180)),e=e||n.uncache,n.x=r-((n.xPercent=r&&(!e&&n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-r)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+z,n.y=i-((n.yPercent=i&&(!e&&n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-i)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+z,n.z=o+z,n.scaleX=Ht(s),n.scaleY=Ht(a),n.rotation=Ht(u)+V,n.rotationX=Ht(l)+V,n.rotationY=Ht(c)+V,n.skewX=h+V,n.skewY=f+V,n.transformPerspective=p+z,(n.zOrigin=parseFloat(Y.split(" ")[2])||0)&&(R[Pr]=ui(Y)),n.xOffset=n.yOffset=0,n.force3D=$.force3D,n.renderTransform=n.svg?gi:lr?di:ci,n.uncache=0,n},ui=function(t){return(t=t.split(" "))[0]+" "+t[1]},li=function(t,e,n){var r=De(e);return Ht(parseFloat(e)+parseFloat(Gr(t,"x",n+"px",r)))+r},ci=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,di(t,e)},hi="0deg",fi="0px",pi=") ",di=function(t,e){var n=e||this,r=n.xPercent,i=n.yPercent,o=n.x,s=n.y,a=n.z,u=n.rotation,l=n.rotationY,c=n.rotationX,h=n.skewX,f=n.skewY,p=n.scaleX,d=n.scaleY,g=n.transformPerspective,m=n.force3D,v=n.target,_=n.zOrigin,y="",w="auto"===m&&t&&1!==t||!0===m;if(_&&(c!==hi||l!==hi)){var b,x=parseFloat(l)*fr,T=Math.sin(x),O=Math.cos(x);x=parseFloat(c)*fr,b=Math.cos(x),o=li(v,o,T*b*-_),s=li(v,s,-Math.sin(x)*-_),a=li(v,a,O*b*-_+_)}g!==fi&&(y+="perspective("+g+pi),(r||i)&&(y+="translate("+r+"%, "+i+"%) "),(w||o!==fi||s!==fi||a!==fi)&&(y+=a!==fi||w?"translate3d("+o+", "+s+", "+a+") ":"translate("+o+", "+s+pi),u!==hi&&(y+="rotate("+u+pi),l!==hi&&(y+="rotateY("+l+pi),c!==hi&&(y+="rotateX("+c+pi),h===hi&&f===hi||(y+="skew("+h+", "+f+pi),1===p&&1===d||(y+="scale("+p+", "+d+pi),v.style[Dr]=y||"translate(0, 0)"},gi=function(t,e){var n,r,i,o,s,a=e||this,u=a.xPercent,l=a.yPercent,c=a.x,h=a.y,f=a.rotation,p=a.skewX,d=a.skewY,g=a.scaleX,m=a.scaleY,v=a.target,_=a.xOrigin,y=a.yOrigin,w=a.xOffset,b=a.yOffset,x=a.forceCSS,T=parseFloat(c),O=parseFloat(h);f=parseFloat(f),p=parseFloat(p),(d=parseFloat(d))&&(p+=d=parseFloat(d),f+=d),f||p?(f*=fr,p*=fr,n=Math.cos(f)*g,r=Math.sin(f)*g,i=Math.sin(f-p)*-m,o=Math.cos(f-p)*m,p&&(d*=fr,s=Math.tan(p-d),i*=s=Math.sqrt(1+s*s),o*=s,d&&(s=Math.tan(d),n*=s=Math.sqrt(1+s*s),r*=s)),n=Ht(n),r=Ht(r),i=Ht(i),o=Ht(o)):(n=g,o=m,r=i=0),(T&&!~(c+"").indexOf("px")||O&&!~(h+"").indexOf("px"))&&(T=Gr(v,"x",c,"px"),O=Gr(v,"y",h,"px")),(_||y||w||b)&&(T=Ht(T+_-(_*n+y*i)+w),O=Ht(O+y-(_*r+y*o)+b)),(u||l)&&(s=v.getBBox(),T=Ht(T+u/100*s.width),O=Ht(O+l/100*s.height)),s="matrix("+n+","+r+","+i+","+o+","+T+","+O+")",v.setAttribute("transform",s),x&&(v.style[Dr]=s)},mi=function(t,e,n,r,i){var o,s,a=360,u=at(i),l=parseFloat(i)*(u&&~i.indexOf("rad")?hr:1)-r,c=r+l+"deg";return u&&("short"===(o=i.split("_")[1])&&(l%=a)!==l%180&&(l+=l<0?a:-360),"cw"===o&&l<0?l=(l+36e9)%a-~~(l/a)*a:"ccw"===o&&l>0&&(l=(l-36e9)%a-~~(l/a)*a)),t._pt=s=new Wn(t._pt,e,n,r,l,yr),s.e=c,s.u="deg",t._props.push(n),s},vi=function(t,e){for(var n in e)t[n]=e[n];return t},_i=function(t,e,n){var r,i,o,s,a,u,l,c=vi({},n._gsap),h=n.style;for(i in c.svg?(o=n.getAttribute("transform"),n.setAttribute("transform",""),h[Dr]=e,r=ai(n,1),jr(n,Dr),n.setAttribute("transform",o)):(o=getComputedStyle(n)[Dr],h[Dr]=e,r=ai(n,1),h[Dr]=o),cr)(o=c[i])!==(s=r[i])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(i)<0&&(a=De(o)!==(l=De(s))?Gr(n,i,o,l):parseFloat(o),u=parseFloat(s),t._pt=new Wn(t._pt,r,i,a,u-a,_r),t._pt.u=l||0,t._props.push(i));vi(r,c)};jt("padding,margin,Width,Radius",(function(t,e){var n="Top",r="Right",i="Bottom",o="Left",s=(e<3?[n,r,i,o]:[n+o,n+r,i+r,i+o]).map((function(n){return e<2?t+n:"border"+n+t}));ti[e>1?"border"+t:t]=function(t,e,n,r,i){var o,a;if(arguments.length<4)return o=s.map((function(e){return Qr(t,e,n)})),5===(a=o.join(" ")).split(o[0]).length?o[0]:a;o=(r+"").split(" "),a={},s.forEach((function(t,e){return a[t]=o[e]=o[e]||o[(e-1)/2|0]})),t.init(e,a,i)}}));var yi,wi,bi,xi={name:"css",register:Yr,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,n,r,i){var o,s,a,u,l,c,h,f,p,d,g,m,v,_,y,w,b,x,T,O,M=this._props,k=t.style,S=n.vars.startAt;for(h in or||Yr(),this.styles=this.styles||Rr(t),w=this.styles.props,this.tween=n,e)if("autoRound"!==h&&(s=e[h],!zt[h]||!Tn(h,e,n,r,t,i)))if(l=typeof s,c=ti[h],"function"===l&&(l=typeof(s=s.call(n,r,t,i))),"string"===l&&~s.indexOf("random(")&&(s=Xe(s)),c)c(this,t,h,s,n)&&(y=1);else if("--"===h.substr(0,2))o=(getComputedStyle(t).getPropertyValue(h)+"").trim(),s+="",Je.lastIndex=0,Je.test(o)||(f=De(o),p=De(s)),p?f!==p&&(o=Gr(t,h,o,p)+p):f&&(s+=f),this.add(k,"setProperty",o,s,r,i,0,0,h),M.push(h),w.push(h,0,k[h]);else if("undefined"!==l){if(S&&h in S?(o="function"==typeof S[h]?S[h].call(n,r,t,i):S[h],at(o)&&~o.indexOf("random(")&&(o=Xe(o)),De(o+"")||(o+=$.units[h]||De(Qr(t,h))||""),"="===(o+"").charAt(1)&&(o=Qr(t,h))):o=Qr(t,h),u=parseFloat(o),(d="string"===l&&"="===s.charAt(1)&&s.substr(0,2))&&(s=s.substr(2)),a=parseFloat(s),h in vr&&("autoAlpha"===h&&(1===u&&"hidden"===Qr(t,"visibility")&&a&&(u=0),w.push("visibility",0,k.visibility),Hr(this,k,"visibility",u?"inherit":"hidden",a?"inherit":"hidden",!a)),"scale"!==h&&"transform"!==h&&~(h=vr[h]).indexOf(",")&&(h=h.split(",")[0])),g=h in cr)if(this.styles.save(h),m||((v=t._gsap).renderTransform&&!e.parseTransform||ai(t,e.parseTransform),_=!1!==e.smoothOrigin&&v.smooth,(m=this._pt=new Wn(this._pt,k,Dr,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===h)this._pt=new Wn(this._pt,v,"scaleY",u,(d?Kt(u,d+a):a)-u||0,_r),this._pt.u=0,M.push("scaleY",h),h+="X";else{if("transformOrigin"===h){w.push(Pr,0,k[Pr]),x=void 0,T=void 0,O=void 0,x=(b=s).split(" "),T=x[0],O=x[1]||"50%","top"!==T&&"bottom"!==T&&"left"!==O&&"right"!==O||(b=T,T=O,O=b),x[0]=Zr[T]||T,x[1]=Zr[O]||O,s=x.join(" "),v.svg?si(t,s,0,_,0,this):((p=parseFloat(s.split(" ")[2])||0)!==v.zOrigin&&Hr(this,v,"zOrigin",v.zOrigin,p),Hr(this,k,h,ui(o),ui(s)));continue}if("svgOrigin"===h){si(t,s,1,_,0,this);continue}if(h in ni){mi(this,v,h,u,d?Kt(u,d+s):s);continue}if("smoothOrigin"===h){Hr(this,v,"smooth",v.smooth,s);continue}if("force3D"===h){v[h]=s;continue}if("transform"===h){_i(this,s,t);continue}}else h in k||(h=Nr(h)||h);if(g||(a||0===a)&&(u||0===u)&&!mr.test(s)&&h in k)a||(a=0),(f=(o+"").substr((u+"").length))!==(p=De(s)||(h in $.units?$.units[h]:f))&&(u=Gr(t,h,o,p)),this._pt=new Wn(this._pt,g?v:k,h,u,(d?Kt(u,d+a):a)-u,g||"px"!==p&&"zIndex"!==h||!1===e.autoRound?_r:br),this._pt.u=p||0,f!==p&&"%"!==p&&(this._pt.b=o,this._pt.r=wr);else if(h in k)$r.call(this,t,h,o,d?d+s:s);else{if(!(h in t)){St(h,s);continue}this.add(t,h,o||t[h],d?d+s:s,r,i)}g||(h in k?w.push(h,0,k[h]):w.push(h,1,o||t[h])),M.push(h)}y&&Fn(this)},render:function(t,e){if(e.tween._time||!ur())for(var n=e._pt;n;)n.r(t,n.d),n=n._next;else e.styles.revert()},get:Qr,aliases:vr,getSetter:function(t,e,n){var r=vr[e];return r&&r.indexOf(",")<0&&(e=r),e in cr&&e!==Pr&&(t._gsap.x||Qr(t,"x"))?n&&ar===n?"scale"===e?Sr:kr:(ar=n||{},"scale"===e?Er:Cr):t.style&&!ct(t.style[e])?Or:~e.indexOf("-")?Mr:Ln(t,e)},core:{_removeProperty:jr,_getMatrix:oi}};er.utils.checkPrefix=Nr,er.core.getStyleSaver=Rr,bi=jt((yi="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(wi="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){cr[t]=1})),jt(wi,(function(t){$.units[t]="deg",ni[t]=1})),vr[bi[13]]=yi+","+wi,jt("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");vr[e[1]]=bi[e[0]]})),jt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){$.units[t]="px"})),er.registerPlugin(xi);var Ti=er.registerPlugin(xi)||er;Ti.core.Tween;function Oi(t,e){for(var n=0;na?(i=r,r=t,s=o,o=u):n?r+=t:r=i+(t-i)/(u-s)*(o-s)};return{update:l,reset:function(){i=r=n?0:r,s=o=0},getVelocity:function(t){var e=s,a=i,c=Fi();return(t||0===t)&&t!==r&&l(t),o===s||c-s>u?0:(r+(n?a:-a))/((n?c:o)-e)*1e3}}},ro=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},io=function(t){var e=Math.max.apply(Math,t),n=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(n)?e:n},oo=function(){var t,e,n,r;(Ii=Mi.core.globals().ScrollTrigger)&&Ii.core&&(t=Ii.core,e=t.bridge||{},n=t._scrollers,r=t._proxies,n.push.apply(n,Yi),r.push.apply(r,Xi),Yi=n,Xi=r,Wi=function(t,n){return e[t](n)})},so=function(t){return(Mi=t||zi())&&"undefined"!=typeof document&&document.body&&(Si=window,Ei=document,Ci=Ei.documentElement,Di=Ei.body,Li=[Si,Ei,Ci,Di],Mi.utils.clamp,Ai="onpointerenter"in Di?"pointer":"mouse",Pi=ao.isTouch=Si.matchMedia&&Si.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in Si||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,Bi=ao.eventTypes=("ontouchstart"in Ci?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in Ci?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout((function(){return Vi=0}),500),oo(),ki=1),ki};Zi.op=Ji,Yi.cache=0;var ao=function(){function t(t){this.init(t)}var e,n,r;return t.prototype.init=function(t){ki||so(Mi)||console.warn("Please gsap.registerPlugin(Observer)"),Ii||oo();var e=t.tolerance,n=t.dragMinimum,r=t.type,i=t.target,o=t.lineHeight,s=t.debounce,a=t.preventDefault,u=t.onStop,l=t.onStopDelay,c=t.ignore,h=t.wheelSpeed,f=t.event,p=t.onDragStart,d=t.onDragEnd,g=t.onDrag,m=t.onPress,v=t.onRelease,_=t.onRight,y=t.onLeft,w=t.onUp,b=t.onDown,x=t.onChangeX,T=t.onChangeY,O=t.onChange,M=t.onToggleX,k=t.onToggleY,S=t.onHover,E=t.onHoverEnd,C=t.onMove,D=t.ignoreCheck,P=t.isNormalizer,A=t.onGestureStart,I=t.onGestureEnd,L=t.onWheel,R=t.onEnable,B=t.onDisable,z=t.onClick,V=t.scrollSpeed,N=t.capture,Y=t.allowClicks,X=t.lockAxis,F=t.onLockAxis;this.target=i=to(i)||Ci,this.vars=t,c&&(c=Mi.utils.toArray(c)),e=e||1e-9,n=n||0,h=h||1,V=V||1,r=r||"wheel,touch,pointer",s=!1!==s,o||(o=parseFloat(Si.getComputedStyle(Di).lineHeight)||22);var W,q,j,H,U,K,G,Q=this,$=0,Z=0,J=eo(i,Zi),tt=eo(i,Ji),et=J(),nt=tt(),rt=~r.indexOf("touch")&&!~r.indexOf("pointer")&&"pointerdown"===Bi[0],it=ji(i),ot=i.ownerDocument||Ei,st=[0,0,0],at=[0,0,0],ut=0,lt=function(){return ut=Fi()},ct=function(t,e){return(Q.event=t)&&c&&~c.indexOf(t.target)||e&&rt&&"touch"!==t.pointerType||D&&D(t,e)},ht=function(){var t=Q.deltaX=io(st),n=Q.deltaY=io(at),r=Math.abs(t)>=e,i=Math.abs(n)>=e;O&&(r||i)&&O(Q,t,n,st,at),r&&(_&&Q.deltaX>0&&_(Q),y&&Q.deltaX<0&&y(Q),x&&x(Q),M&&Q.deltaX<0!=$<0&&M(Q),$=Q.deltaX,st[0]=st[1]=st[2]=0),i&&(b&&Q.deltaY>0&&b(Q),w&&Q.deltaY<0&&w(Q),T&&T(Q),k&&Q.deltaY<0!=Z<0&&k(Q),Z=Q.deltaY,at[0]=at[1]=at[2]=0),(H||j)&&(C&&C(Q),j&&(g(Q),j=!1),H=!1),K&&(K=!1,1)&&F&&F(Q),U&&(L(Q),U=!1),W=0},ft=function(t,e,n){st[n]+=t,at[n]+=e,Q._vx.update(t),Q._vy.update(e),s?W||(W=requestAnimationFrame(ht)):ht()},pt=function(t,e){X&&!G&&(Q.axis=G=Math.abs(t)>Math.abs(e)?"x":"y",K=!0),"y"!==G&&(st[2]+=t,Q._vx.update(t,!0)),"x"!==G&&(at[2]+=e,Q._vy.update(e,!0)),s?W||(W=requestAnimationFrame(ht)):ht()},dt=function(t){if(!ct(t,1)){var e=(t=ro(t,a)).clientX,r=t.clientY,i=e-Q.x,o=r-Q.y,s=Q.isDragging;Q.x=e,Q.y=r,(s||Math.abs(Q.startX-e)>=n||Math.abs(Q.startY-r)>=n)&&(g&&(j=!0),s||(Q.isDragging=!0),pt(i,o),s||p&&p(Q))}},gt=Q.onPress=function(t){ct(t,1)||(Q.axis=G=null,q.pause(),Q.isPressed=!0,t=ro(t),$=Z=0,Q.startX=Q.x=t.clientX,Q.startY=Q.y=t.clientY,Q._vx.reset(),Q._vy.reset(),Hi(P?i:ot,Bi[1],dt,a,!0),Q.deltaX=Q.deltaY=0,m&&m(Q))},mt=function(t){if(!ct(t,1)){Ui(P?i:ot,Bi[1],dt,!0);var e=Q.isDragging&&(Math.abs(Q.x-Q.startX)>3||Math.abs(Q.y-Q.startY)>3),n=ro(t);e||(Q._vx.reset(),Q._vy.reset(),a&&Y&&Mi.delayedCall(.08,(function(){if(Fi()-ut>300&&!t.defaultPrevented)if(t.target.click)t.target.click();else if(ot.createEvent){var e=ot.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,Si,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(e)}}))),Q.isDragging=Q.isGesturing=Q.isPressed=!1,u&&!P&&q.restart(!0),d&&e&&d(Q),v&&v(Q,e)}},vt=function(t){return t.touches&&t.touches.length>1&&(Q.isGesturing=!0)&&A(t,Q.isDragging)},_t=function(){return Q.isGesturing=!1,I(Q)},yt=function(t){if(!ct(t)){var e=J(),n=tt();ft((e-et)*V,(n-nt)*V,1),et=e,nt=n,u&&q.restart(!0)}},wt=function(t){if(!ct(t)){t=ro(t,a),L&&(U=!0);var e=(1===t.deltaMode?o:2===t.deltaMode?Si.innerHeight:1)*h;ft(t.deltaX*e,t.deltaY*e,0),u&&!P&&q.restart(!0)}},bt=function(t){if(!ct(t)){var e=t.clientX,n=t.clientY,r=e-Q.x,i=n-Q.y;Q.x=e,Q.y=n,H=!0,(r||i)&&pt(r,i)}},xt=function(t){Q.event=t,S(Q)},Tt=function(t){Q.event=t,E(Q)},Ot=function(t){return ct(t)||ro(t,a)&&z(Q)};q=Q._dc=Mi.delayedCall(l||.25,(function(){Q._vx.reset(),Q._vy.reset(),q.pause(),u&&u(Q)})).pause(),Q.deltaX=Q.deltaY=0,Q._vx=no(0,50,!0),Q._vy=no(0,50,!0),Q.scrollX=J,Q.scrollY=tt,Q.isDragging=Q.isGesturing=Q.isPressed=!1,Q.enable=function(t){return Q.isEnabled||(Hi(it?ot:i,"scroll",Qi),r.indexOf("scroll")>=0&&Hi(it?ot:i,"scroll",yt,a,N),r.indexOf("wheel")>=0&&Hi(i,"wheel",wt,a,N),(r.indexOf("touch")>=0&&Pi||r.indexOf("pointer")>=0)&&(Hi(i,Bi[0],gt,a,N),Hi(ot,Bi[2],mt),Hi(ot,Bi[3],mt),Y&&Hi(i,"click",lt,!1,!0),z&&Hi(i,"click",Ot),A&&Hi(ot,"gesturestart",vt),I&&Hi(ot,"gestureend",_t),S&&Hi(i,Ai+"enter",xt),E&&Hi(i,Ai+"leave",Tt),C&&Hi(i,Ai+"move",bt)),Q.isEnabled=!0,t&&t.type&>(t),R&&R(Q)),Q},Q.disable=function(){Q.isEnabled&&(Ni.filter((function(t){return t!==Q&&ji(t.target)})).length||Ui(it?ot:i,"scroll",Qi),Q.isPressed&&(Q._vx.reset(),Q._vy.reset(),Ui(P?i:ot,Bi[1],dt,!0)),Ui(it?ot:i,"scroll",yt,N),Ui(i,"wheel",wt,N),Ui(i,Bi[0],gt,N),Ui(ot,Bi[2],mt),Ui(ot,Bi[3],mt),Ui(i,"click",lt,!0),Ui(i,"click",Ot),Ui(ot,"gesturestart",vt),Ui(ot,"gestureend",_t),Ui(i,Ai+"enter",xt),Ui(i,Ai+"leave",Tt),Ui(i,Ai+"move",bt),Q.isEnabled=Q.isPressed=Q.isDragging=!1,B&&B(Q))},Q.kill=function(){Q.disable();var t=Ni.indexOf(Q);t>=0&&Ni.splice(t,1),Ri===Q&&(Ri=0)},Ni.push(Q),P&&ji(i)&&(Ri=Q),Q.enable(f)},e=t,(n=[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}])&&Oi(e.prototype,n),r&&Oi(e,r),t}();ao.version="3.11.2",ao.create=function(t){return new ao(t)},ao.register=so,ao.getAll=function(){return Ni.slice()},ao.getById=function(t){return Ni.filter((function(e){return e.vars.id===t}))[0]},zi()&&Mi.registerPlugin(ao);var uo,lo,co,ho,fo,po,go,mo,vo,_o,yo,wo,bo,xo,To,Oo,Mo,ko,So,Eo,Co,Do,Po,Ao,Io,Lo,Ro,Bo,zo,Vo,No,Yo,Xo,Fo=1,Wo=Date.now,qo=Wo(),jo=0,Ho=0,Uo=function(){return xo=1},Ko=function(){return xo=0},Go=function(t){return t},Qo=function(t){return Math.round(1e5*t)/1e5||0},$o=function(){return"undefined"!=typeof window},Zo=function(){return uo||$o()&&(uo=window.gsap)&&uo.registerPlugin&&uo},Jo=function(t){return!!~go.indexOf(t)},ts=function(t){return qi(t,"getBoundingClientRect")||(Jo(t)?function(){return sa.width=co.innerWidth,sa.height=co.innerHeight,sa}:function(){return bs(t)})},es=function(t,e){var n=e.s,r=e.d2,i=e.d,o=e.a;return(o=qi(t,n="scroll"+r))?o()-ts(t)()[i]:Jo(t)?(fo[n]||po[n])-(co["inner"+r]||fo["client"+r]||po["client"+r]):t[n]-t["offset"+r]},ns=function(t,e){for(var n=0;n0){for(t-=i,o=0;o=t)return n[o];return n[o-1]}for(o=n.length,t+=i;o--;)if(n[o]<=t)return n[o];return n[0]}:function(n,r,i){void 0===i&&(i=.001);var o=e(n);return!r||Math.abs(o-n)n&&(r*=e/100),t=t.substr(0,n-1)),t=r+(t in Ps?Ps[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},Is=function(t,e,n,r,i,o,s,a){var u=i.startColor,l=i.endColor,c=i.fontSize,h=i.indent,f=i.fontWeight,p=ho.createElement("div"),d=Jo(n)||"fixed"===qi(n,"pinType"),g=-1!==t.indexOf("scroller"),m=d?po:n,v=-1!==t.indexOf("start"),_=v?u:l,y="border-color:"+_+";font-size:"+c+";color:"+_+";font-weight:"+f+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return y+="position:"+((g||a)&&d?"fixed;":"absolute;"),(g||a||!d)&&(y+=(r===Ji?hs:fs)+":"+(o+parseFloat(h))+"px;"),s&&(y+="box-sizing:border-box;text-align:left;width:"+s.offsetWidth+"px;"),p._isStart=v,p.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),p.style.cssText=y,p.innerText=e||0===e?t+"-"+e:t,m.children[0]?m.insertBefore(p,m.children[0]):m.appendChild(p),p._offset=p["offset"+r.op.d2],Ls(p,0,r,v),p},Ls=function(t,e,n,r){var i={display:"block"},o=n[r?"os2":"p2"],s=n[r?"p2":"os2"];t._isFlipped=r,i[n.a+"Percent"]=r?-100:0,i[n.a]=r?"1px":0,i["border"+o+vs]=1,i["border"+s+vs]=0,i[n.p]=e+"px",uo.set(t,i)},Rs=[],Bs={},zs=function(){return Wo()-jo>34&&Js()},Vs=function(){(!Po||!Po.isPressed||Po.startX>po.clientWidth)&&(Yi.cache++,No||(No=requestAnimationFrame(Js)),jo||qs("scrollStart"),jo=Wo())},Ns=function(){Lo=co.innerWidth,Io=co.innerHeight},Ys=function(){Yi.cache++,!bo&&!Do&&!ho.fullscreenElement&&!ho.webkitFullscreenElement&&(!Ao||Lo!==co.innerWidth||Math.abs(co.innerHeight-Io)>.25*co.innerHeight)&&mo.restart(!0)},Xs={},Fs=[],Ws=function t(){return Ss(ha,"scrollEnd",t)||Qs(!0)},qs=function(t){return Xs[t]&&Xs[t].map((function(t){return t()}))||Fs},js=[],Hs=function(t){for(var e=0;e=50,i=e&&Rs[0].scroll();if(Zs=$s>i?-1:1,$s=i,r&&(jo&&!xo&&n-jo>200&&(jo=0,qs("scrollEnd")),yo=qo,qo=n),Zs<0){for(Oo=e;Oo-- >0;)Rs[Oo]&&Rs[Oo].update(0,r);Zs=1}else for(Oo=0;Oo20),n-=n-y}if(o){var x=t+n,T=o._isStart;p="scroll"+r.d2,Ls(o,x,r,T&&x>20||!T&&(c?Math.max(po[p],fo[p]):o.parentNode[p])<=x+1),c&&(u=bs(s),c&&(o.style[r.op.p]=u[r.op.p]-r.op.m-o._offset+_s))}return f&&g&&(p=bs(g),f.seek(h),d=bs(g),f._caScrollDist=p[r.p]-d[r.p],t=t/f._caScrollDist*h),f&&f.seek(m),f?t:Math.round(t)},ua=/(webkit|moz|length|cssText|inset)/i,la=function(t,e,n,r){if(t.parentNode!==e){var i,o,s=t.style;if(e===po){for(i in t._stOrig=s.cssText,o=ys(t))+i||ua.test(i)||!o[i]||"string"!=typeof s[i]||"0"===i||(s[i]=o[i]);s.top=n,s.left=r}else s.cssText=t._stOrig;uo.core.getCache(t).uncache=1,e.appendChild(t)}},ca=function(t,e){var n,r,i=eo(t,e),o="_scroll"+e.p2,s=function e(s,a,u,l,c){var h=e.tween,f=a.onComplete,p={};return u=u||i(),c=l&&c||0,l=l||s-u,h&&h.kill(),n=Math.round(u),a[o]=s,a.modifiers=p,p[o]=function(t){return(t=Math.round(i()))!==n&&t!==r&&Math.abs(t-n)>3&&Math.abs(t-r)>3?(h.kill(),e.tween=0):t=u+l*h.ratio+c*h.ratio*h.ratio,r=n,n=Math.round(t)},a.onComplete=function(){e.tween=0,f&&f.call(h)},h=e.tween=uo.to(t,a)};return t[o]=i,i.wheelHandler=function(){return s.tween&&s.tween.kill()&&(s.tween=0)},ks(t,"wheel",i.wheelHandler),s},ha=function(){function t(e,n){lo||t.register(uo)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),this.init(e,n)}return t.prototype.init=function(e,n){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),Ho){var r,i,o,s,a,u,l,c,h,f,p,d,g,m,v,_,y,w,b,x,T,O,M,k,S,E,C,D,P,A,I,L,R,B,z,V,N,Y,X,F,W,q=e=ws(rs(e)||os(e)||e.nodeType?{trigger:e}:e,Ds),j=q.onUpdate,H=q.toggleClass,U=q.id,K=q.onToggle,G=q.onRefresh,Q=q.scrub,$=q.trigger,Z=q.pin,J=q.pinSpacing,tt=q.invalidateOnRefresh,et=q.anticipatePin,nt=q.onScrubComplete,rt=q.onSnapComplete,it=q.once,ot=q.snap,st=q.pinReparent,at=q.pinSpacer,ut=q.containerAnimation,lt=q.fastScrollEnd,ct=q.preventOverlaps,ht=e.horizontal||e.containerAnimation&&!1!==e.horizontal?Zi:Ji,ft=!Q&&0!==Q,pt=to(e.scroller||co),dt=uo.core.getCache(pt),gt=Jo(pt),mt="fixed"===("pinType"in e?e.pinType:qi(pt,"pinType")||gt&&"fixed"),vt=[e.onEnter,e.onLeave,e.onEnterBack,e.onLeaveBack],_t=ft&&e.toggleActions.split(" "),yt="markers"in e?e.markers:Ds.markers,wt=gt?0:parseFloat(ys(pt)["border"+ht.p2+vs])||0,bt=this,xt=e.onRefreshInit&&function(){return e.onRefreshInit(bt)},Tt=function(t,e,n){var r=n.d,i=n.d2,o=n.a;return(o=qi(t,"getBoundingClientRect"))?function(){return o()[r]}:function(){return(e?co["inner"+i]:t["client"+i])||0}}(pt,gt,ht),Ot=function(t,e){return!e||~Xi.indexOf(t)?ts(t):function(){return sa}}(pt,gt),Mt=0,kt=0,St=eo(pt,ht);if(Bo(bt),bt._dir=ht,et*=45,bt.scroller=pt,bt.scroll=ut?ut.time.bind(ut):St,s=St(),bt.vars=e,n=n||e.animation,"refreshPriority"in e&&(Eo=1,-9999===e.refreshPriority&&(Xo=bt)),dt.tweenScroll=dt.tweenScroll||{top:ca(pt,Ji),left:ca(pt,Zi)},bt.tweenTo=r=dt.tweenScroll[ht.p],bt.scrubDuration=function(t){(I=os(t)&&t)?A?A.duration(t):A=uo.to(n,{ease:"expo",totalProgress:"+=0.001",duration:I,paused:!0,onComplete:function(){return nt&&nt(bt)}}):(A&&A.progress(1).kill(),A=0)},n&&(n.vars.lazy=!1,n._initted||!1!==n.vars.immediateRender&&!1!==e.immediateRender&&n.duration()&&n.render(0,!0,!0),bt.animation=n.pause(),n.scrollTrigger=bt,bt.scrubDuration(Q),D=0,U||(U=n.vars.id)),Rs.push(bt),ot&&(ss(ot)&&!ot.push||(ot={snapTo:ot}),"scrollBehavior"in po.style&&uo.set(gt?[po,fo]:pt,{scrollBehavior:"auto"}),o=is(ot.snapTo)?ot.snapTo:"labels"===ot.snapTo?function(t){return function(e){return uo.utils.snap(Ts(t),e)}}(n):"labelsDirectional"===ot.snapTo?(X=n,function(t,e){return Os(Ts(X))(t,e.direction)}):!1!==ot.directional?function(t,e){return Os(ot.snapTo)(t,Wo()-kt<500?0:e.direction)}:uo.utils.snap(ot.snapTo),L=ot.duration||{min:.1,max:2},L=ss(L)?_o(L.min,L.max):_o(L,L),R=uo.delayedCall(ot.delay||I/2||.1,(function(){var t=St(),e=Wo()-kt<500,i=r.tween;if(!(e||Math.abs(bt.getVelocity())<10)||i||xo||Mt===t)bt.isActive&&Mt!==t&&R.restart(!0);else{var s=(t-u)/g,a=n&&!ft?n.totalProgress():s,c=e?0:(a-P)/(Wo()-yo)*1e3||0,h=uo.utils.clamp(-s,1-s,ls(c/2)*c/.185),f=s+(!1===ot.inertia?0:h),p=_o(0,1,o(f,bt)),d=Math.round(u+p*g),m=ot,v=m.onStart,_=m.onInterrupt,y=m.onComplete;if(t<=l&&t>=u&&d!==t){if(i&&!i._initted&&i.data<=ls(d-t))return;!1===ot.inertia&&(h=p-s),r(d,{duration:L(ls(.185*Math.max(ls(f-a),ls(p-a))/c/.05||0)),ease:ot.ease||"power3",data:ls(d-t),onInterrupt:function(){return R.restart(!0)&&_&&_(bt)},onComplete:function(){bt.update(),Mt=St(),D=P=n&&!ft?n.totalProgress():bt.progress,rt&&rt(bt),y&&y(bt)}},t,h*g,d-t-h*g),v&&v(bt,r.tween)}}})).pause()),U&&(Bs[U]=bt),(Y=($=bt.trigger=to($||Z))&&$._gsap&&$._gsap.stRevert)&&(Y=Y(bt)),Z=!0===Z?$:to(Z),rs(H)&&(H={targets:$,className:H}),Z&&(!1===J||J===ms||(J=!(!J&&"flex"===ys(Z.parentNode).display)&&gs),bt.pin=Z,(i=uo.core.getCache(Z)).spacer?m=i.pinState:(at&&((at=to(at))&&!at.nodeType&&(at=at.current||at.nativeElement),i.spacerIsNative=!!at,at&&(i.spacerState=oa(at))),i.spacer=y=at||ho.createElement("div"),y.classList.add("pin-spacer"),U&&y.classList.add("pin-spacer-"+U),i.pinState=m=oa(Z)),!1!==e.force3D&&uo.set(Z,{force3D:!0}),bt.spacer=y=i.spacer,C=ys(Z),M=C[J+ht.os2],b=uo.getProperty(Z),x=uo.quickSetter(Z,ht.a,_s),na(Z,y,C),_=oa(Z)),yt){d=ss(yt)?ws(yt,Cs):Cs,f=Is("scroller-start",U,pt,ht,d,0),p=Is("scroller-end",U,pt,ht,d,0,f),w=f["offset"+ht.op.d2];var Et=to(qi(pt,"content")||pt);c=this.markerStart=Is("start",U,Et,ht,d,w,0,ut),h=this.markerEnd=Is("end",U,Et,ht,d,w,0,ut),ut&&(N=uo.quickSetter([c,h],ht.a,_s)),mt||Xi.length&&!0===qi(pt,"fixedMarkers")||(W=ys(F=gt?po:pt).position,F.style.position="absolute"===W||"fixed"===W?W:"relative",uo.set([f,p],{force3D:!0}),S=uo.quickSetter(f,ht.a,_s),E=uo.quickSetter(p,ht.a,_s))}if(ut){var Ct=ut.vars.onUpdate,Dt=ut.vars.onUpdateParams;ut.eventCallback("onUpdate",(function(){bt.update(0,0,1),Ct&&Ct.apply(Dt||[])}))}bt.previous=function(){return Rs[Rs.indexOf(bt)-1]},bt.next=function(){return Rs[Rs.indexOf(bt)+1]},bt.revert=function(t,e){if(!e)return bt.kill(!0);var r=!1!==t||!bt.enabled,i=bo;r!==bt.isReverted&&(r&&(z=Math.max(St(),bt.scroll.rec||0),B=bt.progress,V=n&&n.progress()),c&&[c,h,f,p].forEach((function(t){return t.style.display=r?"none":"block"})),r&&(bo=1),bt.update(r),bo=i,Z&&(r?function(t,e,n){ia(n);var r=t._gsap;if(r.spacerIsNative)ia(r.spacerState);else if(t._gsap.swappedIn){var i=e.parentNode;i&&(i.insertBefore(t,e),i.removeChild(e))}t._gsap.swappedIn=!1}(Z,y,m):(!st||!bt.isActive)&&na(Z,y,ys(Z),k)),bt.isReverted=r)},bt.refresh=function(i,o){if(!bo&&bt.enabled||o)if(Z&&i&&jo)ks(t,"scrollEnd",Ws);else{!Yo&&xt&&xt(bt),bo=1,kt=Wo(),r.tween&&(r.tween.kill(),r.tween=0),A&&A.pause(),tt&&n&&n.revert({kill:!1}).invalidate(),bt.isReverted||bt.revert(!0,!0);for(var d,w,x,M,S,E,C,D,P,I,L=Tt(),N=Ot(),Y=ut?ut.duration():es(pt,ht),X=0,F=0,W=e.end,q=e.endTrigger||$,j=e.start||(0!==e.start&&$?Z?"0 0":"0 100%":0),H=bt.pinnedContainer=e.pinnedContainer&&to(e.pinnedContainer),U=$&&Math.max(0,Rs.indexOf(bt))||0,K=U;K--;)(E=Rs[K]).end||E.refresh(0,1)||(bo=1),!(C=E.pin)||C!==$&&C!==Z||E.isReverted||(I||(I=[]),I.unshift(E),E.revert(!0,!0)),E!==Rs[K]&&(U--,K--);for(is(j)&&(j=j(bt)),u=aa(j,$,L,ht,St(),c,f,bt,N,wt,mt,Y,ut)||(Z?-.001:0),is(W)&&(W=W(bt)),rs(W)&&!W.indexOf("+=")&&(~W.indexOf(" ")?W=(rs(j)?j.split(" ")[0]:"")+W:(X=As(W.substr(2),L),W=rs(j)?j:u+X,q=$)),l=Math.max(u,aa(W||(q?"100% 0":Y),q,L,ht,St()+X,h,p,bt,N,wt,mt,Y,ut))||-.001,g=l-u||(u-=.01)&&.001,X=0,K=U;K--;)(C=(E=Rs[K]).pin)&&E.start-E._pinPush0&&(d=E.end-E.start,C!==$&&C!==H||os(j)||(X+=d*(1-E.progress)),C===Z&&(F+=d));if(u+=X,l+=X,bt._pinPush=F,c&&X&&((d={})[ht.a]="+="+X,H&&(d[ht.p]="-="+St()),uo.set([c,h],d)),Z)d=ys(Z),M=ht===Ji,x=St(),T=parseFloat(b(ht.a))+F,!Y&&l>1&&((gt?po:pt).style["overflow-"+ht.a]="scroll"),na(Z,y,d),_=oa(Z),w=bs(Z,!0),D=mt&&eo(pt,M?Zi:Ji)(),J&&((k=[J+ht.os2,g+F+_s]).t=y,(K=J===gs?xs(Z,ht)+g+F:0)&&k.push(ht.d,K+_s),ia(k),mt&&St(z)),mt&&((S={top:w.top+(M?x-u:D)+_s,left:w.left+(M?D:x-u)+_s,boxSizing:"border-box",position:"fixed"}).width=S.maxWidth=Math.ceil(w.width)+_s,S.height=S.maxHeight=Math.ceil(w.height)+_s,S.margin=S.marginTop=S.marginRight=S.marginBottom=S.marginLeft="0",S.padding=d.padding,S.paddingTop=d.paddingTop,S.paddingRight=d.paddingRight,S.paddingBottom=d.paddingBottom,S.paddingLeft=d.paddingLeft,v=function(t,e,n){for(var r,i=[],o=t.length,s=n?8:0;s0?Rs.slice(0,e).reverse():Rs.slice(e+1);return(rs(t)?n.filter((function(e){return e.vars.preventOverlaps===t})):n).filter((function(t){return bt.direction>0?t.end<=u:t.start>=l}))},bt.update=function(t,e,i){if(!ut||i||t){var o,c,h,p,d,m,w,b=Yo?z:bt.scroll(),k=t?0:(b-u)/g,C=k<0?0:k>1?1:k||0,I=bt.progress;if(e&&(a=s,s=ut?St():b,ot&&(P=D,D=n&&!ft?n.totalProgress():C)),et&&!C&&Z&&!bo&&!Fo&&jo&&uI?1:-1,bt.progress=C,p&&!bo&&(c=C&&!I?0:1===C?1:1===I?2:3,ft&&(h=!d&&"none"!==_t[c+1]&&_t[c+1]||_t[c],w=n&&("complete"===h||"reset"===h||h in n))),ct&&(d||w)&&(w||Q||!n)&&(is(ct)?ct(bt):bt.getTrailing(ct).forEach((function(t){return t.endAnimation()}))),ft||(!A||bo||Fo?n&&n.totalProgress(C,!!bo):((ut||Xo&&Xo!==bt)&&A.render(A._dp._time-A._start),A.resetTo?A.resetTo("totalProgress",C,n._tTime/n._tDur):(A.vars.totalProgress=C,A.invalidate().restart()))),Z)if(t&&J&&(y.style[J+ht.os2]=M),mt){if(p){if(m=!t&&C>I&&l+1>b&&b+1>=es(pt,ht),st)if(t||!o&&!m)la(Z,y);else{var L=bs(Z,!0),B=b-u;la(Z,po,L.top+(ht===Ji?B:0)+_s,L.left+(ht===Ji?0:B)+_s)}ia(o||m?v:_),O!==g&&C<1&&o||x(T+(1!==C||m?0:O))}}else x(Qo(T+O*C));ot&&!r.tween&&!bo&&!Fo&&R.restart(!0),H&&(d||it&&C&&(C<1||!Vo))&&vo(H.targets).forEach((function(t){return t.classList[o||it?"add":"remove"](H.className)})),j&&!ft&&!t&&j(bt),p&&!bo?(ft&&(w&&("complete"===h?n.pause().totalProgress(1):"reset"===h?n.restart(!0).pause():"restart"===h?n.restart(!0):n[h]()),j&&j(bt)),!d&&Vo||(K&&d&&us(bt,K),vt[c]&&us(bt,vt[c]),it&&(1===C?bt.kill(!1,1):vt[c]=0),d||vt[c=1===C?1:3]&&us(bt,vt[c])),lt&&!o&&Math.abs(bt.getVelocity())>(os(lt)?lt:2500)&&(as(bt.callbackAnimation),A?A.progress(1):as(n,"reverse"===h?1:!C,1))):ft&&j&&!bo&&j(bt)}if(E){var V=ut?b/ut.duration()*(ut._caScrollDist||0):b;S(V+(f._isFlipped?1:0)),E(V)}N&&N(-b/ut.duration()*(ut._caScrollDist||0))}},bt.enable=function(e,n){bt.enabled||(bt.enabled=!0,ks(pt,"resize",Ys),ks(gt?ho:pt,"scroll",Vs),xt&&ks(t,"refreshInit",xt),!1!==e&&(bt.progress=B=0,s=a=Mt=St()),!1!==n&&bt.refresh())},bt.getTween=function(t){return t&&r?r.tween:A},bt.setPositions=function(t,e){Z&&(T+=t-u,O+=e-t-g),bt.start=u=t,bt.end=l=e,g=e-t,bt.update()},bt.disable=function(e,n){if(bt.enabled&&(!1!==e&&bt.revert(!0,!0),bt.enabled=bt.isActive=!1,n||A&&A.pause(),z=0,i&&(i.uncache=1),xt&&Ss(t,"refreshInit",xt),R&&(R.pause(),r.tween&&r.tween.kill()&&(r.tween=0)),!gt)){for(var o=Rs.length;o--;)if(Rs[o].scroller===pt&&Rs[o]!==bt)return;Ss(pt,"resize",Ys),Ss(pt,"scroll",Vs)}},bt.kill=function(t,r){bt.disable(t,r),A&&!r&&A.kill(),U&&delete Bs[U];var o=Rs.indexOf(bt);o>=0&&Rs.splice(o,1),o===Oo&&Zs>0&&Oo--,o=0,Rs.forEach((function(t){return t.scroller===bt.scroller&&(o=1)})),o||Yo||(bt.scroll.rec=0),n&&(n.scrollTrigger=null,t&&n.revert({kill:!1}),r||n.kill()),c&&[c,h,f,p].forEach((function(t){return t.parentNode&&t.parentNode.removeChild(t)})),Xo===bt&&(Xo=0),Z&&(i&&(i.uncache=1),o=0,Rs.forEach((function(t){return t.pin===Z&&o++})),o||(i.spacer=0)),e.onKill&&e.onKill(bt)},bt.enable(!1,!1),Y&&Y(bt),n&&n.add&&!g?uo.delayedCall(.01,(function(){return u||l||bt.refresh()}))&&(g=.01)&&(u=l=0):bt.refresh()}else this.update=this.refresh=this.kill=Go},t.register=function(e){return lo||(uo=e||Zo(),$o()&&window.document&&t.enable(),lo=Ho),lo},t.defaults=function(t){if(t)for(var e in t)Ds[e]=t[e];return Ds},t.disable=function(t,e){Ho=0,Rs.forEach((function(n){return n[e?"kill":"disable"](t)})),Ss(co,"wheel",Vs),Ss(ho,"scroll",Vs),clearInterval(wo),Ss(ho,"touchcancel",Go),Ss(po,"touchstart",Go),Ms(Ss,ho,"pointerdown,touchstart,mousedown",Uo),Ms(Ss,ho,"pointerup,touchend,mouseup",Ko),mo.kill(),ns(Ss);for(var n=0;n0&&r.left+i0&&r.top+i=0&&js.splice(e,5),js.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),uo.core.getCache(t),Bo())}})):js},ha.revert=function(t,e){return Us(!t,e)},ha.create=function(t,e){return new ha(t,e)},ha.refresh=function(t){return t?Ys():(lo||ha.register())&&Qs(!0)},ha.update=Js,ha.clearScrollMemory=Ks,ha.maxScroll=function(t,e){return es(t,e?Zi:Ji)},ha.getScrollFunc=function(t,e){return eo(to(t),e?Zi:Ji)},ha.getById=function(t){return Bs[t]},ha.getAll=function(){return Rs.filter((function(t){return"ScrollSmoother"!==t.vars.id}))},ha.isScrolling=function(){return!!jo},ha.snapDirectional=Os,ha.addEventListener=function(t,e){var n=Xs[t]||(Xs[t]=[]);~n.indexOf(e)||n.push(e)},ha.removeEventListener=function(t,e){var n=Xs[t],r=n&&n.indexOf(e);r>=0&&n.splice(r,1)},ha.batch=function(t,e){var n,r=[],i={},o=e.interval||.016,s=e.batchMax||1e9,a=function(t,e){var n=[],r=[],i=uo.delayedCall(o,(function(){e(n,r),n=[],r=[]})).pause();return function(t){n.length||i.restart(!0),n.push(t.trigger),r.push(t),s<=n.length&&i.progress(1)}};for(n in e)i[n]="on"===n.substr(0,2)&&is(e[n])&&"onRefreshInit"!==n?a(0,e[n]):e[n];return is(s)&&(s=s(),ks(ha,"refresh",(function(){return s=e.batchMax()}))),vo(t).forEach((function(t){var e={};for(n in i)e[n]=i[n];e.trigger=t,r.push(ha.create(e))})),r};var fa,pa=function(t,e,n,r){return e>r?t(r):e<0&&t(0),n>r?(r-e)/(n-e):n<0?e/(e-n):1},da=function t(e,n){!0===n?e.style.removeProperty("touch-action"):e.style.touchAction=!0===n?"auto":n?"pan-"+n+(ao.isTouch?" pinch-zoom":""):"none",e===fo&&t(po,n)},ga={auto:1,scroll:1},ma=function(t){var e,n=t.event,r=t.target,i=t.axis,o=(n.changedTouches?n.changedTouches[0]:n).target,s=o._gsap||uo.core.getCache(o),a=Wo();if(!s._isScrollT||a-s._isScrollT>2e3){for(;o&&o.scrollHeight<=o.clientHeight;)o=o.parentNode;s._isScroll=o&&!Jo(o)&&o!==r&&(ga[(e=ys(o)).overflowY]||ga[e.overflowX]),s._isScrollT=a}(s._isScroll||"x"===i)&&(n.stopPropagation(),n._gsapAllow=!0)},va=function(t,e,n,r){return ao.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:r=r&&ma,onPress:r,onDrag:r,onScroll:r,onEnable:function(){return n&&ks(ho,ao.eventTypes[0],ya,!1,!0)},onDisable:function(){return Ss(ho,ao.eventTypes[0],ya,!0)}})},_a=/(input|label|select|textarea)/i,ya=function(t){var e=_a.test(t.target.tagName);(e||fa)&&(t._gsapAllow=!0,fa=e)},wa=function(t){ss(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var e,n,r,i,o,s,a,u,l=t,c=l.normalizeScrollX,h=l.momentum,f=l.allowNestedScroll,p=to(t.target)||fo,d=uo.core.globals().ScrollSmoother,g=d&&d.get(),m=Ro&&(t.content&&to(t.content)||g&&!1!==t.content&&!g.smooth()&&g.content()),v=eo(p,Ji),_=eo(p,Zi),y=1,w=(ao.isTouch&&co.visualViewport?co.visualViewport.scale*co.visualViewport.width:co.outerWidth)/co.innerWidth,b=0,x=is(h)?function(){return h(e)}:function(){return h||2.8},T=va(p,t.type,!0,f),O=function(){return i=!1},M=Go,k=Go,S=function(){n=es(p,Ji),k=_o(Ro?1:0,n),c&&(M=_o(0,es(p,Zi))),r=Gs},E=function(){m._gsap.y=Qo(parseFloat(m._gsap.y)+v.offset)+"px",m.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(m._gsap.y)+", 0, 1)",v.offset=v.cacheID=0},C=function(){S(),o.isActive()&&o.vars.scrollY>n&&(v()>n?o.progress(1)&&v(n):o.resetTo("scrollY",n))};return m&&uo.set(m,{y:"+=0"}),t.ignoreCheck=function(t){return Ro&&"touchmove"===t.type&&function(){if(i){requestAnimationFrame(O);var t=Qo(e.deltaY/2),n=k(v.v-t);if(m&&n!==v.v+v.offset){v.offset=n-v.v;var r=Qo((parseFloat(m&&m._gsap.y)||0)-v.offset);m.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+r+", 0, 1)",m._gsap.y=r+"px",v.cacheID=Yi.cache,Js()}return!0}v.offset&&E(),i=!0}()||y>1.05&&"touchstart"!==t.type||e.isGesturing||t.touches&&t.touches.length>1},t.onPress=function(){var t=y;y=Qo((co.visualViewport&&co.visualViewport.scale||1)/w),o.pause(),t!==y&&da(p,y>1.01||!c&&"x"),s=_(),a=v(),S(),r=Gs},t.onRelease=t.onGestureStart=function(t,e){if(v.offset&&E(),e){Yi.cache++;var r,i,s=x();c&&(i=(r=_())+.05*s*-t.velocityX/.227,s*=pa(_,r,i,es(p,Zi)),o.vars.scrollX=M(i)),i=(r=v())+.05*s*-t.velocityY/.227,s*=pa(v,r,i,es(p,Ji)),o.vars.scrollY=k(i),o.invalidate().duration(s).play(.01),(Ro&&o.vars.scrollY>=n||r>=n-1)&&uo.to({},{onUpdate:C,duration:s})}else u.restart(!0)},t.onWheel=function(){o._ts&&o.pause(),Wo()-b>1e3&&(r=0,b=Wo())},t.onChange=function(t,e,n,i,o){if(Gs!==r&&S(),e&&c&&_(M(i[2]===e?s+(t.startX-t.x):_()+e-i[1])),n){v.offset&&E();var u=o[2]===n,l=u?a+t.startY-t.y:v()+n-o[1],h=k(l);u&&l!==h&&(a+=h-l),v(h)}(n||e)&&Js()},t.onEnable=function(){da(p,!c&&"x"),ha.addEventListener("refresh",C),ks(co,"resize",C),v.smooth&&(v.target.style.scrollBehavior="auto",v.smooth=_.smooth=!1),T.enable()},t.onDisable=function(){da(p,!0),Ss(co,"resize",C),ha.removeEventListener("refresh",C),T.kill()},t.lockAxis=!1!==t.lockAxis,(e=new ao(t)).iOS=Ro,Ro&&!v()&&v(1),Ro&&uo.ticker.add(Go),u=e._dc,o=uo.to(e,{ease:"power4",paused:!0,scrollX:c?"+=0.1":"+=0",scrollY:"+=0.1",onComplete:u.vars.onComplete}),e};ha.sort=function(t){return Rs.sort(t||function(t,e){return-1e6*(t.vars.refreshPriority||0)+t.start-(e.start+-1e6*(e.vars.refreshPriority||0))})},ha.observe=function(t){return new ao(t)},ha.normalizeScroll=function(t){if(void 0===t)return Po;if(!0===t&&Po)return Po.enable();if(!1===t)return Po&&Po.kill();var e=t instanceof ao?t:wa(t);return Po&&Po.target===e.target&&Po.kill(),Jo(e.target)&&(Po=e),e},ha.core={_getVelocityProp:no,_inputObserver:va,_scrollers:Yi,_proxies:Xi,bridge:{ss:function(){jo||qs("scrollStart"),jo=Wo()},ref:function(){return bo}}},Zo()&&uo.registerPlugin(ha);
25 | /*!
26 | * matrix 3.11.2
27 | * https://greensock.com
28 | *
29 | * Copyright 2008-2022, GreenSock. All rights reserved.
30 | * Subject to the terms at https://greensock.com/standard-license or for
31 | * Club GreenSock members, the agreement issued with that membership.
32 | * @author: Jack Doyle, jack@greensock.com
33 | */var ba,xa,Ta,Oa,Ma,ka,Sa,Ea,Ca,Da="transform",Pa=Da+"Origin",Aa=function(t){var e=t.ownerDocument||t;!(Da in t.style)&&"msTransform"in t.style&&(Pa=(Da="msTransform")+"Origin");for(;e.parentNode&&(e=e.parentNode););if(xa=window,Sa=new Wa,e){ba=e,Ta=e.documentElement,Oa=e.body,(Ea=ba.createElementNS("http://www.w3.org/2000/svg","g")).style.transform="none";var n=e.createElement("div"),r=e.createElement("div");Oa.appendChild(n),n.appendChild(r),n.style.position="static",n.style[Da]="translate3d(0,0,1px)",Ca=r.offsetParent!==n,Oa.removeChild(n)}return e},Ia=[],La=[],Ra=function(){return xa.pageYOffset||ba.scrollTop||Ta.scrollTop||Oa.scrollTop||0},Ba=function(){return xa.pageXOffset||ba.scrollLeft||Ta.scrollLeft||Oa.scrollLeft||0},za=function(t){return t.ownerSVGElement||("svg"===(t.tagName+"").toLowerCase()?t:null)},Va=function t(e){return"fixed"===xa.getComputedStyle(e).position||((e=e.parentNode)&&1===e.nodeType?t(e):void 0)},Na=function t(e,n){if(e.parentNode&&(ba||Aa(e))){var r=za(e),i=r?r.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o=r?n?"rect":"g":"div",s=2!==n?0:100,a=3===n?100:0,u="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",l=ba.createElementNS?ba.createElementNS(i.replace(/^https/,"http"),o):ba.createElement(o);return n&&(r?(ka||(ka=t(e)),l.setAttribute("width",.01),l.setAttribute("height",.01),l.setAttribute("transform","translate("+s+","+a+")"),ka.appendChild(l)):(Ma||((Ma=t(e)).style.cssText=u),l.style.cssText=u+"width:0.1px;height:0.1px;top:"+a+"px;left:"+s+"px",Ma.appendChild(l))),l}throw"Need document and parent."},Ya=function(t){var e,n=t.getCTM();return n||(e=t.style[Da],t.style[Da]="none",t.appendChild(Ea),n=Ea.getCTM(),t.removeChild(Ea),e?t.style[Da]=e:t.style.removeProperty(Da.replace(/([A-Z])/g,"-$1").toLowerCase())),n||Sa.clone()},Xa=function(t,e){var n,r,i,o,s,a,u=za(t),l=t===u,c=u?Ia:La,h=t.parentNode;if(t===xa)return t;if(c.length||c.push(Na(t,1),Na(t,2),Na(t,3)),n=u?ka:Ma,u)l?(o=-(i=Ya(t)).e/i.a,s=-i.f/i.d,r=Sa):t.getBBox?(i=t.getBBox(),r=(r=t.transform?t.transform.baseVal:{}).numberOfItems?r.numberOfItems>1?function(t){for(var e=new Wa,n=0;n4&&(o=i.offsetLeft,s=i.offsetTop,i=0);if("absolute"!==(a=xa.getComputedStyle(t)).position&&"fixed"!==a.position)for(r=t.offsetParent;h&&h!==r;)o+=h.scrollLeft||0,s+=h.scrollTop||0,h=h.parentNode;(i=n.style).top=t.offsetTop-s+"px",i.left=t.offsetLeft-o+"px",i[Da]=a[Da],i[Pa]=a[Pa],i.position="fixed"===a.position?"fixed":"absolute",t.parentNode.appendChild(n)}return n},Fa=function(t,e,n,r,i,o,s){return t.a=e,t.b=n,t.c=r,t.d=i,t.e=o,t.f=s,t},Wa=function(){function t(t,e,n,r,i,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),Fa(this,t,e,n,r,i,o)}var e=t.prototype;return e.inverse=function(){var t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,o=this.f,s=t*r-e*n||1e-10;return Fa(this,r/s,-e/s,-n/s,t/s,(n*o-r*i)/s,-(t*o-e*i)/s)},e.multiply=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,o=this.e,s=this.f,a=t.a,u=t.c,l=t.b,c=t.d,h=t.e,f=t.f;return Fa(this,a*e+l*r,a*n+l*i,u*e+c*r,u*n+c*i,o+h*e+f*r,s+h*n+f*i)},e.clone=function(){return new t(this.a,this.b,this.c,this.d,this.e,this.f)},e.equals=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,o=this.e,s=this.f;return e===t.a&&n===t.b&&r===t.c&&i===t.d&&o===t.e&&s===t.f},e.apply=function(t,e){void 0===e&&(e={});var n=t.x,r=t.y,i=this.a,o=this.b,s=this.c,a=this.d,u=this.e,l=this.f;return e.x=n*i+r*s+u||0,e.y=n*o+r*a+l||0,e},t}();function qa(t,e,n,r){if(!t||!t.parentNode||(ba||Aa(t)).documentElement===t)return new Wa;var i=function(t){for(var e,n;t&&t!==Oa;)(n=t._gsap)&&n.uncache&&n.get(t,"x"),n&&!n.scaleX&&!n.scaleY&&n.renderTransform&&(n.scaleX=n.scaleY=1e-4,n.renderTransform(1,n),e?e.push(n):e=[n]),t=t.parentNode;return e}(t),o=za(t)?Ia:La,s=Xa(t,n),a=o[0].getBoundingClientRect(),u=o[1].getBoundingClientRect(),l=o[2].getBoundingClientRect(),c=s.parentNode,h=!r&&Va(t),f=new Wa((u.left-a.left)/100,(u.top-a.top)/100,(l.left-a.left)/100,(l.top-a.top)/100,a.left+(h?0:Ba()),a.top+(h?0:Ra()));if(c.removeChild(s),i)for(a=i.length;a--;)(u=i[a]).scaleX=u.scaleY=0,u.renderTransform(1,u);return e?f.inverse():f}var ja,Ha,Ua,Ka,Ga,Qa,$a,Za=1,Ja=function(t,e){return t.actions.forEach((function(t){return t.vars[e]&&t.vars[e](t)}))},tu={},eu=180/Math.PI,nu=Math.PI/180,ru={},iu={},ou={},su=function(t){return"string"==typeof t?t.split(" ").join("").split(","):t},au=su("onStart,onUpdate,onComplete,onReverseComplete,onInterrupt"),uu=su("transform,transformOrigin,width,height,position,top,left,opacity,zIndex,maxWidth,maxHeight,minWidth,minHeight"),lu=function(t){return ja(t)[0]||console.warn("Element not found:",t)},cu=function(t){return Math.round(1e4*t)/1e4||0},hu=function(t,e,n){return t.forEach((function(t){return t.classList[n](e)}))},fu={zIndex:1,kill:1,simple:1,spin:1,clearProps:1,targets:1,toggleClass:1,onComplete:1,onUpdate:1,onInterrupt:1,onStart:1,delay:1,repeat:1,repeatDelay:1,yoyo:1,scale:1,fade:1,absolute:1,props:1,onEnter:1,onLeave:1,custom:1,paused:1,nested:1,prune:1,absoluteOnLeave:1},pu={zIndex:1,simple:1,clearProps:1,scale:1,absolute:1,fitChild:1,getVars:1,props:1},du=function(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()},gu=function(t,e){var n,r={};for(n in t)e[n]||(r[n]=t[n]);return r},mu={},vu=function(t){var e=mu[t]=su(t);return ou[t]=e.concat(uu),e},_u=function t(e,n,r){void 0===r&&(r=0);for(var i=e.parentNode,o=1e3*Math.pow(10,r)*(n?-1:1),s=n?900*-o:0;e;)s+=o,e=e.previousSibling;return i?s+t(i,n,r+1):s},yu=function(t,e,n){return t.forEach((function(t){return t.d=_u(n?t.element:t.t,e)})),t.sort((function(t,e){return t.d-e.d})),t},wu=function(t,e){for(var n,r,i=t.element.style,o=t.css=t.css||[],s=e.length;s--;)r=i[n=e[s]]||i.getPropertyValue(n),o.push(r?n:iu[n]||(iu[n]=du(n)),r);return i},bu=function(t){var e=t.css,n=t.element.style,r=0;for(t.cache.uncache=1;r0&&R&&(u.style.opacity=G?m.opacity-v.opacity:"0"),Pu(m,v,L,N)):v.isVisible!==m.isVisible&&(v.isVisible?m.isVisible||(v.css=m.css,q.push(v),j.splice(a--,1),T&&A&&Pu(m,v,L,N)):(m.isVisible&&W.push(m),j.splice(a--,1))),L||(u.style.maxWidth=Math.max(m.width,v.width)+"px",u.style.maxHeight=Math.max(m.height,v.height)+"px",u.style.minWidth=Math.min(m.width,v.width)+"px",u.style.minHeight=Math.min(m.height,v.height)+"px"),A&&P&&u.classList.add(P)):j.splice(a--,1),f.push(m);var e;if(P&&(e=f.map((function(t){return t.element})),A&&e.forEach((function(t){return t.classList.remove(P)}))),Bu(!1),L?(Y.scaleX=function(t){return j[t].a.scaleX},Y.scaleY=function(t){return j[t].a.scaleY}):(Y.width=function(t){return j[t].a.width+"px"},Y.height=function(t){return j[t].a.height+"px"},Y.autoRound=n.autoRound||!1),Y.x=function(t){return j[t].a.x+"px"},Y.y=function(t){return j[t].a.y+"px"},Y.rotation=function(t){return j[t].a.rotation+(z?360*K(t,h[t],h):0)},Y.skewX=function(t){return j[t].a.skewX},h=j.map((function(t){return t.t})),(I||0===I)&&(Y.modifiers={zIndex:function(){return I}},Y.zIndex=I,Y.immediateRender=!1!==n.immediateRender),R&&(Y.opacity=function(t){return j[t].sd<0?0:j[t].sd>0?j[t].a.opacity:"+=0"}),H.length){B=Ha.utils.distribute(B);var r=h.slice(H.length);Y.stagger=function(t,e){return B(~H.indexOf(e)?h.indexOf(j[t].swap.t):t,e,r)}}if(au.forEach((function(t){return n[t]&&X.eventCallback(t,n[t],n[t+"Params"])})),M&&h.length)for(o in F=gu(Y,fu),"scale"in M&&(M.scaleX=M.scaleY=M.scale,delete M.scale),M)(i=gu(M[o],pu))[o]=Y[o],!("duration"in i)&&"duration"in Y&&(i.duration=Y.duration),i.stagger=Y.stagger,Q.call(X,h,i,0),delete F[o];(h.length||q.length||W.length)&&(P&&X.add((function(){return hu(e,P,X._zTime<0?"remove":"add")}),0)&&!S&&hu(e,P,"add"),h.length&&Q.call(X,h,F,0)),Du(b,W,X),Du(x,q,X);var p=Ua&&Ua.timeline;p&&(p.add(X,0),Ua._final.push((function(){return xu(j,!w)}))),s=X.duration(),X.call((function(){var t=X.time()>=s;t&&!p&&xu(j,!w),P&&hu(e,P,t?"remove":"add")}))},O&&(T=j.filter((function(t){return!t.sd&&!t.a.isVisible&&t.b.isVisible})).map((function(t){return t.a.element}))),Ua)?(T&&(_=Ua._abs).push.apply(_,Mu(j,T)),Ua._run.push(g)):(T&&ku(Mu(j,T)),g());var $=Ua?Ua.timeline:X;return $.revert=function(){return Nu($,1)},$},Vu=function t(e){e.vars.onInterrupt&&e.vars.onInterrupt.apply(e,e.vars.onInterruptParams||[]),e.getChildren(!0,!1,!0).forEach(t)},Nu=function(t,e){if(t&&t.progress()<1&&!t.paused())return e&&(Vu(t),e<2&&t.progress(1),t.kill()),!0},Yu=function(t){for(var e,n=t.idLookup={},r=t.alt={},i=t.elementStates,o=i.length;o--;)n[(e=i[o]).id]?r[e.id]=e:n[e.id]=e},Xu=function(){function t(t,e,n){if(this.props=e&&e.props,this.simple=!(!e||!e.simple),n)this.targets=Cu(t),this.elementStates=t,Yu(this);else{this.targets=ja(t);var r=e&&(!1===e.kill||e.batch&&!e.kill);Ua&&!r&&Ua._kill.push(this),this.update(r||!!Ua)}}var e=t.prototype;return e.update=function(t){var e=this;return this.elementStates=this.targets.map((function(t){return new Fu(t,e.props,e.simple)})),Yu(this),this.interrupt(t),this.recordInlineStyles(),this},e.clear=function(){return this.targets.length=this.elementStates.length=0,Yu(this),this},e.fit=function(t,e,n){for(var r,i,o=yu(this.elementStates.slice(0),!1,!0),s=(t||this).idLookup,a=0;a=0&&this.actions.splice(e,1),this},e.getState=function(t){var e=this,n=Ua,r=Ka;return Ua=this,this.state.clear(),this._kill.length=0,this.actions.forEach((function(n){n.vars.getState&&(n.states.length=0,Ka=n,n.state=n.vars.getState(n)),t&&n.states.forEach((function(t){return e.state.add(t)}))})),Ka=r,Ua=n,this.killConflicts(),this},e.animate=function(){var t,e,n=this,r=Ua,i=this.timeline,o=this.actions.length;for(Ua=this,i.clear(),this._abs.length=this._final.length=this._run.length=0,this.actions.forEach((function(t){t.vars.animate&&t.vars.animate(t);var e,n,r=t.vars.onEnter,i=t.vars.onLeave,o=t.targets;o&&o.length&&(r||i)&&(e=new Xu,t.states.forEach((function(t){return e.add(t)})),(n=e.compare(ju.getState(o))).enter.length&&r&&r(n.enter),n.leave.length&&i&&i(n.leave))})),ku(this._abs),this._run.forEach((function(t){return t()})),e=i.duration(),t=this._final.slice(0),i.add((function(){e<=i.time()&&(t.forEach((function(t){return t()})),Ja(n,"onComplete"))})),Ua=r;o--;)this.actions[o].vars.once&&this.actions[o].kill();return Ja(this,"onStart"),i.restart(),this},e.loadState=function(t){t||(t=function(){return 0});var e=[];return this.actions.forEach((function(n){if(n.vars.loadState){var r,i=function i(o){o&&(n.targets=o),~(r=e.indexOf(i))&&(e.splice(r,1),e.length||t())};e.push(i),n.vars.loadState(i)}})),e.length||t(),this},e.setState=function(){return this.actions.forEach((function(t){return t.targets=t.vars.setState&&t.vars.setState(t)})),this},e.killConflicts=function(t){return this.state.interrupt(t),this._kill.forEach((function(e){return e.interrupt(t)})),this},e.run=function(t,e){var n=this;return this!==Ua&&(t||this.getState(e),this.loadState((function(){n._killed||(n.setState(),n.animate())}))),this},e.clear=function(t){this.state.clear(),t||(this.actions.length=0)},e.getStateById=function(t){for(var e,n=this.actions.length;n--;)if(e=this.actions[n].getStateById(t))return e;return this.state.idLookup[t]&&this.state},e.kill=function(){this._killed=1,this.clear(),delete tu[this.id]},t}(),ju=function(){function t(){}return t.getState=function(e,n){var r=Au(e,n);return Ka&&Ka.states.push(r),n&&n.batch&&t.batch(n.batch).state.add(r),r},t.from=function(t,e){return"clearProps"in(e=e||{})||(e.clearProps=!0),zu(t,Au(e.targets||t.targets,{props:e.props||t.props,simple:e.simple,kill:!!e.kill}),e,-1)},t.to=function(t,e){return zu(t,Au(e.targets||t.targets,{props:e.props||t.props,simple:e.simple,kill:!!e.kill}),e,1)},t.fromTo=function(t,e,n){return zu(t,e,n)},t.fit=function(t,e,n){var r=n?gu(n,pu):{},i=n||r,o=i.absolute,s=i.scale,a=i.getVars,u=i.props,l=i.runBackwards,c=i.onComplete,h=i.simple,f=n&&n.fitChild&&lu(n.fitChild),p=Su(e,u,h,t),d=Su(t,0,h,p),g=u?ou[u]:uu;return u&&Eu(r,p.props),l&&(wu(d,g),"immediateRender"in r||(r.immediateRender=!0),r.onComplete=function(){bu(d),c&&c.apply(this,arguments)}),o&&Ou(d,p),r=Pu(d,p,s||f,u,f,r.duration||a?r:0),a?r:r.duration?Ha.to(d.element,r):null},t.makeAbsolute=function(t,e){return(t instanceof Xu?t:new Xu(t,e)).makeAbsolute()},t.batch=function(t){return t||(t="default"),tu[t]||(tu[t]=new qu(t))},t.killFlipsOf=function(t,e){(t instanceof Xu?t.targets:ja(t)).forEach((function(t){return t&&Nu(t._flip,!1!==e?1:2)}))},t.isFlipping=function(e){var n=t.getByTarget(e);return!!n&&n.isActive()},t.getByTarget=function(t){return(lu(t)||ru)._flip},t.getElementState=function(t,e){return new Fu(lu(t),e)},t.convertCoordinates=function(t,e,n){var r=qa(e,!0,!0).multiply(qa(t));return n?r.apply(n):r},t.register=function(t){if(Ga="undefined"!=typeof document&&document.body){Ha=t,Aa(Ga),ja=Ha.utils.toArray;var e=Ha.utils.snap(.1);Qa=function(t,n){return e(parseFloat(t)+n)}}},t}();ju.version="3.11.2","undefined"!=typeof window&&window.gsap&&window.gsap.registerPlugin(ju),Ti.registerPlugin(ha),Ti.registerPlugin(ju);const Hu=[];[...document.querySelectorAll(".item")].forEach((t=>{Hu.push(new u(t))}));const Uu={grid:document.querySelector(".switch__button--grid"),list:document.querySelector(".switch__button--list")},Ku={el:document.querySelector(".heading"),main:document.querySelector(".heading .heading__main")},Gu=document.querySelector(".grid");let Qu;const $u=()=>{const t=Hu.filter((t=>{return e=t.DOM.el,((n=e.getBoundingClientRect()).bottom>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)||n.top>=0&&n.top<=(window.innerHeight||document.documentElement.clientHeight))&&(n.right>=0&&n.right<=(window.innerWidth||document.documentElement.clientWidth)||n.left>=0&&n.left<=(window.innerWidth||document.documentElement.clientWidth));var e,n})),e=Hu.filter((e=>!t.includes(e)));return{allImages:Hu.map((t=>t.DOM.image)),allImagesInner:Hu.map((t=>t.DOM.imageInner)),inViewportItems:t,outViewportItems:e,inViewportImagesInner:t.map((t=>t.DOM.imageInner)),outViewportImagesInner:e.map((t=>t.DOM.imageInner)),inViewportDescription:t.map((t=>t.DOM.description)),outViewportDescription:e.map((t=>t.DOM.description)),inViewportTitlesInner:t.map((t=>t.DOM.titleInner)),outViewportTitlesInner:e.map((t=>t.DOM.titleInner)),inViewportNumbersInner:t.map((t=>t.DOM.numberInner)),outViewportNumbersInner:e.map((t=>t.DOM.numberInner))}},Zu=()=>{Uu.grid.addEventListener("click",(()=>{Uu.grid.classList.add("switch__button--hidden","switch__button--current"),Uu.list.classList.remove("switch__button--hidden","switch__button--current"),(()=>{document.body.classList.add("grid-open"),Qu.stop();const t=$u();let e=ha.getAll();for(let t=0;t{Uu.list.classList.add("switch__button--hidden","switch__button--current"),Uu.grid.classList.remove("switch__button--hidden","switch__button--current"),(()=>{document.body.classList.remove("grid-open"),Qu.start();const t=$u(),e=ju.getState([t.allImages,t.allImagesInner],{props:"opacity"});t.allImages.forEach(((t,e)=>{Hu[e].DOM.imageWrap.appendChild(t)}));let n=ha.getAll();for(let t=0;tnew Promise((e=>{a(document.querySelectorAll(t),{background:!0},e)})))(".item__image-inner").then((()=>{document.body.classList.remove("loading"),(()=>{Qu=new _({lerp:.1,smooth:!0});const t=e=>{Qu.raf(e),requestAnimationFrame(t)};requestAnimationFrame(t)})(),(()=>{for(const t of Hu)Ti.set(t.DOM.imageInner,{transformOrigin:"50% 0%"}),Ti.timeline({scrollTrigger:{trigger:t.DOM.el,start:"top bottom",end:"bottom top",scrub:!0}}).addLabel("start",0).to(t.DOM.imageInner,{ease:"none",scaleY:2.4,scaleX:1.2,opacity:0},"start").to([t.DOM.title,t.DOM.number],{ease:"none",yPercent:-150},"start").to([t.DOM.titleInner,t.DOM.numberInner],{scrollTrigger:{trigger:t.DOM.el,start:"top bottom",end:"top 20%",scrub:!0},ease:"expo.in",yPercent:-100},"start");let t=window.innerWidth;Ti.to(Ku.main,{scrollTrigger:{start:0,end:"max",scrub:!0},ease:"none",x:()=>-Ku.main.offsetWidth-(13.25*t/100+25*t/100+t/100)+t})})(),Zu()}))}();
--------------------------------------------------------------------------------
/dist/index.d73f7ad5.css:
--------------------------------------------------------------------------------
1 | *,:after,:before{box-sizing:border-box}:root{--color-text:#5e5754;--color-title:#944d3e;--color-bg:#080808;--color-link:#5e5754;--color-link-hover:#5e5754;--color-switch-bg:#f1e4dd;--color-switch:#000;--color-switch-active:#c1b7b1;--color-heading:#f1e4dd;font-size:18px}html{scroll-behavior:initial}html,body{width:100%;min-height:100%}body{color:var(--color-text);background-color:var(--color-bg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;font-family:articulat-cf,-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif}body #cdawrap{justify-self:start}.oh{position:relative;overflow:hidden}.oh__inner{will-change:transform;display:inline-block}.line{transform-origin:0;white-space:nowrap;will-change:transform}.js .loading:before,.js .loading:after{content:"";z-index:1000;position:fixed}.js .loading:before{width:100%;height:100%;background:var(--color-bg);top:0;left:0}.js .loading:after{width:60px;height:60px;opacity:.4;background:var(--color-link);border-radius:50%;margin:-30px 0 0 -30px;animation:.7s linear infinite alternate forwards loaderAnim;top:50%;left:50%}@keyframes loaderAnim{to{opacity:1;transform:scale(.5)}}a{color:var(--color-link);cursor:pointer;outline:none;text-decoration:none}a:hover{color:var(--color-link-hover);outline:none}a:focus{background:#d3d3d3;outline:none}a:focus:not(:focus-visible){background:0 0}a:focus-visible{background:0 0;outline:2px solid red}.unbutton{font:inherit;cursor:pointer;color:currentColor;background:0 0;border:0;margin:0;padding:0}.unbutton:focus{outline:none}.frame{color:var(--color-title);grid-gap:.5rem;grid-template:"title""prev""sponsor"/100%;justify-content:start;justify-items:start;margin-bottom:3rem;padding:1rem;display:grid;position:relative}.frame a:not(.frame__title-back){white-space:nowrap;position:relative;overflow:hidden}.frame a:not(.frame__title-back):before{content:"";height:1px;width:100%;transform-origin:0%;background:currentColor;transition:transform .3s;position:absolute;top:90%}.frame a:not(.frame__title-back):hover:before{transform-origin:100%;transform:scaleX(0)}.frame__title{grid-area:title;display:flex}.frame__title-main{margin:0;font-size:1rem;font-weight:400}.frame__title-back{align-items:flex-end;margin-bottom:.15rem;display:flex;position:relative}.frame__title-back span{display:none}.frame__title-back svg{fill:currentColor}.frame__prev{grid-area:prev}.heading{width:100%;z-index:200;pointer-events:none;mix-blend-mode:color-dodge;position:fixed;top:6rem;left:0}.heading__main{color:var(--color-heading);white-space:nowrap;text-transform:uppercase;will-change:transform;margin:1rem 0 0 39.25vw;font-size:clamp(2rem,10vw,5.5rem);font-weight:300;line-height:.8;display:inline-block}.heading__sub{color:var(--color-heading);margin-left:calc(39.25vw + 1rem);font-size:.85rem;display:inline-block}.switch{background:var(--color-switch-bg);z-index:100;border-radius:3rem;padding:1rem 1.5rem;display:flex;position:fixed;bottom:1.5rem;left:50%;transform:translate(-50%)}.switch:after{content:"";width:1px;height:calc(100% - 2rem);background:var(--color-switch-active);position:absolute;left:50%}.switch__button{fill:var(--color-switch);margin:0 .5rem;padding:0 .25rem;display:flex}.switch__button--current{fill:var(--color-switch-active);pointer-events:none}.switch__button svg{pointer-events:none}.content{padding:20vh 13.25vw 2.5rem;position:relative}.grid-open{height:100vh;overflow:hidden}.grid-open .content{pointer-events:none}.item{grid-gap:5vh;grid-template-columns:100%;grid-template-areas:"caption""img";place-content:center;margin:0 auto 20vh;display:grid}.item__image-wrap{width:100%;aspect-ratio:800/500;grid-area:img;justify-self:center}.item__image{width:100%;aspect-ratio:800/500;will-change:transform;position:relative;overflow:hidden}.item__image-inner{width:100%;height:100%;will-change:transform;background-size:cover}.item__caption{z-index:10;grid-area:caption;position:relative}.item__caption-title{white-space:nowrap;width:min-content;color:var(--color-title);margin:0;font-size:clamp(2rem,6vw,3.5rem);font-weight:300;line-height:1.2}.item__caption-description{max-width:200px;line-height:1.2}.item__caption-number{display:inline-block}.grid{width:100%;pointer-events:none;grid-gap:1rem;height:100vh;grid-template-columns:repeat(5,1fr);align-content:center;padding:2rem;display:grid;position:fixed;top:0;left:0}.grid-open .grid{pointer-events:auto}.grid .item__image{cursor:not-allowed}.grid .item__image:nth-child(1){grid-area:1/1}.grid .item__image:nth-child(2){grid-area:1/2}.grid .item__image:nth-child(3){grid-area:1/3}.grid .item__image:nth-child(4){grid-area:2/1}.grid .item__image:nth-child(5){grid-area:2/3}.grid .item__image:nth-child(6){grid-area:2/5}.grid .item__image:nth-child(7){grid-area:3/1}.grid .item__image:nth-child(8){grid-area:3/2}.grid .item__image:nth-child(9){grid-area:3/4}.grid .item__image:nth-child(10){grid-area:4/1}.grid .item__image:nth-child(11){grid-area:4/3}.grid .item__image:nth-child(12){grid-area:4/5}@media screen and (min-width:53em){.frame{grid-column-gap:2rem;grid-template:"title prev""sponsor."/auto auto}.item{grid-gap:1vw;grid-template-columns:25vw 1fr;grid-template-areas:"caption img"}.content{padding-top:40vh}.content .item__image{grid-column:2/span 2}.heading{top:0}.grid{max-width:950px;left:calc(50vw - 475px)}}
--------------------------------------------------------------------------------
/dist/index.html:
--------------------------------------------------------------------------------
1 | On-Scroll Animations and View Switch | Codrops
Projects * Insomnia * Projects * Insomnia * Projects * Insomnia * Projects
1984 - 2022
01 Cast a spell
All natural and technological processes Proceed in such a way that the availability Of the remaining energy decreases
02 Corruption
In all energy exchanges, if no energy Enters or leaves an isolated system The entropy of that system increases
03 All their lives
All natural and technological processes Proceed in such a way that the availability Of the remaining energy decreases
04 You'll burn in hell
All natural and technological processes Proceed in such a way that the availability Of the remaining energy decreases
05 What we become
All natural and technological processes Proceed in such a way that the availability Of the remaining energy decreases
06 Take a bow
All natural and technological processes Proceed in such a way that the availability Of the remaining energy decreases
07 You bring death
All natural and technological processes Proceed in such a way that the availability Of the remaining energy decreases
08 You must pay
All natural and technological processes Proceed in such a way that the availability Of the remaining energy decreases
09 Feed the hex
All natural and technological processes Proceed in such a way that the availability Of the remaining energy decreases
10 Beg for their lives
All natural and technological processes Proceed in such a way that the availability Of the remaining energy decreases
11 For all your sins
All natural and technological processes Proceed in such a way that the availability Of the remaining energy decreases
12 Beholden
All natural and technological processes Proceed in such a way that the availability Of the remaining energy decreases
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "OnScrollViewSwitch",
3 | "version": "1.0.0",
4 | "browserslist": "> 0.5%, last 2 versions, not dead",
5 | "description": "",
6 | "scripts": {
7 | "start": "parcel src/index.html --open",
8 | "clean": "rm -rf dist/*",
9 | "build:parcel": "parcel build src/index.html --no-content-hash --no-source-maps --public-url ./",
10 | "build": "npm run clean && npm run build:parcel"
11 | },
12 | "repository": {
13 | "type": "git",
14 | "url": "git://github.com/codrops/OnScrollViewSwitch.git"
15 | },
16 | "keywords": [],
17 | "author": "Codrops",
18 | "license": "MIT",
19 | "homepage": "https://tympanus.net/codrops",
20 | "bugs": {
21 | "url": "https://github.com/codrops/OnScrollViewSwitch/issues"
22 | },
23 | "devDependencies": {
24 | "parcel": "^2.7.0"
25 | },
26 | "dependencies": {
27 | "@studio-freight/lenis": "^0.2.8",
28 | "gsap": "^3.11.2",
29 | "imagesloaded": "^5.0.0"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/css/base.css:
--------------------------------------------------------------------------------
1 | *,
2 | *::after,
3 | *::before {
4 | box-sizing: border-box;
5 | }
6 |
7 | :root {
8 | font-size: 18px;
9 | --color-text: #5e5754;
10 | --color-title: #944d3e;
11 | --color-bg: #080808;
12 | --color-link: #5e5754;
13 | --color-link-hover: #5e5754;
14 | --color-switch-bg: #f1e4dd;
15 | --color-switch: #000;
16 | --color-switch-active: #c1b7b1;
17 | --color-heading: #f1e4dd;
18 | }
19 |
20 | html {
21 | scroll-behavior: initial;
22 | }
23 |
24 | html,
25 | body {
26 | width: 100%;
27 | min-height: 100%;
28 | }
29 |
30 | body {
31 | margin: 0;
32 | color: var(--color-text);
33 | background-color: var(--color-bg);
34 | font-family: articulat-cf, -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;
35 | -webkit-font-smoothing: antialiased;
36 | -moz-osx-font-smoothing: grayscale;
37 | }
38 |
39 | body #cdawrap {
40 | justify-self: start;
41 | }
42 |
43 | .oh {
44 | position: relative;
45 | overflow: hidden;
46 | }
47 |
48 | .oh__inner {
49 | will-change: transform;
50 | display: inline-block;
51 | }
52 |
53 | .line {
54 | transform-origin: 0;
55 | white-space: nowrap;
56 | will-change: transform;
57 | }
58 |
59 | /* Page Loader */
60 | .js .loading::before,
61 | .js .loading::after {
62 | content: '';
63 | position: fixed;
64 | z-index: 1000;
65 | }
66 |
67 | .js .loading::before {
68 | top: 0;
69 | left: 0;
70 | width: 100%;
71 | height: 100%;
72 | background: var(--color-bg);
73 | }
74 |
75 | .js .loading::after {
76 | top: 50%;
77 | left: 50%;
78 | width: 60px;
79 | height: 60px;
80 | margin: -30px 0 0 -30px;
81 | border-radius: 50%;
82 | opacity: 0.4;
83 | background: var(--color-link);
84 | animation: loaderAnim 0.7s linear infinite alternate forwards;
85 |
86 | }
87 |
88 | @keyframes loaderAnim {
89 | to {
90 | opacity: 1;
91 | transform: scale3d(0.5,0.5,1);
92 | }
93 | }
94 |
95 | a {
96 | text-decoration: none;
97 | color: var(--color-link);
98 | outline: none;
99 | cursor: pointer;
100 | }
101 |
102 | a:hover {
103 | color: var(--color-link-hover);
104 | outline: none;
105 | }
106 |
107 | /* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
108 | a:focus {
109 | /* Provide a fallback style for browsers
110 | that don't support :focus-visible */
111 | outline: none;
112 | background: lightgrey;
113 | }
114 |
115 | a:focus:not(:focus-visible) {
116 | /* Remove the focus indicator on mouse-focus for browsers
117 | that do support :focus-visible */
118 | background: transparent;
119 | }
120 |
121 | a:focus-visible {
122 | /* Draw a very noticeable focus style for
123 | keyboard-focus on browsers that do support
124 | :focus-visible */
125 | outline: 2px solid red;
126 | background: transparent;
127 | }
128 |
129 | .unbutton {
130 | background: none;
131 | border: 0;
132 | padding: 0;
133 | margin: 0;
134 | font: inherit;
135 | cursor: pointer;
136 | color: currentColor;
137 | }
138 |
139 | .unbutton:focus {
140 | outline: none;
141 | }
142 |
143 | .frame {
144 | position: relative;
145 | color: var(--color-title);
146 | padding: 1rem;
147 | display: grid;
148 | grid-template-columns: 100%;
149 | grid-template-rows: auto auto auto;
150 | grid-template-areas: 'title' 'prev' 'sponsor';
151 | justify-content: start;
152 | justify-items: start;
153 | margin-bottom: 3rem;
154 | grid-gap: 0.5rem;
155 | }
156 |
157 | .frame a:not(.frame__title-back) {
158 | white-space: nowrap;
159 | overflow: hidden;
160 | position: relative;
161 | }
162 |
163 | .frame a:not(.frame__title-back)::before {
164 | content: '';
165 | height: 1px;
166 | width: 100%;
167 | background: currentColor;
168 | position: absolute;
169 | top: 90%;
170 | transition: transform 0.3s;
171 | transform-origin: 0% 50%;
172 | }
173 |
174 | .frame a:not(.frame__title-back):hover::before {
175 | transform: scaleX(0);
176 | transform-origin: 100% 50%;
177 | }
178 |
179 | .frame__title {
180 | grid-area: title;
181 | display: flex;
182 | }
183 |
184 | .frame__title-main {
185 | font-size: 1rem;
186 | margin: 0;
187 | font-weight: normal;
188 | }
189 |
190 | .frame__title-back {
191 | position: relative;
192 | display: flex;
193 | align-items: flex-end;
194 | margin-bottom: 0.15rem;
195 | }
196 |
197 | .frame__title-back span {
198 | display: none;
199 | }
200 |
201 | .frame__title-back svg {
202 | fill: currentColor;
203 | }
204 |
205 | .frame__prev {
206 | grid-area: prev;
207 | }
208 |
209 | .heading {
210 | position: fixed;
211 | top: 6rem;
212 | left: 0;
213 | width: 100%;
214 | z-index: 200;
215 | pointer-events: none;
216 | mix-blend-mode: color-dodge;
217 | }
218 |
219 | .heading__main {
220 | display: inline-block;
221 | color: var(--color-heading);
222 | font-weight: 300;
223 | font-size: clamp(2rem,10vw,5.5rem);
224 | white-space: nowrap;
225 | margin: 0;
226 | margin-left: calc(13.25vw + 25vw + 1vw);
227 | line-height: 0.8;
228 | text-transform: uppercase;
229 | margin-top: 1rem;
230 | will-change: transform;
231 | }
232 |
233 | .heading__sub {
234 | display: inline-block;
235 | margin-left: calc(13.25vw + 25vw + 1vw + 1rem);
236 | color: var(--color-heading);
237 | font-size: 0.85rem;
238 | }
239 |
240 | .switch {
241 | padding: 1rem 1.5rem;
242 | position: fixed;
243 | background: var(--color-switch-bg);
244 | bottom: 1.5rem;
245 | left: 50%;
246 | transform: translateX(-50%);
247 | display: flex;
248 | z-index: 100;
249 | border-radius: 3rem;
250 | }
251 |
252 | .switch::after {
253 | content: '';
254 | width: 1px;
255 | height: calc(100% - 2rem);
256 | position: absolute;
257 | left: 50%;
258 | background: var(--color-switch-active);
259 | }
260 |
261 | .switch__button {
262 | display: flex;
263 | margin: 0 0.5rem;
264 | padding: 0 0.25rem;
265 | fill: var(--color-switch);
266 | }
267 |
268 | .switch__button--current {
269 | fill: var(--color-switch-active);
270 | pointer-events: none;
271 | }
272 |
273 | .switch__button svg {
274 | pointer-events: none;
275 | }
276 |
277 | .content {
278 | position: relative;
279 | padding: 20vh 13.25vw 2.5rem;
280 | }
281 |
282 | .grid-open {
283 | overflow: hidden;
284 | height: 100vh;
285 | }
286 |
287 | .grid-open .content {
288 | pointer-events: none;
289 | }
290 |
291 | .item {
292 | grid-gap: 5vh;
293 | grid-template-columns: 100%;
294 | align-content: center;
295 | justify-content: center;
296 | display: grid;
297 | grid-template-areas: 'caption' 'img';
298 | margin: 0 auto 20vh;
299 | }
300 |
301 | .item__image-wrap {
302 | grid-area: img;
303 | width: 100%;
304 | aspect-ratio: 800/500;
305 | justify-self: center;
306 | }
307 |
308 | .item__image {
309 | width: 100%;
310 | aspect-ratio: 800/500;
311 | position: relative;
312 | overflow: hidden;
313 | will-change: transform;
314 | }
315 |
316 | .item__image-inner {
317 | width: 100%;
318 | height: 100%;
319 | background-size: cover;
320 | will-change: transform;
321 | }
322 |
323 | .item__caption {
324 | grid-area: caption;
325 | position: relative;
326 | z-index: 10;
327 | }
328 |
329 | .item__caption-title {
330 | white-space: nowrap;
331 | width: min-content;
332 | line-height: 1.2;
333 | font-size: clamp(2rem,6vw,3.5rem);
334 | font-weight: 300;
335 | margin: 0;
336 | color: var(--color-title);
337 | }
338 |
339 | .item__caption-description {
340 | max-width: 200px;
341 | line-height: 1.2;
342 | }
343 |
344 | .item__caption-number {
345 | display: inline-block;
346 | }
347 |
348 | .grid {
349 | width: 100%;
350 | pointer-events: none;
351 | position: fixed;
352 | top: 0;
353 | display: grid;
354 | grid-template-columns: repeat(5,1fr);
355 | grid-gap: 1rem;
356 | height: 100vh;
357 | left: 0;
358 | align-content: center;
359 | padding: 2rem;
360 | }
361 |
362 | .grid-open .grid {
363 | pointer-events: auto;
364 | }
365 |
366 | .grid .item__image {
367 | cursor: not-allowed;
368 | }
369 |
370 | .grid .item__image:nth-child(1) {
371 | grid-row: 1;
372 | grid-column: 1;
373 | }
374 |
375 | .grid .item__image:nth-child(2) {
376 | grid-row: 1;
377 | grid-column: 2;
378 | }
379 |
380 | .grid .item__image:nth-child(3) {
381 | grid-row: 1;
382 | grid-column: 3;
383 | }
384 |
385 | .grid .item__image:nth-child(3) {
386 | grid-row: 1;
387 | grid-column: 3;
388 | }
389 |
390 | .grid .item__image:nth-child(4) {
391 | grid-row: 2;
392 | grid-column: 1;
393 | }
394 |
395 | .grid .item__image:nth-child(5) {
396 | grid-row: 2;
397 | grid-column: 3;
398 | }
399 |
400 | .grid .item__image:nth-child(6) {
401 | grid-row: 2;
402 | grid-column: 5;
403 | }
404 |
405 | .grid .item__image:nth-child(7) {
406 | grid-row: 3;
407 | grid-column: 1;
408 | }
409 |
410 | .grid .item__image:nth-child(8) {
411 | grid-row: 3;
412 | grid-column: 2;
413 | }
414 |
415 | .grid .item__image:nth-child(9) {
416 | grid-row: 3;
417 | grid-column: 4;
418 | }
419 |
420 | .grid .item__image:nth-child(10) {
421 | grid-row: 4;
422 | grid-column: 1;
423 | }
424 |
425 | .grid .item__image:nth-child(11) {
426 | grid-row: 4;
427 | grid-column: 3;
428 | }
429 |
430 | .grid .item__image:nth-child(12) {
431 | grid-row: 4;
432 | grid-column: 5;
433 | }
434 |
435 | @media screen and (min-width: 53em) {
436 | .frame {
437 | grid-column-gap: 2rem;
438 | grid-template-columns: auto auto;
439 | grid-template-rows: auto auto;
440 | grid-template-areas: 'title prev' 'sponsor ...';
441 | }
442 | .item {
443 | grid-gap: 1vw;
444 | grid-template-columns: 25vw 1fr;
445 | grid-template-areas: 'caption img' ;
446 | }
447 | .content {
448 | padding-top: 40vh;
449 | }
450 | .content .item__image {
451 | grid-column: 2 / span 2;
452 | }
453 | .heading {
454 | top: 0;
455 | }
456 | .grid {
457 | left: calc((100vw - 950px ) / 2);
458 | max-width: 950px;
459 | }
460 | }
--------------------------------------------------------------------------------
/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/favicon.ico
--------------------------------------------------------------------------------
/src/img/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/img/1.jpg
--------------------------------------------------------------------------------
/src/img/10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/img/10.jpg
--------------------------------------------------------------------------------
/src/img/11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/img/11.jpg
--------------------------------------------------------------------------------
/src/img/12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/img/12.jpg
--------------------------------------------------------------------------------
/src/img/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/img/2.jpg
--------------------------------------------------------------------------------
/src/img/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/img/3.jpg
--------------------------------------------------------------------------------
/src/img/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/img/4.jpg
--------------------------------------------------------------------------------
/src/img/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/img/5.jpg
--------------------------------------------------------------------------------
/src/img/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/img/6.jpg
--------------------------------------------------------------------------------
/src/img/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/img/7.jpg
--------------------------------------------------------------------------------
/src/img/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/img/8.jpg
--------------------------------------------------------------------------------
/src/img/9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codrops/OnScrollViewSwitch/dd8941a1ea08d5892010fcf9bc7470607b024fc6/src/img/9.jpg
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | On-Scroll Animations and View Switch | Codrops
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
29 |
30 |
Projects * Insomnia * Projects * Insomnia * Projects * Insomnia * Projects
31 | 1984 - 2022
32 |
33 |
34 |
42 |
52 |
53 |
54 |
55 |
56 | 01
57 | Cast a spell
58 |
59 | All natural and technological processes
60 | Proceed in such a way that the availability
61 | Of the remaining energy decreases
62 |
63 |
64 |
65 |
66 |
67 | 02
68 | Corruption
69 |
70 | In all energy exchanges, if no energy
71 | Enters or leaves an isolated system
72 | The entropy of that system increases
73 |
74 |
75 |
76 |
77 |
78 | 03
79 | All their lives
80 |
81 | All natural and technological processes
82 | Proceed in such a way that the availability
83 | Of the remaining energy decreases
84 |
85 |
86 |
87 |
88 |
89 | 04
90 | You'll burn in hell
91 |
92 | All natural and technological processes
93 | Proceed in such a way that the availability
94 | Of the remaining energy decreases
95 |
96 |
97 |
98 |
99 |
100 | 05
101 | What we become
102 |
103 | All natural and technological processes
104 | Proceed in such a way that the availability
105 | Of the remaining energy decreases
106 |
107 |
108 |
109 |
110 |
111 | 06
112 | Take a bow
113 |
114 | All natural and technological processes
115 | Proceed in such a way that the availability
116 | Of the remaining energy decreases
117 |
118 |
119 |
120 |
121 |
122 | 07
123 | You bring death
124 |
125 | All natural and technological processes
126 | Proceed in such a way that the availability
127 | Of the remaining energy decreases
128 |
129 |
130 |
131 |
132 |
133 | 08
134 | You must pay
135 |
136 | All natural and technological processes
137 | Proceed in such a way that the availability
138 | Of the remaining energy decreases
139 |
140 |
141 |
142 |
143 |
144 | 09
145 | Feed the hex
146 |
147 | All natural and technological processes
148 | Proceed in such a way that the availability
149 | Of the remaining energy decreases
150 |
151 |
152 |
153 |
154 |
155 | 10
156 | Beg for their lives
157 |
158 | All natural and technological processes
159 | Proceed in such a way that the availability
160 | Of the remaining energy decreases
161 |
162 |
163 |
164 |
165 |
166 | 11
167 | For all your sins
168 |
169 | All natural and technological processes
170 | Proceed in such a way that the availability
171 | Of the remaining energy decreases
172 |
173 |
174 |
175 |
176 |
177 | 12
178 | Beholden
179 |
180 | All natural and technological processes
181 | Proceed in such a way that the availability
182 | Of the remaining energy decreases
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
--------------------------------------------------------------------------------
/src/js/index.js:
--------------------------------------------------------------------------------
1 | import { preloadImages, isInViewport } from './utils';
2 | import { Item } from './item';
3 | import Lenis from '@studio-freight/lenis'
4 | import { gsap } from 'gsap';
5 | import { ScrollTrigger } from 'gsap/ScrollTrigger';
6 | gsap.registerPlugin(ScrollTrigger);
7 | import { Flip } from 'gsap/Flip';
8 | gsap.registerPlugin(Flip);
9 |
10 | // Item instances (Item is the .content > figure.item)
11 | const items = [];
12 | [...document.querySelectorAll('.item')].forEach(item => {
13 | items.push(new Item(item));
14 | });
15 |
16 | // Toggle grid view
17 | const switchCtrl = {
18 | grid: document.querySelector('.switch__button--grid'),
19 | list: document.querySelector('.switch__button--list')
20 | };
21 |
22 | // Text element that moves horizontally as we scroll
23 | const heading = {
24 | el: document.querySelector('.heading'),
25 | main: document.querySelector('.heading .heading__main'),
26 | }
27 |
28 | // Placeholder for the grid items (.item__image). We'll use the gsap FLIP plugin to move the "".item .item__image" inside the grid element
29 | const grid = document.querySelector('.grid');
30 |
31 | // Lenis smooth scrolling
32 | let lenis;
33 |
34 | // Initialize Lenis smooth scrolling
35 | const initSmoothScrolling = () => {
36 | lenis = new Lenis({
37 | lerp: 0.1,
38 | smooth: true,
39 | });
40 | const scrollFn = (time) => {
41 | lenis.raf(time);
42 | requestAnimationFrame(scrollFn);
43 | };
44 | requestAnimationFrame(scrollFn);
45 | };
46 |
47 | // ScrollTrigger animations for scrolling
48 | const animateOnScroll = () => {
49 |
50 | for (const item of items) {
51 |
52 | gsap.set(item.DOM.imageInner, {transformOrigin: '50% 0%'});
53 |
54 | gsap.timeline({
55 | scrollTrigger: {
56 | trigger: item.DOM.el,
57 | start: 'top bottom',
58 | end: 'bottom top',
59 | scrub: true
60 | }
61 | })
62 | .addLabel('start', 0)
63 | // scale up the inner image
64 | .to(item.DOM.imageInner, {
65 | ease: 'none',
66 | scaleY: 2.4,
67 | scaleX: 1.2,
68 | opacity: 0
69 | }, 'start')
70 | // translate the title and number
71 | .to([item.DOM.title, item.DOM.number], {
72 | ease: 'none',
73 | yPercent: -150,
74 | }, 'start')
75 | // translate the inner title/number (overflow is hidden so they get hidden)
76 | .to([item.DOM.titleInner, item.DOM.numberInner], {
77 | scrollTrigger: {
78 | trigger: item.DOM.el,
79 | start: 'top bottom',
80 | end: 'top 20%',
81 | scrub: true,
82 | },
83 | ease: 'expo.in',
84 | yPercent: -100
85 | }, 'start')
86 | /*
87 | .to(item.DOM.description, {
88 | scrollTrigger: {
89 | trigger: item.DOM.el,
90 | start: 'top bottom',
91 | end: 'bottom top',
92 | scrub: true,
93 | },
94 | ease: 'none',
95 | yPercent: 100
96 | }, 'start')
97 | */
98 |
99 | }
100 |
101 | // animate the heading element as we scroll (horizontally)
102 | let windowWidth = window.innerWidth;
103 | gsap.to(heading.main, {
104 | scrollTrigger: {
105 | start: 0,
106 | end: 'max',
107 | scrub: true
108 | },
109 | ease: 'none',
110 | x: () => -heading.main.offsetWidth - (13.25*windowWidth/100 + 25*windowWidth/100 + windowWidth/100) + windowWidth
111 | });
112 | };
113 |
114 | const showGrid = () => {
115 |
116 | document.body.classList.add('grid-open');
117 |
118 | // stop the smooth scrolling
119 | lenis.stop();
120 |
121 | // get the DOM elements that we'll work with
122 | const DOM = getDOMElements();
123 |
124 | // Disable active ScrollTrigger instances
125 | let Alltrigger = ScrollTrigger.getAll();
126 | for (let i = 0; i < Alltrigger.length; i++) {
127 | Alltrigger[i].disable(false);
128 | }
129 |
130 | // Use gsap flip for the animation
131 | // save the current state of the images
132 | const flipstate = Flip.getState(DOM.allImages);
133 | // put them inside the .grid element
134 | grid.append(...DOM.allImages);
135 |
136 | // gsap stagger properties
137 | const staggerConfig = {
138 | grid: 'auto',
139 | // the order goes from the first item inside the viewport
140 | from: DOM.inViewportItems.length ? items.indexOf(DOM.inViewportItems[0]) : 0,
141 | amount: 0.06,
142 | };
143 |
144 | // Flip it
145 | Flip.from(flipstate, {
146 | duration: 0.7,
147 | ease: 'power3.inOut',
148 | scale: true,
149 | stagger: staggerConfig
150 | })
151 | // Also reset scales applied to the inner images (items inside the viewport)
152 | .to(DOM.inViewportImagesInner, {
153 | duration: 0.7,
154 | ease: 'power3.inOut',
155 | scaleX: 1,
156 | scaleY: 1,
157 | opacity: 1,
158 | stagger: staggerConfig
159 | }, 0)
160 | // For the items outside of the viewport, simply reset the scales with no animation
161 | .set(DOM.outViewportImagesInner, {
162 | scaleX: 1,
163 | scaleY: 1,
164 | opacity: 1
165 | }, 0)
166 | // hide the titles and numbers inner elments by translating them up
167 | .to([DOM.inViewportTitlesInner, DOM.inViewportNumbersInner], {
168 | duration: 0.4,
169 | ease: 'power3.inOut',
170 | yPercent: -100,
171 | opacity: 0
172 | }, 0)
173 | // hide description
174 | .to(DOM.inViewportDescription, {
175 | duration: 0.4,
176 | ease: 'power3.inOut',
177 | opacity: 0
178 | }, 0)
179 | // For all the items outside the viewport, simply set opacity to 0
180 | .set([DOM.outViewportTitlesInner, DOM.outViewportNumbersInner, DOM.outViewportDescription], {
181 | opacity: 0,
182 | }, 0)
183 | // hide the heading element
184 | .to(heading.el, {
185 | duration: 0.7,
186 | ease: 'power3.inOut',
187 | yPercent: -100,
188 | x: -100
189 | }, 0);
190 |
191 | };
192 |
193 | const hideGrid = () => {
194 |
195 | document.body.classList.remove('grid-open');
196 |
197 | // restart the smooth scrolling
198 | lenis.start();
199 |
200 | // get the DOM elements that we'll work with
201 | const DOM = getDOMElements();
202 |
203 | const flipstate = Flip.getState([DOM.allImages, DOM.allImagesInner], {props: 'opacity'});
204 |
205 | DOM.allImages.forEach((image,pos) => {
206 | items[pos].DOM.imageWrap.appendChild(image)
207 | });
208 |
209 | // Enable ScrollTrigger instances
210 | let Alltrigger = ScrollTrigger.getAll();
211 | for (let i = 0; i < Alltrigger.length; i++) {
212 | Alltrigger[i].enable(false);
213 | }
214 |
215 | Flip.from(flipstate, {
216 | duration: 0.7,
217 | ease: 'power3.inOut',
218 | scale: true,
219 | })
220 | .to([DOM.inViewportTitlesInner, DOM.inViewportNumbersInner, DOM.inViewportDescription], {
221 | duration: 0.4,
222 | ease: 'power3.inOut',
223 | startAt: {opacity: 0},
224 | opacity: 1
225 | }, 0)
226 | .set([DOM.outViewportTitlesInner, DOM.outViewportNumbersInner, DOM.outViewportDescription], {
227 | opacity: 1
228 | }, 0)
229 | .to(heading.el, {
230 | duration: 0.7,
231 | ease: 'power3.inOut',
232 | yPercent: 0,
233 | x: 0
234 | }, 0);
235 |
236 | }
237 |
238 | // Returns some DOM elements that are needed for showing/hiding the grid
239 | const getDOMElements = () => {
240 | const inViewportItems = items.filter(item => isInViewport(item.DOM.el));
241 | const outViewportItems = items.filter(n => !inViewportItems.includes(n));
242 |
243 | return {
244 | allImages: items.map(item => item.DOM.image),
245 | allImagesInner: items.map(item => item.DOM.imageInner),
246 | inViewportItems: inViewportItems,
247 | outViewportItems: outViewportItems,
248 | inViewportImagesInner: inViewportItems.map(item => item.DOM.imageInner),
249 | outViewportImagesInner: outViewportItems.map(item => item.DOM.imageInner),
250 | inViewportDescription: inViewportItems.map(item => item.DOM.description),
251 | outViewportDescription: outViewportItems.map(item => item.DOM.description),
252 | inViewportTitlesInner: inViewportItems.map(item => item.DOM.titleInner),
253 | outViewportTitlesInner: outViewportItems.map(item => item.DOM.titleInner),
254 | inViewportNumbersInner: inViewportItems.map(item => item.DOM.numberInner),
255 | outViewportNumbersInner: outViewportItems.map(item => item.DOM.numberInner)
256 | };
257 | }
258 |
259 | // Initialize the events
260 | const initEvents = () => {
261 |
262 | // show grid ctrl click
263 | switchCtrl.grid.addEventListener('click', () => {
264 | switchCtrl.grid.classList.add('switch__button--hidden', 'switch__button--current');
265 | switchCtrl.list.classList.remove('switch__button--hidden', 'switch__button--current');
266 | showGrid();
267 | });
268 | // hide grid ctrl click
269 | switchCtrl.list.addEventListener('click', () => {
270 | switchCtrl.list.classList.add('switch__button--hidden', 'switch__button--current');
271 | switchCtrl.grid.classList.remove('switch__button--hidden', 'switch__button--current');
272 | hideGrid();
273 | });
274 |
275 | };
276 |
277 | // Preload images
278 | preloadImages('.item__image-inner').then(() => {
279 | document.body.classList.remove('loading');
280 |
281 | initSmoothScrolling();
282 | animateOnScroll();
283 | initEvents();
284 | });
--------------------------------------------------------------------------------
/src/js/item.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Class representing an Item element (.item)
3 | */
4 | export class Item {
5 | // DOM elements
6 | DOM = {
7 | // main element (.item)
8 | el: null,
9 | // caption (.item__caption)
10 | caption : null,
11 | // imageWrap (.item__image-wrap)
12 | imageWrap: null,
13 | // image (.item__image)
14 | image: null,
15 | // imageInner (.item__image > .item__image-inner)
16 | imageInner: null,
17 | // title (.item__caption-title)
18 | title: null,
19 | // titleInner (.item__caption-title > .oh__inner)
20 | titleInner: null,
21 | // number (.item__caption-number)
22 | number: null,
23 | // numberInner (.item__caption-number > .oh__inner)
24 | numberInner: null,
25 | // description (.item__caption-description)
26 | description: null,
27 | };
28 |
29 | /**
30 | * Constructor.
31 | * @param {Element} DOM_el - main element (.item)
32 | */
33 | constructor(DOM_el) {
34 | this.DOM.el = DOM_el;
35 | this.DOM.caption = this.DOM.el.querySelector('.item__caption');
36 | this.DOM.imageWrap = this.DOM.el.querySelector('.item__image-wrap');
37 | this.DOM.image = this.DOM.el.querySelector('.item__image');
38 | this.DOM.imageInner = this.DOM.image.querySelector('.item__image-inner');
39 | this.DOM.title = this.DOM.el.querySelector('.item__caption-title');
40 | this.DOM.titleInner = this.DOM.title.querySelector('.oh__inner');
41 | this.DOM.number = this.DOM.el.querySelector('.item__caption-number');
42 | this.DOM.numberInner = this.DOM.number.querySelector('.oh__inner');
43 | this.DOM.description = this.DOM.el.querySelector('.item__caption-description');
44 | }
45 | }
--------------------------------------------------------------------------------
/src/js/preloader.js:
--------------------------------------------------------------------------------
1 | const imagesLoaded = require('imagesloaded');
2 |
3 | const body = document.body;
4 | export const preloader = selector => {
5 | return new Promise(resolve => {
6 |
7 | const imgwrap = document.createElement('div');
8 | imgwrap.style.visibility = 'hidden';
9 | body.appendChild(imgwrap);
10 |
11 | [...document.querySelectorAll(selector)].forEach(el => {
12 | const imgEl = document.createElement('img');
13 | imgEl.style.width = 0;
14 | imgEl.src = el.getAttributeNS('http://www.w3.org/1999/xlink', 'href');
15 | imgEl.className = 'preload';
16 | imgwrap.appendChild(imgEl);
17 | });
18 |
19 | imagesLoaded(document.querySelectorAll('.preload'), () => {
20 | imgwrap.parentNode.removeChild(imgwrap);
21 | body.classList.remove('loading');
22 | resolve();
23 | });
24 |
25 | });
26 | };
--------------------------------------------------------------------------------
/src/js/utils.js:
--------------------------------------------------------------------------------
1 | const imagesLoaded = require('imagesloaded');
2 |
3 | /**
4 | * Preload images
5 | * @param {String} selector - Selector/scope from where images need to be preloaded. Default is 'img'
6 | */
7 | const preloadImages = (selector = 'img') => {
8 | return new Promise((resolve) => {
9 | imagesLoaded(document.querySelectorAll(selector), {background: true}, resolve);
10 | });
11 | };
12 |
13 | /**
14 | * Wraps the elements of an array.
15 | * @param {Array} arr - the array of elements to be wrapped
16 | * @param {String} wrapType - the type of the wrap element ('div', 'span' etc)
17 | * @param {String} wrapClass - the wrap class(es)
18 | */
19 | const wrapLines = (arr, wrapType, wrapClass) => {
20 | arr.forEach(el => {
21 | const wrapEl = document.createElement(wrapType);
22 | wrapEl.classList = wrapClass;
23 | el.parentNode.appendChild(wrapEl);
24 | wrapEl.appendChild(el);
25 | });
26 | }
27 |
28 | /**
29 | * Checks if an element is in the viewport
30 | * @param {Element} elem - the element to be checked
31 | */
32 | const isInViewport = elem => {
33 | var bounding = elem.getBoundingClientRect();
34 | return (
35 | (bounding.bottom >= 0 && bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) || bounding.top >= 0 && bounding.top <= (window.innerHeight || document.documentElement.clientHeight)) &&
36 | (bounding.right >= 0 && bounding.right <= (window.innerWidth || document.documentElement.clientWidth) || bounding.left >= 0 && bounding.left <= (window.innerWidth || document.documentElement.clientWidth))
37 | );
38 | };
39 |
40 | export {
41 | preloadImages,
42 | wrapLines,
43 | isInViewport,
44 | };
--------------------------------------------------------------------------------