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