(()=>{var t=()=>({events:{},emit(t,...e){(this.events[t]||[]).forEach(t=>t(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(t=>t!==e)}});function e(t,e,i){return Math.max(t,Math.min(e,i))}var i,s,o=class{constructor(t){this.onResize=([t])=>{if(t){let{width:e,height:i}=t.contentRect;this.width=e,this.height=i}},this.onWindowResize=()=>{this.width=window.innerWidth,this.height=window.innerHeight},this.element=t,t===window?(window.addEventListener("resize",this.onWindowResize),this.onWindowResize()):(this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.resizeObserver=new ResizeObserver(this.onResize),this.resizeObserver.observe(this.element))}destroy(){window.removeEventListener("resize",this.onWindowResize),this.resizeObserver.disconnect()}},l=class{constructor({direction:i,gestureDirection:s,mouseMultiplier:l,smooth:r,wrapper:n=window,content:h=document.documentElement,smoothWheel:a=null==r||r,smoothTouch:c=!1,duration:u,easing:d=t=>Math.min(1,1.001-Math.pow(2,-10*t)),lerp:p=u?null:.1,infinite:m=!1,orientation:v=null!=i?i:"vertical",gestureOrientation:g=null!=s?s:"vertical",touchMultiplier:S=2,wheelMultiplier:f=null!=l?l:1,normalizeWheel:_=!0}={}){this.onVirtualScroll=({type:t,deltaX:e,deltaY:i,event:s})=>{if(s.ctrlKey||"vertical"===this.options.gestureOrientation&&0===i||"horizontal"===this.options.gestureOrientation&&0===e||s.composedPath().find(t=>null==t||null==t.hasAttribute?void 0:t.hasAttribute("data-lenis-prevent")))return;if(this.isStopped||this.isLocked)return void s.preventDefault();if(this.isSmooth=this.options.smoothTouch&&"touch"===t||this.options.smoothWheel&&"wheel"===t,!this.isSmooth)return this.isScrolling=!1,void this.animate.stop();s.preventDefault();let o=i;"both"===this.options.gestureOrientation?o=Math.abs(i)>Math.abs(e)?i:e:"horizontal"===this.options.gestureOrientation&&(o=e),this.scrollTo(this.targetScroll+o,{programmatic:!1})},this.onScroll=()=>{if(!this.isScrolling){let t=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.velocity=0,this.direction=Math.sign(this.animatedScroll-t),this.emit()}},i&&console.warn("Lenis: `direction` option is deprecated, use `orientation` instead"),s&&console.warn("Lenis: `gestureDirection` option is deprecated, use `gestureOrientation` instead"),l&&console.warn("Lenis: `mouseMultiplier` option is deprecated, use `wheelMultiplier` instead"),r&&console.warn("Lenis: `smooth` option is deprecated, use `smoothWheel` instead"),window.lenisVersion="1.0.0-dev.8",n!==document.documentElement&&n!==document.body||(n=window),this.options={wrapper:n,content:h,smoothWheel:a,smoothTouch:c,duration:u,easing:d,lerp:p,infinite:m,gestureOrientation:g,orientation:v,touchMultiplier:S,wheelMultiplier:f,normalizeWheel:_},this.wrapper=new o(n),this.content=new o(h),this.rootElement.classList.add("lenis"),this.velocity=0,this.isStopped=!1,this.isSmooth=a||c,this.isScrolling=!1,this.targetScroll=this.animatedScroll=this.actualScroll,this.animate=new class{advance(t){var i,s;if(!this.isRunning)return;let o=!1;if(this.lerp)this.value=(1-(s=this.lerp))*this.value+s*this.to,Math.round(this.value)===this.to&&(this.value=this.to,o=!0);else{this.currentTime+=t;let l=e(0,this.currentTime/this.duration,1),r=(o=l>=1)?1:this.easing(l);this.value=this.from+(this.to-this.from)*r}null==(i=this.onUpdate)||i.call(this,this.value,{completed:o}),o&&this.stop()}stop(){this.isRunning=!1}fromTo(t,e,{lerp:i=.1,duration:s=1,easing:o=t=>t,onUpdate:l}){this.from=this.value=t,this.to=e,this.lerp=i,this.duration=s,this.easing=o,this.currentTime=0,this.isRunning=!0,this.onUpdate=l}},this.emitter=t(),this.wrapper.element.addEventListener("scroll",this.onScroll,{passive:!1}),this.virtualScroll=new class{constructor(i,{wheelMultiplier:s=1,touchMultiplier:o=2,normalizeWheel:l=!1}){this.onTouchStart=t=>{let{pageX:e,pageY:i}=t.targetTouches?t.targetTouches[0]:t;this.touchStart.x=e,this.touchStart.y=i},this.onTouchMove=t=>{let{pageX:e,pageY:i}=t.targetTouches?t.targetTouches[0]:t,s=-(e-this.touchStart.x)*this.touchMultiplier,o=-(i-this.touchStart.y)*this.touchMultiplier;this.touchStart.x=e,this.touchStart.y=i,this.emitter.emit("scroll",{type:"touch",deltaX:s,deltaY:o,event:t})},this.onWheel=t=>{let{deltaX:i,deltaY:s}=t;this.normalizeWheel&&(i=e(-100,i,100),s=e(-100,s,100)),i*=this.wheelMultiplier,s*=this.wheelMultiplier,this.emitter.emit("scroll",{type:"wheel",deltaX:i,deltaY:s,event:t})},this.element=i,this.wheelMultiplier=s,this.touchMultiplier=o,this.normalizeWheel=l,this.touchStart={x:null,y:null},this.emitter=t(),this.element.addEventListener("wheel",this.onWheel,{passive:!1}),this.element.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.element.addEventListener("touchmove",this.onTouchMove,{passive:!1})}on(t,e){return this.emitter.on(t,e)}destroy(){this.emitter.events={},this.element.removeEventListener("wheel",this.onWheel,{passive:!1}),this.element.removeEventListener("touchstart",this.onTouchStart,{passive:!1}),this.element.removeEventListener("touchmove",this.onTouchMove,{passive:!1})}}(n,{touchMultiplier:S,wheelMultiplier:f,normalizeWheel:_}),this.virtualScroll.on("scroll",this.onVirtualScroll)}destroy(){this.emitter.events={},this.wrapper.element.removeEventListener("scroll",this.onScroll,{passive:!1}),this.virtualScroll.destroy()}on(t,e){return this.emitter.on(t,e)}off(t,e){var i;this.emitter.events[t]=null==(i=this.emitter.events[t])?void 0:i.filter(t=>e!==t)}setScroll(t){this.isHorizontal?this.rootElement.scrollLeft=t:this.rootElement.scrollTop=t}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.velocity=0}start(){this.isStopped=!1,this.reset()}stop(){this.isStopped=!0,this.animate.stop(),this.reset()}raf(t){let e=t-(this.time||t);this.time=t,this.animate.advance(.001*e)}scrollTo(t,{offset:i=0,immediate:s=!1,lock:o=!1,duration:l=this.options.duration,easing:r=this.options.easing,lerp:n=!l&&this.options.lerp,onComplete:h,force:a=!1,programmatic:c=!0}={}){if(!this.isStopped||a){if(["top","left","start"].includes(t))t=0;else if(["bottom","right","end"].includes(t))t=this.limit;else{var u;let d;if("string"==typeof t?d=document.querySelector(t):null!=(u=t)&&u.nodeType&&(d=t),d){if(this.wrapper.element!==window){let p=this.wrapper.element.getBoundingClientRect();i-=this.isHorizontal?p.left:p.top}let m=d.getBoundingClientRect();t=(this.isHorizontal?m.left:m.top)+this.animatedScroll}}if("number"==typeof t){if(t+=i,t=Math.round(t),this.options.infinite?c&&(this.targetScroll=this.animatedScroll=this.scroll):t=e(0,t,this.limit),s)return this.animatedScroll=this.targetScroll=t,this.setScroll(this.scroll),this.animate.stop(),this.reset(),this.emit(),void(null==h||h());c||(this.targetScroll=t),this.animate.fromTo(this.animatedScroll,t,{duration:l,easing:r,lerp:n,onUpdate:(t,{completed:e})=>{o&&(this.isLocked=!0),this.isScrolling=!0,this.velocity=t-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=t,this.setScroll(this.scroll),c&&(this.targetScroll=t),e&&(o&&(this.isLocked=!1),requestAnimationFrame(()=>{this.isScrolling=!1}),this.velocity=0,null==h||h()),this.emit()}})}}}get rootElement(){return this.wrapper.element===window?this.content.element:this.wrapper.element}get limit(){return Math.round(this.isHorizontal?this.content.width-this.wrapper.width:this.content.height-this.wrapper.height)}get isHorizontal(){return"horizontal"===this.options.orientation}get actualScroll(){return this.isHorizontal?this.rootElement.scrollLeft:this.rootElement.scrollTop}get scroll(){var t,e;let i;return this.options.infinite?(t=this.animatedScroll,i=t%(e=this.limit),(e>0&&i<0||e<0&&i>0)&&(i+=e),i):this.animatedScroll}get progress(){return this.scroll/this.limit}get isSmooth(){return this.__isSmooth}set isSmooth(t){this.__isSmooth!==t&&(this.rootElement.classList.toggle("lenis-smooth",t),this.__isSmooth=t)}get isScrolling(){return this.__isScrolling}set isScrolling(t){this.__isScrolling!==t&&(this.rootElement.classList.toggle("lenis-scrolling",t),this.__isScrolling=t)}get isStopped(){return this.__isStopped}set isStopped(t){this.__isStopped!==t&&(this.rootElement.classList.toggle("lenis-stopped",t),this.__isStopped=t)}},r=class extends l{constructor(){super({duration:1.5,easing:t=>1===t?1:1-Math.pow(2,-10*t),orientation:"vertical",smoothWheel:!0,smoothTouch:!1,touchMultiplier:1.5}),this.injectCSS(),this.isActive=!0,this.init()}init(){this.config(),this.useAnchors(),this.render()}useAnchors(){[...document.querySelectorAll("[data-scrolllink]")].forEach(t=>{let e=document.querySelector(t.dataset.scrolllink);e&&t.addEventListener("click",()=>{this.scrollTo(e)})})}config(){let t=[...document.querySelectorAll('[data-scroll="overscroll"]')];t.length>0&&t.forEach(t=>t.setAttribute("onwheel","event.stopPropagation()"));let e=[...document.querySelectorAll('[data-scroll="stop"]')];e.length>0&&e.forEach(t=>{t.onclick=()=>{this.stop(),this.isActive=!1}});let i=[...document.querySelectorAll('[data-scroll="start"]')];i.length>0&&i.forEach(t=>{t.onclick=()=>{this.start(),this.isActive=!0}});let s=[...document.querySelectorAll('[data-scroll="toggle"]')];s.length>0&&s.forEach(t=>{t.onclick=()=>{this.isActive?(this.stop(),this.isActive=!1):(this.start(),this.isActive=!0)}})}render(t){this.raf(t),window.requestAnimationFrame(this.render.bind(this)),this.renderWebflow(t)}renderWebflow(){}handleEditorView(){let t=document.documentElement,e=(t,e)=>{for(let i of t)if("attributes"===i.type){let s=document.querySelector(".w-editor-bem-EditSiteButton"),o=document.querySelector(".w-editor-bem-EditorMainMenu"),l=t=>t.addEventListener("click",()=>this.destroy());s&&l(s),o&&l(o)}};new MutationObserver(e).observe(t,{attributes:!0,childList:!1,subtree:!1})}injectCSS(){let t=document.createElement("style"),e=` .lenis.lenis-smooth { scroll-behavior: auto; } html.lenis { height: auto; } `;t.textContent=e,document.head.append(t)}};window.SmoothScroll=new r})();