diff --git a/web/themes/custom/leshed/assets/dist/main.js b/web/themes/custom/leshed/assets/dist/main.js index bcd17e4..c9abcf8 100644 --- a/web/themes/custom/leshed/assets/dist/main.js +++ b/web/themes/custom/leshed/assets/dist/main.js @@ -27,4 +27,4 @@ var bl=Object.defineProperty;var wl=(o,t,i)=>t in o?bl(o,t,{enumerable:!0,config * Subject to the terms at https://gsap.com/standard-license * @author: Jack Doyle, jack@greensock.com */var rt,cr,Mt,zt,We,Dt,to,Vn,ln,Ur,zr,mn,me,Kn,Ms,Ee,Mo,Oo,fr,el,os,il,Ce,Os,rl,nl,Ei,As,eo,xr,io,Gr,Rs,as,vn=1,ve=Date.now,ls=ve(),ei=0,Fr=0,Ao=function(t,i,e){var r=Ie(t)&&(t.substr(0,6)==="clamp("||t.indexOf("max")>-1);return e["_"+i+"Clamp"]=r,r?t.substr(6,t.length-7):t},Ro=function(t,i){return i&&(!Ie(t)||t.substr(0,6)!=="clamp(")?"clamp("+t+")":t},Ju=function o(){return Fr&&requestAnimationFrame(o)},Lo=function(){return Kn=1},Do=function(){return Kn=0},fi=function(t){return t},Nr=function(t){return Math.round(t*1e5)/1e5||0},sl=function(){return typeof window<"u"},ol=function(){return rt||sl()&&(rt=window.gsap)&&rt.registerPlugin&&rt},ir=function(t){return!!~to.indexOf(t)},al=function(t){return(t==="Height"?io:Mt["inner"+t])||We["client"+t]||Dt["client"+t]},ll=function(t){return zi(t,"getBoundingClientRect")||(ir(t)?function(){return zn.width=Mt.innerWidth,zn.height=io,zn}:function(){return yi(t)})},tc=function(t,i,e){var r=e.d,n=e.d2,s=e.a;return(s=zi(t,"getBoundingClientRect"))?function(){return s()[r]}:function(){return(i?al(n):t["client"+n])||0}},ec=function(t,i){return!i||~gi.indexOf(t)?ll(t):function(){return zn}},pi=function(t,i){var e=i.s,r=i.d2,n=i.d,s=i.a;return Math.max(0,(e="scroll"+r)&&(s=zi(t,e))?s()-ll(t)()[n]:ir(t)?(We[e]||Dt[e])-al(r):t[e]-t["offset"+r])},yn=function(t,i){for(var e=0;e0){for(r-=s,a=0;a=r)return e[a];return e[a-1]}else for(a=e.length,r+=s;a--;)if(e[a]<=r)return e[a];return e[0]}:function(r,n,s){s===void 0&&(s=.001);var a=i(r);return!n||Math.abs(a-r)e&&(r*=i/100),t=t.substr(0,e-1)),t=r+(t in Un?Un[t]*i:~t.indexOf("%")?parseFloat(t)*i/100:parseFloat(t)||0)}return t},Sn=function(t,i,e,r,n,s,a,l){var u=n.startColor,c=n.endColor,p=n.fontSize,h=n.indent,f=n.fontWeight,g=zt.createElement("div"),d=ir(e)||zi(e,"pinType")==="fixed",b=t.indexOf("scroller")!==-1,y=d?Dt:e.tagName==="IFRAME"?e.contentDocument.body:e,x=t.indexOf("start")!==-1,C=x?u:c,w="border-color:"+C+";font-size:"+p+";color:"+C+";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 w+="position:"+((b||l)&&d?"fixed;":"absolute;"),(b||l||!d)&&(w+=(r===oe?ro:no)+":"+(s+parseFloat(h))+"px;"),a&&(w+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),g._isStart=x,g.setAttribute("class","gsap-marker-"+t+(i?" marker-"+i:"")),g.style.cssText=w,g.innerText=i||i===0?t+"-"+i:t,y.children[0]?y.insertBefore(g,y.children[0]):y.appendChild(g),g._offset=g["offset"+r.op.d2],Rn(g,0,r,x),g},Rn=function(t,i,e,r){var n={display:"block"},s=e[r?"os2":"p2"],a=e[r?"p2":"os2"];t._isFlipped=r,n[e.a+"Percent"]=r?-100:0,n[e.a]=r?"1px":0,n["border"+s+Pr]=1,n["border"+a+Pr]=0,n[e.p]=i+"px",rt.set(t,n)},Ct=[],Ls={},un,No=function(){return ve()-ei>34&&(un||(un=requestAnimationFrame(bi)))},ur=function(){(!Ce||!Ce.isPressed||Ce.startX>Dt.clientWidth)&&(Ot.cache++,Ce?un||(un=requestAnimationFrame(bi)):bi(),ei||nr("scrollStart"),ei=ve())},us=function(){nl=Mt.innerWidth,rl=Mt.innerHeight},Hr=function(t){Ot.cache++,(t===!0||!me&&!il&&!zt.fullscreenElement&&!zt.webkitFullscreenElement&&(!Os||nl!==Mt.innerWidth||Math.abs(Mt.innerHeight-rl)>Mt.innerHeight*.25))&&Vn.restart(!0)},rr={},sc=[],hl=function o(){return ae(Et,"scrollEnd",o)||$i(!0)},nr=function(t){return rr[t]&&rr[t].map(function(i){return i()})||sc},Ne=[],dl=function(t){for(var i=0;in,a=r._startClamp&&r.start>=n;(s||a)&&r.setPositions(a?n-1:r.start,s?Math.max(a?n:r.start+1,n):r.end,!0)}),Ho(!1),Rs=0,e.forEach(function(r){return r&&r.render&&r.render(-1)}),Ot.forEach(function(r){xe(r)&&(r.smooth&&requestAnimationFrame(function(){return r.target.style.scrollBehavior="smooth"}),r.rec&&r(r.rec))}),gl(eo,1),Vn.pause(),er++,Pe=2,bi(2),Ct.forEach(function(r){return xe(r.vars.onRefresh)&&r.vars.onRefresh(r)}),Pe=Et.isRefreshing=!1,nr("refresh")},Ds=0,Ln=1,Zr,bi=function(t){if(t===2||!Pe&&!Gr){Et.isUpdating=!0,Zr&&Zr.update(0);var i=Ct.length,e=ve(),r=e-ls>=50,n=i&&Ct[0].scroll();if(Ln=Ds>n?-1:1,Pe||(Ds=n),r&&(ei&&!Kn&&e-ei>200&&(ei=0,nr("scrollEnd")),zr=ls,ls=e),Ln<0){for(Ee=i;Ee-- >0;)Ct[Ee]&&Ct[Ee].update(0,r);Ln=1}else for(Ee=0;Ee20),e-=e-M}if(g&&(l[g]=t||-.001,t<0&&(t=0)),s){var z=t+e,A=s._isStart;b="scroll"+r.d2,Rn(s,z,r,A&&z>20||!A&&(p?Math.max(Dt[b],We[b]):s.parentNode[b])<=z+1),p&&(u=yi(a),p&&(s.style[r.op.p]=u[r.op.p]-r.op.m-s._offset+se))}return f&&x&&(b=yi(x),f.seek(h),y=yi(x),f._caScrollDist=b[r.p]-y[r.p],t=t/f._caScrollDist*h),f&&f.seek(d),f?t:Math.round(t)},cc=/(webkit|moz|length|cssText|inset)/i,Bo=function(t,i,e,r){if(t.parentNode!==i){var n=t.style,s,a;if(i===Dt){t._stOrig=n.cssText,a=Ze(t);for(s in a)!+s&&!cc.test(s)&&a[s]&&typeof n[s]=="string"&&s!=="0"&&(n[s]=a[s]);n.top=e,n.left=r}else n.cssText=t._stOrig;rt.core.getCache(t).uncache=1,i.appendChild(t)}},ml=function(t,i,e){var r=i,n=r;return function(s){var a=Math.round(t());return a!==r&&a!==n&&Math.abs(a-r)>3&&Math.abs(a-n)>3&&(s=a,e&&e()),n=r,r=Math.round(s),r}},Cn=function(t,i,e){var r={};r[i.p]="+="+e,rt.set(t,r)},Yo=function(t,i){var e=Hi(t,i),r="_scroll"+i.p2,n=function s(a,l,u,c,p){var h=s.tween,f=l.onComplete,g={};u=u||e();var d=ml(e,u,function(){h.kill(),s.tween=0});return p=c&&p||0,c=c||a-u,h&&h.kill(),l[r]=a,l.inherit=!1,l.modifiers=g,g[r]=function(){return d(u+c*h.ratio+p*h.ratio*h.ratio)},l.onUpdate=function(){Ot.cache++,s.tween&&bi()},l.onComplete=function(){s.tween=0,f&&f.call(h)},h=s.tween=rt.to(t,l),h};return t[r]=e,e.wheelHandler=function(){return n.tween&&n.tween.kill()&&(n.tween=0)},le(t,"wheel",e.wheelHandler),Et.isTouch&&le(t,"touchmove",e.wheelHandler),n},Et=function(){function o(i,e){cr||o.register(rt)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),As(this),this.init(i,e)}var t=o.prototype;return t.init=function(e,r){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!Fr){this.update=this.refresh=this.kill=fi;return}e=zo(Ie(e)||Ir(e)||e.nodeType?{trigger:e}:e,wn);var n=e,s=n.onUpdate,a=n.toggleClass,l=n.id,u=n.onToggle,c=n.onRefresh,p=n.scrub,h=n.trigger,f=n.pin,g=n.pinSpacing,d=n.invalidateOnRefresh,b=n.anticipatePin,y=n.onScrubComplete,x=n.onSnapComplete,C=n.once,w=n.snap,T=n.pinReparent,M=n.pinSpacer,S=n.containerAnimation,z=n.fastScrollEnd,A=n.preventOverlaps,R=e.horizontal||e.containerAnimation&&e.horizontal!==!1?ke:oe,ft=!p&&p!==0,$=Me(e.scroller||Mt),xt=rt.core.getCache($),W=ir($),q=("pinType"in e?e.pinType:zi($,"pinType")||W&&"fixed")==="fixed",Y=[e.onEnter,e.onLeave,e.onEnterBack,e.onLeaveBack],I=ft&&e.toggleActions.split(" "),G="markers"in e?e.markers:wn.markers,nt=W?0:parseFloat(Ze($)["border"+R.p2+Pr])||0,v=this,wt=e.onRefreshInit&&function(){return e.onRefreshInit(v)},Rt=tc($,W,R),O=ec($,W),N=0,V=0,it=0,Z=Hi($,R),lt,ct,St,gt,vt,bt,Wt,te,re,E,we,$e,si,Bt,ii,je,oi,_,m,k,P,D,X,H,L,B,et,F,Q,J,ut,j,mt,ht,tt,dt,Lt,yt,Pt;if(v._startClamp=v._endClamp=!1,v._dir=R,b*=45,v.scroller=$,v.scroll=S?S.time.bind(S):Z,gt=Z(),v.vars=e,r=r||e.animation,"refreshPriority"in e&&(el=1,e.refreshPriority===-9999&&(Zr=v)),xt.tweenScroll=xt.tweenScroll||{top:Yo($,oe),left:Yo($,ke)},v.tweenTo=lt=xt.tweenScroll[R.p],v.scrubDuration=function(U){mt=Ir(U)&&U,mt?j?j.duration(U):j=rt.to(r,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:mt,paused:!0,onComplete:function(){return y&&y(v)}}):(j&&j.progress(1).kill(),j=0)},r&&(r.vars.lazy=!1,r._initted&&!v.isReverted||r.vars.immediateRender!==!1&&e.immediateRender!==!1&&r.duration()&&r.render(0,!0,!0),v.animation=r.pause(),r.scrollTrigger=v,v.scrubDuration(p),J=0,l||(l=r.vars.id)),w&&((!Ui(w)||w.push)&&(w={snapTo:w}),"scrollBehavior"in Dt.style&&rt.set(W?[Dt,We]:$,{scrollBehavior:"auto"}),Ot.forEach(function(U){return xe(U)&&U.target===(W?zt.scrollingElement||We:$)&&(U.smooth=!1)}),St=xe(w.snapTo)?w.snapTo:w.snapTo==="labels"?rc(r):w.snapTo==="labelsDirectional"?nc(r):w.directional!==!1?function(U,pt){return oo(w.snapTo)(U,ve()-V<500?0:pt.direction)}:rt.utils.snap(w.snapTo),ht=w.duration||{min:.1,max:2},ht=Ui(ht)?Ur(ht.min,ht.max):Ur(ht,ht),tt=rt.delayedCall(w.delay||mt/2||.1,function(){var U=Z(),pt=ve()-V<500,ot=lt.tween;if((pt||Math.abs(v.getVelocity())<10)&&!ot&&!Kn&&N!==U){var _t=(U-bt)/Bt,$t=r&&!ft?r.totalProgress():_t,kt=pt?0:($t-ut)/(ve()-zr)*1e3||0,Qt=rt.utils.clamp(-_t,1-_t,lr(kt/2)*kt/.185),pe=_t+(w.inertia===!1?0:Qt),jt,Yt,Nt=w,ri=Nt.onStart,Vt=Nt.onInterrupt,Fe=Nt.onComplete;if(jt=St(pe,v),Ir(jt)||(jt=pe),Yt=Math.max(0,Math.round(bt+jt*Bt)),U<=Wt&&U>=bt&&Yt!==U){if(ot&&!ot._initted&&ot.data<=lr(Yt-U))return;w.inertia===!1&&(Qt=jt-_t),lt(Yt,{duration:ht(lr(Math.max(lr(pe-$t),lr(jt-$t))*.185/kt/.05||0)),ease:w.ease||"power3",data:lr(Yt-U),onInterrupt:function(){return tt.restart(!0)&&Vt&&ar(v,Vt)},onComplete:function(){v.update(),N=Z(),r&&!ft&&(j?j.resetTo("totalProgress",jt,r._tTime/r._tDur):r.progress(jt)),J=ut=r&&!ft?r.totalProgress():v.progress,x&&x(v),Fe&&ar(v,Fe)}},U,Qt*Bt,Yt-U-Qt*Bt),ri&&ar(v,ri,lt.tween)}}else v.isActive&&N!==U&&tt.restart(!0)}).pause()),l&&(Ls[l]=v),h=v.trigger=Me(h||f!==!0&&f),Pt=h&&h._gsap&&h._gsap.stRevert,Pt&&(Pt=Pt(v)),f=f===!0?h:Me(f),Ie(a)&&(a={targets:h,className:a}),f&&(g===!1||g===Qe||(g=!g&&f.parentNode&&f.parentNode.style&&Ze(f.parentNode).display==="flex"?!1:ee),v.pin=f,ct=rt.core.getCache(f),ct.spacer?ii=ct.pinState:(M&&(M=Me(M),M&&!M.nodeType&&(M=M.current||M.nativeElement),ct.spacerIsNative=!!M,M&&(ct.spacerState=Tn(M))),ct.spacer=_=M||zt.createElement("div"),_.classList.add("pin-spacer"),l&&_.classList.add("pin-spacer-"+l),ct.pinState=ii=Tn(f)),e.force3D!==!1&&rt.set(f,{force3D:!0}),v.spacer=_=ct.spacer,Q=Ze(f),H=Q[g+R.os2],k=rt.getProperty(f),P=rt.quickSetter(f,R.a,se),cs(f,_,Q),oi=Tn(f)),G){$e=Ui(G)?zo(G,Fo):Fo,E=Sn("scroller-start",l,$,R,$e,0),we=Sn("scroller-end",l,$,R,$e,0,E),m=E["offset"+R.op.d2];var Ft=Me(zi($,"content")||$);te=this.markerStart=Sn("start",l,Ft,R,$e,m,0,S),re=this.markerEnd=Sn("end",l,Ft,R,$e,m,0,S),S&&(yt=rt.quickSetter([te,re],R.a,se)),!q&&!(gi.length&&zi($,"fixedMarkers")===!0)&&(ic(W?Dt:$),rt.set([E,we],{force3D:!0}),B=rt.quickSetter(E,R.a,se),F=rt.quickSetter(we,R.a,se))}if(S){var at=S.vars.onUpdate,K=S.vars.onUpdateParams;S.eventCallback("onUpdate",function(){v.update(0,0,1),at&&at.apply(S,K||[])})}if(v.previous=function(){return Ct[Ct.indexOf(v)-1]},v.next=function(){return Ct[Ct.indexOf(v)+1]},v.revert=function(U,pt){if(!pt)return v.kill(!0);var ot=U!==!1||!v.enabled,_t=me;ot!==v.isReverted&&(ot&&(dt=Math.max(Z(),v.scroll.rec||0),it=v.progress,Lt=r&&r.progress()),te&&[te,re,E,we].forEach(function($t){return $t.style.display=ot?"none":"block"}),ot&&(me=v,v.update(ot)),f&&(!T||!v.isActive)&&(ot?ac(f,_,ii):cs(f,_,Ze(f),L)),ot||v.update(ot),me=_t,v.isReverted=ot)},v.refresh=function(U,pt,ot,_t){if(!((me||!v.enabled)&&!pt)){if(f&&U&&ei){le(o,"scrollEnd",hl);return}!Pe&&wt&&wt(v),me=v,lt.tween&&!ot&&(lt.tween.kill(),lt.tween=0),j&&j.pause(),d&&r&&(r.revert({kill:!1}).invalidate(),r.getChildren?r.getChildren(!0,!0,!1).forEach(function(Ti){return Ti.vars.immediateRender&&Ti.render(0,!0,!0)}):r.vars.immediateRender&&r.render(0,!0,!0)),v.isReverted||v.revert(!0,!0),v._subPinOffset=!1;var $t=Rt(),kt=O(),Qt=S?S.duration():pi($,R),pe=Bt<=.01||!Bt,jt=0,Yt=_t||0,Nt=Ui(ot)?ot.end:e.end,ri=e.endTrigger||h,Vt=Ui(ot)?ot.start:e.start||(e.start===0||!h?0:f?"0 0":"0 100%"),Fe=v.pinnedContainer=e.pinnedContainer&&Me(e.pinnedContainer,v),ai=h&&Math.max(0,Ct.indexOf(v))||0,ce=ai,fe,ge,Bi,fn,_e,ne,li,Qn,lo,kr,ui,Mr,hn;for(G&&Ui(ot)&&(Mr=rt.getProperty(E,R.p),hn=rt.getProperty(we,R.p));ce-- >0;)ne=Ct[ce],ne.end||ne.refresh(0,1)||(me=v),li=ne.pin,li&&(li===h||li===f||li===Fe)&&!ne.isReverted&&(kr||(kr=[]),kr.unshift(ne),ne.revert(!0,!0)),ne!==Ct[ce]&&(ai--,ce--);for(xe(Vt)&&(Vt=Vt(v)),Vt=Ao(Vt,"start",v),bt=Wo(Vt,h,$t,R,Z(),te,E,v,kt,nt,q,Qt,S,v._startClamp&&"_startClamp")||(f?-.001:0),xe(Nt)&&(Nt=Nt(v)),Ie(Nt)&&!Nt.indexOf("+=")&&(~Nt.indexOf(" ")?Nt=(Ie(Vt)?Vt.split(" ")[0]:"")+Nt:(jt=An(Nt.substr(2),$t),Nt=Ie(Vt)?Vt:(S?rt.utils.mapRange(0,S.duration(),S.scrollTrigger.start,S.scrollTrigger.end,bt):bt)+jt,ri=h)),Nt=Ao(Nt,"end",v),Wt=Math.max(bt,Wo(Nt||(ri?"100% 0":Qt),ri,$t,R,Z()+jt,re,we,v,kt,nt,q,Qt,S,v._endClamp&&"_endClamp"))||-.001,jt=0,ce=ai;ce--;)ne=Ct[ce]||{},li=ne.pin,li&&ne.start-ne._pinPush<=bt&&!S&&ne.end>0&&(fe=ne.end-(v._startClamp?Math.max(0,ne.start):ne.start),(li===h&&ne.start-ne._pinPush=pi($,R)))fe=Ze(f),fn=R===oe,Bi=Z(),D=parseFloat(k(R.a))+Yt,!Qt&&Wt>1&&(ui=(W?zt.scrollingElement||We:$).style,ui={style:ui,value:ui["overflow"+R.a.toUpperCase()]},W&&Ze(Dt)["overflow"+R.a.toUpperCase()]!=="scroll"&&(ui.style["overflow"+R.a.toUpperCase()]="scroll")),cs(f,_,fe),oi=Tn(f),ge=yi(f,!0),Qn=q&&Hi($,fn?ke:oe)(),g?(L=[g+R.os2,Bt+Yt+se],L.t=_,ce=g===ee?qn(f,R)+Bt+Yt:0,ce&&(L.push(R.d,ce+se),_.style.flexBasis!=="auto"&&(_.style.flexBasis=ce+se)),br(L),Fe&&Ct.forEach(function(Ti){Ti.pin===Fe&&Ti.vars.pinSpacing!==!1&&(Ti._subPinOffset=!0)}),q&&Z(dt)):(ce=qn(f,R),ce&&_.style.flexBasis!=="auto"&&(_.style.flexBasis=ce+se)),q&&(_e={top:ge.top+(fn?Bi-bt:Qn)+se,left:ge.left+(fn?Qn:Bi-bt)+se,boxSizing:"border-box",position:"fixed"},_e[Ji]=_e["max"+Pr]=Math.ceil(ge.width)+se,_e[tr]=_e["max"+so]=Math.ceil(ge.height)+se,_e[Qe]=_e[Qe+Kr]=_e[Qe+$r]=_e[Qe+Qr]=_e[Qe+jr]="0",_e[ee]=fe[ee],_e[ee+Kr]=fe[ee+Kr],_e[ee+$r]=fe[ee+$r],_e[ee+Qr]=fe[ee+Qr],_e[ee+jr]=fe[ee+jr],je=uc(ii,_e,T),Pe&&Z(0)),r?(lo=r._initted,os(1),r.render(r.duration(),!0,!0),X=k(R.a)-D+Bt+Yt,et=Math.abs(Bt-X)>1,q&&et&&je.splice(je.length-2,2),r.render(0,!0,!0),lo||r.invalidate(!0),r.parent||r.totalTime(r.totalTime()),os(0)):X=Bt,ui&&(ui.value?ui.style["overflow"+R.a.toUpperCase()]=ui.value:ui.style.removeProperty("overflow-"+R.a));else if(h&&Z()&&!S)for(ge=h.parentNode;ge&&ge!==Dt;)ge._pinOffset&&(bt-=ge._pinOffset,Wt-=ge._pinOffset),ge=ge.parentNode;kr&&kr.forEach(function(Ti){return Ti.revert(!1,!0)}),v.start=bt,v.end=Wt,gt=vt=Pe?dt:Z(),!S&&!Pe&&(gt0?Ct.slice(0,pt).reverse():Ct.slice(pt+1);return(Ie(U)?ot.filter(function(_t){return _t.vars.preventOverlaps===U}):ot).filter(function(_t){return v.direction>0?_t.end<=bt:_t.start>=Wt})},v.update=function(U,pt,ot){if(!(S&&!ot&&!U)){var _t=Pe===!0?dt:v.scroll(),$t=U?0:(_t-bt)/Bt,kt=$t<0?0:$t>1?1:$t||0,Qt=v.progress,pe,jt,Yt,Nt,ri,Vt,Fe,ai;if(pt&&(vt=gt,gt=S?Z():_t,w&&(ut=J,J=r&&!ft?r.totalProgress():kt)),b&&f&&!me&&!vn&&ei&&(!kt&&bt<_t+(_t-vt)/(ve()-zr)*b?kt=1e-4:kt===1&&Wt>_t+(_t-vt)/(ve()-zr)*b&&(kt=.9999)),kt!==Qt&&v.enabled){if(pe=v.isActive=!!kt&&kt<1,jt=!!Qt&&Qt<1,Vt=pe!==jt,ri=Vt||!!kt!=!!Qt,v.direction=kt>Qt?1:-1,v.progress=kt,ri&&!me&&(Yt=kt&&!Qt?0:kt===1?1:Qt===1?2:3,ft&&(Nt=!Vt&&I[Yt+1]!=="none"&&I[Yt+1]||I[Yt],ai=r&&(Nt==="complete"||Nt==="reset"||Nt in r))),A&&(Vt||ai)&&(ai||p||!r)&&(xe(A)?A(v):v.getTrailing(A).forEach(function(Bi){return Bi.endAnimation()})),ft||(j&&!me&&!vn?(j._dp._time-j._start!==j._time&&j.render(j._dp._time-j._start),j.resetTo?j.resetTo("totalProgress",kt,r._tTime/r._tDur):(j.vars.totalProgress=kt,j.invalidate().restart())):r&&r.totalProgress(kt,!!(me&&(V||U)))),f){if(U&&g&&(_.style[g+R.os2]=H),!q)P(Nr(D+X*kt));else if(ri){if(Fe=!U&&kt>Qt&&Wt+1>_t&&_t+1>=pi($,R),T)if(!U&&(pe||Fe)){var ce=yi(f,!0),fe=_t-bt;Bo(f,Dt,ce.top+(R===oe?fe:0)+se,ce.left+(R===oe?0:fe)+se)}else Bo(f,_);br(pe||Fe?je:oi),et&&kt<1&&pe||P(D+(kt===1&&!Fe?X:0))}}w&&!lt.tween&&!me&&!vn&&tt.restart(!0),a&&(Vt||C&&kt&&(kt<1||!as))&&ln(a.targets).forEach(function(Bi){return Bi.classList[pe||C?"add":"remove"](a.className)}),s&&!ft&&!U&&s(v),ri&&!me?(ft&&(ai&&(Nt==="complete"?r.pause().totalProgress(1):Nt==="reset"?r.restart(!0).pause():Nt==="restart"?r.restart(!0):r[Nt]()),s&&s(v)),(Vt||!as)&&(u&&Vt&&ar(v,u),Y[Yt]&&ar(v,Y[Yt]),C&&(kt===1?v.kill(!1,1):Y[Yt]=0),Vt||(Yt=kt===1?1:3,Y[Yt]&&ar(v,Y[Yt]))),z&&!pe&&Math.abs(v.getVelocity())>(Ir(z)?z:2500)&&(Rr(v.callbackAnimation),j?j.progress(1):Rr(r,Nt==="reverse"?1:!kt,1))):ft&&s&&!me&&s(v)}if(F){var ge=S?_t/S.duration()*(S._caScrollDist||0):_t;B(ge+(E._isFlipped?1:0)),F(ge)}yt&&yt(-_t/S.duration()*(S._caScrollDist||0))}},v.enable=function(U,pt){v.enabled||(v.enabled=!0,le($,"resize",Hr),W||le($,"scroll",ur),wt&&le(o,"refreshInit",wt),U!==!1&&(v.progress=it=0,gt=vt=N=Z()),pt!==!1&&v.refresh())},v.getTween=function(U){return U&<?lt.tween:j},v.setPositions=function(U,pt,ot,_t){if(S){var $t=S.scrollTrigger,kt=S.duration(),Qt=$t.end-$t.start;U=$t.start+Qt*U/kt,pt=$t.start+Qt*pt/kt}v.refresh(!1,!1,{start:Ro(U,ot&&!!v._startClamp),end:Ro(pt,ot&&!!v._endClamp)},_t),v.update()},v.adjustPinSpacing=function(U){if(L&&U){var pt=L.indexOf(R.d)+1;L[pt]=parseFloat(L[pt])+U+se,L[1]=parseFloat(L[1])+U+se,br(L)}},v.disable=function(U,pt){if(U!==!1&&v.revert(!0,!0),v.enabled&&(v.enabled=v.isActive=!1,pt||j&&j.pause(),dt=0,ct&&(ct.uncache=1),wt&&ae(o,"refreshInit",wt),tt&&(tt.pause(),lt.tween&<.tween.kill()&&(lt.tween=0)),!W)){for(var ot=Ct.length;ot--;)if(Ct[ot].scroller===$&&Ct[ot]!==v)return;ae($,"resize",Hr),W||ae($,"scroll",ur)}},v.kill=function(U,pt){v.disable(U,pt),j&&!pt&&j.kill(),l&&delete Ls[l];var ot=Ct.indexOf(v);ot>=0&&Ct.splice(ot,1),ot===Ee&&Ln>0&&Ee--,ot=0,Ct.forEach(function(_t){return _t.scroller===v.scroller&&(ot=1)}),ot||Pe||(v.scroll.rec=0),r&&(r.scrollTrigger=null,U&&r.revert({kill:!1}),pt||r.kill()),te&&[te,re,E,we].forEach(function(_t){return _t.parentNode&&_t.parentNode.removeChild(_t)}),Zr===v&&(Zr=0),f&&(ct&&(ct.uncache=1),ot=0,Ct.forEach(function(_t){return _t.pin===f&&ot++}),ot||(ct.spacer=0)),e.onKill&&e.onKill(v)},Ct.push(v),v.enable(!1,!1),Pt&&Pt(v),r&&r.add&&!Bt){var Tt=v.update;v.update=function(){v.update=Tt,Ot.cache++,bt||Wt||v.refresh()},rt.delayedCall(.01,v.update),Bt=.01,bt=Wt=0}else v.refresh();f&&oc()},o.register=function(e){return cr||(rt=e||ol(),sl()&&window.document&&o.enable(),cr=Fr),cr},o.defaults=function(e){if(e)for(var r in e)wn[r]=e[r];return wn},o.disable=function(e,r){Fr=0,Ct.forEach(function(s){return s[r?"kill":"disable"](e)}),ae(Mt,"wheel",ur),ae(zt,"scroll",ur),clearInterval(mn),ae(zt,"touchcancel",fi),ae(Dt,"touchstart",fi),xn(ae,zt,"pointerdown,touchstart,mousedown",Lo),xn(ae,zt,"pointerup,touchend,mouseup",Do),Vn.kill(),yn(ae);for(var n=0;n0&&s.left+a0&&s.top+a=0&&Ne.splice(i,5),Ne.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),rt.core.getCache(t),As())}}):Ne};Et.revert=function(o,t){return ao(!o,t)};Et.create=function(o,t){return new Et(o,t)};Et.refresh=function(o){return o?Hr(!0):(cr||Et.register())&&$i(!0)};Et.update=function(o){return++Ot.cache&&bi(o===!0?2:0)};Et.clearScrollMemory=gl;Et.maxScroll=function(o,t){return pi(o,t?ke:oe)};Et.getScrollFunc=function(o,t){return Hi(Me(o),t?ke:oe)};Et.getById=function(o){return Ls[o]};Et.getAll=function(){return Ct.filter(function(o){return o.vars.id!=="ScrollSmoother"})};Et.isScrolling=function(){return!!ei};Et.snapDirectional=oo;Et.addEventListener=function(o,t){var i=rr[o]||(rr[o]=[]);~i.indexOf(t)||i.push(t)};Et.removeEventListener=function(o,t){var i=rr[o],e=i&&i.indexOf(t);e>=0&&i.splice(e,1)};Et.batch=function(o,t){var i=[],e={},r=t.interval||.016,n=t.batchMax||1e9,s=function(u,c){var p=[],h=[],f=rt.delayedCall(r,function(){c(p,h),p=[],h=[]}).pause();return function(g){p.length||f.restart(!0),p.push(g.trigger),h.push(g),n<=p.length&&f.progress(1)}},a;for(a in t)e[a]=a.substr(0,2)==="on"&&xe(t[a])&&a!=="onRefreshInit"?s(a,t[a]):t[a];return xe(n)&&(n=n(),le(Et,"refresh",function(){return n=t.batchMax()})),ln(o).forEach(function(l){var u={};for(a in e)u[a]=e[a];u.trigger=l,i.push(Et.create(u))}),i};var Xo=function(t,i,e,r){return i>r?t(r):i<0&&t(0),e>r?(r-i)/(e-i):e<0?i/(i-e):1},fs=function o(t,i){i===!0?t.style.removeProperty("touch-action"):t.style.touchAction=i===!0?"auto":i?"pan-"+i+(Jt.isTouch?" pinch-zoom":""):"none",t===We&&o(Dt,i)},En={auto:1,scroll:1},fc=function(t){var i=t.event,e=t.target,r=t.axis,n=(i.changedTouches?i.changedTouches[0]:i).target,s=n._gsap||rt.core.getCache(n),a=ve(),l;if(!s._isScrollT||a-s._isScrollT>2e3){for(;n&&n!==Dt&&(n.scrollHeight<=n.clientHeight&&n.scrollWidth<=n.clientWidth||!(En[(l=Ze(n)).overflowY]||En[l.overflowX]));)n=n.parentNode;s._isScroll=n&&n!==e&&!ir(n)&&(En[(l=Ze(n)).overflowY]||En[l.overflowX]),s._isScrollT=a}(s._isScroll||r==="x")&&(i.stopPropagation(),i._gsapAllow=!0)},vl=function(t,i,e,r){return Jt.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:i,onWheel:r=r&&fc,onPress:r,onDrag:r,onScroll:r,onEnable:function(){return e&&le(zt,Jt.eventTypes[0],qo,!1,!0)},onDisable:function(){return ae(zt,Jt.eventTypes[0],qo,!0)}})},hc=/(input|label|select|textarea)/i,Vo,qo=function(t){var i=hc.test(t.target.tagName);(i||Vo)&&(t._gsapAllow=!0,Vo=i)},dc=function(t){Ui(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 i=t,e=i.normalizeScrollX,r=i.momentum,n=i.allowNestedScroll,s=i.onRelease,a,l,u=Me(t.target)||We,c=rt.core.globals().ScrollSmoother,p=c&&c.get(),h=Ei&&(t.content&&Me(t.content)||p&&t.content!==!1&&!p.smooth()&&p.content()),f=Hi(u,oe),g=Hi(u,ke),d=1,b=(Jt.isTouch&&Mt.visualViewport?Mt.visualViewport.scale*Mt.visualViewport.width:Mt.outerWidth)/Mt.innerWidth,y=0,x=xe(r)?function(){return r(a)}:function(){return r||2.8},C,w,T=vl(u,t.type,!0,n),M=function(){return w=!1},S=fi,z=fi,A=function(){l=pi(u,oe),z=Ur(Ei?1:0,l),e&&(S=Ur(0,pi(u,ke))),C=er},R=function(){h._gsap.y=Nr(parseFloat(h._gsap.y)+f.offset)+"px",h.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(h._gsap.y)+", 0, 1)",f.offset=f.cacheID=0},ft=function(){if(w){requestAnimationFrame(M);var G=Nr(a.deltaY/2),nt=z(f.v-G);if(h&&nt!==f.v+f.offset){f.offset=nt-f.v;var v=Nr((parseFloat(h&&h._gsap.y)||0)-f.offset);h.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+v+", 0, 1)",h._gsap.y=v+"px",f.cacheID=Ot.cache,bi()}return!0}f.offset&&R(),w=!0},$,xt,W,q,Y=function(){A(),$.isActive()&&$.vars.scrollY>l&&(f()>l?$.progress(1)&&f(l):$.resetTo("scrollY",l))};return h&&rt.set(h,{y:"+=0"}),t.ignoreCheck=function(I){return Ei&&I.type==="touchmove"&&ft()||d>1.05&&I.type!=="touchstart"||a.isGesturing||I.touches&&I.touches.length>1},t.onPress=function(){w=!1;var I=d;d=Nr((Mt.visualViewport&&Mt.visualViewport.scale||1)/b),$.pause(),I!==d&&fs(u,d>1.01?!0:e?!1:"x"),xt=g(),W=f(),A(),C=er},t.onRelease=t.onGestureStart=function(I,G){if(f.offset&&R(),!G)q.restart(!0);else{Ot.cache++;var nt=x(),v,wt;e&&(v=g(),wt=v+nt*.05*-I.velocityX/.227,nt*=Xo(g,v,wt,pi(u,ke)),$.vars.scrollX=S(wt)),v=f(),wt=v+nt*.05*-I.velocityY/.227,nt*=Xo(f,v,wt,pi(u,oe)),$.vars.scrollY=z(wt),$.invalidate().duration(nt).play(.01),(Ei&&$.vars.scrollY>=l||v>=l-1)&&rt.to({},{onUpdate:Y,duration:nt})}s&&s(I)},t.onWheel=function(){$._ts&&$.pause(),ve()-y>1e3&&(C=0,y=ve())},t.onChange=function(I,G,nt,v,wt){if(er!==C&&A(),G&&e&&g(S(v[2]===G?xt+(I.startX-I.x):g()+G-v[1])),nt){f.offset&&R();var Rt=wt[2]===nt,O=Rt?W+I.startY-I.y:f()+nt-wt[1],N=z(O);Rt&&O!==N&&(W+=N-O),f(N)}(nt||G)&&bi()},t.onEnable=function(){fs(u,e?!1:"x"),Et.addEventListener("refresh",Y),le(Mt,"resize",Y),f.smooth&&(f.target.style.scrollBehavior="auto",f.smooth=g.smooth=!1),T.enable()},t.onDisable=function(){fs(u,!0),ae(Mt,"resize",Y),Et.removeEventListener("refresh",Y),T.kill()},t.lockAxis=t.lockAxis!==!1,a=new Jt(t),a.iOS=Ei,Ei&&!f()&&f(1),Ei&&rt.ticker.add(fi),q=a._dc,$=rt.to(a,{ease:"power4",paused:!0,inherit:!1,scrollX:e?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:ml(f,f(),function(){return $.pause()})},onUpdate:bi,onComplete:q.vars.onComplete}),a};Et.sort=function(o){if(xe(o))return Ct.sort(o);var t=Mt.pageYOffset||0;return Et.getAll().forEach(function(i){return i._sortY=i.trigger?t+i.trigger.getBoundingClientRect().top:i.start+Mt.innerHeight}),Ct.sort(o||function(i,e){return(i.vars.refreshPriority||0)*-1e6+(i.vars.containerAnimation?1e6:i._sortY)-((e.vars.containerAnimation?1e6:e._sortY)+(e.vars.refreshPriority||0)*-1e6)})};Et.observe=function(o){return new Jt(o)};Et.normalizeScroll=function(o){if(typeof o>"u")return Ce;if(o===!0&&Ce)return Ce.enable();if(o===!1){Ce&&Ce.kill(),Ce=o;return}var t=o instanceof Jt?o:dc(o);return Ce&&Ce.target===t.target&&Ce.kill(),ir(t.target)&&(Ce=t),t};Et.core={_getVelocityProp:ks,_inputObserver:vl,_scrollers:Ot,_proxies:gi,bridge:{ss:function(){ei||nr("scrollStart"),ei=ve()},ref:function(){return me}}};ol()&&rt.registerPlugin(Et);var Uo="1.3.26";function yl(o,t,i){return Math.max(o,Math.min(t,i))}function pc(o,t,i){return(1-i)*o+i*t}function gc(o,t,i,e){return pc(o,t,1-Math.exp(-i*e))}function _c(o,t){return(o%t+t)%t}var mc=class{constructor(){st(this,"isRunning",!1);st(this,"value",0);st(this,"from",0);st(this,"to",0);st(this,"currentTime",0);st(this,"lerp");st(this,"duration");st(this,"easing");st(this,"onUpdate")}advance(o){var i;if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=o;const e=yl(0,this.currentTime/this.duration,1);t=e>=1;const r=t?1:this.easing(e);this.value=this.from+(this.to-this.from)*r}else this.lerp?(this.value=gc(this.value,this.to,this.lerp*60,o),Math.round(this.value)===Math.round(this.to)&&(this.value=this.to,t=!0)):(this.value=this.to,t=!0);t&&this.stop(),(i=this.onUpdate)==null||i.call(this,this.value,t)}stop(){this.isRunning=!1}fromTo(o,t,{lerp:i,duration:e,easing:r,onStart:n,onUpdate:s}){this.from=this.value=o,this.to=t,this.lerp=i,this.duration=e,this.easing=r,this.currentTime=0,this.isRunning=!0,n==null||n(),this.onUpdate=s}};function vc(o,t){let i;return function(...e){clearTimeout(i),i=setTimeout(()=>{i=void 0,o.apply(this,e)},t)}}var yc=class{constructor(o,t,{autoResize:i=!0,debounce:e=250}={}){st(this,"width",0);st(this,"height",0);st(this,"scrollHeight",0);st(this,"scrollWidth",0);st(this,"debouncedResize");st(this,"wrapperResizeObserver");st(this,"contentResizeObserver");st(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});st(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});st(this,"onContentResize",()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)});this.wrapper=o,this.content=t,i&&(this.debouncedResize=vc(this.resize,e),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){var o,t;(o=this.wrapperResizeObserver)==null||o.disconnect(),(t=this.contentResizeObserver)==null||t.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},xl=class{constructor(){st(this,"events",{})}emit(o,...t){var e;const i=this.events[o]||[];for(let r=0,n=i.length;r{var i;this.events[o]=(i=this.events[o])==null?void 0:i.filter(e=>t!==e)}}off(o,t){var i;this.events[o]=(i=this.events[o])==null?void 0:i.filter(e=>t!==e)}destroy(){this.events={}}};const xc=100/6,Ci={passive:!1};function Go(o,t){return o===1?xc:o===2?t:1}var bc=class{constructor(o,t={wheelMultiplier:1,touchMultiplier:1}){st(this,"touchStart",{x:0,y:0});st(this,"lastDelta",{x:0,y:0});st(this,"window",{width:0,height:0});st(this,"emitter",new xl);st(this,"onTouchStart",o=>{const{clientX:t,clientY:i}=o.targetTouches?o.targetTouches[0]:o;this.touchStart.x=t,this.touchStart.y=i,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:o})});st(this,"onTouchMove",o=>{const{clientX:t,clientY:i}=o.targetTouches?o.targetTouches[0]:o,e=-(t-this.touchStart.x)*this.options.touchMultiplier,r=-(i-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=t,this.touchStart.y=i,this.lastDelta={x:e,y:r},this.emitter.emit("scroll",{deltaX:e,deltaY:r,event:o})});st(this,"onTouchEnd",o=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:o})});st(this,"onWheel",o=>{let{deltaX:t,deltaY:i,deltaMode:e}=o;const r=Go(e,this.window.width),n=Go(e,this.window.height);t*=r,i*=n,t*=this.options.wheelMultiplier,i*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:i,event:o})});st(this,"onWindowResize",()=>{this.window={width:window.innerWidth,height:window.innerHeight}});this.element=o,this.options=t,window.addEventListener("resize",this.onWindowResize),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,Ci),this.element.addEventListener("touchstart",this.onTouchStart,Ci),this.element.addEventListener("touchmove",this.onTouchMove,Ci),this.element.addEventListener("touchend",this.onTouchEnd,Ci)}on(o,t){return this.emitter.on(o,t)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize),this.element.removeEventListener("wheel",this.onWheel,Ci),this.element.removeEventListener("touchstart",this.onTouchStart,Ci),this.element.removeEventListener("touchmove",this.onTouchMove,Ci),this.element.removeEventListener("touchend",this.onTouchEnd,Ci)}};const $o=o=>Math.min(1,1.001-2**(-10*o));var wc=class{constructor({wrapper:o=window,content:t=document.documentElement,eventsTarget:i=o,smoothWheel:e=!0,syncTouch:r=!1,syncTouchLerp:n=.075,touchInertiaExponent:s=1.7,duration:a,easing:l,lerp:u=.1,infinite:c=!1,orientation:p="vertical",gestureOrientation:h=p==="horizontal"?"both":"vertical",touchMultiplier:f=1,wheelMultiplier:g=1,autoResize:d=!0,prevent:b,virtualScroll:y,overscroll:x=!0,autoRaf:C=!1,anchors:w=!1,autoToggle:T=!1,allowNestedScroll:M=!1,__experimental__naiveDimensions:S=!1,naiveDimensions:z=S,stopInertiaOnNavigate:A=!1,respectReducedMotion:R=!0}={}){st(this,"_isScrolling",!1);st(this,"_isStopped",!1);st(this,"_isLocked",!1);st(this,"_preventNextNativeScrollEvent",!1);st(this,"_resetVelocityTimeout",null);st(this,"_rafId",null);st(this,"_isDraggingSelection",!1);st(this,"reducedMotionMediaQuery",window.matchMedia("(prefers-reduced-motion: reduce)"));st(this,"isTouching");st(this,"isIos");st(this,"time",0);st(this,"userData",{});st(this,"lastVelocity",0);st(this,"velocity",0);st(this,"direction",0);st(this,"options");st(this,"targetScroll");st(this,"animatedScroll");st(this,"animate",new mc);st(this,"emitter",new xl);st(this,"dimensions");st(this,"virtualScroll");st(this,"onScrollEnd",o=>{o instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&o.stopPropagation()});st(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});st(this,"onTransitionEnd",o=>{var t;(t=o.propertyName)!=null&&t.includes("overflow")&&o.target===this.rootElement&&this.checkOverflow()});st(this,"onClick",o=>{const t=o.composedPath().filter(e=>e instanceof HTMLAnchorElement&&e.href).map(e=>new URL(e.href)),i=new URL(window.location.href);if(this.options.anchors){const e=t.find(r=>i.host===r.host&&i.pathname===r.pathname&&r.hash);if(e){const r=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,n=decodeURIComponent(e.hash);this.scrollTo(n,r);return}}if(this.options.stopInertiaOnNavigate&&t.some(e=>i.host===e.host&&i.pathname!==e.pathname)){this.reset();return}});st(this,"onPointerDown",o=>{o.button===1&&this.reset()});st(this,"onVirtualScroll",o=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(o)===!1)return;const{deltaX:t,deltaY:i,event:e}=o;if(this.emitter.emit("virtual-scroll",{deltaX:t,deltaY:i,event:e}),e.ctrlKey||e.lenisStopPropagation)return;const r=e.type.includes("touch"),n=e.type.includes("wheel");if(r&&this.isIos&&(e.type==="touchstart"&&(this._isDraggingSelection=this.isTouchOnSelectionHandle(e)),this._isDraggingSelection)){e.type==="touchend"&&(this._isDraggingSelection=!1);return}this.isTouching=e.type==="touchstart"||e.type==="touchmove";const s=t===0&&i===0;if(this.options.syncTouch&&r&&e.type==="touchstart"&&s&&!this.isStopped&&!this.isLocked){this.reset();return}const a=this.options.gestureOrientation==="vertical"&&i===0||this.options.gestureOrientation==="horizontal"&&t===0;if(s||a)return;let l=e.composedPath();l=l.slice(0,l.indexOf(this.rootElement));const u=this.options.prevent,c=Math.abs(t)>=Math.abs(i)?"horizontal":"vertical";if(l.find(g=>{var d,b,y,x,C;return g instanceof HTMLElement&&(typeof u=="function"&&(u==null?void 0:u(g))||((d=g.hasAttribute)==null?void 0:d.call(g,"data-lenis-prevent"))||c==="vertical"&&((b=g.hasAttribute)==null?void 0:b.call(g,"data-lenis-prevent-vertical"))||c==="horizontal"&&((y=g.hasAttribute)==null?void 0:y.call(g,"data-lenis-prevent-horizontal"))||r&&((x=g.hasAttribute)==null?void 0:x.call(g,"data-lenis-prevent-touch"))||n&&((C=g.hasAttribute)==null?void 0:C.call(g,"data-lenis-prevent-wheel"))||this.options.allowNestedScroll&&this.hasNestedScroll(g,{deltaX:t,deltaY:i}))}))return;if(this.isStopped||this.isLocked){e.cancelable&&e.preventDefault();return}if(!(this.options.syncTouch&&r||this.options.smoothWheel&&n)){this.isScrolling="native",this.animate.stop(),e.lenisStopPropagation=!0;return}let p=i;this.options.gestureOrientation==="both"?p=Math.abs(i)>Math.abs(t)?i:t:this.options.gestureOrientation==="horizontal"&&(p=t),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll0||this.animatedScroll===this.limit&&i<0))&&(e.lenisStopPropagation=!0),e.cancelable&&e.preventDefault();const h=r&&this.options.syncTouch,f=r&&e.type==="touchend";f&&(p=Math.sign(p)*Math.abs(this.velocity)**this.options.touchInertiaExponent),this.scrollTo(this.targetScroll+p,{programmatic:!1,...h?{lerp:f?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});st(this,"onNativeScroll",()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){const o=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-o,this.direction=Math.sign(this.animatedScroll-o),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}});st(this,"raf",o=>{const t=o-(this.time||o);this.time=o,this.animate.advance(t*.001),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))});window.lenisVersion=Uo,window.lenis||(window.lenis={}),window.lenis.version=Uo,p==="horizontal"&&(window.lenis.horizontal=!0),r===!0&&(window.lenis.touch=!0),this.isIos=/(iPad|iPhone|iPod)/g.test(navigator.userAgent),(!o||o===document.documentElement)&&(o=window),typeof a=="number"&&typeof l!="function"?l=$o:typeof l=="function"&&typeof a!="number"&&(a=1),this.options={wrapper:o,content:t,eventsTarget:i,smoothWheel:e,syncTouch:r,syncTouchLerp:n,touchInertiaExponent:s,duration:a,easing:l,lerp:u,infinite:c,gestureOrientation:h,orientation:p,touchMultiplier:f,wheelMultiplier:g,autoResize:d,prevent:b,virtualScroll:y,overscroll:x,autoRaf:C,anchors:w,autoToggle:T,allowNestedScroll:M,naiveDimensions:z,stopInertiaOnNavigate:A,respectReducedMotion:R},this.dimensions=new yc(o,t,{autoResize:d}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown),this.virtualScroll=new bc(i,{touchMultiplier:f,wheelMultiplier:g}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd)),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(o,t){return this.emitter.on(o,t)}off(o,t){return this.emitter.off(o,t)}get overflow(){const o=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[o]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}setScroll(o){this.isHorizontal?this.options.wrapper.scrollTo({left:o,behavior:"instant"}):this.options.wrapper.scrollTo({top:o,behavior:"instant"})}isTouchOnSelectionHandle(o){const t=window.getSelection();if(!t||t.isCollapsed||t.rangeCount===0)return!1;const i=o.targetTouches[0]??o.changedTouches[0];if(!i)return!1;const e=t.getRangeAt(0).getClientRects();if(e.length===0)return!1;const r=e[0],n=e[e.length-1],s=40,a=Math.hypot(i.clientX-r.left,i.clientY-r.top)<=s,l=Math.hypot(i.clientX-n.right,i.clientY-n.bottom)<=s;return a||l}resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}scrollTo(o,{offset:t=0,immediate:i=!1,lock:e=!1,programmatic:r=!0,lerp:n=r?this.options.lerp:void 0,duration:s=r?this.options.duration:void 0,easing:a=r?this.options.easing:void 0,onStart:l,onComplete:u,force:c=!1,userData:p}={}){if(this.prefersReducedMotion&&(r?i=!0:(n=1,s=void 0,a=void 0)),(this.isStopped||this.isLocked)&&!c)return;let h=o,f=t;if(typeof h=="string"&&["top","left","start","#"].includes(h))h=0;else if(typeof h=="string"&&["bottom","right","end"].includes(h))h=this.limit;else{let g=null;if(typeof h=="string"?(g=h.startsWith("#")?document.getElementById(h.slice(1)):document.querySelector(h),g||(h==="#top"?h=0:console.warn("Lenis: Target not found",h))):h instanceof HTMLElement&&(h!=null&&h.nodeType)&&(g=h),g){if(this.options.wrapper!==window){const w=this.rootElement.getBoundingClientRect();f-=this.isHorizontal?w.left:w.top}const d=g.getBoundingClientRect(),b=getComputedStyle(g),y=this.isHorizontal?Number.parseFloat(b.scrollMarginLeft):Number.parseFloat(b.scrollMarginTop),x=getComputedStyle(this.rootElement),C=this.isHorizontal?Number.parseFloat(x.scrollPaddingLeft):Number.parseFloat(x.scrollPaddingTop);h=(this.isHorizontal?d.left:d.top)+this.animatedScroll-(Number.isNaN(y)?0:y)-(Number.isNaN(C)?0:C)}}if(typeof h=="number"){if(h+=f,this.options.infinite){if(r){this.targetScroll=this.animatedScroll=this.scroll;const g=h-this.animatedScroll;g>this.limit/2?h-=this.limit:g<-this.limit/2&&(h+=this.limit)}}else h=yl(0,h,this.limit);if(h===this.targetScroll){l==null||l(this),u==null||u(this);return}if(this.userData=p??{},i){this.animatedScroll=this.targetScroll=h,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),u==null||u(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}r||(this.targetScroll=h),typeof s=="number"&&typeof a!="function"?a=$o:typeof a=="function"&&typeof s!="number"&&(s=1),this.animate.fromTo(this.animatedScroll,h,{duration:s,easing:a,lerp:n,onStart:()=>{e&&(this.isLocked=!0),this.isScrolling="smooth",l==null||l(this)},onUpdate:(g,d)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=g-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=g,this.setScroll(this.scroll),r&&(this.targetScroll=g),d||this.emit(),d&&(this.reset(),this.emit(),u==null||u(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}hasNestedScroll(o,{deltaX:t,deltaY:i}){const e=Date.now();o._lenis||(o._lenis={});const r=o._lenis;let n,s,a,l,u,c,p,h,f,g;if(e-(r.time??0)>2e3){r.time=Date.now();const M=window.getComputedStyle(o);if(r.computedStyle=M,n=["auto","overlay","scroll"].includes(M.overflowX),s=["auto","overlay","scroll"].includes(M.overflowY),u=["auto"].includes(M.overscrollBehaviorX),c=["auto"].includes(M.overscrollBehaviorY),r.hasOverflowX=n,r.hasOverflowY=s,!(n||s))return!1;p=o.scrollWidth,h=o.scrollHeight,f=o.clientWidth,g=o.clientHeight,a=p>f,l=h>g,r.isScrollableX=a,r.isScrollableY=l,r.scrollWidth=p,r.scrollHeight=h,r.clientWidth=f,r.clientHeight=g,r.hasOverscrollBehaviorX=u,r.hasOverscrollBehaviorY=c}else a=r.isScrollableX,l=r.isScrollableY,n=r.hasOverflowX,s=r.hasOverflowY,p=r.scrollWidth,h=r.scrollHeight,f=r.clientWidth,g=r.clientHeight,u=r.hasOverscrollBehaviorX,c=r.hasOverscrollBehaviorY;if(!(n&&a||s&&l))return!1;const d=Math.abs(t)>=Math.abs(i)?"horizontal":"vertical";let b,y,x,C,w,T;if(d==="horizontal")b=Math.round(o.scrollLeft),y=p-f,x=t,C=n,w=a,T=u;else if(d==="vertical")b=Math.round(o.scrollTop),y=h-g,x=i,C=s,w=l,T=c;else return!1;return!T&&(b>=y||b<=0)?!0:(x>0?b0)&&C&&w}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){const o=this.options.wrapper;return this.isHorizontal?o.scrollX??o.scrollLeft:o.scrollY??o.scrollTop}get scroll(){return this.options.infinite?_c(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(o){this._isScrolling!==o&&(this._isScrolling=o,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(o){this._isStopped!==o&&(this._isStopped=o,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(o){this._isLocked!==o&&(this._isLocked=o,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get prefersReducedMotion(){return this.options.respectReducedMotion&&this.reducedMotionMediaQuery.matches}get className(){let o="lenis";return this.options.autoToggle&&(o+=" lenis-autoToggle"),this.isStopped&&(o+=" lenis-stopped"),this.isLocked&&(o+=" lenis-locked"),this.isScrolling&&(o+=" lenis-scrolling"),this.isScrolling==="smooth"&&(o+=" lenis-smooth"),o}updateClassName(){this.cleanUpClassName(),this.className.split(" ").forEach(o=>{this.rootElement.classList.add(o)})}cleanUpClassName(){for(const o of Array.from(this.rootElement.classList))(o==="lenis"||o.startsWith("lenis-"))&&this.rootElement.classList.remove(o)}},Sc={exports:{}};(function(o,t){(function(i,e){o.exports=e()})(window,function(){return function(i){var e={};function r(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return i[n].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=i,r.c=e,r.d=function(n,s,a){r.o(n,s)||Object.defineProperty(n,s,{enumerable:!0,get:a})},r.r=function(n){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.t=function(n,s){if(1&s&&(n=r(n)),8&s||4&s&&typeof n=="object"&&n&&n.__esModule)return n;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:n}),2&s&&typeof n!="string")for(var l in n)r.d(a,l,(function(u){return n[u]}).bind(null,l));return a},r.n=function(n){var s=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(s,"a",s),s},r.o=function(n,s){return Object.prototype.hasOwnProperty.call(n,s)},r.p="",r(r.s=0)}([function(i,e,r){r.r(e);var n,s="fslightbox-",a="".concat(s,"styles"),l="".concat(s,"cursor-grabbing"),u="".concat(s,"full-dimension"),c="".concat(s,"flex-centered"),p="".concat(s,"open"),h="".concat(s,"transform-transition"),f="".concat(s,"absoluted"),g="".concat(s,"slide-btn"),d="".concat(g,"-container"),b="".concat(s,"fade-in"),y="".concat(s,"fade-out"),x=b+"-strong",C=y+"-strong",w="".concat(s,"opacity-"),T="".concat(w,"1"),M="".concat(s,"source");function S(_){return(S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m})(_)}function z(_){var m=_.stageIndexes,k=_.core.stageManager,P=_.props.sources.length-1;k.getPreviousSlideIndex=function(){return m.current===0?P:m.current-1},k.getNextSlideIndex=function(){return m.current===P?0:m.current+1},k.updateStageIndexes=P===0?function(){}:P===1?function(){m.current===0?(m.next=1,delete m.previous):(m.previous=0,delete m.next)}:function(){m.previous=k.getPreviousSlideIndex(),m.next=k.getNextSlideIndex()},k.i=P<=2?function(){return!0}:function(D){var X=m.current;if(X===0&&D===P||X===P&&D===0)return!0;var H=X-D;return H===-1||H===0||H===1}}(typeof window>"u"?"undefined":S(window))==="object"&&((n=document.createElement("style")).className=a,n.appendChild(document.createTextNode(".fslightbox-absoluted{position:absolute;top:0;left:0}.fslightbox-fade-in{animation:fslightbox-fade-in .3s cubic-bezier(0,0,.7,1)}.fslightbox-fade-out{animation:fslightbox-fade-out .3s ease}.fslightbox-fade-in-strong{animation:fslightbox-fade-in-strong .3s cubic-bezier(0,0,.7,1)}.fslightbox-fade-out-strong{animation:fslightbox-fade-out-strong .3s ease}@keyframes fslightbox-fade-in{from{opacity:.65}to{opacity:1}}@keyframes fslightbox-fade-out{from{opacity:.35}to{opacity:0}}@keyframes fslightbox-fade-in-strong{from{opacity:.3}to{opacity:1}}@keyframes fslightbox-fade-out-strong{from{opacity:1}to{opacity:0}}.fslightbox-cursor-grabbing{cursor:grabbing}.fslightbox-full-dimension{width:100%;height:100%}.fslightbox-open{overflow:hidden;height:100%}.fslightbox-flex-centered{display:flex;justify-content:center;align-items:center}.fslightbox-opacity-0{opacity:0!important}.fslightbox-opacity-1{opacity:1!important}.fslightbox-scrollbarfix{padding-right:17px}.fslightbox-transform-transition{transition:transform .3s}.fslightbox-container::backdrop{display:none}.fslightbox-container{font-family:Arial,sans-serif;position:fixed;top:0;left:0;padding:0;border:0;max-width:none;max-height:none;background:linear-gradient(rgba(30,30,30,.9),#000 1810%);touch-action:pinch-zoom;overflow:hidden;z-index:1000000000;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.fslightbox-container *{box-sizing:border-box}.fslightbox-svg{width:20px;height:20px}.fslightbox-svgp{transition:fill .15s ease;fill:#ddd}.fslightbox-nav{height:45px;width:100%;position:absolute;top:0;left:0}.fslightboxsn{z-index:0;display:flex;align-items:center;margin:14px 0 0 11px;font-size:15px;color:#d7d7d7}.fslightboxsn span{display:inline;vertical-align:middle}.fslightboxsl{display:inline-block!important;margin:0 5px;width:1px;height:12px;transform:rotate(15deg);background:white}.fslightbox-toolbar{position:absolute;z-index:3;right:0;top:0;height:100%;display:flex}.fslightbox-toolbar-button{width:45px;height:100%}.fslightbox-fsx{width:24px;height:24px}.fslightboxb{border:0;background:rgba(35,35,35,.65);cursor:pointer}.fslightboxb:focus{outline:0}.fslightboxb:focus .fslightbox-svgp{fill:#fff}.fslightboxb:hover .fslightbox-svgp{fill:#fff}.fslightbox-slide-btn-container{display:flex;align-items:center;padding:12px 12px 12px 6px;position:absolute;top:50%;cursor:pointer;z-index:3;transform:translateY(-50%)}.fslightbox-slide-btn-container-next{right:0;padding-left:12px;padding-right:3px}@media (min-width:476px){.fslightbox-slide-btn-container{padding:22px 22px 22px 6px}.fslightbox-slide-btn-container-next{padding-right:6px!important;padding-left:22px}}@media (min-width:768px){.fslightbox-slide-btn-container{padding:30px 30px 30px 6px}.fslightbox-slide-btn-container-next{padding-left:30px}.fslightbox-slide-btn{padding:10px}}.fslightbox-slide-btn-container:hover .fslightbox-svgp{fill:#fff}.fslightbox-slide-btn{padding:9px}.fslightbox-slide-btn-container-previous{left:0}@media (max-width:475.99px){.fslightbox-slide-btn-container-previous{padding-left:3px}}.fslightbox-down-event-detector{position:absolute;z-index:1}.fslightbox-slide-swiping-hoverer{z-index:4}.fslightbox-invalid-file-wrapper{font-size:22px;color:#eaebeb;margin:auto}.fslightboxv{object-fit:cover}.fslightbox-youtube-iframe{border:0}.fslightboxl{display:block;margin:auto;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:67px;height:67px}.fslightboxl div{box-sizing:border-box;display:block;position:absolute;width:54px;height:54px;margin:6px;border:5px solid;border-color:#999 transparent transparent transparent;border-radius:50%;animation:fslightboxl 1.2s cubic-bezier(.5,0,.5,1) infinite}.fslightboxl div:nth-child(1){animation-delay:-.45s}.fslightboxl div:nth-child(2){animation-delay:-.3s}.fslightboxl div:nth-child(3){animation-delay:-.15s}@keyframes fslightboxl{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fslightbox-source{position:relative;z-index:2;opacity:0}@media (min-width:1200px){.fslightboxsn{margin:15px 0 0 12px;font-size:16px;display:block}.fslightboxsl{margin:0 6px 1px 6px;height:14px}.fslightbox-slide-btn{padding:11px}.fslightbox-svg{width:22px;height:22px}.fslightbox-fsx{width:26px;height:26px}.fslightbox-fso{width:22px;height:22px}.fslightboxl div{width:60px;height:60px;border-width:6px;border-color:#999 transparent transparent transparent;border-radius:50%}}@media (min-width:1600px){.fslightbox-nav{height:50px}.fslightboxsn{display:flex;margin:19px 0 0 16px;font-size:20px}.fslightboxsl{margin:0 7px 1px 7px;height:16px;width:2px;background:#d7d7d7}.fslightbox-toolbar-button{width:50px}.fslightbox-slide-btn{padding:12px}.fslightbox-svg{width:24px;height:24px}.fslightbox-fsx{width:28px;height:28px}.fslightbox-fso{width:24px;height:24px}}")),document.head.appendChild(n));function A(_){var m,k=_.props,P=0,D={};this.getSourceTypeFromLocalStorageByUrl=function(H){return m[H]?m[H]:X(H)},this.handleReceivedSourceTypeForUrl=function(H,L){if(D[L]===!1&&(P--,H!=="invalid"?D[L]=H:delete D[L],P===0)){(function(B,et){for(var F in et)B[F]=et[F]})(m,D);try{localStorage.setItem("fslightbox-types",JSON.stringify(m))}catch{}}};var X=function(H){P++,D[H]=!1};if(k.disableLocalStorage)this.getSourceTypeFromLocalStorageByUrl=function(){},this.handleReceivedSourceTypeForUrl=function(){};else{try{m=JSON.parse(localStorage.getItem("fslightbox-types"))}catch{}m||(m={},this.getSourceTypeFromLocalStorageByUrl=X)}}function R(_,m,k,P){_.data;var D=_.elements.sources,X=k/P,H=0;this.adjustSize=function(){if((H=_.mw/X)<_.mh)return k<_.mw&&(H=P),L();H=P>_.mh?_.mh:P,L()};var L=function(){D[m].style.width=H*X+"px",D[m].style.height=H+"px"}}function ft(_,m){var k=this,P=_.collections.sourceSizers,D=_.elements,X=D.sourceAnimationWrappers,H=D.sources,L=_.isl,B=_.props.onSourceLoad,et=_.resolve;function F(Q,J){P[m]=et(R,[m,Q,J]),P[m].adjustSize()}this.b=function(Q,J){H[m].classList.add(T),k.a(),F(Q,J),k.b=F},this.a=function(){L[m]=!0,X[m].classList.add(x),X[m].removeChild(X[m].firstChild),B&&B(_,H[m],m)}}function $(_,m){var k,P=this,D=_.elements.sources,X=_.props,H=(0,_.resolve)(ft,[m]);this.handleImageLoad=function(L){var B=L.target,et=B.naturalWidth,F=B.naturalHeight;H.b(et,F)},this.handleVideoLoad=function(L){var B=L.target,et=B.videoWidth,F=B.videoHeight;k=!0,H.b(et,F)},this.handleNotMetaDatedVideoLoad=function(){k||P.handleYoutubeLoad()},this.handleYoutubeLoad=function(L,B){L||(L=1920,B=1080),X.maxYoutubeDimensions&&(L=X.maxYoutubeDimensions.width,B=X.maxYoutubeDimensions.height),H.b(L,B)},this.handleCustomLoad=function(){var L=D[m],B=L.offsetWidth,et=L.offsetHeight;B&&et?H.b(B,et):setTimeout(P.handleCustomLoad)}}function xt(_,m,k){var P=_.elements.sources,D=_.props.customClasses,X=D[m]?D[m]:"";P[m].className=k+" "+X}function W(_,m){var k=_.elements.sources,P=_.props.customAttributes;for(var D in P[m])k[m].setAttribute(D,P[m][D])}function q(_,m){var k=_.collections.sourceLoadHandlers,P=_.elements,D=P.sources,X=P.sourceAnimationWrappers,H=_.props.sources;D[m]=document.createElement("img"),xt(_,m,M),D[m].src=H[m],D[m].onload=k[m].handleImageLoad,W(_,m),X[m].appendChild(D[m])}function Y(_,m){var k=_.ap,P=_.collections.sourceLoadHandlers,D=_.elements,X=D.sources,H=D.sourceAnimationWrappers,L=_.props,B=L.sources,et=L.videosPosters,F=document.createElement("video"),Q=document.createElement("source");X[m]=F,xt(_,m,"".concat(M," fslightboxv")),F.src=B[m],F.onloadedmetadata=function(J){return P[m].handleVideoLoad(J)},F.controls=!0,F.autoplay=k.i(m),W(_,m),et[m]&&(X[m].poster=et[m]),Q.src=B[m],F.appendChild(Q),setTimeout(P[m].handleNotMetaDatedVideoLoad,3e3),H[m].appendChild(X[m])}function I(_,m){var k=_.ap,P=_.collections.sourceLoadHandlers,D=_.elements,X=D.sources,H=D.sourceAnimationWrappers,L=_.props.sources[m],B=L.split("?")[1],et=document.createElement("iframe");X[m]=et,xt(_,m,"".concat(M," ").concat(s,"youtube-iframe")),et.src="https://www.youtube.com/embed/".concat(L.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/)[2],"?").concat(B||"").concat(k.i(m)?"&mute=1&autoplay=1":"","&enablejsapi=1"),et.allowFullscreen=!0,W(_,m),H[m].appendChild(et),P[m].handleYoutubeLoad(parseInt(et.width),parseInt(et.height))}function G(_,m){var k=_.collections.sourceLoadHandlers,P=_.elements,D=P.sources,X=P.sourceAnimationWrappers,H=_.props.sources;D[m]=H[m],xt(_,m,"".concat(D[m].className," ").concat(M)),X[m].appendChild(D[m]),k[m].handleCustomLoad()}function nt(_,m){var k=_.elements,P=k.sources,D=k.sourceAnimationWrappers;_.props.sources,P[m]=document.createElement("div"),P[m].className="".concat(s,"invalid-file-wrapper ").concat(c),P[m].innerHTML="Invalid source",D[m].appendChild(P[m]),new ft(_,m).a()}function v(_){var m=_.collections,k=m.sourceLoadHandlers,P=m.sourcesRenderFunctions,D=_.core.sourceDisplayFacade,X=_.resolve;this.runActionsForSourceTypeAndIndex=function(H,L){var B;switch(H!=="invalid"&&(k[L]=X($,[L])),H){case"image":B=q;break;case"video":B=Y;break;case"youtube":B=I;break;case"custom":B=G;break;default:B=nt}P[L]=function(){return B(_,L)},D.displaySourcesWhichShouldBeDisplayed()}}function wt(_,m,k){var P=_.props,D=P.types,X=P.type,H=P.sources;this.getTypeSetByClientForIndex=function(L){var B;return D&&D[L]?B=D[L]:X&&(B=X),B},this.retrieveTypeWithXhrForIndex=function(L){(function(B,et){var F=document.createElement("a");F.href=B;var Q=F.hostname;if(Q==="www.youtube.com"||Q==="youtu.be")return et("youtube");var J=new XMLHttpRequest;J.onreadystatechange=function(){if(J.readyState!==4){if(J.readyState===2){var ut,j=J.getResponseHeader("content-type");switch(j.slice(0,j.indexOf("/"))){case"image":ut="image";break;case"video":ut="video";break;default:ut="invalid"}J.onreadystatechange=null,J.abort(),et(ut)}}else et("invalid")},J.open("GET",B),J.send()})(H[L],function(B){m.handleReceivedSourceTypeForUrl(B,H[L]),k.runActionsForSourceTypeAndIndex(B,L)})}}function Rt(_,m){var k=_.core.stageManager,P=_.elements,D=P.smw,X=P.sourceWrappersContainer,H=_.props,L=0,B=document.createElement("div");function et(Q){B.style.transform="translateX(".concat(Q+L,"px)"),L=0}function F(){return(1+H.slideDistance)*innerWidth}B.className="".concat(f," ").concat(u," ").concat(c),B.s=function(){B.style.display="flex"},B.h=function(){B.style.display="none"},B.a=function(){B.classList.add(h)},B.d=function(){B.classList.remove(h)},B.n=function(){B.style.removeProperty("transform")},B.v=function(Q){return L=Q,B},B.ne=function(){et(-F())},B.z=function(){et(0)},B.p=function(){et(F())},k.i(m)||B.h(),D[m]=B,X.appendChild(B),function(Q,J){var ut=Q.elements,j=ut.smw,mt=ut.sourceAnimationWrappers,ht=document.createElement("div"),tt=document.createElement("div");tt.className="fslightboxl";for(var dt=0;dt<3;dt++){var Lt=document.createElement("div");tt.appendChild(Lt)}ht.appendChild(tt),j[J].appendChild(ht),mt[J]=ht}(_,m)}function O(_,m,k){var P=document.createElementNS("http://www.w3.org/2000/svg","svg"),D="".concat(s,"svg");P.setAttributeNS(null,"class","".concat(D)),P.setAttributeNS(null,"viewBox",m);var X=document.createElementNS("http://www.w3.org/2000/svg","path");return X.setAttributeNS(null,"class","".concat(D,"p")),X.setAttributeNS(null,"d",k),P.appendChild(X),_.appendChild(P),P}function N(_,m){var k=document.createElement("button");return k.className="fslightboxb ".concat(s,"toolbar-button ").concat(c),k.title=m,_.appendChild(k),k}function V(_,m){var k=document.createElement("div");k.className="".concat(s,"toolbar"),m.appendChild(k),function(P,D){if(!P.hfs){var X="M4.5 11H3v4h4v-1.5H4.5V11zM3 7h1.5V4.5H7V3H3v4zm10.5 6.5H11V15h4v-4h-1.5v2.5zM11 3v1.5h2.5V7H15V3h-4z",H=N(D);H.title="Enter fullscreen";var L=O(H,"0 0 18 18",X);P.fso=function(){P.ifs=1,H.title="Exit fullscreen",L.classList.add("".concat(s,"fsx")),L.setAttributeNS(null,"viewBox","0 0 950 1024"),L.firstChild.setAttributeNS(null,"d","M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z")},P.fsx=function(){P.ifs=0,H.title="Enter fullscreen",L.classList.remove("".concat(s,"fsx")),L.setAttributeNS(null,"viewBox","0 0 18 18"),L.firstChild.setAttributeNS(null,"d",X)},H.onclick=P.fs.t}}(_,k),function(P,D){var X=N(D,"Close");X.onclick=P.core.lightboxCloser.closeLightbox,O(X,"0 0 24 24","M 4.7070312 3.2929688 L 3.2929688 4.7070312 L 10.585938 12 L 3.2929688 19.292969 L 4.7070312 20.707031 L 12 13.414062 L 19.292969 20.707031 L 20.707031 19.292969 L 13.414062 12 L 20.707031 4.7070312 L 19.292969 3.2929688 L 12 10.585938 L 4.7070312 3.2929688 z")}(_,k)}function it(_){var m=_.props.sources,k=_.elements.container,P=document.createElement("div");P.className="".concat(s,"nav"),k.appendChild(P),V(_,P),m.length>1&&function(D,X){var H=D.props.sources,L=(D.stageIndexes,document.createElement("div")),B=document.createElement("span"),et=document.createElement("span"),F=document.createElement("span");L.className="fslightboxsn",D.sn=function(Q){return B.innerHTML=Q},et.className="fslightboxsl",F.innerHTML=H.length,L.appendChild(B),L.appendChild(et),L.appendChild(F),X.appendChild(L)}(_,P)}function Z(_,m,k,P){var D=_.elements.container,X=k.charAt(0).toUpperCase()+k.slice(1),H=document.createElement("div");H.className="".concat(d," ").concat(d,"-").concat(k),H.title="".concat(X," slide"),H.onclick=m,function(L,B){var et=document.createElement("button");et.className="fslightboxb ".concat(g," ").concat(c),O(et,"0 0 20 20",B),L.appendChild(et)}(H,P),D.appendChild(H)}function lt(_){var m=_.core,k=m.lightboxCloser,P=m.slideChangeFacade,D=_.fs;this.listener=function(X){switch(X.key){case"Escape":k.closeLightbox();break;case"ArrowLeft":P.changeToPrevious();break;case"ArrowRight":P.changeToNext();break;case"F11":X.preventDefault(),D.t()}}}function ct(_){var m=_.elements,k=_.sourcePointerProps,P=_.stageIndexes;function D(X,H){m.smw[X].v(k.swipedX)[H]()}this.runActionsForEvent=function(X){var H,L,B;m.container.contains(m.slideSwipingHoverer)||m.container.appendChild(m.slideSwipingHoverer),H=m.container,L=l,(B=H.classList).contains(L)||B.add(L),k.swipedX=X.screenX-k.downScreenX;var et=P.previous,F=P.next;D(P.current,"z"),et!==void 0&&k.swipedX>0?D(et,"ne"):F!==void 0&&k.swipedX<0&&D(F,"p")}}function St(_){var m=_.dss,k=_.props.sources,P=_.resolve,D=_.sourcePointerProps,X=P(ct);k.length===1||m?this.listener=function(){D.swipedX=1}:this.listener=function(H){D.isPointering&&X.runActionsForEvent(H)}}function gt(_){var m=_.core.slideIndexChanger,k=_.elements.smw,P=_.stageIndexes,D=_.sws;function X(L){var B=k[P.current];B.a(),B[L]()}function H(L,B){L!==void 0&&(k[L].s(),k[L][B]())}this.runPositiveSwipedXActions=function(){var L=P.previous;if(L===void 0)X("z");else{X("p");var B=P.next;m.changeTo(L);var et=P.previous;D.d(et),D.b(B),X("z"),H(et,"ne")}},this.runNegativeSwipedXActions=function(){var L=P.next;if(L===void 0)X("z");else{X("ne");var B=P.previous;m.changeTo(L);var et=P.next;D.d(et),D.b(B),X("z"),H(et,"p")}}}function vt(_,m){_.contains(m)&&_.removeChild(m)}function bt(_){var m=_.core.lightboxCloser,k=_.dss,P=_.elements,D=_.props,X=_.resolve,H=_.sourcePointerProps,L=X(gt);this.runNoSwipeActions=function(){vt(P.container,P.slideSwipingHoverer),H.isSourceDownEventTarget||D.disableBackgroundClose||m.closeLightbox(),H.isPointering=!1},this.runActions=function(){k||(H.swipedX>0?L.runPositiveSwipedXActions():L.runNegativeSwipedXActions()),vt(P.container,P.slideSwipingHoverer),P.container.classList.remove(l),H.isPointering=!1}}function Wt(_){var m=_.resolve,k=_.sourcePointerProps,P=m(bt);this.listener=function(){k.isPointering&&(k.swipedX?P.runActions():P.runNoSwipeActions())}}function te(_){var m=this,k=_.core,P=k.globalEventsController,D=k.scrollbarRecompensor,X=(_.data,_.e),H=_.elements,L=_.fs,B=_.props,et=_.sourcePointerProps,F=_.ud;this.runActions=function(){m.i=1,H.container.classList.add(C),P.removeListeners(),B.exitFullscreenOnClose&&_.ifs&&L.x(),setTimeout(function(){m.i=0,et.isPointering=!1,H.container.classList.remove(C),document.documentElement.classList.remove(p),D.removeRecompense(),F&&H.container.close(),document.body.removeChild(H.container),X("onClose")},270)}}function re(_,m){var k=_.classList;k.contains(m)&&k.remove(m)}function E(_){var m,k,P,D,X,H,L,B,et;(function(F){var Q=F.ap,J=F.elements.sources,ut=F.props,j=ut.autoplay,mt=ut.autoplays;function ht(tt,dt){if(dt!="play"||Q.i(tt)){var Lt=J[tt];if(Lt){var yt=Lt.tagName;if(yt=="VIDEO")Lt[dt]();else if(yt=="IFRAME"){var Pt=Lt.contentWindow;Pt&&Pt.postMessage('{"event":"command","func":"'.concat(dt,'Video","args":""}'),"*")}}}}Q.i=function(tt){return mt[tt]||j&&mt[tt]!=0},Q.p=function(tt){ht(tt,"play")},Q.c=function(tt,dt){ht(tt,"pause"),ht(dt,"play")}})(_),function(F){F.data;var Q=F.fs,J=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],ut=document.documentElement,j=ut.requestFullscreen;function mt(tt){for(var dt=0;dtinnerHeight&&(document.body.style.marginRight=Q.scrollbarWidth+"px")}J.addRecompense=function(){document.readyState==="complete"?ut():addEventListener("load",function(){ut(),J.addRecompense=ut})},J.removeRecompense=function(){document.body.style.removeProperty("margin-right")}}(_),function(F){var Q=F.core,J=Q.slideChangeFacade,ut=Q.slideIndexChanger,j=Q.stageManager;F.props.sources.length>1?(J.changeToPrevious=function(){ut.jumpTo(j.getPreviousSlideIndex())},J.changeToNext=function(){ut.jumpTo(j.getNextSlideIndex())}):(J.changeToPrevious=function(){},J.changeToNext=function(){})}(_),function(F){var Q=F.ap,J=(F.componentsServices,F.core),ut=J.slideIndexChanger,j=J.sourceDisplayFacade,mt=J.stageManager,ht=F.elements,tt=ht.smw,dt=ht.sourceAnimationWrappers,Lt=F.isl,yt=F.stageIndexes,Pt=F.sws;ut.changeTo=function(Ft){Q.c(yt.current,Ft),yt.current=Ft,mt.updateStageIndexes(),F.sn(Ft+1),j.displaySourcesWhichShouldBeDisplayed()},ut.jumpTo=function(Ft){var at=yt.previous,K=yt.current,Tt=yt.next,U=Lt[K],pt=Lt[Ft];ut.changeTo(Ft);for(var ot=0;ot992?F.mw=ht*innerWidth:F.mw=innerWidth,F.mh=ht*innerHeight;for(var tt=0;tt0)&&(_.loc=1),E(_),_.fs.i(),F.container=document.createElement(_.ud?"dialog":"div"),F.container.className="".concat(s,"container ").concat(u," ").concat(x),F.container.setAttribute("tabindex","0"),function(yt){var Pt=yt.elements;Pt.slideSwipingHoverer=document.createElement("div"),Pt.slideSwipingHoverer.className="".concat(s,"slide-swiping-hoverer ").concat(u," ").concat(f)}(_),it(_),function(yt){var Pt=yt.core.sourcesPointerDown,Ft=yt.elements,at=yt.props.sources,K=document.createElement("div");K.className="".concat(f," ").concat(u),Ft.container.appendChild(K),K.addEventListener("pointerdown",Pt.listener),Ft.sourceWrappersContainer=K;for(var Tt=0;Tt1&&(ht=(mt=_).core.slideChangeFacade,Z(mt,ht.changeToPrevious,"previous","M18.271,9.212H3.615l4.184-4.184c0.306-0.306,0.306-0.801,0-1.107c-0.306-0.306-0.801-0.306-1.107,0L1.21,9.403C1.194,9.417,1.174,9.421,1.158,9.437c-0.181,0.181-0.242,0.425-0.209,0.66c0.005,0.038,0.012,0.071,0.022,0.109c0.028,0.098,0.075,0.188,0.142,0.271c0.021,0.026,0.021,0.061,0.045,0.085c0.015,0.016,0.034,0.02,0.05,0.033l5.484,5.483c0.306,0.307,0.801,0.307,1.107,0c0.306-0.305,0.306-0.801,0-1.105l-4.184-4.185h14.656c0.436,0,0.788-0.353,0.788-0.788S18.707,9.212,18.271,9.212z"),Z(mt,ht.changeToNext,"next","M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788S1.293,9.212,1.729,9.212z")),function(yt){for(var Pt=yt.props.sources,Ft=yt.resolve,at=Ft(A),K=Ft(v),Tt=Ft(wt,[at,K]),U=0;U0&&arguments[0]!==void 0?arguments[0]:0,ht=Q.previous,tt=Q.current,dt=Q.next;Q.current=mt,ut||z(_),H.updateStageIndexes(),ut?(J.c(),J.a(),J.b(ht),J.b(tt),J.b(dt),et("onShow")):j(),X.displaySourcesWhichShouldBeDisplayed(),_.sn(mt+1),document.body.appendChild(F.container),_.ud&&F.container.showModal(),F.container.focus(),document.documentElement.classList.add(p),D.addRecompense(),P.attachListeners(),L.runActions(),F.smw[mt].n(),m.p(mt),et("onOpen")}}function $e(_,m,k){return($e=si()?Reflect.construct.bind():function(P,D,X){var H=[null];H.push.apply(H,D);var L=new(Function.bind.apply(P,H));return X&&Bt(L,X.prototype),L}).apply(null,arguments)}function si(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bt(_,m){return(Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(k,P){return k.__proto__=P,k})(_,m)}function ii(_){return function(m){if(Array.isArray(m))return je(m)}(_)||function(m){if(typeof Symbol<"u"&&m[Symbol.iterator]!=null||m["@@iterator"]!=null)return Array.from(m)}(_)||function(m,k){if(m){if(typeof m=="string")return je(m,k);var P=Object.prototype.toString.call(m).slice(8,-1);if(P==="Object"&&m.constructor&&(P=m.constructor.name),P==="Map"||P==="Set")return Array.from(m);if(P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P))return je(m,k)}}(_)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function je(_,m){(m==null||m>_.length)&&(m=_.length);for(var k=0,P=new Array(m);k1&&arguments[1]!==void 0?arguments[1]:[];return k.unshift(_),$e(m,ii(k))},this.collections={sourceLoadHandlers:[],sourcesRenderFunctions:[],sourceSizers:[]},this.core={globalEventsController:{},lightboxCloser:{},lightboxUpdater:{},scrollbarRecompensor:{},slideChangeFacade:{},slideIndexChanger:{},sourcesPointerDown:{},sourceDisplayFacade:{},stageManager:{},windowResizeActioner:{}},this.ap={},this.fs={},this.sws={},this.e=function(m){_.props[m]&&_.props[m](_)},we(this),this.close=function(){return _.core.lightboxCloser.closeLightbox()}},window.fsLightboxInstances={},oi(),window.refreshFsLightbox=function(){for(var _ in fsLightboxInstances){var m=fsLightboxInstances[_].props;fsLightboxInstances[_]=new FsLightbox,fsLightboxInstances[_].props=m,fsLightboxInstances[_].props.sources=[],fsLightboxInstances[_].elements.a=[]}oi()}}])})})(Sc);Pi.registerPlugin(Et);(function(o,t){(function(){t.path.isFront,console.log("drupalSettings",t);const e=document.querySelector('main[role="main"]'),r=Pi.matchMedia();console.log("gsap_mm",r);function n(){console.log("LeShedTheme init()"),l(),h(),f(),g(),b(),d()}function s(y,x){return Math.floor(Math.random()*(x-y))+y}const a={wghtThin:{min:100,max:200},wghtMedium:{min:200,max:400},wghtBold:{min:800,max:900},boldRatio:.28,mediumRatio:.12,italicOnBold:.6,italicOnMedium:.4,italicOnThin:.3};function l(){const y=document.querySelectorAll("#block-leshed-identitedusite>a, article.node-type-projet>header>h2, article.node-type-projet>.cols>.left>h2, article.node-type-projet.view-mode-full h2.node-title");for(const x of y){x.classList.add("variable-title");const C=Cl({target:x,by:"chars"});for(const w of C[0].words){const T=Array.from(w.getElementsByClassName("char"));c(T),p(T)}}}function u(y,x,C=new Set){const w=new Set;for(let T=0;T{let A,R;return C.has(z)?(A=a.wghtBold,R=a.italicOnBold):w.has(z)?(A=a.wghtMedium,R=a.italicOnMedium):(A=a.wghtThin,R=a.italicOnThin),{char:S,wght:s(A.min,A.max+1),ital:Math.random()S.ital)){const S=[...C,...w],z=S.length?S[s(0,S.length)]:s(0,x);T[z].ital=!0}let M=0;for(const S of T)S.ital?(M+=1,M>2&&(S.ital=!1,M=0)):M=0;for(const{char:S,wght:z,ital:A}of T)S.style.fontVariationSettings=`'wght' ${z}`,S.style.fontStyle=A?"italic":"normal",S.classList.toggle("italic",A),S.classList.toggle("normal",!A)}function p(y){if(y.length<5)return;const x="­",C=y.map(M=>M.textContent).join(""),w=Ml.hyphenateSync(C);if(!w.includes(x))return;let T=0;for(const M of w)if(M===x){const S=y[T];T>0&&S&&S.parentNode&&S.parentNode.insertBefore(document.createTextNode(x),S)}else T++}function h(){document.getElementById("burger-btn").parentElement.addEventListener("click",function(x){this.firstElementChild.toggleAttribute("opened"),this.firstElementChild.nextElementSibling.toggleAttribute("opened")})}function f(){const y=document.querySelector('main[role="main"]'),x=y&&y.querySelector(".layout-content");if(!y||!x)return;const C=new wc({wrapper:y,content:x,duration:1.2,smoothWheel:!0});C.on("scroll",Et.update),Pi.ticker.add(w=>C.raf(w*1e3)),Pi.ticker.lagSmoothing(0)}function g(){console.log("initHomeColumnScrollSync");const y=document.querySelector(".layout--twocol-section--50-50 .layout__region--first"),x=document.querySelector(".layout--twocol-section--50-50 .layout__region--second");console.log(e,y,x),!(!e||!y||!x)&&(r.add("(min-width: 768px)",()=>([y,x].forEach(C=>{Pi.to(C,{y:()=>{const w=e.clientHeight,T=e.scrollHeight-e.clientHeight,M=Math.max(0,C.offsetHeight-w);return T-M},ease:"none",scrollTrigger:{scroller:e,start:0,end:"max",scrub:!0,invalidateOnRefresh:!0}})}),()=>{})),window.addEventListener("load",()=>Et.refresh()))}function d(){console.log("initPageFull");const y=document.querySelector("article.node-type-projet.view-mode-full h2.node-title");console.log("pageTitle",y),y&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{const w=y.offsetHeight,T=.4,M=w-w*T;r.add("(min-width: 768px)",()=>{Pi.to(y,{scale:T,y:M,ease:"none",scrollTrigger:{scroller:e,start:0,end:M,scrub:!0,invalidateOnRefresh:!0}})})})});const x=document.querySelector("article.node-type-projet.view-mode-full .cols"),C=x&&x.querySelector(".col.left");if(x&&C){const T=()=>{const M=C.offsetHeight-e.clientHeight;return M>0?M:y?y.offsetHeight*.6:0};r.add("(min-width: 768px)",()=>{Pi.fromTo(C,{y:0},{y:()=>e.scrollHeight-e.clientHeight-T(),ease:"none",scrollTrigger:{scroller:e,start:T,end:"max",scrub:!0,invalidateOnRefresh:!0}})})}}function b(){console.log("initFsLightbox");let y=document.querySelectorAll("article.node-type-projet.view-mode-full .field_images.multiple .field-item a");for(const x of y)x.setAttribute("data-fslightbox","gallery");window.refreshFsLightbox()}n()})()})(Drupal,drupalSettings); +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function je(_,m){(m==null||m>_.length)&&(m=_.length);for(var k=0,P=new Array(m);k1&&arguments[1]!==void 0?arguments[1]:[];return k.unshift(_),$e(m,ii(k))},this.collections={sourceLoadHandlers:[],sourcesRenderFunctions:[],sourceSizers:[]},this.core={globalEventsController:{},lightboxCloser:{},lightboxUpdater:{},scrollbarRecompensor:{},slideChangeFacade:{},slideIndexChanger:{},sourcesPointerDown:{},sourceDisplayFacade:{},stageManager:{},windowResizeActioner:{}},this.ap={},this.fs={},this.sws={},this.e=function(m){_.props[m]&&_.props[m](_)},we(this),this.close=function(){return _.core.lightboxCloser.closeLightbox()}},window.fsLightboxInstances={},oi(),window.refreshFsLightbox=function(){for(var _ in fsLightboxInstances){var m=fsLightboxInstances[_].props;fsLightboxInstances[_]=new FsLightbox,fsLightboxInstances[_].props=m,fsLightboxInstances[_].props.sources=[],fsLightboxInstances[_].elements.a=[]}oi()}}])})})(Sc);Pi.registerPlugin(Et);(function(o,t){(function(){t.path.isFront,console.log("drupalSettings",t);const e=document.querySelector('main[role="main"]'),r=Pi.matchMedia();console.log("gsap_mm",r);function n(){console.log("LeShedTheme init()"),console.log("deploy test to delete"),l(),h(),f(),g(),b(),d()}function s(y,x){return Math.floor(Math.random()*(x-y))+y}const a={wghtThin:{min:100,max:200},wghtMedium:{min:200,max:400},wghtBold:{min:800,max:900},boldRatio:.28,mediumRatio:.12,italicOnBold:.6,italicOnMedium:.4,italicOnThin:.3};function l(){const y=document.querySelectorAll("#block-leshed-identitedusite>a, article.node-type-projet>header>h2, article.node-type-projet>.cols>.left>h2, article.node-type-projet.view-mode-full h2.node-title");for(const x of y){x.classList.add("variable-title");const C=Cl({target:x,by:"chars"});for(const w of C[0].words){const T=Array.from(w.getElementsByClassName("char"));c(T),p(T)}}}function u(y,x,C=new Set){const w=new Set;for(let T=0;T{let A,R;return C.has(z)?(A=a.wghtBold,R=a.italicOnBold):w.has(z)?(A=a.wghtMedium,R=a.italicOnMedium):(A=a.wghtThin,R=a.italicOnThin),{char:S,wght:s(A.min,A.max+1),ital:Math.random()S.ital)){const S=[...C,...w],z=S.length?S[s(0,S.length)]:s(0,x);T[z].ital=!0}let M=0;for(const S of T)S.ital?(M+=1,M>2&&(S.ital=!1,M=0)):M=0;for(const{char:S,wght:z,ital:A}of T)S.style.fontVariationSettings=`'wght' ${z}`,S.style.fontStyle=A?"italic":"normal",S.classList.toggle("italic",A),S.classList.toggle("normal",!A)}function p(y){if(y.length<5)return;const x="­",C=y.map(M=>M.textContent).join(""),w=Ml.hyphenateSync(C);if(!w.includes(x))return;let T=0;for(const M of w)if(M===x){const S=y[T];T>0&&S&&S.parentNode&&S.parentNode.insertBefore(document.createTextNode(x),S)}else T++}function h(){document.getElementById("burger-btn").parentElement.addEventListener("click",function(x){this.firstElementChild.toggleAttribute("opened"),this.firstElementChild.nextElementSibling.toggleAttribute("opened")})}function f(){const y=document.querySelector('main[role="main"]'),x=y&&y.querySelector(".layout-content");if(!y||!x)return;const C=new wc({wrapper:y,content:x,duration:1.2,smoothWheel:!0});C.on("scroll",Et.update),Pi.ticker.add(w=>C.raf(w*1e3)),Pi.ticker.lagSmoothing(0)}function g(){console.log("initHomeColumnScrollSync");const y=document.querySelector(".layout--twocol-section--50-50 .layout__region--first"),x=document.querySelector(".layout--twocol-section--50-50 .layout__region--second");console.log(e,y,x),!(!e||!y||!x)&&(r.add("(min-width: 768px)",()=>([y,x].forEach(C=>{Pi.to(C,{y:()=>{const w=e.clientHeight,T=e.scrollHeight-e.clientHeight,M=Math.max(0,C.offsetHeight-w);return T-M},ease:"none",scrollTrigger:{scroller:e,start:0,end:"max",scrub:!0,invalidateOnRefresh:!0}})}),()=>{})),window.addEventListener("load",()=>Et.refresh()))}function d(){console.log("initPageFull");const y=document.querySelector("article.node-type-projet.view-mode-full h2.node-title");console.log("pageTitle",y),y&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{const w=y.offsetHeight,T=.4,M=w-w*T;r.add("(min-width: 768px)",()=>{Pi.to(y,{scale:T,y:M,ease:"none",scrollTrigger:{scroller:e,start:0,end:M,scrub:!0,invalidateOnRefresh:!0}})})})});const x=document.querySelector("article.node-type-projet.view-mode-full .cols"),C=x&&x.querySelector(".col.left");if(x&&C){const T=()=>{const M=C.offsetHeight-e.clientHeight;return M>0?M:y?y.offsetHeight*.6:0};r.add("(min-width: 768px)",()=>{Pi.fromTo(C,{y:0},{y:()=>e.scrollHeight-e.clientHeight-T(),ease:"none",scrollTrigger:{scroller:e,start:T,end:"max",scrub:!0,invalidateOnRefresh:!0}})})}}function b(){console.log("initFsLightbox");let y=document.querySelectorAll("article.node-type-projet.view-mode-full .field_images.multiple .field-item a");for(const x of y)x.setAttribute("data-fslightbox","gallery");window.refreshFsLightbox()}n()})()})(Drupal,drupalSettings); diff --git a/web/themes/custom/leshed/assets/js/main.js b/web/themes/custom/leshed/assets/js/main.js index e5a4168..0ef1ab1 100644 --- a/web/themes/custom/leshed/assets/js/main.js +++ b/web/themes/custom/leshed/assets/js/main.js @@ -51,6 +51,7 @@ gsap.registerPlugin(ScrollTrigger); // |___|_||_|_|\__| function init () { console.log('LeShedTheme init()'); + console.log('deploy test to delete'); initTitles(); initBurgerMenu();