import{r as P,j as ce}from"./index-Cb3Zvc3w.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f5739958-01ef-49fd-90d7-1ba9378b7d1e",t._sentryDebugIdIdentifier="sentry-dbid-f5739958-01ef-49fd-90d7-1ba9378b7d1e")}catch{}})();function Yi(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function Pt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const he=t=>Array.isArray(t);function xs(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function St(t){return typeof t=="string"||Array.isArray(t)}function on(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ce(t,e,n,s){if(typeof e=="function"){const[i,r]=on(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=on(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function Kt(t,e,n){const s=t.getProps();return Ce(s,e,n!==void 0?n:s.custom,t)}const Me=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],De=["initial",...Me],Vt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],J=new Set(Vt),G=t=>t*1e3,$=t=>t/1e3,qi={type:"spring",stiffness:500,damping:25,restSpeed:10},Zi=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ji={type:"keyframes",duration:.8},Qi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},to=(t,{keyframes:e})=>e.length>2?Ji:J.has(t)?t.startsWith("scale")?Zi(e[1]):qi:Qi;function Re(t,e){return t?t[e]||t.default||t:void 0}const eo={skipAnimations:!1,useManualTiming:!1},no=t=>t!==null;function Wt(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(no),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return!r||s===void 0?i[r]:s}const R=t=>t;function so(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){r.has(u)&&(l.schedule(u),t()),u(o)}const l={schedule:(u,c=!1,h=!1)=>{const d=h&&s?e:n;return c&&r.add(u),d.has(u)||d.add(u),u},cancel:u=>{n.delete(u),r.delete(u)},process:u=>{if(o=u,s){i=!0;return}s=!0,[e,n]=[n,e],n.clear(),e.forEach(a),s=!1,i&&(i=!1,l.process(u))}};return l}const Dt=["read","resolveKeyframes","update","preRender","render","postRender"],io=40;function Ps(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Dt.reduce((g,v)=>(g[v]=so(r),g),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:f}=o,d=()=>{const g=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(g-i.timestamp,io),1),i.timestamp=g,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(d))},p=()=>{n=!0,s=!0,i.isProcessing||t(d)};return{schedule:Dt.reduce((g,v)=>{const T=o[v];return g[v]=(S,A=!1,M=!1)=>(n||p(),T.schedule(S,A,M)),g},{}),cancel:g=>{for(let v=0;v<Dt.length;v++)o[Dt[v]].cancel(g)},state:i,steps:o}}const{schedule:w,cancel:Y,state:D,steps:Zt}=Ps(typeof requestAnimationFrame<"u"?requestAnimationFrame:R,!0),Ss=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,oo=1e-7,ro=12;function ao(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Ss(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>oo&&++a<ro);return o}function Ct(t,e,n,s){if(t===e&&n===s)return R;const i=r=>ao(r,0,1,t,n);return r=>r===0||r===1?r:Ss(i(r),e,s)}const bs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,As=t=>e=>1-t(1-e),ws=Ct(.33,1.53,.69,.99),Ee=As(ws),Vs=bs(Ee),Cs=t=>(t*=2)<1?.5*Ee(t):.5*(2-Math.pow(2,-10*(t-1))),Le=t=>1-Math.sin(Math.acos(t)),Ms=As(Le),Ds=bs(Le),Rs=t=>/^0[^.\s]+$/u.test(t);function lo(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Rs(t):!0}let Su=R,fe=R;const Es=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ls=t=>e=>typeof e=="string"&&e.startsWith(t),Fs=Ls("--"),uo=Ls("var(--"),Fe=t=>uo(t)?co.test(t.split("/*")[0].trim()):!1,co=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ho=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function fo(t){const e=ho.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Bs(t,e,n=1){const[s,i]=fo(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Es(o)?parseFloat(o):o}return Fe(i)?Bs(i,e,n+1):i}const q=(t,e,n)=>n>e?e:n<t?t:n,pt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},bt={...pt,transform:t=>q(0,1,t)},Rt={...pt,default:1},Mt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),X=Mt("deg"),U=Mt("%"),x=Mt("px"),po=Mt("vh"),mo=Mt("vw"),rn={...U,parse:t=>U.parse(t)/100,transform:t=>U.transform(t*100)},go=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),an=t=>t===pt||t===x,ln=(t,e)=>parseFloat(t.split(", ")[e]),un=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return ln(i[1],e);{const r=s.match(/^matrix\((.+)\)$/u);return r?ln(r[1],t):0}},yo=new Set(["x","y","z"]),vo=Vt.filter(t=>!yo.has(t));function To(t){const e=[];return vo.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ht={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:un(4,13),y:un(5,14)};ht.translateX=ht.x;ht.translateY=ht.y;const ks=t=>e=>e.test(t),xo={test:t=>t==="auto",parse:t=>t},js=[pt,x,U,X,mo,po,xo],cn=t=>js.find(ks(t)),it=new Set;let de=!1,pe=!1;function Os(){if(pe){const t=Array.from(it).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=To(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))===null||a===void 0||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}pe=!1,de=!1,it.forEach(t=>t.complete()),it.clear()}function Is(){it.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(pe=!0)})}function Po(){Is(),Os()}class Be{constructor(e,n,s,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(it.add(this),de||(de=!0,w.read(Is),w.resolveKeyframes(Os))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let r=0;r<e.length;r++)if(e[r]===null)if(r===0){const o=i==null?void 0:i.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&o===void 0&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),it.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,it.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const vt=t=>Math.round(t*1e5)/1e5,ke=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function So(t){return t==null}const bo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,je=(t,e)=>n=>!!(typeof n=="string"&&bo.test(n)&&n.startsWith(t)||e&&!So(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ns=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(ke);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ao=t=>q(0,255,t),Jt={...pt,transform:t=>Math.round(Ao(t))},st={test:je("rgb","red"),parse:Ns("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Jt.transform(t)+", "+Jt.transform(e)+", "+Jt.transform(n)+", "+vt(bt.transform(s))+")"};function wo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const me={test:je("#"),parse:wo,transform:st.transform},rt={test:je("hsl","hue"),parse:Ns("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+U.transform(vt(e))+", "+U.transform(vt(n))+", "+vt(bt.transform(s))+")"},E={test:t=>st.test(t)||me.test(t)||rt.test(t),parse:t=>st.test(t)?st.parse(t):rt.test(t)?rt.parse(t):me.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?st.transform(t):rt.transform(t)},Vo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Co(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ke))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Vo))===null||n===void 0?void 0:n.length)||0)>0}const Us="number",_s="color",Mo="var",Do="var(",hn="${}",Ro=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function At(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Ro,l=>(E.test(l)?(s.color.push(r),i.push(_s),n.push(E.parse(l))):l.startsWith(Do)?(s.var.push(r),i.push(Mo),n.push(l)):(s.number.push(r),i.push(Us),n.push(parseFloat(l))),++r,hn)).split(hn);return{values:n,split:a,indexes:s,types:i}}function Ks(t){return At(t).values}function Ws(t){const{split:e,types:n}=At(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Us?r+=vt(i[o]):a===_s?r+=E.transform(i[o]):r+=i[o]}return r}}const Eo=t=>typeof t=="number"?0:t;function Lo(t){const e=Ks(t);return Ws(t)(e.map(Eo))}const Z={test:Co,parse:Ks,createTransformer:Ws,getAnimatableNone:Lo},Fo=new Set(["brightness","contrast","saturate","opacity"]);function Bo(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ke)||[];if(!s)return t;const i=n.replace(s,"");let r=Fo.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const ko=/\b([a-z-]*)\(.*?\)/gu,ge={...Z,getAnimatableNone:t=>{const e=t.match(ko);return e?e.map(Bo).join(" "):t}},jo={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,top:x,right:x,bottom:x,left:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,backgroundPositionX:x,backgroundPositionY:x},Oo={rotate:X,rotateX:X,rotateY:X,rotateZ:X,scale:Rt,scaleX:Rt,scaleY:Rt,scaleZ:Rt,skew:X,skewX:X,skewY:X,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:bt,originX:rn,originY:rn,originZ:x},fn={...pt,transform:Math.round},Oe={...jo,...Oo,zIndex:fn,size:x,fillOpacity:bt,strokeOpacity:bt,numOctaves:fn},Io={...Oe,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:ge,WebkitFilter:ge},Ie=t=>Io[t];function Gs(t,e){let n=Ie(t);return n!==ge&&(n=Z),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const No=new Set(["auto","none","0"]);function Uo(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!No.has(r)&&At(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Gs(n,i)}class $s extends Be{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),Fe(u))){const c=Bs(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!go.has(s)||e.length!==2)return;const[i,r]=e,o=cn(i),a=cn(r);if(o!==a)if(an(o)&&an(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)lo(e[i])&&s.push(i);s.length&&Uo(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ht[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ht[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Ne(t){return typeof t=="function"}let Lt;function _o(){Lt=void 0}const _={now:()=>(Lt===void 0&&_.set(D.isProcessing||eo.useManualTiming?D.timestamp:performance.now()),Lt),set:t=>{Lt=t,queueMicrotask(_o)}},dn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Z.test(t)||t==="0")&&!t.startsWith("url("));function Ko(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Wo(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=dn(i,e),a=dn(r,e);return!o||!a?!1:Ko(t)||(n==="spring"||Ne(n))&&s}const Go=40;class zs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=_.now(),this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Go?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Po(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=_.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:r,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!Wo(e,s,i,r))if(o)this.options.duration=0;else{l==null||l(Wt(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,n);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function Hs(t,e){return e?t*(1e3/e):0}const $o=5;function Xs(t,e,n){const s=Math.max(e-$o,0);return Hs(n-t(s),e-s)}const Qt=.001,zo=.01,Ho=10,Xo=.05,Yo=1;function qo({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,r,o=1-e;o=q(Xo,Yo,o),t=q(zo,Ho,$(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=ye(u,o),p=Math.exp(-h);return Qt-f/d*p},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,p=Math.exp(-h),m=ye(Math.pow(u,2),o);return(-i(u)+Qt>0?-1:1)*((f-d)*p)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-Qt+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Jo(i,r,a);if(t=G(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const Zo=12;function Jo(t,e,n){let s=n;for(let i=1;i<Zo;i++)s=s-t(s)/e(s);return s}function ye(t,e){return t*Math.sqrt(1-e*e)}const Qo=["duration","bounce"],tr=["stiffness","damping","mass"];function pn(t,e){return e.some(n=>t[n]!==void 0)}function er(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!pn(t,tr)&&pn(t,Qo)){const n=qo(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function Ys({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],r=t[t.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:f}=er({...s,velocity:-$(s.velocity||0)}),d=h||0,p=l/(2*Math.sqrt(a*u)),m=r-i,y=$(Math.sqrt(a/u)),g=Math.abs(m)<5;n||(n=g?.01:2),e||(e=g?.005:.5);let v;if(p<1){const T=ye(y,p);v=S=>{const A=Math.exp(-p*y*S);return r-A*((d+p*y*m)/T*Math.sin(T*S)+m*Math.cos(T*S))}}else if(p===1)v=T=>r-Math.exp(-y*T)*(m+(d+y*m)*T);else{const T=y*Math.sqrt(p*p-1);v=S=>{const A=Math.exp(-p*y*S),M=Math.min(T*S,300);return r-A*((d+p*y*m)*Math.sinh(M)+T*m*Math.cosh(M))/T}}return{calculatedDuration:f&&c||null,next:T=>{const S=v(T);if(f)o.done=T>=c;else{let A=0;p<1&&(A=T===0?G(d):Xs(v,T,S));const M=Math.abs(A)<=n,N=Math.abs(r-S)<=e;o.done=M&&N}return o.value=o.done?r:S,o}}}function mn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=b=>a!==void 0&&b<a||l!==void 0&&b>l,p=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let m=n*e;const y=h+m,g=o===void 0?y:o(y);g!==y&&(m=g-h);const v=b=>-m*Math.exp(-b/s),T=b=>g+v(b),S=b=>{const k=v(b),j=T(b);f.done=Math.abs(k)<=u,f.value=f.done?g:j};let A,M;const N=b=>{d(f.value)&&(A=b,M=Ys({keyframes:[f.value,p(f.value)],velocity:Xs(T,b,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return N(0),{calculatedDuration:null,next:b=>{let k=!1;return!M&&A===void 0&&(k=!0,S(b),N(b)),A!==void 0&&b>=A?M.next(b-A):(!k&&S(b),f)}}}const nr=Ct(.42,0,1,1),sr=Ct(0,0,.58,1),qs=Ct(.42,0,.58,1),ir=t=>Array.isArray(t)&&typeof t[0]!="number",Ue=t=>Array.isArray(t)&&typeof t[0]=="number",gn={linear:R,easeIn:nr,easeInOut:qs,easeOut:sr,circIn:Le,circInOut:Ds,circOut:Ms,backIn:Ee,backInOut:Vs,backOut:ws,anticipate:Cs},yn=t=>{if(Ue(t)){fe(t.length===4);const[e,n,s,i]=t;return Ct(e,n,s,i)}else if(typeof t=="string")return fe(gn[t]!==void 0),gn[t];return t},or=(t,e)=>n=>e(t(n)),z=(...t)=>t.reduce(or),ft=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},V=(t,e,n)=>t+(e-t)*n;function te(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function rr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=te(l,a,t+1/3),r=te(l,a,t),o=te(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function kt(t,e){return n=>n>0?e:t}const ee=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ar=[me,st,rt],lr=t=>ar.find(e=>e.test(t));function vn(t){const e=lr(t);if(!e)return!1;let n=e.parse(t);return e===rt&&(n=rr(n)),n}const Tn=(t,e)=>{const n=vn(t),s=vn(e);if(!n||!s)return kt(t,e);const i={...n};return r=>(i.red=ee(n.red,s.red,r),i.green=ee(n.green,s.green,r),i.blue=ee(n.blue,s.blue,r),i.alpha=V(n.alpha,s.alpha,r),st.transform(i))},ve=new Set(["none","hidden"]);function ur(t,e){return ve.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function cr(t,e){return n=>V(t,e,n)}function _e(t){return typeof t=="number"?cr:typeof t=="string"?Fe(t)?kt:E.test(t)?Tn:dr:Array.isArray(t)?Zs:typeof t=="object"?E.test(t)?Tn:hr:kt}function Zs(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>_e(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function hr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=_e(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function fr(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[r]=l,i[o]++}return s}const dr=(t,e)=>{const n=Z.createTransformer(e),s=At(t),i=At(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?ve.has(t)&&!i.values.length||ve.has(e)&&!s.values.length?ur(t,e):z(Zs(fr(s,i),i.values),n):kt(t,e)};function Js(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?V(t,e,n):_e(t)(t,e)}function pr(t,e,n){const s=[],i=n||Js,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||R:e;a=z(l,a)}s.push(a)}return s}function mr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(fe(r===e.length),r===1)return()=>e[0];if(r===2&&t[0]===t[1])return()=>e[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=pr(e,s,i),a=o.length,l=u=>{let c=0;if(a>1)for(;c<t.length-2&&!(u<t[c+1]);c++);const h=ft(t[c],t[c+1],u);return o[c](h)};return n?u=>l(q(t[0],t[r-1],u)):l}function gr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=ft(0,e,s);t.push(V(n,1,i))}}function yr(t){const e=[0];return gr(e,t.length-1),e}function vr(t,e){return t.map(n=>n*e)}function Tr(t,e){return t.map(()=>e||qs).splice(0,t.length-1)}function jt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=ir(s)?s.map(yn):yn(s),r={done:!1,value:e[0]},o=vr(n&&n.length===e.length?n:yr(e),t),a=mr(o,e,{ease:Array.isArray(i)?i:Tr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const xn=2e4;function xr(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<xn;)e+=n,s=t.next(e);return e>=xn?1/0:e}const Pr=t=>{const e=({timestamp:n})=>t(n);return{start:()=>w.update(e,!0),stop:()=>Y(e),now:()=>D.isProcessing?D.timestamp:_.now()}},Sr={decay:mn,inertia:mn,tween:jt,keyframes:jt,spring:Ys},br=t=>t/100;class Gt extends zs{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:s,element:i,keyframes:r}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Be,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(r,a,n,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,a=Ne(n)?n:Sr[n]||jt;let l,u;a!==jt&&typeof e[0]!="number"&&(l=z(br,Js(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});r==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=xr(c));const{calculatedDuration:h}=c,f=h+i,d=f*(s+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:b}=this.options;return{done:!0,value:b[b.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=s;if(this.startTime===null)return r.next(0);const{delay:f,repeat:d,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let T=this.currentTime,S=r;if(d){const b=Math.min(this.currentTime,c)/h;let k=Math.floor(b),j=b%1;!j&&b>=1&&(j=1),j===1&&k--,k=Math.min(k,d+1),!!(k%2)&&(p==="reverse"?(j=1-j,m&&(j-=m/h)):p==="mirror"&&(S=o)),T=q(0,1,j)*h}const A=v?{done:!1,value:l[0]}:S.next(T);a&&(A.value=a(A.value));let{done:M}=A;!v&&u!==null&&(M=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return N&&i!==void 0&&(A.value=Wt(l,this.options,i)),y&&y(A.value),N&&this.finish(),A}get duration(){const{resolved:e}=this;return e?$(e.calculatedDuration):0}get time(){return $(this.currentTime)}set time(e){e=G(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=$(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Pr,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}function bu(t){return new Gt(t)}const Qs=new Set(["opacity","clipPath","filter","transform"]),Ar=10,wr=(t,e)=>{let n="";const s=Math.max(Math.round(e/Ar),2);for(let i=0;i<s;i++)n+=t(ft(0,s-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function Ke(t){let e;return()=>(e===void 0&&(e=t()),e)}const Vr={linearEasing:void 0};function Cr(t,e){const n=Ke(t);return()=>{var s;return(s=Vr[e])!==null&&s!==void 0?s:n()}}const Ot=Cr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function ti(t){return!!(typeof t=="function"&&Ot()||!t||typeof t=="string"&&(t in Te||Ot())||Ue(t)||Array.isArray(t)&&t.every(ti))}const gt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Te={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gt([0,.65,.55,1]),circOut:gt([.55,0,1,.45]),backIn:gt([.31,.01,.66,-.59]),backOut:gt([.33,1.53,.69,.99])};function ei(t,e){if(t)return typeof t=="function"&&Ot()?wr(t,e):Ue(t)?gt(t):Array.isArray(t)?t.map(n=>ei(n,e)||Te.easeOut):Te[t]}function Mr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=ei(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}function Pn(t,e){t.timeline=e,t.onfinish=null}const Dr=Ke(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),It=10,Rr=2e4;function Er(t){return Ne(t.type)||t.type==="spring"||!ti(t.ease)}function Lr(t,e){const n=new Gt({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<Rr;)s=n.sample(r),i.push(s.value),r+=It;return{times:void 0,keyframes:i,duration:r-It,ease:"linear"}}const ni={anticipate:Cs,backInOut:Vs,circInOut:Ds};function Fr(t){return t in ni}class Sn extends zs{constructor(e){super(e);const{name:n,motionValue:s,element:i,keyframes:r}=this.options;this.resolver=new $s(r,(o,a)=>this.onKeyframesResolved(o,a),n,s,i),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:r,ease:o,type:a,motionValue:l,name:u,startTime:c}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(typeof o=="string"&&Ot()&&Fr(o)&&(o=ni[o]),Er(this.options)){const{onComplete:f,onUpdate:d,motionValue:p,element:m,...y}=this.options,g=Lr(e,y);e=g.keyframes,e.length===1&&(e[1]=e[0]),i=g.duration,r=g.times,o=g.ease,a="keyframes"}const h=Mr(l.owner.current,u,e,{...this.options,duration:i,times:r,ease:o});return h.startTime=c??this.calcStartTime(),this.pendingTimeline?(Pn(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:f}=this.options;l.set(Wt(e,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:i,times:r,type:a,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return $(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return $(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=G(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return R;const{animation:s}=n;Pn(s,e)}return R}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:r,ease:o,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:h,element:f,...d}=this.options,p=new Gt({...d,keyframes:s,duration:i,type:r,ease:o,times:a,isGenerator:!0}),m=G(this.time);u.setWithVelocity(p.sample(m-It).value,p.sample(m).value,It)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=e;return Dr()&&s&&Qs.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}}const Br=Ke(()=>window.ScrollTimeline!==void 0);class kr{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e,n){const s=this.animations.map(i=>Br()&&i.attachTimeline?i.attachTimeline(e):n(i));return()=>{s.forEach((i,r)=>{i&&i(),this.animations[r].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 startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function jr({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const We=(t,e,n,s={},i,r)=>o=>{const a=Re(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-G(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};jr(a)||(c={...c,...to(t,c)}),c.duration&&(c.duration=G(c.duration)),c.repeatDelay&&(c.repeatDelay=G(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),h&&!r&&e.get()!==void 0){const f=Wt(c.keyframes,a);if(f!==void 0)return w.update(()=>{c.onUpdate(f),c.onComplete()}),new kr([])}return!r&&Sn.supports(c)?new Sn(c):new Gt(c)},Or=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Ir=t=>he(t)?t[t.length-1]||0:t;function Ge(t,e){t.indexOf(e)===-1&&t.push(e)}function $e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class ze{constructor(){this.subscriptions=[]}add(e){return Ge(this.subscriptions,e),()=>$e(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const bn=30,Nr=t=>!isNaN(parseFloat(t)),An={current:void 0};class Ur{constructor(e,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const r=_.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=_.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Nr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ze);const s=this.events[e].add(n);return e==="change"?()=>{s(),w.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return An.current&&An.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=_.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>bn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bn);return Hs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wt(t,e){return new Ur(t,e)}function _r(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,wt(n))}function Kr(t,e){const n=Kt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Ir(r[o]);_r(t,o,a)}}const $t=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Wr="framerAppearId",si="data-"+$t(Wr);function ii(t){return t.props[si]}const L=t=>!!(t&&t.getVelocity);function Gr(t){return!!(L(t)&&t.add)}function xe(t,e){if(!t.applyWillChange)return;const n=t.getValue("willChange");if(Gr(n))return n.add(e)}function $r({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function oi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const h in l){const f=t.getValue(h,(r=t.latestValues[h])!==null&&r!==void 0?r:null),d=l[h];if(d===void 0||c&&$r(c,h))continue;const p={delay:n,...Re(o||{},h)};let m=!1;if(window.MotionHandoffAnimation){const g=ii(t);if(g){const v=window.MotionHandoffAnimation(g,h,w);v!==null&&(p.startTime=v,m=!0)}}xe(t,h),f.start(We(h,f,d,t.shouldReduceMotion&&J.has(h)?{type:!1}:p,t,m));const y=f.animation;y&&u.push(y)}return a&&Promise.all(u).then(()=>{w.update(()=>{a&&Kr(t,a)})}),u}function Pe(t,e,n={}){var s;const i=Kt(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(oi(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=r;return zr(t,e,c+u,h,f,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function zr(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,l=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(Hr).forEach((u,c)=>{u.notify("AnimationStart",e),o.push(Pe(u,e,{...r,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function Hr(t,e){return t.sortNodePosition(e)}function Xr(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Pe(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Pe(t,e,n);else{const i=typeof e=="function"?Kt(t,e,n.custom):e;s=Promise.all(oi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Yr=De.length;function ri(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ri(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Yr;n++){const s=De[n],i=t.props[s];(St(i)||i===!1)&&(e[s]=i)}return e}const qr=[...Me].reverse(),Zr=Me.length;function Jr(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Xr(t,n,s)))}function Qr(t){let e=Jr(t),n=wn(),s=!0;const i=l=>(u,c)=>{var h;const f=Kt(t,c,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:p,...m}=f;u={...u,...m,...p}}return u};function r(l){e=l(t)}function o(l){const{props:u}=t,c=ri(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let y=0;y<Zr;y++){const g=qr[y],v=n[g],T=u[g]!==void 0?u[g]:c[g],S=St(T),A=g===l?v.isActive:null;A===!1&&(p=y);let M=T===c[g]&&T!==u[g]&&S;if(M&&s&&t.manuallyAnimateOnMount&&(M=!1),v.protectedKeys={...d},!v.isActive&&A===null||!T&&!v.prevProp||Pt(T)||typeof T=="boolean")continue;const N=ta(v.prevProp,T);let b=N||g===l&&v.isActive&&!M&&S||y>p&&S,k=!1;const j=Array.isArray(T)?T:[T];let ot=j.reduce(i(g),{});A===!1&&(ot={});const{prevResolvedValues:nn={}}=v,Xi={...nn,...ot},sn=F=>{b=!0,f.has(F)&&(k=!0,f.delete(F)),v.needsAnimating[F]=!0;const K=t.getValue(F);K&&(K.liveStyle=!1)};for(const F in Xi){const K=ot[F],Yt=nn[F];if(d.hasOwnProperty(F))continue;let qt=!1;he(K)&&he(Yt)?qt=!xs(K,Yt):qt=K!==Yt,qt?K!=null?sn(F):f.add(F):K!==void 0&&f.has(F)?sn(F):v.protectedKeys[F]=!0}v.prevProp=T,v.prevResolvedValues=ot,v.isActive&&(d={...d,...ot}),s&&t.blockInitialAnimation&&(b=!1),b&&(!(M&&N)||k)&&h.push(...j.map(F=>({animation:F,options:{type:g}})))}if(f.size){const y={};f.forEach(g=>{const v=t.getBaseTarget(g),T=t.getValue(g);T&&(T.liveStyle=!0),y[g]=v??null}),h.push({animation:y})}let m=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,u)}),n[l].isActive=u;const h=o(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=wn(),s=!0}}}function ta(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!xs(e,t):!1}function tt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wn(){return{animate:tt(!0),whileInView:tt(),whileHover:tt(),whileTap:tt(),whileDrag:tt(),whileFocus:tt(),exit:tt()}}class Q{constructor(e){this.isMounted=!1,this.node=e}update(){}}class ea extends Q{constructor(e){super(e),e.animationState||(e.animationState=Qr(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Pt(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let na=0;class sa extends Q{constructor(){super(...arguments),this.id=na++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const ia={animation:{Feature:ea},exit:{Feature:sa}},ai=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function zt(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const oa=t=>e=>ai(e)&&t(e,zt(e));function W(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function H(t,e,n,s){return W(t,e,oa(n),s)}const Vn=(t,e)=>Math.abs(t-e);function ra(t,e){const n=Vn(t.x,e.x),s=Vn(t.y,e.y);return Math.sqrt(n**2+s**2)}class li{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=se(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=ra(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:p}=h,{timestamp:m}=D;this.history.push({...p,timestamp:m});const{onStart:y,onMove:g}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ne(f,this.transformPagePoint),w.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=se(h.type==="pointercancel"?this.lastMoveEventInfo:ne(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),p&&p(h,y)},!ai(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=zt(e),a=ne(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=D;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,se(a,this.history)),this.removeListeners=z(H(this.contextWindow,"pointermove",this.handlePointerMove),H(this.contextWindow,"pointerup",this.handlePointerUp),H(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Y(this.updatePoint)}}function ne(t,e){return e?{point:e(t.point)}:t}function Cn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function se({point:t},e){return{point:t,delta:Cn(t,ui(e)),offset:Cn(t,aa(e)),velocity:la(e,.1)}}function aa(t){return t[0]}function ui(t){return t[t.length-1]}function la(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=ui(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>G(e)));)n--;if(!s)return{x:0,y:0};const r=$(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function ci(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const Mn=ci("dragHorizontal"),Dn=ci("dragVertical");function hi(t){let e=!1;if(t==="y")e=Dn();else if(t==="x")e=Mn();else{const n=Mn(),s=Dn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function fi(){const t=hi(!0);return t?(t(),!1):!0}function at(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const di=1e-4,ua=1-di,ca=1+di,pi=.01,ha=0-pi,fa=0+pi;function B(t){return t.max-t.min}function da(t,e,n){return Math.abs(t-e)<=n}function Rn(t,e,n,s=.5){t.origin=s,t.originPoint=V(e.min,e.max,t.origin),t.scale=B(n)/B(e),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(t.scale>=ua&&t.scale<=ca||isNaN(t.scale))&&(t.scale=1),(t.translate>=ha&&t.translate<=fa||isNaN(t.translate))&&(t.translate=0)}function Tt(t,e,n,s){Rn(t.x,e.x,n.x,s?s.originX:void 0),Rn(t.y,e.y,n.y,s?s.originY:void 0)}function En(t,e,n){t.min=n.min+e.min,t.max=t.min+B(e)}function pa(t,e,n){En(t.x,e.x,n.x),En(t.y,e.y,n.y)}function Ln(t,e,n){t.min=e.min-n.min,t.max=t.min+B(e)}function xt(t,e,n){Ln(t.x,e.x,n.x),Ln(t.y,e.y,n.y)}function ma(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?V(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?V(n,t,s.max):Math.min(t,n)),t}function Fn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function ga(t,{top:e,left:n,bottom:s,right:i}){return{x:Fn(t.x,n,i),y:Fn(t.y,e,s)}}function Bn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function ya(t,e){return{x:Bn(t.x,e.x),y:Bn(t.y,e.y)}}function va(t,e){let n=.5;const s=B(t),i=B(e);return i>s?n=ft(e.min,e.max-s,t.min):s>i&&(n=ft(t.min,t.max-i,e.min)),q(0,1,n)}function Ta(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Se=.35;function xa(t=Se){return t===!1?t=0:t===!0&&(t=Se),{x:kn(t,"left","right"),y:kn(t,"top","bottom")}}function kn(t,e,n){return{min:jn(t,e),max:jn(t,n)}}function jn(t,e){return typeof t=="number"?t:t[e]||0}const On=()=>({translate:0,scale:1,origin:0,originPoint:0}),lt=()=>({x:On(),y:On()}),In=()=>({min:0,max:0}),C=()=>({x:In(),y:In()});function I(t){return[t("x"),t("y")]}function mi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Pa({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Sa(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ie(t){return t===void 0||t===1}function be({scale:t,scaleX:e,scaleY:n}){return!ie(t)||!ie(e)||!ie(n)}function et(t){return be(t)||gi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function gi(t){return Nn(t.x)||Nn(t.y)}function Nn(t){return t&&t!=="0%"}function Nt(t,e,n){const s=t-n,i=e*s;return n+i}function Un(t,e,n,s,i){return i!==void 0&&(t=Nt(t,i,s)),Nt(t,n,s)+e}function Ae(t,e=0,n=1,s,i){t.min=Un(t.min,e,n,s,i),t.max=Un(t.max,e,n,s,i)}function yi(t,{x:e,y:n}){Ae(t.x,e.translate,e.scale,e.originPoint),Ae(t.y,n.translate,n.scale,n.originPoint)}const _n=.999999999999,Kn=1.0000000000001;function ba(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ct(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,yi(t,o)),s&&et(r.latestValues)&&ct(t,r.latestValues))}e.x<Kn&&e.x>_n&&(e.x=1),e.y<Kn&&e.y>_n&&(e.y=1)}function ut(t,e){t.min=t.min+e,t.max=t.max+e}function Wn(t,e,n,s,i=.5){const r=V(t.min,t.max,i);Ae(t,e,n,r,s)}function ct(t,e){Wn(t.x,e.x,e.scaleX,e.scale,e.originX),Wn(t.y,e.y,e.scaleY,e.scale,e.originY)}function vi(t,e){return mi(Sa(t.getBoundingClientRect(),e))}function Aa(t,e,n){const s=vi(t,n),{scroll:i}=e;return i&&(ut(s.x,i.offset.x),ut(s.y,i.offset.y)),s}const Ti=({current:t})=>t?t.ownerDocument.defaultView:null,wa=new WeakMap;class Va{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=C(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zt(c,"page").point)},r=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:p}=this.getProps();if(f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=hi(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),I(y=>{let g=this.getAxisMotionValue(y).get()||0;if(U.test(g)){const{projection:v}=this.visualElement;if(v&&v.layout){const T=v.layout.layoutBox[y];T&&(g=B(T)*(parseFloat(g)/100))}}this.originPoint[y]=g}),p&&w.postRender(()=>p(c,h)),xe(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=Ca(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),m&&m(c,h)},a=(c,h)=>this.stop(c,h),l=()=>I(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new li(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Ti(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&w.postRender(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Et(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=ma(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,r=this.constraints;n&&at(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=ga(i.layoutBox,n):this.constraints=!1,this.elastic=xa(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&I(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Ta(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!at(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Aa(s,i.root,this.visualElement.getTransformPagePoint());let o=ya(i.layout.layoutBox,r);if(n){const a=n(Pa(o));this.hasMutatedConstraints=!!a,a&&(o=mi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=I(c=>{if(!Et(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return xe(this.visualElement,e),s.start(We(e,s,0,n,this.visualElement,!1))}stopAnimation(){I(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){I(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){I(n=>{const{drag:s}=this.getProps();if(!Et(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-V(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!at(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};I(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=va({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),I(o=>{if(!Et(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(V(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;wa.set(this.visualElement,this);const e=this.visualElement.current,n=H(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();at(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),w.read(s);const o=W(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(I(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Se,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Et(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ca(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ma extends Q{constructor(e){super(e),this.removeGroupControls=R,this.removeListeners=R,this.controls=new Va(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||R}unmount(){this.removeGroupControls(),this.removeListeners()}}const Gn=t=>(e,n)=>{t&&w.postRender(()=>t(e,n))};class Da extends Q{constructor(){super(...arguments),this.removePointerDownListener=R}onPointerDown(e){this.session=new li(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ti(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Gn(e),onStart:Gn(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&w.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=H(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const He=P.createContext(null);function Ra(){const t=P.useContext(He);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=P.useId();P.useEffect(()=>s(i),[]);const r=P.useCallback(()=>n&&n(i),[i,n]);return!e&&n?[!1,r]:[!0]}const xi=P.createContext({}),Pi=P.createContext({}),Ft={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $n(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const mt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=$n(t,e.target.x),s=$n(t,e.target.y);return`${n}% ${s}%`}},Ea={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Z.parse(t);if(i.length>5)return s;const r=Z.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=V(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},Ut={};function La(t){Object.assign(Ut,t)}const{schedule:Xe,cancel:Au}=Ps(queueMicrotask,!1);class Fa extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;La(Ba),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Ft.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||w.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Xe.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Si(t){const[e,n]=Ra(),s=P.useContext(xi);return ce.jsx(Fa,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(Pi),isPresent:e,safeToRemove:n})}const Ba={borderRadius:{...mt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomLeftRadius:mt,borderBottomRightRadius:mt,boxShadow:Ea},bi=["TopLeft","TopRight","BottomLeft","BottomRight"],ka=bi.length,zn=t=>typeof t=="string"?parseFloat(t):t,Hn=t=>typeof t=="number"||x.test(t);function ja(t,e,n,s,i,r){i?(t.opacity=V(0,n.opacity!==void 0?n.opacity:1,Oa(s)),t.opacityExit=V(e.opacity!==void 0?e.opacity:1,0,Ia(s))):r&&(t.opacity=V(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<ka;o++){const a=`border${bi[o]}Radius`;let l=Xn(e,a),u=Xn(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Hn(l)===Hn(u)?(t[a]=Math.max(V(zn(l),zn(u),s),0),(U.test(u)||U.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=V(e.rotate||0,n.rotate||0,s))}function Xn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Oa=Ai(0,.5,Ms),Ia=Ai(.5,.95,R);function Ai(t,e,n){return s=>s<t?0:s>e?1:n(ft(t,e,s))}function Yn(t,e){t.min=e.min,t.max=e.max}function O(t,e){Yn(t.x,e.x),Yn(t.y,e.y)}function qn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Zn(t,e,n,s,i){return t-=e,t=Nt(t,1/n,s),i!==void 0&&(t=Nt(t,1/i,s)),t}function Na(t,e=0,n=1,s=.5,i,r=t,o=t){if(U.test(e)&&(e=parseFloat(e),e=V(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=V(r.min,r.max,s);t===r&&(a-=e),t.min=Zn(t.min,e,n,a,i),t.max=Zn(t.max,e,n,a,i)}function Jn(t,e,[n,s,i],r,o){Na(t,e[n],e[s],e[i],e.scale,r,o)}const Ua=["x","scaleX","originX"],_a=["y","scaleY","originY"];function Qn(t,e,n,s){Jn(t.x,e,Ua,n?n.x:void 0,s?s.x:void 0),Jn(t.y,e,_a,n?n.y:void 0,s?s.y:void 0)}function ts(t){return t.translate===0&&t.scale===1}function wi(t){return ts(t.x)&&ts(t.y)}function es(t,e){return t.min===e.min&&t.max===e.max}function Ka(t,e){return es(t.x,e.x)&&es(t.y,e.y)}function ns(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Vi(t,e){return ns(t.x,e.x)&&ns(t.y,e.y)}function ss(t){return B(t.x)/B(t.y)}function is(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Wa{constructor(){this.members=[]}add(e){Ge(this.members,e),e.scheduleRender()}remove(e){if($e(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ga(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const $a=(t,e)=>t.depth-e.depth;class za{constructor(){this.children=[],this.isDirty=!1}add(e){Ge(this.children,e),this.isDirty=!0}remove(e){$e(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort($a),this.isDirty=!1,this.children.forEach(e)}}function Bt(t){const e=L(t)?t.get():t;return Or(e)?e.toValue():e}function Ha(t,e){const n=_.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Y(s),t(r-e))};return w.read(s,!0),()=>Y(s)}function Xa(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Ya(t,e,n){const s=L(t)?t:wt(t);return s.start(We("",s,e,n)),s.animation}const nt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},yt=typeof window<"u"&&window.MotionDebug!==void 0,oe=["","X","Y","Z"],qa={visibility:"hidden"},os=1e3;let Za=0;function re(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Ci(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=ii(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",w,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Ci(s)}function Mi({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Za++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,yt&&(nt.totalNodes=nt.resolvedTargetDeltas=nt.recalculatedProjection=0),this.nodes.forEach(tl),this.nodes.forEach(ol),this.nodes.forEach(rl),this.nodes.forEach(el),yt&&window.MotionDebug.record(nt)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new za)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ze),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Xa(o),this.instance=o;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Ha(f,250),Ft.hasAnimatedSinceResize&&(Ft.hasAnimatedSinceResize=!1,this.nodes.forEach(as))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||hl,{onLayoutAnimationStart:y,onLayoutAnimationComplete:g}=c.getProps(),v=!this.targetLayout||!Vi(this.targetLayout,p)||d,T=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,T);const S={...Re(m,"layout"),onPlay:y,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||as(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Y(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(al),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ci(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(rs);return}this.isUpdating||this.nodes.forEach(sl),this.isUpdating=!1,this.nodes.forEach(il),this.nodes.forEach(Ja),this.nodes.forEach(Qa),this.clearAllSnapshots();const a=_.now();D.delta=q(0,1e3/60,a-D.timestamp),D.timestamp=a,D.isProcessing=!0,Zt.update.process(D),Zt.preRender.process(D),Zt.render.process(D),D.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xe.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(nl),this.sharedNodes.forEach(ll)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,w.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){w.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=C(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!wi(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(a||et(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),fl(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return C();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(dl))){const{scroll:c}=this.root;c&&(ut(l.x,c.offset.x),ut(l.y,c.offset.y))}return l}removeElementScroll(o){var a;const l=C();if(O(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&O(l,o),ut(l.x,h.offset.x),ut(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=C();O(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ct(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),et(c.latestValues)&&ct(l,c.latestValues)}return et(this.latestValues)&&ct(l,this.latestValues),l}removeTransform(o){const a=C();O(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!et(u.latestValues))continue;be(u.latestValues)&&u.updateSnapshot();const c=C(),h=u.measurePageBox();O(c,h),Qn(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return et(this.latestValues)&&Qn(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==D.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=D.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),xt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),O(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=C(),this.targetWithTransforms=C()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),pa(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):O(this.target,this.layout.layoutBox),yi(this.target,this.targetDelta)):O(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),xt(this.relativeTargetOrigin,this.target,d.target),O(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}yt&&nt.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||be(this.parent.latestValues)||gi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===D.timestamp&&(u=!1),u)return;const{layout:c,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||h))return;O(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;ba(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=C());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(qn(this.prevProjectionDelta.x,this.projectionDelta.x),qn(this.prevProjectionDelta.y,this.projectionDelta.y)),Tt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!is(this.projectionDelta.x,this.prevProjectionDelta.x)||!is(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),yt&&nt.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=lt(),this.projectionDelta=lt(),this.projectionDeltaWithTransform=lt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=lt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=C(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,y=this.getStack(),g=!y||y.members.length<=1,v=!!(m&&!g&&this.options.crossfade===!0&&!this.path.some(cl));this.animationProgress=0;let T;this.mixTargetDelta=S=>{const A=S/1e3;ls(h.x,o.x,A),ls(h.y,o.y,A),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),ul(this.relativeTarget,this.relativeTargetOrigin,f,A),T&&Ka(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=C()),O(T,this.relativeTarget)),m&&(this.animationValues=c,ja(c,u,this.latestValues,A,v,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Y(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=w.update(()=>{Ft.hasAnimatedSinceResize=!0,this.currentAnimation=Ya(0,os,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(os),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Di(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||C();const h=B(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=B(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}O(a,l),ct(a,c),Tt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Wa),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&re("z",o,u,this.animationValues);for(let c=0;c<oe.length;c++)re(`rotate${oe[c]}`,o,u,this.animationValues),re(`skew${oe[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return qa;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Bt(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Bt(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!et(this.latestValues)&&(m.transform=c?c({},""):"none",this.hasProjected=!1),m}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=Ga(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:d,y:p}=this.projectionDelta;u.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,h.animationValues?u.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Ut){if(f[m]===void 0)continue;const{correct:y,applyTo:g}=Ut[m],v=u.transform==="none"?f[m]:y(f[m],h);if(g){const T=g.length;for(let S=0;S<T;S++)u[g[S]]=v}else u[m]=v}return this.options.layoutId&&(u.pointerEvents=h===this?Bt(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(rs),this.root.sharedNodes.clear()}}}function Ja(t){t.updateLayout()}function Qa(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?I(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=B(f);f.min=s[h].min,f.max=f.min+d}):Di(r,n.layoutBox,s)&&I(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=B(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=lt();Tt(a,s,n.layoutBox);const l=lt();o?Tt(l,t.applyTransform(i,!0),n.measuredBox):Tt(l,s,n.layoutBox);const u=!wi(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=C();xt(p,n.layoutBox,f.layoutBox);const m=C();xt(m,s,d.layoutBox),Vi(p,m)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function tl(t){yt&&nt.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function el(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function nl(t){t.clearSnapshot()}function rs(t){t.clearMeasurements()}function sl(t){t.isLayoutDirty=!1}function il(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function as(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ol(t){t.resolveTargetDelta()}function rl(t){t.calcProjection()}function al(t){t.resetSkewAndRotation()}function ll(t){t.removeLeadSnapshot()}function ls(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function us(t,e,n,s){t.min=V(e.min,n.min,s),t.max=V(e.max,n.max,s)}function ul(t,e,n,s){us(t.x,e.x,n.x,s),us(t.y,e.y,n.y,s)}function cl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const hl={duration:.45,ease:[.4,0,.1,1]},cs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),hs=cs("applewebkit/")&&!cs("chrome/")?Math.round:R;function fs(t){t.min=hs(t.min),t.max=hs(t.max)}function fl(t){fs(t.x),fs(t.y)}function Di(t,e,n){return t==="position"||t==="preserve-aspect"&&!da(ss(e),ss(n),.2)}function dl(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const pl=Mi({attachResizeListener:(t,e)=>W(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ae={current:void 0},Ri=Mi({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ae.current){const t=new pl({});t.mount(window),t.setOptions({layoutScroll:!0}),ae.current=t}return ae.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),ml={pan:{Feature:Da},drag:{Feature:Ma,ProjectionNode:Ri,MeasureLayout:Si}};function ds(t,e){const n=e?"pointerenter":"pointerleave",s=e?"onHoverStart":"onHoverEnd",i=(r,o)=>{if(r.pointerType==="touch"||fi())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[s];l&&w.postRender(()=>l(r,o))};return H(t.current,n,i,{passive:!t.getProps()[s]})}class gl extends Q{mount(){this.unmount=z(ds(this.node,!0),ds(this.node,!1))}unmount(){}}class yl extends Q{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=z(W(this.node.current,"focus",()=>this.onFocus()),W(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ei=(t,e)=>e?t===e?!0:Ei(t,e.parentElement):!1;function le(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,zt(n))}class vl extends Q{constructor(){super(...arguments),this.removeStartListeners=R,this.removeEndListeners=R,this.removeAccessibleListeners=R,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),r=H(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:h}=this.node.getProps(),f=!h&&!Ei(this.node.current,a.target)?c:u;f&&w.update(()=>f(a,l))},{passive:!(s.onTap||s.onPointerUp)}),o=H(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=z(r,o),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=r=>{if(r.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||le("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&w.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=W(this.node.current,"keyup",o),le("down",(a,l)=>{this.startPress(a,l)})},n=W(this.node.current,"keydown",e),s=()=>{this.isPressing&&le("cancel",(r,o)=>this.cancelPress(r,o))},i=W(this.node.current,"blur",s);this.removeAccessibleListeners=z(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&w.postRender(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!fi()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&w.postRender(()=>s(e,n))}mount(){const e=this.node.getProps(),n=H(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=W(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=z(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const we=new WeakMap,ue=new WeakMap,Tl=t=>{const e=we.get(t.target);e&&e(t)},xl=t=>{t.forEach(Tl)};function Pl({root:t,...e}){const n=t||document;ue.has(n)||ue.set(n,{});const s=ue.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(xl,{root:t,...e})),s[i]}function Sl(t,e,n){const s=Pl(e);return we.set(t,n),s.observe(t),()=>{we.delete(t),s.unobserve(t)}}const bl={some:0,all:1};class Al extends Q{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:bl[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return Sl(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(wl(e,n))&&this.startObserver()}unmount(){}}function wl({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Vl={inView:{Feature:Al},tap:{Feature:vl},focus:{Feature:yl},hover:{Feature:gl}},Cl={layout:{ProjectionNode:Ri,MeasureLayout:Si}},Li=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Ht=P.createContext({}),Ye=typeof window<"u",Ml=Ye?P.useLayoutEffect:P.useEffect,Fi=P.createContext({strict:!1});function Dl(t,e,n,s,i){var r,o;const{visualElement:a}=P.useContext(Ht),l=P.useContext(Fi),u=P.useContext(He),c=P.useContext(Li).reducedMotion,h=P.useRef();s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=h.current,d=P.useContext(Pi);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&Rl(h.current,n,i,d),P.useInsertionEffect(()=>{f&&f.update(n,u)});const p=n[si],m=P.useRef(!!p&&!(!((r=window.MotionHandoffIsComplete)===null||r===void 0)&&r.call(window,p))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,p)));return Ml(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),Xe.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())}),P.useEffect(()=>{f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,p)}),m.current=!1))}),f}function Rl(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Bi(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&at(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:u})}function Bi(t){if(t)return t.options.allowProjection!==!1?t.projection:Bi(t.parent)}function El(t,e,n){return P.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):at(n)&&(n.current=s))},[e])}function Xt(t){return Pt(t.animate)||De.some(e=>St(t[e]))}function ki(t){return!!(Xt(t)||t.variants)}function Ll(t,e){if(Xt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||St(n)?n:void 0,animate:St(s)?s:void 0}}return t.inherit!==!1?e:{}}function Fl(t){const{initial:e,animate:n}=Ll(t,P.useContext(Ht));return P.useMemo(()=>({initial:e,animate:n}),[ps(e),ps(n)])}function ps(t){return Array.isArray(t)?t.join(" "):t}const ms={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"]},dt={};for(const t in ms)dt[t]={isEnabled:e=>ms[t].some(n=>!!e[n])};function Bl(t){for(const e in t)dt[e]={...dt[e],...t[e]}}const kl=Symbol.for("motionComponentSymbol");function jl({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Bl(t);function r(a,l){let u;const c={...P.useContext(Li),...a,layoutId:Ol(a)},{isStatic:h}=c,f=Fl(a),d=s(a,h);if(!h&&Ye){Il();const p=Nl(c);u=p.MeasureLayout,f.visualElement=Dl(i,d,c,e,p.ProjectionNode)}return ce.jsxs(Ht.Provider,{value:f,children:[u&&f.visualElement?ce.jsx(u,{visualElement:f.visualElement,...c}):null,n(i,a,El(d,f.visualElement,l),d,h,f.visualElement)]})}const o=P.forwardRef(r);return o[kl]=i,o}function Ol({layoutId:t}){const e=P.useContext(xi).id;return e&&t!==void 0?e+"-"+t:t}function Il(t,e){P.useContext(Fi).strict}function Nl(t){const{drag:e,layout:n}=dt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const Ul=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function qe(t){return typeof t!="string"||t.includes("-")?!1:!!(Ul.indexOf(t)>-1||/[A-Z]/u.test(t))}function ji(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const Oi=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"]);function Ii(t,e,n,s){ji(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Oi.has(i)?i:$t(i),e.attrs[i])}function Ni(t,{layout:e,layoutId:n}){return J.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ut[t]||t==="opacity")}function Ze(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(L(i[o])||e.style&&L(e.style[o])||Ni(o,t)||((s=n==null?void 0:n.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return n&&i&&typeof i.willChange=="string"&&(n.applyWillChange=!1),r}function Ui(t,e,n){const s=Ze(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const r=Vt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function _l(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}function Kl(t){if(J.has(t))return"transform";if(Qs.has(t))return $t(t)}function Wl({applyWillChange:t=!1,scrapeMotionValuesFromProps:e,createRenderState:n,onMount:s},i,r,o,a){const l={latestValues:Gl(i,r,o,a?!1:t,e),renderState:n()};return s&&(l.mount=u=>s(i,u,l)),l}const _i=t=>(e,n)=>{const s=P.useContext(Ht),i=P.useContext(He),r=()=>Wl(t,e,s,i,n);return n?r():_l(r)};function gs(t,e,n){const s=Array.isArray(e)?e:[e];for(let i=0;i<s.length;i++){const r=Ce(t,s[i]);if(r){const{transitionEnd:o,transition:a,...l}=r;n(l,o)}}}function Gl(t,e,n,s,i){var r;const o={},a=new Set,l=s&&((r=t.style)===null||r===void 0?void 0:r.willChange)===void 0,u=i(t,{});for(const y in u)o[y]=Bt(u[y]);let{initial:c,animate:h}=t;const f=Xt(t),d=ki(t);e&&d&&!f&&t.inherit!==!1&&(c===void 0&&(c=e.initial),h===void 0&&(h=e.animate));let p=n?n.initial===!1:!1;p=p||c===!1;const m=p?h:c;return m&&typeof m!="boolean"&&!Pt(m)&&gs(t,m,(y,g)=>{for(const v in y){let T=y[v];if(Array.isArray(T)){const S=p?T.length-1:0;T=T[S]}T!==null&&(o[v]=T)}for(const v in g)o[v]=g[v]}),l&&(h&&c!==!1&&!Pt(h)&&gs(t,h,y=>{for(const g in y){const v=Kl(g);v&&a.add(v)}}),a.size&&(o.willChange=Array.from(a).join(","))),o}const Je=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Ki=()=>({...Je(),attrs:{}}),Wi=(t,e)=>e&&typeof t=="number"?e.transform(t):t,$l={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zl=Vt.length;function Hl(t,e,n){let s="",i=!0;for(let r=0;r<zl;r++){const o=Vt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Wi(a,Oe[o]);if(!l){i=!1;const c=$l[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Qe(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(J.has(l)){o=!0;continue}else if(Fs(l)){i[l]=u;continue}else{const c=Wi(u,Oe[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=Hl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}function ys(t,e,n){return typeof t=="string"?t:x.transform(e+n*t)}function Xl(t,e,n){const s=ys(e,t.x,t.width),i=ys(n,t.y,t.height);return`${s} ${i}`}const Yl={offset:"stroke-dashoffset",array:"stroke-dasharray"},ql={offset:"strokeDashoffset",array:"strokeDasharray"};function Zl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Yl:ql;t[r.offset]=x.transform(-s);const o=x.transform(e),a=x.transform(n);t[r.array]=`${o} ${a}`}function tn(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Qe(t,u,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d,dimensions:p}=t;f.transform&&(p&&(d.transform=f.transform),delete f.transform),p&&(i!==void 0||r!==void 0||d.transform)&&(d.transformOrigin=Xl(p,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),o!==void 0&&Zl(f,o,a,l,!1)}const en=t=>typeof t=="string"&&t.toLowerCase()==="svg",Jl={useVisualState:_i({scrapeMotionValuesFromProps:Ui,createRenderState:Ki,onMount:(t,e,{renderState:n,latestValues:s})=>{w.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),w.render(()=>{tn(n,s,en(e.tagName),t.transformTemplate),Ii(e,n)})}})},Ql={useVisualState:_i({applyWillChange:!0,scrapeMotionValuesFromProps:Ze,createRenderState:Je})};function Gi(t,e,n){for(const s in e)!L(e[s])&&!Ni(s,n)&&(t[s]=e[s])}function tu({transformTemplate:t},e){return P.useMemo(()=>{const n=Je();return Qe(n,e,t),Object.assign({},n.vars,n.style)},[e])}function eu(t,e){const n=t.style||{},s={};return Gi(s,n,t),Object.assign(s,tu(t,e)),s}function nu(t,e){const n={},s=eu(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const su=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function _t(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||su.has(t)}let $i=t=>!_t(t);function iu(t){t&&($i=e=>e.startsWith("on")?!_t(e):t(e))}try{iu(require("@emotion/is-prop-valid").default)}catch{}function ou(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||($i(i)||n===!0&&_t(i)||!e&&!_t(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function ru(t,e,n,s){const i=P.useMemo(()=>{const r=Ki();return tn(r,e,en(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Gi(r,t.style,t),i.style={...r,...i.style}}return i}function au(t=!1){return(n,s,i,{latestValues:r},o)=>{const l=(qe(n)?ru:nu)(s,r,o,n),u=ou(s,typeof n=="string",t),c=n!==P.Fragment?{...u,...l,ref:i}:{},{children:h}=s,f=P.useMemo(()=>L(h)?h.get():h,[h]);return P.createElement(n,{...c,children:f})}}function lu(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...qe(s)?Jl:Ql,preloadedFeatures:t,useRender:au(i),createVisualElement:e,Component:s};return jl(o)}}const Ve={current:null},zi={current:!1};function uu(){if(zi.current=!0,!!Ye)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ve.current=t.matches;t.addListener(e),e()}else Ve.current=!1}function cu(t,e,n){for(const s in e){const i=e[s],r=n[s];if(L(i))t.addValue(s,i);else if(L(r))t.addValue(s,wt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,wt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const vs=new WeakMap,hu=[...js,E,Z],fu=t=>hu.find(ks(t)),Ts=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class du{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Be,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=_.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,w.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Xt(n),this.isVariantNode=ki(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&L(d)&&d.set(l[f],!1)}}mount(e){this.current=e,vs.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),zi.current||uu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ve.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){vs.delete(this.current),this.projection&&this.projection.unmount(),Y(this.notifyUpdate),Y(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=J.has(e),i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&w.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in dt){const n=dt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):C()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Ts.length;s++){const i=Ts[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=cu(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=wt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Es(i)||Rs(i))?i=parseFloat(i):!fu(i)&&Z.test(n)&&(i=Gs(e,n)),this.setBaseTarget(e,L(i)?i.get():i)),L(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=Ce(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[e])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!L(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ze),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Hi extends du{constructor(){super(...arguments),this.KeyframeResolver=$s}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}}function pu(t){return window.getComputedStyle(t)}class mu extends Hi{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=ji}readValueFromInstance(e,n){if(J.has(n)){const s=Ie(n);return s&&s.default||0}else{const s=pu(e),i=(Fs(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return vi(e,n)}build(e,n,s){Qe(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ze(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class gu extends Hi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=C}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(J.has(n)){const s=Ie(n);return s&&s.default||0}return n=Oi.has(n)?n:$t(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Ui(e,n,s)}build(e,n,s){tn(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,i){Ii(e,n,s,i)}mount(e){this.isSVGTag=en(e.tagName),super.mount(e)}}const yu=(t,e)=>qe(t)?new gu(e):new mu(e,{allowProjection:t!==P.Fragment}),vu=lu({...ia,...Vl,...ml,...Cl},yu),Vu=Yi(vu);export{C as A,Xa as B,vs as C,Ya as D,oi as E,Ys as F,kr as G,mu as H,yn as I,xi as L,Li as M,He as P,gu as S,du as V,wt as a,Ml as b,Y as c,mr as d,An as e,w as f,D as g,bu as h,L as i,fe as j,yr as k,xr as l,Vu as m,xn as n,$ as o,ft as p,ir as q,V as r,Br as s,$e as t,_l as u,Hs as v,Su as w,Ne as x,gr as y,G as z};
//# sourceMappingURL=proxy-vY2oCmC4.js.map
