import{r as e,t}from"./rolldown-runtime.HYqg51w3.mjs";import{A as n,C as r,F as i,I as a,L as o,M as s,N as c,O as l,P as u,R as d,S as f,T as p,c as m,d as h,f as g,h as _,j as v,k as y,l as b,o as x,s as S,u as C,v as w,w as ee,z as T}from"./react.BH8xE6w5.mjs";var te,ne,re,ie,ae,oe,se,ce,le,ue,de,fe,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae=t((()=>{te=Object.create,ne=Object.defineProperty,re=Object.getOwnPropertyDescriptor,ie=Object.getOwnPropertyNames,ae=Object.getPrototypeOf,oe=Object.prototype.hasOwnProperty,se=(e,t)=>(t=Symbol[e])?t:Symbol.for(`Symbol.`+e),ce=e=>{throw TypeError(e)},le=(e,t,n)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ue=(e,t)=>ne(e,`name`,{value:t,configurable:!0}),de=(t=>e===void 0?typeof Proxy<`u`?new Proxy(t,{get:(t,n)=>(e===void 0?t:e)[n]}):t:e)(function(t){if(e!==void 0)return e.apply(this,arguments);throw Error(`Dynamic require of "`+t+`" is not supported`)}),fe=(e,t)=>function(){return t||(0,e[ie(e)[0]])((t={exports:{}}).exports,t),t.exports},pe=(e,t)=>{for(var n in t)ne(e,n,{get:t[n],enumerable:!0})},me=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of ie(t))!oe.call(e,i)&&i!==n&&ne(e,i,{get:()=>t[i],enumerable:!(r=re(t,i))||r.enumerable});return e},he=(e,t,n)=>(n=e==null?{}:te(ae(e)),me(t||!e||!e.__esModule?ne(n,`default`,{value:e,enumerable:!0}):n,e)),ge=e=>[,,,te(e?.[se(`metadata`)]??null)],_e=[`class`,`method`,`getter`,`setter`,`accessor`,`field`,`value`,`get`,`set`],ve=e=>e!==void 0&&typeof e!=`function`?ce(`Function expected`):e,ye=(e,t,n,r,i)=>({kind:_e[e],name:t,metadata:r,addInitializer:e=>n._?ce(`Already initialized`):i.push(ve(e||null))}),be=(e,t)=>le(t,se(`metadata`),e[3]),xe=(e,t,n,r)=>{for(var i=0,a=e[t>>1],o=a&&a.length;i{var o,s,c,l,u,d=t&7,f=!!(t&8),p=!!(t&16),m=d>3?e.length+1:d?f?1:2:0,h=_e[d+5],g=d>3&&(e[m-1]=[]),_=e[m]||(e[m]=[]),v=d&&(!p&&!f&&(i=i.prototype),d<5&&(d>3||!p)&&re(d<4?i:{get[n](){return Ee(this,a)},set[n](e){return Oe(this,a,e)}},n));d?p&&d<4&&ue(a,(d>2?`set `:d>1?`get `:``)+n):ue(i,n);for(var y=r.length-1;y>=0;y--)l=ye(d,n,c={},e[3],_),d&&(l.static=f,l.private=p,u=l.access={has:p?e=>Te(i,e):e=>n in e},d^3&&(u.get=p?e=>(d^1?Ee:ke)(e,i,d^4?a:v.get):e=>e[n]),d>2&&(u.set=p?(e,t)=>Oe(e,i,t,d^4?a:v.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?p?a:v[h]:d>4?void 0:{get:v.get,set:v.set}:i,l),c._=1,d^4||s===void 0?ve(s)&&(d>4?g.unshift(s):d?p?a=s:v[h]=s:i=s):typeof s!=`object`||!s?ce(`Object expected`):(ve(o=s.get)&&(v.get=o),ve(o=s.set)&&(v.set=o),ve(o=s.init)&&g.unshift(o));return d||be(e,i),v&&ne(i,n,v),p?d^4?a:v:i},Ce=(e,t,n)=>le(e,typeof t==`symbol`?t:t+``,n),we=(e,t,n)=>t.has(e)||ce(`Cannot `+n),Te=(e,t)=>Object(t)===t?e.has(t):ce(`Cannot use the "in" operator on this value`),Ee=(e,t,n)=>(we(e,t,`read from private field`),n?n.call(e):t.get(e)),De=(e,t,n)=>t.has(e)?ce(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Oe=(e,t,n,r)=>(we(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),ke=(e,t,n)=>(we(e,t,`access private method`),n)}));function je(e,t){e.indexOf(t)===-1&&e.push(t)}function Me(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}function Ne([...e],t,n){let r=t<0?e.length+t:t;if(r>=0&&r(t===void 0&&(t=e()),t)}function Ie(e,t){return t?e*(1e3/t):0}function Le(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=ys(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>bs&&++sLe(t,0,1,e,n);return e=>e===0||e===1?e:ys(i(e),t,r)}function ze(e,t){return Ps(e)?e[vs(0,e.length,t)]:e}function Be(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(l),t&&L.value&&L.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}function Ve(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=zs.reduce((e,n)=>(e[n]=Be(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=N.useManualTiming?i.timestamp:performance.now();n=!1,N.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,Bs),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:zs.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}function Ge(e){return isNaN(e)&&typeof e==`string`&&(e.match($s)?.length||0)+(e.match(fc)?.length||0)>0}function Ke(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(vc,e=>(G.test(e)?(r.color.push(a),i.push(mc),n.push(G.parse(e))):e.startsWith(gc)?(r.var.push(a),i.push(hc),n.push(e)):(r.number.push(a),i.push(pc),n.push(parseFloat(e))),++a,_c)).split(_c),indexes:r,types:i}}function qe(e){return Ke(e).values}function Je(e){let{split:t,types:n}=Ke(e),r=t.length;return e=>{let i=``;for(let a=0;a1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ze({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Xe(s,r,e+1/3),a=Xe(s,r,e),o=Xe(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Qe(e,t){return n=>n>0?t:e}function $e(e){let t=Sc(e);if(ds(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===dc&&(n=Ze(n)),n}function et(e,t){return wc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function tt(e,t){return n=>q(e,t,n)}function nt(e){return typeof e==`number`?tt:typeof e==`string`?qs(e)?Qe:G.test(e)?Cc:Tc:Array.isArray(e)?rt:typeof e==`object`?G.test(e)?Cc:it:Qe}function rt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>nt(e)(e,t[n]));return e=>{for(let t=0;t{for(let t in r)n[t]=r[t](e);return n}}function at(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i=Dc?1/0:t}function ct(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(st(r),Dc);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:I(i)}}function lt(e,t,n){let r=Math.max(t-Oc,0);return Ie(n-e(r),t-r)}function ut({duration:e=J.duration,bounce:t=J.bounce,velocity:n=J.velocity,mass:r=J.mass}){let i,a;ds(e<=F(J.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=j(J.minDamping,J.maxDamping,o),e=j(J.minDuration,J.maxDuration,I(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=ft(t,o),c=Math.exp(-i);return kc-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=ft(t**2,o);return(-i(t)+kc>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-kc+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=dt(i,a,s);if(e=F(e),isNaN(c))return{stiffness:J.stiffness,damping:J.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}function dt(e,t,n){let r=n;for(let n=1;ne[t]!==void 0)}function mt(e){let t={velocity:J.velocity,stiffness:J.stiffness,damping:J.damping,mass:J.mass,isResolvedFromDuration:!1,...e};if(!pt(e,Mc)&&pt(e,jc))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*j(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:J.mass,stiffness:i,damping:a}}else{let n=ut(e);t={...t,...n,mass:J.mass},t.isResolvedFromDuration=!0}return t}function ht(e=J.visualDuration,t=J.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=mt({...n,velocity:-I(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=I(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?J.restSpeed.granular:J.restSpeed.default,i||=v?J.restDelta.granular:J.restDelta.default;let y;if(h<1){let e=ft(_,h);y=t=>o-Math.exp(-h*_*t)*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=e===0?m:0;h<1&&(n=e===0?F(m):lt(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(st(b),Dc),t=Ec(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}function gt({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&ec,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=ht({keyframes:[f.value,m(f.value)],velocity:lt(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function _t(e,t,n){let r=[],i=n||N.mix||ot,a=e.length-1;for(let n=0;nt[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=_t(t,r,i),c=s.length,l=n=>{if(o&&n1)for(;rl(j(e[0],e[a-1],t)):l}function yt(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=gs(0,t,r);e.push(q(n,1,i))}}function bt(e){let t=[0];return yt(t,e.length-1),t}function xt(e,t){return e.map(e=>e*t)}function St(e,t){return e.map(()=>t||Ns).splice(0,e.length-1)}function Ct({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Ps(r)?r.map(Rs):Rs(r),a={done:!1,value:t[0]},o=vt(xt(n&&n.length===t.length?n:bt(t),e),t,{ease:Array.isArray(i)?i:St(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}function wt(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Pc),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}function Tt(e){typeof e.type==`string`&&(e.type=Fc[e.type])}function Et(e){return new Rc(e)}function Dt(e){for(let t=1;t{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(`scale`)?1:0))}),t}function Mt(){if(nl){let e=Array.from(el).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=jt(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&T.scrollTo(0,e.suspendedScrollY)})}nl=!1,tl=!1,el.forEach(e=>e.complete(rl)),el.clear()}function Nt(){el.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(nl=!0)})}function Pt(){rl=!0,Nt(),Mt(),rl=!1}function Ft(e,t,n){al(t)?e.style.setProperty(t,n):e.style[t]=n}function It(e,t){let n=Fe(e);return()=>sl[t]??n()}function Lt(e,t){if(e)return typeof e==`function`?cl()?Ec(e,t):`ease-out`:Fs(e)?ll(e):Array.isArray(e)?e.map(e=>Lt(e,t)||ul.easeOut):ul[e]}function Rt(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Lt(s,i);Array.isArray(d)&&(u.easing=d),L.value&&Us.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return L.value&&p.finished.finally(()=>{Us.waapi--}),p}function zt(e){return typeof e==`function`&&`applyToOptions`in e}function Bt({type:e,...t}){return zt(e)&&cl()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}function Vt(e){return e in fl}function Ht(e){typeof e.ease==`string`&&Vt(e.ease)&&(e.ease=fl[e.ease])}function Ut(e){e.duration=0,e.type=`keyframes`}function Wt(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return gl()&&n&&hl.has(n)&&(n!==`transform`||!c)&&!s&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}function Gt(e){let t=e[0];if(e.length===1)return!0;for(let n=0;nn&&(n=i)}return n}function Jt(e){let t=Sl.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Yt(e,t,n=1){M(n<=Cl,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=Jt(e);if(!r)return;let a=T.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return fs(e)?parseFloat(e):e}return qs(i)?Yt(i,t,n+1):i}function Xt(e,t){return e?.[t]??e?.default??e}function Zt(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match($s)||[];if(!r)return e;let i=n.replace(r,``),a=jl.has(t)?1:0;return r!==n&&(a*=100),t+`(`+a+i+`)`}function Qt(e,t){let n=Fl(e);return n!==Nl&&(n=K),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function $t(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||ps(e)}function en(e,t,n){let r=0,i;for(;r{Y[e]=!1}):Y.x||Y.y?null:(Y.x=Y.y=!0,()=>{Y.x=Y.y=!1})}function on(e,t){let n=tn(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function sn(e){return!(e.pointerType===`touch`||rn())}function cn(e,t,n={}){let[r,i,a]=on(e,n),o=e=>{if(!sn(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{sn(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}function ln(e){return Jl.has(e.tagName)||e.tabIndex!==-1}function un(e){return t=>{t.key===`Enter`&&e(t)}}function dn(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}function fn(e){return ql(e)&&!rn()}function pn(e,t,n={}){let[r,i,a]=on(e,n),o=e=>{let r=e.currentTarget;if(!fn(e))return;Yl.add(r);let a=t(r,e),o=(e,t)=>{T.removeEventListener(`pointerup`,s),T.removeEventListener(`pointercancel`,c),Yl.has(r)&&Yl.delete(r),fn(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===T||r===document||n.useGlobalTarget||Kl(r,e.target))},c=e=>{o(e,!1)};T.addEventListener(`pointerup`,s,i),T.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?T:e).addEventListener(`pointerdown`,o,i),nn(e)&&(e.addEventListener(`focus`,e=>Xl(e,i)),!ln(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function mn(e){return Pe(e)&&`ownerSVGElement`in e}function hn({target:e,borderBoxSize:t}){Zl.get(e)?.forEach(n=>{n(e,{get width(){return eu(e,t)},get height(){return tu(e,t)}})})}function gn(e){e.forEach(hn)}function _n(){typeof ResizeObserver>`u`||(Ql=new ResizeObserver(gn))}function vn(e,t){Ql||_n();let n=tn(e);return n.forEach(e=>{let n=Zl.get(e);n||(n=new Set,Zl.set(e,n)),n.add(t),Ql?.observe(e)}),()=>{n.forEach(e=>{let n=Zl.get(e);n?.delete(t),n?.size||Ql?.unobserve(e)})}}function yn(){ru=()=>{let e={get width(){return T.innerWidth},get height(){return T.innerHeight}};nu.forEach(t=>t(e))},T.addEventListener(`resize`,ru)}function bn(e){return nu.add(e),ru||yn(),()=>{nu.delete(e),!nu.size&&typeof ru==`function`&&(T.removeEventListener(`resize`,ru),ru=void 0)}}function xn(e,t){return typeof e==`function`?bn(e):vn(e,t)}function Sn(e,t){let n,r=()=>{let{currentTime:r}=t,i=(r===null?0:r.value)/100;n!==i&&e(i),n=i};return R.preUpdate(r,!0),()=>z(r)}function Cn(e){return mn(e)&&e.tagName===`svg`}function wn(e,t){if(e===`first`)return 0;{let n=t-1;return e===`last`?n:n/2}}function Tn(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(i,a)=>{let o=typeof n==`number`?n:wn(n,a),s=e*Math.abs(o-i);if(r){let t=a*e;s=Rs(r)(s/t)*t}return t+s}}function En(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=vt(i,a,o);return t?s(r):s}function Dn(e,t,n){let r=()=>t.set(n()),i=()=>R.preRender(r,!1,!0),a=e.map(e=>e.on(`change`,i));t.on(`destroy`,()=>{a.forEach(e=>e()),z(r)})}function On(e){let t=[];Hl.current=t;let n=e();Hl.current=void 0;let r=E(n);return Dn(t,r,e),r}function kn(e,t,n){let r=e.get(),i=null,a=r,o,s=typeof r==`string`?r.replace(/[\d.-]/g,``):void 0,c=()=>{i&&=(i.stop(),null)},l=()=>{c(),i=new Rc({keyframes:[jn(e.get()),jn(a)],velocity:e.getVelocity(),type:`spring`,restDelta:.001,restSpeed:.01,...n,onUpdate:o})};if(e.attach((e,t)=>{a=e,o=e=>t(An(e,s)),R.postRender(l)},c),X(t)){let n=t.on(`change`,t=>e.set(An(t,s))),r=e.on(`destroy`,n);return()=>{n(),r()}}return c}function An(e,t){return t?e+t:e}function jn(e){return typeof e==`number`?e:parseFloat(e)}function Mn(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Nn(...e){return t=>{let n=!1,r=e.map(e=>{let r=Mn(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t{let{width:e,height:n,top:r,left:l,right:d}=c.current;if(t||!s.current||!e||!n)return;let f=i===`left`?`left: ${l}`:`right: ${d}`;s.current.dataset.motionPopId=o;let p=document.createElement(`style`);u&&(p.nonce=u);let m=a??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(` [data-motion-pop-id="${o}"] { position: absolute !important; width: ${e}px !important; height: ${n}px !important; ${f}px !important; top: ${r}px !important; } `),()=>{m.contains(p)&&m.removeChild(p)}},[t]),m(ou,{isPresent:t,childRef:s,sizeRef:c,children:y(e,{ref:d})})}function D(e){let t=l(null);return t.current===null&&(t.current=e()),t.current}function In(){return new Map}function Ln(e=!0){let t=n(us);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:i,register:a}=t,o=w();c(()=>{if(e)return a(o)},[e]);let l=s(()=>e&&i&&i(o),[o,i,e]);return!r&&i?[!1,l]:[!0]}function Rn(e){let t=[];return p.forEach(e,e=>{g(e)&&t.push(e)}),t}function zn(){let e=l(!1);return ls(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Bn(){let e=zn(),[t,n]=i(0),r=s(()=>{e.current&&n(t+1)},[t]);return[s(()=>R.postRender(r),[r]),t]}function Vn(){let e=new Set,t=new WeakMap,n=()=>e.forEach(du);return{add:r=>{e.add(r),t.set(r,r.addEventListener(`willUpdate`,n))},remove:r=>{e.delete(r);let i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}function Hn(e){for(let t in e)_u[t]={..._u[t],...e[t]}}function Un(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||vu.has(e)}function Wn(e){typeof e==`function`&&(yu=t=>t.startsWith(`on`)?!Un(t):e(t))}function Gn(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(yu(i)||n===!0&&Un(i)||!t&&!Un(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function Kn({children:e,isValidProp:t,...r}){t&&Wn(t),r={...n(Z),...r},r.isStatic=D(()=>r.isStatic);let i=v(()=>r,[JSON.stringify(r.transition),r.transformPagePoint,r.reducedMotion]);return m(Z.Provider,{value:i,children:e})}function qn(e){for(let t in e)xu[t]=e[t],Gs(t)&&(xu[t].isCSSVariable=!0)}function Jn(e,t,n){let r=``,i=!0;for(let a=0;aZn(e[t]))}function $n(e){return!!(Qn(e)||e.variants)}function er(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function tr(e,t,n,r){if(typeof t==`function`){let[i,a]=er(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=er(r);t=t(n===void 0?e.custom:n,i,a)}return t}function nr({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:rr(n,r,i,e),renderState:t()}}function rr(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Yn(a[e]);let{initial:o,animate:s}=e,c=Qn(e),l=$n(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Xn(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n({initial:t,animate:r}),[or(t),or(r)])}function or(e){return Array.isArray(e)?e.join(` `):e}function sr(e,{layout:t,layoutId:n}){return Yc.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!xu[e]||e===`opacity`)}function cr(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Yc.has(e)){o=!0;continue}else if(Gs(e)){i[e]=n;continue}else{let t=zl(n,Al[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Jn(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function lr(e,t,n){for(let r in t)!X(t[r])&&!sr(r,n)&&(e[r]=t[r])}function ur({transformTemplate:e},t){return v(()=>{let n=ju();return cr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function dr(e,t){let n=e.style||{},r={};return lr(r,n,e),Object.assign(r,ur(e,t)),r}function fr(e,t){let n={},r=dr(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function pr(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Mu:Nu;e[a.offset]=W.transform(-r);let o=W.transform(t),s=W.transform(n);e[a.array]=`${o} ${s}`}function mr(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(cr(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&pr(d,i,a,o,!1)}function hr(e,t,n,r){let i=v(()=>{let n=Pu();return mr(n,t,Fu(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};lr(t,e.style,e),i.style={...t,...i.style}}return i}function gr(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Iu.indexOf(e)>-1||/[A-Z]/u.test(e))}function _r(e,t,n,{latestValues:r},i,a=!1){let o=(gr(e)?hr:fr)(t,r,i,e),s=Gn(t,typeof e==`string`,a),c=e===u?{}:{...s,...o,ref:n},{children:l}=t,d=v(()=>X(l)?l.get():l,[l]);return C(e,{...c,children:d})}function vr(e,t,n){let{style:r}=e,i={};for(let a in r)(X(r[a])||t.style&&X(t.style[a])||sr(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function yr(e,t,n){let r=vr(e,t,n);for(let n in e)if(X(e[n])||X(t[n])){let t=Jc.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}function br(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function xr(e,t,n){return s(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):br(n)&&(n.current=r))},[t])}function Sr(e,t,i,a,o){let{visualElement:s}=n(bu),u=n(hu),d=n(us),f=n(Z).reducedMotion,p=l(null);a||=u.renderer,!p.current&&a&&(p.current=a(e,{visualState:t,parent:s,props:i,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:f}));let m=p.current,h=n(Au);m&&!m.projection&&o&&(m.type===`html`||m.type===`svg`)&&Cr(p.current,i,o,h);let g=l(!1);r(()=>{m&&g.current&&m.update(i,d)});let _=i[ku],v=l(!!_&&!T.MotionHandoffIsComplete?.(_)&&T.MotionHasOptimisedAnimation?.(_));return ls(()=>{m&&(g.current=!0,T.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),c(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{T.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function Cr(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:wr(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&br(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function wr(e){if(e)return e.options.allowProjection===!1?wr(e.parent):e.projection}function Tr(e,{forwardMotionProps:t=!1}={},r,i){r&&Hn(r);let a=gr(e)?Ru:Lu;function o(o,s){let c,l={...n(Z),...o,layoutId:Er(o)},{isStatic:u}=l,d=ar(o),f=a(o,u);if(!u&&cs){Dr(l,r);let t=Or(l);c=t.MeasureLayout,d.visualElement=Sr(e,f,l,i,t.ProjectionNode)}return b(bu.Provider,{value:d,children:[c&&d.visualElement?m(c,{visualElement:d.visualElement,...l}):null,_r(e,o,xr(f,d.visualElement,s),f,u,t)]})}o.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let s=_(o);return s[zu]=e,s}function Er({layoutId:e}){let t=n(ss).id;return t&&e!==void 0?t+`-`+e:e}function Dr(e,t){n(hu).strict}function Or(e){let{drag:t,layout:n}=_u;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function kr(e,t){if(typeof Proxy>`u`)return Tr;let n=new Map,r=(n,r)=>Tr(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Tr(a,void 0,e,t)),n.get(a))})}function Ar(){if(Gu.current=!0,cs)if(T.matchMedia){let e=T.matchMedia(`(prefers-reduced-motion)`),t=()=>Wu.current=e.matches;e.addEventListener(`change`,t),t()}else Wu.current=!1}function jr(e,t,n){for(let r in t){let i=t[r],a=n[r];if(X(i))e.addValue(r,i);else if(X(a))e.addValue(r,E(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,E(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}function Mr(e,t,n){let r=e.getProps();return tr(r,t,n===void 0?r.custom:n,e)}function Nr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,E(n))}function Pr(e){return Ju(e)?e[e.length-1]||0:e}function Fr(e,t){let{transitionEnd:n={},transition:r={},...i}=Mr(e,t)||{};for(let t in i={...i,...n},i)Nr(e,t,Pr(i[t]))}function Ir(e){return!!(X(e)&&e.add)}function Lr(e,t){let n=e.getValue(`willChange`);if(Ir(n))return n.add(t);if(!n&&N.WillChange){let n=new N.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Rr(e){return e.props[ku]}function zr(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(Yu),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}function Br({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}function Vr({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Hr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&Vr(l,t))continue;let o={delay:n,...Xt(a||{},t)},u=r.get();if(u!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===u&&!o.velocity)continue;let d=!1;if(T.MotionHandoffAnimation){let n=Rr(e);if(n){let e=T.MotionHandoffAnimation(n,t,R);e!==null&&(o.startTime=e,d=!0)}}Lr(e,t),r.start(td(t,r,i,e.shouldReduceMotion&&wl.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{R.update(()=>{o&&Fr(e,o)})}),c}function Ur(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}function Wr(e,t,n={}){let r=Mr(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(Hr(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Gr(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Gr(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Wr(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Ur(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Kr(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Wr(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Wr(e,t,n);else{let i=typeof t==`function`?Mr(e,t,n.custom):t;r=Promise.all(Hr(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function qr(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;rPromise.all(t.map(({animation:t,options:n})=>Kr(e,t,n)))}function Xr(e){let t=Yr(e),n=$r(),r=!0,i=t=>(n,r)=>{let i=Mr(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=Jr(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;td&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},ee=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=Ju(t)&&Ju(n)?!qr(t,n):t!==n,r?t==null?l.add(e):ee(e):t!==void 0&&l.has(e)?ee(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1);let T=_&&v;y&&(!T||b)&&c.push(...x.map(t=>{let n={type:f};if(typeof t==`string`&&r&&!T&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=Mr(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Ur(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=Mr(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=$r()}}}function Zr(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!qr(t,e):!1}function Qr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $r(){return{animate:Qr(!0),whileInView:Qr(),whileHover:Qr(),whileTap:Qr(),whileDrag:Qr(),whileFocus:Qr(),exit:Qr()}}function ei(e){return{point:{x:e.pageX,y:e.pageY}}}function ti(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ni(e,t,n,r){return ti(e,t,ld(n),r)}function O(e){return e.max-e.min}function ri(e,t,n){return Math.abs(e-t)<=n}function ii(e,t,n,r=.5){e.origin=r,e.originPoint=q(t.min,t.max,e.origin),e.scale=O(n)/O(t),e.translate=q(n.min,n.max,e.origin)-e.originPoint,(e.scale>=dd&&e.scale<=fd||isNaN(e.scale))&&(e.scale=1),(e.translate>=md&&e.translate<=hd||isNaN(e.translate))&&(e.translate=0)}function ai(e,t,n,r){ii(e.x,t.x,n.x,r?r.originX:void 0),ii(e.y,t.y,n.y,r?r.originY:void 0)}function oi(e,t,n){e.min=n.min+t.min,e.max=e.min+O(t)}function si(e,t,n){oi(e.x,t.x,n.x),oi(e.y,t.y,n.y)}function ci(e,t,n){e.min=t.min-n.min,e.max=e.min+O(t)}function li(e,t,n){ci(e.x,t.x,n.x),ci(e.y,t.y,n.y)}function ui(e,t){let n=gd(e.x,t.x),r=gd(e.y,t.y);return Math.sqrt(n**2+r**2)}function di(e,t){let n=V.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(z(r),e(a-t))};return R.setup(r,!0),()=>z(r)}function fi({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function pi({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function mi(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function hi(e){return e===void 0||e===1}function gi({scale:e,scaleX:t,scaleY:n}){return!hi(e)||!hi(t)||!hi(n)}function _i(e){return gi(e)||vi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function vi(e){return yi(e.x)||yi(e.y)}function yi(e){return e&&e!==`0%`}function bi(e,t,n){return n+t*(e-n)}function xi(e,t,n,r,i){return i!==void 0&&(e=bi(e,i,r)),bi(e,n,r)+t}function Si(e,t=0,n=1,r,i){e.min=xi(e.min,t,n,r,i),e.max=xi(e.max,t,n,r,i)}function Ci(e,{x:t,y:n}){Si(e.x,t.translate,t.scale,t.originPoint),Si(e.y,n.translate,n.scale,n.originPoint)}function wi(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s_d&&(t.x=1),t.y_d&&(t.y=1)}function Ti(e,t){e.min+=t,e.max+=t}function Ei(e,t,n,r,i=.5){Si(e,t,n,q(e.min,e.max,i),r)}function Di(e,t){Ei(e.x,t.x,t.scaleX,t.scale,t.originX),Ei(e.y,t.y,t.scaleY,t.scale,t.originY)}function Oi(e,t){return fi(mi(e.getBoundingClientRect(),t))}function ki(e,t,n){let r=Oi(e,n),{scroll:i}=t;return i&&(Ti(r.x,i.offset.x),Ti(r.y,i.offset.y)),r}function Ai(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function ji(e){return T.getComputedStyle(e)}function Mi(e,t,n,r){for(let n in Ai(e,t,void 0,r),t.attrs)e.setAttribute(xd.has(n)?n:Du(n),t.attrs[n])}function k(e){return[e(`x`),e(`y`)]}function Ni(e,t){return t?{point:t(e.point)}:e}function Pi(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fi({point:e},t){return{point:e,delta:Pi(e,Li(t)),offset:Pi(e,Ii(t)),velocity:Ri(t,.1)}}function Ii(e){return e[0]}function Li(e){return e[e.length-1]}function Ri(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Li(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>F(t)));)n--;if(!r)return{x:0,y:0};let a=I(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function zi(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?q(n,e,r.max):Math.min(e,n)),e}function Bi(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Vi(e,{top:t,left:n,bottom:r,right:i}){return{x:Bi(e.x,n,i),y:Bi(e.y,t,r)}}function Hi(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=gs(t.min,t.max-r,e.min):r>i&&(n=gs(e.min,e.max-i,t.min)),j(0,1,n)}function Gi(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}function Ki(e=Ed){return e===!1?e=0:e===!0&&(e=Ed),{x:qi(e,`left`,`right`),y:qi(e,`top`,`bottom`)}}function qi(e,t,n){return{min:Ji(e,t),max:Ji(e,n)}}function Ji(e,t){return typeof e==`number`?e:e[t]||0}function Yi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Xi(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function Zi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}function Qi(e){let[t,r]=Ln(),i=n(ss);return m(Id,{...e,layoutGroup:i,switchLayoutGroup:n(Au),isPresent:t,safeToRemove:r})}function $i(e,t,n){let r=X(e)?e:E(e);return r.start(td(``,r,t,n)),r.animation}function ea(e,t,n,r,i,a){i?(e.opacity=q(0,n.opacity??1,Wd(r)),e.opacityExit=q(t.opacity??1,0,Gd(r))):a&&(e.opacity=q(t.opacity??1,n.opacity??1,r));for(let i=0;irt?1:n(gs(e,t,r))}function ra(e,t){e.min=t.min,e.max=t.max}function A(e,t){ra(e.x,t.x),ra(e.y,t.y)}function ia(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function aa(e,t,n,r,i){return e-=t,e=bi(e,1/n,r),i!==void 0&&(e=bi(e,1/i,r)),e}function oa(e,t=0,n=1,r=.5,i,a=e,o=e){if(U.test(t)&&(t=parseFloat(t),t=q(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=q(a.min,a.max,r);e===a&&(s-=t),e.min=aa(e.min,t,n,s,i),e.max=aa(e.max,t,n,s,i)}function sa(e,t,[n,r,i],a,o){oa(e,t[n],t[r],t[i],t.scale,a,o)}function ca(e,t,n,r){sa(e.x,t,Kd,n?n.x:void 0,r?r.x:void 0),sa(e.y,t,qd,n?n.y:void 0,r?r.y:void 0)}function la(e){return e.translate===0&&e.scale===1}function ua(e){return la(e.x)&&la(e.y)}function da(e,t){return e.min===t.min&&e.max===t.max}function fa(e,t){return da(e.x,t.x)&&da(e.y,t.y)}function pa(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ma(e,t){return pa(e.x,t.x)&&pa(e.y,t.y)}function ha(e){return O(e.x)/O(e.y)}function ga(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function _a(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}function va(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ya(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Rr(t);if(T.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;T.MotionCancelOptimisedAnimation(n,`transform`,R,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ya(r)}function ba({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Qd++,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,L.value&&(Yd.nodes=Yd.calculatedTargetDeltas=Yd.calculatedProjections=0),this.nodes.forEach(Ca),this.nodes.forEach(Aa),this.nodes.forEach(ja),this.nodes.forEach(wa),L.addProjectionMetrics&&L.addProjectionMetrics(Yd)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;ethis.root.updateBlockedByResize=!1;R.read(()=>{r=T.innerWidth}),e(t,()=>{let e=T.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=di(i,250),Md.hasAnimatedSinceResize&&(Md.hasAnimatedSinceResize=!1,this.nodes.forEach(ka)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||$d,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!ma(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Xt(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||ka(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),z(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(Ma),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(T.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ya(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!O(this.snapshot.measuredBox.x)&&!O(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 e=0;e{let n=t/1e3;Pa(a.x,e.x,n),Pa(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(li(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ia(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&fa(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Q(),A(d,this.relativeTarget)),s&&(this.animationValues=i,ea(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(z(this.pendingAnimation),void 0),this.pendingAnimation=R.update(()=>{Md.hasAnimatedSinceResize=!0,Us.layout++,this.motionValue||=E(0),this.currentAnimation=$i(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Us.layout--},onComplete:()=>{Us.layout--,e.onComplete&&e.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);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Zd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Ba(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Q();let t=O(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=O(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}A(t,n),Di(t,i),ai(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Jd),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&va(`z`,e,r,this.animationValues);for(let t=0;te.currentAnimation?.stop()),this.root.nodes.forEach(Ea),this.root.sharedNodes.clear()}}}function xa(e){e.updateLayout()}function Sa(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?k(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=O(r);r.min=n[e].min,r.max=r.min+i}):Ba(i,t.layoutBox,n)&&k(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=O(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Vu();ai(o,n,t.layoutBox);let s=Vu();a?ai(s,e.applyTransform(r,!0),t.measuredBox):ai(s,n,t.layoutBox);let c=!ua(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=Q();li(o,t.layoutBox,i.layoutBox);let s=Q();li(s,n,a.layoutBox),ma(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Ca(e){L.value&&Yd.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function wa(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ta(e){e.clearSnapshot()}function Ea(e){e.clearMeasurements()}function Da(e){e.isLayoutDirty=!1}function Oa(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function ka(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Aa(e){e.resolveTargetDelta()}function ja(e){e.calcProjection()}function Ma(e){e.resetSkewAndRotation()}function Na(e){e.removeLeadSnapshot()}function Pa(e,t,n){e.translate=q(t.translate,0,n),e.scale=q(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fa(e,t,n,r){e.min=q(t.min,n.min,r),e.max=q(t.max,n.max,r)}function Ia(e,t,n,r){Fa(e.x,t.x,n.x,r),Fa(e.y,t.y,n.y,r)}function La(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}function Ra(e){e.min=tf(e.min),e.max=tf(e.max)}function za(e){Ra(e.x),Ra(e.y)}function Ba(e,t,n){return e===`position`||e===`preserve-aspect`&&!ri(ha(t),ha(n),.2)}function Va(e){return e!==e.root&&e.scroll?.wasRoot}function Ha(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&R.postRender(()=>i(t,ei(t)))}function Ua(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&R.postRender(()=>i(t,ei(t)))}function Wa({root:e,...t}){let n=e||document;df.has(n)||df.set(n,{});let r=df.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(pf,{root:e,...t})),r[i]}function Ga(e,t,n){let r=Wa(t);return uf.set(e,n),r.observe(e),()=>{uf.delete(e),r.unobserve(e)}}function Ka({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}function qa(e){return c(()=>()=>e(),[])}function Ja(e,t,n,r){let i=n[t],{length:a,position:o}=Cf[t],s=i.current,c=n.time;i.current=e[`scroll${o}`],i.scrollLength=e[`scroll${a}`]-e[`client${a}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=gs(0,i.scrollLength,i.current);let l=r-c;i.velocity=l>bf?0:Ie(i.current-s,l)}function Ya(e,t,n){Ja(e,`x`,t,n),Ja(e,`y`,t,n),t.time=n}function Xa(e,t){let n={x:0,y:0},r=e;for(;r&&r!==t;)if(nn(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName===`svg`){let e=r.getBoundingClientRect();r=r.parentElement;let t=r.getBoundingClientRect();n.x+=e.left-t.left,n.y+=e.top-t.top}else if(r instanceof SVGGraphicsElement){let{x:e,y:t}=r.getBBox();n.x+=e,n.y+=t;let i=null,a=r.parentNode;for(;!i;)a.tagName===`svg`&&(i=a),a=r.parentNode;r=i}else break;return n}function Za(e,t,n=0){let r=0;if(e in wf&&(e=wf[e]),typeof e==`string`){let t=parseFloat(e);e.endsWith(`px`)?r=t:e.endsWith(`%`)?e=t/100:e.endsWith(`vw`)?r=t/100*document.documentElement.clientWidth:e.endsWith(`vh`)?r=t/100*document.documentElement.clientHeight:e=t}return typeof e==`number`&&(r=t*e),n+r}function Qa(e,t,n,r){let i=Array.isArray(e)?e:Tf,a=0,o=0;return typeof e==`number`?i=[e,e]:typeof e==`string`&&(e=e.trim(),i=e.includes(` `)?e.split(` `):[e,wf[e]?e:`0`]),a=Za(i[0],n,r),o=Za(i[1],t),a-o}function $a(e){return`getBBox`in e&&e.tagName!==`svg`?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function eo(e,t,n){let{offset:r=Ef.All}=n,{target:i=e,axis:a=`y`}=n,o=a===`y`?`height`:`width`,s=i===e?Df:Xa(i,e),c=i===e?{width:e.scrollWidth,height:e.scrollHeight}:$a(i),l={width:e.clientWidth,height:e.clientHeight};t[a].offset.length=0;let u=!t[a].interpolate,d=r.length;for(let e=0;e{to(e,r.target,n),Ya(e,n,t),(r.offset||r.target)&&eo(e,n,r)},notify:()=>t(n)}}function ro(e,{container:t=document.scrollingElement,...n}={}){if(!t)return P;let r=Af.get(t);r||(r=new Set,Af.set(t,r));let i=no(t,e,Sf(),n);if(r.add(i),!Of.has(t)){let e=()=>{for(let e of r)e.measure(B.timestamp);R.preUpdate(n)},n=()=>{for(let e of r)e.notify()},i=()=>R.read(e);Of.set(t,i);let a=jf(t);T.addEventListener(`resize`,i,{passive:!0}),t!==document.documentElement&&kf.set(t,xn(t,i)),a.addEventListener(`scroll`,i,{passive:!0}),i()}let a=Of.get(t);return R.read(a,!1,!0),()=>{z(a);let e=Af.get(t);if(!e||(e.delete(i),e.size))return;let n=Of.get(t);Of.delete(t),n&&(jf(t).removeEventListener(`scroll`,n),kf.get(t)?.(),T.removeEventListener(`resize`,n))}}function io(e){let t={value:0};return{currentTime:t,cancel:ro(n=>{t.value=n[e.axis].progress*100},e)}}function ao({source:e,container:t,...n}){let{axis:r}=n;e&&(t=e);let i=Mf.get(t)??new Map;Mf.set(t,i);let a=n.target??`self`,o=i.get(a)??{},s=r+(n.offset??[]).join(`,`);return o[s]||(o[s]=!n.target&&ol()?new ScrollTimeline({source:t,axis:r}):io({container:t,...n})),o[s]}function oo(e,t){let n=ao(t);return e.attachTimeline({timeline:t.target?void 0:n,observe:e=>(e.pause(),Sn(t=>{e.time=e.iterationDuration*t},n))})}function so(e){return e.length===2}function co(e,t){return so(e)?ro(n=>{e(n[t.axis].progress,n)},t):Sn(e,ao(t))}function lo(e,{axis:t=`y`,container:n=document.scrollingElement,...r}={}){if(!n)return P;let i={axis:t,container:n,...r};return typeof e==`function`?co(e,i):oo(e,i)}function uo({container:e,target:t,...n}={}){let r=D(Nf),i=l(null),a=l(!1),o=s(()=>(i.current=lo((e,{x:t,y:n})=>{r.scrollX.set(t.current),r.scrollXProgress.set(t.progress),r.scrollY.set(n.current),r.scrollYProgress.set(n.progress)},{...n,container:e?.current||void 0,target:t?.current||void 0}),()=>{i.current?.()}),[e,t,JSON.stringify(n.offset)]);return ls(()=>{if(a.current=!1,Pf(e)||Pf(t)){a.current=!0;return}else return o()},[o]),c(()=>{if(a.current)return M(!Pf(e),`Container ref is defined but not hydrated`,`use-scroll-ref`),M(!Pf(t),`Target ref is defined but not hydrated`,`use-scroll-ref`),o()},[o]),r}function fo(e){let t=D(()=>E(e)),{isStatic:r}=n(Z);if(r){let[,n]=i(e);c(()=>t.on(`change`,n),[])}return t}function po(e,t){let n=fo(t()),r=()=>n.set(t());return r(),ls(()=>{let t=()=>R.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),z(r)}}),n}function mo(e){Hl.current=[],e();let t=po(Hl.current,e);return Hl.current=void 0,t}function ho(e,t,n,r){if(typeof e==`function`)return mo(e);let i=typeof t==`function`?t:En(t,n,r);return Array.isArray(e)?go(e,i):go([e],([e])=>i(e))}function go(e,t){let n=D(()=>[]);return po(e,()=>{n.length=0;let r=e.length;for(let t=0;tX(e)?e.get():e;if(i)return ho(a);let o=fo(a());return r(()=>kn(o,e,t),[o,JSON.stringify(t)]),o}function vo(){!Gu.current&&Ar();let[e]=i(Wu.current);return e}function yo(){let e=vo(),{reducedMotion:t}=n(Z);return t===`never`?!1:t===`always`?!0:e}function bo(e){e.values.forEach(e=>e.stop())}function xo(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&Fr(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{xo(e,t)})})}function So(e,t){if(Array.isArray(t))return xo(e,t);if(typeof t==`string`)return xo(e,[t]);Fr(e,t)}function Co(){let e=!1,t=new Set,n={subscribe(e){return t.add(e),()=>void t.delete(e)},start(n,r){M(e,`controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.`);let i=[];return t.forEach(e=>{i.push(Kr(e,n,{transitionOverride:r}))}),Promise.all(i)},set(n){return M(e,`controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.`),t.forEach(e=>{So(e,n)})},stop(){t.forEach(e=>{bo(e)})},mount(){return e=!0,()=>{e=!1,n.stop()}}};return n}function wo(e){return typeof e==`object`&&!Array.isArray(e)}function To(e,t,n,r){return typeof e==`string`&&wo(t)?tn(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Eo(e,t,n){return e*(t+1)}function Do(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function Oo(e,t,n){for(let r=0;rt&&i.at{let c=Fo(e),{delay:l=0,times:u=bt(c),type:p=`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=zt(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&zf(c)){let t=c[1]-c[0];e=Math.abs(t)}let t={...v};b!==void 0&&(t.duration=F(b));let n=ct(t,e,C);y=n.ease,b=n.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let ee=u.length-c.length;if(ee>0&&yt(u,ee),c.length===1&&c.unshift(null),m){M(m{for(let i in e){let a=e[i];a.sort(jo);let s=[],c=[],l=[];for(let e=0;e{r.push(...Vo(n,e,t))}),r}function Uo(e){return Array.isArray(e)&&e.some(Array.isArray)}function Wo(e){function t(t,n,r){let i=[],a;if(Uo(t))i=Ho(t,n,e);else{let{onComplete:o,...s}=r||{};typeof o==`function`&&(a=o),i=Vo(t,n,s,e)}let o=new xl(i);return a&&o.finished.then(a),e&&(e.animations.push(o),o.finished.then(()=>{Me(e.animations,o)})),o}return t}function Go(){let e=D(()=>({current:null,animations:[]})),t=D(()=>Wo(e));return qa(()=>{e.animations.forEach(e=>e.stop()),e.animations.length=0}),[e,t]}function Ko(){let e=D(Co);return ls(e.mount,[]),e}function qo(e){return typeof e==`object`&&!!e&&zu in e}function Jo(e){if(qo(e))return e[zu]}function Yo(){return Xo}function Xo(e){rf.current&&(rf.current.isUpdating=!1,rf.current.blockUpdate(),e&&e())}function Zo(){return s(()=>{let e=rf.current;e&&e.resetTree()},[])}function Qo(e,t,{root:n,margin:r,amount:i=`some`}={}){let a=tn(e),o=new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{let n=o.get(e.target);if(e.isIntersecting!==!!n)if(e.isIntersecting){let n=t(e.target,e);typeof n==`function`?o.set(e.target,n):s.unobserve(e.target)}else typeof n==`function`&&(n(e),o.delete(e.target))})},{root:n,rootMargin:r,threshold:typeof i==`number`?i:Uf[i]});return a.forEach(e=>s.observe(e)),()=>s.disconnect()}function $o(e,{root:t,margin:n,amount:r,once:a=!1,initial:o=!1}={}){let[s,l]=i(o);return c(()=>{if(!e.current||a&&s)return;let i=()=>(l(!0),a?void 0:()=>l(!1)),o={root:t&&t.current||void 0,margin:n,amount:r};return Qo(e.current,i,o)},[t,e,n,a,r]),s}function es(){let[e,t]=Bn(),n=Yo(),r=l(-1);return c(()=>{R.postRender(()=>R.postRender(()=>{t===r.current&&(N.instantAnimations=!1)}))},[t]),i=>{n(()=>{N.instantAnimations=!0,e(),i(),r.current=t+1})}}function ts(e,t,n,r){if(!r)return e;let i=e.findIndex(e=>e.value===t);if(i===-1)return e;let a=r>0?1:-1,o=e[i+a];if(!o)return e;let s=e[i],c=o.layout,l=q(c.min,c.max,.5);return a===1&&s.layout.max+n>l||a===-1&&s.layout.min+nvf[t]),u=[],d=l(!1);M(!!i,`Reorder.Group must be provided a values prop`,`reorder-values`);let f={axis:n,registerItem:(e,t)=>{let r=u.findIndex(t=>e===t.value);r===-1?u.push({value:e,layout:t[n]}):u[r].layout=t[n],u.sort(is)},updateOrder:(e,t,n)=>{if(d.current)return;let a=ts(u,e,t,n);u!==a&&(d.current=!0,r(a.map(rs).filter(e=>i.indexOf(e)!==-1)))}};return c(()=>{d.current=!1}),m(s,{...a,ref:o,ignoreStrict:!0,children:m(Kf.Provider,{value:f,children:e})})}function rs(e){return e.value}function is(e,t){return e.layout.min-t.layout.min}function as(e,t=0){return X(e)?e:fo(t)}function os({children:e,style:t={},value:r,as:i=`li`,onDrag:a,layout:o=!0,...s},c){let l=D(()=>vf[i]),u=n(Kf),d={x:as(t.x),y:as(t.y)},f=ho([d.x,d.y],([e,t])=>e||t?1:`unset`);M(!!u,`Reorder.Item must be a child of Reorder.Group`,`reorder-item-child`);let{axis:p,registerItem:h,updateOrder:g}=u;return m(l,{drag:p,...s,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:o,onDrag:(e,t)=>{let{velocity:n}=t;n[p]&&g(r,d[p].get(),n[p]),a&&a(e,t)},onLayoutMeasure:e=>h(r,e),ref:c,ignoreStrict:!0,children:e})}var ss,cs,ls,us,j,ds,M,N,fs,ps,P,ms,hs,gs,_s,F,I,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,L,zs,Bs,R,z,B,Vs,Hs,V,Us,Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs,$s,ec,tc,nc,rc,ic,ac,oc,sc,H,U,W,cc,lc,uc,dc,G,fc,pc,mc,hc,gc,_c,vc,yc,K,q,bc,xc,Sc,Cc,wc,Tc,Ec,Dc,Oc,J,kc,Ac,jc,Mc,Nc,Pc,Fc,Ic,Lc,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,Xc,Zc,Qc,$c,el,tl,nl,rl,il,al,ol,sl,cl,ll,ul,dl,fl,pl,ml,hl,gl,_l,vl,yl,bl,xl,Sl,Cl,wl,Tl,El,Dl,Ol,kl,Al,jl,Ml,Nl,Pl,Fl,Il,Ll,Rl,zl,Bl,Vl,Hl,Ul,Wl,Gl,Y,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru,X,iu,au,Z,ou,su,cu,lu,uu,du,fu,pu,mu,hu,gu,_u,vu,yu,bu,xu,Su,Cu,wu,Tu,Eu,Du,Ou,ku,Au,ju,Mu,Nu,Pu,Fu,Iu,Lu,Ru,zu,Bu,Vu,Hu,Q,Uu,Wu,Gu,Ku,qu,Ju,Yu,Xu,Zu,Qu,$u,ed,td,nd,rd,id,$,ad,od,sd,cd,ld,ud,dd,fd,pd,md,hd,gd,_d,vd,yd,bd,xd,Sd,Cd,wd,Td,Ed,Dd,Od,kd,Ad,jd,Md,Nd,Pd,Fd,Id,Ld,Rd,zd,Bd,Vd,Hd,Ud,Wd,Gd,Kd,qd,Jd,Yd,Xd,Zd,Qd,$d,ef,tf,nf,rf,af,of,sf,cf,lf,uf,df,ff,pf,mf,hf,gf,_f,vf,yf,bf,xf,Sf,Cf,wf,Tf,Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf=t((()=>{for(let e in o(),Ae(),ee(),x(),ss=a({}),cs=T!==void 0,ls=cs?f:c,us=a(null),j=(e,t,n)=>n>t?t:n{},M=()=>{},N={},fs=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ps=e=>/^0[^.\s]+$/u.test(e),P=e=>e,ms=(e,t)=>n=>t(e(n)),hs=(...e)=>e.reduce(ms),gs=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},_s=class{constructor(){this.subscriptions=[]}add(e){return je(this.subscriptions,e),()=>Me(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;ie*1e3,I=e=>e/1e3,vs=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},ys=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,bs=1e-7,xs=12,Ss=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Cs=e=>t=>1-e(1-t),ws=Re(.33,1.53,.69,.99),Ts=Cs(ws),Es=Ss(Ts),Ds=e=>(e*=2)<1?.5*Ts(e):.5*(2-2**(-10*(e-1))),Os=e=>1-Math.sin(Math.acos(e)),ks=Cs(Os),As=Ss(Os),js=Re(.42,0,1,1),Ms=Re(0,0,.58,1),Ns=Re(.42,0,.58,1),Ps=e=>Array.isArray(e)&&typeof e[0]!=`number`,Fs=e=>Array.isArray(e)&&typeof e[0]==`number`,Is={linear:P,easeIn:js,easeInOut:Ns,easeOut:Ms,circIn:Os,circInOut:As,circOut:ks,backIn:Ts,backInOut:Es,backOut:ws,anticipate:Ds},Ls=e=>typeof e==`string`,Rs=e=>{if(Fs(e)){M(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return Re(t,n,r,i)}else if(Ls(e))return M(Is[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),Is[e];return e},L={value:null,addProjectionMetrics:null},zs=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Bs=40,{schedule:R,cancel:z,state:B,steps:Vs}=Ve(typeof requestAnimationFrame<`u`?requestAnimationFrame:P,!0),V={now:()=>(Hs===void 0&&V.set(B.isProcessing||N.useManualTiming?B.timestamp:performance.now()),Hs),set:e=>{Hs=e,queueMicrotask(He)}},Us={layout:0,mainThread:0,waapi:0},Ws=e=>t=>typeof t==`string`&&t.startsWith(e),Gs=Ws(`--`),Ks=Ws(`var(--`),qs=e=>Ks(e)?Js.test(e.split(`/*`)[0].trim()):!1,Js=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ys={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Xs={...Ys,transform:e=>j(0,1,e)},Zs={...Ys,default:1},Qs=e=>Math.round(e*1e5)/1e5,$s=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,ec=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tc=(e,t)=>n=>!!(typeof n==`string`&&ec.test(n)&&n.startsWith(e)||t&&!Ue(n)&&Object.prototype.hasOwnProperty.call(n,t)),nc=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match($s);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},rc=e=>j(0,255,e),ic={...Ys,transform:e=>Math.round(rc(e))},ac={test:tc(`rgb`,`red`),parse:nc(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+ic.transform(e)+`, `+ic.transform(t)+`, `+ic.transform(n)+`, `+Qs(Xs.transform(r))+`)`},oc={test:tc(`#`),parse:We,transform:ac.transform},sc=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),H=sc(`deg`),U=sc(`%`),W=sc(`px`),cc=sc(`vh`),lc=sc(`vw`),uc=(()=>({...U,parse:e=>U.parse(e)/100,transform:e=>U.transform(e*100)}))(),dc={test:tc(`hsl`,`hue`),parse:nc(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+U.transform(Qs(t))+`, `+U.transform(Qs(n))+`, `+Qs(Xs.transform(r))+`)`},G={test:e=>ac.test(e)||oc.test(e)||dc.test(e),parse:e=>ac.test(e)?ac.parse(e):dc.test(e)?dc.parse(e):oc.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?ac.transform(e):dc.transform(e),getAnimatableNone:e=>{let t=G.parse(e);return t.alpha=0,G.transform(t)}},fc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,pc=`number`,mc=`color`,hc=`var`,gc=`var(`,_c="${}",vc=/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,yc=e=>typeof e==`number`?0:G.test(e)?G.getAnimatableNone(e):e,K={test:Ge,parse:qe,createTransformer:Je,getAnimatableNone:Ye},q=(e,t,n)=>e+(t-e)*n,bc=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},xc=[oc,ac,dc],Sc=e=>xc.find(t=>t.test(e)),Cc=(e,t)=>{let n=$e(e),r=$e(t);if(!n||!r)return Qe(e,t);let i={...n};return e=>(i.red=bc(n.red,r.red,e),i.green=bc(n.green,r.green,e),i.blue=bc(n.blue,r.blue,e),i.alpha=q(n.alpha,r.alpha,e),ac.transform(i))},wc=new Set([`none`,`hidden`]),Tc=(e,t)=>{let n=K.createTransformer(t),r=Ke(e),i=Ke(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?wc.has(e)&&!i.values.length||wc.has(t)&&!r.values.length?et(e,t):hs(rt(at(r,i),i.values),n):(ds(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),Qe(e,t))},Ec=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t{let t=ct(e,100,ht);return e.ease=t.ease,e.duration=F(t.duration),e.type=`keyframes`,e},Nc=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>R.update(t,e),stop:()=>z(t),now:()=>B.isProcessing?B.timestamp:V.now()}},Pc=e=>e!==null,Fc={decay:gt,inertia:gt,tween:Ct,keyframes:Ct,spring:ht},Ic=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Lc=e=>e/100,Rc=class extends Ic{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==V.now()&&this.tick(V.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Us.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Tt(e);let{type:t=Ct,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Ct;s!==Ct&&typeof o[0]!=`number`&&(this.mixKeyframes=hs(Lc,ot(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=st(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=j(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==gt&&(b.value=wt(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return I(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+I(e)}get time(){return I(this.currentTime)}set time(e){e=F(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?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(V.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=I(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Nc,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(V.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,Us.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),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)}},zc=e=>e*180/Math.PI,Bc=e=>Hc(zc(Math.atan2(e[1],e[0]))),Vc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Bc,rotateZ:Bc,skewX:e=>zc(Math.atan(e[1])),skewY:e=>zc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Hc=e=>(e%=360,e<0&&(e+=360),e),Uc=Bc,Wc=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Gc=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Kc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Wc,scaleY:Gc,scale:e=>(Wc(e)+Gc(e))/2,rotateX:e=>Hc(zc(Math.atan2(e[6],e[5]))),rotateY:e=>Hc(zc(Math.atan2(-e[2],e[0]))),rotateZ:Uc,rotate:Uc,skewX:e=>zc(Math.atan(e[4])),skewY:e=>zc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2},qc=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return kt(n,t)},Jc=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Yc=(()=>new Set(Jc))(),Xc=e=>e===Ys||e===W,Zc=new Set([`x`,`y`,`z`]),Qc=Jc.filter(e=>!Zc.has(e)),$c={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>kt(t,`x`),y:(e,{transform:t})=>kt(t,`y`)},$c.translateX=$c.x,$c.translateY=$c.y,el=new Set,tl=!1,nl=!1,rl=!1,il=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(el.add(this),tl||(tl=!0,R.read(Nt),R.resolveKeyframes(Mt))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Dt(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),el.delete(this)}cancel(){this.state===`scheduled`&&(el.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},al=e=>e.startsWith(`--`),ol=Fe(()=>T.ScrollTimeline!==void 0),sl={},cl=It(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),ll=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ul={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:ll([0,.65,.55,1]),circOut:ll([.55,0,1,.45]),backIn:ll([.31,.01,.66,-.59]),backOut:ll([.33,1.53,.69,.99])},dl=class extends Ic{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,M(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=Bt(e);this.animation=Rt(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=wt(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):Ft(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(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;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return I(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+I(e)}get time(){return I(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=F(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&ol()?(this.animation.timeline=e,P):t(this)}},fl={anticipate:Ds,backInOut:Es,circInOut:As},pl=10,ml=class extends dl{constructor(e){Ht(e),Tt(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Rc({...a,autoplay:!1}),s=F(this.finishedTime??this.time);t.setWithVelocity(o.sample(s-pl).value,o.sample(s).value,pl),o.stop()}},hl=new Set([`opacity`,`clipPath`,`filter`,`transform`]),gl=Fe(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),_l=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(K.test(e)||e===`0`)&&!e.startsWith(`url(`)),vl=40,yl=class extends Ic{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=V.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||il)(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=V.now(),Kt(e,i,a,o)||((N.instantAnimations||!s)&&l?.(wt(e,n,t)),e[0]=e[e.length-1],Ut(n),n.repeat=0);let u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>vl?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!c&&Wt(u)?new ml({...u,element:u.motionValue.owner.current}):new Rc(u);d.finished.then(()=>this.notifyFinished()).catch(P),this.pendingTimeline&&=(this.stopTimeline=d.attachTimeline(this.pendingTimeline),void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Pt()),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()}},bl=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;nt.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return qt(this.animations,`duration`)}get iterationDuration(){return qt(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}},xl=class extends bl{then(e,t){return this.finished.finally(e).then(()=>{})}},Sl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,Cl=4,wl=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Jc]),Tl=e=>t=>t.test(e),El=[Ys,W,U,H,lc,cc,{test:e=>e===`auto`,parse:e=>e}],Dl=e=>El.find(Tl(e)),Ol={rotate:H,rotateX:H,rotateY:H,rotateZ:H,scale:Zs,scaleX:Zs,scaleY:Zs,scaleZ:Zs,skew:H,skewX:H,skewY:H,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:Xs,originX:uc,originY:uc,originZ:W},kl={...Ys,transform:Math.round},Al={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,radius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,backgroundPositionX:W,backgroundPositionY:W,...Ol,zIndex:kl,fillOpacity:Xs,strokeOpacity:Xs,numOctaves:kl},jl=new Set([`brightness`,`contrast`,`saturate`,`opacity`]),Ml=/\b([a-z-]*)\(.*?\)/gu,Nl={...K,getAnimatableNone:e=>{let t=e.match(Ml);return t?t.map(Zt).join(` `):e}},Pl={...Al,color:G,backgroundColor:G,outlineColor:G,fill:G,stroke:G,borderColor:G,borderTopColor:G,borderRightColor:G,borderBottomColor:G,borderLeftColor:G,filter:Nl,WebkitFilter:Nl},Fl=e=>Pl[e],Il=new Set([`auto`,`none`,`0`]),Ll=class extends il{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},Rl=new Set([`opacity`,`clipPath`,`filter`,`transform`]),zl=(e,t)=>t&&typeof e==`number`?t.transform(e):e,Bl=30,Vl=e=>!isNaN(parseFloat(e)),Hl={current:void 0},Ul=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=V.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=V.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Vl(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new _s);let n=this.events[e].add(t);return e===`change`?()=>{n(),R.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Hl.current&&Hl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=V.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Bl)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Bl);return Ie(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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()}},W.transform,{schedule:Wl,cancel:Gl}=Ve(queueMicrotask,!1),Y={x:!1,y:!1},Kl=(e,t)=>t?e===t?!0:Kl(e,t.parentElement):!1,ql=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Jl=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]),Yl=new WeakSet,Xl=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=un(()=>{if(Yl.has(n))return;dn(n,`down`);let e=un(()=>{dn(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>dn(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)},Zl=new WeakMap,$l=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:mn(r)&&`getBBox`in r?r.getBBox()[t]:r[n],eu=$l(`inline`,`width`,`offsetWidth`),tu=$l(`block`,`height`,`offsetHeight`),nu=new Set,X=e=>!!(e&&e.getVelocity),iu=[...El,G,K],au=e=>iu.find(Tl(e)),zs.reduce((e,t)=>(e[t]=e=>z(e),e),{}),Z=a({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`}),ou=class extends h{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,n=nn(e)&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}},su=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,root:l})=>{let u=D(In),d=w(),f=!0,p=v(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(p={...p}),v(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),c(()=>{!n&&!u.size&&r&&r()},[n]),o===`popLayout`&&(e=m(Fn,{isPresent:n,anchorX:s,root:l,children:e})),m(us.Provider,{value:p,children:e})},cu=e=>e.key||``,lu=({children:e,custom:t,initial:r=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:s=`sync`,propagate:c=!1,anchorX:u=`left`,root:d})=>{let[f,p]=Ln(c),h=v(()=>Rn(e),[e]),g=c&&!f?[]:h.map(cu),_=l(!0),y=l(h),b=D(()=>new Map),[x,C]=i(h),[w,ee]=i(h);ls(()=>{_.current=!1,y.current=h;for(let e=0;e{let n=cu(e),i=c&&!f?!1:h===w||g.includes(n);return m(su,{isPresent:i,initial:!_.current||r?void 0:!1,custom:t,presenceAffectsLayout:o,mode:s,root:d,onExitComplete:i?void 0:()=>{if(b.has(n))b.set(n,!0);else return;let e=!0;b.forEach(t=>{t||(e=!1)}),e&&(te?.(),ee(y.current),c&&p?.(),a&&a())},anchorX:u,children:e},n)})})},uu=a(null),du=e=>!e.isLayoutDirty&&e.willUpdate(!1),fu=e=>e===!0,pu=e=>fu(e===!0)||e===`id`,mu=({children:e,id:t,inherit:r=!0})=>{let i=n(ss),a=n(uu),[o,s]=Bn(),c=l(null),u=i.id||a;c.current===null&&(pu(r)&&u&&(t=t?u+`-`+t:u),c.current={id:t,group:fu(r)&&i.group||Vn()});let d=v(()=>({...c.current,forceRender:o}),[s]);return m(ss.Provider,{value:d,children:e})},hu=a({strict:!1}),gu={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`]},_u={},gu)_u[e]={isEnabled:t=>gu[e].some(e=>!!t[e])};vu=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.ignoreStrict.viewport`.split(`.`)),yu=e=>!Un(e);try{Wn(de(`@emotion/is-prop-valid`).default)}catch{}bu=a({}),xu={},Su={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Cu=Jc.length,wu=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Tu=[`initial`,...wu],Eu=e=>(t,r)=>{let i=n(bu),a=n(us),o=()=>nr(e,t,i,a);return r?o():D(o)},Du=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),Ou=`framerAppearId`,ku=`data-`+Du(Ou),Au=a({}),ju=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Mu={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Nu={offset:`strokeDashoffset`,array:`strokeDasharray`},Pu=()=>({...ju(),attrs:{}}),Fu=e=>typeof e==`string`&&e.toLowerCase()===`svg`,Iu=[`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`],Lu=Eu({scrapeMotionValuesFromProps:vr,createRenderState:ju}),Ru=Eu({scrapeMotionValuesFromProps:yr,createRenderState:Pu}),zu=Symbol.for(`motionComponentSymbol`),Bu=()=>({translate:0,scale:1,origin:0,originPoint:0}),Vu=()=>({x:Bu(),y:Bu()}),Hu=()=>({min:0,max:0}),Q=()=>({x:Hu(),y:Hu()}),Uu=new WeakMap,Wu={current:null},Gu={current:!1},Ku=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],qu=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=il,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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=()=>{let e=V.now();this.renderScheduledAtthis.bindToMotionValue(t,e)),Gu.current||Ar(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:Wu.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in this.projection&&this.projection.unmount(),z(this.notifyUpdate),z(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=Yc.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&R.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;T.MotionCheckAppearSync&&(i=T.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}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 _u){let t=_u[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Q()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;tt.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=E(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(fs(n)||ps(n))?n=parseFloat(n):!au(n)&&K.test(t)&&(n=Qt(e,t)),this.setBaseTarget(e,X(n)?n.get():n)),X(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=tr(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!X(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new _s),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Wl.render(this.render)}},Ju=e=>Array.isArray(e),Yu=e=>e!==null,Xu={type:`spring`,stiffness:500,damping:25,restSpeed:10},Zu=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Qu={type:`keyframes`,duration:.8},$u={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},ed=(e,{keyframes:t})=>t.length>2?Qu:Yc.has(e)?e.startsWith(`scale`)?Zu(t[1]):Xu:$u,td=(e,t,n,r={},i,a)=>o=>{let s=Xt(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=F(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Br(s)||Object.assign(u,ed(e,u)),u.duration&&=F(u.duration),u.repeatDelay&&=F(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ut(u),u.delay===0&&(d=!0)),(N.instantAnimations||N.skipAnimations)&&(d=!0,Ut(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=zr(u.keyframes,s);if(e!==void 0){R.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Rc(u):new yl(u)},nd=Tu.length,rd=[...wu].reverse(),id=wu.length,$=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},ad=class extends ${constructor(e){super(e),e.animationState||=Xr(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Xn(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},od=0,sd=class extends ${constructor(){super(...arguments),this.id=od++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}},cd={animation:{Feature:ad},exit:{Feature:sd}},ld=e=>t=>ql(t)&&e(t,ei(t)),ud=1e-4,dd=1-ud,fd=1+ud,pd=.01,md=0-pd,hd=0+pd,gd=(e,t)=>Math.abs(e-t),_d=.999999999999,vd=1.0000000000001,yd=class extends qu{constructor(){super(...arguments),this.KeyframeResolver=Ll}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;X(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},bd=class extends yd{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ai}readValueFromInstance(e,t){if(Yc.has(t))return this.projection?.isProjecting?Ot(t):qc(e,t);{let n=ji(e),r=(Gs(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Oi(e,t)}build(e,t,n){cr(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return vr(e,t,n)}},xd=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`]),Sd=class extends yd{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Q}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Yc.has(t)){let e=Fl(t);return e&&e.default||0}return t=xd.has(t)?t:Du(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return yr(e,t,n)}build(e,t,n){mr(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Mi(e,t,n,r)}mount(e){this.isSVGTag=Fu(e.tagName),super.mount(e)}},Cd=(e,t)=>gr(e)?new Sd(t):new bd(t,{allowProjection:e!==u}),wd=({current:e})=>e?e.ownerDocument.defaultView:null,Td=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=T,dragSnapToOrigin:i=!1,distanceThreshold:a=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=T,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=Fi(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=ui(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=B;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Ni(t,this.transformPagePoint),R.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Fi(e.type===`pointercancel`?this.lastMoveEventInfo:Ni(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ql(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||T;let o=Ni(ei(e),this.transformPagePoint),{point:s}=o,{timestamp:c}=B;this.history=[{...s,timestamp:c}];let{onSessionStart:l}=t;l&&l(e,Fi(o,this.history)),this.removeListeners=hs(ni(this.contextWindow,`pointermove`,this.handlePointerMove),ni(this.contextWindow,`pointerup`,this.handlePointerUp),ni(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),z(this.updatePoint)}},Ed=.35,Dd=new WeakMap,Od=class{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=Q(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(ei(e).point)},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=an(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),k(e=>{let t=this.getAxisMotionValue(e).get()||0;if(U.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=O(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&R.postRender(()=>i(e,t)),Lr(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Xi(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>k(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Td(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:wd(this.visualElement)})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&R.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Yi(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=zi(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&br(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Vi(n.layoutBox,e):this.constraints=!1,this.elastic=Ki(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&k(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Gi(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!br(e))return!1;let n=e.current;M(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.",`drag-constraints-ref`);let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=ki(n,r.root,this.visualElement.getTransformPagePoint()),a=Ui(r.layout.layoutBox,i);if(t){let e=t(pi(a));this.hasMutatedConstraints=!!e,e&&(a=fi(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=k(o=>{if(!Yi(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Lr(this.visualElement,e),n.start(td(e,n,0,t,this.visualElement,!1))}stopAnimation(){k(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){k(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){k(t=>{let{drag:n}=this.getProps();if(!Yi(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-q(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!br(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};k(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Wi({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),k(t=>{if(!Yi(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(q(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;Dd.set(this.visualElement,this);let e=this.visualElement.current,t=ni(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();br(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),R.read(n);let a=ti(T,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(k(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Ed,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}},kd=class extends ${constructor(e){super(e),this.removeGroupControls=P,this.removeListeners=P,this.controls=new Od(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||P}unmount(){this.removeGroupControls(),this.removeListeners()}},Ad=e=>(t,n)=>{e&&R.postRender(()=>e(t,n))},jd=class extends ${constructor(){super(...arguments),this.removePointerDownListener=P}onPointerDown(e){this.session=new Td(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wd(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ad(e),onStart:Ad(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&R.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=ni(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Md={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Nd={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(W.test(e))e=parseFloat(e);else return e;return`${Zi(e,t.target.x)}% ${Zi(e,t.target.y)}%`}},Pd={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=K.parse(e);if(i.length>5)return r;let a=K.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=q(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Fd=!1,Id=class extends h{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;qn(Ld),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Fd&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Md.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,Fd=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||R.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Wl.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Fd=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}},Ld={borderRadius:{...Nd,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Nd,borderTopRightRadius:Nd,borderBottomLeftRadius:Nd,borderBottomRightRadius:Nd,boxShadow:Pd},Rd=(e,t)=>e.depth-t.depth,zd=class{constructor(){this.children=[],this.isDirty=!1}add(e){je(this.children,e),this.isDirty=!0}remove(e){Me(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Rd),this.isDirty=!1,this.children.forEach(e)}},Bd=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],Vd=Bd.length,Hd=e=>typeof e==`string`?parseFloat(e):e,Ud=e=>typeof e==`number`||W.test(e),Wd=na(0,.5,ks),Gd=na(.5,.95,P),Kd=[`x`,`scaleX`,`originX`],qd=[`y`,`scaleY`,`originY`],Jd=class{constructor(){this.members=[]}add(e){je(this.members,e),e.scheduleRender()}remove(e){if(Me(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}},Yd={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Xd=[``,`X`,`Y`,`Z`],Zd=1e3,Qd=0,$d={duration:.45,ease:[.4,0,.1,1]},ef=e=>d!==void 0&&d.userAgent&&d.userAgent.toLowerCase().includes(e),tf=ef(`applewebkit/`)&&!ef(`chrome/`)?Math.round:P,nf=ba({attachResizeListener:(e,t)=>ti(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),rf={current:void 0},af=ba({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!rf.current){let e=new nf({});e.mount(T),e.setOptions({layoutScroll:!0}),rf.current=e}return rf.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>T.getComputedStyle(e).position===`fixed`}),of={pan:{Feature:jd},drag:{Feature:kd,ProjectionNode:af,MeasureLayout:Qi}},sf=class extends ${mount(){let{current:e}=this.node;e&&(this.unmount=cn(e,(e,t)=>(Ha(this.node,t,`Start`),e=>Ha(this.node,e,`End`))))}unmount(){}},cf=class extends ${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=hs(ti(this.node.current,`focus`,()=>this.onFocus()),ti(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}},lf=class extends ${mount(){let{current:e}=this.node;e&&(this.unmount=pn(e,(e,t)=>(Ua(this.node,t,`Start`),(e,{success:t})=>Ua(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},uf=new WeakMap,df=new WeakMap,ff=e=>{let t=uf.get(e.target);t&&t(e)},pf=e=>{e.forEach(ff)},mf={some:0,all:1},hf=class extends ${constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:mf[r]};return Ga(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Ka(e,t))&&this.startObserver()}unmount(){}},gf={inView:{Feature:hf},tap:{Feature:lf},focus:{Feature:cf},hover:{Feature:sf}},_f={layout:{ProjectionNode:af,MeasureLayout:Qi}},vf=kr({...cd,...gf,...of,..._f},Cd),yf={renderer:Cd,...cd,...gf},{...yf,...of,..._f},{...cd},bf=50,xf=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Sf=()=>({time:0,x:xf(),y:xf()}),Cf={x:{length:`Width`,position:`Left`},y:{length:`Height`,position:`Top`}},wf={start:0,center:.5,end:1},Tf=[0,0],Ef={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Df={x:0,y:0},Of=new WeakMap,kf=new WeakMap,Af=new WeakMap,jf=e=>e===document.scrollingElement?T:e,Mf=new Map,Nf=()=>({scrollX:E(0),scrollY:E(0),scrollXProgress:E(0),scrollYProgress:E(0)}),Pf=e=>e?!e.current:!1,Ff=class extends Ul{constructor(){super(...arguments),this.isEnabled=!1}add(e){(Yc.has(e)||Rl.has(e))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?`transform`:`auto`)}},If=`easeInOut`,Lf=20,Rf=e=>typeof e==`number`,zf=e=>e.every(Rf),Bf=class extends qu{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(Lo(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return Q()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},Vf=Wo(),Hf=Ko,Uf={some:0,all:1},Wf=()=>({}),Eu({scrapeMotionValuesFromProps:Wf,createRenderState:Wf}),Gf={},pe(Gf,{Group:()=>qf,Item:()=>Jf}),Kf=a(null),qf=_(ns),Jf=_(os)})),Xf=t((()=>{Yf()}));export{Oe as $,En as A,yo as B,vf as C,lo as D,Yn as E,$o as F,Uu as G,uo as H,Yo as I,be as J,fe as K,es as L,Jo as M,Go as N,ht as O,Hf as P,ke as Q,fo as R,Un as S,ku as T,_o as U,Zo as V,ho as W,De as X,ge as Y,Ee as Z,Qo as _,Z as a,qo as b,us as c,qn as d,Ce as et,Vf as f,R as g,j as h,Kn as i,On as j,Tn as k,Au as l,z as m,lu as n,he as nt,N as o,Et as p,Se as q,mu as r,Ae as rt,Ul as s,Xf as t,xe as tt,Ff as u,Yf as v,E as w,X as x,vt as y,Ln as z}; //# sourceMappingURL=motion.CRdvAP-0.mjs.map