import{__esmMin as e,__require as t}from"./rolldown-runtime.BOLAW3nA.mjs";import{B as n,I as r,J as i,Y as a,ae as o,fe as s,ie as c,init_jsx_runtime as l,init_npm_react_18_2 as u,init_ssg_sandbox_shims as d,j as f,l as p,navigator as m,p as h,pe as g,q as _,re as v,se as y,te as b,u as x,ue as S,window as C,x as ee,ye as w,z as T}from"./react.Bj0meKUR.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=e((()=>{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=(e=>t===void 0?typeof Proxy<`u`?new Proxy(e,{get:(e,n)=>(t===void 0?e:t)[n]}):e:t)(function(e){if(t!==void 0)return t.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" 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=hs(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>gs&&++s<_s);return o}function Re(e,t,n,r){if(e===t&&n===r)return P;let i=t=>Le(t,0,1,e,n);return e=>e===0||e===1?e:hs(i(e),t,r)}function ze(e,t){return As(e)?e[ms(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=Fs.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,Is),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:Fs.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(Ys)?.length||0)+(e.match(cc)?.length||0)>0}function Ke(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0,o=t.replace(mc,e=>(G.test(e)?(r.color.push(a),i.push(uc),n.push(G.parse(e))):e.startsWith(fc)?(r.var.push(a),i.push(dc),n.push(e)):(r.number.push(a),i.push(lc),n.push(parseFloat(e))),++a,pc)).split(pc);return{values:n,split:o,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=vc(e);if(ss(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===sc&&(n=Ze(n)),n}function et(e,t){return bc.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`?Us(e)?Qe:G.test(e)?yc:xc:Array.isArray(e)?rt:typeof e==`object`?G.test(e)?yc: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=Cc?1/0:t}function ct(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(st(r),Cc);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:I(i)}}function lt(e,t,n){let r=Math.max(t-wc,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;ss(e<=F(J.maxDuration),`Spring duration must be 10 seconds or less`);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 Tc-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)+Tc>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Tc+r*i},a=t=>{let r=Math.exp(-t*e),i=(n-t)*(e*e);return r*i});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,Oc)&&pt(e,Dc))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=>{let n=Math.exp(-h*_*t);return o-n*((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),Cc),t=Sc(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=fs(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||ks).splice(0,e.length-1)}function Ct({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=As(r)?r.map(Ps):Ps(r),a={done:!1,value:t[0]},o=xt(n&&n.length===t.length?n:bt(t),e),s=vt(o,t,{ease:Array.isArray(i)?i:St(t,i)});return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}function wt(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Ac),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=jc[e.type])}function Et(e){return new Pc(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(Qc){let e=Array.from(Xc).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])=>{var r;(r=e.getValue(t))==null||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&C.scrollTo(0,e.suspendedScrollY)})}Qc=!1,Zc=!1,Xc.forEach(e=>e.complete($c)),Xc.clear()}function Nt(){Xc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qc=!0)})}function Pt(){$c=!0,Nt(),Mt(),$c=!1}function Ft(e,t,n){tl(t)?e.style.setProperty(t,n):e.style[t]=n}function It(e,t){let n=Fe(e);return()=>rl[t]??n()}function Lt(e,t){if(e)return typeof e==`function`?il()?Sc(e,t):`ease-out`:js(e)?al(e):Array.isArray(e)?e.map(e=>Lt(e,t)||ol.easeOut):ol[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&&zs.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(()=>{zs.waapi--}),p}function zt(e){return typeof e==`function`&&`applyToOptions`in e}function Bt({type:e,...t}){return zt(e)&&il()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}function Vt(e){return e in cl}function Ht(e){typeof e.ease==`string`&&Vt(e.ease)&&(e.ease=cl[e.ease])}function Ut(e){return Pe(e)&&`offsetHeight`in e}function Wt(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!Ut(t?.owner?.current))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return fl()&&n&&dl.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;n{Y[e]=!1}):Y.x||Y.y?null:(Y.x=Y.y=!0,()=>{Y.x=Y.y=!1})}function rn(e,t){let n=en(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function an(e){return!(e.pointerType===`touch`||tn())}function on(e,t,n={}){let[r,i,a]=rn(e,n),o=e=>{if(!an(e))return;let{target:n}=e,r=t(n,e);if(typeof r!=`function`||!n)return;let a=e=>{an(e)&&(r(e),n.removeEventListener(`pointerleave`,a))};n.addEventListener(`pointerleave`,a,i)};return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}function sn(e){return Wl.has(e.tagName)||e.tabIndex!==-1}function cn(e){return t=>{t.key===`Enter`&&e(t)}}function ln(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}function un(e){return Ul(e)&&!tn()}function dn(e,t,n={}){let[r,i,a]=rn(e,n),o=e=>{let r=e.currentTarget;if(!un(e))return;Gl.add(r);let a=t(r,e),o=(e,t)=>{C.removeEventListener(`pointerup`,s),C.removeEventListener(`pointercancel`,c),Gl.has(r)&&Gl.delete(r),un(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===C||r===document||n.useGlobalTarget||Hl(r,e.target))},c=e=>{o(e,!1)};C.addEventListener(`pointerup`,s,i),C.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?C:e).addEventListener(`pointerdown`,o,i),Ut(e)&&(e.addEventListener(`focus`,e=>Kl(e,i)),!sn(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function fn(e){return Pe(e)&&`ownerSVGElement`in e}function pn({target:e,borderBoxSize:t}){var n;(n=ql.get(e))==null||n.forEach(n=>{n(e,{get width(){return Xl(e,t)},get height(){return Zl(e,t)}})})}function mn(e){e.forEach(pn)}function hn(){typeof ResizeObserver>`u`||(Jl=new ResizeObserver(mn))}function gn(e,t){Jl||hn();let n=en(e);return n.forEach(e=>{let n=ql.get(e);n||(n=new Set,ql.set(e,n)),n.add(t),Jl?.observe(e)}),()=>{n.forEach(e=>{let n=ql.get(e);n?.delete(t),n?.size||Jl?.unobserve(e)})}}function _n(){$l=()=>{let e={get width(){return C.innerWidth},get height(){return C.innerHeight}};Ql.forEach(t=>t(e))},C.addEventListener(`resize`,$l)}function vn(e){return Ql.add(e),$l||_n(),()=>{Ql.delete(e),!Ql.size&&typeof $l==`function`&&(C.removeEventListener(`resize`,$l),$l=void 0)}}function yn(e,t){return typeof e==`function`?vn(e):gn(e,t)}function bn(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 xn(e){return fn(e)&&e.tagName===`svg`}function Sn(...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 Cn(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 Pc({keyframes:[Tn(e.get()),Tn(a)],velocity:e.getVelocity(),type:`spring`,restDelta:.001,restSpeed:.01,...n,onUpdate:o})};e.attach((t,n)=>(a=t,o=e=>n(wn(e,s)),R.postRender(l),e.get()),c);let u;return X(t)&&(u=t.on(`change`,t=>e.set(wn(t,s))),e.on(`destroy`,u)),u}function wn(e,t){return t?e+t:e}function Tn(e){return typeof e==`number`?e:parseFloat(e)}function En(e=!0){let t=v(os);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=o();S(()=>{if(e)return i(a)},[e]);let s=b(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,s]:[!0]}function D(e){let t=g(null);return t.current===null&&(t.current=e()),t.current}function Dn({children:e,isPresent:t,anchorX:n,root:r}){let i=o(),a=g(null),s=g({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=v(Z);return c(()=>{let{width:e,height:o,top:c,left:u,right:d}=s.current;if(t||!a.current||!e||!o)return;let f=n===`left`?`left: ${u}`:`right: ${d}`;a.current.dataset.motionPopId=i;let p=document.createElement(`style`);l&&(p.nonce=l);let m=r??document.head;return m.appendChild(p),p.sheet&&p.sheet.insertRule(` [data-motion-pop-id="${i}"] { position: absolute !important; width: ${e}px !important; height: ${o}px !important; ${f}px !important; top: ${c}px !important; } `),()=>{m.removeChild(p),m.contains(p)&&m.removeChild(p)}},[t]),h(nu,{isPresent:t,childRef:a,sizeRef:s,children:_(e,{ref:a})})}function On(){return new Map}function kn(e){let t=[];return f.forEach(e,e=>{i(e)&&t.push(e)}),t}function An(){let e=g(!1);return rs(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function jn(){let e=An(),[t,n]=w(0),r=b(()=>{e.current&&n(t+1)},[t]);return[b(()=>R.postRender(r),[r]),t]}function Mn(){let e=new Set,t=new WeakMap,n=()=>e.forEach(su);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 Nn(e){for(let t in e)pu[t]={...pu[t],...e[t]}}function Pn(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||mu.has(e)}function Fn(e){typeof e==`function`&&(hu=t=>t.startsWith(`on`)?!Pn(t):e(t))}function In(e,t,n){let r={};for(let i in e){if(i===`values`&&typeof e.values==`object`)continue;(hu(i)||n===!0&&Pn(i)||!t&&!Pn(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i])}return r}function Ln({children:e,isValidProp:t,...n}){t&&Fn(t),n={...v(Z),...n},n.isStatic=D(()=>n.isStatic);let r=y(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return h(Z.Provider,{value:r,children:e})}function Rn(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function zn(e){return typeof e==`string`||Array.isArray(e)}function Bn(e){return Rn(e.animate)||Su.some(t=>zn(e[t]))}function Vn(e){return!!(Bn(e)||e.variants)}function Hn(e,t){if(Bn(e)){let{initial:t,animate:n}=e;return{initial:t===!1||zn(t)?t:void 0,animate:zn(n)?n:void 0}}return e.inherit===!1?{}:t}function Un(e){let{initial:t,animate:n}=Hn(e,v(gu));return y(()=>({initial:t,animate:n}),[Wn(t),Wn(n)])}function Wn(e){return Array.isArray(e)?e.join(` `):e}function Gn(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Kn(e,t,n){return b(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):Gn(n)&&(n.current=r))},[t])}function qn(e,t,n,r,i){let{visualElement:a}=v(gu),o=v(du),s=v(os),l=v(Z).reducedMotion,u=g(null);r||=o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));let d=u.current,f=v(bu);d&&!d.projection&&i&&(d.type===`html`||d.type===`svg`)&&Jn(u.current,n,i,f);let p=g(!1);c(()=>{d&&p.current&&d.update(n,s)});let m=n[yu],h=g(!!m&&!C.MotionHandoffIsComplete?.call(C,m)&&C.MotionHasOptimisedAnimation?.call(C,m));return rs(()=>{d&&(p.current=!0,C.MotionIsMounted=!0,d.updateFeatures(),Bl.render(d.render),h.current&&d.animationState&&d.animationState.animateChanges())}),S(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&=(queueMicrotask(()=>{var e;(e=C.MotionHandoffMarkAsComplete)==null||e.call(C,m)}),!1))}),d}function Jn(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:Yn(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Gn(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function Yn(e){if(e)return e.options.allowProjection===!1?Yn(e.parent):e.projection}function Xn({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Nn(e);function o(a,o){let s,c={...v(Z),...a,layoutId:Zn(a)},{isStatic:l}=c,u=Un(a),d=r(a,l);if(!l&&ns){Qn(c,e);let n=$n(c);s=n.MeasureLayout,u.visualElement=qn(i,d,c,t,n.ProjectionNode)}return x(gu.Provider,{value:u,children:[s&&u.visualElement?h(s,{visualElement:u.visualElement,...c}):null,n(i,a,Kn(d,u.visualElement,o),d,l,u.visualElement)]})}o.displayName=`motion.${typeof i==`string`?i:`create(${i.displayName??i.name??``})`}`;let s=a(o);return s[Cu]=i,s}function Zn({layoutId:e}){let t=v(ts).id;return t&&e!==void 0?t+`-`+e:e}function Qn(e,t){v(du).strict}function $n(e){let{drag:t,layout:n}=pu;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function er(e){for(let t in e)wu[t]=e[t],Vs(t)&&(wu[t].isCSSVariable=!0)}function tr(e,t,n){let r=``,i=!0;for(let a=0;a{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ir(e,t,n,r){if(typeof t==`function`){let[i,a]=rr(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]=rr(r);t=t(n===void 0?e.custom:n,i,a)}return t}function ar({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:or(n,r,i,e),renderState:t()}}function or(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=nr(a[e]);let{initial:o,animate:s}=e,c=Bn(e),l=Vn(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`&&!Rn(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n`u`)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>r===`create`?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function cr(e,{layout:t,layoutId:n}){return Gc.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!wu[e]||e===`opacity`)}function lr(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(Gc.has(e)){o=!0;continue}else if(Vs(e)){i[e]=n;continue}else{let t=Fl(n,El[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=tr(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 ur(e,t,n){for(let r in t)!X(t[r])&&!cr(r,n)&&(e[r]=t[r])}function dr({transformTemplate:e},t){return y(()=>{let n=Ou();return lr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function fr(e,t){let n=e.style||{},r={};return ur(r,n,e),Object.assign(r,dr(e,t)),r}function pr(e,t){let n={},r=fr(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 mr(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?ku:Au;e[a.offset]=W.transform(-r);let o=W.transform(t),s=W.transform(n);e[a.array]=`${o} ${s}`}function hr(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(lr(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&&mr(d,i,a,o,!1)}function gr(e,t,n,r){let i=y(()=>{let n=ju();return hr(n,t,Mu(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};ur(t,e.style,e),i.style={...t,...i.style}}return i}function _r(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Nu.indexOf(e)>-1||/[A-Z]/u.test(e))}function vr(e=!1){return(t,r,i,{latestValues:a},o)=>{let s=(_r(t)?gr:pr)(r,a,o,t),c=In(r,typeof t==`string`,e),l=t===ee?{}:{...c,...s,ref:i},{children:u}=r,d=y(()=>X(u)?u.get():u,[u]);return n(t,{...l,children:d})}}function yr(e,t,n){let{style:r}=e,i={};for(let a in r)(X(r[a])||t.style&&X(t.style[a])||cr(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function br(e,t,n){let r=yr(e,t,n);for(let n in e)if(X(e[n])||X(t[n])){let t=Wc.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}function xr(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){let i={..._r(n)?Fu:Pu,preloadedFeatures:e,useRender:vr(r),createVisualElement:t,Component:n};return Xn(i)}}function Sr(e,t,n){let r=e.getProps();return ir(r,t,n===void 0?r.custom:n,e)}function Cr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,E(n))}function wr(e){return Iu(e)?e[e.length-1]||0:e}function Tr(e,t){let{transitionEnd:n={},transition:r={},...i}=Sr(e,t)||{};for(let t in i={...i,...n},i){let n=wr(i[t]);Cr(e,t,n)}}function Er(e){return!!(X(e)&&e.add)}function Dr(e,t){let n=e.getValue(`willChange`);if(Er(n))return n.add(t);if(!n&&N.WillChange){let n=new N.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Or(e){return e.props[yu]}function kr(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(Lu),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}function Ar({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 jr({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Mr(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&&jr(l,t))continue;let o={delay:n,...Yt(a||{},t)},u=r.get();if(u!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===u&&!o.velocity)continue;let d=!1;if(C.MotionHandoffAnimation){let n=Or(e);if(n){let e=C.MotionHandoffAnimation(n,t,R);e!==null&&(o.startTime=e,d=!0)}}Dr(e,t),r.start(Uu(t,r,i,e.shouldReduceMotion&&bl.has(t)?{type:!1}:o,e,d));let f=r.animation;f&&c.push(f)}return o&&Promise.all(c).then(()=>{R.update(()=>{o&&Tr(e,o)})}),c}function Nr(e,t,n={}){let r=Sr(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(Mr(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Pr(e,t,a+r,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 Pr(e,t,n=0,r=0,i=1,a){let o=[],s=(e.variantChildren.size-1)*r,c=i===1?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Fr).forEach((e,r)=>{e.notify(`AnimationStart`,t),o.push(Nr(e,t,{...a,delay:n+c(r)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(o)}function Fr(e,t){return e.sortNodePosition(t)}function Ir(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Nr(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Nr(e,t,n);else{let i=typeof t==`function`?Sr(e,t,n.custom):t;r=Promise.all(Mr(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}function Lr(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})=>Ir(e,t,n)))}function Br(e){let t=zr(e),n=Ur(),r=!0,i=t=>(n,r)=>{let i=Sr(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=Rr(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,ee={...C,...S},w=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 ee){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=Iu(t)&&Iu(n)?!Lr(t,n):t!==n,r?t==null?l.add(e):w(e):t!==void 0&&l.has(e)?w(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1),y&&(!(_&&v)||b)&&c.push(...x.map(e=>({animation:e,options:{type:f}})))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=Sr(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){var i;if(n[t].isActive===r)return Promise.resolve();(i=e.variantChildren)==null||i.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let a=o(t);for(let e in n)n[e].protectedKeys={};return a}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Ur(),r=!0}}}function Vr(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Lr(t,e):!1}function Hr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ur(){return{animate:Hr(!0),whileInView:Hr(),whileHover:Hr(),whileTap:Hr(),whileDrag:Hr(),whileFocus:Hr(),exit:Hr()}}function Wr(e){return{point:{x:e.pageX,y:e.pageY}}}function Gr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Kr(e,t,n,r){return Gr(e,t,Zu(n),r)}function O(e){return e.max-e.min}function qr(e,t,n){return Math.abs(e-t)<=n}function Jr(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>=$u&&e.scale<=ed||isNaN(e.scale))&&(e.scale=1),(e.translate>=nd&&e.translate<=rd||isNaN(e.translate))&&(e.translate=0)}function Yr(e,t,n,r){Jr(e.x,t.x,n.x,r?r.originX:void 0),Jr(e.y,t.y,n.y,r?r.originY:void 0)}function Xr(e,t,n){e.min=n.min+t.min,e.max=e.min+O(t)}function Zr(e,t,n){Xr(e.x,t.x,n.x),Xr(e.y,t.y,n.y)}function Qr(e,t,n){e.min=t.min-n.min,e.max=e.min+O(t)}function $r(e,t,n){Qr(e.x,t.x,n.x),Qr(e.y,t.y,n.y)}function ei(e,t){let n=sd(e.x,t.x),r=sd(e.y,t.y);return Math.sqrt(n**2+r**2)}function ti(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 ni(){if(fd.current=!0,ns)if(C.matchMedia){let e=C.matchMedia(`(prefers-reduced-motion)`),t=()=>dd.current=e.matches;e.addListener(t),t()}else dd.current=!1}function ri(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 ii({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ai({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function oi(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 k(e){return[e(`x`),e(`y`)]}function si(e){return e===void 0||e===1}function ci({scale:e,scaleX:t,scaleY:n}){return!si(e)||!si(t)||!si(n)}function li(e){return ci(e)||ui(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ui(e){return di(e.x)||di(e.y)}function di(e){return e&&e!==`0%`}function fi(e,t,n){let r=e-n,i=t*r;return n+i}function pi(e,t,n,r,i){return i!==void 0&&(e=fi(e,i,r)),fi(e,n,r)+t}function mi(e,t=0,n=1,r,i){e.min=pi(e.min,t,n,r,i),e.max=pi(e.max,t,n,r,i)}function hi(e,{x:t,y:n}){mi(e.x,t.translate,t.scale,t.originPoint),mi(e.y,n.translate,n.scale,n.originPoint)}function gi(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;shd&&(t.x=1),t.yhd&&(t.y=1)}function _i(e,t){e.min+=t,e.max+=t}function vi(e,t,n,r,i=.5){let a=q(e.min,e.max,i);mi(e,t,n,a,r)}function yi(e,t){vi(e.x,t.x,t.scaleX,t.scale,t.originX),vi(e.y,t.y,t.scaleY,t.scale,t.originY)}function bi(e,t){return ii(oi(e.getBoundingClientRect(),t))}function xi(e,t,n){let r=bi(e,n),{scroll:i}=t;return i&&(_i(r.x,i.offset.x),_i(r.y,i.offset.y)),r}function Si(e,t){return t?{point:t(e.point)}:e}function Ci(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wi({point:e},t){return{point:e,delta:Ci(e,Ei(t)),offset:Ci(e,Ti(t)),velocity:Di(t,.1)}}function Ti(e){return e[0]}function Ei(e){return e[e.length-1]}function Di(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Ei(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 Oi(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?q(n,e,r.max):Math.min(e,n)),e}function ki(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 Ai(e,{top:t,left:n,bottom:r,right:i}){return{x:ki(e.x,n,i),y:ki(e.y,t,r)}}function ji(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=fs(t.min,t.max-r,e.min):r>i&&(n=fs(e.min,e.max-i,t.min)),j(0,1,n)}function Pi(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 Fi(e=yd){return e===!1?e=0:e===!0&&(e=yd),{x:Ii(e,`left`,`right`),y:Ii(e,`top`,`bottom`)}}function Ii(e,t,n){return{min:Li(e,t),max:Li(e,n)}}function Li(e,t){return typeof e==`number`?e:e[t]||0}function Ri(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function zi(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function Bi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}function Vi(e){let[t,n]=En(),r=v(ts);return h(Od,{...e,layoutGroup:r,switchLayoutGroup:v(bu),isPresent:t,safeToRemove:n})}function Hi(e,t,n){let r=X(e)?e:E(e);return r.start(Uu(``,r,t,n)),r.animation}function Ui(e,t,n,r,i,a){i?(e.opacity=q(0,n.opacity??1,Pd(r)),e.opacityExit=q(t.opacity??1,0,Fd(r))):a&&(e.opacity=q(t.opacity??1,n.opacity??1,r));for(let i=0;irt?1:n(fs(e,t,r))}function Ki(e,t){e.min=t.min,e.max=t.max}function A(e,t){Ki(e.x,t.x),Ki(e.y,t.y)}function qi(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ji(e,t,n,r,i){return e-=t,e=fi(e,1/n,r),i!==void 0&&(e=fi(e,1/i,r)),e}function Yi(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=Ji(e.min,t,n,s,i),e.max=Ji(e.max,t,n,s,i)}function Xi(e,t,[n,r,i],a,o){Yi(e,t[n],t[r],t[i],t.scale,a,o)}function Zi(e,t,n,r){Xi(e.x,t,Id,n?n.x:void 0,r?r.x:void 0),Xi(e.y,t,Ld,n?n.y:void 0,r?r.y:void 0)}function Qi(e){return e.translate===0&&e.scale===1}function $i(e){return Qi(e.x)&&Qi(e.y)}function ea(e,t){return e.min===t.min&&e.max===t.max}function ta(e,t){return ea(e.x,t.x)&&ea(e.y,t.y)}function na(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ra(e,t){return na(e.x,t.x)&&na(e.y,t.y)}function ia(e){return O(e.x)/O(e.y)}function aa(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function oa(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 sa(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ca(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Or(t);if(C.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;C.MotionCancelOptimisedAnimation(n,`transform`,R,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ca(r)}function la({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Ud++,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.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&&(zd.nodes=zd.calculatedTargetDeltas=zd.calculatedProjections=0),this.nodes.forEach(fa),this.nodes.forEach(ya),this.nodes.forEach(ba),this.nodes.forEach(pa),L.addProjectionMetrics&&L.addProjectionMetrics(zd)},this.resolvedRelativeTargetAt=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;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=ti(r,250),Td.hasAnimatedSinceResize&&(Td.hasAnimatedSinceResize=!1,this.nodes.forEach(va))})}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()||Wd,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!ra(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={...Yt(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||va(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(xa),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(C.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ca(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;Ca(a.x,e.x,n),Ca(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($r(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ta(this.relativeTarget,this.relativeTargetOrigin,o,n),p&&ta(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||=$(),A(p,this.relativeTarget)),l&&(this.animationValues=i,Ui(i,r,this.latestValues,n,f,d)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){var t,n;this.notifyListeners(`animationStart`),(t=this.currentAnimation)==null||t.stop(),(n=this.resumingFrom?.currentAnimation)==null||n.stop(),this.pendingAnimation&&=(z(this.pendingAnimation),void 0),this.pendingAnimation=R.update(()=>{Td.hasAnimatedSinceResize=!0,zs.layout++,this.motionValue||=E(0),this.currentAnimation=Hi(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{zs.layout--},onComplete:()=>{zs.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(Hd),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&&ka(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||$();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),yi(t,i),Yr(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Rd),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&&sa(`z`,e,r,this.animationValues);for(let t=0;te.currentAnimation?.stop()),this.root.nodes.forEach(ha),this.root.sharedNodes.clear()}}}function ua(e){e.updateLayout()}function da(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}):ka(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=ad();Yr(o,n,t.layoutBox);let s=ad();a?Yr(s,e.applyTransform(r,!0),t.measuredBox):Yr(s,n,t.layoutBox);let c=!$i(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=$();$r(o,t.layoutBox,i.layoutBox);let s=$();$r(s,n,a.layoutBox),ra(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 fa(e){L.value&&zd.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 pa(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ma(e){e.clearSnapshot()}function ha(e){e.clearMeasurements()}function ga(e){e.isLayoutDirty=!1}function _a(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function va(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ya(e){e.resolveTargetDelta()}function ba(e){e.calcProjection()}function xa(e){e.resetSkewAndRotation()}function Sa(e){e.removeLeadSnapshot()}function Ca(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 wa(e,t,n,r){e.min=q(t.min,n.min,r),e.max=q(t.max,n.max,r)}function Ta(e,t,n,r){wa(e.x,t.x,n.x,r),wa(e.y,t.y,n.y,r)}function Ea(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}function Da(e){e.min=Kd(e.min),e.max=Kd(e.max)}function Oa(e){Da(e.x),Da(e.y)}function ka(e,t,n){return e===`position`||e===`preserve-aspect`&&!qr(ia(t),ia(n),.2)}function Aa(e){return e!==e.root&&e.scroll?.wasRoot}function ja(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=`onHover`+n,a=r[i];a&&R.postRender(()=>a(t,Wr(t)))}function Ma(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=`onTap`+(n===`End`?``:n),a=r[i];a&&R.postRender(()=>a(t,Wr(t)))}function Na({root:e,...t}){let n=e||document;tf.has(n)||tf.set(n,{});let r=tf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(rf,{root:e,...t})),r[i]}function Pa(e,t,n){let r=Na(t);return ef.set(e,n),r.observe(e),()=>{ef.delete(e),r.unobserve(e)}}function Fa({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}function Ia(e,{style:t,vars:n},r,i){for(let a in Object.assign(e.style,t,i&&i.getProjectionStyles(r)),n)e.style.setProperty(a,n[a])}function La(e){return C.getComputedStyle(e)}function Ra(e,t,n,r){for(let n in Ia(e,t,void 0,r),t.attrs)e.setAttribute(ff.has(n)?n:_u(n),t.attrs[n])}function za(e,t,n,r){let i=n[t],{length:a,position:o}=xf[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=fs(0,i.scrollLength,i.current);let l=r-c;i.velocity=l>vf?0:Ie(i.current-s,l)}function Ba(e,t,n){za(e,`x`,t,n),za(e,`y`,t,n),t.time=n}function Va(e,t){let n={x:0,y:0},r=e;for(;r&&r!==t;)if(Ut(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 Ha(e,t,n=0){let r=0;if(e in Sf&&(e=Sf[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 Ua(e,t,n,r){let i=Array.isArray(e)?e:Cf,a=0,o=0;return typeof e==`number`?i=[e,e]:typeof e==`string`&&(e=e.trim(),i=e.includes(` `)?e.split(` `):[e,Sf[e]?e:`0`]),a=Ha(i[0],n,r),o=Ha(i[1],t),a-o}function Wa(e){return`getBBox`in e&&e.tagName!==`svg`?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function Ga(e,t,n){let{offset:r=wf.All}=n,{target:i=e,axis:a=`y`}=n,o=a===`y`?`height`:`width`,s=i===e?Tf:Va(i,e),c=i===e?{width:e.scrollWidth,height:e.scrollHeight}:Wa(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{Ka(e,r.target,n),Ba(e,n,t),(r.offset||r.target)&&Ga(e,n,r)},notify:()=>t(n)}}function Ja(e,{container:t=document.scrollingElement,...n}={}){if(!t)return P;let r=Of.get(t);r||(r=new Set,Of.set(t,r));let i=bf(),a=qa(t,e,i,n);if(r.add(a),!Ef.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);Ef.set(t,i);let a=kf(t);C.addEventListener(`resize`,i,{passive:!0}),t!==document.documentElement&&Df.set(t,yn(t,i)),a.addEventListener(`scroll`,i,{passive:!0}),i()}let o=Ef.get(t);return R.read(o,!1,!0),()=>{var e;z(o);let n=Of.get(t);if(!n||(n.delete(a),n.size))return;let r=Ef.get(t);Ef.delete(t),r&&(kf(t).removeEventListener(`scroll`,r),(e=Df.get(t))==null||e(),C.removeEventListener(`resize`,r))}}function Ya(e){let t={value:0},n=Ja(n=>{t.value=n[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function Xa({source:e,container:t,...n}){let{axis:r}=n;e&&(t=e);let i=Af.get(t)??new Map;Af.set(t,i);let a=n.target??`self`,o=i.get(a)??{},s=r+(n.offset??[]).join(`,`);return o[s]||(o[s]=!n.target&&nl()?new ScrollTimeline({source:t,axis:r}):Ya({container:t,...n})),o[s]}function Za(e,t){let n=Xa(t);return e.attachTimeline({timeline:t.target?void 0:n,observe:e=>(e.pause(),bn(t=>{e.time=e.duration*t},n))})}function Qa(e){return e.length===2}function $a(e,t){return Qa(e)?Ja(n=>{e(n[t.axis].progress,n)},t):bn(e,Xa(t))}function eo(e,{axis:t=`y`,container:n=document.scrollingElement,...r}={}){if(!n)return P;let i={axis:t,container:n,...r};return typeof e==`function`?$a(e,i):Za(e,i)}function to(e,t){ss(!!(!t||t.current),`You have defined a ${e} options but the provided ref is not yet hydrated, probably because it's defined higher up the tree. Try calling useScroll() in the same component as the ref, or setting its \`layoutEffect: false\` option.`)}function no({container:e,target:t,layoutEffect:n=!0,...r}={}){let i=D(jf);return(n?rs:S)(()=>(to(`target`,t),to(`container`,e),eo((e,{x:t,y:n})=>{i.scrollX.set(t.current),i.scrollXProgress.set(t.progress),i.scrollY.set(n.current),i.scrollYProgress.set(n.progress)},{...r,container:e?.current||void 0,target:t?.current||void 0})),[e,t,JSON.stringify(r.offset)]),i}function ro(e){let t=D(()=>E(e)),{isStatic:n}=v(Z);if(n){let[,n]=w(e);S(()=>t.on(`change`,n),[])}return t}function io(e,t){let n=ro(t()),r=()=>n.set(t());return r(),rs(()=>{let t=()=>R.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),z(r)}}),n}function ao(e){Rl.current=[],e();let t=io(Rl.current,e);return Rl.current=void 0,t}function oo(e,t,n,r){if(typeof e==`function`)return ao(e);let i=typeof t==`function`?t:Sn(t,n,r);return Array.isArray(e)?so(e,i):so([e],([e])=>i(e))}function so(e,t){let n=D(()=>[]);return io(e,()=>{n.length=0;let r=e.length;for(let t=0;tX(e)?e.get():e;if(n)return oo(r);let i=ro(r());return c(()=>Cn(i,e,t),[i,JSON.stringify(t)]),i}function lo(e){let t=g(0),{isStatic:n}=v(Z);S(()=>{if(n)return;let r=({timestamp:n,delta:r})=>{t.current||=n,e(n-t.current,r)};return R.update(r,!0),()=>z(r)},[e])}function uo(){!fd.current&&ni();let[e]=w(dd.current);return e}function fo(){let e=uo(),{reducedMotion:t}=v(Z);return t===`never`?!1:t===`always`?!0:e}function po(e){e.values.forEach(e=>e.stop())}function mo(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&Tr(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{mo(e,t)})})}function ho(e,t){if(Array.isArray(t))return mo(e,t);if(typeof t==`string`)return mo(e,[t]);Tr(e,t)}function go(){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(Ir(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=>{ho(e,n)})},stop(){t.forEach(e=>{po(e)})},mount(){return e=!0,()=>{e=!1,n.stop()}}};return n}function _o(e){return typeof e==`object`&&!Array.isArray(e)}function vo(e,t,n,r){return typeof e==`string`&&_o(t)?en(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function yo(e,t,n){return e*(t+1)}function bo(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 xo(e,t,n){for(let r=0;rt&&i.at{let c=Oo(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&&If(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 ee=d+x;u.length===1&&u[0]===0&&(u[1]=1);let w=u.length-c.length;if(w>0&&yt(u,w),c.length===1&&c.unshift(null),m){M(m{for(let i in e){let a=e[i];a.sort(wo);let s=[],c=[],l=[];for(let e=0;e{r.push(...Po(n,e,t))}),r}function Io(e){return Array.isArray(e)&&e.some(Array.isArray)}function Lo(e){function t(t,n,r){let i=[];i=Io(t)?Fo(t,n,e):Po(t,n,r,e);let a=new _l(i);return e&&(e.animations.push(a),a.finished.then(()=>{Me(e.animations,a)})),a}return t}function Ro(){let e=D(go);return rs(e.mount,[]),e}function zo(e){return typeof e==`object`&&!!e&&Cu in e}function Bo(e){if(zo(e))return e[Cu]}function Vo(){return Ho}function Ho(e){Jd.current&&(Jd.current.isUpdating=!1,Jd.current.blockUpdate(),e&&e())}function Uo(){return b(()=>{let e=Jd.current;e&&e.resetTree()},[])}function Wo(e,t,{root:n,margin:r,amount:i=`some`}={}){let a=en(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:Bf[i]});return a.forEach(e=>s.observe(e)),()=>s.disconnect()}function Go(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){let[o,s]=w(a);return S(()=>{if(!e.current||i&&o)return;let a=()=>(s(!0),i?void 0:()=>s(!1)),c={root:t&&t.current||void 0,margin:n,amount:r};return Wo(e.current,a,c)},[t,e,n,i,r]),o}function Ko(){let[e,t]=jn(),n=Vo(),r=g(-1);return S(()=>{R.postRender(()=>R.postRender(()=>{t===r.current&&(N.instantAnimations=!1)}))},[t]),i=>{n(()=>{N.instantAnimations=!0,e(),i(),r.current=t+1})}}function qo(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+ngf[t]),c=[],l=g(!1);M(!!i,`Reorder.Group must be provided a values prop`);let u={axis:n,registerItem:(e,t)=>{let r=c.findIndex(t=>e===t.value);r===-1?c.push({value:e,layout:t[n]}):c[r].layout=t[n],c.sort(Xo)},updateOrder:(e,t,n)=>{if(l.current)return;let a=qo(c,e,t,n);c!==a&&(l.current=!0,r(a.map(Yo).filter(e=>i.indexOf(e)!==-1)))}};return S(()=>{l.current=!1}),h(s,{...a,ref:o,ignoreStrict:!0,children:h(Uf.Provider,{value:u,children:e})})}function Yo(e){return e.value}function Xo(e,t){return e.layout.min-t.layout.min}function Zo(e,t=0){return X(e)?e:ro(t)}function Qo({children:e,style:t={},value:n,as:r=`li`,onDrag:i,layout:a=!0,...o},s){let c=D(()=>gf[r]),l=v(Uf),u={x:Zo(t.x),y:Zo(t.y)},d=oo([u.x,u.y],([e,t])=>e||t?1:`unset`);M(!!l,`Reorder.Item must be a child of Reorder.Group`);let{axis:f,registerItem:p,updateOrder:m}=l;return h(c,{drag:f,...o,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:a,onDrag:(e,t)=>{let{velocity:r}=t;r[f]&&m(n,u[f].get(),r[f]),i&&i(e,t)},onLayoutMeasure:e=>p(n,e),ref:s,ignoreStrict:!0,children:e})}function $o(e,t){if(e===`first`)return 0;{let n=t-1;return e===`last`?n:n/2}}function es(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(i,a)=>{let o=typeof n==`number`?n:$o(n,a),s=Math.abs(o-i),c=e*s;if(r){let t=a*e;c=Ps(r)(c/t)*t}return t+c}}var ts,ns,rs,os,j,ss,M,N,cs,ls,P,us,ds,fs,ps,F,I,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,L,Fs,Is,R,z,B,Ls,Rs,V,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs,$s,ec,tc,nc,rc,H,U,W,ic,ac,oc,sc,G,cc,lc,uc,dc,fc,pc,mc,hc,K,q,gc,_c,vc,yc,bc,xc,Sc,Cc,wc,J,Tc,Ec,Dc,Oc,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,Y,Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l,X,eu,tu,Z,nu,ru,iu,au,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,Uu,Wu,Gu,Ku,Q,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,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=e((()=>{for(let e in d(),Ae(),u(),l(),ts=T({}),ns=C!==void 0,rs=ns?s:S,os=T(null),j=(e,t,n)=>n>t?t:n{},M=()=>{},N={},cs=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ls=e=>/^0[^.\s]+$/u.test(e),P=e=>e,us=(e,t)=>n=>t(e(n)),ds=(...e)=>e.reduce(us),fs=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},ps=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,ms=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},hs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,gs=1e-7,_s=12,vs=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ys=e=>t=>1-e(1-t),bs=Re(.33,1.53,.69,.99),xs=ys(bs),Ss=vs(xs),Cs=e=>(e*=2)<1?.5*xs(e):.5*(2-2**(-10*(e-1))),ws=e=>1-Math.sin(Math.acos(e)),Ts=ys(ws),Es=vs(ws),Ds=Re(.42,0,1,1),Os=Re(0,0,.58,1),ks=Re(.42,0,.58,1),As=e=>Array.isArray(e)&&typeof e[0]!=`number`,js=e=>Array.isArray(e)&&typeof e[0]==`number`,Ms={linear:P,easeIn:Ds,easeInOut:ks,easeOut:Os,circIn:ws,circInOut:Es,circOut:Ts,backIn:xs,backInOut:Ss,backOut:bs,anticipate:Cs},Ns=e=>typeof e==`string`,Ps=e=>{if(js(e)){M(e.length===4,`Cubic bezier arrays must contain four numerical values.`);let[t,n,r,i]=e;return Re(t,n,r,i)}else if(Ns(e))return M(Ms[e]!==void 0,`Invalid easing type '${e}'`),Ms[e];return e},L={value:null,addProjectionMetrics:null},Fs=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Is=40,{schedule:R,cancel:z,state:B,steps:Ls}=Ve(typeof requestAnimationFrame<`u`?requestAnimationFrame:P,!0),V={now:()=>(Rs===void 0&&V.set(B.isProcessing||N.useManualTiming?B.timestamp:performance.now()),Rs),set:e=>{Rs=e,queueMicrotask(He)}},zs={layout:0,mainThread:0,waapi:0},Bs=e=>t=>typeof t==`string`&&t.startsWith(e),Vs=Bs(`--`),Hs=Bs(`var(--`),Us=e=>Hs(e)?Ws.test(e.split(`/*`)[0].trim()):!1,Ws=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Gs={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Ks={...Gs,transform:e=>j(0,1,e)},qs={...Gs,default:1},Js=e=>Math.round(e*1e5)/1e5,Ys=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Xs=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zs=(e,t)=>n=>!!(typeof n==`string`&&Xs.test(n)&&n.startsWith(e)||t&&!Ue(n)&&Object.prototype.hasOwnProperty.call(n,t)),Qs=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Ys);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},$s=e=>j(0,255,e),ec={...Gs,transform:e=>Math.round($s(e))},tc={test:Zs(`rgb`,`red`),parse:Qs(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+ec.transform(e)+`, `+ec.transform(t)+`, `+ec.transform(n)+`, `+Js(Ks.transform(r))+`)`},nc={test:Zs(`#`),parse:We,transform:tc.transform},rc=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),H=rc(`deg`),U=rc(`%`),W=rc(`px`),ic=rc(`vh`),ac=rc(`vw`),oc=(()=>({...U,parse:e=>U.parse(e)/100,transform:e=>U.transform(e*100)}))(),sc={test:Zs(`hsl`,`hue`),parse:Qs(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+U.transform(Js(t))+`, `+U.transform(Js(n))+`, `+Js(Ks.transform(r))+`)`},G={test:e=>tc.test(e)||nc.test(e)||sc.test(e),parse:e=>tc.test(e)?tc.parse(e):sc.test(e)?sc.parse(e):nc.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?tc.transform(e):sc.transform(e),getAnimatableNone:e=>{let t=G.parse(e);return t.alpha=0,G.transform(t)}},cc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,lc=`number`,uc=`color`,dc=`var`,fc=`var(`,pc="${}",mc=/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,hc=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,gc=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},_c=[nc,tc,sc],vc=e=>_c.find(t=>t.test(e)),yc=(e,t)=>{let n=$e(e),r=$e(t);if(!n||!r)return Qe(e,t);let i={...n};return e=>(i.red=gc(n.red,r.red,e),i.green=gc(n.green,r.green,e),i.blue=gc(n.blue,r.blue,e),i.alpha=q(n.alpha,r.alpha,e),tc.transform(i))},bc=new Set([`none`,`hidden`]),xc=(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?bc.has(e)&&!i.values.length||bc.has(t)&&!r.values.length?et(e,t):ds(rt(at(r,i),i.values),n):(ss(!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.`),Qe(e,t))},Sc=(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},kc=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()}},Ac=e=>e!==null,jc={decay:gt,inertia:gt,tween:Ct,keyframes:Ct,spring:ht},Mc=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)}},Nc=e=>e/100,Pc=class extends Mc{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var e,t;let{motionValue:n}=this.options;n&&n.updatedAt!==V.now()&&this.tick(V.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),(t=(e=this.options).onStop)==null||t.call(e))},zs.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=ds(Nc,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 time(){return I(this.currentTime)}set time(e){var t;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),(t=this.driver)==null||t.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(){var e,t;if(this.isStopped)return;let{driver:n=kc,startTime:r}=this.options;this.driver||=n(e=>this.tick(e)),(t=(e=this.options).onPlay)==null||t.call(e);let i=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=i):this.holdTime===null?this.startTime||=r??i:this.startTime=i-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(){var e,t;this.notifyFinished(),this.teardown(),this.state=`finished`,(t=(e=this.options).onComplete)==null||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(t=(e=this.options).onCancel)==null||t.call(e)}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,zs.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),(t=this.driver)==null||t.stop(),e.observe(this)}},Fc=e=>e*180/Math.PI,Ic=e=>{let t=Fc(Math.atan2(e[1],e[0]));return Rc(t)},Lc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ic,rotateZ:Ic,skewX:e=>Fc(Math.atan(e[1])),skewY:e=>Fc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Rc=e=>(e%=360,e<0&&(e+=360),e),zc=Ic,Bc=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Vc=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Hc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bc,scaleY:Vc,scale:e=>(Bc(e)+Vc(e))/2,rotateX:e=>Rc(Fc(Math.atan2(e[6],e[5]))),rotateY:e=>Rc(Fc(Math.atan2(-e[2],e[0]))),rotateZ:zc,rotate:zc,skewX:e=>Fc(Math.atan(e[4])),skewY:e=>Fc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2},Uc=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return kt(n,t)},Wc=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Gc=(()=>new Set(Wc))(),Kc=e=>e===Gs||e===W,qc=new Set([`x`,`y`,`z`]),Jc=Wc.filter(e=>!qc.has(e)),Yc={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`)},Yc.translateX=Yc.x,Yc.translateY=Yc.y,Xc=new Set,Zc=!1,Qc=!1,$c=!1,el=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?(Xc.add(this),Zc||(Zc=!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),Xc.delete(this)}cancel(){this.state===`scheduled`&&(Xc.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},tl=e=>e.startsWith(`--`),nl=Fe(()=>C.ScrollTimeline!==void 0),rl={},il=It(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),al=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ol={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:al([0,.65,.55,1]),circOut:al([.55,0,1,.45]),backIn:al([.31,.01,.66,-.59]),backOut:al([.33,1.53,.69,.99])},sl=class extends Mc{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`,`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);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(){var e,t;(t=(e=this.animation).finish)==null||t.call(e)}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(){var e,t;this.isPseudoElement||(t=(e=this.animation).commitStyles)==null||t.call(e)}get duration(){var e;let t=((e=this.animation.effect)?.getComputedTiming)?.call(e).duration||0;return I(Number(t))}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}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:`linear`})),this.animation.onfinish=null,e&&nl()?(this.animation.timeline=e,P):t(this)}},cl={anticipate:Cs,backInOut:Ss,circInOut:Es},ll=10,ul=class extends sl{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 Pc({...a,autoplay:!1}),s=F(this.finishedTime??this.time);t.setWithVelocity(o.sample(s-ll).value,o.sample(s).value,ll),o.stop()}},dl=new Set([`opacity`,`clipPath`,`filter`,`transform`]),fl=Fe(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),pl=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(K.test(e)||e===`0`)&&!e.startsWith(`url(`)),ml=40,hl=class extends Mc{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}){var d;super(),this.stop=()=>{var e,t;this._animation&&(this._animation.stop(),(e=this.stopTimeline)==null||e.call(this)),(t=this.keyframeResolver)==null||t.cancel()},this.createdAt=V.now();let f={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u};this.keyframeResolver=new(l?.KeyframeResolver||el)(o,(e,t,n)=>this.onKeyframesResolved(e,t,f,!n),s,c,l),(d=this.keyframeResolver)==null||d.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],n.duration=0,n.repeat=0);let u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>ml?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!c&&Wt(u)?new ul({...u,element:u.motionValue.owner.current}):new Pc(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(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Pt()),this._animation}get duration(){return this.animation.duration}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(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}},gl=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(){let e=0;for(let t=0;tt[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}},_l=class extends gl{then(e,t){return this.finished.finally(e).then(()=>{})}},vl=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,yl=4,bl=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Wc]),xl=e=>t=>t.test(e),Sl=[Gs,W,U,H,ac,ic,{test:e=>e===`auto`,parse:e=>e}],Cl=e=>Sl.find(xl(e)),wl={rotate:H,rotateX:H,rotateY:H,rotateZ:H,scale:qs,scaleX:qs,scaleY:qs,scaleZ:qs,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:Ks,originX:oc,originY:oc,originZ:W},Tl={...Gs,transform:Math.round},El={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,...wl,zIndex:Tl,fillOpacity:Ks,strokeOpacity:Ks,numOctaves:Tl},Dl=new Set([`brightness`,`contrast`,`saturate`,`opacity`]),Ol=/\b([a-z-]*)\(.*?\)/gu,kl={...K,getAnimatableNone:e=>{let t=e.match(Ol);return t?t.map(Xt).join(` `):e}},Al={...El,color:G,backgroundColor:G,outlineColor:G,fill:G,stroke:G,borderColor:G,borderTopColor:G,borderRightColor:G,borderBottomColor:G,borderLeftColor:G,filter:kl,WebkitFilter:kl},jl=e=>Al[e],Ml=new Set([`auto`,`none`,`0`]),Nl=class extends el{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()}},Pl=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Fl=(e,t)=>t&&typeof e==`number`?t.transform(e):e,Il=30,Ll=e=>!isNaN(parseFloat(e)),Rl={current:void 0},zl=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{var n,r;let i=V.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&((n=this.events.change)==null||n.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty();t&&((r=this.events.renderRequest)==null||r.notify(this.current))},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=Ll(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 ps);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,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}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(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Rl.current&&Rl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=V.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Il)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Il);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(){var e,t;(e=this.dependents)==null||e.clear(),(t=this.events.destroy)==null||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}},W.transform,{schedule:Bl,cancel:Vl}=Ve(queueMicrotask,!1),Y={x:!1,y:!1},Hl=(e,t)=>t?e===t?!0:Hl(e,t.parentElement):!1,Ul=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Wl=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]),Gl=new WeakSet,Kl=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=cn(()=>{if(Gl.has(n))return;ln(n,`down`);let e=cn(()=>{ln(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>ln(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)},ql=new WeakMap,Yl=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:fn(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Xl=Yl(`inline`,`width`,`offsetWidth`),Zl=Yl(`block`,`height`,`offsetHeight`),Ql=new Set,X=e=>!!(e&&e.getVelocity),eu=[...Sl,G,K],tu=e=>eu.find(xl(e)),Fs.reduce((e,t)=>(e[t]=e=>z(e),e),{}),Z=T({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`}),nu=class extends r{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=t.offsetParent,n=Ut(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}},ru=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:s,anchorX:c,root:l})=>{let u=D(On),d=o(),f=!0,p=y(()=>(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}),y(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),S(()=>{!n&&!u.size&&r&&r()},[n]),s===`popLayout`&&(e=h(Dn,{isPresent:n,anchorX:c,root:l,children:e})),h(os.Provider,{value:p,children:e})},iu=e=>e.key||``,au=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,root:c})=>{let[l,u]=En(o),d=y(()=>kn(e),[e]),f=o&&!l?[]:d.map(iu),m=g(!0),_=g(d),b=D(()=>new Map),[x,S]=w(d),[C,ee]=w(d);rs(()=>{m.current=!1,_.current=d;for(let e=0;e{let p=iu(e),g=o&&!l?!1:d===C||f.includes(p);return h(ru,{isPresent:g,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:g?void 0:()=>{if(b.has(p))b.set(p,!0);else return;let e=!0;b.forEach(t=>{t||(e=!1)}),e&&(te?.(),ee(_.current),o&&u?.(),r&&r())},anchorX:s,children:e},p)})})},ou=T(null),su=e=>!e.isLayoutDirty&&e.willUpdate(!1),cu=e=>e===!0,lu=e=>cu(e===!0)||e===`id`,uu=({children:e,id:t,inherit:n=!0})=>{let r=v(ts),i=v(ou),[a,o]=jn(),s=g(null),c=r.id||i;s.current===null&&(lu(n)&&c&&(t=t?c+`-`+t:c),s.current={id:t,group:cu(n)&&r.group||Mn()});let l=y(()=>({...s.current,forceRender:a}),[o]);return h(ts.Provider,{value:l,children:e})},du=T({strict:!1}),fu={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`]},pu={},fu)pu[e]={isEnabled:t=>fu[e].some(e=>!!t[e])};mu=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(`.`)),hu=e=>!Pn(e);try{Fn(de(`@emotion/is-prop-valid`).default)}catch{}gu=T({}),_u=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),vu=`framerAppearId`,yu=`data-`+_u(vu),bu=T({}),xu=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Su=[`initial`,...xu],Cu=Symbol.for(`motionComponentSymbol`),wu={},Tu={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Eu=Wc.length,Du=e=>(t,n)=>{let r=v(gu),i=v(os),a=()=>ar(e,t,r,i);return n?a():D(a)},Ou=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),ku={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Au={offset:`strokeDashoffset`,array:`strokeDasharray`},ju=()=>({...Ou(),attrs:{}}),Mu=e=>typeof e==`string`&&e.toLowerCase()===`svg`,Nu=[`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`],Pu={useVisualState:Du({scrapeMotionValuesFromProps:yr,createRenderState:Ou})},Fu={useVisualState:Du({scrapeMotionValuesFromProps:br,createRenderState:ju})},Iu=e=>Array.isArray(e),Lu=e=>e!==null,Ru={type:`spring`,stiffness:500,damping:25,restSpeed:10},zu=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Bu={type:`keyframes`,duration:.8},Vu={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Hu=(e,{keyframes:t})=>t.length>2?Bu:Gc.has(e)?e.startsWith(`scale`)?zu(t[1]):Ru:Vu,Uu=(e,t,n,r={},i,a)=>o=>{let s=Yt(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};Ar(s)||Object.assign(u,Hu(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)&&(u.duration=0,u.delay===0&&(d=!0)),(N.instantAnimations||N.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=kr(u.keyframes,s);if(e!==void 0){R.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Pc(u):new hl(u)},Wu=Su.length,Gu=[...xu].reverse(),Ku=xu.length,Q=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},qu=class extends Q{constructor(e){super(e),e.animationState||=Br(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Rn(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(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}},Ju=0,Yu=class extends Q{constructor(){super(...arguments),this.id=Ju++}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(){}},Xu={animation:{Feature:qu},exit:{Feature:Yu}},Zu=e=>t=>Ul(t)&&e(t,Wr(t)),Qu=1e-4,$u=1-Qu,ed=1+Qu,td=.01,nd=0-td,rd=0+td,id=()=>({translate:0,scale:1,origin:0,originPoint:0}),ad=()=>({x:id(),y:id()}),od=()=>({min:0,max:0}),$=()=>({x:od(),y:od()}),sd=(e,t)=>Math.abs(e-t),cd=(e,t)=>e.depth-t.depth,ld=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(cd),this.isDirty=!1,this.children.forEach(e)}},ud=new WeakMap,dd={current:null},fd={current:!1},pd=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],md=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=el,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)),fd.current||ni(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`?!0:dd.current,this.parent&&this.parent.children.add(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&&this.parent.children.delete(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}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=Gc.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)}),i=t.on(`renderRequest`,this.scheduleRender),a;C.MotionCheckAppearSync&&(a=C.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i(),a&&a(),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 pu){let t=pu[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):$()}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`&&(cs(n)||ls(n))?n=parseFloat(n):!tu(n)&&K.test(t)&&(n=Zt(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=ir(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 ps),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}},hd=.999999999999,gd=1.0000000000001,_d=({current:e})=>e?e.ownerDocument.defaultView:null,vd=class{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=C,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=wi(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=ei(e.offset,{x:0,y:0})>=3;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=Si(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=wi(e.type===`pointercancel`?this.lastMoveEventInfo:Si(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Ul(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||C;let a=Wr(e),o=Si(a,this.transformPagePoint),{point:s}=o,{timestamp:c}=B;this.history=[{...s,timestamp:c}];let{onSessionStart:l}=t;l&&l(e,wi(o,this.history)),this.removeListeners=ds(Kr(this.contextWindow,`pointermove`,this.handlePointerMove),Kr(this.contextWindow,`pointerup`,this.handlePointerUp),Kr(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),z(this.updatePoint)}},yd=.35,bd=new WeakMap,xd=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=$(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let r=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Wr(e).point)},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=nn(n),!this.openDragLock))return;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)),Dr(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},a=(e,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=zi(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)},o=(e,t)=>this.stop(e,t),s=()=>k(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new vd(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:_d(this.visualElement)})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i&&R.postRender(()=>i(e,t))}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||!Ri(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Oi(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&&Gn(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Ai(n.layoutBox,e):this.constraints=!1,this.elastic=Fi(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&k(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Pi(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Gn(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.");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=xi(n,r.root,this.visualElement.getTransformPagePoint()),a=Mi(r.layout.layoutBox,i);if(t){let e=t(ai(a));this.hasMutatedConstraints=!!e,e&&(a=ii(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(!Ri(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 Dr(this.visualElement,e),n.start(Uu(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(!Ri(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(!Gn(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]=Ni({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(!Ri(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;bd.set(this.visualElement,this);let e=this.visualElement.current,t=Kr(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();Gn(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=Gr(C,`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=yd,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}},Sd=class extends Q{constructor(e){super(e),this.removeGroupControls=P,this.removeListeners=P,this.controls=new xd(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()}},Cd=e=>(t,n)=>{e&&R.postRender(()=>e(t,n))},wd=class extends Q{constructor(){super(...arguments),this.removePointerDownListener=P}onPointerDown(e){this.session=new vd(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_d(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Cd(e),onStart:Cd(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&R.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Kr(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Td={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ed={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(W.test(e))e=parseFloat(e);else return e;let n=Bi(e,t.target.x),r=Bi(e,t.target.y);return`${n}% ${r}%`}},Dd={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)}},Od=class extends r{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;er(kd),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Td.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,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(),Bl.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;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}},kd={borderRadius:{...Ed,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Ed,borderTopRightRadius:Ed,borderBottomLeftRadius:Ed,borderBottomRightRadius:Ed,boxShadow:Dd},Ad=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],jd=Ad.length,Md=e=>typeof e==`string`?parseFloat(e):e,Nd=e=>typeof e==`number`||W.test(e),Pd=Gi(0,.5,Ts),Fd=Gi(.5,.95,P),Id=[`x`,`scaleX`,`originX`],Ld=[`y`,`scaleY`,`originY`],Rd=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)}},zd={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Bd=[``,`X`,`Y`,`Z`],Vd={visibility:`hidden`},Hd=1e3,Ud=0,Wd={duration:.45,ease:[.4,0,.1,1]},Gd=e=>m!==void 0&&m.userAgent&&m.userAgent.toLowerCase().includes(e),Kd=Gd(`applewebkit/`)&&!Gd(`chrome/`)?Math.round:P,qd=la({attachResizeListener:(e,t)=>Gr(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Jd={current:void 0},Yd=la({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jd.current){let e=new qd({});e.mount(C),e.setOptions({layoutScroll:!0}),Jd.current=e}return Jd.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>C.getComputedStyle(e).position===`fixed`}),Xd={pan:{Feature:wd},drag:{Feature:Sd,ProjectionNode:Yd,MeasureLayout:Vi}},Zd=class extends Q{mount(){let{current:e}=this.node;e&&(this.unmount=on(e,(e,t)=>(ja(this.node,t,`Start`),e=>ja(this.node,e,`End`))))}unmount(){}},Qd=class extends Q{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=ds(Gr(this.node.current,`focus`,()=>this.onFocus()),Gr(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}},$d=class extends Q{mount(){let{current:e}=this.node;e&&(this.unmount=dn(e,(e,t)=>(Ma(this.node,t,`Start`),(e,{success:t})=>Ma(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},ef=new WeakMap,tf=new WeakMap,nf=e=>{let t=ef.get(e.target);t&&t(e)},rf=e=>{e.forEach(nf)},af={some:0,all:1},sf=class extends Q{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:af[r]};return Pa(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(Fa(e,t))&&this.startObserver()}unmount(){}},cf={inView:{Feature:sf},tap:{Feature:$d},focus:{Feature:Qd},hover:{Feature:Zd}},lf={layout:{ProjectionNode:Yd,MeasureLayout:Vi}},uf=class extends md{constructor(){super(...arguments),this.KeyframeResolver=Nl}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}`)}))}},df=class extends uf{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ia}readValueFromInstance(e,t){if(Gc.has(t))return this.projection?.isProjecting?Ot(t):Uc(e,t);{let n=La(e),r=(Vs(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return bi(e,t)}build(e,t,n){lr(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return yr(e,t,n)}},ff=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`]),pf=class extends uf{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=$}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Gc.has(t)){let e=jl(t);return e&&e.default||0}return t=ff.has(t)?t:_u(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return br(e,t,n)}build(e,t,n){hr(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Ra(e,t,n,r)}mount(e){this.isSVGTag=Mu(e.tagName),super.mount(e)}},mf=(e,t)=>_r(e)?new pf(t):new df(t,{allowProjection:e!==ee}),hf=xr({...Xu,...cf,...Xd,...lf},mf),gf=sr(hf),_f={renderer:mf,...Xu,...cf},{..._f,...Xd,...lf},{...Xu},vf=50,yf=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),bf=()=>({time:0,x:yf(),y:yf()}),xf={x:{length:`Width`,position:`Left`},y:{length:`Height`,position:`Top`}},Sf={start:0,center:.5,end:1},Cf=[0,0],wf={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Tf={x:0,y:0},Ef=new WeakMap,Df=new WeakMap,Of=new WeakMap,kf=e=>e===document.scrollingElement?C:e,Af=new Map,jf=()=>({scrollX:E(0),scrollY:E(0),scrollXProgress:E(0),scrollYProgress:E(0)}),Mf=class extends zl{constructor(){super(...arguments),this.isEnabled=!1}add(e){(Gc.has(e)||Pl.has(e))&&(this.isEnabled=!0,this.update())}update(){this.set(this.isEnabled?`transform`:`auto`)}},Nf=`easeInOut`,Pf=20,Ff=e=>typeof e==`number`,If=e=>e.every(Ff),Lf=class extends md{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(Ao(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 $()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},Rf=Lo(),zf=Ro,Bf={some:0,all:1},Vf=()=>({}),Du({scrapeMotionValuesFromProps:Vf,createRenderState:Vf}),Hf={},pe(Hf,{Group:()=>Wf,Item:()=>Gf}),Uf=T(null),Wf=a(Jo),Gf=a(Qo)})),qf=e((()=>{Kf()}));export{au as AnimatePresence,uu as LayoutGroup,Ln as MotionConfig,Z as MotionConfigContext,N as MotionGlobalConfig,zl as MotionValue,os as PresenceContext,bu as SwitchLayoutGroupContext,Mf as WillChangeMotionValue,fe as __commonJS,Se as __decorateElement,be as __decoratorMetadata,ge as __decoratorStart,De as __privateAdd,Ee as __privateGet,ke as __privateMethod,Oe as __privateSet,Ce as __publicField,xe as __runInitializers,he as __toESM,er as addScaleCorrector,Rf as animate,Et as animateValue,z as cancelFrame,R as frame,Wo as inView,Kf as init_chunk_6OHT2LOR,Ae as init_chunk_YI6JBCRS,qf as init_framer_motion_AAE5DXGB,vt as interpolate,zo as isMotionComponent,X as isMotionValue,Pn as isValidMotionProp,gf as motion,E as motionValue,yu as optimizedAppearDataAttribute,nr as resolveMotionValue,eo as scroll,ht as spring,es as stagger,Sn as transform,Bo as unwrapMotionComponent,zf as useAnimation,lo as useAnimationFrame,Go as useInView,Vo as useInstantLayoutTransition,Ko as useInstantTransition,ro as useMotionValue,En as usePresence,uo as useReducedMotion,fo as useReducedMotionConfig,Uo as useResetProjection,no as useScroll,co as useSpring,oo as useTransform,ud as visualElementStore,ms as wrap}; //# sourceMappingURL=motion.CAT_sPT1.mjs.map