var Motion=(()=>{var vt=Object.defineProperty;var oe=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var se=Object.prototype.hasOwnProperty;var ae=(t,e)=>{for(var r in e)vt(t,r,{get:e[r],enumerable:!0})},ce=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ie(e))!se.call(t,o)&&o!==r&&vt(t,o,{get:()=>e[o],enumerable:!(n=oe(e,o))||n.enumerable});return t};var fe=t=>ce(vt({},"__esModule",{value:!0}),t);var Ge={};ae(Ge,{animate:()=>Mt,inView:()=>Bt,spring:()=>Gt,stagger:()=>Dt,timeline:()=>Ft});function wt(t,e){t.indexOf(e)===-1&&t.push(e)}function _t(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}var H=(t,e,r)=>Math.min(Math.max(r,t),e);var v={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"};var j=t=>typeof t=="number";var R=t=>Array.isArray(t)&&!j(t[0]);var Kt=(t,e,r)=>{let n=e-t;return((r-t)%n+n)%n+t};function J(t,e){return R(t)?t[Kt(0,t.length,e)]:t}var K=(t,e,r)=>-r*t+r*e+t;var Q=()=>{},_=t=>t;var C=(t,e,r)=>e-t===0?1:(r-t)/(e-t);function k(t,e){let r=t[t.length-1];for(let n=1;n<=e;n++){let o=C(0,e,n);t.push(K(r,1,o))}}function Y(t){let e=[0];return k(e,t-1),e}function Ot(t,e=Y(t.length),r=_){let n=t.length,o=n-e.length;return o>0&&k(e,o),s=>{let i=0;for(;iArray.isArray(t)&&j(t[0]);var V=t=>typeof t=="object"&&!!t.createAnimation;var D=t=>typeof t=="function";var q=t=>typeof t=="string";var F={ms:t=>t*1e3,s:t=>t/1e3};function St(t,e){return e?t*(1e3/e):0}var qt=(t,e,r)=>(((1-3*r+3*e)*t+(3*r-6*e))*t+3*e)*t,ue=1e-7,le=12;function pe(t,e,r,n,o){let s,i,a=0;do i=e+(r-e)/2,s=qt(i,n,o)-t,s>0?r=i:e=i;while(Math.abs(s)>ue&&++ape(s,0,1,t,r);return s=>s===0||s===1?s:qt(o(s),e,n)}var Et=(t,e="end")=>r=>{r=e==="end"?Math.min(r,.999):Math.max(r,.001);let n=r*t,o=e==="end"?Math.floor(n):Math.ceil(n);return H(0,1,o/t)};var me={ease:z(.25,.1,.25,1),"ease-in":z(.42,0,1,1),"ease-in-out":z(.42,0,.58,1),"ease-out":z(0,0,.58,1)},he=/\((.*?)\)/;function X(t){if(D(t))return t;if(tt(t))return z(...t);let e=me[t];if(e)return e;if(t.startsWith("steps")){let r=he.exec(t);if(r){let n=r[1].split(",");return Et(parseFloat(n[0]),n[1].trim())}}return _}var L=class{constructor(e,r=[0,1],{easing:n,duration:o=v.duration,delay:s=v.delay,endDelay:i=v.endDelay,repeat:a=v.repeat,offset:l,direction:u="normal",autoplay:f=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=_,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((c,x)=>{this.resolve=c,this.reject=x}),n=n||v.easing,V(n)){let c=n.createAnimation(r);n=c.easing,r=c.keyframes||r,o=c.duration||o}this.repeat=a,this.easing=R(n)?_:X(n),this.updateDuration(o);let m=Ot(r,l,R(n)?n.map(X):_);this.tick=c=>{var x;s=s;let p=0;this.pauseTime!==void 0?p=this.pauseTime:p=(c-this.startTime)*this.rate,this.t=p,p/=1e3,p=Math.max(p-s,0),this.playState==="finished"&&this.pauseTime===void 0&&(p=this.totalDuration);let h=p/this.duration,b=Math.floor(h),g=h%1;!g&&h>=1&&(g=1),g===1&&b--;let E=b%2;(u==="reverse"||u==="alternate"&&E||u==="alternate-reverse"&&!E)&&(g=1-g);let w=p>=this.totalDuration?1:Math.min(g,1),P=m(this.easing(w));e(P),this.pauseTime===void 0&&(this.playState==="finished"||p>=this.totalDuration+i)?(this.playState="finished",(x=this.resolve)===null||x===void 0||x.call(this,P)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},f&&this.play()}play(){let e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}};var et=function(){};var rt=class{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}};var Tt=new WeakMap;function ct(t){return Tt.has(t)||Tt.set(t,{transforms:[],values:new Map}),Tt.get(t)}function zt(t,e){return t.has(e)||t.set(e,new rt),t.get(e)}var de=["","X","Y","Z"],ge=["translate","scale","rotate","skew"],nt={x:"translateX",y:"translateY",z:"translateZ"},Lt={syntax:"",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},ye={translate:{syntax:"",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:Lt,scale:{syntax:"",initialValue:1,toDefaultUnit:_},skew:Lt},I=new Map,ut=t=>`--motion-${t}`,ft=["x","y","z"];ge.forEach(t=>{de.forEach(e=>{ft.push(t+e),I.set(ut(t+e),ye[t])})});var xe=(t,e)=>ft.indexOf(t)-ft.indexOf(e),be=new Set(ft),lt=t=>be.has(t),Ut=(t,e)=>{nt[e]&&(e=nt[e]);let{transforms:r}=ct(t);wt(r,e),t.style.transform=ve(r)},ve=t=>t.sort(xe).reduce(we,"").trim(),we=(t,e)=>`${t} ${e}(var(${ut(e)}))`;var ot=t=>t.startsWith("--"),Wt=new Set;function kt(t){if(!Wt.has(t)){Wt.add(t);try{let{syntax:e,initialValue:r}=I.has(t)?I.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:r})}catch{}}}var jt=(t,e)=>document.createElement("div").animate(t,e),Xt={cssRegisterProperty:()=>typeof CSS!="undefined"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{jt({opacity:[1]})}catch{return!1}return!0},finished:()=>!!jt({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{jt({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},At={},G={};for(let t in Xt)G[t]=()=>(At[t]===void 0&&(At[t]=Xt[t]()),At[t]);var _e=.015,Oe=(t,e)=>{let r="",n=Math.round(e/_e);for(let o=0;oD(t)?G.linearEasing()?`linear(${Oe(t,e)})`:v.easing:tt(t)?Se(t):t,Se=([t,e,r,n])=>`cubic-bezier(${t}, ${e}, ${r}, ${n})`;function Zt(t,e){for(let r=0;rArray.isArray(t)?t:[t];function U(t){return nt[t]&&(t=nt[t]),lt(t)?ut(t):t}var it={get:(t,e)=>{e=U(e);let r=ot(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!r&&r!==0){let n=I.get(e);n&&(r=n.initialValue)}return r},set:(t,e,r)=>{e=U(e),ot(e)?t.style.setProperty(e,r):t.style[e]=r}};function mt(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function ht(t,e){var r;let n=(e==null?void 0:e.toDefaultUnit)||_,o=t[t.length-1];if(q(o)){let s=((r=o.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";s&&(n=i=>i+s)}return n}function Ee(){return window.__MOTION_DEV_TOOLS_RECORD}function dt(t,e,r,n={},o){let s=Ee(),i=n.record!==!1&&s,a,{duration:l=v.duration,delay:u=v.delay,endDelay:f=v.endDelay,repeat:m=v.repeat,easing:c=v.easing,persist:x=!1,direction:p,offset:h,allowWebkitAcceleration:b=!1,autoplay:g=!0}=n,E=ct(t),w=lt(e),P=G.waapi();w&&Ut(t,e);let O=U(e),T=zt(E.values,O),A=I.get(O);return mt(T.animation,!(V(c)&&T.generator)&&n.record!==!1),()=>{let S=()=>{var d,N;return(N=(d=it.get(t,O))!==null&&d!==void 0?d:A==null?void 0:A.initialValue)!==null&&N!==void 0?N:0},y=Zt(pt(r),S),$=ht(y,A);if(V(c)){let d=c.createAnimation(y,e!=="opacity",S,O,T);c=d.easing,y=d.keyframes||y,l=d.duration||l}if(ot(O)&&(G.cssRegisterProperty()?kt(O):P=!1),w&&!G.linearEasing()&&(D(c)||R(c)&&c.some(D))&&(P=!1),P){A&&(y=y.map(M=>j(M)?A.toDefaultUnit(M):M)),y.length===1&&(!G.partialKeyframes()||i)&&y.unshift(S());let d={delay:F.ms(u),duration:F.ms(l),endDelay:F.ms(f),easing:R(c)?void 0:Pt(c,l),direction:p,iterations:m+1,fill:"both"};a=t.animate({[O]:y,offset:h,easing:R(c)?c.map(M=>Pt(M,l)):void 0},d),a.finished||(a.finished=new Promise((M,at)=>{a.onfinish=M,a.oncancel=at}));let N=y[y.length-1];a.finished.then(()=>{x||(it.set(t,O,N),a.cancel())}).catch(Q),b||(a.playbackRate=1.000001)}else if(o&&w)y=y.map(d=>typeof d=="string"?parseFloat(d):d),y.length===1&&y.unshift(parseFloat(S())),a=new o(d=>{it.set(t,O,$?$(d):d)},y,Object.assign(Object.assign({},n),{duration:l,easing:c}));else{let d=y[y.length-1];it.set(t,O,A&&j(d)?A.toDefaultUnit(d):d)}return i&&s(t,e,y,{duration:l,delay:u,easing:c,repeat:m,offset:h},"motion-one"),T.setAnimation(a),a&&!g&&a.pause(),a}}var gt=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function Z(t,e){var r;return typeof t=="string"?e?((r=e[t])!==null&&r!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}var Te=t=>t(),yt=(t,e,r=v.duration)=>new Proxy({animations:t.map(Te).filter(Boolean),duration:r,options:e},Ae),je=t=>t.animations[0],Ae={get:(t,e)=>{let r=je(t);switch(e){case"duration":return t.duration;case"currentTime":return F.s((r==null?void 0:r[e])||0);case"playbackRate":case"playState":return r==null?void 0:r[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(Pe)).catch(Q)),t.finished;case"stop":return()=>{t.animations.forEach(n=>mt(n))};case"forEachNative":return n=>{t.animations.forEach(o=>n(o,t))};default:return typeof(r==null?void 0:r[e])=="undefined"?void 0:()=>t.animations.forEach(n=>n[e]())}},set:(t,e,r)=>{switch(e){case"currentTime":r=F.ms(r);case"playbackRate":for(let n=0;nt.finished;function Dt(t=.1,{start:e=0,from:r=0,easing:n}={}){return(o,s)=>{let i=j(r)?r:De(r,s),a=Math.abs(i-o),l=t*a;if(n){let u=s*t;l=X(n)(l/u)*u}return e+l}}function De(t,e){if(t==="first")return 0;{let r=e-1;return t==="last"?r:r/2}}function xt(t,e,r){return D(t)?t(e,r):t}function Ht(t){return function(r,n,o={}){r=Z(r);let s=r.length;et(!!s,"No valid element provided."),et(!!n,"No keyframes defined.");let i=[];for(let a=0;ae&&o.atdt(...s,L)).filter(Boolean);return yt(o,e,(r=n[0])===null||r===void 0?void 0:r[3].duration)}function Re(t,e={}){var{defaultOptions:r={}}=e,n=Jt(e,["defaultOptions"]);let o=[],s=new Map,i={},a=new Map,l=0,u=0,f=0;for(let m=0;m1,"spring must be provided 2 keyframes within timeline()");let bt=d.createAnimation(S,T!=="opacity",()=>0,T);d=bt.easing,S=bt.keyframes||S,$=bt.duration||$}let N=xt(h.delay,w,E)||0,M=u+N,at=M+$,{offset:W=Y(S.length)}=y;W.length===1&&W[0]===0&&(W[1]=1);let $t=W.length-S.length;$t>0&&k(W,$t),S.length===1&&S.unshift(null),Qt(A,S,d,W,M,at),b=Math.max(N+$,b),f=Math.max(at,f)}}l=u,u+=b}return s.forEach((m,c)=>{for(let x in m){let p=m[x];p.sort(Yt);let h=[],b=[],g=[];for(let E=0;Ee/(2*Math.sqrt(t*r));function ee(t,e,r){return t=e||t>e&&r<=e}var It=({stiffness:t=B.stiffness,damping:e=B.damping,mass:r=B.mass,from:n=0,to:o=1,velocity:s=0,restSpeed:i,restDistance:a}={})=>{s=s?F.s(s):0;let l={done:!1,hasReachedTarget:!1,current:n,target:o},u=o-n,f=Math.sqrt(t/r)/1e3,m=te(t,e,r),c=Math.abs(u)<5;i||(i=c?.01:2),a||(a=c?.005:.5);let x;if(m<1){let p=f*Math.sqrt(1-m*m);x=h=>o-Math.exp(-m*f*h)*((-s+m*f*u)/p*Math.sin(p*h)+u*Math.cos(p*h))}else x=p=>o-Math.exp(-f*p)*(u+(-s+f*u)*p);return p=>{l.current=x(p);let h=p===0?s:st(x,p,l.current),b=Math.abs(h)<=i,g=Math.abs(o-l.current)<=a;return l.done=b&&g,l.hasReachedTarget=ee(n,o,l.current),l}};var Ct=10,Ne=1e4;function Nt(t,e=_){let r,n=Ct,o=t(0),s=[e(o.current)];for(;!o.done&&n{let n=new Map,o=(i=0,a=100,l=0,u=!1)=>{let f=`${i}-${a}-${l}-${u}`;return n.has(f)||n.set(f,t(Object.assign({from:i,to:a,velocity:l},r))),n.get(f)},s=(i,a)=>(e.has(i)||e.set(i,Nt(i,a)),e.get(i));return{createAnimation:(i,a=!0,l,u,f)=>{let m,c,x,p=0,h=_,b=i.length;if(a){h=ht(i,u?I.get(U(u)):void 0);let g=i[b-1];if(x=Vt(g),b>1&&i[0]!==null)c=Vt(i[0]);else{let E=f==null?void 0:f.generator;if(E){let{animation:w,generatorStartTime:P}=f,O=(w==null?void 0:w.startTime)||P||0,T=(w==null?void 0:w.currentTime)||performance.now()-O,A=E(T).current;c=A,p=st(S=>E(S).current,T,A)}else l&&(c=Vt(l()))}}if(re(c)&&re(x)){let g=o(c,x,p,u==null?void 0:u.includes("scale"));m=Object.assign(Object.assign({},s(g,h)),{easing:"linear"}),f&&(f.generator=g,f.generatorStartTime=performance.now())}return m||(m={easing:"ease",duration:s(o(0,100)).overshootDuration}),m}}}}var Gt=ne(It);var Ve={any:0,all:1};function Bt(t,e,{root:r,margin:n,amount:o="any"}={}){if(typeof IntersectionObserver=="undefined")return()=>{};let s=Z(t),i=new WeakMap,a=u=>{u.forEach(f=>{let m=i.get(f.target);if(f.isIntersecting!==!!m)if(f.isIntersecting){let c=e(f);D(c)?i.set(f.target,c):l.unobserve(f.target)}else m&&(m(f),i.delete(f.target))})},l=new IntersectionObserver(a,{root:r,rootMargin:n,threshold:typeof o=="number"?o:Ve[o]});return s.forEach(u=>l.observe(u)),()=>l.disconnect()}return fe(Ge);})();