@artemdev04/design-system 1.0.0 → 1.2.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/dist/index.umd.js CHANGED
@@ -1,64 +1,69 @@
1
- (function(L,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],v):(L=typeof globalThis<"u"?globalThis:L||self,v(L.MyDesignSystem={},L.jsxRuntime,L.React,L.ReactDOM))})(this,(function(L,v,x,No){"use strict";function Fo(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const re=Fo(x);function rs(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=rs(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function os(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=rs(t))&&(s&&(s+=" "),s+=e);return s}const as=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,ls=os,oe=(t,e)=>n=>{var s;if((e==null?void 0:e.variants)==null)return ls(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=e,r=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],d=o==null?void 0:o[c];if(u===null)return null;const f=as(u)||as(d);return i[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(m=>{let[p,g]=m;return Array.isArray(g)?g.includes({...o,...a}[p]):{...o,...a}[p]===g})?[...c,d,f]:c},[]);return ls(t,r,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
1
+ (function(M,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],m):(M=typeof globalThis<"u"?globalThis:M||self,m(M.MyDesignSystem={},M.jsxRuntime,M.React,M.ReactDOM))})(this,(function(M,m,v,Oo){"use strict";function jo(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const re=jo(v);function as(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=as(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function ls(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=as(t))&&(s&&(s+=" "),s+=e);return s}const cs=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,us=ls,oe=(t,e)=>n=>{var s;if((e==null?void 0:e.variants)==null)return us(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=e,r=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],d=o==null?void 0:o[c];if(u===null)return null;const f=cs(u)||cs(d);return i[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[g,y]=p;return Array.isArray(y)?y.includes({...o,...a}[g]):{...o,...a}[g]===y})?[...c,d,f]:c},[]);return us(t,r,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
2
2
  * @license lucide-react v0.562.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const Bo=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Oo=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,s)=>s?s.toUpperCase():n.toLowerCase()),cs=t=>{const e=Oo(t);return e.charAt(0).toUpperCase()+e.slice(1)},us=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim(),jo=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
6
+ */const Ro=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zo=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,s)=>s?s.toUpperCase():n.toLowerCase()),ds=t=>{const e=zo(t);return e.charAt(0).toUpperCase()+e.slice(1)},fs=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim(),$o=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/**
7
7
  * @license lucide-react v0.562.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */var Ro={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"};/**
11
+ */var _o={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"};/**
12
12
  * @license lucide-react v0.562.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const zo=x.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:o,iconNode:r,...a},l)=>x.createElement("svg",{ref:l,...Ro,width:e,height:e,stroke:t,strokeWidth:s?Number(n)*24/Number(e):n,className:us("lucide",i),...!o&&!jo(a)&&{"aria-hidden":"true"},...a},[...r.map(([c,u])=>x.createElement(c,u)),...Array.isArray(o)?o:[o]]));/**
16
+ */const Uo=v.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:i="",children:o,iconNode:r,...a},l)=>v.createElement("svg",{ref:l,..._o,width:e,height:e,stroke:t,strokeWidth:s?Number(n)*24/Number(e):n,className:fs("lucide",i),...!o&&!$o(a)&&{"aria-hidden":"true"},...a},[...r.map(([c,u])=>v.createElement(c,u)),...Array.isArray(o)?o:[o]]));/**
17
17
  * @license lucide-react v0.562.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const bt=(t,e)=>{const n=x.forwardRef(({className:s,...i},o)=>x.createElement(zo,{ref:o,iconNode:e,className:us(`lucide-${Bo(cs(t))}`,`lucide-${t}`,s),...i}));return n.displayName=cs(t),n};/**
21
+ */const ht=(t,e)=>{const n=v.forwardRef(({className:s,...i},o)=>v.createElement(Uo,{ref:o,iconNode:e,className:fs(`lucide-${Ro(ds(t))}`,`lucide-${t}`,s),...i}));return n.displayName=ds(t),n};/**
22
22
  * @license lucide-react v0.562.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const $o=bt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
26
+ */const hs=ht("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
27
27
  * @license lucide-react v0.562.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const Uo=bt("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
31
+ */const Wo=ht("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
32
32
  * @license lucide-react v0.562.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const _o=bt("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
36
+ */const Go=ht("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
37
37
  * @license lucide-react v0.562.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const Wo=bt("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
41
+ */const Ko=ht("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
42
42
  * @license lucide-react v0.562.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const Ko=bt("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
46
+ */const Ho=ht("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
47
47
  * @license lucide-react v0.562.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */const Go=bt("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
51
+ */const Xo=ht("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
52
52
  * @license lucide-react v0.562.0 - ISC
53
53
  *
54
54
  * This source code is licensed under the ISC license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const Ho=bt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Xo=(t,e)=>{const n=new Array(t.length+e.length);for(let s=0;s<t.length;s++)n[s]=t[s];for(let s=0;s<e.length;s++)n[t.length+s]=e[s];return n},Yo=(t,e)=>({classGroupId:t,validator:e}),ds=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),ae="-",fs=[],qo="arbitrary..",Zo=t=>{const e=Qo(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return Jo(r);const a=r.split(ae),l=a[0]===""&&a.length>1?1:0;return hs(a,l,e)},getConflictingClassGroupIds:(r,a)=>{if(a){const l=s[r],c=n[r];return l?c?Xo(c,l):l:c||fs}return n[r]||fs}}},hs=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],o=n.nextPart.get(i);if(o){const c=hs(t,e+1,o);if(c)return c}const r=n.validators;if(r===null)return;const a=e===0?t.join(ae):t.slice(e).join(ae),l=r.length;for(let c=0;c<l;c++){const u=r[c];if(u.validator(a))return u.classGroupId}},Jo=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),s=e.slice(0,n);return s?qo+s:void 0})(),Qo=t=>{const{theme:e,classGroups:n}=t;return ta(n,e)},ta=(t,e)=>{const n=ds();for(const s in t){const i=t[s];Ne(i,n,s,e)}return n},Ne=(t,e,n,s)=>{const i=t.length;for(let o=0;o<i;o++){const r=t[o];ea(r,e,n,s)}},ea=(t,e,n,s)=>{if(typeof t=="string"){na(t,e,n);return}if(typeof t=="function"){sa(t,e,n,s);return}ia(t,e,n,s)},na=(t,e,n)=>{const s=t===""?e:ms(e,t);s.classGroupId=n},sa=(t,e,n,s)=>{if(ra(t)){Ne(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(Yo(n,t))},ia=(t,e,n,s)=>{const i=Object.entries(t),o=i.length;for(let r=0;r<o;r++){const[a,l]=i[r];Ne(l,ms(e,a),n,s)}},ms=(t,e)=>{let n=t;const s=e.split(ae),i=s.length;for(let o=0;o<i;o++){const r=s[o];let a=n.nextPart.get(r);a||(a=ds(),n.nextPart.set(r,a)),n=a}return n},ra=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,oa=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),s=Object.create(null);const i=(o,r)=>{n[o]=r,e++,e>t&&(e=0,s=n,n=Object.create(null))};return{get(o){let r=n[o];if(r!==void 0)return r;if((r=s[o])!==void 0)return i(o,r),r},set(o,r){o in n?n[o]=r:i(o,r)}}},Fe="!",ps=":",aa=[],gs=(t,e,n,s,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),la=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=i=>{const o=[];let r=0,a=0,l=0,c;const u=i.length;for(let p=0;p<u;p++){const g=i[p];if(r===0&&a===0){if(g===ps){o.push(i.slice(l,p)),l=p+1;continue}if(g==="/"){c=p;continue}}g==="["?r++:g==="]"?r--:g==="("?a++:g===")"&&a--}const d=o.length===0?i:i.slice(l);let f=d,h=!1;d.endsWith(Fe)?(f=d.slice(0,-1),h=!0):d.startsWith(Fe)&&(f=d.slice(1),h=!0);const m=c&&c>l?c-l:void 0;return gs(o,h,f,m)};if(e){const i=e+ps,o=s;s=r=>r.startsWith(i)?o(r.slice(i.length)):gs(aa,!1,r,void 0,!0)}if(n){const i=s;s=o=>n({className:o,parseClassName:i})}return s},ca=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,s)=>{e.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let o=0;o<n.length;o++){const r=n[o],a=r[0]==="[",l=e.has(r);a||l?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(r)):i.push(r)}return i.length>0&&(i.sort(),s.push(...i)),s}},ua=t=>({cache:oa(t.cacheSize),parseClassName:la(t),sortModifiers:ca(t),...Zo(t)}),da=/\s+/,fa=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:o}=e,r=[],a=t.trim().split(da);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:p}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let g=!!p,b=s(g?m.substring(0,p):m);if(!b){if(!g){l=u+(l.length>0?" "+l:l);continue}if(b=s(m),!b){l=u+(l.length>0?" "+l:l);continue}g=!1}const T=f.length===0?"":f.length===1?f[0]:o(f).join(":"),w=h?T+Fe:T,M=w+b;if(r.indexOf(M)>-1)continue;r.push(M);const A=i(b,g);for(let V=0;V<A.length;++V){const D=A[V];r.push(w+D)}l=u+(l.length>0?" "+l:l)}return l},ha=(...t)=>{let e=0,n,s,i="";for(;e<t.length;)(n=t[e++])&&(s=ys(n))&&(i&&(i+=" "),i+=s);return i},ys=t=>{if(typeof t=="string")return t;let e,n="";for(let s=0;s<t.length;s++)t[s]&&(e=ys(t[s]))&&(n&&(n+=" "),n+=e);return n},ma=(t,...e)=>{let n,s,i,o;const r=l=>{const c=e.reduce((u,d)=>d(u),t());return n=ua(c),s=n.cache.get,i=n.cache.set,o=a,a(l)},a=l=>{const c=s(l);if(c)return c;const u=fa(l,n);return i(l,u),u};return o=r,(...l)=>o(ha(...l))},pa=[],z=t=>{const e=n=>n[t]||pa;return e.isThemeGetter=!0,e},bs=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vs=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ga=/^\d+\/\d+$/,ya=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ba=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,va=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,xa=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pt=t=>ga.test(t),E=t=>!!t&&!Number.isNaN(Number(t)),ht=t=>!!t&&Number.isInteger(Number(t)),Be=t=>t.endsWith("%")&&E(t.slice(0,-1)),at=t=>ya.test(t),Ta=()=>!0,Sa=t=>ba.test(t)&&!va.test(t),xs=()=>!1,Ca=t=>xa.test(t),ka=t=>wa.test(t),Aa=t=>!S(t)&&!C(t),Pa=t=>Vt(t,ks,xs),S=t=>bs.test(t),vt=t=>Vt(t,As,Sa),Oe=t=>Vt(t,La,E),ws=t=>Vt(t,Ss,xs),Va=t=>Vt(t,Cs,ka),le=t=>Vt(t,Ps,Ca),C=t=>vs.test(t),Wt=t=>Mt(t,As),Ma=t=>Mt(t,Ia),Ts=t=>Mt(t,Ss),Da=t=>Mt(t,ks),Ea=t=>Mt(t,Cs),ce=t=>Mt(t,Ps,!0),Vt=(t,e,n)=>{const s=bs.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},Mt=(t,e,n=!1)=>{const s=vs.exec(t);return s?s[1]?e(s[1]):n:!1},Ss=t=>t==="position"||t==="percentage",Cs=t=>t==="image"||t==="url",ks=t=>t==="length"||t==="size"||t==="bg-size",As=t=>t==="length",La=t=>t==="number",Ia=t=>t==="family-name",Ps=t=>t==="shadow",Na=ma(()=>{const t=z("color"),e=z("font"),n=z("text"),s=z("font-weight"),i=z("tracking"),o=z("leading"),r=z("breakpoint"),a=z("container"),l=z("spacing"),c=z("radius"),u=z("shadow"),d=z("inset-shadow"),f=z("text-shadow"),h=z("drop-shadow"),m=z("blur"),p=z("perspective"),g=z("aspect"),b=z("ease"),T=z("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...M(),C,S],V=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],y=()=>[C,S,l],N=()=>[Pt,"full","auto",...y()],U=()=>[ht,"none","subgrid",C,S],nt=()=>["auto",{span:["full",ht,C,S]},ht,C,S],At=()=>[ht,"auto",C,S],Ve=()=>["auto","min","max","fr",C,S],_t=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],dt=()=>["start","end","center","stretch","center-safe","end-safe"],rt=()=>["auto",...y()],F=()=>[Pt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],k=()=>[t,C,S],ot=()=>[...M(),Ts,ws,{position:[C,S]}],ft=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Me=()=>["auto","cover","contain",Da,Pa,{size:[C,S]}],ss=()=>[Be,Wt,vt],H=()=>["","none","full",c,C,S],Y=()=>["",E,Wt,vt],De=()=>["solid","dashed","dotted","double"],Lo=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>[E,Be,Ts,ws],Io=()=>["","none",m,C,S],Ee=()=>["none",E,C,S],Le=()=>["none",E,C,S],is=()=>[E,C,S],Ie=()=>[Pt,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[at],breakpoint:[at],color:[Ta],container:[at],"drop-shadow":[at],ease:["in","out","in-out"],font:[Aa],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[at],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[at],shadow:[at],spacing:["px",E],text:[at],"text-shadow":[at],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pt,S,C,g]}],container:["container"],columns:[{columns:[E,S,C,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[ht,"auto",C,S]}],basis:[{basis:[Pt,"full","auto",a,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[E,Pt,"auto","initial","none",S]}],grow:[{grow:["",E,C,S]}],shrink:[{shrink:["",E,C,S]}],order:[{order:[ht,"first","last","none",C,S]}],"grid-cols":[{"grid-cols":U()}],"col-start-end":[{col:nt()}],"col-start":[{"col-start":At()}],"col-end":[{"col-end":At()}],"grid-rows":[{"grid-rows":U()}],"row-start-end":[{row:nt()}],"row-start":[{"row-start":At()}],"row-end":[{"row-end":At()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ve()}],"auto-rows":[{"auto-rows":Ve()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:[..._t(),"normal"]}],"justify-items":[{"justify-items":[...dt(),"normal"]}],"justify-self":[{"justify-self":["auto",...dt()]}],"align-content":[{content:["normal",..._t()]}],"align-items":[{items:[...dt(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...dt(),{baseline:["","last"]}]}],"place-content":[{"place-content":_t()}],"place-items":[{"place-items":[...dt(),"baseline"]}],"place-self":[{"place-self":["auto",...dt()]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:rt()}],mx:[{mx:rt()}],my:[{my:rt()}],ms:[{ms:rt()}],me:[{me:rt()}],mt:[{mt:rt()}],mr:[{mr:rt()}],mb:[{mb:rt()}],ml:[{ml:rt()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[a,"screen",...F()]}],"min-w":[{"min-w":[a,"screen","none",...F()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,Wt,vt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,C,Oe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Be,S]}],"font-family":[{font:[Ma,S,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,C,S]}],"line-clamp":[{"line-clamp":[E,"none",C,Oe]}],leading:[{leading:[o,...y()]}],"list-image":[{"list-image":["none",C,S]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",C,S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:[E,"from-font","auto",C,vt]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[E,"auto",C,S]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",C,S]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",C,S]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ot()}],"bg-repeat":[{bg:ft()}],"bg-size":[{bg:Me()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ht,C,S],radial:["",C,S],conic:[ht,C,S]},Ea,Va]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:ss()}],"gradient-via-pos":[{via:ss()}],"gradient-to-pos":[{to:ss()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...De(),"hidden","none"]}],"divide-style":[{divide:[...De(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...De(),"none","hidden"]}],"outline-offset":[{"outline-offset":[E,C,S]}],"outline-w":[{outline:["",E,Wt,vt]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,ce,le]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,ce,le]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[E,vt]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,ce,le]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[E,C,S]}],"mix-blend":[{"mix-blend":[...Lo(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Lo()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[E]}],"mask-image-linear-from-pos":[{"mask-linear-from":_()}],"mask-image-linear-to-pos":[{"mask-linear-to":_()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":_()}],"mask-image-t-to-pos":[{"mask-t-to":_()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":_()}],"mask-image-r-to-pos":[{"mask-r-to":_()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":_()}],"mask-image-b-to-pos":[{"mask-b-to":_()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":_()}],"mask-image-l-to-pos":[{"mask-l-to":_()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":_()}],"mask-image-x-to-pos":[{"mask-x-to":_()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":_()}],"mask-image-y-to-pos":[{"mask-y-to":_()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[C,S]}],"mask-image-radial-from-pos":[{"mask-radial-from":_()}],"mask-image-radial-to-pos":[{"mask-radial-to":_()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[E]}],"mask-image-conic-from-pos":[{"mask-conic-from":_()}],"mask-image-conic-to-pos":[{"mask-conic-to":_()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ot()}],"mask-repeat":[{mask:ft()}],"mask-size":[{mask:Me()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",C,S]}],filter:[{filter:["","none",C,S]}],blur:[{blur:Io()}],brightness:[{brightness:[E,C,S]}],contrast:[{contrast:[E,C,S]}],"drop-shadow":[{"drop-shadow":["","none",h,ce,le]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",E,C,S]}],"hue-rotate":[{"hue-rotate":[E,C,S]}],invert:[{invert:["",E,C,S]}],saturate:[{saturate:[E,C,S]}],sepia:[{sepia:["",E,C,S]}],"backdrop-filter":[{"backdrop-filter":["","none",C,S]}],"backdrop-blur":[{"backdrop-blur":Io()}],"backdrop-brightness":[{"backdrop-brightness":[E,C,S]}],"backdrop-contrast":[{"backdrop-contrast":[E,C,S]}],"backdrop-grayscale":[{"backdrop-grayscale":["",E,C,S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[E,C,S]}],"backdrop-invert":[{"backdrop-invert":["",E,C,S]}],"backdrop-opacity":[{"backdrop-opacity":[E,C,S]}],"backdrop-saturate":[{"backdrop-saturate":[E,C,S]}],"backdrop-sepia":[{"backdrop-sepia":["",E,C,S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",C,S]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[E,"initial",C,S]}],ease:[{ease:["linear","initial",b,C,S]}],delay:[{delay:[E,C,S]}],animate:[{animate:["none",T,C,S]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,C,S]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:Ee()}],"rotate-x":[{"rotate-x":Ee()}],"rotate-y":[{"rotate-y":Ee()}],"rotate-z":[{"rotate-z":Ee()}],scale:[{scale:Le()}],"scale-x":[{"scale-x":Le()}],"scale-y":[{"scale-y":Le()}],"scale-z":[{"scale-z":Le()}],"scale-3d":["scale-3d"],skew:[{skew:is()}],"skew-x":[{"skew-x":is()}],"skew-y":[{"skew-y":is()}],transform:[{transform:[C,S,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",C,S]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",C,S]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[E,Wt,vt,Oe]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function I(...t){return Na(os(t))}const Fa={error:Uo,info:_o,noData:Ko,success:$o,warning:Go},Ba=oe("relative flex flex-col gap-2 items-start rounded-md border-2 p-4 w-full ",{defaultVariants:{variant:"warning"},variants:{variant:{error:"border-error-border bg-error-surface text-error-text",info:"border-info-border bg-info-surface text-info-text",noData:"border-text-secondary text-text",success:"border-success-border bg-success-surface text-success-text",warning:"border-warning-border bg-warning-surface text-warning-text"}}});function Oa({children:t,className:e,icon:n,ref:s,showIcon:i=!1,variant:o,...r}){const a=Fa[o||"warning"];return v.jsxs("div",{className:I(Ba({variant:o}),e),ref:s,role:o==="error"?"alert":"status",...r,children:[t,(i||n)&&v.jsx("div",{className:"absolute top-2 right-2",children:n||v.jsx(a,{size:22})})]})}function ja({children:t,className:e,...n}){return v.jsx("h5",{className:I("font-bold leading-none tracking-tight",e),...n,children:t})}function Ra({children:t,className:e,...n}){return v.jsx("div",{className:I("text-sm opacity-90",e),...n,children:t})}const za=oe(["py-2 px-4 rounded border-border cursor-pointer border text-on-primary shadow-md","transition-all duration-150 ease-in-out","hover:scale-[1.10] active:scale-[0.95]","disabled:bg-disabled-surface disabled:border-disabled-border disabled:text-disabled-text disabled:cursor-default disabled:hover:scale-100 disabled:active:scale-100 disabled:cursor-not-allowed"],{defaultVariants:{variant:"primary"},variants:{variant:{animated:I("border-transparent rounded-full text-text-surface",{animatedButton:"_animatedButton_10ydq_7"}.animatedButton),confirm:"bg-success border-success-border",danger:"border-error-border bg-error dark:bg-transparent dark:border-error dark:border-2 dark:font-bold dark:text-error dark:disabled:text-disabled-text dark:disabled:border-disabled-border",ghost:"shadow-none border-transparent text-info-text disabled:border-none disabled:bg-transparent hover:bg-info-surface",info:"border-info text-info shadow-none disabled:bg-transparent",primary:"bg-primary hover:bg-primary-focus",secondary:"bg-secondary hover:bg-secondary-focus"}}});function Vs({children:t,className:e,ref:n,variant:s,...i}){return v.jsx("button",{className:I(za({variant:s}),e),ref:n,...i,children:t})}function $a({children:t,className:e,ref:n,...s}){return v.jsx("div",{className:I("rounded-md border bg-surface border-border shadow-sm ",e),ref:n,...s,children:t})}function Ua({children:t,className:e,ref:n,...s}){return v.jsxs("div",{className:I("flex flex-col p-4 pb-3 ",e),ref:n,...s,children:[t,v.jsx("div",{className:"h-[2px] w-full bg-border-strong mt-2"})]})}function _a({children:t,className:e,ref:n,...s}){return v.jsx("h3",{className:I("font-semibold leading-none tracking-tight text-xl",e),ref:n,...s,children:t})}function Wa({children:t,className:e,ref:n,...s}){return v.jsx("p",{className:I("font-semibold text-text-secondary",e),ref:n,...s,children:t})}function Ka({children:t,className:e,ref:n,...s}){return v.jsx("div",{className:I("p-4",e),ref:n,...s,children:t})}function Ga({children:t,className:e,ref:n,...s}){return v.jsxs("div",{className:I("flex flex-col gap-2 p-4 pt-0 text-text-secondary text-sm",e),ref:n,...s,children:[v.jsx("div",{className:"h-[1px] w-full bg-border"}),t]})}const je=x.createContext({});function Re(t){const e=x.useRef(null);return e.current===null&&(e.current=t()),e.current}const ze=typeof window<"u",Ms=ze?x.useLayoutEffect:x.useEffect,ue=x.createContext(null);function $e(t,e){t.indexOf(e)===-1&&t.push(e)}function Ue(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const lt=(t,e,n)=>n>e?e:n<t?t:n;function _e(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Dt=()=>{},ct=()=>{};process.env.NODE_ENV!=="production"&&(Dt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(_e(e,n))},ct=(t,e,n)=>{if(!t)throw new Error(_e(e,n))});const ut={},Ds=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Es(t){return typeof t=="object"&&t!==null}const Ls=t=>/^0[^.\s]+$/u.test(t);function We(t){let e;return()=>(e===void 0&&(e=t()),e)}const q=t=>t,Ha=(t,e)=>n=>e(t(n)),Kt=(...t)=>t.reduce(Ha),Gt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Ke{constructor(){this.subscriptions=[]}add(e){return $e(this.subscriptions,e),()=>Ue(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Q=t=>t*1e3,Z=t=>t/1e3;function Is(t,e){return e?t*(1e3/e):0}const Ns=new Set;function Ge(t,e,n){t||Ns.has(e)||(console.warn(_e(e,n)),Ns.add(e))}const Fs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Xa=1e-7,Ya=12;function qa(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Fs(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Xa&&++a<Ya);return r}function Ht(t,e,n,s){if(t===e&&n===s)return q;const i=o=>qa(o,0,1,t,n);return o=>o===0||o===1?o:Fs(i(o),e,s)}const Bs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Os=t=>e=>1-t(1-e),js=Ht(.33,1.53,.69,.99),He=Os(js),Rs=Bs(He),zs=t=>(t*=2)<1?.5*He(t):.5*(2-Math.pow(2,-10*(t-1))),Xe=t=>1-Math.sin(Math.acos(t)),$s=Os(Xe),Us=Bs(Xe),Za=Ht(.42,0,1,1),Ja=Ht(0,0,.58,1),_s=Ht(.42,0,.58,1),Qa=t=>Array.isArray(t)&&typeof t[0]!="number",Ws=t=>Array.isArray(t)&&typeof t[0]=="number",Ks={linear:q,easeIn:Za,easeInOut:_s,easeOut:Ja,circIn:Xe,circInOut:Us,circOut:$s,backIn:He,backInOut:Rs,backOut:js,anticipate:zs},tl=t=>typeof t=="string",Ye=t=>{if(Ws(t)){ct(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return Ht(e,n,s,i)}else if(tl(t))return ct(Ks[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Ks[t];return t},de=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function el(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const m=f&&i?n:s;return d&&r.add(u),m.has(u)||m.add(u),u},cancel:u=>{s.delete(u),r.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,c.process(u))}};return c}const nl=40;function Gs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=de.reduce((w,M)=>(w[M]=el(o),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:m}=r,p=()=>{const w=ut.useManualTiming?i.timestamp:performance.now();n=!1,ut.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,nl),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),f.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))},g=()=>{n=!0,s=!0,i.isProcessing||t(p)};return{schedule:de.reduce((w,M)=>{const A=r[M];return w[M]=(V,D=!1,y=!1)=>(n||g(),A.schedule(V,D,y)),w},{}),cancel:w=>{for(let M=0;M<de.length;M++)r[de[M]].cancel(w)},state:i,steps:r}}const{schedule:B,cancel:mt,state:W,steps:qe}=Gs(typeof requestAnimationFrame<"u"?requestAnimationFrame:q,!0);let fe;function sl(){fe=void 0}const X={now:()=>(fe===void 0&&X.set(W.isProcessing||ut.useManualTiming?W.timestamp:performance.now()),fe),set:t=>{fe=t,queueMicrotask(sl)}},Hs=t=>e=>typeof e=="string"&&e.startsWith(t),Xs=Hs("--"),il=Hs("var(--"),Ze=t=>il(t)?rl.test(t.split("/*")[0].trim()):!1,rl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Et={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Xt={...Et,transform:t=>lt(0,1,t)},he={...Et,default:1},Yt=t=>Math.round(t*1e5)/1e5,Je=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ol(t){return t==null}const al=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qe=(t,e)=>n=>!!(typeof n=="string"&&al.test(n)&&n.startsWith(t)||e&&!ol(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ys=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Je);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ll=t=>lt(0,255,t),tn={...Et,transform:t=>Math.round(ll(t))},xt={test:Qe("rgb","red"),parse:Ys("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+tn.transform(t)+", "+tn.transform(e)+", "+tn.transform(n)+", "+Yt(Xt.transform(s))+")"};function cl(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const en={test:Qe("#"),parse:cl,transform:xt.transform},qt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),pt=qt("deg"),st=qt("%"),P=qt("px"),ul=qt("vh"),dl=qt("vw"),qs={...st,parse:t=>st.parse(t)/100,transform:t=>st.transform(t*100)},Lt={test:Qe("hsl","hue"),parse:Ys("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+st.transform(Yt(e))+", "+st.transform(Yt(n))+", "+Yt(Xt.transform(s))+")"},R={test:t=>xt.test(t)||en.test(t)||Lt.test(t),parse:t=>xt.test(t)?xt.parse(t):Lt.test(t)?Lt.parse(t):en.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?xt.transform(t):Lt.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},fl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function hl(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Je))==null?void 0:e.length)||0)+(((n=t.match(fl))==null?void 0:n.length)||0)>0}const Zs="number",Js="color",ml="var",pl="var(",Qs="${}",gl=/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 Zt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(gl,l=>(R.test(l)?(s.color.push(o),i.push(Js),n.push(R.parse(l))):l.startsWith(pl)?(s.var.push(o),i.push(ml),n.push(l)):(s.number.push(o),i.push(Zs),n.push(parseFloat(l))),++o,Qs)).split(Qs);return{values:n,split:a,indexes:s,types:i}}function ti(t){return Zt(t).values}function ei(t){const{split:e,types:n}=Zt(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Zs?o+=Yt(i[r]):a===Js?o+=R.transform(i[r]):o+=i[r]}return o}}const yl=t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t;function bl(t){const e=ti(t);return ei(t)(e.map(yl))}const gt={test:hl,parse:ti,createTransformer:ei,getAnimatableNone:bl};function nn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function vl({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=nn(l,a,t+1/3),o=nn(l,a,t),r=nn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function me(t,e){return n=>n>0?e:t}const O=(t,e,n)=>t+(e-t)*n,sn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},xl=[en,xt,Lt],wl=t=>xl.find(e=>e.test(t));function ni(t){const e=wl(t);if(Dt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Lt&&(n=vl(n)),n}const si=(t,e)=>{const n=ni(t),s=ni(e);if(!n||!s)return me(t,e);const i={...n};return o=>(i.red=sn(n.red,s.red,o),i.green=sn(n.green,s.green,o),i.blue=sn(n.blue,s.blue,o),i.alpha=O(n.alpha,s.alpha,o),xt.transform(i))},rn=new Set(["none","hidden"]);function Tl(t,e){return rn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Sl(t,e){return n=>O(t,e,n)}function on(t){return typeof t=="number"?Sl:typeof t=="string"?Ze(t)?me:R.test(t)?si:Al:Array.isArray(t)?ii:typeof t=="object"?R.test(t)?si:Cl:me}function ii(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>on(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Cl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=on(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function kl(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const Al=(t,e)=>{const n=gt.createTransformer(e),s=Zt(t),i=Zt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?rn.has(t)&&!i.values.length||rn.has(e)&&!s.values.length?Tl(t,e):Kt(ii(kl(s,i),i.values),n):(Dt(!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"),me(t,e))};function ri(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?O(t,e,n):on(t)(t,e)}const Pl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>B.update(e,n),stop:()=>mt(e),now:()=>W.isProcessing?W.timestamp:X.now()}},oi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},pe=2e4;function an(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<pe;)e+=n,s=t.next(e);return e>=pe?1/0:e}function Vl(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(an(s),pe);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:Z(i)}}const Ml=5;function ai(t,e,n){const s=Math.max(e-Ml,0);return Is(n-t(s),e-s)}const j={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},ln=.001;function Dl({duration:t=j.duration,bounce:e=j.bounce,velocity:n=j.velocity,mass:s=j.mass}){let i,o;Dt(t<=Q(j.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=lt(j.minDamping,j.maxDamping,r),t=lt(j.minDuration,j.maxDuration,Z(t)),r<1?(i=c=>{const u=c*r,d=u*t,f=u-n,h=cn(c,r),m=Math.exp(-d);return ln-f/h*m},o=c=>{const d=c*r*t,f=d*n+n,h=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-d),p=cn(Math.pow(c,2),r);return(-i(c)+ln>0?-1:1)*((f-h)*m)/p}):(i=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-ln+u*d},o=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=Ll(i,o,a);if(t=Q(t),isNaN(l))return{stiffness:j.stiffness,damping:j.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const El=12;function Ll(t,e,n){let s=n;for(let i=1;i<El;i++)s=s-t(s)/e(s);return s}function cn(t,e){return t*Math.sqrt(1-e*e)}const Il=["duration","bounce"],Nl=["stiffness","damping","mass"];function li(t,e){return e.some(n=>t[n]!==void 0)}function Fl(t){let e={velocity:j.velocity,stiffness:j.stiffness,damping:j.damping,mass:j.mass,isResolvedFromDuration:!1,...t};if(!li(t,Nl)&&li(t,Il))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*lt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:j.mass,stiffness:i,damping:o}}else{const n=Dl(t);e={...e,...n,mass:j.mass},e.isResolvedFromDuration=!0}return e}function ge(t=j.visualDuration,e=j.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=Fl({...n,velocity:-Z(n.velocity||0)}),m=f||0,p=c/(2*Math.sqrt(l*u)),g=r-o,b=Z(Math.sqrt(l/u)),T=Math.abs(g)<5;s||(s=T?j.restSpeed.granular:j.restSpeed.default),i||(i=T?j.restDelta.granular:j.restDelta.default);let w;if(p<1){const A=cn(b,p);w=V=>{const D=Math.exp(-p*b*V);return r-D*((m+p*b*g)/A*Math.sin(A*V)+g*Math.cos(A*V))}}else if(p===1)w=A=>r-Math.exp(-b*A)*(g+(m+b*g)*A);else{const A=b*Math.sqrt(p*p-1);w=V=>{const D=Math.exp(-p*b*V),y=Math.min(A*V,300);return r-D*((m+p*b*g)*Math.sinh(y)+A*g*Math.cosh(y))/A}}const M={calculatedDuration:h&&d||null,next:A=>{const V=w(A);if(h)a.done=A>=d;else{let D=A===0?m:0;p<1&&(D=A===0?Q(m):ai(w,A,V));const y=Math.abs(D)<=s,N=Math.abs(r-V)<=i;a.done=y&&N}return a.value=a.done?r:V,a},toString:()=>{const A=Math.min(an(M),pe),V=oi(D=>M.next(A*D).value,A,30);return A+"ms "+V},toTransition:()=>{}};return M}ge.applyToOptions=t=>{const e=Vl(t,100,ge);return t.ease=e.ease,t.duration=Q(e.duration),t.type="keyframes",t};function un({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],f={done:!1,value:d},h=y=>a!==void 0&&y<a||l!==void 0&&y>l,m=y=>a===void 0?l:l===void 0||Math.abs(a-y)<Math.abs(l-y)?a:l;let p=n*e;const g=d+p,b=r===void 0?g:r(g);b!==g&&(p=b-d);const T=y=>-p*Math.exp(-y/s),w=y=>b+T(y),M=y=>{const N=T(y),U=w(y);f.done=Math.abs(N)<=c,f.value=f.done?b:U};let A,V;const D=y=>{h(f.value)&&(A=y,V=ge({keyframes:[f.value,m(f.value)],velocity:ai(w,y,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return D(0),{calculatedDuration:null,next:y=>{let N=!1;return!V&&A===void 0&&(N=!0,M(y),D(y)),A!==void 0&&y>=A?V.next(y-A):(!N&&M(y),f)}}}function Bl(t,e,n){const s=[],i=n||ut.mix||ri,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||q:e;a=Kt(l,a)}s.push(a)}return s}function Ol(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ct(o===e.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Bl(e,s,i),l=a.length,c=u=>{if(r&&u<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const f=Gt(t[d],t[d+1],u);return a[d](f)};return n?u=>c(lt(t[0],t[o-1],u)):c}function jl(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Gt(0,e,s);t.push(O(n,1,i))}}function Rl(t){const e=[0];return jl(e,t.length-1),e}function zl(t,e){return t.map(n=>n*e)}function $l(t,e){return t.map(()=>e||_s).splice(0,t.length-1)}function It({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Qa(s)?s.map(Ye):Ye(s),o={done:!1,value:e[0]},r=zl(n&&n.length===e.length?n:Rl(e),t),a=Ol(r,e,{ease:Array.isArray(i)?i:$l(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Ul=t=>t!==null;function dn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Ul),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const _l={decay:un,inertia:un,tween:It,keyframes:It,spring:ge};function ci(t){typeof t.type=="string"&&(t.type=_l[t.type])}class fn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Wl=t=>t/100;class hn extends fn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==X.now()&&this.tick(X.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;ci(e);const{type:n=It,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||It;process.env.NODE_ENV!=="production"&&l!==It&&ct(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==It&&typeof a[0]!="number"&&(this.mixKeyframes=Kt(Wl,ri(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=an(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:m,onUpdate:p,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const b=this.currentTime-c*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?b<0:b>i;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,M=s;if(d){const y=Math.min(this.currentTime,i)/a;let N=Math.floor(y),U=y%1;!U&&y>=1&&(U=1),U===1&&N--,N=Math.min(N,d+1),!!(N%2)&&(f==="reverse"?(U=1-U,h&&(U-=h/a)):f==="mirror"&&(M=r)),w=lt(0,1,U)*a}const A=T?{done:!1,value:u[0]}:M.next(w);o&&(A.value=o(A.value));let{done:V}=A;!T&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return D&&m!==un&&(A.value=dn(u,this.options,g,this.speed)),p&&p(A.value),D&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return Z(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Z(e)}get time(){return Z(this.currentTime)}set time(e){var n;e=Q(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(X.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Z(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=Pl,startTime:n}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),(o=(i=this.options).onPlay)==null||o.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(X.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Kl(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const wt=t=>t*180/Math.PI,mn=t=>{const e=wt(Math.atan2(t[1],t[0]));return pn(e)},Gl={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:mn,rotateZ:mn,skewX:t=>wt(Math.atan(t[1])),skewY:t=>wt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},pn=t=>(t=t%360,t<0&&(t+=360),t),ui=mn,di=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),fi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Hl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:di,scaleY:fi,scale:t=>(di(t)+fi(t))/2,rotateX:t=>pn(wt(Math.atan2(t[6],t[5]))),rotateY:t=>pn(wt(Math.atan2(-t[2],t[0]))),rotateZ:ui,rotate:ui,skewX:t=>wt(Math.atan(t[4])),skewY:t=>wt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function gn(t){return t.includes("scale")?1:0}function yn(t,e){if(!t||t==="none")return gn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Hl,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Gl,i=a}if(!i)return gn(e);const o=s[e],r=i[1].split(",").map(Yl);return typeof o=="function"?o(r):r[o]}const Xl=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return yn(n,e)};function Yl(t){return parseFloat(t.trim())}const Nt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ft=new Set(Nt),hi=t=>t===Et||t===P,ql=new Set(["x","y","z"]),Zl=Nt.filter(t=>!ql.has(t));function Jl(t){const e=[];return Zl.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Tt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>yn(e,"x"),y:(t,{transform:e})=>yn(e,"y")};Tt.translateX=Tt.x,Tt.translateY=Tt.y;const St=new Set;let bn=!1,vn=!1,xn=!1;function mi(){if(vn){const t=Array.from(St).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Jl(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))==null||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}vn=!1,bn=!1,St.forEach(t=>t.complete(xn)),St.clear()}function pi(){St.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(vn=!0)})}function Ql(){xn=!0,pi(),mi(),xn=!1}class wn{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(St.add(this),bn||(bn=!0,B.read(pi),B.resolveKeyframes(mi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0:i.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Kl(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),St.delete(this)}cancel(){this.state==="scheduled"&&(St.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const tc=t=>t.startsWith("--");function ec(t,e,n){tc(e)?t.style.setProperty(e,n):t.style[e]=n}const nc=We(()=>window.ScrollTimeline!==void 0),sc={};function ic(t,e){const n=We(t);return()=>sc[e]??n()}const gi=ic(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Jt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,yi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Jt([0,.65,.55,1]),circOut:Jt([.55,0,1,.45]),backIn:Jt([.31,.01,.66,-.59]),backOut:Jt([.33,1.53,.69,.99])};function bi(t,e){if(t)return typeof t=="function"?gi()?oi(t,e):"ease-out":Ws(t)?Jt(t):Array.isArray(t)?t.map(n=>bi(n,e)||yi.easeOut):yi[t]}function rc(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const d=bi(a,i);Array.isArray(d)&&(u.easing=d);const f={delay:s,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function vi(t){return typeof t=="function"&&"applyToOptions"in t}function oc({type:t,...e}){return vi(t)&&gi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class ac extends fn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,ct(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=oc(e);this.animation=rc(n,s,i,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=dn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):ec(n,s,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return Z(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Z(e)}get time(){return Z(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Q(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&nc()?(this.animation.timeline=e,q):n(this)}}const xi={anticipate:zs,backInOut:Rs,circInOut:Us};function lc(t){return t in xi}function cc(t){typeof t.ease=="string"&&lc(t.ease)&&(t.ease=xi[t.ease])}const wi=10;class uc extends ac{constructor(e){cc(e),ci(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new hn({...r,autoplay:!1}),l=Q(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-wi).value,a.sample(l).value,wi),a.stop()}}const Ti=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(gt.test(t)||t==="0")&&!t.startsWith("url("));function dc(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function fc(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Ti(i,e),a=Ti(o,e);return Dt(r===a,`You are trying to animate ${e} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:dc(t)||(n==="spring"||vi(n))&&s}function Tn(t){t.duration=0,t.type="keyframes"}const hc=new Set(["opacity","clipPath","filter","transform"]),mc=We(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function pc(t){var u;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(((u=e==null?void 0:e.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return mc()&&n&&hc.has(n)&&(n!=="transform"||!c)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const gc=40;class yc extends fn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var m;super(),this.stop=()=>{var p,g;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=X.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:c,element:u,...d},h=(u==null?void 0:u.KeyframeResolver)||wn;this.keyframeResolver=new h(a,(p,g,b)=>this.onKeyframesResolved(p,g,f,!b),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=X.now(),fc(e,o,r,a)||((ut.instantAnimations||!l)&&(u==null||u(dn(e,s,n))),e[0]=e[e.length-1],Tn(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>gc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!c&&pc(f)?new uc({...f,element:f.motionValue.owner.current}):new hn(f);h.finished.then(()=>this.notifyFinished()).catch(q),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Ql()),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()}}const bc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vc(t){const e=bc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const xc=4;function Si(t,e,n=1){ct(n<=xc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=vc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Ds(r)?parseFloat(r):r}return Ze(i)?Si(i,e,n+1):i}function Sn(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const Ci=new Set(["width","height","top","left","right","bottom",...Nt]),wc={test:t=>t==="auto",parse:t=>t},ki=t=>e=>e.test(t),Ai=[Et,P,st,pt,dl,ul,wc],Pi=t=>Ai.find(ki(t));function Tc(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ls(t):!0}const Sc=new Set(["brightness","contrast","saturate","opacity"]);function Cc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Je)||[];if(!s)return t;const i=n.replace(s,"");let o=Sc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const kc=/\b([a-z-]*)\(.*?\)/gu,Cn={...gt,getAnimatableNone:t=>{const e=t.match(kc);return e?e.map(Cc).join(" "):t}},Vi={...Et,transform:Math.round},kn={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,backgroundPositionX:P,backgroundPositionY:P,...{rotate:pt,rotateX:pt,rotateY:pt,rotateZ:pt,scale:he,scaleX:he,scaleY:he,scaleZ:he,skew:pt,skewX:pt,skewY:pt,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:Xt,originX:qs,originY:qs,originZ:P},zIndex:Vi,fillOpacity:Xt,strokeOpacity:Xt,numOctaves:Vi},Ac={...kn,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:Cn,WebkitFilter:Cn},Mi=t=>Ac[t];function Di(t,e){let n=Mi(t);return n!==Cn&&(n=gt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Pc=new Set(["auto","none","0"]);function Vc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Pc.has(o)&&Zt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Di(n,i)}class Mc extends wn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Ze(c))){const u=Si(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Ci.has(s)||e.length!==2)return;const[i,o]=e,r=Pi(i),a=Pi(o);if(r!==a)if(hi(r)&&hi(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else Tt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Tc(e[i]))&&s.push(i);s.length&&Vc(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Tt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=Tt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Dc(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=(n==null?void 0:n[t])??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Ei=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Li(t){return Es(t)&&"offsetHeight"in t}const Ii=30,Ec=t=>!isNaN(parseFloat(t));class Lc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const i=X.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=X.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ec(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Ge(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ke);const s=this.events[e].add(n);return e==="change"?()=>{s(),B.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=X.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ii)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ii);return Is(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Bt(t,e){return new Lc(t,e)}const{schedule:An}=Gs(queueMicrotask,!1),tt={x:!1,y:!1};function Ni(){return tt.x||tt.y}function Ic(t){return t==="x"||t==="y"?tt[t]?null:(tt[t]=!0,()=>{tt[t]=!1}):tt.x||tt.y?null:(tt.x=tt.y=!0,()=>{tt.x=tt.y=!1})}function Fi(t,e){const n=Dc(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Bi(t){return!(t.pointerType==="touch"||Ni())}function Nc(t,e,n={}){const[s,i,o]=Fi(t,n),r=a=>{if(!Bi(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=d=>{Bi(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const Oi=(t,e)=>e?t===e?!0:Oi(t,e.parentElement):!1,Pn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Fc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Bc(t){return Fc.has(t.tagName)||t.tabIndex!==-1}const ye=new WeakSet;function ji(t){return e=>{e.key==="Enter"&&t(e)}}function Vn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Oc=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=ji(()=>{if(ye.has(n))return;Vn(n,"down");const i=ji(()=>{Vn(n,"up")}),o=()=>Vn(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Ri(t){return Pn(t)&&!Ni()}function jc(t,e,n={}){const[s,i,o]=Fi(t,n),r=a=>{const l=a.currentTarget;if(!Ri(a))return;ye.add(l);const c=e(l,a),u=(h,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ye.has(l)&&ye.delete(l),Ri(h)&&typeof c=="function"&&c(h,{success:m})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||Oi(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),Li(a)&&(a.addEventListener("focus",c=>Oc(c,i)),!Bc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function zi(t){return Es(t)&&"ownerSVGElement"in t}function Rc(t){return zi(t)&&t.tagName==="svg"}function zc(t,e){if(t==="first")return 0;{const n=e-1;return t==="last"?n:n/2}}function $i(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,o)=>{const r=typeof n=="number"?n:zc(n,o),a=Math.abs(r-i);let l=t*a;if(s){const c=o*t;l=Ye(s)(l/c)*c}return e+l}}const K=t=>!!(t&&t.getVelocity),$c=[...Ai,R,gt],Uc=t=>$c.find(ki(t)),Mn=x.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Ui(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function _c(...t){return e=>{let n=!1;const s=t.map(i=>{const o=Ui(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<s.length;i++){const o=s[i];typeof o=="function"?o():Ui(t[i],null)}}}}function Wc(...t){return re.useCallback(_c(...t),t)}class Kc extends re.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=Li(s)&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Gc({children:t,isPresent:e,anchorX:n,root:s}){const i=x.useId(),o=x.useRef(null),r=x.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=x.useContext(Mn),l=Wc(o,t==null?void 0:t.ref);return x.useInsertionEffect(()=>{const{width:c,height:u,top:d,left:f,right:h}=r.current;if(e||!o.current||!c||!u)return;const m=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=i;const p=document.createElement("style");a&&(p.nonce=a);const g=s??document.head;return g.appendChild(p),p.sheet&&p.sheet.insertRule(`
56
+ */const Yo=ht("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
57
+ * @license lucide-react v0.562.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const qo=ht("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Zo=(t,e)=>{const n=new Array(t.length+e.length);for(let s=0;s<t.length;s++)n[s]=t[s];for(let s=0;s<e.length;s++)n[t.length+s]=e[s];return n},Jo=(t,e)=>({classGroupId:t,validator:e}),ms=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),ae="-",ps=[],Qo="arbitrary..",ta=t=>{const e=na(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:r=>{if(r.startsWith("[")&&r.endsWith("]"))return ea(r);const a=r.split(ae),l=a[0]===""&&a.length>1?1:0;return gs(a,l,e)},getConflictingClassGroupIds:(r,a)=>{if(a){const l=s[r],c=n[r];return l?c?Zo(c,l):l:c||ps}return n[r]||ps}}},gs=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const i=t[e],o=n.nextPart.get(i);if(o){const c=gs(t,e+1,o);if(c)return c}const r=n.validators;if(r===null)return;const a=e===0?t.join(ae):t.slice(e).join(ae),l=r.length;for(let c=0;c<l;c++){const u=r[c];if(u.validator(a))return u.classGroupId}},ea=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),s=e.slice(0,n);return s?Qo+s:void 0})(),na=t=>{const{theme:e,classGroups:n}=t;return sa(n,e)},sa=(t,e)=>{const n=ms();for(const s in t){const i=t[s];Fe(i,n,s,e)}return n},Fe=(t,e,n,s)=>{const i=t.length;for(let o=0;o<i;o++){const r=t[o];ia(r,e,n,s)}},ia=(t,e,n,s)=>{if(typeof t=="string"){ra(t,e,n);return}if(typeof t=="function"){oa(t,e,n,s);return}aa(t,e,n,s)},ra=(t,e,n)=>{const s=t===""?e:ys(e,t);s.classGroupId=n},oa=(t,e,n,s)=>{if(la(t)){Fe(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(Jo(n,t))},aa=(t,e,n,s)=>{const i=Object.entries(t),o=i.length;for(let r=0;r<o;r++){const[a,l]=i[r];Fe(l,ys(e,a),n,s)}},ys=(t,e)=>{let n=t;const s=e.split(ae),i=s.length;for(let o=0;o<i;o++){const r=s[o];let a=n.nextPart.get(r);a||(a=ms(),n.nextPart.set(r,a)),n=a}return n},la=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,ca=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),s=Object.create(null);const i=(o,r)=>{n[o]=r,e++,e>t&&(e=0,s=n,n=Object.create(null))};return{get(o){let r=n[o];if(r!==void 0)return r;if((r=s[o])!==void 0)return i(o,r),r},set(o,r){o in n?n[o]=r:i(o,r)}}},Be="!",bs=":",ua=[],vs=(t,e,n,s,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:i}),da=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=i=>{const o=[];let r=0,a=0,l=0,c;const u=i.length;for(let g=0;g<u;g++){const y=i[g];if(r===0&&a===0){if(y===bs){o.push(i.slice(l,g)),l=g+1;continue}if(y==="/"){c=g;continue}}y==="["?r++:y==="]"?r--:y==="("?a++:y===")"&&a--}const d=o.length===0?i:i.slice(l);let f=d,h=!1;d.endsWith(Be)?(f=d.slice(0,-1),h=!0):d.startsWith(Be)&&(f=d.slice(1),h=!0);const p=c&&c>l?c-l:void 0;return vs(o,h,f,p)};if(e){const i=e+bs,o=s;s=r=>r.startsWith(i)?o(r.slice(i.length)):vs(ua,!1,r,void 0,!0)}if(n){const i=s;s=o=>n({className:o,parseClassName:i})}return s},fa=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,s)=>{e.set(n,1e6+s)}),n=>{const s=[];let i=[];for(let o=0;o<n.length;o++){const r=n[o],a=r[0]==="[",l=e.has(r);a||l?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(r)):i.push(r)}return i.length>0&&(i.sort(),s.push(...i)),s}},ha=t=>({cache:ca(t.cacheSize),parseClassName:da(t),sortModifiers:fa(t),...ta(t)}),ma=/\s+/,pa=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:o}=e,r=[],a=t.trim().split(ma);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:g}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let y=!!g,x=s(y?p.substring(0,g):p);if(!x){if(!y){l=u+(l.length>0?" "+l:l);continue}if(x=s(p),!x){l=u+(l.length>0?" "+l:l);continue}y=!1}const T=f.length===0?"":f.length===1?f[0]:o(f).join(":"),w=h?T+Be:T,D=w+x;if(r.indexOf(D)>-1)continue;r.push(D);const A=i(x,y);for(let V=0;V<A.length;++V){const L=A[V];r.push(w+L)}l=u+(l.length>0?" "+l:l)}return l},ga=(...t)=>{let e=0,n,s,i="";for(;e<t.length;)(n=t[e++])&&(s=xs(n))&&(i&&(i+=" "),i+=s);return i},xs=t=>{if(typeof t=="string")return t;let e,n="";for(let s=0;s<t.length;s++)t[s]&&(e=xs(t[s]))&&(n&&(n+=" "),n+=e);return n},ya=(t,...e)=>{let n,s,i,o;const r=l=>{const c=e.reduce((u,d)=>d(u),t());return n=ha(c),s=n.cache.get,i=n.cache.set,o=a,a(l)},a=l=>{const c=s(l);if(c)return c;const u=pa(l,n);return i(l,u),u};return o=r,(...l)=>o(ga(...l))},ba=[],z=t=>{const e=n=>n[t]||ba;return e.isThemeGetter=!0,e},ws=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ts=/^\((?:(\w[\w-]*):)?(.+)\)$/i,va=/^\d+\/\d+$/,xa=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wa=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ta=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Sa=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ca=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pt=t=>va.test(t),I=t=>!!t&&!Number.isNaN(Number(t)),mt=t=>!!t&&Number.isInteger(Number(t)),Oe=t=>t.endsWith("%")&&I(t.slice(0,-1)),at=t=>xa.test(t),ka=()=>!0,Aa=t=>wa.test(t)&&!Ta.test(t),Ss=()=>!1,Pa=t=>Sa.test(t),Va=t=>Ca.test(t),Ma=t=>!S(t)&&!C(t),Da=t=>Vt(t,Vs,Ss),S=t=>ws.test(t),vt=t=>Vt(t,Ms,Aa),je=t=>Vt(t,Fa,I),Cs=t=>Vt(t,As,Ss),Ea=t=>Vt(t,Ps,Va),le=t=>Vt(t,Ds,Pa),C=t=>Ts.test(t),Wt=t=>Mt(t,Ms),La=t=>Mt(t,Ba),ks=t=>Mt(t,As),Ia=t=>Mt(t,Vs),Na=t=>Mt(t,Ps),ce=t=>Mt(t,Ds,!0),Vt=(t,e,n)=>{const s=ws.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},Mt=(t,e,n=!1)=>{const s=Ts.exec(t);return s?s[1]?e(s[1]):n:!1},As=t=>t==="position"||t==="percentage",Ps=t=>t==="image"||t==="url",Vs=t=>t==="length"||t==="size"||t==="bg-size",Ms=t=>t==="length",Fa=t=>t==="number",Ba=t=>t==="family-name",Ds=t=>t==="shadow",Oa=ya(()=>{const t=z("color"),e=z("font"),n=z("text"),s=z("font-weight"),i=z("tracking"),o=z("leading"),r=z("breakpoint"),a=z("container"),l=z("spacing"),c=z("radius"),u=z("shadow"),d=z("inset-shadow"),f=z("text-shadow"),h=z("drop-shadow"),p=z("blur"),g=z("perspective"),y=z("aspect"),x=z("ease"),T=z("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...D(),C,S],V=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],b=()=>[C,S,l],N=()=>[Pt,"full","auto",...b()],_=()=>[mt,"none","subgrid",C,S],st=()=>["auto",{span:["full",mt,C,S]},mt,C,S],At=()=>[mt,"auto",C,S],Me=()=>["auto","min","max","fr",C,S],Ut=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],dt=()=>["start","end","center","stretch","center-safe","end-safe"],rt=()=>["auto",...b()],F=()=>[Pt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...b()],k=()=>[t,C,S],ot=()=>[...D(),ks,Cs,{position:[C,S]}],ft=()=>["no-repeat",{repeat:["","x","y","space","round"]}],De=()=>["auto","cover","contain",Ia,Da,{size:[C,S]}],rs=()=>[Oe,Wt,vt],H=()=>["","none","full",c,C,S],q=()=>["",I,Wt,vt],Ee=()=>["solid","dashed","dotted","double"],Fo=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[I,Oe,ks,Cs],Bo=()=>["","none",p,C,S],Le=()=>["none",I,C,S],Ie=()=>["none",I,C,S],os=()=>[I,C,S],Ne=()=>[Pt,"full",...b()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[at],breakpoint:[at],color:[ka],container:[at],"drop-shadow":[at],ease:["in","out","in-out"],font:[Ma],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[at],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[at],shadow:[at],spacing:["px",I],text:[at],"text-shadow":[at],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pt,S,C,y]}],container:["container"],columns:[{columns:[I,S,C,a]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[mt,"auto",C,S]}],basis:[{basis:[Pt,"full","auto",a,...b()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[I,Pt,"auto","initial","none",S]}],grow:[{grow:["",I,C,S]}],shrink:[{shrink:["",I,C,S]}],order:[{order:[mt,"first","last","none",C,S]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:st()}],"col-start":[{"col-start":At()}],"col-end":[{"col-end":At()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:st()}],"row-start":[{"row-start":At()}],"row-end":[{"row-end":At()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Me()}],"auto-rows":[{"auto-rows":Me()}],gap:[{gap:b()}],"gap-x":[{"gap-x":b()}],"gap-y":[{"gap-y":b()}],"justify-content":[{justify:[...Ut(),"normal"]}],"justify-items":[{"justify-items":[...dt(),"normal"]}],"justify-self":[{"justify-self":["auto",...dt()]}],"align-content":[{content:["normal",...Ut()]}],"align-items":[{items:[...dt(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...dt(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ut()}],"place-items":[{"place-items":[...dt(),"baseline"]}],"place-self":[{"place-self":["auto",...dt()]}],p:[{p:b()}],px:[{px:b()}],py:[{py:b()}],ps:[{ps:b()}],pe:[{pe:b()}],pt:[{pt:b()}],pr:[{pr:b()}],pb:[{pb:b()}],pl:[{pl:b()}],m:[{m:rt()}],mx:[{mx:rt()}],my:[{my:rt()}],ms:[{ms:rt()}],me:[{me:rt()}],mt:[{mt:rt()}],mr:[{mr:rt()}],mb:[{mb:rt()}],ml:[{ml:rt()}],"space-x":[{"space-x":b()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":b()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[a,"screen",...F()]}],"min-w":[{"min-w":[a,"screen","none",...F()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[r]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,Wt,vt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,C,je]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Oe,S]}],"font-family":[{font:[La,S,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,C,S]}],"line-clamp":[{"line-clamp":[I,"none",C,je]}],leading:[{leading:[o,...b()]}],"list-image":[{"list-image":["none",C,S]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",C,S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[I,"from-font","auto",C,vt]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[I,"auto",C,S]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",C,S]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",C,S]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ot()}],"bg-repeat":[{bg:ft()}],"bg-size":[{bg:De()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mt,C,S],radial:["",C,S],conic:[mt,C,S]},Na,Ea]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:rs()}],"gradient-via-pos":[{via:rs()}],"gradient-to-pos":[{to:rs()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[I,C,S]}],"outline-w":[{outline:["",I,Wt,vt]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,ce,le]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,ce,le]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[I,vt]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,ce,le]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[I,C,S]}],"mix-blend":[{"mix-blend":[...Fo(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Fo()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[I]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[C,S]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[I]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ot()}],"mask-repeat":[{mask:ft()}],"mask-size":[{mask:De()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",C,S]}],filter:[{filter:["","none",C,S]}],blur:[{blur:Bo()}],brightness:[{brightness:[I,C,S]}],contrast:[{contrast:[I,C,S]}],"drop-shadow":[{"drop-shadow":["","none",h,ce,le]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",I,C,S]}],"hue-rotate":[{"hue-rotate":[I,C,S]}],invert:[{invert:["",I,C,S]}],saturate:[{saturate:[I,C,S]}],sepia:[{sepia:["",I,C,S]}],"backdrop-filter":[{"backdrop-filter":["","none",C,S]}],"backdrop-blur":[{"backdrop-blur":Bo()}],"backdrop-brightness":[{"backdrop-brightness":[I,C,S]}],"backdrop-contrast":[{"backdrop-contrast":[I,C,S]}],"backdrop-grayscale":[{"backdrop-grayscale":["",I,C,S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[I,C,S]}],"backdrop-invert":[{"backdrop-invert":["",I,C,S]}],"backdrop-opacity":[{"backdrop-opacity":[I,C,S]}],"backdrop-saturate":[{"backdrop-saturate":[I,C,S]}],"backdrop-sepia":[{"backdrop-sepia":["",I,C,S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":b()}],"border-spacing-x":[{"border-spacing-x":b()}],"border-spacing-y":[{"border-spacing-y":b()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",C,S]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[I,"initial",C,S]}],ease:[{ease:["linear","initial",x,C,S]}],delay:[{delay:[I,C,S]}],animate:[{animate:["none",T,C,S]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,C,S]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:Le()}],"rotate-x":[{"rotate-x":Le()}],"rotate-y":[{"rotate-y":Le()}],"rotate-z":[{"rotate-z":Le()}],scale:[{scale:Ie()}],"scale-x":[{"scale-x":Ie()}],"scale-y":[{"scale-y":Ie()}],"scale-z":[{"scale-z":Ie()}],"scale-3d":["scale-3d"],skew:[{skew:os()}],"skew-x":[{"skew-x":os()}],"skew-y":[{"skew-y":os()}],transform:[{transform:[C,S,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ne()}],"translate-x":[{"translate-x":Ne()}],"translate-y":[{"translate-y":Ne()}],"translate-z":[{"translate-z":Ne()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",C,S]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",C,S]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[I,Wt,vt,je]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function E(...t){return Oa(ls(t))}const ja={error:Wo,info:Ko,noData:Xo,success:hs,warning:Yo},Ra=oe("relative flex flex-col gap-2 items-start rounded-md border-2 p-4 w-full ",{defaultVariants:{variant:"warning"},variants:{variant:{error:"border-error-border bg-error-surface text-error-text",info:"border-info-border bg-info-surface text-info-text",noData:"border-text-secondary text-text",success:"border-success-border bg-success-surface text-success-text",warning:"border-warning-border bg-warning-surface text-warning-text"}}});function za({children:t,className:e,icon:n,ref:s,showIcon:i=!1,variant:o,...r}){const a=ja[o||"warning"];return m.jsxs("div",{className:E(Ra({variant:o}),e),ref:s,role:o==="error"?"alert":"status",...r,children:[t,(i||n)&&m.jsx("div",{className:"absolute top-2 right-2",children:n||m.jsx(a,{size:22})})]})}function $a({children:t,className:e,...n}){return m.jsx("h5",{className:E("font-bold leading-none tracking-tight",e),...n,children:t})}function _a({children:t,className:e,...n}){return m.jsx("div",{className:E("text-sm opacity-90",e),...n,children:t})}const Ua=oe(["py-2 px-4 rounded border-border cursor-pointer border text-on-primary shadow-md","transition-all duration-150 ease-in-out","hover:scale-[1.10] active:scale-[0.95]","disabled:bg-disabled-surface disabled:border-disabled-border disabled:text-disabled-text disabled:cursor-default disabled:hover:scale-100 disabled:active:scale-100 disabled:cursor-not-allowed"],{defaultVariants:{variant:"primary"},variants:{variant:{animated:E("border-transparent rounded-full text-text-surface",{animatedButton:"_animatedButton_10ydq_7"}.animatedButton),confirm:"bg-success border-success-border",danger:"border-error-border bg-error dark:bg-transparent dark:border-error dark:border-2 dark:font-bold dark:text-error dark:disabled:text-disabled-text dark:disabled:border-disabled-border",ghost:"shadow-none border-transparent text-info-text disabled:border-none disabled:bg-transparent hover:bg-info-surface",info:"border-info text-info shadow-none disabled:bg-transparent",primary:"bg-primary hover:bg-primary-focus",secondary:"bg-secondary hover:bg-secondary-focus"}}});function Es({children:t,className:e,ref:n,variant:s,...i}){return m.jsx("button",{className:E(Ua({variant:s}),e),ref:n,...i,children:t})}function Wa({children:t,className:e,ref:n,...s}){return m.jsx("div",{className:E("rounded-md border bg-surface border-border shadow-sm ",e),ref:n,...s,children:t})}function Ga({children:t,className:e,ref:n,...s}){return m.jsxs("div",{className:E("flex flex-col p-4 pb-3 ",e),ref:n,...s,children:[t,m.jsx("div",{className:"h-[2px] w-full bg-border-strong mt-2"})]})}function Ka({children:t,className:e,ref:n,...s}){return m.jsx("h3",{className:E("font-semibold leading-none tracking-tight text-xl",e),ref:n,...s,children:t})}function Ha({children:t,className:e,ref:n,...s}){return m.jsx("p",{className:E("font-semibold text-text-secondary",e),ref:n,...s,children:t})}function Xa({children:t,className:e,ref:n,...s}){return m.jsx("div",{className:E("p-4",e),ref:n,...s,children:t})}function Ya({children:t,className:e,ref:n,...s}){return m.jsxs("div",{className:E("flex flex-col gap-2 p-4 pt-0 text-text-secondary text-sm",e),ref:n,...s,children:[m.jsx("div",{className:"h-[1px] w-full bg-border"}),t]})}function ue({children:t,className:e,disabled:n,error:s,ref:i,...o}){return m.jsx("label",{className:E("text-sm font-medium leading-none select-none cursor-pointer",n&&"cursor-not-allowed opacity-70",s&&"text-error-text",e),ref:i,...o,children:t})}function qa({boxClassName:t,checked:e,className:n,disabled:s,error:i,icon:o,id:r,label:a,onCheckedChange:l,ref:c,...u}){const d=v.useId(),f=r||d;return m.jsxs("div",{className:E("flex items-center space-x-2 group w-fit",n),children:[m.jsxs("div",{className:"relative flex items-center",children:[m.jsx("input",{checked:e,className:"peer sr-only",disabled:s,id:f,onChange:h=>l(h.target.checked),ref:c,type:"checkbox",...u}),m.jsx("label",{className:E("h-5 w-5 shrink-0 rounded border bg-surface transition-all cursor-pointer","flex items-center justify-center","border-border",!s&&"group-hover:border-primary group-hover:ring-4 group-hover:ring-primary/10","peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-primary-focus peer-focus-visible:outline-none ring-offset-background",e&&"bg-primary border-primary text-on-primary group-hover:ring-primary/20",i&&"border-error-border group-hover:ring-error/10 ",s&&"cursor-not-allowed bg-disabled-surface border-disabled-border opacity-50 group-hover:ring-0",t),htmlFor:f,children:m.jsx("div",{className:E("flex items-center justify-center pointer-events-none text-on-primary",e?"opacity-100":"opacity-0 transition-opacity duration-200"),children:o||m.jsx(hs,{size:14,strokeWidth:3})})})]}),a&&m.jsx(ue,{disabled:s,error:i,htmlFor:f,children:a})]})}const Re=v.createContext({});function ze(t){const e=v.useRef(null);return e.current===null&&(e.current=t()),e.current}const $e=typeof window<"u",Ls=$e?v.useLayoutEffect:v.useEffect,de=v.createContext(null);function _e(t,e){t.indexOf(e)===-1&&t.push(e)}function Ue(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const lt=(t,e,n)=>n>e?e:n<t?t:n;function We(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let Dt=()=>{},ct=()=>{};process.env.NODE_ENV!=="production"&&(Dt=(t,e,n)=>{!t&&typeof console<"u"&&console.warn(We(e,n))},ct=(t,e,n)=>{if(!t)throw new Error(We(e,n))});const ut={},Is=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ns(t){return typeof t=="object"&&t!==null}const Fs=t=>/^0[^.\s]+$/u.test(t);function Ge(t){let e;return()=>(e===void 0&&(e=t()),e)}const Z=t=>t,Za=(t,e)=>n=>e(t(n)),Gt=(...t)=>t.reduce(Za),Kt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Ke{constructor(){this.subscriptions=[]}add(e){return _e(this.subscriptions,e),()=>Ue(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const tt=t=>t*1e3,J=t=>t/1e3;function Bs(t,e){return e?t*(1e3/e):0}const Os=new Set;function He(t,e,n){t||Os.has(e)||(console.warn(We(e,n)),Os.add(e))}const js=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ja=1e-7,Qa=12;function tl(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=js(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Ja&&++a<Qa);return r}function Ht(t,e,n,s){if(t===e&&n===s)return Z;const i=o=>tl(o,0,1,t,n);return o=>o===0||o===1?o:js(i(o),e,s)}const Rs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,zs=t=>e=>1-t(1-e),$s=Ht(.33,1.53,.69,.99),Xe=zs($s),_s=Rs(Xe),Us=t=>(t*=2)<1?.5*Xe(t):.5*(2-Math.pow(2,-10*(t-1))),Ye=t=>1-Math.sin(Math.acos(t)),Ws=zs(Ye),Gs=Rs(Ye),el=Ht(.42,0,1,1),nl=Ht(0,0,.58,1),Ks=Ht(.42,0,.58,1),sl=t=>Array.isArray(t)&&typeof t[0]!="number",Hs=t=>Array.isArray(t)&&typeof t[0]=="number",Xs={linear:Z,easeIn:el,easeInOut:Ks,easeOut:nl,circIn:Ye,circInOut:Gs,circOut:Ws,backIn:Xe,backInOut:_s,backOut:$s,anticipate:Us},il=t=>typeof t=="string",qe=t=>{if(Hs(t)){ct(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,s,i]=t;return Ht(e,n,s,i)}else if(il(t))return ct(Xs[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),Xs[t];return t},fe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function rl(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){r.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&i?n:s;return d&&r.add(u),p.has(u)||p.add(u),u},cancel:u=>{s.delete(u),r.delete(u)},process:u=>{if(a=u,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(l),n.clear(),i=!1,o&&(o=!1,c.process(u))}};return c}const ol=40;function Ys(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=fe.reduce((w,D)=>(w[D]=rl(o),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:p}=r,g=()=>{const w=ut.useManualTiming?i.timestamp:performance.now();n=!1,ut.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,ol),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),f.process(i),h.process(i),p.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(g))},y=()=>{n=!0,s=!0,i.isProcessing||t(g)};return{schedule:fe.reduce((w,D)=>{const A=r[D];return w[D]=(V,L=!1,b=!1)=>(n||y(),A.schedule(V,L,b)),w},{}),cancel:w=>{for(let D=0;D<fe.length;D++)r[fe[D]].cancel(w)},state:i,steps:r}}const{schedule:B,cancel:pt,state:W,steps:Ze}=Ys(typeof requestAnimationFrame<"u"?requestAnimationFrame:Z,!0);let he;function al(){he=void 0}const X={now:()=>(he===void 0&&X.set(W.isProcessing||ut.useManualTiming?W.timestamp:performance.now()),he),set:t=>{he=t,queueMicrotask(al)}},qs=t=>e=>typeof e=="string"&&e.startsWith(t),Zs=qs("--"),ll=qs("var(--"),Je=t=>ll(t)?cl.test(t.split("/*")[0].trim()):!1,cl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Et={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Xt={...Et,transform:t=>lt(0,1,t)},me={...Et,default:1},Yt=t=>Math.round(t*1e5)/1e5,Qe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ul(t){return t==null}const dl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,tn=(t,e)=>n=>!!(typeof n=="string"&&dl.test(n)&&n.startsWith(t)||e&&!ul(n)&&Object.prototype.hasOwnProperty.call(n,e)),Js=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(Qe);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},fl=t=>lt(0,255,t),en={...Et,transform:t=>Math.round(fl(t))},xt={test:tn("rgb","red"),parse:Js("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+en.transform(t)+", "+en.transform(e)+", "+en.transform(n)+", "+Yt(Xt.transform(s))+")"};function hl(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const nn={test:tn("#"),parse:hl,transform:xt.transform},qt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),gt=qt("deg"),it=qt("%"),P=qt("px"),ml=qt("vh"),pl=qt("vw"),Qs={...it,parse:t=>it.parse(t)/100,transform:t=>it.transform(t*100)},Lt={test:tn("hsl","hue"),parse:Js("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+it.transform(Yt(e))+", "+it.transform(Yt(n))+", "+Yt(Xt.transform(s))+")"},R={test:t=>xt.test(t)||nn.test(t)||Lt.test(t),parse:t=>xt.test(t)?xt.parse(t):Lt.test(t)?Lt.parse(t):nn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?xt.transform(t):Lt.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},gl=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yl(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Qe))==null?void 0:e.length)||0)+(((n=t.match(gl))==null?void 0:n.length)||0)>0}const ti="number",ei="color",bl="var",vl="var(",ni="${}",xl=/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 Zt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(xl,l=>(R.test(l)?(s.color.push(o),i.push(ei),n.push(R.parse(l))):l.startsWith(vl)?(s.var.push(o),i.push(bl),n.push(l)):(s.number.push(o),i.push(ti),n.push(parseFloat(l))),++o,ni)).split(ni);return{values:n,split:a,indexes:s,types:i}}function si(t){return Zt(t).values}function ii(t){const{split:e,types:n}=Zt(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===ti?o+=Yt(i[r]):a===ei?o+=R.transform(i[r]):o+=i[r]}return o}}const wl=t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t;function Tl(t){const e=si(t);return ii(t)(e.map(wl))}const yt={test:yl,parse:si,createTransformer:ii,getAnimatableNone:Tl};function sn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Sl({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=sn(l,a,t+1/3),o=sn(l,a,t),r=sn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function pe(t,e){return n=>n>0?e:t}const O=(t,e,n)=>t+(e-t)*n,rn=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Cl=[nn,xt,Lt],kl=t=>Cl.find(e=>e.test(t));function ri(t){const e=kl(t);if(Dt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===Lt&&(n=Sl(n)),n}const oi=(t,e)=>{const n=ri(t),s=ri(e);if(!n||!s)return pe(t,e);const i={...n};return o=>(i.red=rn(n.red,s.red,o),i.green=rn(n.green,s.green,o),i.blue=rn(n.blue,s.blue,o),i.alpha=O(n.alpha,s.alpha,o),xt.transform(i))},on=new Set(["none","hidden"]);function Al(t,e){return on.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Pl(t,e){return n=>O(t,e,n)}function an(t){return typeof t=="number"?Pl:typeof t=="string"?Je(t)?pe:R.test(t)?oi:Dl:Array.isArray(t)?ai:typeof t=="object"?R.test(t)?oi:Vl:pe}function ai(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>an(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Vl(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=an(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Ml(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const Dl=(t,e)=>{const n=yt.createTransformer(e),s=Zt(t),i=Zt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?on.has(t)&&!i.values.length||on.has(e)&&!s.values.length?Al(t,e):Gt(ai(Ml(s,i),i.values),n):(Dt(!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"),pe(t,e))};function li(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?O(t,e,n):an(t)(t,e)}const El=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>B.update(e,n),stop:()=>pt(e),now:()=>W.isProcessing?W.timestamp:X.now()}},ci=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},ge=2e4;function ln(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<ge;)e+=n,s=t.next(e);return e>=ge?1/0:e}function Ll(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(ln(s),ge);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:J(i)}}const Il=5;function ui(t,e,n){const s=Math.max(e-Il,0);return Bs(n-t(s),e-s)}const j={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},cn=.001;function Nl({duration:t=j.duration,bounce:e=j.bounce,velocity:n=j.velocity,mass:s=j.mass}){let i,o;Dt(t<=tt(j.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=lt(j.minDamping,j.maxDamping,r),t=lt(j.minDuration,j.maxDuration,J(t)),r<1?(i=c=>{const u=c*r,d=u*t,f=u-n,h=un(c,r),p=Math.exp(-d);return cn-f/h*p},o=c=>{const d=c*r*t,f=d*n+n,h=Math.pow(r,2)*Math.pow(c,2)*t,p=Math.exp(-d),g=un(Math.pow(c,2),r);return(-i(c)+cn>0?-1:1)*((f-h)*p)/g}):(i=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-cn+u*d},o=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=Bl(i,o,a);if(t=tt(t),isNaN(l))return{stiffness:j.stiffness,damping:j.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const Fl=12;function Bl(t,e,n){let s=n;for(let i=1;i<Fl;i++)s=s-t(s)/e(s);return s}function un(t,e){return t*Math.sqrt(1-e*e)}const Ol=["duration","bounce"],jl=["stiffness","damping","mass"];function di(t,e){return e.some(n=>t[n]!==void 0)}function Rl(t){let e={velocity:j.velocity,stiffness:j.stiffness,damping:j.damping,mass:j.mass,isResolvedFromDuration:!1,...t};if(!di(t,jl)&&di(t,Ol))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*lt(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:j.mass,stiffness:i,damping:o}}else{const n=Nl(t);e={...e,...n,mass:j.mass},e.isResolvedFromDuration=!0}return e}function ye(t=j.visualDuration,e=j.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=Rl({...n,velocity:-J(n.velocity||0)}),p=f||0,g=c/(2*Math.sqrt(l*u)),y=r-o,x=J(Math.sqrt(l/u)),T=Math.abs(y)<5;s||(s=T?j.restSpeed.granular:j.restSpeed.default),i||(i=T?j.restDelta.granular:j.restDelta.default);let w;if(g<1){const A=un(x,g);w=V=>{const L=Math.exp(-g*x*V);return r-L*((p+g*x*y)/A*Math.sin(A*V)+y*Math.cos(A*V))}}else if(g===1)w=A=>r-Math.exp(-x*A)*(y+(p+x*y)*A);else{const A=x*Math.sqrt(g*g-1);w=V=>{const L=Math.exp(-g*x*V),b=Math.min(A*V,300);return r-L*((p+g*x*y)*Math.sinh(b)+A*y*Math.cosh(b))/A}}const D={calculatedDuration:h&&d||null,next:A=>{const V=w(A);if(h)a.done=A>=d;else{let L=A===0?p:0;g<1&&(L=A===0?tt(p):ui(w,A,V));const b=Math.abs(L)<=s,N=Math.abs(r-V)<=i;a.done=b&&N}return a.value=a.done?r:V,a},toString:()=>{const A=Math.min(ln(D),ge),V=ci(L=>D.next(A*L).value,A,30);return A+"ms "+V},toTransition:()=>{}};return D}ye.applyToOptions=t=>{const e=Ll(t,100,ye);return t.ease=e.ease,t.duration=tt(e.duration),t.type="keyframes",t};function dn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],f={done:!1,value:d},h=b=>a!==void 0&&b<a||l!==void 0&&b>l,p=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let g=n*e;const y=d+g,x=r===void 0?y:r(y);x!==y&&(g=x-d);const T=b=>-g*Math.exp(-b/s),w=b=>x+T(b),D=b=>{const N=T(b),_=w(b);f.done=Math.abs(N)<=c,f.value=f.done?x:_};let A,V;const L=b=>{h(f.value)&&(A=b,V=ye({keyframes:[f.value,p(f.value)],velocity:ui(w,b,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return L(0),{calculatedDuration:null,next:b=>{let N=!1;return!V&&A===void 0&&(N=!0,D(b),L(b)),A!==void 0&&b>=A?V.next(b-A):(!N&&D(b),f)}}}function zl(t,e,n){const s=[],i=n||ut.mix||li,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||Z:e;a=Gt(l,a)}s.push(a)}return s}function $l(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ct(o===e.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=zl(e,s,i),l=a.length,c=u=>{if(r&&u<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const f=Kt(t[d],t[d+1],u);return a[d](f)};return n?u=>c(lt(t[0],t[o-1],u)):c}function _l(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Kt(0,e,s);t.push(O(n,1,i))}}function Ul(t){const e=[0];return _l(e,t.length-1),e}function Wl(t,e){return t.map(n=>n*e)}function Gl(t,e){return t.map(()=>e||Ks).splice(0,t.length-1)}function It({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=sl(s)?s.map(qe):qe(s),o={done:!1,value:e[0]},r=Wl(n&&n.length===e.length?n:Ul(e),t),a=$l(r,e,{ease:Array.isArray(i)?i:Gl(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Kl=t=>t!==null;function fn(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Kl),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Hl={decay:dn,inertia:dn,tween:It,keyframes:It,spring:ye};function fi(t){typeof t.type=="string"&&(t.type=Hl[t.type])}class hn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Xl=t=>t/100;class mn extends hn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==X.now()&&this.tick(X.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;fi(e);const{type:n=It,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||It;process.env.NODE_ENV!=="production"&&l!==It&&ct(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==It&&typeof a[0]!="number"&&(this.mixKeyframes=Gt(Xl,li(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=ln(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const x=this.currentTime-c*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,D=s;if(d){const b=Math.min(this.currentTime,i)/a;let N=Math.floor(b),_=b%1;!_&&b>=1&&(_=1),_===1&&N--,N=Math.min(N,d+1),!!(N%2)&&(f==="reverse"?(_=1-_,h&&(_-=h/a)):f==="mirror"&&(D=r)),w=lt(0,1,_)*a}const A=T?{done:!1,value:u[0]}:D.next(w);o&&(A.value=o(A.value));let{done:V}=A;!T&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return L&&p!==dn&&(A.value=fn(u,this.options,y,this.speed)),g&&g(A.value),L&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return J(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+J(e)}get time(){return J(this.currentTime)}set time(e){var n;e=tt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(X.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=J(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=El,startTime:n}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),(o=(i=this.options).onPlay)==null||o.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(X.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Yl(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const wt=t=>t*180/Math.PI,pn=t=>{const e=wt(Math.atan2(t[1],t[0]));return gn(e)},ql={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:pn,rotateZ:pn,skewX:t=>wt(Math.atan(t[1])),skewY:t=>wt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},gn=t=>(t=t%360,t<0&&(t+=360),t),hi=pn,mi=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),pi=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Zl={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:mi,scaleY:pi,scale:t=>(mi(t)+pi(t))/2,rotateX:t=>gn(wt(Math.atan2(t[6],t[5]))),rotateY:t=>gn(wt(Math.atan2(-t[2],t[0]))),rotateZ:hi,rotate:hi,skewX:t=>wt(Math.atan(t[4])),skewY:t=>wt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function yn(t){return t.includes("scale")?1:0}function bn(t,e){if(!t||t==="none")return yn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Zl,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=ql,i=a}if(!i)return yn(e);const o=s[e],r=i[1].split(",").map(Ql);return typeof o=="function"?o(r):r[o]}const Jl=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return bn(n,e)};function Ql(t){return parseFloat(t.trim())}const Nt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ft=new Set(Nt),gi=t=>t===Et||t===P,tc=new Set(["x","y","z"]),ec=Nt.filter(t=>!tc.has(t));function nc(t){const e=[];return ec.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Tt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>bn(e,"x"),y:(t,{transform:e})=>bn(e,"y")};Tt.translateX=Tt.x,Tt.translateY=Tt.y;const St=new Set;let vn=!1,xn=!1,wn=!1;function yi(){if(xn){const t=Array.from(St).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=nc(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))==null||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}xn=!1,vn=!1,St.forEach(t=>t.complete(wn)),St.clear()}function bi(){St.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(xn=!0)})}function sc(){wn=!0,bi(),yi(),wn=!1}class Tn{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(St.add(this),vn||(vn=!0,B.read(bi),B.resolveKeyframes(yi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0:i.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}Yl(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),St.delete(this)}cancel(){this.state==="scheduled"&&(St.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ic=t=>t.startsWith("--");function rc(t,e,n){ic(e)?t.style.setProperty(e,n):t.style[e]=n}const oc=Ge(()=>window.ScrollTimeline!==void 0),ac={};function lc(t,e){const n=Ge(t);return()=>ac[e]??n()}const vi=lc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Jt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,xi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Jt([0,.65,.55,1]),circOut:Jt([.55,0,1,.45]),backIn:Jt([.31,.01,.66,-.59]),backOut:Jt([.33,1.53,.69,.99])};function wi(t,e){if(t)return typeof t=="function"?vi()?ci(t,e):"ease-out":Hs(t)?Jt(t):Array.isArray(t)?t.map(n=>wi(n,e)||xi.easeOut):xi[t]}function cc(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const d=wi(a,i);Array.isArray(d)&&(u.easing=d);const f={delay:s,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function Ti(t){return typeof t=="function"&&"applyToOptions"in t}function uc({type:t,...e}){return Ti(t)&&vi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class dc extends hn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,ct(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=uc(e);this.animation=cc(n,s,i,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=fn(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):rc(n,s,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return J(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+J(e)}get time(){return J(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=tt(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&oc()?(this.animation.timeline=e,Z):n(this)}}const Si={anticipate:Us,backInOut:_s,circInOut:Gs};function fc(t){return t in Si}function hc(t){typeof t.ease=="string"&&fc(t.ease)&&(t.ease=Si[t.ease])}const Ci=10;class mc extends dc{constructor(e){hc(e),fi(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new mn({...r,autoplay:!1}),l=tt(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Ci).value,a.sample(l).value,Ci),a.stop()}}const ki=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(yt.test(t)||t==="0")&&!t.startsWith("url("));function pc(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function gc(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=ki(i,e),a=ki(o,e);return Dt(r===a,`You are trying to animate ${e} from "${i}" to "${o}". "${r?o:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:pc(t)||(n==="spring"||Ti(n))&&s}function Sn(t){t.duration=0,t.type="keyframes"}const yc=new Set(["opacity","clipPath","filter","transform"]),bc=Ge(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function vc(t){var u;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!(((u=e==null?void 0:e.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return bc()&&n&&yc.has(n)&&(n!=="transform"||!c)&&!l&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const xc=40;class wc extends hn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var p;super(),this.stop=()=>{var g,y;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=X.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:c,element:u,...d},h=(u==null?void 0:u.KeyframeResolver)||Tn;this.keyframeResolver=new h(a,(g,y,x)=>this.onKeyframesResolved(g,y,f,!x),l,c,u),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=X.now(),gc(e,o,r,a)||((ut.instantAnimations||!l)&&(u==null||u(fn(e,s,n))),e[0]=e[e.length-1],Sn(s),s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>xc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},h=!c&&vc(f)?new mc({...f,element:f.motionValue.owner.current}):new mn(f);h.finished.then(()=>this.notifyFinished()).catch(Z),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),sc()),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()}}const Tc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Sc(t){const e=Tc.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const Cc=4;function Ai(t,e,n=1){ct(n<=Cc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,i]=Sc(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Is(r)?parseFloat(r):r}return Je(i)?Ai(i,e,n+1):i}function Cn(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const Pi=new Set(["width","height","top","left","right","bottom",...Nt]),kc={test:t=>t==="auto",parse:t=>t},Vi=t=>e=>e.test(t),Mi=[Et,P,it,gt,pl,ml,kc],Di=t=>Mi.find(Vi(t));function Ac(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Fs(t):!0}const Pc=new Set(["brightness","contrast","saturate","opacity"]);function Vc(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Qe)||[];if(!s)return t;const i=n.replace(s,"");let o=Pc.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Mc=/\b([a-z-]*)\(.*?\)/gu,kn={...yt,getAnimatableNone:t=>{const e=t.match(Mc);return e?e.map(Vc).join(" "):t}},Ei={...Et,transform:Math.round},An={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,backgroundPositionX:P,backgroundPositionY:P,...{rotate:gt,rotateX:gt,rotateY:gt,rotateZ:gt,scale:me,scaleX:me,scaleY:me,scaleZ:me,skew:gt,skewX:gt,skewY:gt,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:Xt,originX:Qs,originY:Qs,originZ:P},zIndex:Ei,fillOpacity:Xt,strokeOpacity:Xt,numOctaves:Ei},Dc={...An,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:kn,WebkitFilter:kn},Li=t=>Dc[t];function Ii(t,e){let n=Li(t);return n!==kn&&(n=yt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ec=new Set(["auto","none","0"]);function Lc(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Ec.has(o)&&Zt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Ii(n,i)}class Ic extends Tn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Je(c))){const u=Ai(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Pi.has(s)||e.length!==2)return;const[i,o]=e,r=Di(i),a=Di(o);if(r!==a)if(gi(r)&&gi(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else Tt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Ac(e[i]))&&s.push(i);s.length&&Lc(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Tt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=Tt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function Nc(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=(n==null?void 0:n[t])??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Ni=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Fi(t){return Ns(t)&&"offsetHeight"in t}const Bi=30,Fc=t=>!isNaN(parseFloat(t));class Bc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const i=X.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=X.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Fc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&He(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ke);const s=this.events[e].add(n);return e==="change"?()=>{s(),B.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=X.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Bi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Bi);return Bs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Bt(t,e){return new Bc(t,e)}const{schedule:Pn}=Ys(queueMicrotask,!1),et={x:!1,y:!1};function Oi(){return et.x||et.y}function Oc(t){return t==="x"||t==="y"?et[t]?null:(et[t]=!0,()=>{et[t]=!1}):et.x||et.y?null:(et.x=et.y=!0,()=>{et.x=et.y=!1})}function ji(t,e){const n=Nc(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Ri(t){return!(t.pointerType==="touch"||Oi())}function jc(t,e,n={}){const[s,i,o]=ji(t,n),r=a=>{if(!Ri(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=d=>{Ri(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}const zi=(t,e)=>e?t===e?!0:zi(t,e.parentElement):!1,Vn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Rc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function zc(t){return Rc.has(t.tagName)||t.tabIndex!==-1}const be=new WeakSet;function $i(t){return e=>{e.key==="Enter"&&t(e)}}function Mn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const $c=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=$i(()=>{if(be.has(n))return;Mn(n,"down");const i=$i(()=>{Mn(n,"up")}),o=()=>Mn(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function _i(t){return Vn(t)&&!Oi()}function _c(t,e,n={}){const[s,i,o]=ji(t,n),r=a=>{const l=a.currentTarget;if(!_i(a))return;be.add(l);const c=e(l,a),u=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),be.has(l)&&be.delete(l),_i(h)&&typeof c=="function"&&c(h,{success:p})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||zi(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),Fi(a)&&(a.addEventListener("focus",c=>$c(c,i)),!zc(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Ui(t){return Ns(t)&&"ownerSVGElement"in t}function Uc(t){return Ui(t)&&t.tagName==="svg"}function Wc(t,e){if(t==="first")return 0;{const n=e-1;return t==="last"?n:n/2}}function Wi(t=.1,{startDelay:e=0,from:n=0,ease:s}={}){return(i,o)=>{const r=typeof n=="number"?n:Wc(n,o),a=Math.abs(r-i);let l=t*a;if(s){const c=o*t;l=qe(s)(l/c)*c}return e+l}}const G=t=>!!(t&&t.getVelocity),Gc=[...Mi,R,yt],Kc=t=>Gc.find(Vi(t)),Dn=v.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Gi(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Hc(...t){return e=>{let n=!1;const s=t.map(i=>{const o=Gi(i,e);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<s.length;i++){const o=s[i];typeof o=="function"?o():Gi(t[i],null)}}}}function Xc(...t){return re.useCallback(Hc(...t),t)}class Yc extends re.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=n.offsetParent,i=Fi(s)&&s.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function qc({children:t,isPresent:e,anchorX:n,root:s}){const i=v.useId(),o=v.useRef(null),r=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=v.useContext(Dn),l=Xc(o,t==null?void 0:t.ref);return v.useInsertionEffect(()=>{const{width:c,height:u,top:d,left:f,right:h}=r.current;if(e||!o.current||!c||!u)return;const p=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=i;const g=document.createElement("style");a&&(g.nonce=a);const y=s??document.head;return y.appendChild(g),g.sheet&&g.sheet.insertRule(`
57
62
  [data-motion-pop-id="${i}"] {
58
63
  position: absolute !important;
59
64
  width: ${c}px !important;
60
65
  height: ${u}px !important;
61
- ${m}px !important;
66
+ ${p}px !important;
62
67
  top: ${d}px !important;
63
68
  }
64
- `),()=>{g.contains(p)&&g.removeChild(p)}},[e]),v.jsx(Kc,{isPresent:e,childRef:o,sizeRef:r,children:re.cloneElement(t,{ref:l})})}const Hc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const c=Re(Xc),u=x.useId();let d=!0,f=x.useMemo(()=>(d=!1,{id:u,initial:e,isPresent:n,custom:i,onExitComplete:h=>{c.set(h,!0);for(const m of c.values())if(!m)return;s&&s()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,s]);return o&&d&&(f={...f}),x.useMemo(()=>{c.forEach((h,m)=>c.set(m,!1))},[n]),re.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),r==="popLayout"&&(t=v.jsx(Gc,{isPresent:n,anchorX:a,root:l,children:t})),v.jsx(ue.Provider,{value:f,children:t})};function Xc(){return new Map}function _i(t=!0){const e=x.useContext(ue);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=x.useId();x.useEffect(()=>{if(t)return i(o)},[t]);const r=x.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const be=t=>t.key||"";function Wi(t){const e=[];return x.Children.forEach(t,n=>{x.isValidElement(n)&&e.push(n)}),e}const Ki=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=_i(r),d=x.useMemo(()=>Wi(t),[t]),f=r&&!c?[]:d.map(be),h=x.useRef(!0),m=x.useRef(d),p=Re(()=>new Map),[g,b]=x.useState(d),[T,w]=x.useState(d);Ms(()=>{h.current=!1,m.current=d;for(let V=0;V<T.length;V++){const D=be(T[V]);f.includes(D)?p.delete(D):p.get(D)!==!0&&p.set(D,!1)}},[T,f.length,f.join("-")]);const M=[];if(d!==g){let V=[...d];for(let D=0;D<T.length;D++){const y=T[D],N=be(y);f.includes(N)||(V.splice(D,0,y),M.push(y))}return o==="wait"&&M.length&&(V=M),w(Wi(V)),b(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&T.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.`);const{forceRender:A}=x.useContext(je);return v.jsx(v.Fragment,{children:T.map(V=>{const D=be(V),y=r&&!c?!1:d===T||f.includes(D),N=()=>{if(p.has(D))p.set(D,!0);else return;let U=!0;p.forEach(nt=>{nt||(U=!1)}),U&&(A==null||A(),w(m.current),r&&(u==null||u()),s&&s())};return v.jsx(Hc,{isPresent:y,initial:!h.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:y?void 0:N,anchorX:a,children:V},D)})})},Gi=x.createContext({strict:!1}),Hi={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"]},Ot={};for(const t in Hi)Ot[t]={isEnabled:e=>Hi[t].some(n=>!!e[n])};function Yc(t){for(const e in t)Ot[e]={...Ot[e],...t[e]}}const qc=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ve(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||qc.has(t)}let Xi=t=>!ve(t);function Zc(t){typeof t=="function"&&(Xi=e=>e.startsWith("on")?!ve(e):t(e))}try{Zc(require("@emotion/is-prop-valid").default)}catch{}function Jc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Xi(i)||n===!0&&ve(i)||!e&&!ve(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const xe=x.createContext({});function we(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Qt(t){return typeof t=="string"||Array.isArray(t)}const Dn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],En=["initial",...Dn];function Te(t){return we(t.animate)||En.some(e=>Qt(t[e]))}function Yi(t){return!!(Te(t)||t.variants)}function Qc(t,e){if(Te(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Qt(n)?n:void 0,animate:Qt(s)?s:void 0}}return t.inherit!==!1?e:{}}function tu(t){const{initial:e,animate:n}=Qc(t,x.useContext(xe));return x.useMemo(()=>({initial:e,animate:n}),[qi(e),qi(n)])}function qi(t){return Array.isArray(t)?t.join(" "):t}function Zi(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const te={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=Zi(t,e.target.x),s=Zi(t,e.target.y);return`${n}% ${s}%`}},eu={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=gt.parse(t);if(i.length>5)return s;const o=gt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=O(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}},Ln={borderRadius:{...te,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:te,borderTopRightRadius:te,borderBottomLeftRadius:te,borderBottomRightRadius:te,boxShadow:eu};function Ji(t,{layout:e,layoutId:n}){return Ft.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ln[t]||t==="opacity")}const nu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},su=Nt.length;function iu(t,e,n){let s="",i=!0;for(let o=0;o<su;o++){const r=Nt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Ei(a,kn[r]);if(!l){i=!1;const u=nu[r]||r;s+=`${u}(${c}) `}n&&(e[r]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function In(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const c=e[l];if(Ft.has(l)){r=!0;continue}else if(Xs(l)){i[l]=c;continue}else{const u=Ei(c,kn[l]);l.startsWith("origin")?(a=!0,o[l]=u):s[l]=u}}if(e.transform||(r||n?s.transform=iu(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;s.transformOrigin=`${l} ${c} ${u}`}}const Nn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Qi(t,e,n){for(const s in e)!K(e[s])&&!Ji(s,n)&&(t[s]=e[s])}function ru({transformTemplate:t},e){return x.useMemo(()=>{const n=Nn();return In(n,e,t),Object.assign({},n.vars,n.style)},[e])}function ou(t,e){const n=t.style||{},s={};return Qi(s,n,t),Object.assign(s,ru(t,e)),s}function au(t,e){const n={},s=ou(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const lu={offset:"stroke-dashoffset",array:"stroke-dasharray"},cu={offset:"strokeDashoffset",array:"strokeDasharray"};function uu(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?lu:cu;t[o.offset]=P.transform(-s);const r=P.transform(e),a=P.transform(n);t[o.array]=`${r} ${a}`}function tr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(In(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f}=t;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&uu(d,i,o,r,!1)}const er=()=>({...Nn(),attrs:{}}),nr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function du(t,e,n,s){const i=x.useMemo(()=>{const o=er();return tr(o,e,nr(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Qi(o,t.style,t),i.style={...o,...i.style}}return i}const fu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Fn(t){return typeof t!="string"||t.includes("-")?!1:!!(fu.indexOf(t)>-1||/[A-Z]/u.test(t))}function hu(t,e,n,{latestValues:s},i,o=!1){const a=(Fn(t)?du:au)(e,s,i,t),l=Jc(e,typeof t=="string",o),c=t!==x.Fragment?{...l,...a,ref:n}:{},{children:u}=e,d=x.useMemo(()=>K(u)?u.get():u,[u]);return x.createElement(t,{...c,children:d})}function sr(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Bn(t,e,n,s){if(typeof e=="function"){const[i,o]=sr(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=sr(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Se(t){return K(t)?t.get():t}function mu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:pu(n,s,i,t),renderState:e()}}function pu(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Se(o[f]);let{initial:r,animate:a}=t;const l=Te(t),c=Yi(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;if(d&&typeof d!="boolean"&&!we(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const m=Bn(t,f[h]);if(m){const{transitionEnd:p,transition:g,...b}=m;for(const T in b){let w=b[T];if(Array.isArray(w)){const M=u?w.length-1:0;w=w[M]}w!==null&&(i[T]=w)}for(const T in p)i[T]=p[T]}}}return i}const ir=t=>(e,n)=>{const s=x.useContext(xe),i=x.useContext(ue),o=()=>mu(t,e,s,i);return n?o():Re(o)};function On(t,e,n){var o;const{style:s}=t,i={};for(const r in s)(K(s[r])||e.style&&K(e.style[r])||Ji(r,t)||((o=n==null?void 0:n.getValue(r))==null?void 0:o.liveStyle)!==void 0)&&(i[r]=s[r]);return i}const gu=ir({scrapeMotionValuesFromProps:On,createRenderState:Nn});function rr(t,e,n){const s=On(t,e,n);for(const i in t)if(K(t[i])||K(e[i])){const o=Nt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const yu=ir({scrapeMotionValuesFromProps:rr,createRenderState:er}),bu=Symbol.for("motionComponentSymbol");function jt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function vu(t,e,n){return x.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):jt(n)&&(n.current=s))},[e])}const jn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),or="data-"+jn("framerAppearId"),ar=x.createContext({});function xu(t,e,n,s,i){var p,g;const{visualElement:o}=x.useContext(xe),r=x.useContext(Gi),a=x.useContext(ue),l=x.useContext(Mn).reducedMotion,c=x.useRef(null);s=s||r.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=x.useContext(ar);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&wu(c.current,n,i,d);const f=x.useRef(!1);x.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[or],m=x.useRef(!!h&&!((p=window.MotionHandoffIsComplete)!=null&&p.call(window,h))&&((g=window.MotionHasOptimisedAnimation)==null?void 0:g.call(window,h)));return Ms(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),x.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,h)}),m.current=!1),u.enteringChildren=void 0)}),u}function wu(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:lr(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&jt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:l,layoutRoot:c})}function lr(t){if(t)return t.options.allowProjection!==!1?t.projection:lr(t.parent)}function Rn(t,{forwardMotionProps:e=!1}={},n,s){n&&Yc(n);const i=Fn(t)?yu:gu;function o(a,l){let c;const u={...x.useContext(Mn),...a,layoutId:Tu(a)},{isStatic:d}=u,f=tu(a),h=i(a,d);if(!d&&ze){Su(u,n);const m=Cu(u);c=m.MeasureLayout,f.visualElement=xu(t,h,u,s,m.ProjectionNode)}return v.jsxs(xe.Provider,{value:f,children:[c&&f.visualElement?v.jsx(c,{visualElement:f.visualElement,...u}):null,hu(t,a,vu(h,f.visualElement,l),h,d,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=x.forwardRef(o);return r[bu]=t,r}function Tu({layoutId:t}){const e=x.useContext(je).id;return e&&t!==void 0?e+"-"+t:t}function Su(t,e){const n=x.useContext(Gi).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Dt(!1,s,"lazy-strict-mode"):ct(!1,s,"lazy-strict-mode")}}function Cu(t){const{drag:e,layout:n}=Ot;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function ku(t,e){if(typeof Proxy>"u")return Rn;const n=new Map,s=(o,r)=>Rn(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&Ge(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,Rn(r,void 0,t,e)),n.get(r))})}function cr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Au({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Pu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function zn(t){return t===void 0||t===1}function $n({scale:t,scaleX:e,scaleY:n}){return!zn(t)||!zn(e)||!zn(n)}function Ct(t){return $n(t)||ur(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function ur(t){return dr(t.x)||dr(t.y)}function dr(t){return t&&t!=="0%"}function Ce(t,e,n){const s=t-n,i=e*s;return n+i}function fr(t,e,n,s,i){return i!==void 0&&(t=Ce(t,i,s)),Ce(t,n,s)+e}function Un(t,e=0,n=1,s,i){t.min=fr(t.min,e,n,s,i),t.max=fr(t.max,e,n,s,i)}function hr(t,{x:e,y:n}){Un(t.x,e.translate,e.scale,e.originPoint),Un(t.y,n.translate,n.scale,n.originPoint)}const mr=.999999999999,pr=1.0000000000001;function Vu(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&zt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,hr(t,r)),s&&Ct(o.latestValues)&&zt(t,o.latestValues))}e.x<pr&&e.x>mr&&(e.x=1),e.y<pr&&e.y>mr&&(e.y=1)}function Rt(t,e){t.min=t.min+e,t.max=t.max+e}function gr(t,e,n,s,i=.5){const o=O(t.min,t.max,i);Un(t,e,n,o,s)}function zt(t,e){gr(t.x,e.x,e.scaleX,e.scale,e.originX),gr(t.y,e.y,e.scaleY,e.scale,e.originY)}function yr(t,e){return cr(Pu(t.getBoundingClientRect(),e))}function Mu(t,e,n){const s=yr(t,n),{scroll:i}=e;return i&&(Rt(s.x,i.offset.x),Rt(s.y,i.offset.y)),s}const br=()=>({translate:0,scale:1,origin:0,originPoint:0}),$t=()=>({x:br(),y:br()}),vr=()=>({min:0,max:0}),$=()=>({x:vr(),y:vr()}),_n={current:null},xr={current:!1};function Du(){if(xr.current=!0,!!ze)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_n.current=t.matches;t.addEventListener("change",e),e()}else _n.current=!1}const Eu=new WeakMap;function Lu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(K(i))t.addValue(s,i);else if(K(o))t.addValue(s,Bt(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,Bt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const wr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Iu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=wn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=X.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,B.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Te(n),this.isVariantNode=Yi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&K(h)&&h.set(l[f])}}mount(e){var n;this.current=e,Eu.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,i)=>this.bindToMotionValue(i,s)),xr.current||Du(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:_n.current,process.env.NODE_ENV!=="production"&&Ge(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),mt(this.notifyUpdate),mt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Ft.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&B.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ot){const n=Ot[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<wr.length;s++){const i=wr[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Lu(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Bt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ds(s)||Ls(s))?s=parseFloat(s):!Uc(s)&&gt.test(n)&&(s=Di(e,n)),this.setBaseTarget(e,K(s)?s.get():s)),K(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=Bn(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!K(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ke),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){An.render(this.render)}}class Tr extends Iu{constructor(){super(...arguments),this.KeyframeResolver=Mc}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;K(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Sr(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i==null||i.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function Nu(t){return window.getComputedStyle(t)}class Fu extends Tr{constructor(){super(...arguments),this.type="html",this.renderInstance=Sr}readValueFromInstance(e,n){var s;if(Ft.has(n))return(s=this.projection)!=null&&s.isProjecting?gn(n):Xl(e,n);{const i=Nu(e),o=(Xs(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return yr(e,n)}build(e,n,s){In(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return On(e,n,s)}}const Cr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Bu(t,e,n,s){Sr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Cr.has(i)?i:jn(i),e.attrs[i])}class Ou extends Tr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ft.has(n)){const s=Mi(n);return s&&s.default||0}return n=Cr.has(n)?n:jn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return rr(e,n,s)}build(e,n,s){tr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Bu(e,n,s,i)}mount(e){this.isSVGTag=nr(e.tagName),super.mount(e)}}const ju=(t,e)=>Fn(t)?new Ou(e):new Fu(e,{allowProjection:t!==x.Fragment});function Ut(t,e,n){const s=t.getProps();return Bn(s,e,n!==void 0?n:s.custom,t)}const Wn=t=>Array.isArray(t);function Ru(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Bt(n))}function zu(t){return Wn(t)?t[t.length-1]||0:t}function $u(t,e){const n=Ut(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=zu(o[r]);Ru(t,r,a)}}function Uu(t){return!!(K(t)&&t.add)}function Kn(t,e){const n=t.getValue("willChange");if(Uu(n))return n.add(e);if(!n&&ut.WillChange){const s=new ut.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function kr(t){return t.props[or]}const _u=t=>t!==null;function Wu(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(_u),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Ku={type:"spring",stiffness:500,damping:25,restSpeed:10},Gu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Hu={type:"keyframes",duration:.8},Xu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yu=(t,{keyframes:e})=>e.length>2?Hu:Ft.has(t)?t.startsWith("scale")?Gu(e[1]):Ku:Xu;function qu({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Gn=(t,e,n,s={},i,o)=>r=>{const a=Sn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-Q(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};qu(a)||Object.assign(u,Yu(t,u)),u.duration&&(u.duration=Q(u.duration)),u.repeatDelay&&(u.repeatDelay=Q(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Tn(u),u.delay===0&&(d=!0)),(ut.instantAnimations||ut.skipAnimations)&&(d=!0,Tn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&e.get()!==void 0){const f=Wu(u.keyframes,a);if(f!==void 0){B.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new hn(u):new yc(u)};function Zu({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Ar(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const d=t.getValue(u,t.latestValues[u]??null),f=a[u];if(f===void 0||c&&Zu(c,u))continue;const h={delay:n,...Sn(o||{},u)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!h.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const b=kr(t);if(b){const T=window.MotionHandoffAnimation(b,u,B);T!==null&&(h.startTime=T,p=!0)}}Kn(t,u),d.start(Gn(u,d,f,t.shouldReduceMotion&&Ci.has(u)?{type:!1}:h,t,p));const g=d.animation;g&&l.push(g)}return r&&Promise.all(l).then(()=>{B.update(()=>{r&&$u(t,r)})}),l}function Pr(t,e,n,s=0,i=1){const o=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function Hn(t,e,n={}){var l;const s=Ut(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Ar(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return Ju(t,e,c,u,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function Ju(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Hn(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Pr(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Qu(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Hn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Hn(t,e,n);else{const i=typeof e=="function"?Ut(t,e,n.custom):e;s=Promise.all(Ar(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Vr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const td=En.length;function Mr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Mr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<td;n++){const s=En[n],i=t.props[s];(Qt(i)||i===!1)&&(e[s]=i)}return e}const ed=[...Dn].reverse(),nd=Dn.length;function sd(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Qu(t,n,s)))}function id(t){let e=sd(t),n=Dr(),s=!0;const i=l=>(c,u)=>{var f;const d=Ut(t,u,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:m,...p}=d;c={...c,...p,...m}}return c};function o(l){e=l(t)}function r(l){const{props:c}=t,u=Mr(t.parent)||{},d=[],f=new Set;let h={},m=1/0;for(let g=0;g<nd;g++){const b=ed[g],T=n[b],w=c[b]!==void 0?c[b]:u[b],M=Qt(w),A=b===l?T.isActive:null;A===!1&&(m=g);let V=w===u[b]&&w!==c[b]&&M;if(V&&s&&t.manuallyAnimateOnMount&&(V=!1),T.protectedKeys={...h},!T.isActive&&A===null||!w&&!T.prevProp||we(w)||typeof w=="boolean")continue;const D=rd(T.prevProp,w);let y=D||b===l&&T.isActive&&!V&&M||g>m&&M,N=!1;const U=Array.isArray(w)?w:[w];let nt=U.reduce(i(b),{});A===!1&&(nt={});const{prevResolvedValues:At={}}=T,Ve={...At,...nt},_t=F=>{y=!0,f.has(F)&&(N=!0,f.delete(F)),T.needsAnimating[F]=!0;const k=t.getValue(F);k&&(k.liveStyle=!1)};for(const F in Ve){const k=nt[F],ot=At[F];if(h.hasOwnProperty(F))continue;let ft=!1;Wn(k)&&Wn(ot)?ft=!Vr(k,ot):ft=k!==ot,ft?k!=null?_t(F):f.add(F):k!==void 0&&f.has(F)?_t(F):T.protectedKeys[F]=!0}T.prevProp=w,T.prevResolvedValues=nt,T.isActive&&(h={...h,...nt}),s&&t.blockInitialAnimation&&(y=!1);const dt=V&&D;y&&(!dt||N)&&d.push(...U.map(F=>{const k={type:b};if(typeof F=="string"&&s&&!dt&&t.manuallyAnimateOnMount&&t.parent){const{parent:ot}=t,ft=Ut(ot,F);if(ot.enteringChildren&&ft){const{delayChildren:Me}=ft.transition||{};k.delay=Pr(ot.enteringChildren,t,Me)}}return{animation:F,options:k}}))}if(f.size){const g={};if(typeof c.initial!="boolean"){const b=Ut(t,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(g.transition=b.transition)}f.forEach(b=>{const T=t.getBaseTarget(b),w=t.getValue(b);w&&(w.liveStyle=!0),g[b]=T??null}),d.push({animation:g})}let p=!!d.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=t.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const u=r(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Dr()}}}function rd(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Vr(e,t):!1}function kt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Dr(){return{animate:kt(!0),whileInView:kt(),whileHover:kt(),whileTap:kt(),whileDrag:kt(),whileFocus:kt(),exit:kt()}}class yt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class od extends yt{constructor(e){super(e),e.animationState||(e.animationState=id(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();we(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let ad=0;class ld extends yt{constructor(){super(...arguments),this.id=ad++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const cd={animation:{Feature:od},exit:{Feature:ld}};function ee(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function ne(t){return{point:{x:t.pageX,y:t.pageY}}}const ud=t=>e=>Pn(e)&&t(e,ne(e));function se(t,e,n,s){return ee(t,e,ud(n),s)}const Er=1e-4,dd=1-Er,fd=1+Er,Lr=.01,hd=0-Lr,md=0+Lr;function G(t){return t.max-t.min}function pd(t,e,n){return Math.abs(t-e)<=n}function Ir(t,e,n,s=.5){t.origin=s,t.originPoint=O(e.min,e.max,t.origin),t.scale=G(n)/G(e),t.translate=O(n.min,n.max,t.origin)-t.originPoint,(t.scale>=dd&&t.scale<=fd||isNaN(t.scale))&&(t.scale=1),(t.translate>=hd&&t.translate<=md||isNaN(t.translate))&&(t.translate=0)}function ie(t,e,n,s){Ir(t.x,e.x,n.x,s?s.originX:void 0),Ir(t.y,e.y,n.y,s?s.originY:void 0)}function Nr(t,e,n){t.min=n.min+e.min,t.max=t.min+G(e)}function gd(t,e,n){Nr(t.x,e.x,n.x),Nr(t.y,e.y,n.y)}function Fr(t,e,n){t.min=e.min-n.min,t.max=t.min+G(e)}function ke(t,e,n){Fr(t.x,e.x,n.x),Fr(t.y,e.y,n.y)}function J(t){return[t("x"),t("y")]}const Br=({current:t})=>t?t.ownerDocument.defaultView:null,Or=(t,e)=>Math.abs(t-e);function yd(t,e){const n=Or(t.x,e.x),s=Or(t.y,e.y);return Math.sqrt(n**2+s**2)}class jr{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Yn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=yd(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:p}=f,{timestamp:g}=W;this.history.push({...p,timestamp:g});const{onStart:b,onMove:T}=this.handlers;h||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Xn(h,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:p,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Yn(f.type==="pointercancel"?this.lastMoveEventInfo:Xn(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,b),p&&p(f,b)},!Pn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=ne(e),l=Xn(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=W;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(e,Yn(l,this.history)),this.removeListeners=Kt(se(this.contextWindow,"pointermove",this.handlePointerMove),se(this.contextWindow,"pointerup",this.handlePointerUp),se(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),mt(this.updatePoint)}}function Xn(t,e){return e?{point:e(t.point)}:t}function Rr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Yn({point:t},e){return{point:t,delta:Rr(t,zr(e)),offset:Rr(t,bd(e)),velocity:vd(e,.1)}}function bd(t){return t[0]}function zr(t){return t[t.length-1]}function vd(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=zr(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>Q(e)));)n--;if(!s)return{x:0,y:0};const o=Z(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function xd(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?O(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?O(n,t,s.max):Math.min(t,n)),t}function $r(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function wd(t,{top:e,left:n,bottom:s,right:i}){return{x:$r(t.x,n,i),y:$r(t.y,e,s)}}function Ur(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Td(t,e){return{x:Ur(t.x,e.x),y:Ur(t.y,e.y)}}function Sd(t,e){let n=.5;const s=G(t),i=G(e);return i>s?n=Gt(e.min,e.max-s,t.min):s>i&&(n=Gt(t.min,t.max-i,e.min)),lt(0,1,n)}function Cd(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const qn=.35;function kd(t=qn){return t===!1?t=0:t===!0&&(t=qn),{x:_r(t,"left","right"),y:_r(t,"top","bottom")}}function _r(t,e,n){return{min:Wr(t,e),max:Wr(t,n)}}function Wr(t,e){return typeof t=="number"?t:t[e]||0}const Ad=new WeakMap;class Pd{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ne(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:m,onDragStart:p}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ic(h),!this.openDragLock))return;this.latestPointerEvent=d,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),J(b=>{let T=this.getAxisMotionValue(b).get()||0;if(st.test(T)){const{projection:w}=this.visualElement;if(w&&w.layout){const M=w.layout.layoutBox[b];M&&(T=G(M)*(parseFloat(T)/100))}}this.originPoint[b]=T}),p&&B.postRender(()=>p(d,f)),Kn(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:p,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=f;if(m&&this.currentDirection===null){this.currentDirection=Vd(b),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),g&&g(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>J(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new jr(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:Br(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&B.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Ae(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=xd(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&jt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=wd(s.layoutBox,e):this.constraints=!1,this.elastic=kd(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&J(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Cd(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!jt(e))return!1;const s=e.current;ct(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Mu(s,i.root,this.visualElement.getTransformPagePoint());let r=Td(i.layout.layoutBox,o);if(n){const a=n(Au(r));this.hasMutatedConstraints=!!a,a&&(r=cr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=J(u=>{if(!Ae(u,n,this.currentDirection))return;let d=l&&l[u]||{};r&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Kn(this.visualElement,e),s.start(Gn(e,s,0,n,this.visualElement,!1))}stopAnimation(){J(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){J(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){J(n=>{const{drag:s}=this.getProps();if(!Ae(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-O(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!jt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};J(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Sd({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),J(r=>{if(!Ae(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(O(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;Ad.set(this.visualElement,this);const e=this.visualElement.current,n=se(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();jt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),B.read(s);const r=ee(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(J(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=qn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Ae(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Vd(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Md extends yt{constructor(e){super(e),this.removeGroupControls=q,this.removeListeners=q,this.controls=new Pd(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||q}unmount(){this.removeGroupControls(),this.removeListeners()}}const Kr=t=>(e,n)=>{t&&B.postRender(()=>t(e,n))};class Dd extends yt{constructor(){super(...arguments),this.removePointerDownListener=q}onPointerDown(e){this.session=new jr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Br(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Kr(e),onStart:Kr(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&B.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=se(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Pe={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Zn=!1;class Ed extends x.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Zn&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Pe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Zn=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||B.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),An.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Zn=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Gr(t){const[e,n]=_i(),s=x.useContext(je);return v.jsx(Ed,{...t,layoutGroup:s,switchLayoutGroup:x.useContext(ar),isPresent:e,safeToRemove:n})}function Ld(t,e,n){const s=K(t)?t:Bt(t);return s.start(Gn("",s,e,n)),s.animation}const Id=(t,e)=>t.depth-e.depth;class Nd{constructor(){this.children=[],this.isDirty=!1}add(e){$e(this.children,e),this.isDirty=!0}remove(e){Ue(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Id),this.isDirty=!1,this.children.forEach(e)}}function Fd(t,e){const n=X.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(mt(s),t(o-e))};return B.setup(s,!0),()=>mt(s)}const Hr=["TopLeft","TopRight","BottomLeft","BottomRight"],Bd=Hr.length,Xr=t=>typeof t=="string"?parseFloat(t):t,Yr=t=>typeof t=="number"||P.test(t);function Od(t,e,n,s,i,o){i?(t.opacity=O(0,n.opacity??1,jd(s)),t.opacityExit=O(e.opacity??1,0,Rd(s))):o&&(t.opacity=O(e.opacity??1,n.opacity??1,s));for(let r=0;r<Bd;r++){const a=`border${Hr[r]}Radius`;let l=qr(e,a),c=qr(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Yr(l)===Yr(c)?(t[a]=Math.max(O(Xr(l),Xr(c),s),0),(st.test(c)||st.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=O(e.rotate||0,n.rotate||0,s))}function qr(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const jd=Zr(0,.5,$s),Rd=Zr(.5,.95,q);function Zr(t,e,n){return s=>s<t?0:s>e?1:n(Gt(t,e,s))}function Jr(t,e){t.min=e.min,t.max=e.max}function et(t,e){Jr(t.x,e.x),Jr(t.y,e.y)}function Qr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function to(t,e,n,s,i){return t-=e,t=Ce(t,1/n,s),i!==void 0&&(t=Ce(t,1/i,s)),t}function zd(t,e=0,n=1,s=.5,i,o=t,r=t){if(st.test(e)&&(e=parseFloat(e),e=O(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=O(o.min,o.max,s);t===o&&(a-=e),t.min=to(t.min,e,n,a,i),t.max=to(t.max,e,n,a,i)}function eo(t,e,[n,s,i],o,r){zd(t,e[n],e[s],e[i],e.scale,o,r)}const $d=["x","scaleX","originX"],Ud=["y","scaleY","originY"];function no(t,e,n,s){eo(t.x,e,$d,n?n.x:void 0,s?s.x:void 0),eo(t.y,e,Ud,n?n.y:void 0,s?s.y:void 0)}function so(t){return t.translate===0&&t.scale===1}function io(t){return so(t.x)&&so(t.y)}function ro(t,e){return t.min===e.min&&t.max===e.max}function _d(t,e){return ro(t.x,e.x)&&ro(t.y,e.y)}function oo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ao(t,e){return oo(t.x,e.x)&&oo(t.y,e.y)}function lo(t){return G(t.x)/G(t.y)}function co(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Wd{constructor(){this.members=[]}add(e){$e(this.members,e),e.scheduleRender()}remove(e){if(Ue(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Kd(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0:n.z)||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),d&&(s+=`rotateX(${d}deg) `),f&&(s+=`rotateY(${f}deg) `),h&&(s+=`skewX(${h}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Jn=["","X","Y","Z"],Gd=1e3;let Hd=0;function Qn(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function uo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=kr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",B,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&uo(s)}function fo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Hd++,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,this.nodes.forEach(qd),this.nodes.forEach(tf),this.nodes.forEach(ef),this.nodes.forEach(Zd)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Nd)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Ke),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=zi(r)&&!Rc(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;B.read(()=>{d=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=Fd(f,250),Pe.hasAnimatedSinceResize&&(Pe.hasAnimatedSinceResize=!1,this.nodes.forEach(po)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||af,{onLayoutAnimationStart:p,onLayoutAnimationComplete:g}=c.getProps(),b=!this.targetLayout||!ao(this.targetLayout,h),T=!d&&f;if(this.options.layoutRoot||this.resumeFrom||T||d&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Sn(m,"layout"),onPlay:p,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,T)}else d||po(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),mt(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(nf),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&uo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ho);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(mo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Qd),this.nodes.forEach(Xd),this.nodes.forEach(Yd)):this.nodes.forEach(mo),this.clearAllSnapshots();const a=X.now();W.delta=lt(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,qe.update.process(W),qe.preRender.process(W),qe.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,An.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Jd),this.sharedNodes.forEach(sf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,B.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){B.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!G(this.snapshot.measuredBox.x)&&!G(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=$(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!io(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||Ct(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),lf(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:r}=this.options;if(!r)return $();const a=r.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(cf))){const{scroll:u}=this.root;u&&(Rt(a.x,u.offset.x),Rt(a.y,u.offset.y))}return a}removeElementScroll(r){var l;const a=$();if(et(a,r),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&et(a,r),Rt(a.x,d.offset.x),Rt(a.y,d.offset.y))}return a}applyTransform(r,a=!1){const l=$();et(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&zt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ct(u.latestValues)&&zt(l,u.latestValues)}return Ct(this.latestValues)&&zt(l,this.latestValues),l}removeTransform(r){const a=$();et(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ct(c.latestValues))continue;$n(c.latestValues)&&c.updateSnapshot();const u=$(),d=c.measurePageBox();et(u,d),no(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ct(this.latestValues)&&no(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var h;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=W.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$(),this.targetWithTransforms=$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),gd(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):et(this.target,this.layout.layoutBox),hr(this.target,this.targetDelta)):et(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!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))}getClosestProjectingParent(){if(!(!this.parent||$n(this.parent.latestValues)||ur(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$(),this.relativeTargetOrigin=$(),ke(this.relativeTargetOrigin,a,l),et(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===W.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;et(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Vu(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=$());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Qr(this.prevProjectionDelta.x,this.projectionDelta.x),Qr(this.prevProjectionDelta.y,this.projectionDelta.y)),ie(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!co(this.projectionDelta.x,this.prevProjectionDelta.x)||!co(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=$t(),this.projectionDelta=$t(),this.projectionDeltaWithTransform=$t()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=$t();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=$(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=h!==m,g=this.getStack(),b=!g||g.members.length<=1,T=!!(p&&!b&&this.options.crossfade===!0&&!this.path.some(of));this.animationProgress=0;let w;this.mixTargetDelta=M=>{const A=M/1e3;go(d.x,r.x,A),go(d.y,r.y,A),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ke(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),rf(this.relativeTarget,this.relativeTargetOrigin,f,A),w&&_d(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=$()),et(w,this.relativeTarget)),p&&(this.animationValues=u,Od(u,c,this.latestValues,A,T,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(mt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=B.update(()=>{Pe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Bt(0)),this.currentAnimation=Ld(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),r.onUpdate&&r.onUpdate(u)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Gd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&wo(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||$();const d=G(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=G(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}et(a,l),zt(a,u),ie(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Wd),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var a;const{layoutId:r}=this.options;return r?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:r}=this.options;return r?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Qn("z",r,c,this.animationValues);for(let u=0;u<Jn.length;u++)Qn(`rotate${Jn[u]}`,r,c,this.animationValues),Qn(`skew${Jn[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Se(a==null?void 0:a.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Se(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ct(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=Kd(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in Ln){if(u[m]===void 0)continue;const{correct:p,applyTo:g,isCSSVariable:b}=Ln[m],T=d==="none"?u[m]:p(u[m],c);if(g){const w=g.length;for(let M=0;M<w;M++)r[g[M]]=T}else b?this.options.visualElement.renderState.vars[m]=T:r[m]=T}this.options.layoutId&&(r.pointerEvents=c===this?Se(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ho),this.root.sharedNodes.clear()}}}function Xd(t){t.updateLayout()}function Yd(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=e.source!==t.layout.source;o==="size"?J(d=>{const f=r?e.measuredBox[d]:e.layoutBox[d],h=G(f);f.min=s[d].min,f.max=f.min+h}):wo(o,e.layoutBox,s)&&J(d=>{const f=r?e.measuredBox[d]:e.layoutBox[d],h=G(s[d]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+h)});const a=$t();ie(a,s,e.layoutBox);const l=$t();r?ie(l,t.applyTransform(i,!0),e.measuredBox):ie(l,s,e.layoutBox);const c=!io(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const m=$();ke(m,e.layoutBox,f.layoutBox);const p=$();ke(p,s,h.layoutBox),ao(m,p)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function qd(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Zd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Jd(t){t.clearSnapshot()}function ho(t){t.clearMeasurements()}function mo(t){t.isLayoutDirty=!1}function Qd(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function po(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function tf(t){t.resolveTargetDelta()}function ef(t){t.calcProjection()}function nf(t){t.resetSkewAndRotation()}function sf(t){t.removeLeadSnapshot()}function go(t,e,n){t.translate=O(e.translate,0,n),t.scale=O(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function yo(t,e,n,s){t.min=O(e.min,n.min,s),t.max=O(e.max,n.max,s)}function rf(t,e,n,s){yo(t.x,e.x,n.x,s),yo(t.y,e.y,n.y,s)}function of(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const af={duration:.45,ease:[.4,0,.1,1]},bo=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),vo=bo("applewebkit/")&&!bo("chrome/")?Math.round:q;function xo(t){t.min=vo(t.min),t.max=vo(t.max)}function lf(t){xo(t.x),xo(t.y)}function wo(t,e,n){return t==="position"||t==="preserve-aspect"&&!pd(lo(e),lo(n),.2)}function cf(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const uf=fo({attachResizeListener:(t,e)=>ee(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ts={current:void 0},To=fo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ts.current){const t=new uf({});t.mount(window),t.setOptions({layoutScroll:!0}),ts.current=t}return ts.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),df={pan:{Feature:Dd},drag:{Feature:Md,ProjectionNode:To,MeasureLayout:Gr}};function So(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&B.postRender(()=>o(e,ne(e)))}class ff extends yt{mount(){const{current:e}=this.node;e&&(this.unmount=Nc(e,(n,s)=>(So(this.node,s,"Start"),i=>So(this.node,i,"End"))))}unmount(){}}class hf extends yt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Kt(ee(this.node.current,"focus",()=>this.onFocus()),ee(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Co(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&B.postRender(()=>o(e,ne(e)))}class mf extends yt{mount(){const{current:e}=this.node;e&&(this.unmount=jc(e,(n,s)=>(Co(this.node,s,"Start"),(i,{success:o})=>Co(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const es=new WeakMap,ns=new WeakMap,pf=t=>{const e=es.get(t.target);e&&e(t)},gf=t=>{t.forEach(pf)};function yf({root:t,...e}){const n=t||document;ns.has(n)||ns.set(n,{});const s=ns.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(gf,{root:t,...e})),s[i]}function bf(t,e,n){const s=yf(e);return es.set(t,n),s.observe(t),()=>{es.delete(t),s.unobserve(t)}}const vf={some:0,all:1};class xf extends yt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:vf[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return bf(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(wf(e,n))&&this.startObserver()}unmount(){}}function wf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Tf={...cd,...{inView:{Feature:xf},tap:{Feature:mf},focus:{Feature:hf},hover:{Feature:ff}},...df,...{layout:{ProjectionNode:To,MeasureLayout:Gr}}},it=ku(Tf,ju),ko=x.createContext(null);function Ao(){const t=x.useContext(ko);if(!t)throw new Error("Dialog components (like DialogTrigger, DialogContent) must be used within a <Dialog> provider.");return t}function Po({children:t,defaultOpen:e=!1,onOpenChange:n,open:s}){const[i,o]=x.useState(e),r=s!==void 0,a=r?s:i,l=x.useCallback(c=>{r?n==null||n(c):o(c)},[r,n]);return v.jsx(ko.Provider,{value:{onOpenChange:l,open:a},children:t})}function Sf({children:t,ref:e,variant:n,...s}){const{onOpenChange:i}=Ao();return v.jsx(Vs,{onClick:()=>i(!0),ref:e,...s,variant:n,children:t})}const Cf=oe("absolute flex flex-col bg-surface p-6 z-10 border-2 border-border overflow-hidden",{defaultVariants:{position:"center"},variants:{position:{bottom:"w-full h-3/4 md:h-1/3 rounded-t-lg bottom-0",center:"relative w-[90%] max-h-[95vh] md:w-1/2 md:h-1/3 h-fit rounded-lg",left:"w-[85%] md:w-1/3 h-full rounded-r-lg left-0 px-3",right:"w-[85%] md:w-1/3 h-full rounded-l-lg right-0 px-3",top:"w-full h-3/4 md:h-1/3 rounded-b-lg top-0"}}}),kf={bottom:{animate:{y:0},exit:{y:"100%"},initial:{y:"100%"},transition:{duration:.3,ease:"easeInOut"}},center:{animate:{opacity:1,scale:[0,1.05,1]},exit:{opacity:0,scale:.95},initial:{opacity:0,scale:.95},transition:{duration:.35,ease:"easeOut"}},left:{animate:{x:0},exit:{x:"-100%"},initial:{x:"-100%"},transition:{duration:.3,ease:"easeInOut"}},right:{animate:{x:0},exit:{x:"100%"},initial:{x:"100%"},transition:{duration:.3,ease:"easeInOut"}},top:{animate:{y:0},exit:{y:"-100%"},initial:{y:"-100%"},transition:{duration:.3,ease:"easeInOut"}}};function Vo({children:t,className:e,closeButton:n=!1,position:s,ref:i,...o}){const{onOpenChange:r,open:a}=Ao();x.useEffect(()=>{function c(u){u.key==="Escape"&&r(!1)}return document.body.addEventListener("keydown",c),()=>document.body.removeEventListener("keydown",c)},[r]);const l=kf[s??"center"];return No.createPortal(v.jsx(Ki,{children:a&&v.jsxs(it.div,{animate:{opacity:1},className:"fixed inset-0 z-50 flex items-center justify-center",exit:{opacity:0},initial:{opacity:0},transition:{duration:.2},children:[v.jsx("div",{"aria-label":"Close overlay",className:"fixed inset-0 bg-black/70",onClick:()=>r(!1),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&r(!1)},role:"button",tabIndex:-1}),v.jsxs(it.div,{"aria-modal":"true",className:I(Cf({position:s}),e),onClick:c=>c.stopPropagation(),role:"dialog",...l,ref:i,...o,children:[t,n&&v.jsx("button",{"aria-label":"Close dialog",className:"absolute top-4 right-4 hover:scale-105 hover:text-primary transition-all cursor-pointer",onClick:()=>r(!1),children:v.jsx(Ho,{size:32})})]})]})}),document.body)}function Af({children:t,className:e,ref:n,subtitle:s,title:i,...o}){return v.jsxs("div",{className:I("flex flex-col gap-1 border-b-2 border-text pb-1 mb-3",e),ref:n,...o,children:[i&&v.jsx("h3",{className:"font-bold text-xl",children:i}),s&&v.jsx("p",{className:"text-text-secondary text-lg",children:s}),t]})}function Pf({children:t,className:e,ref:n,text:s,...i}){return v.jsxs("div",{className:I("flex border-y-2 border-text p-2 my-2",e),ref:n,...i,children:[s&&v.jsx("p",{className:"w-full text-text italic text-center",children:s}),t]})}function Vf({children:t,className:e,...n}){return v.jsx("div",{className:I("flex-1 overflow-y-auto min-h-0",e),...n,children:t})}function Mf({children:t,className:e,ref:n,...s}){return v.jsx("div",{className:I("w-full flex flex-row justify-end items-center gap-4 bottom-0",e),ref:n,...s,children:t})}function Df({className:t,disabled:e,errorText:n,icon:s,id:i,ref:o,suffix:r,...a}){const l=x.useId(),u=`${i||l}-error`;return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:I("flex flex-row items-center gap-2 px-2 py-2 rounded-md border transition-all","bg-input-background text-text","focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-1 focus-within:ring-offset-background",e&&"opacity-50 cursor-not-allowed bg-disabled-surface",n&&!e?"border-error focus-within:ring-error":"border-border focus-within:ring-primary-focus",t),children:[s&&v.jsx("div",{className:"text-text flex pr-1 border-r-2 border-text",children:s}),v.jsx("input",{"aria-describedby":n?u:void 0,"aria-invalid":!!n,className:`flex-1 w-full h-full bg-transparent outline-none placeholder:text-text-secondary file:bg-transparent file:border-0 file:text-sm file:font-medium ${e&&"cursor-not-allowed"}`,disabled:e,ref:o,...a}),r&&v.jsx("div",{className:"flex shrink-0 text-text-secondary",children:r})]}),v.jsx(Ki,{mode:"wait",children:n&&v.jsx(it.p,{animate:{height:"auto",opacity:1,y:0},className:"mt-1 text-sm text-error-text font-medium ml-1",exit:{height:0,opacity:0,y:-10},id:u,initial:{height:0,opacity:0,y:-10},role:"alert",children:n})})]})}function Ef({className:t,color:e,dotsCount:n=3,duration:s=.7,gap:i=6,itemStagger:o=.2,jumpHeight:r=15,repeatDuration:a=.5,size:l=10,...c}){const u={animate:{transition:{delayChildren:$i(o)}}},d={animate:{transition:{duration:s,ease:"easeInOut",repeat:1/0,repeatDelay:a},y:[0,-r,0]}};return v.jsx("div",{className:I("flex items-center justify-center",t),...c,"aria-label":"Loading",role:"status",children:v.jsx(it.div,{animate:"animate",className:"flex flex-row w-full h-full",initial:"initial",style:{gap:i},variants:u,children:Array.from({length:n}).map((f,h)=>v.jsx(it.div,{className:"rounded-full border border-border",style:{backgroundColor:e??"var(--primary)",height:l,width:l},variants:d},h))})})}function Lf({className:t,primaryColor:e,primaryDuration:n=1,secondaryColor:s,secondaryDuration:i=.8,size:o=48,...r}){const a=o/2,l=o*.35,c=o*.2;return v.jsxs("div",{className:I("relative flex justify-center items-center",t),...r,style:{height:o,width:o},children:[v.jsx(it.div,{animate:{rotate:360},className:"absolute top-0 left-1/2 rounded-full",style:{backgroundColor:e??"var(--primary)",height:l,transformOrigin:`50% ${a}px`,width:l,x:"-50%"},transition:{duration:n,ease:"linear",repeat:1/0}}),v.jsx(it.div,{animate:{rotate:-360},className:"absolute top-0 left-1/2 rounded-full",style:{backgroundColor:s??"var(--secondary)",height:c,transformOrigin:`50% ${a}px`,width:c,x:"-50%"},transition:{duration:i,ease:"linear",repeat:1/0}})]})}function If({barCount:t=5,barHeight:e,barWidth:n=16,className:s,color:i,duration:o,itemStagger:r=.15,...a}){const l=Math.max(10,e/4),c={animate:{opacity:1,transition:{delayChildren:$i(r)}},initial:{opacity:0}},u={animate:{height:[l,e,l],transition:{duration:o||t*.3,ease:"easeInOut",repeat:1/0}},initial:{height:l}},d=Array.from({length:t},(f,h)=>h);return v.jsx("div",{"aria-label":"Loading",className:I("relative flex items-center justify-center",s),role:"status",...a,children:v.jsx(it.ul,{animate:"animate",className:"flex flex-row gap-4 h-full w-full items-center justify-center",initial:"initial",style:{height:e},variants:c,children:d.map(f=>v.jsx(it.li,{style:{backgroundColor:i??"var(--primary)",borderRadius:n/2,width:n},variants:u},f))})})}function Nf({className:t,duration:e=2,ease:n="easeInOut",primaryColor:s,rotationsCount:i=5,secondaryColor:o,size:r=72,thickness:a,...l}){return e=e<.25?.25:e,v.jsx("div",{className:I("relative flex items-center justify-center",t),...l,"aria-label":"Loading",role:"status",children:v.jsx(it.div,{animate:{rotate:i*360},className:"relative rounded-full flex items-center justify-center overflow-hidden",style:{borderColor:s??"var(--primary)",borderTopColor:o??"var(--secondary)",borderWidth:a||r/6,height:r,width:r},transition:{duration:e,ease:n,repeat:1/0,type:n==="linear"?void 0:"spring"}})})}const Mo=768;function Ff(){return x.useSyncExternalStore(t=>{const e=window.matchMedia(`(max-width: ${Mo-1}px)`);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},()=>window.matchMedia(`(max-width: ${Mo-1}px)`).matches,()=>!1)}const Do=x.createContext(null);function Eo(){const t=x.useContext(Do);if(!t)throw new Error("useSidebar must be used within a <Sidebar> provider.");return t}function Bf({children:t,collapsed:e,defaultCollapsed:n=!1,mobileOpen:s,onCollapsedChange:i,onMobileOpenChange:o}){const r=Ff(),[a,l]=x.useState(n),c=e!==void 0,u=c?e:a,[d,f]=x.useState(!1),h=s!==void 0,m=h?s:d,p=x.useCallback(w=>{c?i==null||i(w):l(w)},[c,i]),g=x.useCallback(w=>{h?o==null||o(w):f(w)},[h,o]),b=x.useCallback(()=>{r?g(!m):p(!u)},[r,m,g,u,p]),T=x.useMemo(()=>({collapsed:u,isMobile:r,mobileOpen:m,setCollapsed:p,setMobileOpen:g,toggleSidebar:b}),[u,m,p,g,b,r]);return v.jsx(Do.Provider,{value:T,children:t})}function Of({children:t,className:e,collapsedWidth:n="3.5rem",dialogProps:s,ref:i,side:o="left",style:r,width:a="16rem",...l}){const{collapsed:c,isMobile:u,mobileOpen:d,setMobileOpen:f}=Eo();return u?v.jsx(Po,{onOpenChange:f,open:d,children:v.jsx(Vo,{closeButton:!1,position:o,...s,className:I("h-full bg-surface text-text border-border border-r",e,s==null?void 0:s.className),children:v.jsx("div",{className:"group/sidebar h-full flex flex-col","data-collapsed":"false",children:t})})}):v.jsx("aside",{className:I("group/sidebar overflow-hidden inset-y-0 z-30 flex flex-col h-screen bg-surface border-border-strong transition-[width] duration-300 ease-in-out",o==="left"?"border-r left-0":"border-l right-0",e),"data-collapsed":c,ref:i,style:{width:c?n:a,...r},...l,children:t})}function jf({children:t,className:e,...n}){return v.jsx("div",{className:I("flex flex-col p-2 shrink-0 border-b-2 border-border",e),...n,children:t})}function Rf({children:t,className:e,ref:n,...s}){return v.jsx("div",{className:I("flex flex-col gap-2 flex-1 p-2",e),ref:n,...s,children:t})}function zf({categoryTitle:t,children:e,className:n,icon:s,...i}){const o="group-data-[collapsed=true]/sidebar:hidden";return v.jsx("div",{className:I("flex flex-row items-center gap-2 rounded-md p-2 transition-all","justify-start",t?"mt-2":"cursor-pointer hover:bg-info-surface",n),...i,children:t?v.jsxs(v.Fragment,{children:[v.jsx("h4",{className:I("font-bold text-lg whitespace-nowrap overflow-hidden",o),children:e}),v.jsx("div",{className:I("hidden group-data-[collapsed=true]/sidebar:block"),children:s??v.jsx(Wo,{strokeWidth:3})})]}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"shrink-0 flex items-center justify-center",children:s}),v.jsx("div",{className:I("whitespace-nowrap overflow-hidden transition-opacity duration-200",o),children:e})]})})}function $f({children:t,className:e,...n}){return v.jsx("div",{className:I("flex flex-col p-2 mt-auto shrink-0 border-t-2 border-border",e),...n,children:t})}function Uf({children:t,className:e,...n}){const{toggleSidebar:s}=Eo();return v.jsx("button",{className:I("p-2 rounded border border-border hover:bg-border transition-colors bg-border-subtle",e),onClick:()=>s(),title:"Toggle sidebar",...n,children:t})}const _f=oe("m-0 leading-normal transition-colors",{defaultVariants:{align:"left",color:"default",italic:!1,size:"base",underline:!1,weight:"normal"},variants:{align:{center:"text-center",justify:"text-justify",left:"text-left",right:"text-right"},color:{default:"text-text",error:"text-error-text",info:"text-info-text",muted:"text-text-secondary dark:text-slate-400",success:"text-success-text",warning:"text-warning-text"},italic:{false:"",true:"italic"},size:{"2xl":"text-2xl md:text-3xl","3xl":"text-3xl md:text-4xl","4xl":"text-4xl md:text-5xl",base:"text-base",lg:"text-lg",sm:"text-sm",xl:"text-xl",xs:"text-xs"},underline:{false:"",true:"underline"},weight:{bold:"font-bold",medium:"font-medium",normal:"font-normal",semibold:"font-semibold"}}});function Wf({align:t,as:e,children:n,className:s,color:i,italic:o,ref:r,size:a,underline:l,weight:c,...u}){const d=e||"p";return v.jsx(d,{className:I(_f({align:t,color:i,italic:o,size:a,underline:l,weight:c}),s),ref:r,...u,children:n})}L.Alert=Oa,L.AlertMessage=Ra,L.AlertTitle=ja,L.Button=Vs,L.Card=$a,L.CardContent=Ka,L.CardDescription=Wa,L.CardFooter=Ga,L.CardHeader=Ua,L.CardTitle=_a,L.Dialog=Po,L.DialogBody=Vf,L.DialogButtons=Mf,L.DialogContent=Vo,L.DialogFooter=Pf,L.DialogHeader=Af,L.DialogTrigger=Sf,L.Dots=Ef,L.Input=Df,L.Orbital=Lf,L.ScreenLoader=If,L.Sidebar=Bf,L.SidebarBody=Rf,L.SidebarContent=Of,L.SidebarFooter=$f,L.SidebarHeader=jf,L.SidebarItem=zf,L.SidebarTrigger=Uf,L.Spinner=Nf,L.Text=Wf,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})}));
69
+ `),()=>{y.contains(g)&&y.removeChild(g)}},[e]),m.jsx(Yc,{isPresent:e,childRef:o,sizeRef:r,children:re.cloneElement(t,{ref:l})})}const Zc=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:o,mode:r,anchorX:a,root:l})=>{const c=ze(Jc),u=v.useId();let d=!0,f=v.useMemo(()=>(d=!1,{id:u,initial:e,isPresent:n,custom:i,onExitComplete:h=>{c.set(h,!0);for(const p of c.values())if(!p)return;s&&s()},register:h=>(c.set(h,!1),()=>c.delete(h))}),[n,c,s]);return o&&d&&(f={...f}),v.useMemo(()=>{c.forEach((h,p)=>c.set(p,!1))},[n]),re.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),r==="popLayout"&&(t=m.jsx(qc,{isPresent:n,anchorX:a,root:l,children:t})),m.jsx(de.Provider,{value:f,children:t})};function Jc(){return new Map}function Ki(t=!0){const e=v.useContext(de);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=v.useId();v.useEffect(()=>{if(t)return i(o)},[t]);const r=v.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const ve=t=>t.key||"";function Hi(t){const e=[];return v.Children.forEach(t,n=>{v.isValidElement(n)&&e.push(n)}),e}const En=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:o="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[c,u]=Ki(r),d=v.useMemo(()=>Hi(t),[t]),f=r&&!c?[]:d.map(ve),h=v.useRef(!0),p=v.useRef(d),g=ze(()=>new Map),[y,x]=v.useState(d),[T,w]=v.useState(d);Ls(()=>{h.current=!1,p.current=d;for(let V=0;V<T.length;V++){const L=ve(T[V]);f.includes(L)?g.delete(L):g.get(L)!==!0&&g.set(L,!1)}},[T,f.length,f.join("-")]);const D=[];if(d!==y){let V=[...d];for(let L=0;L<T.length;L++){const b=T[L],N=ve(b);f.includes(N)||(V.splice(L,0,b),D.push(b))}return o==="wait"&&D.length&&(V=D),w(Hi(V)),x(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&T.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.`);const{forceRender:A}=v.useContext(Re);return m.jsx(m.Fragment,{children:T.map(V=>{const L=ve(V),b=r&&!c?!1:d===T||f.includes(L),N=()=>{if(g.has(L))g.set(L,!0);else return;let _=!0;g.forEach(st=>{st||(_=!1)}),_&&(A==null||A(),w(p.current),r&&(u==null||u()),s&&s())};return m.jsx(Zc,{isPresent:b,initial:!h.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:b?void 0:N,anchorX:a,children:V},L)})})},Xi=v.createContext({strict:!1}),Yi={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"]},Ot={};for(const t in Yi)Ot[t]={isEnabled:e=>Yi[t].some(n=>!!e[n])};function Qc(t){for(const e in t)Ot[e]={...Ot[e],...t[e]}}const tu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function xe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||tu.has(t)}let qi=t=>!xe(t);function eu(t){typeof t=="function"&&(qi=e=>e.startsWith("on")?!xe(e):t(e))}try{eu(require("@emotion/is-prop-valid").default)}catch{}function nu(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(qi(i)||n===!0&&xe(i)||!e&&!xe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const we=v.createContext({});function Te(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Qt(t){return typeof t=="string"||Array.isArray(t)}const Ln=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],In=["initial",...Ln];function Se(t){return Te(t.animate)||In.some(e=>Qt(t[e]))}function Zi(t){return!!(Se(t)||t.variants)}function su(t,e){if(Se(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Qt(n)?n:void 0,animate:Qt(s)?s:void 0}}return t.inherit!==!1?e:{}}function iu(t){const{initial:e,animate:n}=su(t,v.useContext(we));return v.useMemo(()=>({initial:e,animate:n}),[Ji(e),Ji(n)])}function Ji(t){return Array.isArray(t)?t.join(" "):t}function Qi(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const te={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=Qi(t,e.target.x),s=Qi(t,e.target.y);return`${n}% ${s}%`}},ru={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=yt.parse(t);if(i.length>5)return s;const o=yt.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=O(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}},Nn={borderRadius:{...te,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:te,borderTopRightRadius:te,borderBottomLeftRadius:te,borderBottomRightRadius:te,boxShadow:ru};function tr(t,{layout:e,layoutId:n}){return Ft.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Nn[t]||t==="opacity")}const ou={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},au=Nt.length;function lu(t,e,n){let s="",i=!0;for(let o=0;o<au;o++){const r=Nt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Ni(a,An[r]);if(!l){i=!1;const u=ou[r]||r;s+=`${u}(${c}) `}n&&(e[r]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Fn(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const c=e[l];if(Ft.has(l)){r=!0;continue}else if(Zs(l)){i[l]=c;continue}else{const u=Ni(c,An[l]);l.startsWith("origin")?(a=!0,o[l]=u):s[l]=u}}if(e.transform||(r||n?s.transform=lu(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;s.transformOrigin=`${l} ${c} ${u}`}}const Bn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function er(t,e,n){for(const s in e)!G(e[s])&&!tr(s,n)&&(t[s]=e[s])}function cu({transformTemplate:t},e){return v.useMemo(()=>{const n=Bn();return Fn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function uu(t,e){const n=t.style||{},s={};return er(s,n,t),Object.assign(s,cu(t,e)),s}function du(t,e){const n={},s=uu(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const fu={offset:"stroke-dashoffset",array:"stroke-dasharray"},hu={offset:"strokeDashoffset",array:"strokeDasharray"};function mu(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?fu:hu;t[o.offset]=P.transform(-s);const r=P.transform(e),a=P.transform(n);t[o.array]=`${r} ${a}`}function nr(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Fn(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:f}=t;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),i!==void 0&&mu(d,i,o,r,!1)}const sr=()=>({...Bn(),attrs:{}}),ir=t=>typeof t=="string"&&t.toLowerCase()==="svg";function pu(t,e,n,s){const i=v.useMemo(()=>{const o=sr();return nr(o,e,ir(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};er(o,t.style,t),i.style={...o,...i.style}}return i}const gu=["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 On(t){return typeof t!="string"||t.includes("-")?!1:!!(gu.indexOf(t)>-1||/[A-Z]/u.test(t))}function yu(t,e,n,{latestValues:s},i,o=!1){const a=(On(t)?pu:du)(e,s,i,t),l=nu(e,typeof t=="string",o),c=t!==v.Fragment?{...l,...a,ref:n}:{},{children:u}=e,d=v.useMemo(()=>G(u)?u.get():u,[u]);return v.createElement(t,{...c,children:d})}function rr(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function jn(t,e,n,s){if(typeof e=="function"){const[i,o]=rr(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=rr(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Ce(t){return G(t)?t.get():t}function bu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:vu(n,s,i,t),renderState:e()}}function vu(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Ce(o[f]);let{initial:r,animate:a}=t;const l=Se(t),c=Zi(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const d=u?a:r;if(d&&typeof d!="boolean"&&!Te(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const p=jn(t,f[h]);if(p){const{transitionEnd:g,transition:y,...x}=p;for(const T in x){let w=x[T];if(Array.isArray(w)){const D=u?w.length-1:0;w=w[D]}w!==null&&(i[T]=w)}for(const T in g)i[T]=g[T]}}}return i}const or=t=>(e,n)=>{const s=v.useContext(we),i=v.useContext(de),o=()=>bu(t,e,s,i);return n?o():ze(o)};function Rn(t,e,n){var o;const{style:s}=t,i={};for(const r in s)(G(s[r])||e.style&&G(e.style[r])||tr(r,t)||((o=n==null?void 0:n.getValue(r))==null?void 0:o.liveStyle)!==void 0)&&(i[r]=s[r]);return i}const xu=or({scrapeMotionValuesFromProps:Rn,createRenderState:Bn});function ar(t,e,n){const s=Rn(t,e,n);for(const i in t)if(G(t[i])||G(e[i])){const o=Nt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const wu=or({scrapeMotionValuesFromProps:ar,createRenderState:sr}),Tu=Symbol.for("motionComponentSymbol");function jt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Su(t,e,n){return v.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):jt(n)&&(n.current=s))},[e])}const zn=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),lr="data-"+zn("framerAppearId"),cr=v.createContext({});function Cu(t,e,n,s,i){var g,y;const{visualElement:o}=v.useContext(we),r=v.useContext(Xi),a=v.useContext(de),l=v.useContext(Dn).reducedMotion,c=v.useRef(null);s=s||r.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=v.useContext(cr);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&ku(c.current,n,i,d);const f=v.useRef(!1);v.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[lr],p=v.useRef(!!h&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,h))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,h)));return Ls(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),p.current&&u.animationState&&u.animationState.animateChanges())}),v.useEffect(()=>{u&&(!p.current&&u.animationState&&u.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,h)}),p.current=!1),u.enteringChildren=void 0)}),u}function ku(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ur(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&jt(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:l,layoutRoot:c})}function ur(t){if(t)return t.options.allowProjection!==!1?t.projection:ur(t.parent)}function $n(t,{forwardMotionProps:e=!1}={},n,s){n&&Qc(n);const i=On(t)?wu:xu;function o(a,l){let c;const u={...v.useContext(Dn),...a,layoutId:Au(a)},{isStatic:d}=u,f=iu(a),h=i(a,d);if(!d&&$e){Pu(u,n);const p=Vu(u);c=p.MeasureLayout,f.visualElement=Cu(t,h,u,s,p.ProjectionNode)}return m.jsxs(we.Provider,{value:f,children:[c&&f.visualElement?m.jsx(c,{visualElement:f.visualElement,...u}):null,yu(t,a,Su(h,f.visualElement,l),h,d,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const r=v.forwardRef(o);return r[Tu]=t,r}function Au({layoutId:t}){const e=v.useContext(Re).id;return e&&t!==void 0?e+"-"+t:t}function Pu(t,e){const n=v.useContext(Xi).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?Dt(!1,s,"lazy-strict-mode"):ct(!1,s,"lazy-strict-mode")}}function Vu(t){const{drag:e,layout:n}=Ot;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function Mu(t,e){if(typeof Proxy>"u")return $n;const n=new Map,s=(o,r)=>$n(o,r,t,e),i=(o,r)=>(process.env.NODE_ENV!=="production"&&He(!1,"motion() is deprecated. Use motion.create() instead."),s(o,r));return new Proxy(i,{get:(o,r)=>r==="create"?s:(n.has(r)||n.set(r,$n(r,void 0,t,e)),n.get(r))})}function dr({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Du({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Eu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function _n(t){return t===void 0||t===1}function Un({scale:t,scaleX:e,scaleY:n}){return!_n(t)||!_n(e)||!_n(n)}function Ct(t){return Un(t)||fr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function fr(t){return hr(t.x)||hr(t.y)}function hr(t){return t&&t!=="0%"}function ke(t,e,n){const s=t-n,i=e*s;return n+i}function mr(t,e,n,s,i){return i!==void 0&&(t=ke(t,i,s)),ke(t,n,s)+e}function Wn(t,e=0,n=1,s,i){t.min=mr(t.min,e,n,s,i),t.max=mr(t.max,e,n,s,i)}function pr(t,{x:e,y:n}){Wn(t.x,e.translate,e.scale,e.originPoint),Wn(t.y,n.translate,n.scale,n.originPoint)}const gr=.999999999999,yr=1.0000000000001;function Lu(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&zt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,pr(t,r)),s&&Ct(o.latestValues)&&zt(t,o.latestValues))}e.x<yr&&e.x>gr&&(e.x=1),e.y<yr&&e.y>gr&&(e.y=1)}function Rt(t,e){t.min=t.min+e,t.max=t.max+e}function br(t,e,n,s,i=.5){const o=O(t.min,t.max,i);Wn(t,e,n,o,s)}function zt(t,e){br(t.x,e.x,e.scaleX,e.scale,e.originX),br(t.y,e.y,e.scaleY,e.scale,e.originY)}function vr(t,e){return dr(Eu(t.getBoundingClientRect(),e))}function Iu(t,e,n){const s=vr(t,n),{scroll:i}=e;return i&&(Rt(s.x,i.offset.x),Rt(s.y,i.offset.y)),s}const xr=()=>({translate:0,scale:1,origin:0,originPoint:0}),$t=()=>({x:xr(),y:xr()}),wr=()=>({min:0,max:0}),$=()=>({x:wr(),y:wr()}),Gn={current:null},Tr={current:!1};function Nu(){if(Tr.current=!0,!!$e)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Gn.current=t.matches;t.addEventListener("change",e),e()}else Gn.current=!1}const Fu=new WeakMap;function Bu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(G(i))t.addValue(s,i);else if(G(o))t.addValue(s,Bt(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,Bt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Sr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ou{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Tn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=X.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,B.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Se(n),this.isVariantNode=Zi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&G(h)&&h.set(l[f])}}mount(e){var n;this.current=e,Fu.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,i)=>this.bindToMotionValue(i,s)),Tr.current||Nu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Gn.current,process.env.NODE_ENV!=="production"&&He(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),pt(this.notifyUpdate),pt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Ft.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&B.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ot){const n=Ot[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Sr.length;s++){const i=Sr[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Bu(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Bt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Is(s)||Fs(s))?s=parseFloat(s):!Kc(s)&&yt.test(n)&&(s=Ii(e,n)),this.setBaseTarget(e,G(s)?s.get():s)),G(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=jn(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!G(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ke),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Pn.render(this.render)}}class Cr extends Ou{constructor(){super(...arguments),this.KeyframeResolver=Ic}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;G(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function kr(t,{style:e,vars:n},s,i){const o=t.style;let r;for(r in e)o[r]=e[r];i==null||i.applyProjectionStyles(o,s);for(r in n)o.setProperty(r,n[r])}function ju(t){return window.getComputedStyle(t)}class Ru extends Cr{constructor(){super(...arguments),this.type="html",this.renderInstance=kr}readValueFromInstance(e,n){var s;if(Ft.has(n))return(s=this.projection)!=null&&s.isProjecting?yn(n):Jl(e,n);{const i=ju(e),o=(Zs(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return vr(e,n)}build(e,n,s){Fn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Rn(e,n,s)}}const Ar=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function zu(t,e,n,s){kr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ar.has(i)?i:zn(i),e.attrs[i])}class $u extends Cr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ft.has(n)){const s=Li(n);return s&&s.default||0}return n=Ar.has(n)?n:zn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return ar(e,n,s)}build(e,n,s){nr(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){zu(e,n,s,i)}mount(e){this.isSVGTag=ir(e.tagName),super.mount(e)}}const _u=(t,e)=>On(t)?new $u(e):new Ru(e,{allowProjection:t!==v.Fragment});function _t(t,e,n){const s=t.getProps();return jn(s,e,n!==void 0?n:s.custom,t)}const Kn=t=>Array.isArray(t);function Uu(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Bt(n))}function Wu(t){return Kn(t)?t[t.length-1]||0:t}function Gu(t,e){const n=_t(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Wu(o[r]);Uu(t,r,a)}}function Ku(t){return!!(G(t)&&t.add)}function Hn(t,e){const n=t.getValue("willChange");if(Ku(n))return n.add(e);if(!n&&ut.WillChange){const s=new ut.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Pr(t){return t.props[lr]}const Hu=t=>t!==null;function Xu(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Hu),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const Yu={type:"spring",stiffness:500,damping:25,restSpeed:10},qu=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Zu={type:"keyframes",duration:.8},Ju={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Qu=(t,{keyframes:e})=>e.length>2?Zu:Ft.has(t)?t.startsWith("scale")?qu(e[1]):Yu:Ju;function td({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Xn=(t,e,n,s={},i,o)=>r=>{const a=Cn(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-tt(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};td(a)||Object.assign(u,Qu(t,u)),u.duration&&(u.duration=tt(u.duration)),u.repeatDelay&&(u.repeatDelay=tt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Sn(u),u.delay===0&&(d=!0)),(ut.instantAnimations||ut.skipAnimations)&&(d=!0,Sn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!o&&e.get()!==void 0){const f=Xu(u.keyframes,a);if(f!==void 0){B.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new mn(u):new wc(u)};function ed({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Vr(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const d=t.getValue(u,t.latestValues[u]??null),f=a[u];if(f===void 0||c&&ed(c,u))continue;const h={delay:n,...Cn(o||{},u)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===p&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const x=Pr(t);if(x){const T=window.MotionHandoffAnimation(x,u,B);T!==null&&(h.startTime=T,g=!0)}}Hn(t,u),d.start(Xn(u,d,f,t.shouldReduceMotion&&Pi.has(u)?{type:!1}:h,t,g));const y=d.animation;y&&l.push(y)}return r&&Promise.all(l).then(()=>{B.update(()=>{r&&Gu(t,r)})}),l}function Mr(t,e,n,s=0,i=1){const o=Array.from(t).sort((c,u)=>c.sortNodePosition(u)).indexOf(e),r=t.size,a=(r-1)*s;return typeof n=="function"?n(o,r):i===1?o*s:a-o*s}function Yn(t,e,n={}){var l;const s=_t(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Vr(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return nd(t,e,c,u,d,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,r]:[r,o];return c().then(()=>u())}else return Promise.all([o(),r(n.delay)])}function nd(t,e,n=0,s=0,i=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Yn(l,e,{...r,delay:n+(typeof s=="function"?0:s)+Mr(t.variantChildren,l,s,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function sd(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Yn(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Yn(t,e,n);else{const i=typeof e=="function"?_t(t,e,n.custom):e;s=Promise.all(Vr(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function Dr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const id=In.length;function Er(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Er(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<id;n++){const s=In[n],i=t.props[s];(Qt(i)||i===!1)&&(e[s]=i)}return e}const rd=[...Ln].reverse(),od=Ln.length;function ad(t){return e=>Promise.all(e.map(({animation:n,options:s})=>sd(t,n,s)))}function ld(t){let e=ad(t),n=Lr(),s=!0;const i=l=>(c,u)=>{var f;const d=_t(t,u,l==="exit"?(f=t.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:p,...g}=d;c={...c,...g,...p}}return c};function o(l){e=l(t)}function r(l){const{props:c}=t,u=Er(t.parent)||{},d=[],f=new Set;let h={},p=1/0;for(let y=0;y<od;y++){const x=rd[y],T=n[x],w=c[x]!==void 0?c[x]:u[x],D=Qt(w),A=x===l?T.isActive:null;A===!1&&(p=y);let V=w===u[x]&&w!==c[x]&&D;if(V&&s&&t.manuallyAnimateOnMount&&(V=!1),T.protectedKeys={...h},!T.isActive&&A===null||!w&&!T.prevProp||Te(w)||typeof w=="boolean")continue;const L=cd(T.prevProp,w);let b=L||x===l&&T.isActive&&!V&&D||y>p&&D,N=!1;const _=Array.isArray(w)?w:[w];let st=_.reduce(i(x),{});A===!1&&(st={});const{prevResolvedValues:At={}}=T,Me={...At,...st},Ut=F=>{b=!0,f.has(F)&&(N=!0,f.delete(F)),T.needsAnimating[F]=!0;const k=t.getValue(F);k&&(k.liveStyle=!1)};for(const F in Me){const k=st[F],ot=At[F];if(h.hasOwnProperty(F))continue;let ft=!1;Kn(k)&&Kn(ot)?ft=!Dr(k,ot):ft=k!==ot,ft?k!=null?Ut(F):f.add(F):k!==void 0&&f.has(F)?Ut(F):T.protectedKeys[F]=!0}T.prevProp=w,T.prevResolvedValues=st,T.isActive&&(h={...h,...st}),s&&t.blockInitialAnimation&&(b=!1);const dt=V&&L;b&&(!dt||N)&&d.push(..._.map(F=>{const k={type:x};if(typeof F=="string"&&s&&!dt&&t.manuallyAnimateOnMount&&t.parent){const{parent:ot}=t,ft=_t(ot,F);if(ot.enteringChildren&&ft){const{delayChildren:De}=ft.transition||{};k.delay=Mr(ot.enteringChildren,t,De)}}return{animation:F,options:k}}))}if(f.size){const y={};if(typeof c.initial!="boolean"){const x=_t(t,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(y.transition=x.transition)}f.forEach(x=>{const T=t.getBaseTarget(x),w=t.getValue(x);w&&(w.liveStyle=!0),y[x]=T??null}),d.push({animation:y})}let g=!!d.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,g?e(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=t.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const u=r(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Lr()}}}function cd(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Dr(e,t):!1}function kt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lr(){return{animate:kt(!0),whileInView:kt(),whileHover:kt(),whileTap:kt(),whileDrag:kt(),whileFocus:kt(),exit:kt()}}class bt{constructor(e){this.isMounted=!1,this.node=e}update(){}}class ud extends bt{constructor(e){super(e),e.animationState||(e.animationState=ld(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Te(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let dd=0;class fd extends bt{constructor(){super(...arguments),this.id=dd++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const hd={animation:{Feature:ud},exit:{Feature:fd}};function ee(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function ne(t){return{point:{x:t.pageX,y:t.pageY}}}const md=t=>e=>Vn(e)&&t(e,ne(e));function se(t,e,n,s){return ee(t,e,md(n),s)}const Ir=1e-4,pd=1-Ir,gd=1+Ir,Nr=.01,yd=0-Nr,bd=0+Nr;function K(t){return t.max-t.min}function vd(t,e,n){return Math.abs(t-e)<=n}function Fr(t,e,n,s=.5){t.origin=s,t.originPoint=O(e.min,e.max,t.origin),t.scale=K(n)/K(e),t.translate=O(n.min,n.max,t.origin)-t.originPoint,(t.scale>=pd&&t.scale<=gd||isNaN(t.scale))&&(t.scale=1),(t.translate>=yd&&t.translate<=bd||isNaN(t.translate))&&(t.translate=0)}function ie(t,e,n,s){Fr(t.x,e.x,n.x,s?s.originX:void 0),Fr(t.y,e.y,n.y,s?s.originY:void 0)}function Br(t,e,n){t.min=n.min+e.min,t.max=t.min+K(e)}function xd(t,e,n){Br(t.x,e.x,n.x),Br(t.y,e.y,n.y)}function Or(t,e,n){t.min=e.min-n.min,t.max=t.min+K(e)}function Ae(t,e,n){Or(t.x,e.x,n.x),Or(t.y,e.y,n.y)}function Q(t){return[t("x"),t("y")]}const jr=({current:t})=>t?t.ownerDocument.defaultView:null,Rr=(t,e)=>Math.abs(t-e);function wd(t,e){const n=Rr(t.x,e.x),s=Rr(t.y,e.y);return Math.sqrt(n**2+s**2)}class zr{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Zn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=wd(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!p)return;const{point:g}=f,{timestamp:y}=W;this.history.push({...g,timestamp:y});const{onStart:x,onMove:T}=this.handlers;h||(x&&x(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=qn(h,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Zn(f.type==="pointercancel"?this.lastMoveEventInfo:qn(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,x),g&&g(f,x)},!Vn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=r,this.contextWindow=i||window;const a=ne(e),l=qn(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=W;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(e,Zn(l,this.history)),this.removeListeners=Gt(se(this.contextWindow,"pointermove",this.handlePointerMove),se(this.contextWindow,"pointerup",this.handlePointerUp),se(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),pt(this.updatePoint)}}function qn(t,e){return e?{point:e(t.point)}:t}function $r(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Zn({point:t},e){return{point:t,delta:$r(t,_r(e)),offset:$r(t,Td(e)),velocity:Sd(e,.1)}}function Td(t){return t[0]}function _r(t){return t[t.length-1]}function Sd(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=_r(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>tt(e)));)n--;if(!s)return{x:0,y:0};const o=J(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Cd(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?O(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?O(n,t,s.max):Math.min(t,n)),t}function Ur(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function kd(t,{top:e,left:n,bottom:s,right:i}){return{x:Ur(t.x,n,i),y:Ur(t.y,e,s)}}function Wr(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Ad(t,e){return{x:Wr(t.x,e.x),y:Wr(t.y,e.y)}}function Pd(t,e){let n=.5;const s=K(t),i=K(e);return i>s?n=Kt(e.min,e.max-s,t.min):s>i&&(n=Kt(t.min,t.max-i,e.min)),lt(0,1,n)}function Vd(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Jn=.35;function Md(t=Jn){return t===!1?t=0:t===!0&&(t=Jn),{x:Gr(t,"left","right"),y:Gr(t,"top","bottom")}}function Gr(t,e,n){return{min:Kr(t,e),max:Kr(t,n)}}function Kr(t,e){return typeof t=="number"?t:t[e]||0}const Dd=new WeakMap;class Ed{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ne(d).point)},r=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Oc(h),!this.openDragLock))return;this.latestPointerEvent=d,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 T=this.getAxisMotionValue(x).get()||0;if(it.test(T)){const{projection:w}=this.visualElement;if(w&&w.layout){const D=w.layout.layoutBox[x];D&&(T=K(D)*(parseFloat(T)/100))}}this.originPoint[x]=T}),g&&B.postRender(()=>g(d,f)),Hn(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:x}=f;if(p&&this.currentDirection===null){this.currentDirection=Ld(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),y&&y(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>Q(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new zr(e,{onSessionStart:o,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:jr(this.visualElement)})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!s)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&B.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Pe(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Cd(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&jt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=kd(s.layoutBox,e):this.constraints=!1,this.elastic=Md(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Q(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Vd(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!jt(e))return!1;const s=e.current;ct(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Iu(s,i.root,this.visualElement.getTransformPagePoint());let r=Ad(i.layout.layoutBox,o);if(n){const a=n(Du(r));this.hasMutatedConstraints=!!a,a&&(r=dr(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Q(u=>{if(!Pe(u,n,this.currentDirection))return;let d=l&&l[u]||{};r&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,p={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Hn(this.visualElement,e),s.start(Xn(e,s,0,n,this.visualElement,!1))}stopAnimation(){Q(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Q(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){Q(n=>{const{drag:s}=this.getProps();if(!Pe(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-O(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!jt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Q(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Pd({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Q(r=>{if(!Pe(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(O(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;Dd.set(this.visualElement,this);const e=this.visualElement.current,n=se(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();jt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),B.read(s);const r=ee(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Q(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Jn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Pe(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ld(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Id extends bt{constructor(e){super(e),this.removeGroupControls=Z,this.removeListeners=Z,this.controls=new Ed(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Z}unmount(){this.removeGroupControls(),this.removeListeners()}}const Hr=t=>(e,n)=>{t&&B.postRender(()=>t(e,n))};class Nd extends bt{constructor(){super(...arguments),this.removePointerDownListener=Z}onPointerDown(e){this.session=new zr(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jr(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Hr(e),onStart:Hr(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&B.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=se(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ve={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Qn=!1;class Fd extends v.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),Qn&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ve.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,Qn=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||B.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Pn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Qn=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Xr(t){const[e,n]=Ki(),s=v.useContext(Re);return m.jsx(Fd,{...t,layoutGroup:s,switchLayoutGroup:v.useContext(cr),isPresent:e,safeToRemove:n})}function Bd(t,e,n){const s=G(t)?t:Bt(t);return s.start(Xn("",s,e,n)),s.animation}const Od=(t,e)=>t.depth-e.depth;class jd{constructor(){this.children=[],this.isDirty=!1}add(e){_e(this.children,e),this.isDirty=!0}remove(e){Ue(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Od),this.isDirty=!1,this.children.forEach(e)}}function Rd(t,e){const n=X.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(pt(s),t(o-e))};return B.setup(s,!0),()=>pt(s)}const Yr=["TopLeft","TopRight","BottomLeft","BottomRight"],zd=Yr.length,qr=t=>typeof t=="string"?parseFloat(t):t,Zr=t=>typeof t=="number"||P.test(t);function $d(t,e,n,s,i,o){i?(t.opacity=O(0,n.opacity??1,_d(s)),t.opacityExit=O(e.opacity??1,0,Ud(s))):o&&(t.opacity=O(e.opacity??1,n.opacity??1,s));for(let r=0;r<zd;r++){const a=`border${Yr[r]}Radius`;let l=Jr(e,a),c=Jr(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Zr(l)===Zr(c)?(t[a]=Math.max(O(qr(l),qr(c),s),0),(it.test(c)||it.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=O(e.rotate||0,n.rotate||0,s))}function Jr(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const _d=Qr(0,.5,Ws),Ud=Qr(.5,.95,Z);function Qr(t,e,n){return s=>s<t?0:s>e?1:n(Kt(t,e,s))}function to(t,e){t.min=e.min,t.max=e.max}function nt(t,e){to(t.x,e.x),to(t.y,e.y)}function eo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function no(t,e,n,s,i){return t-=e,t=ke(t,1/n,s),i!==void 0&&(t=ke(t,1/i,s)),t}function Wd(t,e=0,n=1,s=.5,i,o=t,r=t){if(it.test(e)&&(e=parseFloat(e),e=O(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=O(o.min,o.max,s);t===o&&(a-=e),t.min=no(t.min,e,n,a,i),t.max=no(t.max,e,n,a,i)}function so(t,e,[n,s,i],o,r){Wd(t,e[n],e[s],e[i],e.scale,o,r)}const Gd=["x","scaleX","originX"],Kd=["y","scaleY","originY"];function io(t,e,n,s){so(t.x,e,Gd,n?n.x:void 0,s?s.x:void 0),so(t.y,e,Kd,n?n.y:void 0,s?s.y:void 0)}function ro(t){return t.translate===0&&t.scale===1}function oo(t){return ro(t.x)&&ro(t.y)}function ao(t,e){return t.min===e.min&&t.max===e.max}function Hd(t,e){return ao(t.x,e.x)&&ao(t.y,e.y)}function lo(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function co(t,e){return lo(t.x,e.x)&&lo(t.y,e.y)}function uo(t){return K(t.x)/K(t.y)}function fo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Xd{constructor(){this.members=[]}add(e){_e(this.members,e),e.scheduleRender()}remove(e){if(Ue(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Yd(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0:n.z)||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:p}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),d&&(s+=`rotateX(${d}deg) `),f&&(s+=`rotateY(${f}deg) `),h&&(s+=`skewX(${h}deg) `),p&&(s+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const ts=["","X","Y","Z"],qd=1e3;let Zd=0;function es(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function ho(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Pr(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",B,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&ho(s)}function mo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Zd++,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,this.nodes.forEach(tf),this.nodes.forEach(rf),this.nodes.forEach(of),this.nodes.forEach(ef)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new jd)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Ke),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Ui(r)&&!Uc(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;B.read(()=>{d=window.innerWidth}),t(r,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=Rd(f,250),Ve.hasAnimatedSinceResize&&(Ve.hasAnimatedSinceResize=!1,this.nodes.forEach(yo)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||df,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=c.getProps(),x=!this.targetLayout||!co(this.targetLayout,h),T=!d&&f;if(this.options.layoutRoot||this.resumeFrom||T||d&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Cn(p,"layout"),onPlay:g,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(u,T)}else d||yo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),pt(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(af),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ho(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(po);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(go);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sf),this.nodes.forEach(Jd),this.nodes.forEach(Qd)):this.nodes.forEach(go),this.clearAllSnapshots();const a=X.now();W.delta=lt(0,1e3/60,a-W.timestamp),W.timestamp=a,W.isProcessing=!0,Ze.update.process(W),Ze.preRender.process(W),Ze.render.process(W),W.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Pn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(nf),this.sharedNodes.forEach(lf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,B.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){B.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!K(this.snapshot.measuredBox.x)&&!K(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=$(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!oo(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||Ct(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),ff(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:r}=this.options;if(!r)return $();const a=r.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(hf))){const{scroll:u}=this.root;u&&(Rt(a.x,u.offset.x),Rt(a.y,u.offset.y))}return a}removeElementScroll(r){var l;const a=$();if(nt(a,r),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&nt(a,r),Rt(a.x,d.offset.x),Rt(a.y,d.offset.y))}return a}applyTransform(r,a=!1){const l=$();nt(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&zt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Ct(u.latestValues)&&zt(l,u.latestValues)}return Ct(this.latestValues)&&zt(l,this.latestValues),l}removeTransform(r){const a=$();nt(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Ct(c.latestValues))continue;Un(c.latestValues)&&c.updateSnapshot();const u=$(),d=c.measurePageBox();nt(u,d),io(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Ct(this.latestValues)&&io(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==W.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var h;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=W.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$(),this.targetWithTransforms=$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),xd(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nt(this.target,this.layout.layoutBox),pr(this.target,this.targetDelta)):nt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!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))}getClosestProjectingParent(){if(!(!this.parent||Un(this.parent.latestValues)||fr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(r,a,l){this.relativeParent=r,this.linkedParentVersion=r.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$(),this.relativeTargetOrigin=$(),Ae(this.relativeTargetOrigin,a,l),nt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var p;const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===W.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;nt(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;Lu(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=$());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(eo(this.prevProjectionDelta.x,this.projectionDelta.x),eo(this.prevProjectionDelta.y,this.projectionDelta.y)),ie(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!fo(this.projectionDelta.x,this.prevProjectionDelta.x)||!fo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),r){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=$t(),this.projectionDelta=$t(),this.projectionDeltaWithTransform=$t()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=$t();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=$(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=h!==p,y=this.getStack(),x=!y||y.members.length<=1,T=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(uf));this.animationProgress=0;let w;this.mixTargetDelta=D=>{const A=D/1e3;bo(d.x,r.x,A),bo(d.y,r.y,A),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ae(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cf(this.relativeTarget,this.relativeTargetOrigin,f,A),w&&Hd(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=$()),nt(w,this.relativeTarget)),g&&(this.animationValues=u,$d(u,c,this.latestValues,A,T,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(pt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=B.update(()=>{Ve.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Bt(0)),this.currentAnimation=Bd(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),r.onUpdate&&r.onUpdate(u)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(qd),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&So(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||$();const d=K(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+d;const f=K(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}nt(a,l),zt(a,u),ie(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Xd),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var a;const{layoutId:r}=this.options;return r?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:r}=this.options;return r?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&es("z",r,c,this.animationValues);for(let u=0;u<ts.length;u++)es(`rotate${ts[u]}`,r,c,this.animationValues),es(`skew${ts[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Ce(a==null?void 0:a.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Ce(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ct(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=Yd(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),r.transform=d;const{x:f,y:h}=this.projectionDelta;r.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?r.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:r.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in Nn){if(u[p]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:x}=Nn[p],T=d==="none"?u[p]:g(u[p],c);if(y){const w=y.length;for(let D=0;D<w;D++)r[y[D]]=T}else x?this.options.visualElement.renderState.vars[p]=T:r[p]=T}this.options.layoutId&&(r.pointerEvents=c===this?Ce(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(po),this.root.sharedNodes.clear()}}}function Jd(t){t.updateLayout()}function Qd(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=e.source!==t.layout.source;o==="size"?Q(d=>{const f=r?e.measuredBox[d]:e.layoutBox[d],h=K(f);f.min=s[d].min,f.max=f.min+h}):So(o,e.layoutBox,s)&&Q(d=>{const f=r?e.measuredBox[d]:e.layoutBox[d],h=K(s[d]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+h)});const a=$t();ie(a,s,e.layoutBox);const l=$t();r?ie(l,t.applyTransform(i,!0),e.measuredBox):ie(l,s,e.layoutBox);const c=!oo(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const p=$();Ae(p,e.layoutBox,f.layoutBox);const g=$();Ae(g,s,h.layoutBox),co(p,g)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=p,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function tf(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function ef(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function nf(t){t.clearSnapshot()}function po(t){t.clearMeasurements()}function go(t){t.isLayoutDirty=!1}function sf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function yo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rf(t){t.resolveTargetDelta()}function of(t){t.calcProjection()}function af(t){t.resetSkewAndRotation()}function lf(t){t.removeLeadSnapshot()}function bo(t,e,n){t.translate=O(e.translate,0,n),t.scale=O(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function vo(t,e,n,s){t.min=O(e.min,n.min,s),t.max=O(e.max,n.max,s)}function cf(t,e,n,s){vo(t.x,e.x,n.x,s),vo(t.y,e.y,n.y,s)}function uf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const df={duration:.45,ease:[.4,0,.1,1]},xo=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),wo=xo("applewebkit/")&&!xo("chrome/")?Math.round:Z;function To(t){t.min=wo(t.min),t.max=wo(t.max)}function ff(t){To(t.x),To(t.y)}function So(t,e,n){return t==="position"||t==="preserve-aspect"&&!vd(uo(e),uo(n),.2)}function hf(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const mf=mo({attachResizeListener:(t,e)=>ee(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ns={current:void 0},Co=mo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ns.current){const t=new mf({});t.mount(window),t.setOptions({layoutScroll:!0}),ns.current=t}return ns.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),pf={pan:{Feature:Nd},drag:{Feature:Id,ProjectionNode:Co,MeasureLayout:Xr}};function ko(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&B.postRender(()=>o(e,ne(e)))}class gf extends bt{mount(){const{current:e}=this.node;e&&(this.unmount=jc(e,(n,s)=>(ko(this.node,s,"Start"),i=>ko(this.node,i,"End"))))}unmount(){}}class yf extends bt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Gt(ee(this.node.current,"focus",()=>this.onFocus()),ee(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ao(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&B.postRender(()=>o(e,ne(e)))}class bf extends bt{mount(){const{current:e}=this.node;e&&(this.unmount=_c(e,(n,s)=>(Ao(this.node,s,"Start"),(i,{success:o})=>Ao(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ss=new WeakMap,is=new WeakMap,vf=t=>{const e=ss.get(t.target);e&&e(t)},xf=t=>{t.forEach(vf)};function wf({root:t,...e}){const n=t||document;is.has(n)||is.set(n,{});const s=is.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(xf,{root:t,...e})),s[i]}function Tf(t,e,n){const s=wf(e);return ss.set(t,n),s.observe(t),()=>{ss.delete(t),s.unobserve(t)}}const Sf={some:0,all:1};class Cf extends bt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Sf[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return Tf(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(kf(e,n))&&this.startObserver()}unmount(){}}function kf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Af={...hd,...{inView:{Feature:Cf},tap:{Feature:bf},focus:{Feature:yf},hover:{Feature:gf}},...pf,...{layout:{ProjectionNode:Co,MeasureLayout:Xr}}},Y=Mu(Af,_u),Po=v.createContext(null);function Vo(){const t=v.useContext(Po);if(!t)throw new Error("Dialog components (like DialogTrigger, DialogContent) must be used within a <Dialog> provider.");return t}function Mo({children:t,defaultOpen:e=!1,onOpenChange:n,open:s}){const[i,o]=v.useState(e),r=s!==void 0,a=r?s:i,l=v.useCallback(c=>{r?n==null||n(c):o(c)},[r,n]);return m.jsx(Po.Provider,{value:{onOpenChange:l,open:a},children:t})}function Pf({children:t,ref:e,variant:n,...s}){const{onOpenChange:i}=Vo();return m.jsx(Es,{onClick:()=>i(!0),ref:e,...s,variant:n,children:t})}const Vf=oe("absolute flex flex-col bg-surface p-6 z-10 border-2 border-border overflow-hidden",{defaultVariants:{position:"center"},variants:{position:{bottom:"w-full h-3/4 md:h-1/3 rounded-t-lg bottom-0",center:"relative w-[90%] max-h-[95vh] md:w-1/2 md:h-1/3 h-fit rounded-lg",left:"w-[85%] md:w-1/3 h-full rounded-r-lg left-0 px-3",right:"w-[85%] md:w-1/3 h-full rounded-l-lg right-0 px-3",top:"w-full h-3/4 md:h-1/3 rounded-b-lg top-0"}}}),Mf={bottom:{animate:{y:0},exit:{y:"100%"},initial:{y:"100%"},transition:{duration:.3,ease:"easeInOut"}},center:{animate:{opacity:1,scale:[0,1.05,1]},exit:{opacity:0,scale:.95},initial:{opacity:0,scale:.95},transition:{duration:.35,ease:"easeOut"}},left:{animate:{x:0},exit:{x:"-100%"},initial:{x:"-100%"},transition:{duration:.3,ease:"easeInOut"}},right:{animate:{x:0},exit:{x:"100%"},initial:{x:"100%"},transition:{duration:.3,ease:"easeInOut"}},top:{animate:{y:0},exit:{y:"-100%"},initial:{y:"-100%"},transition:{duration:.3,ease:"easeInOut"}}};function Do({children:t,className:e,closeButton:n=!1,position:s,ref:i,...o}){const{onOpenChange:r,open:a}=Vo();v.useEffect(()=>{function c(u){u.key==="Escape"&&r(!1)}return document.body.addEventListener("keydown",c),()=>document.body.removeEventListener("keydown",c)},[r]);const l=Mf[s??"center"];return Oo.createPortal(m.jsx(En,{children:a&&m.jsxs(Y.div,{animate:{opacity:1},className:"fixed inset-0 z-50 flex items-center justify-center",exit:{opacity:0},initial:{opacity:0},transition:{duration:.2},children:[m.jsx("div",{"aria-label":"Close overlay",className:"fixed inset-0 bg-black/70",onClick:()=>r(!1),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&r(!1)},role:"button",tabIndex:-1}),m.jsxs(Y.div,{"aria-modal":"true",className:E(Vf({position:s}),e),onClick:c=>c.stopPropagation(),role:"dialog",...l,ref:i,...o,children:[t,n&&m.jsx("button",{"aria-label":"Close dialog",className:"absolute top-4 right-4 hover:scale-105 hover:text-primary transition-all cursor-pointer",onClick:()=>r(!1),children:m.jsx(qo,{size:32})})]})]})}),document.body)}function Df({children:t,className:e,ref:n,subtitle:s,title:i,...o}){return m.jsxs("div",{className:E("flex flex-col gap-1 border-b-2 border-text pb-1 mb-3",e),ref:n,...o,children:[i&&m.jsx("h3",{className:"font-bold text-xl",children:i}),s&&m.jsx("p",{className:"text-text-secondary text-lg",children:s}),t]})}function Ef({children:t,className:e,ref:n,text:s,...i}){return m.jsxs("div",{className:E("flex border-y-2 border-text p-2 my-2",e),ref:n,...i,children:[s&&m.jsx("p",{className:"w-full text-text italic text-center",children:s}),t]})}function Lf({children:t,className:e,...n}){return m.jsx("div",{className:E("flex-1 overflow-y-auto min-h-0",e),...n,children:t})}function If({children:t,className:e,ref:n,...s}){return m.jsx("div",{className:E("w-full flex flex-row justify-end items-center gap-4 bottom-0",e),ref:n,...s,children:t})}function Nf({className:t,disabled:e,errorText:n,icon:s,id:i,ref:o,suffix:r,...a}){const l=v.useId(),c=i||l,u=`${c}-error`;return m.jsxs("div",{className:"flex flex-col relative",children:[m.jsxs("div",{className:E("flex flex-row items-center gap-2 px-2 py-2 rounded-md border transition-all","bg-input-background text-text","focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-1 focus-within:ring-offset-background",e&&"opacity-50 cursor-not-allowed bg-disabled-surface",n&&!e?"border-error focus-within:ring-error":"border-border focus-within:ring-primary-focus",t),children:[s&&m.jsx("div",{className:"text-text flex pr-1 border-r-2 border-text",children:s}),m.jsx("input",{"aria-describedby":n?u:void 0,"aria-invalid":!!n,className:`flex-1 w-full h-full bg-transparent outline-none placeholder:text-text-secondary file:bg-transparent file:border-0 file:text-sm file:font-medium ${e&&"cursor-not-allowed"}`,disabled:e,id:c,ref:o,...a}),r&&m.jsx("div",{className:"flex shrink-0 text-text-secondary",children:r})]}),m.jsx(En,{mode:"wait",children:n&&m.jsx(Y.p,{animate:{height:"auto",opacity:1,y:0},className:"mt-1 text-sm text-error-text font-medium ml-1",exit:{height:0,opacity:0,y:-10},id:u,initial:{height:0,opacity:0,y:-10},role:"alert",children:n})})]})}function Ff({className:t,color:e,dotsCount:n=3,duration:s=.7,gap:i=6,itemStagger:o=.2,jumpHeight:r=15,repeatDuration:a=.5,size:l=10,...c}){const u={animate:{transition:{delayChildren:Wi(o)}}},d={animate:{transition:{duration:s,ease:"easeInOut",repeat:1/0,repeatDelay:a},y:[0,-r,0]}};return m.jsx("div",{className:E("flex items-center justify-center",t),...c,"aria-label":"Loading",role:"status",children:m.jsx(Y.div,{animate:"animate",className:"flex flex-row w-full h-full",initial:"initial",style:{gap:i},variants:u,children:Array.from({length:n}).map((f,h)=>m.jsx(Y.div,{className:"rounded-full border border-border",style:{backgroundColor:e??"var(--primary)",height:l,width:l},variants:d},h))})})}function Bf({className:t,primaryColor:e,primaryDuration:n=1,secondaryColor:s,secondaryDuration:i=.8,size:o=48,...r}){const a=o/2,l=o*.35,c=o*.2;return m.jsxs("div",{className:E("relative flex justify-center items-center",t),...r,style:{height:o,width:o},children:[m.jsx(Y.div,{animate:{rotate:360},className:"absolute top-0 left-1/2 rounded-full",style:{backgroundColor:e??"var(--primary)",height:l,transformOrigin:`50% ${a}px`,width:l,x:"-50%"},transition:{duration:n,ease:"linear",repeat:1/0}}),m.jsx(Y.div,{animate:{rotate:-360},className:"absolute top-0 left-1/2 rounded-full",style:{backgroundColor:s??"var(--secondary)",height:c,transformOrigin:`50% ${a}px`,width:c,x:"-50%"},transition:{duration:i,ease:"linear",repeat:1/0}})]})}function Of({barCount:t=5,barHeight:e,barWidth:n=16,className:s,color:i,duration:o,itemStagger:r=.15,...a}){const l=Math.max(10,e/4),c={animate:{opacity:1,transition:{delayChildren:Wi(r)}},initial:{opacity:0}},u={animate:{height:[l,e,l],transition:{duration:o||t*.3,ease:"easeInOut",repeat:1/0}},initial:{height:l}},d=Array.from({length:t},(f,h)=>h);return m.jsx("div",{"aria-label":"Loading",className:E("relative flex items-center justify-center",s),role:"status",...a,children:m.jsx(Y.ul,{animate:"animate",className:"flex flex-row gap-4 h-full w-full items-center justify-center",initial:"initial",style:{height:e},variants:c,children:d.map(f=>m.jsx(Y.li,{style:{backgroundColor:i??"var(--primary)",borderRadius:n/2,width:n},variants:u},f))})})}function jf({className:t,duration:e=2,ease:n="easeInOut",primaryColor:s,rotationsCount:i=5,secondaryColor:o,size:r=72,thickness:a,...l}){return e=e<.25?.25:e,m.jsx("div",{className:E("relative flex items-center justify-center",t),...l,"aria-label":"Loading",role:"status",children:m.jsx(Y.div,{animate:{rotate:i*360},className:"relative rounded-full flex items-center justify-center overflow-hidden",style:{borderColor:s??"var(--primary)",borderTopColor:o??"var(--secondary)",borderWidth:a||r/6,height:r,width:r},transition:{duration:e,ease:n,repeat:1/0,type:n==="linear"?void 0:"spring"}})})}const Eo=v.createContext(null);function Rf({children:t,className:e,disabled:n,name:s,onValueChange:i,value:o,...r}){const a=v.useId(),l=s||a;return m.jsx(Eo.Provider,{value:{disabled:n,name:l,onValueChange:i,value:o},children:m.jsx("div",{className:E("flex flex-col gap-2",e),role:"radiogroup",...r,children:t})})}function zf({className:t,id:e,label:n,value:s,...i}){const o=v.use(Eo);if(!o)throw new Error("RadioButton must be used within a RadioGroup");const r=v.useId(),a=e||r,l=o.value===s,c=i.disabled||o.disabled;return m.jsxs("label",{className:E("flex items-center gap-2 group relative transition-opacity group",c?"cursor-not-allowed opacity-50":"cursor-pointer"),children:[m.jsx("input",{checked:l,className:"peer sr-only",disabled:c,id:a,name:o.name,onChange:()=>o.onValueChange(s),type:"radio",value:s,...i}),m.jsx("div",{className:E("h-4 w-4 rounded-full border border-border flex items-center justify-center transition-all shadow-sm p-0.5","bg-input-background",!c&&" group-hover:ring-2 group-hover:ring-primary-focus group-hover:ring-offset-0","peer-checked:text-text","peer-focus-visible:ring-2 peer-focus-visible:ring-primary-focus peer-focus-visible:ring-offset-0",t),children:m.jsx(Go,{className:E("h-2.5 w-2.5 block transition-transform duration-200",l?"scale-100":"scale-0"),fill:"currentColor"})}),n&&m.jsx(ue,{disabled:c,htmlFor:a,children:n})]})}const Lo=768;function $f(){return v.useSyncExternalStore(t=>{const e=window.matchMedia(`(max-width: ${Lo-1}px)`);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},()=>window.matchMedia(`(max-width: ${Lo-1}px)`).matches,()=>!1)}const Io=v.createContext(null);function No(){const t=v.useContext(Io);if(!t)throw new Error("useSidebar must be used within a <Sidebar> provider.");return t}function _f({children:t,collapsed:e,defaultCollapsed:n=!1,mobileOpen:s,onCollapsedChange:i,onMobileOpenChange:o}){const r=$f(),[a,l]=v.useState(n),c=e!==void 0,u=c?e:a,[d,f]=v.useState(!1),h=s!==void 0,p=h?s:d,g=v.useCallback(w=>{c?i==null||i(w):l(w)},[c,i]),y=v.useCallback(w=>{h?o==null||o(w):f(w)},[h,o]),x=v.useCallback(()=>{r?y(!p):g(!u)},[r,p,y,u,g]),T=v.useMemo(()=>({collapsed:u,isMobile:r,mobileOpen:p,setCollapsed:g,setMobileOpen:y,toggleSidebar:x}),[u,p,g,y,x,r]);return m.jsx(Io.Provider,{value:T,children:t})}function Uf({children:t,className:e,collapsedWidth:n="3.5rem",dialogProps:s,ref:i,side:o="left",style:r,width:a="16rem",...l}){const{collapsed:c,isMobile:u,mobileOpen:d,setMobileOpen:f}=No();return u?m.jsx(Mo,{onOpenChange:f,open:d,children:m.jsx(Do,{closeButton:!1,position:o,...s,className:E("h-full bg-surface text-text border-border border-r",e,s==null?void 0:s.className),children:m.jsx("div",{className:"group/sidebar h-full flex flex-col","data-collapsed":"false",children:t})})}):m.jsx("aside",{className:E("group/sidebar overflow-hidden inset-y-0 z-30 flex flex-col h-screen bg-surface border-border-strong transition-[width] duration-300 ease-in-out",o==="left"?"border-r left-0":"border-l right-0",e),"data-collapsed":c,ref:i,style:{width:c?n:a,...r},...l,children:t})}function Wf({children:t,className:e,...n}){return m.jsx("div",{className:E("flex flex-col p-2 shrink-0 border-b-2 border-border",e),...n,children:t})}function Gf({children:t,className:e,ref:n,...s}){return m.jsx("div",{className:E("flex flex-col gap-2 flex-1 p-2",e),ref:n,...s,children:t})}function Kf({categoryTitle:t,children:e,className:n,icon:s,...i}){const o="group-data-[collapsed=true]/sidebar:hidden";return m.jsx("div",{className:E("flex flex-row items-center gap-2 rounded-md p-2 transition-all","justify-start",t?"mt-2":"cursor-pointer hover:bg-info-surface",n),...i,children:t?m.jsxs(m.Fragment,{children:[m.jsx("h4",{className:E("font-bold text-lg whitespace-nowrap overflow-hidden",o),children:e}),m.jsx("div",{className:E("hidden group-data-[collapsed=true]/sidebar:block"),children:s??m.jsx(Ho,{strokeWidth:3})})]}):m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"shrink-0 flex items-center justify-center",children:s}),m.jsx("div",{className:E("whitespace-nowrap overflow-hidden transition-opacity duration-200",o),children:e})]})})}function Hf({children:t,className:e,...n}){return m.jsx("div",{className:E("flex flex-col p-2 mt-auto shrink-0 border-t-2 border-border",e),...n,children:t})}function Xf({children:t,className:e,...n}){const{toggleSidebar:s}=No();return m.jsx("button",{className:E("p-2 rounded border border-border hover:bg-border transition-colors bg-border-subtle",e),onClick:()=>s(),title:"Toggle sidebar",...n,children:t})}function Yf({checked:t,className:e,disabled:n,error:s,id:i,label:o,onChange:r,onCheckedChange:a,ref:l,switchIcon:c,...u}){const d=v.useId(),f=i||d,h=p=>{a(p.target.checked),r&&r(p)};return m.jsxs(m.Fragment,{children:[m.jsxs("label",{className:E("flex h-8 w-[60px] cursor-pointer items-center rounded-full p-1 transition-colors duration-300 shadow",t?"bg-primary":"bg-border-strong",n&&"cursor-not-allowed opacity-50",t?"justify-end":"justify-start","has-[:focus-visible]:outline-none has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-primary-focus has-[:focus-visible]:ring-offset-2",e),htmlFor:f,children:[m.jsx("input",{checked:t,className:"peer sr-only",disabled:n,id:f,onChange:h,ref:l,type:"checkbox",...u}),m.jsx(Y.div,{className:E("aspect-square h-full rounded-full bg-white shadow-sm","flex items-center justify-center text-xs"),layout:!0,transition:{damping:30,stiffness:700,type:"spring"},children:c&&m.jsx(Y.div,{animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},initial:{opacity:0,scale:.5},children:c},t?"on":"off")})]}),o&&m.jsx(ue,{disabled:n,error:s,htmlFor:f,children:o})]})}const qf=oe("m-0 leading-normal transition-colors",{defaultVariants:{align:"left",color:"default",italic:!1,size:"base",underline:!1,weight:"normal"},variants:{align:{center:"text-center",justify:"text-justify",left:"text-left",right:"text-right"},color:{default:"text-text",error:"text-error-text",info:"text-info-text",muted:"text-text-secondary dark:text-slate-400",success:"text-success-text",warning:"text-warning-text"},italic:{false:"",true:"italic"},size:{"2xl":"text-2xl md:text-3xl","3xl":"text-3xl md:text-4xl","4xl":"text-4xl md:text-5xl",base:"text-base",lg:"text-lg",sm:"text-sm",xl:"text-xl",xs:"text-xs"},underline:{false:"",true:"underline"},weight:{bold:"font-bold",medium:"font-medium",normal:"font-normal",semibold:"font-semibold"}}});function Zf({align:t,as:e,children:n,className:s,color:i,italic:o,ref:r,size:a,underline:l,weight:c,...u}){const d=e||"p";return m.jsx(d,{className:E(qf({align:t,color:i,italic:o,size:a,underline:l,weight:c}),s),ref:r,...u,children:n})}function Jf({className:t,disabled:e,errorText:n,id:s,ref:i,...o}){const r=v.useId(),a=s||r,l=`${a}-error`;return m.jsxs("div",{className:"w-full flex flex-col relative",children:[m.jsx("textarea",{"aria-describedby":n?l:void 0,"aria-invalid":!!n,className:E("px-2 py-2 rounded-md border border-border transition-all w-full","bg-input-background text-text","focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-1 focus-within:ring-offset-background placeholder:text-text-secondary",e&&"opacity-50 cursor-not-allowed bg-disabled-surface",n&&!e?"border-error focus-within:ring-error":"border-border focus-within:ring-primary-focus",t),disabled:e,id:a,ref:i,...o}),m.jsx(En,{mode:"wait",children:n&&m.jsx(Y.p,{animate:{height:"auto",opacity:1,y:0},className:"mt-1 text-sm text-error-text font-medium ml-1",exit:{height:0,opacity:0,y:-10},id:l,initial:{height:0,opacity:0,y:-10},role:"alert",children:n})})]})}M.Alert=za,M.AlertMessage=_a,M.AlertTitle=$a,M.Button=Es,M.Card=Wa,M.CardContent=Xa,M.CardDescription=Ha,M.CardFooter=Ya,M.CardHeader=Ga,M.CardTitle=Ka,M.Checkbox=qa,M.Dialog=Mo,M.DialogBody=Lf,M.DialogButtons=If,M.DialogContent=Do,M.DialogFooter=Ef,M.DialogHeader=Df,M.DialogTrigger=Pf,M.Dots=Ff,M.Input=Nf,M.Label=ue,M.Orbital=Bf,M.RadioButton=zf,M.RadioGroup=Rf,M.ScreenLoader=Of,M.Sidebar=_f,M.SidebarBody=Gf,M.SidebarContent=Uf,M.SidebarFooter=Hf,M.SidebarHeader=Wf,M.SidebarItem=Kf,M.SidebarTrigger=Xf,M.Spinner=jf,M.Switch=Yf,M.Text=Zf,M.Textarea=Jf,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));