import{r as T,j as y}from"./app-DBtZ8h0a.js";import{X as fr}from"./x-CfYMzEXa.js";import{c as ot}from"./createLucideIcon-ivHVH1Cm.js";import{C as xn,B as dr,W as mr}from"./wallet-BKQjZHfF.js";import{C as Ls}from"./copy-Boumn5vf.js";import{C as pr,a as gr}from"./clock-CF6ZwmLW.js";import{C as yr}from"./circle-check-big-CjF5UNvc.js";import{C as xr}from"./circle-alert-DuosJsOu.js";/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vr=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Tr=ot("ArrowDown",vr);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const br=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Sr=ot("ArrowUp",br);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],Pr=ot("Ban",wr);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ar=[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]],Vr=ot("Landmark",Ar);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cr=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],Dr=ot("Share2",Cr);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mr=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],Rr=ot("ShoppingCart",Mr);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Er=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],jr=ot("Smartphone",Er),Le=T.createContext({});function Be(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const Fe=typeof window<"u",Bs=Fe?T.useLayoutEffect:T.useEffect,qt=T.createContext(null);function Ie(t,e){t.indexOf(e)===-1&&t.push(e)}function Ne(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const X=(t,e,n)=>n>e?e:n<t?t:n;let Oe=()=>{};const Y={},Fs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Is(t){return typeof t=="object"&&t!==null}const Ns=t=>/^0[^.\s]+$/u.test(t);function Ue(t){let e;return()=>(e===void 0&&(e=t()),e)}const $=t=>t,kr=(t,e)=>n=>e(t(n)),kt=(...t)=>t.reduce(kr),Vt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class _e{constructor(){this.subscriptions=[]}add(e){return Ie(this.subscriptions,e),()=>Ne(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const W=t=>t*1e3,z=t=>t/1e3;function Os(t,e){return e?t*(1e3/e):0}const Us=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Lr=1e-7,Br=12;function Fr(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Us(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Lr&&++a<Br);return r}function Lt(t,e,n,s){if(t===e&&n===s)return $;const i=o=>Fr(o,0,1,t,n);return o=>o===0||o===1?o:Us(i(o),e,s)}const _s=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,$s=t=>e=>1-t(1-e),Ks=Lt(.33,1.53,.69,.99),$e=$s(Ks),Ws=_s($e),zs=t=>(t*=2)<1?.5*$e(t):.5*(2-Math.pow(2,-10*(t-1))),Ke=t=>1-Math.sin(Math.acos(t)),Gs=$s(Ke),Hs=_s(Ke),Ir=Lt(.42,0,1,1),Nr=Lt(0,0,.58,1),Xs=Lt(.42,0,.58,1),Or=t=>Array.isArray(t)&&typeof t[0]!="number",Ys=t=>Array.isArray(t)&&typeof t[0]=="number",Ur={linear:$,easeIn:Ir,easeInOut:Xs,easeOut:Nr,circIn:Ke,circInOut:Hs,circOut:Gs,backIn:$e,backInOut:Ws,backOut:Ks,anticipate:zs},_r=t=>typeof t=="string",vn=t=>{if(Ys(t)){Oe(t.length===4);const[e,n,s,i]=t;return Lt(e,n,s,i)}else if(_r(t))return Ur[t];return t},It=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Tn={value:null};function $r(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(h){r.has(h)&&(c.schedule(h),t()),l++,h(a)}const c={schedule:(h,f=!1,d=!1)=>{const g=d&&i?n:s;return f&&r.add(h),g.has(h)||g.add(h),h},cancel:h=>{s.delete(h),r.delete(h)},process:h=>{if(a=h,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(u),e&&Tn.value&&Tn.value.frameloop[e].push(l),l=0,n.clear(),i=!1,o&&(o=!1,c.process(h))}};return c}const Kr=40;function qs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=It.reduce((x,V)=>(x[V]=$r(o,e?V:void 0),x),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:m}=r,g=()=>{const x=Y.useManualTiming?i.timestamp:performance.now();n=!1,Y.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(x-i.timestamp,Kr),1)),i.timestamp=x,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},v=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:It.reduce((x,V)=>{const b=r[V];return x[V]=(P,C=!1,A=!1)=>(n||v(),b.schedule(P,C,A)),x},{}),cancel:x=>{for(let V=0;V<It.length;V++)r[It[V]].cancel(x)},state:i,steps:r}}const{schedule:M,cancel:Z,state:L,steps:ne}=qs(typeof requestAnimationFrame<"u"?requestAnimationFrame:$,!0);let _t;function Wr(){_t=void 0}const O={now:()=>(_t===void 0&&O.set(L.isProcessing||Y.useManualTiming?L.timestamp:performance.now()),_t),set:t=>{_t=t,queueMicrotask(Wr)}},Zs=t=>e=>typeof e=="string"&&e.startsWith(t),We=Zs("--"),zr=Zs("var(--"),ze=t=>zr(t)?Gr.test(t.split("/*")[0].trim()):!1,Gr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,gt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ct={...gt,transform:t=>X(0,1,t)},Nt={...gt,default:1},bt=t=>Math.round(t*1e5)/1e5,Ge=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Hr(t){return t==null}const Xr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,He=(t,e)=>n=>!!(typeof n=="string"&&Xr.test(n)&&n.startsWith(t)||e&&!Hr(n)&&Object.prototype.hasOwnProperty.call(n,e)),Js=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Ge);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},Yr=t=>X(0,255,t),se={...gt,transform:t=>Math.round(Yr(t))},nt={test:He("rgb","red"),parse:Js("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+se.transform(t)+", "+se.transform(e)+", "+se.transform(n)+", "+bt(Ct.transform(s))+")"};function qr(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:He("#"),parse:qr,transform:nt.transform},Bt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),q=Bt("deg"),G=Bt("%"),S=Bt("px"),Zr=Bt("vh"),Jr=Bt("vw"),bn={...G,parse:t=>G.parse(t)/100,transform:t=>G.transform(t*100)},ct={test:He("hsl","hue"),parse:Js("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+G.transform(bt(e))+", "+G.transform(bt(n))+", "+bt(Ct.transform(s))+")"},j={test:t=>nt.test(t)||me.test(t)||ct.test(t),parse:t=>nt.test(t)?nt.parse(t):ct.test(t)?ct.parse(t):me.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?nt.transform(t):ct.transform(t),getAnimatableNone:t=>{const e=j.parse(t);return e.alpha=0,j.transform(e)}},Qr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function to(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Ge))==null?void 0:e.length)||0)+(((n=t.match(Qr))==null?void 0:n.length)||0)>0}const Qs="number",ti="color",eo="var",no="var(",Sn="${}",so=/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 Dt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(so,l=>(j.test(l)?(s.color.push(o),i.push(ti),n.push(j.parse(l))):l.startsWith(no)?(s.var.push(o),i.push(eo),n.push(l)):(s.number.push(o),i.push(Qs),n.push(parseFloat(l))),++o,Sn)).split(Sn);return{values:n,split:a,indexes:s,types:i}}function ei(t){return Dt(t).values}function ni(t){const{split:e,types:n}=Dt(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Qs?o+=bt(i[r]):a===ti?o+=j.transform(i[r]):o+=i[r]}return o}}const io=t=>typeof t=="number"?0:j.test(t)?j.getAnimatableNone(t):t;function ro(t){const e=ei(t);return ni(t)(e.map(io))}const J={test:to,parse:ei,createTransformer:ni,getAnimatableNone:ro};function ie(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 oo({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ie(l,a,t+1/3),o=ie(l,a,t),r=ie(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function zt(t,e){return n=>n>0?e:t}const D=(t,e,n)=>t+(e-t)*n,re=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ao=[me,nt,ct],lo=t=>ao.find(e=>e.test(t));function wn(t){const e=lo(t);if(!e)return!1;let n=e.parse(t);return e===ct&&(n=oo(n)),n}const Pn=(t,e)=>{const n=wn(t),s=wn(e);if(!n||!s)return zt(t,e);const i={...n};return o=>(i.red=re(n.red,s.red,o),i.green=re(n.green,s.green,o),i.blue=re(n.blue,s.blue,o),i.alpha=D(n.alpha,s.alpha,o),nt.transform(i))},pe=new Set(["none","hidden"]);function co(t,e){return pe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function uo(t,e){return n=>D(t,e,n)}function Xe(t){return typeof t=="number"?uo:typeof t=="string"?ze(t)?zt:j.test(t)?Pn:mo:Array.isArray(t)?si:typeof t=="object"?j.test(t)?Pn:ho:zt}function si(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Xe(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function ho(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Xe(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function fo(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const mo=(t,e)=>{const n=J.createTransformer(e),s=Dt(t),i=Dt(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?pe.has(t)&&!i.values.length||pe.has(e)&&!s.values.length?co(t,e):kt(si(fo(s,i),i.values),n):zt(t,e)};function ii(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?D(t,e,n):Xe(t)(t,e)}const po=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>Z(e),now:()=>L.isProcessing?L.timestamp:O.now()}},ri=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Gt=2e4;function Ye(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Gt;)e+=n,s=t.next(e);return e>=Gt?1/0:e}function go(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(Ye(s),Gt);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:z(i)}}const yo=5;function oi(t,e,n){const s=Math.max(e-yo,0);return Os(n-t(s),e-s)}const R={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},An=.001;function xo({duration:t=R.duration,bounce:e=R.bounce,velocity:n=R.velocity,mass:s=R.mass}){let i,o,r=1-e;r=X(R.minDamping,R.maxDamping,r),t=X(R.minDuration,R.maxDuration,z(t)),r<1?(i=u=>{const c=u*r,h=c*t,f=c-n,d=ge(u,r),m=Math.exp(-h);return An-f/d*m},o=u=>{const h=u*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(u,2)*t,m=Math.exp(-h),g=ge(Math.pow(u,2),r);return(-i(u)+An>0?-1:1)*((f-d)*m)/g}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-.001+c*h},o=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=To(i,o,a);if(t=W(t),isNaN(l))return{stiffness:R.stiffness,damping:R.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:r*2*Math.sqrt(s*u),duration:t}}}const vo=12;function To(t,e,n){let s=n;for(let i=1;i<vo;i++)s=s-t(s)/e(s);return s}function ge(t,e){return t*Math.sqrt(1-e*e)}const bo=["duration","bounce"],So=["stiffness","damping","mass"];function Vn(t,e){return e.some(n=>t[n]!==void 0)}function wo(t){let e={velocity:R.velocity,stiffness:R.stiffness,damping:R.damping,mass:R.mass,isResolvedFromDuration:!1,...t};if(!Vn(t,So)&&Vn(t,bo))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*X(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:R.mass,stiffness:i,damping:o}}else{const n=xo(t);e={...e,...n,mass:R.mass},e.isResolvedFromDuration=!0}return e}function Ht(t=R.visualDuration,e=R.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=wo({...n,velocity:-z(n.velocity||0)}),m=f||0,g=u/(2*Math.sqrt(l*c)),v=r-o,p=z(Math.sqrt(l/c)),w=Math.abs(v)<5;s||(s=w?R.restSpeed.granular:R.restSpeed.default),i||(i=w?R.restDelta.granular:R.restDelta.default);let x;if(g<1){const b=ge(p,g);x=P=>{const C=Math.exp(-g*p*P);return r-C*((m+g*p*v)/b*Math.sin(b*P)+v*Math.cos(b*P))}}else if(g===1)x=b=>r-Math.exp(-p*b)*(v+(m+p*v)*b);else{const b=p*Math.sqrt(g*g-1);x=P=>{const C=Math.exp(-g*p*P),A=Math.min(b*P,300);return r-C*((m+g*p*v)*Math.sinh(A)+b*v*Math.cosh(A))/b}}const V={calculatedDuration:d&&h||null,next:b=>{const P=x(b);if(d)a.done=b>=h;else{let C=b===0?m:0;g<1&&(C=b===0?W(m):oi(x,b,P));const A=Math.abs(C)<=s,k=Math.abs(r-P)<=i;a.done=A&&k}return a.value=a.done?r:P,a},toString:()=>{const b=Math.min(Ye(V),Gt),P=ri(C=>V.next(b*C).value,b,30);return b+"ms "+P},toTransition:()=>{}};return V}Ht.applyToOptions=t=>{const e=go(t,100,Ht);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};function ye({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,m=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let g=n*e;const v=h+g,p=r===void 0?v:r(v);p!==v&&(g=p-h);const w=A=>-g*Math.exp(-A/s),x=A=>p+w(A),V=A=>{const k=w(A),N=x(A);f.done=Math.abs(k)<=u,f.value=f.done?p:N};let b,P;const C=A=>{d(f.value)&&(b=A,P=Ht({keyframes:[f.value,m(f.value)],velocity:oi(x,A,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return C(0),{calculatedDuration:null,next:A=>{let k=!1;return!P&&b===void 0&&(k=!0,V(A),C(A)),b!==void 0&&A>=b?P.next(A-b):(!k&&V(A),f)}}}function Po(t,e,n){const s=[],i=n||Y.mix||ii,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||$:e;a=kt(l,a)}s.push(a)}return s}function Ao(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Oe(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Po(e,s,i),l=a.length,u=c=>{if(r&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=Vt(t[h],t[h+1],c);return a[h](f)};return n?c=>u(X(t[0],t[o-1],c)):u}function Vo(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Vt(0,e,s);t.push(D(n,1,i))}}function Co(t){const e=[0];return Vo(e,t.length-1),e}function Do(t,e){return t.map(n=>n*e)}function Mo(t,e){return t.map(()=>e||Xs).splice(0,t.length-1)}function St({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Or(s)?s.map(vn):vn(s),o={done:!1,value:e[0]},r=Do(n&&n.length===e.length?n:Co(e),t),a=Ao(r,e,{ease:Array.isArray(i)?i:Mo(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Ro=t=>t!==null;function qe(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Ro),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Eo={decay:ye,inertia:ye,tween:St,keyframes:St,spring:Ht};function ai(t){typeof t.type=="string"&&(t.type=Eo[t.type])}class Ze{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const jo=t=>t/100;class Je extends Ze{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==O.now()&&this.tick(O.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;ai(e);const{type:n=St,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||St;l!==St&&typeof a[0]!="number"&&(this.mixKeyframes=kt(jo,ii(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Ye(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?p<0:p>i;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,V=s;if(h){const A=Math.min(this.currentTime,i)/a;let k=Math.floor(A),N=A%1;!N&&A>=1&&(N=1),N===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(f==="reverse"?(N=1-N,d&&(N-=d/a)):f==="mirror"&&(V=r)),x=X(0,1,N)*a}const b=w?{done:!1,value:c[0]}:V.next(x);o&&(b.value=o(b.value));let{done:P}=b;!w&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return C&&m!==ye&&(b.value=qe(c,this.options,v,this.speed)),g&&g(b.value),C&&this.finish(),b}then(e,n){return this.finished.then(e,n)}get duration(){return z(this.calculatedDuration)}get time(){return z(this.currentTime)}set time(e){var n;e=W(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(O.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=z(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=po,startTime:n}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),(o=(i=this.options).onPlay)==null||o.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(O.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function ko(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const st=t=>t*180/Math.PI,xe=t=>{const e=st(Math.atan2(t[1],t[0]));return ve(e)},Lo={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:xe,rotateZ:xe,skewX:t=>st(Math.atan(t[1])),skewY:t=>st(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ve=t=>(t=t%360,t<0&&(t+=360),t),Cn=xe,Dn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Mn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Bo={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Dn,scaleY:Mn,scale:t=>(Dn(t)+Mn(t))/2,rotateX:t=>ve(st(Math.atan2(t[6],t[5]))),rotateY:t=>ve(st(Math.atan2(-t[2],t[0]))),rotateZ:Cn,rotate:Cn,skewX:t=>st(Math.atan(t[4])),skewY:t=>st(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Te(t){return t.includes("scale")?1:0}function be(t,e){if(!t||t==="none")return Te(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Bo,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Lo,i=a}if(!i)return Te(e);const o=s[e],r=i[1].split(",").map(Io);return typeof o=="function"?o(r):r[o]}const Fo=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return be(n,e)};function Io(t){return parseFloat(t.trim())}const yt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],xt=new Set(yt),Rn=t=>t===gt||t===S,No=new Set(["x","y","z"]),Oo=yt.filter(t=>!No.has(t));function Uo(t){const e=[];return Oo.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const it={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:(t,{transform:e})=>be(e,"x"),y:(t,{transform:e})=>be(e,"y")};it.translateX=it.x;it.translateY=it.y;const rt=new Set;let Se=!1,we=!1,Pe=!1;function li(){if(we){const t=Array.from(rt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Uo(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))==null||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}we=!1,Se=!1,rt.forEach(t=>t.complete(Pe)),rt.clear()}function ci(){rt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(we=!0)})}function _o(){Pe=!0,ci(),li(),Pe=!1}class Qe{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(rt.add(this),Se||(Se=!0,M.read(ci),M.resolveKeyframes(li))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0:i.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}ko(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),rt.delete(this)}cancel(){this.state==="scheduled"&&(rt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const $o=t=>t.startsWith("--");function Ko(t,e,n){$o(e)?t.style.setProperty(e,n):t.style[e]=n}const Wo=Ue(()=>window.ScrollTimeline!==void 0),zo={};function Go(t,e){const n=Ue(t);return()=>zo[e]??n()}const ui=Go(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Tt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,En={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Tt([0,.65,.55,1]),circOut:Tt([.55,0,1,.45]),backIn:Tt([.31,.01,.66,-.59]),backOut:Tt([.33,1.53,.69,.99])};function hi(t,e){if(t)return typeof t=="function"?ui()?ri(t,e):"ease-out":Ys(t)?Tt(t):Array.isArray(t)?t.map(n=>hi(n,e)||En.easeOut):En[t]}function Ho(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=hi(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function fi(t){return typeof t=="function"&&"applyToOptions"in t}function Xo({type:t,...e}){return fi(t)&&ui()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Yo extends Ze{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,Oe(typeof e.type!="string");const u=Xo(e);this.animation=Ho(n,s,i,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=qe(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Ko(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return z(Number(e))}get time(){return z(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=W(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Wo()?(this.animation.timeline=e,$):n(this)}}const di={anticipate:zs,backInOut:Ws,circInOut:Hs};function qo(t){return t in di}function Zo(t){typeof t.ease=="string"&&qo(t.ease)&&(t.ease=di[t.ease])}const jn=10;class Jo extends Yo{constructor(e){Zo(e),ai(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Je({...r,autoplay:!1}),l=W(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-jn).value,a.sample(l).value,jn),a.stop()}}const kn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(J.test(t)||t==="0")&&!t.startsWith("url("));function Qo(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 ta(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=kn(i,e),a=kn(o,e);return!r||!a?!1:Qo(t)||(n==="spring"||fi(n))&&s}function tn(t){return Is(t)&&"offsetHeight"in t}const ea=new Set(["opacity","clipPath","filter","transform"]),na=Ue(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function sa(t){var u;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!tn((u=e==null?void 0:e.owner)==null?void 0:u.current))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return na()&&n&&ea.has(n)&&(n!=="transform"||!l)&&!a&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const ia=40;class ra extends Ze{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){var m;super(),this.stop=()=>{var g,v;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=O.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...h},d=(c==null?void 0:c.KeyframeResolver)||Qe;this.keyframeResolver=new d(a,(g,v,p)=>this.onKeyframesResolved(g,v,f,!p),l,u,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=O.now(),ta(e,o,r,a)||((Y.instantAnimations||!l)&&(c==null||c(qe(e,s,n))),e[0]=e[e.length-1],s.duration=0,s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ia?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!u&&sa(f)?new Jo({...f,element:f.motionValue.owner.current}):new Je(f);d.finished.then(()=>this.notifyFinished()).catch($),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),_o()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const oa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function aa(t){const e=oa.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function mi(t,e,n=1){const[s,i]=aa(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Fs(r)?parseFloat(r):r}return ze(i)?mi(i,e,n+1):i}function en(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const pi=new Set(["width","height","top","left","right","bottom",...yt]),la={test:t=>t==="auto",parse:t=>t},gi=t=>e=>e.test(t),yi=[gt,S,G,q,Jr,Zr,la],Ln=t=>yi.find(gi(t));function ca(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ns(t):!0}const ua=new Set(["brightness","contrast","saturate","opacity"]);function ha(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Ge)||[];if(!s)return t;const i=n.replace(s,"");let o=ua.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const fa=/\b([a-z-]*)\(.*?\)/gu,Ae={...J,getAnimatableNone:t=>{const e=t.match(fa);return e?e.map(ha).join(" "):t}},Bn={...gt,transform:Math.round},da={rotate:q,rotateX:q,rotateY:q,rotateZ:q,scale:Nt,scaleX:Nt,scaleY:Nt,scaleZ:Nt,skew:q,skewX:q,skewY:q,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:Ct,originX:bn,originY:bn,originZ:S},nn={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,backgroundPositionX:S,backgroundPositionY:S,...da,zIndex:Bn,fillOpacity:Ct,strokeOpacity:Ct,numOctaves:Bn},ma={...nn,color:j,backgroundColor:j,outlineColor:j,fill:j,stroke:j,borderColor:j,borderTopColor:j,borderRightColor:j,borderBottomColor:j,borderLeftColor:j,filter:Ae,WebkitFilter:Ae},xi=t=>ma[t];function vi(t,e){let n=xi(t);return n!==Ae&&(n=J),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const pa=new Set(["auto","none","0"]);function ga(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!pa.has(o)&&Dt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=vi(n,i)}class ya extends Qe{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),ze(u))){const c=mi(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!pi.has(s)||e.length!==2)return;const[i,o]=e,r=Ln(i),a=Ln(o);if(r!==a)if(Rn(r)&&Rn(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else it[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||ca(e[i]))&&s.push(i);s.length&&ga(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=it[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 a;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=it[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function xa(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=(n==null?void 0:n[t])??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Ti=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Fn=30,va=t=>!isNaN(parseFloat(t));class Ta{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{var r,a;const o=O.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty();i&&((a=this.events.renderRequest)==null||a.notify(this.current))},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=O.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=va(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 _e);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.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()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=O.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Fn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Fn);return Os(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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function mt(t,e){return new Ta(t,e)}const{schedule:sn}=qs(queueMicrotask,!1),K={x:!1,y:!1};function bi(){return K.x||K.y}function ba(t){return t==="x"||t==="y"?K[t]?null:(K[t]=!0,()=>{K[t]=!1}):K.x||K.y?null:(K.x=K.y=!0,()=>{K.x=K.y=!1})}function Si(t,e){const n=xa(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function In(t){return!(t.pointerType==="touch"||bi())}function Sa(t,e,n={}){const[s,i,o]=Si(t,n),r=a=>{if(!In(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const c=h=>{In(h)&&(u(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const wi=(t,e)=>e?t===e?!0:wi(t,e.parentElement):!1,rn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,wa=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pa(t){return wa.has(t.tagName)||t.tabIndex!==-1}const $t=new WeakSet;function Nn(t){return e=>{e.key==="Enter"&&t(e)}}function oe(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Aa=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Nn(()=>{if($t.has(n))return;oe(n,"down");const i=Nn(()=>{oe(n,"up")}),o=()=>oe(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function On(t){return rn(t)&&!bi()}function Va(t,e,n={}){const[s,i,o]=Si(t,n),r=a=>{const l=a.currentTarget;if(!On(a))return;$t.add(l);const u=e(l,a),c=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),$t.has(l)&&$t.delete(l),On(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||wi(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),tn(a)&&(a.addEventListener("focus",u=>Aa(u,i)),!Pa(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Pi(t){return Is(t)&&"ownerSVGElement"in t}function Ca(t){return Pi(t)&&t.tagName==="svg"}const B=t=>!!(t&&t.getVelocity),Da=[...yi,j,J],Ma=t=>Da.find(gi(t)),on=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Ra extends T.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=tn(s)&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Ea({children:t,isPresent:e,anchorX:n}){const s=T.useId(),i=T.useRef(null),o=T.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:r}=T.useContext(on);return T.useInsertionEffect(()=>{const{width:a,height:l,top:u,left:c,right:h}=o.current;if(e||!i.current||!a||!l)return;const f=n==="left"?`left: ${c}`:`right: ${h}`;i.current.dataset.motionPopId=s;const d=document.createElement("style");return r&&(d.nonce=r),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`
          [data-motion-pop-id="${s}"] {
            position: absolute !important;
            width: ${a}px !important;
            height: ${l}px !important;
            ${f}px !important;
            top: ${u}px !important;
          }
        `),()=>{document.head.contains(d)&&document.head.removeChild(d)}},[e]),y.jsx(Ra,{isPresent:e,childRef:i,sizeRef:o,children:T.cloneElement(t,{ref:i})})}const ja=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a})=>{const l=Be(ka),u=T.useId();let c=!0,h=T.useMemo(()=>(c=!1,{id:u,initial:e,isPresent:n,custom:i,onExitComplete:f=>{l.set(f,!0);for(const d of l.values())if(!d)return;s&&s()},register:f=>(l.set(f,!1),()=>l.delete(f))}),[n,l,s]);return o&&c&&(h={...h}),T.useMemo(()=>{l.forEach((f,d)=>l.set(d,!1))},[n]),T.useEffect(()=>{!n&&!l.size&&s&&s()},[n]),r==="popLayout"&&(t=y.jsx(Ea,{isPresent:n,anchorX:a,children:t})),y.jsx(qt.Provider,{value:h,children:t})};function ka(){return new Map}function Ai(t=!0){const e=T.useContext(qt);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=T.useId();T.useEffect(()=>{if(t)return i(o)},[t]);const r=T.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Ot=t=>t.key||"";function Un(t){const e=[];return T.Children.forEach(t,n=>{T.isValidElement(n)&&e.push(n)}),e}const La=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left"})=>{const[l,u]=Ai(r),c=T.useMemo(()=>Un(t),[t]),h=r&&!l?[]:c.map(Ot),f=T.useRef(!0),d=T.useRef(c),m=Be(()=>new Map),[g,v]=T.useState(c),[p,w]=T.useState(c);Bs(()=>{f.current=!1,d.current=c;for(let b=0;b<p.length;b++){const P=Ot(p[b]);h.includes(P)?m.delete(P):m.get(P)!==!0&&m.set(P,!1)}},[p,h.length,h.join("-")]);const x=[];if(c!==g){let b=[...c];for(let P=0;P<p.length;P++){const C=p[P],A=Ot(C);h.includes(A)||(b.splice(P,0,C),x.push(C))}return o==="wait"&&x.length&&(b=x),w(Un(b)),v(c),null}const{forceRender:V}=T.useContext(Le);return y.jsx(y.Fragment,{children:p.map(b=>{const P=Ot(b),C=r&&!l?!1:c===p||h.includes(P),A=()=>{if(m.has(P))m.set(P,!0);else return;let k=!0;m.forEach(N=>{N||(k=!1)}),k&&(V==null||V(),w(d.current),r&&(u==null||u()),s&&s())};return y.jsx(ja,{isPresent:C,initial:!f.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,onExitComplete:C?void 0:A,anchorX:a,children:b},P)})})},Vi=T.createContext({strict:!1}),_n={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"]},pt={};for(const t in _n)pt[t]={isEnabled:e=>_n[t].some(n=>!!e[n])};function Ba(t){for(const e in t)pt[e]={...pt[e],...t[e]}}const Fa=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 Xt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Fa.has(t)}let Ci=t=>!Xt(t);function Ia(t){typeof t=="function"&&(Ci=e=>e.startsWith("on")?!Xt(e):t(e))}try{Ia(require("@emotion/is-prop-valid").default)}catch{}function Na(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ci(i)||n===!0&&Xt(i)||!e&&!Xt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Oa(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))})}const Zt=T.createContext({});function Jt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Mt(t){return typeof t=="string"||Array.isArray(t)}const an=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ln=["initial",...an];function Qt(t){return Jt(t.animate)||ln.some(e=>Mt(t[e]))}function Di(t){return!!(Qt(t)||t.variants)}function Ua(t,e){if(Qt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Mt(n)?n:void 0,animate:Mt(s)?s:void 0}}return t.inherit!==!1?e:{}}function _a(t){const{initial:e,animate:n}=Ua(t,T.useContext(Zt));return T.useMemo(()=>({initial:e,animate:n}),[$n(e),$n(n)])}function $n(t){return Array.isArray(t)?t.join(" "):t}const $a=Symbol.for("motionComponentSymbol");function ut(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ka(t,e,n){return T.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):ut(n)&&(n.current=s))},[e])}const cn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Wa="framerAppearId",Mi="data-"+cn(Wa),Ri=T.createContext({});function za(t,e,n,s,i){var g,v;const{visualElement:o}=T.useContext(Zt),r=T.useContext(Vi),a=T.useContext(qt),l=T.useContext(on).reducedMotion,u=T.useRef(null);s=s||r.renderer,!u.current&&s&&(u.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,h=T.useContext(Ri);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&Ga(u.current,n,i,h);const f=T.useRef(!1);T.useInsertionEffect(()=>{c&&f.current&&c.update(n,a)});const d=n[Mi],m=T.useRef(!!d&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,d))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,d)));return Bs(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),sn.render(c.render),m.current&&c.animationState&&c.animationState.animateChanges())}),T.useEffect(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var p;(p=window.MotionHandoffMarkAsComplete)==null||p.call(window,d)}),m.current=!1))}),c}function Ga(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ei(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&ut(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function Ei(t){if(t)return t.options.allowProjection!==!1?t.projection:Ei(t.parent)}function Ha({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Ba(t);function o(a,l){let u;const c={...T.useContext(on),...a,layoutId:Xa(a)},{isStatic:h}=c,f=_a(a),d=s(a,h);if(!h&&Fe){Ya();const m=qa(c);u=m.MeasureLayout,f.visualElement=za(i,d,c,e,m.ProjectionNode)}return y.jsxs(Zt.Provider,{value:f,children:[u&&f.visualElement?y.jsx(u,{visualElement:f.visualElement,...c}):null,n(i,a,Ka(d,f.visualElement,l),d,h,f.visualElement)]})}o.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const r=T.forwardRef(o);return r[$a]=i,r}function Xa({layoutId:t}){const e=T.useContext(Le).id;return e&&t!==void 0?e+"-"+t:t}function Ya(t,e){T.useContext(Vi).strict}function qa(t){const{drag:e,layout:n}=pt;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 Rt={};function Za(t){for(const e in t)Rt[e]=t[e],We(e)&&(Rt[e].isCSSVariable=!0)}function ji(t,{layout:e,layoutId:n}){return xt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Rt[t]||t==="opacity")}const Ja={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qa=yt.length;function tl(t,e,n){let s="",i=!0;for(let o=0;o<Qa;o++){const r=yt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=Ti(a,nn[r]);if(!l){i=!1;const c=Ja[r]||r;s+=`${c}(${u}) `}n&&(e[r]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function un(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const u=e[l];if(xt.has(l)){r=!0;continue}else if(We(l)){i[l]=u;continue}else{const c=Ti(u,nn[l]);l.startsWith("origin")?(a=!0,o[l]=c):s[l]=c}}if(e.transform||(r||n?s.transform=tl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${u} ${c}`}}const hn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ki(t,e,n){for(const s in e)!B(e[s])&&!ji(s,n)&&(t[s]=e[s])}function el({transformTemplate:t},e){return T.useMemo(()=>{const n=hn();return un(n,e,t),Object.assign({},n.vars,n.style)},[e])}function nl(t,e){const n=t.style||{},s={};return ki(s,n,t),Object.assign(s,el(t,e)),s}function sl(t,e){const n={},s=nl(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 il={offset:"stroke-dashoffset",array:"stroke-dasharray"},rl={offset:"strokeDashoffset",array:"strokeDasharray"};function ol(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?il:rl;t[o.offset]=S.transform(-s);const r=S.transform(e),a=S.transform(n);t[o.array]=`${r} ${a}`}function Li(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(un(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&ol(h,i,o,r,!1)}const Bi=()=>({...hn(),attrs:{}}),Fi=t=>typeof t=="string"&&t.toLowerCase()==="svg";function al(t,e,n,s){const i=T.useMemo(()=>{const o=Bi();return Li(o,e,Fi(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ki(o,t.style,t),i.style={...o,...i.style}}return i}const ll=["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 fn(t){return typeof t!="string"||t.includes("-")?!1:!!(ll.indexOf(t)>-1||/[A-Z]/u.test(t))}function cl(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=(fn(n)?al:sl)(s,o,r,n),u=Na(s,typeof n=="string",t),c=n!==T.Fragment?{...u,...l,ref:i}:{},{children:h}=s,f=T.useMemo(()=>B(h)?h.get():h,[h]);return T.createElement(n,{...c,children:f})}}function Kn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function dn(t,e,n,s){if(typeof e=="function"){const[i,o]=Kn(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Kn(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Kt(t){return B(t)?t.get():t}function ul({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:hl(n,s,i,t),renderState:e()}}const Ii=t=>(e,n)=>{const s=T.useContext(Zt),i=T.useContext(qt),o=()=>ul(t,e,s,i);return n?o():Be(o)};function hl(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Kt(o[f]);let{initial:r,animate:a}=t;const l=Qt(t),u=Di(t);e&&u&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const h=c?a:r;if(h&&typeof h!="boolean"&&!Jt(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=dn(t,f[d]);if(m){const{transitionEnd:g,transition:v,...p}=m;for(const w in p){let x=p[w];if(Array.isArray(x)){const V=c?x.length-1:0;x=x[V]}x!==null&&(i[w]=x)}for(const w in g)i[w]=g[w]}}}return i}function mn(t,e,n){var o;const{style:s}=t,i={};for(const r in s)(B(s[r])||e.style&&B(e.style[r])||ji(r,t)||((o=n==null?void 0:n.getValue(r))==null?void 0:o.liveStyle)!==void 0)&&(i[r]=s[r]);return i}const fl={useVisualState:Ii({scrapeMotionValuesFromProps:mn,createRenderState:hn})};function Ni(t,e,n){const s=mn(t,e,n);for(const i in t)if(B(t[i])||B(e[i])){const o=yt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const dl={useVisualState:Ii({scrapeMotionValuesFromProps:Ni,createRenderState:Bi})};function ml(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const r={...fn(s)?dl:fl,preloadedFeatures:t,useRender:cl(i),createVisualElement:e,Component:s};return Ha(r)}}function Et(t,e,n){const s=t.getProps();return dn(s,e,n!==void 0?n:s.custom,t)}const Ve=t=>Array.isArray(t);function pl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,mt(n))}function gl(t){return Ve(t)?t[t.length-1]||0:t}function yl(t,e){const n=Et(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=gl(o[r]);pl(t,r,a)}}function xl(t){return!!(B(t)&&t.add)}function Ce(t,e){const n=t.getValue("willChange");if(xl(n))return n.add(e);if(!n&&Y.WillChange){const s=new Y.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Oi(t){return t.props[Mi]}const vl=t=>t!==null;function Tl(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(vl),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const bl={type:"spring",stiffness:500,damping:25,restSpeed:10},Sl=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),wl={type:"keyframes",duration:.8},Pl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Al=(t,{keyframes:e})=>e.length>2?wl:xt.has(t)?t.startsWith("scale")?Sl(e[1]):bl:Pl;function Vl({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const pn=(t,e,n,s={},i,o)=>r=>{const a=en(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-W(l);const 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:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Vl(a)||Object.assign(c,Al(t,c)),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(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)),(Y.instantAnimations||Y.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=Tl(c.keyframes,a);if(f!==void 0){M.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Je(c):new ra(c)};function Cl({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Ui(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),f=a[c];if(f===void 0||u&&Cl(u,c))continue;const d={delay:n,...en(o||{},c)},m=h.get();if(m!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===m&&!d.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const p=Oi(t);if(p){const w=window.MotionHandoffAnimation(p,c,M);w!==null&&(d.startTime=w,g=!0)}}Ce(t,c),h.start(pn(c,h,f,t.shouldReduceMotion&&pi.has(c)?{type:!1}:d,t,g));const v=h.animation;v&&l.push(v)}return r&&Promise.all(l).then(()=>{M.update(()=>{r&&yl(t,r)})}),l}function De(t,e,n={}){var l;const s=Et(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Ui(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=i;return Dl(t,e,c+u,h,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[o,r]:[r,o];return u().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function Dl(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(Ml).forEach((u,c)=>{u.notify("AnimationStart",e),r.push(De(u,e,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(r)}function Ml(t,e){return t.sortNodePosition(e)}function Rl(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>De(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=De(t,e,n);else{const i=typeof e=="function"?Et(t,e,n.custom):e;s=Promise.all(Ui(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function _i(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const El=ln.length;function $i(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?$i(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<El;n++){const s=ln[n],i=t.props[s];(Mt(i)||i===!1)&&(e[s]=i)}return e}const jl=[...an].reverse(),kl=an.length;function Ll(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Rl(t,n,s)))}function Bl(t){let e=Ll(t),n=Wn(),s=!0;const i=l=>(u,c)=>{var f;const h=Et(t,c,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:d,transitionEnd:m,...g}=h;u={...u,...g,...m}}return u};function o(l){e=l(t)}function r(l){const{props:u}=t,c=$i(t.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let v=0;v<kl;v++){const p=jl[v],w=n[p],x=u[p]!==void 0?u[p]:c[p],V=Mt(x),b=p===l?w.isActive:null;b===!1&&(m=v);let P=x===c[p]&&x!==u[p]&&V;if(P&&s&&t.manuallyAnimateOnMount&&(P=!1),w.protectedKeys={...d},!w.isActive&&b===null||!x&&!w.prevProp||Jt(x)||typeof x=="boolean")continue;const C=Fl(w.prevProp,x);let A=C||p===l&&w.isActive&&!P&&V||v>m&&V,k=!1;const N=Array.isArray(x)?x:[x];let at=N.reduce(i(p),{});b===!1&&(at={});const{prevResolvedValues:gn={}}=w,hr={...gn,...at},yn=F=>{A=!0,f.has(F)&&(k=!0,f.delete(F)),w.needsAnimating[F]=!0;const H=t.getValue(F);H&&(H.liveStyle=!1)};for(const F in hr){const H=at[F],te=gn[F];if(d.hasOwnProperty(F))continue;let ee=!1;Ve(H)&&Ve(te)?ee=!_i(H,te):ee=H!==te,ee?H!=null?yn(F):f.add(F):H!==void 0&&f.has(F)?yn(F):w.protectedKeys[F]=!0}w.prevProp=x,w.prevResolvedValues=at,w.isActive&&(d={...d,...at}),s&&t.blockInitialAnimation&&(A=!1),A&&(!(P&&C)||k)&&h.push(...N.map(F=>({animation:F,options:{type:p}})))}if(f.size){const v={};if(typeof u.initial!="boolean"){const p=Et(t,Array.isArray(u.initial)?u.initial[0]:u.initial);p&&p.transition&&(v.transition=p.transition)}f.forEach(p=>{const w=t.getBaseTarget(p),x=t.getValue(p);x&&(x.liveStyle=!0),v[p]=w??null}),h.push({animation:v})}let g=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(h):Promise.resolve()}function a(l,u){var h;if(n[l].isActive===u)return Promise.resolve();(h=t.variantChildren)==null||h.forEach(f=>{var d;return(d=f.animationState)==null?void 0:d.setActive(l,u)}),n[l].isActive=u;const c=r(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Wn(),s=!0}}}function Fl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!_i(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 Il extends Q{constructor(e){super(e),e.animationState||(e.animationState=Bl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Jt(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.call(this)}}let Nl=0;class Ol extends Q{constructor(){super(...arguments),this.id=Nl++}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,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Ul={animation:{Feature:Il},exit:{Feature:Ol}};function jt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Ft(t){return{point:{x:t.pageX,y:t.pageY}}}const _l=t=>e=>rn(e)&&t(e,Ft(e));function wt(t,e,n,s){return jt(t,e,_l(n),s)}function Ki({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function $l({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Kl(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}}const Wi=1e-4,Wl=1-Wi,zl=1+Wi,zi=.01,Gl=0-zi,Hl=0+zi;function I(t){return t.max-t.min}function Xl(t,e,n){return Math.abs(t-e)<=n}function zn(t,e,n,s=.5){t.origin=s,t.originPoint=D(e.min,e.max,t.origin),t.scale=I(n)/I(e),t.translate=D(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Wl&&t.scale<=zl||isNaN(t.scale))&&(t.scale=1),(t.translate>=Gl&&t.translate<=Hl||isNaN(t.translate))&&(t.translate=0)}function Pt(t,e,n,s){zn(t.x,e.x,n.x,s?s.originX:void 0),zn(t.y,e.y,n.y,s?s.originY:void 0)}function Gn(t,e,n){t.min=n.min+e.min,t.max=t.min+I(e)}function Yl(t,e,n){Gn(t.x,e.x,n.x),Gn(t.y,e.y,n.y)}function Hn(t,e,n){t.min=e.min-n.min,t.max=t.min+I(e)}function At(t,e,n){Hn(t.x,e.x,n.x),Hn(t.y,e.y,n.y)}const Xn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ht=()=>({x:Xn(),y:Xn()}),Yn=()=>({min:0,max:0}),E=()=>({x:Yn(),y:Yn()});function _(t){return[t("x"),t("y")]}function ae(t){return t===void 0||t===1}function Me({scale:t,scaleX:e,scaleY:n}){return!ae(t)||!ae(e)||!ae(n)}function et(t){return Me(t)||Gi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Gi(t){return qn(t.x)||qn(t.y)}function qn(t){return t&&t!=="0%"}function Yt(t,e,n){const s=t-n,i=e*s;return n+i}function Zn(t,e,n,s,i){return i!==void 0&&(t=Yt(t,i,s)),Yt(t,n,s)+e}function Re(t,e=0,n=1,s,i){t.min=Zn(t.min,e,n,s,i),t.max=Zn(t.max,e,n,s,i)}function Hi(t,{x:e,y:n}){Re(t.x,e.translate,e.scale,e.originPoint),Re(t.y,n.translate,n.scale,n.originPoint)}const Jn=.999999999999,Qn=1.0000000000001;function ql(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&dt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Hi(t,r)),s&&et(o.latestValues)&&dt(t,o.latestValues))}e.x<Qn&&e.x>Jn&&(e.x=1),e.y<Qn&&e.y>Jn&&(e.y=1)}function ft(t,e){t.min=t.min+e,t.max=t.max+e}function ts(t,e,n,s,i=.5){const o=D(t.min,t.max,i);Re(t,e,n,o,s)}function dt(t,e){ts(t.x,e.x,e.scaleX,e.scale,e.originX),ts(t.y,e.y,e.scaleY,e.scale,e.originY)}function Xi(t,e){return Ki(Kl(t.getBoundingClientRect(),e))}function Zl(t,e,n){const s=Xi(t,n),{scroll:i}=e;return i&&(ft(s.x,i.offset.x),ft(s.y,i.offset.y)),s}const Yi=({current:t})=>t?t.ownerDocument.defaultView:null,es=(t,e)=>Math.abs(t-e);function Jl(t,e){const n=es(t.x,e.x),s=es(t.y,e.y);return Math.sqrt(n**2+s**2)}class qi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!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=ce(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Jl(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:m}=h,{timestamp:g}=L;this.history.push({...m,timestamp:g});const{onStart:v,onMove:p}=this.handlers;f||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=le(f,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:m,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=ce(h.type==="pointercancel"?this.lastMoveEventInfo:le(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,v),m&&m(h,v)},!rn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=Ft(e),a=le(r,this.transformPagePoint),{point:l}=a,{timestamp:u}=L;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,ce(a,this.history)),this.removeListeners=kt(wt(this.contextWindow,"pointermove",this.handlePointerMove),wt(this.contextWindow,"pointerup",this.handlePointerUp),wt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Z(this.updatePoint)}}function le(t,e){return e?{point:e(t.point)}:t}function ns(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ce({point:t},e){return{point:t,delta:ns(t,Zi(e)),offset:ns(t,Ql(e)),velocity:tc(e,.1)}}function Ql(t){return t[0]}function Zi(t){return t[t.length-1]}function tc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Zi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};const o=z(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function ec(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?D(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?D(n,t,s.max):Math.min(t,n)),t}function ss(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 nc(t,{top:e,left:n,bottom:s,right:i}){return{x:ss(t.x,n,i),y:ss(t.y,e,s)}}function is(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 sc(t,e){return{x:is(t.x,e.x),y:is(t.y,e.y)}}function ic(t,e){let n=.5;const s=I(t),i=I(e);return i>s?n=Vt(e.min,e.max-s,t.min):s>i&&(n=Vt(t.min,t.max-i,e.min)),X(0,1,n)}function rc(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 Ee=.35;function oc(t=Ee){return t===!1?t=0:t===!0&&(t=Ee),{x:rs(t,"left","right"),y:rs(t,"top","bottom")}}function rs(t,e,n){return{min:os(t,e),max:os(t,n)}}function os(t,e){return typeof t=="number"?t:t[e]||0}const ac=new WeakMap;class lc{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=E(),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(Ft(c).point)},o=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:m}=this.getProps();if(f&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ba(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_(v=>{let p=this.getAxisMotionValue(v).get()||0;if(G.test(p)){const{projection:w}=this.visualElement;if(w&&w.layout){const x=w.layout.layoutBox[v];x&&(p=I(x)*(parseFloat(p)/100))}}this.originPoint[v]=p}),m&&M.postRender(()=>m(c,h)),Ce(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},r=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:m,onDrag:g}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=h;if(d&&this.currentDirection===null){this.currentDirection=cc(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),g&&g(c,h)},a=(c,h)=>this.stop(c,h),l=()=>_(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)==null?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new qi(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Yi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&M.postRender(()=>o(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.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Ut(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=ec(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&ut(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=nc(s.layoutBox,e):this.constraints=!1,this.elastic=oc(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&_(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=rc(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ut(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Zl(s,i.root,this.visualElement.getTransformPagePoint());let r=sc(i.layout.layoutBox,o);if(n){const a=n($l(r));this.hasMutatedConstraints=!!a,a&&(r=Ki(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=_(c=>{if(!Ut(c,n,this.currentDirection))return;let h=l&&l[c]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ce(this.visualElement,e),s.start(pn(e,s,0,n,this.visualElement,!1))}stopAnimation(){_(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){_(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?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){_(n=>{const{drag:s}=this.getProps();if(!Ut(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-D(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ut(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};_(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=ic({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),_(r=>{if(!Ut(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(D(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;ac.set(this.visualElement,this);const e=this.visualElement.current,n=wt(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();ut(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),M.read(s);const r=jt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(_(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Ee,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Ut(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function cc(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class uc extends Q{constructor(e){super(e),this.removeGroupControls=$,this.removeListeners=$,this.controls=new lc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$}unmount(){this.removeGroupControls(),this.removeListeners()}}const as=t=>(e,n)=>{t&&M.postRender(()=>t(e,n))};class hc extends Q{constructor(){super(...arguments),this.removePointerDownListener=$}onPointerDown(e){this.session=new qi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:as(e),onStart:as(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&M.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=wt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Wt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ls(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const vt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=ls(t,e.target.x),s=ls(t,e.target.y);return`${n}% ${s}%`}},fc={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=J.parse(t);if(i.length>5)return s;const o=J.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=D(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),o(i)}};class dc extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Za(mc),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Wt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||M.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),sn.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 Ji(t){const[e,n]=Ai(),s=T.useContext(Le);return y.jsx(dc,{...t,layoutGroup:s,switchLayoutGroup:T.useContext(Ri),isPresent:e,safeToRemove:n})}const mc={borderRadius:{...vt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vt,borderTopRightRadius:vt,borderBottomLeftRadius:vt,borderBottomRightRadius:vt,boxShadow:fc};function pc(t,e,n){const s=B(t)?t:mt(t);return s.start(pn("",s,e,n)),s.animation}const gc=(t,e)=>t.depth-e.depth;class yc{constructor(){this.children=[],this.isDirty=!1}add(e){Ie(this.children,e),this.isDirty=!0}remove(e){Ne(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(gc),this.isDirty=!1,this.children.forEach(e)}}function xc(t,e){const n=O.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Z(s),t(o-e))};return M.setup(s,!0),()=>Z(s)}const Qi=["TopLeft","TopRight","BottomLeft","BottomRight"],vc=Qi.length,cs=t=>typeof t=="string"?parseFloat(t):t,us=t=>typeof t=="number"||S.test(t);function Tc(t,e,n,s,i,o){i?(t.opacity=D(0,n.opacity??1,bc(s)),t.opacityExit=D(e.opacity??1,0,Sc(s))):o&&(t.opacity=D(e.opacity??1,n.opacity??1,s));for(let r=0;r<vc;r++){const a=`border${Qi[r]}Radius`;let l=hs(e,a),u=hs(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||us(l)===us(u)?(t[a]=Math.max(D(cs(l),cs(u),s),0),(G.test(u)||G.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=D(e.rotate||0,n.rotate||0,s))}function hs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const bc=tr(0,.5,Gs),Sc=tr(.5,.95,$);function tr(t,e,n){return s=>s<t?0:s>e?1:n(Vt(t,e,s))}function fs(t,e){t.min=e.min,t.max=e.max}function U(t,e){fs(t.x,e.x),fs(t.y,e.y)}function ds(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ms(t,e,n,s,i){return t-=e,t=Yt(t,1/n,s),i!==void 0&&(t=Yt(t,1/i,s)),t}function wc(t,e=0,n=1,s=.5,i,o=t,r=t){if(G.test(e)&&(e=parseFloat(e),e=D(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=D(o.min,o.max,s);t===o&&(a-=e),t.min=ms(t.min,e,n,a,i),t.max=ms(t.max,e,n,a,i)}function ps(t,e,[n,s,i],o,r){wc(t,e[n],e[s],e[i],e.scale,o,r)}const Pc=["x","scaleX","originX"],Ac=["y","scaleY","originY"];function gs(t,e,n,s){ps(t.x,e,Pc,n?n.x:void 0,s?s.x:void 0),ps(t.y,e,Ac,n?n.y:void 0,s?s.y:void 0)}function ys(t){return t.translate===0&&t.scale===1}function er(t){return ys(t.x)&&ys(t.y)}function xs(t,e){return t.min===e.min&&t.max===e.max}function Vc(t,e){return xs(t.x,e.x)&&xs(t.y,e.y)}function vs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function nr(t,e){return vs(t.x,e.x)&&vs(t.y,e.y)}function Ts(t){return I(t.x)/I(t.y)}function bs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Cc{constructor(){this.members=[]}add(e){Ie(this.members,e),e.scheduleRender()}remove(e){if(Ne(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 o=this.members[i];if(o.isPresent!==!1){s=o;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 Dc(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0:n.z)||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=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) `),m&&(s+=`skewY(${m}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 ue=["","X","Y","Z"],Mc={visibility:"hidden"},Rc=1e3;let Ec=0;function he(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function sr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Oi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&sr(s)}function ir({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Ec++,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,this.nodes.forEach(Lc),this.nodes.forEach(Oc),this.nodes.forEach(Uc),this.nodes.forEach(Bc)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new yc)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new _e),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Pi(r)&&!Ca(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c;const h=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=xc(h,250),Wt.hasAnimatedSinceResize&&(Wt.hasAnimatedSinceResize=!1,this.nodes.forEach(ws))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||zc,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),p=!this.targetLayout||!nr(this.targetLayout,d),w=!h&&f;if(this.options.layoutRoot||this.resumeFrom||w||h&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...en(m,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(c,w)}else h||ws(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Z(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_c),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sr(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(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ss);return}this.isUpdating||this.nodes.forEach(Ic),this.isUpdating=!1,this.nodes.forEach(Nc),this.nodes.forEach(jc),this.nodes.forEach(kc),this.clearAllSnapshots();const a=O.now();L.delta=X(0,1e3/60,a-L.timestamp),L.timestamp=a,L.isProcessing=!0,ne.update.process(L),ne.preRender.process(L),ne.render.process(L),L.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,sn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Fc),this.sharedNodes.forEach($c)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!I(this.snapshot.measuredBox.x)&&!I(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=E(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!er(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||et(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Gc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:r}=this.options;if(!r)return E();const a=r.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Hc))){const{scroll:c}=this.root;c&&(ft(a.x,c.offset.x),ft(a.y,c.offset.y))}return a}removeElementScroll(r){var l;const a=E();if(U(a,r),(l=this.scroll)!=null&&l.wasRoot)return a;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&&U(a,r),ft(a.x,h.offset.x),ft(a.y,h.offset.y))}return a}applyTransform(r,a=!1){const l=E();U(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&dt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),et(c.latestValues)&&dt(l,c.latestValues)}return et(this.latestValues)&&dt(l,this.latestValues),l}removeTransform(r){const a=E();U(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!et(u.latestValues))continue;Me(u.latestValues)&&u.updateSnapshot();const c=E(),h=u.measurePageBox();U(c,h),gs(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return et(this.latestValues)&&gs(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==L.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=L.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=E(),this.relativeTargetOrigin=E(),At(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=E(),this.targetWithTransforms=E()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Yl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):U(this.target,this.layout.layoutBox),Hi(this.target,this.targetDelta)):U(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=E(),this.relativeTargetOrigin=E(),At(this.relativeTargetOrigin,this.target,d.target),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Me(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 m;const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===L.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;U(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;ql(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=E());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ds(this.prevProjectionDelta.x,this.projectionDelta.x),ds(this.prevProjectionDelta.y,this.projectionDelta.y)),Pt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!bs(this.projectionDelta.x,this.prevProjectionDelta.x)||!bs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ht(),this.projectionDelta=ht(),this.projectionDeltaWithTransform=ht()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=ht();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=E(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=d!==m,v=this.getStack(),p=!v||v.members.length<=1,w=!!(g&&!p&&this.options.crossfade===!0&&!this.path.some(Wc));this.animationProgress=0;let x;this.mixTargetDelta=V=>{const b=V/1e3;Ps(h.x,r.x,b),Ps(h.y,r.y,b),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(At(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Kc(this.relativeTarget,this.relativeTargetOrigin,f,b),x&&Vc(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=E()),U(x,this.relativeTarget)),g&&(this.animationValues=c,Tc(c,u,this.latestValues,b,w,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Wt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=mt(0)),this.currentAnimation=pc(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),r.onUpdate&&r.onUpdate(c)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Rc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&rr(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||E();const h=I(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=I(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}U(a,l),dt(a,c),Pt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Cc),this.sharedNodes.get(r).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 r=this.getStack();return r?r.lead===this:!0}getLead(){var a;const{layoutId:r}=this.options;return r?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:r}=this.options;return r?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&he("z",r,u,this.animationValues);for(let c=0;c<ue.length;c++)he(`rotate${ue[c]}`,r,u,this.animationValues),he(`skew${ue[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}getProjectionStyles(r){if(!this.instance||this.isSVG)return;if(!this.isVisible)return Mc;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Kt(r==null?void 0:r.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const d={};return this.options.layoutId&&(d.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,d.pointerEvents=Kt(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!et(this.latestValues)&&(d.transform=l?l({},""):"none",this.hasProjected=!1),d}const c=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=Dc(this.projectionDeltaWithTransform,this.treeScale,c),l&&(a.transform=l(c,a.transform));const{x:h,y:f}=this.projectionDelta;a.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,u.animationValues?a.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:a.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const d in Rt){if(c[d]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:v}=Rt[d],p=a.transform==="none"?c[d]:m(c[d],u);if(g){const w=g.length;for(let x=0;x<w;x++)a[g[x]]=p}else v?this.options.visualElement.renderState.vars[d]=p:a[d]=p}return this.options.layoutId&&(a.pointerEvents=u===this?Kt(r==null?void 0:r.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ss),this.root.sharedNodes.clear()}}}function jc(t){t.updateLayout()}function kc(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=e.source!==t.layout.source;o==="size"?_(h=>{const f=r?e.measuredBox[h]:e.layoutBox[h],d=I(f);f.min=s[h].min,f.max=f.min+d}):rr(o,e.layoutBox,s)&&_(h=>{const f=r?e.measuredBox[h]:e.layoutBox[h],d=I(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=ht();Pt(a,s,e.layoutBox);const l=ht();r?Pt(l,t.applyTransform(i,!0),e.measuredBox):Pt(l,s,e.layoutBox);const u=!er(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 m=E();At(m,e.layoutBox,f.layoutBox);const g=E();At(g,s,d.layoutBox),nr(m,g)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Lc(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Bc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Fc(t){t.clearSnapshot()}function Ss(t){t.clearMeasurements()}function Ic(t){t.isLayoutDirty=!1}function Nc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ws(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Oc(t){t.resolveTargetDelta()}function Uc(t){t.calcProjection()}function _c(t){t.resetSkewAndRotation()}function $c(t){t.removeLeadSnapshot()}function Ps(t,e,n){t.translate=D(e.translate,0,n),t.scale=D(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function As(t,e,n,s){t.min=D(e.min,n.min,s),t.max=D(e.max,n.max,s)}function Kc(t,e,n,s){As(t.x,e.x,n.x,s),As(t.y,e.y,n.y,s)}function Wc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const zc={duration:.45,ease:[.4,0,.1,1]},Vs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Cs=Vs("applewebkit/")&&!Vs("chrome/")?Math.round:$;function Ds(t){t.min=Cs(t.min),t.max=Cs(t.max)}function Gc(t){Ds(t.x),Ds(t.y)}function rr(t,e,n){return t==="position"||t==="preserve-aspect"&&!Xl(Ts(e),Ts(n),.2)}function Hc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const Xc=ir({attachResizeListener:(t,e)=>jt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fe={current:void 0},or=ir({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!fe.current){const t=new Xc({});t.mount(window),t.setOptions({layoutScroll:!0}),fe.current=t}return fe.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Yc={pan:{Feature:hc},drag:{Feature:uc,ProjectionNode:or,MeasureLayout:Ji}};function Ms(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&M.postRender(()=>o(e,Ft(e)))}class qc extends Q{mount(){const{current:e}=this.node;e&&(this.unmount=Sa(e,(n,s)=>(Ms(this.node,s,"Start"),i=>Ms(this.node,i,"End"))))}unmount(){}}class Zc 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=kt(jt(this.node.current,"focus",()=>this.onFocus()),jt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Rs(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&M.postRender(()=>o(e,Ft(e)))}class Jc extends Q{mount(){const{current:e}=this.node;e&&(this.unmount=Va(e,(n,s)=>(Rs(this.node,s,"Start"),(i,{success:o})=>Rs(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const je=new WeakMap,de=new WeakMap,Qc=t=>{const e=je.get(t.target);e&&e(t)},tu=t=>{t.forEach(Qc)};function eu({root:t,...e}){const n=t||document;de.has(n)||de.set(n,{});const s=de.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(tu,{root:t,...e})),s[i]}function nu(t,e,n){const s=eu(e);return je.set(t,n),s.observe(t),()=>{je.delete(t),s.unobserve(t)}}const su={some:0,all:1};class iu 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:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:su[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!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 nu(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(ru(e,n))&&this.startObserver()}unmount(){}}function ru({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const ou={inView:{Feature:iu},tap:{Feature:Jc},focus:{Feature:Zc},hover:{Feature:qc}},au={layout:{ProjectionNode:or,MeasureLayout:Ji}},ke={current:null},ar={current:!1};function lu(){if(ar.current=!0,!!Fe)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ke.current=t.matches;t.addListener(e),e()}else ke.current=!1}const cu=new WeakMap;function uu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(B(i))t.addValue(s,i);else if(B(o))t.addValue(s,mt(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,mt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Es=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class hu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qe,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=O.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,M.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;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=!!o,this.isControllingVariants=Qt(n),this.isVariantNode=Di(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&&B(d)&&d.set(l[f],!1)}}mount(e){this.current=e,cu.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)),ar.current||lu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ke.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Z(this.notifyUpdate),Z(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);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=xt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o(),r&&r(),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 pt){const n=pt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):E()}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<Es.length;s++){const i=Es[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=uu(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=mt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Fs(s)||Ns(s))?s=parseFloat(s):!Ma(s)&&J.test(n)&&(s=vi(e,n)),this.setBaseTarget(e,B(s)?s.get():s)),B(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=dn(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!B(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new _e),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class lr extends hu{constructor(){super(...arguments),this.KeyframeResolver=ya}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]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;B(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function cr(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}function fu(t){return window.getComputedStyle(t)}class du extends lr{constructor(){super(...arguments),this.type="html",this.renderInstance=cr}readValueFromInstance(e,n){var s;if(xt.has(n))return(s=this.projection)!=null&&s.isProjecting?Te(n):Fo(e,n);{const i=fu(e),o=(We(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Xi(e,n)}build(e,n,s){un(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return mn(e,n,s)}}const ur=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 mu(t,e,n,s){cr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(ur.has(i)?i:cn(i),e.attrs[i])}class pu extends lr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=E}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(xt.has(n)){const s=xi(n);return s&&s.default||0}return n=ur.has(n)?n:cn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Ni(e,n,s)}build(e,n,s){Li(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){mu(e,n,s,i)}mount(e){this.isSVGTag=Fi(e.tagName),super.mount(e)}}const gu=(t,e)=>fn(t)?new pu(e):new du(e,{allowProjection:t!==T.Fragment}),yu=ml({...Ul,...ou,...Yc,...au},gu),js=Oa(yu),xu=({transaction:t,onClose:e})=>{console.log(t);const n=a=>{switch(a){case"success":return y.jsxs("span",{className:"inline-flex items-center rounded-full bg-green-100 px-3 py-1 text-sm font-medium text-green-800",children:[y.jsx(yr,{className:"mr-1 h-4 w-4"}),"Berhasil"]});case"pending":return y.jsxs("span",{className:"inline-flex items-center rounded-full bg-yellow-100 px-3 py-1 text-sm font-medium text-yellow-800",children:[y.jsx(gr,{className:"mr-1 h-4 w-4"}),"Menunggu"]});case"failed":return y.jsxs("span",{className:"inline-flex items-center rounded-full bg-red-100 px-3 py-1 text-sm font-medium text-red-800",children:[y.jsx(pr,{className:"mr-1 h-4 w-4"}),"Gagal"]});case"canceled":return y.jsxs("span",{className:"inline-flex items-center rounded-full bg-red-100 px-3 py-1 text-sm font-medium text-red-800",children:[y.jsx(Pr,{className:"mr-1 h-4 w-4"}),"Dibatalkan"]});default:return null}},s=a=>{switch(a){case"topup":case"deposit":return y.jsx(Tr,{className:"rounded-full bg-blue-100 p-2 text-blue-500",size:40});case"payment":case"purchase":return y.jsx(Rr,{className:"rounded-full bg-purple-100 p-2 text-purple-500",size:40});case"transfer":return y.jsx(Sr,{className:"rounded-full bg-orange-100 p-2 text-orange-500",size:40});case"withdraw":return y.jsx(mr,{className:"rounded-full bg-amber-100 p-2 text-amber-500",size:40});case"bank_transfer":case"credit_card":return y.jsx(xn,{className:"rounded-full bg-indigo-100 p-2 text-indigo-500",size:40});default:return y.jsx(dr,{className:"rounded-full bg-gray-100 p-2 text-gray-500",size:40})}},i=a=>parseFloat(a).toLocaleString("id-ID",{style:"currency",currency:"IDR",minimumFractionDigits:0}),o=a=>new Date(a).toLocaleDateString("id-ID",{weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}),r=t.va_number;return y.jsx(La,{children:y.jsx(js.div,{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/40 pt-12",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:y.jsxs(js.div,{className:"mx-auto w-full max-w-lg overflow-hidden rounded-3xl bg-white shadow-2xl",initial:{y:-50,scale:.9},animate:{y:0,scale:1},exit:{y:50,scale:.9,opacity:0},transition:{type:"spring",stiffness:300,damping:30},children:[y.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between bg-white px-6 py-4 shadow-sm",children:[y.jsx("button",{onClick:e,className:"rounded-full p-2 transition hover:bg-gray-100 active:scale-95",children:y.jsx(fr,{size:20})}),y.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Detail Transaksi"}),y.jsx("div",{className:"w-6"})]}),y.jsxs("div",{className:"max-h-[85vh] overflow-y-auto px-6 py-8",children:[y.jsxs("div",{className:"mb-8 flex flex-col items-center text-center",children:[y.jsx("div",{className:"mb-4 text-4xl",children:s(t.type||t.payment_type)}),y.jsxs("div",{className:`text-3xl font-bold ${parseFloat(t.amount)>0?"text-green-600":"text-red-600"}`,children:[parseFloat(t.amount)>0?"+":"",i(t.amount)]}),y.jsx("span",{className:"mt-3 inline-flex items-center rounded-full px-4 py-1 text-sm font-medium",children:n(t.status)})]}),y.jsxs("div",{className:"mb-6 rounded-2xl bg-gray-50 p-5",children:[y.jsx("h3",{className:"mb-4 text-base font-semibold text-gray-700",children:"Informasi Transaksi"}),y.jsxs("div",{className:"space-y-3",children:[y.jsx(lt,{icon:y.jsx(Vr,{size:16}),label:"Metode Pembayaran",value:typeof t.payment_type=="string"?t.payment_type.replace("_"," "):""}),r&&y.jsx(lt,{icon:y.jsx(xn,{size:16}),label:"Virtual Account",value:r,copyable:!0}),t.phone&&y.jsx(lt,{icon:y.jsx(jr,{size:16}),label:"Nomor Telepon",value:t.phone}),y.jsx(lt,{label:"Tanggal",value:o(t.created_at)}),y.jsx(lt,{label:"ID Transaksi",value:t.id,copyable:!0}),y.jsx(lt,{label:"Order ID",value:t.order_id,copyable:!0}),y.jsxs("div",{className:"mt-4 flex justify-between border-t border-gray-200 pt-3",children:[y.jsx("span",{className:"font-semibold",children:"Total Bayar"}),y.jsx("span",{className:"text-lg font-semibold",children:i(t.amount)})]})]})]}),t.status==="pending"&&t.expiry_time&&y.jsx(ks,{type:"warning",message:`Batas pembayaran sampai ${new Date(t.expiry_time).toLocaleString("id-ID",{day:"numeric",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"})}`}),t.status==="failed"&&t.failure_message&&y.jsx(ks,{type:"error",message:t.failure_message}),y.jsxs("div",{className:"mt-6 flex gap-4",children:[y.jsxs("button",{className:"flex flex-1 items-center justify-center rounded-lg border border-gray-200 px-4 py-3 text-sm font-medium transition hover:bg-gray-100",children:[y.jsx(Dr,{className:"mr-2",size:16}),"Bagikan"]}),y.jsxs("button",{className:"flex flex-1 items-center justify-center rounded-lg border border-gray-200 px-4 py-3 text-sm font-medium transition hover:bg-gray-100",children:[y.jsx(Ls,{className:"mr-2",size:16})," Salin ID"]})]})]})]})})})};function lt({icon:t,label:e,value:n,copyable:s}){return y.jsxs("div",{className:"flex justify-between",children:[y.jsxs("span",{className:"flex items-center text-gray-500",children:[t,y.jsx("span",{className:"ml-2 text-sm",children:e})]}),y.jsxs("div",{className:"flex items-center",children:[y.jsx("span",{className:"text-sm font-medium capitalize",children:n}),s&&y.jsx(Ls,{className:"ml-2 cursor-pointer text-gray-400 hover:text-gray-600",size:16})]})]})}function ks({type:t,message:e}){const n={warning:"border-l-4 border-yellow-500 bg-yellow-50 text-yellow-700",error:"border-l-4 border-red-500 bg-red-50 text-red-700"};return y.jsxs("div",{className:`mb-6 flex items-start p-4 ${n[t]}`,children:[y.jsx(xr,{className:`mr-2 ${t==="warning"?"text-yellow-500":"text-red-500"}`,size:20}),y.jsx("p",{className:"text-sm leading-tight",children:e})]})}const Ru=Object.freeze(Object.defineProperty({__proto__:null,default:xu},Symbol.toStringTag,{value:"Module"}));export{Sr as A,xu as D,Rr as S,Tr as a,Ru as b};
