react-toast-msg 2.5.9 → 2.7.0
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/README.md +23 -21
- package/dist/index.js +10 -2
- package/dist/index.mjs +10 -2
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# React Toast MSG
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Fast, flexible, developer-friendly React toast notifications with a clean black & white design.
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|

|
|
@@ -10,13 +10,15 @@ A lightweight, customizable, and high-performance React toast notification libra
|
|
|
10
10
|
|
|
11
11
|
## ✨ Features
|
|
12
12
|
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
13
|
+
- **Zero Config**: Works out of the box with sensible defaults.
|
|
14
|
+
- **Tailwind Driven**: Styled with Tailwind CSS for modern aesthetics.
|
|
15
|
+
- **Performance**: Built with tsup for high performance and small bundle size.
|
|
16
|
+
- **Customizable**: Easily customize duration, type, and icons.
|
|
17
|
+
- **Promise Support**: First-class support for `toast.promise`.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
> Before installing, make sure you have Tailwind CSS installed in your project.
|
|
20
22
|
|
|
21
23
|
```bash
|
|
22
24
|
npm install react-toast-msg
|
|
@@ -26,7 +28,7 @@ pnpm add react-toast-msg
|
|
|
26
28
|
yarn add react-toast-msg
|
|
27
29
|
```
|
|
28
30
|
|
|
29
|
-
##
|
|
31
|
+
## Usage
|
|
30
32
|
|
|
31
33
|
1. **Add the ToastContainer** to the root of your application:
|
|
32
34
|
|
|
@@ -35,12 +37,12 @@ import { ToastContainer } from 'react-toast-msg';
|
|
|
35
37
|
import 'react-toast-msg/style.css';
|
|
36
38
|
|
|
37
39
|
function App() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
return (
|
|
41
|
+
<>
|
|
42
|
+
<YourApp />
|
|
43
|
+
<ToastContainer />
|
|
44
|
+
</>
|
|
45
|
+
);
|
|
44
46
|
}
|
|
45
47
|
```
|
|
46
48
|
|
|
@@ -60,20 +62,20 @@ toast.loading('Saving results...');
|
|
|
60
62
|
|
|
61
63
|
// Promise toast
|
|
62
64
|
toast.promise(saveData(), {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
loading: 'Saving...',
|
|
66
|
+
success: 'Saved successfully!',
|
|
67
|
+
error: 'Failed to save.'
|
|
66
68
|
});
|
|
67
69
|
```
|
|
68
70
|
|
|
69
|
-
##
|
|
71
|
+
## Documentation
|
|
70
72
|
|
|
71
|
-
Learn more and explore examples at [rtm.sudhucodes.com](https://rtm.sudhucodes.com/docs).
|
|
73
|
+
Learn more and explore examples at [rtm.sudhucodes.com](https://rtm.sudhucodes.com/docs?ref=github).
|
|
72
74
|
|
|
73
|
-
##
|
|
75
|
+
## Contributing
|
|
74
76
|
|
|
75
77
|
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details.
|
|
76
78
|
|
|
77
|
-
##
|
|
79
|
+
## License
|
|
78
80
|
|
|
79
81
|
This project is licensed under the [MIT License](LICENSE.md).
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
exports.ToastContainer=B;exports.toast=s;
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";var nc=Object.create;var Bo=Object.defineProperty;var sc=Object.getOwnPropertyDescriptor;var ac=Object.getOwnPropertyNames;var lc=Object.getPrototypeOf,cc=Object.prototype.hasOwnProperty;var uc=(t,e)=>{for(var o in e)Bo(t,o,{get:e[o],enumerable:!0})},In=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ac(e))!cc.call(t,i)&&i!==o&&Bo(t,i,{get:()=>e[i],enumerable:!(r=sc(e,i))||r.enumerable});return t};var Fo=(t,e,o)=>(o=t!=null?nc(lc(t)):{},In(e||!t||!t.__esModule?Bo(o,"default",{value:t,enumerable:!0}):o,t)),mc=t=>In(Bo({},"__esModule",{value:!0}),t);var _m={};uc(_m,{ToastContainer:()=>rc,toast:()=>J});module.exports=mc(_m);var kn=require("tailwind-merge"),Bn=Fo(require("clsx"));function ht(...t){return(0,kn.twMerge)((0,Bn.default)(t))}var Eo=require("react/jsx-runtime"),mt=require("react");var Fn=require("react"),de=(0,Fn.createContext)({});var On=require("react");function ge(t){let e=(0,On.useRef)(null);return e.current===null&&(e.current=t()),e.current}var Oo=require("react");var Nn=typeof window!="undefined";var No=Nn?Oo.useLayoutEffect:Oo.useEffect;var Tn=require("react/jsx-runtime"),qa=Fo(require("react"),1),Mo=require("react");var jn=require("react"),Lt=(0,jn.createContext)(null);var Ya=require("react/jsx-runtime");function qt(t,e){t.indexOf(e)===-1&&t.push(e)}function It(t,e){let o=t.indexOf(e);o>-1&&t.splice(o,1)}var W=(t,e,o)=>o>e?e:o<t?t:o;function We(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}var rt=()=>{},_=()=>{},Gn;typeof process!="undefined"&&((Gn=process.env)==null?void 0:Gn.NODE_ENV)!=="production"&&(rt=(t,e,o)=>{!t&&typeof console!="undefined"&&console.warn(We(e,o))},_=(t,e,o)=>{if(!t)throw new Error(We(e,o))});var X={};var ze=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ue(t){return typeof t=="object"&&t!==null}var Ke=t=>/^0[^.\s]+$/u.test(t);function He(t){let e;return()=>(e===void 0&&(e=t()),e)}var k=t=>t;var fc=(t,e)=>o=>e(t(o)),lt=(...t)=>t.reduce(fc);var dt=(t,e,o)=>{let r=e-t;return r===0?1:(o-t)/r};var bt=class{constructor(){this.subscriptions=[]}add(e){return qt(this.subscriptions,e),()=>It(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 N=t=>t*1e3,K=t=>t/1e3;function $e(t,e){return e?t*(1e3/e):0}var Wn=new Set;function Zt(t,e,o){t||Wn.has(e)||(console.warn(We(e,o)),Wn.add(e))}var zn=(t,e,o)=>(((1-3*o+3*e)*t+(3*o-6*e))*t+3*e)*t,pc=1e-7,hc=12;function dc(t,e,o,r,i){let s,n,a=0;do n=e+(o-e)/2,s=zn(n,r,i)-t,s>0?o=n:e=n;while(Math.abs(s)>pc&&++a<hc);return n}function kt(t,e,o,r){if(t===e&&o===r)return k;let i=s=>dc(s,0,1,t,o);return s=>s===0||s===1?s:zn(i(s),e,r)}var jo=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2;var Go=t=>e=>1-t(1-e);var Wo=kt(.33,1.53,.69,.99),xe=Go(Wo),_e=jo(xe);var Ye=t=>t>=1?1:(t*=2)<1?.5*xe(t):.5*(2-Math.pow(2,-10*(t-1)));var Xe=t=>1-Math.sin(Math.acos(t)),qe=Go(Xe),Ze=jo(Xe);var mi=kt(.42,0,1,1),fi=kt(0,0,.58,1),Je=kt(.42,0,.58,1);var pi=t=>Array.isArray(t)&&typeof t[0]!="number";var Qe=t=>Array.isArray(t)&&typeof t[0]=="number";var Un={linear:k,easeIn:mi,easeInOut:Je,easeOut:fi,circIn:Xe,circInOut:Ze,circOut:qe,backIn:xe,backInOut:_e,backOut:Wo,anticipate:Ye},gc=t=>typeof t=="string",zo=t=>{if(Qe(t)){_(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,o,r,i]=t;return kt(e,o,r,i)}else if(gc(t))return _(Un[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Un[t];return t};var to=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Q={value:null,addProjectionMetrics:null};function Kn(t,e){let o=new Set,r=new Set,i=!1,s=!1,n=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(m){n.has(m)&&(c.schedule(m),t()),l++,m(a)}let c={schedule:(m,f=!1,p=!1)=>{let g=p&&i?o:r;return f&&n.add(m),g.add(m),m},cancel:m=>{r.delete(m),n.delete(m)},process:m=>{if(a=m,i){s=!0;return}i=!0;let f=o;o=r,r=f,o.forEach(u),e&&Q.value&&Q.value.frameloop[e].push(l),l=0,o.clear(),i=!1,s&&(s=!1,c.process(m))}};return c}var xc=40;function Uo(t,e){let o=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},s=()=>o=!0,n=to.reduce((y,V)=>(y[V]=Kn(s,e?V:void 0),y),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:m,preRender:f,render:p,postRender:h}=n,g=()=>{let y=X.useManualTiming,V=y?i.timestamp:performance.now();o=!1,y||(i.delta=r?1e3/60:Math.max(Math.min(V-i.timestamp,xc),1)),i.timestamp=V,i.isProcessing=!0,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=!1,o&&e&&(r=!1,t(g))},d=()=>{o=!0,r=!0,i.isProcessing||t(g)};return{schedule:to.reduce((y,V)=>{let S=n[V];return y[V]=(A,E=!1,b=!1)=>(o||d(),S.schedule(A,E,b)),y},{}),cancel:y=>{for(let V=0;V<to.length;V++)n[to[V]].cancel(y)},state:i,steps:n}}var{schedule:P,cancel:Z,state:O,steps:eo}=Uo(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:k,!0);var Ko;function yc(){Ko=void 0}var B={now:()=>(Ko===void 0&&B.set(O.isProcessing||X.useManualTiming?O.timestamp:performance.now()),Ko),set:t=>{Ko=t,queueMicrotask(yc)}};var gt={layout:0,mainThread:0,waapi:0};var Hn=t=>e=>typeof e=="string"&&e.startsWith(t),Ho=Hn("--"),vc=Hn("var(--"),ye=t=>vc(t)?Tc.test(t.split("/*")[0].trim()):!1,Tc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function hi(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}var xt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Pt={...xt,transform:t=>W(0,1,t)},oo={...xt,default:1};var Bt=t=>Math.round(t*1e5)/1e5;var ve=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $n(t){return t==null}var _n=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var Te=(t,e)=>o=>!!(typeof o=="string"&&_n.test(o)&&o.startsWith(t)||e&&!$n(o)&&Object.prototype.hasOwnProperty.call(o,e)),$o=(t,e,o)=>r=>{if(typeof r!="string")return r;let[i,s,n,a]=r.match(ve);return{[t]:parseFloat(i),[e]:parseFloat(s),[o]:parseFloat(n),alpha:a!==void 0?parseFloat(a):1}};var Vc=t=>W(0,255,t),di={...xt,transform:t=>Math.round(Vc(t))},yt={test:Te("rgb","red"),parse:$o("red","green","blue"),transform:({red:t,green:e,blue:o,alpha:r=1})=>"rgba("+di.transform(t)+", "+di.transform(e)+", "+di.transform(o)+", "+Bt(Pt.transform(r))+")"};function Sc(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 ro={test:Te("#"),parse:Sc,transform:yt.transform};var io=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ct=io("deg"),Y=io("%"),T=io("px"),gi=io("vh"),xi=io("vw"),_o={...Y,parse:t=>Y.parse(t)/100,transform:t=>Y.transform(t*100)};var Ft={test:Te("hsl","hue"),parse:$o("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:o,alpha:r=1})=>"hsla("+Math.round(t)+", "+Y.transform(Bt(e))+", "+Y.transform(Bt(o))+", "+Bt(Pt.transform(r))+")"};var L={test:t=>yt.test(t)||ro.test(t)||Ft.test(t),parse:t=>yt.test(t)?yt.parse(t):Ft.test(t)?Ft.parse(t):ro.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?yt.transform(t):Ft.transform(t),getAnimatableNone:t=>{let e=L.parse(t);return e.alpha=0,L.transform(e)}};var Yn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function wc(t){var e,o;return isNaN(t)&&typeof t=="string"&&(((e=t.match(ve))==null?void 0:e.length)||0)+(((o=t.match(Yn))==null?void 0:o.length)||0)>0}var qn="number",Zn="color",bc="var",Pc="var(",Xn="${}",Cc=/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 Ot(t){let e=t.toString(),o=[],r={color:[],number:[],var:[]},i=[],s=0,a=e.replace(Cc,l=>(L.test(l)?(r.color.push(s),i.push(Zn),o.push(L.parse(l))):l.startsWith(Pc)?(r.var.push(s),i.push(bc),o.push(l)):(r.number.push(s),i.push(qn),o.push(parseFloat(l))),++s,Xn)).split(Xn);return{values:o,split:a,indexes:r,types:i}}function Ac(t){return Ot(t).values}function Jn({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===qn?i+=Bt(r[s]):n===Zn?i+=L.transform(r[s]):i+=r[s]}return i}}function Mc(t){return Jn(Ot(t))}var Dc=t=>typeof t=="number"?0:L.test(t)?L.getAnimatableNone(t):t,Ec=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:Dc(t);function Rc(t){let e=Ot(t);return Jn(e)(e.values.map((r,i)=>Ec(r,e.split[i])))}var z={test:wc,parse:Ac,createTransformer:Mc,getAnimatableNone:Rc};function yi(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 Qn({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=yi(l,a,t+1/3),s=yi(l,a,t),n=yi(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(n*255),alpha:r}}function Ve(t,e){return o=>o>0?e:t}var C=(t,e,o)=>t+(e-t)*o;var vi=(t,e,o)=>{let r=t*t,i=o*(e*e-r)+r;return i<0?0:Math.sqrt(i)},Lc=[ro,yt,Ft],Ic=t=>Lc.find(e=>e.test(t));function ts(t){let e=Ic(t);if(rt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let o=e.parse(t);return e===Ft&&(o=Qn(o)),o}var Ti=(t,e)=>{let o=ts(t),r=ts(e);if(!o||!r)return Ve(t,e);let i={...o};return s=>(i.red=vi(o.red,r.red,s),i.green=vi(o.green,r.green,s),i.blue=vi(o.blue,r.blue,s),i.alpha=C(o.alpha,r.alpha,s),yt.transform(i))};var Yo=new Set(["none","hidden"]);function es(t,e){return Yo.has(t)?o=>o<=0?t:e:o=>o>=1?e:t}function kc(t,e){return o=>C(t,e,o)}function Xo(t){return typeof t=="number"?kc:typeof t=="string"?ye(t)?Ve:L.test(t)?Ti:Oc:Array.isArray(t)?os:typeof t=="object"?L.test(t)?Ti:Bc:Ve}function os(t,e){let o=[...t],r=o.length,i=t.map((s,n)=>Xo(s)(s,e[n]));return s=>{for(let n=0;n<r;n++)o[n]=i[n](s);return o}}function Bc(t,e){let o={...t,...e},r={};for(let i in o)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Xo(t[i])(t[i],e[i]));return i=>{for(let s in r)o[s]=r[s](i);return o}}function Fc(t,e){var i;let o=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){let n=e.types[s],a=t.indexes[n][r[n]],l=(i=t.values[a])!=null?i:0;o[s]=l,r[n]++}return o}var Oc=(t,e)=>{let o=z.createTransformer(e),r=Ot(t),i=Ot(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?Yo.has(t)&&!i.values.length||Yo.has(e)&&!r.values.length?es(t,e):lt(os(Fc(r,i),i.values),o):(rt(!0,`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"),Ve(t,e))};function qo(t,e,o){return typeof t=="number"&&typeof e=="number"&&typeof o=="number"?C(t,e,o):Xo(t)(t,e)}var rs=t=>{let e=({timestamp:o})=>t(o);return{start:(o=!0)=>P.update(e,o),stop:()=>Z(e),now:()=>O.isProcessing?O.timestamp:B.now()}};var Zo=(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 Se(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 is(t,e=100,o){let r=o({...t,keyframes:[0,e]}),i=Math.min(Se(r),2e4);return{type:"keyframes",ease:s=>r.next(i*s).value/e,duration:K(i)}}var F={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 wi(t,e){return t*Math.sqrt(1-e*e)}var Nc=12;function jc(t,e,o){let r=o;for(let i=1;i<Nc;i++)r=r-t(r)/e(r);return r}var Si=.001;function Gc({duration:t=F.duration,bounce:e=F.bounce,velocity:o=F.velocity,mass:r=F.mass}){let i,s;rt(t<=N(F.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let n=1-e;n=W(F.minDamping,F.maxDamping,n),t=W(F.minDuration,F.maxDuration,K(t)),n<1?(i=u=>{let c=u*n,m=c*t,f=c-o,p=wi(u,n),h=Math.exp(-m);return Si-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),g=wi(Math.pow(u,2),n);return(-i(u)+Si>0?-1:1)*((f-p)*h)/g}):(i=u=>{let c=Math.exp(-u*t),m=(u-o)*t+1;return-Si+c*m},s=u=>{let c=Math.exp(-u*t),m=(o-u)*(t*t);return c*m});let a=5/t,l=jc(i,s,a);if(t=N(t),isNaN(l))return{stiffness:F.stiffness,damping:F.damping,duration:t};{let u=Math.pow(l,2)*r;return{stiffness:u,damping:n*2*Math.sqrt(r*u),duration:t}}}var Wc=["duration","bounce"],zc=["stiffness","damping","mass"];function ns(t,e){return e.some(o=>t[o]!==void 0)}function Uc(t){let e={velocity:F.velocity,stiffness:F.stiffness,damping:F.damping,mass:F.mass,isResolvedFromDuration:!1,...t};if(!ns(t,zc)&&ns(t,Wc))if(e.velocity=0,t.visualDuration){let o=t.visualDuration,r=2*Math.PI/(o*1.2),i=r*r,s=2*W(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:F.mass,stiffness:i,damping:s}}else{let o=Gc({...t,velocity:0});e={...e,...o,mass:F.mass},e.isResolvedFromDuration=!0}return e}function we(t=F.visualDuration,e=F.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:!1,value:s},{stiffness:l,damping:u,mass:c,duration:m,velocity:f,isResolvedFromDuration:p}=Uc({...o,velocity:-K(o.velocity||0)}),h=f||0,g=u/(2*Math.sqrt(l*c)),d=n-s,x=K(Math.sqrt(l/c)),v=Math.abs(d)<5;r||(r=v?F.restSpeed.granular:F.restSpeed.default),i||(i=v?F.restDelta.granular:F.restDelta.default);let y,V,S,A,E,b;if(g<1)S=wi(x,g),A=(h+g*x*d)/S,y=w=>{let R=Math.exp(-g*x*w);return n-R*(A*Math.sin(S*w)+d*Math.cos(S*w))},E=g*x*A+d*S,b=g*x*d-A*S,V=w=>Math.exp(-g*x*w)*(E*Math.sin(S*w)+b*Math.cos(S*w));else if(g===1){y=R=>n-Math.exp(-x*R)*(d+(h+x*d)*R);let w=h+x*d;V=R=>Math.exp(-x*R)*(x*w*R-h)}else{let w=x*Math.sqrt(g*g-1);y=ft=>{let wt=Math.exp(-g*x*ft),pt=Math.min(w*ft,300);return n-wt*((h+g*x*d)*Math.sinh(pt)+w*d*Math.cosh(pt))/w};let R=(h+g*x*d)/w,H=g*x*R-d*w,St=g*x*d-R*w;V=ft=>{let wt=Math.exp(-g*x*ft),pt=Math.min(w*ft,300);return wt*(H*Math.sinh(pt)+St*Math.cosh(pt))}}let M={calculatedDuration:p&&m||null,velocity:w=>N(V(w)),next:w=>{if(!p&&g<1){let H=Math.exp(-g*x*w),St=Math.sin(S*w),ft=Math.cos(S*w),wt=n-H*(A*St+d*ft),pt=N(H*(E*St+b*ft));return a.done=Math.abs(pt)<=r&&Math.abs(n-wt)<=i,a.value=a.done?n:wt,a}let R=y(w);if(p)a.done=w>=m;else{let H=N(V(w));a.done=Math.abs(H)<=r&&Math.abs(n-R)<=i}return a.value=a.done?n:R,a},toString:()=>{let w=Math.min(Se(M),2e4),R=Zo(H=>M.next(w*H).value,w,30);return w+"ms "+R},toTransition:()=>{}};return M}we.applyToOptions=t=>{let e=is(t,100,we);return t.ease=e.ease,t.duration=N(e.duration),t.type="keyframes",t};var Kc=5;function Jo(t,e,o){let r=Math.max(e-Kc,0);return $e(o-t(r),e-r)}function no({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:!1,value:m},p=b=>a!==void 0&&b<a||l!==void 0&&b>l,h=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l,g=o*e,d=m+g,x=n===void 0?d:n(d);x!==d&&(g=x-m);let v=b=>-g*Math.exp(-b/r),y=b=>x+v(b),V=b=>{let M=v(b),w=y(b);f.done=Math.abs(M)<=u,f.value=f.done?x:w},S,A,E=b=>{p(f.value)&&(S=b,A=we({keyframes:[f.value,h(f.value)],velocity:Jo(y,b,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:b=>{let M=!1;return!A&&S===void 0&&(M=!0,V(b),E(b)),S!==void 0&&b>=S?A.next(b-S):(!M&&V(b),f)}}}function Hc(t,e,o){let r=[],i=o||X.mix||qo,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]||k:e;a=lt(l,a)}r.push(a)}return r}function ss(t,e,{clamp:o=!0,ease:r,mixer:i}={}){let s=t.length;if(_(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=Hc(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=dt(t[m],t[m+1],c);return a[m](f)};return o?c=>u(W(t[0],t[s-1],c)):u}function as(t,e){let o=t[t.length-1];for(let r=1;r<=e;r++){let i=dt(0,e,r);t.push(C(o,1,i))}}function ls(t){let e=[0];return as(e,t.length-1),e}function cs(t,e){return t.map(o=>o*e)}function $c(t,e){return t.map(()=>e||Je).splice(0,t.length-1)}function Nt({duration:t=300,keyframes:e,times:o,ease:r="easeInOut"}){let i=pi(r)?r.map(zo):zo(r),s={done:!1,value:e[0]},n=cs(o&&o.length===e.length?o:ls(e),t),a=ss(n,e,{ease:Array.isArray(i)?i:$c(e,i)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}var _c=t=>t!==null;function jt(t,{repeat:e,repeatType:o="loop"},r,i=1){let s=t.filter(_c),a=i<0||e&&o!=="loop"&&e%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}var Yc={decay:no,inertia:no,tween:Nt,keyframes:Nt,spring:we};function Qo(t){typeof t.type=="string"&&(t.type=Yc[t.type])}var Gt=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 Xc=t=>t/100,Ct=class extends Gt{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,i;let{motionValue:o}=this.options;o&&o.updatedAt!==B.now()&&this.tick(B.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},gt.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Qo(e);let{type:o=Nt,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:n=0}=e,{keyframes:a}=e,l=o||Nt;process.env.NODE_ENV!=="production"&&l!==Nt&&_(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Nt&&typeof a[0]!="number"&&(this.mixKeyframes=lt(Xc,qo(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=Se(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=!1){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:g,finalKeyframe:d}=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),v=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let y=this.currentTime,V=r;if(m){let b=Math.min(this.currentTime,i)/a,M=Math.floor(b),w=b%1;!w&&b>=1&&(w=1),w===1&&M--,M=Math.min(M,m+1),!!(M%2)&&(f==="reverse"?(w=1-w,p&&(w-=p/a)):f==="mirror"&&(V=n)),y=W(0,1,w)*a}let S;v?(this.delayState.value=c[0],S=this.delayState):S=V.next(y),s&&!v&&(S.value=s(S.value));let{done:A}=S;!v&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return E&&h!==no&&(S.value=jt(c,this.options,d,this.speed)),g&&g(S.value),E&&this.finish(),S}then(e,o){return this.finished.then(e,o)}get duration(){return K(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+K(e)}get time(){return K(this.currentTime)}set time(e){e=N(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){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 Jo(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(B.now()),this.playbackSpeed=e,o&&this.driver&&(this.time=K(this.currentTime))}play(){var i,s;if(this.isStopped)return;let{driver:e=rs,startTime:o}=this.options;this.driver||(this.driver=e(n=>this.tick(n))),(s=(i=this.options).onPlay)==null||s.call(i);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!=null?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(B.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,o;this.notifyFinished(),this.teardown(),this.state="finished",(o=(e=this.options).onComplete)==null||o.call(e)}cancel(){var e,o;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(o=(e=this.options).onCancel)==null||o.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,gt.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var o;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(o=this.driver)==null||o.stop(),e.observe(this)}};function us(t){var e;for(let o=1;o<t.length;o++)(e=t[o])!=null||(t[o]=t[o-1])}var Jt=t=>t*180/Math.PI,bi=t=>{let e=Jt(Math.atan2(t[1],t[0]));return Pi(e)},qc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:bi,rotateZ:bi,skewX:t=>Jt(Math.atan(t[1])),skewY:t=>Jt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Pi=t=>(t=t%360,t<0&&(t+=360),t),ms=bi,fs=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ps=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Zc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fs,scaleY:ps,scale:t=>(fs(t)+ps(t))/2,rotateX:t=>Pi(Jt(Math.atan2(t[6],t[5]))),rotateY:t=>Pi(Jt(Math.atan2(-t[2],t[0]))),rotateZ:ms,rotate:ms,skewX:t=>Jt(Math.atan(t[4])),skewY:t=>Jt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function tr(t){return t.includes("scale")?1:0}function er(t,e){if(!t||t==="none")return tr(e);let o=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(o)r=Zc,i=o;else{let a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=qc,i=a}if(!i)return tr(e);let s=r[e],n=i[1].split(",").map(Jc);return typeof s=="function"?s(n):n[s]}var hs=(t,e)=>{let{transform:o="none"}=getComputedStyle(t);return er(o,e)};function Jc(t){return parseFloat(t.trim())}var vt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],it=new Set(vt);var Ci=t=>t===xt||t===T,Qc=new Set(["x","y","z"]),tu=vt.filter(t=>!Qc.has(t));function ds(t){let e=[];return tu.forEach(o=>{let r=t.getValue(o);r!==void 0&&(e.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),e}var At={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})=>er(e,"x"),y:(t,{transform:e})=>er(e,"y")};At.translateX=At.x;At.translateY=At.y;var Qt=new Set,Ai=!1,Mi=!1,Di=!1;function gs(){if(Mi){let t=Array.from(Qt).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),o=new Map;e.forEach(r=>{let i=ds(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])=>{var a;(a=r.getValue(s))==null||a.set(n)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Mi=!1,Ai=!1,Qt.forEach(t=>t.complete(Di)),Qt.clear()}function xs(){Qt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Mi=!0)})}function ys(){Di=!0,xs(),gs(),Di=!1}var Wt=class{constructor(e,o,r,i,s,n=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=o,this.name=r,this.motionValue=i,this.element=s,this.isAsync=n}scheduleResolve(){this.state="scheduled",this.isAsync?(Qt.add(this),Ai||(Ai=!0,P.read(xs),P.resolveKeyframes(gs))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:o,element:r,motionValue:i}=this;if(e[0]===null){let s=i==null?void 0: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])}us(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Qt.delete(this)}cancel(){this.state==="scheduled"&&(Qt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var vs=t=>t.startsWith("--");function or(t,e,o){vs(e)?t.style.setProperty(e,o):t.style[e]=o}var Ts={};function rr(t,e){let o=He(t);return()=>{var r;return(r=Ts[e])!=null?r:o()}}var Vs=rr(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var ir=rr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing");var te=([t,e,o,r])=>`cubic-bezier(${t}, ${e}, ${o}, ${r})`;var Ei={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:te([0,.65,.55,1]),circOut:te([.55,0,1,.45]),backIn:te([.31,.01,.66,-.59]),backOut:te([.33,1.53,.69,.99])};function Ri(t,e){if(t)return typeof t=="function"?ir()?Zo(t,e):"ease-out":Qe(t)?te(t):Array.isArray(t)?t.map(o=>Ri(o,e)||Ei.easeOut):Ei[t]}function Ss(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=Ri(a,i);Array.isArray(m)&&(c.easing=m),Q.value&>.waapi++;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 Q.value&&p.finished.finally(()=>{gt.waapi--}),p}function nr(t){return typeof t=="function"&&"applyToOptions"in t}function ws({type:t,...e}){var o,r;return nr(t)&&ir()?t.applyToOptions(e):((o=e.duration)!=null||(e.duration=300),(r=e.ease)!=null||(e.ease="easeOut"),e)}var be=class extends Gt{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:o,name:r,keyframes:i,pseudoElement:s,allowFlatten:n=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=n,this.options=e,_(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=ws(e);this.animation=Ss(o,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let c=jt(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),or(o,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,o;(o=(e=this.animation).finish)==null||o.call(e)}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var o,r,i;let e=(o=this.options)==null?void 0:o.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var o,r;let e=((r=(o=this.animation.effect)==null?void 0:o.getComputedTiming)==null?void 0:r.call(o).duration)||0;return K(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+K(e)}get time(){return K(Number(this.animation.currentTime)||0)}set time(e){let o=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=N(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(){var e;return(e=this.manualStartTime)!=null?e:Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:o,rangeEnd:r,observe:i}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Vs()?(this.animation.timeline=e,o&&(this.animation.rangeStart=o),r&&(this.animation.rangeEnd=r),k):i(this)}};var bs={anticipate:Ye,backInOut:_e,circInOut:Ze};function eu(t){return t in bs}function Ps(t){typeof t.ease=="string"&&eu(t.ease)&&(t.ease=bs[t.ease])}var Li=10,sr=class extends be{constructor(e){Ps(e),Qo(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(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 Ct({...n,autoplay:!1}),l=Math.max(Li,B.now()-this.startTime),u=W(0,Li,l-Li),c=a.sample(l).value,{name:m}=this.options;s&&m&&or(s,m,c),o.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}};var Ii=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(z.test(t)||t==="0")&&!t.startsWith("url("));function ou(t){let e=t[0];if(t.length===1)return!0;for(let o=0;o<t.length;o++)if(t[o]!==e)return!0}function Cs(t,e,o,r){let i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;let s=t[t.length-1],n=Ii(i,e),a=Ii(s,e);return rt(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?!1:ou(t)||(o==="spring"||nr(o))&&r}function so(t){t.duration=0,t.type="keyframes"}var ar=new Set(["opacity","clipPath","filter","transform"]);var ru=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function As(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&ru.test(t[e]))return!0;return!1}var iu=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),nu=He(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ms(t){var m;let{motionValue:e,name:o,repeatDelay:r,repeatType:i,damping:s,type:n,keyframes:a}=t;if(!(((m=e==null?void 0:e.owner)==null?void 0:m.current)instanceof HTMLElement))return!1;let{onUpdate:u,transformTemplate:c}=e.owner.getProps();return nu()&&o&&(ar.has(o)||iu.has(o)&&As(a))&&(o!=="transform"||!c)&&!u&&!r&&i!=="mirror"&&s!==0&&n!=="inertia"}var su=40,lr=class extends Gt{constructor({autoplay:e=!0,delay:o=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:n="loop",keyframes:a,name:l,motionValue:u,element:c,...m}){var h;super(),this.stop=()=>{var g,d;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(d=this.keyframeResolver)==null||d.cancel()},this.createdAt=B.now();let f={autoplay:e,delay:o,type:r,repeat:i,repeatDelay:s,repeatType:n,name:l,motionValue:u,element:c,...m},p=(c==null?void 0:c.KeyframeResolver)||Wt;this.keyframeResolver=new p(a,(g,d,x)=>this.onKeyframesResolved(g,d,f,!x),l,u,c),(h=this.keyframeResolver)==null||h.scheduleResolve()}onKeyframesResolved(e,o,r,i){var x,v;this.keyframeResolver=void 0;let{name:s,type:n,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=B.now();let m=!0;Cs(e,s,n,a)||(m=!1,(X.instantAnimations||!l)&&(c==null||c(jt(e,r,o))),e[0]=e[e.length-1],so(r),r.repeat=0);let p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>su?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:e},h=m&&!u&&Ms(p),g=(v=(x=p.motionValue)==null?void 0:x.owner)==null?void 0:v.current,d;if(h)try{d=new sr({...p,element:g})}catch(y){d=new Ct(p)}else d=new Ct(p);d.finished.then(()=>{this.notifyFinished()}).catch(k),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,o){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),ys()),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(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}};function cr(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 au=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function lu(t){let e=au.exec(t);if(!e)return[,];let[,o,r,i]=e;return[`--${o!=null?o:r}`,i]}var cu=4;function ki(t,e,o=1){_(o<=cu,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,i]=lu(t);if(!r)return;let s=window.getComputedStyle(e).getPropertyValue(r);if(s){let n=s.trim();return ze(n)?parseFloat(n):n}return ye(i)?ki(i,e,o+1):i}var uu={type:"spring",stiffness:500,damping:25,restSpeed:10},mu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),fu={type:"keyframes",duration:.8},pu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ds=(t,{keyframes:e})=>e.length>2?fu:it.has(t)?t.startsWith("scale")?mu(e[1]):uu:pu;function ur(t,e){if(t!=null&&t.inherit&&e){let{inherit:o,...r}=t;return{...e,...r}}return t}function Pe(t,e){var r,i;let o=(i=(r=t==null?void 0:t[e])!=null?r:t==null?void 0:t.default)!=null?i:t;return o!==t?ur(o,t):o}var hu=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Es(t){for(let e in t)if(!hu.has(e))return!0;return!1}var ee=(t,e,o,r={},i,s)=>n=>{let a=Pe(r,t)||{},l=a.delay||r.delay||0,{elapsed:u=0}=r;u=u-N(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};Es(a)||Object.assign(c,Ds(t,c)),c.duration&&(c.duration=N(c.duration)),c.repeatDelay&&(c.repeatDelay=N(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let m=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(so(c),c.delay===0&&(m=!0)),(X.instantAnimations||X.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(m=!0,so(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,m&&!s&&e.get()!==void 0){let f=jt(c.keyframes,a);if(f!==void 0){P.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new Ct(c):new lr(c)};function Rs(t){let e=[{},{}];return t==null||t.values.forEach((o,r)=>{e[0][r]=o.get(),e[1][r]=o.getVelocity()}),e}function oe(t,e,o,r){if(typeof e=="function"){let[i,s]=Rs(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]=Rs(r);e=e(o!==void 0?o:t.custom,i,s)}return e}function tt(t,e,o){let r=t.getProps();return oe(r,e,o!==void 0?o:r.custom,t)}var mr=new Set(["width","height","top","left","right","bottom",...vt]);var Ls=30,du=t=>!isNaN(parseFloat(t)),Is={current:void 0},Bi=class{constructor(e,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;let i=B.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(let n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=o.owner}setCurrent(e){this.current=e,this.updatedAt=B.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=du(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Zt(!1,'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 bt);let r=this.events[e].add(o);return e==="change"?()=>{r(),P.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=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Is.current&&Is.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=B.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ls)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,Ls);return $e(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(e){return this.stop(),new Promise(o=>{this.hasAnimated=!0,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(){var e,o;(e=this.dependents)==null||e.clear(),(o=this.events.destroy)==null||o.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function ut(t,e){return new Bi(t,e)}var ao=t=>Array.isArray(t);function gu(t,e,o){t.hasValue(e)?t.getValue(e).set(o):t.addValue(e,ut(o))}function xu(t){return ao(t)?t[t.length-1]||0:t}function ks(t,e){let o=tt(t,e),{transitionEnd:r={},transition:i={},...s}=o||{};s={...s,...r};for(let n in s){let a=xu(s[n]);gu(t,n,a)}}var D=t=>!!(t&&t.getVelocity);function Bs(t){return!!(D(t)&&t.add)}function Ce(t,e){let o=t.getValue("willChange");if(Bs(o))return o.add(e);if(!o&&X.WillChange){let r=new X.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Ae(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Fs="framerAppearId",lo="data-"+Ae(Fs);function fr(t){return t.props[lo]}function yu({protectedKeys:t,needsAnimating:e},o){let r=t.hasOwnProperty(o)&&e[o]!==!0;return e[o]=!1,r}function pr(t,e,{delay:o=0,transitionOverride:r,type:i}={}){var f;let{transition:s,transitionEnd:n,...a}=e,l=t.getDefaultTransition();s=s?ur(s,l):l;let u=s==null?void 0:s.reduceMotion;r&&(s=r);let c=[],m=i&&t.animationState&&t.animationState.getState()[i];for(let p in a){let h=t.getValue(p,(f=t.latestValues[p])!=null?f:null),g=a[p];if(g===void 0||m&&yu(m,p))continue;let d={delay:o,...Pe(s||{},p)},x=h.get();if(x!==void 0&&!h.isAnimating()&&!Array.isArray(g)&&g===x&&!d.velocity){P.update(()=>h.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){let S=fr(t);if(S){let A=window.MotionHandoffAnimation(S,p,P);A!==null&&(d.startTime=A,v=!0)}}Ce(t,p);let y=u!=null?u:t.shouldReduceMotion;h.start(ee(p,h,g,y&&mr.has(p)?{type:!1}:d,t,v));let V=h.animation;V&&c.push(V)}if(n){let p=()=>P.update(()=>{n&&ks(t,n)});c.length?Promise.all(c).then(p):p()}return c}function hr(t,e,o={}){var l;let r=tt(t,e,o.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0),{transition:i=t.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(i=o.transitionOverride);let s=r?()=>Promise.all(pr(t,r,o)):()=>Promise.resolve(),n=t.variantChildren&&t.variantChildren.size?(u=0)=>{let{delayChildren:c=0,staggerChildren:m,staggerDirection:f}=i;return vu(t,e,u,c,m,f,o)}:()=>Promise.resolve(),{when:a}=i;if(a){let[u,c]=a==="beforeChildren"?[s,n]:[n,s];return u().then(()=>c())}else return Promise.all([s(),n(o.delay)])}function vu(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(hr(l,e,{...n,delay:o+(typeof r=="function"?0:r)+cr(t.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Os(t,e,o={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){let i=e.map(s=>hr(t,s,o));r=Promise.all(i)}else if(typeof e=="string")r=hr(t,e,o);else{let i=typeof e=="function"?tt(t,e,o.custom):e;r=Promise.all(pr(t,i,o))}return r.then(()=>{t.notify("AnimationComplete",e)})}var Ns={test:t=>t==="auto",parse:t=>t};var dr=t=>e=>e.test(t);var Fi=[xt,T,Y,ct,xi,gi,Ns],Oi=t=>Fi.find(dr(t));function js(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ke(t):!0}var Tu=new Set(["brightness","contrast","saturate","opacity"]);function Vu(t){let[e,o]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;let[r]=o.match(ve)||[];if(!r)return t;let i=o.replace(r,""),s=Tu.has(e)?1:0;return r!==o&&(s*=100),e+"("+s+i+")"}var Su=/\b([a-z-]*)\(.*?\)/gu,co={...z,getAnimatableNone:t=>{let e=t.match(Su);return e?e.map(Vu).join(" "):t}};var uo={...z,getAnimatableNone:t=>{let e=z.parse(t);return z.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}};var Ni={...xt,transform:Math.round};var Gs={rotate:ct,rotateX:ct,rotateY:ct,rotateZ:ct,scale:oo,scaleX:oo,scaleY:oo,scaleZ:oo,skew:ct,skewX:ct,skewY:ct,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Pt,originX:_o,originY:_o,originZ:T};var Me={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...Gs,zIndex:Ni,fillOpacity:Pt,strokeOpacity:Pt,numOctaves:Ni};var wu={...Me,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:co,WebkitFilter:co,mask:uo,WebkitMask:uo},gr=t=>wu[t];var bu=new Set([co,uo]);function xr(t,e){let o=gr(t);return bu.has(o)||(o=z),o.getAnimatableNone?o.getAnimatableNone(e):void 0}var Pu=new Set(["auto","none","0"]);function Ws(t,e,o){let r=0,i;for(;r<t.length&&!i;){let s=t[r];typeof s=="string"&&!Pu.has(s)&&Ot(s).values.length&&(i=t[r]),r++}if(i&&o)for(let s of e)t[s]=xr(o,i)}var yr=class extends Wt{constructor(e,o,r,i,s){super(e,o,r,i,s,!0)}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(),ye(m))){let f=ki(m,o.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=m)}}if(this.resolveNoneKeyframes(),!mr.has(r)||e.length!==2)return;let[i,s]=e,n=Oi(i),a=Oi(s),l=hi(i),u=hi(s);if(l!==u&&At[r]){this.needsMeasurement=!0;return}if(n!==a)if(Ci(n)&&Ci(a))for(let c=0;c<e.length;c++){let m=e[c];typeof m=="string"&&(e[c]=parseFloat(m))}else At[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:o}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||js(e[i]))&&r.push(i);r.length&&Ws(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=At[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,!1)}measureEndState(){var a;let{element:e,name:o,unresolvedKeyframes:r}=this;if(!e||!e.current)return;let i=e.getValue(o);i&&i.jump(this.measuredOrigin,!1);let s=r.length-1,n=r[s];r[s]=At[o](e.measureViewportBox(),window.getComputedStyle(e.current)),n!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=n),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}};function vr(t,e,o){var r;if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;e&&(i=e.current);let s=(r=o==null?void 0:o[t])!=null?r:i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(i=>i!=null)}var Tr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function re(t){return Ue(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}var{schedule:ie,cancel:Cu}=Uo(queueMicrotask,!1);var nt={x:!1,y:!1};function Vr(){return nt.x||nt.y}function ji(t){return t==="x"||t==="y"?nt[t]?null:(nt[t]=!0,()=>{nt[t]=!1}):nt.x||nt.y?null:(nt.x=nt.y=!0,()=>{nt.x=nt.y=!1})}function Sr(t,e){let o=vr(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[o,i,()=>r.abort()]}function Au(t){return!(t.pointerType==="touch"||Vr())}function Gi(t,e,o={}){let[r,i,s]=Sr(t,o);return r.forEach(n=>{let a=!1,l=!1,u,c=()=>{n.removeEventListener("pointerleave",h)},m=d=>{u&&(u(d),u=void 0),c()},f=d=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,m(d))},p=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},h=d=>{if(d.pointerType!=="touch"){if(a){l=!0;return}m(d)}},g=d=>{if(!Au(d))return;l=!1;let x=e(n,d);typeof x=="function"&&(u=x,n.addEventListener("pointerleave",h,i))};n.addEventListener("pointerenter",g,i),n.addEventListener("pointerdown",p,i)}),s}var Wi=(t,e)=>e?t===e?!0:Wi(t,e.parentElement):!1;var ne=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;var Mu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function zi(t){return Mu.has(t.tagName)||t.isContentEditable===!0}var Du=new Set(["INPUT","SELECT","TEXTAREA"]);function Ui(t){return Du.has(t.tagName)||t.isContentEditable===!0}var De=new WeakSet;function zs(t){return e=>{e.key==="Enter"&&t(e)}}function Ki(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}var Us=(t,e)=>{let o=t.currentTarget;if(!o)return;let r=zs(()=>{if(De.has(o))return;Ki(o,"down");let i=zs(()=>{Ki(o,"up")}),s=()=>Ki(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 Ks(t){return ne(t)&&!Vr()}var Hs=new WeakSet;function Hi(t,e,o={}){let[r,i,s]=Sr(t,o),n=a=>{let l=a.currentTarget;if(!Ks(a)||Hs.has(a))return;De.add(l),o.stopPropagation&&Hs.add(a);let u=e(l,a),c=(p,h)=>{window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",f),De.has(l)&&De.delete(l),Ks(p)&&typeof u=="function"&&u(p,{success:h})},m=p=>{c(p,l===window||l===document||o.useGlobalTarget||Wi(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(o.useGlobalTarget?window:a).addEventListener("pointerdown",n,i),re(a)&&(a.addEventListener("focus",u=>Us(u,i)),!zi(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Ee(t){return Ue(t)&&"ownerSVGElement"in t}var wr=new WeakMap,zt,$s=(t,e,o)=>(r,i)=>i&&i[0]?i[0][t+"Size"]:Ee(r)&&"getBBox"in r?r.getBBox()[e]:r[o],Eu=$s("inline","width","offsetWidth"),Ru=$s("block","height","offsetHeight");function Lu({target:t,borderBoxSize:e}){var o;(o=wr.get(t))==null||o.forEach(r=>{r(t,{get width(){return Eu(t,e)},get height(){return Ru(t,e)}})})}function Iu(t){t.forEach(Lu)}function ku(){typeof ResizeObserver!="undefined"&&(zt=new ResizeObserver(Iu))}function _s(t,e){zt||ku();let o=vr(t);return o.forEach(r=>{let i=wr.get(r);i||(i=new Set,wr.set(r,i)),i.add(e),zt==null||zt.observe(r)}),()=>{o.forEach(r=>{let i=wr.get(r);i==null||i.delete(e),i!=null&&i.size||zt==null||zt.unobserve(r)})}}var br=new Set,Re;function Bu(){Re=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};br.forEach(e=>e(t))},window.addEventListener("resize",Re)}function Ys(t){return br.add(t),Re||Bu(),()=>{br.delete(t),!br.size&&typeof Re=="function"&&(window.removeEventListener("resize",Re),Re=void 0)}}function Pr(t,e){return typeof t=="function"?Ys(t):_s(t,e)}function Xs(t){return Ee(t)&&t.tagName==="svg"}var Fu=[...Fi,L,z],qs=t=>Fu.find(dr(t));var $i=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ut=()=>({x:$i(),y:$i()}),_i=()=>({min:0,max:0}),I=()=>({x:_i(),y:_i()});var Zs=new WeakMap;function Mt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Tt(t){return typeof t=="string"||Array.isArray(t)}var Cr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mo=["initial",...Cr];function Kt(t){return Mt(t.animate)||mo.some(e=>Tt(t[e]))}function fo(t){return!!(Kt(t)||t.variants)}function Js(t,e,o){for(let r in e){let i=e[r],s=o[r];if(D(i))t.addValue(r,i);else if(D(s))t.addValue(r,ut(i,{owner:t}));else if(s!==i)if(t.hasValue(r)){let n=t.getValue(r);n.liveStyle===!0?n.jump(i):n.hasAnimated||n.set(i)}else{let n=t.getStaticValue(r);t.addValue(r,ut(n!==void 0?n:i,{owner:t}))}}for(let r in o)e[r]===void 0&&t.removeValue(r);return e}var po={current:null},Ar={current:!1};var Ou=typeof window!="undefined";function Qs(){if(Ar.current=!0,!!Ou)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>po.current=t.matches;t.addEventListener("change",e),e()}else po.current=!1}var ta=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Mr={};function go(t){Mr=t}function Yi(){return Mr}var ho=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=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Wt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let p=B.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,P.render(this.render,!1,!0))};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=Kt(o),this.isVariantNode=fo(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&&D(h)&&h.set(u[p])}}mount(e){var o,r,i;if(this.hasBeenMounted)for(let s in this.initialValues)(o=this.values.get(s))==null||o.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=e,Zs.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((s,n)=>this.bindToMotionValue(n,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ar.current||Qs(),this.shouldReduceMotion=po.current),process.env.NODE_ENV!=="production"&&Zt(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=(r=this.skipAnimationsConfig)!=null?r:!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),Z(this.notifyUpdate),Z(this.render),this.valueSubscriptions.forEach(o=>o()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(let o in this.events)this.events[o].clear();for(let o in this.features){let r=this.features[o];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){var o;this.children.add(e),(o=this.enteringChildren)!=null||(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&&ar.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:a,times:l,ease:u,duration:c}=o.accelerate,m=new be({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:N(c)}),f=n(m);this.valueSubscriptions.set(e,()=>{f(),m.cancel()});return}let r=it.has(e);r&&this.onBindTransform&&this.onBindTransform();let i=o.on("change",n=>{this.latestValues[e]=n,this.props.onUpdate&&P.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),s;typeof window!="undefined"&&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 Mr){let o=Mr[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=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):I()}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<ta.length;r++){let i=ta[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=Js(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=ut(o===null?void 0:o,{owner:this}),this.addValue(e,r)),r}readValue(e,o){var i;let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!=null?i:this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(ze(r)||Ke(r))?r=parseFloat(r):!qs(r)&&z.test(o)&&(r=xr(e,o)),this.setBaseTarget(e,D(r)?r.get():r)),D(r)?r.get():r}setBaseTarget(e,o){this.baseTarget[e]=o}getBaseTarget(e){var s;let{initial:o}=this.props,r;if(typeof o=="string"||typeof o=="object"){let n=oe(this.props,o,(s=this.presenceContext)==null?void 0:s.custom);n&&(r=n[e])}if(o&&r!==void 0)return r;let i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!D(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 bt),this.events[e].add(o)}notify(e,...o){this.events[e]&&this.events[e].notify(...o)}scheduleRenderMicrotask(){ie.render(this.render)}};var Le=class extends ho{constructor(){super(...arguments),this.KeyframeResolver=yr}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;D(e)&&(this.childSubscription=e.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}};var U=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function xo({top:t,left:e,right:o,bottom:r}){return{x:{min:e,max:o},y:{min:t,max:r}}}function Xi({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function qi(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 Zi(t){return t===void 0||t===1}function Dr({scale:t,scaleX:e,scaleY:o}){return!Zi(t)||!Zi(e)||!Zi(o)}function Dt(t){return Dr(t)||Ji(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ji(t){return ea(t.x)||ea(t.y)}function ea(t){return t&&t!=="0%"}function yo(t,e,o){let r=t-o,i=e*r;return o+i}function oa(t,e,o,r,i){return i!==void 0&&(t=yo(t,i,r)),yo(t,o,r)+e}function Qi(t,e=0,o=1,r,i){t.min=oa(t.min,e,o,r,i),t.max=oa(t.max,e,o,r,i)}function tn(t,{x:e,y:o}){Qi(t.x,e.translate,e.scale,e.originPoint),Qi(t.y,o.translate,o.scale,o.originPoint)}var ra=.999999999999,ia=1.0000000000001;function aa(t,e,o,r=!1){var a;let i=o.length;if(!i)return;e.x=e.y=1;let s,n;for(let l=0;l<i;l++){s=o[l],n=s.projectionDelta;let{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(st(t.x,-s.scroll.offset.x),st(t.y,-s.scroll.offset.y)),n&&(e.x*=n.x.scale,e.y*=n.y.scale,tn(t,n)),r&&Dt(s.latestValues)&&vo(t,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}e.x<ia&&e.x>ra&&(e.x=1),e.y<ia&&e.y>ra&&(e.y=1)}function st(t,e){t.min+=e,t.max+=e}function na(t,e,o,r,i=.5){let s=C(t.min,t.max,i);Qi(t,e,o,s,r)}function sa(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function vo(t,e,o){let r=o!=null?o:t;na(t.x,sa(e.x,r.x),e.scaleX,e.scale,e.originX),na(t.y,sa(e.y,r.y),e.scaleY,e.scale,e.originY)}function Er(t,e){return xo(qi(t.getBoundingClientRect(),e))}function en(t,e,o){let r=Er(t,o),{scroll:i}=e;return i&&(st(r.x,i.offset.x),st(r.y,i.offset.y)),r}var Nu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ju=vt.length;function la(t,e,o){let r="",i=!0;for(let s=0;s<ju;s++){let n=vt[s],a=t[n];if(a===void 0)continue;let l=!0;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,Me[n]);if(!l){i=!1;let c=Nu[n]||n;r+=`${c}(${u}) `}o&&(e[n]=u)}}return r=r.trim(),o?r=o(e,i?"":r):i&&(r="none"),r}function se(t,e,o){let{style:r,vars:i,transformOrigin:s}=t,n=!1,a=!1;for(let l in e){let u=e[l];if(it.has(l)){n=!0;continue}else if(Ho(l)){i[l]=u;continue}else{let c=Tr(u,Me[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(e.transform||(n||o?r.transform=la(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 Rr(t,{style:e,vars:o},r,i){let s=t.style,n;for(n in e)s[n]=e[n];i==null||i.applyProjectionStyles(s,r);for(n in o)s.setProperty(n,o[n])}function ca(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var Ie={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;let o=ca(t,e.target.x),r=ca(t,e.target.y);return`${o}% ${r}%`}};var ua={correct:(t,{treeScale:e,projectionDelta:o})=>{let r=t,i=z.parse(t);if(i.length>5)return r;let s=z.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=C(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 To={borderRadius:{...Ie,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ie,borderTopRightRadius:Ie,borderBottomLeftRadius:Ie,borderBottomRightRadius:Ie,boxShadow:ua};function Vo(t,{layout:e,layoutId:o}){return it.has(t)||t.startsWith("origin")||(e||o!==void 0)&&(!!To[t]||t==="opacity")}function ae(t,e,o){var n;let r=t.style,i=e==null?void 0:e.style,s={};if(!r)return s;for(let a in r)(D(r[a])||i&&D(i[a])||Vo(a,t)||((n=o==null?void 0:o.getValue(a))==null?void 0:n.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function Gu(t){return window.getComputedStyle(t)}var So=class extends Le{constructor(){super(...arguments),this.type="html",this.renderInstance=Rr}readValueFromInstance(e,o){var r;if(it.has(o))return(r=this.projection)!=null&&r.isProjecting?tr(o):hs(e,o);{let i=Gu(e),s=(Ho(o)?i.getPropertyValue(o):i[o])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:o}){return Er(e,o)}build(e,o,r){se(e,o,r.transformTemplate)}scrapeMotionValuesFromProps(e,o,r){return ae(e,o,r)}};var Wu={offset:"stroke-dashoffset",array:"stroke-dasharray"},zu={offset:"strokeDashoffset",array:"strokeDasharray"};function ma(t,e,o=1,r=0,i=!0){t.pathLength=1;let s=i?Wu:zu;t[s.offset]=`${-r}`,t[s.array]=`${e} ${o}`}var Uu=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function wo(t,{attrX:e,attrY:o,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:n=0,...a},l,u,c){var p,h;if(se(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=(p=m.transformOrigin)!=null?p:"50% 50%",delete m.transformOrigin),f.transform&&(f.transformBox=(h=c==null?void 0:c.transformBox)!=null?h:"fill-box",delete m.transformBox);for(let g of Uu)m[g]!==void 0&&(f[g]=m[g],delete m[g]);e!==void 0&&(m.x=e),o!==void 0&&(m.y=o),r!==void 0&&(m.scale=r),i!==void 0&&ma(m,i,s,n,!1)}var Lr=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 bo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function fa(t,e,o,r){Rr(t,e,void 0,r);for(let i in e.attrs)t.setAttribute(Lr.has(i)?i:Ae(i),e.attrs[i])}function Po(t,e,o){let r=ae(t,e,o);for(let i in t)if(D(t[i])||D(e[i])){let s=vt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=t[i]}return r}var Co=class extends Le{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=I}getBaseTargetFromProps(e,o){return e[o]}readValueFromInstance(e,o){if(it.has(o)){let r=gr(o);return r&&r.default||0}return o=Lr.has(o)?o:Ae(o),e.getAttribute(o)}scrapeMotionValuesFromProps(e,o,r){return Po(e,o,r)}build(e,o,r){wo(e,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,o,r,i){fa(e,o,r,i)}mount(e){this.isSVGTag=bo(e.tagName),super.mount(e)}};var Ku=mo.length;function on(t){if(!t)return;if(!t.isControllingVariants){let o=t.parent?on(t.parent)||{}:{};return t.props.initial!==void 0&&(o.initial=t.props.initial),o}let e={};for(let o=0;o<Ku;o++){let r=mo[o],i=t.props[r];(Tt(i)||i===!1)&&(e[r]=i)}return e}function rn(t,e){if(!Array.isArray(e))return!1;let o=e.length;if(o!==t.length)return!1;for(let r=0;r<o;r++)if(e[r]!==t[r])return!1;return!0}var Hu=[...Cr].reverse(),$u=Cr.length;function _u(t){return e=>Promise.all(e.map(({animation:o,options:r})=>Os(t,o,r)))}function nn(t){let e=_u(t),o=pa(),r=!0,i=!1,s=u=>(c,m)=>{var p;let f=tt(t,m,u==="exit"?(p=t.presenceContext)==null?void 0:p.custom:void 0);if(f){let{transition:h,transitionEnd:g,...d}=f;c={...c,...d,...g}}return c};function n(u){e=u(t)}function a(u){let{props:c}=t,m=on(t.parent)||{},f=[],p=new Set,h={},g=1/0;for(let x=0;x<$u;x++){let v=Hu[x],y=o[v],V=c[v]!==void 0?c[v]:m[v],S=Tt(V),A=v===u?y.isActive:null;A===!1&&(g=x);let E=V===m[v]&&V!==c[v]&&S;if(E&&(r||i)&&t.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...h},!y.isActive&&A===null||!V&&!y.prevProp||Mt(V)||typeof V=="boolean")continue;if(v==="exit"&&y.isActive&&A!==!0){y.prevResolvedValues&&(h={...h,...y.prevResolvedValues});continue}let b=ha(y.prevProp,V),M=b||v===u&&y.isActive&&!E&&S||x>g&&S,w=!1,R=Array.isArray(V)?V:[V],H=R.reduce(s(v),{});A===!1&&(H={});let{prevResolvedValues:St={}}=y,ft={...St,...H},wt=$=>{M=!0,p.has($)&&(w=!0,p.delete($)),y.needsAnimating[$]=!0;let ot=t.getValue($);ot&&(ot.liveStyle=!1)};for(let $ in ft){let ot=H[$],Xt=St[$];if(h.hasOwnProperty($))continue;let he=!1;ao(ot)&&ao(Xt)?he=!rn(ot,Xt):he=ot!==Xt,he?ot!=null?wt($):p.add($):ot!==void 0&&p.has($)?wt($):y.protectedKeys[$]=!0}y.prevProp=V,y.prevResolvedValues=H,y.isActive&&(h={...h,...H}),(r||i)&&t.blockInitialAnimation&&(M=!1);let pt=E&&b;M&&(!pt||w)&&f.push(...R.map($=>{let ot={type:v};if(typeof $=="string"&&(r||i)&&!pt&&t.manuallyAnimateOnMount&&t.parent){let{parent:Xt}=t,he=tt(Xt,$);if(Xt.enteringChildren&&he){let{delayChildren:ic}=he.transition||{};ot.delay=cr(Xt.enteringChildren,t,ic)}}return{animation:$,options:ot}}))}if(p.size){let x={};if(typeof c.initial!="boolean"){let v=tt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(x.transition=v.transition)}p.forEach(v=>{let y=t.getBaseTarget(v),V=t.getValue(v);V&&(V.liveStyle=!0),x[v]=y!=null?y:null}),f.push({animation:x})}let d=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(d=!1),r=!1,i=!1,d?e(f):Promise.resolve()}function l(u,c){var f;if(o[u].isActive===c)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(p=>{var h;return(h=p.animationState)==null?void 0:h.setActive(u,c)}),o[u].isActive=c;let m=a(u);for(let p in o)o[p].protectedKeys={};return m}return{animateChanges:a,setActive:l,setAnimateFunction:n,getState:()=>o,reset:()=>{o=pa(),i=!0}}}function ha(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!rn(e,t):!1}function le(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pa(){return{animate:le(!0),whileInView:le(),whileHover:le(),whileTap:le(),whileDrag:le(),whileFocus:le(),exit:le()}}function Ir(t,e){t.min=e.min,t.max=e.max}function at(t,e){Ir(t.x,e.x),Ir(t.y,e.y)}function sn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}var da=1e-4,Yu=1-da,Xu=1+da,ga=.01,qu=0-ga,Zu=0+ga;function j(t){return t.max-t.min}function un(t,e,o){return Math.abs(t-e)<=o}function an(t,e,o,r=.5){t.origin=r,t.originPoint=C(e.min,e.max,t.origin),t.scale=j(o)/j(e),t.translate=C(o.min,o.max,t.origin)-t.originPoint,(t.scale>=Yu&&t.scale<=Xu||isNaN(t.scale))&&(t.scale=1),(t.translate>=qu&&t.translate<=Zu||isNaN(t.translate))&&(t.translate=0)}function ce(t,e,o,r){an(t.x,e.x,o.x,r?r.originX:void 0),an(t.y,e.y,o.y,r?r.originY:void 0)}function ln(t,e,o,r=0){let i=r?C(o.min,o.max,r):o.min;t.min=i+e.min,t.max=t.min+j(e)}function mn(t,e,o,r){ln(t.x,e.x,o.x,r==null?void 0:r.x),ln(t.y,e.y,o.y,r==null?void 0:r.y)}function cn(t,e,o,r=0){let i=r?C(o.min,o.max,r):o.min;t.min=e.min-i,t.max=t.min+j(e)}function ke(t,e,o,r){cn(t.x,e.x,o.x,r==null?void 0:r.x),cn(t.y,e.y,o.y,r==null?void 0:r.y)}function xa(t,e,o,r,i){return t-=e,t=yo(t,1/o,r),i!==void 0&&(t=yo(t,1/i,r)),t}function Ju(t,e=0,o=1,r=.5,i,s=t,n=t){if(Y.test(e)&&(e=parseFloat(e),e=C(n.min,n.max,e/100)-n.min),typeof e!="number")return;let a=C(s.min,s.max,r);t===s&&(a-=e),t.min=xa(t.min,e,o,a,i),t.max=xa(t.max,e,o,a,i)}function ya(t,e,[o,r,i],s,n){Ju(t,e[o],e[r],e[i],e.scale,s,n)}var Qu=["x","scaleX","originX"],tm=["y","scaleY","originY"];function fn(t,e,o,r){ya(t.x,e,Qu,o?o.x:void 0,r?r.x:void 0),ya(t.y,e,tm,o?o.y:void 0,r?r.y:void 0)}function va(t){return t.translate===0&&t.scale===1}function pn(t){return va(t.x)&&va(t.y)}function Ta(t,e){return t.min===e.min&&t.max===e.max}function Sa(t,e){return Ta(t.x,e.x)&&Ta(t.y,e.y)}function Va(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function hn(t,e){return Va(t.x,e.x)&&Va(t.y,e.y)}function dn(t){return j(t.x)/j(t.y)}function gn(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function et(t){return[t("x"),t("y")]}function wa(t,e,o){let r="",i=t.x.translate/e.x,s=t.y.translate/e.y,n=(o==null?void 0: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 Aa=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],em=Aa.length,ba=t=>typeof t=="string"?parseFloat(t):t,Pa=t=>typeof t=="number"||T.test(t);function Ma(t,e,o,r,i,s){var n,a,l,u;i?(t.opacity=C(0,(n=o.opacity)!=null?n:1,om(r)),t.opacityExit=C((a=e.opacity)!=null?a:1,0,rm(r))):s&&(t.opacity=C((l=e.opacity)!=null?l:1,(u=o.opacity)!=null?u:1,r));for(let c=0;c<em;c++){let m=Aa[c],f=Ca(e,m),p=Ca(o,m);if(f===void 0&&p===void 0)continue;f||(f=0),p||(p=0),f===0||p===0||Pa(f)===Pa(p)?(t[m]=Math.max(C(ba(f),ba(p),r),0),(Y.test(p)||Y.test(f))&&(t[m]+="%")):t[m]=p}(e.rotate||o.rotate)&&(t.rotate=C(e.rotate||0,o.rotate||0,r))}function Ca(t,e){return t[e]!==void 0?t[e]:t.borderRadius}var om=Da(0,.5,qe),rm=Da(.5,.95,k);function Da(t,e,o){return r=>r<t?0:r>e?1:o(dt(t,e,r))}function Ea(t,e,o){let r=D(t)?t:ut(t);return r.start(ee("",r,e,o)),r.animation}function Vt(t,e,o,r={passive:!0}){return t.addEventListener(e,o,r),()=>t.removeEventListener(e,o)}var Ra=(t,e)=>t.depth-e.depth;var kr=class{constructor(){this.children=[],this.isDirty=!1}add(e){qt(this.children,e),this.isDirty=!0}remove(e){It(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Ra),this.isDirty=!1,this.children.forEach(e)}};function La(t,e){let o=B.now(),r=({timestamp:i})=>{let s=i-o;s>=e&&(Z(r),t(s-e))};return P.setup(r,!0),()=>Z(r)}function ue(t){return D(t)?t.get():t}var Br=class{constructor(){this.members=[]}add(e){qt(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===!1)&&!r.snapshot&&(It(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(It(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){var o;for(let r=this.members.indexOf(e)-1;r>=0;r--){let i=this.members[r];if(i.isPresent!==!1&&((o=i.instance)==null?void 0:o.isConnected)!==!1)return this.promote(i),!0}return!1}promote(e,o){var i;let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();let{layoutDependency:s}=r.options,{layoutDependency:n}=e.options;(s===void 0||s!==n)&&(e.resumeFrom=r,o&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(i=e.root)!=null&&i.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var o,r,i,s,n;(r=(o=e.options).onExitComplete)==null||r.call(o),(n=(i=e.resumingFrom)==null?void 0:(s=i.options).onExitComplete)==null||n.call(s)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}};var me={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var fe={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},xn=["","X","Y","Z"],im=1e3,nm=0;function yn(t,e,o,r){let{latestValues:i}=e;i[t]&&(o[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Wa(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:e}=t.options;if(!e)return;let o=fr(e);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(o,"transform",P,!(i||s))}let{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Wa(r)}function Fr({attachResizeListener:t,defaultParent:e,measureScroll:o,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(n={},a=e==null?void 0:e()){this.id=nm++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Q.value&&(fe.nodes=fe.calculatedTargetDeltas=fe.calculatedProjections=0),this.nodes.forEach(lm),this.nodes.forEach(hm),this.nodes.forEach(dm),this.nodes.forEach(cm),Q.addProjectionMetrics&&Q.addProjectionMetrics(fe)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,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=!0;this.root===this&&(this.nodes=new kr)}addEventListener(n,a){return this.eventHandlers.has(n)||this.eventHandlers.set(n,new bt),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=Ee(n)&&!Xs(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=!0),t){let c,m=0,f=()=>this.root.updateBlockedByResize=!1;P.read(()=>{m=window.innerWidth}),t(n,()=>{let p=window.innerWidth;p!==m&&(m=p,this.root.updateBlockedByResize=!0,c&&c(),c=La(f,250),me.hasAnimatedSinceResize&&(me.hasAnimatedSinceResize=!1,this.nodes.forEach(Ba)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&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()||Tm,{onLayoutAnimationStart:g,onLayoutAnimationComplete:d}=u.getProps(),x=!this.targetLayout||!hn(this.targetLayout,p),v=!m&&f;if(this.options.layoutRoot||this.resumeFrom||v||m&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let y={...Pe(h,"layout"),onPlay:g,onComplete:d};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,v)}else m||Ba(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(),Z(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(gm),this.animationId++)}getTransformTemplate(){let{visualElement:n}=this.options;return n&&n.getProps().transformTemplate}willUpdate(n=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Wa(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let m=this.path[c];m.shouldResetTransform=!0,(typeof m.latestValues.x=="string"||typeof m.latestValues.y=="string")&&(m.isLayoutDirty=!0),m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}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=!1,this.isUpdateBlocked()){let l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(mm),this.nodes.forEach(Ia);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ka);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(fm),this.nodes.forEach(pm),this.nodes.forEach(sm),this.nodes.forEach(am)):this.nodes.forEach(ka),this.clearAllSnapshots();let a=B.now();O.delta=W(0,1e3/60,a-O.timestamp),O.timestamp=a,O.isProcessing=!0,eo.update.process(O),eo.preRender.process(O),eo.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ie.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(um),this.sharedNodes.forEach(xm)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,P.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){P.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!j(this.snapshot.measuredBox.x)&&!j(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let n=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=I()),this.isLayoutDirty=!1,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=!1),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&&!pn(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;n&&this.instance&&(a||Dt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(n=!0){let a=this.measurePageBox(),l=this.removeElementScroll(a);return n&&(l=this.removeTransform(l)),Vm(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;let{visualElement:n}=this.options;if(!n)return I();let a=n.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Sm))){let{scroll:c}=this.root;c&&(st(a.x,c.offset.x),st(a.y,c.offset.y))}return a}removeElementScroll(n){var l;let a=I();if(at(a,n),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){let c=this.path[u],{scroll:m,options:f}=c;c!==this.root&&m&&f.layoutScroll&&(m.wasRoot&&at(a,n),st(a.x,m.offset.x),st(a.y,m.offset.y))}return a}applyTransform(n,a=!1,l){var c,m;let u=l||I();at(u,n);for(let f=0;f<this.path.length;f++){let p=this.path[f];!a&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(st(u.x,-p.scroll.offset.x),st(u.y,-p.scroll.offset.y)),Dt(p.latestValues)&&vo(u,p.latestValues,(c=p.layout)==null?void 0:c.layoutBox)}return Dt(this.latestValues)&&vo(u,this.latestValues,(m=this.layout)==null?void 0:m.layoutBox),u}removeTransform(n){var l;let a=I();at(a,n);for(let u=0;u<this.path.length;u++){let c=this.path[u];if(!Dt(c.latestValues))continue;let m;c.instance&&(Dr(c.latestValues)&&c.updateSnapshot(),m=I(),at(m,c.measurePageBox())),fn(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,m)}return Dt(this.latestValues)&&fn(a,this.latestValues),a}setTargetDelta(n){this.targetDelta=n,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(n){this.options={...this.options,...n,crossfade:n.crossfade!==void 0?n.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(n=!1){var p;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||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:m}=this.options;if(!this.layout||!(c||m))return;this.resolvedRelativeTargetAt=O.timestamp;let f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=I(),this.targetWithTransforms=I()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),mn(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):at(this.target,this.layout.layoutBox),tn(this.target,this.targetDelta)):at(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&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&&fe.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Dr(this.parent.latestValues)||Ji(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=I(),this.relativeTargetOrigin=I(),ke(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),at(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var h;let n=this.getLead(),a=!!this.resumingFrom||this!==n,l=!0;if((this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===O.timestamp&&(l=!1),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;at(this.layoutCorrected,this.layout.layoutBox);let m=this.treeScale.x,f=this.treeScale.y;aa(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=I());let{target:p}=n;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(sn(this.prevProjectionDelta.x,this.projectionDelta.x),sn(this.prevProjectionDelta.y,this.projectionDelta.y)),ce(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==f||!gn(this.projectionDelta.x,this.prevProjectionDelta.x)||!gn(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Q.value&&fe.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(n=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),n){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ut(),this.projectionDelta=Ut(),this.projectionDeltaWithTransform=Ut()}setAnimationOrigin(n,a=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},m=Ut();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;let f=I(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,g=p!==h,d=this.getStack(),x=!d||d.members.length<=1,v=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(vm));this.animationProgress=0;let y;this.mixTargetDelta=V=>{let S=V/1e3;Fa(m.x,n.x,S),Fa(m.y,n.y,S),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ke(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ym(this.relativeTarget,this.relativeTargetOrigin,f,S),y&&Sa(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=I()),at(y,this.relativeTarget)),g&&(this.animationValues=c,Ma(c,u,this.latestValues,S,v,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(n){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=P.update(()=>{me.hasAnimatedSinceResize=!0,gt.layout++,this.motionValue||(this.motionValue=ut(0)),this.motionValue.jump(0,!1),this.currentAnimation=Ea(this.motionValue,[0,1e3],{...n,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),n.onUpdate&&n.onUpdate(c)},onStop:()=>{gt.layout--},onComplete:()=>{gt.layout--,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(im),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&&za(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||I();let m=j(this.layout.layoutBox.x);l.x.min=n.target.x.min,l.x.max=l.x.min+m;let f=j(this.layout.layoutBox.y);l.y.min=n.target.y.min,l.y.max=l.y.min+f}at(a,l),vo(a,c),ce(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(n,a){this.sharedNodes.has(n)||this.sharedNodes.set(n,new Br),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:!0}getLead(){var a;let{layoutId:n}=this.options;return n?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;let{layoutId:n}=this.options;return n?(a=this.getStack())==null?void 0:a.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=!0),a&&this.setOptions({transition:a})}relegate(){let n=this.getStack();return n?n.relegate(this):!1}resetSkewAndRotation(){let{visualElement:n}=this.options;if(!n)return;let a=!1,{latestValues:l}=n;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;let u={};l.z&&yn("z",n,u,this.animationValues);for(let c=0;c<xn.length;c++)yn(`rotate${xn[c]}`,n,u,this.animationValues),yn(`skew${xn[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){var h,g;if(!this.instance||this.isSVG)return;if(!this.isVisible){n.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,n.visibility="",n.opacity="",n.pointerEvents=ue(a==null?void 0: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=ue(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Dt(this.latestValues)&&(n.transform=l?l({},""):"none",this.hasProjected=!1);return}n.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let m=wa(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?(g=(h=c.opacity)!=null?h:this.latestValues.opacity)!=null?g: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 d in To){if(c[d]===void 0)continue;let{correct:x,applyTo:v,isCSSVariable:y}=To[d],V=m==="none"?c[d]:x(c[d],u);if(v){let S=v.length;for(let A=0;A<S;A++)n[v[A]]=V}else y?this.options.visualElement.renderState.vars[d]=V:n[d]=V}this.options.layoutId&&(n.pointerEvents=u===this?ue(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(n=>{var a;return(a=n.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ia),this.root.sharedNodes.clear()}}}function sm(t){t.updateLayout()}function am(t){var o;let e=((o=t.resumeFrom)==null?void 0:o.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:i}=t.layout,{animationType:s}=t.options,n=e.source!==t.layout.source;if(s==="size")et(m=>{let f=n?e.measuredBox[m]:e.layoutBox[m],p=j(f);f.min=r[m].min,f.max=f.min+p});else if(s==="x"||s==="y"){let m=s==="x"?"y":"x";Ir(n?e.measuredBox[m]:e.layoutBox[m],r[m])}else za(s,e.layoutBox,r)&&et(m=>{let f=n?e.measuredBox[m]:e.layoutBox[m],p=j(r[m]);f.max=f.min+p,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[m].max=t.relativeTarget[m].min+p)});let a=Ut();ce(a,r,e.layoutBox);let l=Ut();n?ce(l,t.applyTransform(i,!0),e.measuredBox):ce(l,r,e.layoutBox);let u=!pn(a),c=!1;if(!t.resumeFrom){let m=t.getClosestProjectingParent();if(m&&!m.resumeFrom){let{snapshot:f,layout:p}=m;if(f&&p){let h=t.options.layoutAnchor||void 0,g=I();ke(g,e.layoutBox,f.layoutBox,h);let d=I();ke(d,r,p.layoutBox,h),hn(g,d)||(c=!0),m.options.layoutRoot&&(t.relativeTarget=d,t.relativeTargetOrigin=g,t.relativeParent=m)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){let{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function lm(t){Q.value&&fe.nodes++,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 cm(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function um(t){t.clearSnapshot()}function Ia(t){t.clearMeasurements()}function mm(t){t.isLayoutDirty=!0,t.updateLayout()}function ka(t){t.isLayoutDirty=!1}function fm(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function pm(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ba(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function hm(t){t.resolveTargetDelta()}function dm(t){t.calcProjection()}function gm(t){t.resetSkewAndRotation()}function xm(t){t.removeLeadSnapshot()}function Fa(t,e,o){t.translate=C(e.translate,0,o),t.scale=C(e.scale,1,o),t.origin=e.origin,t.originPoint=e.originPoint}function Oa(t,e,o,r){t.min=C(e.min,o.min,r),t.max=C(e.max,o.max,r)}function ym(t,e,o,r){Oa(t.x,e.x,o.x,r),Oa(t.y,e.y,o.y,r)}function vm(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}var Tm={duration:.45,ease:[.4,0,.1,1]},Na=t=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ja=Na("applewebkit/")&&!Na("chrome/")?Math.round:k;function Ga(t){t.min=ja(t.min),t.max=ja(t.max)}function Vm(t){Ga(t.x),Ga(t.y)}function za(t,e,o){return t==="position"||t==="preserve-aspect"&&!un(dn(e),dn(o),.2)}function Sm(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}var Ua=Fr({attachResizeListener:(t,e)=>Vt(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0});var Or={current:void 0},Ao=Fr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Or.current){let t=new Ua({});t.mount(window),t.setOptions({layoutScroll:!0}),Or.current=t}return Or.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});var Nr=Fo(require("react"),1),Et=require("react");var Ka=require("react"),Be=(0,Ka.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});var $a=Fo(require("react"),1);function Ha(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function wm(...t){return e=>{let o=!1,r=t.map(i=>{let s=Ha(i,e);return!o&&typeof s=="function"&&(o=!0),s});if(o)return()=>{for(let i=0;i<r.length;i++){let s=r[i];typeof s=="function"?s():Ha(t[i],null)}}}}function _a(...t){return $a.useCallback(wm(...t),t)}var vn=class extends Nr.Component{getSnapshotBeforeUpdate(e){let o=this.props.childRef.current;if(re(o)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let r=o.offsetParent,i=re(r)&&r.offsetWidth||0,s=re(r)&&r.offsetHeight||0,n=getComputedStyle(o),a=this.props.sizeRef.current;a.height=parseFloat(n.height),a.width=parseFloat(n.width),a.top=o.offsetTop,a.left=o.offsetLeft,a.right=i-a.width-a.left,a.bottom=s-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function Xa({children:t,isPresent:e,anchorX:o,anchorY:r,root:i,pop:s}){var f,p;let n=(0,Et.useId)(),a=(0,Et.useRef)(null),l=(0,Et.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=(0,Et.useContext)(Be),c=(p=(f=t.props)==null?void 0:f.ref)!=null?p:t==null?void 0:t.ref,m=_a(a,c);return(0,Et.useInsertionEffect)(()=>{let{width:h,height:g,top:d,left:x,right:v,bottom:y}=l.current;if(e||s===!1||!a.current||!h||!g)return;let V=o==="left"?`left: ${x}`:`right: ${v}`,S=r==="bottom"?`bottom: ${y}`:`top: ${d}`;a.current.dataset.motionPopId=n;let A=document.createElement("style");u&&(A.nonce=u);let E=i!=null?i:document.head;return E.appendChild(A),A.sheet&&A.sheet.insertRule(`
|
|
3
|
+
[data-motion-pop-id="${n}"] {
|
|
4
|
+
position: absolute !important;
|
|
5
|
+
width: ${h}px !important;
|
|
6
|
+
height: ${g}px !important;
|
|
7
|
+
${V}px !important;
|
|
8
|
+
${S}px !important;
|
|
9
|
+
}
|
|
10
|
+
`),()=>{var b;(b=a.current)==null||b.removeAttribute("data-motion-pop-id"),E.contains(A)&&E.removeChild(A)}},[e]),(0,Ya.jsx)(vn,{isPresent:e,childRef:a,sizeRef:l,pop:s,children:s===!1?t:Nr.cloneElement(t,{ref:m})})}var Za=({children:t,initial:e,isPresent:o,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:n,anchorX:a,anchorY:l,root:u})=>{let c=ge(bm),m=(0,Mo.useId)(),f=!0,p=(0,Mo.useMemo)(()=>(f=!1,{id:m,initial:e,isPresent:o,custom:i,onExitComplete:h=>{c.set(h,!0);for(let g of c.values())if(!g)return;r&&r()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[o,c,r]);return s&&f&&(p={...p}),(0,Mo.useMemo)(()=>{c.forEach((h,g)=>c.set(g,!1))},[o]),qa.useEffect(()=>{!o&&!c.size&&r&&r()},[o]),t=(0,Tn.jsx)(Xa,{pop:n==="popLayout",isPresent:o,anchorX:a,anchorY:l,root:u,children:t}),(0,Tn.jsx)(Lt.Provider,{value:p,children:t})};function bm(){return new Map}var Ht=require("react");function jr(t=!0){let e=(0,Ht.useContext)(Lt);if(e===null)return[!0,null];let{isPresent:o,onExitComplete:r,register:i}=e,s=(0,Ht.useId)();(0,Ht.useEffect)(()=>{if(t)return i(s)},[t]);let n=(0,Ht.useCallback)(()=>t&&r&&r(s),[s,r,t]);return!o&&r?[!1,n]:[!0]}var Gr=require("react"),Do=t=>t.key||"";function Vn(t){let e=[];return Gr.Children.forEach(t,o=>{(0,Gr.isValidElement)(o)&&e.push(o)}),e}var Sn=({children:t,custom:e,initial:o=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:n=!1,anchorX:a="left",anchorY:l="top",root:u})=>{let[c,m]=jr(n),f=(0,mt.useMemo)(()=>Vn(t),[t]),p=n&&!c?[]:f.map(Do),h=(0,mt.useRef)(!0),g=(0,mt.useRef)(f),d=ge(()=>new Map),x=(0,mt.useRef)(new Set),[v,y]=(0,mt.useState)(f),[V,S]=(0,mt.useState)(f);No(()=>{h.current=!1,g.current=f;for(let b=0;b<V.length;b++){let M=Do(V[b]);p.includes(M)?(d.delete(M),x.current.delete(M)):d.get(M)!==!0&&d.set(M,!1)}},[V,p.length,p.join("-")]);let A=[];if(f!==v){let b=[...f];for(let M=0;M<V.length;M++){let w=V[M],R=Do(w);p.includes(R)||(b.splice(M,0,w),A.push(w))}return s==="wait"&&A.length&&(b=A),S(Vn(b)),y(f),null}process.env.NODE_ENV!=="production"&&s==="wait"&&V.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);let{forceRender:E}=(0,mt.useContext)(de);return(0,Eo.jsx)(Eo.Fragment,{children:V.map(b=>{let M=Do(b),w=n&&!c?!1:f===V||p.includes(M),R=()=>{if(x.current.has(M))return;if(d.has(M))x.current.add(M),d.set(M,!0);else return;let H=!0;d.forEach(St=>{St||(H=!1)}),H&&(E==null||E(),S(g.current),n&&(m==null||m()),r&&r())};return(0,Eo.jsx)(Za,{isPresent:w,initial:!h.current||o?void 0:!1,custom:e,presenceAffectsLayout:i,mode:s,root:u,onExitComplete:w?void 0:R,anchorX:a,anchorY:l,children:b},M)})})};var Ja=require("react"),Wr=(0,Ja.createContext)({strict:!1});var Qa={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"]},tl=!1;function Pm(){if(tl)return;let t={};for(let e in Qa)t[e]={isEnabled:o=>Qa[e].some(r=>!!o[r])};go(t),tl=!0}function zr(){return Pm(),Yi()}function el(t){let e=zr();for(let o in t)e[o]={...e[o],...t[o]};go(e)}var Cm=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 Ro(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Cm.has(t)}var ol=t=>!Ro(t);function Am(t){typeof t=="function"&&(ol=e=>e.startsWith("on")?!Ro(e):t(e))}try{Am(require("@emotion/is-prop-valid").default)}catch(t){}function rl(t,e,o){let r={};for(let i in t)i==="values"&&typeof t.values=="object"||D(t[i])||(ol(i)||o===!0&&Ro(i)||!e&&!Ro(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}var _r=require("react/jsx-runtime");var je=require("react");var il=require("react"),$t=(0,il.createContext)({});var Ur=require("react");function nl(t,e){if(Kt(t)){let{initial:o,animate:r}=t;return{initial:o===!1||Tt(o)?o:void 0,animate:Tt(r)?r:void 0}}return t.inherit!==!1?e:{}}function al(t){let{initial:e,animate:o}=nl(t,(0,Ur.useContext)($t));return(0,Ur.useMemo)(()=>({initial:e,animate:o}),[sl(e),sl(o)])}function sl(t){return Array.isArray(t)?t.join(" "):t}var Ne=require("react");var ll=require("react");var Fe=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function wn(t,e,o){for(let r in e)!D(e[r])&&!Vo(r,o)&&(t[r]=e[r])}function Mm({transformTemplate:t},e){return(0,ll.useMemo)(()=>{let o=Fe();return se(o,e,t),Object.assign({},o.vars,o.style)},[e])}function Dm(t,e){let o=t.style||{},r={};return wn(r,o,t),Object.assign(r,Mm(t,e)),r}function cl(t,e){let o={},r=Dm(t,e);return t.drag&&t.dragListener!==!1&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"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 ul=require("react");var Kr=()=>({...Fe(),attrs:{}});function ml(t,e,o,r){let i=(0,ul.useMemo)(()=>{let s=Kr();return wo(s,e,bo(r),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){let s={};wn(s,t.style,t),i.style={...s,...i.style}}return i}var fl=["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 Oe(t){return typeof t!="string"||t.includes("-")?!1:!!(fl.indexOf(t)>-1||/[A-Z]/u.test(t))}function pl(t,e,o,{latestValues:r},i,s=!1,n){let l=((n!=null?n:Oe(t))?ml:cl)(e,r,i,t),u=rl(e,typeof t=="string",s),c=t!==Ne.Fragment?{...u,...l,ref:o}:{},{children:m}=e,f=(0,Ne.useMemo)(()=>D(m)?m.get():m,[m]);return(0,Ne.createElement)(t,{...c,children:f})}var bn=require("react");function Em({scrapeMotionValuesFromProps:t,createRenderState:e},o,r,i){return{latestValues:Rm(o,r,i,t),renderState:e()}}function Rm(t,e,o,r){let i={},s=r(t,{});for(let f in s)i[f]=ue(s[f]);let{initial:n,animate:a}=t,l=Kt(t),u=fo(t);e&&u&&!l&&t.inherit!==!1&&(n===void 0&&(n=e.initial),a===void 0&&(a=e.animate));let c=o?o.initial===!1:!1;c=c||n===!1;let m=c?a:n;if(m&&typeof m!="boolean"&&!Mt(m)){let f=Array.isArray(m)?m:[m];for(let p=0;p<f.length;p++){let h=oe(t,f[p]);if(h){let{transitionEnd:g,transition:d,...x}=h;for(let v in x){let y=x[v];if(Array.isArray(y)){let V=c?y.length-1:0;y=y[V]}y!==null&&(i[v]=y)}for(let v in g)i[v]=g[v]}}}return i}var Hr=t=>(e,o)=>{let r=(0,bn.useContext)($t),i=(0,bn.useContext)(Lt),s=()=>Em(t,e,r,i);return o?s():ge(s)};var hl=Hr({scrapeMotionValuesFromProps:ae,createRenderState:Fe});var dl=Hr({scrapeMotionValuesFromProps:Po,createRenderState:Kr});var gl=Symbol.for("motionComponentSymbol");var pe=require("react");function xl(t,e,o){let r=(0,pe.useRef)(o);(0,pe.useInsertionEffect)(()=>{r.current=o});let i=(0,pe.useRef)(null);return(0,pe.useCallback)(s=>{var a;s&&((a=t.onMount)==null||a.call(t,s));let n=r.current;if(typeof n=="function")if(s){let l=n(s);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):n(s);else n&&(n.current=s);e&&(s?e.mount(s):e.unmount())},[e])}var q=require("react");var yl=require("react"),$r=(0,yl.createContext)({});function _t(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function vl(t,e,o,r,i,s){var y,V;let{visualElement:n}=(0,q.useContext)($t),a=(0,q.useContext)(Wr),l=(0,q.useContext)(Lt),u=(0,q.useContext)(Be),c=u.reducedMotion,m=u.skipAnimations,f=(0,q.useRef)(null),p=(0,q.useRef)(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(t,{visualState:e,parent:n,props:o,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:m,isSVG:s}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let h=f.current,g=(0,q.useContext)($r);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&Lm(f.current,o,i,g);let d=(0,q.useRef)(!1);(0,q.useInsertionEffect)(()=>{h&&d.current&&h.update(o,l)});let x=o[lo],v=(0,q.useRef)(!!x&&typeof window!="undefined"&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,x))&&((V=window.MotionHasOptimisedAnimation)==null?void 0:V.call(window,x)));return No(()=>{p.current=!0,h&&(d.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),v.current&&h.animationState&&h.animationState.animateChanges())}),(0,q.useEffect)(()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,x)}),v.current=!1),h.enteringChildren=void 0)}),h}function Lm(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:Tl(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!n||a&&_t(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function Tl(t){if(t)return t.options.allowProjection!==!1?t.projection:Tl(t.parent)}function Yr(t,{forwardMotionProps:e=!1,type:o}={},r,i){var u,c;r&&el(r);let s=o?o==="svg":Oe(t),n=s?dl:hl;function a(m,f){let p,h={...(0,je.useContext)(Be),...m,layoutId:Im(m)},{isStatic:g}=h,d=al(m),x=n(m,g);if(!g&&typeof window!="undefined"){km(h,r);let v=Bm(h);p=v.MeasureLayout,d.visualElement=vl(t,x,h,i,v.ProjectionNode,s)}return(0,_r.jsxs)($t.Provider,{value:d,children:[p&&d.visualElement?(0,_r.jsx)(p,{visualElement:d.visualElement,...h}):null,pl(t,m,xl(x,d.visualElement,f),x,g,e,s)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${(c=(u=t.displayName)!=null?u:t.name)!=null?c:""})`}`;let l=(0,je.forwardRef)(a);return l[gl]=t,l}function Im({layoutId:t}){let e=(0,je.useContext)(de).id;return e&&t!==void 0?e+"-"+t:t}function km(t,e){let o=(0,je.useContext)(Wr).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?rt(!1,r,"lazy-strict-mode"):_(!1,r,"lazy-strict-mode")}}function Bm(t){let e=zr(),{drag:o,layout:r}=e;if(!o&&!r)return{};let i={...o,...r};return{MeasureLayout:o!=null&&o.isEnabled(t)||r!=null&&r.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Vl(t,e){if(typeof Proxy=="undefined")return Yr;let o=new Map,r=(s,n)=>Yr(s,n,t,e),i=(s,n)=>(process.env.NODE_ENV!=="production"&&Zt(!1,"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,Yr(n,void 0,t,e)),o.get(n))})}var Sl=require("react");var wl=(t,e)=>{var r;return((r=e.isSVG)!=null?r:Oe(t))?new Co(e):new So(e,{allowProjection:t!==Sl.Fragment})};var Xr=class extends U{constructor(e){super(e),e.animationState||(e.animationState=nn(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Mt(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(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}};var Fm=0,qr=class extends U{constructor(){super(...arguments),this.id=Fm++,this.isExitComplete=!1}update(){var s;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===!1){if(this.isExitComplete){let{initial:n,custom:a}=this.node.getProps();if(typeof n=="string"){let l=tt(this.node,n,a);if(l){let{transition:u,transitionEnd:c,...m}=l;for(let f in m)(s=this.node.getValue(f))==null||s.jump(m[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let i=this.node.animationState.setActive("exit",!e);o&&!e&&i.then(()=>{this.isExitComplete=!0,o(this.id)})}mount(){let{register:e,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),e&&(this.unmount=e(this.id))}unmount(){}};var bl={animation:{Feature:Xr},exit:{Feature:qr}};function Rt(t){return{point:{x:t.pageX,y:t.pageY}}}var Pl=t=>e=>ne(e)&&t(e,Rt(e));function Yt(t,e,o,r){return Vt(t,e,Pl(o),r)}var Zr=({current:t})=>t?t.ownerDocument.defaultView:null;var Cl=(t,e)=>Math.abs(t-e);function Al(t,e){let o=Cl(t.x,e.x),r=Cl(t.y,e.y);return Math.sqrt(o**2+r**2)}var Ml=new Set(["auto","scroll"]),Ge=class{constructor(e,o,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,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=Jr(this.lastRawMoveEventInfo,this.transformPagePoint));let p=Pn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=Al(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!g)return;let{point:d}=p,{timestamp:x}=O;this.history.push({...d,timestamp:x});let{onStart:v,onMove:y}=this.handlers;h||(v&&v(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,p)},this.handlePointerMove=(p,h)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=h,this.lastMoveEventInfo=Jr(h,this.transformPagePoint),P.update(this.updatePoint,!0)},this.handlePointerUp=(p,h)=>{this.end();let{onEnd:g,onSessionEnd:d,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let v=Pn(p.type==="pointercancel"?this.lastMoveEventInfo:Jr(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,v),d&&d(p,v)},!ne(e))return;this.dragSnapToOrigin=s,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=n,this.contextWindow=i||window;let l=Rt(e),u=Jr(l,this.transformPagePoint),{point:c}=u,{timestamp:m}=O;this.history=[{...c,timestamp:m}];let{onSessionStart:f}=o;f&&f(e,Pn(u,this.history)),this.removeListeners=lt(Yt(this.contextWindow,"pointermove",this.handlePointerMove),Yt(this.contextWindow,"pointerup",this.handlePointerUp),Yt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let o=e.parentElement;for(;o;){let r=getComputedStyle(o);(Ml.has(r.overflowX)||Ml.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:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),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),P.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Z(this.updatePoint)}};function Jr(t,e){return e?{point:e(t.point)}:t}function Dl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Pn({point:t},e){return{point:t,delta:Dl(t,El(e)),offset:Dl(t,Om(e)),velocity:Nm(e,.1)}}function Om(t){return t[0]}function El(t){return t[t.length-1]}function Nm(t,e){if(t.length<2)return{x:0,y:0};let o=t.length-1,r=null,i=El(t);for(;o>=0&&(r=t[o],!(i.timestamp-r.timestamp>N(e)));)o--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&i.timestamp-r.timestamp>N(e)*2&&(r=t[1]);let s=K(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 Bl(t,{min:e,max:o},r){return e!==void 0&&t<e?t=r?C(e,t,r.min):Math.max(t,e):o!==void 0&&t>o&&(t=r?C(o,t,r.max):Math.min(t,o)),t}function Rl(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 Fl(t,{top:e,left:o,bottom:r,right:i}){return{x:Rl(t.x,o,i),y:Rl(t.y,e,r)}}function Ll(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 Ol(t,e){return{x:Ll(t.x,e.x),y:Ll(t.y,e.y)}}function Nl(t,e){let o=.5,r=j(t),i=j(e);return i>r?o=dt(e.min,e.max-r,t.min):r>i&&(o=dt(t.min,t.max-i,e.min)),W(0,1,o)}function jl(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 Qr=.35;function Gl(t=Qr){return t===!1?t=0:t===!0&&(t=Qr),{x:Il(t,"left","right"),y:Il(t,"top","bottom")}}function Il(t,e,o){return{min:kl(t,e),max:kl(t,o)}}function kl(t,e){return typeof t=="number"?t:t[e]||0}var jm=new WeakMap,ei=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=I(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:o=!1,distanceThreshold:r}={}){let{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;let s=m=>{o&&this.snapToCursor(Rt(m).point),this.stopAnimation()},n=(m,f)=>{let{drag:p,dragPropagation:h,onDragStart:g}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ji(p),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),et(x=>{let v=this.getAxisMotionValue(x).get()||0;if(Y.test(v)){let{projection:y}=this.visualElement;if(y&&y.layout){let V=y.layout.layoutBox[x];V&&(v=j(V)*(parseFloat(v)/100))}}this.originPoint[x]=v}),g&&P.update(()=>g(m,f),!1,!0),Ce(this.visualElement,"transform");let{animationState:d}=this.visualElement;d&&d.setActive("whileDrag",!0)},a=(m,f)=>{this.latestPointerEvent=m,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:h,onDirectionLock:g,onDrag:d}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:x}=f;if(h&&this.currentDirection===null){this.currentDirection=Wm(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),d&&P.update(()=>d(m,f),!1,!0)},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 Ge(e,{onSessionStart:s,onStart:n,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Zr(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&&P.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:o}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,o,r){let{drag:i}=this.getProps();if(!r||!ti(e,i,this.currentDirection))return;let s=this.getAxisMotionValue(e),n=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(n=Bl(n,this.constraints[e],this.elastic[e])),s.set(n)}resolveConstraints(){var s;let{dragConstraints:e,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;e&&_t(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=Fl(r.layoutBox,e):this.constraints=!1,this.elastic=Gl(o),i!==this.constraints&&!_t(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&et(n=>{this.constraints!==!1&&this.getAxisMotionValue(n)&&(this.constraints[n]=jl(r.layoutBox[n],this.constraints[n]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:o}=this.getProps();if(!e||!_t(e))return!1;let r=e.current;_(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!1;let s=en(r,i.root,this.visualElement.getTransformPagePoint()),n=Ol(i.layout.layoutBox,s);if(o){let a=o(Xi(n));this.hasMutatedConstraints=!!a,a&&(n=xo(a))}return n}startAnimation(e){let{drag:o,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:n,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=et(c=>{if(!ti(c,o,this.currentDirection))return;let m=l&&l[c]||{};(n===!0||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 Ce(this.visualElement,e),r.start(ee(e,r,0,o,this.visualElement,!1))}stopAnimation(){et(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){et(o=>{let{drag:r}=this.getProps();if(!ti(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]-C(n,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!_t(o)||!r||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};et(n=>{let a=this.getAxisMotionValue(n);if(a&&this.constraints!==!1){let l=a.get();i[n]=Nl({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=!1,this.resolveConstraints(),et(n=>{if(!ti(n,e,null))return;let a=this.getAxisMotionValue(n),{min:l,max:u}=this.constraints[n];a.set(C(l,u,i[n]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;jm.set(this.visualElement,this);let e=this.visualElement.current,o=Yt(e,"pointerdown",u=>{let{drag:c,dragListener:m=!0}=this.getProps(),f=u.target,p=f!==e&&Ui(f);c&&m&&!p&&this.start(u)}),r,i=()=>{let{dragConstraints:u}=this.getProps();_t(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=Gm(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,n=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),P.read(i);let a=Vt(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(et(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=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:n=Qr,dragMomentum:a=!0}=e;return{...e,drag:o,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:n,dragMomentum:a}}};function Wl(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function Gm(t,e,o){let r=Pr(t,Wl(o)),i=Pr(e,Wl(o));return()=>{r(),i()}}function ti(t,e,o){return(e===!0||e===t)&&(o===null||o===t)}function Wm(t,e=10){let o=null;return Math.abs(t.y)>e?o="y":Math.abs(t.x)>e&&(o="x"),o}var oi=class extends U{constructor(e){super(e),this.removeGroupControls=k,this.removeListeners=k,this.controls=new ei(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||k}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 Cn=t=>(e,o)=>{t&&P.update(()=>t(e,o),!1,!0)},ri=class extends U{constructor(){super(...arguments),this.removePointerDownListener=k}onPointerDown(e){this.session=new Ge(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Zr(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:o,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Cn(e),onStart:Cn(o),onMove:Cn(r),onEnd:(s,n)=>{delete this.session,i&&P.postRender(()=>i(s,n))}}}mount(){this.removePointerDownListener=Yt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var zl=require("react/jsx-runtime");var Lo=require("react");var An=!1,Mn=class extends Lo.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),An&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),me.hasEverUpdated=!0}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}),An=!0,i||e.layoutDependency!==o||o===void 0||e.isPresent!==s?n.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?n.promote():n.relegate()||P.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(),ie.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:i}=e;An=!0,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 ii(t){let[e,o]=jr(),r=(0,Lo.useContext)(de);return(0,zl.jsx)(Mn,{...t,layoutGroup:r,switchLayoutGroup:(0,Lo.useContext)($r),isPresent:e,safeToRemove:o})}var Ul={pan:{Feature:ri},drag:{Feature:oi,ProjectionNode:Ao,MeasureLayout:ii}};function Kl(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&&P.postRender(()=>s(e,Rt(e)))}var ni=class extends U{mount(){let{current:e}=this.node;e&&(this.unmount=Gi(e,(o,r)=>(Kl(this.node,r,"Start"),i=>Kl(this.node,i,"End"))))}unmount(){}};var si=class extends U{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(o){e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lt(Vt(this.node.current,"focus",()=>this.onFocus()),Vt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function Hl(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&&P.postRender(()=>s(e,Rt(e)))}var ai=class extends U{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:o,propagate:r}=this.node.props;this.unmount=Hi(e,(i,s)=>(Hl(this.node,s,"Start"),(n,{success:a})=>Hl(this.node,n,a?"End":"Cancel")),{useGlobalTarget:o,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}};var En=new WeakMap,Dn=new WeakMap,zm=t=>{let e=En.get(t.target);e&&e(t)},Um=t=>{t.forEach(zm)};function Km({root:t,...e}){let o=t||document;Dn.has(o)||Dn.set(o,{});let r=Dn.get(o),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(Um,{root:t,...e})),r[i]}function $l(t,e,o){let r=Km(e);return En.set(t,o),r.observe(t),()=>{En.delete(t),r.unobserve(t)}}var Hm={some:0,all:1},li=class extends U{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);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:Hm[i]},a=u=>{let{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:m,onViewportLeave:f}=this.node.getProps(),p=c?m:f;p&&p(u)};this.stopObserver=$l(this.node.current,n,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;let{props:e,prevProps:o}=this.node;["amount","margin","root"].some($m(e,o))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}};function $m({viewport:t={}},{viewport:e={}}={}){return o=>t[o]!==e[o]}var _l={inView:{Feature:li},tap:{Feature:ai},focus:{Feature:si},hover:{Feature:ni}};var Yl={layout:{ProjectionNode:Ao,MeasureLayout:ii}};var Xl={...bl,..._l,...Ul,...Yl};var Rn=Vl(Xl,wl);var G=require("react/jsx-runtime"),ql=({className:t})=>(0,G.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:ht("size-5.5",t),height:24,width:24,children:(0,G.jsx)("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"})}),Zl=({className:t})=>(0,G.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:ht("size-5.5",t),height:24,width:24,children:(0,G.jsx)("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}),Jl=({className:t})=>(0,G.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:ht("size-5.5",t),height:24,width:24,children:(0,G.jsx)("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}),Ql=({className:t})=>(0,G.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:ht("size-5.5 animate-spin",t),children:[(0,G.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,G.jsx)("path",{d:"M12 6l0 -3"}),(0,G.jsx)("path",{d:"M16.25 7.75l2.15 -2.15"}),(0,G.jsx)("path",{d:"M18 12l3 0"}),(0,G.jsx)("path",{d:"M16.25 16.25l2.15 2.15"}),(0,G.jsx)("path",{d:"M12 18l0 3"}),(0,G.jsx)("path",{d:"M7.75 16.25l-2.15 2.15"}),(0,G.jsx)("path",{d:"M6 12l-3 0"}),(0,G.jsx)("path",{d:"M7.75 7.75l-2.15 -2.15"})]}),tc=({className:t})=>(0,G.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:ht("size-3",t),children:(0,G.jsx)("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})});var Io=require("react/jsx-runtime");function ec({message:t,type:e="default",icon:o,setToasts:r,id:i,closeButton:s}){let n=()=>{r==null||r(a=>a.filter(l=>l.id!==i))};return(0,Io.jsxs)(Rn.div,{layout:!0,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:40},transition:{layout:{duration:.25},opacity:{duration:.2},y:{duration:.2}},className:ht("pointer-events-auto relative flex max-w-80 min-w-62 items-center gap-1 rounded-lg border border-gray-200/70 bg-white py-3 text-sm text-zinc-800",e==="default"?"px-4":"px-3"),children:[o,t,s&&(0,Io.jsx)("button",{onClick:n,className:"absolute -top-2 -right-2 cursor-pointer rounded-full border border-gray-200/70 bg-white p-px text-zinc-500",children:(0,Io.jsx)(tc,{})})]})}var ui=require("react");var ko=require("react/jsx-runtime");function oc(t){switch(t){case"success":return(0,ko.jsx)(ql,{});case"error":return(0,ko.jsx)(Zl,{});case"warning":return(0,ko.jsx)(Jl,{});case"loading":return(0,ko.jsx)(Ql,{});default:return null}}var ci=require("react/jsx-runtime"),Ln=null;function rc({autoClose:t=3e3,closeButton:e=!1}){let[o,r]=(0,ui.useState)([]);return(0,ui.useEffect)(()=>{Ln=(i,s={})=>{let{type:n="default",duration:a,closeButton:l,id:u}=s,c=u!=null?u:Date.now(),m=a||t;return r(f=>f.find(h=>h.id===c)?f.map(h=>h.id===c?{...h,message:i,type:n,closeButton:l!=null?l:e}:h):[...f,{id:c,message:i,type:n,closeButton:l!=null?l:e}]),n!=="loading"&&setTimeout(()=>{r(f=>f.filter(p=>p.id!==c))},m),c}},[t,e]),(0,ci.jsx)("div",{className:ht("pointer-events-none fixed inset-0 z-9999 flex flex-col items-end justify-end gap-2 p-4 text-sm"),children:(0,ci.jsx)(Sn,{initial:!1,children:o.map(i=>(0,ci.jsx)(ec,{id:i.id,message:i.message,setToasts:r,type:i.type,icon:oc(i.type),closeButton:i.closeButton},i.id))})})}function J(t,e){if(Ln)return Ln(t,e)}J.success=(t,e)=>J(t,{...e,type:"success"});J.error=(t,e)=>J(t,{...e,type:"error"});J.warning=(t,e)=>J(t,{...e,type:"warning"});J.loading=(t,e)=>J(t,{...e,type:"loading"});J.promise=(t,e,o)=>{let r=Date.now().toString()+Math.random().toString(36).substring(2);return J(e.loading,{...o,type:"loading",id:r,duration:1/0}),t.then(i=>{let s=typeof e.success=="function"?e.success(i):e.success;J(s,{...o,type:"success",id:r})}).catch(i=>{let s=typeof e.error=="function"?e.error(i):e.error;J(s,{...o,type:"error",id:r})}),t};0&&(module.exports={ToastContainer,toast});
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export{B as ToastContainer,s as toast};
|
|
1
|
+
"use client";
|
|
2
|
+
var xn=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,o)=>(typeof require!="undefined"?require:e)[o]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});import{twMerge as Ol}from"tailwind-merge";import Nl from"clsx";function ft(...t){return Ol(Nl(t))}import{jsx as La,Fragment as dm}from"react/jsx-runtime";import{useMemo as gm,useRef as rn,useState as Ia,useContext as xm}from"react";import{createContext as jl}from"react";var ue=jl({});import{useRef as Gl}from"react";function me(t){let e=Gl(null);return e.current===null&&(e.current=t()),e.current}import{useLayoutEffect as Wl,useEffect as zl}from"react";var yn=typeof window!="undefined";var bo=yn?Wl:zl;import{jsx as Ma}from"react/jsx-runtime";import*as Ea from"react";import{useId as am,useMemo as Da}from"react";import{createContext as Ul}from"react";var Dt=Ul(null);import{jsx as rm}from"react/jsx-runtime";function $t(t,e){t.indexOf(e)===-1&&t.push(e)}function Et(t,e){let o=t.indexOf(e);o>-1&&t.splice(o,1)}var G=(t,e,o)=>o>e?e:o<t?t:o;function ke(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}var ot=()=>{},$=()=>{},vn;typeof process!="undefined"&&((vn=process.env)==null?void 0:vn.NODE_ENV)!=="production"&&(ot=(t,e,o)=>{!t&&typeof console!="undefined"&&console.warn(ke(e,o))},$=(t,e,o)=>{if(!t)throw new Error(ke(e,o))});var X={};var Be=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Fe(t){return typeof t=="object"&&t!==null}var Oe=t=>/^0[^.\s]+$/u.test(t);function Ne(t){let e;return()=>(e===void 0&&(e=t()),e)}var k=t=>t;var Kl=(t,e)=>o=>e(t(o)),at=(...t)=>t.reduce(Kl);var pt=(t,e,o)=>{let r=e-t;return r===0?1:(o-t)/r};var St=class{constructor(){this.subscriptions=[]}add(e){return $t(this.subscriptions,e),()=>Et(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 N=t=>t*1e3,U=t=>t/1e3;function je(t,e){return e?t*(1e3/e):0}var Tn=new Set;function _t(t,e,o){t||Tn.has(e)||(console.warn(ke(e,o)),Tn.add(e))}var Vn=(t,e,o)=>(((1-3*o+3*e)*t+(3*o-6*e))*t+3*e)*t,Hl=1e-7,$l=12;function _l(t,e,o,r,i){let s,n,a=0;do n=e+(o-e)/2,s=Vn(n,r,i)-t,s>0?o=n:e=n;while(Math.abs(s)>Hl&&++a<$l);return n}function Rt(t,e,o,r){if(t===e&&o===r)return k;let i=s=>_l(s,0,1,t,o);return s=>s===0||s===1?s:Vn(i(s),e,r)}var Po=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2;var Co=t=>e=>1-t(1-e);var Ao=Rt(.33,1.53,.69,.99),fe=Co(Ao),Ge=Po(fe);var We=t=>t>=1?1:(t*=2)<1?.5*fe(t):.5*(2-Math.pow(2,-10*(t-1)));var ze=t=>1-Math.sin(Math.acos(t)),Ue=Co(ze),Ke=Po(ze);var Yr=Rt(.42,0,1,1),Xr=Rt(0,0,.58,1),He=Rt(.42,0,.58,1);var qr=t=>Array.isArray(t)&&typeof t[0]!="number";var $e=t=>Array.isArray(t)&&typeof t[0]=="number";var Sn={linear:k,easeIn:Yr,easeInOut:He,easeOut:Xr,circIn:ze,circInOut:Ke,circOut:Ue,backIn:fe,backInOut:Ge,backOut:Ao,anticipate:We},Yl=t=>typeof t=="string",Mo=t=>{if($e(t)){$(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,o,r,i]=t;return Rt(e,o,r,i)}else if(Yl(t))return $(Sn[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Sn[t];return t};var _e=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Z={value:null,addProjectionMetrics:null};function wn(t,e){let o=new Set,r=new Set,i=!1,s=!1,n=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(m){n.has(m)&&(c.schedule(m),t()),l++,m(a)}let c={schedule:(m,f=!1,p=!1)=>{let g=p&&i?o:r;return f&&n.add(m),g.add(m),m},cancel:m=>{r.delete(m),n.delete(m)},process:m=>{if(a=m,i){s=!0;return}i=!0;let f=o;o=r,r=f,o.forEach(u),e&&Z.value&&Z.value.frameloop[e].push(l),l=0,o.clear(),i=!1,s&&(s=!1,c.process(m))}};return c}var Xl=40;function Do(t,e){let o=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},s=()=>o=!0,n=_e.reduce((y,V)=>(y[V]=wn(s,e?V:void 0),y),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:m,preRender:f,render:p,postRender:h}=n,g=()=>{let y=X.useManualTiming,V=y?i.timestamp:performance.now();o=!1,y||(i.delta=r?1e3/60:Math.max(Math.min(V-i.timestamp,Xl),1)),i.timestamp=V,i.isProcessing=!0,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=!1,o&&e&&(r=!1,t(g))},d=()=>{o=!0,r=!0,i.isProcessing||t(g)};return{schedule:_e.reduce((y,V)=>{let S=n[V];return y[V]=(A,E=!1,b=!1)=>(o||d(),S.schedule(A,E,b)),y},{}),cancel:y=>{for(let V=0;V<_e.length;V++)n[_e[V]].cancel(y)},state:i,steps:n}}var{schedule:P,cancel:q,state:O,steps:Ye}=Do(typeof requestAnimationFrame!="undefined"?requestAnimationFrame:k,!0);var Eo;function ql(){Eo=void 0}var B={now:()=>(Eo===void 0&&B.set(O.isProcessing||X.useManualTiming?O.timestamp:performance.now()),Eo),set:t=>{Eo=t,queueMicrotask(ql)}};var ht={layout:0,mainThread:0,waapi:0};var bn=t=>e=>typeof e=="string"&&e.startsWith(t),Ro=bn("--"),Zl=bn("var(--"),pe=t=>Zl(t)?Jl.test(t.split("/*")[0].trim()):!1,Jl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Zr(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}var dt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},wt={...dt,transform:t=>G(0,1,t)},Xe={...dt,default:1};var Lt=t=>Math.round(t*1e5)/1e5;var he=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Pn(t){return t==null}var Cn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var de=(t,e)=>o=>!!(typeof o=="string"&&Cn.test(o)&&o.startsWith(t)||e&&!Pn(o)&&Object.prototype.hasOwnProperty.call(o,e)),Lo=(t,e,o)=>r=>{if(typeof r!="string")return r;let[i,s,n,a]=r.match(he);return{[t]:parseFloat(i),[e]:parseFloat(s),[o]:parseFloat(n),alpha:a!==void 0?parseFloat(a):1}};var Ql=t=>G(0,255,t),Jr={...dt,transform:t=>Math.round(Ql(t))},gt={test:de("rgb","red"),parse:Lo("red","green","blue"),transform:({red:t,green:e,blue:o,alpha:r=1})=>"rgba("+Jr.transform(t)+", "+Jr.transform(e)+", "+Jr.transform(o)+", "+Lt(wt.transform(r))+")"};function tc(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 qe={test:de("#"),parse:tc,transform:gt.transform};var Ze=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),lt=Ze("deg"),Y=Ze("%"),T=Ze("px"),Qr=Ze("vh"),ti=Ze("vw"),Io={...Y,parse:t=>Y.parse(t)/100,transform:t=>Y.transform(t*100)};var It={test:de("hsl","hue"),parse:Lo("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:o,alpha:r=1})=>"hsla("+Math.round(t)+", "+Y.transform(Lt(e))+", "+Y.transform(Lt(o))+", "+Lt(wt.transform(r))+")"};var L={test:t=>gt.test(t)||qe.test(t)||It.test(t),parse:t=>gt.test(t)?gt.parse(t):It.test(t)?It.parse(t):qe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?gt.transform(t):It.transform(t),getAnimatableNone:t=>{let e=L.parse(t);return e.alpha=0,L.transform(e)}};var An=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ec(t){var e,o;return isNaN(t)&&typeof t=="string"&&(((e=t.match(he))==null?void 0:e.length)||0)+(((o=t.match(An))==null?void 0:o.length)||0)>0}var Dn="number",En="color",oc="var",rc="var(",Mn="${}",ic=/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 kt(t){let e=t.toString(),o=[],r={color:[],number:[],var:[]},i=[],s=0,a=e.replace(ic,l=>(L.test(l)?(r.color.push(s),i.push(En),o.push(L.parse(l))):l.startsWith(rc)?(r.var.push(s),i.push(oc),o.push(l)):(r.number.push(s),i.push(Dn),o.push(parseFloat(l))),++s,Mn)).split(Mn);return{values:o,split:a,indexes:r,types:i}}function nc(t){return kt(t).values}function Rn({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===Dn?i+=Lt(r[s]):n===En?i+=L.transform(r[s]):i+=r[s]}return i}}function sc(t){return Rn(kt(t))}var ac=t=>typeof t=="number"?0:L.test(t)?L.getAnimatableNone(t):t,lc=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:ac(t);function cc(t){let e=kt(t);return Rn(e)(e.values.map((r,i)=>lc(r,e.split[i])))}var W={test:ec,parse:nc,createTransformer:sc,getAnimatableNone:cc};function ei(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 Ln({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=ei(l,a,t+1/3),s=ei(l,a,t),n=ei(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(n*255),alpha:r}}function ge(t,e){return o=>o>0?e:t}var C=(t,e,o)=>t+(e-t)*o;var oi=(t,e,o)=>{let r=t*t,i=o*(e*e-r)+r;return i<0?0:Math.sqrt(i)},uc=[qe,gt,It],mc=t=>uc.find(e=>e.test(t));function In(t){let e=mc(t);if(ot(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let o=e.parse(t);return e===It&&(o=Ln(o)),o}var ri=(t,e)=>{let o=In(t),r=In(e);if(!o||!r)return ge(t,e);let i={...o};return s=>(i.red=oi(o.red,r.red,s),i.green=oi(o.green,r.green,s),i.blue=oi(o.blue,r.blue,s),i.alpha=C(o.alpha,r.alpha,s),gt.transform(i))};var ko=new Set(["none","hidden"]);function kn(t,e){return ko.has(t)?o=>o<=0?t:e:o=>o>=1?e:t}function fc(t,e){return o=>C(t,e,o)}function Bo(t){return typeof t=="number"?fc:typeof t=="string"?pe(t)?ge:L.test(t)?ri:dc:Array.isArray(t)?Bn:typeof t=="object"?L.test(t)?ri:pc:ge}function Bn(t,e){let o=[...t],r=o.length,i=t.map((s,n)=>Bo(s)(s,e[n]));return s=>{for(let n=0;n<r;n++)o[n]=i[n](s);return o}}function pc(t,e){let o={...t,...e},r={};for(let i in o)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Bo(t[i])(t[i],e[i]));return i=>{for(let s in r)o[s]=r[s](i);return o}}function hc(t,e){var i;let o=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){let n=e.types[s],a=t.indexes[n][r[n]],l=(i=t.values[a])!=null?i:0;o[s]=l,r[n]++}return o}var dc=(t,e)=>{let o=W.createTransformer(e),r=kt(t),i=kt(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?ko.has(t)&&!i.values.length||ko.has(e)&&!r.values.length?kn(t,e):at(Bn(hc(r,i),i.values),o):(ot(!0,`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"),ge(t,e))};function Fo(t,e,o){return typeof t=="number"&&typeof e=="number"&&typeof o=="number"?C(t,e,o):Bo(t)(t,e)}var Fn=t=>{let e=({timestamp:o})=>t(o);return{start:(o=!0)=>P.update(e,o),stop:()=>q(e),now:()=>O.isProcessing?O.timestamp:B.now()}};var Oo=(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 xe(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 On(t,e=100,o){let r=o({...t,keyframes:[0,e]}),i=Math.min(xe(r),2e4);return{type:"keyframes",ease:s=>r.next(i*s).value/e,duration:U(i)}}var F={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 si(t,e){return t*Math.sqrt(1-e*e)}var gc=12;function xc(t,e,o){let r=o;for(let i=1;i<gc;i++)r=r-t(r)/e(r);return r}var ni=.001;function yc({duration:t=F.duration,bounce:e=F.bounce,velocity:o=F.velocity,mass:r=F.mass}){let i,s;ot(t<=N(F.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let n=1-e;n=G(F.minDamping,F.maxDamping,n),t=G(F.minDuration,F.maxDuration,U(t)),n<1?(i=u=>{let c=u*n,m=c*t,f=c-o,p=si(u,n),h=Math.exp(-m);return ni-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),g=si(Math.pow(u,2),n);return(-i(u)+ni>0?-1:1)*((f-p)*h)/g}):(i=u=>{let c=Math.exp(-u*t),m=(u-o)*t+1;return-ni+c*m},s=u=>{let c=Math.exp(-u*t),m=(o-u)*(t*t);return c*m});let a=5/t,l=xc(i,s,a);if(t=N(t),isNaN(l))return{stiffness:F.stiffness,damping:F.damping,duration:t};{let u=Math.pow(l,2)*r;return{stiffness:u,damping:n*2*Math.sqrt(r*u),duration:t}}}var vc=["duration","bounce"],Tc=["stiffness","damping","mass"];function Nn(t,e){return e.some(o=>t[o]!==void 0)}function Vc(t){let e={velocity:F.velocity,stiffness:F.stiffness,damping:F.damping,mass:F.mass,isResolvedFromDuration:!1,...t};if(!Nn(t,Tc)&&Nn(t,vc))if(e.velocity=0,t.visualDuration){let o=t.visualDuration,r=2*Math.PI/(o*1.2),i=r*r,s=2*G(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:F.mass,stiffness:i,damping:s}}else{let o=yc({...t,velocity:0});e={...e,...o,mass:F.mass},e.isResolvedFromDuration=!0}return e}function ye(t=F.visualDuration,e=F.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:!1,value:s},{stiffness:l,damping:u,mass:c,duration:m,velocity:f,isResolvedFromDuration:p}=Vc({...o,velocity:-U(o.velocity||0)}),h=f||0,g=u/(2*Math.sqrt(l*c)),d=n-s,x=U(Math.sqrt(l/c)),v=Math.abs(d)<5;r||(r=v?F.restSpeed.granular:F.restSpeed.default),i||(i=v?F.restDelta.granular:F.restDelta.default);let y,V,S,A,E,b;if(g<1)S=si(x,g),A=(h+g*x*d)/S,y=w=>{let R=Math.exp(-g*x*w);return n-R*(A*Math.sin(S*w)+d*Math.cos(S*w))},E=g*x*A+d*S,b=g*x*d-A*S,V=w=>Math.exp(-g*x*w)*(E*Math.sin(S*w)+b*Math.cos(S*w));else if(g===1){y=R=>n-Math.exp(-x*R)*(d+(h+x*d)*R);let w=h+x*d;V=R=>Math.exp(-x*R)*(x*w*R-h)}else{let w=x*Math.sqrt(g*g-1);y=ut=>{let Vt=Math.exp(-g*x*ut),mt=Math.min(w*ut,300);return n-Vt*((h+g*x*d)*Math.sinh(mt)+w*d*Math.cosh(mt))/w};let R=(h+g*x*d)/w,K=g*x*R-d*w,Tt=g*x*d-R*w;V=ut=>{let Vt=Math.exp(-g*x*ut),mt=Math.min(w*ut,300);return Vt*(K*Math.sinh(mt)+Tt*Math.cosh(mt))}}let M={calculatedDuration:p&&m||null,velocity:w=>N(V(w)),next:w=>{if(!p&&g<1){let K=Math.exp(-g*x*w),Tt=Math.sin(S*w),ut=Math.cos(S*w),Vt=n-K*(A*Tt+d*ut),mt=N(K*(E*Tt+b*ut));return a.done=Math.abs(mt)<=r&&Math.abs(n-Vt)<=i,a.value=a.done?n:Vt,a}let R=y(w);if(p)a.done=w>=m;else{let K=N(V(w));a.done=Math.abs(K)<=r&&Math.abs(n-R)<=i}return a.value=a.done?n:R,a},toString:()=>{let w=Math.min(xe(M),2e4),R=Oo(K=>M.next(w*K).value,w,30);return w+"ms "+R},toTransition:()=>{}};return M}ye.applyToOptions=t=>{let e=On(t,100,ye);return t.ease=e.ease,t.duration=N(e.duration),t.type="keyframes",t};var Sc=5;function No(t,e,o){let r=Math.max(e-Sc,0);return je(o-t(r),e-r)}function Je({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:!1,value:m},p=b=>a!==void 0&&b<a||l!==void 0&&b>l,h=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l,g=o*e,d=m+g,x=n===void 0?d:n(d);x!==d&&(g=x-m);let v=b=>-g*Math.exp(-b/r),y=b=>x+v(b),V=b=>{let M=v(b),w=y(b);f.done=Math.abs(M)<=u,f.value=f.done?x:w},S,A,E=b=>{p(f.value)&&(S=b,A=ye({keyframes:[f.value,h(f.value)],velocity:No(y,b,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:b=>{let M=!1;return!A&&S===void 0&&(M=!0,V(b),E(b)),S!==void 0&&b>=S?A.next(b-S):(!M&&V(b),f)}}}function wc(t,e,o){let r=[],i=o||X.mix||Fo,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]||k:e;a=at(l,a)}r.push(a)}return r}function jn(t,e,{clamp:o=!0,ease:r,mixer:i}={}){let s=t.length;if($(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=wc(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=pt(t[m],t[m+1],c);return a[m](f)};return o?c=>u(G(t[0],t[s-1],c)):u}function Gn(t,e){let o=t[t.length-1];for(let r=1;r<=e;r++){let i=pt(0,e,r);t.push(C(o,1,i))}}function Wn(t){let e=[0];return Gn(e,t.length-1),e}function zn(t,e){return t.map(o=>o*e)}function bc(t,e){return t.map(()=>e||He).splice(0,t.length-1)}function Bt({duration:t=300,keyframes:e,times:o,ease:r="easeInOut"}){let i=qr(r)?r.map(Mo):Mo(r),s={done:!1,value:e[0]},n=zn(o&&o.length===e.length?o:Wn(e),t),a=jn(n,e,{ease:Array.isArray(i)?i:bc(e,i)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}var Pc=t=>t!==null;function Ft(t,{repeat:e,repeatType:o="loop"},r,i=1){let s=t.filter(Pc),a=i<0||e&&o!=="loop"&&e%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}var Cc={decay:Je,inertia:Je,tween:Bt,keyframes:Bt,spring:ye};function jo(t){typeof t.type=="string"&&(t.type=Cc[t.type])}var Ot=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 Ac=t=>t/100,bt=class extends Ot{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,i;let{motionValue:o}=this.options;o&&o.updatedAt!==B.now()&&this.tick(B.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},ht.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;jo(e);let{type:o=Bt,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:n=0}=e,{keyframes:a}=e,l=o||Bt;process.env.NODE_ENV!=="production"&&l!==Bt&&$(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Bt&&typeof a[0]!="number"&&(this.mixKeyframes=at(Ac,Fo(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=xe(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=!1){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:g,finalKeyframe:d}=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),v=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let y=this.currentTime,V=r;if(m){let b=Math.min(this.currentTime,i)/a,M=Math.floor(b),w=b%1;!w&&b>=1&&(w=1),w===1&&M--,M=Math.min(M,m+1),!!(M%2)&&(f==="reverse"?(w=1-w,p&&(w-=p/a)):f==="mirror"&&(V=n)),y=G(0,1,w)*a}let S;v?(this.delayState.value=c[0],S=this.delayState):S=V.next(y),s&&!v&&(S.value=s(S.value));let{done:A}=S;!v&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return E&&h!==Je&&(S.value=Ft(c,this.options,d,this.speed)),g&&g(S.value),E&&this.finish(),S}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=N(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){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 No(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(B.now()),this.playbackSpeed=e,o&&this.driver&&(this.time=U(this.currentTime))}play(){var i,s;if(this.isStopped)return;let{driver:e=Fn,startTime:o}=this.options;this.driver||(this.driver=e(n=>this.tick(n))),(s=(i=this.options).onPlay)==null||s.call(i);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!=null?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(B.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,o;this.notifyFinished(),this.teardown(),this.state="finished",(o=(e=this.options).onComplete)==null||o.call(e)}cancel(){var e,o;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(o=(e=this.options).onCancel)==null||o.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,ht.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var o;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(o=this.driver)==null||o.stop(),e.observe(this)}};function Un(t){var e;for(let o=1;o<t.length;o++)(e=t[o])!=null||(t[o]=t[o-1])}var Yt=t=>t*180/Math.PI,ai=t=>{let e=Yt(Math.atan2(t[1],t[0]));return li(e)},Mc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:ai,rotateZ:ai,skewX:t=>Yt(Math.atan(t[1])),skewY:t=>Yt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},li=t=>(t=t%360,t<0&&(t+=360),t),Kn=ai,Hn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),$n=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Dc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Hn,scaleY:$n,scale:t=>(Hn(t)+$n(t))/2,rotateX:t=>li(Yt(Math.atan2(t[6],t[5]))),rotateY:t=>li(Yt(Math.atan2(-t[2],t[0]))),rotateZ:Kn,rotate:Kn,skewX:t=>Yt(Math.atan(t[4])),skewY:t=>Yt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Go(t){return t.includes("scale")?1:0}function Wo(t,e){if(!t||t==="none")return Go(e);let o=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(o)r=Dc,i=o;else{let a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Mc,i=a}if(!i)return Go(e);let s=r[e],n=i[1].split(",").map(Ec);return typeof s=="function"?s(n):n[s]}var _n=(t,e)=>{let{transform:o="none"}=getComputedStyle(t);return Wo(o,e)};function Ec(t){return parseFloat(t.trim())}var xt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rt=new Set(xt);var ci=t=>t===dt||t===T,Rc=new Set(["x","y","z"]),Lc=xt.filter(t=>!Rc.has(t));function Yn(t){let e=[];return Lc.forEach(o=>{let r=t.getValue(o);r!==void 0&&(e.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),e}var Pt={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})=>Wo(e,"x"),y:(t,{transform:e})=>Wo(e,"y")};Pt.translateX=Pt.x;Pt.translateY=Pt.y;var Xt=new Set,ui=!1,mi=!1,fi=!1;function Xn(){if(mi){let t=Array.from(Xt).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),o=new Map;e.forEach(r=>{let i=Yn(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])=>{var a;(a=r.getValue(s))==null||a.set(n)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}mi=!1,ui=!1,Xt.forEach(t=>t.complete(fi)),Xt.clear()}function qn(){Xt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(mi=!0)})}function Zn(){fi=!0,qn(),Xn(),fi=!1}var Nt=class{constructor(e,o,r,i,s,n=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=o,this.name=r,this.motionValue=i,this.element=s,this.isAsync=n}scheduleResolve(){this.state="scheduled",this.isAsync?(Xt.add(this),ui||(ui=!0,P.read(qn),P.resolveKeyframes(Xn))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:o,element:r,motionValue:i}=this;if(e[0]===null){let s=i==null?void 0: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])}Un(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Xt.delete(this)}cancel(){this.state==="scheduled"&&(Xt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var Jn=t=>t.startsWith("--");function zo(t,e,o){Jn(e)?t.style.setProperty(e,o):t.style[e]=o}var Qn={};function Uo(t,e){let o=Ne(t);return()=>{var r;return(r=Qn[e])!=null?r:o()}}var ts=Uo(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var Ko=Uo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing");var qt=([t,e,o,r])=>`cubic-bezier(${t}, ${e}, ${o}, ${r})`;var pi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:qt([0,.65,.55,1]),circOut:qt([.55,0,1,.45]),backIn:qt([.31,.01,.66,-.59]),backOut:qt([.33,1.53,.69,.99])};function hi(t,e){if(t)return typeof t=="function"?Ko()?Oo(t,e):"ease-out":$e(t)?qt(t):Array.isArray(t)?t.map(o=>hi(o,e)||pi.easeOut):pi[t]}function es(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=hi(a,i);Array.isArray(m)&&(c.easing=m),Z.value&&ht.waapi++;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 Z.value&&p.finished.finally(()=>{ht.waapi--}),p}function Ho(t){return typeof t=="function"&&"applyToOptions"in t}function os({type:t,...e}){var o,r;return Ho(t)&&Ko()?t.applyToOptions(e):((o=e.duration)!=null||(e.duration=300),(r=e.ease)!=null||(e.ease="easeOut"),e)}var ve=class extends Ot{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:o,name:r,keyframes:i,pseudoElement:s,allowFlatten:n=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=n,this.options=e,$(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=os(e);this.animation=es(o,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){let c=Ft(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),zo(o,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,o;(o=(e=this.animation).finish)==null||o.call(e)}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var o,r,i;let e=(o=this.options)==null?void 0:o.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var o,r;let e=((r=(o=this.animation.effect)==null?void 0:o.getComputedTiming)==null?void 0:r.call(o).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=N(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(){var e;return(e=this.manualStartTime)!=null?e:Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:o,rangeEnd:r,observe:i}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&ts()?(this.animation.timeline=e,o&&(this.animation.rangeStart=o),r&&(this.animation.rangeEnd=r),k):i(this)}};var rs={anticipate:We,backInOut:Ge,circInOut:Ke};function Ic(t){return t in rs}function is(t){typeof t.ease=="string"&&Ic(t.ease)&&(t.ease=rs[t.ease])}var di=10,$o=class extends ve{constructor(e){is(e),jo(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(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 bt({...n,autoplay:!1}),l=Math.max(di,B.now()-this.startTime),u=G(0,di,l-di),c=a.sample(l).value,{name:m}=this.options;s&&m&&zo(s,m,c),o.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}};var gi=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(W.test(t)||t==="0")&&!t.startsWith("url("));function kc(t){let e=t[0];if(t.length===1)return!0;for(let o=0;o<t.length;o++)if(t[o]!==e)return!0}function ns(t,e,o,r){let i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;let s=t[t.length-1],n=gi(i,e),a=gi(s,e);return ot(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?!1:kc(t)||(o==="spring"||Ho(o))&&r}function Qe(t){t.duration=0,t.type="keyframes"}var _o=new Set(["opacity","clipPath","filter","transform"]);var Bc=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ss(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Bc.test(t[e]))return!0;return!1}var Fc=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Oc=Ne(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function as(t){var m;let{motionValue:e,name:o,repeatDelay:r,repeatType:i,damping:s,type:n,keyframes:a}=t;if(!(((m=e==null?void 0:e.owner)==null?void 0:m.current)instanceof HTMLElement))return!1;let{onUpdate:u,transformTemplate:c}=e.owner.getProps();return Oc()&&o&&(_o.has(o)||Fc.has(o)&&ss(a))&&(o!=="transform"||!c)&&!u&&!r&&i!=="mirror"&&s!==0&&n!=="inertia"}var Nc=40,Yo=class extends Ot{constructor({autoplay:e=!0,delay:o=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:n="loop",keyframes:a,name:l,motionValue:u,element:c,...m}){var h;super(),this.stop=()=>{var g,d;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(d=this.keyframeResolver)==null||d.cancel()},this.createdAt=B.now();let f={autoplay:e,delay:o,type:r,repeat:i,repeatDelay:s,repeatType:n,name:l,motionValue:u,element:c,...m},p=(c==null?void 0:c.KeyframeResolver)||Nt;this.keyframeResolver=new p(a,(g,d,x)=>this.onKeyframesResolved(g,d,f,!x),l,u,c),(h=this.keyframeResolver)==null||h.scheduleResolve()}onKeyframesResolved(e,o,r,i){var x,v;this.keyframeResolver=void 0;let{name:s,type:n,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=B.now();let m=!0;ns(e,s,n,a)||(m=!1,(X.instantAnimations||!l)&&(c==null||c(Ft(e,r,o))),e[0]=e[e.length-1],Qe(r),r.repeat=0);let p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Nc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:e},h=m&&!u&&as(p),g=(v=(x=p.motionValue)==null?void 0:x.owner)==null?void 0:v.current,d;if(h)try{d=new $o({...p,element:g})}catch(y){d=new bt(p)}else d=new bt(p);d.finished.then(()=>{this.notifyFinished()}).catch(k),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,o){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Zn()),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(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}};function Xo(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 jc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Gc(t){let e=jc.exec(t);if(!e)return[,];let[,o,r,i]=e;return[`--${o!=null?o:r}`,i]}var Wc=4;function xi(t,e,o=1){$(o<=Wc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,i]=Gc(t);if(!r)return;let s=window.getComputedStyle(e).getPropertyValue(r);if(s){let n=s.trim();return Be(n)?parseFloat(n):n}return pe(i)?xi(i,e,o+1):i}var zc={type:"spring",stiffness:500,damping:25,restSpeed:10},Uc=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Kc={type:"keyframes",duration:.8},Hc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ls=(t,{keyframes:e})=>e.length>2?Kc:rt.has(t)?t.startsWith("scale")?Uc(e[1]):zc:Hc;function qo(t,e){if(t!=null&&t.inherit&&e){let{inherit:o,...r}=t;return{...e,...r}}return t}function Te(t,e){var r,i;let o=(i=(r=t==null?void 0:t[e])!=null?r:t==null?void 0:t.default)!=null?i:t;return o!==t?qo(o,t):o}var $c=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function cs(t){for(let e in t)if(!$c.has(e))return!0;return!1}var Zt=(t,e,o,r={},i,s)=>n=>{let a=Te(r,t)||{},l=a.delay||r.delay||0,{elapsed:u=0}=r;u=u-N(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};cs(a)||Object.assign(c,ls(t,c)),c.duration&&(c.duration=N(c.duration)),c.repeatDelay&&(c.repeatDelay=N(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let m=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Qe(c),c.delay===0&&(m=!0)),(X.instantAnimations||X.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(m=!0,Qe(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,m&&!s&&e.get()!==void 0){let f=Ft(c.keyframes,a);if(f!==void 0){P.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new bt(c):new Yo(c)};function us(t){let e=[{},{}];return t==null||t.values.forEach((o,r)=>{e[0][r]=o.get(),e[1][r]=o.getVelocity()}),e}function Jt(t,e,o,r){if(typeof e=="function"){let[i,s]=us(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]=us(r);e=e(o!==void 0?o:t.custom,i,s)}return e}function J(t,e,o){let r=t.getProps();return Jt(r,e,o!==void 0?o:r.custom,t)}var Zo=new Set(["width","height","top","left","right","bottom",...xt]);var ms=30,_c=t=>!isNaN(parseFloat(t)),fs={current:void 0},yi=class{constructor(e,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var s;let i=B.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(let n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=o.owner}setCurrent(e){this.current=e,this.updatedAt=B.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=_c(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&_t(!1,'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 St);let r=this.events[e].add(o);return e==="change"?()=>{r(),P.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=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return fs.current&&fs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=B.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ms)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,ms);return je(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(e){return this.stop(),new Promise(o=>{this.hasAnimated=!0,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(){var e,o;(e=this.dependents)==null||e.clear(),(o=this.events.destroy)==null||o.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function ct(t,e){return new yi(t,e)}var to=t=>Array.isArray(t);function Yc(t,e,o){t.hasValue(e)?t.getValue(e).set(o):t.addValue(e,ct(o))}function Xc(t){return to(t)?t[t.length-1]||0:t}function ps(t,e){let o=J(t,e),{transitionEnd:r={},transition:i={},...s}=o||{};s={...s,...r};for(let n in s){let a=Xc(s[n]);Yc(t,n,a)}}var D=t=>!!(t&&t.getVelocity);function hs(t){return!!(D(t)&&t.add)}function Ve(t,e){let o=t.getValue("willChange");if(hs(o))return o.add(e);if(!o&&X.WillChange){let r=new X.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Se(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var ds="framerAppearId",eo="data-"+Se(ds);function Jo(t){return t.props[eo]}function qc({protectedKeys:t,needsAnimating:e},o){let r=t.hasOwnProperty(o)&&e[o]!==!0;return e[o]=!1,r}function Qo(t,e,{delay:o=0,transitionOverride:r,type:i}={}){var f;let{transition:s,transitionEnd:n,...a}=e,l=t.getDefaultTransition();s=s?qo(s,l):l;let u=s==null?void 0:s.reduceMotion;r&&(s=r);let c=[],m=i&&t.animationState&&t.animationState.getState()[i];for(let p in a){let h=t.getValue(p,(f=t.latestValues[p])!=null?f:null),g=a[p];if(g===void 0||m&&qc(m,p))continue;let d={delay:o,...Te(s||{},p)},x=h.get();if(x!==void 0&&!h.isAnimating()&&!Array.isArray(g)&&g===x&&!d.velocity){P.update(()=>h.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){let S=Jo(t);if(S){let A=window.MotionHandoffAnimation(S,p,P);A!==null&&(d.startTime=A,v=!0)}}Ve(t,p);let y=u!=null?u:t.shouldReduceMotion;h.start(Zt(p,h,g,y&&Zo.has(p)?{type:!1}:d,t,v));let V=h.animation;V&&c.push(V)}if(n){let p=()=>P.update(()=>{n&&ps(t,n)});c.length?Promise.all(c).then(p):p()}return c}function tr(t,e,o={}){var l;let r=J(t,e,o.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0),{transition:i=t.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(i=o.transitionOverride);let s=r?()=>Promise.all(Qo(t,r,o)):()=>Promise.resolve(),n=t.variantChildren&&t.variantChildren.size?(u=0)=>{let{delayChildren:c=0,staggerChildren:m,staggerDirection:f}=i;return Zc(t,e,u,c,m,f,o)}:()=>Promise.resolve(),{when:a}=i;if(a){let[u,c]=a==="beforeChildren"?[s,n]:[n,s];return u().then(()=>c())}else return Promise.all([s(),n(o.delay)])}function Zc(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(tr(l,e,{...n,delay:o+(typeof r=="function"?0:r)+Xo(t.variantChildren,l,r,i,s)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function gs(t,e,o={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){let i=e.map(s=>tr(t,s,o));r=Promise.all(i)}else if(typeof e=="string")r=tr(t,e,o);else{let i=typeof e=="function"?J(t,e,o.custom):e;r=Promise.all(Qo(t,i,o))}return r.then(()=>{t.notify("AnimationComplete",e)})}var xs={test:t=>t==="auto",parse:t=>t};var er=t=>e=>e.test(t);var vi=[dt,T,Y,lt,ti,Qr,xs],Ti=t=>vi.find(er(t));function ys(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Oe(t):!0}var Jc=new Set(["brightness","contrast","saturate","opacity"]);function Qc(t){let[e,o]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;let[r]=o.match(he)||[];if(!r)return t;let i=o.replace(r,""),s=Jc.has(e)?1:0;return r!==o&&(s*=100),e+"("+s+i+")"}var tu=/\b([a-z-]*)\(.*?\)/gu,oo={...W,getAnimatableNone:t=>{let e=t.match(tu);return e?e.map(Qc).join(" "):t}};var ro={...W,getAnimatableNone:t=>{let e=W.parse(t);return W.createTransformer(t)(e.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}};var Vi={...dt,transform:Math.round};var vs={rotate:lt,rotateX:lt,rotateY:lt,rotateZ:lt,scale:Xe,scaleX:Xe,scaleY:Xe,scaleZ:Xe,skew:lt,skewX:lt,skewY:lt,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:wt,originX:Io,originY:Io,originZ:T};var we={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...vs,zIndex:Vi,fillOpacity:wt,strokeOpacity:wt,numOctaves:Vi};var eu={...we,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:oo,WebkitFilter:oo,mask:ro,WebkitMask:ro},or=t=>eu[t];var ou=new Set([oo,ro]);function rr(t,e){let o=or(t);return ou.has(o)||(o=W),o.getAnimatableNone?o.getAnimatableNone(e):void 0}var ru=new Set(["auto","none","0"]);function Ts(t,e,o){let r=0,i;for(;r<t.length&&!i;){let s=t[r];typeof s=="string"&&!ru.has(s)&&kt(s).values.length&&(i=t[r]),r++}if(i&&o)for(let s of e)t[s]=rr(o,i)}var ir=class extends Nt{constructor(e,o,r,i,s){super(e,o,r,i,s,!0)}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(),pe(m))){let f=xi(m,o.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=m)}}if(this.resolveNoneKeyframes(),!Zo.has(r)||e.length!==2)return;let[i,s]=e,n=Ti(i),a=Ti(s),l=Zr(i),u=Zr(s);if(l!==u&&Pt[r]){this.needsMeasurement=!0;return}if(n!==a)if(ci(n)&&ci(a))for(let c=0;c<e.length;c++){let m=e[c];typeof m=="string"&&(e[c]=parseFloat(m))}else Pt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:o}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||ys(e[i]))&&r.push(i);r.length&&Ts(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=Pt[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,!1)}measureEndState(){var a;let{element:e,name:o,unresolvedKeyframes:r}=this;if(!e||!e.current)return;let i=e.getValue(o);i&&i.jump(this.measuredOrigin,!1);let s=r.length-1,n=r[s];r[s]=Pt[o](e.measureViewportBox(),window.getComputedStyle(e.current)),n!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=n),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}};function nr(t,e,o){var r;if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;e&&(i=e.current);let s=(r=o==null?void 0:o[t])!=null?r:i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(i=>i!=null)}var sr=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Qt(t){return Fe(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}var{schedule:te,cancel:iu}=Do(queueMicrotask,!1);var it={x:!1,y:!1};function ar(){return it.x||it.y}function Si(t){return t==="x"||t==="y"?it[t]?null:(it[t]=!0,()=>{it[t]=!1}):it.x||it.y?null:(it.x=it.y=!0,()=>{it.x=it.y=!1})}function lr(t,e){let o=nr(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[o,i,()=>r.abort()]}function nu(t){return!(t.pointerType==="touch"||ar())}function wi(t,e,o={}){let[r,i,s]=lr(t,o);return r.forEach(n=>{let a=!1,l=!1,u,c=()=>{n.removeEventListener("pointerleave",h)},m=d=>{u&&(u(d),u=void 0),c()},f=d=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,m(d))},p=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},h=d=>{if(d.pointerType!=="touch"){if(a){l=!0;return}m(d)}},g=d=>{if(!nu(d))return;l=!1;let x=e(n,d);typeof x=="function"&&(u=x,n.addEventListener("pointerleave",h,i))};n.addEventListener("pointerenter",g,i),n.addEventListener("pointerdown",p,i)}),s}var bi=(t,e)=>e?t===e?!0:bi(t,e.parentElement):!1;var ee=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;var su=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pi(t){return su.has(t.tagName)||t.isContentEditable===!0}var au=new Set(["INPUT","SELECT","TEXTAREA"]);function Ci(t){return au.has(t.tagName)||t.isContentEditable===!0}var be=new WeakSet;function Vs(t){return e=>{e.key==="Enter"&&t(e)}}function Ai(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}var Ss=(t,e)=>{let o=t.currentTarget;if(!o)return;let r=Vs(()=>{if(be.has(o))return;Ai(o,"down");let i=Vs(()=>{Ai(o,"up")}),s=()=>Ai(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 ws(t){return ee(t)&&!ar()}var bs=new WeakSet;function Mi(t,e,o={}){let[r,i,s]=lr(t,o),n=a=>{let l=a.currentTarget;if(!ws(a)||bs.has(a))return;be.add(l),o.stopPropagation&&bs.add(a);let u=e(l,a),c=(p,h)=>{window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",f),be.has(l)&&be.delete(l),ws(p)&&typeof u=="function"&&u(p,{success:h})},m=p=>{c(p,l===window||l===document||o.useGlobalTarget||bi(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",f,i)};return r.forEach(a=>{(o.useGlobalTarget?window:a).addEventListener("pointerdown",n,i),Qt(a)&&(a.addEventListener("focus",u=>Ss(u,i)),!Pi(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Pe(t){return Fe(t)&&"ownerSVGElement"in t}var cr=new WeakMap,jt,Ps=(t,e,o)=>(r,i)=>i&&i[0]?i[0][t+"Size"]:Pe(r)&&"getBBox"in r?r.getBBox()[e]:r[o],lu=Ps("inline","width","offsetWidth"),cu=Ps("block","height","offsetHeight");function uu({target:t,borderBoxSize:e}){var o;(o=cr.get(t))==null||o.forEach(r=>{r(t,{get width(){return lu(t,e)},get height(){return cu(t,e)}})})}function mu(t){t.forEach(uu)}function fu(){typeof ResizeObserver!="undefined"&&(jt=new ResizeObserver(mu))}function Cs(t,e){jt||fu();let o=nr(t);return o.forEach(r=>{let i=cr.get(r);i||(i=new Set,cr.set(r,i)),i.add(e),jt==null||jt.observe(r)}),()=>{o.forEach(r=>{let i=cr.get(r);i==null||i.delete(e),i!=null&&i.size||jt==null||jt.unobserve(r)})}}var ur=new Set,Ce;function pu(){Ce=()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ur.forEach(e=>e(t))},window.addEventListener("resize",Ce)}function As(t){return ur.add(t),Ce||pu(),()=>{ur.delete(t),!ur.size&&typeof Ce=="function"&&(window.removeEventListener("resize",Ce),Ce=void 0)}}function mr(t,e){return typeof t=="function"?As(t):Cs(t,e)}function Ms(t){return Pe(t)&&t.tagName==="svg"}var hu=[...vi,L,W],Ds=t=>hu.find(er(t));var Di=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gt=()=>({x:Di(),y:Di()}),Ei=()=>({min:0,max:0}),I=()=>({x:Ei(),y:Ei()});var Es=new WeakMap;function Ct(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function yt(t){return typeof t=="string"||Array.isArray(t)}var fr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],io=["initial",...fr];function Wt(t){return Ct(t.animate)||io.some(e=>yt(t[e]))}function no(t){return!!(Wt(t)||t.variants)}function Rs(t,e,o){for(let r in e){let i=e[r],s=o[r];if(D(i))t.addValue(r,i);else if(D(s))t.addValue(r,ct(i,{owner:t}));else if(s!==i)if(t.hasValue(r)){let n=t.getValue(r);n.liveStyle===!0?n.jump(i):n.hasAnimated||n.set(i)}else{let n=t.getStaticValue(r);t.addValue(r,ct(n!==void 0?n:i,{owner:t}))}}for(let r in o)e[r]===void 0&&t.removeValue(r);return e}var so={current:null},pr={current:!1};var du=typeof window!="undefined";function Ls(){if(pr.current=!0,!!du)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=()=>so.current=t.matches;t.addEventListener("change",e),e()}else so.current=!1}var Is=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],hr={};function lo(t){hr=t}function Ri(){return hr}var ao=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=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Nt,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let p=B.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,P.render(this.render,!1,!0))};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=Wt(o),this.isVariantNode=no(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&&D(h)&&h.set(u[p])}}mount(e){var o,r,i;if(this.hasBeenMounted)for(let s in this.initialValues)(o=this.values.get(s))==null||o.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=e,Es.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((s,n)=>this.bindToMotionValue(n,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(pr.current||Ls(),this.shouldReduceMotion=so.current),process.env.NODE_ENV!=="production"&&_t(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=(r=this.skipAnimationsConfig)!=null?r:!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),q(this.notifyUpdate),q(this.render),this.valueSubscriptions.forEach(o=>o()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(let o in this.events)this.events[o].clear();for(let o in this.features){let r=this.features[o];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){var o;this.children.add(e),(o=this.enteringChildren)!=null||(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&&_o.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:a,times:l,ease:u,duration:c}=o.accelerate,m=new ve({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:N(c)}),f=n(m);this.valueSubscriptions.set(e,()=>{f(),m.cancel()});return}let r=rt.has(e);r&&this.onBindTransform&&this.onBindTransform();let i=o.on("change",n=>{this.latestValues[e]=n,this.props.onUpdate&&P.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),s;typeof window!="undefined"&&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 hr){let o=hr[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=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):I()}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<Is.length;r++){let i=Is[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=Rs(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=ct(o===null?void 0:o,{owner:this}),this.addValue(e,r)),r}readValue(e,o){var i;let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!=null?i:this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(Be(r)||Oe(r))?r=parseFloat(r):!Ds(r)&&W.test(o)&&(r=rr(e,o)),this.setBaseTarget(e,D(r)?r.get():r)),D(r)?r.get():r}setBaseTarget(e,o){this.baseTarget[e]=o}getBaseTarget(e){var s;let{initial:o}=this.props,r;if(typeof o=="string"||typeof o=="object"){let n=Jt(this.props,o,(s=this.presenceContext)==null?void 0:s.custom);n&&(r=n[e])}if(o&&r!==void 0)return r;let i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!D(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 St),this.events[e].add(o)}notify(e,...o){this.events[e]&&this.events[e].notify(...o)}scheduleRenderMicrotask(){te.render(this.render)}};var Ae=class extends ao{constructor(){super(...arguments),this.KeyframeResolver=ir}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;D(e)&&(this.childSubscription=e.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}};var z=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function co({top:t,left:e,right:o,bottom:r}){return{x:{min:e,max:o},y:{min:t,max:r}}}function Li({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ii(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 ki(t){return t===void 0||t===1}function dr({scale:t,scaleX:e,scaleY:o}){return!ki(t)||!ki(e)||!ki(o)}function At(t){return dr(t)||Bi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Bi(t){return ks(t.x)||ks(t.y)}function ks(t){return t&&t!=="0%"}function uo(t,e,o){let r=t-o,i=e*r;return o+i}function Bs(t,e,o,r,i){return i!==void 0&&(t=uo(t,i,r)),uo(t,o,r)+e}function Fi(t,e=0,o=1,r,i){t.min=Bs(t.min,e,o,r,i),t.max=Bs(t.max,e,o,r,i)}function Oi(t,{x:e,y:o}){Fi(t.x,e.translate,e.scale,e.originPoint),Fi(t.y,o.translate,o.scale,o.originPoint)}var Fs=.999999999999,Os=1.0000000000001;function Gs(t,e,o,r=!1){var a;let i=o.length;if(!i)return;e.x=e.y=1;let s,n;for(let l=0;l<i;l++){s=o[l],n=s.projectionDelta;let{visualElement:u}=s.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(nt(t.x,-s.scroll.offset.x),nt(t.y,-s.scroll.offset.y)),n&&(e.x*=n.x.scale,e.y*=n.y.scale,Oi(t,n)),r&&At(s.latestValues)&&mo(t,s.latestValues,(a=s.layout)==null?void 0:a.layoutBox))}e.x<Os&&e.x>Fs&&(e.x=1),e.y<Os&&e.y>Fs&&(e.y=1)}function nt(t,e){t.min+=e,t.max+=e}function Ns(t,e,o,r,i=.5){let s=C(t.min,t.max,i);Fi(t,e,o,s,r)}function js(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function mo(t,e,o){let r=o!=null?o:t;Ns(t.x,js(e.x,r.x),e.scaleX,e.scale,e.originX),Ns(t.y,js(e.y,r.y),e.scaleY,e.scale,e.originY)}function gr(t,e){return co(Ii(t.getBoundingClientRect(),e))}function Ni(t,e,o){let r=gr(t,o),{scroll:i}=e;return i&&(nt(r.x,i.offset.x),nt(r.y,i.offset.y)),r}var gu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},xu=xt.length;function Ws(t,e,o){let r="",i=!0;for(let s=0;s<xu;s++){let n=xt[s],a=t[n];if(a===void 0)continue;let l=!0;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=sr(a,we[n]);if(!l){i=!1;let c=gu[n]||n;r+=`${c}(${u}) `}o&&(e[n]=u)}}return r=r.trim(),o?r=o(e,i?"":r):i&&(r="none"),r}function oe(t,e,o){let{style:r,vars:i,transformOrigin:s}=t,n=!1,a=!1;for(let l in e){let u=e[l];if(rt.has(l)){n=!0;continue}else if(Ro(l)){i[l]=u;continue}else{let c=sr(u,we[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(e.transform||(n||o?r.transform=Ws(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 xr(t,{style:e,vars:o},r,i){let s=t.style,n;for(n in e)s[n]=e[n];i==null||i.applyProjectionStyles(s,r);for(n in o)s.setProperty(n,o[n])}function zs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}var Me={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;let o=zs(t,e.target.x),r=zs(t,e.target.y);return`${o}% ${r}%`}};var Us={correct:(t,{treeScale:e,projectionDelta:o})=>{let r=t,i=W.parse(t);if(i.length>5)return r;let s=W.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=C(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 fo={borderRadius:{...Me,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Me,borderTopRightRadius:Me,borderBottomLeftRadius:Me,borderBottomRightRadius:Me,boxShadow:Us};function po(t,{layout:e,layoutId:o}){return rt.has(t)||t.startsWith("origin")||(e||o!==void 0)&&(!!fo[t]||t==="opacity")}function re(t,e,o){var n;let r=t.style,i=e==null?void 0:e.style,s={};if(!r)return s;for(let a in r)(D(r[a])||i&&D(i[a])||po(a,t)||((n=o==null?void 0:o.getValue(a))==null?void 0:n.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function yu(t){return window.getComputedStyle(t)}var ho=class extends Ae{constructor(){super(...arguments),this.type="html",this.renderInstance=xr}readValueFromInstance(e,o){var r;if(rt.has(o))return(r=this.projection)!=null&&r.isProjecting?Go(o):_n(e,o);{let i=yu(e),s=(Ro(o)?i.getPropertyValue(o):i[o])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:o}){return gr(e,o)}build(e,o,r){oe(e,o,r.transformTemplate)}scrapeMotionValuesFromProps(e,o,r){return re(e,o,r)}};var vu={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tu={offset:"strokeDashoffset",array:"strokeDasharray"};function Ks(t,e,o=1,r=0,i=!0){t.pathLength=1;let s=i?vu:Tu;t[s.offset]=`${-r}`,t[s.array]=`${e} ${o}`}var Vu=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function go(t,{attrX:e,attrY:o,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:n=0,...a},l,u,c){var p,h;if(oe(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=(p=m.transformOrigin)!=null?p:"50% 50%",delete m.transformOrigin),f.transform&&(f.transformBox=(h=c==null?void 0:c.transformBox)!=null?h:"fill-box",delete m.transformBox);for(let g of Vu)m[g]!==void 0&&(f[g]=m[g],delete m[g]);e!==void 0&&(m.x=e),o!==void 0&&(m.y=o),r!==void 0&&(m.scale=r),i!==void 0&&Ks(m,i,s,n,!1)}var yr=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 xo=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Hs(t,e,o,r){xr(t,e,void 0,r);for(let i in e.attrs)t.setAttribute(yr.has(i)?i:Se(i),e.attrs[i])}function yo(t,e,o){let r=re(t,e,o);for(let i in t)if(D(t[i])||D(e[i])){let s=xt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=t[i]}return r}var vo=class extends Ae{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=I}getBaseTargetFromProps(e,o){return e[o]}readValueFromInstance(e,o){if(rt.has(o)){let r=or(o);return r&&r.default||0}return o=yr.has(o)?o:Se(o),e.getAttribute(o)}scrapeMotionValuesFromProps(e,o,r){return yo(e,o,r)}build(e,o,r){go(e,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,o,r,i){Hs(e,o,r,i)}mount(e){this.isSVGTag=xo(e.tagName),super.mount(e)}};var Su=io.length;function ji(t){if(!t)return;if(!t.isControllingVariants){let o=t.parent?ji(t.parent)||{}:{};return t.props.initial!==void 0&&(o.initial=t.props.initial),o}let e={};for(let o=0;o<Su;o++){let r=io[o],i=t.props[r];(yt(i)||i===!1)&&(e[r]=i)}return e}function Gi(t,e){if(!Array.isArray(e))return!1;let o=e.length;if(o!==t.length)return!1;for(let r=0;r<o;r++)if(e[r]!==t[r])return!1;return!0}var wu=[...fr].reverse(),bu=fr.length;function Pu(t){return e=>Promise.all(e.map(({animation:o,options:r})=>gs(t,o,r)))}function Wi(t){let e=Pu(t),o=$s(),r=!0,i=!1,s=u=>(c,m)=>{var p;let f=J(t,m,u==="exit"?(p=t.presenceContext)==null?void 0:p.custom:void 0);if(f){let{transition:h,transitionEnd:g,...d}=f;c={...c,...d,...g}}return c};function n(u){e=u(t)}function a(u){let{props:c}=t,m=ji(t.parent)||{},f=[],p=new Set,h={},g=1/0;for(let x=0;x<bu;x++){let v=wu[x],y=o[v],V=c[v]!==void 0?c[v]:m[v],S=yt(V),A=v===u?y.isActive:null;A===!1&&(g=x);let E=V===m[v]&&V!==c[v]&&S;if(E&&(r||i)&&t.manuallyAnimateOnMount&&(E=!1),y.protectedKeys={...h},!y.isActive&&A===null||!V&&!y.prevProp||Ct(V)||typeof V=="boolean")continue;if(v==="exit"&&y.isActive&&A!==!0){y.prevResolvedValues&&(h={...h,...y.prevResolvedValues});continue}let b=_s(y.prevProp,V),M=b||v===u&&y.isActive&&!E&&S||x>g&&S,w=!1,R=Array.isArray(V)?V:[V],K=R.reduce(s(v),{});A===!1&&(K={});let{prevResolvedValues:Tt={}}=y,ut={...Tt,...K},Vt=H=>{M=!0,p.has(H)&&(w=!0,p.delete(H)),y.needsAnimating[H]=!0;let et=t.getValue(H);et&&(et.liveStyle=!1)};for(let H in ut){let et=K[H],Ht=Tt[H];if(h.hasOwnProperty(H))continue;let ce=!1;to(et)&&to(Ht)?ce=!Gi(et,Ht):ce=et!==Ht,ce?et!=null?Vt(H):p.add(H):et!==void 0&&p.has(H)?Vt(H):y.protectedKeys[H]=!0}y.prevProp=V,y.prevResolvedValues=K,y.isActive&&(h={...h,...K}),(r||i)&&t.blockInitialAnimation&&(M=!1);let mt=E&&b;M&&(!mt||w)&&f.push(...R.map(H=>{let et={type:v};if(typeof H=="string"&&(r||i)&&!mt&&t.manuallyAnimateOnMount&&t.parent){let{parent:Ht}=t,ce=J(Ht,H);if(Ht.enteringChildren&&ce){let{delayChildren:Fl}=ce.transition||{};et.delay=Xo(Ht.enteringChildren,t,Fl)}}return{animation:H,options:et}}))}if(p.size){let x={};if(typeof c.initial!="boolean"){let v=J(t,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(x.transition=v.transition)}p.forEach(v=>{let y=t.getBaseTarget(v),V=t.getValue(v);V&&(V.liveStyle=!0),x[v]=y!=null?y:null}),f.push({animation:x})}let d=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(d=!1),r=!1,i=!1,d?e(f):Promise.resolve()}function l(u,c){var f;if(o[u].isActive===c)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(p=>{var h;return(h=p.animationState)==null?void 0:h.setActive(u,c)}),o[u].isActive=c;let m=a(u);for(let p in o)o[p].protectedKeys={};return m}return{animateChanges:a,setActive:l,setAnimateFunction:n,getState:()=>o,reset:()=>{o=$s(),i=!0}}}function _s(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Gi(e,t):!1}function ie(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $s(){return{animate:ie(!0),whileInView:ie(),whileHover:ie(),whileTap:ie(),whileDrag:ie(),whileFocus:ie(),exit:ie()}}function vr(t,e){t.min=e.min,t.max=e.max}function st(t,e){vr(t.x,e.x),vr(t.y,e.y)}function zi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}var Ys=1e-4,Cu=1-Ys,Au=1+Ys,Xs=.01,Mu=0-Xs,Du=0+Xs;function j(t){return t.max-t.min}function $i(t,e,o){return Math.abs(t-e)<=o}function Ui(t,e,o,r=.5){t.origin=r,t.originPoint=C(e.min,e.max,t.origin),t.scale=j(o)/j(e),t.translate=C(o.min,o.max,t.origin)-t.originPoint,(t.scale>=Cu&&t.scale<=Au||isNaN(t.scale))&&(t.scale=1),(t.translate>=Mu&&t.translate<=Du||isNaN(t.translate))&&(t.translate=0)}function ne(t,e,o,r){Ui(t.x,e.x,o.x,r?r.originX:void 0),Ui(t.y,e.y,o.y,r?r.originY:void 0)}function Ki(t,e,o,r=0){let i=r?C(o.min,o.max,r):o.min;t.min=i+e.min,t.max=t.min+j(e)}function _i(t,e,o,r){Ki(t.x,e.x,o.x,r==null?void 0:r.x),Ki(t.y,e.y,o.y,r==null?void 0:r.y)}function Hi(t,e,o,r=0){let i=r?C(o.min,o.max,r):o.min;t.min=e.min-i,t.max=t.min+j(e)}function De(t,e,o,r){Hi(t.x,e.x,o.x,r==null?void 0:r.x),Hi(t.y,e.y,o.y,r==null?void 0:r.y)}function qs(t,e,o,r,i){return t-=e,t=uo(t,1/o,r),i!==void 0&&(t=uo(t,1/i,r)),t}function Eu(t,e=0,o=1,r=.5,i,s=t,n=t){if(Y.test(e)&&(e=parseFloat(e),e=C(n.min,n.max,e/100)-n.min),typeof e!="number")return;let a=C(s.min,s.max,r);t===s&&(a-=e),t.min=qs(t.min,e,o,a,i),t.max=qs(t.max,e,o,a,i)}function Zs(t,e,[o,r,i],s,n){Eu(t,e[o],e[r],e[i],e.scale,s,n)}var Ru=["x","scaleX","originX"],Lu=["y","scaleY","originY"];function Yi(t,e,o,r){Zs(t.x,e,Ru,o?o.x:void 0,r?r.x:void 0),Zs(t.y,e,Lu,o?o.y:void 0,r?r.y:void 0)}function Js(t){return t.translate===0&&t.scale===1}function Xi(t){return Js(t.x)&&Js(t.y)}function Qs(t,e){return t.min===e.min&&t.max===e.max}function ea(t,e){return Qs(t.x,e.x)&&Qs(t.y,e.y)}function ta(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function qi(t,e){return ta(t.x,e.x)&&ta(t.y,e.y)}function Zi(t){return j(t.x)/j(t.y)}function Ji(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Q(t){return[t("x"),t("y")]}function oa(t,e,o){let r="",i=t.x.translate/e.x,s=t.y.translate/e.y,n=(o==null?void 0: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 sa=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Iu=sa.length,ra=t=>typeof t=="string"?parseFloat(t):t,ia=t=>typeof t=="number"||T.test(t);function aa(t,e,o,r,i,s){var n,a,l,u;i?(t.opacity=C(0,(n=o.opacity)!=null?n:1,ku(r)),t.opacityExit=C((a=e.opacity)!=null?a:1,0,Bu(r))):s&&(t.opacity=C((l=e.opacity)!=null?l:1,(u=o.opacity)!=null?u:1,r));for(let c=0;c<Iu;c++){let m=sa[c],f=na(e,m),p=na(o,m);if(f===void 0&&p===void 0)continue;f||(f=0),p||(p=0),f===0||p===0||ia(f)===ia(p)?(t[m]=Math.max(C(ra(f),ra(p),r),0),(Y.test(p)||Y.test(f))&&(t[m]+="%")):t[m]=p}(e.rotate||o.rotate)&&(t.rotate=C(e.rotate||0,o.rotate||0,r))}function na(t,e){return t[e]!==void 0?t[e]:t.borderRadius}var ku=la(0,.5,Ue),Bu=la(.5,.95,k);function la(t,e,o){return r=>r<t?0:r>e?1:o(pt(t,e,r))}function ca(t,e,o){let r=D(t)?t:ct(t);return r.start(Zt("",r,e,o)),r.animation}function vt(t,e,o,r={passive:!0}){return t.addEventListener(e,o,r),()=>t.removeEventListener(e,o)}var ua=(t,e)=>t.depth-e.depth;var Tr=class{constructor(){this.children=[],this.isDirty=!1}add(e){$t(this.children,e),this.isDirty=!0}remove(e){Et(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ua),this.isDirty=!1,this.children.forEach(e)}};function ma(t,e){let o=B.now(),r=({timestamp:i})=>{let s=i-o;s>=e&&(q(r),t(s-e))};return P.setup(r,!0),()=>q(r)}function se(t){return D(t)?t.get():t}var Vr=class{constructor(){this.members=[]}add(e){$t(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===!1)&&!r.snapshot&&(Et(this.members,r),r.unmount())}e.scheduleRender()}remove(e){if(Et(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){var o;for(let r=this.members.indexOf(e)-1;r>=0;r--){let i=this.members[r];if(i.isPresent!==!1&&((o=i.instance)==null?void 0:o.isConnected)!==!1)return this.promote(i),!0}return!1}promote(e,o){var i;let r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();let{layoutDependency:s}=r.options,{layoutDependency:n}=e.options;(s===void 0||s!==n)&&(e.resumeFrom=r,o&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(i=e.root)!=null&&i.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var o,r,i,s,n;(r=(o=e.options).onExitComplete)==null||r.call(o),(n=(i=e.resumingFrom)==null?void 0:(s=i.options).onExitComplete)==null||n.call(s)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}};var ae={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var le={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Qi=["","X","Y","Z"],Fu=1e3,Ou=0;function tn(t,e,o,r){let{latestValues:i}=e;i[t]&&(o[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Ta(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:e}=t.options;if(!e)return;let o=Jo(e);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(o,"transform",P,!(i||s))}let{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Ta(r)}function Sr({attachResizeListener:t,defaultParent:e,measureScroll:o,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(n={},a=e==null?void 0:e()){this.id=Ou++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Z.value&&(le.nodes=le.calculatedTargetDeltas=le.calculatedProjections=0),this.nodes.forEach(Gu),this.nodes.forEach($u),this.nodes.forEach(_u),this.nodes.forEach(Wu),Z.addProjectionMetrics&&Z.addProjectionMetrics(le)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,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=!0;this.root===this&&(this.nodes=new Tr)}addEventListener(n,a){return this.eventHandlers.has(n)||this.eventHandlers.set(n,new St),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=Pe(n)&&!Ms(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=!0),t){let c,m=0,f=()=>this.root.updateBlockedByResize=!1;P.read(()=>{m=window.innerWidth}),t(n,()=>{let p=window.innerWidth;p!==m&&(m=p,this.root.updateBlockedByResize=!0,c&&c(),c=ma(f,250),ae.hasAnimatedSinceResize&&(ae.hasAnimatedSinceResize=!1,this.nodes.forEach(ha)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&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()||Ju,{onLayoutAnimationStart:g,onLayoutAnimationComplete:d}=u.getProps(),x=!this.targetLayout||!qi(this.targetLayout,p),v=!m&&f;if(this.options.layoutRoot||this.resumeFrom||v||m&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let y={...Te(h,"layout"),onPlay:g,onComplete:d};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,v)}else m||ha(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(),q(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Yu),this.animationId++)}getTransformTemplate(){let{visualElement:n}=this.options;return n&&n.getProps().transformTemplate}willUpdate(n=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ta(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let m=this.path[c];m.shouldResetTransform=!0,(typeof m.latestValues.x=="string"||typeof m.latestValues.y=="string")&&(m.isLayoutDirty=!0),m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}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=!1,this.isUpdateBlocked()){let l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(Uu),this.nodes.forEach(fa);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(pa);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ku),this.nodes.forEach(Hu),this.nodes.forEach(Nu),this.nodes.forEach(ju)):this.nodes.forEach(pa),this.clearAllSnapshots();let a=B.now();O.delta=G(0,1e3/60,a-O.timestamp),O.timestamp=a,O.isProcessing=!0,Ye.update.process(O),Ye.preRender.process(O),Ye.render.process(O),O.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,te.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zu),this.sharedNodes.forEach(Xu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,P.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){P.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!j(this.snapshot.measuredBox.x)&&!j(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let n=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=I()),this.isLayoutDirty=!1,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=!1),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&&!Xi(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;n&&this.instance&&(a||At(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(n=!0){let a=this.measurePageBox(),l=this.removeElementScroll(a);return n&&(l=this.removeTransform(l)),Qu(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;let{visualElement:n}=this.options;if(!n)return I();let a=n.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(tm))){let{scroll:c}=this.root;c&&(nt(a.x,c.offset.x),nt(a.y,c.offset.y))}return a}removeElementScroll(n){var l;let a=I();if(st(a,n),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){let c=this.path[u],{scroll:m,options:f}=c;c!==this.root&&m&&f.layoutScroll&&(m.wasRoot&&st(a,n),nt(a.x,m.offset.x),nt(a.y,m.offset.y))}return a}applyTransform(n,a=!1,l){var c,m;let u=l||I();st(u,n);for(let f=0;f<this.path.length;f++){let p=this.path[f];!a&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(nt(u.x,-p.scroll.offset.x),nt(u.y,-p.scroll.offset.y)),At(p.latestValues)&&mo(u,p.latestValues,(c=p.layout)==null?void 0:c.layoutBox)}return At(this.latestValues)&&mo(u,this.latestValues,(m=this.layout)==null?void 0:m.layoutBox),u}removeTransform(n){var l;let a=I();st(a,n);for(let u=0;u<this.path.length;u++){let c=this.path[u];if(!At(c.latestValues))continue;let m;c.instance&&(dr(c.latestValues)&&c.updateSnapshot(),m=I(),st(m,c.measurePageBox())),Yi(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,m)}return At(this.latestValues)&&Yi(a,this.latestValues),a}setTargetDelta(n){this.targetDelta=n,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(n){this.options={...this.options,...n,crossfade:n.crossfade!==void 0?n.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==O.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(n=!1){var p;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||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:m}=this.options;if(!this.layout||!(c||m))return;this.resolvedRelativeTargetAt=O.timestamp;let f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=I(),this.targetWithTransforms=I()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),_i(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):st(this.target,this.layout.layoutBox),Oi(this.target,this.targetDelta)):st(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&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),Z.value&&le.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||dr(this.parent.latestValues)||Bi(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=I(),this.relativeTargetOrigin=I(),De(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),st(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var h;let n=this.getLead(),a=!!this.resumingFrom||this!==n,l=!0;if((this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===O.timestamp&&(l=!1),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;st(this.layoutCorrected,this.layout.layoutBox);let m=this.treeScale.x,f=this.treeScale.y;Gs(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=I());let{target:p}=n;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zi(this.prevProjectionDelta.x,this.projectionDelta.x),zi(this.prevProjectionDelta.y,this.projectionDelta.y)),ne(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==f||!Ji(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ji(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Z.value&&le.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(n=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),n){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gt(),this.projectionDelta=Gt(),this.projectionDeltaWithTransform=Gt()}setAnimationOrigin(n,a=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},m=Gt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;let f=I(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,g=p!==h,d=this.getStack(),x=!d||d.members.length<=1,v=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(Zu));this.animationProgress=0;let y;this.mixTargetDelta=V=>{let S=V/1e3;da(m.x,n.x,S),da(m.y,n.y,S),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(De(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),qu(this.relativeTarget,this.relativeTargetOrigin,f,S),y&&ea(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=I()),st(y,this.relativeTarget)),g&&(this.animationValues=c,aa(c,u,this.latestValues,S,v,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(n){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=P.update(()=>{ae.hasAnimatedSinceResize=!0,ht.layout++,this.motionValue||(this.motionValue=ct(0)),this.motionValue.jump(0,!1),this.currentAnimation=ca(this.motionValue,[0,1e3],{...n,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),n.onUpdate&&n.onUpdate(c)},onStop:()=>{ht.layout--},onComplete:()=>{ht.layout--,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(Fu),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&&Va(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||I();let m=j(this.layout.layoutBox.x);l.x.min=n.target.x.min,l.x.max=l.x.min+m;let f=j(this.layout.layoutBox.y);l.y.min=n.target.y.min,l.y.max=l.y.min+f}st(a,l),mo(a,c),ne(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(n,a){this.sharedNodes.has(n)||this.sharedNodes.set(n,new Vr),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:!0}getLead(){var a;let{layoutId:n}=this.options;return n?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;let{layoutId:n}=this.options;return n?(a=this.getStack())==null?void 0:a.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=!0),a&&this.setOptions({transition:a})}relegate(){let n=this.getStack();return n?n.relegate(this):!1}resetSkewAndRotation(){let{visualElement:n}=this.options;if(!n)return;let a=!1,{latestValues:l}=n;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;let u={};l.z&&tn("z",n,u,this.animationValues);for(let c=0;c<Qi.length;c++)tn(`rotate${Qi[c]}`,n,u,this.animationValues),tn(`skew${Qi[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){var h,g;if(!this.instance||this.isSVG)return;if(!this.isVisible){n.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,n.visibility="",n.opacity="",n.pointerEvents=se(a==null?void 0: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=se(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!At(this.latestValues)&&(n.transform=l?l({},""):"none",this.hasProjected=!1);return}n.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let m=oa(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?(g=(h=c.opacity)!=null?h:this.latestValues.opacity)!=null?g: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 d in fo){if(c[d]===void 0)continue;let{correct:x,applyTo:v,isCSSVariable:y}=fo[d],V=m==="none"?c[d]:x(c[d],u);if(v){let S=v.length;for(let A=0;A<S;A++)n[v[A]]=V}else y?this.options.visualElement.renderState.vars[d]=V:n[d]=V}this.options.layoutId&&(n.pointerEvents=u===this?se(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(n=>{var a;return(a=n.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(fa),this.root.sharedNodes.clear()}}}function Nu(t){t.updateLayout()}function ju(t){var o;let e=((o=t.resumeFrom)==null?void 0:o.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:i}=t.layout,{animationType:s}=t.options,n=e.source!==t.layout.source;if(s==="size")Q(m=>{let f=n?e.measuredBox[m]:e.layoutBox[m],p=j(f);f.min=r[m].min,f.max=f.min+p});else if(s==="x"||s==="y"){let m=s==="x"?"y":"x";vr(n?e.measuredBox[m]:e.layoutBox[m],r[m])}else Va(s,e.layoutBox,r)&&Q(m=>{let f=n?e.measuredBox[m]:e.layoutBox[m],p=j(r[m]);f.max=f.min+p,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[m].max=t.relativeTarget[m].min+p)});let a=Gt();ne(a,r,e.layoutBox);let l=Gt();n?ne(l,t.applyTransform(i,!0),e.measuredBox):ne(l,r,e.layoutBox);let u=!Xi(a),c=!1;if(!t.resumeFrom){let m=t.getClosestProjectingParent();if(m&&!m.resumeFrom){let{snapshot:f,layout:p}=m;if(f&&p){let h=t.options.layoutAnchor||void 0,g=I();De(g,e.layoutBox,f.layoutBox,h);let d=I();De(d,r,p.layoutBox,h),qi(g,d)||(c=!0),m.options.layoutRoot&&(t.relativeTarget=d,t.relativeTargetOrigin=g,t.relativeParent=m)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){let{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function Gu(t){Z.value&&le.nodes++,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 Wu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function zu(t){t.clearSnapshot()}function fa(t){t.clearMeasurements()}function Uu(t){t.isLayoutDirty=!0,t.updateLayout()}function pa(t){t.isLayoutDirty=!1}function Ku(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function Hu(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ha(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function $u(t){t.resolveTargetDelta()}function _u(t){t.calcProjection()}function Yu(t){t.resetSkewAndRotation()}function Xu(t){t.removeLeadSnapshot()}function da(t,e,o){t.translate=C(e.translate,0,o),t.scale=C(e.scale,1,o),t.origin=e.origin,t.originPoint=e.originPoint}function ga(t,e,o,r){t.min=C(e.min,o.min,r),t.max=C(e.max,o.max,r)}function qu(t,e,o,r){ga(t.x,e.x,o.x,r),ga(t.y,e.y,o.y,r)}function Zu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}var Ju={duration:.45,ease:[.4,0,.1,1]},xa=t=>typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ya=xa("applewebkit/")&&!xa("chrome/")?Math.round:k;function va(t){t.min=ya(t.min),t.max=ya(t.max)}function Qu(t){va(t.x),va(t.y)}function Va(t,e,o){return t==="position"||t==="preserve-aspect"&&!$i(Zi(e),Zi(o),.2)}function tm(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}var Sa=Sr({attachResizeListener:(t,e)=>vt(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0});var wr={current:void 0},To=Sr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!wr.current){let t=new Sa({});t.mount(window),t.setOptions({layoutScroll:!0}),wr.current=t}return wr.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});import*as br from"react";import{useId as im,useRef as Ca,useContext as nm,useInsertionEffect as sm}from"react";import{createContext as em}from"react";var Ee=em({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});import*as ba from"react";function wa(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function om(...t){return e=>{let o=!1,r=t.map(i=>{let s=wa(i,e);return!o&&typeof s=="function"&&(o=!0),s});if(o)return()=>{for(let i=0;i<r.length;i++){let s=r[i];typeof s=="function"?s():wa(t[i],null)}}}}function Pa(...t){return ba.useCallback(om(...t),t)}var en=class extends br.Component{getSnapshotBeforeUpdate(e){let o=this.props.childRef.current;if(Qt(o)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let r=o.offsetParent,i=Qt(r)&&r.offsetWidth||0,s=Qt(r)&&r.offsetHeight||0,n=getComputedStyle(o),a=this.props.sizeRef.current;a.height=parseFloat(n.height),a.width=parseFloat(n.width),a.top=o.offsetTop,a.left=o.offsetLeft,a.right=i-a.width-a.left,a.bottom=s-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function Aa({children:t,isPresent:e,anchorX:o,anchorY:r,root:i,pop:s}){var f,p;let n=im(),a=Ca(null),l=Ca({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=nm(Ee),c=(p=(f=t.props)==null?void 0:f.ref)!=null?p:t==null?void 0:t.ref,m=Pa(a,c);return sm(()=>{let{width:h,height:g,top:d,left:x,right:v,bottom:y}=l.current;if(e||s===!1||!a.current||!h||!g)return;let V=o==="left"?`left: ${x}`:`right: ${v}`,S=r==="bottom"?`bottom: ${y}`:`top: ${d}`;a.current.dataset.motionPopId=n;let A=document.createElement("style");u&&(A.nonce=u);let E=i!=null?i:document.head;return E.appendChild(A),A.sheet&&A.sheet.insertRule(`
|
|
3
|
+
[data-motion-pop-id="${n}"] {
|
|
4
|
+
position: absolute !important;
|
|
5
|
+
width: ${h}px !important;
|
|
6
|
+
height: ${g}px !important;
|
|
7
|
+
${V}px !important;
|
|
8
|
+
${S}px !important;
|
|
9
|
+
}
|
|
10
|
+
`),()=>{var b;(b=a.current)==null||b.removeAttribute("data-motion-pop-id"),E.contains(A)&&E.removeChild(A)}},[e]),rm(en,{isPresent:e,childRef:a,sizeRef:l,pop:s,children:s===!1?t:br.cloneElement(t,{ref:m})})}var Ra=({children:t,initial:e,isPresent:o,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:n,anchorX:a,anchorY:l,root:u})=>{let c=me(lm),m=am(),f=!0,p=Da(()=>(f=!1,{id:m,initial:e,isPresent:o,custom:i,onExitComplete:h=>{c.set(h,!0);for(let g of c.values())if(!g)return;r&&r()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[o,c,r]);return s&&f&&(p={...p}),Da(()=>{c.forEach((h,g)=>c.set(g,!1))},[o]),Ea.useEffect(()=>{!o&&!c.size&&r&&r()},[o]),t=Ma(Aa,{pop:n==="popLayout",isPresent:o,anchorX:a,anchorY:l,root:u,children:t}),Ma(Dt.Provider,{value:p,children:t})};function lm(){return new Map}import{useContext as cm,useId as um,useEffect as mm,useCallback as fm}from"react";function Pr(t=!0){let e=cm(Dt);if(e===null)return[!0,null];let{isPresent:o,onExitComplete:r,register:i}=e,s=um();mm(()=>{if(t)return i(s)},[t]);let n=fm(()=>t&&r&&r(s),[s,r,t]);return!o&&r?[!1,n]:[!0]}import{Children as pm,isValidElement as hm}from"react";var Vo=t=>t.key||"";function on(t){let e=[];return pm.forEach(t,o=>{hm(o)&&e.push(o)}),e}var nn=({children:t,custom:e,initial:o=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:n=!1,anchorX:a="left",anchorY:l="top",root:u})=>{let[c,m]=Pr(n),f=gm(()=>on(t),[t]),p=n&&!c?[]:f.map(Vo),h=rn(!0),g=rn(f),d=me(()=>new Map),x=rn(new Set),[v,y]=Ia(f),[V,S]=Ia(f);bo(()=>{h.current=!1,g.current=f;for(let b=0;b<V.length;b++){let M=Vo(V[b]);p.includes(M)?(d.delete(M),x.current.delete(M)):d.get(M)!==!0&&d.set(M,!1)}},[V,p.length,p.join("-")]);let A=[];if(f!==v){let b=[...f];for(let M=0;M<V.length;M++){let w=V[M],R=Vo(w);p.includes(R)||(b.splice(M,0,w),A.push(w))}return s==="wait"&&A.length&&(b=A),S(on(b)),y(f),null}process.env.NODE_ENV!=="production"&&s==="wait"&&V.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);let{forceRender:E}=xm(ue);return La(dm,{children:V.map(b=>{let M=Vo(b),w=n&&!c?!1:f===V||p.includes(M),R=()=>{if(x.current.has(M))return;if(d.has(M))x.current.add(M),d.set(M,!0);else return;let K=!0;d.forEach(Tt=>{Tt||(K=!1)}),K&&(E==null||E(),S(g.current),n&&(m==null||m()),r&&r())};return La(Ra,{isPresent:w,initial:!h.current||o?void 0:!1,custom:e,presenceAffectsLayout:i,mode:s,root:u,onExitComplete:w?void 0:R,anchorX:a,anchorY:l,children:b},M)})})};import{createContext as ym}from"react";var Cr=ym({strict:!1});var ka={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"]},Ba=!1;function vm(){if(Ba)return;let t={};for(let e in ka)t[e]={isEnabled:o=>ka[e].some(r=>!!o[r])};lo(t),Ba=!0}function Ar(){return vm(),Ri()}function Fa(t){let e=Ar();for(let o in t)e[o]={...e[o],...t[o]};lo(e)}var Tm=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 So(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Tm.has(t)}var Oa=t=>!So(t);function Vm(t){typeof t=="function"&&(Oa=e=>e.startsWith("on")?!So(e):t(e))}try{Vm(xn("@emotion/is-prop-valid").default)}catch(t){}function Na(t,e,o){let r={};for(let i in t)i==="values"&&typeof t.values=="object"||D(t[i])||(Oa(i)||o===!0&&So(i)||!e&&!So(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}import{jsxs as Gm,jsx as Wm}from"react/jsx-runtime";import{forwardRef as zm,useContext as an}from"react";import{createContext as Sm}from"react";var zt=Sm({});import{useContext as wm,useMemo as bm}from"react";function ja(t,e){if(Wt(t)){let{initial:o,animate:r}=t;return{initial:o===!1||yt(o)?o:void 0,animate:yt(r)?r:void 0}}return t.inherit!==!1?e:{}}function Wa(t){let{initial:e,animate:o}=ja(t,wm(zt));return bm(()=>({initial:e,animate:o}),[Ga(e),Ga(o)])}function Ga(t){return Array.isArray(t)?t.join(" "):t}import{Fragment as Dm,useMemo as Em,createElement as Rm}from"react";import{useMemo as Pm}from"react";var Re=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sn(t,e,o){for(let r in e)!D(e[r])&&!po(r,o)&&(t[r]=e[r])}function Cm({transformTemplate:t},e){return Pm(()=>{let o=Re();return oe(o,e,t),Object.assign({},o.vars,o.style)},[e])}function Am(t,e){let o=t.style||{},r={};return sn(r,o,t),Object.assign(r,Cm(t,e)),r}function za(t,e){let o={},r=Am(t,e);return t.drag&&t.dragListener!==!1&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(o.tabIndex=0),o.style=r,o}import{useMemo as Mm}from"react";var Mr=()=>({...Re(),attrs:{}});function Ua(t,e,o,r){let i=Mm(()=>{let s=Mr();return go(s,e,xo(r),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){let s={};sn(s,t.style,t),i.style={...s,...i.style}}return i}var Ka=["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 Le(t){return typeof t!="string"||t.includes("-")?!1:!!(Ka.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ha(t,e,o,{latestValues:r},i,s=!1,n){let l=((n!=null?n:Le(t))?Ua:za)(e,r,i,t),u=Na(e,typeof t=="string",s),c=t!==Dm?{...u,...l,ref:o}:{},{children:m}=e,f=Em(()=>D(m)?m.get():m,[m]);return Rm(t,{...c,children:f})}import{useContext as $a}from"react";function Lm({scrapeMotionValuesFromProps:t,createRenderState:e},o,r,i){return{latestValues:Im(o,r,i,t),renderState:e()}}function Im(t,e,o,r){let i={},s=r(t,{});for(let f in s)i[f]=se(s[f]);let{initial:n,animate:a}=t,l=Wt(t),u=no(t);e&&u&&!l&&t.inherit!==!1&&(n===void 0&&(n=e.initial),a===void 0&&(a=e.animate));let c=o?o.initial===!1:!1;c=c||n===!1;let m=c?a:n;if(m&&typeof m!="boolean"&&!Ct(m)){let f=Array.isArray(m)?m:[m];for(let p=0;p<f.length;p++){let h=Jt(t,f[p]);if(h){let{transitionEnd:g,transition:d,...x}=h;for(let v in x){let y=x[v];if(Array.isArray(y)){let V=c?y.length-1:0;y=y[V]}y!==null&&(i[v]=y)}for(let v in g)i[v]=g[v]}}}return i}var Dr=t=>(e,o)=>{let r=$a(zt),i=$a(Dt),s=()=>Lm(t,e,r,i);return o?s():me(s)};var _a=Dr({scrapeMotionValuesFromProps:re,createRenderState:Re});var Ya=Dr({scrapeMotionValuesFromProps:yo,createRenderState:Mr});var Xa=Symbol.for("motionComponentSymbol");import{useRef as qa,useInsertionEffect as km,useCallback as Bm}from"react";function Za(t,e,o){let r=qa(o);km(()=>{r.current=o});let i=qa(null);return Bm(s=>{var a;s&&((a=t.onMount)==null||a.call(t,s));let n=r.current;if(typeof n=="function")if(s){let l=n(s);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):n(s);else n&&(n.current=s);e&&(s?e.mount(s):e.unmount())},[e])}import{useContext as wo,useRef as Rr,useInsertionEffect as Om,useEffect as Nm}from"react";import{createContext as Fm}from"react";var Er=Fm({});function Ut(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ja(t,e,o,r,i,s){var y,V;let{visualElement:n}=wo(zt),a=wo(Cr),l=wo(Dt),u=wo(Ee),c=u.reducedMotion,m=u.skipAnimations,f=Rr(null),p=Rr(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(t,{visualState:e,parent:n,props:o,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:m,isSVG:s}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let h=f.current,g=wo(Er);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&jm(f.current,o,i,g);let d=Rr(!1);Om(()=>{h&&d.current&&h.update(o,l)});let x=o[eo],v=Rr(!!x&&typeof window!="undefined"&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,x))&&((V=window.MotionHasOptimisedAnimation)==null?void 0:V.call(window,x)));return bo(()=>{p.current=!0,h&&(d.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),v.current&&h.animationState&&h.animationState.animateChanges())}),Nm(()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,x)}),v.current=!1),h.enteringChildren=void 0)}),h}function jm(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:Qa(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!n||a&&Ut(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:m,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}function Qa(t){if(t)return t.options.allowProjection!==!1?t.projection:Qa(t.parent)}function Lr(t,{forwardMotionProps:e=!1,type:o}={},r,i){var u,c;r&&Fa(r);let s=o?o==="svg":Le(t),n=s?Ya:_a;function a(m,f){let p,h={...an(Ee),...m,layoutId:Um(m)},{isStatic:g}=h,d=Wa(m),x=n(m,g);if(!g&&typeof window!="undefined"){Km(h,r);let v=Hm(h);p=v.MeasureLayout,d.visualElement=Ja(t,x,h,i,v.ProjectionNode,s)}return Gm(zt.Provider,{value:d,children:[p&&d.visualElement?Wm(p,{visualElement:d.visualElement,...h}):null,Ha(t,m,Za(x,d.visualElement,f),x,g,e,s)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${(c=(u=t.displayName)!=null?u:t.name)!=null?c:""})`}`;let l=zm(a);return l[Xa]=t,l}function Um({layoutId:t}){let e=an(ue).id;return e&&t!==void 0?e+"-"+t:t}function Km(t,e){let o=an(Cr).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?ot(!1,r,"lazy-strict-mode"):$(!1,r,"lazy-strict-mode")}}function Hm(t){let e=Ar(),{drag:o,layout:r}=e;if(!o&&!r)return{};let i={...o,...r};return{MeasureLayout:o!=null&&o.isEnabled(t)||r!=null&&r.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function tl(t,e){if(typeof Proxy=="undefined")return Lr;let o=new Map,r=(s,n)=>Lr(s,n,t,e),i=(s,n)=>(process.env.NODE_ENV!=="production"&&_t(!1,"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,Lr(n,void 0,t,e)),o.get(n))})}import{Fragment as $m}from"react";var el=(t,e)=>{var r;return((r=e.isSVG)!=null?r:Le(t))?new vo(e):new ho(e,{allowProjection:t!==$m})};var Ir=class extends z{constructor(e){super(e),e.animationState||(e.animationState=Wi(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Ct(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(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}};var _m=0,kr=class extends z{constructor(){super(...arguments),this.id=_m++,this.isExitComplete=!1}update(){var s;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===!1){if(this.isExitComplete){let{initial:n,custom:a}=this.node.getProps();if(typeof n=="string"){let l=J(this.node,n,a);if(l){let{transition:u,transitionEnd:c,...m}=l;for(let f in m)(s=this.node.getValue(f))==null||s.jump(m[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let i=this.node.animationState.setActive("exit",!e);o&&!e&&i.then(()=>{this.isExitComplete=!0,o(this.id)})}mount(){let{register:e,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),e&&(this.unmount=e(this.id))}unmount(){}};var ol={animation:{Feature:Ir},exit:{Feature:kr}};function Mt(t){return{point:{x:t.pageX,y:t.pageY}}}var rl=t=>e=>ee(e)&&t(e,Mt(e));function Kt(t,e,o,r){return vt(t,e,rl(o),r)}var Br=({current:t})=>t?t.ownerDocument.defaultView:null;var il=(t,e)=>Math.abs(t-e);function nl(t,e){let o=il(t.x,e.x),r=il(t.y,e.y);return Math.sqrt(o**2+r**2)}var sl=new Set(["auto","scroll"]),Ie=class{constructor(e,o,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:s=!1,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=Fr(this.lastRawMoveEventInfo,this.transformPagePoint));let p=ln(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=nl(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!g)return;let{point:d}=p,{timestamp:x}=O;this.history.push({...d,timestamp:x});let{onStart:v,onMove:y}=this.handlers;h||(v&&v(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,p)},this.handlePointerMove=(p,h)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=h,this.lastMoveEventInfo=Fr(h,this.transformPagePoint),P.update(this.updatePoint,!0)},this.handlePointerUp=(p,h)=>{this.end();let{onEnd:g,onSessionEnd:d,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let v=ln(p.type==="pointercancel"?this.lastMoveEventInfo:Fr(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,v),d&&d(p,v)},!ee(e))return;this.dragSnapToOrigin=s,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=n,this.contextWindow=i||window;let l=Mt(e),u=Fr(l,this.transformPagePoint),{point:c}=u,{timestamp:m}=O;this.history=[{...c,timestamp:m}];let{onSessionStart:f}=o;f&&f(e,ln(u,this.history)),this.removeListeners=at(Kt(this.contextWindow,"pointermove",this.handlePointerMove),Kt(this.contextWindow,"pointerup",this.handlePointerUp),Kt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let o=e.parentElement;for(;o;){let r=getComputedStyle(o);(sl.has(r.overflowX)||sl.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:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),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),P.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),q(this.updatePoint)}};function Fr(t,e){return e?{point:e(t.point)}:t}function al(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ln({point:t},e){return{point:t,delta:al(t,ll(e)),offset:al(t,Ym(e)),velocity:Xm(e,.1)}}function Ym(t){return t[0]}function ll(t){return t[t.length-1]}function Xm(t,e){if(t.length<2)return{x:0,y:0};let o=t.length-1,r=null,i=ll(t);for(;o>=0&&(r=t[o],!(i.timestamp-r.timestamp>N(e)));)o--;if(!r)return{x:0,y:0};r===t[0]&&t.length>2&&i.timestamp-r.timestamp>N(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 pl(t,{min:e,max:o},r){return e!==void 0&&t<e?t=r?C(e,t,r.min):Math.max(t,e):o!==void 0&&t>o&&(t=r?C(o,t,r.max):Math.min(t,o)),t}function cl(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 hl(t,{top:e,left:o,bottom:r,right:i}){return{x:cl(t.x,o,i),y:cl(t.y,e,r)}}function ul(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 dl(t,e){return{x:ul(t.x,e.x),y:ul(t.y,e.y)}}function gl(t,e){let o=.5,r=j(t),i=j(e);return i>r?o=pt(e.min,e.max-r,t.min):r>i&&(o=pt(t.min,t.max-i,e.min)),G(0,1,o)}function xl(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 Or=.35;function yl(t=Or){return t===!1?t=0:t===!0&&(t=Or),{x:ml(t,"left","right"),y:ml(t,"top","bottom")}}function ml(t,e,o){return{min:fl(t,e),max:fl(t,o)}}function fl(t,e){return typeof t=="number"?t:t[e]||0}var qm=new WeakMap,jr=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=I(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:o=!1,distanceThreshold:r}={}){let{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;let s=m=>{o&&this.snapToCursor(Mt(m).point),this.stopAnimation()},n=(m,f)=>{let{drag:p,dragPropagation:h,onDragStart:g}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Si(p),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Q(x=>{let v=this.getAxisMotionValue(x).get()||0;if(Y.test(v)){let{projection:y}=this.visualElement;if(y&&y.layout){let V=y.layout.layoutBox[x];V&&(v=j(V)*(parseFloat(v)/100))}}this.originPoint[x]=v}),g&&P.update(()=>g(m,f),!1,!0),Ve(this.visualElement,"transform");let{animationState:d}=this.visualElement;d&&d.setActive("whileDrag",!0)},a=(m,f)=>{this.latestPointerEvent=m,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:h,onDirectionLock:g,onDrag:d}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:x}=f;if(h&&this.currentDirection===null){this.currentDirection=Jm(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),d&&P.update(()=>d(m,f),!1,!0)},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 Ie(e,{onSessionStart:s,onStart:n,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Br(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&&P.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:o}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,o,r){let{drag:i}=this.getProps();if(!r||!Nr(e,i,this.currentDirection))return;let s=this.getAxisMotionValue(e),n=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(n=pl(n,this.constraints[e],this.elastic[e])),s.set(n)}resolveConstraints(){var s;let{dragConstraints:e,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;e&&Ut(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=hl(r.layoutBox,e):this.constraints=!1,this.elastic=yl(o),i!==this.constraints&&!Ut(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&Q(n=>{this.constraints!==!1&&this.getAxisMotionValue(n)&&(this.constraints[n]=xl(r.layoutBox[n],this.constraints[n]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:o}=this.getProps();if(!e||!Ut(e))return!1;let r=e.current;$(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!1;let s=Ni(r,i.root,this.visualElement.getTransformPagePoint()),n=dl(i.layout.layoutBox,s);if(o){let a=o(Li(n));this.hasMutatedConstraints=!!a,a&&(n=co(a))}return n}startAnimation(e){let{drag:o,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:n,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Q(c=>{if(!Nr(c,o,this.currentDirection))return;let m=l&&l[c]||{};(n===!0||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 Ve(this.visualElement,e),r.start(Zt(e,r,0,o,this.visualElement,!1))}stopAnimation(){Q(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){Q(o=>{let{drag:r}=this.getProps();if(!Nr(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]-C(n,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!Ut(o)||!r||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};Q(n=>{let a=this.getAxisMotionValue(n);if(a&&this.constraints!==!1){let l=a.get();i[n]=gl({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=!1,this.resolveConstraints(),Q(n=>{if(!Nr(n,e,null))return;let a=this.getAxisMotionValue(n),{min:l,max:u}=this.constraints[n];a.set(C(l,u,i[n]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;qm.set(this.visualElement,this);let e=this.visualElement.current,o=Kt(e,"pointerdown",u=>{let{drag:c,dragListener:m=!0}=this.getProps(),f=u.target,p=f!==e&&Ci(f);c&&m&&!p&&this.start(u)}),r,i=()=>{let{dragConstraints:u}=this.getProps();Ut(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=Zm(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,n=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),P.read(i);let a=vt(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(Q(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=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:n=Or,dragMomentum:a=!0}=e;return{...e,drag:o,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:n,dragMomentum:a}}};function vl(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function Zm(t,e,o){let r=mr(t,vl(o)),i=mr(e,vl(o));return()=>{r(),i()}}function Nr(t,e,o){return(e===!0||e===t)&&(o===null||o===t)}function Jm(t,e=10){let o=null;return Math.abs(t.y)>e?o="y":Math.abs(t.x)>e&&(o="x"),o}var Gr=class extends z{constructor(e){super(e),this.removeGroupControls=k,this.removeListeners=k,this.controls=new jr(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||k}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 cn=t=>(e,o)=>{t&&P.update(()=>t(e,o),!1,!0)},Wr=class extends z{constructor(){super(...arguments),this.removePointerDownListener=k}onPointerDown(e){this.session=new Ie(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Br(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:o,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:cn(e),onStart:cn(o),onMove:cn(r),onEnd:(s,n)=>{delete this.session,i&&P.postRender(()=>i(s,n))}}}mount(){this.removePointerDownListener=Kt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};import{jsx as Qm}from"react/jsx-runtime";import{useContext as Tl,Component as tf}from"react";var un=!1,mn=class extends tf{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),un&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ae.hasEverUpdated=!0}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}),un=!0,i||e.layoutDependency!==o||o===void 0||e.isPresent!==s?n.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?n.promote():n.relegate()||P.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(),te.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:i}=e;un=!0,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 zr(t){let[e,o]=Pr(),r=Tl(ue);return Qm(mn,{...t,layoutGroup:r,switchLayoutGroup:Tl(Er),isPresent:e,safeToRemove:o})}var Vl={pan:{Feature:Wr},drag:{Feature:Gr,ProjectionNode:To,MeasureLayout:zr}};function Sl(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&&P.postRender(()=>s(e,Mt(e)))}var Ur=class extends z{mount(){let{current:e}=this.node;e&&(this.unmount=wi(e,(o,r)=>(Sl(this.node,r,"Start"),i=>Sl(this.node,i,"End"))))}unmount(){}};var Kr=class extends z{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(o){e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=at(vt(this.node.current,"focus",()=>this.onFocus()),vt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function wl(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&&P.postRender(()=>s(e,Mt(e)))}var Hr=class extends z{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:o,propagate:r}=this.node.props;this.unmount=Mi(e,(i,s)=>(wl(this.node,s,"Start"),(n,{success:a})=>wl(this.node,n,a?"End":"Cancel")),{useGlobalTarget:o,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}};var pn=new WeakMap,fn=new WeakMap,ef=t=>{let e=pn.get(t.target);e&&e(t)},of=t=>{t.forEach(ef)};function rf({root:t,...e}){let o=t||document;fn.has(o)||fn.set(o,{});let r=fn.get(o),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(of,{root:t,...e})),r[i]}function bl(t,e,o){let r=rf(e);return pn.set(t,o),r.observe(t),()=>{pn.delete(t),r.unobserve(t)}}var nf={some:0,all:1},$r=class extends z{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);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:nf[i]},a=u=>{let{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:m,onViewportLeave:f}=this.node.getProps(),p=c?m:f;p&&p(u)};this.stopObserver=bl(this.node.current,n,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver=="undefined")return;let{props:e,prevProps:o}=this.node;["amount","margin","root"].some(sf(e,o))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}};function sf({viewport:t={}},{viewport:e={}}={}){return o=>t[o]!==e[o]}var Pl={inView:{Feature:$r},tap:{Feature:Hr},focus:{Feature:Kr},hover:{Feature:Ur}};var Cl={layout:{ProjectionNode:To,MeasureLayout:zr}};var Al={...ol,...Pl,...Vl,...Cl};var hn=tl(Al,el);import{jsx as _,jsxs as af}from"react/jsx-runtime";var Ml=({className:t})=>_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:ft("size-5.5",t),height:24,width:24,children:_("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"})}),Dl=({className:t})=>_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:ft("size-5.5",t),height:24,width:24,children:_("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}),El=({className:t})=>_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:ft("size-5.5",t),height:24,width:24,children:_("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"})}),Rl=({className:t})=>af("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:ft("size-5.5 animate-spin",t),children:[_("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),_("path",{d:"M12 6l0 -3"}),_("path",{d:"M16.25 7.75l2.15 -2.15"}),_("path",{d:"M18 12l3 0"}),_("path",{d:"M16.25 16.25l2.15 2.15"}),_("path",{d:"M12 18l0 3"}),_("path",{d:"M7.75 16.25l-2.15 2.15"}),_("path",{d:"M6 12l-3 0"}),_("path",{d:"M7.75 7.75l-2.15 -2.15"})]}),Ll=({className:t})=>_("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",className:ft("size-3",t),children:_("path",{d:"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z"})});import{jsx as Il,jsxs as lf}from"react/jsx-runtime";function kl({message:t,type:e="default",icon:o,setToasts:r,id:i,closeButton:s}){let n=()=>{r==null||r(a=>a.filter(l=>l.id!==i))};return lf(hn.div,{layout:!0,initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:40},transition:{layout:{duration:.25},opacity:{duration:.2},y:{duration:.2}},className:ft("pointer-events-auto relative flex max-w-80 min-w-62 items-center gap-1 rounded-lg border border-gray-200/70 bg-white py-3 text-sm text-zinc-800",e==="default"?"px-4":"px-3"),children:[o,t,s&&Il("button",{onClick:n,className:"absolute -top-2 -right-2 cursor-pointer rounded-full border border-gray-200/70 bg-white p-px text-zinc-500",children:Il(Ll,{})})]})}import{useState as cf,useEffect as uf}from"react";import{jsx as _r}from"react/jsx-runtime";function Bl(t){switch(t){case"success":return _r(Ml,{});case"error":return _r(Dl,{});case"warning":return _r(El,{});case"loading":return _r(Rl,{});default:return null}}import{jsx as dn}from"react/jsx-runtime";var gn=null;function mf({autoClose:t=3e3,closeButton:e=!1}){let[o,r]=cf([]);return uf(()=>{gn=(i,s={})=>{let{type:n="default",duration:a,closeButton:l,id:u}=s,c=u!=null?u:Date.now(),m=a||t;return r(f=>f.find(h=>h.id===c)?f.map(h=>h.id===c?{...h,message:i,type:n,closeButton:l!=null?l:e}:h):[...f,{id:c,message:i,type:n,closeButton:l!=null?l:e}]),n!=="loading"&&setTimeout(()=>{r(f=>f.filter(p=>p.id!==c))},m),c}},[t,e]),dn("div",{className:ft("pointer-events-none fixed inset-0 z-9999 flex flex-col items-end justify-end gap-2 p-4 text-sm"),children:dn(nn,{initial:!1,children:o.map(i=>dn(kl,{id:i.id,message:i.message,setToasts:r,type:i.type,icon:Bl(i.type),closeButton:i.closeButton},i.id))})})}function tt(t,e){if(gn)return gn(t,e)}tt.success=(t,e)=>tt(t,{...e,type:"success"});tt.error=(t,e)=>tt(t,{...e,type:"error"});tt.warning=(t,e)=>tt(t,{...e,type:"warning"});tt.loading=(t,e)=>tt(t,{...e,type:"loading"});tt.promise=(t,e,o)=>{let r=Date.now().toString()+Math.random().toString(36).substring(2);return tt(e.loading,{...o,type:"loading",id:r,duration:1/0}),t.then(i=>{let s=typeof e.success=="function"?e.success(i):e.success;tt(s,{...o,type:"success",id:r})}).catch(i=>{let s=typeof e.error=="function"?e.error(i):e.error;tt(s,{...o,type:"error",id:r})}),t};export{mf as ToastContainer,tt as toast};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-toast-msg",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.7.0",
|
|
4
|
+
"description": "Fast, flexible, developer-friendly React toast notifications with a clean black & white design.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
7
7
|
],
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"prettier": "prettier --write src",
|
|
11
11
|
"build": "pnpm build:ts && pnpm build:css",
|
|
12
12
|
"build:ts": "tsup",
|
|
13
|
-
"build:css": "
|
|
13
|
+
"build:css": "cp ./src/style.css ./dist/style.css",
|
|
14
14
|
"test": "vitest"
|
|
15
15
|
},
|
|
16
16
|
"main": "dist/index.js",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"clsx": "^2.1.1",
|
|
71
|
+
"framer-motion": "^12.38.0",
|
|
71
72
|
"tailwind-merge": "^3.4.0"
|
|
72
73
|
}
|
|
73
74
|
}
|