vendor: 29,592 bytes, line 1
1import{r as S,j as p}from"./index-VyaKM55r.js";import{S as ho,a as fo}from"./SiteFooter-vRfn9i6J.js";const mo="/assets/hero-spanish-B4UbH61X.png",po="/assets/hero-coachella-C0sbqAc7.png",go="/assets/hero-britain-yEsmmrjT.png",yo="/assets/lingo-mascot-presenting-DpfbPiQz.png",xi=S.createContext({});function At(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const xo=typeof window<"u",gn=xo?S.useLayoutEffect:S.useEffect,yn=S.createContext(null);function xn(t,e){t.indexOf(e)===-1&&t.push(e)}function ce(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const J=(t,e,n)=>n>e?e:n<t?t:n;let vn=()=>{};const lt={},vi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),wi=t=>typeof t=="object"&&t!==null,bi=t=>/^0[^.\s]+$/u.test(t);function Ti(t){let e;return()=>(e===void 0&&(e=t()),e)}const H=t=>t,Gt=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Vt=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class wn{constructor(){this.subscriptions=[]}add(e){return xn(this.subscriptions,e),()=>ce(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const K=t=>t*1e3,$=t=>t/1e3,bn=(t,e)=>e?t*(1e3/e):0,Si=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,vo=1e-7,wo=12;function bo(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Si(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>vo&&++a<wo);return r}function $t(t,e,n,s){if(t===e&&n===s)return H;const i=o=>bo(o,0,1,t,n);return o=>o===0||o===1?o:Si(i(o),e,s)}const Pi=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ai=t=>e=>1-t(1-e),Vi=$t(.33,1.53,.69,.99),Tn=Ai(Vi),Ci=Pi(Tn),Mi=t=>t>=1?1:(t*=2)<1?.5*Tn(t):.5*(2-Math.pow(2,-10*(t-1))),Sn=t=>1-Math.sin(Math.acos(t)),Ei=Ai(Sn),Di=Pi(Sn),To=$t(.42,0,1,1),So=$t(0,0,.58,1),ki=$t(.42,0,.58,1),Po=t=>Array.isArray(t)&&typeof t[0]!="number",Ri=t=>Array.isArray(t)&&typeof t[0]=="number",Ao={linear:H,easeIn:To,easeInOut:ki,easeOut:So,circIn:Sn,circInOut:Di,circOut:Ei,backIn:Tn,backInOut:Ci,backOut:Vi,anticipate:Mi},Vo=t=>typeof t=="string",_n=t=>{if(Ri(t)){vn(t.length===4);const[e,n,s,i]=t;return $t(e,n,s,i)}else if(Vo(t))return Ao[t];return t},Yt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Co(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,h=!1,f=!1)=>{const m=f&&i?n:s;return h&&r.add(u),m.add(u),u},cancel:u=>{s.delete(u),r.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0;const h=n;n=s,s=h,n.forEach(l),n.clear(),i=!1,o&&(o=!1,c.process(u))}};return c}const Mo=40;function Li(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Yt.reduce((w,T)=>(w[T]=Co(o),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:f,render:d,postRender:m}=r,g=()=>{const w=lt.useManualTiming,T=w?i.timestamp:performance.now();n=!1,w||(i.delta=s?1e3/60:Math.max(Math.min(T-i.timestamp,Mo),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},y=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:Yt.reduce((w,T)=>{const V=r[T];return w[T]=(D,M=!1,A=!1)=>(n||y(),V.schedule(D,M,A)),w},{}),cancel:w=>{for(let T=0;T<Yt.length;T++)r[Yt[T]].cancel(w)},state:i,steps:r}}const{schedule:C,cancel:_,state:F,steps:Pe}=Li(typeof requestAnimationFrame<"u"?requestAnimationFrame:H,!0);let ee;function Eo(){ee=void 0}const W={now:()=>(ee===void 0&&W.set(F.isProcessing||lt.useManualTiming?F.timestamp:performance.now()),ee),set:t=>{ee=t,queueMicrotask(Eo)}},ji=t=>e=>typeof e=="string"&&e.startsWith(t),Bi=ji("--"),Do=ji("var(--"),Pn=t=>Do(t)?ko.test(t.split("/*")[0].trim()):!1,ko=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Xn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Et={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ut={...Et,transform:t=>J(0,1,t)},qt={...Et,default:1},Ft=t=>Math.round(t*1e5)/1e5,An=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ro(t){return t==null}const Lo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vn=(t,e)=>n=>!!(typeof n=="string"&&Lo.test(n)&&n.startsWith(t)||e&&!Ro(n)&&Object.prototype.hasOwnProperty.call(n,e)),Fi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(An);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},jo=t=>J(0,255,t),Ae={...Et,transform:t=>Math.round(jo(t))},mt={test:Vn("rgb","red"),parse:Fi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Ae.transform(t)+", "+Ae.transform(e)+", "+Ae.transform(n)+", "+Ft(Ut.transform(s))+")"};function Bo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ze={test:Vn("#"),parse:Bo,transform:mt.transform},_t=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),rt=_t("deg"),st=_t("%"),b=_t("px"),Fo=_t("vh"),Io=_t("vw"),Yn={...st,parse:t=>st.parse(t)/100,transform:t=>st.transform(t*100)},bt={test:Vn("hsl","hue"),parse:Fi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+st.transform(Ft(e))+", "+st.transform(Ft(n))+", "+Ft(Ut.transform(s))+")"},L={test:t=>mt.test(t)||ze.test(t)||bt.test(t),parse:t=>mt.test(t)?mt.parse(t):bt.test(t)?bt.parse(t):ze.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?mt.transform(t):bt.transform(t),getAnimatableNone:t=>{const e=L.parse(t);return e.alpha=0,L.transform(e)}},No=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Oo(t){return isNaN(t)&&typeof t=="string"&&(t.match(An)?.length||0)+(t.match(No)?.length||0)>0}const Ii="number",Ni="color",Wo="var",Uo="var(",qn="${}",zo=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ct(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(zo,l=>(L.test(l)?(s.color.push(o),i.push(Ni),n.push(L.parse(l))):l.startsWith(Uo)?(s.var.push(o),i.push(Wo),n.push(l)):(s.number.push(o),i.push(Ii),n.push(parseFloat(l))),++o,qn)).split(qn);return{values:n,split:a,indexes:s,types:i}}function Ho(t){return Ct(t).values}function Oi({split:t,types:e}){const n=t.length;return s=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],s[o]!==void 0){const r=e[o];r===Ii?i+=Ft(s[o]):r===Ni?i+=L.transform(s[o]):i+=s[o]}return i}}function Ko(t){return Oi(Ct(t))}const Go=t=>typeof t=="number"?0:L.test(t)?L.getAnimatableNone(t):t,$o=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Go(t);function _o(t){const e=Ct(t);return Oi(e)(e.values.map((s,i)=>$o(s,e.split[i])))}const Z={test:Oo,parse:Ho,createTransformer:Ko,getAnimatableNone:_o};function Ve(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Xo({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Ve(l,a,t+1/3),o=Ve(l,a,t),r=Ve(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function ue(t,e){return n=>n>0?e:t}const E=(t,e,n)=>t+(e-t)*n,Ce=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Yo=[ze,mt,bt],qo=t=>Yo.find(e=>e.test(t));function Zn(t){const e=qo(t);if(!e)return!1;let n=e.parse(t);return e===bt&&(n=Xo(n)),n}const Jn=(t,e)=>{const n=Zn(t),s=Zn(e);if(!n||!s)return ue(t,e);const i={...n};return o=>(i.red=Ce(n.red,s.red,o),i.green=Ce(n.green,s.green,o),i.blue=Ce(n.blue,s.blue,o),i.alpha=E(n.alpha,s.alpha,o),mt.transform(i))},He=new Set(["none","hidden"]);function Zo(t,e){return He.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Jo(t,e){return n=>E(t,e,n)}function Cn(t){return typeof t=="number"?Jo:typeof t=="string"?Pn(t)?ue:L.test(t)?Jn:ea:Array.isArray(t)?Wi:typeof t=="object"?L.test(t)?Jn:Qo:ue}function Wi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Cn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Qo(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Cn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function ta(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const ea=(t,e)=>{const n=Z.createTransformer(e),s=Ct(t),i=Ct(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?He.has(t)&&!i.values.length||He.has(e)&&!s.values.length?Zo(t,e):Gt(Wi(ta(s,i),i.values),n):ue(t,e)};function Ui(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?E(t,e,n):Cn(t)(t,e)}const na=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>C.update(e,n),stop:()=>_(e),now:()=>F.isProcessing?F.timestamp:W.now()}},zi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},he=2e4;function Mn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<he;)e+=n,s=t.next(e);return e>=he?1/0:e}function sa(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Mn(s),he);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:$(i)}}const k={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ke(t,e){return t*Math.sqrt(1-e*e)}const ia=12;function ra(t,e,n){let s=n;for(let i=1;i<ia;i++)s=s-t(s)/e(s);return s}const Me=.001;function oa({duration:t=k.duration,bounce:e=k.bounce,velocity:n=k.velocity,mass:s=k.mass}){let i,o,r=1-e;r=J(k.minDamping,k.maxDamping,r),t=J(k.minDuration,k.maxDuration,$(t)),r<1?(i=c=>{const u=c*r,h=u*t,f=u-n,d=Ke(c,r),m=Math.exp(-h);return Me-f/d*m},o=c=>{const h=c*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-h),g=Ke(Math.pow(c,2),r);return(-i(c)+Me>0?-1:1)*((f-d)*m)/g}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-Me+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=ra(i,o,a);if(t=K(t),isNaN(l))return{stiffness:k.stiffness,damping:k.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const aa=["duration","bounce"],la=["stiffness","damping","mass"];function Qn(t,e){return e.some(n=>t[n]!==void 0)}function ca(t){let e={velocity:k.velocity,stiffness:k.stiffness,damping:k.damping,mass:k.mass,isResolvedFromDuration:!1,...t};if(!Qn(t,la)&&Qn(t,aa))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*J(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:k.mass,stiffness:i,damping:o}}else{const n=oa({...t,velocity:0});e={...e,...n,mass:k.mass},e.isResolvedFromDuration=!0}return e}function fe(t=k.visualDuration,e=k.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:h,velocity:f,isResolvedFromDuration:d}=ca({...n,velocity:-$(n.velocity||0)}),m=f||0,g=c/(2*Math.sqrt(l*u)),y=r-o,x=$(Math.sqrt(l/u)),v=Math.abs(y)<5;s||(s=v?k.restSpeed.granular:k.restSpeed.default),i||(i=v?k.restDelta.granular:k.restDelta.default);let w,T,V,D,M,A;if(g<1)V=Ke(x,g),D=(m+g*x*y)/V,w=P=>{const R=Math.exp(-g*x*P);return r-R*(D*Math.sin(V*P)+y*Math.cos(V*P))},M=g*x*D+y*V,A=g*x*y-D*V,T=P=>Math.exp(-g*x*P)*(M*Math.sin(V*P)+A*Math.cos(V*P));else if(g===1){w=R=>r-Math.exp(-x*R)*(y+(m+x*y)*R);const P=m+x*y;T=R=>Math.exp(-x*R)*(x*P*R-m)}else{const P=x*Math.sqrt(g*g-1);w=Q=>{const it=Math.exp(-g*x*Q),tt=Math.min(P*Q,300);return r-it*((m+g*x*y)*Math.sinh(tt)+P*y*Math.cosh(tt))/P};const R=(m+g*x*y)/P,z=g*x*R-y*P,ut=g*x*y-R*P;T=Q=>{const it=Math.exp(-g*x*Q),tt=Math.min(P*Q,300);return it*(z*Math.sinh(tt)+ut*Math.cosh(tt))}}const I={calculatedDuration:d&&h||null,velocity:P=>K(T(P)),next:P=>{if(!d&&g<1){const z=Math.exp(-g*x*P),ut=Math.sin(V*P),Q=Math.cos(V*P),it=r-z*(D*ut+y*Q),tt=K(z*(M*ut+A*Q));return a.done=Math.abs(tt)<=s&&Math.abs(r-it)<=i,a.value=a.done?r:it,a}const R=w(P);if(d)a.done=P>=h;else{const z=K(T(P));a.done=Math.abs(z)<=s&&Math.abs(r-R)<=i}return a.value=a.done?r:R,a},toString:()=>{const P=Math.min(Mn(I),he),R=zi(z=>I.next(P*z).value,P,30);return P+"ms "+R},toTransition:()=>{}};return I}fe.applyToOptions=t=>{const e=sa(t,100,fe);return t.ease=e.ease,t.duration=K(e.duration),t.type="keyframes",t};const ua=5;function Hi(t,e,n){const s=Math.max(e-ua,0);return bn(n-t(s),e-s)}function Ge({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,m=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let g=n*e;const y=h+g,x=r===void 0?y:r(y);x!==y&&(g=x-h);const v=A=>-g*Math.exp(-A/s),w=A=>x+v(A),T=A=>{const I=v(A),P=w(A);f.done=Math.abs(I)<=c,f.value=f.done?x:P};let V,D;const M=A=>{d(f.value)&&(V=A,D=fe({keyframes:[f.value,m(f.value)],velocity:Hi(w,A,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return M(0),{calculatedDuration:null,next:A=>{let I=!1;return!D&&V===void 0&&(I=!0,T(A),M(A)),V!==void 0&&A>=V?D.next(A-V):(!I&&T(A),f)}}}function ha(t,e,n){const s=[],i=n||lt.mix||Ui,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||H:e;a=Gt(l,a)}s.push(a)}return s}function En(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(vn(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=ha(e,s,i),l=a.length,c=u=>{if(r&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const f=Vt(t[h],t[h+1],u);return a[h](f)};return n?u=>c(J(t[0],t[o-1],u)):c}function fa(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Vt(0,e,s);t.push(E(n,1,i))}}function Ki(t){const e=[0];return fa(e,t.length-1),e}function da(t,e){return t.map(n=>n*e)}function ma(t,e){return t.map(()=>e||ki).splice(0,t.length-1)}function It({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Po(s)?s.map(_n):_n(s),o={done:!1,value:e[0]},r=da(n&&n.length===e.length?n:Ki(e),t),a=En(r,e,{ease:Array.isArray(i)?i:ma(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const pa=t=>t!==null;function ve(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(pa),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const ga={decay:Ge,inertia:Ge,tween:It,keyframes:It,spring:fe};function Gi(t){typeof t.type=="string"&&(t.type=ga[t.type])}class Dn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const ya=t=>t/100;class zt extends Dn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==W.now()&&this.tick(W.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Gi(e);const{type:n=It,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||It;l!==It&&typeof a[0]!="number"&&(this.mixKeyframes=Gt(ya,Ui(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=Mn(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const x=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,T=s;if(h){const A=Math.min(this.currentTime,i)/a;let I=Math.floor(A),P=A%1;!P&&A>=1&&(P=1),P===1&&I--,I=Math.min(I,h+1),I%2&&(f==="reverse"?(P=1-P,d&&(P-=d/a)):f==="mirror"&&(T=r)),w=J(0,1,P)*a}let V;v?(this.delayState.value=u[0],V=this.delayState):V=T.next(w),o&&!v&&(V.value=o(V.value));let{done:D}=V;!v&&l!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return M&&m!==Ge&&(V.value=ve(u,this.options,y,this.speed)),g&&g(V.value),M&&this.finish(),V}then(e,n){return this.finished.then(e,n)}get duration(){return $(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(this.currentTime)}set time(e){e=K(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return Hi(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(W.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=$(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=na,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(W.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function xa(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const pt=t=>t*180/Math.PI,$e=t=>{const e=pt(Math.atan2(t[1],t[0]));return _e(e)},va={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$e,rotateZ:$e,skewX:t=>pt(Math.atan(t[1])),skewY:t=>pt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},_e=t=>(t=t%360,t<0&&(t+=360),t),ts=$e,es=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ns=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),wa={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:es,scaleY:ns,scale:t=>(es(t)+ns(t))/2,rotateX:t=>_e(pt(Math.atan2(t[6],t[5]))),rotateY:t=>_e(pt(Math.atan2(-t[2],t[0]))),rotateZ:ts,rotate:ts,skewX:t=>pt(Math.atan(t[4])),skewY:t=>pt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Xe(t){return t.includes("scale")?1:0}function Ye(t,e){if(!t||t==="none")return Xe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=wa,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=va,i=a}if(!i)return Xe(e);const o=s[e],r=i[1].split(",").map(Ta);return typeof o=="function"?o(r):r[o]}const ba=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ye(n,e)};function Ta(t){return parseFloat(t.trim())}const Dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kt=new Set([...Dt,"pathRotation"]),ss=t=>t===Et||t===b,Sa=new Set(["x","y","z"]),Pa=Dt.filter(t=>!Sa.has(t));function Aa(t){const e=[];return Pa.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const at={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Ye(e,"x"),y:(t,{transform:e})=>Ye(e,"y")};at.translateX=at.x;at.translateY=at.y;const gt=new Set;let qe=!1,Ze=!1,Je=!1;function $i(){if(Ze){const t=Array.from(gt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Aa(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ze=!1,qe=!1,gt.forEach(t=>t.complete(Je)),gt.clear()}function _i(){gt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ze=!0)})}function Va(){Je=!0,_i(),$i(),Je=!1}class kn{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(gt.add(this),qe||(qe=!0,C.read(_i),C.resolveKeyframes($i))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}xa(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),gt.delete(this)}cancel(){this.state==="scheduled"&&(gt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ca=t=>t.startsWith("--");function Xi(t,e,n){Ca(e)?t.style.setProperty(e,n):t.style[e]=n}const Ma={};function Rn(t,e){const n=Ti(t);return()=>Ma[e]??n()}const Ln=Rn(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Yi=Rn(()=>window.ViewTimeline!==void 0,"viewTimeline"),qi=Rn(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),jt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,is={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jt([0,.65,.55,1]),circOut:jt([.55,0,1,.45]),backIn:jt([.31,.01,.66,-.59]),backOut:jt([.33,1.53,.69,.99])};function Zi(t,e){if(t)return typeof t=="function"?qi()?zi(t,e):"ease-out":Ri(t)?jt(t):Array.isArray(t)?t.map(n=>Zi(n,e)||is.easeOut):is[t]}function Ea(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Zi(a,i);Array.isArray(h)&&(u.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function Ji(t){return typeof t=="function"&&"applyToOptions"in t}function Da({type:t,...e}){return Ji(t)&&qi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Qi extends Dn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,vn(typeof e.type!="string");const c=Da(e);this.animation=Ea(n,s,i,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=ve(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),Xi(n,s,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return $(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=K(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Ln()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),H):i(this)}}const tr={anticipate:Mi,backInOut:Ci,circInOut:Di};function ka(t){return t in tr}function Ra(t){typeof t.ease=="string"&&ka(t.ease)&&(t.ease=tr[t.ease])}const Ee=10;class La extends Qi{constructor(e){Ra(e),Gi(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new zt({...r,autoplay:!1}),l=Math.max(Ee,W.now()-this.startTime),c=J(0,Ee,l-Ee),u=a.sample(l).value,{name:h}=this.options;o&&h&&Xi(o,h,u),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,u,c),a.stop()}}const rs=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Z.test(t)||t==="0")&&!t.startsWith("url("));function ja(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Ba(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=rs(i,e),a=rs(o,e);return!r||!a?!1:ja(t)||(n==="spring"||Ji(n))&&s}function Qe(t){t.duration=0,t.type="keyframes"}const er=new Set(["opacity","clipPath","filter","transform"]),Fa=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Ia(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Fa.test(t[e]))return!0;return!1}const Na=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Oa=Ti(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wa(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=e.owner.getProps();return Oa()&&n&&(er.has(n)||Na.has(n)&&Ia(a))&&(n!=="transform"||!u)&&!c&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const Ua=40;class za extends Dn{constructor({autoplay:e=!0,delay:n=0,type:s="
1keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=W.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:c,element:u,...h},d=u?.KeyframeResolver||kn;this.keyframeResolver=new d(a,(m,g,y)=>this.onKeyframesResolved(m,g,f,!y),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=W.now();let h=!0;Ba(e,o,r,a)||(h=!1,(lt.instantAnimations||!l)&&u?.(ve(e,s,n)),e[0]=e[e.length-1],Qe(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Ua?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},m=h&&!c&&Wa(d),g=d.motionValue?.owner?.current;let y;if(m)try{y=new La({...d,element:g})}catch{y=new zt(d)}else y=new zt(d);y.finished.then(()=>{this.notifyFinished()}).catch(H),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Va()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function nr(t,e,n,s=0,i=1){const o=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}const os=30,Ha=t=>!isNaN(parseFloat(t)),Nt={current:void 0};class Ka{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=W.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=W.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ha(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new wn);const s=this.events[e].add(n);return e==="change"?()=>{s(),C.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Nt.current&&Nt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=W.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>os)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,os);return bn(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function q(t,e){return new Ka(t,e)}function sr(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function jn(t,e){const n=t?.[e]??t?.default??t;return n!==t?sr(n,t):n}const Ga={type:"spring",stiffness:500,damping:25,restSpeed:10},$a=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),_a={type:"keyframes",duration:.8},Xa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ya=(t,{keyframes:e})=>e.length>2?_a:kt.has(t)?t.startsWith("scale")?$a(e[1]):Ga:Xa,qa=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Za(t){for(const e in t)if(!qa.has(e))return!0;return!1}const Bn=(t,e,n,s={},i,o)=>r=>{const a=jn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-K(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Za(a)||Object.assign(u,Ya(t,u)),u.duration&&(u.duration=K(u.duration)),u.repeatDelay&&(u.repeatDelay=K(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Qe(u),u.delay===0&&(h=!0)),(lt.instantAnimations||lt.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,Qe(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=ve(u.keyframes,a);if(f!==void 0){C.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new zt(u):new za(u)},Ja=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Qa(t){const e=Ja.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function ir(t,e,n=1){const[s,i]=Qa(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return vi(r)?parseFloat(r):r}return Pn(i)?ir(i,e,n+1):i}function as(t){const e=[{},{}];
vendor: 5,477 bytes, line 1
1return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Fn(t,e,n,s){if(typeof e=="function"){const[i,o]=as(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=as(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function yt(t,e,n){const s=t.getProps();return Fn(s,e,n!==void 0?n:s.custom,t)}const rr=new Set(["width","height","top","left","right","bottom",...Dt]),tn=t=>Array.isArray(t);function tl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,q(n))}function el(t){return tn(t)?t[t.length-1]||0:t}function nl(t,e){const n=yt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=el(o[r]);tl(t,r,a)}}const B=t=>!!(t&&t.getVelocity);function sl(t){return!!(B(t)&&t.add)}function en(t,e){const n=t.getValue("willChange");if(sl(n))return n.add(e);if(!n&<.WillChange){const s=new lt.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function In(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const il="framerAppearId",or="data-"+In(il);function ar(t){return t.props[or]}function rl({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function lr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o,transitionEnd:r,...a}=e;const l=t.getDefaultTransition();o=o?sr(o,l):l;const c=o?.reduceMotion,u=o?.skipAnimations;s&&(o=s);const h=[],f=i&&t.animationState&&t.animationState.getState()[i],d=o?.path;d&&d.animateVisualElement(t,a,o,n,h);for(const m in a){const g=t.getValue(m,t.latestValues[m]??null),y=a[m];if(y===void 0||f&&rl(f,m))continue;const x={delay:n,...jn(o||{},m)};u&&(x.skipAnimations=!0);const v=g.get();if(v!==void 0&&!g.isAnimating()&&!Array.isArray(y)&&y===v&&!x.velocity){C.update(()=>g.set(y));continue}let w=!1;if(window.MotionHandoffAnimation){const D=ar(t);if(D){const M=window.MotionHandoffAnimation(D,m,C);M!==null&&(x.startTime=M,w=!0)}}en(t,m);const T=c??t.shouldReduceMotion;g.start(Bn(m,g,y,T&&rr.has(m)?{type:!1}:x,t,w));const V=g.animation;V&&h.push(V)}if(r){const m=()=>C.update(()=>{r&&nl(t,r)});h.length?Promise.all(h).then(m):m()}return h}function nn(t,e,n={}){const s=yt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(lr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=i;return ol(t,e,l,c,u,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function ol(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(nn(l,e,{...r,delay:n+(typeof s=="function"?0:s)+nr(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function al(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>nn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=nn(t,e,n);else{const i=typeof e=="function"?yt(t,e,n.custom):e;s=Promise.all(lr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const ll={test:t=>t==="auto",parse:t=>t},cr=t=>e=>e.test(t),ur=[Et,b,st,rt,Io,Fo,ll],ls=t=>ur.find(cr(t));function cl(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||bi(t):!0}const ul=new Set(["brightness","contrast","saturate","opacity"]);function hl(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(An)||[];if(!s)return t;const i=n.replace(s,"");let o=ul.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const fl=/\b([a-z-]*)\(.*?\)/gu,sn={...Z,getAnimatableNone:t=>{const e=t.match(fl);return e?e.map(hl).join(" "):t}},rn={...Z,getAnimatableNone:t=>{const e=Z.parse(t);return Z.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},cs={...Et,transform:Math.round},dl={rotate:rt,pathRotation:rt,rotateX:rt,rotateY:rt,rotateZ:rt,scale:qt,scaleX:qt,scaleY:qt,scaleZ:qt,skew:rt,skewX:rt,skewY:rt,distance:b,translateX:b,translateY:b,translateZ:b,x:b,y:b,z:b,perspective:b,transformPerspective:b,opacity:Ut,originX:Yn,originY:Yn,originZ:b},de={borderWidth:b,borderTopWidth:b,borderRightWidth:b,borderBottomWidth:b,borderLeftWidth:b,borderRadius:b,borderTopLeftRadius:b,borderTopRightRadius:b,borderBottomRightRadius:b,borderBottomLeftRadius:b,width:b,maxWidth:b,height:b,maxHeight:b,top:b,right:b,bottom:b,left:b,inset:b,insetBlock:b,insetBlockStart:b,insetBlockEnd:b,insetInline:b,insetInlineStart:b,insetInlineEnd:b,padding:b,paddingTop:b,paddingRight:b,paddingBottom:b,paddingLeft:b,paddingBlock:b,paddingBlockStart:b,paddingBlockEnd:b,paddingInline:b,paddingInlineStart:b,paddingInlineEnd:b,margin:b,marginTop:b,marginRight:b,marginBottom:b,marginLeft:b,marginBlock:b,marginBlockStart:b,marginBlockEnd:b,marginInline:b,marginInlineStart:b,marginInlineEnd:b,fontSize:b,backgroundPositionX:b,backgroundPositionY:b,...dl,zIndex:cs,fillOpacity:Ut,strokeOpacity:Ut,numOctaves:cs},ml={...de,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:sn,WebkitFilter:sn,mask:rn,WebkitMask:rn},hr=t=>ml[t],pl=new Set([sn,rn]);function fr(t,e){let n=hr(t);return pl.has(n)||(n=Z),n.getAnimatableNone?n.getAnimatableNone(e):void 0}
vendor: 1,699 bytes, line 1
1const gl=new Set(["auto","none","0"]);function yl(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!gl.has(o)&&Ct(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=fr(n,i)}class xl extends kn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),Pn(h))){const f=ir(h,n.current);f!==void 0&&(e[u]=f),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!rr.has(s)||e.length!==2)return;const[i,o]=e,r=ls(i),a=ls(o),l=Xn(i),c=Xn(o);if(l!==c&&at[s]){this.needsMeasurement=!0;return}if(r!==a)if(ss(r)&&ss(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else at[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||cl(e[i]))&&s.push(i);s.length&&yl(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=at[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=at[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEac
vendor: 4,504 bytes, line 1
1h(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function dr(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const on=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function mr(t){return wi(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Mt,cancel:pr}=Li(queueMicrotask,!1),Y={x:!1,y:!1};function gr(){return Y.x||Y.y}function vl(t){return t==="x"||t==="y"?Y[t]?null:(Y[t]=!0,()=>{Y[t]=!1}):Y.x||Y.y?null:(Y.x=Y.y=!0,()=>{Y.x=Y.y=!1})}function yr(t,e){const n=dr(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function wl(t){return!(t.pointerType==="touch"||gr())}function bl(t,e,n={}){const[s,i,o]=yr(t,n);return s.forEach(r=>{let a=!1,l=!1,c;const u=()=>{r.removeEventListener("pointerleave",m)},h=y=>{c&&(c(y),c=void 0),u()},f=y=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(y))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},m=y=>{if(y.pointerType!=="touch"){if(a){l=!0;return}h(y)}},g=y=>{if(!wl(y))return;l=!1;const x=e(r,y);typeof x=="function"&&(c=x,r.addEventListener("pointerleave",m,i))};r.addEventListener("pointerenter",g,i),r.addEventListener("pointerdown",d,i)}),o}const xr=(t,e)=>e?t===e?!0:xr(t,e.parentElement):!1,Nn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Tl=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Sl(t){return Tl.has(t.tagName)||t.isContentEditable===!0}const Pl=new Set(["INPUT","SELECT","TEXTAREA"]);function Al(t){return Pl.has(t.tagName)||t.isContentEditable===!0}const ne=new WeakSet;function us(t){return e=>{e.key==="Enter"&&t(e)}}function De(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Vl=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=us(()=>{if(ne.has(n))return;De(n,"down");const i=us(()=>{De(n,"up")}),o=()=>De(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function hs(t){return Nn(t)&&!gr()}const fs=new WeakSet;function Cl(t,e,n={}){const[s,i,o]=yr(t,n),r=a=>{const l=a.currentTarget;if(!hs(a)||fs.has(a))return;ne.add(l),n.stopPropagation&&fs.add(a);const c=e(l,a),u=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),ne.has(l)&&ne.delete(l),hs(d)&&typeof c=="function"&&c(d,{success:m})},h=d=>{u(d,l===window||l===document||n.useGlobalTarget||xr(l,d.target))},f=d=>{u(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),mr(a)&&(a.addEventListener("focus",c=>Vl(c,i)),!Sl(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function On(t){return wi(t)&&"ownerSVGElement"in t}const se=new WeakMap;let ie;const vr=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:On(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ml=vr("inline","width","offsetWidth"),El=vr("block","height","offsetHeight");function Dl({target:t,borderBoxSize:e}){se.get(t)?.forEach(n=>{n(t,{get width(){return Ml(t,e)},get height(){return El(t,e)}})})}function kl(t){t.forEach(Dl)}function Rl(){typeof ResizeObserver>"u"||(ie=new ResizeObserver(kl))}function Ll(t,e){ie||Rl();const n=dr(t);return n.forEach(s=>{let i=se.get(s);i||(i=new Set,se.set(s,i)),i.add(e),ie?.observe(s)}),()=>{n.forEach(s=>{const i=se.get(s);i?.delete(e),i?.size||ie?.unobserve(s)})}}const re=new Set;let Tt;function jl(){Tt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};re.forEach(e=>e(t))},window.addEventListener("resize",Tt)}function Bl(t){return re.add(t),Tt||jl(),()=>{re.delete(t),!re.size&&typeof Tt=="function"&&(window.removeEventListener("resize",Tt),Tt=void 0)}}function an(t,e){return typeof t=="function"?Bl(t):Ll(t,e)}function wr(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return C.preUpdate(s,!0),()=>_(s)}function Fl(t){return On(t)&&t.tagName==="svg"}function Il(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],o=t[2+n],r=t[3+n],a=En(i,o,r);return e?a(s):a}function Nl(t,e,n={}){const s=t.get();let i=null,o=s,r;const a=typeof s=="string"?s.replace(/[\d.-]/g,""):void 0,l=()=>
1{i&&(i.stop(),i=null),t.animation=void 0},c=()=>{const h=ds(t.get()),f=ds(o);if(h===f){l();return}const d=i?i.getGeneratorVelocity():t.getVelocity();l(),i=new zt({keyframes:[h,f],velocity:d,type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:r})},u=()=>{c(),t.animation=i??void 0,t.events.animationStart?.notify(),i?.then(()=>{t.animation=void 0,t.events.animationComplete?.notify()})};if(t.attach((h,f)=>{o=h,r=d=>f(ke(d,a)),C.postRender(u)},l),B(e)){let h=n.skipInitialAnimation===!0;const f=e.on("change",m=>{h?(h=!1,t.jump(ke(m,a),!1)):t.set(ke(m,a))}),d=t.on("destroy",f);return()=>{f(),d()}}return l}function ke(t,e){return e?t+e:t}function ds(t){return typeof t=="number"?t:parseFloat(t)}const Ol=[...ur,L,Z],Wl=t=>Ol.find(cr(t)),ms=()=>({translate:0,scale:1,origin:0,originPoint:0}),St=()=>({x:ms(),y:ms()}),ps=()=>({min:0,max:0}),j=()=>({x:ps(),y:ps()}),Ul=new WeakMap;function we(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ht(t){return typeof t=="string"||Array.isArray(t)}const Wn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Un=["initial",...Wn];function be(t){return we(t.animate)||Un.some(e=>Ht(t[e]))}function br(t){return!!(be(t)||t.variants)}function zl(t,e,n){for(const s in e){const i=e[s],o=n[s];if(B(i))t.addValue(s,i);else if(B(o))t.addValue(s,q(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,q(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const ln={current:null},Tr={current:!1},Hl=typeof window<"u";function Kl(){if(Tr.current=!0,!!Hl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ln.current=t.matches;t.addEventListener("change",e),e()}else ln.current=!1}const gs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let me={};function Sr(t){me=t}function Gl(){return me}class $l{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:o,blockInitialAnimation:r,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=kn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=W.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,C.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=o,this.options=l,this.blockInitialAnimation=!!r,this.isControllingVariants=be(n),this.isVariantNode=br(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];c[d]!==void 0&&B(m)&&m.set(c[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,Ul.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Tr.current||Kl(),this.shouldReduceMotion=ln.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),_(this.notifyUpdate),_(this.render),this.valueSubscriptions.forEach(e
vendor: 66,317 bytes, line 1
1=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&er.has(e)&&this.current instanceof HTMLElement){const{factory:r,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,h=new Qi({element:this.current,name:e,keyframes:a,times:l,ease:c,duration:K(u)}),f=r(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=kt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&C.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in me){const n=me[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):j()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<gs.length;s++){const i=gs[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=zl(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=q(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(vi(s)||bi(s))?s=parseFloat(s):!Wl(s)&&Z.test(n)&&(s=fr(e,n)),this.setBaseTarget(e,B(s)?s.get():s)),B(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Fn(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!B(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new wn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Mt.render(this.render)}}class Pr extends $l{constructor(){super(...arguments),this.KeyframeResolver=xl}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;B(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ct{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Ar({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function _l({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Xl(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Re(t){return t===void 0||t===1}function cn({scale:t,scaleX:e,scaleY:n}){return!Re(t)||!Re(e)||!Re(n)}function dt(t){return cn(t)||Vr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Vr(t){return ys(t.x)||ys(t.y)}function ys(t){return t&&t!=="0%"}function pe(t,e,n){const s=t-n,i=e*s;return n+i}function xs(t,e,n,s,i){return i!==void 0&&(t=pe(t,i,s)),pe(t,n,s)+e}function un(t,e=0,n=1,s,i){t.min=xs(t.min,e,n,s,i),t.max=xs(t.max,e,n,s,i)}function Cr(t,{x:e,y:n}){un(t.x,e.translate,e.scale,e.originPoint),un(t.y,n.translate,n.scale,n.originPoint)}const vs=.999999999999,ws=1.0000000000001;function Yl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(nt(t.x,-o.scroll.offset.x),nt(t.y,-o.scroll.offset.y)),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Cr(t,r)),s&&dt(o.latestValues)&&oe(t,o.latestValues,o.layout?.layoutBox))}e.x<ws&&e.x>vs&&(e.x=1),e.y<ws&&e.y>vs&&(e.y=1)}function nt(t,e){t.min+=e,t.max+=e}function bs(t,e,n,s,i=.5){const o=E(t.min,t.max,i);un(t,e,n,o,s)}function Ts(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function oe(t,e,n){const s=n??t;bs(t.x,Ts(e.x,s.x),e.scaleX,e.scale,e.originX),bs(t.y,Ts(e.y,s.y),e.scaleY,e.scale,e.originY)}function Mr(t,e){return Ar(Xl(t.getBoundingClientRect(),e))}function ql(t,e,n){const s=Mr(t,n),{scroll:i}=e;return i&&(nt(s.x,i.offset.x),nt(s.y,i.offset.y)),s}const Zl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jl=Dt.length;function Ql(t,e,n){let s="",i=!0;for(let r=0;r<Jl;r++){const a=Dt[r],l=t[a];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(a.startsWith("scale")?1:0);else{const u=parseFloat(l);c=a.startsWith("scale")?u===1:u===0}if(!c||n){const u=on(l,de[a]);if(!c){i=!1;const h=Zl[a]||a;s+=`${h}(${u}) `}n&&(e[a]=u)}}const o=t.pathRotation;return o&&(i=!1,s+=`rotate(${on(o,de.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function zn(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const c=e[l];if(kt.has(l)){r=!0;continue}else if(Bi(l)){i[l]=c;continue}else{const u=on(c,de[l]);l.startsWith("origin")?(a=!0,o[l]=u):s[l]=u}}if(e.transform||(r||n?s.transform=Ql(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;s.transformOrigin=`${l} ${c} ${u}`}}function Er(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i?.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Ss(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Lt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(b.test(t))t=parseFloat(t);else return t;const n=Ss(t,e.target.x),s=Ss(t,e.target.y);return`${n}% ${s}%`}},tc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Z.parse(t);if(i.length>5)return s;const o=Z.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=E(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}},hn={borderRadius:{...Lt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lt,borderTopRightRadius:Lt,borderBottomLeftRadius:Lt,borderBottomRightRadius:Lt,boxShadow:tc};function Dr(t,{layout:e,layoutId:n}){return kt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!hn[t]||t==="opacity")}function Hn(t,e,n){const s=t.style,i=e?.style,o={};if(!s)return o;for(const r in s)(B(s[r])||i&&B(i[r])||Dr(r,t)||n?.getValue(r)?.liveStyle!==void 0)&&(o[r]=s[r]);return o}function ec(t){return window.getComputedStyle(t)}class nc extends Pr{constructor(){super(...arguments),this.type="html",this.renderInstance=Er}readValueFromInstance(e,n){if(kt.has(n))return this.projection?.isProjecting?Xe(n):ba(e,n);{const s=ec(e),i=(Bi(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Mr(e,n)}build(e,n,s){zn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Hn(e,n,s)}}const sc={offset:"stroke-dashoffset",array:"stroke-dasharray"},ic={offset:"strokeDashoffset",array:"strokeDasharray"};function rc(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?sc:ic;t[o.offset]=`${-s}`,t[o.array]=`${e} ${n}`}const oc=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function kr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(zn(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const d of oc)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&rc(h,i,o,r,!1)}const Rr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Lr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function ac(t,e,n,s){Er(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Rr.has(i)?i:In(i),e.attrs[i])}function jr(t,e,n){const s=Hn(t,e,n);for(const i in t)if(B(t[i])||B(e[i])){const o=Dt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}class lc extends Pr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=j}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(kt.has(n)){const s=hr(n);return s&&s.default||0}return n=Rr.has(n)?n:In(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return jr(e,n,s)}build(e,n,s){kr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){ac(e,n,s,i)}mount(e){this.isSVGTag=Lr(e.tagName),super.mount(e)}}const cc=Un.length;function Br(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Br(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<cc;n++){const s=Un[n],i=t.props[s];(Ht(i)||i===!1)&&(e[s]=i)}return e}function Fr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const uc=[...Wn].reverse(),hc=Wn.length;function fc(t){return e=>Promise.all(e.map(({animation:n,options:s})=>al(t,n,s)))}function dc(t){let e=fc(t),n=Ps(),s=!0,i=!1;const o=c=>(u,h)=>{const f=yt(t,h,c==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:m,...g}=f;u={...u,...g,...m}}return u};function r(c){e=c(t)}function a(c){const{props:u}=t,h=Br(t.parent)||{},f=[],d=new Set;let m={},g=1/0;for(let x=0;x<hc;x++){const v=uc[x],w=n[v],T=u[v]!==void 0?u[v]:h[v],V=Ht(T),D=v===c?w.isActive:null;D===!1&&(g=x);let M=T===h[v]&&T!==u[v]&&V;if(M&&(s||i)&&t.manuallyAnimateOnMount&&(M=!1),w.protectedKeys={...m},!w.isActive&&D===null||!T&&!w.prevProp||we(T)||typeof T=="boolean")continue;if(v==="exit"&&w.isActive&&D!==!0){w.prevResolvedValues&&(m={...m,...w.prevResolvedValues});continue}const A=mc(w.prevProp,T);let I=A||v===c&&w.isActive&&!M&&V||x>g&&V,P=!1;const R=Array.isArray(T)?T:[T];let z=R.reduce(o(v),{});D===!1&&(z={});const{prevResolvedValues:ut={}}=w,Q={...ut,...z},it=N=>{I=!0,d.has(N)&&(P=!0,d.delete(N)),w.needsAnimating[N]=!0;const G=t.getValue(N);G&&(G.liveStyle=!1)};for(const N in Q){const G=z[N],ht=ut[N];if(m.hasOwnProperty(N))continue;let xt=!1;tn(G)&&tn(ht)?xt=!Fr(G,ht)||A:xt=G!==ht,xt?G!=null?it(N):d.add(N):G!==void 0&&d.has(N)?it(N):w.protectedKeys[N]=!0}w.prevProp=T,w.prevResolvedValues=z,w.isActive&&(m={...m,...z}),(s||i)&&t.blockInitialAnimation&&(I=!1);const tt=M&&A;I&&(!tt||P)&&f.push(...R.map(N=>{const G={type:v};if(typeof N=="string"&&(s||i)&&!tt&&t.manuallyAnimateOnMount&&t.parent){const{parent:ht}=t,xt=yt(ht,N);if(ht.enteringChildren&&xt){const{delayChildren:uo}=xt.transition||{};G.delay=nr(ht.enteringChildren,t,uo)}}return{animation:N,options:G}}))}if(d.size){const x={};if(typeof u.initial!="boolean"){const v=yt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(x.transition=v.transition)}d.forEach(v=>{const w=t.getBaseTarget(v),T=t.getValue(v);T&&(T.liveStyle=!0),x[v]=w??null}),f.push({animation:x})}let y=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(y=!1),s=!1,i=!1,y?e(f):Promise.resolve()}function l(c,u){if(n[c].isActive===u)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(c,u)),n[c].isActive=u;const h=a(c);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Ps(),i=!0}}}function mc(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Fr(e,t):!1}function ft(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ps(){return{animate:ft(!0),whileInView:ft(),whileHover:ft(),whileTap:ft(),whileDrag:ft(),whileFocus:ft(),exit:ft()}}function fn(t,e){t.min=e.min,t.max=e.max}function X(t,e){fn(t.x,e.x),fn(t.y,e.y)}function As(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Ir=1e-4,pc=1-Ir,gc=1+Ir,Nr=.01,yc=0-Nr,xc=0+Nr;function U(t){return t.max-t.min}function vc(t,e,n){return Math.abs(t-e)<=n}function Vs(t,e,n,s=.5){t.origin=s,t.originPoint=E(e.min,e.max,t.origin),t.scale=U(n)/U(e),t.translate=E(n.min,n.max,t.origin)-t.originPoint,(t.scale>=pc&&t.scale<=gc||isNaN(t.scale))&&(t.scale=1),(t.translate>=yc&&t.translate<=xc||isNaN(t.translate))&&(t.translate=0)}function Ot(t,e,n,s){Vs(t.x,e.x,n.x,s?s.originX:void 0),Vs(t.y,e.y,n.y,s?s.originY:void 0)}function Cs(t,e,n,s=0){const i=s?E(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+U(e)}function wc(t,e,n,s){Cs(t.x,e.x,n.x,s?.x),Cs(t.y,e.y,n.y,s?.y)}function Ms(t,e,n,s=0){const i=s?E(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+U(e)}function ge(t,e,n,s){Ms(t.x,e.x,n.x,s?.x),Ms(t.y,e.y,n.y,s?.y)}function Es(t,e,n,s,i){return t-=e,t=pe(t,1/n,s),i!==void 0&&(t=pe(t,1/i,s)),t}function bc(t,e=0,n=1,s=.5,i,o=t,r=t){if(st.test(e)&&(e=parseFloat(e),e=E(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=E(o.min,o.max,s);t===o&&(a-=e),t.min=Es(t.min,e,n,a,i),t.max=Es(t.max,e,n,a,i)}function Ds(t,e,[n,s,i],o,r){bc(t,e[n],e[s],e[i],e.scale,o,r)}const Tc=["x","scaleX","originX"],Sc=["y","scaleY","originY"];function ks(t,e,n,s){Ds(t.x,e,Tc,n?n.x:void 0,s?s.x:void 0),Ds(t.y,e,Sc,n?n.y:void 0,s?s.y:void 0)}function Rs(t){return t.translate===0&&t.scale===1}function Or(t){return Rs(t.x)&&Rs(t.y)}function Ls(t,e){return t.min===e.min&&t.max===e.max}function Pc(t,e){return Ls(t.x,e.x)&&Ls(t.y,e.y)}function js(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Wr(t,e){return js(t.x,e.x)&&js(t.y,e.y)}function Bs(t){return U(t.x)/U(t.y)}function Fs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function et(t){return[t("x"),t("y")]}function Ac(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,pathRotation:h,rotateX:f,rotateY:d,skewX:m,skewY:g}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotate(${h}deg) `),f&&(s+=`rotateX(${f}deg) `),d&&(s+=`rotateY(${d}deg) `),m&&(s+=`skewX(${m}deg) `),g&&(s+=`skewY(${g}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Ur=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Vc=Ur.length,Is=t=>typeof t=="string"?parseFloat(t):t,Ns=t=>typeof t=="number"||b.test(t);function Cc(t,e,n,s,i,o){i?(t.opacity=E(0,n.opacity??1,Mc(s)),t.opacityExit=E(e.opacity??1,0,Ec(s))):o&&(t.opacity=E(e.opacity??1,n.opacity??1,s));for(let r=0;r<Vc;r++){const a=Ur[r];let l=Os(e,a),c=Os(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ns(l)===Ns(c)?(t[a]=Math.max(E(Is(l),Is(c),s),0),(st.test(c)||st.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=E(e.rotate||0,n.rotate||0,s))}function Os(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Mc=zr(0,.5,Ei),Ec=zr(.5,.95,H);function zr(t,e,n){return s=>s<t?0:s>e?1:n(Vt(t,e,s))}function Dc(t,e,n){const s=B(t)?t:q(t);return s.start(Bn("",s,e,n)),s.animation}function Kt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const kc=(t,e)=>t.depth-e.depth;class Rc{constructor(){this.children=[],this.isDirty=!1}add(e){xn(this.children,e),this.isDirty=!0}remove(e){ce(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(kc),this.isDirty=!1,this.children.forEach(e)}}function Lc(t,e){const n=W.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(_(s),t(o-e))};return C.setup(s,!0),()=>_(s)}function ae(t){return B(t)?t.get():t}class jc{constructor(){this.members=[]}add(e){xn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(ce(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(ce(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:o}=e.options;(i===void 0||i!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const le={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Le=["","X","Y","Z"],Bc=1e3;let Fc=0;function je(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Hr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ar(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",C,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Hr(s)}function Kr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=Fc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Oc),this.nodes.forEach(Gc),this.nodes.forEach($c),this.nodes.forEach(Wc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Rc)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new wn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=On(r)&&!Fl(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;C.read(()=>{h=window.innerWidth}),t(r,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,u&&u(),u=Lc(f,250),le.hasAnimatedSinceResize&&(le.hasAnimatedSinceResize=!1,this.nodes.forEach(zs)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||Zc,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=c.getProps(),x=!this.targetLayout||!Wr(this.targetLayout,d),v=!h&&f;if(this.options.layoutRoot||this.resumeFrom||v||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...jn(m,"layout"),onPlay:g,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,v,w.path)}else h||zs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),_(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_c),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Hr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(zc),this.nodes.forEach(Ws);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Us);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Hc),this.nodes.forEach(Kc),this.nodes.forEach(Ic),this.nodes.forEach(Nc)):this.nodes.forEach(Us),this.clearAllSnapshots();const a=W.now();F.delta=J(0,1e3/60,a-F.timestamp),F.timestamp=a,F.isProcessing=!0,Pe.update.process(F),Pe.preRender.process(F),Pe.render.process(F),F.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Mt.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Uc),this.sharedNodes.forEach(Xc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,C.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){C.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!U(this.snapshot.measuredBox.x)&&!U(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=j()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Or(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||dt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Jc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return j();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Qc))){const{scroll:c}=this.root;c&&(nt(a.x,c.offset.x),nt(a.y,c.offset.y))}return a}removeElementScroll(r){const a=j();if(X(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;c!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&X(a,r),nt(a.x,u.offset.x),nt(a.y,u.offset.y))}return a}applyTransform(r,a=!1,l){const c=l||j();X(c,r);for(let u=0;u<this.path.length;u++){const h=this.path[u];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(nt(c.x,-h.scroll.offset.x),nt(c.y,-h.scroll.offset.y)),dt(h.latestValues)&&oe(c,h.latestValues,h.layout?.layoutBox)}return dt(this.latestValues)&&oe(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(r){const a=j();X(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!dt(c.latestValues))continue;let u;c.instance&&(cn(c.latestValues)&&c.updateSnapshot(),u=j(),X(u,c.measurePageBox())),ks(a,c.latestValues,c.snapshot?.layoutBox,u)}return dt(this.latestValues)&&ks(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==F.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=F.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=j(),this.targetWithTransforms=j()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wc(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):X(this.target,this.layout.layoutBox),Cr(this.target,this.targetDelta)):X(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||cn(this.parent.latestValues)||Vr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=j(),this.relativeTargetOrigin=j(),ge(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),X(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===F.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;X(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Yl(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=j());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(As(this.prevProjectionDelta.x,this.projectionDelta.x),As(this.prevProjectionDelta.y,this.projectionDelta.y)),Ot(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!Fs(this.projectionDelta.x,this.prevProjectionDelta.x)||!Fs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=St(),this.projectionDelta=St(),this.projectionDeltaWithTransform=St()}setAnimationOrigin(r,a=!1,l){const c=this.snapshot,u=c?c.latestValues:{},h={...this.latestValues},f=St();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=j(),m=c?c.source:void 0,g=this.layout?this.layout.source:void 0,y=m!==g,x=this.getStack(),v=!x||x.members.length<=1,w=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(qc));this.animationProgress=0;let T;const V=l?.interpolateProjection(r);this.mixTargetDelta=D=>{const M=D/1e3,A=V?.(M);A?(f.x.translate=A.x,f.x.scale=E(r.x.scale,1,M),f.x.origin=r.x.origin,f.x.originPoint=r.x.originPoint,f.y.translate=A.y,f.y.scale=E(r.y.scale,1,M),f.y.origin=r.y.origin,f.y.originPoint=r.y.originPoint):(Hs(f.x,r.x,M),Hs(f.y,r.y,M)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ge(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Yc(this.relativeTarget,this.relativeTargetOrigin,d,M),T&&Pc(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=j()),X(T,this.relativeTarget)),y&&(this.animationValues=h,Cc(h,u,this.latestValues,M,w,v)),A&&A.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=A.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(_(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=C.update(()=>{le.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=q(0)),this.motionValue.jump(0,!1),this.currentAnimation=Dc(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Bc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&Gr(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||j();const h=U(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=U(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}X(a,l),oe(a,u),Ot(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new jc),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&je("z",r,c,this.animationValues);for(let u=0;u<Le.length;u++)je(`rotate${Le[u]}`,r,c,this.animationValues),je(`skew${Le[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=ae(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=ae(a?.pointerEvents)||""),this.hasProjected&&!dt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=Ac(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),r.transform=h;const{x:f,y:d}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in hn){if(u[m]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:x}=hn[m],v=h==="none"?u[m]:g(u[m],c);if(y){const w=y.length;for(let T=0;T<w;T++)r[y[T]]=v}else x?this.options.visualElement.renderState.vars[m]=v:r[m]=v}this.options.layoutId&&(r.pointerEvents=c===this?ae(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(Ws),this.root.sharedNodes.clear()}}}function Ic(t){t.updateLayout()}function Nc(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;if(i==="size")et(u=>{const h=o?e.measuredBox[u]:e.layoutBox[u],f=U(h);h.min=n[u].min,h.max=h.min+f});else if(i==="x"||i==="y"){const u=i==="x"?"y":"x";fn(o?e.measuredBox[u]:e.layoutBox[u],n[u])}else Gr(i,e.layoutBox,n)&&et(u=>{const h=o?e.measuredBox[u]:e.layoutBox[u],f=U(n[u]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+f)});const r=St();Ot(r,n,e.layoutBox);const a=St();o?Ot(a,t.applyTransform(s,!0),e.measuredBox):Ot(a,n,e.layoutBox);const l=!Or(r);let c=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:f}=u;if(h&&f){const d=t.options.layoutAnchor||void 0,m=j();ge(m,e.layoutBox,h.layoutBox,d);const g=j();ge(g,n,f.layoutBox,d),Wr(m,g)||(c=!0),u.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=m,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Oc(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Wc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Uc(t){t.clearSnapshot()}function Ws(t){t.clearMeasurements()}function zc(t){t.isLayoutDirty=!0,t.updateLayout()}function Us(t){t.isLayoutDirty=!1}function Hc(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Kc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function zs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Gc(t){t.resolveTargetDelta()}function $c(t){t.calcProjection()}function _c(t){t.resetSkewAndRotation()}function Xc(t){t.removeLeadSnapshot()}function Hs(t,e,n){t.translate=E(e.translate,0,n),t.scale=E(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ks(t,e,n,s){t.min=E(e.min,n.min,s),t.max=E(e.max,n.max,s)}function Yc(t,e,n,s){Ks(t.x,e.x,n.x,s),Ks(t.y,e.y,n.y,s)}function qc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Zc={duration:.45,ease:[.4,0,.1,1]},Gs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),$s=Gs("applewebkit/")&&!Gs("chrome/")?Math.round:H;function _s(t){t.min=$s(t.min),t.max=$s(t.max)}function Jc(t){_s(t.x),_s(t.y)}function Gr(t,e,n){return t==="position"||t==="preserve-aspect"&&!vc(Bs(e),Bs(n),.2)}function Qc(t){return t!==t.root&&t.scroll?.wasRoot}const tu=Kr({attachResizeListener:(t,e)=>Kt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Be={current:void 0},$r=Kr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Be.current){const t=new tu({});t.mount(window),t.setOptions({layoutScroll:!0}),Be.current=t}return Be.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Te=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function eu(t=!0){const e=S.useContext(yn);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=S.useId();S.useEffect(()=>{if(t)return i(o)},[t]);const r=S.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const _r=S.createContext({strict:!1}),Xs={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Ys=!1;function nu(){if(Ys)return;const t={};for(const e in Xs)t[e]={isEnabled:n=>Xs[e].some(s=>!!n[s])};Sr(t),Ys=!0}function Xr(){return nu(),Gl()}function su(t){const e=Xr();for(const n in t)e[n]={...e[n],...t[n]};Sr(e)}const iu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function ye(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||iu.has(t)}let Yr=t=>!ye(t);function ru(t){typeof t=="function"&&(Yr=e=>e.startsWith("on")?!ye(e):t(e))}try{ru(require("@emotion/is-prop-valid").default)}catch{}function ou(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||B(t[i])||(Yr(i)||n===!0&&ye(i)||!e&&!ye(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const Se=S.createContext({});function au(t,e){if(be(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Ht(n)?n:void 0,animate:Ht(s)?s:void 0}}return t.inherit!==!1?e:{}}function lu(t){const{initial:e,animate:n}=au(t,S.useContext(Se));return S.useMemo(()=>({initial:e,animate:n}),[qs(e),qs(n)])}function qs(t){return Array.isArray(t)?t.join(" "):t}const Kn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qr(t,e,n){for(const s in e)!B(e[s])&&!Dr(s,n)&&(t[s]=e[s])}function cu({transformTemplate:t},e){return S.useMemo(()=>{const n=Kn();return zn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function uu(t,e){const n=t.style||{},s={};return qr(s,n,t),Object.assign(s,cu(t,e)),s}function hu(t,e){const n={},s=uu(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const Zr=()=>({...Kn(),attrs:{}});function fu(t,e,n,s){const i=S.useMemo(()=>{const o=Zr();return kr(o,e,Lr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};qr(o,t.style,t),i.style={...o,...i.style}}return i}const du=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Gn(t){return typeof t!="string"||t.includes("-")?!1:!!(du.indexOf(t)>-1||/[A-Z]/u.test(t))}function mu(t,e,n,{latestValues:s},i,o=!1,r){const l=(r??Gn(t)?fu:hu)(e,s,i,t),c=ou(e,typeof t=="string",o),u=t!==S.Fragment?{...c,...l,ref:n}:{},{children:h}=e,f=S.useMemo(()=>B(h)?h.get():h,[h]);return S.createElement(t,{...u,children:f})}function pu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:gu(n,s,i,t),renderState:e()}}function gu(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=ae(o[f]);let{initial:r,animate:a}=t;const l=be(t),c=br(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;if(h&&typeof h!="boolean"&&!we(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=Fn(t,f[d]);if(m){const{transitionEnd:g,transition:y,...x}=m;for(const v in x){let w=x[v];if(Array.isArray(w)){const T=u?w.length-1:0;w=w[T]}w!==null&&(i[v]=w)}for(const v in g)i[v]=g[v]}}}return i}const Jr=t=>(e,n)=>{const s=S.useContext(Se),i=S.useContext(yn),o=()=>pu(t,e,s,i);return n?o():At(o)},yu=Jr({scrapeMotionValuesFromProps:Hn,createRenderState:Kn}),xu=Jr({scrapeMotionValuesFromProps:jr,createRenderState:Zr}),vu=Symbol.for("motionComponentSymbol");function wu(t,e,n){const s=S.useRef(n);S.useInsertionEffect(()=>{s.current=n});const i=S.useRef(null);return S.useCallback(o=>{o&&t.onMount?.(o),e&&(o?e.mount(o):e.unmount());const r=s.current;if(typeof r=="function")if(o){const a=r(o);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):r(o);else r&&(r.current=o)},[e])}const Qr=S.createContext({});function wt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function bu(t,e,n,s,i,o){const{visualElement:r}=S.useContext(Se),a=S.useContext(_r),l=S.useContext(yn),c=S.useContext(Te),u=c.reducedMotion,h=c.skipAnimations,f=S.useRef(null),d=S.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:r,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:h,isSVG:o}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,g=S.useContext(Qr);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Tu(f.current,n,i,g);const y=S.useRef(!1);S.useInsertionEffect(()=>{m&&y.current&&m.update(n,l)});const x=n[or],v=S.useRef(!!x&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return gn(()=>{d.current=!0,m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),S.useEffect(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x)}),v.current=!1),m.enteringChildren=void 0)}),m}function Tu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:to(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&wt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}function to(t){if(t)return t.options.allowProjection!==!1?t.projection:to(t.parent)}function Fe(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&su(s);const o=n?n==="svg":Gn(t),r=o?xu:yu;function a(c,u){let h;const f={...S.useContext(Te),...c,layoutId:Su(c)},{isStatic:d}=f,m=lu(c),g=r(c,d);if(!d&&typeof window<"u"){Pu();const y=Au(f);h=y.MeasureLayout,m.visualElement=bu(t,g,f,i,y.ProjectionNode,o)}return p.jsxs(Se.Provider,{value:m,children:[h&&m.visualElement?p.jsx(h,{visualElement:m.visualElement,...f}):null,mu(t,c,wu(g,m.visualElement,u),g,d,e,o)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=S.forwardRef(a);return l[vu]=t,l}function Su({layoutId:t}){const e=S.useContext(xi).id;return e&&t!==void 0?e+"-"+t:t}function Pu(t,e){S.useContext(_r).strict}function Au(t){const e=Xr(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Vu(t,e){if(typeof Proxy>"u")return Fe;const n=new Map,s=(o,r)=>Fe(o,r,t,e),i=(o,r)=>s(o,r);return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,Fe(r,void 0,t,e)),n.get(r))})}const Cu=(t,e)=>e.isSVG??Gn(t)?new lc(e):new nc(e,{allowProjection:t!==S.Fragment});class Mu extends ct{constructor(e){super(e),e.animationState||(e.animationState=dc(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();we(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Eu=0;class Du extends ct{constructor(){super(...arguments),this.id=Eu++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:o,custom:r}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const a=yt(this.node,o,r);if(a){const{transition:l,transitionEnd:c,...u}=a;for(const h in u)this.node.getValue(h)?.jump(u[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const ku={animation:{Feature:Mu},exit:{Feature:Du}};function Xt(t){return{point:{x:t.pageX,y:t.pageY}}}const Ru=t=>e=>Nn(e)&&t(e,Xt(e));function Wt(t,e,n,s){return Kt(t,e,Ru(n),s)}const eo=({current:t})=>t?t.ownerDocument.defaultView:null,Zs=(t,e)=>Math.abs(t-e);function Lu(t,e){const n=Zs(t.x,e.x),s=Zs(t.y,e.y);return Math.sqrt(n**2+s**2)}const Js=new Set(["auto","scroll"]);class no{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Zt(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Ie(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=Lu(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:y}=d,{timestamp:x}=F;this.history.push({...y,timestamp:x});const{onStart:v,onMove:w}=this.handlers;m||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=Zt(m,this.transformPagePoint),C.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Ie(d.type==="pointercancel"?this.lastMoveEventInfo:Zt(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,v),y&&y(d,v)},!Nn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const l=Xt(e),c=Zt(l,this.transformPagePoint),{point:u}=c,{timestamp:h}=F;this.history=[{...u,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Ie(c,this.history)),this.removeListeners=Gt(Wt(this.contextWindow,"pointermove",this.handlePointerMove),Wt(this.contextWindow,"pointerup",this.handlePointerUp),Wt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Js.has(s.overflowX)||Js.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o={x:i.x-n.x,y:i.y-n.y};o.x===0&&o.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(e,i),C.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),_(this.updatePoint)}}function Zt(t,e){return e?{point:e(t.point)}:t}function Qs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ie({point:t},e){return{point:t,delta:Qs(t,so(e)),offset:Qs(t,ju(e)),velocity:Bu(e,.1)}}function ju(t){return t[0]}function so(t){return t[t.length-1]}function Bu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=so(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>K(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>K(e)*2&&(s=t[1]);const o=$(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Fu(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?E(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?E(n,t,s.max):Math.min(t,n)),t}function ti(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Iu(t,{top:e,left:n,bottom:s,right:i}){return{x:ti(t.x,n,i),y:ti(t.y,e,s)}}function ei(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Nu(t,e){return{x:ei(t.x,e.x),y:ei(t.y,e.y)}}function Ou(t,e){let n=.5;const s=U(t),i=U(e);return i>s?n=Vt(e.min,e.max-s,t.min):s>i&&(n=Vt(t.min,t.max-i,e.min)),J(0,1,n)}function Wu(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const dn=.35;function Uu(t=dn){return t===!1?t=0:t===!0&&(t=dn),{x:ni(t,"left","right"),y:ni(t,"top","bottom")}}function ni(t,e,n){return{min:si(t,e),max:si(t,n)}}function si(t,e){return typeof t=="number"?t:t[e]||0}const zu=new WeakMap;class Hu{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=j(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{n&&this.snapToCursor(Xt(h).point),this.stopAnimation()},r=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:g}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=vl(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),et(x=>{let v=this.getAxisMotionValue(x).get()||0;if(st.test(v)){const{projection:w}=this.visualElement;if(w&&w.layout){const T=w.layout.layoutBox[x];T&&(v=U(T)*(parseFloat(v)/100))}}this.originPoint[x]=v}),g&&C.update(()=>g(h,f),!1,!0),en(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:g,onDrag:y}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:x}=f;if(m&&this.currentDirection===null){this.currentDirection=Gu(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),y&&C.update(()=>y(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new no(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:eo(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&C.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Jt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Fu(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&wt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Iu(s.layoutBox,e):this.constraints=!1,this.elastic=Uu(n),i!==this.constraints&&!wt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&et(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Wu(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!wt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const o=ql(s,i.root,this.visualElement.getTransformPagePoint());let r=Nu(i.layout.layoutBox,o);if(n){const a=n(_l(r));this.hasMutatedConstraints=!!a,a&&(r=Ar(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=et(u=>{if(!Jt(u,n,this.currentDirection))return;let h=l&&l[u]||{};(r===!0||r===u)&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return en(this.visualElement,e),s.start(Bn(e,s,0,n,this.visualElement,!1))}stopAnimation(){et(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){et(n=>{const{drag:s}=this.getProps();if(!Jt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n],l=o.get()||0;o.set(e[n]-E(r,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!wt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};et(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Ou({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),et(r=>{if(!Jt(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(E(l,c,i[r]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;zu.set(this.visualElement,this);const e=this.visualElement.current,n=Wt(e,"pointerdown",c=>{const{drag:u,dragListener:h=!0}=this.getProps(),f=c.target,d=f!==e&&Al(f);u&&h&&!d&&this.start(c)});let s;const i=()=>{const{dragConstraints:c}=this.getProps();wt(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),s||(s=Ku(e,c.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,r=o.addEventListener("measure",i);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),C.read(i);const a=Kt(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(et(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=c[h].translate,f.set(f.get()+c[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),r(),l&&l(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=dn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function ii(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function Ku(t,e,n){const s=an(t,ii(n)),i=an(e,ii(n));return()=>{s(),i()}}function Jt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Gu(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class $u extends ct{constructor(e){super(e),this.removeGroupControls=H,this.removeListeners=H,this.controls=new Hu(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||H}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ne=t=>
1(e,n)=>{t&&C.update(()=>t(e,n),!1,!0)};class _u extends ct{constructor(){super(...arguments),this.removePointerDownListener=H}onPointerDown(e){this.session=new no(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:eo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ne(e),onStart:Ne(n),onMove:Ne(s),onEnd:(o,r)=>{delete this.session,i&&C.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=Wt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Oe=!1;class Xu extends S.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Oe&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),le.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,e.layoutDependency!==n&&r.setOptions({...r.options,layoutDependency:n}),Oe=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||C.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),Mt.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Oe=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function io(t){const[e,n]=eu(),s=S.useContext(xi);return p.jsx(Xu,{...t,layoutGroup:s,switchLayoutGroup:S.useContext(Qr),isPresent:e,safeToRemove:n})}const Yu={pan:{Feature:_u},drag:{Feature:$u,ProjectionNode:$r,MeasureLayout:io}};function ri(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&C.postRender(()=>o(e,Xt(e)))}class qu extends ct{mount(){const{current:e}=this.node;e&&(this.unmount=bl(e,(n,s)=>(ri(this.node,s,"Start"),i=>ri(this.node,i,"End"))))}unmount(){}}class Zu extends ct{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Gt(Kt(this.node.current,"focus",()=>this.onFocus()),Kt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function oi(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&C.postRender(()=>o(e,Xt(e)))}class Ju extends ct{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Cl(e,(i,o)=>(oi(this.node,o,"Start"),(r,{success:a})=>oi(this.node,r,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const mn=new WeakMap,We=new WeakMap,Qu=t=>{const e=mn.get(t.target);e&&e(t)},th=t=>{t.forEach(Qu)};function eh({root:t,...e}){const n=t||document;We.has(n)||We.set(n,{});const s=We.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(th,{root:t,...e})),s[i]}function nh(t,e,n){const s=eh(e);return mn.set(t,n),s.observe(t),()=>{mn.delete(t),s.unobserve(t)}}const sh={some:0,all:1};class ih extends ct{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:sh[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=c?u:h;f&&f(l)};this.stopObserver=nh(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(rh(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function rh({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const oh={inView:{Feature:ih},tap:{Feature:Ju},focus:{Feature:Zu},hover:{Feature:qu}},ah={layout:{ProjectionNode:$r,MeasureLayout:io}},lh={...ku,...oh,...Yu,...ah},Rt=Vu(lh,Cu);function xe(t){return typeof window>"u"?!1:t?Yi():Ln()}const ch=50,ai=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),uh=()=>({time:0,x:ai(),y:ai()}),hh={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function li(t,e,n,s){const i=n[e],{length:o,position:r}=hh[e],a=i.current,l=n.time;i.current=Math.abs(t[`scroll${r}`]),i.scrollLength=t[`scroll${o}`]-t[`client${o}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=Vt(0,i.scrollLength,i.current);const c=s-l;i.velocity=c>ch?0:bn(i.current-a,c)}function fh(t,e,n){li(t,"x",e,n),li(t,"y",e,n),e.time=n}function dh(t,e){const n={x:0,y:0};let s=t;for(;s&&s!==e;)if(mr(s))n.x+=s.offsetLeft,n.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const i=s.getBoundingClientRect();s=s.parentElement;const o=s.getBoundingClientRect();n.x+=i.left-o.left,n.y+=i.top-o.top}else if(s instanceof SVGGraphicsElement){const{x:i,y:o}=s.getBBox();n.x+=i,n.y+=o;let r=null,a=s.parentNode;for(;!r;)a.tagName==="svg"&&(r=a),a=s.parentNode;s=r}else break;return n}const pn={start:0,center:.5,end:1};function ci(t,e,n=0){let s=0;if(t in pn&&(t=pn[t]),typeof t=="string"){const i=parseFloat(t);t.endsWith("px")?s=i:t.endsWith("%")?t=i/100:t.endsWith("vw")?s=i/100*document.documentElement.clientWidth:t.endsWith("vh")?s=i/100*document.documentElement.clientHeight:t=i}return typeof t=="number"&&(s=e*t),n+s}const mh=[0,0];function ph(t,e,n,s){let i=Array.isArray(t)?t:mh,o=0,r=0;return typeof t=="number"?i=[t,t]:typeof t=="string"&&(t=t.trim(),t.includes(" ")?i=t.split(" "):i=[t,pn[t]?t:"0"]),o=ci(i[0],n,s),r=ci(i[1],e),o-r}const Bt={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},gh={x:0,y:0};function yh(t){return"getBBox"in t&&t.tagName!=="svg"?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}function xh(t,e,n){const{offset:s=Bt.All}=n,{target:i=t,axis:o="y"}=n,r=o==="y"?"height":"width",a=i!==t?dh(i,t):gh,l=i===t?{width:t.scrollWidth,height:t.scrollHeight}:yh(i),c={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let u=!e[o].interpolate;const h=s.length;for(let f=0;f<h;f++){const d=ph(s[f],c[r],l[r],a[o]);
1!u&&d!==e[o].interpolatorOffsets[f]&&(u=!0),e[o].offset[f]=d}u&&(e[o].interpolate=En(e[o].offset,Ki(s),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=J(0,1,e[o].interpolate(e[o].current))}function vh(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let s=e;for(;s&&s!==t;)n.x.targetOffset+=s.offsetLeft,n.y.targetOffset+=s.offsetTop,s=s.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}function wh(t,e,n,s={}){return{measure:i=>{vh(t,s.target,n),fh(t,n,i),(s.offset||s.target)&&xh(t,n,s)},notify:()=>e(n)}}const vt=new WeakMap,ui=new WeakMap,Ue=new WeakMap,hi=new WeakMap,Qt=new WeakMap,fi=t=>t===document.scrollingElement?window:t;function ro(t,{container:e=document.scrollingElement,trackContentSize:n=!1,...s}={}){if(!e)return H;let i=Ue.get(e);i||(i=new Set,Ue.set(e,i));const o=uh(),r=wh(e,t,o,s);if(i.add(r),!vt.has(e)){const l=()=>{for(const f of i)f.measure(F.timestamp);C.preUpdate(c)},c=()=>{for(const f of i)f.notify()},u=()=>C.read(l);vt.set(e,u);const h=fi(e);window.addEventListener("resize",u),e!==document.documentElement&&ui.set(e,an(e,u)),h.addEventListener("scroll",u),u()}if(n&&!Qt.has(e)){const l=vt.get(e),c={width:e.scrollWidth,height:e.scrollHeight};hi.set(e,c);const u=()=>{const f=e.scrollWidth,d=e.scrollHeight;(c.width!==f||c.height!==d)&&(l(),c.width=f,c.height=d)},h=C.read(u,!0);Qt.set(e,h)}const a=vt.get(e);return C.read(a,!1,!0),()=>{_(a);const l=Ue.get(e);if(!l||(l.delete(r),l.size))return;const c=vt.get(e);vt.delete(e),c&&(fi(e).removeEventListener("scroll",c),ui.get(e)?.(),window.removeEventListener("resize",c));const u=Qt.get(e);u&&(_(u),Qt.delete(e)),hi.delete(e)}}const bh=[[Bt.Enter,"entry"],[Bt.Exit,"exit"],[Bt.Any,"cover"],[Bt.All,"contain"]],di={start:0,end:1};function Th(t){const e=t.trim().split(/\s+/);if(e.length!==2)return;const n=di[e[0]],s=di[e[1]];if(!(n===void 0||s===void 0))return[n,s]}function Sh(t){if(t.length!==2)return;const e=[];for(const n of t)if(Array.isArray(n))e.push(n);else if(typeof n=="string"){const s=Th(n);if(!s)return;e.push(s)}else return;return e}function Ph(t,e){const n=Sh(t);if(!n)return!1;for(let s=0;s<2;s++){const i=n[s],o=e[s];if(i[0]!==o[0]||i[1]!==o[1])return!1}return!0}function $n(t){if(!t)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[e,n]of bh)if(Ph(t,e))return{rangeStart:`${n} 0%`,rangeEnd:`${n} 100%`}}const mi=new Map;function pi(t){const e={value:0},n=ro(s=>{e.value=s[t.axis].progress*100},t);return{currentTime:e,cancel:n}}function oo({source:t,container:e,...n}){const{axis:s}=n;t&&(e=t);let i=mi.get(e);i||(i=new Map,mi.set(e,i));const o=n.target??"self";let r=i.get(o);r||(r={},i.set(o,r));const a=s+(n.offset??[]).join(",");return r[a]||(n.target&&xe(n.target)?$n(n.offset)?r[a]=new ViewTimeline({subject:n.target,axis:s}):r[a]=pi({container:e,...n}):xe()?r[a]=new ScrollTimeline({source:e,axis:s}):r[a]=pi({container:e,...n})),r[a]}function Ah(t,e){const n=oo(e),s=e.target?$n(e.offset):void 0,i=e.target?xe(e.target)&&!!s:xe();return t.attachTimeline({timeline:i?n:void 0,...s&&i&&{rangeStart:s.rangeStart,rangeEnd:s.rangeEnd},observe:o=>(o.pause(),wr(r=>{o.time=o.iterationDuration*r},n))})}function Vh(t){return t&&(t.target||t.offset)}function Ch(t){return t.length===2}function Mh(t,e){return Ch(t)||Vh(e)?ro(n=>{t(n[e.axis].progress,n)},e):wr(t,oo(e))}function ao(t,{axis:e="y",container:n=document.scrollingElement,...s}={}){if(!n)return H;const i={axis:e,container:n,...s};return typeof t=="function"?Mh(t,i):Ah(t,i)}const Eh=()=>({scrollX:q(0),scrollY:q(0),scrollXProgress:q(0),scrollYProgress:q(0)}),Pt=t=>t?!t.current:!1;function gi(t,e,n,s){return{factory:i=>{let o;const r=()=>{if(Pt(n)||Pt(s)){Mt.read(r);return}o=ao(i,{...e,axis:t,container:n?.current||void 0,target:s?.current||void 0})};return Mt.read(r),()=>{pr(r),o?.()}},times:[0,1],keyframes:[0,1],ease:i=>i,duration:1}}function Dh(t,e){return typeof window>"u"?!1:t?Yi()&&!!$n(e):Ln()}function kh({container:t,target:e,...n}={}){const s=At(Eh);Dh(e,n.offset)&&(s.scrollXProgress.accelerate=gi("x",n,t,e),s.scrollYProgress.accelerate=gi("y",n,t,e));const i=S.useRef(null),o=S.useRef(!1),r=S.useCallback(()=>(i.current=ao((a,{x:l,y:c})=>{s.scrollX.set(l.current),s.scrollXProgress.set(l.progress),s.scrollY.set(c.current),s.scrollYProgress.set(c.progress)}
1,{...n,container:t?.current||void 0,target:e?.current||void 0}),()=>{i.current?.()}),[t,e,JSON.stringify(n.offset)]);return gn(()=>{if(o.current=!1,Pt(t)||Pt(e)){o.current=!0;return}else return r()},[r]),S.useEffect(()=>{if(!o.current)return;let a;const l=()=>{const c=Pt(t),u=Pt(e);!c&&!u&&(a=r())};return Mt.read(l),()=>{pr(l),a?.()}},[r]),s}function lo(t){const e=At(()=>q(t)),{isStatic:n}=S.useContext(Te);if(n){const[,s]=S.useState(t);S.useEffect(()=>e.on("change",s),[])}return e}function co(t,e){const n=lo(e()),s=()=>n.set(e());return s(),gn(()=>{const i=()=>C.preRender(s,!1,!0),o=t.map(r=>r.on("change",i));return()=>{o.forEach(r=>r()),_(s)}}),n}function Rh(t){Nt.current=[],t();const e=co(Nt.current,t);return Nt.current=void 0,e}function O(t,e,n,s){if(typeof t=="function")return Rh(t);if(n!==void 0&&!Array.isArray(n)&&typeof e!="function")return Lh(t,e,n,s);const r=typeof e=="function"?e:Il(e,n,s),a=Array.isArray(t)?yi(t,r):yi([t],([c])=>r(c)),l=Array.isArray(t)?void 0:t.accelerate;return l&&!l.isTransformed&&typeof e!="function"&&Array.isArray(n)&&s?.clamp!==!1&&(a.accelerate={...l,times:e,keyframes:n,isTransformed:!0}),a}function yi(t,e){const n=At(()=>[]);return co(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}function Lh(t,e,n,s){const i=At(()=>Object.keys(n)),o=At(()=>({}));for(const r of i)o[r]=O(t,e,n[r],s);return o}function jh(t,e={}){const{isStatic:n}=S.useContext(Te),s=()=>B(t)?t.get():t;if(n)return O(s);const i=lo(s());return S.useInsertionEffect(()=>Nl(i,t,e),[i,JSON.stringify(e)]),i}function Bh(t,e={}){return jh(t,{type:"spring",...e})}const Fh="/assets/01-feed-DGpINAVM.png",Ih="/assets/02-introduction-DzJC9qWQ.png",Nh="/assets/03-correction-_q9QvK6h.png",Oh="/assets/04-grammar-C7B0J_HM.png",ot=[{step:"01",kicker:"Discover topics you care about",title:"A feed that turns culture into learning moments.",desc:"A personalized feed turns culture, work, and daily life into learning moments â tap any card to drop into a live lesson.",img:Fh,alt:"Feed screen showing the Eierlegende Wollmilchsau German idiom card",sticker:{side:"right",top:"12%",label:"Personalized feed",note:"Culture, work, and daily life â tuned to you."}},{step:"02",kicker:"Start speaking with one tap",title:"A natural voice session with Lingo.",desc:"Each topic opens a natural AI voice session with Lingo. No quizzes, no flashcards â just a real exchange.",img:Ih,alt:"Introduction screen where Lingo explains the German idiom",sticker:{side:"left",top:"20%",label:"One tap to speak",note:"Open a topic, start a real conversation."}},{step:"03",kicker:"Get coached in the moment",title:"Corrections that don't break the flow.",desc:"Corrections and hints appear without breaking the flow â fixes for case, ending, or word order land inline.",img:Nh,alt:"Correction screen highlighting a case and adjective ending fix",sticker:{side:"right",top:"38%",label:"Inline coaching",note:"Hints and fixes appear as you speak."}},{step:"04",kicker:"Understand grammar in context",title:"The rule, tied to the moment you just lived.",desc:"Every session includes grammar insights connected to the conversation â not isolated textbook rules.",img:Oh,alt:"Grammar focus screen explaining word order after 'dass'",sticker:{side:"left",top:"30%",label:"Grammar in context",note:"Connected to what you just said â never isolated."}}];function Wh(){const t=S.useRef(null),{scrollYProgress:e}=kh({target:t,offset:["start start","end end"]}),n=Bh(e,{stiffness:120,damping:28,mass:.4});return p.jsxs("section",{id:"feed",className:"bg-muted",children:[p.jsx("div",{className:"max-w-7xl mx-auto px-6 pt-24 pb-12",children:p.jsxs("div",{className:"max-w-3xl",children:[p.jsx("div",{className:"text-xs font-semibold uppercase tracking-widest text-brand mb-4",children:"Feed â Lesson"}),p.jsx("h2",{className:"text-3xl lg:text-5xl font-semibold leading-tight tracking-tight text-balance mb-6",children:"A language lesson that feels like a conversation."}),p.jsx("p",{className:"text-muted-foreground text-pretty max-w-[56ch] text-lg",children:"Scroll on â discover, speak, get coached, and understand the grammar behind every moment you just lived."})]})}),p.jsx("div",{ref:t,className:"relative",style:{height:`${ot.length*100}vh`},children:p.jsx("div",{className:"sticky top-0 h-screen flex items-center overflow-hidden",children:p.jsxs("div",{className:"w-full max-w-7xl mx-auto px-6 grid grid-cols-1 lg:grid-cols-12 gap-10 items-center",children:[p.jsxs("div",{className:"lg:col-span-6 relative",children:[p.jsxs("div",{className:"flex gap-6",children:[p.jsx("div",{className:"hidden sm:flex flex-col items-center pt-2",children:p.jsx("div",{className:"relative w-px h-[320px] bg-foreground
1/10",children:p.jsx(Rt.div,{className:"absolute inset-x-0 top-0 w-px bg-brand origin-top",style:{scaleY:n,height:"100%"}})})}),p.jsx("div",{className:"relative flex-1 min-h-[360px]",children:ot.map((s,i)=>p.jsx(Uh,{index:i,progress:n,...s},s.step))})]}),p.jsx("ol",{className:"mt-10 flex items-center gap-2",children:ot.map((s,i)=>p.jsx(zh,{index:i,label:s.step,progress:n},s.step))})]}),p.jsx("div",{className:"lg:col-span-6 flex justify-center",children:p.jsx(Hh,{progress:n})})]})})})]})}function Uh({index:t,progress:e,kicker:n,title:s,desc:i}){const o=ot.length,r=t/o,a=(t+1)/o,l=O(e,[Math.max(0,r-.04),r+(a-r)*.15,a-(a-r)*.15,Math.min(1,a+.04)],[0,1,1,0]),c=O(e,[r,a],[24,-24]);return p.jsxs(Rt.div,{style:{opacity:l,y:c},className:"absolute inset-0","aria-hidden":void 0,children:[p.jsx("div",{className:"text-xs font-semibold uppercase tracking-widest text-brand mb-3",children:n}),p.jsx("h3",{className:"text-2xl lg:text-4xl font-semibold leading-tight tracking-tight text-balance mb-5 max-w-[22ch]",children:s}),p.jsx("p",{className:"text-muted-foreground text-pretty max-w-[52ch] text-base lg:text-lg",children:i})]})}function zh({index:t,label:e,progress:n}){const s=ot.length,i=t/s,o=(t+1)/s,r=O(n,[i,o],[0,1]),a=O(r,[0,1],[10,36]),l=O(n,c=>c>=i&&c<=o+.001?"var(--brand)":"rgba(0,0,0,0.15)");return p.jsxs("li",{className:"flex items-center gap-2",children:[p.jsx(Rt.span,{style:{width:a,backgroundColor:l},className:"h-2 rounded-full block"}),p.jsx("span",{className:"text-[10px] font-semibold tracking-widest text-muted-foreground",children:e})]})}function Hh({progress:t}){return p.jsxs("div",{className:"relative w-[280px] sm:w-[320px] lg:w-[360px] aspect-[9/19] flex items-center justify-center",children:[p.jsx(Rt.div,{"aria-hidden":!0,className:"absolute inset-0 -z-10 rounded-[3rem] blur-3xl",style:{background:"radial-gradient(60% 50% at 50% 40%, color-mix(in oklab, var(--brand) 35%, transparent), transparent 70%)",opacity:O(t,[0,.5,1],[.5,.9,.6]),scale:O(t,[0,1],[.9,1.1])}}),ot.map((e,n)=>p.jsx(Gh,{index:n,progress:t,src:e.img,alt:e.alt},e.step)),ot.map((e,n)=>p.jsx(Kh,{index:n,progress:t,sticker:e.sticker},`sticker-${e.step}`))]})}function Kh({index:t,progress:e,sticker:n}){const s=ot.length,i=t/s,o=(t+1)/s,r=(i+o)/2,a=o-i,l=O(e,[i-a*.2,r,o+a*.2],[0,1,0]),c=O(e,[i,o],[12,-12]),u=O(e,[i-a*.3,r,o+a*.3],n.side==="left"?[-20,0,-10]:[20,0,10]),h=n.side==="left"?-3:3,f=n.side==="left"?"left-0 -translate-x-[60%] lg:-translate-x-[70%]":"right-0 translate-x-[60%] lg:translate-x-[70%]";return p.jsx(Rt.div,{style:{opacity:l,y:c,x:u,top:n.top,rotate:h},className:`hidden md:block absolute z-40 ${f} w-[200px] lg:w-[230px]`,children:p.jsxs("div",{className:"bg-background ring-1 ring-foreground/10 shadow-xl rounded-2xl p-4",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[p.jsx("span",{className:"size-1.5 rounded-full bg-brand"}),p.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest text-brand",children:n.label})]}),p.jsx("p",{className:"text-sm leading-snug text-foreground/85 text-pretty",children:n.note})]})})}function Gh({index:t,progress:e,src:n,alt:s}){const i=ot.length,o=t/i,r=(t+1)/i,a=(o+r)/2,l=r-o,c=O(e,[o-l*.4,a,r+l*.4],[0,1,0]),u=O(e,[o,r],[40,-40]),h=O(e,[o-l*.4,a,r+l*.4],[.92,1,.92]),f=O(e,[o,r],[2,-2]),d=O(e,m=>m>=o-.05&&m<=r+.05?10:1);return p.jsx(Rt.img,{src:n,alt:s,loading:t===0?"eager":"lazy",width:440,height:900,style:{opacity:c,y:u,scale:h,rotate:f,zIndex:d},className:"absolute inset-0 m-auto w-full h-auto object-contain drop-shadow-2xl will-change-transform"})}const $h="/app-store-badge.svg",_h="/play-store-badge.png";function Jh(){return p.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[p.jsx(ho,{}),p.jsx("section",{className:"pt-32 pb-24 overflow-hidden",children:p.jsx("div",{className:"max-w-7xl mx-auto px-6",children:p.jsxs("div",{className:"flex flex-col items-center text-center",children:[p.jsx("h1",{className:"text-5xl lg:text-7xl font-semibold leading-[1.05] tracking-tight text-balance max-w-[20ch] mb-8",children:"Your Feed is Your Lesson"}),p.jsx("p",{className:"text-lg text-muted-foreground text-pretty max-w-[56ch] mb-12",children:"Stop following rigid textbooks. Scroll a living feed of viral topics, global debates, and cultural deep-dives â each one transforms into a live conversational lesson tailored to you."}),p.jsxs("div",{id:"download",className:"flex flex-wrap items-center gap-3 mb-20",children:[p.jsx("a",{href:"https://apps.apple.com/app/id6760181019",target:"_blank",rel:"noopener noreferrer","aria-label":"Download on the App Store",className:"transition-opacity hover:opacity-85",children:p.jsx("img",{src:$h,alt:"Download on the App Store",className:"h-12 w-auto"})}),p.jsx("a",{href:"https://play.google.com/store/apps/details?id=ai.creatorminds.lingofeed",target:"_blank",rel:"noopener noreferrer","aria-label":"Get it on Google Play",className:"transition-opacity hover:opacity-85",children:p.jsx("img",{src:_h,alt:"Get it on Google Play",className:"h-12 w-auto"})})]}),p.jsxs("div",{className:"relative w-full max-w-5xl mx-auto flex justify-center items-end pt-8 min-h-[560px] lg:min-h-[720px]",children:[p.jsx("img",{src:yo,alt:"Lingo, the LingoFeed mascot, presenting the app",width:730,height:890,className:"hidden md:block absolute left-0 bottom-0 w-auto h-[260px] lg:h-[360px] object-contain z-20 pointer-events-none"}),p.jsxs("div",{className:"relative w-[300px] lg:w-[380px] flex justify-center items-end",children:[p.jsx("img",{src:po,alt:"LingoFeed English lesson: The Coachella Effect",width:612,height:1265,className:"hidden md:block absolute right-[60%] bottom-0 z-0 w-auto h-[420px] lg:h-[540px] object-contain drop-shadow-2xl -rotate-[10deg] origin-bottom-right"}),p.jsx("img",{src:go,alt:"LingoFeed English lesson: Why Britain Still Loves the Crown",width:613,height:1264,className:"hidden md:block absolute left-[60%] bottom-0 z-0 w-auto h-[420px] lg:h-[540px] object-contain drop-shadow-2xl rotate-[10deg] origin-bottom-left"}),p.jsx("img",{src:mo,alt:"LingoFeed Spanish lesson: Red Capes & Proud Traditions",width:620,height:1291,className:"relative z-30 w-auto h-[520px] lg:h-[680px] object-contain drop-shadow-2xl"})]})]}),p.jsxs("div",{className:"mt-16 flex flex-col items-center gap-4",children:[p.jsx("div",{className:"text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Now learning"}),p.jsxs("ul",{className:"flex flex-wrap items-center justify-center gap-3",children:[[{code:"en",label:"English",flag:"ð¬ð§"},{code:"de",label:"German",flag:"ð©ðª"},{code:"es",label:"Spanish",flag:"ðªð¸"}].map(t=>p.jsxs("li",{className:"inline-flex items-center gap-2 pl-2 pr-4 py-1.5 rounded-full bg-card ring-1 ring-foreground
1/10",children:[p.jsx("span",{className:"text-xl leading-none","aria-hidden":!0,children:t.flag}),p.jsx("span",{className:"text-sm font-medium",children:t.label})]},t.code)),p.jsx("li",{className:"inline-flex items-center px-4 py-1.5 rounded-full text-xs font-medium text-muted-foreground border border-dashed border-foreground/20",children:"More coming soon"})]})]})]})})}),p.jsx(Wh,{}),p.jsx("section",{id:"how",className:"py-24 bg-muted",children:p.jsx("div",{className:"max-w-7xl mx-auto px-6",children:p.jsxs("div",{className:"bg-foreground text-background rounded-[2rem] p-10 lg:p-16 relative overflow-hidden",children:[p.jsxs("div",{className:"relative z-10 max-w-2xl",children:[p.jsx("div",{className:"text-xs font-semibold uppercase tracking-widest text-brand mb-4",children:"Why it works"}),p.jsx("h3",{className:"text-2xl lg:text-4xl font-semibold leading-tight tracking-tight text-balance mb-6",children:"An agentic tutor that plans every lesson for you."}),p.jsx("p",{className:"text-background/60 text-pretty text-lg max-w-[52ch] mb-10",children:"Lingo doesn't follow a syllabus. It tracks your nuances, errors, and interests in real time, building a dynamic knowledge graph that shapes every conversation around your specific edge of learning."}),p.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-8",children:[p.jsx(te,{value:"0",label:"Pre-baked paths"}),p.jsx(te,{value:"100%",label:"Unique sessions"}),p.jsx(te,{value:"â",label:"Topic library"}),p.jsx(te,{value:"1:1",label:"Tutor attention"})]})]}),p.jsx("div",{className:"absolute right-0 top-0 w-1/2 h-full opacity-20 pointer-events-none",children:p.jsxs("div",{className:"w-full h-full border-l border-brand/30 translate-x-12 flex flex-col justify-around py-20",children:[p.jsx("div",{className:"h-px w-full bg-brand/40"}),p.jsx("div",{className:"h-px w-3/4 bg-brand/40"}),p.jsx("div",{className:"h-px w-full bg-brand/40"}),p.jsx("div",{className:"h-px w-2/3 bg-brand/40"})]})})]})})}),p.jsx(fo,{})]})}function te({value:t,label:e}){return p.jsxs("div",{children:[p.jsx("div",{className:"text-3xl font-medium text-brand mb-1",children:t}),p.jsx("div",{className:"text-sm text-background/50",children:e})]})}export{Jh as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.