@animateicons/react 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animateicons/react",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Animated SVG icons for React with hover and imperative animation triggers. Built on motion/react.",
5
5
  "license": "MIT",
6
6
  "author": "Avijit Dey",
@@ -79,28 +79,28 @@
79
79
  },
80
80
  "size-limit": [
81
81
  {
82
- "name": "lucide (full barrel + motion bundled)",
82
+ "name": "lucide (full barrel + LazyMotion domMin)",
83
83
  "path": "dist/lucide.js",
84
- "limit": "120 kB",
84
+ "limit": "55 kB",
85
85
  "ignore": [
86
86
  "react",
87
87
  "react-dom"
88
88
  ]
89
89
  },
90
90
  {
91
- "name": "huge (full barrel + motion bundled)",
91
+ "name": "huge (full barrel + LazyMotion domMin)",
92
92
  "path": "dist/huge.js",
93
- "limit": "100 kB",
93
+ "limit": "40 kB",
94
94
  "ignore": [
95
95
  "react",
96
96
  "react-dom"
97
97
  ]
98
98
  },
99
99
  {
100
- "name": "single icon (motion bundled)",
100
+ "name": "single icon (LazyMotion domMin)",
101
101
  "path": "dist/lucide.js",
102
102
  "import": "{ BellRingIcon }",
103
- "limit": "65 kB",
103
+ "limit": "50 kB",
104
104
  "ignore": [
105
105
  "react",
106
106
  "react-dom"
@@ -1,2 +0,0 @@
1
- import {createContext,forwardRef,useContext,useMemo,useRef,useInsertionEffect,useEffect,Fragment,createElement,useCallback,useLayoutEffect,useState,useId,Component}from'react';import {jsxs,jsx}from'react/jsx-runtime';var sn=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,o)=>(typeof require<"u"?require:e)[o]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Pm=(...t)=>t.filter(Boolean).join(" ");function Kt(t,e){t.indexOf(e)===-1&&t.push(e);}function At(t,e){let o=t.indexOf(e);o>-1&&t.splice(o,1);}var N=(t,e,o)=>o>e?e:o<t?t:o;function De(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}var tt=()=>{},F=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(tt=(t,e,o)=>{!t&&typeof console<"u"&&console.warn(De(e,o));},F=(t,e,o)=>{if(!t)throw new Error(De(e,o))});var _={};var Ee=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Re(t){return typeof t=="object"&&t!==null}var Le=t=>/^0[^.\s]+$/u.test(t);function Be(t){let e;return ()=>(e===void 0&&(e=t()),e)}var E=t=>t;var ll=(t,e)=>o=>e(t(o)),nt=(...t)=>t.reduce(ll);var ut=(t,e,o)=>{let r=e-t;return r===0?1:(o-t)/r};var yt=class{constructor(){this.subscriptions=[];}add(e){return Kt(this.subscriptions,e),()=>At(this.subscriptions,e)}notify(e,o,r){let i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,o,r);else for(let s=0;s<i;s++){let n=this.subscriptions[s];n&&n(e,o,r);}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0;}};var k=t=>t*1e3,U=t=>t/1e3;function ke(t,e){return e?t*(1e3/e):0}var an=new Set;function vt(t,e,o){t||an.has(e)||(console.warn(De(e,o)),an.add(e));}var ln=(t,e,o)=>(((1-3*o+3*e)*t+(3*o-6*e))*t+3*e)*t,cl=1e-7,ul=12;function ml(t,e,o,r,i){let s,n,a=0;do n=e+(o-e)/2,s=ln(n,r,i)-t,s>0?o=n:e=n;while(Math.abs(s)>cl&&++a<ul);return n}function Ct(t,e,o,r){if(t===e&&o===r)return E;let i=s=>ml(s,0,1,t,o);return s=>s===0||s===1?s:ln(i(s),e,r)}var vo=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2;var To=t=>e=>1-t(1-e);var Vo=Ct(.33,1.53,.69,.99),se=To(Vo),Ie=vo(se);var Fe=t=>t>=1?1:(t*=2)<1?.5*se(t):.5*(2-Math.pow(2,-10*(t-1)));var Oe=t=>1-Math.sin(Math.acos(t)),je=To(Oe),Ne=vo(Oe);var Kr=Ct(.42,0,1,1),zr=Ct(0,0,.58,1),Ge=Ct(.42,0,.58,1);var Hr=t=>Array.isArray(t)&&typeof t[0]!="number";var We=t=>Array.isArray(t)&&typeof t[0]=="number";var cn={linear:E,easeIn:Kr,easeInOut:Ge,easeOut:zr,circIn:Oe,circInOut:Ne,circOut:je,backIn:se,backInOut:Ie,backOut:Vo,anticipate:Fe},fl=t=>typeof t=="string",So=t=>{if(We(t)){F(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,o,r,i]=t;return Ct(e,o,r,i)}else if(fl(t))return F(cn[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),cn[t];return t};var Ue=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var q={value:null};function un(t,e){let o=new Set,r=new Set,i=false,s=false,n=new WeakSet,a={delta:0,timestamp:0,isProcessing:false};function u(m){n.has(m)&&(c.schedule(m),t()),m(a);}let c={schedule:(m,f=false,p=false)=>{let d=p&&i?o:r;return f&&n.add(m),d.add(m),m},cancel:m=>{r.delete(m),n.delete(m);},process:m=>{if(a=m,i){s=true;return}i=true;let f=o;o=r,r=f,o.forEach(u),o.clear(),i=false,s&&(s=false,c.process(m));}};return c}var pl=40;function bo(t,e){let o=false,r=true,i={delta:0,timestamp:0,isProcessing:false},s=()=>o=true,n=Ue.reduce((v,V)=>(v[V]=un(s),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:m,preRender:f,render:p,postRender:h}=n,d=()=>{let v=_.useManualTiming,V=v?i.timestamp:performance.now();o=false,v||(i.delta=r?1e3/60:Math.max(Math.min(V-i.timestamp,pl),1)),i.timestamp=V,i.isProcessing=true,a.process(i),l.process(i),u.process(i),c.process(i),m.process(i),f.process(i),p.process(i),h.process(i),i.isProcessing=false,o&&e&&(r=false,t(d));},g=()=>{o=true,r=true,i.isProcessing||t(d);};return {schedule:Ue.reduce((v,V)=>{let P=n[V];return v[V]=(j,H=false,A=false)=>(o||g(),P.schedule(j,H,A)),v},{}),cancel:v=>{for(let V=0;V<Ue.length;V++)n[Ue[V]].cancel(v);},state:i,steps:n}}var{schedule:b,cancel:X,state:B,steps:Ke}=bo(typeof requestAnimationFrame<"u"?requestAnimationFrame:E,true);var Po;function hl(){Po=void 0;}var R={now:()=>(Po===void 0&&R.set(B.isProcessing||_.useManualTiming?B.timestamp:performance.now()),Po),set:t=>{Po=t,queueMicrotask(hl);}};var mn=t=>e=>typeof e=="string"&&e.startsWith(t),wo=mn("--"),dl=mn("var(--"),ae=t=>dl(t)?gl.test(t.split("/*")[0].trim()):false,gl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $r(t){return typeof t!="string"?false:t.split("/*")[0].includes("var(--")}var ft={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Tt={...ft,transform:t=>N(0,1,t)},ze={...ft,default:1};var Mt=t=>Math.round(t*1e5)/1e5;var le=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function fn(t){return t==null}var pn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var ce=(t,e)=>o=>!!(typeof o=="string"&&pn.test(o)&&o.startsWith(t)||e&&!fn(o)&&Object.prototype.hasOwnProperty.call(o,e)),Ao=(t,e,o)=>r=>{if(typeof r!="string")return r;let[i,s,n,a]=r.match(le);return {[t]:parseFloat(i),[e]:parseFloat(s),[o]:parseFloat(n),alpha:a!==void 0?parseFloat(a):1}};var xl=t=>N(0,255,t),_r={...ft,transform:t=>Math.round(xl(t))},pt={test:ce("rgb","red"),parse:Ao("red","green","blue"),transform:({red:t,green:e,blue:o,alpha:r=1})=>"rgba("+_r.transform(t)+", "+_r.transform(e)+", "+_r.transform(o)+", "+Mt(Tt.transform(r))+")"};function yl(t){let e="",o="",r="",i="";return t.length>5?(e=t.substring(1,3),o=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),o=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,o+=o,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var He={test:ce("#"),parse:yl,transform:pt.transform};var $e=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),st=$e("deg"),$=$e("%"),y=$e("px"),Yr=$e("vh"),Xr=$e("vw"),Co={...$,parse:t=>$.parse(t)/100,transform:t=>$.transform(t*100)};var Dt={test:ce("hsl","hue"),parse:Ao("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:o,alpha:r=1})=>"hsla("+Math.round(t)+", "+$.transform(Mt(e))+", "+$.transform(Mt(o))+", "+Mt(Tt.transform(r))+")"};var M={test:t=>pt.test(t)||He.test(t)||Dt.test(t),parse:t=>pt.test(t)?pt.parse(t):Dt.test(t)?Dt.parse(t):He.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?pt.transform(t):Dt.transform(t),getAnimatableNone:t=>{let e=M.parse(t);return e.alpha=0,M.transform(e)}};var hn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vl(t){return isNaN(t)&&typeof t=="string"&&(t.match(le)?.length||0)+(t.match(hn)?.length||0)>0}var gn="number",xn="color",Tl="var",Vl="var(",dn="${}",Sl=/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 Et(t){let e=t.toString(),o=[],r={color:[],number:[],var:[]},i=[],s=0,a=e.replace(Sl,l=>(M.test(l)?(r.color.push(s),i.push(xn),o.push(M.parse(l))):l.startsWith(Vl)?(r.var.push(s),i.push(Tl),o.push(l)):(r.number.push(s),i.push(gn),o.push(parseFloat(l))),++s,dn)).split(dn);return {values:o,split:a,indexes:r,types:i}}function bl(t){return Et(t).values}function yn({split:t,types:e}){let o=t.length;return r=>{let i="";for(let s=0;s<o;s++)if(i+=t[s],r[s]!==void 0){let n=e[s];n===gn?i+=Mt(r[s]):n===xn?i+=M.transform(r[s]):i+=r[s];}return i}}function Pl(t){return yn(Et(t))}var wl=t=>typeof t=="number"?0:M.test(t)?M.getAnimatableNone(t):t,Al=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:wl(t);function Cl(t){let e=Et(t);return yn(e)(e.values.map((r,i)=>Al(r,e.split[i])))}var G={test:vl,parse:bl,createTransformer:Pl,getAnimatableNone:Cl};function qr(t,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+(e-t)*6*o:o<1/2?e:o<2/3?t+(e-t)*(2/3-o)*6:t}function vn({hue:t,saturation:e,lightness:o,alpha:r}){t/=360,e/=100,o/=100;let i=0,s=0,n=0;if(!e)i=s=n=o;else {let a=o<.5?o*(1+e):o+e-o*e,l=2*o-a;i=qr(l,a,t+1/3),s=qr(l,a,t),n=qr(l,a,t-1/3);}return {red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(n*255),alpha:r}}function ue(t,e){return o=>o>0?e:t}var w=(t,e,o)=>t+(e-t)*o;var Zr=(t,e,o)=>{let r=t*t,i=o*(e*e-r)+r;return i<0?0:Math.sqrt(i)},Ml=[He,pt,Dt],Dl=t=>Ml.find(e=>e.test(t));function Tn(t){let e=Dl(t);if(tt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return false;let o=e.parse(t);return e===Dt&&(o=vn(o)),o}var Jr=(t,e)=>{let o=Tn(t),r=Tn(e);if(!o||!r)return ue(t,e);let i={...o};return s=>(i.red=Zr(o.red,r.red,s),i.green=Zr(o.green,r.green,s),i.blue=Zr(o.blue,r.blue,s),i.alpha=w(o.alpha,r.alpha,s),pt.transform(i))};var Mo=new Set(["none","hidden"]);function Vn(t,e){return Mo.has(t)?o=>o<=0?t:e:o=>o>=1?e:t}function El(t,e){return o=>w(t,e,o)}function Do(t){return typeof t=="number"?El:typeof t=="string"?ae(t)?ue:M.test(t)?Jr:Bl:Array.isArray(t)?Sn:typeof t=="object"?M.test(t)?Jr:Rl:ue}function Sn(t,e){let o=[...t],r=o.length,i=t.map((s,n)=>Do(s)(s,e[n]));return s=>{for(let n=0;n<r;n++)o[n]=i[n](s);return o}}function Rl(t,e){let o={...t,...e},r={};for(let i in o)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Do(t[i])(t[i],e[i]));return i=>{for(let s in r)o[s]=r[s](i);return o}}function Ll(t,e){let o=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){let s=e.types[i],n=t.indexes[s][r[s]],a=t.values[n]??0;o[i]=a,r[s]++;}return o}var Bl=(t,e)=>{let o=G.createTransformer(e),r=Et(t),i=Et(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Mo.has(t)&&!i.values.length||Mo.has(e)&&!r.values.length?Vn(t,e):nt(Sn(Ll(r,i),i.values),o):(tt(true,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ue(t,e))};function Eo(t,e,o){return typeof t=="number"&&typeof e=="number"&&typeof o=="number"?w(t,e,o):Do(t)(t,e)}var bn=t=>{let e=({timestamp:o})=>t(o);return {start:(o=true)=>b.update(e,o),stop:()=>X(e),now:()=>B.isProcessing?B.timestamp:R.now()}};var Ro=(t,e,o=10)=>{let r="",i=Math.max(Math.round(e/o),2);for(let s=0;s<i;s++)r+=Math.round(t(s/(i-1))*1e4)/1e4+", ";return `linear(${r.substring(0,r.length-2)})`};function me(t){let e=0,o=50,r=t.next(e);for(;!r.done&&e<2e4;)e+=o,r=t.next(e);return e>=2e4?1/0:e}function Pn(t,e=100,o){let r=o({...t,keyframes:[0,e]}),i=Math.min(me(r),2e4);return {type:"keyframes",ease:s=>r.next(i*s).value/e,duration:U(i)}}var L={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};function ei(t,e){return t*Math.sqrt(1-e*e)}var kl=12;function Il(t,e,o){let r=o;for(let i=1;i<kl;i++)r=r-t(r)/e(r);return r}var ti=.001;function Fl({duration:t=L.duration,bounce:e=L.bounce,velocity:o=L.velocity,mass:r=L.mass}){let i,s;tt(t<=k(L.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let n=1-e;n=N(L.minDamping,L.maxDamping,n),t=N(L.minDuration,L.maxDuration,U(t)),n<1?(i=u=>{let c=u*n,m=c*t,f=c-o,p=ei(u,n),h=Math.exp(-m);return ti-f/p*h},s=u=>{let m=u*n*t,f=m*o+o,p=Math.pow(n,2)*Math.pow(u,2)*t,h=Math.exp(-m),d=ei(Math.pow(u,2),n);return (-i(u)+ti>0?-1:1)*((f-p)*h)/d}):(i=u=>{let c=Math.exp(-u*t),m=(u-o)*t+1;return -ti+c*m},s=u=>{let c=Math.exp(-u*t),m=(o-u)*(t*t);return c*m});let a=5/t,l=Il(i,s,a);if(t=k(t),isNaN(l))return {stiffness:L.stiffness,damping:L.damping,duration:t};{let u=Math.pow(l,2)*r;return {stiffness:u,damping:n*2*Math.sqrt(r*u),duration:t}}}var Ol=["duration","bounce"],jl=["stiffness","damping","mass"];function wn(t,e){return e.some(o=>t[o]!==void 0)}function Nl(t){let e={velocity:L.velocity,stiffness:L.stiffness,damping:L.damping,mass:L.mass,isResolvedFromDuration:false,...t};if(!wn(t,jl)&&wn(t,Ol))if(e.velocity=0,t.visualDuration){let o=t.visualDuration,r=2*Math.PI/(o*1.2),i=r*r,s=2*N(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:L.mass,stiffness:i,damping:s};}else {let o=Fl({...t,velocity:0});e={...e,...o,mass:L.mass},e.isResolvedFromDuration=true;}return e}function fe(t=L.visualDuration,e=L.bounce){let o=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t,{restSpeed:r,restDelta:i}=o,s=o.keyframes[0],n=o.keyframes[o.keyframes.length-1],a={done:false,value:s},{stiffness:l,damping:u,mass:c,duration:m,velocity:f,isResolvedFromDuration:p}=Nl({...o,velocity:-U(o.velocity||0)}),h=f||0,d=u/(2*Math.sqrt(l*c)),g=n-s,x=U(Math.sqrt(l/c)),T=Math.abs(g)<5;r||(r=T?L.restSpeed.granular:L.restSpeed.default),i||(i=T?L.restDelta.granular:L.restDelta.default);let v,V,P,j,H,A;if(d<1)P=ei(x,d),j=(h+d*x*g)/P,v=S=>{let I=Math.exp(-d*x*S);return n-I*(j*Math.sin(P*S)+g*Math.cos(P*S))},H=d*x*j+g*P,A=d*x*g-j*P,V=S=>Math.exp(-d*x*S)*(H*Math.sin(P*S)+A*Math.cos(P*S));else if(d===1){v=I=>n-Math.exp(-x*I)*(g+(h+x*g)*I);let S=h+x*g;V=I=>Math.exp(-x*I)*(x*S*I-h);}else {let S=x*Math.sqrt(d*d-1);v=lt=>{let xt=Math.exp(-d*x*lt),ct=Math.min(S*lt,300);return n-xt*((h+d*x*g)*Math.sinh(ct)+S*g*Math.cosh(ct))/S};let I=(h+d*x*g)/S,Y=d*x*I-g*S,Wt=d*x*g-I*S;V=lt=>{let xt=Math.exp(-d*x*lt),ct=Math.min(S*lt,300);return xt*(Y*Math.sinh(ct)+Wt*Math.cosh(ct))};}let K={calculatedDuration:p&&m||null,velocity:S=>k(V(S)),next:S=>{if(!p&&d<1){let Y=Math.exp(-d*x*S),Wt=Math.sin(P*S),lt=Math.cos(P*S),xt=n-Y*(j*Wt+g*lt),ct=k(Y*(H*Wt+A*lt));return a.done=Math.abs(ct)<=r&&Math.abs(n-xt)<=i,a.value=a.done?n:xt,a}let I=v(S);if(p)a.done=S>=m;else {let Y=k(V(S));a.done=Math.abs(Y)<=r&&Math.abs(n-I)<=i;}return a.value=a.done?n:I,a},toString:()=>{let S=Math.min(me(K),2e4),I=Ro(Y=>K.next(S*Y).value,S,30);return S+"ms "+I},toTransition:()=>{}};return K}fe.applyToOptions=t=>{let e=Pn(t,100,fe);return t.ease=e.ease,t.duration=k(e.duration),t.type="keyframes",t};var Gl=5;function Lo(t,e,o){let r=Math.max(e-Gl,0);return ke(o-t(r),e-r)}function _e({keyframes:t,velocity:e=0,power:o=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:n,min:a,max:l,restDelta:u=.5,restSpeed:c}){let m=t[0],f={done:false,value:m},p=A=>a!==void 0&&A<a||l!==void 0&&A>l,h=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l,d=o*e,g=m+d,x=n===void 0?g:n(g);x!==g&&(d=x-m);let T=A=>-d*Math.exp(-A/r),v=A=>x+T(A),V=A=>{let K=T(A),S=v(A);f.done=Math.abs(K)<=u,f.value=f.done?x:S;},P,j,H=A=>{p(f.value)&&(P=A,j=fe({keyframes:[f.value,h(f.value)],velocity:Lo(v,A,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}));};return H(0),{calculatedDuration:null,next:A=>{let K=false;return !j&&P===void 0&&(K=true,V(A),H(A)),P!==void 0&&A>=P?j.next(A-P):(!K&&V(A),f)}}}function Wl(t,e,o){let r=[],i=o||_.mix||Eo,s=t.length-1;for(let n=0;n<s;n++){let a=i(t[n],t[n+1]);if(e){let l=Array.isArray(e)?e[n]||E:e;a=nt(l,a);}r.push(a);}return r}function An(t,e,{clamp:o=true,ease:r,mixer:i}={}){let s=t.length;if(F(s===e.length,"Both input and output ranges must be the same length","range-length"),s===1)return ()=>e[0];if(s===2&&e[0]===e[1])return ()=>e[1];let n=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());let a=Wl(e,r,i),l=a.length,u=c=>{if(n&&c<t[0])return e[0];let m=0;if(l>1)for(;m<t.length-2&&!(c<t[m+1]);m++);let f=ut(t[m],t[m+1],c);return a[m](f)};return o?c=>u(N(t[0],t[s-1],c)):u}function Cn(t,e){let o=t[t.length-1];for(let r=1;r<=e;r++){let i=ut(0,e,r);t.push(w(o,1,i));}}function Mn(t){let e=[0];return Cn(e,t.length-1),e}function Dn(t,e){return t.map(o=>o*e)}function Ul(t,e){return t.map(()=>e||Ge).splice(0,t.length-1)}function Rt({duration:t=300,keyframes:e,times:o,ease:r="easeInOut"}){let i=Hr(r)?r.map(So):So(r),s={done:false,value:e[0]},n=Dn(o&&o.length===e.length?o:Mn(e),t),a=An(n,e,{ease:Array.isArray(i)?i:Ul(e,i)});return {calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}var Kl=t=>t!==null;function Lt(t,{repeat:e,repeatType:o="loop"},r,i=1){let s=t.filter(Kl),a=i<0||e&&o!=="loop"&&e%2===1?0:s.length-1;return !a||r===void 0?s[a]:r}var zl={decay:_e,inertia:_e,tween:Rt,keyframes:Rt,spring:fe};function Bo(t){typeof t.type=="string"&&(t.type=zl[t.type]);}var Bt=class{constructor(){this.updateFinished();}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e;});}notifyFinished(){this.resolve();}then(e,o){return this.finished.then(e,o)}};var Hl=t=>t/100,Vt=class extends Bt{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=false,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:false,value:void 0},this.stop=()=>{let{motionValue:o}=this.options;o&&o.updatedAt!==R.now()&&this.tick(R.now()),this.isStopped=true,this.state!=="idle"&&(this.teardown(),this.options.onStop?.());},this.options=e,this.initAnimation(),this.play(),e.autoplay===false&&this.pause();}initAnimation(){let{options:e}=this;Bo(e);let{type:o=Rt,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:n=0}=e,{keyframes:a}=e,l=o||Rt;process.env.NODE_ENV!=="production"&&l!==Rt&&F(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Rt&&typeof a[0]!="number"&&(this.mixKeyframes=nt(Hl,Eo(a[0],a[1])),a=[0,100]);let u=l({...e,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-n})),u.calculatedDuration===null&&(u.calculatedDuration=me(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u;}updateTime(e){let o=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=o;}tick(e,o=false){let{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:n,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);let{delay:u=0,keyframes:c,repeat:m,repeatType:f,repeatDelay:p,type:h,onUpdate:d,finalKeyframe:g}=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)),o?this.currentTime=e:this.updateTime(e);let x=this.currentTime-u*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,V=r;if(m){let A=Math.min(this.currentTime,i)/a,K=Math.floor(A),S=A%1;!S&&A>=1&&(S=1),S===1&&K--,K=Math.min(K,m+1),K%2&&(f==="reverse"?(S=1-S,p&&(S-=p/a)):f==="mirror"&&(V=n)),v=N(0,1,S)*a;}let P;T?(this.delayState.value=c[0],P=this.delayState):P=V.next(v),s&&!T&&(P.value=s(P.value));let{done:j}=P;!T&&l!==null&&(j=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return H&&h!==_e&&(P.value=Lt(c,this.options,g,this.speed)),d&&d(P.value),H&&this.finish(),P}then(e,o){return this.finished.then(e,o)}get duration(){return U(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+U(e)}get time(){return U(this.currentTime)}set time(e){e=k(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(false):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e));}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let o=this.generator.next(e).value;return Lo(r=>this.generator.next(r).value,e,o)}get speed(){return this.playbackSpeed}set speed(e){let o=this.playbackSpeed!==e;o&&this.driver&&this.updateTime(R.now()),this.playbackSpeed=e,o&&this.driver&&(this.time=U(this.currentTime));}play(){if(this.isStopped)return;let{driver:e=bn,startTime:o}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();let r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=o??r),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(R.now()),this.holdTime=this.currentTime;}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null;}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.();}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.();}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null;}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0);}sample(e){return this.startTime=0,this.tick(e,true)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}};function En(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1]);}var zt=t=>t*180/Math.PI,oi=t=>{let e=zt(Math.atan2(t[1],t[0]));return ri(e)},$l={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:oi,rotateZ:oi,skewX:t=>zt(Math.atan(t[1])),skewY:t=>zt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ri=t=>(t=t%360,t<0&&(t+=360),t),Rn=oi,Ln=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Bn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),_l={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ln,scaleY:Bn,scale:t=>(Ln(t)+Bn(t))/2,rotateX:t=>ri(zt(Math.atan2(t[6],t[5]))),rotateY:t=>ri(zt(Math.atan2(-t[2],t[0]))),rotateZ:Rn,rotate:Rn,skewX:t=>zt(Math.atan(t[4])),skewY:t=>zt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ko(t){return t.includes("scale")?1:0}function Io(t,e){if(!t||t==="none")return ko(e);let o=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(o)r=_l,i=o;else {let a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=$l,i=a;}if(!i)return ko(e);let s=r[e],n=i[1].split(",").map(Yl);return typeof s=="function"?s(n):n[s]}var kn=(t,e)=>{let{transform:o="none"}=getComputedStyle(t);return Io(o,e)};function Yl(t){return parseFloat(t.trim())}var ht=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],et=new Set(ht);var ii=t=>t===ft||t===y,Xl=new Set(["x","y","z"]),ql=ht.filter(t=>!Xl.has(t));function In(t){let e=[];return ql.forEach(o=>{let r=t.getValue(o);r!==void 0&&(e.push([o,r.get()]),r.set(o.startsWith("scale")?1:0));}),e}var St={width:({x:t},{paddingLeft:e="0",paddingRight:o="0",boxSizing:r})=>{let i=t.max-t.min;return r==="border-box"?i:i-parseFloat(e)-parseFloat(o)},height:({y:t},{paddingTop:e="0",paddingBottom:o="0",boxSizing:r})=>{let i=t.max-t.min;return r==="border-box"?i:i-parseFloat(e)-parseFloat(o)},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})=>Io(e,"x"),y:(t,{transform:e})=>Io(e,"y")};St.translateX=St.x;St.translateY=St.y;var Ht=new Set,ni=false,si=false,ai=false;function Fn(){if(si){let t=Array.from(Ht).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),o=new Map;e.forEach(r=>{let i=In(r);i.length&&(o.set(r,i),r.render());}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();let i=o.get(r);i&&i.forEach(([s,n])=>{r.getValue(s)?.set(n);});}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY);});}si=false,ni=false,Ht.forEach(t=>t.complete(ai)),Ht.clear();}function On(){Ht.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(si=true);});}function jn(){ai=true,On(),Fn(),ai=false;}var kt=class{constructor(e,o,r,i,s,n=false){this.state="pending",this.isAsync=false,this.needsMeasurement=false,this.unresolvedKeyframes=[...e],this.onComplete=o,this.name=r,this.motionValue=i,this.element=s,this.isAsync=n;}scheduleResolve(){this.state="scheduled",this.isAsync?(Ht.add(this),ni||(ni=true,b.read(On),b.resolveKeyframes(Fn))):(this.readKeyframes(),this.complete());}readKeyframes(){let{unresolvedKeyframes:e,name:o,element:r,motionValue:i}=this;if(e[0]===null){let s=i?.get(),n=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&o){let a=r.readValue(o,n);a!=null&&(e[0]=a);}e[0]===void 0&&(e[0]=n),i&&s===void 0&&i.set(e[0]);}En(e);}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=false){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ht.delete(this);}cancel(){this.state==="scheduled"&&(Ht.delete(this),this.state="pending");}resume(){this.state==="pending"&&this.scheduleResolve();}};var Nn=t=>t.startsWith("--");function Fo(t,e,o){Nn(e)?t.style.setProperty(e,o):t.style[e]=o;}var Gn={};function Oo(t,e){let o=Be(t);return ()=>Gn[e]??o()}var Wn=Oo(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var jo=Oo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"});}catch{return false}return true},"linearEasing");var $t=([t,e,o,r])=>`cubic-bezier(${t}, ${e}, ${o}, ${r})`;var li={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$t([0,.65,.55,1]),circOut:$t([.55,0,1,.45]),backIn:$t([.31,.01,.66,-0.59]),backOut:$t([.33,1.53,.69,.99])};function ci(t,e){if(t)return typeof t=="function"?jo()?Ro(t,e):"ease-out":We(t)?$t(t):Array.isArray(t)?t.map(o=>ci(o,e)||li.easeOut):li[t]}function Un(t,e,o,{delay:r=0,duration:i=300,repeat:s=0,repeatType:n="loop",ease:a="easeOut",times:l}={},u=void 0){let c={[e]:o};l&&(c.offset=l);let m=ci(a,i);Array.isArray(m)&&(c.easing=m);let f={delay:r,duration:i,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:s+1,direction:n==="reverse"?"alternate":"normal"};u&&(f.pseudoElement=u);let p=t.animate(c,f);return p}function No(t){return typeof t=="function"&&"applyToOptions"in t}function Kn({type:t,...e}){return No(t)&&jo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}var pe=class extends Bt{constructor(e){if(super(),this.finishedTime=null,this.isStopped=false,this.manualStartTime=null,!e)return;let{element:o,name:r,keyframes:i,pseudoElement:s,allowFlatten:n=false,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=n,this.options=e,F(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=Kn(e);this.animation=Un(o,r,i,u,s),u.autoplay===false&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let c=Lt(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),Fo(o,r,c),this.animation.cancel();}l?.(),this.notifyFinished();};}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished());}pause(){this.animation.pause();}complete(){this.animation.finish?.();}cancel(){try{this.animation.cancel();}catch{}}stop(){if(this.isStopped)return;this.isStopped=true;let{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel());}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.();}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return U(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+U(e)}get time(){return U(Number(this.animation.currentTime)||0)}set time(e){let o=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=k(e),o&&this.animation.pause();}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e;}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e;}attachTimeline({timeline:e,rangeStart:o,rangeEnd:r,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Wn()?(this.animation.timeline=e,o&&(this.animation.rangeStart=o),r&&(this.animation.rangeEnd=r),E):i(this)}};var zn={anticipate:Fe,backInOut:Ie,circInOut:Ne};function Zl(t){return t in zn}function Hn(t){typeof t.ease=="string"&&Zl(t.ease)&&(t.ease=zn[t.ease]);}var ui=10,Go=class extends pe{constructor(e){Hn(e),Bo(e),super(e),e.startTime!==void 0&&e.autoplay!==false&&(this.startTime=e.startTime),this.options=e;}updateMotionValue(e){let{motionValue:o,onUpdate:r,onComplete:i,element:s,...n}=this.options;if(!o)return;if(e!==void 0){o.set(e);return}let a=new Vt({...n,autoplay:false}),l=Math.max(ui,R.now()-this.startTime),u=N(0,ui,l-ui),c=a.sample(l).value,{name:m}=this.options;s&&m&&Fo(s,m,c),o.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop();}};var mi=(t,e)=>e==="zIndex"?false:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(G.test(t)||t==="0")&&!t.startsWith("url("));function Jl(t){let e=t[0];if(t.length===1)return true;for(let o=0;o<t.length;o++)if(t[o]!==e)return true}function $n(t,e,o,r){let i=t[0];if(i===null)return false;if(e==="display"||e==="visibility")return true;let s=t[t.length-1],n=mi(i,e),a=mi(s,e);return tt(n===a,`You are trying to animate ${e} from "${i}" to "${s}". "${n?s:i}" is not an animatable value.`,"value-not-animatable"),!n||!a?false:Jl(t)||(o==="spring"||No(o))&&r}function Ye(t){t.duration=0,t.type="keyframes";}var Wo=new Set(["opacity","clipPath","filter","transform"]);var Ql=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function _n(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Ql.test(t[e]))return true;return false}var tc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),ec=Be(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Yn(t){let{motionValue:e,name:o,repeatDelay:r,repeatType:i,damping:s,type:n,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return false;let{onUpdate:u,transformTemplate:c}=e.owner.getProps();return ec()&&o&&(Wo.has(o)||tc.has(o)&&_n(a))&&(o!=="transform"||!c)&&!u&&!r&&i!=="mirror"&&s!==0&&n!=="inertia"}var oc=40,Uo=class extends Bt{constructor({autoplay:e=true,delay:o=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:n="loop",keyframes:a,name:l,motionValue:u,element:c,...m}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel();},this.createdAt=R.now();let f={autoplay:e,delay:o,type:r,repeat:i,repeatDelay:s,repeatType:n,name:l,motionValue:u,element:c,...m},p=c?.KeyframeResolver||kt;this.keyframeResolver=new p(a,(h,d,g)=>this.onKeyframesResolved(h,d,f,!g),l,u,c),this.keyframeResolver?.scheduleResolve();}onKeyframesResolved(e,o,r,i){this.keyframeResolver=void 0;let{name:s,type:n,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=R.now();let m=true;$n(e,s,n,a)||(m=false,(_.instantAnimations||!l)&&c?.(Lt(e,r,o)),e[0]=e[e.length-1],Ye(r),r.repeat=0);let p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>oc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:e},h=m&&!u&&Yn(p),d=p.motionValue?.owner?.current,g;if(h)try{g=new Go({...p,element:d});}catch{g=new Vt(p);}else g=new Vt(p);g.finished.then(()=>{this.notifyFinished();}).catch(E),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g;}get finished(){return this._animation?this.animation.finished:this._finished}then(e,o){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),jn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e;}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e;}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play();}pause(){this.animation.pause();}complete(){this.animation.complete();}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel();}};function Ko(t,e,o,r=0,i=1){let s=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),n=t.size,a=(n-1)*r;return typeof o=="function"?o(s,n):i===1?s*r:a-s*r}var rc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ic(t){let e=rc.exec(t);if(!e)return [,];let[,o,r,i]=e;return [`--${o??r}`,i]}var nc=4;function fi(t,e,o=1){F(o<=nc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,i]=ic(t);if(!r)return;let s=window.getComputedStyle(e).getPropertyValue(r);if(s){let n=s.trim();return Ee(n)?parseFloat(n):n}return ae(i)?fi(i,e,o+1):i}var sc={type:"spring",stiffness:500,damping:25,restSpeed:10},ac=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),lc={type:"keyframes",duration:.8},cc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xn=(t,{keyframes:e})=>e.length>2?lc:et.has(t)?t.startsWith("scale")?ac(e[1]):sc:cc;function zo(t,e){if(t?.inherit&&e){let{inherit:o,...r}=t;return {...e,...r}}return t}function he(t,e){let o=t?.[e]??t?.default??t;return o!==t?zo(o,t):o}var uc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function qn(t){for(let e in t)if(!uc.has(e))return true;return false}var _t=(t,e,o,r={},i,s)=>n=>{let a=he(r,t)||{},l=a.delay||r.delay||0,{elapsed:u=0}=r;u=u-k(l);let c={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f);},onComplete:()=>{n(),a.onComplete&&a.onComplete();},name:t,motionValue:e,element:s?void 0:i};qn(a)||Object.assign(c,Xn(t,c)),c.duration&&(c.duration=k(c.duration)),c.repeatDelay&&(c.repeatDelay=k(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let m=false;if((c.type===false||c.duration===0&&!c.repeatDelay)&&(Ye(c),c.delay===0&&(m=true)),(_.instantAnimations||_.skipAnimations||i?.shouldSkipAnimations)&&(m=true,Ye(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,m&&!s&&e.get()!==void 0){let f=Lt(c.keyframes,a);if(f!==void 0){b.update(()=>{c.onUpdate(f),c.onComplete();});return}}return a.isSync?new Vt(c):new Uo(c)};function Zn(t){let e=[{},{}];return t?.values.forEach((o,r)=>{e[0][r]=o.get(),e[1][r]=o.getVelocity();}),e}function Yt(t,e,o,r){if(typeof e=="function"){let[i,s]=Zn(r);e=e(o!==void 0?o:t.custom,i,s);}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){let[i,s]=Zn(r);e=e(o!==void 0?o:t.custom,i,s);}return e}function Z(t,e,o){let r=t.getProps();return Yt(r,e,o!==void 0?o:r.custom,t)}var Ho=new Set(["width","height","top","left","right","bottom",...ht]);var Jn=30,mc=t=>!isNaN(parseFloat(t)),pi=class{constructor(e,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{let i=R.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let s of this.dependents)s.dirty();},this.hasAnimated=false,this.setCurrent(e),this.owner=o.owner;}setCurrent(e){this.current=e,this.updatedAt=R.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=mc(this.current));}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt;}onChange(e){return process.env.NODE_ENV!=="production"&&vt(false,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,o){this.events[e]||(this.events[e]=new yt);let r=this.events[e].add(o);return e==="change"?()=>{r(),b.read(()=>{this.events.change.getSize()||this.stop();});}:r}clearListeners(){for(let e in this.events)this.events[e].clear();}attach(e,o){this.passiveEffect=e,this.stopPassiveEffect=o;}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e);}setWithVelocity(e,o,r){this.set(o),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r;}jump(e,o=true){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect();}dirty(){this.events.change?.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(){let e=R.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Jn)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,Jn);return ke(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(e){return this.stop(),new Promise(o=>{this.hasAnimated=true,this.animation=e(o),this.events.animationStart&&this.events.animationStart.notify();}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation();})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation();}isAnimating(){return !!this.animation}clearAnimation(){delete this.animation;}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect();}};function at(t,e){return new pi(t,e)}var Xe=t=>Array.isArray(t);function fc(t,e,o){t.hasValue(e)?t.getValue(e).set(o):t.addValue(e,at(o));}function pc(t){return Xe(t)?t[t.length-1]||0:t}function de(t,e){let o=Z(t,e),{transitionEnd:r={},transition:i={},...s}=o||{};s={...s,...r};for(let n in s){let a=pc(s[n]);fc(t,n,a);}}var C=t=>!!(t&&t.getVelocity);function ts(t){return !!(C(t)&&t.add)}function ge(t,e){let o=t.getValue("willChange");if(ts(o))return o.add(e);if(!o&&_.WillChange){let r=new _.WillChange("auto");t.addValue("willChange",r),r.add(e);}}function xe(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var es="framerAppearId",qe="data-"+xe(es);function $o(t){return t.props[qe]}function hc({protectedKeys:t,needsAnimating:e},o){let r=t.hasOwnProperty(o)&&e[o]!==true;return e[o]=false,r}function _o(t,e,{delay:o=0,transitionOverride:r,type:i}={}){let{transition:s,transitionEnd:n,...a}=e,l=t.getDefaultTransition();s=s?zo(s,l):l;let u=s?.reduceMotion;r&&(s=r);let c=[],m=i&&t.animationState&&t.animationState.getState()[i];for(let f in a){let p=t.getValue(f,t.latestValues[f]??null),h=a[f];if(h===void 0||m&&hc(m,f))continue;let d={delay:o,...he(s||{},f)},g=p.get();if(g!==void 0&&!p.isAnimating()&&!Array.isArray(h)&&h===g&&!d.velocity){b.update(()=>p.set(h));continue}let x=false;if(window.MotionHandoffAnimation){let V=$o(t);if(V){let P=window.MotionHandoffAnimation(V,f,b);P!==null&&(d.startTime=P,x=true);}}ge(t,f);let T=u??t.shouldReduceMotion;p.start(_t(f,p,h,T&&Ho.has(f)?{type:false}:d,t,x));let v=p.animation;v&&c.push(v);}if(n){let f=()=>b.update(()=>{n&&de(t,n);});c.length?Promise.all(c).then(f):f();}return c}function Yo(t,e,o={}){let r=Z(t,e,o.type==="exit"?t.presenceContext?.custom:void 0),{transition:i=t.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(i=o.transitionOverride);let s=r?()=>Promise.all(_o(t,r,o)):()=>Promise.resolve(),n=t.variantChildren&&t.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:m}=i;return dc(t,e,l,u,c,m,o)}:()=>Promise.resolve(),{when:a}=i;if(a){let[l,u]=a==="beforeChildren"?[s,n]:[n,s];return l().then(()=>u())}else return Promise.all([s(),n(o.delay)])}function dc(t,e,o=0,r=0,i=0,s=1,n){let a=[];for(let l of t.variantChildren)l.notify("AnimationStart",e),a.push(Yo(l,e,{...n,delay:o+(typeof r=="function"?0:r)+Ko(t.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Ze(t,e,o={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){let i=e.map(s=>Yo(t,s,o));r=Promise.all(i);}else if(typeof e=="string")r=Yo(t,e,o);else {let i=typeof e=="function"?Z(t,e,o.custom):e;r=Promise.all(_o(t,i,o));}return r.then(()=>{t.notify("AnimationComplete",e);})}var os={test:t=>t==="auto",parse:t=>t};var Xo=t=>e=>e.test(t);var hi=[ft,y,$,st,Xr,Yr,os],di=t=>hi.find(Xo(t));function rs(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Le(t):true}var gc=new Set(["brightness","contrast","saturate","opacity"]);function xc(t){let[e,o]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;let[r]=o.match(le)||[];if(!r)return t;let i=o.replace(r,""),s=gc.has(e)?1:0;return r!==o&&(s*=100),e+"("+s+i+")"}var yc=/\b([a-z-]*)\(.*?\)/gu,Je={...G,getAnimatableNone:t=>{let e=t.match(yc);return e?e.map(xc).join(" "):t}};var Qe={...G,getAnimatableNone:t=>{let e=G.parse(t);return G.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}};var gi={...ft,transform:Math.round};var is={rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:ze,scaleX:ze,scaleY:ze,scaleZ:ze,skew:st,skewX:st,skewY:st,distance:y,translateX:y,translateY:y,translateZ:y,x:y,y,z:y,perspective:y,transformPerspective:y,opacity:Tt,originX:Co,originY:Co,originZ:y};var ye={borderWidth:y,borderTopWidth:y,borderRightWidth:y,borderBottomWidth:y,borderLeftWidth:y,borderRadius:y,borderTopLeftRadius:y,borderTopRightRadius:y,borderBottomRightRadius:y,borderBottomLeftRadius:y,width:y,maxWidth:y,height:y,maxHeight:y,top:y,right:y,bottom:y,left:y,inset:y,insetBlock:y,insetBlockStart:y,insetBlockEnd:y,insetInline:y,insetInlineStart:y,insetInlineEnd:y,padding:y,paddingTop:y,paddingRight:y,paddingBottom:y,paddingLeft:y,paddingBlock:y,paddingBlockStart:y,paddingBlockEnd:y,paddingInline:y,paddingInlineStart:y,paddingInlineEnd:y,margin:y,marginTop:y,marginRight:y,marginBottom:y,marginLeft:y,marginBlock:y,marginBlockStart:y,marginBlockEnd:y,marginInline:y,marginInlineStart:y,marginInlineEnd:y,fontSize:y,backgroundPositionX:y,backgroundPositionY:y,...is,zIndex:gi,fillOpacity:Tt,strokeOpacity:Tt,numOctaves:gi};var vc={...ye,color:M,backgroundColor:M,outlineColor:M,fill:M,stroke:M,borderColor:M,borderTopColor:M,borderRightColor:M,borderBottomColor:M,borderLeftColor:M,filter:Je,WebkitFilter:Je,mask:Qe,WebkitMask:Qe},qo=t=>vc[t];var Tc=new Set([Je,Qe]);function Zo(t,e){let o=qo(t);return Tc.has(o)||(o=G),o.getAnimatableNone?o.getAnimatableNone(e):void 0}var Vc=new Set(["auto","none","0"]);function ns(t,e,o){let r=0,i;for(;r<t.length&&!i;){let s=t[r];typeof s=="string"&&!Vc.has(s)&&Et(s).values.length&&(i=t[r]),r++;}if(i&&o)for(let s of e)t[s]=Zo(o,i);}var Jo=class extends kt{constructor(e,o,r,i,s){super(e,o,r,i,s,true);}readKeyframes(){let{unresolvedKeyframes:e,element:o,name:r}=this;if(!o||!o.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let m=e[c];if(typeof m=="string"&&(m=m.trim(),ae(m))){let f=fi(m,o.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=m);}}if(this.resolveNoneKeyframes(),!Ho.has(r)||e.length!==2)return;let[i,s]=e,n=di(i),a=di(s),l=$r(i),u=$r(s);if(l!==u&&St[r]){this.needsMeasurement=true;return}if(n!==a)if(ii(n)&&ii(a))for(let c=0;c<e.length;c++){let m=e[c];typeof m=="string"&&(e[c]=parseFloat(m));}else St[r]&&(this.needsMeasurement=true);}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:o}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||rs(e[i]))&&r.push(i);r.length&&ns(e,r,o);}measureInitialState(){let{element:e,unresolvedKeyframes:o,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=St[r](e.measureViewportBox(),window.getComputedStyle(e.current)),o[0]=this.measuredOrigin;let i=o[o.length-1];i!==void 0&&e.getValue(r,i).jump(i,false);}measureEndState(){let{element:e,name:o,unresolvedKeyframes:r}=this;if(!e||!e.current)return;let i=e.getValue(o);i&&i.jump(this.measuredOrigin,false);let s=r.length-1,n=r[s];r[s]=St[o](e.measureViewportBox(),window.getComputedStyle(e.current)),n!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=n),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l);}),this.resolveNoneKeyframes();}};function Qo(t,e,o){if(t==null)return [];if(t instanceof EventTarget)return [t];if(typeof t=="string"){let r=document;let i=r.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(r=>r!=null)}var tr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ss(t){return Re(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}var{schedule:Xt}=bo(queueMicrotask,false);var ot={x:false,y:false};function er(){return ot.x||ot.y}function xi(t){return t==="x"||t==="y"?ot[t]?null:(ot[t]=true,()=>{ot[t]=false;}):ot.x||ot.y?null:(ot.x=ot.y=true,()=>{ot.x=ot.y=false;})}function or(t,e){let o=Qo(t),r=new AbortController,i={passive:true,...e,signal:r.signal};return [o,i,()=>r.abort()]}function bc(t){return !(t.pointerType==="touch"||er())}function yi(t,e,o={}){let[r,i,s]=or(t,o);return r.forEach(n=>{let a=false,l=false,u,c=()=>{n.removeEventListener("pointerleave",h);},m=g=>{u&&(u(g),u=void 0),c();},f=g=>{a=false,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=false,m(g));},p=()=>{a=true,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i);},h=g=>{if(g.pointerType!=="touch"){if(a){l=true;return}m(g);}},d=g=>{if(!bc(g))return;l=false;let x=e(n,g);typeof x=="function"&&(u=x,n.addEventListener("pointerleave",h,i));};n.addEventListener("pointerenter",d,i),n.addEventListener("pointerdown",p,i);}),s}var vi=(t,e)=>e?t===e?true:vi(t,e.parentElement):false;var qt=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==false;var Pc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ti(t){return Pc.has(t.tagName)||t.isContentEditable===true}var wc=new Set(["INPUT","SELECT","TEXTAREA"]);function Vi(t){return wc.has(t.tagName)||t.isContentEditable===true}var ve=new WeakSet;function as(t){return e=>{e.key==="Enter"&&t(e);}}function Si(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:true,bubbles:true}));}var ls=(t,e)=>{let o=t.currentTarget;if(!o)return;let r=as(()=>{if(ve.has(o))return;Si(o,"down");let i=as(()=>{Si(o,"up");}),s=()=>Si(o,"cancel");o.addEventListener("keyup",i,e),o.addEventListener("blur",s,e);});o.addEventListener("keydown",r,e),o.addEventListener("blur",()=>o.removeEventListener("keydown",r),e);};function cs(t){return qt(t)&&!er()}var us=new WeakSet;function bi(t,e,o={}){let[r,i,s]=or(t,o),n=a=>{let l=a.currentTarget;if(!cs(a)||us.has(a))return;ve.add(l),o.stopPropagation&&us.add(a);let u=e(l,a),c=(p,h)=>{window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",f),ve.has(l)&&ve.delete(l),cs(p)&&typeof u=="function"&&u(p,{success:h});},m=p=>{c(p,l===window||l===document||o.useGlobalTarget||vi(l,p.target));},f=p=>{c(p,false);};window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",f,i);};return r.forEach(a=>{(o.useGlobalTarget?window:a).addEventListener("pointerdown",n,i),ss(a)&&(a.addEventListener("focus",u=>ls(u,i)),!Ti(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0));}),s}function Te(t){return Re(t)&&"ownerSVGElement"in t}var rr=new WeakMap,ir,ms=(t,e,o)=>(r,i)=>i&&i[0]?i[0][t+"Size"]:Te(r)&&"getBBox"in r?r.getBBox()[e]:r[o],Ac=ms("inline","width","offsetWidth"),Cc=ms("block","height","offsetHeight");function Mc({target:t,borderBoxSize:e}){rr.get(t)?.forEach(o=>{o(t,{get width(){return Ac(t,e)},get height(){return Cc(t,e)}});});}function Dc(t){t.forEach(Mc);}function Ec(){typeof ResizeObserver>"u"||(ir=new ResizeObserver(Dc));}function fs(t,e){ir||Ec();let o=Qo(t);return o.forEach(r=>{let i=rr.get(r);i||(i=new Set,rr.set(r,i)),i.add(e),ir?.observe(r);}),()=>{o.forEach(r=>{let i=rr.get(r);i?.delete(e),i?.size||ir?.unobserve(r);});}}var nr=new Set,Ve;function Rc(){Ve=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};nr.forEach(e=>e(t));},window.addEventListener("resize",Ve);}function ps(t){return nr.add(t),Ve||Rc(),()=>{nr.delete(t),!nr.size&&typeof Ve=="function"&&(window.removeEventListener("resize",Ve),Ve=void 0);}}function sr(t,e){return typeof t=="function"?ps(t):fs(t,e)}function hs(t){return Te(t)&&t.tagName==="svg"}var Lc=[...hi,M,G],ds=t=>Lc.find(Xo(t));var Pi=()=>({translate:0,scale:1,origin:0,originPoint:0}),It=()=>({x:Pi(),y:Pi()}),wi=()=>({min:0,max:0}),D=()=>({x:wi(),y:wi()});var gs=new WeakMap;function bt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function dt(t){return typeof t=="string"||Array.isArray(t)}var ar=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],to=["initial",...ar];function Ft(t){return bt(t.animate)||to.some(e=>dt(t[e]))}function eo(t){return !!(Ft(t)||t.variants)}function xs(t,e,o){for(let r in e){let i=e[r],s=o[r];if(C(i))t.addValue(r,i);else if(C(s))t.addValue(r,at(i,{owner:t}));else if(s!==i)if(t.hasValue(r)){let n=t.getValue(r);n.liveStyle===true?n.jump(i):n.hasAnimated||n.set(i);}else {let n=t.getStaticValue(r);t.addValue(r,at(n!==void 0?n:i,{owner:t}));}}for(let r in o)e[r]===void 0&&t.removeValue(r);return e}var Ot={current:null},Zt={current:false};var Bc=typeof window<"u";function oo(){if(Zt.current=true,!!Bc)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ot.current=t.matches;t.addEventListener("change",e),e();}else Ot.current=false;}var ys=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],lr={};function io(t){lr=t;}function Ai(){return lr}var ro=class{scrapeMotionValuesFromProps(e,o,r){return {}}constructor({parent:e,props:o,presenceContext:r,reducedMotionConfig:i,skipAnimations:s,blockInitialAnimation:n,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=false,this.isControllingVariants=false,this.shouldReduceMotion=null,this.shouldSkipAnimations=false,this.values=new Map,this.KeyframeResolver=kt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=false,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection));},this.renderScheduledAt=0,this.scheduleRender=()=>{let p=R.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,b.render(this.render,false,true));};let{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=o.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=o,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=s,this.options=l,this.blockInitialAnimation=!!n,this.isControllingVariants=Ft(o),this.isVariantNode=eo(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:m,...f}=this.scrapeMotionValuesFromProps(o,{},this);for(let p in f){let h=f[p];u[p]!==void 0&&C(h)&&h.set(u[p]);}}mount(e){if(this.hasBeenMounted)for(let o in this.initialValues)this.values.get(o)?.jump(this.initialValues[o]),this.latestValues[o]=this.initialValues[o];this.current=e,gs.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((o,r)=>this.bindToMotionValue(r,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=false:this.reducedMotionConfig==="always"?this.shouldReduceMotion=true:(Zt.current||oo(),this.shouldReduceMotion=Ot.current),process.env.NODE_ENV!=="production"&&vt(this.shouldReduceMotion!==true,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??false,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=true;}unmount(){this.projection&&this.projection.unmount(),X(this.notifyUpdate),X(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let o=this.features[e];o&&(o.unmount(),o.isMounted=false);}this.current=null;}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e);}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e);}bindToMotionValue(e,o){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),o.accelerate&&Wo.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:a,times:l,ease:u,duration:c}=o.accelerate,m=new pe({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:k(c)}),f=n(m);this.valueSubscriptions.set(e,()=>{f(),m.cancel();});return}let r=et.has(e);r&&this.onBindTransform&&this.onBindTransform();let i=o.on("change",n=>{this.latestValues[e]=n,this.props.onUpdate&&b.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=true),this.scheduleRender();}),s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,o)),this.valueSubscriptions.set(e,()=>{i(),s&&s(),o.owner&&o.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 lr){let o=lr[e];if(!o)continue;let{isEnabled:r,Feature:i}=o;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){let s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=true);}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props);}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):D()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,o){this.latestValues[e]=o;}update(e,o){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let r=0;r<ys.length;r++){let i=ys[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let s="on"+i,n=e[s];n&&(this.propEventSubscriptions[i]=this.on(i,n));}this.prevMotionValues=xs(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){let o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(e),()=>o.variantChildren.delete(e)}addValue(e,o){let r=this.values.get(e);o!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,o),this.values.set(e,o),this.latestValues[e]=o.get());}removeValue(e){this.values.delete(e);let o=this.valueSubscriptions.get(e);o&&(o(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState);}hasValue(e){return this.values.has(e)}getValue(e,o){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&o!==void 0&&(r=at(o===null?void 0:o,{owner:this}),this.addValue(e,r)),r}readValue(e,o){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(Ee(r)||Le(r))?r=parseFloat(r):!ds(r)&&G.test(o)&&(r=Zo(e,o)),this.setBaseTarget(e,C(r)?r.get():r)),C(r)?r.get():r}setBaseTarget(e,o){this.baseTarget[e]=o;}getBaseTarget(e){let{initial:o}=this.props,r;if(typeof o=="string"||typeof o=="object"){let s=Yt(this.props,o,this.presenceContext?.custom);s&&(r=s[e]);}if(o&&r!==void 0)return r;let i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!C(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,o){return this.events[e]||(this.events[e]=new yt),this.events[e].add(o)}notify(e,...o){this.events[e]&&this.events[e].notify(...o);}scheduleRenderMicrotask(){Xt.render(this.render);}};var Se=class extends ro{constructor(){super(...arguments),this.KeyframeResolver=Jo;}sortInstanceNodePosition(e,o){return e.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(e,o){let r=e.style;return r?r[o]:void 0}removeValueFromRenderState(e,{vars:o,style:r}){delete o[e],delete r[e];}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;C(e)&&(this.childSubscription=e.on("change",o=>{this.current&&(this.current.textContent=`${o}`);}));}};var W=class{constructor(e){this.isMounted=false,this.node=e;}update(){}};function no({top:t,left:e,right:o,bottom:r}){return {x:{min:e,max:o},y:{min:t,max:r}}}function Ci({x:t,y:e}){return {top:e.min,right:t.max,bottom:e.max,left:t.min}}function Mi(t,e){if(!e)return t;let o=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return {top:o.y,left:o.x,bottom:r.y,right:r.x}}function Di(t){return t===void 0||t===1}function cr({scale:t,scaleX:e,scaleY:o}){return !Di(t)||!Di(e)||!Di(o)}function Pt(t){return cr(t)||Ei(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ei(t){return vs(t.x)||vs(t.y)}function vs(t){return t&&t!=="0%"}function so(t,e,o){let r=t-o,i=e*r;return o+i}function Ts(t,e,o,r,i){return i!==void 0&&(t=so(t,i,r)),so(t,o,r)+e}function Ri(t,e=0,o=1,r,i){t.min=Ts(t.min,e,o,r,i),t.max=Ts(t.max,e,o,r,i);}function Li(t,{x:e,y:o}){Ri(t.x,e.translate,e.scale,e.originPoint),Ri(t.y,o.translate,o.scale,o.originPoint);}var Vs=.999999999999,Ss=1.0000000000001;function ws(t,e,o,r=false){let i=o.length;if(!i)return;e.x=e.y=1;let s,n;for(let a=0;a<i;a++){s=o[a],n=s.projectionDelta;let{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(rt(t.x,-s.scroll.offset.x),rt(t.y,-s.scroll.offset.y)),n&&(e.x*=n.x.scale,e.y*=n.y.scale,Li(t,n)),r&&Pt(s.latestValues)&&ao(t,s.latestValues,s.layout?.layoutBox));}e.x<Ss&&e.x>Vs&&(e.x=1),e.y<Ss&&e.y>Vs&&(e.y=1);}function rt(t,e){t.min+=e,t.max+=e;}function bs(t,e,o,r,i=.5){let s=w(t.min,t.max,i);Ri(t,e,o,s,r);}function Ps(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function ao(t,e,o){let r=o??t;bs(t.x,Ps(e.x,r.x),e.scaleX,e.scale,e.originX),bs(t.y,Ps(e.y,r.y),e.scaleY,e.scale,e.originY);}function ur(t,e){return no(Mi(t.getBoundingClientRect(),e))}function Bi(t,e,o){let r=ur(t,o),{scroll:i}=e;return i&&(rt(r.x,i.offset.x),rt(r.y,i.offset.y)),r}var kc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ic=ht.length;function As(t,e,o){let r="",i=true;for(let s=0;s<Ic;s++){let n=ht[s],a=t[n];if(a===void 0)continue;let l=true;if(typeof a=="number")l=a===(n.startsWith("scale")?1:0);else {let u=parseFloat(a);l=n.startsWith("scale")?u===1:u===0;}if(!l||o){let u=tr(a,ye[n]);if(!l){i=false;let c=kc[n]||n;r+=`${c}(${u}) `;}o&&(e[n]=u);}}return r=r.trim(),o?r=o(e,i?"":r):i&&(r="none"),r}function Jt(t,e,o){let{style:r,vars:i,transformOrigin:s}=t,n=false,a=false;for(let l in e){let u=e[l];if(et.has(l)){n=true;continue}else if(wo(l)){i[l]=u;continue}else {let c=tr(u,ye[l]);l.startsWith("origin")?(a=true,s[l]=c):r[l]=c;}}if(e.transform||(n||o?r.transform=As(e,t.transform,o):r.transform&&(r.transform="none")),a){let{originX:l="50%",originY:u="50%",originZ:c=0}=s;r.transformOrigin=`${l} ${u} ${c}`;}}function mr(t,{style:e,vars:o},r,i){let s=t.style,n;for(n in e)s[n]=e[n];i?.applyProjectionStyles(s,r);for(n in o)s.setProperty(n,o[n]);}function Cs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var be={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(y.test(t))t=parseFloat(t);else return t;let o=Cs(t,e.target.x),r=Cs(t,e.target.y);return `${o}% ${r}%`}};var Ms={correct:(t,{treeScale:e,projectionDelta:o})=>{let r=t,i=G.parse(t);if(i.length>5)return r;let s=G.createTransformer(t),n=typeof i[0]!="number"?1:0,a=o.x.scale*e.x,l=o.y.scale*e.y;i[0+n]/=a,i[1+n]/=l;let u=w(a,l,.5);return typeof i[2+n]=="number"&&(i[2+n]/=u),typeof i[3+n]=="number"&&(i[3+n]/=u),s(i)}};var lo={borderRadius:{...be,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomLeftRadius:be,borderBottomRightRadius:be,boxShadow:Ms};function co(t,{layout:e,layoutId:o}){return et.has(t)||t.startsWith("origin")||(e||o!==void 0)&&(!!lo[t]||t==="opacity")}function Qt(t,e,o){let r=t.style,i=e?.style,s={};if(!r)return s;for(let n in r)(C(r[n])||i&&C(i[n])||co(n,t)||o?.getValue(n)?.liveStyle!==void 0)&&(s[n]=r[n]);return s}function Fc(t){return window.getComputedStyle(t)}var uo=class extends Se{constructor(){super(...arguments),this.type="html",this.renderInstance=mr;}readValueFromInstance(e,o){if(et.has(o))return this.projection?.isProjecting?ko(o):kn(e,o);{let r=Fc(e),i=(wo(o)?r.getPropertyValue(o):r[o])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:o}){return ur(e,o)}build(e,o,r){Jt(e,o,r.transformTemplate);}scrapeMotionValuesFromProps(e,o,r){return Qt(e,o,r)}};var Oc={offset:"stroke-dashoffset",array:"stroke-dasharray"},jc={offset:"strokeDashoffset",array:"strokeDasharray"};function Ds(t,e,o=1,r=0,i=true){t.pathLength=1;let s=i?Oc:jc;t[s.offset]=`${-r}`,t[s.array]=`${e} ${o}`;}var Nc=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function mo(t,{attrX:e,attrY:o,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:n=0,...a},l,u,c){if(Jt(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:m,style:f}=t;m.transform&&(f.transform=m.transform,delete m.transform),(f.transform||m.transformOrigin)&&(f.transformOrigin=m.transformOrigin??"50% 50%",delete m.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete m.transformBox);for(let p of Nc)m[p]!==void 0&&(f[p]=m[p],delete m[p]);e!==void 0&&(m.x=e),o!==void 0&&(m.y=o),r!==void 0&&(m.scale=r),i!==void 0&&Ds(m,i,s,n,false);}var fr=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"]);var fo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Es(t,e,o,r){mr(t,e,void 0,r);for(let i in e.attrs)t.setAttribute(fr.has(i)?i:xe(i),e.attrs[i]);}function po(t,e,o){let r=Qt(t,e,o);for(let i in t)if(C(t[i])||C(e[i])){let s=ht.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=t[i];}return r}var ho=class extends Se{constructor(){super(...arguments),this.type="svg",this.isSVGTag=false,this.measureInstanceViewportBox=D;}getBaseTargetFromProps(e,o){return e[o]}readValueFromInstance(e,o){if(et.has(o)){let r=qo(o);return r&&r.default||0}return o=fr.has(o)?o:xe(o),e.getAttribute(o)}scrapeMotionValuesFromProps(e,o,r){return po(e,o,r)}build(e,o,r){mo(e,o,this.isSVGTag,r.transformTemplate,r.style);}renderInstance(e,o,r,i){Es(e,o,r,i);}mount(e){this.isSVGTag=fo(e.tagName),super.mount(e);}};var Gc=to.length;function ki(t){if(!t)return;if(!t.isControllingVariants){let o=t.parent?ki(t.parent)||{}:{};return t.props.initial!==void 0&&(o.initial=t.props.initial),o}let e={};for(let o=0;o<Gc;o++){let r=to[o],i=t.props[r];(dt(i)||i===false)&&(e[r]=i);}return e}function Ii(t,e){if(!Array.isArray(e))return false;let o=e.length;if(o!==t.length)return false;for(let r=0;r<o;r++)if(e[r]!==t[r])return false;return true}var Wc=[...ar].reverse(),Uc=ar.length;function Kc(t){return e=>Promise.all(e.map(({animation:o,options:r})=>Ze(t,o,r)))}function Fi(t){let e=Kc(t),o=Rs(),r=true,i=false,s=u=>(c,m)=>{let f=Z(t,m,u==="exit"?t.presenceContext?.custom:void 0);if(f){let{transition:p,transitionEnd:h,...d}=f;c={...c,...d,...h};}return c};function n(u){e=u(t);}function a(u){let{props:c}=t,m=ki(t.parent)||{},f=[],p=new Set,h={},d=1/0;for(let x=0;x<Uc;x++){let T=Wc[x],v=o[T],V=c[T]!==void 0?c[T]:m[T],P=dt(V),j=T===u?v.isActive:null;j===false&&(d=x);let H=V===m[T]&&V!==c[T]&&P;if(H&&(r||i)&&t.manuallyAnimateOnMount&&(H=false),v.protectedKeys={...h},!v.isActive&&j===null||!V&&!v.prevProp||bt(V)||typeof V=="boolean")continue;if(T==="exit"&&v.isActive&&j!==true){v.prevResolvedValues&&(h={...h,...v.prevResolvedValues});continue}let A=Ls(v.prevProp,V),K=A||T===u&&v.isActive&&!H&&P||x>d&&P,S=false,I=Array.isArray(V)?V:[V],Y=I.reduce(s(T),{});j===false&&(Y={});let{prevResolvedValues:Wt={}}=v,lt={...Wt,...Y},xt=z=>{K=true,p.has(z)&&(S=true,p.delete(z)),v.needsAnimating[z]=true;let Q=t.getValue(z);Q&&(Q.liveStyle=false);};for(let z in lt){let Q=Y[z],Ut=Wt[z];if(h.hasOwnProperty(z))continue;let ne=false;Xe(Q)&&Xe(Ut)?ne=!Ii(Q,Ut):ne=Q!==Ut,ne?Q!=null?xt(z):p.add(z):Q!==void 0&&p.has(z)?xt(z):v.protectedKeys[z]=true;}v.prevProp=V,v.prevResolvedValues=Y,v.isActive&&(h={...h,...Y}),(r||i)&&t.blockInitialAnimation&&(K=false);let ct=H&&A;K&&(!ct||S)&&f.push(...I.map(z=>{let Q={type:T};if(typeof z=="string"&&(r||i)&&!ct&&t.manuallyAnimateOnMount&&t.parent){let{parent:Ut}=t,ne=Z(Ut,z);if(Ut.enteringChildren&&ne){let{delayChildren:al}=ne.transition||{};Q.delay=Ko(Ut.enteringChildren,t,al);}}return {animation:z,options:Q}}));}if(p.size){let x={};if(typeof c.initial!="boolean"){let T=Z(t,Array.isArray(c.initial)?c.initial[0]:c.initial);T&&T.transition&&(x.transition=T.transition);}p.forEach(T=>{let v=t.getBaseTarget(T),V=t.getValue(T);V&&(V.liveStyle=true),x[T]=v??null;}),f.push({animation:x});}let g=!!f.length;return r&&(c.initial===false||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=false),r=false,i=false,g?e(f):Promise.resolve()}function l(u,c){if(o[u].isActive===c)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(u,c)),o[u].isActive=c;let m=a(u);for(let f in o)o[f].protectedKeys={};return m}return {animateChanges:a,setActive:l,setAnimateFunction:n,getState:()=>o,reset:()=>{o=Rs(),i=true;}}}function Ls(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ii(e,t):false}function te(t=false){return {isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rs(){return {animate:te(true),whileInView:te(),whileHover:te(),whileTap:te(),whileDrag:te(),whileFocus:te(),exit:te()}}function pr(t,e){t.min=e.min,t.max=e.max;}function it(t,e){pr(t.x,e.x),pr(t.y,e.y);}function Oi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin;}var Bs=1e-4,zc=1-Bs,Hc=1+Bs,ks=.01,$c=0-ks,_c=0+ks;function O(t){return t.max-t.min}function Wi(t,e,o){return Math.abs(t-e)<=o}function ji(t,e,o,r=.5){t.origin=r,t.originPoint=w(e.min,e.max,t.origin),t.scale=O(o)/O(e),t.translate=w(o.min,o.max,t.origin)-t.originPoint,(t.scale>=zc&&t.scale<=Hc||isNaN(t.scale))&&(t.scale=1),(t.translate>=$c&&t.translate<=_c||isNaN(t.translate))&&(t.translate=0);}function ee(t,e,o,r){ji(t.x,e.x,o.x,r?r.originX:void 0),ji(t.y,e.y,o.y,r?r.originY:void 0);}function Ni(t,e,o,r=0){let i=r?w(o.min,o.max,r):o.min;t.min=i+e.min,t.max=t.min+O(e);}function Ui(t,e,o,r){Ni(t.x,e.x,o.x,r?.x),Ni(t.y,e.y,o.y,r?.y);}function Gi(t,e,o,r=0){let i=r?w(o.min,o.max,r):o.min;t.min=e.min-i,t.max=t.min+O(e);}function Pe(t,e,o,r){Gi(t.x,e.x,o.x,r?.x),Gi(t.y,e.y,o.y,r?.y);}function Is(t,e,o,r,i){return t-=e,t=so(t,1/o,r),i!==void 0&&(t=so(t,1/i,r)),t}function Yc(t,e=0,o=1,r=.5,i,s=t,n=t){if($.test(e)&&(e=parseFloat(e),e=w(n.min,n.max,e/100)-n.min),typeof e!="number")return;let a=w(s.min,s.max,r);t===s&&(a-=e),t.min=Is(t.min,e,o,a,i),t.max=Is(t.max,e,o,a,i);}function Fs(t,e,[o,r,i],s,n){Yc(t,e[o],e[r],e[i],e.scale,s,n);}var Xc=["x","scaleX","originX"],qc=["y","scaleY","originY"];function Ki(t,e,o,r){Fs(t.x,e,Xc,o?o.x:void 0,r?r.x:void 0),Fs(t.y,e,qc,o?o.y:void 0,r?r.y:void 0);}function Os(t){return t.translate===0&&t.scale===1}function zi(t){return Os(t.x)&&Os(t.y)}function js(t,e){return t.min===e.min&&t.max===e.max}function Gs(t,e){return js(t.x,e.x)&&js(t.y,e.y)}function Ns(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Hi(t,e){return Ns(t.x,e.x)&&Ns(t.y,e.y)}function $i(t){return O(t.x)/O(t.y)}function _i(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function J(t){return [t("x"),t("y")]}function Ws(t,e,o){let r="",i=t.x.translate/e.x,s=t.y.translate/e.y,n=o?.z||0;if((i||s||n)&&(r=`translate3d(${i}px, ${s}px, ${n}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),o){let{transformPerspective:u,rotate:c,rotateX:m,rotateY:f,skewX:p,skewY:h}=o;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),m&&(r+=`rotateX(${m}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),h&&(r+=`skewY(${h}deg) `);}let a=t.x.scale*e.x,l=t.y.scale*e.y;return (a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}var Hs=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Zc=Hs.length,Us=t=>typeof t=="string"?parseFloat(t):t,Ks=t=>typeof t=="number"||y.test(t);function $s(t,e,o,r,i,s){i?(t.opacity=w(0,o.opacity??1,Jc(r)),t.opacityExit=w(e.opacity??1,0,Qc(r))):s&&(t.opacity=w(e.opacity??1,o.opacity??1,r));for(let n=0;n<Zc;n++){let a=Hs[n],l=zs(e,a),u=zs(o,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Ks(l)===Ks(u)?(t[a]=Math.max(w(Us(l),Us(u),r),0),($.test(u)||$.test(l))&&(t[a]+="%")):t[a]=u;}(e.rotate||o.rotate)&&(t.rotate=w(e.rotate||0,o.rotate||0,r));}function zs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}var Jc=_s(0,.5,je),Qc=_s(.5,.95,E);function _s(t,e,o){return r=>r<t?0:r>e?1:o(ut(t,e,r))}function Ys(t,e,o){let r=C(t)?t:at(t);return r.start(_t("",r,e,o)),r.animation}function gt(t,e,o,r={passive:true}){return t.addEventListener(e,o,r),()=>t.removeEventListener(e,o)}var Xs=(t,e)=>t.depth-e.depth;var hr=class{constructor(){this.children=[],this.isDirty=false;}add(e){Kt(this.children,e),this.isDirty=true;}remove(e){At(this.children,e),this.isDirty=true;}forEach(e){this.isDirty&&this.children.sort(Xs),this.isDirty=false,this.children.forEach(e);}};function qs(t,e){let o=R.now(),r=({timestamp:i})=>{let s=i-o;s>=e&&(X(r),t(s-e));};return b.setup(r,true),()=>X(r)}function oe(t){return C(t)?t.get():t}var dr=class{constructor(){this.members=[];}add(e){Kt(this.members,e);for(let o=this.members.length-1;o>=0;o--){let r=this.members[o];if(r===e||r===this.lead||r===this.prevLead)continue;let i=r.instance;(!i||i.isConnected===false)&&!r.snapshot&&(At(this.members,r),r.unmount());}e.scheduleRender();}remove(e){if(At(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let o=this.members[this.members.length-1];o&&this.promote(o);}}relegate(e){for(let o=this.members.indexOf(e)-1;o>=0;o--){let r=this.members[o];if(r.isPresent!==false&&r.instance?.isConnected!==false)return this.promote(r),true}return false}promote(e,o){let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();let{layoutDependency:i}=r.options,{layoutDependency:s}=e.options;(i===void 0||i!==s)&&(e.resumeFrom=r,o&&(r.preserveOpacity=true),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=true)),e.options.crossfade===false&&r.hide();}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.();});}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(false));}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0);}};var re={hasAnimatedSinceResize:true,hasEverUpdated:false};var Yi=["","X","Y","Z"],tu=1e3,eu=0;function Xi(t,e,o,r){let{latestValues:i}=e;i[t]&&(o[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0));}function na(t){if(t.hasCheckedOptimisedAppear=true,t.root===t)return;let{visualElement:e}=t.options;if(!e)return;let o=$o(e);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(o,"transform",b,!(i||s));}let{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&na(r);}function gr({attachResizeListener:t,defaultParent:e,measureScroll:o,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(n={},a=e?.()){this.id=eu++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=false,this.isAnimationBlocked=false,this.isLayoutDirty=false,this.isProjectionDirty=false,this.isSharedProjectionDirty=false,this.isTransformDirty=false,this.updateManuallyBlocked=false,this.updateBlockedByResize=false,this.isUpdating=false,this.isSVG=false,this.needsReset=false,this.shouldResetTransform=false,this.hasCheckedOptimisedAppear=false,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=false,this.layoutVersion=0,this.updateScheduled=false,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=false,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=false,this.clearAllSnapshots());},this.updateProjection=()=>{this.projectionUpdateScheduled=false,this.nodes.forEach(iu),this.nodes.forEach(uu),this.nodes.forEach(mu),this.nodes.forEach(nu);},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=false,this.isVisible=true,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=n,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=true;this.root===this&&(this.nodes=new hr);}addEventListener(n,a){return this.eventHandlers.has(n)||this.eventHandlers.set(n,new yt),this.eventHandlers.get(n).add(a)}notifyListeners(n,...a){let l=this.eventHandlers.get(n);l&&l.notify(...a);}hasListeners(n){return this.eventHandlers.has(n)}mount(n){if(this.instance)return;this.isSVG=Te(n)&&!hs(n),this.instance=n;let{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(n),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=true),t){let c,m=0,f=()=>this.root.updateBlockedByResize=false;b.read(()=>{m=window.innerWidth;}),t(n,()=>{let p=window.innerWidth;p!==m&&(m=p,this.root.updateBlockedByResize=true,c&&c(),c=qs(f,250),re.hasAnimatedSinceResize&&(re.hasAnimatedSinceResize=false,this.nodes.forEach(Qs)));});}a&&this.root.registerSharedNode(a,this),this.options.animate!==false&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:m,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||u.getDefaultTransition()||gu,{onLayoutAnimationStart:d,onLayoutAnimationComplete:g}=u.getProps(),x=!this.targetLayout||!Hi(this.targetLayout,p),T=!m&&f;if(this.options.layoutRoot||this.resumeFrom||T||m&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let v={...he(h,"layout"),onPlay:d,onComplete:g};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=false),this.startAnimation(v),this.setAnimationOrigin(c,T);}else m||Qs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p;});}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let n=this.getStack();n&&n.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),X(this.updateProjection);}blockUpdate(){this.updateManuallyBlocked=true;}unblockUpdate(){this.updateManuallyBlocked=false;}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||false}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=true,this.nodes&&this.nodes.forEach(fu),this.animationId++);}getTransformTemplate(){let{visualElement:n}=this.options;return n&&n.getProps().transformTemplate}willUpdate(n=true){if(this.root.hasTreeAnimated=true,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&na(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=true;for(let c=0;c<this.path.length;c++){let m=this.path[c];m.shouldResetTransform=true,(typeof m.latestValues.x=="string"||typeof m.latestValues.y=="string")&&(m.isLayoutDirty=true),m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(false);}let{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),n&&this.notifyListeners("willUpdate");}update(){if(this.updateScheduled=false,this.isUpdateBlocked()){let l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=false,this.clearAllSnapshots(),l&&this.nodes.forEach(au),this.nodes.forEach(Zs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Js);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=false,this.nodes.forEach(lu),this.nodes.forEach(cu),this.nodes.forEach(ou),this.nodes.forEach(ru)):this.nodes.forEach(Js),this.clearAllSnapshots();let a=R.now();B.delta=N(0,1e3/60,a-B.timestamp),B.timestamp=a,B.isProcessing=true,Ke.update.process(B),Ke.preRender.process(B),Ke.render.process(B),B.isProcessing=false;}didUpdate(){this.updateScheduled||(this.updateScheduled=true,Xt.read(this.scheduleUpdate));}clearAllSnapshots(){this.nodes.forEach(su),this.sharedNodes.forEach(pu);}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=true,b.preRender(this.updateProjection,false,true));}scheduleCheckAfterUnmount(){b.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed();});}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!O(this.snapshot.measuredBox.x)&&!O(this.snapshot.measuredBox.y)&&(this.snapshot=void 0));}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let n=this.layout;this.layout=this.measure(false),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=D()),this.isLayoutDirty=false,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,n?n.layoutBox:void 0);}updateScroll(n="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===n&&(a=false),a&&this.instance){let l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:n,isRoot:l,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l};}}resetTransform(){if(!i)return;let n=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!zi(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;n&&this.instance&&(a||Pt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=false,this.scheduleRender());}measure(n=true){let a=this.measurePageBox(),l=this.removeElementScroll(a);return n&&(l=this.removeTransform(l)),xu(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:n}=this.options;if(!n)return D();let a=n.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(yu))){let{scroll:u}=this.root;u&&(rt(a.x,u.offset.x),rt(a.y,u.offset.y));}return a}removeElementScroll(n){let a=D();if(it(a,n),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){let u=this.path[l],{scroll:c,options:m}=u;u!==this.root&&c&&m.layoutScroll&&(c.wasRoot&&it(a,n),rt(a.x,c.offset.x),rt(a.y,c.offset.y));}return a}applyTransform(n,a=false,l){let u=l||D();it(u,n);for(let c=0;c<this.path.length;c++){let m=this.path[c];!a&&m.options.layoutScroll&&m.scroll&&m!==m.root&&(rt(u.x,-m.scroll.offset.x),rt(u.y,-m.scroll.offset.y)),Pt(m.latestValues)&&ao(u,m.latestValues,m.layout?.layoutBox);}return Pt(this.latestValues)&&ao(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(n){let a=D();it(a,n);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!Pt(u.latestValues))continue;let c;u.instance&&(cr(u.latestValues)&&u.updateSnapshot(),c=D(),it(c,u.measurePageBox())),Ki(a,u.latestValues,u.snapshot?.layoutBox,c);}return Pt(this.latestValues)&&Ki(a,this.latestValues),a}setTargetDelta(n){this.targetDelta=n,this.root.scheduleUpdateProjection(),this.isProjectionDirty=true;}setOptions(n){this.options={...this.options,...n,crossfade:n.crossfade!==void 0?n.crossfade:true};}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=false;}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==B.timestamp&&this.relativeParent.resolveTargetDelta(true);}resolveTargetDelta(n=false){let a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==a;if(!(n||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:m}=this.options;if(!this.layout||!(c||m))return;this.resolvedRelativeTargetAt=B.timestamp;let f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==false&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=D(),this.targetWithTransforms=D()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ui(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,false,this.target):it(this.target,this.layout.layoutBox),Li(this.target,this.targetDelta)):it(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=false,this.options.layoutAnchor!==false&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0),q.value);}getClosestProjectingParent(){if(!(!this.parent||cr(this.parent.latestValues)||Ei(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return !!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(n,a,l){this.relativeParent=n,this.linkedParentVersion=n.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),Pe(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),it(this.relativeTarget,this.relativeTargetOrigin);}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0;}calcProjection(){let n=this.getLead(),a=!!this.resumingFrom||this!==n,l=true;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=false),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=false),this.resolvedRelativeTargetAt===B.timestamp&&(l=false),l)return;let{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;it(this.layoutCorrected,this.layout.layoutBox);let m=this.treeScale.x,f=this.treeScale.y;ws(this.layoutCorrected,this.treeScale,this.path,a),n.layout&&!n.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(n.target=n.layout.layoutBox,n.targetWithTransforms=D());let{target:p}=n;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Oi(this.prevProjectionDelta.x,this.projectionDelta.x),Oi(this.prevProjectionDelta.y,this.projectionDelta.y)),ee(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==f||!_i(this.projectionDelta.x,this.prevProjectionDelta.x)||!_i(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=true,this.scheduleRender(),this.notifyListeners("projectionUpdate",p));}hide(){this.isVisible=false;}show(){this.isVisible=true;}scheduleRender(n=true){if(this.options.visualElement?.scheduleRender(),n){let a=this.getStack();a&&a.scheduleRender();}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0);}createProjectionDeltas(){this.prevProjectionDelta=It(),this.projectionDelta=It(),this.projectionDeltaWithTransform=It();}setAnimationOrigin(n,a=false){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},m=It();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;let f=D(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,d=p!==h,g=this.getStack(),x=!g||g.members.length<=1,T=!!(d&&!x&&this.options.crossfade===true&&!this.path.some(du));this.animationProgress=0;let v;this.mixTargetDelta=V=>{let P=V/1e3;ta(m.x,n.x,P),ta(m.y,n.y,P),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pe(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),hu(this.relativeTarget,this.relativeTargetOrigin,f,P),v&&Gs(this.relativeTarget,v)&&(this.isProjectionDirty=false),v||(v=D()),it(v,this.relativeTarget)),d&&(this.animationValues=c,$s(c,u,this.latestValues,P,T,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P;},this.mixTargetDelta(this.options.layoutRoot?1e3:0);}startAnimation(n){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(X(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=b.update(()=>{re.hasAnimatedSinceResize=true,this.motionValue||(this.motionValue=at(0)),this.motionValue.jump(0,false),this.currentAnimation=Ys(this.motionValue,[0,1e3],{...n,velocity:0,isSync:true,onUpdate:a=>{this.mixTargetDelta(a),n.onUpdate&&n.onUpdate(a);},onStop:()=>{},onComplete:()=>{n.onComplete&&n.onComplete(),this.completeAnimation();}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0;});}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let n=this.getStack();n&&n.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete");}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(tu),this.currentAnimation.stop()),this.completeAnimation();}applyTransformsToTarget(){let n=this.getLead(),{targetWithTransforms:a,target:l,layout:u,latestValues:c}=n;if(!(!a||!l||!u)){if(this!==n&&this.layout&&u&&sa(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||D();let m=O(this.layout.layoutBox.x);l.x.min=n.target.x.min,l.x.max=l.x.min+m;let f=O(this.layout.layoutBox.y);l.y.min=n.target.y.min,l.y.max=l.y.min+f;}it(a,l),ao(a,c),ee(this.projectionDeltaWithTransform,this.layoutCorrected,a,c);}}registerSharedNode(n,a){this.sharedNodes.has(n)||this.sharedNodes.set(n,new dr),this.sharedNodes.get(n).add(a);let u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0});}isLead(){let n=this.getStack();return n?n.lead===this:true}getLead(){let{layoutId:n}=this.options;return n?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:n}=this.options;return n?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:n}=this.options;if(n)return this.root.sharedNodes.get(n)}promote({needsReset:n,transition:a,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),n&&(this.projectionDelta=void 0,this.needsReset=true),a&&this.setOptions({transition:a});}relegate(){let n=this.getStack();return n?n.relegate(this):false}resetSkewAndRotation(){let{visualElement:n}=this.options;if(!n)return;let a=false,{latestValues:l}=n;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=true),!a)return;let u={};l.z&&Xi("z",n,u,this.animationValues);for(let c=0;c<Yi.length;c++)Xi(`rotate${Yi[c]}`,n,u,this.animationValues),Xi(`skew${Yi[c]}`,n,u,this.animationValues);n.render();for(let c in u)n.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);n.scheduleRender();}applyProjectionStyles(n,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){n.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=false,n.visibility="",n.opacity="",n.pointerEvents=oe(a?.pointerEvents)||"",n.transform=l?l(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(n.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,n.pointerEvents=oe(a?.pointerEvents)||""),this.hasProjected&&!Pt(this.latestValues)&&(n.transform=l?l({},""):"none",this.hasProjected=false);return}n.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let m=Ws(this.projectionDeltaWithTransform,this.treeScale,c);l&&(m=l(c,m)),n.transform=m;let{x:f,y:p}=this.projectionDelta;n.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?n.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:n.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(let h in lo){if(c[h]===void 0)continue;let{correct:d,applyTo:g,isCSSVariable:x}=lo[h],T=m==="none"?c[h]:d(c[h],u);if(g){let v=g.length;for(let V=0;V<v;V++)n[g[V]]=T;}else x?this.options.visualElement.renderState.vars[h]=T:n[h]=T;}this.options.layoutId&&(n.pointerEvents=u===this?oe(a?.pointerEvents)||"":"none");}clearSnapshot(){this.resumeFrom=this.snapshot=void 0;}resetTree(){this.root.nodes.forEach(n=>n.currentAnimation?.stop()),this.root.nodes.forEach(Zs),this.root.sharedNodes.clear();}}}function ou(t){t.updateLayout();}function ru(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:o,measuredBox:r}=t.layout,{animationType:i}=t.options,s=e.source!==t.layout.source;if(i==="size")J(c=>{let m=s?e.measuredBox[c]:e.layoutBox[c],f=O(m);m.min=o[c].min,m.max=m.min+f;});else if(i==="x"||i==="y"){let c=i==="x"?"y":"x";pr(s?e.measuredBox[c]:e.layoutBox[c],o[c]);}else sa(i,e.layoutBox,o)&&J(c=>{let m=s?e.measuredBox[c]:e.layoutBox[c],f=O(o[c]);m.max=m.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=true,t.relativeTarget[c].max=t.relativeTarget[c].min+f);});let n=It();ee(n,o,e.layoutBox);let a=It();s?ee(a,t.applyTransform(r,true),e.measuredBox):ee(a,o,e.layoutBox);let l=!zi(n),u=false;if(!t.resumeFrom){let c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){let{snapshot:m,layout:f}=c;if(m&&f){let p=t.options.layoutAnchor||void 0,h=D();Pe(h,e.layoutBox,m.layoutBox,p);let d=D();Pe(d,o,f.layoutBox,p),Hi(h,d)||(u=true),c.options.layoutRoot&&(t.relativeTarget=d,t.relativeTargetOrigin=h,t.relativeParent=c);}}}t.notifyListeners("didUpdate",{layout:o,snapshot:e,delta:a,layoutDelta:n,hasLayoutChanged:l,hasRelativeLayoutChanged:u});}else if(t.isLead()){let{onExitComplete:o}=t.options;o&&o();}t.options.transition=void 0;}function iu(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 nu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=false;}function su(t){t.clearSnapshot();}function Zs(t){t.clearMeasurements();}function au(t){t.isLayoutDirty=true,t.updateLayout();}function Js(t){t.isLayoutDirty=false;}function lu(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=true);}function cu(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform();}function Qs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=true;}function uu(t){t.resolveTargetDelta();}function mu(t){t.calcProjection();}function fu(t){t.resetSkewAndRotation();}function pu(t){t.removeLeadSnapshot();}function ta(t,e,o){t.translate=w(e.translate,0,o),t.scale=w(e.scale,1,o),t.origin=e.origin,t.originPoint=e.originPoint;}function ea(t,e,o,r){t.min=w(e.min,o.min,r),t.max=w(e.max,o.max,r);}function hu(t,e,o,r){ea(t.x,e.x,o.x,r),ea(t.y,e.y,o.y,r);}function du(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}var gu={duration:.45,ease:[.4,0,.1,1]},oa=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ra=oa("applewebkit/")&&!oa("chrome/")?Math.round:E;function ia(t){t.min=ra(t.min),t.max=ra(t.max);}function xu(t){ia(t.x),ia(t.y);}function sa(t,e,o){return t==="position"||t==="preserve-aspect"&&!Wi($i(e),$i(o),.2)}function yu(t){return t!==t.root&&t.scroll?.wasRoot}var aa=gr({attachResizeListener:(t,e)=>gt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>true});var xr={current:void 0},go=gr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!xr.current){let t=new aa({});t.mount(window),t.setOptions({layoutScroll:true}),xr.current=t;}return xr.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none";},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});var la=["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 we(t){return typeof t!="string"||t.includes("-")?false:!!(la.indexOf(t)>-1||/[A-Z]/u.test(t))}var ca=(t,e)=>e.isSVG??we(t)?new ho(e):new uo(e,{allowProjection:t!==Fragment});var yr=createContext({});var vr=createContext({strict:false});var Tr=createContext({transformPagePoint:t=>t,isStatic:false,reducedMotion:"never"});var jt=createContext({});function ua(t,e){if(Ft(t)){let{initial:o,animate:r}=t;return {initial:o===false||dt(o)?o:void 0,animate:dt(r)?r:void 0}}return t.inherit!==false?e:{}}function fa(t){let{initial:e,animate:o}=ua(t,useContext(jt));return useMemo(()=>({initial:e,animate:o}),[ma(e),ma(o)])}function ma(t){return Array.isArray(t)?t.join(" "):t}var Ae=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qi(t,e,o){for(let r in e)!C(e[r])&&!co(r,o)&&(t[r]=e[r]);}function Cu({transformTemplate:t},e){return useMemo(()=>{let o=Ae();return Jt(o,e,t),Object.assign({},o.vars,o.style)},[e])}function Mu(t,e){let o=t.style||{},r={};return qi(r,o,t),Object.assign(r,Cu(t,e)),r}function pa(t,e){let o={},r=Mu(t,e);return t.drag&&t.dragListener!==false&&(o.draggable=false,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===true?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(o.tabIndex=0),o.style=r,o}var Vr=()=>({...Ae(),attrs:{}});function ha(t,e,o,r){let i=useMemo(()=>{let s=Vr();return mo(s,e,fo(r),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){let s={};qi(s,t.style,t),i.style={...s,...i.style};}return i}var Eu=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","propagate","ignoreStrict","viewport"]);function xo(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Eu.has(t)}var da=t=>!xo(t);function Ru(t){typeof t=="function"&&(da=e=>e.startsWith("on")?!xo(e):t(e));}try{Ru(sn("@emotion/is-prop-valid").default);}catch{}function ga(t,e,o){let r={};for(let i in t)i==="values"&&typeof t.values=="object"||C(t[i])||(da(i)||o===true&&xo(i)||!e&&!xo(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function xa(t,e,o,{latestValues:r},i,s=false,n){let l=(n??we(t)?ha:pa)(e,r,i,t),u=ga(e,typeof t=="string",s),c=t!==Fragment?{...u,...l,ref:o}:{},{children:m}=e,f=useMemo(()=>C(m)?m.get():m,[m]);return createElement(t,{...c,children:f})}var Ce=createContext(null);function Sr(t){let e=useRef(null);return e.current===null&&(e.current=t()),e.current}function Ou({scrapeMotionValuesFromProps:t,createRenderState:e},o,r,i){return {latestValues:ju(o,r,i,t),renderState:e()}}function ju(t,e,o,r){let i={},s=r(t,{});for(let f in s)i[f]=oe(s[f]);let{initial:n,animate:a}=t,l=Ft(t),u=eo(t);e&&u&&!l&&t.inherit!==false&&(n===void 0&&(n=e.initial),a===void 0&&(a=e.animate));let c=o?o.initial===false:false;c=c||n===false;let m=c?a:n;if(m&&typeof m!="boolean"&&!bt(m)){let f=Array.isArray(m)?m:[m];for(let p=0;p<f.length;p++){let h=Yt(t,f[p]);if(h){let{transitionEnd:d,transition:g,...x}=h;for(let T in x){let v=x[T];if(Array.isArray(v)){let V=c?v.length-1:0;v=v[V];}v!==null&&(i[T]=v);}for(let T in d)i[T]=d[T];}}}return i}var br=t=>(e,o)=>{let r=useContext(jt),i=useContext(Ce),s=()=>Ou(t,e,r,i);return o?s():Sr(s)};var va=br({scrapeMotionValuesFromProps:Qt,createRenderState:Ae});var Ta=br({scrapeMotionValuesFromProps:po,createRenderState:Vr});var Va={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"]},Sa=false;function Nu(){if(Sa)return;let t={};for(let e in Va)t[e]={isEnabled:o=>Va[e].some(r=>!!o[r])};io(t),Sa=true;}function Pr(){return Nu(),Ai()}function ba(t){let e=Pr();for(let o in t)e[o]={...e[o],...t[o]};io(e);}var Pa=Symbol.for("motionComponentSymbol");function Aa(t,e,o){let r=useRef(o);useInsertionEffect(()=>{r.current=o;});let i=useRef(null);return useCallback(s=>{s&&t.onMount?.(s);let n=r.current;if(typeof n=="function")if(s){let a=n(s);typeof a=="function"&&(i.current=a);}else i.current?(i.current(),i.current=null):n(s);else n&&(n.current=s);e&&(s?e.mount(s):e.unmount());},[e])}var wr=createContext({});function Nt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}var Ca=typeof window<"u";var Ar=Ca?useLayoutEffect:useEffect;function Ma(t,e,o,r,i,s){let{visualElement:n}=useContext(jt),a=useContext(vr),l=useContext(Ce),u=useContext(Tr),c=u.reducedMotion,m=u.skipAnimations,f=useRef(null),p=useRef(false);r=r||a.renderer,!f.current&&r&&(f.current=r(t,{visualState:e,parent:n,props:o,presenceContext:l,blockInitialAnimation:l?l.initial===false:false,reducedMotionConfig:c,skipAnimations:m,isSVG:s}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=true));let h=f.current,d=useContext(wr);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&_u(f.current,o,i,d);let g=useRef(false);useInsertionEffect(()=>{h&&g.current&&h.update(o,l);});let x=o[qe],T=useRef(!!x&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(x)&&window.MotionHasOptimisedAnimation?.(x));return Ar(()=>{p.current=true,h&&(g.current=true,window.MotionIsMounted=true,h.updateFeatures(),h.scheduleRenderMicrotask(),T.current&&h.animationState&&h.animationState.animateChanges());}),useEffect(()=>{h&&(!T.current&&h.animationState&&h.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(x);}),T.current=false),h.enteringChildren=void 0);}),h}function _u(t,e,o,r){let{layoutId:i,layout:s,drag:n,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:m}=e;t.projection=new o(t.latestValues,e["data-framer-portal-id"]?void 0:Da(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!n||a&&Nt(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:l,layoutRoot:u,layoutAnchor:c});}function Da(t){if(t)return t.options.allowProjection!==false?t.projection:Da(t.parent)}function Mr(t,{forwardMotionProps:e=false,type:o}={},r,i){r&&ba(r);let s=o?o==="svg":we(t),n=s?Ta:va;function a(u,c){let m,f={...useContext(Tr),...u,layoutId:Zu(u)},{isStatic:p}=f,h=fa(u),d=n(u,p);if(!p&&typeof window<"u"){Ju(f,r);let g=Qu(f);m=g.MeasureLayout,h.visualElement=Ma(t,d,f,i,g.ProjectionNode,s);}return jsxs(jt.Provider,{value:h,children:[m&&h.visualElement?jsx(m,{visualElement:h.visualElement,...f}):null,xa(t,u,Aa(d,h.visualElement,c),d,p,e,s)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;let l=forwardRef(a);return l[Pa]=t,l}function Zu({layoutId:t}){let e=useContext(yr).id;return e&&t!==void 0?e+"-"+t:t}function Ju(t,e){let o=useContext(vr).strict;if(process.env.NODE_ENV!=="production"&&e&&o){let r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?tt(false,r,"lazy-strict-mode"):F(false,r,"lazy-strict-mode");}}function Qu(t){let e=Pr(),{drag:o,layout:r}=e;if(!o&&!r)return {};let i={...o,...r};return {MeasureLayout:o?.isEnabled(t)||r?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Ea(t,e){if(typeof Proxy>"u")return Mr;let o=new Map,r=(s,n)=>Mr(s,n,t,e),i=(s,n)=>(process.env.NODE_ENV!=="production"&&vt(false,"motion() is deprecated. Use motion.create() instead."),r(s,n));return new Proxy(i,{get:(s,n)=>n==="create"?r:(o.has(n)||o.set(n,Mr(n,void 0,t,e)),o.get(n))})}var Dr=class extends W{constructor(e){super(e),e.animationState||(e.animationState=Fi(e));}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();bt(e)&&(this.unmountControls=e.subscribe(this.node));}mount(){this.updateAnimationControlsSubscription();}update(){let{animate:e}=this.node.getProps(),{animate:o}=this.node.prevProps||{};e!==o&&this.updateAnimationControlsSubscription();}unmount(){this.node.animationState.reset(),this.unmountControls?.();}};var tm=0,Er=class extends W{constructor(){super(...arguments),this.id=tm++,this.isExitComplete=false;}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:o}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;if(e&&r===false){if(this.isExitComplete){let{initial:s,custom:n}=this.node.getProps();if(typeof s=="string"){let a=Z(this.node,s,n);if(a){let{transition:l,transitionEnd:u,...c}=a;for(let m in c)this.node.getValue(m)?.jump(c[m]);}}this.node.animationState.reset(),this.node.animationState.animateChanges();}else this.node.animationState.setActive("exit",false);this.isExitComplete=false;return}let i=this.node.animationState.setActive("exit",!e);o&&!e&&i.then(()=>{this.isExitComplete=true,o(this.id);});}mount(){let{register:e,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),e&&(this.unmount=e(this.id));}unmount(){}};var Ra={animation:{Feature:Dr},exit:{Feature:Er}};function wt(t){return {point:{x:t.pageX,y:t.pageY}}}var La=t=>e=>qt(e)&&t(e,wt(e));function Gt(t,e,o,r){return gt(t,e,La(o),r)}var Rr=({current:t})=>t?t.ownerDocument.defaultView:null;var Ba=(t,e)=>Math.abs(t-e);function ka(t,e){let o=Ba(t.x,e.x),r=Ba(t.y,e.y);return Math.sqrt(o**2+r**2)}var Ia=new Set(["auto","scroll"]),Me=class{constructor(e,o,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=false,distanceThreshold:n=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target);},this.onWindowScroll=()=>{this.handleScroll(window);},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Lr(this.lastRawMoveEventInfo,this.transformPagePoint));let p=Ji(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=ka(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!d)return;let{point:g}=p,{timestamp:x}=B;this.history.push({...g,timestamp:x});let{onStart:T,onMove:v}=this.handlers;h||(T&&T(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p);},this.handlePointerMove=(p,h)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=h,this.lastMoveEventInfo=Lr(h,this.transformPagePoint),b.update(this.updatePoint,true);},this.handlePointerUp=(p,h)=>{this.end();let{onEnd:d,onSessionEnd:g,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let T=Ji(p.type==="pointercancel"?this.lastMoveEventInfo:Lr(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(p,T),g&&g(p,T);},!qt(e))return;this.dragSnapToOrigin=s,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=n,this.contextWindow=i||window;let l=wt(e),u=Lr(l,this.transformPagePoint),{point:c}=u,{timestamp:m}=B;this.history=[{...c,timestamp:m}];let{onSessionStart:f}=o;f&&f(e,Ji(u,this.history)),this.removeListeners=nt(Gt(this.contextWindow,"pointermove",this.handlePointerMove),Gt(this.contextWindow,"pointerup",this.handlePointerUp),Gt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a);}startScrollTracking(e){let o=e.parentElement;for(;o;){let r=getComputedStyle(o);(Ia.has(r.overflowX)||Ia.has(r.overflowY))&&this.scrollPositions.set(o,{x:o.scrollLeft,y:o.scrollTop}),o=o.parentElement;}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:true}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:true}),window.removeEventListener("scroll",this.onWindowScroll);};}handleScroll(e){let o=this.scrollPositions.get(e);if(!o)return;let r=e===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:i.x-o.x,y:i.y-o.y};s.x===0&&s.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(e,i),b.update(this.updatePoint,true));}updateHandlers(e){this.handlers=e;}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),X(this.updatePoint);}};function Lr(t,e){return e?{point:e(t.point)}:t}function Fa(t,e){return {x:t.x-e.x,y:t.y-e.y}}function Ji({point:t},e){return {point:t,delta:Fa(t,Oa(e)),offset:Fa(t,em(e)),velocity:om(e,.1)}}function em(t){return t[0]}function Oa(t){return t[t.length-1]}function om(t,e){if(t.length<2)return {x:0,y:0};let o=t.length-1,r=null,i=Oa(t);for(;o>=0&&(r=t[o],!(i.timestamp-r.timestamp>k(e)));)o--;if(!r)return {x:0,y:0};r===t[0]&&t.length>2&&i.timestamp-r.timestamp>k(e)*2&&(r=t[1]);let s=U(i.timestamp-r.timestamp);if(s===0)return {x:0,y:0};let n={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return n.x===1/0&&(n.x=0),n.y===1/0&&(n.y=0),n}function Ua(t,{min:e,max:o},r){return e!==void 0&&t<e?t=r?w(e,t,r.min):Math.max(t,e):o!==void 0&&t>o&&(t=r?w(o,t,r.max):Math.min(t,o)),t}function ja(t,e,o){return {min:e!==void 0?t.min+e:void 0,max:o!==void 0?t.max+o-(t.max-t.min):void 0}}function Ka(t,{top:e,left:o,bottom:r,right:i}){return {x:ja(t.x,o,i),y:ja(t.y,e,r)}}function Na(t,e){let o=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([o,r]=[r,o]),{min:o,max:r}}function za(t,e){return {x:Na(t.x,e.x),y:Na(t.y,e.y)}}function Ha(t,e){let o=.5,r=O(t),i=O(e);return i>r?o=ut(e.min,e.max-r,t.min):r>i&&(o=ut(t.min,t.max-i,e.min)),N(0,1,o)}function $a(t,e){let o={};return e.min!==void 0&&(o.min=e.min-t.min),e.max!==void 0&&(o.max=e.max-t.min),o}var Br=.35;function _a(t=Br){return t===false?t=0:t===true&&(t=Br),{x:Ga(t,"left","right"),y:Ga(t,"top","bottom")}}function Ga(t,e,o){return {min:Wa(t,e),max:Wa(t,o)}}function Wa(t,e){return typeof t=="number"?t:t[e]||0}var rm=new WeakMap,Ir=class{constructor(e){this.openDragLock=null,this.isDragging=false,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=false,this.hasMutatedConstraints=false,this.elastic=D(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e;}start(e,{snapToCursor:o=false,distanceThreshold:r}={}){let{presenceContext:i}=this.visualElement;if(i&&i.isPresent===false)return;let s=m=>{o&&this.snapToCursor(wt(m).point),this.stopAnimation();},n=(m,f)=>{let{drag:p,dragPropagation:h,onDragStart:d}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=xi(p),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=f,this.isDragging=true,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=true,this.visualElement.projection.target=void 0),J(x=>{let T=this.getAxisMotionValue(x).get()||0;if($.test(T)){let{projection:v}=this.visualElement;if(v&&v.layout){let V=v.layout.layoutBox[x];V&&(T=O(V)*(parseFloat(T)/100));}}this.originPoint[x]=T;}),d&&b.update(()=>d(m,f),false,true),ge(this.visualElement,"transform");let{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",true);},a=(m,f)=>{this.latestPointerEvent=m,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:h,onDirectionLock:d,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:x}=f;if(h&&this.currentDirection===null){this.currentDirection=nm(x),this.currentDirection!==null&&d&&d(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),g&&b.update(()=>g(m,f),false,true);},l=(m,f)=>{this.latestPointerEvent=m,this.latestPanInfo=f,this.stop(m,f),this.latestPointerEvent=null,this.latestPanInfo=null;},u=()=>{let{dragSnapToOrigin:m}=this.getProps();(m||this.constraints)&&this.startAnimation({x:0,y:0});},{dragSnapToOrigin:c}=this.getProps();this.panSession=new Me(e,{onSessionStart:s,onStart:n,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Rr(this.visualElement),element:this.visualElement.current});}stop(e,o){let r=e||this.latestPointerEvent,i=o||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!r)return;let{velocity:n}=i;this.startAnimation(n);let{onDragEnd:a}=this.getProps();a&&b.postRender(()=>a(r,i));}cancel(){this.isDragging=false;let{projection:e,animationState:o}=this.visualElement;e&&(e.isAnimationBlocked=false),this.endPanSession();let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",false);}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0;}updateAxis(e,o,r){let{drag:i}=this.getProps();if(!r||!kr(e,i,this.currentDirection))return;let s=this.getAxisMotionValue(e),n=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(n=Ua(n,this.constraints[e],this.elastic[e])),s.set(n);}resolveConstraints(){let{dragConstraints:e,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(false):this.visualElement.projection?.layout,i=this.constraints;e&&Nt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=Ka(r.layoutBox,e):this.constraints=false,this.elastic=_a(o),i!==this.constraints&&!Nt(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&J(s=>{this.constraints!==false&&this.getAxisMotionValue(s)&&(this.constraints[s]=$a(r.layoutBox[s],this.constraints[s]));});}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:o}=this.getProps();if(!e||!Nt(e))return false;let r=e.current;F(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:i}=this.visualElement;if(!i||!i.layout)return false;let s=Bi(r,i.root,this.visualElement.getTransformPagePoint()),n=za(i.layout.layoutBox,s);if(o){let a=o(Ci(n));this.hasMutatedConstraints=!!a,a&&(n=no(a));}return n}startAnimation(e){let{drag:o,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:n,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=J(c=>{if(!kr(c,o,this.currentDirection))return;let m=l&&l[c]||{};(n===true||n===c)&&(m={min:0,max:0});let f=i?200:1e6,p=i?40:1e7,h={type:"inertia",velocity:r?e[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...m};return this.startAxisValueAnimation(c,h)});return Promise.all(u).then(a)}startAxisValueAnimation(e,o){let r=this.getAxisMotionValue(e);return ge(this.visualElement,e),r.start(_t(e,r,0,o,this.visualElement,false))}stopAnimation(){J(e=>this.getAxisMotionValue(e).stop());}getAxisMotionValue(e){let o=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[o];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){J(o=>{let{drag:r}=this.getProps();if(!kr(o,r,this.currentDirection))return;let{projection:i}=this.visualElement,s=this.getAxisMotionValue(o);if(i&&i.layout){let{min:n,max:a}=i.layout.layoutBox[o],l=s.get()||0;s.set(e[o]-w(n,a,.5)+l);}});}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!Nt(o)||!r||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};J(n=>{let a=this.getAxisMotionValue(n);if(a&&this.constraints!==false){let l=a.get();i[n]=Ha({min:l,max:l},this.constraints[n]);}});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=false,this.resolveConstraints(),J(n=>{if(!kr(n,e,null))return;let a=this.getAxisMotionValue(n),{min:l,max:u}=this.constraints[n];a.set(w(l,u,i[n]));}),this.visualElement.render();}addListeners(){if(!this.visualElement.current)return;rm.set(this.visualElement,this);let e=this.visualElement.current,o=Gt(e,"pointerdown",u=>{let{drag:c,dragListener:m=true}=this.getProps(),f=u.target,p=f!==e&&Vi(f);c&&m&&!p&&this.start(u);}),r,i=()=>{let{dragConstraints:u}=this.getProps();Nt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=im(e,u.current,()=>this.scalePositionWithinConstraints())));},{projection:s}=this.visualElement,n=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),b.read(i);let a=gt(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(J(m=>{let f=this.getAxisMotionValue(m);f&&(this.originPoint[m]+=u[m].translate,f.set(f.get()+u[m].translate));}),this.visualElement.render());}));return ()=>{a(),o(),n(),l&&l(),r&&r();}}getProps(){let e=this.visualElement.getProps(),{drag:o=false,dragDirectionLock:r=false,dragPropagation:i=false,dragConstraints:s=false,dragElastic:n=Br,dragMomentum:a=true}=e;return {...e,drag:o,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:n,dragMomentum:a}}};function Ya(t){let e=true;return ()=>{if(e){e=false;return}t();}}function im(t,e,o){let r=sr(t,Ya(o)),i=sr(e,Ya(o));return ()=>{r(),i();}}function kr(t,e,o){return (e===true||e===t)&&(o===null||o===t)}function nm(t,e=10){let o=null;return Math.abs(t.y)>e?o="y":Math.abs(t.x)>e&&(o="x"),o}var Fr=class extends W{constructor(e){super(e),this.removeGroupControls=E,this.removeListeners=E,this.controls=new Ir(e);}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||E;}update(){let{dragControls:e}=this.node.getProps(),{dragControls:o}=this.node.prevProps||{};e!==o&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)));}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession();}};var Qi=t=>(e,o)=>{t&&b.update(()=>t(e,o),false,true);},Or=class extends W{constructor(){super(...arguments),this.removePointerDownListener=E;}onPointerDown(e){this.session=new Me(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Rr(this.node)});}createPanHandlers(){let{onPanSessionStart:e,onPanStart:o,onPan:r,onPanEnd:i}=this.node.getProps();return {onSessionStart:Qi(e),onStart:Qi(o),onMove:Qi(r),onEnd:(s,n)=>{delete this.session,i&&b.postRender(()=>i(s,n));}}}mount(){this.removePointerDownListener=Gt(this.node.current,"pointerdown",e=>this.onPointerDown(e));}update(){this.session&&this.session.updateHandlers(this.createPanHandlers());}unmount(){this.removePointerDownListener(),this.session&&this.session.end();}};function Xa(t=true){let e=useContext(Ce);if(e===null)return [true,null];let{isPresent:o,onExitComplete:r,register:i}=e,s=useId();useEffect(()=>{if(t)return i(s)},[t]);let n=useCallback(()=>t&&r&&r(s),[s,r,t]);return !o&&r?[false,n]:[true]}var tn=false,en=class extends Component{componentDidMount(){let{visualElement:e,layoutGroup:o,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=e;s&&(o.group&&o.group.add(s),r&&r.register&&i&&r.register(s),tn&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove();}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),re.hasEverUpdated=true;}getSnapshotBeforeUpdate(e){let{layoutDependency:o,visualElement:r,drag:i,isPresent:s}=this.props,{projection:n}=r;return n&&(n.isPresent=s,e.layoutDependency!==o&&n.setOptions({...n.options,layoutDependency:o}),tn=true,i||e.layoutDependency!==o||o===void 0||e.isPresent!==s?n.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?n.promote():n.relegate()||b.postRender(()=>{let a=n.getStack();(!a||!a.members.length)&&this.safeToRemove();}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:o}=this.props,{projection:r}=e;r&&(r.options.layoutAnchor=o,r.root.didUpdate(),Xt.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove();}));}componentWillUnmount(){let{visualElement:e,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:i}=e;tn=true,i&&(i.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(i),r&&r.deregister&&r.deregister(i));}safeToRemove(){let{safeToRemove:e}=this.props;e&&e();}render(){return null}};function jr(t){let[e,o]=Xa(),r=useContext(yr);return jsx(en,{...t,layoutGroup:r,switchLayoutGroup:useContext(wr),isPresent:e,safeToRemove:o})}var Za={pan:{Feature:Or},drag:{Feature:Fr,ProjectionNode:go,MeasureLayout:jr}};function Ja(t,e,o){let{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",o==="Start");let i="onHover"+o,s=r[i];s&&b.postRender(()=>s(e,wt(e)));}var Nr=class extends W{mount(){let{current:e}=this.node;e&&(this.unmount=yi(e,(o,r)=>(Ja(this.node,r,"Start"),i=>Ja(this.node,i,"End"))));}unmount(){}};var Gr=class extends W{constructor(){super(...arguments),this.isActive=false;}onFocus(){let e=false;try{e=this.node.current.matches(":focus-visible");}catch{e=true;}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",true),this.isActive=true);}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",false),this.isActive=false);}mount(){this.unmount=nt(gt(this.node.current,"focus",()=>this.onFocus()),gt(this.node.current,"blur",()=>this.onBlur()));}unmount(){}};function Qa(t,e,o){let{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",o==="Start");let i="onTap"+(o==="End"?"":o),s=r[i];s&&b.postRender(()=>s(e,wt(e)));}var Wr=class extends W{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:o,propagate:r}=this.node.props;this.unmount=bi(e,(i,s)=>(Qa(this.node,s,"Start"),(n,{success:a})=>Qa(this.node,n,a?"End":"Cancel")),{useGlobalTarget:o,stopPropagation:r?.tap===false});}unmount(){}};var rn=new WeakMap,on=new WeakMap,fm=t=>{let e=rn.get(t.target);e&&e(t);},pm=t=>{t.forEach(fm);};function hm({root:t,...e}){let o=t||document;on.has(o)||on.set(o,{});let r=on.get(o),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(pm,{root:t,...e})),r[i]}function tl(t,e,o){let r=hm(e);return rn.set(t,o),r.observe(t),()=>{rn.delete(t),r.unobserve(t);}}var dm={some:0,all:1},Ur=class extends W{constructor(){super(...arguments),this.hasEnteredView=false,this.isInView=false;}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:o,margin:r,amount:i="some",once:s}=e,n={root:o?o.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:dm[i]},a=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=true),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:c,onViewportLeave:m}=this.node.getProps(),f=u?c:m;f&&f(l);};this.stopObserver=tl(this.node.current,n,a);}mount(){this.startObserver();}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:o}=this.node;["amount","margin","root"].some(gm(e,o))&&this.startObserver();}unmount(){this.stopObserver?.(),this.hasEnteredView=false,this.isInView=false;}};function gm({viewport:t={}},{viewport:e={}}={}){return o=>t[o]!==e[o]}var el={inView:{Feature:Ur},tap:{Feature:Wr},focus:{Feature:Gr},hover:{Feature:Nr}};var ol={layout:{ProjectionNode:go,MeasureLayout:jr}};var rl={...Ra,...el,...Za,...ol};var il=Ea(rl,ca);function ym(){!Zt.current&&oo();let[t]=useState(Ot.current);return process.env.NODE_ENV!=="production"&&vt(t!==true,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),t}function vm(t){t.values.forEach(e=>e.stop());}function nn(t,e){[...e].reverse().forEach(r=>{let i=t.getVariant(r);i&&de(t,i),t.variantChildren&&t.variantChildren.forEach(s=>{nn(s,e);});});}function Tm(t,e){if(Array.isArray(e))return nn(t,e);if(typeof e=="string")return nn(t,[e]);de(t,e);}function nl(){let t=false,e=new Set,o={subscribe(r){return e.add(r),()=>{e.delete(r);}},start(r,i){F(t,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");let s=[];return e.forEach(n=>{s.push(Ze(n,r,{transitionOverride:i}));}),Promise.all(s)},set(r){return F(t,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),e.forEach(i=>{Tm(i,r);})},stop(){e.forEach(r=>{vm(r);});},mount(){return t=true,()=>{t=false,o.stop();}}};return o}function sl(){let t=Sr(nl);return Ar(t.mount,[]),t}var Vm=sl;
2
- export{Pm as a,il as b,ym as c,Vm as d};